/* Prints complete input particle arborescence for the first 10 events. Useful for debugging purposes. root -l examples/Example5.C'("delphes_output.root")' */ #ifdef __CLING__ R__LOAD_LIBRARY(libDelphes) #include "classes/DelphesClasses.h" #include "external/ExRootAnalysis/ExRootTreeReader.h" #include "external/ExRootAnalysis/ExRootResult.h" #else class ExRootTreeReader; class ExRootResult; #endif //------------------------------------------------------------------------------ void Example5(const char *inputFile) { gSystem->Load("libDelphes"); // Create chain of root trees TChain chain("Delphes"); chain.Add(inputFile); // Create object of class ExRootTreeReader ExRootTreeReader *treeReader = new ExRootTreeReader(&chain); Long64_t numberOfEntries = treeReader->GetEntries(); // Get pointers to branches used in this analysis TClonesArray *branchParticle = treeReader->UseBranch("Particle"); // Loop over all events for(Int_t entry = 0; entry < numberOfEntries; ++entry) { // Load selected branches with data from specified event treeReader->ReadEntry(entry); if(entry>10) break; cout<<"" <GetEntriesFast(); i++) { GenParticle *gen = (GenParticle*) branchParticle->At(i); cout<<"N: "<Status<<", PID: "<PID<<", E: "<E<<", Px: "<Px<<", Py: "<Py<<", Pz: "<Pz<<", M: "<Mass<<", M1: "<M1<<", M2: "<M2<<", D1: "<D1<<", D2: "<D2<