1010// or submit itself to any jurisdiction.
1111//
1212// /
13+ // / \file dndetaMFTPbPb.cxx
1314// / \brief Task for calculating dNdeta in Pb-Pb collisions using MFT detector
1415// / \author Gyula Bencedi, [email protected] 1516// / \since Nov 2024
3940#include " Common/DataModel/TrackSelectionTables.h"
4041#include " CommonConstants/MathConstants.h"
4142
42- #include " Functions.h"
43- #include " Index.h"
4443#include " MathUtils/Utils.h"
4544#include " ReconstructionDataFormats/GlobalTrackID.h"
4645#include " TPDGCode.h"
46+
47+ #include " Functions.h"
48+ #include " Index.h"
4749#include " bestCollisionTable.h"
4850
4951using namespace o2 ;
@@ -133,7 +135,7 @@ struct DndetaMFTPbPb {
133135 " centralityBins" ,
134136 {VARIABLE_WIDTH, 0 , 5 , 10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 , 90 , 100 },
135137 " Centrality" };
136- ConfigurableAxis IrBins{ " IrBins " , {500 , 0 , 50 }, " Interaction rate (kHz)" };
138+ ConfigurableAxis irBins{ " irBins " , {500 , 0 , 50 }, " Interaction rate (kHz)" };
137139
138140 Service<o2::framework::O2DatabasePDG> pdg;
139141
@@ -246,7 +248,7 @@ struct DndetaMFTPbPb {
246248 x->SetBinLabel (2 , " Selected" );
247249
248250 qaregistry.add (" hOccIRate" , " hOccIRate" , HistType::kTH2F ,
249- {occupancyAxis, IrBins });
251+ {occupancyAxis, irBins });
250252
251253 registry.add ({" Events/NtrkZvtx" ,
252254 " ; N_{trk}; Z_{vtx} (cm); occupancy" ,
@@ -332,7 +334,7 @@ struct DndetaMFTPbPb {
332334 hstat->GetAxis (0 )->SetBinLabel (2 , " Selected" );
333335
334336 qaregistry.add (" hCentOccIRate" , " hCentOccIRate" , HistType::kTHnSparseF ,
335- {centralityAxis, occupancyAxis, IrBins });
337+ {centralityAxis, occupancyAxis, irBins });
336338
337339 qaregistry.add ({" Events/Centrality/hCent" ,
338340 " ; centrality; occupancy" ,
@@ -1230,10 +1232,9 @@ struct DndetaMFTPbPb {
12301232 processDatawBestTracks<CollsCentFT0C>(collision, tracks, besttracks, bcs);
12311233 }
12321234
1233- PROCESS_SWITCH (
1234- DndetaMFTPbPb, processDatawBestTracksCentFT0C,
1235- " Count tracks in FT0C centrality bins based on BestCollisionsFwd table" ,
1236- false );
1235+ PROCESS_SWITCH (DndetaMFTPbPb, processDatawBestTracksCentFT0C,
1236+ " Count tracks in FT0C centrality bins based on BestCollisionsFwd table" ,
1237+ false );
12371238
12381239 void processDatawBestTracksCentFT0CVariant1 (
12391240 CollsCentFT0CVariant1::iterator const & collision,
@@ -1258,10 +1259,9 @@ struct DndetaMFTPbPb {
12581259 processDatawBestTracks<CollsCentFT0M>(collision, tracks, besttracks, bcs);
12591260 }
12601261
1261- PROCESS_SWITCH (
1262- DndetaMFTPbPb, processDatawBestTracksCentFT0M,
1263- " Count tracks in FT0M centrality bins based on BestCollisionsFwd table" ,
1264- false );
1262+ PROCESS_SWITCH (DndetaMFTPbPb, processDatawBestTracksCentFT0M,
1263+ " Count tracks in FT0M centrality bins based on BestCollisionsFwd table" ,
1264+ false );
12651265
12661266 void processDatawBestTracksCentNGlobal (
12671267 CollsCentNGlobal::iterator const & collision, FiltMftTracks const & tracks,
@@ -1285,10 +1285,9 @@ struct DndetaMFTPbPb {
12851285 processDatawBestTracks<CollsCentMFT>(collision, tracks, besttracks, bcs);
12861286 }
12871287
1288- PROCESS_SWITCH (
1289- DndetaMFTPbPb, processDatawBestTracksCentMFT,
1290- " Count tracks in MFT centrality bins based on BestCollisionsFwd table" ,
1291- false );
1288+ PROCESS_SWITCH (DndetaMFTPbPb, processDatawBestTracksCentMFT,
1289+ " Count tracks in MFT centrality bins based on BestCollisionsFwd table" ,
1290+ false );
12921291
12931292 Preslice<FiltMcMftTracks> perCol = o2::aod::fwdtrack::collisionId;
12941293 PresliceUnsorted<CollsGenCentFT0C> recColPerMcCol =
@@ -1391,15 +1390,16 @@ struct DndetaMFTPbPb {
13911390 auto perCollMCsample = mcSample->sliceByCached (
13921391 aod::mcparticle::mcCollisionId, mcCollision.globalIndex (), cache);
13931392 auto nchrg = countPart (perCollMCsample);
1393+ auto zvtxMC = mcCollision.posZ ();
1394+
13941395 if (gtOneColl > 1 ) {
13951396 if constexpr (has_reco_cent<C>) {
1396- qaregistry.fill (HIST (" Events/Centrality/SplitMult" ), nchrg, cgen);
1397+ qaregistry.fill (HIST (" Events/Centrality/SplitMult" ), nchrg, zvtxMC, cgen);
13971398 } else {
1398- qaregistry.fill (HIST (" Events/SplitMult" ), nchrg);
1399+ qaregistry.fill (HIST (" Events/SplitMult" ), nchrg, zvtxMC );
13991400 }
14001401 }
14011402
1402- auto zvtxMC = mcCollision.posZ ();
14031403 auto nCharged = countPart (particles);
14041404 if constexpr (has_reco_cent<C>) {
14051405 registry.fill (HIST (" Events/Centrality/NtrkZvtxGen_t" ), nCharged, zvtxMC,
@@ -1562,9 +1562,9 @@ struct DndetaMFTPbPb {
15621562
15631563 if constexpr (has_reco_cent<C>) {
15641564 registry.fill (HIST (" Events/Centrality/NtrkZvtxGen" ), nTrkRec, z,
1565- crec);
1565+ crec, occrec );
15661566 } else {
1567- registry.fill (HIST (" Events/NtrkZvtxGen" ), nTrkRec, z);
1567+ registry.fill (HIST (" Events/NtrkZvtxGen" ), nTrkRec, z, occrec );
15681568 }
15691569 }
15701570 }
@@ -1620,10 +1620,9 @@ struct DndetaMFTPbPb {
16201620 mccollision, collisions, particles, tracks, besttracks);
16211621 }
16221622
1623- PROCESS_SWITCH (
1624- DndetaMFTPbPb, processMCwBestTracksCentFT0C,
1625- " Count MC particles in FT0C centrality bins using aod::BestCollisionsFwd" ,
1626- false );
1623+ PROCESS_SWITCH (DndetaMFTPbPb, processMCwBestTracksCentFT0C,
1624+ " Count MC particles in FT0C centrality bins using aod::BestCollisionsFwd" ,
1625+ false );
16271626
16281627 void processMCwBestTracksCentFT0CVariant1 (
16291628 aod::McCollisions::iterator const & mccollision,
@@ -1651,10 +1650,9 @@ struct DndetaMFTPbPb {
16511650 mccollision, collisions, particles, tracks, besttracks);
16521651 }
16531652
1654- PROCESS_SWITCH (
1655- DndetaMFTPbPb, processMCwBestTracksCentFT0M,
1656- " Count MC particles in FT0M centrality bins using aod::BestCollisionsFwd" ,
1657- false );
1653+ PROCESS_SWITCH (DndetaMFTPbPb, processMCwBestTracksCentFT0M,
1654+ " Count MC particles in FT0M centrality bins using aod::BestCollisionsFwd" ,
1655+ false );
16581656
16591657 void processMCwBestTracksCentNGlobal (
16601658 aod::McCollisions::iterator const & mccollision,
@@ -1682,10 +1680,9 @@ struct DndetaMFTPbPb {
16821680 mccollision, collisions, particles, tracks, besttracks);
16831681 }
16841682
1685- PROCESS_SWITCH (
1686- DndetaMFTPbPb, processMCwBestTracksCentMFT,
1687- " Count MC particles in MFT centrality bins using aod::BestCollisionsFwd" ,
1688- false );
1683+ PROCESS_SWITCH (DndetaMFTPbPb, processMCwBestTracksCentMFT,
1684+ " Count MC particles in MFT centrality bins using aod::BestCollisionsFwd" ,
1685+ false );
16891686
16901687 using ParticlesI = soa::Join<aod::McParticles, aod::ParticlesToMftTracks>;
16911688 Partition<ParticlesI> primariesI =
@@ -1843,9 +1840,8 @@ struct DndetaMFTPbPb {
18431840 particles, tracks);
18441841 }
18451842
1846- PROCESS_SWITCH (
1847- DndetaMFTPbPb, processTrkEffIdxCentFT0C,
1848- " Process tracking efficiency (in FT0C centrality bins, indexed)" , false );
1843+ PROCESS_SWITCH (DndetaMFTPbPb, processTrkEffIdxCentFT0C,
1844+ " Process tracking efficiency (in FT0C centrality bins, indexed)" , false );
18491845
18501846 // / @brief process function to calculate tracking efficiency (indexed) based
18511847 // / on BestCollisionsFwd in FT0C bins
@@ -1922,10 +1918,9 @@ struct DndetaMFTPbPb {
19221918 particles, tracks, besttracks);
19231919 }
19241920
1925- PROCESS_SWITCH (
1926- DndetaMFTPbPb, processTrkEffBestInclusive,
1927- " Process tracking efficiency (inclusive, based on BestCollisionsFwd)" ,
1928- false );
1921+ PROCESS_SWITCH (DndetaMFTPbPb, processTrkEffBestInclusive,
1922+ " Process tracking efficiency (inclusive, based on BestCollisionsFwd)" ,
1923+ false );
19291924
19301925 void processTrkEffBestCentFT0C (
19311926 soa::Join<CollsCentFT0C, aod::McCollisionLabels>::iterator const & collision,
@@ -2091,10 +2086,9 @@ struct DndetaMFTPbPb {
20912086 collision, allcollisions, track);
20922087 }
20932088
2094- PROCESS_SWITCH (
2095- DndetaMFTPbPb, processCheckAmbiguousMftTracksCentFT0C,
2096- " Process checks for Ambiguous MFT tracks (in FT0C centrality bins)" ,
2097- false );
2089+ PROCESS_SWITCH (DndetaMFTPbPb, processCheckAmbiguousMftTracksCentFT0C,
2090+ " Process checks for Ambiguous MFT tracks (in FT0C centrality bins)" ,
2091+ false );
20982092
20992093 Preslice<FiltMftTracks> filtTrkperCol = o2::aod::fwdtrack::collisionId;
21002094
0 commit comments