Fork me on GitHub

Changeset b94aacf in git for readers


Ignore:
Timestamp:
Jul 4, 2013, 2:10:57 PM (11 years ago)
Author:
pavel <pavel@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
ad78364
Parents:
6e0bbe3
Message:

add event information

File:
1 edited

Legend:

Unmodified
Added
Removed
  • readers/DelphesPythia8.cpp

    r6e0bbe3 rb94aacf  
    2929//---------------------------------------------------------------------------
    3030
    31 void ConvertInput(Pythia8::Pythia *pythia, DelphesFactory *factory, TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray)
     31void ConvertInput(Long64_t eventCounter, Pythia8::Pythia *pythia,
     32  ExRootTreeBranch *branch, DelphesFactory *factory,
     33  TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray,
     34  TStopwatch *readStopWatch, TStopwatch *procStopWatch)
    3235{
    3336  int i;
     
    4144  Double_t px, py, pz, e;
    4245  Double_t x, y, z, t;
     46
     47  // event information
     48  mutableEvent = event.mutable_event();
     49
     50  element = static_cast<HepMCEvent *>(branch->NewEntry());
     51
     52  element->Number = eventCounter;
     53
     54  element->ProcessID = pythia->info.code();
     55  element->MPI = 1;
     56  element->Weight = pythia->info.weight();
     57  element->Scale = pythia->info.QRen();
     58  element->AlphaQED = pythia->info.alphaEM();
     59  element->AlphaQCD = pythia->info.alphaS();
     60
     61  element->ID1 = pythia->info.id1pdf();
     62  element->ID2 = pythia->info.id2pdf();
     63  element->X1 = pythia->info.x1pdf();
     64  element->X2 = pythia->info.x2pdf();
     65  element->ScalePDF = pythia->info.QFac();
     66  element->PDF1 = pythia->info.pdf1();
     67  element->PDF2 = pythia->info.pdf2();
     68
     69  element->ReadTime = readStopWatch->RealTime();
     70  element->ProcTime = procStopWatch->RealTime();
    4371
    4472  pdg = TDatabasePDG::Instance();
     
    146174    treeWriter = new ExRootTreeWriter(outputFile, "Delphes");
    147175
    148     branchEvent = treeWriter->NewBranch("Event", LHEFEvent::Class());
     176    branchEvent = treeWriter->NewBranch("Event", HepMCEvent::Class());
    149177
    150178    confReader = new ExRootConfReader;
     
    206234
    207235      procStopWatch.Start();
    208       ConvertInput(pythia, factory, allParticleOutputArray, stableParticleOutputArray, partonOutputArray);
     236      ConvertInput(eventCounter, pythia, branchEvent, factory,
     237        allParticleOutputArray, stableParticleOutputArray, partonOutputArray,
     238        &readStopWatch, &procStopWatch);
    209239      modularDelphes->ProcessTask();
    210240      procStopWatch.Stop();
Note: See TracChangeset for help on using the changeset viewer.