diff --git a/PWGLF/DataModel/LFSigmaTables.h b/PWGLF/DataModel/LFSigmaTables.h index 242893dc183..683e752ba33 100644 --- a/PWGLF/DataModel/LFSigmaTables.h +++ b/PWGLF/DataModel/LFSigmaTables.h @@ -204,8 +204,8 @@ DECLARE_SOA_COLUMN(IsAntiSigma, isAntiSigma, bool); } // namespace sigmaMCCore DECLARE_SOA_TABLE(SigmaMCCores, "AOD", "SIGMA0MCCORES", - sigmaMCCore::IsSigma, + sigmaMCCore::IsSigma, sigmaMCCore::IsAntiSigma); } // namespace o2::aod -#endif // PWGLF_DATAMODEL_LFSIGMATABLES_H_ \ No newline at end of file +#endif // PWGLF_DATAMODEL_LFSIGMATABLES_H_ diff --git a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx index 304b8b45647..1178b2b9f7f 100644 --- a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx +++ b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx @@ -64,9 +64,9 @@ using V0StandardDerivedDatas = soa::Join sigma0Coll; // characterises collisions - Produces sigma0CollRefs; // characterises collisions - Produces sigma0cores; // save sigma0 candidates for analysis + Produces sigma0Coll; // characterises collisions + Produces sigma0CollRefs; // characterises collisions + Produces sigma0cores; // save sigma0 candidates for analysis Produces sigmaPhotonExtras; // save sigma0 candidates for analysis Produces sigmaLambdaExtras; // save sigma0 candidates for analysis Produces sigma0mccores; @@ -114,7 +114,6 @@ struct sigma0builder { ConfigurableAxis axisSigmaMass{"axisSigmaMass", {200, 1.16f, 1.23f}, "M_{#Sigma^{0}} (GeV/c^{2})"}; ConfigurableAxis axisDeltaPt{"axisDeltaPt", {100, -1.0, +1.0}, "#Delta(p_{T})"}; - int nSigmaCandidates = 0; void init(InitContext const&) { @@ -152,7 +151,7 @@ struct sigma0builder { histos.add("Efficiency/h2dLambdaPtResolution", "h2dLambdaPtResolution", kTH2D, {axisPt, axisDeltaPt}); histos.add("Efficiency/h2dGammaPtResolution", "h2dGammaPtResolution", kTH2D, {axisPt, axisDeltaPt}); - + histos.add("h3dMassSigmasAll", "h3dMassSigmasAll", kTH3F, {axisCentrality, axisPt, axisSigmaMass}); histos.add("h3dMassSigmasAfterSel", "h3dMassSigmasAfterSel", kTH3F, {axisCentrality, axisPt, axisSigmaMass}); } @@ -225,7 +224,7 @@ struct sigma0builder { return false; if (TMath::Abs(sigmarap) > SigmaMaxRap) - return false; + return false; histos.fill(HIST("hCandidateBuilderSelection"), 10.); @@ -344,21 +343,21 @@ struct sigma0builder { sigma0cores(fSigmapT, fSigmaMass, fSigmaRap); sigmaPhotonExtras(fPhotonPt, fPhotonMass, fPhotonQt, fPhotonAlpha, fPhotonRadius, - fPhotonCosPA, fPhotonDCADau, fPhotonDCANegPV, fPhotonDCAPosPV, fPhotonZconv, - fPhotonEta, fPhotonY, fPhotonPosTPCNSigma, fPhotonNegTPCNSigma, fPhotonPosTPCCrossedRows, - fPhotonNegTPCCrossedRows, fPhotonPosPt, fPhotonNegPt, fPhotonPosEta, - fPhotonNegEta, fPhotonPosY, fPhotonNegY, fPhotonPsiPair, - fPhotonPosITSCls, fPhotonNegITSCls, fPhotonPosITSClSize, fPhotonNegITSClSize, - fPhotonV0Type, GammaBDTScore); + fPhotonCosPA, fPhotonDCADau, fPhotonDCANegPV, fPhotonDCAPosPV, fPhotonZconv, + fPhotonEta, fPhotonY, fPhotonPosTPCNSigma, fPhotonNegTPCNSigma, fPhotonPosTPCCrossedRows, + fPhotonNegTPCCrossedRows, fPhotonPosPt, fPhotonNegPt, fPhotonPosEta, + fPhotonNegEta, fPhotonPosY, fPhotonNegY, fPhotonPsiPair, + fPhotonPosITSCls, fPhotonNegITSCls, fPhotonPosITSClSize, fPhotonNegITSClSize, + fPhotonV0Type, GammaBDTScore); sigmaLambdaExtras(fLambdaPt, fLambdaMass, fAntiLambdaMass, fLambdaQt, fLambdaAlpha, - fLambdaRadius, fLambdaCosPA, fLambdaDCADau, fLambdaDCANegPV, - fLambdaDCAPosPV, fLambdaEta, fLambdaY, fLambdaPosPrTPCNSigma, - fLambdaPosPiTPCNSigma, fLambdaNegPrTPCNSigma, fLambdaNegPiTPCNSigma, fLambdaPosTPCCrossedRows, - fLambdaNegTPCCrossedRows, fLambdaPosPt, fLambdaNegPt, fLambdaPosEta, - fLambdaNegEta, fLambdaPosPrY, fLambdaPosPiY, fLambdaNegPrY, fLambdaNegPiY, - fLambdaPosITSCls, fLambdaNegITSCls, fLambdaPosITSClSize, fLambdaNegITSClSize, - fLambdaV0Type, LambdaBDTScore, AntiLambdaBDTScore); + fLambdaRadius, fLambdaCosPA, fLambdaDCADau, fLambdaDCANegPV, + fLambdaDCAPosPV, fLambdaEta, fLambdaY, fLambdaPosPrTPCNSigma, + fLambdaPosPiTPCNSigma, fLambdaNegPrTPCNSigma, fLambdaNegPiTPCNSigma, fLambdaPosTPCCrossedRows, + fLambdaNegTPCCrossedRows, fLambdaPosPt, fLambdaNegPt, fLambdaPosEta, + fLambdaNegEta, fLambdaPosPrY, fLambdaPosPiY, fLambdaNegPrY, fLambdaNegPiY, + fLambdaPosITSCls, fLambdaNegITSCls, fLambdaPosITSClSize, fLambdaNegITSClSize, + fLambdaV0Type, LambdaBDTScore, AntiLambdaBDTScore); } void processMonteCarlo(soa::Join const& collisions, V0DerivedMCDatas const& V0s) @@ -372,42 +371,42 @@ struct sigma0builder { for (auto& gamma : V0Table_thisCollision) { // selecting photons from Sigma0 float centrality = coll.centFT0C(); - + // Auxiliary histograms: - if (gamma.pdgCode() == 22){ + if (gamma.pdgCode() == 22) { float GammaY = TMath::Abs(RecoDecay::y(std::array{gamma.px(), gamma.py(), gamma.pz()}, o2::constants::physics::MassGamma)); - if (GammaY < 0.5){ // rapidity selection - histos.fill(HIST("Efficiency/h2dPtVsCentrality_GammaAll"), centrality, gamma.pt()); // isgamma + if (GammaY < 0.5) { // rapidity selection + histos.fill(HIST("Efficiency/h2dPtVsCentrality_GammaAll"), centrality, gamma.pt()); // isgamma histos.fill(HIST("Efficiency/h2dGammaPtResolution"), gamma.pt(), gamma.pt() - RecoDecay::pt(array{gamma.pxMC(), gamma.pyMC()})); // pT resolution - if (gamma.pdgCodeMother() == 3212){ + if (gamma.pdgCodeMother() == 3212) { histos.fill(HIST("Efficiency/h2dPtVsCentrality_GammaSigma0"), centrality, gamma.pt()); // isgamma from sigma } - if (gamma.pdgCodeMother() == -3212){ + if (gamma.pdgCodeMother() == -3212) { histos.fill(HIST("Efficiency/h2dPtVsCentrality_GammaAntiSigma0"), centrality, gamma.pt()); // isgamma from sigma } } - } - if (gamma.pdgCode() == 3122){ // Is Lambda + } + if (gamma.pdgCode() == 3122) { // Is Lambda float LambdaY = TMath::Abs(RecoDecay::y(std::array{gamma.px(), gamma.py(), gamma.pz()}, o2::constants::physics::MassLambda)); - if (LambdaY < 0.5){ // rapidity selection - histos.fill(HIST("Efficiency/h2dPtVsCentrality_LambdaAll"), centrality, gamma.pt()); + if (LambdaY < 0.5) { // rapidity selection + histos.fill(HIST("Efficiency/h2dPtVsCentrality_LambdaAll"), centrality, gamma.pt()); histos.fill(HIST("Efficiency/h2dLambdaPtResolution"), gamma.pt(), gamma.pt() - RecoDecay::pt(array{gamma.pxMC(), gamma.pyMC()})); // pT resolution - if (gamma.pdgCodeMother() == 3212){ - histos.fill(HIST("Efficiency/h2dPtVsCentrality_LambdaSigma0"), centrality, gamma.pt()); + if (gamma.pdgCodeMother() == 3212) { + histos.fill(HIST("Efficiency/h2dPtVsCentrality_LambdaSigma0"), centrality, gamma.pt()); } } } - if (gamma.pdgCode() == -3122){ // Is AntiLambda + if (gamma.pdgCode() == -3122) { // Is AntiLambda float AntiLambdaY = TMath::Abs(RecoDecay::y(std::array{gamma.px(), gamma.py(), gamma.pz()}, o2::constants::physics::MassLambda)); - if (AntiLambdaY < 0.5){ // rapidity selection - histos.fill(HIST("Efficiency/h2dPtVsCentrality_AntiLambdaAll"), centrality, gamma.pt()); - if (gamma.pdgCodeMother() == -3212){ + if (AntiLambdaY < 0.5) { // rapidity selection + histos.fill(HIST("Efficiency/h2dPtVsCentrality_AntiLambdaAll"), centrality, gamma.pt()); + if (gamma.pdgCodeMother() == -3212) { histos.fill(HIST("Efficiency/h2dPtVsCentrality_LambdaAntiSigma0"), centrality, gamma.pt()); // isantilambda from antisigma } } - } + } for (auto& lambda : V0Table_thisCollision) { // selecting lambdas from Sigma0 @@ -418,29 +417,28 @@ struct sigma0builder { float SigmaMass = RecoDecay::m(arrMom, std::array{o2::constants::physics::MassPhoton, o2::constants::physics::MassLambda0}); float SigmapT = RecoDecay::pt(array{gamma.px() + lambda.px(), gamma.py() + lambda.py()}); float SigmaY = TMath::Abs(RecoDecay::y(std::array{gamma.px() + lambda.px(), gamma.py() + lambda.py(), gamma.pz() + lambda.pz()}, o2::constants::physics::MassSigma0)); - + histos.fill(HIST("h3dMassSigmasAll"), centrality, SigmapT, SigmaMass); - if ((gamma.pdgCode() == 22) && (gamma.pdgCodeMother() == 3212) && (lambda.pdgCode() == 3122) && (lambda.pdgCodeMother() == 3212) && (gamma.motherMCPartId() == lambda.motherMCPartId()) && (SigmaY<0.5)){ + if ((gamma.pdgCode() == 22) && (gamma.pdgCodeMother() == 3212) && (lambda.pdgCode() == 3122) && (lambda.pdgCodeMother() == 3212) && (gamma.motherMCPartId() == lambda.motherMCPartId()) && (SigmaY < 0.5)) { histos.fill(HIST("Efficiency/h2dPtVsCentrality_Sigma0All"), centrality, RecoDecay::pt(array{gamma.px() + lambda.px(), gamma.py() + lambda.py()})); histos.fill(HIST("Efficiency/h2dSigmaPtVsLambdaPt"), SigmapT, lambda.pt()); histos.fill(HIST("Efficiency/h2dSigmaPtVsGammaPt"), SigmapT, gamma.pt()); - } - if ((gamma.pdgCode() == 22) && (gamma.pdgCodeMother() == -3212) && (lambda.pdgCode() == -3122) && (lambda.pdgCodeMother() == -3212) && (gamma.motherMCPartId() == lambda.motherMCPartId()) && (SigmaY<0.5)) + if ((gamma.pdgCode() == 22) && (gamma.pdgCodeMother() == -3212) && (lambda.pdgCode() == -3122) && (lambda.pdgCodeMother() == -3212) && (gamma.motherMCPartId() == lambda.motherMCPartId()) && (SigmaY < 0.5)) histos.fill(HIST("Efficiency/h2dPtVsCentrality_AntiSigma0All"), centrality, SigmapT); - + if (!processSigmaCandidate(lambda, gamma)) // basic selection continue; bool fIsSigma = false; bool fIsAntiSigma = false; histos.fill(HIST("h3dMassSigmasAfterSel"), centrality, SigmapT, SigmaMass); - if ((gamma.pdgCode() == 22) && (gamma.pdgCodeMother() == 3212) && (lambda.pdgCode() == 3122) && (lambda.pdgCodeMother() == 3212) && (gamma.motherMCPartId() == lambda.motherMCPartId())){ + if ((gamma.pdgCode() == 22) && (gamma.pdgCodeMother() == 3212) && (lambda.pdgCode() == 3122) && (lambda.pdgCodeMother() == 3212) && (gamma.motherMCPartId() == lambda.motherMCPartId())) { fIsSigma = true; histos.fill(HIST("Efficiency/h2dPtVsCentrality_Sigma0AfterSel"), centrality, RecoDecay::pt(array{gamma.px() + lambda.px(), gamma.py() + lambda.py()})); } - if ((gamma.pdgCode() == 22) && (gamma.pdgCodeMother() == -3212) && (lambda.pdgCode() == -3122) && (lambda.pdgCodeMother() == -3212) && (gamma.motherMCPartId() == lambda.motherMCPartId())){ + if ((gamma.pdgCode() == 22) && (gamma.pdgCodeMother() == -3212) && (lambda.pdgCode() == -3122) && (lambda.pdgCodeMother() == -3212) && (gamma.motherMCPartId() == lambda.motherMCPartId())) { fIsAntiSigma = true; histos.fill(HIST("Efficiency/h2dPtVsCentrality_AntiSigma0AfterSel"), centrality, RecoDecay::pt(array{gamma.px() + lambda.px(), gamma.py() + lambda.py()})); } @@ -513,4 +511,5 @@ struct sigma0builder { WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask(cfgc)}; -} \ No newline at end of file +} + \ No newline at end of file diff --git a/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx b/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx index 7abe426f58f..cca518b254c 100644 --- a/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx @@ -91,7 +91,7 @@ struct sigmaanalysis { Configurable LambdaMaxRap{"LambdaMaxRap", 0.5, "Max lambda rapidity"}; //// Photon standard criteria: - //Configurable PhotonMaxDauPseudoRap{"PhotonMaxDauPseudoRap", 0.9, "Max pseudorapidity of daughter tracks"}; + // Configurable PhotonMaxDauPseudoRap{"PhotonMaxDauPseudoRap", 0.9, "Max pseudorapidity of daughter tracks"}; Configurable PhotonDauMinPt{"PhotonDauMinPt", 0.05, "Min daughter pT (GeV/c)"}; Configurable PhotonMinDCADauToPv{"PhotonMinDCADauToPv", 0.05, "Min DCA daughter To PV (cm)"}; Configurable PhotonMaxDCAV0Dau{"PhotonMaxDCAV0Dau", 2.5, "Max DCA V0 Daughters (cm)"}; @@ -111,7 +111,7 @@ struct sigmaanalysis { // TODO: Include PsiPair selection Configurable SigmaMaxRap{"SigmaMaxRap", 0.5, "Max sigma0 rapidity"}; - + // Axis // base properties 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}, "Centrality"}; @@ -177,14 +177,14 @@ struct sigmaanalysis { histos.get(HIST("GeneralQA/hCandidateAnalysisSelection"))->GetXaxis()->SetBinLabel(22, "Lambda Y Cut"); // For Signal Extraction - - // Sigma0 + + // Sigma0 histos.add("Sigma0/h3dMassSigma0", "h3dMassSigma0", kTH3F, {axisCentrality, axisPt, axisSigmaMass}); histos.add("Sigma0/hMassSigma0", "hMassSigma0", kTH1F, {axisSigmaMass}); histos.add("Sigma0/hPtSigma0", "hPtSigma0", kTH1F, {axisPt}); histos.add("Sigma0/hRapiditySigma0", "hRapiditySigma0", kTH1F, {axisRapidity}); - // AntiSigma0 + // AntiSigma0 histos.add("AntiSigma0/h3dMassAntiSigma0", "h3dMassAntiSigma0", kTH3F, {axisCentrality, axisPt, axisSigmaMass}); histos.add("AntiSigma0/hMassAntiSigma0", "hMassAntiSigma0", kTH1F, {axisSigmaMass}); histos.add("AntiSigma0/hPtAntiSigma0", "hPtAntiSigma0", kTH1F, {axisPt}); @@ -276,7 +276,7 @@ struct sigmaanalysis { // Lambda selection if ((TMath::Abs(cand.lambdaMass() - 1.115683) > LambdaWindow) && (TMath::Abs(cand.antilambdaMass() - 1.115683) > LambdaWindow)) - return false; + return false; histos.fill(HIST("GeneralQA/hCandidateAnalysisSelection"), 14.); if ((TMath::Abs(cand.lambdaDCAPosPV()) < LambdaMinDCAPosToPv) || (TMath::Abs(cand.lambdaDCANegPV()) < LambdaMinDCANegToPv)) return false; @@ -334,16 +334,15 @@ struct sigmaanalysis { histos.fill(HIST("MC/h2dArmenterosSelected"), sigma.photonAlpha(), sigma.photonQt()); histos.fill(HIST("MC/h2dArmenterosSelected"), sigma.lambdaAlpha(), sigma.lambdaQt()); - if (sigma.isSigma()){ + if (sigma.isSigma()) { histos.fill(HIST("MC/hMassSigma0"), sigma.sigmaMass()); histos.fill(HIST("MC/hPtSigma0"), sigma.sigmapT()); histos.fill(HIST("MC/h3dMassSigma0"), coll.centFT0C(), sigma.sigmapT(), sigma.sigmaMass()); - } - else{ + } else { histos.fill(HIST("MC/hMassAntiSigma0"), sigma.sigmaMass()); histos.fill(HIST("MC/hPtAntiSigma0"), sigma.sigmapT()); histos.fill(HIST("MC/h3dMassAntiSigma0"), coll.centFT0C(), sigma.sigmapT(), sigma.sigmaMass()); - } + } } } } @@ -366,13 +365,12 @@ struct sigmaanalysis { histos.fill(HIST("GeneralQA/h2dArmenterosSelected"), sigma.photonAlpha(), sigma.photonQt()); histos.fill(HIST("GeneralQA/h2dArmenterosSelected"), sigma.lambdaAlpha(), sigma.lambdaQt()); - if (sigma.lambdaAlpha()>0){ + if (sigma.lambdaAlpha() > 0) { histos.fill(HIST("Sigma0/hMassSigma0"), sigma.sigmaMass()); histos.fill(HIST("Sigma0/hPtSigma0"), sigma.sigmapT()); histos.fill(HIST("Sigma0/hRapiditySigma0"), sigma.sigmaRapidity()); histos.fill(HIST("Sigma0/h3dMassSigma0"), coll.centFT0C(), sigma.sigmapT(), sigma.sigmaMass()); - } - else{ + } else { histos.fill(HIST("AntiSigma0/hMassAntiSigma0"), sigma.sigmaMass()); histos.fill(HIST("AntiSigma0/hPtAntiSigma0"), sigma.sigmapT()); histos.fill(HIST("AntiSigma0/hRapidityAntiSigma0"), sigma.sigmaRapidity()); @@ -389,4 +387,5 @@ struct sigmaanalysis { WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask(cfgc)}; -} \ No newline at end of file +} + \ No newline at end of file