Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • readers/DelphesCMSFWLite.cpp

    r3241a0e r1fa50c2  
    5656#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
    5757#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
    58 #include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h"
    59 #include "SimDataFormats/GeneratorProducts/interface/WeightsInfo.h"
    6058
    6159using namespace std;
     
    6462
    6563void 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)
    6967{
    7068  fwlite::Handle< GenEventInfoProduct > handleGenEventInfo;
    7169
    72   fwlite::Handle< LHEEventProduct > handleLHEEvent;
    73 
    7470  fwlite::Handle< vector< reco::GenParticle > > handleParticle;
    7571  vector< reco::GenParticle >::const_iterator itParticle;
     
    7975
    8076  handleGenEventInfo.getByLabel(event, "generator");
    81   handleLHEEvent.getByLabel(event, "source");
    8277  handleParticle.getByLabel(event, "genParticles");
    8378
    8479  HepMCEvent *element;
    85   Weight *weight;
    8680  Candidate *candidate;
    8781  TDatabasePDG *pdg;
     
    9286  Double_t px, py, pz, e, mass;
    9387  Double_t x, y, z;
    94 
    95   const vector< gen::WeightsInfo > &vectorWeightsInfo = handleLHEEvent->weights();
    96   vector< gen::WeightsInfo >::const_iterator itWeightsInfo;
    9788
    9889  element = static_cast<HepMCEvent *>(branchEvent->NewEntry());
     
    117108  element->ReadTime = 0.0;
    118109  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   }
    125110
    126111  pdg = TDatabasePDG::Instance();
     
    201186  TStopwatch eventStopWatch;
    202187  ExRootTreeWriter *treeWriter = 0;
    203   ExRootTreeBranch *branchEvent = 0, *branchRwgt = 0;
     188  ExRootTreeBranch *branchEvent = 0;
    204189  ExRootConfReader *confReader = 0;
    205190  Delphes *modularDelphes = 0;
     
    241226
    242227    branchEvent = treeWriter->NewBranch("Event", HepMCEvent::Class());
    243     branchRwgt = treeWriter->NewBranch("Rwgt", Weight::Class());
    244228
    245229    confReader = new ExRootConfReader;
     
    284268      for(event.toBegin(); !event.atEnd() && !interrupted; ++event)
    285269      {
    286         ConvertInput(event, eventCounter, branchEvent, branchRwgt, factory,
     270        ConvertInput(event, eventCounter, branchEvent, factory,
    287271          allParticleOutputArray, stableParticleOutputArray, partonOutputArray);
    288272        modularDelphes->ProcessTask();
Note: See TracChangeset for help on using the changeset viewer.