#include #include #include #include #include #include #include "canvas/Utilities/InputTag.h" #include "gallery/Event.h" // energy deposits #include "lardataobj/Simulation/SimEnergyDeposit.h" // raw data #include "lardataobj/RawData/RawDigit.h" // Reco Base #include "lardataobj/RecoBase/Wire.h" #include "lardataobj/RecoBase/Cluster.h" #include "lardataobj/RecoBase/Hit.h" #include "lardataobj/RecoBase/Shower.h" #include "lardataobj/RecoBase/SpacePoint.h" #include "lardataobj/RecoBase/Track.h" #include "lardataobj/RecoBase/Vertex.h" #include "TFile.h" #include "TInterpreter.h" #include "TROOT.h" #include "TMath.h" #include "TH2.h" ///////////////////////////////////////////////////////////////////////////// void PrintParticleInfo(simb::MCParticle part) { std::cout << std::endl; std::cout << "Particle pdg " << part.PdgCode() << " and mass = " << part.Mass() << std::endl; std::cout << "(E;p) = " << "( " << part.E() << " ; " << part.Px() << " ; " << part.Py() << " ; " << part.Pz() << " ) GeV" << std::endl; std::cout << "has mother ? --> " << part.Mother() << std::endl; std::cout << "has daughters ? --> " << part.NumberDaughters() << std::endl; std::cout << std::endl; } ///////////////////////////////////////////////////////////////////////////// void checkProd(std::string fFileName) { std::string strgen = "generator"; art::InputTag taggen = art::InputTag{strgen}; // Create a vector of length 1, containing the given larsoft reco filename. std::vector filenames(1, fFileName); int evcounter = -1; // Loop over events for (gallery::Event ev(filenames); !ev.atEnd(); ev.next()) { evcounter++; // I might want to look into just one event //if (iev>=0 && evcounter!=iev ) continue; // get art/larsoft product desired auto const& mGen = *ev.getValidHandle< std::vector >(taggen); std::cout << "size = " << mGen.size() << std::endl; for (unsigned int i=0; i