Changeset 450 in svn
- Timestamp:
- Jul 3, 2009, 6:14:36 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGELOG
r443 r450 1 2 * Changes relative to V.1.7b 3 - LHE files where not processed correctly (empty Analysis/Trigger trees). Now LHEFParticle derives from TRootC::GenParticle as it should. 1 4 2 5 /-----------------------------------------\ -
trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h
r408 r450 73 73 //--------------------------------------------------------------------------- 74 74 75 //--------------------------------------------------------------------------- 76 /* 75 77 class TRootLHEFParticle: public TSortableObject 76 78 { … … 100 102 // (c*tau, distance from production to decay in mm) 101 103 // | hepup.VTIMUP[number] 102 104 103 105 double Spin; // cosine of the angle between the particle spin vector 104 106 // and the decaying particle 3-momentum, … … 110 112 111 113 }; 112 114 */ 113 115 //--------------------------------------------------------------------------- 114 116 … … 526 528 527 529 530 531 532 class TRootLHEFParticle: public TRootC::GenParticle 533 { 534 public: 535 TRootLHEFParticle() {}; 536 int ColorLine1; // index for the particle color-line | hepup.ICOLUP[number][0] 537 int ColorLine2; // index for the particle anti-color-line | hepup.ICOLUP[number][1] 538 539 double Rapidity; // particle rapidity 540 double LifeTime; // particle invariant lifetime 541 // (c*tau, distance from production to decay in mm) 542 // | hepup.VTIMUP[number] 543 544 double Spin; // cosine of the angle between the particle spin vector 545 // and the decaying particle 3-momentum, 546 // specified in the lab frame. | hepup.SPINUP[number] 547 548 static TCompare *fgCompare; //! 549 const TCompare *GetCompare() const { return fgCompare; } 550 ClassDef(TRootLHEFParticle, 2) 551 552 }; 553 528 554 #endif // BLOCKCLASSES_H 529 555 -
trunk/interface/LHEFConverter.h
r443 r450 57 57 void AnalyseEvent(LHEF::Reader *reader, ExRootTreeBranch *branch, const Long64_t eventNumber); 58 58 void AnalyseParticles(LHEF::Reader *reader, ExRootTreeBranch *branch); 59 //void AnalyseLHEFParticles(LHEF::Reader *reader, ExRootTreeBranch *branch); 59 60 60 61 }; -
trunk/src/LHEFConverter.cc
r443 r450 80 80 element->PID = hepeup.IDUP[particle]; 81 81 element->Status = hepeup.ISTUP[particle]; 82 element->Mother1 = hepeup.MOTHUP[particle].first; 83 element->Mother2 = hepeup.MOTHUP[particle].second; 82 element->M1 = hepeup.MOTHUP[particle].first; 83 element->M2 = hepeup.MOTHUP[particle].second; 84 element->D1 = 0; 85 element->D2 = 0; 84 86 element->ColorLine1 = hepeup.ICOLUP[particle].first; 85 87 element->ColorLine2 = hepeup.ICOLUP[particle].second; … … 107 109 } 108 110 111 112 //--------------------------------------------------------------------------- 113 /* 114 void LHEFConverter::AnalyseParticles(LHEF::Reader *reader, ExRootTreeBranch *branch) 115 { 116 const LHEF::HEPEUP &hepeup = reader->hepeup; 117 Double_t signPz; 118 TLorentzVector momentum; 119 TRootC::GenParticle *element; 120 121 for(Int_t particle = 0; particle < hepeup.NUP; ++particle) 122 { 123 element = (TRootC::GenParticle*) branch->NewEntry(); 124 125 element->PID = hepeup.IDUP[particle]; 126 element->Status = hepeup.ISTUP[particle]; 127 element->M1 = hepeup.MOTHUP[particle].first; 128 element->M2 = hepeup.MOTHUP[particle].second; 129 //element->ColorLine1 = hepeup.ICOLUP[particle].first; 130 //element->ColorLine2 = hepeup.ICOLUP[particle].second; 131 element->D1 = 0; 132 element->D2 = 0; 133 134 PdgParticle pdg_part = pdg_table[element->PID]; 135 element->Charge = pdg_part.charge(); 136 element->M = pdg_part.mass(); 137 //element->Charge = ChargeVal(element->PID); 138 //element->M = hepeup.PUP[particle][4]; 139 140 element->E = hepeup.PUP[particle][3]; 141 element->Px = hepeup.PUP[particle][0]; 142 element->Py = hepeup.PUP[particle][1]; 143 element->Pz = hepeup.PUP[particle][2]; 144 145 momentum.SetPxPyPzE(element->Px, element->Py, element->Pz, element->E); 146 element->PT = momentum.Perp(); 147 signPz = (element->Pz >= 0.0) ? 1.0 : -1.0; 148 //element->Eta = element->PT == 0.0 ? signPz*999.9 : momentum.Eta(); to avoid a warning from ROOT, replace the "==0" by "< 1e-6" 149 element->Eta = element->PT < 1E-6 ? signPz*999.9 : momentum.Eta(); 150 element->Phi = momentum.Phi(); 151 // element->Rapidity = element->PT < 1E-6 ? signPz*999.9 : momentum.Rapidity(); 152 // element->LifeTime = hepeup.VTIMUP[particle]; 153 // element->Spin = hepeup.SPINUP[particle]; 154 } 155 } 156 */ 157 109 158 LHEFConverter::~LHEFConverter() 110 159 { … … 112 161 113 162 //------------------------------------------------------------------------------ 114 LHEFConverter::LHEFConverter(const string& inputFileList, const string& outputFileName, const PdgTable& pdg, const int& Nevents) : 115 DataConverter(pdg,Nevents) { 163 LHEFConverter::LHEFConverter(const string& inputFileList, const string& outputFileName, const PdgTable& pdg, const int& Nevents) : DataConverter(pdg,Nevents) { 116 164 117 165 ExRootTreeWriter *treeWriter = new ExRootTreeWriter(outputFileName, "GEN"); … … 122 170 // generated partons from LHEF 123 171 ExRootTreeBranch *branchParticle = treeWriter->NewBranch("Particle", TRootLHEFParticle::Class()); 172 //ExRootTreeBranch *branchParticle = treeWriter->NewBranch("Particle", TRootC::GenParticle::Class()); 124 173 125 174 // Open a stream connected to an event file: … … 167 216 } 168 217 treeWriter->Write(); 169 170 171 218 delete treeWriter; 172 219 //delete inputReader;
Note:
See TracChangeset
for help on using the changeset viewer.