From ddaa1c844857ecb2344d7a275a9121eb7a8cc658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20J=C3=B6rgensen?= Date: Tue, 26 Nov 2024 14:34:06 +0100 Subject: [PATCH 01/10] update CF PID cuts --- .../Nuspex/AngularCorrelationsInJets.cxx | 102 +++++------------- 1 file changed, 28 insertions(+), 74 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx index 6d751cde7c1..d3ccf9e3bf3 100644 --- a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx +++ b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx @@ -75,10 +75,8 @@ struct AngularCorrelationsInJets { Configurable fProtonTPCTOFpT{"protonTPCTOFswitchpT", 0.7, "[proton] pT for switch in TPC/TOF nsigma"}; Configurable fProtonTPCnsigLowYield{"protonTPCnsigmaLowPtYield", 4.0, "[proton] max TPC nsigma with low pT for yield"}; Configurable fProtonTPCnsigHighYield{"protonTPCnsigmaHighPtYield", 4.0, "[proton] max TPC nsigma with high pT for yield"}; - Configurable fProtonTPCnsigLowCF{"protonTPCnsigmaLowPtCF", 2.0, "[proton] max TPC nsigma with low pT for CF"}; - Configurable fProtonTPCnsigHighCF{"protonTPCnsigmaHighPtCF", 3.0, "[proton] max TPC nsigma with high pT for CF"}; Configurable fProtonTOFnsigYield{"protonTOFnsigmaHighPtYield", 4.0, "[proton] max TOF nsigma with high pT yield"}; - Configurable fProtonTOFnsigCF{"protonTOFnsigmaHighPtCF", 4.0, "[proton] max TOF nsigma for CF"}; + Configurable fProtonNsigma{"protonNsigma", 2.0, "[proton] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; // Antiproton Cuts Configurable fAntiprotonDCAxyYield{"antiprotonDCAxyYield", 0.05, "[antiproton] DCAxy cut for yield"}; @@ -88,10 +86,8 @@ struct AngularCorrelationsInJets { Configurable fAntiprotonTPCTOFpT{"antiprotonTPCTOFswitchpT", 0.7, "[antiproton] pT for switch in TPC/TOF nsigma"}; Configurable fAntiprotonTPCnsigLowYield{"antiprotonTPCnsigmaLowPtYield", 4.0, "[antiproton] max TPC nsigma with low pT for yield"}; Configurable fAntiprotonTPCnsigHighYield{"antiprotonTPCnsigmaHighPtYield", 4.0, "[antiproton] max TPC nsigma with high pT for yield"}; - Configurable fAntiprotonTPCnsigLowCF{"antiprotonTPCnsigmaLowPtCF", 2.0, "[antiproton] max TPC nsigma with low pT for CF"}; - Configurable fAntiprotonTPCnsigHighCF{"antiprotonTPCnsigmaHighPtCF", 3.0, "[antiproton] max TPC nsigma with high pT for CF"}; Configurable fAntiprotonTOFnsigYield{"antiprotonTOFnsigmaHighPtYield", 4.0, "[antiproton] min TOF nsigma with high pT for yield"}; - Configurable fAntiprotonTOFnsigCF{"antiprotonTOFnsigmaHighPtCF", 4.0, "[antiproton] max TOF nsigma for CF"}; + Configurable fAntiprotonNsigma{"antiprotonNsigma", 2.0, "[antiproton] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; // Nuclei Cuts Configurable fNucleiDCAxyYield{"nucleiDCAxyYield", 0.05, "[nuclei] DCAxy cut for yield"}; @@ -101,10 +97,8 @@ struct AngularCorrelationsInJets { Configurable fNucleiTPCTOFpT{"nucleiTPCTOFswitchpT", 0.7, "[nuclei] pT for switch in TPC/TOF nsigma"}; Configurable fNucleiTPCnsigLowYield{"nucleiTPCnsigmaLowPtYield", 4.0, "[nuclei] max TPC nsigma with low pT for yield"}; Configurable fNucleiTPCnsigHighYield{"nucleiTPCnsigmaHighPtYield", 4.0, "[nuclei] max TPC nsigma with high pT for yield"}; - Configurable fNucleiTPCnsigLowCF{"nucleiTPCnsigmaLowPtCF", 2.0, "[nuclei] max TPC nsigma with low pT for CF"}; - Configurable fNucleiTPCnsigHighCF{"nucleiTPCnsigmaHighPtCF", 3.0, "[nuclei] max TPC nsigma with high pT for CF"}; Configurable fNucleiTOFnsigYield{"nucleiTOFnsigmaHighPtYield", 4.0, "[nuclei] min TOF nsigma with high pT for yield"}; - Configurable fNucleiTOFnsigCF{"nucleiTOFnsigmaHighPtCF", 4.0, "[nuclei] max TOF nsigma for CF"}; + Configurable fNucleiNsigma{"nucleiNsigma", 2.0, "[nuclei] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; // Antinuclei Cuts Configurable fAntinucleiDCAxyYield{"antinucleiDCAxyYield", 0.05, "[antinuclei] DCAxy cut for yield"}; @@ -114,10 +108,9 @@ struct AngularCorrelationsInJets { Configurable fAntinucleiTPCTOFpT{"antinucleiTPCTOFswitchpT", 0.7, "[antinuclei] pT for switch in TPC/TOF nsigma"}; Configurable fAntinucleiTPCnsigLowYield{"antinucleiTPCnsigmaLowPtYield", 4.0, "[antinuclei] max TPC nsigma with low pT for yield"}; Configurable fAntinucleiTPCnsigHighYield{"antinucleiTPCnsigmaHighPtYield", 4.0, "[antinuclei] max TPC nsigma with high pT for yield"}; - Configurable fAntinucleiTPCnsigLowCF{"antinucleiTPCnsigmaLowPtCF", 2.0, "[antinuclei] max TPC nsigma with low pT for CF"}; - Configurable fAntinucleiTPCnsigHighCF{"antinucleiTPCnsigmaHighPtCF", 3.0, "[antinuclei] max TPC nsigma with high pT for CF"}; Configurable fAntinucleiTOFnsigYield{"antinucleiTOFnsigmaHighPtYield", 4.0, "[antinuclei] min TOF nsigma with high pT for yield"}; - Configurable fAntinucleiTOFnsigCF{"antinucleiTOFnsigmaHighPtCF", 4.0, "[antinuclei] max TOF nsigma for CF"}; + Configurable fAntinucleiNsigma{"antinucleiNsigma", 2.0, "[nuclei] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; + Configurable fDeuteronAnalysis{"deuteronAnalysis", true, "true [false]: analyse (anti)deuterons [(anti)helium-3]"}; Configurable fUseTOFMass{"useTOFmass", true, "use TOF mass instead of pion mass if available"}; @@ -347,19 +340,12 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaProtonCF"), track.pt(), track.tpcNSigmaPr()); - - // TPC - if (track.pt() < fProtonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > fProtonTPCnsigLowCF) - return false; - if (track.pt() > fProtonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > fProtonTPCnsigHighCF) - return false; - registryData.fill(HIST("hTOFnsigmaProtonCF"), track.pt(), track.tofNSigmaPr()); - // TOF - if (track.hasTOF()) { - if (track.pt() > fProtonTPCTOFpT && TMath::Abs(track.tofNSigmaPr()) > fProtonTOFnsigCF) - return false; + // nsigma + double tofNsigma = (track.hasTOF() || track.pt() < fProtonTPCTOFpT) ? track.tofNSigmaPr() : 0; + if (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > fProtonNsigma) + return false; } } else { // for yields // DCA @@ -402,19 +388,12 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaAntiprotonCF"), track.pt(), track.tpcNSigmaPr()); - - // TPC - if (track.pt() < fAntiprotonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > fAntiprotonTPCnsigLowCF) - return false; - if (track.pt() > fAntiprotonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > fAntiprotonTPCnsigHighCF) - return false; - registryData.fill(HIST("hTOFnsigmaAntiprotonCF"), track.pt(), track.tofNSigmaPr()); - // TOF - if (track.hasTOF()) { - if (track.pt() > fAntiprotonTPCTOFpT && TMath::Abs(track.tofNSigmaPr()) > fAntiprotonTOFnsigCF) - return false; + // nsigma + double tofNsigma = (track.hasTOF() || track.pt() < fAntiprotonTPCTOFpT) ? track.tofNSigmaPr() : 0; + if (TMath::Sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + tofNsigma * tofNsigma) > fAntiprotonNsigma) + return false; } } else { // for yields // DCA @@ -457,19 +436,12 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaNucleiCF"), track.pt(), track.tpcNSigmaDe()); - - // TPC - if (track.pt() < fNucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > fNucleiTPCnsigLowCF) - return false; - if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > fNucleiTPCnsigHighCF) - return false; - registryData.fill(HIST("hTOFnsigmaNucleiCF"), track.pt(), track.tofNSigmaDe()); - // TOF - if (track.hasTOF()) { - if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tofNSigmaDe()) > fNucleiTOFnsigCF) - return false; + // nsigma + double tofNsigma = (track.hasTOF() || track.pt() < fNucleiTPCTOFpT) ? track.tofNSigmaDe() : 0; + if (TMath::Sqrt(track.tpcNSigmaDe() * track.tpcNSigmaDe() + tofNsigma * tofNsigma) > fNucleiNsigma) + return false; } } else { // for yields // DCA @@ -503,19 +475,12 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaNucleiCF"), track.pt(), track.tpcNSigmaHe()); - - // TPC - if (track.pt() < fNucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > fNucleiTPCnsigLowCF) - return false; - if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > fNucleiTPCnsigHighCF) - return false; - registryData.fill(HIST("hTOFnsigmaNucleiCF"), track.pt(), track.tofNSigmaHe()); - // TOF - if (track.hasTOF()) { - if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tofNSigmaHe()) > fNucleiTOFnsigCF) - return false; + // nsigma + double tofNsigma = (track.hasTOF() || track.pt() < fNucleiTPCTOFpT) ? track.tofNSigmaHe() : 0; + if (TMath::Sqrt(track.tpcNSigmaHe() * track.tpcNSigmaHe() + tofNsigma*tofNsigma) > fNucleiNsigma) + return false; } } else { // for yields // DCA @@ -560,17 +525,11 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaAntinucleiCF"), track.pt(), track.tpcNSigmaDe()); - - // TPC - if (track.pt() < fAntinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > fAntinucleiTPCnsigLowCF) - return false; - if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > fAntinucleiTPCnsigHighCF) - return false; - registryData.fill(HIST("hTOFnsigmaAntinucleiCF"), track.pt(), track.tofNSigmaDe()); - // TOF - if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tofNSigmaDe()) > fAntinucleiTOFnsigCF) + // nsigma + double tofNsigma = (track.hasTOF() || track.pt() < fAntinucleiTPCTOFpT) ? track.tofNSigmaDe() : 0; + if (TMath::Sqrt(track.tpcNSigmaDe()*track.tpcNSigmaDe() + tofNsigma*tofNsigma) > fAntinucleiNsigma) return false; } else { // for yields // DCA @@ -602,18 +561,13 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaAntinucleiCF"), track.pt(), track.tpcNSigmaHe()); - - // TPC - if (track.pt() < fAntinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > fAntinucleiTPCnsigLowCF) - return false; - if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > fAntinucleiTPCnsigHighCF) - return false; - registryData.fill(HIST("hTOFnsigmaAntinucleiCF"), track.pt(), track.tofNSigmaHe()); - // TOF - if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tofNSigmaHe()) > fAntinucleiTOFnsigCF) + // nsigma + double tofNsigma = (track.hasTOF() || track.pt() < fAntinucleiTPCTOFpT) ? track.tofNSigmaHe() : 0; // is 0 fine or should I choose something bigger to make up for probably decreased accuracy + if (TMath::Sqrt(track.tpcNSigmaHe()*track.tpcNSigmaHe() + tofNsigma*tofNsigma) > fAntinucleiNsigma) // is this fine or do I need to take different pT ranges into account like for the yield? return false; + } else { // for yields // DCA if (TMath::Abs(track.dcaXY()) > fAntinucleiDCAxyYield) From 28db8733f1b15362b87448716204f3eb1e03c2e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20J=C3=B6rgensen?= Date: Tue, 3 Dec 2024 17:00:50 +0100 Subject: [PATCH 02/10] improved PID for CF --- .../Nuspex/AngularCorrelationsInJets.cxx | 67 +++++++++++++------ 1 file changed, 45 insertions(+), 22 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx index d3ccf9e3bf3..c333a8b56ff 100644 --- a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx +++ b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx @@ -124,9 +124,9 @@ struct AngularCorrelationsInJets { int mRunNumber; using FullTracksRun2 = soa::Join; + aod::TrackSelectionExtension, aod::TracksDCA, aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullHe, aod::pidTOFmass, aod::pidTOFbeta, aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCTr, aod::pidTPCAl/* , aod::pidTOFEl, aod::pidTOFMu, aod::pidTOFPi, aod::pidTOFKa, aod::pidTOFTr, aod::pidTOFAl */>; using FullTracksRun3 = soa::Join; + aod::TracksDCA, aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullHe, aod::pidTOFmass, aod::pidTOFbeta, aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCTr, aod::pidTPCAl/* , aod::pidTOFEl, aod::pidTOFMu, aod::pidTOFPi, aod::pidTOFKa, aod::pidTOFTr, aod::pidTOFAl */>; using BCsWithRun2Info = soa::Join; Filter prelimTrackCuts = (aod::track::itsChi2NCl < fMaxChi2ITS && @@ -308,7 +308,7 @@ struct AngularCorrelationsInJets { } template - bool selectTrack(T const& track) + bool selectTrack(T const& track) // preliminary track selections { if (track.tpcNClsCrossedRows() < fMinRatioCrossedRowsTPC * track.tpcNClsFindable() || track.tpcNClsCrossedRows() < fMinNCrossedRowsTPC || @@ -326,6 +326,21 @@ struct AngularCorrelationsInJets { return true; } + template + bool singleSpeciesTPCNSigma(T const& track, int species) + { // reject any track that has nsigma < 3 for more than 1 species + if (track.tpcNSigmaStoreEl() < 3.0 || track.tpcNSigmaStoreMu() < 3.0 || track.tpcNSigmaStorePi() < 3.0 || track.tpcNSigmaStoreKa() < 3.0 || track.tpcNSigmaStoreTr() < 3.0 || track.tpcNSigmaStoreAl() < 3.0) + return false; + switch species { + case 1: // (anti)proton + return (track.tpcNSigmaPr() < 3.0 && track.tpcNSigmaDe() > 3.0 && track.tpcNSigmaHe() > 3.0); + case 2: // (anti)deuteron + return (track.tpcNSigmaDe() < 3.0 && track.tpcNSigmaPr() > 3.0 && track.tpcNSigmaHe() > 3.0); + case 3: // (anti)helium-3 + return (track.tpcNSigmaHe() < 3.0 && track.tpcNSigmaDe() > 3.0 && track.tpcNSigmaPr() > 3.0); + } + } + template bool isProton(const T& track, bool tightCuts) { @@ -343,11 +358,13 @@ struct AngularCorrelationsInJets { registryData.fill(HIST("hTOFnsigmaProtonCF"), track.pt(), track.tofNSigmaPr()); // nsigma - double tofNsigma = (track.hasTOF() || track.pt() < fProtonTPCTOFpT) ? track.tofNSigmaPr() : 0; + double tofNsigma = track.hasTOF() ? track.tofNSigmaPr() : 999; + if ((track.pt() < fProtonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > fProtonNsigma)) || (track.pt() > fProtonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > fProtonNsigma))) if (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > fProtonNsigma) return false; - } - } else { // for yields + if (!singleSpeciesTPCNSigma(track, 1)) + return false; + } else { // for yields // DCA if (TMath::Abs(track.dcaXY()) > fProtonDCAxyYield) return false; @@ -391,10 +408,11 @@ struct AngularCorrelationsInJets { registryData.fill(HIST("hTOFnsigmaAntiprotonCF"), track.pt(), track.tofNSigmaPr()); // nsigma - double tofNsigma = (track.hasTOF() || track.pt() < fAntiprotonTPCTOFpT) ? track.tofNSigmaPr() : 0; - if (TMath::Sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + tofNsigma * tofNsigma) > fAntiprotonNsigma) + double tofNsigma = track.hasTOF() ? track.tofNSigmaPr() : 999; + if ((track.pt() < fAntiprotonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > fAntiprotonNsigma)) || (track.pt() > fAntiprotonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > fAntiprotonNsigma))) + return false; + if (!singleSpeciesTPCNSigma(track, 1)) return false; - } } else { // for yields // DCA if (TMath::Abs(track.dcaXY()) > fAntiprotonDCAxyYield) @@ -439,10 +457,11 @@ struct AngularCorrelationsInJets { registryData.fill(HIST("hTOFnsigmaNucleiCF"), track.pt(), track.tofNSigmaDe()); // nsigma - double tofNsigma = (track.hasTOF() || track.pt() < fNucleiTPCTOFpT) ? track.tofNSigmaDe() : 0; - if (TMath::Sqrt(track.tpcNSigmaDe() * track.tpcNSigmaDe() + tofNsigma * tofNsigma) > fNucleiNsigma) + double tofNsigma = track.hasTOF() ? track.tofNSigmaDe() : 999; + if ((track.pt() < fNucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > fNucleiNsigma)) || (track.pt() > fNucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe()*track.tpcNSigmaDe() + tofNsigma*tofNsigma) > fNucleiNsigma))) + return false; + if (!singleSpeciesTPCNSigma(track, 2)) return false; - } } else { // for yields // DCA if (TMath::Abs(track.dcaXY()) > fNucleiDCAxyYield) @@ -478,10 +497,11 @@ struct AngularCorrelationsInJets { registryData.fill(HIST("hTOFnsigmaNucleiCF"), track.pt(), track.tofNSigmaHe()); // nsigma - double tofNsigma = (track.hasTOF() || track.pt() < fNucleiTPCTOFpT) ? track.tofNSigmaHe() : 0; - if (TMath::Sqrt(track.tpcNSigmaHe() * track.tpcNSigmaHe() + tofNsigma*tofNsigma) > fNucleiNsigma) + double tofNsigma = track.hasTOF() ? track.tofNSigmaHe() : 999; + if ((track.pt() < fNucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > fNucleiNsigma)) || (track.pt() > fNucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe()*track.tpcNSigmaHe() + tofNsigma*tofNsigma) > fNucleiNsigma))) + return false; + if (!singleSpeciesTPCNSigma(track, 3)) return false; - } } else { // for yields // DCA if (TMath::Abs(track.dcaXY()) > fNucleiDCAxyYield) @@ -528,8 +548,10 @@ struct AngularCorrelationsInJets { registryData.fill(HIST("hTOFnsigmaAntinucleiCF"), track.pt(), track.tofNSigmaDe()); // nsigma - double tofNsigma = (track.hasTOF() || track.pt() < fAntinucleiTPCTOFpT) ? track.tofNSigmaDe() : 0; - if (TMath::Sqrt(track.tpcNSigmaDe()*track.tpcNSigmaDe() + tofNsigma*tofNsigma) > fAntinucleiNsigma) + double tofNsigma = track.hasTOF() ? track.tofNSigmaDe() : 999; + if ((track.pt() < fAntinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > fAntinucleiNsigma)) || (track.pt() > fAntinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe()*track.tpcNSigmaDe() + tofNsigma*tofNsigma) > fAntinucleiNsigma))) + return false; + if (!singleSpeciesTPCNSigma(track, 2)) return false; } else { // for yields // DCA @@ -564,10 +586,11 @@ struct AngularCorrelationsInJets { registryData.fill(HIST("hTOFnsigmaAntinucleiCF"), track.pt(), track.tofNSigmaHe()); // nsigma - double tofNsigma = (track.hasTOF() || track.pt() < fAntinucleiTPCTOFpT) ? track.tofNSigmaHe() : 0; // is 0 fine or should I choose something bigger to make up for probably decreased accuracy - if (TMath::Sqrt(track.tpcNSigmaHe()*track.tpcNSigmaHe() + tofNsigma*tofNsigma) > fAntinucleiNsigma) // is this fine or do I need to take different pT ranges into account like for the yield? + double tofNsigma = track.hasTOF() ? track.tofNSigmaHe() : 999; + if ((track.pt() < fAntinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > fAntinucleiNsigma)) || (track.pt() > fAntinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe()*track.tpcNSigmaHe() + tofNsigma*tofNsigma) > fAntinucleiNsigma))) + return false; + if (!singleSpeciesTPCNSigma(track, 3)) return false; - } else { // for yields // DCA if (TMath::Abs(track.dcaXY()) > fAntinucleiDCAxyYield) @@ -594,7 +617,7 @@ struct AngularCorrelationsInJets { return true; } - void setTrackBuffer(const auto& tempBuffer, auto& buffer) + void setTrackBuffer(const auto& tempBuffer, auto& buffer) // refresh track buffer { for (const auto& pair : tempBuffer) { if (static_cast(buffer.size()) == fBufferSize) { @@ -606,7 +629,7 @@ struct AngularCorrelationsInJets { } } - void fillMixedEventDeltas(const auto& track, const auto& buffer, int particleType, const TVector3 jetAxis) + void fillMixedEventDeltas(const auto& track, const auto& buffer, int particleType, const TVector3 jetAxis) // correlate tracks from current event with tracks from buffer, i.e. other events { if (buffer.size() == 0) return; From bf11dab71e44e9dd1add710a59083b88bd1e3d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20J=C3=B6rgensen?= Date: Mon, 9 Dec 2024 17:46:44 +0100 Subject: [PATCH 03/10] added MC process --- .../Nuspex/AngularCorrelationsInJets.cxx | 40 +++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx index c333a8b56ff..33addfcfe57 100644 --- a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx +++ b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx @@ -34,6 +34,8 @@ #include "PWGJE/Core/JetBkgSubUtils.h" #include "TVector2.h" #include "TVector3.h" +#include "TPDGCode.h" + using namespace o2; using namespace o2::framework; @@ -114,10 +116,10 @@ struct AngularCorrelationsInJets { Configurable fDeuteronAnalysis{"deuteronAnalysis", true, "true [false]: analyse (anti)deuterons [(anti)helium-3]"}; Configurable fUseTOFMass{"useTOFmass", true, "use TOF mass instead of pion mass if available"}; - Configurable fBufferSize{"trackBufferSize", 2000, "Number of mixed-event tracks being stored"}; + Configurable fBufferSize{"trackBufferSize", 200, "Number of mixed-event tracks being stored"}; // QC Configurables - Configurable fZVtx{"zVtx", 9999, "max zVertex"}; + Configurable fZVtx{"zVtx", 10.0, "max zVertex"}; Configurable fRmax{"Rmax", 0.4, "Maximum radius for jet and UE regions"}; Service ccdb; @@ -127,7 +129,10 @@ struct AngularCorrelationsInJets { aod::TrackSelectionExtension, aod::TracksDCA, aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullHe, aod::pidTOFmass, aod::pidTOFbeta, aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCTr, aod::pidTPCAl/* , aod::pidTOFEl, aod::pidTOFMu, aod::pidTOFPi, aod::pidTOFKa, aod::pidTOFTr, aod::pidTOFAl */>; using FullTracksRun3 = soa::Join; + using McTracks = soa::Join; using BCsWithRun2Info = soa::Join; + using McCollisions = soa::Join::iterator; Filter prelimTrackCuts = (aod::track::itsChi2NCl < fMaxChi2ITS && aod::track::tpcChi2NCl < fMaxChi2TPC && @@ -137,11 +142,14 @@ struct AngularCorrelationsInJets { Preslice perCollisionFullTracksRun2 = o2::aod::track::collisionId; Preslice perCollisionFullTracksRun3 = o2::aod::track::collisionId; + PreSlice perCollisionMcTracks = o2::aod::track::collisionId; AxisSpecs axisSpecs; HistogramRegistry registryData{"dataOutput", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; + HistogramRegistry registryMC("MCOutput", {}, OutputObjHandlingPolicy::AnalysisObject, false, true); HistogramRegistry registryQA{"dataQA", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; + HistogramRegistry registryMCQA("MCQA", {}, OutputObjHandlingPolicy::AnalysisObject, false, true); JetBkgSubUtils bkgSub; @@ -331,7 +339,7 @@ struct AngularCorrelationsInJets { { // reject any track that has nsigma < 3 for more than 1 species if (track.tpcNSigmaStoreEl() < 3.0 || track.tpcNSigmaStoreMu() < 3.0 || track.tpcNSigmaStorePi() < 3.0 || track.tpcNSigmaStoreKa() < 3.0 || track.tpcNSigmaStoreTr() < 3.0 || track.tpcNSigmaStoreAl() < 3.0) return false; - switch species { + switch (species) { case 1: // (anti)proton return (track.tpcNSigmaPr() < 3.0 && track.tpcNSigmaDe() > 3.0 && track.tpcNSigmaHe() > 3.0); case 2: // (anti)deuteron @@ -344,6 +352,8 @@ struct AngularCorrelationsInJets { template bool isProton(const T& track, bool tightCuts) { + if (doprocessMCRun3) + return (track.mcParticle().pdgCode() == 2212); if (track.sign() < 0) return false; @@ -394,6 +404,8 @@ struct AngularCorrelationsInJets { template bool isAntiproton(const T& track, bool tightCuts) { + if (doprocessMCRun3) + return (track.mcParticle().pdgCode() == -2212); if (track.sign() > 0) return false; @@ -443,6 +455,8 @@ struct AngularCorrelationsInJets { template bool isNucleus(const T& track, bool tightCuts) { + if (doprocessMCRun3) + return (track.mcParticle().pdgCode() == (fDeuteronAnalysis) ? 1000010020 : 1000020030); if (track.sign() < 0) return false; if (fDeuteronAnalysis) { @@ -533,6 +547,8 @@ struct AngularCorrelationsInJets { template bool isAntinucleus(const T& track, bool tightCuts) { + if (doprocessMCRun3) + return (track.mcParticle().pdgCode() == (fDeuteronAnalysis) ? -1000010020 : -1000020030); if (track.sign() > 0) return false; @@ -1223,6 +1239,24 @@ struct AngularCorrelationsInJets { } } PROCESS_SWITCH(AngularCorrelationsInJets, processRun3, "process Run 3 data", false); + + void processMCRun3(McCollisions const& collisions, soa::Filtered const& tracks) + { + for (const auto& collision : collisions) { + registryMC.fill(HIST("hEventProtocol"), 0); + if (!collision.sel8()) + continue; + registryMC.fill(HIST("hNumberOfEvents"), 0); + registryMC.fill(HIST("hEventProtocol"), 1); + if (TMath::Abs(collision.posZ()) > fZVtx) + continue; + + auto slicedTracks = tracks.sliceBy(perCollisionMcTracks, collision.globalIndex()); + + fillHistograms(slicedTracks); + } + } + PROCESS_SWITCH(AngularCorrelationsInJets, processMCRun3, "process Run 3 MC", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) From f4b107c5d6b304509aa1bd89cc1a1de343685f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20J=C3=B6rgensen?= Date: Wed, 11 Dec 2024 09:12:15 +0100 Subject: [PATCH 04/10] intermittent commit to rebase --- .../Nuspex/AngularCorrelationsInJets.cxx | 43 +++++-------------- 1 file changed, 11 insertions(+), 32 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx index 33addfcfe57..436e9e482b8 100644 --- a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx +++ b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx @@ -126,9 +126,9 @@ struct AngularCorrelationsInJets { int mRunNumber; using FullTracksRun2 = soa::Join; + aod::TrackSelectionExtension, aod::TracksDCA, aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullHe, aod::pidTOFmass, aod::pidTOFbeta, aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCTr, aod::pidTPCAl>; using FullTracksRun3 = soa::Join; + aod::TracksDCA, aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullHe, aod::pidTOFmass, aod::pidTOFbeta, aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCTr, aod::pidTPCAl>; using McTracks = soa::Join; using BCsWithRun2Info = soa::Join; @@ -197,6 +197,10 @@ struct AngularCorrelationsInJets { registryQA.add("hPtJetAntinuclei_20", "Antinuclei p_{T} for jet p_{T} < 20 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); registryQA.add("hPtJetAntinuclei_30", "Antinuclei p_{T} for jet p_{T} < 30 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); registryQA.add("hPtJetAntinuclei_50", "Antinuclei p_{T} for jet p_{T} < 50 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); + registryQA.add("hPtJetProtonVsTotalJet", "Proton p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); + registryQA.add("hPtJetAntiprotonVsTotalJet", "Antiproton p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); + registryQA.add("hPtJetNucleiVsTotalJet", "Nuclei p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); + registryQA.add("hPtJetAntinucleiVsTotalJet", "Antinuclei p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); // nSigma registryData.add("hTPCsignal", "TPC signal", HistType::kTH2F, {{1000, -100, 100, "#it{p} [GeV/#it{c}]"}, {5000, 0, 5000, "d#it{E}/d#it{X} (a.u.)"}}); @@ -335,7 +339,7 @@ struct AngularCorrelationsInJets { } template - bool singleSpeciesTPCNSigma(T const& track, int species) + bool singleSpeciesTPCNSigma(T const& track, int species) // make cut configurable { // reject any track that has nsigma < 3 for more than 1 species if (track.tpcNSigmaStoreEl() < 3.0 || track.tpcNSigmaStoreMu() < 3.0 || track.tpcNSigmaStorePi() < 3.0 || track.tpcNSigmaStoreKa() < 3.0 || track.tpcNSigmaStoreTr() < 3.0 || track.tpcNSigmaStoreAl() < 3.0) return false; @@ -971,6 +975,7 @@ struct AngularCorrelationsInJets { continue; if (isProton(jetParticle, false)) { // collect protons in jet registryData.fill(HIST("hPtJetProton"), jetParticle.pt()); + registryQA.fill(HIST("hPtJetProtonVsTotalJet"), jetParticle.pt(), subtractedJetPerp.pt()); if (subtractedJetPerp.pt() < 15) { registryQA.fill(HIST("hPtJetProton_15"), jetParticle.pt()); } else if (subtractedJetPerp.pt() < 20) { @@ -980,8 +985,6 @@ struct AngularCorrelationsInJets { } else if (subtractedJetPerp.pt() < 50) { registryQA.fill(HIST("hPtJetProton_50"), jetParticle.pt()); } - if (jetParticle.hasTOF()) - registryData.fill(HIST("hTOFnsigmaProton"), jetParticle.pt(), jetParticle.tofNSigmaPr()); registryData.fill(HIST("hTrackProtocol"), 4); // # protons if (isProton(jetParticle, true)) { registryData.fill(HIST("hTrackProtocol"), 5); // # high purity protons @@ -990,6 +993,7 @@ struct AngularCorrelationsInJets { } } else if (isAntiproton(jetParticle, false)) { // collect antiprotons in jet registryData.fill(HIST("hPtJetAntiproton"), jetParticle.pt()); + registryQA.fill(HIST("hPtJetAntiprotonVsTotalJet"), jetParticle.pt(), subtractedJetPerp.pt()); if (subtractedJetPerp.pt() < 15) { registryQA.fill(HIST("hPtJetAntiproton_15"), jetParticle.pt()); } else if (subtractedJetPerp.pt() < 20) { @@ -999,9 +1003,6 @@ struct AngularCorrelationsInJets { } else if (subtractedJetPerp.pt() < 50) { registryQA.fill(HIST("hPtJetAntiproton_50"), jetParticle.pt()); } - registryData.fill(HIST("hTPCnsigmaAntiproton"), jetParticle.pt(), jetParticle.tpcNSigmaPr()); - if (jetParticle.hasTOF()) - registryData.fill(HIST("hTOFnsigmaAntiproton"), jetParticle.pt(), jetParticle.tofNSigmaPr()); registryData.fill(HIST("hTrackProtocol"), 6); // # antiprotons if (isAntiproton(jetParticle, true)) { registryData.fill(HIST("hTrackProtocol"), 7); // # high purity antiprotons @@ -1010,6 +1011,7 @@ struct AngularCorrelationsInJets { } } else if (isNucleus(jetParticle, false)) { // collect nuclei in jet registryData.fill(HIST("hPtJetNuclei"), jetParticle.pt()); + registryQA.fill(HIST("hPtJetNucleiVsTotalJet"), jetParticle.pt(), subtractedJetPerp.pt()); if (subtractedJetPerp.pt() < 15) { registryQA.fill(HIST("hPtJetNuclei_15"), jetParticle.pt()); } else if (subtractedJetPerp.pt() < 20) { @@ -1019,18 +1021,6 @@ struct AngularCorrelationsInJets { } else if (subtractedJetPerp.pt() < 50) { registryQA.fill(HIST("hPtJetNuclei_50"), jetParticle.pt()); } - if (fDeuteronAnalysis) { - registryData.fill(HIST("hTPCnsigmaNuclei"), jetParticle.pt(), jetParticle.tpcNSigmaDe()); - } else { - registryData.fill(HIST("hTPCnsigmaNuclei"), jetParticle.pt(), jetParticle.tpcNSigmaHe()); - } - if (jetParticle.hasTOF()) { - if (fDeuteronAnalysis) { - registryData.fill(HIST("hTOFnsigmaNuclei"), jetParticle.pt(), jetParticle.tofNSigmaDe()); - } else { - registryData.fill(HIST("hTOFnsigmaNuclei"), jetParticle.pt(), jetParticle.tofNSigmaHe()); - } - } registryData.fill(HIST("hTrackProtocol"), 8); // # nuclei if (isNucleus(jetParticle, true)) { registryData.fill(HIST("hTrackProtocol"), 9); // # high purity nuclei @@ -1039,6 +1029,7 @@ struct AngularCorrelationsInJets { } } else if (isAntinucleus(jetParticle, false)) { registryData.fill(HIST("hPtJetAntinuclei"), jetParticle.pt()); + registryQA.fill(HIST("hPtJetAntinucleiVsTotalJet"), jetParticle.pt(), subtractedJetPerp.pt()); if (subtractedJetPerp.pt() < 15) { registryQA.fill(HIST("hPtJetAntinuclei_15"), jetParticle.pt()); } else if (subtractedJetPerp.pt() < 20) { @@ -1048,18 +1039,6 @@ struct AngularCorrelationsInJets { } else if (subtractedJetPerp.pt() < 50) { registryQA.fill(HIST("hPtJetAntinuclei_50"), jetParticle.pt()); } - if (fDeuteronAnalysis) { - registryData.fill(HIST("hTPCnsigmaAntinuclei"), jetParticle.pt(), jetParticle.tpcNSigmaDe()); - } else { - registryData.fill(HIST("hTPCnsigmaAntinuclei"), jetParticle.pt(), jetParticle.tpcNSigmaHe()); - } - if (jetParticle.hasTOF()) { - if (fDeuteronAnalysis) { - registryData.fill(HIST("hTOFnsigmaAntinuclei"), jetParticle.pt(), jetParticle.tofNSigmaDe()); - } else { - registryData.fill(HIST("hTOFnsigmaAntinuclei"), jetParticle.pt(), jetParticle.tofNSigmaHe()); - } - } registryData.fill(HIST("hTrackProtocol"), 10); // # antinuclei if (isAntinucleus(jetParticle, true)) { registryData.fill(HIST("hTrackProtocol"), 11); // # high purity antinuclei From d01917549839858033c0a5f96f27e57bc17c3d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20J=C3=B6rgensen?= Date: Thu, 12 Dec 2024 18:29:04 +0100 Subject: [PATCH 05/10] small bug fix --- .../Nuspex/AngularCorrelationsInJets.cxx | 179 +++++++----------- 1 file changed, 65 insertions(+), 114 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx index 436e9e482b8..533339610c9 100644 --- a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx +++ b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx @@ -113,6 +113,8 @@ struct AngularCorrelationsInJets { Configurable fAntinucleiTOFnsigYield{"antinucleiTOFnsigmaHighPtYield", 4.0, "[antinuclei] min TOF nsigma with high pT for yield"}; Configurable fAntinucleiNsigma{"antinucleiNsigma", 2.0, "[nuclei] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; + Configurable fNSigmaRejection{"nsigmaRejection", 3.0, "particles with TPC nsigma < nsigmaRejection other than the species in question will be rejected"}; + Configurable fDeuteronAnalysis{"deuteronAnalysis", true, "true [false]: analyse (anti)deuterons [(anti)helium-3]"}; Configurable fUseTOFMass{"useTOFmass", true, "use TOF mass instead of pion mass if available"}; @@ -129,10 +131,12 @@ struct AngularCorrelationsInJets { aod::TrackSelectionExtension, aod::TracksDCA, aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullHe, aod::pidTOFmass, aod::pidTOFbeta, aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCTr, aod::pidTPCAl>; using FullTracksRun3 = soa::Join; - using McTracks = soa::Join; + // using McTracksRun2 = soa::Join; + // using McTracksRun3 = soa::Join; using BCsWithRun2Info = soa::Join; - using McCollisions = soa::Join::iterator; + // using McCollisions = soa::Join::iterator; Filter prelimTrackCuts = (aod::track::itsChi2NCl < fMaxChi2ITS && aod::track::tpcChi2NCl < fMaxChi2TPC && @@ -142,14 +146,14 @@ struct AngularCorrelationsInJets { Preslice perCollisionFullTracksRun2 = o2::aod::track::collisionId; Preslice perCollisionFullTracksRun3 = o2::aod::track::collisionId; - PreSlice perCollisionMcTracks = o2::aod::track::collisionId; + // PreSlice perCollisionMcTracksRun2 = o2::aod::track::collisionId; + // PreSlice perCollisionMcTracksRun3 = o2::aod::track::collisionId; AxisSpecs axisSpecs; HistogramRegistry registryData{"dataOutput", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; HistogramRegistry registryMC("MCOutput", {}, OutputObjHandlingPolicy::AnalysisObject, false, true); HistogramRegistry registryQA{"dataQA", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; - HistogramRegistry registryMCQA("MCQA", {}, OutputObjHandlingPolicy::AnalysisObject, false, true); JetBkgSubUtils bkgSub; @@ -181,22 +185,6 @@ struct AngularCorrelationsInJets { registryData.add("hPtJetNuclei", "p_{T} of nuclei", HistType::kTH1D, {axisSpecs.ptAxisPos}); registryData.add("hPtJetAntinuclei", "p_{T} of antinuclei", HistType::kTH1D, {axisSpecs.ptAxisPos}); registryData.add("hPtTotalJet", "p_{T} of entire jet;#it{p}_{T} [GeV/#it{c}]", HistType::kTH1F, {{1000, 0, 500}}); - registryQA.add("hPtJetProton_15", "Proton p_{T} for jet p_{T} < 15 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetProton_20", "Proton p_{T} for jet p_{T} < 20 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetProton_30", "Proton p_{T} for jet p_{T} < 30 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetProton_50", "Proton p_{T} for jet p_{T} < 50 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetAntiproton_15", "Antiproton p_{T} for jet p_{T} < 15 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetAntiproton_20", "Antiproton p_{T} for jet p_{T} < 20 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetAntiproton_30", "Antiproton p_{T} for jet p_{T} < 30 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetAntiproton_50", "Antiproton p_{T} for jet p_{T} < 50 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetNuclei_15", "Nuclei p_{T} for jet p_{T} < 15 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetNuclei_20", "Nuclei p_{T} for jet p_{T} < 20 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetNuclei_30", "Nuclei p_{T} for jet p_{T} < 30 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetNuclei_50", "Nuclei p_{T} for jet p_{T} < 50 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetAntinuclei_15", "Antinuclei p_{T} for jet p_{T} < 15 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetAntinuclei_20", "Antinuclei p_{T} for jet p_{T} < 20 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetAntinuclei_30", "Antinuclei p_{T} for jet p_{T} < 30 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); - registryQA.add("hPtJetAntinuclei_50", "Antinuclei p_{T} for jet p_{T} < 50 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); registryQA.add("hPtJetProtonVsTotalJet", "Proton p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); registryQA.add("hPtJetAntiprotonVsTotalJet", "Antiproton p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); registryQA.add("hPtJetNucleiVsTotalJet", "Nuclei p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); @@ -341,23 +329,23 @@ struct AngularCorrelationsInJets { template bool singleSpeciesTPCNSigma(T const& track, int species) // make cut configurable { // reject any track that has nsigma < 3 for more than 1 species - if (track.tpcNSigmaStoreEl() < 3.0 || track.tpcNSigmaStoreMu() < 3.0 || track.tpcNSigmaStorePi() < 3.0 || track.tpcNSigmaStoreKa() < 3.0 || track.tpcNSigmaStoreTr() < 3.0 || track.tpcNSigmaStoreAl() < 3.0) + if (track.tpcNSigmaStoreEl() < fNSigmaRejection || track.tpcNSigmaStoreMu() < fNSigmaRejection || track.tpcNSigmaStorePi() < fNSigmaRejection || track.tpcNSigmaStoreKa() < fNSigmaRejection || track.tpcNSigmaStoreTr() < fNSigmaRejection || track.tpcNSigmaStoreAl() < fNSigmaRejection) return false; switch (species) { case 1: // (anti)proton - return (track.tpcNSigmaPr() < 3.0 && track.tpcNSigmaDe() > 3.0 && track.tpcNSigmaHe() > 3.0); + return (track.tpcNSigmaPr() < fNSigmaRejection && track.tpcNSigmaDe() > fNSigmaRejection && track.tpcNSigmaHe() > fNSigmaRejection); case 2: // (anti)deuteron - return (track.tpcNSigmaDe() < 3.0 && track.tpcNSigmaPr() > 3.0 && track.tpcNSigmaHe() > 3.0); + return (track.tpcNSigmaDe() < fNSigmaRejection && track.tpcNSigmaPr() > fNSigmaRejection && track.tpcNSigmaHe() > fNSigmaRejection); case 3: // (anti)helium-3 - return (track.tpcNSigmaHe() < 3.0 && track.tpcNSigmaDe() > 3.0 && track.tpcNSigmaPr() > 3.0); + return (track.tpcNSigmaHe() < fNSigmaRejection && track.tpcNSigmaDe() > fNSigmaRejection && track.tpcNSigmaPr() > fNSigmaRejection); } } template bool isProton(const T& track, bool tightCuts) { - if (doprocessMCRun3) - return (track.mcParticle().pdgCode() == 2212); + // if (doprocessMCRun3) + // return (track.mcParticle().pdgCode() == 2212); if (track.sign() < 0) return false; @@ -369,7 +357,8 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaProtonCF"), track.pt(), track.tpcNSigmaPr()); - registryData.fill(HIST("hTOFnsigmaProtonCF"), track.pt(), track.tofNSigmaPr()); + if (track.hasTOF()) + registryData.fill(HIST("hTOFnsigmaProtonCF"), track.pt(), track.tofNSigmaPr()); // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaPr() : 999; @@ -393,10 +382,9 @@ struct AngularCorrelationsInJets { if (track.pt() > fProtonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > fProtonTPCnsigHighYield) return false; - registryData.fill(HIST("hTOFnsigmaProton"), track.pt(), track.tofNSigmaPr()); - // TOF if (track.hasTOF()) { + registryData.fill(HIST("hTOFnsigmaProton"), track.pt(), track.tofNSigmaPr()); if (track.pt() > fProtonTPCTOFpT && TMath::Abs(track.tofNSigmaPr()) > fProtonTOFnsigYield) return false; } @@ -408,8 +396,8 @@ struct AngularCorrelationsInJets { template bool isAntiproton(const T& track, bool tightCuts) { - if (doprocessMCRun3) - return (track.mcParticle().pdgCode() == -2212); + // if (doprocessMCRun3) + // return (track.mcParticle().pdgCode() == -2212); if (track.sign() > 0) return false; @@ -421,7 +409,8 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaAntiprotonCF"), track.pt(), track.tpcNSigmaPr()); - registryData.fill(HIST("hTOFnsigmaAntiprotonCF"), track.pt(), track.tofNSigmaPr()); + if (track.hasTOF()) + registryData.fill(HIST("hTOFnsigmaAntiprotonCF"), track.pt(), track.tofNSigmaPr()); // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaPr() : 999; @@ -444,10 +433,9 @@ struct AngularCorrelationsInJets { if (track.pt() > fAntiprotonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > fAntiprotonTPCnsigHighYield) return false; - registryData.fill(HIST("hTOFnsigmaAntiproton"), track.pt(), track.tofNSigmaPr()); - // TOF if (track.hasTOF()) { + registryData.fill(HIST("hTOFnsigmaAntiproton"), track.pt(), track.tofNSigmaPr()); if (track.pt() > fAntiprotonTPCTOFpT && TMath::Abs(track.tofNSigmaPr()) > fAntiprotonTOFnsigYield) return false; } @@ -459,8 +447,8 @@ struct AngularCorrelationsInJets { template bool isNucleus(const T& track, bool tightCuts) { - if (doprocessMCRun3) - return (track.mcParticle().pdgCode() == (fDeuteronAnalysis) ? 1000010020 : 1000020030); + // if (doprocessMCRun3) + // return (track.mcParticle().pdgCode() == (fDeuteronAnalysis) ? 1000010020 : 1000020030); if (track.sign() < 0) return false; if (fDeuteronAnalysis) { @@ -472,7 +460,8 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaNucleiCF"), track.pt(), track.tpcNSigmaDe()); - registryData.fill(HIST("hTOFnsigmaNucleiCF"), track.pt(), track.tofNSigmaDe()); + if (track.hasTOF()) + registryData.fill(HIST("hTOFnsigmaNucleiCF"), track.pt(), track.tofNSigmaDe()); // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaDe() : 999; @@ -495,10 +484,9 @@ struct AngularCorrelationsInJets { if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > fNucleiTPCnsigHighYield) return false; - registryData.fill(HIST("hTOFnsigmaNuclei"), track.pt(), track.tofNSigmaDe()); - // TOF if (track.hasTOF()) { + registryData.fill(HIST("hTOFnsigmaNuclei"), track.pt(), track.tofNSigmaDe()); if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tofNSigmaDe()) > fNucleiTOFnsigYield) return false; } @@ -512,7 +500,8 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaNucleiCF"), track.pt(), track.tpcNSigmaHe()); - registryData.fill(HIST("hTOFnsigmaNucleiCF"), track.pt(), track.tofNSigmaHe()); + if (track.hasTOF()) + registryData.fill(HIST("hTOFnsigmaNucleiCF"), track.pt(), track.tofNSigmaHe()); // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaHe() : 999; @@ -535,10 +524,9 @@ struct AngularCorrelationsInJets { if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > fNucleiTPCnsigHighYield) return false; - registryData.fill(HIST("hTOFnsigmaNuclei"), track.pt(), track.tofNSigmaHe()); - // TOF if (track.hasTOF()) { + registryData.fill(HIST("hTOFnsigmaNuclei"), track.pt(), track.tofNSigmaHe()); if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tofNSigmaHe()) > fNucleiTOFnsigYield) return false; } @@ -551,8 +539,8 @@ struct AngularCorrelationsInJets { template bool isAntinucleus(const T& track, bool tightCuts) { - if (doprocessMCRun3) - return (track.mcParticle().pdgCode() == (fDeuteronAnalysis) ? -1000010020 : -1000020030); + // if (doprocessMCRun3) + // return (track.mcParticle().pdgCode() == (fDeuteronAnalysis) ? -1000010020 : -1000020030); if (track.sign() > 0) return false; @@ -565,7 +553,8 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaAntinucleiCF"), track.pt(), track.tpcNSigmaDe()); - registryData.fill(HIST("hTOFnsigmaAntinucleiCF"), track.pt(), track.tofNSigmaDe()); + if (track.hasTOF()) + registryData.fill(HIST("hTOFnsigmaAntinucleiCF"), track.pt(), track.tofNSigmaDe()); // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaDe() : 999; @@ -588,11 +577,12 @@ struct AngularCorrelationsInJets { if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > fAntinucleiTPCnsigHighYield) return false; - registryData.fill(HIST("hTOFnsigmaAntinuclei"), track.pt(), track.tofNSigmaDe()); - // TOF - if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tofNSigmaDe()) > fAntinucleiTOFnsigYield) - return false; + if (track.hasTOF()) { + registryData.fill(HIST("hTOFnsigmaAntinuclei"), track.pt(), track.tofNSigmaDe()); + if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tofNSigmaDe()) > fAntinucleiTOFnsigYield) + return false; + } } } else { if (tightCuts) { // for correlation function - including for antihelium just in case, but realistically, angular correlations won't be a thing here @@ -603,7 +593,8 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaAntinucleiCF"), track.pt(), track.tpcNSigmaHe()); - registryData.fill(HIST("hTOFnsigmaAntinucleiCF"), track.pt(), track.tofNSigmaHe()); + if (track.hasTOF()) + registryData.fill(HIST("hTOFnsigmaAntinucleiCF"), track.pt(), track.tofNSigmaHe()); // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaHe() : 999; @@ -626,11 +617,12 @@ struct AngularCorrelationsInJets { if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > fAntinucleiTPCnsigHighYield) return false; - registryData.fill(HIST("hTOFnsigmaAntinuclei"), track.pt(), track.tofNSigmaHe()); - // TOF - if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tofNSigmaHe()) > fAntinucleiTOFnsigYield) - return false; + if (track.hasTOF()) { + registryData.fill(HIST("hTOFnsigmaAntinuclei"), track.pt(), track.tofNSigmaHe()); + if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tofNSigmaHe()) > fAntinucleiTOFnsigYield) + return false; + } } } @@ -873,7 +865,7 @@ struct AngularCorrelationsInJets { if (Delta > maxRadius) maxRadius = Delta; } - registryQA.fill(HIST("hMaxRadiusVsPt"), jet.pt(), maxRadius); // no entries - weird! + registryQA.fill(HIST("hMaxRadiusVsPt"), jet.pt(), maxRadius); // QA for comparison with nuclei_in_jets TVector3 pJet(0., 0., 0.); @@ -976,15 +968,6 @@ struct AngularCorrelationsInJets { if (isProton(jetParticle, false)) { // collect protons in jet registryData.fill(HIST("hPtJetProton"), jetParticle.pt()); registryQA.fill(HIST("hPtJetProtonVsTotalJet"), jetParticle.pt(), subtractedJetPerp.pt()); - if (subtractedJetPerp.pt() < 15) { - registryQA.fill(HIST("hPtJetProton_15"), jetParticle.pt()); - } else if (subtractedJetPerp.pt() < 20) { - registryQA.fill(HIST("hPtJetProton_20"), jetParticle.pt()); - } else if (subtractedJetPerp.pt() < 30) { - registryQA.fill(HIST("hPtJetProton_30"), jetParticle.pt()); - } else if (subtractedJetPerp.pt() < 50) { - registryQA.fill(HIST("hPtJetProton_50"), jetParticle.pt()); - } registryData.fill(HIST("hTrackProtocol"), 4); // # protons if (isProton(jetParticle, true)) { registryData.fill(HIST("hTrackProtocol"), 5); // # high purity protons @@ -994,15 +977,6 @@ struct AngularCorrelationsInJets { } else if (isAntiproton(jetParticle, false)) { // collect antiprotons in jet registryData.fill(HIST("hPtJetAntiproton"), jetParticle.pt()); registryQA.fill(HIST("hPtJetAntiprotonVsTotalJet"), jetParticle.pt(), subtractedJetPerp.pt()); - if (subtractedJetPerp.pt() < 15) { - registryQA.fill(HIST("hPtJetAntiproton_15"), jetParticle.pt()); - } else if (subtractedJetPerp.pt() < 20) { - registryQA.fill(HIST("hPtJetAntiproton_20"), jetParticle.pt()); - } else if (subtractedJetPerp.pt() < 30) { - registryQA.fill(HIST("hPtJetAntiproton_30"), jetParticle.pt()); - } else if (subtractedJetPerp.pt() < 50) { - registryQA.fill(HIST("hPtJetAntiproton_50"), jetParticle.pt()); - } registryData.fill(HIST("hTrackProtocol"), 6); // # antiprotons if (isAntiproton(jetParticle, true)) { registryData.fill(HIST("hTrackProtocol"), 7); // # high purity antiprotons @@ -1012,15 +986,6 @@ struct AngularCorrelationsInJets { } else if (isNucleus(jetParticle, false)) { // collect nuclei in jet registryData.fill(HIST("hPtJetNuclei"), jetParticle.pt()); registryQA.fill(HIST("hPtJetNucleiVsTotalJet"), jetParticle.pt(), subtractedJetPerp.pt()); - if (subtractedJetPerp.pt() < 15) { - registryQA.fill(HIST("hPtJetNuclei_15"), jetParticle.pt()); - } else if (subtractedJetPerp.pt() < 20) { - registryQA.fill(HIST("hPtJetNuclei_20"), jetParticle.pt()); - } else if (subtractedJetPerp.pt() < 30) { - registryQA.fill(HIST("hPtJetNuclei_30"), jetParticle.pt()); - } else if (subtractedJetPerp.pt() < 50) { - registryQA.fill(HIST("hPtJetNuclei_50"), jetParticle.pt()); - } registryData.fill(HIST("hTrackProtocol"), 8); // # nuclei if (isNucleus(jetParticle, true)) { registryData.fill(HIST("hTrackProtocol"), 9); // # high purity nuclei @@ -1030,15 +995,6 @@ struct AngularCorrelationsInJets { } else if (isAntinucleus(jetParticle, false)) { registryData.fill(HIST("hPtJetAntinuclei"), jetParticle.pt()); registryQA.fill(HIST("hPtJetAntinucleiVsTotalJet"), jetParticle.pt(), subtractedJetPerp.pt()); - if (subtractedJetPerp.pt() < 15) { - registryQA.fill(HIST("hPtJetAntinuclei_15"), jetParticle.pt()); - } else if (subtractedJetPerp.pt() < 20) { - registryQA.fill(HIST("hPtJetAntinuclei_20"), jetParticle.pt()); - } else if (subtractedJetPerp.pt() < 30) { - registryQA.fill(HIST("hPtJetAntinuclei_30"), jetParticle.pt()); - } else if (subtractedJetPerp.pt() < 50) { - registryQA.fill(HIST("hPtJetAntinuclei_50"), jetParticle.pt()); - } registryData.fill(HIST("hTrackProtocol"), 10); // # antinuclei if (isAntinucleus(jetParticle, true)) { registryData.fill(HIST("hTrackProtocol"), 11); // # high purity antinuclei @@ -1094,7 +1050,6 @@ struct AngularCorrelationsInJets { particles.clear(); int index = 0; int jetCounter = 0; - // int leadingID = 0; std::vector jets; jets.clear(); @@ -1116,10 +1071,6 @@ struct AngularCorrelationsInJets { mass = 0.139; } - // if (track.pt() > fMinLeadingPt) { - // leadingID = track.globalIndex(); - // } - if (track.tpcNClsFindable() != 0) { registryQA.fill(HIST("hRatioCrossedRowsTPC"), track.pt(), track.tpcNClsCrossedRows() / track.tpcNClsFindable()); } @@ -1219,23 +1170,23 @@ struct AngularCorrelationsInJets { } PROCESS_SWITCH(AngularCorrelationsInJets, processRun3, "process Run 3 data", false); - void processMCRun3(McCollisions const& collisions, soa::Filtered const& tracks) - { - for (const auto& collision : collisions) { - registryMC.fill(HIST("hEventProtocol"), 0); - if (!collision.sel8()) - continue; - registryMC.fill(HIST("hNumberOfEvents"), 0); - registryMC.fill(HIST("hEventProtocol"), 1); - if (TMath::Abs(collision.posZ()) > fZVtx) - continue; - - auto slicedTracks = tracks.sliceBy(perCollisionMcTracks, collision.globalIndex()); - - fillHistograms(slicedTracks); - } - } - PROCESS_SWITCH(AngularCorrelationsInJets, processMCRun3, "process Run 3 MC", false); + // void processMCRun3(McCollisions const& collisions, soa::Filtered const& tracks) + // { + // for (const auto& collision : collisions) { + // registryMC.fill(HIST("hEventProtocol"), 0); + // if (!collision.sel8()) + // continue; + // registryMC.fill(HIST("hNumberOfEvents"), 0); + // registryMC.fill(HIST("hEventProtocol"), 1); + // if (TMath::Abs(collision.posZ()) > fZVtx) + // continue; + + // auto slicedTracks = tracks.sliceBy(perCollisionMcTracksRun3, collision.globalIndex()); + + // fillHistograms(slicedTracks); + // } + // } + // PROCESS_SWITCH(AngularCorrelationsInJets, processMCRun3, "process Run 3 MC", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) From 67ed23b802f2f70422b7687581c0335da0c65f7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20J=C3=B6rgensen?= Date: Sun, 15 Dec 2024 02:32:59 +0100 Subject: [PATCH 06/10] implemented MC processes; compiles but untested as of now --- .../Nuspex/AngularCorrelationsInJets.cxx | 290 ++++++++++++------ 1 file changed, 200 insertions(+), 90 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx index 111f991126b..bccbc4376ab 100644 --- a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx +++ b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx @@ -26,7 +26,9 @@ #include "Common/DataModel/PIDResponse.h" #include "Common/Core/PID/PIDTOF.h" #include "Common/TableProducer/PID/pidTOFBase.h" -#include "PWGLF/DataModel/LFParticleIdentification.h" +#include "Common/DataModel/McCollisionExtra.h" +#include "PWGDQ/DataModel/ReducedInfoTables.h" + #include "fastjet/PseudoJet.hh" #include "fastjet/AreaDefinition.hh" #include "fastjet/ClusterSequenceArea.hh" @@ -36,7 +38,6 @@ #include "TVector3.h" #include "TPDGCode.h" - using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions; @@ -79,7 +80,6 @@ struct AngularCorrelationsInJets { Configurable fProtonTPCnsigHighYield{"protonTPCnsigmaHighPtYield", 4.0, "[proton] max TPC nsigma with high pT for yield"}; Configurable fProtonTOFnsigYield{"protonTOFnsigmaHighPtYield", 4.0, "[proton] max TOF nsigma with high pT yield"}; Configurable fProtonNsigma{"protonNsigma", 2.0, "[proton] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; - Configurable fProtonNsigma{"protonNsigma", 2.0, "[proton] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; // Antiproton Cuts Configurable fAntiprotonDCAxyYield{"antiprotonDCAxyYield", 0.05, "[antiproton] DCAxy cut for yield"}; @@ -91,7 +91,6 @@ struct AngularCorrelationsInJets { Configurable fAntiprotonTPCnsigHighYield{"antiprotonTPCnsigmaHighPtYield", 4.0, "[antiproton] max TPC nsigma with high pT for yield"}; Configurable fAntiprotonTOFnsigYield{"antiprotonTOFnsigmaHighPtYield", 4.0, "[antiproton] min TOF nsigma with high pT for yield"}; Configurable fAntiprotonNsigma{"antiprotonNsigma", 2.0, "[antiproton] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; - Configurable fAntiprotonNsigma{"antiprotonNsigma", 2.0, "[antiproton] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; // Nuclei Cuts Configurable fNucleiDCAxyYield{"nucleiDCAxyYield", 0.05, "[nuclei] DCAxy cut for yield"}; @@ -103,7 +102,6 @@ struct AngularCorrelationsInJets { Configurable fNucleiTPCnsigHighYield{"nucleiTPCnsigmaHighPtYield", 4.0, "[nuclei] max TPC nsigma with high pT for yield"}; Configurable fNucleiTOFnsigYield{"nucleiTOFnsigmaHighPtYield", 4.0, "[nuclei] min TOF nsigma with high pT for yield"}; Configurable fNucleiNsigma{"nucleiNsigma", 2.0, "[nuclei] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; - Configurable fNucleiNsigma{"nucleiNsigma", 2.0, "[nuclei] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; // Antinuclei Cuts Configurable fAntinucleiDCAxyYield{"antinucleiDCAxyYield", 0.05, "[antinuclei] DCAxy cut for yield"}; @@ -121,12 +119,10 @@ struct AngularCorrelationsInJets { Configurable fDeuteronAnalysis{"deuteronAnalysis", true, "true [false]: analyse (anti)deuterons [(anti)helium-3]"}; Configurable fUseTOFMass{"useTOFmass", true, "use TOF mass instead of pion mass if available"}; - Configurable fBufferSize{"trackBufferSize", 200, "Number of mixed-event tracks being stored"}; Configurable fBufferSize{"trackBufferSize", 200, "Number of mixed-event tracks being stored"}; // QC Configurables Configurable fZVtx{"zVtx", 10.0, "max zVertex"}; - Configurable fZVtx{"zVtx", 10.0, "max zVertex"}; Configurable fRmax{"Rmax", 0.4, "Maximum radius for jet and UE regions"}; Service ccdb; @@ -134,21 +130,14 @@ struct AngularCorrelationsInJets { using FullTracksRun2 = soa::Join; - aod::TrackSelectionExtension, aod::TracksDCA, aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullHe, aod::pidTOFmass, aod::pidTOFbeta, aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCTr, aod::pidTPCAl>; using FullTracksRun3 = soa::Join; - // using McTracksRun2 = soa::Join; - // using McTracksRun3 = soa::Join; - aod::TracksDCA, aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullHe, aod::pidTOFmass, aod::pidTOFbeta, aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCTr, aod::pidTPCAl>; - // using McTracksRun2 = soa::Join; - // using McTracksRun3 = soa::Join; + using McTracksRun2 = soa::Join; + using McTracksRun3 = soa::Join; using BCsWithRun2Info = soa::Join; - // using McCollisions = soa::Join::iterator; - // using McCollisions = soa::Join::iterator; + using McCollisions = soa::Join; Filter prelimTrackCuts = (aod::track::itsChi2NCl < fMaxChi2ITS && aod::track::tpcChi2NCl < fMaxChi2TPC && @@ -158,17 +147,14 @@ struct AngularCorrelationsInJets { Preslice perCollisionFullTracksRun2 = o2::aod::track::collisionId; Preslice perCollisionFullTracksRun3 = o2::aod::track::collisionId; - // PreSlice perCollisionMcTracksRun2 = o2::aod::track::collisionId; - // PreSlice perCollisionMcTracksRun3 = o2::aod::track::collisionId; - // PreSlice perCollisionMcTracksRun2 = o2::aod::track::collisionId; - // PreSlice perCollisionMcTracksRun3 = o2::aod::track::collisionId; + Preslice perCollisionMcTracksRun2 = o2::aod::track::collisionId; + Preslice perCollisionMcTracksRun3 = o2::aod::track::collisionId; AxisSpecs axisSpecs; HistogramRegistry registryData{"dataOutput", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; - HistogramRegistry registryMC("MCOutput", {}, OutputObjHandlingPolicy::AnalysisObject, false, true); + HistogramRegistry registryMC{"MCOutput", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; HistogramRegistry registryQA{"dataQA", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; - // HistogramRegistry registryMCQA("MCQA", {}, OutputObjHandlingPolicy::AnalysisObject, false, true); JetBkgSubUtils bkgSub; @@ -200,13 +186,13 @@ struct AngularCorrelationsInJets { registryData.add("hPtJetNuclei", "p_{T} of nuclei", HistType::kTH1D, {axisSpecs.ptAxisPos}); registryData.add("hPtJetAntinuclei", "p_{T} of antinuclei", HistType::kTH1D, {axisSpecs.ptAxisPos}); registryData.add("hPtTotalJet", "p_{T} of entire jet;#it{p}_{T} [GeV/#it{c}]", HistType::kTH1F, {{1000, 0, 500}}); - registryQA.add("hPtJetProtonVsTotalJet", "Proton p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); - registryQA.add("hPtJetAntiprotonVsTotalJet", "Antiproton p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); - registryQA.add("hPtJetNucleiVsTotalJet", "Nuclei p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); - registryQA.add("hPtJetAntinucleiVsTotalJet", "Antinuclei p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); + registryQA.add("hPtJetProtonVsTotalJet", "Proton p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500, "jet p_{T} [GeV/#it{c}]"}}); + registryQA.add("hPtJetAntiprotonVsTotalJet", "Antiproton p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500, "jet p_{T} [GeV/#it{c}]"}}); + registryQA.add("hPtJetNucleiVsTotalJet", "Nuclei p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500, "jet p_{T} [GeV/#it{c}]"}}); + registryQA.add("hPtJetAntinucleiVsTotalJet", "Antinuclei p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500, "jet p_{T} [GeV/#it{c}]"}}); // nSigma - registryData.add("hTPCsignal", "TPC signal", HistType::kTH2F, {{1000, -100, 100, "#it{p} [GeV/#it{c}]"}, {5000, 0, 5000, "d#it{E}/d#it{X} (a.u.)"}}); + registryData.add("hTPCsignal", "TPC signal", HistType::kTH2F, {{1000, -100, 100, "#it{p} [GeV/#it{c}]"}, {1000, 0, 5000, "d#it{E}/d#it{X} (a.u.)"}}); registryData.add("hTOFsignal", "TOF signal", HistType::kTH2F, {{1000, -100, 100, "#it{p} [GeV/#it{c}]"}, {550, 0, 1.1, "#beta (TOF)"}}); registryData.add("hTPCnsigmaProton", "TPC n#sigma for proton", HistType::kTH2F, {axisSpecs.nsigmapTAxis, axisSpecs.nsigmaAxis}); registryData.add("hTOFnsigmaProton", "TOF n#sigma for proton", HistType::kTH2F, {axisSpecs.nsigmapTAxis, axisSpecs.nsigmaAxis}); @@ -234,10 +220,10 @@ struct AngularCorrelationsInJets { registryData.add("hDCAzJetAntinuclei", "DCA_{z} of high purity antinuclei", HistType::kTH2F, {axisSpecs.ptAxisPos, axisSpecs.dcazAxis}); // Angular Distributions - registryQA.add("hPhiFullEvent", "#varphi in full event", HistType::kTH1F, {{1000, -6.3, 6.3}}); - registryQA.add("hPhiPtFullEvent", "#varphi vs. p_{T} in full event", HistType::kTH2F, {axisSpecs.ptAxisPos, {1000, -6.3, 6.3}}); - registryQA.add("hPhiJet", "#varphi in jet", HistType::kTH1F, {{1000, -6.3, 6.3}}); - registryQA.add("hPhiPtJet", "#varphi vs. p_{T} in jet", HistType::kTH2F, {axisSpecs.ptAxisPos, {1000, -6.3, 6.3}}); + registryQA.add("hPhiFullEvent", "#varphi in full event", HistType::kTH1F, {{1000, 0, 6.3}}); + registryQA.add("hPhiPtFullEvent", "#varphi vs. p_{T} in full event", HistType::kTH2F, {axisSpecs.ptAxisPos, {1000, 0, 6.3}}); + registryQA.add("hPhiJet", "#varphi in jet", HistType::kTH1F, {{1000, 0, 6.3}}); + registryQA.add("hPhiPtJet", "#varphi vs. p_{T} in jet", HistType::kTH2F, {axisSpecs.ptAxisPos, {1000, 0, 6.3}}); registryQA.add("hEtaFullEvent", "#eta in full event", HistType::kTH1F, {{1000, -1, 1}}); registryQA.add("hEtaPtFullEvent", "#eta vs. p_{T} in full event", HistType::kTH2F, {axisSpecs.ptAxisPos, {1000, -1, 1}}); registryQA.add("hEtaJet", "#eta in jet", HistType::kTH1F, {{1000, -1, 1}}); @@ -304,6 +290,13 @@ struct AngularCorrelationsInJets { registryQA.add("hNParticlesClusteredInJet", "hNParticlesClusteredInJet", HistType::kTH1F, {{50, 0, 50, "#it{N}_{ch}"}}); registryQA.add("hPtParticlesClusteredInJet", "hPtParticlesClusteredInJet", HistType::kTH1F, {{200, 0, 10, "#it{p}_{T} (GeV/#it{c})"}}); + + // MC + registryMC.add("hPtJetProtonMC", "Truth jet proton p_{T}", HistType::kTH1F, {axisSpecs.ptAxisPos}); + registryMC.add("hPtJetAntiprotonMC", "Truth jet antiproton p_{T}", HistType::kTH1F, {axisSpecs.ptAxisPos}); + registryMC.add("hPtJetNucleiMC", "Truth jet nuclei p_{T}", HistType::kTH1F, {axisSpecs.ptAxisPos}); + registryMC.add("hPtJetAntinucleiMC", "Truth jet antinuclei p_{T}", HistType::kTH1F, {axisSpecs.ptAxisPos}); + registryMC.add("hNumberOfTruthParticles", "Truth yields (anti)p, (anti)d, (anti)He-3", HistType::kTH1I, {{6, 0, 6}}); } std::vector> fBufferProton; @@ -324,7 +317,6 @@ struct AngularCorrelationsInJets { template bool selectTrack(T const& track) // preliminary track selections - bool selectTrack(T const& track) // preliminary track selections { if (track.tpcNClsCrossedRows() < fMinRatioCrossedRowsTPC * track.tpcNClsFindable() || track.tpcNClsCrossedRows() < fMinNCrossedRowsTPC || @@ -332,7 +324,7 @@ struct AngularCorrelationsInJets { track.itsNCls() < fMinReqClusterITS) { return false; } - if (doprocessRun2) { + if (doprocessRun2 || doprocessMCRun2) { if (!(track.trackType() & o2::aod::track::Run2Track) || !(track.flags() & o2::aod::track::TPCrefit) || !(track.flags() & o2::aod::track::ITSrefit)) { @@ -360,10 +352,6 @@ struct AngularCorrelationsInJets { template bool isProton(const T& track, bool tightCuts) { - // if (doprocessMCRun3) - // return (track.mcParticle().pdgCode() == 2212); - // if (doprocessMCRun3) - // return (track.mcParticle().pdgCode() == 2212); if (track.sign() < 0) return false; @@ -414,10 +402,6 @@ struct AngularCorrelationsInJets { template bool isAntiproton(const T& track, bool tightCuts) { - // if (doprocessMCRun3) - // return (track.mcParticle().pdgCode() == -2212); - // if (doprocessMCRun3) - // return (track.mcParticle().pdgCode() == -2212); if (track.sign() > 0) return false; @@ -467,10 +451,6 @@ struct AngularCorrelationsInJets { template bool isNucleus(const T& track, bool tightCuts) { - // if (doprocessMCRun3) - // return (track.mcParticle().pdgCode() == (fDeuteronAnalysis) ? 1000010020 : 1000020030); - // if (doprocessMCRun3) - // return (track.mcParticle().pdgCode() == (fDeuteronAnalysis) ? 1000010020 : 1000020030); if (track.sign() < 0) return false; if (fDeuteronAnalysis) { @@ -561,10 +541,6 @@ struct AngularCorrelationsInJets { template bool isAntinucleus(const T& track, bool tightCuts) { - // if (doprocessMCRun3) - // return (track.mcParticle().pdgCode() == (fDeuteronAnalysis) ? -1000010020 : -1000020030); - // if (doprocessMCRun3) - // return (track.mcParticle().pdgCode() == (fDeuteronAnalysis) ? -1000010020 : -1000020030); if (track.sign() > 0) return false; @@ -653,7 +629,6 @@ struct AngularCorrelationsInJets { return true; } - void setTrackBuffer(const auto& tempBuffer, auto& buffer) // refresh track buffer void setTrackBuffer(const auto& tempBuffer, auto& buffer) // refresh track buffer { for (const auto& pair : tempBuffer) { @@ -666,7 +641,6 @@ struct AngularCorrelationsInJets { } } - void fillMixedEventDeltas(const auto& track, const auto& buffer, int particleType, const TVector3 jetAxis) // correlate tracks from current event with tracks from buffer, i.e. other events void fillMixedEventDeltas(const auto& track, const auto& buffer, int particleType, const TVector3 jetAxis) // correlate tracks from current event with tracks from buffer, i.e. other events { if (buffer.size() == 0) @@ -892,7 +866,6 @@ struct AngularCorrelationsInJets { maxRadius = Delta; } registryQA.fill(HIST("hMaxRadiusVsPt"), jet.pt(), maxRadius); - registryQA.fill(HIST("hMaxRadiusVsPt"), jet.pt(), maxRadius); // QA for comparison with nuclei_in_jets TVector3 pJet(0., 0., 0.); @@ -1157,6 +1130,142 @@ struct AngularCorrelationsInJets { setTrackBuffer(fTempBufferFull, fBufferFull); } + template + void fillHistogramsMC(U const& tracks) + { + std::vector jetProtons; + std::vector jetAntiprotons; + std::vector jetNuclei; + std::vector jetAntinuclei; + std::vector jetAll; + std::vector> fTempBufferFull; + fTempBufferFull.clear(); + std::vector jetInput; // input for jet finder + std::map particles; // all selected particles in event + std::vector particlesForCF; // particles for full event angular correlations + jetInput.clear(); + particles.clear(); + int index = 0; + int jetCounter = 0; + std::vector jets; + jets.clear(); + + for (const auto& track : tracks) { + if (!selectTrack(track)) + continue; + + double mass; + if (fUseTOFMass) { + if (track.hasTOF()) { + mass = track.mass(); // check reliability, maybe use only pion mass + registryQA.fill(HIST("hTOFmass"), track.pt(), track.mass()); + registryData.fill(HIST("hTrackProtocol"), 1); + } else { + mass = 0.139; // pion mass as default, ~80% are pions + registryData.fill(HIST("hTrackProtocol"), 2); + } + } else { + mass = 0.139; + } + + if (track.tpcNClsFindable() != 0) { + registryQA.fill(HIST("hRatioCrossedRowsTPC"), track.pt(), track.tpcNClsCrossedRows() / track.tpcNClsFindable()); + } + registryQA.fill(HIST("hPtFullEvent"), track.pt()); + registryQA.fill(HIST("hCrossedRowsTPC"), track.pt(), track.tpcNClsCrossedRows()); + registryQA.fill(HIST("hClusterITS"), track.pt(), track.itsNCls()); + registryQA.fill(HIST("hClusterTPC"), track.pt(), track.tpcNClsFound()); + registryQA.fill(HIST("hChi2ITS"), track.pt(), track.itsChi2NCl()); + registryQA.fill(HIST("hChi2TPC"), track.pt(), track.tpcChi2NCl()); + registryQA.fill(HIST("hDCAxyFullEvent"), track.pt(), track.dcaXY()); + registryQA.fill(HIST("hDCAzFullEvent"), track.pt(), track.dcaZ()); + registryQA.fill(HIST("hPhiFullEvent"), track.phi()); + registryQA.fill(HIST("hPhiPtFullEvent"), track.pt(), track.phi()); + registryQA.fill(HIST("hEtaFullEvent"), track.eta()); + registryQA.fill(HIST("hEtaPtFullEvent"), track.pt(), track.eta()); + + fastjet::PseudoJet inputPseudoJet(track.px(), track.py(), track.pz(), track.energy(mass)); + inputPseudoJet.set_user_index(index); + particles[index] = track; + particlesForCF.emplace_back(track); + jetInput.emplace_back(inputPseudoJet); + + index++; + } // for (const auto& track : tracks) + + if (jetInput.size() < 2) + return; + registryData.fill(HIST("hEventProtocol"), 2); + + // Reconstruct Jets + double ghost_maxrap = 1.0; + double ghost_area = 0.005; + int ghost_repeat = 1; + fastjet::JetDefinition jetDef(fastjet::antikt_algorithm, fJetR); + fastjet::JetDefinition jetDefBkg(fastjet::kt_algorithm, 0.5); + fastjet::AreaDefinition areaDef(fastjet::active_area, fastjet::GhostedAreaSpec(ghost_maxrap, ghost_repeat, ghost_area)); + fastjet::AreaDefinition areaDefBkg(fastjet::active_area_explicit_ghosts, fastjet::GhostedAreaSpec(ghost_maxrap)); + fastjet::ClusterSequenceArea clusterSeq(jetInput, jetDef, areaDef); + jets = sorted_by_pt(clusterSeq.inclusive_jets()); + + if (jets.size() == 0) + return; + + registryData.fill(HIST("hEventProtocol"), 3); + + bool doSparse = true; + auto [rho, rhoM] = bkgSub.estimateRhoAreaMedian(jetInput, doSparse); + auto [rhoPerp, rhoMPerp] = bkgSub.estimateRhoPerpCone(jetInput, jets); + + for (auto& jet : jets) { + jetCounter = analyseJet(jetCounter, jet, particles, jetProtons, jetAntiprotons, jetNuclei, jetAntinuclei, jetAll, rho, rhoM, rhoPerp, rhoMPerp); + + // MC Truth Particles + fastjet::PseudoJet subtractedJetPerp(0., 0., 0., 0.); + subtractedJetPerp = bkgSub.doRhoAreaSub(jet, rhoPerp, rhoMPerp); + if (subtractedJetPerp.pt() < fMinJetPt) // cut on jet w/o bkg + continue; + for (const auto& constituent : jet.constituents()) { + const auto& jetParticle = particles.at(constituent.user_index()); + if (!jetParticle.has_mcParticle()) + continue; + switch (jetParticle.mcParticle().pdgCode()) { + case 2212: + registryMC.fill(HIST("hNumberOfTruthParticles"), 0); + registryMC.fill(HIST("hPtJetProtonMC"), jetParticle.pt()); + break; + case -2212: + registryMC.fill(HIST("hNumberOfTruthParticles"), 1); + registryMC.fill(HIST("hPtJetAntiprotonMC"), jetParticle.pt()); + break; + case 1000010020: + registryMC.fill(HIST("hNumberOfTruthParticles"), 2); + registryMC.fill(HIST("hPtJetNucleiMC"), jetParticle.pt()); + break; + case -1000010020: + registryMC.fill(HIST("hNumberOfTruthParticles"), 3); + registryMC.fill(HIST("hPtJetAntinucleiMC"), jetParticle.pt()); + break; + case 1000020030: + registryMC.fill(HIST("hNumberOfTruthParticles"), 4); + registryMC.fill(HIST("hPtJetNucleiMC"), jetParticle.pt()); + break; + case -1000020030: + registryMC.fill(HIST("hNumberOfTruthParticles"), 5); + registryMC.fill(HIST("hPtJetAntinucleiMC"), jetParticle.pt()); + break; + default: + continue; + } + } // for (const auto& constituent : jet.constituents()) + } // for (const auto& jet : jets) + registryData.fill(HIST("hNumJetsInEvent"), jetCounter); + + TVector3 hardestJetAxis(jets.at(0).px(), jets.at(0).py(), jets.at(0).pz()); // for full event, use hardest jet as orientation + doCorrelations(particlesForCF, fBufferFull, fTempBufferFull, -1, hardestJetAxis); + setTrackBuffer(fTempBufferFull, fBufferFull); + } + void processRun2(soa::Join const& collisions, soa::Filtered const& tracks, BCsWithRun2Info const&) @@ -1197,41 +1306,42 @@ struct AngularCorrelationsInJets { } PROCESS_SWITCH(AngularCorrelationsInJets, processRun3, "process Run 3 data", false); - // void processMCRun3(McCollisions const& collisions, soa::Filtered const& tracks) - // { - // for (const auto& collision : collisions) { - // registryMC.fill(HIST("hEventProtocol"), 0); - // if (!collision.sel8()) - // continue; - // registryMC.fill(HIST("hNumberOfEvents"), 0); - // registryMC.fill(HIST("hEventProtocol"), 1); - // if (TMath::Abs(collision.posZ()) > fZVtx) - // continue; - - // auto slicedTracks = tracks.sliceBy(perCollisionMcTracksRun3, collision.globalIndex()); - - // fillHistograms(slicedTracks); - // } - // } - // PROCESS_SWITCH(AngularCorrelationsInJets, processMCRun3, "process Run 3 MC", false); - - // void processMCRun3(McCollisions const& collisions, soa::Filtered const& tracks) - // { - // for (const auto& collision : collisions) { - // registryMC.fill(HIST("hEventProtocol"), 0); - // if (!collision.sel8()) - // continue; - // registryMC.fill(HIST("hNumberOfEvents"), 0); - // registryMC.fill(HIST("hEventProtocol"), 1); - // if (TMath::Abs(collision.posZ()) > fZVtx) - // continue; - - // auto slicedTracks = tracks.sliceBy(perCollisionMcTracksRun3, collision.globalIndex()); - - // fillHistograms(slicedTracks); - // } - // } - // PROCESS_SWITCH(AngularCorrelationsInJets, processMCRun3, "process Run 3 MC", false); + void processMCRun2(McCollisions const& collisions, soa::Filtered const& tracks, BCsWithRun2Info const&, aod::McParticles&, aod::McCollisions const&) + { + for (const auto& collision : collisions) { + auto bc = collision.bc_as(); + initCCDB(bc); + + registryData.fill(HIST("hEventProtocol"), 0); + if (!collision.alias_bit(kINT7)) + continue; + registryData.fill(HIST("hNumberOfEvents"), 0); + registryData.fill(HIST("hEventProtocol"), 1); + + auto slicedTracks = tracks.sliceBy(perCollisionMcTracksRun2, collision.globalIndex()); + + fillHistogramsMC(slicedTracks); + } + } + PROCESS_SWITCH(AngularCorrelationsInJets, processMCRun2, "process Run 2 MC", false); + + void processMCRun3(McCollisions const& collisions, soa::Filtered const& tracks, aod::McParticles&, aod::McCollisions const&) + { + for (const auto& collision : collisions) { + registryData.fill(HIST("hEventProtocol"), 0); + if (!collision.sel8()) + continue; + registryData.fill(HIST("hNumberOfEvents"), 0); + registryData.fill(HIST("hEventProtocol"), 1); + if (TMath::Abs(collision.posZ()) > fZVtx) + continue; + + auto slicedTracks = tracks.sliceBy(perCollisionMcTracksRun3, collision.globalIndex()); + + fillHistogramsMC(slicedTracks); + } + } + PROCESS_SWITCH(AngularCorrelationsInJets, processMCRun3, "process Run 3 MC", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) From 06bda2f8b8b23626a6db34670adf1ece9820c683 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 16 Dec 2024 12:37:37 +0000 Subject: [PATCH 07/10] Please consider the following formatting changes --- .../Nuspex/AngularCorrelationsInJets.cxx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx index bccbc4376ab..0543806d332 100644 --- a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx +++ b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx @@ -133,9 +133,9 @@ struct AngularCorrelationsInJets { using FullTracksRun3 = soa::Join; using McTracksRun2 = soa::Join; + aod::TrackSelectionExtension, aod::TracksDCA, aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullHe, aod::pidTOFmass, aod::pidTOFbeta, aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCTr, aod::pidTPCAl, aod::McTrackLabels>; using McTracksRun3 = soa::Join; + aod::TracksDCA, aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullHe, aod::pidTOFmass, aod::pidTOFbeta, aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCTr, aod::pidTPCAl, aod::McTrackLabels>; using BCsWithRun2Info = soa::Join; using McCollisions = soa::Join; @@ -336,7 +336,7 @@ struct AngularCorrelationsInJets { template bool singleSpeciesTPCNSigma(T const& track, int species) // make cut configurable - { // reject any track that has nsigma < 3 for more than 1 species + { // reject any track that has nsigma < 3 for more than 1 species if (track.tpcNSigmaStoreEl() < fNSigmaRejection || track.tpcNSigmaStoreMu() < fNSigmaRejection || track.tpcNSigmaStorePi() < fNSigmaRejection || track.tpcNSigmaStoreKa() < fNSigmaRejection || track.tpcNSigmaStoreTr() < fNSigmaRejection || track.tpcNSigmaStoreAl() < fNSigmaRejection) return false; switch (species) { @@ -368,12 +368,12 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaPr() : 999; - if ((track.pt() < fProtonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > fProtonNsigma)) || (track.pt() > fProtonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > fProtonNsigma))) - if (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > fProtonNsigma) - return false; + if ((track.pt() < fProtonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > fProtonNsigma)) || (track.pt() > fProtonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + tofNsigma * tofNsigma) > fProtonNsigma))) + if (TMath::Sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + tofNsigma * tofNsigma) > fProtonNsigma) + return false; if (!singleSpeciesTPCNSigma(track, 1)) return false; - } else { // for yields + } else { // for yields // DCA if (TMath::Abs(track.dcaXY()) > fProtonDCAxyYield) return false; @@ -418,7 +418,7 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaPr() : 999; - if ((track.pt() < fAntiprotonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > fAntiprotonNsigma)) || (track.pt() > fAntiprotonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > fAntiprotonNsigma))) + if ((track.pt() < fAntiprotonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > fAntiprotonNsigma)) || (track.pt() > fAntiprotonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + tofNsigma * tofNsigma) > fAntiprotonNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 1)) return false; @@ -467,7 +467,7 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaDe() : 999; - if ((track.pt() < fNucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > fNucleiNsigma)) || (track.pt() > fNucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe()*track.tpcNSigmaDe() + tofNsigma*tofNsigma) > fNucleiNsigma))) + if ((track.pt() < fNucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > fNucleiNsigma)) || (track.pt() > fNucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe() * track.tpcNSigmaDe() + tofNsigma * tofNsigma) > fNucleiNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 2)) return false; @@ -507,7 +507,7 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaHe() : 999; - if ((track.pt() < fNucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > fNucleiNsigma)) || (track.pt() > fNucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe()*track.tpcNSigmaHe() + tofNsigma*tofNsigma) > fNucleiNsigma))) + if ((track.pt() < fNucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > fNucleiNsigma)) || (track.pt() > fNucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe() * track.tpcNSigmaHe() + tofNsigma * tofNsigma) > fNucleiNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 3)) return false; @@ -558,7 +558,7 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaDe() : 999; - if ((track.pt() < fAntinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > fAntinucleiNsigma)) || (track.pt() > fAntinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe()*track.tpcNSigmaDe() + tofNsigma*tofNsigma) > fAntinucleiNsigma))) + if ((track.pt() < fAntinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > fAntinucleiNsigma)) || (track.pt() > fAntinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe() * track.tpcNSigmaDe() + tofNsigma * tofNsigma) > fAntinucleiNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 2)) return false; @@ -598,7 +598,7 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaHe() : 999; - if ((track.pt() < fAntinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > fAntinucleiNsigma)) || (track.pt() > fAntinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe()*track.tpcNSigmaHe() + tofNsigma*tofNsigma) > fAntinucleiNsigma))) + if ((track.pt() < fAntinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > fAntinucleiNsigma)) || (track.pt() > fAntinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe() * track.tpcNSigmaHe() + tofNsigma * tofNsigma) > fAntinucleiNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 3)) return false; @@ -1319,7 +1319,7 @@ struct AngularCorrelationsInJets { registryData.fill(HIST("hEventProtocol"), 1); auto slicedTracks = tracks.sliceBy(perCollisionMcTracksRun2, collision.globalIndex()); - + fillHistogramsMC(slicedTracks); } } From a4d92e0c45fb60b8344de5a5be0623e0bab01d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20J=C3=B6rgensen?= Date: Mon, 16 Dec 2024 14:14:17 +0100 Subject: [PATCH 08/10] renamed configurables in accordance with o2-linter --- .../Nuspex/AngularCorrelationsInJets.cxx | 268 +++++++++--------- 1 file changed, 134 insertions(+), 134 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx index bccbc4376ab..aceb85d804f 100644 --- a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx +++ b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx @@ -55,75 +55,75 @@ struct AxisSpecs { struct AngularCorrelationsInJets { // Preliminary Cuts - Configurable fMinNCrossedRowsTPC{"minNCrossedRowsTPC", 70, "min number of crossed rows TPC"}; - Configurable fMinReqClusterITS{"minReqClusterITS", 2, "min number of clusters required in ITS"}; - Configurable fMinReqClusterTPC{"minReqClusterTPC", 70, "min number of clusters required in TPC"}; - Configurable fMinRatioCrossedRowsTPC{"minRatioCrossedRowsTPC", 0.7, "min ratio of crossed rows over findable clusters TPC"}; - Configurable fMaxChi2ITS{"maxChi2ITS", 36.0, "max chi2 per cluster ITS"}; - Configurable fMaxChi2TPC{"maxChi2TPC", 4.0, "max chi2 per cluster TPC"}; - Configurable fMaxDCAxy{"maxDCA_xy", 0.5, "max DCA to vertex xy"}; - Configurable fMaxDCAz{"maxDCA_z", 1.0, "max DCA to vertex z"}; - Configurable fMaxEta{"maxEta", 0.8, "max pseudorapidity"}; // consider jet cone? + Configurable minNCrossedRowsTPC{"minNCrossedRowsTPC", 70, "min number of crossed rows TPC"}; + Configurable minReqClusterITS{"minReqClusterITS", 2, "min number of clusters required in ITS"}; + Configurable minReqClusterTPC{"minReqClusterTPC", 70, "min number of clusters required in TPC"}; + Configurable minRatioCrossedRowsTPC{"minRatioCrossedRowsTPC", 0.7, "min ratio of crossed rows over findable clusters TPC"}; + Configurable maxChi2ITS{"maxChi2ITS", 36.0, "max chi2 per cluster ITS"}; + Configurable maxChi2TPC{"maxChi2TPC", 4.0, "max chi2 per cluster TPC"}; + Configurable maxDCAxy{"maxDCAxy", 0.5, "max DCA to vertex xy"}; + Configurable maxDCAz{"maxDCAz", 1.0, "max DCA to vertex z"}; + Configurable maxEta{"maxEta", 0.8, "max pseudorapidity"}; // consider jet cone? // Jet Cuts - Configurable fJetR{"jetR", 0.4, "jet resolution parameter"}; - Configurable fMinJetPt{"minJetPt", 5.0, "minimum total pT to accept jet"}; - Configurable fMinJetParticlePt{"minJetParticlePt", 0.0, "minimum pT to accept jet particle"}; + Configurable jetR{"jetR", 0.4, "jet resolution parameter"}; + Configurable minJetPt{"minJetPt", 5.0, "minimum total pT to accept jet"}; + Configurable minJetParticlePt{"minJetParticlePt", 0.0, "minimum pT to accept jet particle"}; // Proton Cuts - Configurable fProtonDCAxyYield{"protonDCAxyYield", 0.05, "[proton] DCAxy cut for yield"}; - Configurable fProtonDCAzYield{"protonDCAzYield", 1.0, "[proton] DCAz cut for yield"}; - Configurable fProtonDCAxyCF{"protonDCAxyCF", 0.05, "[proton] DCAxy cut for CF"}; - Configurable fProtonDCAzCF{"protonDCAzCF", 1.0, "[proton] DCAz cut for CF"}; - Configurable fProtonTPCTOFpT{"protonTPCTOFswitchpT", 0.7, "[proton] pT for switch in TPC/TOF nsigma"}; - Configurable fProtonTPCnsigLowYield{"protonTPCnsigmaLowPtYield", 4.0, "[proton] max TPC nsigma with low pT for yield"}; - Configurable fProtonTPCnsigHighYield{"protonTPCnsigmaHighPtYield", 4.0, "[proton] max TPC nsigma with high pT for yield"}; - Configurable fProtonTOFnsigYield{"protonTOFnsigmaHighPtYield", 4.0, "[proton] max TOF nsigma with high pT yield"}; - Configurable fProtonNsigma{"protonNsigma", 2.0, "[proton] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; + Configurable protonDCAxyYield{"protonDCAxyYield", 0.05, "[proton] DCAxy cut for yield"}; + Configurable protonDCAzYield{"protonDCAzYield", 1.0, "[proton] DCAz cut for yield"}; + Configurable protonDCAxyCF{"protonDCAxyCF", 0.05, "[proton] DCAxy cut for CF"}; + Configurable protonDCAzCF{"protonDCAzCF", 1.0, "[proton] DCAz cut for CF"}; + Configurable protonTPCTOFpT{"protonTPCTOFpT", 0.7, "[proton] pT for switch in TPC/TPC+TOF nsigma"}; + Configurable protonTPCnsigmaLowPtYield{"protonTPCnsigmaLowPtYield", 4.0, "[proton] max TPC nsigma with low pT for yield"}; + Configurable protonTPCnsigmaHighPtYield{"protonTPCnsigmaHighPtYield", 4.0, "[proton] max TPC nsigma with high pT for yield"}; + Configurable protonTOFnsigmaHighPtYield{"protonTOFnsigmaHighPtYield", 4.0, "[proton] max TOF nsigma with high pT yield"}; + Configurable protonNsigma{"protonNsigma", 2.0, "[proton] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; // Antiproton Cuts - Configurable fAntiprotonDCAxyYield{"antiprotonDCAxyYield", 0.05, "[antiproton] DCAxy cut for yield"}; - Configurable fAntiprotonDCAzYield{"antiprotonDCAzYield", 1.0, "[antiproton] DCAz cut for yield"}; - Configurable fAntiprotonDCAxyCF{"antiprotonDCAxyCF", 0.05, "[antiproton] DCAxy cut for CF"}; - Configurable fAntiprotonDCAzCF{"antiprotonDCAzCF", 1.0, "[antiproton] DCAz cut for CF"}; - Configurable fAntiprotonTPCTOFpT{"antiprotonTPCTOFswitchpT", 0.7, "[antiproton] pT for switch in TPC/TOF nsigma"}; - Configurable fAntiprotonTPCnsigLowYield{"antiprotonTPCnsigmaLowPtYield", 4.0, "[antiproton] max TPC nsigma with low pT for yield"}; - Configurable fAntiprotonTPCnsigHighYield{"antiprotonTPCnsigmaHighPtYield", 4.0, "[antiproton] max TPC nsigma with high pT for yield"}; - Configurable fAntiprotonTOFnsigYield{"antiprotonTOFnsigmaHighPtYield", 4.0, "[antiproton] min TOF nsigma with high pT for yield"}; - Configurable fAntiprotonNsigma{"antiprotonNsigma", 2.0, "[antiproton] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; + Configurable antiprotonDCAxyYield{"antiprotonDCAxyYield", 0.05, "[antiproton] DCAxy cut for yield"}; + Configurable antiprotonDCAzYield{"antiprotonDCAzYield", 1.0, "[antiproton] DCAz cut for yield"}; + Configurable antiprotonDCAxyCF{"antiprotonDCAxyCF", 0.05, "[antiproton] DCAxy cut for CF"}; + Configurable antiprotonDCAzCF{"antiprotonDCAzCF", 1.0, "[antiproton] DCAz cut for CF"}; + Configurable antiprotonTPCTOFpT{"antiprotonTPCTOFpT", 0.7, "[antiproton] pT for switch in TPC/TPC+TOF nsigma"}; + Configurable antiprotonTPCnsigmaLowPtYield{"antiprotonTPCnsigmaLowPtYield", 4.0, "[antiproton] max TPC nsigma with low pT for yield"}; + Configurable antiprotonTPCnsigmaHighPtYield{"antiprotonTPCnsigmaHighPtYield", 4.0, "[antiproton] max TPC nsigma with high pT for yield"}; + Configurable antiprotonTOFnsigmaHighPtYield{"antiprotonTOFnsigmaHighPtYield", 4.0, "[antiproton] min TOF nsigma with high pT for yield"}; + Configurable antiprotonNsigma{"antiprotonNsigma", 2.0, "[antiproton] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; // Nuclei Cuts - Configurable fNucleiDCAxyYield{"nucleiDCAxyYield", 0.05, "[nuclei] DCAxy cut for yield"}; - Configurable fNucleiDCAzYield{"nucleiDCAzYield", 1.0, "[nuclei] DCAz cut for yield"}; - Configurable fNucleiDCAxyCF{"nucleiDCAxyCF", 0.05, "[nuclei] DCAxy cut for CF"}; - Configurable fNucleiDCAzCF{"nucleiDCAzCF", 1.0, "[nuclei] DCAz cut for CF"}; - Configurable fNucleiTPCTOFpT{"nucleiTPCTOFswitchpT", 0.7, "[nuclei] pT for switch in TPC/TOF nsigma"}; - Configurable fNucleiTPCnsigLowYield{"nucleiTPCnsigmaLowPtYield", 4.0, "[nuclei] max TPC nsigma with low pT for yield"}; - Configurable fNucleiTPCnsigHighYield{"nucleiTPCnsigmaHighPtYield", 4.0, "[nuclei] max TPC nsigma with high pT for yield"}; - Configurable fNucleiTOFnsigYield{"nucleiTOFnsigmaHighPtYield", 4.0, "[nuclei] min TOF nsigma with high pT for yield"}; - Configurable fNucleiNsigma{"nucleiNsigma", 2.0, "[nuclei] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; + Configurable nucleiDCAxyYield{"nucleiDCAxyYield", 0.05, "[nuclei] DCAxy cut for yield"}; + Configurable nucleiDCAzYield{"nucleiDCAzYield", 1.0, "[nuclei] DCAz cut for yield"}; + Configurable nucleiDCAxyCF{"nucleiDCAxyCF", 0.05, "[nuclei] DCAxy cut for CF"}; + Configurable nucleiDCAzCF{"nucleiDCAzCF", 1.0, "[nuclei] DCAz cut for CF"}; + Configurable nucleiTPCTOFpT{"nucleiTPCTOFpT", 0.7, "[nuclei] pT for switch in TPC/TPC+TOF nsigma"}; + Configurable nucleiTPCnsigmaLowPtYield{"nucleiTPCnsigmaLowPtYield", 4.0, "[nuclei] max TPC nsigma with low pT for yield"}; + Configurable nucleiTPCnsigmaHighPtYield{"nucleiTPCnsigmaHighPtYield", 4.0, "[nuclei] max TPC nsigma with high pT for yield"}; + Configurable nucleiTOFnsigmaHighPtYield{"nucleiTOFnsigmaHighPtYield", 4.0, "[nuclei] min TOF nsigma with high pT for yield"}; + Configurable nucleiNsigma{"nucleiNsigma", 2.0, "[nuclei] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; // Antinuclei Cuts - Configurable fAntinucleiDCAxyYield{"antinucleiDCAxyYield", 0.05, "[antinuclei] DCAxy cut for yield"}; - Configurable fAntinucleiDCAzYield{"antinucleiDCAzYield", 1.0, "[antinuclei] DCAz cut for yield"}; - Configurable fAntinucleiDCAxyCF{"antinucleiDCAxyCF", 0.05, "[antinuclei] DCAxy cut for CF"}; - Configurable fAntinucleiDCAzCF{"antinucleiDCAzCF", 1.0, "[antinuclei] DCAz cut for CF"}; - Configurable fAntinucleiTPCTOFpT{"antinucleiTPCTOFswitchpT", 0.7, "[antinuclei] pT for switch in TPC/TOF nsigma"}; - Configurable fAntinucleiTPCnsigLowYield{"antinucleiTPCnsigmaLowPtYield", 4.0, "[antinuclei] max TPC nsigma with low pT for yield"}; - Configurable fAntinucleiTPCnsigHighYield{"antinucleiTPCnsigmaHighPtYield", 4.0, "[antinuclei] max TPC nsigma with high pT for yield"}; - Configurable fAntinucleiTOFnsigYield{"antinucleiTOFnsigmaHighPtYield", 4.0, "[antinuclei] min TOF nsigma with high pT for yield"}; - Configurable fAntinucleiNsigma{"antinucleiNsigma", 2.0, "[nuclei] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; + Configurable antinucleiDCAxyYield{"antinucleiDCAxyYield", 0.05, "[antinuclei] DCAxy cut for yield"}; + Configurable antinucleiDCAzYield{"antinucleiDCAzYield", 1.0, "[antinuclei] DCAz cut for yield"}; + Configurable antinucleiDCAxyCF{"antinucleiDCAxyCF", 0.05, "[antinuclei] DCAxy cut for CF"}; + Configurable antinucleiDCAzCF{"antinucleiDCAzCF", 1.0, "[antinuclei] DCAz cut for CF"}; + Configurable antinucleiTPCTOFpT{"antinucleiTPCTOFpT", 0.7, "[antinuclei] pT for switch in TPC/TPC+TOF nsigma"}; + Configurable antinucleiTPCnsigmaLowPtYield{"antinucleiTPCnsigmaLowPtYield", 4.0, "[antinuclei] max TPC nsigma with low pT for yield"}; + Configurable antinucleiTPCnsigmaHighPtYield{"antinucleiTPCnsigmaHighPtYield", 4.0, "[antinuclei] max TPC nsigma with high pT for yield"}; + Configurable antinucleiTOFnsigmaHighPtYield{"antinucleiTOFnsigmaHighPtYield", 4.0, "[antinuclei] min TOF nsigma with high pT for yield"}; + Configurable antinucleiNsigma{"antinucleiNsigma", 2.0, "[nuclei] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; - Configurable fNSigmaRejection{"nsigmaRejection", 3.0, "particles with TPC nsigma < nsigmaRejection other than the species in question will be rejected"}; + Configurable nsigmaRejection{"nsigmaRejection", 3.0, "particles with TPC nsigma < nsigmaRejection other than the species in question will be rejected"}; - Configurable fDeuteronAnalysis{"deuteronAnalysis", true, "true [false]: analyse (anti)deuterons [(anti)helium-3]"}; - Configurable fUseTOFMass{"useTOFmass", true, "use TOF mass instead of pion mass if available"}; + Configurable deuteronAnalysis{"deuteronAnalysis", true, "true [false]: analyse (anti)deuterons [(anti)helium-3]"}; + Configurable useTOFmass{"useTOFmass", true, "use TOF mass instead of pion mass if available"}; - Configurable fBufferSize{"trackBufferSize", 200, "Number of mixed-event tracks being stored"}; + Configurable trackBufferSize{"trackBufferSize", 200, "Number of mixed-event tracks being stored"}; // QC Configurables - Configurable fZVtx{"zVtx", 10.0, "max zVertex"}; - Configurable fRmax{"Rmax", 0.4, "Maximum radius for jet and UE regions"}; + Configurable zVtx{"zVtx", 10.0, "max zVertex"}; + Configurable Rmax{"Rmax", 0.4, "Maximum radius for jet and UE regions"}; Service ccdb; int mRunNumber; @@ -139,11 +139,11 @@ struct AngularCorrelationsInJets { using BCsWithRun2Info = soa::Join; using McCollisions = soa::Join; - Filter prelimTrackCuts = (aod::track::itsChi2NCl < fMaxChi2ITS && - aod::track::tpcChi2NCl < fMaxChi2TPC && - nabs(aod::track::dcaXY) < fMaxDCAxy && - nabs(aod::track::dcaZ) < fMaxDCAz && - nabs(aod::track::eta) < fMaxEta); // add more preliminary cuts to filter if possible + Filter prelimTrackCuts = (aod::track::itsChi2NCl < maxChi2ITS && + aod::track::tpcChi2NCl < maxChi2TPC && + nabs(aod::track::dcaXY) < maxDCAxy && + nabs(aod::track::dcaZ) < maxDCAz && + nabs(aod::track::eta) < maxEta); // add more preliminary cuts to filter if possible Preslice perCollisionFullTracksRun2 = o2::aod::track::collisionId; Preslice perCollisionFullTracksRun3 = o2::aod::track::collisionId; @@ -318,10 +318,10 @@ struct AngularCorrelationsInJets { template bool selectTrack(T const& track) // preliminary track selections { - if (track.tpcNClsCrossedRows() < fMinRatioCrossedRowsTPC * track.tpcNClsFindable() || - track.tpcNClsCrossedRows() < fMinNCrossedRowsTPC || - track.tpcNClsFound() < fMinReqClusterTPC || - track.itsNCls() < fMinReqClusterITS) { + if (track.tpcNClsCrossedRows() < minRatioCrossedRowsTPC * track.tpcNClsFindable() || + track.tpcNClsCrossedRows() < minNCrossedRowsTPC || + track.tpcNClsFound() < minReqClusterTPC || + track.itsNCls() < minReqClusterITS) { return false; } if (doprocessRun2 || doprocessMCRun2) { @@ -337,15 +337,15 @@ struct AngularCorrelationsInJets { template bool singleSpeciesTPCNSigma(T const& track, int species) // make cut configurable { // reject any track that has nsigma < 3 for more than 1 species - if (track.tpcNSigmaStoreEl() < fNSigmaRejection || track.tpcNSigmaStoreMu() < fNSigmaRejection || track.tpcNSigmaStorePi() < fNSigmaRejection || track.tpcNSigmaStoreKa() < fNSigmaRejection || track.tpcNSigmaStoreTr() < fNSigmaRejection || track.tpcNSigmaStoreAl() < fNSigmaRejection) + if (track.tpcNSigmaStoreEl() < nsigmaRejection || track.tpcNSigmaStoreMu() < nsigmaRejection || track.tpcNSigmaStorePi() < nsigmaRejection || track.tpcNSigmaStoreKa() < nsigmaRejection || track.tpcNSigmaStoreTr() < nsigmaRejection || track.tpcNSigmaStoreAl() < nsigmaRejection) return false; switch (species) { case 1: // (anti)proton - return (track.tpcNSigmaPr() < fNSigmaRejection && track.tpcNSigmaDe() > fNSigmaRejection && track.tpcNSigmaHe() > fNSigmaRejection); + return (track.tpcNSigmaPr() < nsigmaRejection && track.tpcNSigmaDe() > nsigmaRejection && track.tpcNSigmaHe() > nsigmaRejection); case 2: // (anti)deuteron - return (track.tpcNSigmaDe() < fNSigmaRejection && track.tpcNSigmaPr() > fNSigmaRejection && track.tpcNSigmaHe() > fNSigmaRejection); + return (track.tpcNSigmaDe() < nsigmaRejection && track.tpcNSigmaPr() > nsigmaRejection && track.tpcNSigmaHe() > nsigmaRejection); case 3: // (anti)helium-3 - return (track.tpcNSigmaHe() < fNSigmaRejection && track.tpcNSigmaDe() > fNSigmaRejection && track.tpcNSigmaPr() > fNSigmaRejection); + return (track.tpcNSigmaHe() < nsigmaRejection && track.tpcNSigmaDe() > nsigmaRejection && track.tpcNSigmaPr() > nsigmaRejection); } } @@ -357,9 +357,9 @@ struct AngularCorrelationsInJets { if (tightCuts) { // for correlation function // DCA - if (TMath::Abs(track.dcaXY()) > fProtonDCAxyCF) + if (TMath::Abs(track.dcaXY()) > protonDCAxyCF) return false; - if (TMath::Abs(track.dcaZ()) > fProtonDCAzCF) + if (TMath::Abs(track.dcaZ()) > protonDCAzCF) return false; registryData.fill(HIST("hTPCnsigmaProtonCF"), track.pt(), track.tpcNSigmaPr()); @@ -368,30 +368,30 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaPr() : 999; - if ((track.pt() < fProtonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > fProtonNsigma)) || (track.pt() > fProtonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > fProtonNsigma))) - if (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > fProtonNsigma) + if ((track.pt() < protonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > protonNsigma)) || (track.pt() > protonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > protonNsigma))) + if (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > protonNsigma) return false; if (!singleSpeciesTPCNSigma(track, 1)) return false; } else { // for yields // DCA - if (TMath::Abs(track.dcaXY()) > fProtonDCAxyYield) + if (TMath::Abs(track.dcaXY()) > protonDCAxyYield) return false; - if (TMath::Abs(track.dcaZ()) > fProtonDCAzYield) + if (TMath::Abs(track.dcaZ()) > protonDCAzYield) return false; registryData.fill(HIST("hTPCnsigmaProton"), track.pt(), track.tpcNSigmaPr()); // TPC - if (track.pt() < fProtonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > fProtonTPCnsigLowYield) + if (track.pt() < protonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > protonTPCnsigmaLowPtYield) return false; - if (track.pt() > fProtonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > fProtonTPCnsigHighYield) + if (track.pt() > protonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > protonTPCnsigmaHighPtYield) return false; // TOF if (track.hasTOF()) { registryData.fill(HIST("hTOFnsigmaProton"), track.pt(), track.tofNSigmaPr()); - if (track.pt() > fProtonTPCTOFpT && TMath::Abs(track.tofNSigmaPr()) > fProtonTOFnsigYield) + if (track.pt() > protonTPCTOFpT && TMath::Abs(track.tofNSigmaPr()) > protonTOFnsigmaHighPtYield) return false; } } @@ -407,9 +407,9 @@ struct AngularCorrelationsInJets { if (tightCuts) { // for correlation function // DCA - if (TMath::Abs(track.dcaXY()) > fAntiprotonDCAxyCF) + if (TMath::Abs(track.dcaXY()) > antiprotonDCAxyCF) return false; - if (TMath::Abs(track.dcaZ()) > fAntiprotonDCAzCF) + if (TMath::Abs(track.dcaZ()) > antiprotonDCAzCF) return false; registryData.fill(HIST("hTPCnsigmaAntiprotonCF"), track.pt(), track.tpcNSigmaPr()); @@ -418,29 +418,29 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaPr() : 999; - if ((track.pt() < fAntiprotonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > fAntiprotonNsigma)) || (track.pt() > fAntiprotonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > fAntiprotonNsigma))) + if ((track.pt() < antiprotonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > antiprotonNsigma)) || (track.pt() > antiprotonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > antiprotonNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 1)) return false; } else { // for yields // DCA - if (TMath::Abs(track.dcaXY()) > fAntiprotonDCAxyYield) + if (TMath::Abs(track.dcaXY()) > antiprotonDCAxyYield) return false; - if (TMath::Abs(track.dcaZ()) > fAntiprotonDCAzYield) + if (TMath::Abs(track.dcaZ()) > antiprotonDCAzYield) return false; registryData.fill(HIST("hTPCnsigmaAntiproton"), track.pt(), track.tpcNSigmaPr()); // TPC - if (track.pt() < fAntiprotonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > fAntiprotonTPCnsigLowYield) + if (track.pt() < antiprotonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > antiprotonTPCnsigmaLowPtYield) return false; - if (track.pt() > fAntiprotonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > fAntiprotonTPCnsigHighYield) + if (track.pt() > antiprotonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > antiprotonTPCnsigmaHighPtYield) return false; // TOF if (track.hasTOF()) { registryData.fill(HIST("hTOFnsigmaAntiproton"), track.pt(), track.tofNSigmaPr()); - if (track.pt() > fAntiprotonTPCTOFpT && TMath::Abs(track.tofNSigmaPr()) > fAntiprotonTOFnsigYield) + if (track.pt() > antiprotonTPCTOFpT && TMath::Abs(track.tofNSigmaPr()) > antiprotonTOFnsigmaHighPtYield) return false; } } @@ -453,12 +453,12 @@ struct AngularCorrelationsInJets { { if (track.sign() < 0) return false; - if (fDeuteronAnalysis) { + if (deuteronAnalysis) { if (tightCuts) { // for correlation function // DCA - if (TMath::Abs(track.dcaXY()) > fNucleiDCAxyCF) + if (TMath::Abs(track.dcaXY()) > nucleiDCAxyCF) return false; - if (TMath::Abs(track.dcaZ()) > fNucleiDCAzCF) + if (TMath::Abs(track.dcaZ()) > nucleiDCAzCF) return false; registryData.fill(HIST("hTPCnsigmaNucleiCF"), track.pt(), track.tpcNSigmaDe()); @@ -467,38 +467,38 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaDe() : 999; - if ((track.pt() < fNucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > fNucleiNsigma)) || (track.pt() > fNucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe()*track.tpcNSigmaDe() + tofNsigma*tofNsigma) > fNucleiNsigma))) + if ((track.pt() < nucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > nucleiNsigma)) || (track.pt() > nucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe()*track.tpcNSigmaDe() + tofNsigma*tofNsigma) > nucleiNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 2)) return false; } else { // for yields // DCA - if (TMath::Abs(track.dcaXY()) > fNucleiDCAxyYield) + if (TMath::Abs(track.dcaXY()) > nucleiDCAxyYield) return false; - if (TMath::Abs(track.dcaZ()) > fNucleiDCAzYield) + if (TMath::Abs(track.dcaZ()) > nucleiDCAzYield) return false; registryData.fill(HIST("hTPCnsigmaNuclei"), track.pt(), track.tpcNSigmaDe()); // TPC - if (track.pt() < fNucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > fNucleiTPCnsigLowYield) + if (track.pt() < nucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > nucleiTPCnsigmaLowPtYield) return false; - if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > fNucleiTPCnsigHighYield) + if (track.pt() > nucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > nucleiTPCnsigmaHighPtYield) return false; // TOF if (track.hasTOF()) { registryData.fill(HIST("hTOFnsigmaNuclei"), track.pt(), track.tofNSigmaDe()); - if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tofNSigmaDe()) > fNucleiTOFnsigYield) + if (track.pt() > nucleiTPCTOFpT && TMath::Abs(track.tofNSigmaDe()) > nucleiTOFnsigmaHighPtYield) return false; } } } else { if (tightCuts) { // for correlation function - including for helium just in case, but realistically, angular correlations won't be a thing here // DCA - if (TMath::Abs(track.dcaXY()) > fNucleiDCAxyCF) + if (TMath::Abs(track.dcaXY()) > nucleiDCAxyCF) return false; - if (TMath::Abs(track.dcaZ()) > fNucleiDCAzCF) + if (TMath::Abs(track.dcaZ()) > nucleiDCAzCF) return false; registryData.fill(HIST("hTPCnsigmaNucleiCF"), track.pt(), track.tpcNSigmaHe()); @@ -507,29 +507,29 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaHe() : 999; - if ((track.pt() < fNucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > fNucleiNsigma)) || (track.pt() > fNucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe()*track.tpcNSigmaHe() + tofNsigma*tofNsigma) > fNucleiNsigma))) + if ((track.pt() < nucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > nucleiNsigma)) || (track.pt() > nucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe()*track.tpcNSigmaHe() + tofNsigma*tofNsigma) > nucleiNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 3)) return false; } else { // for yields // DCA - if (TMath::Abs(track.dcaXY()) > fNucleiDCAxyYield) + if (TMath::Abs(track.dcaXY()) > nucleiDCAxyYield) return false; - if (TMath::Abs(track.dcaZ()) > fNucleiDCAzYield) + if (TMath::Abs(track.dcaZ()) > nucleiDCAzYield) return false; registryData.fill(HIST("hTPCnsigmaNuclei"), track.pt(), track.tpcNSigmaHe()); // TPC - if (track.pt() < fNucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > fNucleiTPCnsigLowYield) + if (track.pt() < nucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > nucleiTPCnsigmaLowPtYield) return false; - if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > fNucleiTPCnsigHighYield) + if (track.pt() > nucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > nucleiTPCnsigmaHighPtYield) return false; // TOF if (track.hasTOF()) { registryData.fill(HIST("hTOFnsigmaNuclei"), track.pt(), track.tofNSigmaHe()); - if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tofNSigmaHe()) > fNucleiTOFnsigYield) + if (track.pt() > nucleiTPCTOFpT && TMath::Abs(track.tofNSigmaHe()) > nucleiTOFnsigmaHighPtYield) return false; } } @@ -544,12 +544,12 @@ struct AngularCorrelationsInJets { if (track.sign() > 0) return false; - if (fDeuteronAnalysis) { + if (deuteronAnalysis) { if (tightCuts) { // for correlation function // DCA - if (TMath::Abs(track.dcaXY()) > fAntinucleiDCAxyCF) + if (TMath::Abs(track.dcaXY()) > antinucleiDCAxyCF) return false; - if (TMath::Abs(track.dcaZ()) > fAntinucleiDCAzCF) + if (TMath::Abs(track.dcaZ()) > antinucleiDCAzCF) return false; registryData.fill(HIST("hTPCnsigmaAntinucleiCF"), track.pt(), track.tpcNSigmaDe()); @@ -558,38 +558,38 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaDe() : 999; - if ((track.pt() < fAntinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > fAntinucleiNsigma)) || (track.pt() > fAntinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe()*track.tpcNSigmaDe() + tofNsigma*tofNsigma) > fAntinucleiNsigma))) + if ((track.pt() < antinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > antinucleiNsigma)) || (track.pt() > antinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe()*track.tpcNSigmaDe() + tofNsigma*tofNsigma) > antinucleiNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 2)) return false; } else { // for yields // DCA - if (TMath::Abs(track.dcaXY()) > fAntinucleiDCAxyYield) + if (TMath::Abs(track.dcaXY()) > antinucleiDCAxyYield) return false; - if (TMath::Abs(track.dcaZ()) > fAntinucleiDCAzYield) + if (TMath::Abs(track.dcaZ()) > antinucleiDCAzYield) return false; registryData.fill(HIST("hTPCnsigmaAntinuclei"), track.pt(), track.tpcNSigmaDe()); // TPC - if (track.pt() < fAntinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > fAntinucleiTPCnsigLowYield) + if (track.pt() < antinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > antinucleiTPCnsigmaLowPtYield) return false; - if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > fAntinucleiTPCnsigHighYield) + if (track.pt() > antinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > antinucleiTPCnsigmaHighPtYield) return false; // TOF if (track.hasTOF()) { registryData.fill(HIST("hTOFnsigmaAntinuclei"), track.pt(), track.tofNSigmaDe()); - if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tofNSigmaDe()) > fAntinucleiTOFnsigYield) + if (track.pt() > antinucleiTPCTOFpT && TMath::Abs(track.tofNSigmaDe()) > antinucleiTOFnsigmaHighPtYield) return false; } } } else { if (tightCuts) { // for correlation function - including for antihelium just in case, but realistically, angular correlations won't be a thing here // DCA - if (TMath::Abs(track.dcaXY()) > fAntinucleiDCAxyCF) + if (TMath::Abs(track.dcaXY()) > antinucleiDCAxyCF) return false; - if (TMath::Abs(track.dcaZ()) > fAntinucleiDCAzCF) + if (TMath::Abs(track.dcaZ()) > antinucleiDCAzCF) return false; registryData.fill(HIST("hTPCnsigmaAntinucleiCF"), track.pt(), track.tpcNSigmaHe()); @@ -598,29 +598,29 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaHe() : 999; - if ((track.pt() < fAntinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > fAntinucleiNsigma)) || (track.pt() > fAntinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe()*track.tpcNSigmaHe() + tofNsigma*tofNsigma) > fAntinucleiNsigma))) + if ((track.pt() < antinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > antinucleiNsigma)) || (track.pt() > antinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe()*track.tpcNSigmaHe() + tofNsigma*tofNsigma) > antinucleiNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 3)) return false; } else { // for yields // DCA - if (TMath::Abs(track.dcaXY()) > fAntinucleiDCAxyYield) + if (TMath::Abs(track.dcaXY()) > antinucleiDCAxyYield) return false; - if (TMath::Abs(track.dcaZ()) > fAntinucleiDCAzYield) + if (TMath::Abs(track.dcaZ()) > antinucleiDCAzYield) return false; registryData.fill(HIST("hTPCnsigmaAntinuclei"), track.pt(), track.tpcNSigmaHe()); // TPC - if (track.pt() < fAntinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > fAntinucleiTPCnsigLowYield) + if (track.pt() < antinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > antinucleiTPCnsigmaLowPtYield) return false; - if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > fAntinucleiTPCnsigHighYield) + if (track.pt() > antinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > antinucleiTPCnsigmaHighPtYield) return false; // TOF if (track.hasTOF()) { registryData.fill(HIST("hTOFnsigmaAntinuclei"), track.pt(), track.tofNSigmaHe()); - if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tofNSigmaHe()) > fAntinucleiTOFnsigYield) + if (track.pt() > antinucleiTPCTOFpT && TMath::Abs(track.tofNSigmaHe()) > antinucleiTOFnsigmaHighPtYield) return false; } } @@ -632,10 +632,10 @@ struct AngularCorrelationsInJets { void setTrackBuffer(const auto& tempBuffer, auto& buffer) // refresh track buffer { for (const auto& pair : tempBuffer) { - if (static_cast(buffer.size()) == fBufferSize) { + if (static_cast(buffer.size()) == trackBufferSize) { buffer.insert(buffer.begin(), pair); - buffer.resize(fBufferSize); - } else if (static_cast(buffer.size()) < fBufferSize) { + buffer.resize(trackBufferSize); + } else if (static_cast(buffer.size()) < trackBufferSize) { buffer.emplace_back(pair); } } @@ -825,7 +825,7 @@ struct AngularCorrelationsInJets { fastjet::PseudoJet subtractedJetArea(0., 0., 0., 0.); subtractedJetArea = bkgSub.doRhoAreaSub(jet, rho, rhoM); - if (subtractedJetPerp.pt() < fMinJetPt) // cut on jet w/o bkg + if (subtractedJetPerp.pt() < minJetPt) // cut on jet w/o bkg return jetCounter; registryData.fill(HIST("hPtTotalSubJetPerp"), subtractedJetPerp.pt()); registryData.fill(HIST("hPtTotalSubJetArea"), subtractedJetArea.pt()); @@ -894,19 +894,19 @@ struct AngularCorrelationsInJets { double deltaPhiUE2 = getDeltaPhi(particleDir.Phi(), UEAxis2.Phi()); double deltaRUE2 = sqrt(deltaEtaUE2 * deltaEtaUE2 + deltaPhiUE2 * deltaPhiUE2); - if (deltaRJet < fRmax) { + if (deltaRJet < Rmax) { if (deltaPhiJet != -999) registryQA.fill(HIST("hDeltaEtadeltaPhiJet"), deltaEtaJet, deltaPhiJet); NchJetPlusUE++; ptJetPlusUE = ptJetPlusUE + track.pt(); } - if (deltaRUE1 < fRmax) { + if (deltaRUE1 < Rmax) { if (deltaPhiUE1 != -999) registryQA.fill(HIST("hDeltaEtadeltaPhiUE"), deltaEtaUE1, deltaPhiUE1); NchUE++; ptUE = ptUE + track.pt(); } - if (deltaRUE2 < fRmax) { + if (deltaRUE2 < Rmax) { if (deltaPhiUE2 != -999) registryQA.fill(HIST("hDeltaEtadeltaPhiUE"), deltaEtaUE2, deltaPhiUE2); NchUE++; @@ -927,7 +927,7 @@ struct AngularCorrelationsInJets { int nPartClusteredJet = static_cast(constituents.size()); // Fill QA Histograms - if (ptJetPlusUE < fMinJetPt) { // swap for sub pt? + if (ptJetPlusUE < minJetPt) { // swap for sub pt? registryQA.fill(HIST("hNParticlesClusteredInJet"), nPartClusteredJet); @@ -963,7 +963,7 @@ struct AngularCorrelationsInJets { double ptDiff = pseudoParticle.pt() - jetParticle.pt(); registryQA.fill(HIST("hPtDiff"), ptDiff); - if (jetParticle.pt() < fMinJetParticlePt) + if (jetParticle.pt() < minJetParticlePt) continue; if (isProton(jetParticle, false)) { // collect protons in jet registryData.fill(HIST("hPtJetProton"), jetParticle.pt()); @@ -1058,7 +1058,7 @@ struct AngularCorrelationsInJets { continue; double mass; - if (fUseTOFMass) { + if (useTOFmass) { if (track.hasTOF()) { mass = track.mass(); // check reliability, maybe use only pion mass registryQA.fill(HIST("hTOFmass"), track.pt(), track.mass()); @@ -1104,7 +1104,7 @@ struct AngularCorrelationsInJets { double ghost_maxrap = 1.0; double ghost_area = 0.005; int ghost_repeat = 1; - fastjet::JetDefinition jetDef(fastjet::antikt_algorithm, fJetR); + fastjet::JetDefinition jetDef(fastjet::antikt_algorithm, jetR); fastjet::JetDefinition jetDefBkg(fastjet::kt_algorithm, 0.5); fastjet::AreaDefinition areaDef(fastjet::active_area, fastjet::GhostedAreaSpec(ghost_maxrap, ghost_repeat, ghost_area)); fastjet::AreaDefinition areaDefBkg(fastjet::active_area_explicit_ghosts, fastjet::GhostedAreaSpec(ghost_maxrap)); @@ -1155,7 +1155,7 @@ struct AngularCorrelationsInJets { continue; double mass; - if (fUseTOFMass) { + if (useTOFmass) { if (track.hasTOF()) { mass = track.mass(); // check reliability, maybe use only pion mass registryQA.fill(HIST("hTOFmass"), track.pt(), track.mass()); @@ -1201,7 +1201,7 @@ struct AngularCorrelationsInJets { double ghost_maxrap = 1.0; double ghost_area = 0.005; int ghost_repeat = 1; - fastjet::JetDefinition jetDef(fastjet::antikt_algorithm, fJetR); + fastjet::JetDefinition jetDef(fastjet::antikt_algorithm, jetR); fastjet::JetDefinition jetDefBkg(fastjet::kt_algorithm, 0.5); fastjet::AreaDefinition areaDef(fastjet::active_area, fastjet::GhostedAreaSpec(ghost_maxrap, ghost_repeat, ghost_area)); fastjet::AreaDefinition areaDefBkg(fastjet::active_area_explicit_ghosts, fastjet::GhostedAreaSpec(ghost_maxrap)); @@ -1223,7 +1223,7 @@ struct AngularCorrelationsInJets { // MC Truth Particles fastjet::PseudoJet subtractedJetPerp(0., 0., 0., 0.); subtractedJetPerp = bkgSub.doRhoAreaSub(jet, rhoPerp, rhoMPerp); - if (subtractedJetPerp.pt() < fMinJetPt) // cut on jet w/o bkg + if (subtractedJetPerp.pt() < minJetPt) // cut on jet w/o bkg continue; for (const auto& constituent : jet.constituents()) { const auto& jetParticle = particles.at(constituent.user_index()); @@ -1296,7 +1296,7 @@ struct AngularCorrelationsInJets { continue; registryData.fill(HIST("hNumberOfEvents"), 0); registryData.fill(HIST("hEventProtocol"), 1); - if (TMath::Abs(collision.posZ()) > fZVtx) + if (TMath::Abs(collision.posZ()) > zVtx) continue; auto slicedTracks = tracks.sliceBy(perCollisionFullTracksRun3, collision.globalIndex()); @@ -1333,7 +1333,7 @@ struct AngularCorrelationsInJets { continue; registryData.fill(HIST("hNumberOfEvents"), 0); registryData.fill(HIST("hEventProtocol"), 1); - if (TMath::Abs(collision.posZ()) > fZVtx) + if (TMath::Abs(collision.posZ()) > zVtx) continue; auto slicedTracks = tracks.sliceBy(perCollisionMcTracksRun3, collision.globalIndex()); From 9d02a366204b2f28f100293eea61bf9a7d6642b7 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 16 Dec 2024 13:17:12 +0000 Subject: [PATCH 09/10] Please consider the following formatting changes --- .../Tasks/Nuspex/AngularCorrelationsInJets.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx index 63bd98c1ca9..dcb57f9fa9f 100644 --- a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx +++ b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx @@ -336,7 +336,7 @@ struct AngularCorrelationsInJets { template bool singleSpeciesTPCNSigma(T const& track, int species) // make cut configurable - { // reject any track that has nsigma < 3 for more than 1 species + { // reject any track that has nsigma < 3 for more than 1 species if (track.tpcNSigmaStoreEl() < nsigmaRejection || track.tpcNSigmaStoreMu() < nsigmaRejection || track.tpcNSigmaStorePi() < nsigmaRejection || track.tpcNSigmaStoreKa() < nsigmaRejection || track.tpcNSigmaStoreTr() < nsigmaRejection || track.tpcNSigmaStoreAl() < nsigmaRejection) return false; switch (species) { @@ -368,9 +368,9 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaPr() : 999; - if ((track.pt() < protonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > protonNsigma)) || (track.pt() > protonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > protonNsigma))) - if (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > protonNsigma) - return false; + if ((track.pt() < protonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > protonNsigma)) || (track.pt() > protonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + tofNsigma * tofNsigma) > protonNsigma))) + if (TMath::Sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + tofNsigma * tofNsigma) > protonNsigma) + return false; if (!singleSpeciesTPCNSigma(track, 1)) return false; } else { // for yields @@ -418,7 +418,7 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaPr() : 999; - if ((track.pt() < antiprotonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > antiprotonNsigma)) || (track.pt() > antiprotonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr()*track.tpcNSigmaPr() + tofNsigma*tofNsigma) > antiprotonNsigma))) + if ((track.pt() < antiprotonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > antiprotonNsigma)) || (track.pt() > antiprotonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + tofNsigma * tofNsigma) > antiprotonNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 1)) return false; @@ -467,7 +467,7 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaDe() : 999; - if ((track.pt() < nucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > nucleiNsigma)) || (track.pt() > nucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe()*track.tpcNSigmaDe() + tofNsigma*tofNsigma) > nucleiNsigma))) + if ((track.pt() < nucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > nucleiNsigma)) || (track.pt() > nucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe() * track.tpcNSigmaDe() + tofNsigma * tofNsigma) > nucleiNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 2)) return false; @@ -507,7 +507,7 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaHe() : 999; - if ((track.pt() < nucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > nucleiNsigma)) || (track.pt() > nucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe()*track.tpcNSigmaHe() + tofNsigma*tofNsigma) > nucleiNsigma))) + if ((track.pt() < nucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > nucleiNsigma)) || (track.pt() > nucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe() * track.tpcNSigmaHe() + tofNsigma * tofNsigma) > nucleiNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 3)) return false; @@ -558,7 +558,7 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaDe() : 999; - if ((track.pt() < antinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > antinucleiNsigma)) || (track.pt() > antinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe()*track.tpcNSigmaDe() + tofNsigma*tofNsigma) > antinucleiNsigma))) + if ((track.pt() < antinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > antinucleiNsigma)) || (track.pt() > antinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe() * track.tpcNSigmaDe() + tofNsigma * tofNsigma) > antinucleiNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 2)) return false; @@ -598,7 +598,7 @@ struct AngularCorrelationsInJets { // nsigma double tofNsigma = track.hasTOF() ? track.tofNSigmaHe() : 999; - if ((track.pt() < antinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > antinucleiNsigma)) || (track.pt() > antinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe()*track.tpcNSigmaHe() + tofNsigma*tofNsigma) > antinucleiNsigma))) + if ((track.pt() < antinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > antinucleiNsigma)) || (track.pt() > antinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe() * track.tpcNSigmaHe() + tofNsigma * tofNsigma) > antinucleiNsigma))) return false; if (!singleSpeciesTPCNSigma(track, 3)) return false; From 57bac34fed4a62d70d0d8c401cb612b66779e005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20J=C3=B6rgensen?= Date: Mon, 16 Dec 2024 14:36:02 +0100 Subject: [PATCH 10/10] clarified singleSpeciesTPCNSigma function --- PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx index 63bd98c1ca9..9f56a06e0da 100644 --- a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx +++ b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx @@ -342,10 +342,15 @@ struct AngularCorrelationsInJets { switch (species) { case 1: // (anti)proton return (track.tpcNSigmaPr() < nsigmaRejection && track.tpcNSigmaDe() > nsigmaRejection && track.tpcNSigmaHe() > nsigmaRejection); + break; case 2: // (anti)deuteron return (track.tpcNSigmaDe() < nsigmaRejection && track.tpcNSigmaPr() > nsigmaRejection && track.tpcNSigmaHe() > nsigmaRejection); + break; case 3: // (anti)helium-3 return (track.tpcNSigmaHe() < nsigmaRejection && track.tpcNSigmaDe() > nsigmaRejection && track.tpcNSigmaPr() > nsigmaRejection); + break; + default: + return false; } }