Fork me on GitHub

Changeset d203a37 in git


Ignore:
Timestamp:
May 14, 2018, 8:46:22 AM (6 years ago)
Author:
Pavel Demin <pavel-demin@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
2886328
Parents:
00382e9
Message:

add branch Weight to DelphesHepMC.cpp

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • classes/DelphesHepMCReader.cc

    r00382e9 rd203a37  
    333333//---------------------------------------------------------------------------
    334334
     335void DelphesHepMCReader::AnalyzeWeight(ExRootTreeBranch *branch)
     336{
     337  Weight *element;
     338  vector< double >::const_iterator itWeight;
     339
     340  for(itWeight = fWeight.begin(); itWeight != fWeight.end(); ++itWeight)
     341  {
     342    element = static_cast<Weight *>(branch->NewEntry());
     343
     344    element->Weight = *itWeight;
     345  }
     346}
     347
     348//---------------------------------------------------------------------------
     349
    335350void DelphesHepMCReader::AnalyzeParticle(DelphesFactory *factory,
    336351  TObjArray *allParticleOutputArray,
  • classes/DelphesHepMCReader.h

    r00382e9 rd203a37  
    5959    TStopwatch *readStopWatch, TStopwatch *procStopWatch);
    6060
     61  void AnalyzeWeight(ExRootTreeBranch *branch);
     62
    6163private:
    6264
  • readers/DelphesHepMC.cpp

    r00382e9 rd203a37  
    6363  TStopwatch readStopWatch, procStopWatch;
    6464  ExRootTreeWriter *treeWriter = 0;
    65   ExRootTreeBranch *branchEvent = 0;
     65  ExRootTreeBranch *branchEvent = 0, *branchWeight = 0;
    6666  ExRootConfReader *confReader = 0;
    6767  Delphes *modularDelphes = 0;
     
    103103
    104104    branchEvent = treeWriter->NewBranch("Event", HepMCEvent::Class());
     105    branchWeight = treeWriter->NewBranch("Weight", Weight::Class());
    105106
    106107    confReader = new ExRootConfReader;
     
    194195
    195196            reader->AnalyzeEvent(branchEvent, eventCounter, &readStopWatch, &procStopWatch);
     197            reader->AnalyzeWeight(branchWeight);
    196198
    197199            treeWriter->Fill();
Note: See TracChangeset for help on using the changeset viewer.