From 92e00811db931f359d57a74a548a321f326261eb Mon Sep 17 00:00:00 2001 From: hyungjun <109190387+hyungjun-lee@users.noreply.github.com> Date: Thu, 8 Dec 2022 18:21:30 +0900 Subject: [PATCH] PWGMM: dndeta-hi.cxx update for hyperloop (#1539) * PWGMM: mdofied dndeta-hi.cxx * processCounting modified * EventClassAxis of hrecdndeta & hreczvtx is modified : Double_t(kINEL) -> Double_t(kDATA) --- PWGMM/Mult/Tasks/dndeta-hi.cxx | 73 ++++------------------------------ 1 file changed, 8 insertions(+), 65 deletions(-) diff --git a/PWGMM/Mult/Tasks/dndeta-hi.cxx b/PWGMM/Mult/Tasks/dndeta-hi.cxx index 6beb6ea0bc3..d556e124433 100644 --- a/PWGMM/Mult/Tasks/dndeta-hi.cxx +++ b/PWGMM/Mult/Tasks/dndeta-hi.cxx @@ -55,7 +55,7 @@ AxisSpec MultAxis = {301, -0.5, 300.5}; AxisSpec PhiAxis = {629, 0, 2 * M_PI}; AxisSpec PtAxis = {2401, -0.005, 24.005}; AxisSpec EvtClassAxis = {kECend - 1, kECbegin + 0.5, kECend - 0.5, "eventclass"}; -AxisSpec TrigClassAxis = {kTrigbegin - 1, kTrigbegin + 0.5, kTrigend - 0.5, "triggclass"}; +AxisSpec TrigClassAxis = {kTrigend - 1, kTrigbegin + 0.5, kTrigend - 0.5, "triggclass"}; std::vector centBinning = {0., 20, 60., 90., 100}; AxisSpec CentAxis = {centBinning, "centrality"}; @@ -78,7 +78,6 @@ struct MultiplicityCounter { Configurable estimatorEta{"estimatorEta", 1.0, "eta range for INEL>0 sample definition"}; Configurable useEvSel{"useEvSel", true, "use event selection"}; - // Configurable fillResponse{"fillResponse", false, "Fill response matrix"}; Configurable isMC{"isMC", false, "check if MC"}; Service ccdb; Configurable path{"ccdb-path", "Users/s/sherrman/My/Object", "base path to the ccdb object"}; @@ -99,19 +98,6 @@ struct MultiplicityCounter { std::vector usedTracksIds; - void init(InitContext&) - { - auto hstat = registry.get(HIST("Events/Selection")); - auto* x = hstat->GetXaxis(); - x->SetBinLabel(1, "All"); - x->SetBinLabel(2, "Selected"); - x->SetBinLabel(3, "Selected INEL>0"); - x->SetBinLabel(4, "Rejected"); - x->SetBinLabel(5, "Good BCs"); - x->SetBinLabel(6, "BCs with collisions"); - x->SetBinLabel(7, "BCs with pile-up/splitting"); - } - using FullBCs = soa::Join; void processEventStat( FullBCs const& bcs, @@ -162,36 +148,21 @@ struct MultiplicityCounter { void processCounting( soa::Join::iterator const& collision, FiTracks const& tracks, - soa::SmallGroups> const& atracks) // soa::SmallGroups const &atracks) // soa::Join + soa::SmallGroups const& atracks) // soa::Join { registry.fill(HIST("Events/Selection"), 1.); - // Bool_t IsMB0 = false; if (!useEvSel || collision.sel8()) { registry.fill(HIST("Events/Selection"), 2.); auto z = collision.posZ(); registry.fill(HIST("hreczvtx"), Double_t(kDATA), Double_t(kMBAND), 50., z); usedTracksIds.clear(); - // auto Ntrks = 0; - /* - for (auto& track : atracks) { - usedTracksIds.emplace_back(track.trackId()); - if (std::abs(track.etas()) < estimatorEta) { - ++Ntrks; - } - } - for (auto& track : tracks) { - if (std::find(usedTracksIds.begin(), usedTracksIds.end(), track.globalIndex()) != usedTracksIds.end()) { - continue; - } - if (std::abs(track.eta()) < estimatorEta) { - ++Ntrks; - } - }*/ tracketas.clear(); for (auto& track : atracks) { - tracketas.push_back(track.etas()); + auto otrack = track.track_as(); + // tracketas.push_back(track.etas()); + tracketas.push_back(otrack.eta()); } for (auto& track : tracks) { if (std::find(usedTracksIds.begin(), usedTracksIds.end(), track.globalIndex()) != usedTracksIds.end()) { @@ -201,7 +172,7 @@ struct MultiplicityCounter { } for (auto eta : tracketas) { - registry.fill(HIST("hrecdndeta"), Double_t(kINEL), Double_t(kMBAND), 50., z, eta); + registry.fill(HIST("hrecdndeta"), Double_t(kDATA), Double_t(kMBAND), 50., z, eta); // registry.fill(HIST("hrecdndeta"), Double_t(kINEL), Double_t(kMBAND), 50., z, 1); } } @@ -245,8 +216,7 @@ struct MultiplicityCounter { auto ttrack = track.track_as>(); usedTracksIds.emplace_back(ttrack.globalIndex()); if (ttrack.has_mcParticle()) { - // registry.fill(HIST("hrecdndeta"), Double_t(kDATA), Double_t(kMBAND), 50., z, ttrack.mcParticle_as().eta()); - registry.fill(HIST("hrecdndeta"), Double_t(kINEL), 50., z, ttrack.mcParticle_as().eta()); + registry.fill(HIST("hrecdndeta"), Double_t(kINEL), Double_t(kMBAND), 50., z, ttrack.mcParticle_as().eta()); } else { // when secondary } @@ -256,9 +226,7 @@ struct MultiplicityCounter { continue; } if (track.has_mcParticle()) { - // registry.fill(HIST("hrecdndeta"), Double_t(kDATA), Double_t(kMBAND), 50., z, track.mcParticle_as().eta()); - registry.fill(HIST("hrecdndeta"), Double_t(kINEL), 50., z, track.mcParticle_as().eta()); - // registry.fill(HIST("hrecdndeta"), Double_t(kINEL), Double_t(kMBAND), 50., z, 2); + registry.fill(HIST("hrecdndeta"), Double_t(kINEL), Double_t(kMBAND), 50., z, track.mcParticle_as().eta()); } else { // when secondary } @@ -267,31 +235,6 @@ struct MultiplicityCounter { } PROCESS_SWITCH(MultiplicityCounter, processMCCounting, "MC Count tracks", false); - Partition sample = (aod::fwdtrack::eta < -2.8f) && (aod::fwdtrack::eta > -3.2f); - expressions::Filter atrackFilterForward = (aod::fwdtrack::bestCollisionId >= 0) && - (aod::fwdtrack::etas < -2.0f) && - (aod::fwdtrack::etas > -3.9f) && - (nabs(aod::fwdtrack::bestDCAXY) <= 2.f); - void processForwardCounting(soa::Join::iterator const& collision, aod::MFTTracks const& tracks, soa::SmallGroups> const& atracks) - { - if (!useEvSel || (useEvSel && collision.sel8())) { - usedTracksIds.clear(); - auto z = collision.posZ(); - for (auto& track : atracks) { - usedTracksIds.emplace_back(track.mfttrackId()); - registry.fill(HIST("hrecdndeta"), 1, 1, 50., z, track.etas()); - } - for (auto& track : tracks) { - if (std::find(usedTracksIds.begin(), usedTracksIds.end(), track.globalIndex()) != usedTracksIds.end()) { - continue; - } - registry.fill(HIST("hrecdndeta"), 1, 1, 50., z, track.eta()); - // registry.fill(HIST("hrecdndeta"), 1 , 1, 50., z, 3); - } - } - } - PROCESS_SWITCH(MultiplicityCounter, processForwardCounting, "Count MFT tracks", false); - void processGen( aod::McCollisions::iterator const& mcCollision, o2::soa::SmallGroups> const& collisions,