Changes in readers/DelphesCMSFWLite.cpp [3241a0e:1fa50c2] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
readers/DelphesCMSFWLite.cpp
r3241a0e r1fa50c2 56 56 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" 57 57 #include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" 58 #include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h"59 #include "SimDataFormats/GeneratorProducts/interface/WeightsInfo.h"60 58 61 59 using namespace std; … … 64 62 65 63 void ConvertInput(fwlite::Event &event, Long64_t eventCounter, 66 ExRootTreeBranch *branchEvent, ExRootTreeBranch *branchRwgt,67 DelphesFactory *factory, TObjArray *allParticleOutputArray,68 TObjArray * stableParticleOutputArray, TObjArray *partonOutputArray)64 ExRootTreeBranch *branchEvent, DelphesFactory *factory, 65 TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray, 66 TObjArray *partonOutputArray) 69 67 { 70 68 fwlite::Handle< GenEventInfoProduct > handleGenEventInfo; 71 69 72 fwlite::Handle< LHEEventProduct > handleLHEEvent;73 74 70 fwlite::Handle< vector< reco::GenParticle > > handleParticle; 75 71 vector< reco::GenParticle >::const_iterator itParticle; … … 79 75 80 76 handleGenEventInfo.getByLabel(event, "generator"); 81 handleLHEEvent.getByLabel(event, "source");82 77 handleParticle.getByLabel(event, "genParticles"); 83 78 84 79 HepMCEvent *element; 85 Weight *weight;86 80 Candidate *candidate; 87 81 TDatabasePDG *pdg; … … 92 86 Double_t px, py, pz, e, mass; 93 87 Double_t x, y, z; 94 95 const vector< gen::WeightsInfo > &vectorWeightsInfo = handleLHEEvent->weights();96 vector< gen::WeightsInfo >::const_iterator itWeightsInfo;97 88 98 89 element = static_cast<HepMCEvent *>(branchEvent->NewEntry()); … … 117 108 element->ReadTime = 0.0; 118 109 element->ProcTime = 0.0; 119 120 for(itWeightsInfo = vectorWeightsInfo.begin(); itWeightsInfo != vectorWeightsInfo.end(); ++itWeightsInfo)121 {122 weight = static_cast<Weight *>(branchRwgt->NewEntry());123 weight->Weight = itWeightsInfo->wgt;124 }125 110 126 111 pdg = TDatabasePDG::Instance(); … … 201 186 TStopwatch eventStopWatch; 202 187 ExRootTreeWriter *treeWriter = 0; 203 ExRootTreeBranch *branchEvent = 0 , *branchRwgt = 0;188 ExRootTreeBranch *branchEvent = 0; 204 189 ExRootConfReader *confReader = 0; 205 190 Delphes *modularDelphes = 0; … … 241 226 242 227 branchEvent = treeWriter->NewBranch("Event", HepMCEvent::Class()); 243 branchRwgt = treeWriter->NewBranch("Rwgt", Weight::Class());244 228 245 229 confReader = new ExRootConfReader; … … 284 268 for(event.toBegin(); !event.atEnd() && !interrupted; ++event) 285 269 { 286 ConvertInput(event, eventCounter, branchEvent, branchRwgt,factory,270 ConvertInput(event, eventCounter, branchEvent, factory, 287 271 allParticleOutputArray, stableParticleOutputArray, partonOutputArray); 288 272 modularDelphes->ProcessTask();
Note:
See TracChangeset
for help on using the changeset viewer.