@@ -105,6 +105,8 @@ struct JFlucEfficiencyTask {
105105 Configurable<float > cfgMaxbDCAzToPVcut{" cfgMaxbDCAzToPVcut" , 1.0 , " Track DCAz cut to PV Maximum" };
106106 } TrackCuts;
107107
108+ Configurable<bool > applyMCStudy{" applyMCStudy" , false , " Apply MC study" };
109+
108110 // Configurable for track selection
109111 Configurable<int > trackSelection{" trackSelection" , 0 , " Track selection: 0 -> No Cut, 1 -> kGlobalTrack, 2 -> kGlobalTrackWoPtEta, 3 -> kGlobalTrackWoDCA, 4 -> kQualityTracks, 5 -> kInAcceptanceTracks" };
110112
@@ -175,17 +177,50 @@ struct JFlucEfficiencyTask {
175177 o2::framework::HistType::kTH2F , {AxisSpec (100 , -1 , 1 ), AxisSpec (axisMultiplicity)});
176178 registry.add (" hPtGenPos" , " Generated p_{T} (positive);p_{T} (GeV/c);Centrality (%);Counts" ,
177179 o2::framework::HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)});
180+ registry.add (" hPtGenPos_Pos" , " Generated p_{T} (positive) in TPC positive side;p_{T} (GeV/c);Centrality (%);Counts" ,
181+ o2::framework::HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)});
182+ registry.add (" hPtGenPos_Neg" , " Generated p_{T} (positive) in TPC negative side;p_{T} (GeV/c);Centrality (%);Counts" ,
183+ o2::framework::HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)});
178184 registry.add (" hPtGenNeg" , " Generated p_{T} (negative);p_{T} (GeV/c);Centrality (%);Counts" ,
179185 o2::framework::HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)});
186+ registry.add (" hPtGenNeg_Pos" , " Generated p_{T} (negative) in TPC positive side;p_{T} (GeV/c);Centrality (%);Counts" ,
187+ o2::framework::HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)});
188+ registry.add (" hPtGenNeg_Neg" , " Generated p_{T} (negative) in TPC negative side;p_{T} (GeV/c);Centrality (%);Counts" ,
189+ o2::framework::HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)});
180190 }
181191 registry.add (" hPtRec" , " Reconstructed p_{T} (all);p_{T} (GeV/c);Centrality (%);Counts" ,
182192 o2::framework::HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)});
183193 registry.add (" hEtaRec" , " Reconstructed #eta (all);#eta;Centrality (%);Counts" ,
184194 o2::framework::HistType::kTH2F , {AxisSpec (100 , -1 , 1 ), AxisSpec (axisMultiplicity)});
185195 registry.add (" hPtRecPos" , " Reconstructed p_{T} (positive);p_{T} (GeV/c);Centrality (%);Counts" ,
186196 o2::framework::HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)});
197+ registry.add (" hPtRecPos_Pos" , " Reconstructed p_{T} (positive) in TPC positive side;p_{T} (GeV/c);Centrality (%);Counts" ,
198+ o2::framework::HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)});
199+ registry.add (" hPtRecPos_Neg" , " Reconstructed p_{T} (positive) in TPC negative side;p_{T} (GeV/c);Centrality (%);Counts" ,
200+ o2::framework::HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)});
187201 registry.add (" hPtRecNeg" , " Reconstructed p_{T} (negative);p_{T} (GeV/c);Centrality (%);Counts" ,
188202 o2::framework::HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)});
203+ registry.add (" hPtRecNeg_Pos" , " Reconstructed p_{T} (negative) in TPC positive side;p_{T} (GeV/c);Centrality (%);Counts" ,
204+ o2::framework::HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)});
205+ registry.add (" hPtRecNeg_Neg" , " Reconstructed p_{T} (negative) in TPC negative side;p_{T} (GeV/c);Centrality (%);Counts" ,
206+ o2::framework::HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)});
207+ if (applyMCStudy) {
208+ registry.add (" hChargeSignMismatch" , " Charge-Sign mismatch cases" , {HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)}});
209+ registry.add (" hChargeSignMismatchPos" , " MC charge + but track sign -" , {HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)}});
210+ registry.add (" hChargeSignMismatchNeg" , " MC charge - but track sign +" , {HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)}});
211+ registry.add (" hChargeSignMatch" , " Charge-Sign match cases" , {HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)}});
212+ registry.add (" hChargeSignMatchPos" , " MC charge + and track sign +" , {HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)}});
213+ registry.add (" hChargeSignMatchNeg" , " MC charge - and track sign -" , {HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)}});
214+ registry.add (" hChargeSignRatio" , " Ratio of mismatch to total" , {HistType::kTH2F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity)}});
215+
216+ // pT resolution
217+ registry.add (" hPtResolution" , " p_{T} resolution;p_{T} (GeV/c);Centrality (%);Counts" ,
218+ o2::framework::HistType::kTH3F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity), AxisSpec (60 , -3 , 3 )});
219+ registry.add (" hPtResolutionPos" , " p_{T} resolution (positive);p_{T} (GeV/c);Centrality (%);Counts" ,
220+ o2::framework::HistType::kTH3F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity), AxisSpec (60 , -3 , 3 )});
221+ registry.add (" hPtResolutionNeg" , " p_{T} resolution (negative);p_{T} (GeV/c);Centrality (%);Counts" ,
222+ o2::framework::HistType::kTH3F , {AxisSpec (axisPt), AxisSpec (axisMultiplicity), AxisSpec (60 , -3 , 3 )});
223+ }
189224
190225 if (doprocessEfficiency) {
191226 registry.add (" hPtGenData" , " Generated p_{T} from data events (all);p_{T} (GeV/c);Centrality (%);Counts" ,
@@ -380,10 +415,25 @@ struct JFlucEfficiencyTask {
380415 }
381416 registry.fill (HIST (" hPtGen" ), particle.pt (), centrality);
382417 registry.fill (HIST (" hEtaGen" ), particle.eta (), centrality);
418+ if (particle.eta () > 0 ) {
419+ registry.fill (HIST (" hPtGenPos_Pos" ), particle.pt (), centrality);
420+ } else if (particle.eta () < 0 ) {
421+ registry.fill (HIST (" hPtGenNeg_Neg" ), particle.pt (), centrality);
422+ }
383423 if (charge > 0 ) { // Positive particles
384424 registry.fill (HIST (" hPtGenPos" ), particle.pt (), centrality);
425+ if (particle.eta () > 0 ) {
426+ registry.fill (HIST (" hPtGenPos_Pos" ), particle.pt (), centrality);
427+ } else if (particle.eta () < 0 ) {
428+ registry.fill (HIST (" hPtGenPos_Neg" ), particle.pt (), centrality);
429+ }
385430 } else if (charge < 0 ) { // Negative particles
386431 registry.fill (HIST (" hPtGenNeg" ), particle.pt (), centrality);
432+ if (particle.eta () > 0 ) {
433+ registry.fill (HIST (" hPtGenNeg_Pos" ), particle.pt (), centrality);
434+ } else if (particle.eta () < 0 ) {
435+ registry.fill (HIST (" hPtGenNeg_Neg" ), particle.pt (), centrality);
436+ }
387437 }
388438 }
389439 // Reconstruct tracks from MC particles
@@ -402,12 +452,56 @@ struct JFlucEfficiencyTask {
402452 if (!mcPart.isPhysicalPrimary () || !isChargedParticle (mcPart.pdgCode ())) {
403453 continue ;
404454 }
455+ if (applyMCStudy) {
456+ // Check charge-sign consistency
457+ auto mcCharge = getCharge (mcPart);
458+ auto trackSign = track.sign ();
459+
460+ if (mcCharge > 0 && trackSign > 0 ) {
461+ // MC charge + and track sign +
462+ registry.fill (HIST (" hChargeSignMatchPos" ), track.pt (), centrality);
463+ registry.fill (HIST (" hChargeSignMatch" ), track.pt (), centrality);
464+ } else if (mcCharge < 0 && trackSign < 0 ) {
465+ // MC charge - and track sign -
466+ registry.fill (HIST (" hChargeSignMatchNeg" ), track.pt (), centrality);
467+ registry.fill (HIST (" hChargeSignMatch" ), track.pt (), centrality);
468+ } else if (mcCharge > 0 && trackSign < 0 ) {
469+ // MC charge + but track sign -
470+ registry.fill (HIST (" hChargeSignMismatchPos" ), track.pt (), centrality);
471+ registry.fill (HIST (" hChargeSignMismatch" ), track.pt (), centrality);
472+ } else if (mcCharge < 0 && trackSign > 0 ) {
473+ // MC charge - but track sign +
474+ registry.fill (HIST (" hChargeSignMismatchNeg" ), track.pt (), centrality);
475+ registry.fill (HIST (" hChargeSignMismatch" ), track.pt (), centrality);
476+ }
477+
478+ // pT resolution
479+ auto ptRec = track.pt ();
480+ auto ptGen = mcPart.pt ();
481+ auto ptResolution = (ptRec - ptGen);
482+ registry.fill (HIST (" hPtResolution" ), ptRec, centrality, ptResolution);
483+ if (track.sign () > 0 ) {
484+ registry.fill (HIST (" hPtResolutionPos" ), ptRec, centrality, ptResolution);
485+ } else if (track.sign () < 0 ) {
486+ registry.fill (HIST (" hPtResolutionNeg" ), ptRec, centrality, ptResolution);
487+ }
488+ }
405489 registry.fill (HIST (" hPtRec" ), track.pt (), centrality);
406490 registry.fill (HIST (" hEtaRec" ), track.eta (), centrality);
407491 if (track.sign () > 0 ) { // Positive tracks
408492 registry.fill (HIST (" hPtRecPos" ), track.pt (), centrality);
493+ if (track.eta () > 0 ) {
494+ registry.fill (HIST (" hPtRecPos_Pos" ), track.pt (), centrality);
495+ } else if (track.eta () < 0 ) {
496+ registry.fill (HIST (" hPtRecPos_Neg" ), track.pt (), centrality);
497+ }
409498 } else if (track.sign () < 0 ) { // Negative tracks
410499 registry.fill (HIST (" hPtRecNeg" ), track.pt (), centrality);
500+ if (track.eta () > 0 ) {
501+ registry.fill (HIST (" hPtRecNeg_Pos" ), track.pt (), centrality);
502+ } else if (track.eta () < 0 ) {
503+ registry.fill (HIST (" hPtRecNeg_Neg" ), track.pt (), centrality);
504+ }
411505 }
412506 }
413507 }
@@ -481,6 +575,11 @@ struct JFlucEfficiencyTask {
481575 registry.fill (HIST (" hPtRecPos" ), track.pt (), centrality);
482576 } else if (track.sign () < 0 ) { // Negative tracks
483577 registry.fill (HIST (" hPtRecNeg" ), track.pt (), centrality);
578+ if (track.eta () > 0 ) {
579+ registry.fill (HIST (" hPtRecNeg_Pos" ), track.pt (), centrality);
580+ } else if (track.eta () < 0 ) {
581+ registry.fill (HIST (" hPtRecNeg_Neg" ), track.pt (), centrality);
582+ }
484583 }
485584 }
486585 }
@@ -508,8 +607,18 @@ struct JFlucEfficiencyTask {
508607 registry.fill (HIST (" hEtaRec" ), track.eta (), centrality);
509608 if (track.sign () > 0 ) { // Positive tracks
510609 registry.fill (HIST (" hPtRecPos" ), track.pt (), centrality);
610+ if (track.eta () > 0 ) {
611+ registry.fill (HIST (" hPtRecPos_Pos" ), track.pt (), centrality);
612+ } else if (track.eta () < 0 ) {
613+ registry.fill (HIST (" hPtRecPos_Neg" ), track.pt (), centrality);
614+ }
511615 } else if (track.sign () < 0 ) { // Negative tracks
512616 registry.fill (HIST (" hPtRecNeg" ), track.pt (), centrality);
617+ if (track.eta () > 0 ) {
618+ registry.fill (HIST (" hPtRecPos_Pos" ), track.pt (), centrality);
619+ } else if (track.eta () < 0 ) {
620+ registry.fill (HIST (" hPtRecPos_Neg" ), track.pt (), centrality);
621+ }
513622 }
514623 }
515624 }
@@ -535,6 +644,11 @@ struct JFlucEfficiencyTask {
535644 registry.fill (HIST (" hPtRecPos" ), track.pt (), centrality);
536645 } else if (track.sign () < 0 ) { // Negative tracks
537646 registry.fill (HIST (" hPtRecNeg" ), track.pt (), centrality);
647+ if (track.eta () > 0 ) {
648+ registry.fill (HIST (" hPtRecNeg_Pos" ), track.pt (), centrality);
649+ } else if (track.eta () < 0 ) {
650+ registry.fill (HIST (" hPtRecNeg_Neg" ), track.pt (), centrality);
651+ }
538652 }
539653 }
540654 }
0 commit comments