From 1f981417c3cbf469433d5364d7fb16e41c390891 Mon Sep 17 00:00:00 2001 From: Laura Serksnyte Date: Thu, 18 Apr 2024 14:42:39 +0200 Subject: [PATCH] Add antilambda inv mass, noo CPR for opposite charge particles, fix for CPR of mixed event lambdas, changed CPR filling only for low Q3 triplets --- .../FemtoDream/Core/femtoDreamDetaDphiStar.h | 75 ++++++++++++++----- .../Tasks/femtoDreamCollisionMasker.cxx | 11 ++- .../femtoDreamTripletTaskTrackTrackTrack.cxx | 39 ++++++---- .../femtoDreamTripletTaskTrackTrackV0.cxx | 49 +++++++----- 4 files changed, 119 insertions(+), 55 deletions(-) diff --git a/PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h b/PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h index c65fbbb221a..d9ad6d3e0c0 100644 --- a/PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h +++ b/PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h @@ -41,11 +41,13 @@ class FemtoDreamDetaDphiStar /// Destructor virtual ~FemtoDreamDetaDphiStar() = default; /// Initialization of the histograms and setting required values - void init(HistogramRegistry* registry, HistogramRegistry* registryQA, float ldeltaPhiMax, float ldeltaEtaMax, bool lplotForEveryRadii, int meORse = 0, bool oldversion = true) + void init(HistogramRegistry* registry, HistogramRegistry* registryQA, float ldeltaPhiMax, float ldeltaEtaMax, bool lplotForEveryRadii, int meORse = 0, bool oldversion = true, float Q3Limit = 8., bool isMELambda = false) { deltaPhiMax = ldeltaPhiMax; deltaEtaMax = ldeltaEtaMax; plotForEveryRadii = lplotForEveryRadii; + upperQ3LimitForPlotting = Q3Limit; + isMixedEventLambda = isMELambda; runOldVersion = oldversion; mHistogramRegistry = registry; mHistogramRegistryQA = registryQA; @@ -75,7 +77,7 @@ class FemtoDreamDetaDphiStar } /// Check if pair is close or not template - bool isClosePair(Part const& part1, Part const& part2, Parts const& particles, float lmagfield) + bool isClosePair(Part const& part1, Part const& part2, Parts const& particles, float lmagfield, float Q3 = 999.) { magfield = lmagfield; @@ -87,12 +89,25 @@ class FemtoDreamDetaDphiStar return false; } auto deta = part1.eta() - part2.eta(); - auto dphiAvg = AveragePhiStar(part1, part2, 0); - histdetadpi[0][0]->Fill(deta, dphiAvg); - if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) { - return true; + bool sameCharge = false; + auto dphiAvg = AveragePhiStar(part1, part2, 0, &sameCharge); + if (Q3 == 999) { + histdetadpi[0][0]->Fill(deta, dphiAvg); + } else if (Q3 < upperQ3LimitForPlotting) { + histdetadpi[0][0]->Fill(deta, dphiAvg); + } + if (sameCharge) { + if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) { + return true; + } else { + if (Q3 == 999) { + histdetadpi[0][1]->Fill(deta, dphiAvg); + } else if (Q3 < upperQ3LimitForPlotting) { + histdetadpi[0][1]->Fill(deta, dphiAvg); + } + return false; + } } else { - histdetadpi[0][1]->Fill(deta, dphiAvg); return false; } @@ -106,15 +121,31 @@ class FemtoDreamDetaDphiStar bool pass = false; for (int i = 0; i < 2; i++) { - auto indexOfDaughter = part2.index() - 2 + i; + int indexOfDaughter; + if (isMixedEventLambda) { + indexOfDaughter = part2.globalIndex() - 2 + i; + } else { + indexOfDaughter = part2.index() - 2 + i; + } auto daughter = particles.begin() + indexOfDaughter; auto deta = part1.eta() - daughter.eta(); - auto dphiAvg = AveragePhiStar(part1, *daughter, i); - histdetadpi[i][0]->Fill(deta, dphiAvg); - if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) { - pass = true; - } else { - histdetadpi[i][1]->Fill(deta, dphiAvg); + bool sameCharge = false; + auto dphiAvg = AveragePhiStar(part1, *daughter, i, &sameCharge); + if (Q3 == 999) { + histdetadpi[i][0]->Fill(deta, dphiAvg); + } else if (Q3 < upperQ3LimitForPlotting) { + histdetadpi[i][0]->Fill(deta, dphiAvg); + } + if (sameCharge) { + if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) { + pass = true; + } else { + if (Q3 == 999) { + histdetadpi[i][1]->Fill(deta, dphiAvg); + } else if (Q3 < upperQ3LimitForPlotting) { + histdetadpi[i][1]->Fill(deta, dphiAvg); + } + } } } return pass; @@ -153,6 +184,8 @@ class FemtoDreamDetaDphiStar float deltaEtaMax; float magfield; bool plotForEveryRadii = false; + bool isMixedEventLambda = false; + float upperQ3LimitForPlotting = 8.; // a possible bug was found, but this must be tested on hyperloop with larger statistics // possiboility to run old code is turned on so a proper comparison of both code versions can be done bool runOldVersion = true; @@ -163,12 +196,12 @@ class FemtoDreamDetaDphiStar /// Calculate phi at all required radii stored in tmpRadiiTPC /// Magnetic field to be provided in Tesla template - void PhiAtRadiiTPC(const T& part, std::vector& tmpVec) + int PhiAtRadiiTPC(const T& part, std::vector& tmpVec) { float phi0 = part.phi(); // Start: Get the charge from cutcontainer using masks - float charge = 0.; + int charge = 0.; if ((part.cut() & kSignMinusMask) == kValue0 && (part.cut() & kSignPlusMask) == kValue0) { charge = 0; } else if ((part.cut() & kSignPlusMask) == kSignPlusMask) { @@ -194,16 +227,20 @@ class FemtoDreamDetaDphiStar } } } + return charge; } /// Calculate average phi template - float AveragePhiStar(const T1& part1, const T2& part2, int iHist) + float AveragePhiStar(const T1& part1, const T2& part2, int iHist, bool* sameCharge) { std::vector tmpVec1; std::vector tmpVec2; - PhiAtRadiiTPC(part1, tmpVec1); - PhiAtRadiiTPC(part2, tmpVec2); + auto charge1 = PhiAtRadiiTPC(part1, tmpVec1); + auto charge2 = PhiAtRadiiTPC(part2, tmpVec2); + if (charge1 == charge2) { + *sameCharge = true; + } int num = tmpVec1.size(); int meaningfulEntries = num; float dPhiAvg = 0; diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamCollisionMasker.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamCollisionMasker.cxx index c57a56818c5..62f2f4c3967 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamCollisionMasker.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamCollisionMasker.cxx @@ -254,6 +254,10 @@ struct femoDreamCollisionMasker { FilterPtMax.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get()); } else if (option.name.compare(std::string("ConfMinpT")) == 0) { FilterPtMin.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get()); + } else if (option.name.compare(std::string("ConfMaxDCAxy")) == 0) { + FilterTempFitVarMax.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get()); + } else if (option.name.compare(std::string("ConfMinDCAxy")) == 0) { + FilterTempFitVarMin.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get()); } } } else if (device.name.find("femto-dream-triplet-task-track-track-v0") != std::string::npos) { @@ -272,6 +276,10 @@ struct femoDreamCollisionMasker { FilterPtMax.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get()); } else if (option.name.compare(std::string("ConfMinpT")) == 0) { FilterPtMin.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get()); + } else if (option.name.compare(std::string("ConfMaxDCAxy")) == 0) { + FilterTempFitVarMax.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get()); + } else if (option.name.compare(std::string("ConfMinDCAxy")) == 0) { + FilterTempFitVarMin.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get()); } else if (option.name.compare(std::string("ConfCutV0")) == 0) { V0CutBits.at(CollisionMasks::kPartThree).push_back(option.defaultValue.get()); } else if (option.name.compare(std::string("Conf_ChildPos_CutV0")) == 0) { @@ -362,7 +370,8 @@ struct femoDreamCollisionMasker { continue; } // check filter cuts - if (track.pt() < FilterPtMin.at(P).at(index) || track.pt() > FilterPtMax.at(P).at(index)) { + if (track.pt() < FilterPtMin.at(P).at(index) || track.pt() > FilterPtMax.at(P).at(index) || + track.tempFitVar() > FilterTempFitVarMax.at(P).at(index) || track.tempFitVar() < FilterTempFitVarMin.at(P).at(index)) { // if they are not passed, skip the particle continue; } diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrack.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrack.cxx index 93bf384bc26..570a8a808df 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrack.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrack.cxx @@ -11,9 +11,6 @@ /// \file femtoDreamTripletTaskTrackTrackTrack.cxx /// \brief Tasks that reads the track tables and creates track triplets; only three identical particles can be used -/// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de -/// \author Georgios Mantzaridis, TU München, georgios.mantzaridis@tum.de -/// \author Anton Riedel, TU München, anton.riedel@tum.de /// \author Laura Serksnyte, TU München, laura.serksnyte@tum.de #include @@ -58,6 +55,8 @@ struct femtoDreamTripletTaskTrackTrackTrack { Configurable ConfTracksInMixedEvent{"ConfTracksInMixedEvent", 1, "Number of tracks of interest, contained in the mixed event sample: 1 - only events with at least one track of interest are used in mixing; ...; 3 - only events with at least three track of interest are used in mixing. Max value is 3"}; Configurable ConfMaxpT{"ConfMaxpT", 4.05f, "Maximum transverse momentum of the particles"}; Configurable ConfMinpT{"ConfMinpT", 0.3f, "Minimum transverse momentum of the particles"}; + Configurable ConfMaxDCAxy{"ConfMaxDCAxy", -0.1f, "Maximum DCAxy of the particles"}; + Configurable ConfMinDCAxy{"ConfMinDCAxy", 0.1f, "Minimum DCAxy of the particles"}; Configurable ConfPIDthrMom{"ConfPIDthrMom", 1.f, "Momentum threshold from which TPC and TOF are required for PID"}; Configurable ConfTPCPIDBit{"ConfTPCPIDBit", 16, "PID TPC bit from cutCulator "}; Configurable ConfTPCTOFPIDBit{"ConfTPCTOFPIDBit", 8, "PID TPCTOF bit from cutCulator"}; @@ -73,12 +72,16 @@ struct femtoDreamTripletTaskTrackTrackTrack { ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= ConfPIDthrMom, ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCPIDBit), ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCTOFPIDBit)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) && (aod::femtodreamparticle::pt < ConfMaxpT) && - (aod::femtodreamparticle::pt > ConfMinpT); + (aod::femtodreamparticle::pt > ConfMinpT) && + (aod::femtodreamparticle::tempFitVar < ConfMaxDCAxy) && + (aod::femtodreamparticle::tempFitVar > ConfMinDCAxy); Partition> SelectedPartsMC = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= ConfPIDthrMom, ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCPIDBit), ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCTOFPIDBit)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) && (aod::femtodreamparticle::pt < ConfMaxpT) && - (aod::femtodreamparticle::pt > ConfMinpT); + (aod::femtodreamparticle::pt > ConfMinpT) && + (aod::femtodreamparticle::tempFitVar < ConfMaxDCAxy) && + (aod::femtodreamparticle::tempFitVar > ConfMinDCAxy); /// Histogramming of Selected Particles FemtoDreamParticleHisto trackHistoSelectedParts; @@ -105,6 +108,7 @@ struct femtoDreamTripletTaskTrackTrackTrack { Configurable ConfCPRPlotPerRadii{"ConfCPRPlotPerRadii", false, "Plot CPR per radii"}; Configurable ConfCPRdeltaPhiMax{"ConfCPRdeltaPhiMax", 0.01, "Max. Delta Phi for Close Pair Rejection"}; Configurable ConfCPRdeltaEtaMax{"ConfCPRdeltaEtaMax", 0.01, "Max. Delta Eta for Close Pair Rejection"}; + Configurable ConfMaxQ3IncludedInCPRPlots{"ConfMaxQ3IncludedInCPRPlots", 8., "Maximum Q3, for which the pair CPR is included in plots"}; ConfigurableAxis ConfDummy{"ConfDummy", {1, 0, 1}, "Dummy axis"}; FemtoDreamContainerThreeBody sameEventCont; @@ -138,8 +142,8 @@ struct femtoDreamTripletTaskTrackTrackTrack { mixedEventCont.setPDGCodes(ConfPDGCodePart, ConfPDGCodePart, ConfPDGCodePart); pairCleaner.init(&qaRegistry); // SERKSNYTE : later check if init should be updated to have 3 separate histos if (ConfIsCPR.value) { - pairCloseRejectionSE.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiMax.value, ConfCPRdeltaEtaMax.value, ConfCPRPlotPerRadii.value, 1, ConfUseOLD_possiblyWrong_CPR); - pairCloseRejectionME.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiMax.value, ConfCPRdeltaEtaMax.value, ConfCPRPlotPerRadii.value, 2, ConfUseOLD_possiblyWrong_CPR); + pairCloseRejectionSE.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiMax.value, ConfCPRdeltaEtaMax.value, ConfCPRPlotPerRadii.value, 1, ConfUseOLD_possiblyWrong_CPR, ConfMaxQ3IncludedInCPRPlots); + pairCloseRejectionME.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiMax.value, ConfCPRdeltaEtaMax.value, ConfCPRPlotPerRadii.value, 2, ConfUseOLD_possiblyWrong_CPR, ConfMaxQ3IncludedInCPRPlots); } // get masses @@ -158,7 +162,9 @@ struct femtoDreamTripletTaskTrackTrackTrack { containsNameValuePair(device.options, "ConfTPCTOFPIDBit", ConfTPCTOFPIDBit.value) && containsNameValuePair(device.options, "ConfPIDthrMom", ConfPIDthrMom.value) && containsNameValuePair(device.options, "ConfMaxpT", ConfMaxpT.value) && - containsNameValuePair(device.options, "ConfMinpT", ConfMinpT.value)) { + containsNameValuePair(device.options, "ConfMinpT", ConfMinpT.value) && + containsNameValuePair(device.options, "ConfMaxDCAxy", ConfMaxDCAxy.value) && + containsNameValuePair(device.options, "ConfMinDCAxy", ConfMinDCAxy.value)) { mask.set(index); MaskBit = static_cast(mask.to_ulong()); LOG(info) << "Device name matched: " << device.name; @@ -203,14 +209,16 @@ struct femtoDreamTripletTaskTrackTrackTrack { /// Now build the combinations for (auto& [p1, p2, p3] : combinations(CombinationsStrictlyUpperIndexPolicy(groupSelectedParts, groupSelectedParts, groupSelectedParts))) { + auto Q3 = FemtoDreamMath::getQ3(p1, mMassOne, p2, mMassTwo, p3, mMassThree); + if (ConfIsCPR.value) { - if (pairCloseRejectionSE.isClosePair(p1, p2, parts, magFieldTesla)) { + if (pairCloseRejectionSE.isClosePair(p1, p2, parts, magFieldTesla, Q3)) { continue; } - if (pairCloseRejectionSE.isClosePair(p2, p3, parts, magFieldTesla)) { + if (pairCloseRejectionSE.isClosePair(p2, p3, parts, magFieldTesla, Q3)) { continue; } - if (pairCloseRejectionSE.isClosePair(p1, p3, parts, magFieldTesla)) { + if (pairCloseRejectionSE.isClosePair(p1, p3, parts, magFieldTesla, Q3)) { continue; } } @@ -226,7 +234,6 @@ struct femtoDreamTripletTaskTrackTrackTrack { continue; } // fill pT of all three particles as a function of Q3 for lambda calculations - auto Q3 = FemtoDreamMath::getQ3(p1, mMassOne, p2, mMassTwo, p3, mMassThree); ThreeBodyQARegistry.fill(HIST("TripletTaskQA/particle_pT_in_Triplet_SE"), p1.pt(), p2.pt(), p3.pt(), Q3); sameEventCont.setTriplet(p1, p2, p3, multCol, Q3); } @@ -322,20 +329,20 @@ struct femtoDreamTripletTaskTrackTrackTrack { void doMixedEvent(PartitionType groupPartsOne, PartitionType groupPartsTwo, PartitionType groupPartsThree, PartType parts, float magFieldTesla, int multCol) { for (auto& [p1, p2, p3] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo, groupPartsThree))) { + auto Q3 = FemtoDreamMath::getQ3(p1, mMassOne, p2, mMassTwo, p3, mMassThree); if (ConfIsCPR.value) { - if (pairCloseRejectionME.isClosePair(p1, p2, parts, magFieldTesla)) { + if (pairCloseRejectionME.isClosePair(p1, p2, parts, magFieldTesla, Q3)) { continue; } - if (pairCloseRejectionME.isClosePair(p2, p3, parts, magFieldTesla)) { + if (pairCloseRejectionME.isClosePair(p2, p3, parts, magFieldTesla, Q3)) { continue; } - if (pairCloseRejectionME.isClosePair(p1, p3, parts, magFieldTesla)) { + if (pairCloseRejectionME.isClosePair(p1, p3, parts, magFieldTesla, Q3)) { continue; } } // fill pT of all three particles as a function of Q3 for lambda calculations - auto Q3 = FemtoDreamMath::getQ3(p1, mMassOne, p2, mMassTwo, p3, mMassThree); ThreeBodyQARegistry.fill(HIST("TripletTaskQA/particle_pT_in_Triplet_ME"), p1.pt(), p2.pt(), p3.pt(), Q3); mixedEventCont.setTriplet(p1, p2, p3, multCol, Q3); } diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0.cxx index 3f5036fdb1e..45978da9762 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0.cxx @@ -61,6 +61,8 @@ struct femtoDreamTripletTaskTrackTrackV0 { Configurable ConfTPCTOFPIDBit{"ConfTPCTOFPIDBit", 8, "PID TPCTOF bit from cutCulator"}; Configurable ConfMaxpT{"ConfMaxpT", 4.05f, "Maximum transverse momentum of the particles"}; Configurable ConfMinpT{"ConfMinpT", 0.3f, "Minimum transverse momentum of the particles"}; + Configurable ConfMaxDCAxy{"ConfMaxDCAxy", -0.1f, "Maximum DCAxy of the particles"}; + Configurable ConfMinDCAxy{"ConfMinDCAxy", 0.1f, "Minimum DCAxy of the particles"}; Configurable ConfPIDthrMom{"ConfPIDthrMom", 1.f, "Momentum threshold from which TPC and TOF are required for PID"}; Configurable ConfIsMC{"ConfIsMC", false, "Enable additional Histogramms in the case of a MonteCarlo Run"}; Configurable ConfUse3D{"ConfUse3D", false, "Enable three dimensional histogramms (to be used only for analysis with high statistics): k* vs mT vs multiplicity"}; @@ -70,12 +72,16 @@ struct femtoDreamTripletTaskTrackTrackV0 { ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= ConfPIDthrMom, ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCPIDBit), ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCTOFPIDBit)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) && (aod::femtodreamparticle::pt < ConfMaxpT) && - (aod::femtodreamparticle::pt > ConfMinpT); + (aod::femtodreamparticle::pt > ConfMinpT) && + (aod::femtodreamparticle::tempFitVar < ConfMaxDCAxy) && + (aod::femtodreamparticle::tempFitVar > ConfMinDCAxy); Partition> SelectedPartsMC = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= ConfPIDthrMom, ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCPIDBit), ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCTOFPIDBit)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) && (aod::femtodreamparticle::pt < ConfMaxpT) && - (aod::femtodreamparticle::pt > ConfMinpT); + (aod::femtodreamparticle::pt > ConfMinpT) && + (aod::femtodreamparticle::tempFitVar < ConfMaxDCAxy) && + (aod::femtodreamparticle::tempFitVar > ConfMinDCAxy); /// Histogramming of selected tracks FemtoDreamParticleHisto trackHistoSelectedParts; @@ -148,6 +154,7 @@ struct femtoDreamTripletTaskTrackTrackV0 { Configurable ConfCPRPlotPerRadii{"ConfCPRPlotPerRadii", false, "Plot CPR per radii"}; Configurable ConfCPRdeltaPhiMax{"ConfCPRdeltaPhiMax", 0.01, "Max. Delta Phi for Close Pair Rejection"}; Configurable ConfCPRdeltaEtaMax{"ConfCPRdeltaEtaMax", 0.01, "Max. Delta Eta for Close Pair Rejection"}; + Configurable ConfMaxQ3IncludedInCPRPlots{"ConfMaxQ3IncludedInCPRPlots", 8., "Maximum Q3, for which the pair CPR is included in plots"}; ConfigurableAxis ConfDummy{"ConfDummy", {1, 0, 1}, "Dummy axis"}; FemtoDreamContainerThreeBody sameEventCont; @@ -178,8 +185,10 @@ struct femtoDreamTripletTaskTrackTrackV0 { ThreeBodyQARegistry.add("TripletTaskQA/hSECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); ThreeBodyQARegistry.add("TripletTaskQA/hMECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); - ThreeBodyQARegistry.add("TripletTaskQA/hMinvSE", ";Q_{3};M_{inv}", kTH2F, {ConfQ3Bins, ConfInvMassBins}); - ThreeBodyQARegistry.add("TripletTaskQA/hMinvME", ";Q_{3};M_{inv}", kTH2F, {ConfQ3Bins, ConfInvMassBins}); + ThreeBodyQARegistry.add("TripletTaskQA/hMinvSE_Lambda", ";Q_{3};M_{inv}", kTH2F, {ConfQ3Bins, ConfInvMassBins}); + ThreeBodyQARegistry.add("TripletTaskQA/hMinvME_Lambda", ";Q_{3};M_{inv}", kTH2F, {ConfQ3Bins, ConfInvMassBins}); + ThreeBodyQARegistry.add("TripletTaskQA/hMinvSE_AntiLambda", ";Q_{3};M_{inv}", kTH2F, {ConfQ3Bins, ConfInvMassBins}); + ThreeBodyQARegistry.add("TripletTaskQA/hMinvME_AntiLambda", ";Q_{3};M_{inv}", kTH2F, {ConfQ3Bins, ConfInvMassBins}); ThreeBodyQARegistry.add("TripletTaskQA/particle_pT_in_Triplet_SE", "; p_{T1} ; p_{T2} ; p_{T3} ; Q_{3}", kTHnSparseF, {ConfTempFitVarpTBins, ConfTempFitVarpTBins, ConfTempFitVarpTV0Bins, ConfQ3BinsFor4D}); ThreeBodyQARegistry.add("TripletTaskQA/particle_pT_in_Triplet_ME", "; p_{T1} ; p_{T2} ; p_{T3} ; Q_{3}", kTHnSparseF, {ConfTempFitVarpTBins, ConfTempFitVarpTBins, ConfTempFitVarpTV0Bins, ConfQ3BinsFor4D}); std::vector tmpVecMult = ConfMultBins; @@ -194,10 +203,10 @@ struct femtoDreamTripletTaskTrackTrackV0 { pairCleanerTrackTrack.init(&qaRegistry); pairCleanerTrackV0.init(&qaRegistry); if (ConfIsCPR.value) { - pairCloseRejectionTrackTrackSE.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiMax.value, ConfCPRdeltaEtaMax.value, ConfCPRPlotPerRadii.value, 1, ConfUseOLD_possiblyWrong_CPR); - pairCloseRejectionTrackV0SE.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiMax.value, ConfCPRdeltaEtaMax.value, ConfCPRPlotPerRadii.value, 1, ConfUseOLD_possiblyWrong_CPR); - pairCloseRejectionTrackTrackME.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiMax.value, ConfCPRdeltaEtaMax.value, ConfCPRPlotPerRadii.value, 2, ConfUseOLD_possiblyWrong_CPR); - pairCloseRejectionTrackV0ME.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiMax.value, ConfCPRdeltaEtaMax.value, ConfCPRPlotPerRadii.value, 2, ConfUseOLD_possiblyWrong_CPR); + pairCloseRejectionTrackTrackSE.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiMax.value, ConfCPRdeltaEtaMax.value, ConfCPRPlotPerRadii.value, 1, ConfUseOLD_possiblyWrong_CPR, ConfMaxQ3IncludedInCPRPlots); + pairCloseRejectionTrackV0SE.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiMax.value, ConfCPRdeltaEtaMax.value, ConfCPRPlotPerRadii.value, 1, ConfUseOLD_possiblyWrong_CPR, ConfMaxQ3IncludedInCPRPlots); + pairCloseRejectionTrackTrackME.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiMax.value, ConfCPRdeltaEtaMax.value, ConfCPRPlotPerRadii.value, 2, ConfUseOLD_possiblyWrong_CPR, ConfMaxQ3IncludedInCPRPlots); + pairCloseRejectionTrackV0ME.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiMax.value, ConfCPRdeltaEtaMax.value, ConfCPRPlotPerRadii.value, 2, ConfUseOLD_possiblyWrong_CPR, ConfMaxQ3IncludedInCPRPlots, true); } // get masses @@ -302,16 +311,16 @@ struct femtoDreamTripletTaskTrackTrackV0 { } for (auto& [T1, T2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupSelectedTracks, groupSelectedTracks))) { - + auto Q3 = FemtoDreamMath::getQ3(T1, mMassOne, T2, mMassTwo, V0, mMassThree); // Close pair rejection if (ConfIsCPR.value) { - if (pairCloseRejectionTrackTrackSE.isClosePair(T1, T2, parts, magFieldTesla)) { + if (pairCloseRejectionTrackTrackSE.isClosePair(T1, T2, parts, magFieldTesla, Q3)) { continue; } - if (pairCloseRejectionTrackV0SE.isClosePair(T1, V0, parts, magFieldTesla)) { + if (pairCloseRejectionTrackV0SE.isClosePair(T1, V0, parts, magFieldTesla, Q3)) { continue; } - if (pairCloseRejectionTrackV0SE.isClosePair(T2, V0, parts, magFieldTesla)) { + if (pairCloseRejectionTrackV0SE.isClosePair(T2, V0, parts, magFieldTesla, Q3)) { continue; } } @@ -327,8 +336,8 @@ struct femtoDreamTripletTaskTrackTrackV0 { continue; } // fill inv Mass as a function of Q3 for purity fits - auto Q3 = FemtoDreamMath::getQ3(T1, mMassOne, T2, mMassTwo, V0, mMassThree); - ThreeBodyQARegistry.fill(HIST("TripletTaskQA/hMinvSE"), Q3, V0.mLambda()); + ThreeBodyQARegistry.fill(HIST("TripletTaskQA/hMinvSE_Lambda"), Q3, V0.mLambda()); + ThreeBodyQARegistry.fill(HIST("TripletTaskQA/hMinvSE_AntiLambda"), Q3, V0.mAntiLambda()); ThreeBodyQARegistry.fill(HIST("TripletTaskQA/particle_pT_in_Triplet_SE"), T1.pt(), T2.pt(), V0.pt(), Q3); sameEventCont.setTriplet(T1, T2, V0, multCol, Q3); } @@ -490,21 +499,23 @@ struct femtoDreamTripletTaskTrackTrackV0 { continue; } + auto Q3 = FemtoDreamMath::getQ3(T1, mMassOne, T2, mMassTwo, V0, mMassThree); // Close pair rejection if (ConfIsCPR.value) { - if (pairCloseRejectionTrackTrackME.isClosePair(T1, T2, parts, magFieldTesla)) { + if (pairCloseRejectionTrackTrackME.isClosePair(T1, T2, parts, magFieldTesla, Q3)) { continue; } - if (pairCloseRejectionTrackV0ME.isClosePair(T1, V0, parts, magFieldTesla)) { + if (pairCloseRejectionTrackV0ME.isClosePair(T1, V0, parts, magFieldTesla, Q3)) { continue; } - if (pairCloseRejectionTrackV0ME.isClosePair(T2, V0, parts, magFieldTesla)) { + if (pairCloseRejectionTrackV0ME.isClosePair(T2, V0, parts, magFieldTesla, Q3)) { continue; } } + // fill inv Mass as a function of Q3 for purity fits - auto Q3 = FemtoDreamMath::getQ3(T1, mMassOne, T2, mMassTwo, V0, mMassThree); - ThreeBodyQARegistry.fill(HIST("TripletTaskQA/hMinvME"), Q3, V0.mLambda()); + ThreeBodyQARegistry.fill(HIST("TripletTaskQA/hMinvME_Lambda"), Q3, V0.mLambda()); + ThreeBodyQARegistry.fill(HIST("TripletTaskQA/hMinvME_AntiLambda"), Q3, V0.mAntiLambda()); ThreeBodyQARegistry.fill(HIST("TripletTaskQA/particle_pT_in_Triplet_ME"), T1.pt(), T2.pt(), V0.pt(), Q3); mixedEventCont.setTriplet(T1, T2, V0, multCol, Q3); }