@@ -47,7 +47,6 @@ struct TestMCstdTabsRL {
4747
4848 HistogramRegistry histos{" histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
4949
50-
5150 struct : ConfigurableGroup {
5251 ConfigurableAxis zzAxisNtracks{" zzAxisNtracks" , {30 , -0.5 , 29.5 }, " Number of tracks in collision" };
5352 ConfigurableAxis zzAxisNparticles{" zzAxisNparticles" , {60 , -0.5 , 59.5 }, " Number of particles in collision" };
@@ -70,32 +69,31 @@ struct TestMCstdTabsRL {
7069 histos.add (" Events/Truth/hGenIDvsMotherPt" , " ;Process ID ;Mother p_{T} (GeV/c)" , HistType::kTH2D , {confAxis.zzAxisNprocesses , confAxis.zzAxisPt });
7170 histos.add (" Events/Truth/hGenIDvsMotherRap" , " ;Process ID ;Mother rapidity (-)" , HistType::kTH2D , {confAxis.zzAxisNprocesses , confAxis.zzAxisRap });
7271
73-
7472 } // end init
7573
7674 void processMCgen (aod::McCollision const & collision, aod::McParticles const & particles)
7775 {
7876
79- histos.get <TH2>(HIST (" Events/Truth/hGenIDvsCountCollisions" ))->Fill (collision.generatorsID (),1 );
80- histos.get <TH2>(HIST (" Events/Truth/hGenIDvsNparticles" ))->Fill (collision.generatorsID (),particles.size ());
81-
82- TLorentzVector mother;
83- for (const auto & particle : particles) {
84- histos.get <TH2>(HIST (" Events/Truth/hGenIDvsPDGcodesAll" ))->Fill (collision.generatorsID (),particle.pdgCode ());
85- // if (!particle.isPhysicalPrimary()) continue;
86- if (particle.has_mothers ())
87- continue ;
88- mother.SetPxPyPzE (particle.px (), particle.py (), particle.pz (), energy (pdg->Mass (particle.pdgCode ()), particle.px (), particle.py (), particle.pz ()));
89- histos.get <TH2>(HIST (" Events/Truth/hGenIDvsPDGcodesNoMother" ))->Fill (collision.generatorsID (),particle.pdgCode ());
90- histos.get <TH2>(HIST (" Events/Truth/hGenIDvsMotherMass" ))->Fill (collision.generatorsID (),mother.M ());
91- histos.get <TH2>(HIST (" Events/Truth/hGenIDvsMotherPt" ))->Fill (collision.generatorsID (),particle.pt ());
92- histos.get <TH2>(HIST (" Events/Truth/hGenIDvsMotherRap" ))->Fill (collision.generatorsID (),particle.y ());
93- const auto & daughters = particle.daughters_as <aod::McParticles>();
94- histos.get <TH2>(HIST (" Events/Truth/hGenIDvsNdaughters" ))->Fill (collision.generatorsID (),daughters.size ());
95- for (const auto & daughter : daughters) {
96- histos.get <TH2>(HIST (" Events/Truth/hGenIDvsPDGcodesDaughters" ))->Fill (collision.generatorsID (),daughter.pdgCode ());
97- }
98- }
77+ histos.get <TH2>(HIST (" Events/Truth/hGenIDvsCountCollisions" ))->Fill (collision.generatorsID (), 1 );
78+ histos.get <TH2>(HIST (" Events/Truth/hGenIDvsNparticles" ))->Fill (collision.generatorsID (), particles.size ());
79+
80+ TLorentzVector mother;
81+ for (const auto & particle : particles) {
82+ histos.get <TH2>(HIST (" Events/Truth/hGenIDvsPDGcodesAll" ))->Fill (collision.generatorsID (), particle.pdgCode ());
83+ // if (!particle.isPhysicalPrimary()) continue;
84+ if (particle.has_mothers ())
85+ continue ;
86+ mother.SetPxPyPzE (particle.px (), particle.py (), particle.pz (), energy (pdg->Mass (particle.pdgCode ()), particle.px (), particle.py (), particle.pz ()));
87+ histos.get <TH2>(HIST (" Events/Truth/hGenIDvsPDGcodesNoMother" ))->Fill (collision.generatorsID (), particle.pdgCode ());
88+ histos.get <TH2>(HIST (" Events/Truth/hGenIDvsMotherMass" ))->Fill (collision.generatorsID (), mother.M ());
89+ histos.get <TH2>(HIST (" Events/Truth/hGenIDvsMotherPt" ))->Fill (collision.generatorsID (), particle.pt ());
90+ histos.get <TH2>(HIST (" Events/Truth/hGenIDvsMotherRap" ))->Fill (collision.generatorsID (), particle.y ());
91+ const auto & daughters = particle.daughters_as <aod::McParticles>();
92+ histos.get <TH2>(HIST (" Events/Truth/hGenIDvsNdaughters" ))->Fill (collision.generatorsID (), daughters.size ());
93+ for (const auto & daughter : daughters) {
94+ histos.get <TH2>(HIST (" Events/Truth/hGenIDvsPDGcodesDaughters" ))->Fill (collision.generatorsID (), daughter.pdgCode ());
95+ }
96+ }
9997
10098 } // end processMCgenDG
10199
0 commit comments