@@ -91,28 +91,28 @@ struct wMuonFwdEfficiency {
9191
9292 // Filter<Tracks> etaFilter = track::eta < -2.5 && track::eta > -4;
9393
94- void processSim (aod::McCollision const & collision) // , aod::McParticles const& mcParticles)
94+ void processSim (aod::McCollision const & collision, aod::McParticles const & mcParticles)
9595 {
9696 histos.fill (HIST (" eventCounterSim" ), 0.5 );
97- // for (const auto& mcParticle : mcParticles) {
98- // // investigate the hardest process
99- // //auto statusCode = abs(mcParticle.getGenStatusCode());
100- // // if (statusCode <= 34) {
101- // // LOGF(info, "Hardest process particle has pdg code %d, from collision %d", mcParticle.pdgCode(), mcParticle.mcCollisionId());
102- // // }
103-
104- // if (abs(mcParticle.pdgCode())==13) {
105- // auto muMother = mcParticle.mothers_first_as<aod::McParticles>();
106- // auto muMotherPDG = abs(muMother.pdgCode());
107-
108- // if (muMotherPDG == 24) {
109- // //if (mcParticle.eta() > -4.0 && mcParticle.eta() < -2.5) { // muon from W in forward region
110- // histos.fill(HIST("yPtTruthHist"), mcParticle.pt(), mcParticle.eta());
111- // histos.fill(HIST("PtTruthHist"), mcParticle.pt());
112- // //}
113- // }
114- // }
115- // }
97+ for (const auto & mcParticle : mcParticles) {
98+ // investigate the hardest process
99+ // auto statusCode = abs(mcParticle.getGenStatusCode());
100+ // if (statusCode <= 34) {
101+ // LOGF(info, "Hardest process particle has pdg code %d, from collision %d", mcParticle.pdgCode(), mcParticle.mcCollisionId());
102+ // }
103+
104+ if (abs (mcParticle.pdgCode ())==13 ) {
105+ auto muMother = mcParticle.mothers_first_as <aod::McParticles>();
106+ auto muMotherPDG = abs (muMother.pdgCode ());
107+
108+ if (muMotherPDG == 24 ) {
109+ // if (mcParticle.eta() > -4.0 && mcParticle.eta() < -2.5) { // muon from W in forward region
110+ histos.fill (HIST (" yPtTruthHist" ), mcParticle.pt (), mcParticle.eta ());
111+ histos.fill (HIST (" PtTruthHist" ), mcParticle.pt ());
112+ // }
113+ }
114+ }
115+ }
116116 }
117117 PROCESS_SWITCH (wMuonFwdEfficiency, processSim, " W->muon simulation information" , true );
118118};
0 commit comments