Fork me on GitHub

Changeset 380 in svn for trunk/src/HepMCConverter.cc


Ignore:
Timestamp:
May 12, 2009, 9:47:12 AM (15 years ago)
Author:
Xavier Rouby
Message:

new PDG table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/HepMCConverter.cc

    r376 r380  
    3636#include "BlockClasses.h"
    3737
    38 #include "SmearUtil.h"
     38#include "PdgParticle.h"
    3939#include "ExRootTreeWriter.h"
    4040#include "ExRootTreeBranch.h"
     
    197197      element->D1 = da1;
    198198      element->D2 = da2;
    199       element->Charge = ChargeVal(pid);
    200199
    201200      element->E = index_to_particle[n]->momentum().e();
     
    203202      element->Py = index_to_particle[n]->momentum().py();
    204203      element->Pz = index_to_particle[n]->momentum().pz();
    205       element->M =  index_to_particle[n]->momentum().m();
    206 
    207       float PT = sqrt(pow(element->Px,2)+pow(element->Py,2));
    208       element->PT = PT;
     204
     205
     206      //cout << "element->PID = " << pid << "\t";
     207      //PdgParticle pdg_part(PdgID[pid]);
     208      //element->M =  index_to_particle[n]->momentum().m(); // this is the particle virtuality, not its rest mass
     209      //element->M      = pdg_part.mass();
     210      //element->Charge = pdg_part.charge();
     211      //cout << "element->M = " << element->M << " \t element->Charge = " << element->Charge << endl;
     212
     213      element->PT = sqrt(pow(element->Px,2)+pow(element->Py,2));
    209214
    210215      momentum.SetPxPyPzE(element->Px, element->Py, element->Pz, element->E);
     
    256261//------------------------------------------------------------------------------
    257262
    258 HepMCConverter::HepMCConverter(const string& inputFileList, const string& outputFileName, const int& Nevents) : DataConverter(Nevents)
     263HepMCConverter::HepMCConverter(const string& inputFileList, const string& outputFileName, const PdgTable& pdg, const int& Nevents) : DataConverter(pdg,Nevents)
    259264{
    260265 
Note: See TracChangeset for help on using the changeset viewer.