diff --git a/DPG/Tasks/AOTTrack/qaMatchEff.cxx b/DPG/Tasks/AOTTrack/qaMatchEff.cxx index c106f66e6af..af38f9591ba 100644 --- a/DPG/Tasks/AOTTrack/qaMatchEff.cxx +++ b/DPG/Tasks/AOTTrack/qaMatchEff.cxx @@ -30,6 +30,22 @@ #include "Framework/RunningWorkflowInfo.h" #include "Framework/runDataProcessing.h" +// +namespace extConfPar +{ +static constexpr int nParDCA = 1; +static constexpr int nParVaDCA = 2; +static const std::vector parClassDCA{"TrVtx"}; +static const std::vector parNameDCA{"dcaXY", "dcaZ"}; +static const float parTableDCA[nParDCA][nParVaDCA]{{9999.f, 99999.f}}; +static constexpr int nParPID = 2; +static constexpr int nParVaPID = 6; +static const std::vector parClassPID{"TPC", "TOF"}; +static const std::vector parNamePID{"nSigPionMin", "nSigPionMax", "nSigKaonMin", "nSigKaonMax", "nSigProtonMin", "nSigProtonMax"}; +static const float parTablePID[nParPID][nParVaPID]{ + {-99999.f, 999999.f, -99999.f, 999999.f, -99999.f, 999999.f}, + {-99999.f, 999999.f, -99999.f, 999999.f, -99999.f, 999999.f}}; +} // namespace extConfPar // // base namespaces using namespace o2; @@ -37,6 +53,8 @@ using namespace o2::constants::math; using namespace o2::framework; using namespace o2::framework::expressions; using std::array; +using namespace extConfPar; +// // struct qaMatchEff { int lastRunNumber = -1; @@ -60,9 +78,10 @@ struct qaMatchEff { Configurable ptMaxCut{"ptMaxCut", 100.f, "Maximum transverse momentum (GeV/c)"}; Configurable etaMinCut{"etaMinCut", -2.0f, "Minimum pseudorapidity"}; Configurable etaMaxCut{"etaMaxCut", 2.0f, "Maximum pseudorapidity"}; - Configurable dcaXYMaxCut{"dcaXYMaxCut", 1000000.0f, "Maximum dcaXY (cm)"}; Configurable b_useTPCinnerWallPt{"b_useTPCinnerWallPt", false, "Boolean to switch the usage of pt calculated at the inner wall of TPC on/off."}; - // Configurable b_useTPCinnerWallPtForITS{"b_useTPCinnerWallPtForITS", false, "Boolean to switch the usage of pt calculated at the inner wall of TPC on/off just for ITS-tagged (not TPC tagged) histos."}; + // DCA and PID cuts + Configurable> dcaMaxCut{"dcaMaxCut", {parTableDCA[0], nParDCA, nParVaDCA, parClassDCA, parNameDCA}, "Track DCA cuts"}; + Configurable> nSigmaPID{"nSigmaPID", {parTablePID[0], nParPID, nParVaPID, parClassPID, parNamePID}, "PID nSigma cuts TPC and TOF"}; // TPC Configurable tpcNClusterMin{"tpcNClusterMin", 0, "Minimum number of clusters in TPC"}; Configurable tpcNCrossedRowsMin{"tpcNCrossedRowsMin", 70, "Minimum number of crossed rows in TPC"}; @@ -134,19 +153,6 @@ struct qaMatchEff { AxisSpec thnTypeAxis{thnType, "0:prim-1:sec-2:matsec"}; AxisSpec thnLabelSignAxis{thnLabelSign, "+/- 1 for part./antipart."}; AxisSpec thnSpecAxis{thnSpec, "particle from MC (1,2,3,4,5 -> e,pi,K,P,other)"}; - // PID stuff - Configurable nSigmaTPCPionMin{"nSigmaTPCPionMin", -99999.f, "Minimum nSigma value in TPC, pion hypothesis"}; - Configurable nSigmaTPCPionMax{"nSigmaTPCPionMax", 99999.f, "Maximum nSigma value in TPC, pion hypothesis"}; - Configurable nSigmaTPCKaonMin{"nSigmaTPCKaonMin", -99999.f, "Minimum nSigma value in TPC, kaon hypothesis"}; - Configurable nSigmaTPCKaonMax{"nSigmaTPCKaonMax", 99999.f, "Maximum nSigma value in TPC, kaon hypothesis"}; - Configurable nSigmaTPCProtonMin{"nSigmaTPCProtonMin", -99999.f, "Minimum nSigma value in TPC, proton hypothesis"}; - Configurable nSigmaTPCProtonMax{"nSigmaTPCProtonMax", 99999.f, "Maximum nSigma value in TPC, proton hypothesis"}; - Configurable nSigmaTOFPionMin{"nSigmaTOFPionMin", -99999.f, "Minimum nSigma value in TOF, pion hypothesis"}; - Configurable nSigmaTOFPionMax{"nSigmaTOFPionMax", 99999.f, "Maximum nSigma value in TOF, pion hypothesis"}; - Configurable nSigmaTOFKaonMin{"nSigmaTOFKaonMin", -99999.f, "Minimum nSigma value in TOF, kaon hypothesis"}; - Configurable nSigmaTOFKaonMax{"nSigmaTOFKaonMax", 99999.f, "Maximum nSigma value in TOF, kaon hypothesis"}; - Configurable nSigmaTOFProtonMin{"nSigmaTOFProtonMin", -99999.f, "Minimum nSigma value in TOF, proton hypothesis"}; - Configurable nSigmaTOFProtonMax{"nSigmaTOFProtonMax", 99999.f, "Maximum nSigma value in TOF, proton hypothesis"}; // // Tracks selection object TrackSelection cutObject; @@ -204,7 +210,8 @@ struct qaMatchEff { // kinematics cutObject.SetEtaRange(etaMinCut, etaMaxCut); cutObject.SetPtRange(ptMinCut, ptMaxCut); - cutObject.SetMaxDcaXY(dcaXYMaxCut); /// max for dca implementend by hand in isTrackSelectedKineCuts + cutObject.SetMaxDcaXY(dcaMaxCut->get("TrVtx", "dcaXY")); /// max for dca implementend by hand in isTrackSelectedKineCuts + cutObject.SetMaxDcaZ(dcaMaxCut->get("TrVtx", "dcaZ")); /// max for dca implementend by hand in isTrackSelectedKineCuts // TPC cutObject.SetMinNClustersTPC(tpcNClusterMin); cutObject.SetMinNCrossedRowsTPC(tpcNCrossedRowsMin); @@ -251,6 +258,30 @@ struct qaMatchEff { histos.add("data/control/yPrimary", "Position of primary vertex along y axis;y position [cm]", kTH1D, {{200, -0.1, 0.1}}, true); histos.add("data/control/xPrimary", "Position of primary vertex along x axis;x position [cm]", kTH1D, {{200, -0.1, 0.1}}, true); histos.add("data/control/chi2Prim", "#chi^2 of primary vertex fit;#chi^2", kTH1D, {{200, 0., 100.0}}, true); + histos.add("data/control/zDCA_tpc", "DCA along z TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/control/xyDCA_tpc", "DCA in x-y plane TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/control/zDCA_tpcits", "DCA along z TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/control/xyDCA_tpcits", "DCA in x-y plane TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + // + histos.add("data/PID/zDCA_tpc_pi", "DCA along z - pions TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/PID/xyDCA_tpc_pi", "DCA in x-y plane - pions TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/PID/zDCA_tpcits_pi", "DCA along z - pions TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/PID/xyDCA_tpcits_pi", "DCA in x-y plane - pions TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + // + histos.add("data/PID/zDCA_tpc_ka", "DCA along z - kaons TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/PID/xyDCA_tpc_ka", "DCA in x-y plane - kaons TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/PID/zDCA_tpcits_ka", "DCA along z - kaons TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/PID/xyDCA_tpcits_ka", "DCA in x-y plane - kaons TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + // + histos.add("data/PID/zDCA_tpc_pr", "DCA along z - protons TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/PID/xyDCA_tpc_pr", "DCA in x-y plane - protons TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/PID/zDCA_tpcits_pr", "DCA along z - protons TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/PID/xyDCA_tpcits_pr", "DCA in x-y plane - protons TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + // + histos.add("data/PID/zDCA_tpc_noid", "DCA along z - no pi/K/P TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/PID/xyDCA_tpc_noid", "DCA in x-y plane - no pi/K/P TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/PID/zDCA_tpcits_noid", "DCA along z - no pi/K/P TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("data/PID/xyDCA_tpcits_noid", "DCA in x-y plane - no pi/K/P TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); /// compare pt's (tracking and innerParamTPC) if (makept2d) { @@ -573,6 +604,10 @@ struct qaMatchEff { histos.add("MC/control/yPrimary", "Position of primary vertex along y axis;y position [cm]", kTH1D, {{200, -0.1, 0.1}}, true); histos.add("MC/control/xPrimary", "Position of primary vertex along x axis;x position [cm]", kTH1D, {{200, -0.1, 0.1}}, true); histos.add("MC/control/chi2Prim", "#chi^2 of primary vertex fit;#chi^2", kTH1D, {{200, 0., 100.0}}, true); + histos.add("MC/control/zDCA_tpc", "DCA along z TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/control/xyDCA_tpc", "DCA in x-y plane TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/control/zDCA_tpcits", "DCA along z TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/control/xyDCA_tpcits", "DCA in x-y plane TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); /// compare pt's (tracking and innerParamTPC) if (makept2d) { @@ -630,6 +665,12 @@ struct qaMatchEff { histos.add("MC/primsec/qopthist_tpc_prim", "Q/#it{p}_{T} distribution - MC prim TPC tag", kTH1D, {axisQoPt}, true); histos.add("MC/primsec/qopthist_tpcits_prim", "Q/#it{p}_{T} distribution - MC prim TPC+ITS tag", kTH1D, {axisQoPt}, true); + histos.add("MC/primsec/zDCA_tpc_prim", "DCA along z TPC tag - primaries;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/primsec/zDCA_tpcits_prim", "DCA along z TPC+ITS tag - primaries;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + + histos.add("MC/primsec/xyDCA_tpc_prim", "DCA in x-y plane TPC tag - primaries;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/primsec/xyDCA_tpcits_prim", "DCA in x-y plane TPC+ITS tag - primaries;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/primsec/pthist_tpc_prim", "#it{p}_{T} distribution - MC prim TPC tag", kTH1D, {axisPt}, true); histos.add("MC/primsec/etahist_tpc_prim", "#eta distribution - MC prim TPC tag", kTH1D, {axisEta}, true); histos.add("MC/primsec/phihist_tpc_prim", "#phi distribution - MC prim TPC tag", kTH1D, {axisPhi}, true); @@ -642,6 +683,12 @@ struct qaMatchEff { histos.add("MC/primsec/qopthist_tpc_secd", "Q/#it{p}_{T} distribution - MC dec. sec. TPC tag", kTH1D, {axisQoPt}, true); histos.add("MC/primsec/qopthist_tpcits_secd", "Q/#it{p}_{T} distribution - MC dec. sec. TPC+ITS tag", kTH1D, {axisQoPt}, true); + histos.add("MC/primsec/zDCA_tpc_secd", "DCA along z TPC tag - secd;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/primsec/zDCA_tpcits_secd", "DCA along z TPC+ITS tag - secd;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + + histos.add("MC/primsec/xyDCA_tpc_secd", "DCA in x-y plane TPC tag - secd;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/primsec/xyDCA_tpcits_secd", "DCA in x-y plane TPC+ITS tag - secd;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/primsec/pthist_tpc_secd", "#it{p}_{T} distribution - MC dec. sec. TPC tag", kTH1D, {axisPt}, true); histos.add("MC/primsec/etahist_tpc_secd", "#eta distribution - MC dec. sec. TPC tag", kTH1D, {axisEta}, true); histos.add("MC/primsec/phihist_tpc_secd", "#phi distribution - MC dec. sec. TPC tag", kTH1D, {axisPhi}, true); @@ -654,6 +701,12 @@ struct qaMatchEff { histos.add("MC/primsec/qopthist_tpc_secm", "Q/#it{p}_{T} distribution - MC mat. sec. TPC tag", kTH1D, {axisQoPt}, true); histos.add("MC/primsec/qopthist_tpcits_secm", "Q/#it{p}_{T} distribution - MC mat. sec. TPC+ITS tag", kTH1D, {axisQoPt}, true); + histos.add("MC/primsec/zDCA_tpc_secm", "DCA along z TPC tag - secm;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/primsec/zDCA_tpcits_secm", "DCA along z TPC+ITS tag - secm;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + + histos.add("MC/primsec/xyDCA_tpc_secm", "DCA in x-y plane TPC tag - secm;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/primsec/xyDCA_tpcits_secm", "DCA in x-y plane TPC+ITS tag - secm;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/primsec/pthist_tpc_secm", "#it{p}_{T} distribution - MC mat. sec. TPC tag", kTH1D, {axisPt}, true); histos.add("MC/primsec/etahist_tpc_secm", "#eta distribution - MC mat. sec. TPC tag", kTH1D, {axisEta}, true); histos.add("MC/primsec/phihist_tpc_secm", "#phi distribution - MC mat. sec. TPC tag", kTH1D, {axisPhi}, true); @@ -664,6 +717,21 @@ struct qaMatchEff { // // pions only // all + histos.add("MC/PID/zDCA_tpc_pi", "DCA along z - pions TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/PID/xyDCA_tpc_pi", "DCA in x-y plane - pions TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/PID/zDCA_tpcits_pi", "DCA along z - pions TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/PID/xyDCA_tpcits_pi", "DCA in x-y plane - pions TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + + histos.add("MC/PID/zDCA_tpc_ka", "DCA along z - kaons TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/PID/xyDCA_tpc_ka", "DCA in x-y plane - kaons TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/PID/zDCA_tpcits_ka", "DCA along z - kaons TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/PID/xyDCA_tpcits_ka", "DCA in x-y plane - kaons TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + + histos.add("MC/PID/zDCA_tpc_pr", "DCA along z - protons TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/PID/xyDCA_tpc_pr", "DCA in x-y plane - protons TPC tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/PID/zDCA_tpcits_pr", "DCA along z - protons TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/PID/xyDCA_tpcits_pr", "DCA in x-y plane - protons TPC+ITS tag;dca [cm]", kTH1D, {{200, -20.0, 20.0}}, true); + histos.add("MC/PID/pthist_tpc_pi", "#it{p}_{T} distribution - #pi MC TPC tag", kTH1D, {axisPt}, true); histos.add("MC/PID/etahist_tpc_pi", "#eta distribution - #pi MC TPC tag", kTH1D, {axisEta}, true); histos.add("MC/PID/phihist_tpc_pi", "#phi distribution - #pi MC TPC tag", kTH1D, {axisPhi}, true); @@ -836,9 +904,8 @@ struct qaMatchEff { if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kDCAxy)) return false; // dcaZ selection to simulate the dca cut in QC () - // if ( abs(track.dcaZ()) < sqrt( dcaMaxCut*dcaMaxCut - - // track.dcaXY()*track.dcaXY() ) ) - // return false; + if (abs(track.dcaZ()) > dcaMaxCut->get("TrVtx", "dcaZ")) + return false; return true; } /// Function applying the TPC selections @@ -983,23 +1050,23 @@ struct qaMatchEff { const bool trkWTOF = track.hasTOF(); const bool trkWTPC = track.hasTPC(); const bool trkWITS = track.hasITS(); - bool pionPIDwithTPC = (nSigmaTPCPionMin < tpcNSigmaPion && tpcNSigmaPion < nSigmaTPCPionMax); - bool pionPIDwithTOF = (nSigmaTOFPionMin < tofNSigmaPion && tofNSigmaPion < nSigmaTOFPionMax); - bool kaonPIDwithTPC = (nSigmaTPCKaonMin < tpcNSigmaKaon && tpcNSigmaKaon < nSigmaTPCKaonMax); - bool kaonPIDwithTOF = (nSigmaTOFKaonMin < tofNSigmaKaon && tofNSigmaKaon < nSigmaTOFKaonMax); - bool protonPIDwithTPC = (nSigmaTPCProtonMin < tpcNSigmaProton && tpcNSigmaProton < nSigmaTPCProtonMax); - bool protonPIDwithTOF = (nSigmaTOFProtonMin < tofNSigmaProton && tofNSigmaProton < nSigmaTOFProtonMax); + bool pionPIDwithTPC = (nSigmaPID->get("TPC", "nSigPionMin") < tpcNSigmaPion && tpcNSigmaPion < nSigmaPID->get("TPC", "nSigPionMax")); + bool pionPIDwithTOF = (nSigmaPID->get("TOF", "nSigPionMin") < tofNSigmaPion && tofNSigmaPion < nSigmaPID->get("TOF", "nSigPionMax")); + bool kaonPIDwithTPC = (nSigmaPID->get("TPC", "nSigKaonMin") < tpcNSigmaKaon && tpcNSigmaKaon < nSigmaPID->get("TPC", "nSigKaonMax")); + bool kaonPIDwithTOF = (nSigmaPID->get("TOF", "nSigKaonMin") < tofNSigmaKaon && tofNSigmaKaon < nSigmaPID->get("TOF", "nSigKaonMax")); + bool protonPIDwithTPC = (nSigmaPID->get("TPC", "nSigProtonMin") < tpcNSigmaProton && tpcNSigmaProton < nSigmaPID->get("TPC", "nSigProtonMax")); + bool protonPIDwithTOF = (nSigmaPID->get("TOF", "nSigProtonMin") < tofNSigmaProton && tofNSigmaProton < nSigmaPID->get("TOF", "nSigProtonMax")); // isPion bool isPion = false; - if (isPIDPionRequired && nSigmaTPCPionMin < tpcNSigmaPion && tpcNSigmaPion < nSigmaTPCPionMax && ((!trkWTOF) || (nSigmaTOFPionMin < tofNSigmaPion && tofNSigmaPion < nSigmaTOFPionMax))) + if (isPIDPionRequired && pionPIDwithTPC && ((!trkWTOF) || pionPIDwithTOF)) isPion = true; // isKaon bool isKaon = false; - if (isPIDKaonRequired && nSigmaTPCKaonMin < tpcNSigmaKaon && tpcNSigmaKaon < nSigmaTPCKaonMax && ((!trkWTOF) || (nSigmaTOFKaonMin < tofNSigmaKaon && tofNSigmaKaon < nSigmaTOFKaonMax))) + if (isPIDKaonRequired && kaonPIDwithTPC && ((!trkWTOF) || kaonPIDwithTOF)) isKaon = true; // isProton bool isProton = false; - if (isPIDProtonRequired && nSigmaTPCProtonMin < tpcNSigmaProton && tpcNSigmaProton < nSigmaTPCProtonMax && ((!trkWTOF) || (nSigmaTOFProtonMin < tofNSigmaProton && tofNSigmaProton < nSigmaTOFProtonMax))) + if (isPIDProtonRequired && protonPIDwithTPC && ((!trkWTOF) || protonPIDwithTOF)) isProton = true; // int sayPrim = -1, signPDGCode = -2, specind = 0; @@ -1060,7 +1127,11 @@ struct qaMatchEff { // all tracks, no conditions // if (trkWTPC && isTrackSelectedTPCCuts(track)) { - if constexpr (IS_MC) { // MC + if constexpr (IS_MC) { //////////////////////// MC + // + histos.fill(HIST("MC/control/zDCA_tpc"), track.dcaZ()); + histos.fill(HIST("MC/control/xyDCA_tpc"), track.dcaXY()); + // if (makept2d) { histos.fill(HIST("MC/control/ptptconfTPCall"), reco_pt, tpcinner_pt); if (!trkWITS) @@ -1075,7 +1146,11 @@ struct qaMatchEff { histos.get(HIST("MC/phihist_toftpc"))->Fill(track.phi()); histos.get(HIST("MC/etahist_toftpc"))->Fill(track.eta()); } - } else { // DATA + } else { //////////////////////// DATA + // + histos.fill(HIST("data/control/zDCA_tpc"), track.dcaZ()); + histos.fill(HIST("data/control/xyDCA_tpc"), track.dcaXY()); + // if (makept2d) { histos.fill(HIST("data/control/ptptconfTPCall"), reco_pt, tpcinner_pt); if (!trkWITS) @@ -1106,6 +1181,9 @@ struct qaMatchEff { // // PID is applied if (isPion) { + histos.get(HIST("data/PID/zDCA_tpc_pi"))->Fill(track.dcaZ()); + histos.get(HIST("data/PID/xyDCA_tpc_pi"))->Fill(track.dcaXY()); + // histos.get(HIST("data/PID/pthist_tpc_pi"))->Fill(trackPt); histos.get(HIST("data/PID/phihist_tpc_pi"))->Fill(track.phi()); histos.get(HIST("data/PID/etahist_tpc_pi"))->Fill(track.eta()); @@ -1158,6 +1236,9 @@ struct qaMatchEff { } // end pions if (isKaon) { + histos.get(HIST("data/PID/zDCA_tpc_ka"))->Fill(track.dcaZ()); + histos.get(HIST("data/PID/xyDCA_tpc_ka"))->Fill(track.dcaXY()); + // histos.get(HIST("data/PID/pthist_tpc_ka"))->Fill(trackPt); histos.get(HIST("data/PID/phihist_tpc_ka"))->Fill(track.phi()); histos.get(HIST("data/PID/etahist_tpc_ka"))->Fill(track.eta()); @@ -1210,6 +1291,9 @@ struct qaMatchEff { } // end kaons if (isProton) { + histos.get(HIST("data/PID/zDCA_tpc_pr"))->Fill(track.dcaZ()); + histos.get(HIST("data/PID/xyDCA_tpc_pr"))->Fill(track.dcaXY()); + // histos.get(HIST("data/PID/pthist_tpc_pr"))->Fill(trackPt); histos.get(HIST("data/PID/phihist_tpc_pr"))->Fill(track.phi()); histos.get(HIST("data/PID/etahist_tpc_pr"))->Fill(track.eta()); @@ -1262,6 +1346,8 @@ struct qaMatchEff { } // end protons if (!isPion && !isKaon && !isProton && (isPIDPionRequired || isPIDKaonRequired || isPIDProtonRequired)) { + histos.get(HIST("data/PID/zDCA_tpc_noid"))->Fill(track.dcaZ()); + histos.get(HIST("data/PID/xyDCA_tpc_noid"))->Fill(track.dcaXY()); histos.get(HIST("data/PID/pthist_tpc_noid"))->Fill(trackPt); histos.get(HIST("data/PID/phihist_tpc_noid"))->Fill(track.phi()); histos.get(HIST("data/PID/etahist_tpc_noid"))->Fill(track.eta()); @@ -1278,7 +1364,9 @@ struct qaMatchEff { } // end if DATA // if (trkWITS && isTrackSelectedITSCuts(track)) { //////////////////////////////////////////// ITS tag inside TPC tagged - if constexpr (IS_MC) { // MC + if constexpr (IS_MC) { //////////////////////// MC + histos.get(HIST("MC/control/zDCA_tpcits"))->Fill(track.dcaZ()); + histos.get(HIST("MC/control/xyDCA_tpcits"))->Fill(track.dcaXY()); if (makept2d) histos.fill(HIST("MC/control/ptptconfTPCITS"), reco_pt, tpcinner_pt); histos.get(HIST("MC/qopthist_tpcits"))->Fill(track.signed1Pt()); @@ -1290,13 +1378,18 @@ struct qaMatchEff { histos.get(HIST("MC/phihist_toftpcits"))->Fill(track.phi()); histos.get(HIST("MC/etahist_toftpcits"))->Fill(track.eta()); } - } else { // DATA + } else { //////////////////////// DATA + histos.get(HIST("data/control/zDCA_tpcits"))->Fill(track.dcaZ()); + histos.get(HIST("data/control/xyDCA_tpcits"))->Fill(track.dcaXY()); if (makept2d) histos.fill(HIST("data/control/ptptconfTPCITS"), reco_pt, tpcinner_pt); histos.get(HIST("data/qopthist_tpcits"))->Fill(track.signed1Pt()); // // PID is applied if (isPion) { + histos.get(HIST("data/PID/zDCA_tpcits_pi"))->Fill(track.dcaZ()); + histos.get(HIST("data/PID/xyDCA_tpcits_pi"))->Fill(track.dcaXY()); + // histos.get(HIST("data/PID/pthist_tpcits_pi"))->Fill(trackPt); histos.get(HIST("data/PID/phihist_tpcits_pi"))->Fill(track.phi()); histos.get(HIST("data/PID/etahist_tpcits_pi"))->Fill(track.eta()); @@ -1349,6 +1442,9 @@ struct qaMatchEff { } // end pions if (isKaon) { + histos.get(HIST("data/PID/zDCA_tpcits_ka"))->Fill(track.dcaZ()); + histos.get(HIST("data/PID/xyDCA_tpcits_ka"))->Fill(track.dcaXY()); + // histos.get(HIST("data/PID/pthist_tpcits_ka"))->Fill(trackPt); histos.get(HIST("data/PID/phihist_tpcits_ka"))->Fill(track.phi()); histos.get(HIST("data/PID/etahist_tpcits_ka"))->Fill(track.eta()); @@ -1401,6 +1497,9 @@ struct qaMatchEff { } // end kaons if (isProton) { + histos.get(HIST("data/PID/zDCA_tpcits_pr"))->Fill(track.dcaZ()); + histos.get(HIST("data/PID/xyDCA_tpcits_pr"))->Fill(track.dcaXY()); + // histos.get(HIST("data/PID/pthist_tpcits_pr"))->Fill(trackPt); histos.get(HIST("data/PID/phihist_tpcits_pr"))->Fill(track.phi()); histos.get(HIST("data/PID/etahist_tpcits_pr"))->Fill(track.eta()); @@ -1469,6 +1568,8 @@ struct qaMatchEff { // // not identified if (!isPion && !isKaon && !isProton) { + histos.get(HIST("data/PID/zDCA_tpcits_noid"))->Fill(track.dcaZ()); + histos.get(HIST("data/PID/xyDCA_tpcits_noid"))->Fill(track.dcaXY()); histos.get(HIST("data/PID/pthist_tpcits_noid"))->Fill(trackPt); histos.get(HIST("data/PID/phihist_tpcits_noid"))->Fill(track.phi()); histos.get(HIST("data/PID/etahist_tpcits_noid"))->Fill(track.eta()); @@ -1501,17 +1602,17 @@ struct qaMatchEff { for (unsigned int i = 0; i < 7; i++) { if (track.itsClusterMap() & (1 << i)) { trkHasITS = true; - if (IS_MC) { + if (IS_MC) { //////////////////////// MC histos.fill(HIST("MC/control/itsHitsMatched"), i, itsNhits); - } else { + } else { //////////////////////// DATA histos.fill(HIST("data/control/itsHitsMatched"), i, itsNhits); } } } if (!trkHasITS) { - if (IS_MC) { + if (IS_MC) { //////////////////////// MC histos.fill(HIST("MC/control/itsHitsMatched"), -1, itsNhits); - } else { + } else { //////////////////////// DATA histos.fill(HIST("data/control/itsHitsMatched"), -1, itsNhits); } } @@ -1521,11 +1622,11 @@ struct qaMatchEff { // all tracks with pt>0.5 if (trackPt > 0.5) { if (trkWTPC && isTrackSelectedTPCCuts(track)) { - if constexpr (IS_MC) { + if constexpr (IS_MC) { //////////////////////// MC histos.get(HIST("MC/pthist_tpc_05"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_05"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_05"))->Fill(track.eta()); - } else { + } else { //////////////////////// DATA histos.get(HIST("data/pthist_tpc_05"))->Fill(trackPt); histos.get(HIST("data/phihist_tpc_05"))->Fill(track.phi()); histos.get(HIST("data/etahist_tpc_05"))->Fill(track.eta()); @@ -1604,11 +1705,17 @@ struct qaMatchEff { // only primaries if (mcpart.isPhysicalPrimary()) { if (trkWTPC && isTrackSelectedTPCCuts(track)) { + histos.get(HIST("MC/primsec/zDCA_tpc_prim"))->Fill(track.dcaZ()); + histos.get(HIST("MC/primsec/xyDCA_tpc_prim"))->Fill(track.dcaXY()); + // histos.get(HIST("MC/primsec/qopthist_tpc_prim"))->Fill(track.signed1Pt()); histos.get(HIST("MC/primsec/pthist_tpc_prim"))->Fill(trackPt); histos.get(HIST("MC/primsec/phihist_tpc_prim"))->Fill(track.phi()); histos.get(HIST("MC/primsec/etahist_tpc_prim"))->Fill(track.eta()); if (trkWITS && isTrackSelectedITSCuts(track)) { + histos.get(HIST("MC/primsec/zDCA_tpcits_prim"))->Fill(track.dcaZ()); + histos.get(HIST("MC/primsec/xyDCA_tpcits_prim"))->Fill(track.dcaXY()); + // histos.get(HIST("MC/primsec/qopthist_tpcits_prim"))->Fill(track.signed1Pt()); histos.get(HIST("MC/primsec/pthist_tpcits_prim"))->Fill(trackPt); histos.get(HIST("MC/primsec/phihist_tpcits_prim"))->Fill(track.phi()); @@ -1620,11 +1727,17 @@ struct qaMatchEff { // // only secondaries from decay if (trkWTPC && isTrackSelectedTPCCuts(track)) { + histos.get(HIST("MC/primsec/zDCA_tpc_secd"))->Fill(track.dcaZ()); + histos.get(HIST("MC/primsec/xyDCA_tpc_secd"))->Fill(track.dcaXY()); + // histos.get(HIST("MC/primsec/qopthist_tpc_secd"))->Fill(track.signed1Pt()); histos.get(HIST("MC/primsec/pthist_tpc_secd"))->Fill(trackPt); histos.get(HIST("MC/primsec/phihist_tpc_secd"))->Fill(track.phi()); histos.get(HIST("MC/primsec/etahist_tpc_secd"))->Fill(track.eta()); if (trkWITS && isTrackSelectedITSCuts(track)) { + histos.get(HIST("MC/primsec/zDCA_tpcits_secd"))->Fill(track.dcaZ()); + histos.get(HIST("MC/primsec/xyDCA_tpcits_secd"))->Fill(track.dcaXY()); + // histos.get(HIST("MC/primsec/qopthist_tpcits_secd"))->Fill(track.signed1Pt()); histos.get(HIST("MC/primsec/pthist_tpcits_secd"))->Fill(trackPt); histos.get(HIST("MC/primsec/phihist_tpcits_secd"))->Fill(track.phi()); @@ -1636,11 +1749,17 @@ struct qaMatchEff { // // only secondaries from material if (trkWTPC && isTrackSelectedTPCCuts(track)) { + histos.get(HIST("MC/primsec/zDCA_tpc_secm"))->Fill(track.dcaZ()); + histos.get(HIST("MC/primsec/xyDCA_tpc_secm"))->Fill(track.dcaXY()); + // histos.get(HIST("MC/primsec/qopthist_tpc_secm"))->Fill(track.signed1Pt()); histos.get(HIST("MC/primsec/pthist_tpc_secm"))->Fill(trackPt); histos.get(HIST("MC/primsec/phihist_tpc_secm"))->Fill(track.phi()); histos.get(HIST("MC/primsec/etahist_tpc_secm"))->Fill(track.eta()); if (trkWITS && isTrackSelectedITSCuts(track)) { + histos.get(HIST("MC/primsec/zDCA_tpcits_secm"))->Fill(track.dcaZ()); + histos.get(HIST("MC/primsec/xyDCA_tpcits_secm"))->Fill(track.dcaXY()); + // histos.get(HIST("MC/primsec/qopthist_tpcits_secm"))->Fill(track.signed1Pt()); histos.get(HIST("MC/primsec/pthist_tpcits_secm"))->Fill(trackPt); histos.get(HIST("MC/primsec/phihist_tpcits_secm"))->Fill(track.phi()); @@ -1652,6 +1771,9 @@ struct qaMatchEff { // protons only if (tpPDGCode == 2212) { if (trkWTPC && isTrackSelectedTPCCuts(track)) { + histos.get(HIST("MC/PID/zDCA_tpc_pr"))->Fill(track.dcaZ()); + histos.get(HIST("MC/PID/xyDCA_tpc_pr"))->Fill(track.dcaXY()); + // histos.get(HIST("MC/PID/pthist_tpc_pr"))->Fill(trackPt); histos.get(HIST("MC/PID/phihist_tpc_pr"))->Fill(track.phi()); histos.get(HIST("MC/PID/etahist_tpc_pr"))->Fill(track.eta()); @@ -1665,6 +1787,9 @@ struct qaMatchEff { histos.get(HIST("MC/PID/etahist_tpc_prminus"))->Fill(track.eta()); } if (trkWITS && isTrackSelectedITSCuts(track)) { + histos.get(HIST("MC/PID/zDCA_tpcits_pr"))->Fill(track.dcaZ()); + histos.get(HIST("MC/PID/xyDCA_tpcits_pr"))->Fill(track.dcaXY()); + // histos.get(HIST("MC/PID/pthist_tpcits_pr"))->Fill(trackPt); histos.get(HIST("MC/PID/phihist_tpcits_pr"))->Fill(track.phi()); histos.get(HIST("MC/PID/etahist_tpcits_pr"))->Fill(track.eta()); @@ -1684,6 +1809,9 @@ struct qaMatchEff { // pions only if (tpPDGCode == 211) { if (trkWTPC && isTrackSelectedTPCCuts(track)) { + histos.get(HIST("MC/PID/zDCA_tpc_pi"))->Fill(track.dcaZ()); + histos.get(HIST("MC/PID/xyDCA_tpc_pi"))->Fill(track.dcaXY()); + // histos.get(HIST("MC/PID/pthist_tpc_pi"))->Fill(trackPt); histos.get(HIST("MC/PID/phihist_tpc_pi"))->Fill(track.phi()); histos.get(HIST("MC/PID/etahist_tpc_pi"))->Fill(track.eta()); @@ -1697,6 +1825,9 @@ struct qaMatchEff { histos.get(HIST("MC/PID/etahist_tpc_piminus"))->Fill(track.eta()); } if (trkWITS && isTrackSelectedITSCuts(track)) { + histos.get(HIST("MC/PID/zDCA_tpcits_pi"))->Fill(track.dcaZ()); + histos.get(HIST("MC/PID/xyDCA_tpcits_pi"))->Fill(track.dcaXY()); + // histos.get(HIST("MC/PID/pthist_tpcits_pi"))->Fill(trackPt); histos.get(HIST("MC/PID/phihist_tpcits_pi"))->Fill(track.phi()); histos.get(HIST("MC/PID/etahist_tpcits_pi"))->Fill(track.eta()); @@ -1783,6 +1914,9 @@ struct qaMatchEff { // kaons only if (tpPDGCode == 321) { if (trkWTPC && isTrackSelectedTPCCuts(track)) { + histos.get(HIST("MC/PID/zDCA_tpc_ka"))->Fill(track.dcaZ()); + histos.get(HIST("MC/PID/xyDCA_tpc_ka"))->Fill(track.dcaXY()); + // histos.get(HIST("MC/PID/pthist_tpc_ka"))->Fill(trackPt); histos.get(HIST("MC/PID/phihist_tpc_ka"))->Fill(track.phi()); histos.get(HIST("MC/PID/etahist_tpc_ka"))->Fill(track.eta()); @@ -1796,6 +1930,9 @@ struct qaMatchEff { histos.get(HIST("MC/PID/etahist_tpc_kaminus"))->Fill(track.eta()); } if (trkWITS && isTrackSelectedITSCuts(track)) { + histos.get(HIST("MC/PID/zDCA_tpcits_ka"))->Fill(track.dcaZ()); + histos.get(HIST("MC/PID/xyDCA_tpcits_ka"))->Fill(track.dcaXY()); + // histos.get(HIST("MC/PID/pthist_tpcits_ka"))->Fill(trackPt); histos.get(HIST("MC/PID/phihist_tpcits_ka"))->Fill(track.phi()); histos.get(HIST("MC/PID/etahist_tpcits_ka"))->Fill(track.eta());