diff --git a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx index 95c7f7d1243..41519c50498 100644 --- a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx +++ b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx @@ -9,17 +9,11 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. // -// This is a task that employs the standard V0 tables and attempts to combine -// two V0s into a Sigma0 -> Lambda + gamma candidate. -// *+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+* -// Sigma0 builder task -// *+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+* -// -// Comments, questions, complaints, suggestions? -// Please write to: -// gianni.shigeru.setoue.liveraro@cern.ch -// oussama.benchikhi@cern.ch -// + +/// \file sigma0builder.cxx +/// \brief This is a task that employs the standard V0 tables and attempts to combine two V0s into a Sigma0 -> Lambda + gamma candidate. +/// \author Gianni Shigeru Setoue Liveraro +/// \author Oussama Benchikhi #include "PWGEM/PhotonMeson/Utils/MCUtilities.h" #include "PWGJE/DataModel/EMCALClusters.h" @@ -286,6 +280,7 @@ struct sigma0builder { Configurable KShortRejectPosITSafterburner{"KShortRejectPosITSafterburner", false, "reject positive track formed out of afterburner ITS tracks"}; Configurable KShortRejectNegITSafterburner{"KShortRejectNegITSafterburner", false, "reject negative track formed out of afterburner ITS tracks"}; Configurable KShortArmenterosCoefficient{"KShortArmenterosCoefficient", 0.2, "Armenteros-Podolanski coefficient to reject lambdas"}; + Configurable KShortMaxTPCNSigmas{"KShortMaxTPCNSigmas", 1e+9, "Max |TPC NSigma| (pion hypothesis) for K0S daughters"}; } kshortSelections; // KStar criteria: @@ -477,8 +472,9 @@ struct sigma0builder { histos.get(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(9, "Z"); histos.get(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(10, "CosPA"); histos.get(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(11, "Phi"); - histos.get(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(12, "TPCCR"); - histos.get(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(13, "TPC NSigma"); + histos.get(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(12, "Armenteros"); + histos.get(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(13, "TPCCR"); + histos.get(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(14, "TPC NSigma"); if (doprocessPCMVsEMCalQA) { histos.add("EMCalPhotonSel/hSelectionStatistics", "hSelectionStatistics", kTH1D, {axisConfig.axisCandSel}); @@ -545,6 +541,7 @@ struct sigma0builder { histos.get(HIST("KShortSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(12, "TPCCR"); histos.get(HIST("KShortSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(13, "ITSNCls"); histos.get(HIST("KShortSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(14, "Lifetime"); + histos.get(HIST("KShortSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(15, "TPC NSigma"); if (doprocessRealData || doprocessRealDataWithTOF || doprocessRealDataWithEMCal || doprocessMonteCarlo || doprocessMonteCarloWithTOF || doprocessMonteCarloWithEMCal) { histos.add("SigmaSel/hSigma0DauDeltaIndex", "hSigma0DauDeltaIndex", kTH1F, {{100, -49.5f, 50.5f}}); @@ -2206,6 +2203,11 @@ struct sigma0builder { return false; histos.fill(HIST("KShortSel/hSelectionStatistics"), 14.); + if (((TMath::Abs(posTrackKShort.tpcNSigmaPi()) > kshortSelections.KShortMaxTPCNSigmas) || + (TMath::Abs(negTrackKShort.tpcNSigmaPi()) > kshortSelections.KShortMaxTPCNSigmas))) + return false; + + histos.fill(HIST("KShortSel/hSelectionStatistics"), 15.); } return true; } diff --git a/PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx b/PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx index ee4411b2d37..a3615f47e69 100644 --- a/PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx +++ b/PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx @@ -8,17 +8,10 @@ // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -// -// This is a ask that computes the same-event rotational and the -// mixed-event combinatorial backgrounds for the K*(892) -> K0S + gamma analysis. -// *+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+* -// K892 hadron-photon background task -// *+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+* -// -// Comments, questions, complaints, suggestions? -// Please write to: -// oussama.benchikhi@cern.ch -// + +/// \file k892hadronphotonBkg.cxx +/// \brief This is a ask that computes the same-event rotational and the mixed-event combinatorial backgrounds for the K*(892) -> K0S + gamma analysis. +/// \author Oussama Benchikhi #include "PWGLF/DataModel/LFStrangenessMLTables.h" #include "PWGLF/DataModel/LFStrangenessPIDTables.h" @@ -62,6 +55,13 @@ using std::array; using dauTracks = soa::Join; using V0StandardDerivedDatas = soa::Join; +static const std::vector photonSels = {"No Sel", "Mass", "Y", "Neg Eta", "Pos Eta", + "DCAToPV", "DCADau", "Radius", "Z", "CosPA", + "Phi", "Qt", "Alpha", "TPCCR", "TPC NSigma"}; +static const std::vector kshortSels = {"No Sel", "Mass", "Y", "Neg Eta", "Pos Eta", + "DCAToPV", "Radius", "Z", "DCADau", "Armenteros", + "CosPA", "TPCCR", "ITSNCls", "Lifetime", "TPC NSigma"}; + struct k892hadronphotonBkg { Service ccdb; ctpRateFetcher rateFetcher; @@ -175,6 +175,7 @@ struct k892hadronphotonBkg { Configurable kshortRejectPosITSafterburner{"kshortRejectPosITSafterburner", false, "reject positive track formed out of afterburner ITS tracks"}; Configurable kshortRejectNegITSafterburner{"kshortRejectNegITSafterburner", false, "reject negative track formed out of afterburner ITS tracks"}; Configurable kshortArmenterosCoefficient{"kshortArmenterosCoefficient", 0.2, "Armenteros-Podolanski coefficient to reject lambdas"}; + Configurable kshortMaxTPCNSigmas{"kshortMaxTPCNSigmas", 1e+9, "Max |TPC NSigma| (pion hypothesis) for K0S daughters"}; } kshortSelections; struct : ConfigurableGroup { @@ -184,6 +185,7 @@ struct k892hadronphotonBkg { ConfigurableAxis axisCentrality{"axisCentrality", {VARIABLE_WIDTH, 0.0f, 5.0f, 10.0f, 20.0f, 30.0f, 40.0f, 50.0f, 60.0f, 70.0f, 80.0f, 90.0f, 100.0f, 110.0f}, "Centrality"}; ConfigurableAxis axisKStarMass{"axisKStarMass", {500, 0.6f, 1.6f}, "M_{K^{*}} (GeV/c^{2})"}; ConfigurableAxis axisIRBinning{"axisIRBinning", {151, -10, 1500}, "Binning for the interaction rate (kHz)"}; + ConfigurableAxis axisCandSel{"axisCandSel", {15, 0.5f, +15.5f}, "Candidate Selection"}; } axisConfig; void init(InitContext const&) @@ -230,6 +232,15 @@ struct k892hadronphotonBkg { } } + // Single-particle selection + histos.add("PhotonSel/hSelectionStatistics", "hSelectionStatistics", kTH1D, {axisConfig.axisCandSel}); + for (size_t i = 0; i < photonSels.size(); ++i) + histos.get(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(i + 1, photonSels[i].c_str()); + + histos.add("KShortSel/hSelectionStatistics", "hSelectionStatistics", kTH1D, {axisConfig.axisCandSel}); + for (size_t i = 0; i < kshortSels.size(); ++i) + histos.get(HIST("KShortSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(i + 1, kshortSels[i].c_str()); + if (kstarBkgConfig.doSameEvtRotation || kstarBkgConfig.doEvtMixing) { histos.add("KStarBkg/hDeltaCollision", "hDeltaCollision", kTH1D, {{2000, -1000.f, 1000.f}}); histos.add("KStarBkg/h2dCentralityCollPair", "h2dCentralityCollPair", kTH2D, {axisConfig.axisCentrality, axisConfig.axisCentrality}); @@ -385,7 +396,7 @@ struct k892hadronphotonBkg { } //_______________________________________________ - // Process v0 photon candidate (data only, no QA fills) + // Process v0 photon candidate template bool processPhotonCandidate(TV0Object const& gamma) { @@ -402,61 +413,77 @@ struct k892hadronphotonBkg { } else { // Standard selection // Gamma basic selection criteria: + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 1.); if ((gamma.mGamma() < 0) || (gamma.mGamma() > photonSelections.photonMaxMass)) return false; + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 2.); if ((photonY < photonSelections.photonMinRapidity) || (photonY > photonSelections.photonMaxRapidity)) return false; + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 3.); if (gamma.negativeeta() < photonSelections.photonDauEtaMin || gamma.negativeeta() > photonSelections.photonDauEtaMax) return false; + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 4.); if (gamma.positiveeta() < photonSelections.photonDauEtaMin || gamma.positiveeta() > photonSelections.photonDauEtaMax) return false; + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 5.); if ((TMath::Abs(gamma.dcapostopv()) < photonSelections.photonMinDCADauToPv) || (TMath::Abs(gamma.dcanegtopv()) < photonSelections.photonMinDCADauToPv)) return false; + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 6.); if (TMath::Abs(gamma.dcaV0daughters()) > photonSelections.photonMaxDCAV0Dau) return false; + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 7.); if ((gamma.v0radius() < photonSelections.photonMinRadius) || (gamma.v0radius() > photonSelections.photonMaxRadius)) return false; + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 8.); if ((gamma.z() < photonSelections.photonMinZ) || (gamma.z() > photonSelections.photonMaxZ)) return false; + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 9.); if (gamma.v0cosPA() < photonSelections.photonMinV0cospa) return false; + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 10.); float photonPhi = RecoDecay::phi(gamma.px(), gamma.py()); if ((((photonPhi > photonSelections.photonPhiMin1) && (photonPhi < photonSelections.photonPhiMax1)) || ((photonPhi > photonSelections.photonPhiMin2) && (photonPhi < photonSelections.photonPhiMax2))) && ((photonSelections.photonPhiMin1 != -1) && (photonSelections.photonPhiMax1 != -1) && (photonSelections.photonPhiMin2 != -1) && (photonSelections.photonPhiMax2 != -1))) return false; + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 11.); if (gamma.qtarm() > photonSelections.photonMaxQt) return false; + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 12.); if (TMath::Abs(gamma.alpha()) > photonSelections.photonMaxAlpha) return false; auto posTrackGamma = gamma.template posTrackExtra_as(); auto negTrackGamma = gamma.template negTrackExtra_as(); + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 13.); if ((posTrackGamma.tpcCrossedRows() < photonSelections.photonMinTPCCrossedRows) || (negTrackGamma.tpcCrossedRows() < photonSelections.photonMinTPCCrossedRows)) return false; + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 14.); if (((posTrackGamma.tpcNSigmaEl() < photonSelections.photonMinTPCNSigmas) || (posTrackGamma.tpcNSigmaEl() > photonSelections.photonMaxTPCNSigmas))) return false; if (((negTrackGamma.tpcNSigmaEl() < photonSelections.photonMinTPCNSigmas) || (negTrackGamma.tpcNSigmaEl() > photonSelections.photonMaxTPCNSigmas))) return false; + + histos.fill(HIST("PhotonSel/hSelectionStatistics"), 15.); } return true; } //_______________________________________________ - // Process K0Short candidate (data only, no QA fills) + // Process K0Short candidate template bool processKShortCandidate(TV0Object const& kshort, TCollision const& collision) { @@ -470,39 +497,50 @@ struct k892hadronphotonBkg { } else { // KShort basic selection criteria: + histos.fill(HIST("KShortSel/hSelectionStatistics"), 1.); if ((TMath::Abs(kshort.mK0Short() - o2::constants::physics::MassK0Short) > kshortSelections.kshortWindow) && kshortSelections.kshortWindow > 0) return false; + histos.fill(HIST("KShortSel/hSelectionStatistics"), 2.); if ((kshort.yK0Short() < kshortSelections.kshortMinRapidity) || (kshort.yK0Short() > kshortSelections.kshortMaxRapidity)) return false; + histos.fill(HIST("KShortSel/hSelectionStatistics"), 3.); if ((kshort.negativeeta() < kshortSelections.kshortDauEtaMin) || (kshort.negativeeta() > kshortSelections.kshortDauEtaMax)) return false; + histos.fill(HIST("KShortSel/hSelectionStatistics"), 4.); if ((kshort.positiveeta() < kshortSelections.kshortDauEtaMin) || (kshort.positiveeta() > kshortSelections.kshortDauEtaMax)) return false; + histos.fill(HIST("KShortSel/hSelectionStatistics"), 5.); if ((TMath::Abs(kshort.dcapostopv()) < kshortSelections.kshortMinDCAPosToPv) || (TMath::Abs(kshort.dcanegtopv()) < kshortSelections.kshortMinDCANegToPv)) return false; + histos.fill(HIST("KShortSel/hSelectionStatistics"), 6.); if ((kshort.v0radius() < kshortSelections.kshortMinv0radius) || (kshort.v0radius() > kshortSelections.kshortMaxv0radius)) return false; + histos.fill(HIST("KShortSel/hSelectionStatistics"), 7.); if ((kshort.z() < kshortSelections.kshortMinZ) || (kshort.z() > kshortSelections.kshortMaxZ)) return false; + histos.fill(HIST("KShortSel/hSelectionStatistics"), 8.); if (TMath::Abs(kshort.dcaV0daughters()) > kshortSelections.kshortMaxDCAV0Dau) return false; + histos.fill(HIST("KShortSel/hSelectionStatistics"), 9.); if (kshort.qtarm() < kshortSelections.kshortArmenterosCoefficient * TMath::Abs(kshort.alpha())) return false; + histos.fill(HIST("KShortSel/hSelectionStatistics"), 10.); if (kshort.v0cosPA() < kshortSelections.kshortMinv0cospa) return false; auto posTrackKShort = kshort.template posTrackExtra_as(); auto negTrackKShort = kshort.template negTrackExtra_as(); + histos.fill(HIST("KShortSel/hSelectionStatistics"), 11.); if ((posTrackKShort.tpcCrossedRows() < kshortSelections.kshortMinTPCCrossedRows) || (negTrackKShort.tpcCrossedRows() < kshortSelections.kshortMinTPCCrossedRows)) return false; @@ -510,14 +548,24 @@ struct k892hadronphotonBkg { bool posIsFromAfterburner = posTrackKShort.itsChi2PerNcl() < 0; bool negIsFromAfterburner = negTrackKShort.itsChi2PerNcl() < 0; + histos.fill(HIST("KShortSel/hSelectionStatistics"), 12.); if (posTrackKShort.itsNCls() < kshortSelections.kshortMinITSclusters && (!kshortSelections.kshortRejectPosITSafterburner || posIsFromAfterburner)) return false; if (negTrackKShort.itsNCls() < kshortSelections.kshortMinITSclusters && (!kshortSelections.kshortRejectNegITSafterburner || negIsFromAfterburner)) return false; + histos.fill(HIST("KShortSel/hSelectionStatistics"), 13.); float fKShortLifeTime = kshort.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassK0Short; if (fKShortLifeTime > kshortSelections.kshortMaxLifeTime) return false; + + histos.fill(HIST("KShortSel/hSelectionStatistics"), 14.); + // TPC PID selection on the K0S pion daughters (same convention as posTrackKShort.tpcNSigmaPi()) + if (((TMath::Abs(posTrackKShort.tpcNSigmaPi()) > kshortSelections.kshortMaxTPCNSigmas) || + (TMath::Abs(negTrackKShort.tpcNSigmaPi()) > kshortSelections.kshortMaxTPCNSigmas))) + return false; + + histos.fill(HIST("KShortSel/hSelectionStatistics"), 15.); } return true; }