@@ -118,6 +118,7 @@ struct PidDiHadron {
118118 O2_DEFINE_CONFIGURABLE (cfgUseOnlyTPC, bool , true , " Use only TPC PID for daughter selection" )
119119 O2_DEFINE_CONFIGURABLE (cfgPIDParticle, int , 0 , " 1 = pion, 2 = kaon, 3 = proton, 4 = kshort, 5 = lambda, 6 = phi, 0 for no PID" )
120120 O2_DEFINE_CONFIGURABLE (cfgGetNsigmaQA, bool , true , " Get QA histograms for selection of pions, kaons, and protons" )
121+ O2_DEFINE_CONFIGURABLE (cfgGetdEdx, bool , true , " Get QA histograms for selection of pions, kaons, and protons" )
121122 O2_DEFINE_CONFIGURABLE (cfgUseAntiLambda, bool , true , " Use AntiLambda candidates for analysis" )
122123 O2_DEFINE_CONFIGURABLE (cfgPIDUseRejection, bool , true , " Turn off and on the exclusion criteria for PID determination" )
123124
@@ -172,6 +173,7 @@ struct PidDiHadron {
172173 ConfigurableAxis axisNsigmaTOF{" axisNsigmaTOF" , {80 , -5 , 5 }, " nsigmaTOF axis" };
173174 ConfigurableAxis axisNsigmaITS{" axisNsigmaITS" , {80 , -5 , 5 }, " nsigmaITS axis" };
174175 ConfigurableAxis axisTpcSignal{" axisTpcSignal" , {250 , 0 , 250 }, " dEdx axis for TPC" };
176+ ConfigurableAxis axisSigma{" axisSigma" , {200 , 0 , 20 }, " sigma axis for TPC" };
175177
176178 Configurable<LabeledArray<int >> cfgUseEventCuts{" cfgUseEventCuts" , {LongArrayInt[0 ], 15 , 1 , {" Filtered Events" , " Sel8" , " kNoTimeFrameBorder" , " kNoITSROFrameBorder" , " kNoSameBunchPileup" , " kIsGoodZvtxFT0vsPV" , " kNoCollInTimeRangeStandard" , " kIsGoodITSLayersAll" , " kNoCollInRofStandard" , " kNoHighMultCollInPrevRof" , " Occupancy" , " Multcorrelation" , " T0AV0ACut" , " kIsVertexITSTPC" , " kTVXinTRD" }, {" EvCuts" }}, " Labeled array (int) for various cuts on resonances" };
177179 Configurable<LabeledArray<float >> nSigmas{" nSigmas" , {LongArrayFloat[0 ], 6 , 3 , {" UpCut_pi" , " UpCut_ka" , " UpCut_pr" , " LowCut_pi" , " LowCut_ka" , " LowCut_pr" }, {" TPC" , " TOF" , " ITS" }}, " Labeled array for n-sigma values for TPC, TOF, ITS for pions, kaons, protons (positive and negative)" };
@@ -184,7 +186,7 @@ struct PidDiHadron {
184186
185187 // make the filters and cuts.
186188 Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVertex);
187- Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtPOIMin) && (aod::track::pt < cfgCutPtPOIMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t ) true )) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
189+ Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtPOIMin) && (aod::track::pt < cfgCutPtPOIMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t )true )) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
188190
189191 using FilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSel, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::Mults>>;
190192 using FilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTOFbeta, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr>>;
@@ -497,15 +499,18 @@ struct PidDiHadron {
497499 if (!cfgUseItsPID) {
498500 histos.add (" TofTpcNsigma_before" , " " , {HistType::kTHnSparseD , {{axisNsigmaTPC, axisNsigmaTOF, axisPt}}});
499501 histos.add (" TofTpcNsigma_after" , " " , {HistType::kTHnSparseD , {{axisNsigmaTPC, axisNsigmaTOF, axisPt}}});
500- }
502+
503+ if (cfgGetdEdx) {
504+ histos.add (" TpcdEdx_ptwise" , " " , {HistType::kTHnSparseD , {{axisPt, axisTpcSignal, axisNsigmaTOF}}});
505+ histos.add (" ExpTpcdEdx_ptwise" , " " , {HistType::kTHnSparseD , {{axisPt, axisTpcSignal, axisNsigmaTOF}}});
506+ histos.add (" ExpSigma_ptwise" , " " , {HistType::kTHnSparseD , {{axisPt, axisSigma, axisNsigmaTOF}}});
507+ }
508+ } // TPC-TOF PID QA hists
501509 if (cfgUseItsPID) {
502510 histos.add (" TofItsNsigma_before" , " " , {HistType::kTHnSparseD , {{axisNsigmaITS, axisNsigmaTOF, axisPt}}});
503511 histos.add (" TofItsNsigma_after" , " " , {HistType::kTHnSparseD , {{axisNsigmaITS, axisNsigmaTOF, axisPt}}});
504- }
505-
506- histos.add (" TpcdEdx_ptwise" , " " , {HistType::kTH2D , {{axisTpcSignal, axisPt}}});
507- histos.add (" TpcdEdx_ptwise_afterCut" , " " , {HistType::kTH2D , {{axisTpcSignal, axisPt}}});
508- }
512+ } // ITS-TOF PID QA hists
513+ } // end of PID QA hists
509514 }
510515
511516 if (cfgPIDParticle == kK0 || cfgPIDParticle == kLambda || cfgPIDParticle == kPhi ) {
@@ -527,6 +532,15 @@ struct PidDiHadron {
527532 histos.add (" hNsigmaPionTrue" , " hNsigmaPionTrue" , {HistType::kTH1D , {axisPt}}); // All true pions from MC
528533 histos.add (" hNsigmaKaonTrue" , " hNsigmaKaonTrue" , {HistType::kTH1D , {axisPt}}); // All true kaons from MC
529534 histos.add (" hNsigmaProtonTrue" , " hNsigmaProtonTrue" , {HistType::kTH1D , {axisPt}}); // All true protons from MC
535+
536+ histos.add (" TpcdEdx_ptwise_pi" , " " , {HistType::kTHnSparseD , {{axisPt, axisTpcSignal, axisNsigmaTOF}}});
537+ histos.add (" TpcdEdx_ptwise_ka" , " " , {HistType::kTHnSparseD , {{axisPt, axisTpcSignal, axisNsigmaTOF}}});
538+ histos.add (" TpcdEdx_ptwise_pr" , " " , {HistType::kTHnSparseD , {{axisPt, axisTpcSignal, axisNsigmaTOF}}});
539+
540+ histos.add (" ExpTpcdEdx_ptwise_pi" , " " , {HistType::kTHnSparseD , {{axisPt, axisTpcSignal, axisNsigmaTOF}}});
541+ histos.add (" ExpTpcdEdx_ptwise_ka" , " " , {HistType::kTHnSparseD , {{axisPt, axisTpcSignal, axisNsigmaTOF}}});
542+ histos.add (" ExpTpcdEdx_ptwise_pr" , " " , {HistType::kTHnSparseD , {{axisPt, axisTpcSignal, axisNsigmaTOF}}});
543+
530544 }
531545
532546 histos.add (" eventcount" , " bin" , {HistType::kTH1F , {{4 , 0 , 4 , " bin" }}}); // histogram to see how many events are in the same and mixed event
@@ -839,12 +853,37 @@ struct PidDiHadron {
839853
840854 // Fill Nsigma QA
841855 if (cfgGetNsigmaQA && !cfgUseItsPID) {
842- if (cfgPIDParticle == kPions )
856+ if (cfgPIDParticle == kPions ) {
843857 histos.fill (HIST (" TofTpcNsigma_before" ), track1.tpcNSigmaPi (), track1.tofNSigmaPi (), track1.pt ());
844- if (cfgPIDParticle == kKaons )
858+ if (cfgGetdEdx) {
859+ double tpcExpSignalPi = track1.tpcSignal () - (track1.tpcNSigmaPi () * track1.tpcExpSigmaPi ());
860+
861+ histos.fill (HIST (" TpcdEdx_ptwise" ), track1.pt (), track1.tpcSignal (), track1.tofNSigmaPi ());
862+ histos.fill (HIST (" ExpTpcdEdx_ptwise" ), track1.pt (), tpcExpSignalPi, track1.tofNSigmaPi ());
863+ histos.fill (HIST (" ExpSigma_ptwise" ), track1.pt (), track1.tpcExpSigmaPi (), track1.tofNSigmaPi ());
864+ }
865+ }
866+ if (cfgPIDParticle == kKaons ) {
845867 histos.fill (HIST (" TofTpcNsigma_before" ), track1.tpcNSigmaKa (), track1.tofNSigmaKa (), track1.pt ());
846- if (cfgPIDParticle == kProtons )
868+ if (cfgGetdEdx) {
869+ double tpcExpSignalKa = track1.tpcSignal () - (track1.tpcNSigmaKa () * track1.tpcExpSigmaKa ());
870+
871+ histos.fill (HIST (" TpcdEdx_ptwise" ), track1.pt (), track1.tpcSignal (), track1.tofNSigmaKa ());
872+ histos.fill (HIST (" ExpTpcdEdx_ptwise" ), track1.pt (), tpcExpSignalKa, track1.tofNSigmaKa ());
873+ histos.fill (HIST (" ExpSigma_ptwise" ), track1.pt (), track1.tpcExpSigmaKa (), track1.tofNSigmaKa ());
874+ }
875+ }
876+ if (cfgPIDParticle == kProtons ) {
847877 histos.fill (HIST (" TofTpcNsigma_before" ), track1.tpcNSigmaPr (), track1.tofNSigmaPr (), track1.pt ());
878+ if (cfgGetdEdx) {
879+ double tpcExpSignalPr = track1.tpcSignal () - (track1.tpcNSigmaPr () * track1.tpcExpSigmaPr ());
880+
881+ histos.fill (HIST (" TpcdEdx_ptwise" ), track1.pt (), track1.tpcSignal (), track1.tofNSigmaPr ());
882+ histos.fill (HIST (" ExpTpcdEdx_ptwise" ), track1.pt (), tpcExpSignalPr, track1.tofNSigmaPr ());
883+ histos.fill (HIST (" ExpSigma_ptwise" ), track1.pt (), track1.tpcExpSigmaPr (), track1.tofNSigmaPr ());
884+ }
885+ }
886+
848887 }
849888 if (cfgGetNsigmaQA && cfgUseItsPID) {
850889 if (cfgPIDParticle == kPions )
@@ -855,18 +894,12 @@ struct PidDiHadron {
855894 histos.fill (HIST (" TofItsNsigma_before" ), itsResponse.nSigmaITS <o2::track::PID::Proton>(track1), track1.tofNSigmaPr (), track1.pt ());
856895 }
857896
858- if (cfgGetNsigmaQA)
859- histos.fill (HIST (" TpcdEdx_ptwise" ), track1.tpcSignal (), track1.pt ());
860-
861897 if (cfgPIDParticle && getNsigmaPID (track1) != cfgPIDParticle)
862898 continue ; // if PID is selected, check if the track has the right PID
863899
864900 if (cfgGetNsigmaQA)
865901 fillNsigmaAfterCut (track1, cfgPIDParticle);
866902
867- if (cfgGetNsigmaQA)
868- histos.fill (HIST (" TpcdEdx_ptwise_afterCut" ), track1.tpcSignal (), track1.pt ());
869-
870903 if (!getEfficiencyCorrection (triggerWeight, track1.eta (), track1.pt (), posZ))
871904 continue ;
872905 if (system == SameEvent) {
@@ -1518,6 +1551,10 @@ struct PidDiHadron {
15181551 // Check the PDG code for the particles (MC truth) and match with analysed Nsigma PID
15191552 if (std::abs (track.mcParticle ().pdgCode ()) == PDG_t::kPiPlus ) {
15201553 histos.fill (HIST (" hNsigmaPionTrue" ), track.pt ());
1554+ histos.fill (HIST (" TpcdEdx_ptwise_pi" ), track.pt (), track.tpcSignal (), track.tofNSigmaPi ());
1555+
1556+ double tpcExpSignalPi = track.tpcSignal () - (track.tpcNSigmaPi () * track.tpcExpSigmaPi ());
1557+ histos.fill (HIST (" ExpTpcdEdx_ptwise_pi" ), track.pt (), tpcExpSignalPi, track.tofNSigmaPi ());
15211558
15221559 if (pidIndex == kPions ) {
15231560 histos.fill (HIST (" hNsigmaPionTruePositives" ), track.pt ());
@@ -1526,6 +1563,10 @@ struct PidDiHadron {
15261563
15271564 if (std::abs (track.mcParticle ().pdgCode ()) == PDG_t::kKPlus ) {
15281565 histos.fill (HIST (" hNsigmaKaonTrue" ), track.pt ());
1566+ histos.fill (HIST (" TpcdEdx_ptwise_ka" ), track.pt (), track.tpcSignal (), track.tofNSigmaKa ());
1567+
1568+ double tpcExpSignalKa = track.tpcSignal () - (track.tpcNSigmaKa () * track.tpcExpSigmaKa ());
1569+ histos.fill (HIST (" ExpTpcdEdx_ptwise_ka" ), track.pt (), tpcExpSignalKa, track.tofNSigmaKa ());
15291570
15301571 if (pidIndex == kKaons ) {
15311572 histos.fill (HIST (" hNsigmaKaonTruePositives" ), track.pt ());
@@ -1534,6 +1575,10 @@ struct PidDiHadron {
15341575
15351576 if (std::abs (track.mcParticle ().pdgCode ()) == PDG_t::kProton ) {
15361577 histos.fill (HIST (" hNsigmaProtonTrue" ), track.pt ());
1578+ histos.fill (HIST (" TpcdEdx_ptwise_pr" ), track.pt (), track.tpcSignal (), track.tofNSigmaPr ());
1579+
1580+ double tpcExpSignalPr = track.tpcSignal () - (track.tpcNSigmaPr () * track.tpcExpSigmaPr ());
1581+ histos.fill (HIST (" ExpTpcdEdx_ptwise_pr" ), track.pt (), tpcExpSignalPr, track.tofNSigmaPr ());
15371582
15381583 if (pidIndex == kProtons ) {
15391584 histos.fill (HIST (" hNsigmaProtonTruePositives" ), track.pt ());
0 commit comments