21 #include "art_root_io/TFileService.h" 22 #include "art/Utilities/InputTag.h" 54 std::vector<double>
fP;
72 fTree = tfs->make<TTree>(
"particles",
"Particles tree");
84 auto truth=e.
getValidHandle<std::vector<simb::MCTruth> >(
"generator");
88 for(
const auto&
mc: *truth){
95 for(
int i=0;
i<
mc.NParticles();++
i){
96 auto p=
mc.GetParticle(
i);
97 fPdg.push_back(
p.PdgCode());
100 fY.push_back(
p.Vy());
101 fZ.push_back(
p.Vz());
void analyze(art::Event const &e) override
back track the reconstruction to the simulation
EDAnalyzer(fhicl::ParameterSet const &pset)
DEFINE_ART_MODULE(TestTMapFile)
SimAna(fhicl::ParameterSet const &p)
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
SimAna & operator=(SimAna const &)=delete
An ART module for generating supernova events via GENIE.