diff --git a/PWGCF/EbyEFluctuations/Tasks/netprotcumulants.cxx b/PWGCF/EbyEFluctuations/Tasks/netprotcumulants.cxx index 4f481963723..5c44d407590 100644 --- a/PWGCF/EbyEFluctuations/Tasks/netprotcumulants.cxx +++ b/PWGCF/EbyEFluctuations/Tasks/netprotcumulants.cxx @@ -73,7 +73,11 @@ struct NetProtCumulants { Configurable cfgCutDCAz{"cfgCutDCAz", 2.0f, "DCAz range for tracks"}; Configurable cfgITScluster{"cfgITScluster", 1, "Minimum Number of ITS cluster"}; Configurable cfgTPCcluster{"cfgTPCcluster", 80, "Minimum Number of TPC cluster"}; + Configurable cfgTPCcrossedRowsOverFindable{"cfgTPCcrossedRowsOverFindable", 0.8, "Min crossedRows/findable ratio"}; + Configurable cfgUseTPCratioCut{"cfgUseTPCratioCut", true, "Apply crossedRows/findable cut"}; Configurable cfgTPCnCrossedRows{"cfgTPCnCrossedRows", 70, "Minimum Number of TPC crossed-rows"}; + Configurable cfgUseTPCcrossedRowsCut{"cfgUseTPCcrossedRowsCut", true, "Apply crossed rows cut"}; + Configurable cfgUseTPCclusterCut{"cfgUseTPCclusterCut", true, "Apply TPC cluster cut"}; Configurable cfgUseItsPid{"cfgUseItsPid", true, "Use ITS nSigma Cut"}; // Calculation of cumulants central/error @@ -94,7 +98,10 @@ struct NetProtCumulants { Configurable cfgEvSelkIsVertexTOFmatched{"cfgEvSelkIsVertexTOFmatched", true, "If matched with TOF, for pileup"}; Configurable cfgEvSelkIsGoodZvtxFT0vsPV{"cfgEvSelkIsGoodZvtxFT0vsPV", false, "Apply kIsGoodZvtxFT0vsPV event selection"}; ConfigurableAxis cfgCentralityBins{"cfgCentralityBins", {90, 0., 90.}, "Centrality/Multiplicity percentile bining"}; - + Configurable cfgUsePtDepDCAxy{"cfgUsePtDepDCAxy", true, "Use pt-dependent DCAxy cut"}; + Configurable cfgUsePtDepDCAz{"cfgUsePtDepDCAz", true, "Use pt-dependent DCAz cut"}; + Configurable cfgDCAxyFunc{"cfgDCAxyFunc", "(0.0010+0.0080/(x^0.73))", "DCAxy function"}; + Configurable cfgDCAzFunc{"cfgDCAzFunc", "(0.0020+0.0100/(x^0.70))", "DCAz function"}; // Connect to ccdb Service ccdb; Configurable ccdbNoLaterThan{"ccdbNoLaterThan", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; @@ -108,6 +115,8 @@ struct NetProtCumulants { // Eff histograms 2d: eff(pT, eta) TH2F* hRatio2DEtaVsPtProton = nullptr; TH2F* hRatio2DEtaVsPtAntiproton = nullptr; + TF1* fPtDepDCAxy = nullptr; + TF1* fPtDepDCAz = nullptr; // Filter command for rec (data)*********** Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; @@ -214,7 +223,60 @@ struct NetProtCumulants { histos.add("hrec2DEtaVsPtAntiproton", "2D hist of Reconstructed Anti-proton y: eta vs. x: pT", kTH2F, {ptAxis, etaAxis}); histos.add("hgen2DEtaVsPtProton", "2D hist of Generated Proton y: eta vs. x: pT", kTH2F, {ptAxis, etaAxis}); histos.add("hgen2DEtaVsPtAntiproton", "2D hist of Generated Anti-proton y: eta vs. x: pT", kTH2F, {ptAxis, etaAxis}); - + histos.add("hNTracksVsCent", "N_{p+#bar{p}} vs FT0C centrality;Centrality (%);N tracks", kTH2F, {centAxis, {200, 0, 200}}); + histos.add("hDCAxyVsPt_before", + "DCAxy vs pT (before cut);pT;DCAxy", + kTH2F, + {{100, 0.5, 1.5}, {200, -0.3, 0.3}}); + + histos.add("hDCAzVsPt_before", + "DCAz vs pT (before cut);pT;DCAz", + kTH2F, + {{100, 0.5, 1.5}, {200, -0.3, 0.3}}); + + histos.add("hDCAxyVsPt_after", + "DCAxy vs pT (after cut);pT;DCAxy", + kTH2F, + {{100, 0.5, 1.5}, {200, -0.3, 0.3}}); + + histos.add("hDCAzVsPt_after", + "DCAz vs pT (after cut);pT;DCAz", + kTH2F, + {{100, 0.5, 1.5}, {200, -0.3, 0.3}}); + + histos.add("hDCAxyVsPt_afterPID", + "DCAxy vs pT after DCA+PID;pT;DCAxy", + kTH2F, + {{100, 0.5, 1.5}, {200, -0.3, 0.3}}); + + histos.add("hDCAzVsPt_afterPID", + "DCAz vs pT after DCA+PID;pT;DCAz", + kTH2F, + {{100, 0.5, 1.5}, {200, -0.3, 0.3}}); + + histos.add("hTPCcrossedRows", + "TPC crossed rows;N crossed rows;Counts", + kTH1F, + {{160, 0, 160}}); + + histos.add("hTPCclusters", + "TPC clusters;N clusters;Counts", + kTH1F, + {{160, 0, 160}}); + + histos.add("hTPCclusters_afterCrossedRows", + "TPC clusters after crossed rows cut;N clusters;Counts", + kTH1F, + {{160, 0, 160}}); + histos.add("h2_dEdxTPC_vs_pT", + "TPC dE/dx vs pT;#it{p}_{T} (GeV/#it{c});TPC dE/dx", + kTH2F, + {ptAxis, {600, 0, 5000}}); + + histos.add("h2_dEdxTPC_vs_pT_proton", + "TPC dE/dx vs pT (protons);#it{p}_{T} (GeV/#it{c});TPC dE/dx", + kTH2F, + {ptAxis, {600, 0, 5000}}); // 2D histograms of nSigma histos.add("h2DnsigmaTpcVsPt", "2D hist of nSigmaTPC vs. pT", kTH2F, {ptAxis, nSigmaAxis}); histos.add("h2DnsigmaTofVsPt", "2D hist of nSigmaTOF vs. pT", kTH2F, {ptAxis, nSigmaAxis}); @@ -786,6 +848,13 @@ struct NetProtCumulants { histos.add("GenProf2D_mu8_netproton", "", {HistType::kTProfile2D, {centAxis, subsampleAxis}}); } } + if (cfgUsePtDepDCAxy) { + fPtDepDCAxy = new TF1("ptDepDCAxy", cfgDCAxyFunc->c_str(), 0.001, 10.0); + } + + if (cfgUsePtDepDCAz) { + fPtDepDCAz = new TF1("ptDepDCAz", cfgDCAzFunc->c_str(), 0.001, 10.0); + } } // end init() template @@ -1129,18 +1198,54 @@ struct NetProtCumulants { if ((particle.pt() < cfgCutPtLower) || (particle.pt() > 5.0f) || (std::abs(particle.eta()) > cfgCutEta)) { continue; } - if (!(track.itsNCls() > cfgITScluster) || !(track.tpcNClsFound() >= cfgTPCcluster) || !(track.tpcNClsCrossedRows() >= cfgTPCnCrossedRows)) { + + histos.fill(HIST("hTPCcrossedRows"), track.tpcNClsCrossedRows()); + histos.fill(HIST("hTPCclusters"), track.tpcNClsFound()); + // Cluster cut + + // Crossed rows cut + if (cfgUseTPCcrossedRowsCut && track.tpcNClsCrossedRows() < cfgTPCnCrossedRows) { + continue; + } + + histos.fill(HIST("hTPCclusters_afterCrossedRows"), track.tpcNClsFound()); + + if (cfgUseTPCclusterCut && track.tpcNClsFound() < cfgTPCcluster) { continue; } + // Ratio cut + if (cfgUseTPCratioCut) { + float crossedRows = track.tpcNClsCrossedRows(); + float findable = track.tpcNClsFindable(); + + if (findable > 0) { + if ((crossedRows / findable) < cfgTPCcrossedRowsOverFindable) { + continue; + } + } + } if (particle.isPhysicalPrimary()) { + histos.fill(HIST("h2_dEdxTPC_vs_pT"), track.pt(), track.tpcSignal()); histos.fill(HIST("hrecPartPtAll"), particle.pt()); histos.fill(HIST("hrecPtAll"), track.pt()); histos.fill(HIST("hrecEtaAll"), particle.eta()); histos.fill(HIST("hrecPhiAll"), particle.phi()); histos.fill(HIST("hrecDcaXYAll"), track.dcaXY()); histos.fill(HIST("hrecDcaZAll"), track.dcaZ()); + histos.fill(HIST("hDCAxyVsPt_before"), track.pt(), track.dcaXY()); + histos.fill(HIST("hDCAzVsPt_before"), track.pt(), track.dcaZ()); + + if (cfgUsePtDepDCAxy && !(std::abs(track.dcaXY()) < fPtDepDCAxy->Eval(track.pt()))) { + continue; + } + + if (cfgUsePtDepDCAz && !(std::abs(track.dcaZ()) < fPtDepDCAz->Eval(track.pt()))) { + continue; + } + histos.fill(HIST("hDCAxyVsPt_after"), track.pt(), track.dcaXY()); + histos.fill(HIST("hDCAzVsPt_after"), track.pt(), track.dcaZ()); // rejecting electron if (cfgIfRejectElectron && isElectron(track)) { continue; @@ -1164,10 +1269,13 @@ struct NetProtCumulants { if (trackSelected) { // filling nSigma distribution + histos.fill(HIST("h2_dEdxTPC_vs_pT_proton"), track.pt(), track.tpcSignal()); histos.fill(HIST("h2DnsigmaTpcVsPt"), track.pt(), track.tpcNSigmaPr()); histos.fill(HIST("h2DnsigmaTofVsPt"), track.pt(), track.tofNSigmaPr()); histos.fill(HIST("h2DnsigmaItsVsPt"), track.pt(), itsResponse.nSigmaITS(track)); + histos.fill(HIST("hDCAxyVsPt_afterPID"), track.pt(), track.dcaXY()); + histos.fill(HIST("hDCAzVsPt_afterPID"), track.pt(), track.dcaZ()); if (track.sign() > 0) { histos.fill(HIST("hrecPartPtProton"), particle.pt()); //! hist for p rec histos.fill(HIST("hrecPtProton"), track.pt()); //! hist for p rec @@ -1217,6 +1325,8 @@ struct NetProtCumulants { } //! end track loop float netProt = nProt - nAntiprot; + float nTracks = nProt + nAntiprot; + histos.fill(HIST("hNTracksVsCent"), cent, nTracks); histos.fill(HIST("hrecNetProtonVsCentrality"), netProt, cent); histos.fill(HIST("hrecProtonVsCentrality"), nProt, cent); histos.fill(HIST("hrecAntiprotonVsCentrality"), nAntiprot, cent); @@ -2071,9 +2181,35 @@ struct NetProtCumulants { if ((track.pt() < cfgCutPtLower) || (track.pt() > 5.0f) || (std::abs(track.eta()) > cfgCutEta)) { continue; } - if (!(track.itsNCls() > cfgITScluster) || !(track.tpcNClsFound() >= cfgTPCcluster) || !(track.tpcNClsCrossedRows() >= cfgTPCnCrossedRows)) { + + histos.fill(HIST("hTPCcrossedRows"), track.tpcNClsCrossedRows()); + histos.fill(HIST("hTPCclusters"), track.tpcNClsFound()); + // Cluster cut + + // Crossed rows cut + if (cfgUseTPCcrossedRowsCut && track.tpcNClsCrossedRows() < cfgTPCnCrossedRows) { + continue; + } + + histos.fill(HIST("hTPCclusters_afterCrossedRows"), track.tpcNClsFound()); + + if (cfgUseTPCclusterCut && track.tpcNClsFound() < cfgTPCcluster) { continue; } + + // Ratio cut + if (cfgUseTPCratioCut) { + float crossedRows = track.tpcNClsCrossedRows(); + float findable = track.tpcNClsFindable(); + + if (findable > 0) { + if ((crossedRows / findable) < cfgTPCcrossedRowsOverFindable) { + continue; + } + } + } + histos.fill(HIST("h2_dEdxTPC_vs_pT"), track.pt(), track.tpcSignal()); + // for purity calculation float nsTPC = track.tpcNSigmaPr(); float nsTOF = track.tofNSigmaPr(); @@ -2101,6 +2237,19 @@ struct NetProtCumulants { histos.fill(HIST("hrecPhiAll"), track.phi()); histos.fill(HIST("hrecDcaXYAll"), track.dcaXY()); histos.fill(HIST("hrecDcaZAll"), track.dcaZ()); + histos.fill(HIST("hDCAxyVsPt_before"), track.pt(), track.dcaXY()); + histos.fill(HIST("hDCAzVsPt_before"), track.pt(), track.dcaZ()); + + if (cfgUsePtDepDCAxy && !(std::abs(track.dcaXY()) < fPtDepDCAxy->Eval(track.pt()))) { + continue; + } + + if (cfgUsePtDepDCAz && !(std::abs(track.dcaZ()) < fPtDepDCAz->Eval(track.pt()))) { + continue; + } + + histos.fill(HIST("hDCAxyVsPt_after"), track.pt(), track.dcaXY()); + histos.fill(HIST("hDCAzVsPt_after"), track.pt(), track.dcaZ()); // rejecting electron if (cfgIfRejectElectron && isElectron(track)) { @@ -2126,10 +2275,13 @@ struct NetProtCumulants { if (trackSelected) { // filling nSigma distribution + histos.fill(HIST("h2_dEdxTPC_vs_pT_proton"), track.pt(), track.tpcSignal()); histos.fill(HIST("h2DnsigmaTpcVsPt"), track.pt(), track.tpcNSigmaPr()); histos.fill(HIST("h2DnsigmaTofVsPt"), track.pt(), track.tofNSigmaPr()); histos.fill(HIST("h2DnsigmaItsVsPt"), track.pt(), itsResponse.nSigmaITS(track)); + histos.fill(HIST("hDCAxyVsPt_afterPID"), track.pt(), track.dcaXY()); + histos.fill(HIST("hDCAzVsPt_afterPID"), track.pt(), track.dcaZ()); // for protons if (track.sign() > 0) { histos.fill(HIST("hrecPtProton"), track.pt()); //! hist for p rec @@ -2172,6 +2324,8 @@ struct NetProtCumulants { } //! end track loop float netProt = nProt - nAntiprot; + float nTracks = nProt + nAntiprot; + histos.fill(HIST("hNTracksVsCent"), cent, nTracks); histos.fill(HIST("hrecNetProtonVsCentrality"), netProt, cent); histos.fill(HIST("hrecProtonVsCentrality"), nProt, cent); histos.fill(HIST("hrecAntiprotonVsCentrality"), nAntiprot, cent);