From 5aa0d396fbdfd74ffcaeba3ecdb3c66b77ee9c1a Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 16 Dec 2024 23:49:36 +0000 Subject: [PATCH] Please consider the following formatting changes --- .../Strangeness/sigma0builder.cxx | 42 +++++++++---------- PWGLF/Tasks/Strangeness/sigmaanalysis.cxx | 26 ++++++------ 2 files changed, 33 insertions(+), 35 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx index 1e69dea357d..6e61daaea05 100644 --- a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx +++ b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx @@ -231,15 +231,16 @@ struct sigma0builder { histos.add("h3dMassSigmasBeforeSel", "h3dMassSigmasBeforeSel", kTH3F, {axisCentrality, axisPt, axisSigmaMass}); histos.add("h3dMassSigmasAfterSel", "h3dMassSigmasAfterSel", kTH3F, {axisCentrality, axisPt, axisSigmaMass}); } -template -void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) { + template + void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) + { // Check if both V0s are made of the same tracks - if (gamma1.posTrackExtraId() == gamma2.posTrackExtraId() || - gamma1.negTrackExtraId() == gamma2.negTrackExtraId() || - gamma1.posTrackExtraId() == gamma2.negTrackExtraId() || + if (gamma1.posTrackExtraId() == gamma2.posTrackExtraId() || + gamma1.negTrackExtraId() == gamma2.negTrackExtraId() || + gamma1.posTrackExtraId() == gamma2.negTrackExtraId() || gamma1.negTrackExtraId() == gamma2.posTrackExtraId()) { - return; + return; } // Calculate pi0 properties @@ -255,15 +256,15 @@ void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) { // Check if MC data and populate fIsMC, fIsPi0 if constexpr (requires { gamma1.pdgCode(); gamma2.pdgCode(); }) { - fIsMC = true; - if (gamma1.pdgCode() == 22 && gamma2.pdgCode() == 22 && - gamma1.pdgCodeMother() == 111 && gamma2.pdgCodeMother() == 111 && - gamma1.motherMCPartId() == gamma2.motherMCPartId()) { - fIsPi0 = true; - histos.fill(HIST("MC/h2dPtVsMassPi0BeforeSel_SignalOnly"), pi0Pt, pi0Mass); - } + fIsMC = true; + if (gamma1.pdgCode() == 22 && gamma2.pdgCode() == 22 && + gamma1.pdgCodeMother() == 111 && gamma2.pdgCodeMother() == 111 && + gamma1.motherMCPartId() == gamma2.motherMCPartId()) { + fIsPi0 = true; + histos.fill(HIST("MC/h2dPtVsMassPi0BeforeSel_SignalOnly"), pi0Pt, pi0Mass); + } } else { - histos.fill(HIST("GeneralQA/h2dPtVsMassPi0BeforeSel_Candidates"), pi0Pt, pi0Mass); + histos.fill(HIST("GeneralQA/h2dPtVsMassPi0BeforeSel_Candidates"), pi0Pt, pi0Mass); } // Photon-specific selections @@ -290,7 +291,7 @@ void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) { posTrackGamma1.tpcCrossedRows() < Pi0PhotonMinTPCCrossedRows || negTrackGamma1.tpcCrossedRows() < Pi0PhotonMinTPCCrossedRows || !passedTPCGamma1) { - return; + return; } // Gamma2 Selection @@ -311,7 +312,7 @@ void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) { posTrackGamma2.tpcCrossedRows() < Pi0PhotonMinTPCCrossedRows || negTrackGamma2.tpcCrossedRows() < Pi0PhotonMinTPCCrossedRows || !passedTPCGamma2) { - return; + return; } // Pi0-specific selections: @@ -323,8 +324,7 @@ void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) { if (fIsMC) { if (fIsPi0) histos.fill(HIST("MC/h2dPtVsMassPi0AfterSel_SignalOnly"), pi0Pt, pi0Mass); - } - else + } else histos.fill(HIST("GeneralQA/h2dPtVsMassPi0AfterSel_Candidates"), pi0Pt, pi0Mass); } @@ -464,7 +464,7 @@ void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) { histos.fill(HIST("hCandidateBuilderSelection"), 13.); return true; } - + // Fill tables with reconstructed sigma0 candidate template void fillTables(TV0Object const& lambda, TV0Object const& gamma, TCollision const& coll) @@ -646,7 +646,7 @@ void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) { } for (auto& lambda : V0Table_thisCollision) { // selecting lambdas from Sigma0 - if (doPi0QA) // Pi0 QA study + if (doPi0QA) // Pi0 QA study runPi0QA(gamma, lambda); // Sigma0 candidate properties @@ -711,7 +711,7 @@ void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) { // V0 table sliced for (auto& gamma : V0Table_thisCollision) { // selecting photons from Sigma0 for (auto& lambda : V0Table_thisCollision) { // selecting lambdas from Sigma0 - if (doPi0QA) // Pi0 QA study + if (doPi0QA) // Pi0 QA study runPi0QA(gamma, lambda); // Sigma0 candidate properties diff --git a/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx b/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx index 9ca58b1f7b1..ac7c147d6a9 100644 --- a/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx @@ -344,11 +344,11 @@ struct sigmaanalysis { return false; histos.fill(HIST("GeneralQA/hPhotonPosTPCNSigma"), cand.photonPosTPCNSigma()); histos.fill(HIST("GeneralQA/hCandidateAnalysisSelection"), 6.); - if ((cand.photonPosTPCNSigma()!=-999.f) && ((cand.photonPosTPCNSigma() < PhotonMinTPCNSigmas) || (cand.photonPosTPCNSigma() > PhotonMaxTPCNSigmas))) + if ((cand.photonPosTPCNSigma() != -999.f) && ((cand.photonPosTPCNSigma() < PhotonMinTPCNSigmas) || (cand.photonPosTPCNSigma() > PhotonMaxTPCNSigmas))) return false; histos.fill(HIST("GeneralQA/hPhotonNegTPCNSigma"), cand.photonNegTPCNSigma()); histos.fill(HIST("GeneralQA/hCandidateAnalysisSelection"), 7.); - if ((cand.photonNegTPCNSigma()!=-999.f) && ((cand.photonNegTPCNSigma() < PhotonMinTPCNSigmas) || (cand.photonNegTPCNSigma() > PhotonMaxTPCNSigmas))) + if ((cand.photonNegTPCNSigma() != -999.f) && ((cand.photonNegTPCNSigma() < PhotonMinTPCNSigmas) || (cand.photonNegTPCNSigma() > PhotonMaxTPCNSigmas))) return false; histos.fill(HIST("GeneralQA/hPhotonpT"), cand.photonPt()); histos.fill(HIST("GeneralQA/hCandidateAnalysisSelection"), 8.); @@ -428,7 +428,7 @@ struct sigmaanalysis { bool passedTPC = true; bool passedTOF = true; - if (isLambdalike){ // Lambda PID selection + if (isLambdalike) { // Lambda PID selection // TPC Selection if (fselLambdaTPCPID && (cand.lambdaPosPrTPCNSigma() != -999.f) && (TMath::Abs(cand.lambdaPosPrTPCNSigma()) > LambdaMaxTPCNSigmas)) passedTPC = false; @@ -441,25 +441,24 @@ struct sigmaanalysis { if (fselLambdaTOFPID && (cand.lambdaPiTOFNSigma() != -1e+3) && (TMath::Abs(cand.lambdaPiTOFNSigma()) > LambdaMaxTOFNSigmas)) passedTOF = false; - if constexpr (requires { cand.lambdaCandPDGCode(); }){ - if (doPIDQA && passedTPC){ + if constexpr (requires { cand.lambdaCandPDGCode(); }) { + if (doPIDQA && passedTPC) { histos.fill(HIST("MC/hPtLambdaCandidates_passedTPCPID"), cand.lambdaPt()); if (cand.lambdaCandPDGCode() == 3122) - histos.fill(HIST("MC/hPtTrueLambda_passedTPCPID"), cand.lambdaPt()); + histos.fill(HIST("MC/hPtTrueLambda_passedTPCPID"), cand.lambdaPt()); } - if (doPIDQA && passedTOF){ + if (doPIDQA && passedTOF) { histos.fill(HIST("MC/hPtLambdaCandidates_passedTOFPID"), cand.lambdaPt()); if (cand.lambdaCandPDGCode() == 3122) histos.fill(HIST("MC/hPtTrueLambda_passedTOFPID"), cand.lambdaPt()); } - if (doPIDQA && passedTPC && passedTOF){ + if (doPIDQA && passedTPC && passedTOF) { histos.fill(HIST("MC/hPtLambdaCandidates_passedTPCTOFPID"), cand.lambdaPt()); if (cand.lambdaCandPDGCode() == 3122) histos.fill(HIST("MC/hPtTrueLambda_passedTPCTOFPID"), cand.lambdaPt()); } } - } - else{ // AntiLambda PID selection + } else { // AntiLambda PID selection // TPC Selection if (fselLambdaTPCPID && (cand.lambdaPosPiTPCNSigma() != -999.f) && (TMath::Abs(cand.lambdaPosPiTPCNSigma()) > LambdaMaxTPCNSigmas)) passedTPC = false; @@ -558,7 +557,7 @@ struct sigmaanalysis { histos.fill(HIST("MC/hMassSigma0"), sigma.sigmaMass()); histos.fill(HIST("MC/hPtSigma0"), sigma.sigmapT()); histos.fill(HIST("MC/h3dMassSigma0"), sigma.sigmaCentrality(), sigma.sigmapT(), sigma.sigmaMass()); - + } else { // TPC + TOF PID Selections if (!doLambdaPIDSel(sigma, false, false)) @@ -606,9 +605,8 @@ struct sigmaanalysis { 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"), sigma.sigmaCentrality(), sigma.sigmapT(), sigma.sigmaMass()); - } - else { + histos.fill(HIST("Sigma0/h3dMassSigma0"), sigma.sigmaCentrality(), sigma.sigmapT(), sigma.sigmaMass()); + } else { // PID selections histos.fill(HIST("GeneralQA/h2dTPCvsTOFNSigma_ALambdaPr"), sigma.lambdaNegPrTPCNSigma(), sigma.aLambdaPrTOFNSigma()); histos.fill(HIST("GeneralQA/h2dTPCvsTOFNSigma_ALambdaPi"), sigma.lambdaPosPiTPCNSigma(), sigma.aLambdaPiTOFNSigma());