From da138b8ca8b5ed0968894470ecd965ecb6353385 Mon Sep 17 00:00:00 2001 From: Roman Lavicka Date: Thu, 1 Feb 2024 18:44:30 +0100 Subject: [PATCH 01/10] bug fix --- PWGUD/Core/UPCTauCentralBarrelHelperRL.h | 30 +++++++++++++++++++++++- PWGUD/Tasks/upcTauCentralBarrelRL.cxx | 10 ++++---- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/PWGUD/Core/UPCTauCentralBarrelHelperRL.h b/PWGUD/Core/UPCTauCentralBarrelHelperRL.h index 7c19cb98164..26b7a5dd63e 100644 --- a/PWGUD/Core/UPCTauCentralBarrelHelperRL.h +++ b/PWGUD/Core/UPCTauCentralBarrelHelperRL.h @@ -175,4 +175,32 @@ double calculateAcoplanarity(double phi_trk1, double phi_trk2) return (o2::constants::math::TwoPI - aco); } -#endif // PWGUD_CORE_UPCTAUCENTRALBARRELHELPERRL_H_ +template +float getAvgITSClSize(T const& track) +{ + float sum = 0.0; + for (int iL = 0; iL < 6; iL++) { + sum += (track.itsClusterSizes() >> (iL * 4)) & 0xf; + } + return sum / track.itsNCls(); +} + +template +float getCosLambda(T const& track){ + // lambda is track inclination + // tan(lambda) = track.tgl() + // track.pz() = track.pt() * track.tgl + float lambda = std::atan(track.pz()/track.pt()); + return std::cos(lambda); +} + +template +bool passITSAvgClsSizesLowMomCut(T const& track, double itscut = 3.5, double ptcut = 0.7){ + if (getAvgITSClSize(track)*getCosLambda(track) < itscut && track.pt() < ptcut) { + return false; + } else { + return true; + } +} + +#endif //PWGUD_CORE_UPCTAUCENTRALBARRELHELPERRL_H_ diff --git a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx index 9345e99c514..705fe78789d 100644 --- a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx +++ b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx @@ -126,10 +126,12 @@ struct UpcTauCentralBarrelRL { {"EventSixTracks/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", {HistType::kTH2D, {{200, 0., 2.}, {200, 0., 200}}}}, {"EventSixTracks/SixPions/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", {HistType::kTH2D, {{200, 0., 2.}, {200, 0., 200}}}}}}; - // declare configurables - Configurable verboseInfo{"verboseInfo", true, {"Print general info to terminal; default it true."}}; - Configurable verboseDebug{"verboseDebug", false, {"Print debug info to terminal; default it false."}}; - Configurable whichGapSide{"whichGapSide", 2, {"0 for side A, 1 for side C, 2 for both sides"}}; + // declare configurables + Configurable verboseInfo{"verboseInfo", true, {"Print general info to terminal; default it true."}}; + Configurable verboseDebug{"verboseDebug", false, {"Print debug info to terminal; default it false."}}; + Configurable whichGapSide{"whichGapSide", 2, {"0 for side A, 1 for side C, 2 for both sides"}}; + Configurable cutAvgITSclusterSize{"cutAvgITSclusterSize", 3.5, {"specific study"}}; + Configurable cutPtAvgITSclusterSize{"cutPtAvgITSclusterSize", 0.7, {"specific study"}}; using FullUDTracks = soa::Join; using FullUDCollision = soa::Join::iterator; From fdeade2b1bd4d358fe8ff3c321e0783f2de10c9a Mon Sep 17 00:00:00 2001 From: Roman Lavicka Date: Tue, 6 Feb 2024 08:26:09 +0100 Subject: [PATCH 02/10] including TOF and ITS selection histos again after the messed rebase --- PWGUD/Tasks/upcTauCentralBarrelRL.cxx | 60 +++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 7 deletions(-) diff --git a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx index 705fe78789d..9e1557e7ca2 100644 --- a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx +++ b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx @@ -149,12 +149,14 @@ struct UpcTauCentralBarrelRL { const AxisSpec axisInvMass{400, 1., 5.}; const AxisSpec axisInvMassWide{500, 0., 10.}; const AxisSpec axisMom{40, 0., 2.}; + const AxisSpec axisMomSigned{80,-2.,2.}; const AxisSpec axisMomWide{100, 0., 10.}; const AxisSpec axisPt{40, 0., 2.}; const AxisSpec axisPhi{64, -2 * TMath::Pi(), 2 * TMath::Pi()}; const AxisSpec axisEta{50, -1.2, 1.2}; const AxisSpec axisRap{50, -1.2, 1.2}; const AxisSpec axisAcoplanarity{32, 0.0, o2::constants::math::PI}; + const AxisSpec axisAvgITSclsSizes{100,0.,10.}; histos.add("Tracks/raw/hTrackZ", ";Track z-vertex (cm);Number of events (-)", HistType::kTH1D, {axisZvtx}); histos.add("Tracks/raw/hTrackP", ";Track #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {axisMom}); @@ -173,6 +175,9 @@ struct UpcTauCentralBarrelRL { histos.add("EventTwoTracks/hInvariantMassWideNoMothers", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); histos.add("EventTwoTracks/hInvariantMassWideAllPionMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); histos.add("EventTwoTracks/hInvariantMassWideAllPionMassPtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); + histos.add("EventTwoTracks/hInvariantMassWideAllPionMassTOF",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); + histos.add("EventTwoTracks/hInvariantMassWideAllPionMassITScut",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); + histos.add("EventTwoTracks/hInvariantMassWideAllPionMassPtCutITScut",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); histos.add("EventTwoTracks/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {axisAcoplanarity}); histos.add("EventTwoTracks/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {axisMom}); histos.add("EventTwoTracks/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {axisMomWide}); @@ -184,6 +189,8 @@ struct UpcTauCentralBarrelRL { histos.add("EventTwoTracks/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {axisPt, axisPt}); histos.add("EventTwoTracks/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {axisPhi, axisPhi}); histos.add("EventTwoTracks/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {axisRap, axisRap}); + histos.add("EventTwoTracks/hDaughtersPvsITSclusterSize", ";Average ITS cluster size;Daughter #it{p} (GeV/c)",HistType::kTH2D,{axisAvgITSclsSizes,axisMomSigned}); + histos.add("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos", ";Average ITS cluster size x cos(#lambda);Daughter #it{p} (GeV/c)",HistType::kTH2D,{axisAvgITSclsSizes,axisMomSigned}); histos.add("EventTwoTracks/TwoElectrons/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMass}); histos.add("EventTwoTracks/TwoElectrons/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); @@ -311,10 +318,16 @@ struct UpcTauCentralBarrelRL { histos.add("EventTwoTracks/PionsSelection/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMass}); histos.add("EventTwoTracks/PionsSelection/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); + histos.add("EventTwoTracks/PionsSelection/hInvariantMassWideTOF",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); + histos.add("EventTwoTracks/PionsSelection/hInvariantMassWideITS",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); histos.add("EventTwoTracks/PionsSelection/hInvariantMassPtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMass}); histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUS", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLS", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); + histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUSTOF",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); + histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUSITScut",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); + histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLSTOF",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); + histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLSITScut",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); histos.add("EventTwoTracks/PionsSelection/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {axisAcoplanarity}); histos.add("EventTwoTracks/PionsSelection/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {axisMom}); histos.add("EventTwoTracks/PionsSelection/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {axisMomWide}); @@ -326,6 +339,8 @@ struct UpcTauCentralBarrelRL { histos.add("EventTwoTracks/PionsSelection/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {axisPt, axisPt}); histos.add("EventTwoTracks/PionsSelection/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {axisPhi, axisPhi}); histos.add("EventTwoTracks/PionsSelection/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {axisRap, axisRap}); + histos.add("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSize", ";Average ITS cluster size;Daughter #it{p} (GeV/c)",HistType::kTH2D,{axisAvgITSclsSizes,axisMomSigned}); + histos.add("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSizeXcos", ";Average ITS cluster size x cos(#lambda);Daughter #it{p} (GeV/c)",HistType::kTH2D,{axisAvgITSclsSizes,axisMomSigned}); histos.add("EventFourTracks/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMass}); histos.add("EventFourTracks/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); @@ -539,6 +554,8 @@ struct UpcTauCentralBarrelRL { motherOfPions = pion[0] + pion[1]; auto acoplanarity = calculateAcoplanarity(daug[0].Phi(), daug[1].Phi()); auto sign = trkDaug1.sign() * trkDaug2.sign(); + bool passAvgITSclsSizesCut = passITSAvgClsSizesLowMomCut(trkDaug1,cutAvgITSclusterSize,cutPtAvgITSclusterSize) + && passITSAvgClsSizesLowMomCut(trkDaug2,cutAvgITSclusterSize,cutPtAvgITSclusterSize); if (trkDaug1.hasTPC()) { histosPID.get(HIST("EventTwoTracks/PID/hTPCsignalVsP"))->Fill(daug[0].P(), trkDaug1.tpcSignal()); @@ -585,9 +602,22 @@ struct UpcTauCentralBarrelRL { histos.get(HIST("EventTwoTracks/hDaughtersPt"))->Fill(daug[0].Pt(), daug[1].Pt()); histos.get(HIST("EventTwoTracks/hDaughtersPhi"))->Fill(daug[0].Phi(), daug[1].Phi()); histos.get(HIST("EventTwoTracks/hDaughtersRapidity"))->Fill(daug[0].Rapidity(), daug[1].Rapidity()); - if (motherOfPions.Pt() < 0.2) { - histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassPtCut"))->Fill(motherOfPions.M()); - } + if (motherOfPions.Pt() < 0.2) { + histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassPtCut"))->Fill(motherOfPions.M()); + if (passAvgITSclsSizesCut) { + histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassPtCutITScut"))->Fill(motherOfPions.M()); + } + } + if (countTOFtracks == 2) { + histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassTOF"))->Fill(motherOfPions.M()); + } + if (passAvgITSclsSizesCut) { + histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassITScut"))->Fill(motherOfPions.M()); + } + histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug1),trkDaug1.sign()*daug[0].P()); + histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug2),trkDaug2.sign()*daug[1].P()); + histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug1)*getCosLambda(trkDaug1),trkDaug1.sign()*daug[0].P()); + histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug2)*getCosLambda(trkDaug2),trkDaug2.sign()*daug[1].P()); // ee, mm, em, pp, ep, mp, pppp, eppp, mppp, pppppp if (countPVGTelectrons == 2) { @@ -803,11 +833,27 @@ struct UpcTauCentralBarrelRL { if (motherOfPions.Pt() < 0.2) { histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassPtCut"))->Fill(motherOfPions.M()); histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCut"))->Fill(motherOfPions.M()); - if (sign < 0) - histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUS"))->Fill(motherOfPions.M()); - if (sign > 0) - histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLS"))->Fill(motherOfPions.M()); + if (sign < 0) histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUS"))->Fill(motherOfPions.M()); + if (sign > 0) histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLS"))->Fill(motherOfPions.M()); + if (countTOFtracks == 2) { + if (sign < 0) histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUSTOF"))->Fill(motherOfPions.M()); + if (sign > 0) histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLSTOF"))->Fill(motherOfPions.M()); + } + if (passAvgITSclsSizesCut) { + if (sign < 0) histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUSITScut"))->Fill(motherOfPions.M()); + if (sign > 0) histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLSITScut"))->Fill(motherOfPions.M()); + } + } + if (countTOFtracks == 2) { + histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWideTOF"))->Fill(motherOfPions.M()); + } + if (passAvgITSclsSizesCut) { + histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWideITS"))->Fill(motherOfPions.M()); } + histos.get(HIST("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug1),trkDaug1.sign()*daug[0].P()); + histos.get(HIST("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug2),trkDaug2.sign()*daug[1].P()); + histos.get(HIST("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug1)*getCosLambda(trkDaug1),trkDaug1.sign()*daug[0].P()); + histos.get(HIST("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug2)*getCosLambda(trkDaug2),trkDaug2.sign()*daug[1].P()); } } else if (countPVGTselected == 4) { From 6363b7f32711304f9a658aeee80c48cf8430cbb3 Mon Sep 17 00:00:00 2001 From: Roman Lavicka Date: Tue, 6 Feb 2024 08:51:03 +0100 Subject: [PATCH 03/10] adding forgotten TOF counter --- PWGUD/Tasks/upcTauCentralBarrelRL.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx index 9e1557e7ca2..e26c74f6f2b 100644 --- a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx +++ b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx @@ -496,6 +496,7 @@ struct UpcTauCentralBarrelRL { } } countPVGT++; + if (track.hasTOF()) countTOFtracks++; int hypothesisID = testPIDhypothesis(track); if (hypothesisID == P_ELECTRON || hypothesisID == P_MUON || hypothesisID == P_PION) { countPVGTselected++; From fa786ed840c4a16aeebf167fbf9b2da1e6c11e71 Mon Sep 17 00:00:00 2001 From: Roman Lavicka Date: Tue, 6 Feb 2024 09:04:16 +0100 Subject: [PATCH 04/10] TOF counter bug fix --- PWGUD/Tasks/upcTauCentralBarrelRL.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx index e26c74f6f2b..e8c39fbf4c6 100644 --- a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx +++ b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx @@ -460,6 +460,7 @@ struct UpcTauCentralBarrelRL { int countPVGTpions = 0; int countPVGTothers = 0; int countPVGTpionsSelection = 0; + int countTOFtracks = 0; std::vector vecPVidx; // Loop over tracks with selections for (auto& track : reconstructedBarrelTracks) { From d7fbd9e851c719e7f495b5473cd2b672dab3b877 Mon Sep 17 00:00:00 2001 From: Roman Lavicka Date: Tue, 6 Feb 2024 09:35:29 +0100 Subject: [PATCH 05/10] small reshuffle --- PWGUD/Tasks/upcTauCentralBarrelRL.cxx | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx index e8c39fbf4c6..4070daafde1 100644 --- a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx +++ b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx @@ -466,6 +466,7 @@ struct UpcTauCentralBarrelRL { for (auto& track : reconstructedBarrelTracks) { if (track.isPVContributor() != 1) continue; + countPVGT++; float trkPx = track.px(); float trkPy = track.py(); float trkPz = track.pz(); @@ -496,7 +497,6 @@ struct UpcTauCentralBarrelRL { printMediumMessage("Track has no charge"); } } - countPVGT++; if (track.hasTOF()) countTOFtracks++; int hypothesisID = testPIDhypothesis(track); if (hypothesisID == P_ELECTRON || hypothesisID == P_MUON || hypothesisID == P_PION) { @@ -604,22 +604,22 @@ struct UpcTauCentralBarrelRL { histos.get(HIST("EventTwoTracks/hDaughtersPt"))->Fill(daug[0].Pt(), daug[1].Pt()); histos.get(HIST("EventTwoTracks/hDaughtersPhi"))->Fill(daug[0].Phi(), daug[1].Phi()); histos.get(HIST("EventTwoTracks/hDaughtersRapidity"))->Fill(daug[0].Rapidity(), daug[1].Rapidity()); - if (motherOfPions.Pt() < 0.2) { - histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassPtCut"))->Fill(motherOfPions.M()); - if (passAvgITSclsSizesCut) { - histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassPtCutITScut"))->Fill(motherOfPions.M()); - } - } - if (countTOFtracks == 2) { - histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassTOF"))->Fill(motherOfPions.M()); - } + if (motherOfPions.Pt() < 0.2) { + histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassPtCut"))->Fill(motherOfPions.M()); if (passAvgITSclsSizesCut) { - histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassITScut"))->Fill(motherOfPions.M()); + histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassPtCutITScut"))->Fill(motherOfPions.M()); } - histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug1),trkDaug1.sign()*daug[0].P()); - histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug2),trkDaug2.sign()*daug[1].P()); - histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug1)*getCosLambda(trkDaug1),trkDaug1.sign()*daug[0].P()); - histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug2)*getCosLambda(trkDaug2),trkDaug2.sign()*daug[1].P()); + } + if (countTOFtracks == 2) { + histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassTOF"))->Fill(motherOfPions.M()); + } + if (passAvgITSclsSizesCut) { + histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassITScut"))->Fill(motherOfPions.M()); + } + histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug1),trkDaug1.sign()*daug[0].P()); + histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug2),trkDaug2.sign()*daug[1].P()); + histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug1)*getCosLambda(trkDaug1),trkDaug1.sign()*daug[0].P()); + histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug2)*getCosLambda(trkDaug2),trkDaug2.sign()*daug[1].P()); // ee, mm, em, pp, ep, mp, pppp, eppp, mppp, pppppp if (countPVGTelectrons == 2) { From 7981b564293406e265bfbc47801f8578f354ab12 Mon Sep 17 00:00:00 2001 From: Roman Lavicka Date: Tue, 6 Feb 2024 16:36:43 +0100 Subject: [PATCH 06/10] increasing precision of axis --- PWGUD/Tasks/upcTauCentralBarrelRL.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx index 4070daafde1..cc827a1a6ff 100644 --- a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx +++ b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx @@ -156,7 +156,7 @@ struct UpcTauCentralBarrelRL { const AxisSpec axisEta{50, -1.2, 1.2}; const AxisSpec axisRap{50, -1.2, 1.2}; const AxisSpec axisAcoplanarity{32, 0.0, o2::constants::math::PI}; - const AxisSpec axisAvgITSclsSizes{100,0.,10.}; + const AxisSpec axisAvgITSclsSizes{500,0.,10.}; histos.add("Tracks/raw/hTrackZ", ";Track z-vertex (cm);Number of events (-)", HistType::kTH1D, {axisZvtx}); histos.add("Tracks/raw/hTrackP", ";Track #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {axisMom}); From 5c2d1c5c0fac2bc3657fe301c5e9364b08278ff5 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 6 Feb 2024 15:43:58 +0000 Subject: [PATCH 07/10] MegaLinter fixes --- PWGUD/Core/UPCTauCentralBarrelHelperRL.h | 38 +++++------ PWGUD/Tasks/upcTauCentralBarrelRL.cxx | 82 +++++++++++++----------- 2 files changed, 64 insertions(+), 56 deletions(-) diff --git a/PWGUD/Core/UPCTauCentralBarrelHelperRL.h b/PWGUD/Core/UPCTauCentralBarrelHelperRL.h index 26b7a5dd63e..e5c53f19aee 100644 --- a/PWGUD/Core/UPCTauCentralBarrelHelperRL.h +++ b/PWGUD/Core/UPCTauCentralBarrelHelperRL.h @@ -178,29 +178,31 @@ double calculateAcoplanarity(double phi_trk1, double phi_trk2) template float getAvgITSClSize(T const& track) { - float sum = 0.0; - for (int iL = 0; iL < 6; iL++) { - sum += (track.itsClusterSizes() >> (iL * 4)) & 0xf; - } - return sum / track.itsNCls(); + float sum = 0.0; + for (int iL = 0; iL < 6; iL++) { + sum += (track.itsClusterSizes() >> (iL * 4)) & 0xf; + } + return sum / track.itsNCls(); } template -float getCosLambda(T const& track){ - // lambda is track inclination - // tan(lambda) = track.tgl() - // track.pz() = track.pt() * track.tgl - float lambda = std::atan(track.pz()/track.pt()); - return std::cos(lambda); +float getCosLambda(T const& track) +{ + // lambda is track inclination + // tan(lambda) = track.tgl() + // track.pz() = track.pt() * track.tgl + float lambda = std::atan(track.pz() / track.pt()); + return std::cos(lambda); } template -bool passITSAvgClsSizesLowMomCut(T const& track, double itscut = 3.5, double ptcut = 0.7){ - if (getAvgITSClSize(track)*getCosLambda(track) < itscut && track.pt() < ptcut) { - return false; - } else { - return true; - } +bool passITSAvgClsSizesLowMomCut(T const& track, double itscut = 3.5, double ptcut = 0.7) +{ + if (getAvgITSClSize(track) * getCosLambda(track) < itscut && track.pt() < ptcut) { + return false; + } else { + return true; + } } -#endif //PWGUD_CORE_UPCTAUCENTRALBARRELHELPERRL_H_ +#endif // PWGUD_CORE_UPCTAUCENTRALBARRELHELPERRL_H_ diff --git a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx index cc827a1a6ff..c909160c96f 100644 --- a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx +++ b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx @@ -126,12 +126,12 @@ struct UpcTauCentralBarrelRL { {"EventSixTracks/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", {HistType::kTH2D, {{200, 0., 2.}, {200, 0., 200}}}}, {"EventSixTracks/SixPions/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", {HistType::kTH2D, {{200, 0., 2.}, {200, 0., 200}}}}}}; - // declare configurables - Configurable verboseInfo{"verboseInfo", true, {"Print general info to terminal; default it true."}}; - Configurable verboseDebug{"verboseDebug", false, {"Print debug info to terminal; default it false."}}; - Configurable whichGapSide{"whichGapSide", 2, {"0 for side A, 1 for side C, 2 for both sides"}}; - Configurable cutAvgITSclusterSize{"cutAvgITSclusterSize", 3.5, {"specific study"}}; - Configurable cutPtAvgITSclusterSize{"cutPtAvgITSclusterSize", 0.7, {"specific study"}}; + // declare configurables + Configurable verboseInfo{"verboseInfo", true, {"Print general info to terminal; default it true."}}; + Configurable verboseDebug{"verboseDebug", false, {"Print debug info to terminal; default it false."}}; + Configurable whichGapSide{"whichGapSide", 2, {"0 for side A, 1 for side C, 2 for both sides"}}; + Configurable cutAvgITSclusterSize{"cutAvgITSclusterSize", 3.5, {"specific study"}}; + Configurable cutPtAvgITSclusterSize{"cutPtAvgITSclusterSize", 0.7, {"specific study"}}; using FullUDTracks = soa::Join; using FullUDCollision = soa::Join::iterator; @@ -149,14 +149,14 @@ struct UpcTauCentralBarrelRL { const AxisSpec axisInvMass{400, 1., 5.}; const AxisSpec axisInvMassWide{500, 0., 10.}; const AxisSpec axisMom{40, 0., 2.}; - const AxisSpec axisMomSigned{80,-2.,2.}; + const AxisSpec axisMomSigned{80, -2., 2.}; const AxisSpec axisMomWide{100, 0., 10.}; const AxisSpec axisPt{40, 0., 2.}; const AxisSpec axisPhi{64, -2 * TMath::Pi(), 2 * TMath::Pi()}; const AxisSpec axisEta{50, -1.2, 1.2}; const AxisSpec axisRap{50, -1.2, 1.2}; const AxisSpec axisAcoplanarity{32, 0.0, o2::constants::math::PI}; - const AxisSpec axisAvgITSclsSizes{500,0.,10.}; + const AxisSpec axisAvgITSclsSizes{500, 0., 10.}; histos.add("Tracks/raw/hTrackZ", ";Track z-vertex (cm);Number of events (-)", HistType::kTH1D, {axisZvtx}); histos.add("Tracks/raw/hTrackP", ";Track #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {axisMom}); @@ -175,9 +175,9 @@ struct UpcTauCentralBarrelRL { histos.add("EventTwoTracks/hInvariantMassWideNoMothers", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); histos.add("EventTwoTracks/hInvariantMassWideAllPionMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); histos.add("EventTwoTracks/hInvariantMassWideAllPionMassPtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); - histos.add("EventTwoTracks/hInvariantMassWideAllPionMassTOF",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); - histos.add("EventTwoTracks/hInvariantMassWideAllPionMassITScut",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); - histos.add("EventTwoTracks/hInvariantMassWideAllPionMassPtCutITScut",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); + histos.add("EventTwoTracks/hInvariantMassWideAllPionMassTOF", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); + histos.add("EventTwoTracks/hInvariantMassWideAllPionMassITScut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); + histos.add("EventTwoTracks/hInvariantMassWideAllPionMassPtCutITScut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); histos.add("EventTwoTracks/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {axisAcoplanarity}); histos.add("EventTwoTracks/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {axisMom}); histos.add("EventTwoTracks/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {axisMomWide}); @@ -189,8 +189,8 @@ struct UpcTauCentralBarrelRL { histos.add("EventTwoTracks/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {axisPt, axisPt}); histos.add("EventTwoTracks/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {axisPhi, axisPhi}); histos.add("EventTwoTracks/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {axisRap, axisRap}); - histos.add("EventTwoTracks/hDaughtersPvsITSclusterSize", ";Average ITS cluster size;Daughter #it{p} (GeV/c)",HistType::kTH2D,{axisAvgITSclsSizes,axisMomSigned}); - histos.add("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos", ";Average ITS cluster size x cos(#lambda);Daughter #it{p} (GeV/c)",HistType::kTH2D,{axisAvgITSclsSizes,axisMomSigned}); + histos.add("EventTwoTracks/hDaughtersPvsITSclusterSize", ";Average ITS cluster size;Daughter #it{p} (GeV/c)", HistType::kTH2D, {axisAvgITSclsSizes, axisMomSigned}); + histos.add("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos", ";Average ITS cluster size x cos(#lambda);Daughter #it{p} (GeV/c)", HistType::kTH2D, {axisAvgITSclsSizes, axisMomSigned}); histos.add("EventTwoTracks/TwoElectrons/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMass}); histos.add("EventTwoTracks/TwoElectrons/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); @@ -318,16 +318,16 @@ struct UpcTauCentralBarrelRL { histos.add("EventTwoTracks/PionsSelection/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMass}); histos.add("EventTwoTracks/PionsSelection/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); - histos.add("EventTwoTracks/PionsSelection/hInvariantMassWideTOF",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); - histos.add("EventTwoTracks/PionsSelection/hInvariantMassWideITS",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); + histos.add("EventTwoTracks/PionsSelection/hInvariantMassWideTOF", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); + histos.add("EventTwoTracks/PionsSelection/hInvariantMassWideITS", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); histos.add("EventTwoTracks/PionsSelection/hInvariantMassPtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMass}); histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUS", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLS", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); - histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUSTOF",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); - histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUSITScut",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); - histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLSTOF",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); - histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLSITScut",";Invariant mass (GeV/c^{2});Number of events (-)",HistType::kTH1D,{axisInvMassWide}); + histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUSTOF", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); + histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUSITScut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); + histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLSTOF", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); + histos.add("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLSITScut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); histos.add("EventTwoTracks/PionsSelection/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {axisAcoplanarity}); histos.add("EventTwoTracks/PionsSelection/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {axisMom}); histos.add("EventTwoTracks/PionsSelection/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {axisMomWide}); @@ -339,8 +339,8 @@ struct UpcTauCentralBarrelRL { histos.add("EventTwoTracks/PionsSelection/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {axisPt, axisPt}); histos.add("EventTwoTracks/PionsSelection/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {axisPhi, axisPhi}); histos.add("EventTwoTracks/PionsSelection/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {axisRap, axisRap}); - histos.add("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSize", ";Average ITS cluster size;Daughter #it{p} (GeV/c)",HistType::kTH2D,{axisAvgITSclsSizes,axisMomSigned}); - histos.add("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSizeXcos", ";Average ITS cluster size x cos(#lambda);Daughter #it{p} (GeV/c)",HistType::kTH2D,{axisAvgITSclsSizes,axisMomSigned}); + histos.add("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSize", ";Average ITS cluster size;Daughter #it{p} (GeV/c)", HistType::kTH2D, {axisAvgITSclsSizes, axisMomSigned}); + histos.add("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSizeXcos", ";Average ITS cluster size x cos(#lambda);Daughter #it{p} (GeV/c)", HistType::kTH2D, {axisAvgITSclsSizes, axisMomSigned}); histos.add("EventFourTracks/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMass}); histos.add("EventFourTracks/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {axisInvMassWide}); @@ -497,7 +497,8 @@ struct UpcTauCentralBarrelRL { printMediumMessage("Track has no charge"); } } - if (track.hasTOF()) countTOFtracks++; + if (track.hasTOF()) + countTOFtracks++; int hypothesisID = testPIDhypothesis(track); if (hypothesisID == P_ELECTRON || hypothesisID == P_MUON || hypothesisID == P_PION) { countPVGTselected++; @@ -556,8 +557,7 @@ struct UpcTauCentralBarrelRL { motherOfPions = pion[0] + pion[1]; auto acoplanarity = calculateAcoplanarity(daug[0].Phi(), daug[1].Phi()); auto sign = trkDaug1.sign() * trkDaug2.sign(); - bool passAvgITSclsSizesCut = passITSAvgClsSizesLowMomCut(trkDaug1,cutAvgITSclusterSize,cutPtAvgITSclusterSize) - && passITSAvgClsSizesLowMomCut(trkDaug2,cutAvgITSclusterSize,cutPtAvgITSclusterSize); + bool passAvgITSclsSizesCut = passITSAvgClsSizesLowMomCut(trkDaug1, cutAvgITSclusterSize, cutPtAvgITSclusterSize) && passITSAvgClsSizesLowMomCut(trkDaug2, cutAvgITSclusterSize, cutPtAvgITSclusterSize); if (trkDaug1.hasTPC()) { histosPID.get(HIST("EventTwoTracks/PID/hTPCsignalVsP"))->Fill(daug[0].P(), trkDaug1.tpcSignal()); @@ -616,10 +616,10 @@ struct UpcTauCentralBarrelRL { if (passAvgITSclsSizesCut) { histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassITScut"))->Fill(motherOfPions.M()); } - histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug1),trkDaug1.sign()*daug[0].P()); - histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug2),trkDaug2.sign()*daug[1].P()); - histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug1)*getCosLambda(trkDaug1),trkDaug1.sign()*daug[0].P()); - histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug2)*getCosLambda(trkDaug2),trkDaug2.sign()*daug[1].P()); + histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug1), trkDaug1.sign() * daug[0].P()); + histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug2), trkDaug2.sign() * daug[1].P()); + histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug1) * getCosLambda(trkDaug1), trkDaug1.sign() * daug[0].P()); + histos.get(HIST("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug2) * getCosLambda(trkDaug2), trkDaug2.sign() * daug[1].P()); // ee, mm, em, pp, ep, mp, pppp, eppp, mppp, pppppp if (countPVGTelectrons == 2) { @@ -835,15 +835,21 @@ struct UpcTauCentralBarrelRL { if (motherOfPions.Pt() < 0.2) { histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassPtCut"))->Fill(motherOfPions.M()); histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCut"))->Fill(motherOfPions.M()); - if (sign < 0) histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUS"))->Fill(motherOfPions.M()); - if (sign > 0) histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLS"))->Fill(motherOfPions.M()); + if (sign < 0) + histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUS"))->Fill(motherOfPions.M()); + if (sign > 0) + histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLS"))->Fill(motherOfPions.M()); if (countTOFtracks == 2) { - if (sign < 0) histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUSTOF"))->Fill(motherOfPions.M()); - if (sign > 0) histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLSTOF"))->Fill(motherOfPions.M()); + if (sign < 0) + histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUSTOF"))->Fill(motherOfPions.M()); + if (sign > 0) + histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLSTOF"))->Fill(motherOfPions.M()); } if (passAvgITSclsSizesCut) { - if (sign < 0) histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUSITScut"))->Fill(motherOfPions.M()); - if (sign > 0) histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLSITScut"))->Fill(motherOfPions.M()); + if (sign < 0) + histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutUSITScut"))->Fill(motherOfPions.M()); + if (sign > 0) + histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWidePtCutLSITScut"))->Fill(motherOfPions.M()); } } if (countTOFtracks == 2) { @@ -852,10 +858,10 @@ struct UpcTauCentralBarrelRL { if (passAvgITSclsSizesCut) { histos.get(HIST("EventTwoTracks/PionsSelection/hInvariantMassWideITS"))->Fill(motherOfPions.M()); } - histos.get(HIST("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug1),trkDaug1.sign()*daug[0].P()); - histos.get(HIST("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug2),trkDaug2.sign()*daug[1].P()); - histos.get(HIST("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug1)*getCosLambda(trkDaug1),trkDaug1.sign()*daug[0].P()); - histos.get(HIST("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug2)*getCosLambda(trkDaug2),trkDaug2.sign()*daug[1].P()); + histos.get(HIST("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug1), trkDaug1.sign() * daug[0].P()); + histos.get(HIST("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSize"))->Fill(getAvgITSClSize(trkDaug2), trkDaug2.sign() * daug[1].P()); + histos.get(HIST("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug1) * getCosLambda(trkDaug1), trkDaug1.sign() * daug[0].P()); + histos.get(HIST("EventTwoTracks/PionsSelection/hDaughtersPvsITSclusterSizeXcos"))->Fill(getAvgITSClSize(trkDaug2) * getCosLambda(trkDaug2), trkDaug2.sign() * daug[1].P()); } } else if (countPVGTselected == 4) { From 9850cc291f03138effb1305645a7d914447b1ad0 Mon Sep 17 00:00:00 2001 From: Roman Lavicka Date: Thu, 8 Feb 2024 15:32:49 +0100 Subject: [PATCH 08/10] adding function which mimics GlobatTracks flag using UD tables --- PWGUD/Tasks/upcTauCentralBarrelRL.cxx | 64 ++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 7 deletions(-) diff --git a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx index c909160c96f..78f6d6da848 100644 --- a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx +++ b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx @@ -23,16 +23,15 @@ #include "Framework/runDataProcessing.h" // O2Physics headers -#include "Common/DataModel/PIDResponse.h" -#include "Common/DataModel/TrackSelectionTables.h" -#include "Common/DataModel/EventSelection.h" #include "Common/CCDB/EventSelectionParams.h" -#include "PWGUD/Core/UPCTauCentralBarrelHelperRL.h" -#include "PWGUD/DataModel/UDTables.h" - #include "Common/Core/TrackSelection.h" #include "Common/Core/TrackSelectionDefaults.h" #include "Common/Core/trackUtilities.h" +#include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/PIDResponse.h" +#include "Common/DataModel/TrackSelectionTables.h" +#include "PWGUD/Core/UPCTauCentralBarrelHelperRL.h" +#include "PWGUD/DataModel/UDTables.h" // ROOT headers #include "TLorentzVector.h" @@ -132,6 +131,22 @@ struct UpcTauCentralBarrelRL { Configurable whichGapSide{"whichGapSide", 2, {"0 for side A, 1 for side C, 2 for both sides"}}; Configurable cutAvgITSclusterSize{"cutAvgITSclusterSize", 3.5, {"specific study"}}; Configurable cutPtAvgITSclusterSize{"cutPtAvgITSclusterSize", 0.7, {"specific study"}}; + Configurable cutMyGlobalTracksOnly{"cutGlobalTracksOnly", false, {"Applies cut on here defined global tracks"}}; + Configurable cutAvgITSclusterSize{"cutAvgITSclusterSize", 3.5, {"specific study"}}; + Configurable cutPtAvgITSclusterSize{"cutPtAvgITSclusterSize", 0.7, {"specific study"}}; + Configurable cutMyGTptMin{"cutMyGTptMin", 0.1f, {"MyGlobalTrack cut"}}; + Configurable cutMyGTptMax{"cutMyGTptMax", 1e10f, {"MyGlobalTrack cut"}}; + Configurable cutMyGTetaMin{"cutMyGTetaMin", -0.8, {"MyGlobalTrack cut"}}; + Configurable cutMyGTetaMax{"cutMyGTetaMax", 0.8, {"MyGlobalTrack cut"}}; + Configurable cutMyGTdcaZmax{"cutMyGTdcaZmax", 2.f, {"MyGlobalTrack cut"}}; + Configurable cutMyGTdcaXYmax{"cutMyGTdcaXYmax", 1e10f, {"MyGlobalTrack cut"}}; + Configurable cutMyGTdcaXYusePt{"cutMyGTdcaXYusePt", false, {"MyGlobalTrack cut"}}; + Configurable cutMyGTitsNClsMin{"cutMyGTitsNClsMin", 1, {"MyGlobalTrack cut"}}; + Configurable cutMyGTitsChi2NclMax{"cutMyGTitsChi2NclMax", 36.f, {"MyGlobalTrack cut"}}; + Configurable cutMyGTtpcNClsMin{"cutMyGTtpcNClsMin", 1, {"MyGlobalTrack cut"}}; + Configurable cutMyGTtpcNClsCrossedRowsMin{"cutMyGTtpcNClsCrossedRows", 70, {"MyGlobalTrack cut"}}; + Configurable cutMyGTtpcNClsCrossedRowsOverNClsMin{"cutMyGTtpcNClsCrossedRowsOverNClsMin", 0.8f, {"MyGlobalTrack cut"}}; + Configurable cutMyGTtpcChi2NclMax{"cutMyGTtpcChi2NclMax", 4.f, {"MyGlobalTrack cut"}}; using FullUDTracks = soa::Join; using FullUDCollision = soa::Join::iterator; @@ -405,7 +420,38 @@ struct UpcTauCentralBarrelRL { } // end run - // process + + template + bool isGlobalTrackReinstallment(T const& track) + { + // kInAcceptance copy + if (track.pt() < cutMyGTptMin || track.pt() > cutMyGTptMax) return false; + if (eta(track.px(),track.py(),track.pz()) < cutMyGTetaMin || eta(track.px(),track.py(),track.pz()) > cutMyGTetaMax) return false; + // kPrimaryTracks + // GoldenChi2 cut is only for Run 2 + if (track.dcaZ() > cutMyGTdcaZmax) return false; + if (cutMyGTdcaXYusePt) { + float maxDCA = 0.0105f + 0.0350f / pow(track.pt(), 1.1f); // ? not sure yet if will be used + if (track.dcaXY() > maxDCA) return false; + } else { + if (track.dcaXY() > cutMyGTdcaXYmax) return false; + } + // kQualityTrack + // TrackType is always 1 as per definition of processed Run3 AO2Ds + // ITS + if (!track.hasITS()) return false;// ITS refit + if (track.itsNCls() < cutMyGTitsNClsMin) return false; + if (track.itsChi2NCl() > cutMyGTitsChi2NclMax) return false; + //if (!FulfillsITSHitRequirements(track.itsClusterSizes())) return false; <---- to complicated to implement now + // TPC + if (!track.hasTPC()) return false;// TPC refit + if (track.tpcNClsFindable() - track.tpcNClsFindableMinusFound() < cutMyGTtpcNClsMin) return false;// tpcNClsFound() + if (track.tpcNClsCrossedRows() < cutMyGTtpcNClsCrossedRowsMin) return false; + if ((track.tpcNClsCrossedRows()/track.tpcNClsFindable()) < cutMyGTtpcNClsCrossedRowsOverNClsMin) return false; + if (track.tpcChi2NCl() > cutMyGTtpcChi2NclMax) return false;// TPC chi2 + + return true; + } template void fillHistograms(C reconstructedCollision, Ts reconstructedBarrelTracks) @@ -466,6 +512,10 @@ struct UpcTauCentralBarrelRL { for (auto& track : reconstructedBarrelTracks) { if (track.isPVContributor() != 1) continue; + if (cutMyGlobalTracksOnly) { + if (isGlobalTrackReinstallment(track) != 1) + continue; + } countPVGT++; float trkPx = track.px(); float trkPy = track.py(); From 3f0799071f0ac6f8e0d5fdbaef5a5312f23a4aaf Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 8 Feb 2024 14:40:04 +0000 Subject: [PATCH 09/10] MegaLinter fixes --- PWGUD/Tasks/upcTauCentralBarrelRL.cxx | 46 +++++++++++++++++---------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx index 78f6d6da848..ecd8569159e 100644 --- a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx +++ b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx @@ -420,38 +420,50 @@ struct UpcTauCentralBarrelRL { } // end run - template bool isGlobalTrackReinstallment(T const& track) { // kInAcceptance copy - if (track.pt() < cutMyGTptMin || track.pt() > cutMyGTptMax) return false; - if (eta(track.px(),track.py(),track.pz()) < cutMyGTetaMin || eta(track.px(),track.py(),track.pz()) > cutMyGTetaMax) return false; + if (track.pt() < cutMyGTptMin || track.pt() > cutMyGTptMax) + return false; + if (eta(track.px(), track.py(), track.pz()) < cutMyGTetaMin || eta(track.px(), track.py(), track.pz()) > cutMyGTetaMax) + return false; // kPrimaryTracks // GoldenChi2 cut is only for Run 2 - if (track.dcaZ() > cutMyGTdcaZmax) return false; + if (track.dcaZ() > cutMyGTdcaZmax) + return false; if (cutMyGTdcaXYusePt) { float maxDCA = 0.0105f + 0.0350f / pow(track.pt(), 1.1f); // ? not sure yet if will be used - if (track.dcaXY() > maxDCA) return false; + if (track.dcaXY() > maxDCA) + return false; } else { - if (track.dcaXY() > cutMyGTdcaXYmax) return false; + if (track.dcaXY() > cutMyGTdcaXYmax) + return false; } // kQualityTrack // TrackType is always 1 as per definition of processed Run3 AO2Ds // ITS - if (!track.hasITS()) return false;// ITS refit - if (track.itsNCls() < cutMyGTitsNClsMin) return false; - if (track.itsChi2NCl() > cutMyGTitsChi2NclMax) return false; - //if (!FulfillsITSHitRequirements(track.itsClusterSizes())) return false; <---- to complicated to implement now - // TPC - if (!track.hasTPC()) return false;// TPC refit - if (track.tpcNClsFindable() - track.tpcNClsFindableMinusFound() < cutMyGTtpcNClsMin) return false;// tpcNClsFound() - if (track.tpcNClsCrossedRows() < cutMyGTtpcNClsCrossedRowsMin) return false; - if ((track.tpcNClsCrossedRows()/track.tpcNClsFindable()) < cutMyGTtpcNClsCrossedRowsOverNClsMin) return false; - if (track.tpcChi2NCl() > cutMyGTtpcChi2NclMax) return false;// TPC chi2 + if (!track.hasITS()) + return false; // ITS refit + if (track.itsNCls() < cutMyGTitsNClsMin) + return false; + if (track.itsChi2NCl() > cutMyGTitsChi2NclMax) + return false; + // if (!FulfillsITSHitRequirements(track.itsClusterSizes())) return false; <---- to complicated to implement now + // TPC + if (!track.hasTPC()) + return false; // TPC refit + if (track.tpcNClsFindable() - track.tpcNClsFindableMinusFound() < cutMyGTtpcNClsMin) + return false; // tpcNClsFound() + if (track.tpcNClsCrossedRows() < cutMyGTtpcNClsCrossedRowsMin) + return false; + if ((track.tpcNClsCrossedRows() / track.tpcNClsFindable()) < cutMyGTtpcNClsCrossedRowsOverNClsMin) + return false; + if (track.tpcChi2NCl() > cutMyGTtpcChi2NclMax) + return false; // TPC chi2 return true; - } + } template void fillHistograms(C reconstructedCollision, Ts reconstructedBarrelTracks) From d906f9a97971dd3db1a2e3be28cba4578002a4cb Mon Sep 17 00:00:00 2001 From: Roman Lavicka Date: Thu, 8 Feb 2024 17:21:18 +0100 Subject: [PATCH 10/10] fixing redeclaration --- PWGUD/Tasks/upcTauCentralBarrelRL.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx index ecd8569159e..4bd93abef2e 100644 --- a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx +++ b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx @@ -132,8 +132,6 @@ struct UpcTauCentralBarrelRL { Configurable cutAvgITSclusterSize{"cutAvgITSclusterSize", 3.5, {"specific study"}}; Configurable cutPtAvgITSclusterSize{"cutPtAvgITSclusterSize", 0.7, {"specific study"}}; Configurable cutMyGlobalTracksOnly{"cutGlobalTracksOnly", false, {"Applies cut on here defined global tracks"}}; - Configurable cutAvgITSclusterSize{"cutAvgITSclusterSize", 3.5, {"specific study"}}; - Configurable cutPtAvgITSclusterSize{"cutPtAvgITSclusterSize", 0.7, {"specific study"}}; Configurable cutMyGTptMin{"cutMyGTptMin", 0.1f, {"MyGlobalTrack cut"}}; Configurable cutMyGTptMax{"cutMyGTptMax", 1e10f, {"MyGlobalTrack cut"}}; Configurable cutMyGTetaMin{"cutMyGTetaMin", -0.8, {"MyGlobalTrack cut"}};