Skip to content

Commit b11f2f7

Browse files
author
Zuzanna Chochulska-Gumińska
committed
new process for K+K+ and K-K- invariant mass
1 parent aed5e53 commit b11f2f7

1 file changed

Lines changed: 64 additions & 23 deletions

File tree

‎PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx‎

Lines changed: 64 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ struct FemtoUniversePairTaskTrackPhi {
9797
Preslice<FemtoRecoParticles> perColMC = aod::femtouniverseparticle::fdCollisionId;
9898

9999
Configurable<float> confZVertexCut{"confZVertexCut", 10.f, "Event sel: Maximum z-Vertex (cm)"};
100-
// Configurable<int> confNEventsMix{"confNEventsMix", 5, "Number of events for mixing"};
101100
Filter collisionFilter = (nabs(aod::collision::posZ) < confZVertexCut);
102101
using FilteredFDCollisions = soa::Filtered<o2::aod::FdCollisions>;
103102
using FilteredFDCollision = FilteredFDCollisions::iterator;
@@ -138,12 +137,12 @@ struct FemtoUniversePairTaskTrackPhi {
138137
Configurable<bool> confTrackUseRun3PIDforKaons{"confTrackUseRun3PIDforKaons", true, "Use Run3 PID for kaons from Veronika Barbasova's AN (https://alice-notes.web.cern.ch/node/1758). If this is on the other PID methods are ignored for kaons."};
139138

140139
/// Partitions for the track (particle 1)
141-
Partition<FilteredFemtoFullParticles> partsTrack = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) &&
140+
Partition<FilteredFemtoFullParticles> partsTrack = (aod::femtouniverseparticle::partType == static_cast<uint8_t>(aod::femtouniverseparticle::ParticleType::kTrack)) &&
142141
(aod::femtouniverseparticle::sign == confTrackSign) &&
143142
(aod::femtouniverseparticle::pt > confTrackPtLow) &&
144143
(aod::femtouniverseparticle::pt < confTrackPtHigh);
145144

146-
Partition<FemtoRecoParticles> partsTrackMCReco = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) &&
145+
Partition<FemtoRecoParticles> partsTrackMCReco = (aod::femtouniverseparticle::partType == static_cast<uint8_t>(aod::femtouniverseparticle::ParticleType::kTrack)) &&
147146
(aod::femtouniverseparticle::sign == confTrackSign) &&
148147
(aod::femtouniverseparticle::pt > confTrackPtLow) &&
149148
(aod::femtouniverseparticle::pt < confTrackPtHigh);
@@ -154,27 +153,30 @@ struct FemtoUniversePairTaskTrackPhi {
154153
Configurable<float> confInvMassLowLimitPhi{"confInvMassLowLimitPhi", 1.011, "Lower limit of the Phi invariant mass"}; // change that to do invariant mass cut
155154
Configurable<float> confInvMassUpLimitPhi{"confInvMassUpLimitPhi", 1.027, "Upper limit of the Phi invariant mass"};
156155
Configurable<bool> confFillMinvBackground{"confFillMinvBackground", false, "Fill background histograms for Phi invariant mass."};
156+
Configurable<bool> confFillMinvBackgroundKpKm{"confFillMinvBackgroundKpKm", false, "Fill background histograms for K+K- invariant mass."};
157+
Configurable<bool> confFillMinvBackgroundKpKp{"confFillMinvBackgroundKpKp", false, "Fill background histograms for K+K+ invariant mass."};
158+
Configurable<bool> confFillMinvBackgroundKmKm{"confFillMinvBackgroundKmKm", false, "Fill background histograms for K-K- invariant mass."};
157159

158160
/// Partitions for the Phi meson (particle 2)
159-
Partition<FilteredFemtoFullParticles> partsPhi = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kPhi)) &&
161+
Partition<FilteredFemtoFullParticles> partsPhi = (aod::femtouniverseparticle::partType == static_cast<uint8_t>(aod::femtouniverseparticle::ParticleType::kPhi)) &&
160162
(aod::femtouniverseparticle::pt > confPhiPtLow) &&
161163
(aod::femtouniverseparticle::pt < confPhiPtHigh) &&
162164
(aod::femtouniverseparticle::tempFitVar > confInvMassLowLimitPhi) &&
163165
(aod::femtouniverseparticle::tempFitVar < confInvMassUpLimitPhi);
164166

165-
Partition<FemtoRecoParticles> partsPhiMCReco = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kPhi)) &&
167+
Partition<FemtoRecoParticles> partsPhiMCReco = (aod::femtouniverseparticle::partType == static_cast<uint8_t>(aod::femtouniverseparticle::ParticleType::kPhi)) &&
166168
(aod::femtouniverseparticle::pt > confPhiPtLow) &&
167169
(aod::femtouniverseparticle::pt < confPhiPtHigh) &&
168170
(aod::femtouniverseparticle::tempFitVar > confInvMassLowLimitPhi) &&
169171
(aod::femtouniverseparticle::tempFitVar < confInvMassUpLimitPhi);
170172

171173
/// Partitions for Phi daughters kPhiChild
172-
Partition<FilteredFemtoFullParticles> partsPhiDaugh = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kPhiChild));
173-
Partition<soa::Join<FilteredFemtoFullParticles, aod::FDMCLabels>> partsPhiDaughMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kPhiChild));
174+
Partition<FilteredFemtoFullParticles> partsPhiDaugh = (aod::femtouniverseparticle::partType == static_cast<uint8_t>(aod::femtouniverseparticle::ParticleType::kPhiChild));
175+
Partition<soa::Join<FilteredFemtoFullParticles, aod::FDMCLabels>> partsPhiDaughMC = (aod::femtouniverseparticle::partType == static_cast<uint8_t>(aod::femtouniverseparticle::ParticleType::kPhiChild));
174176

175177
// Partition for K+K- minv
176-
Partition<FilteredFemtoFullParticles> partsKaons = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack));
177-
Partition<soa::Join<FilteredFemtoFullParticles, aod::FDMCLabels>> partsKaonsMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack));
178+
Partition<FilteredFemtoFullParticles> partsKaons = (aod::femtouniverseparticle::partType == static_cast<uint8_t>(aod::femtouniverseparticle::ParticleType::kTrack));
179+
Partition<soa::Join<FilteredFemtoFullParticles, aod::FDMCLabels>> partsKaonsMC = (aod::femtouniverseparticle::partType == static_cast<uint8_t>(aod::femtouniverseparticle::ParticleType::kTrack));
178180

179181
/// Histogramming for particle 1
180182
FemtoUniverseParticleHisto<aod::femtouniverseparticle::ParticleType::kTrack, 1> trackHistoPartTrack;
@@ -554,32 +556,31 @@ struct FemtoUniversePairTaskTrackPhi {
554556

555557
if (confFillMinvBackground) {
556558
// Used for better fitting of invariant mass background.
557-
558559
TLorentzVector part1Vec;
559560
TLorentzVector part2Vec;
560561

561-
float mMassOne = o2::constants::physics::MassKPlus;
562-
float mMassTwo = o2::constants::physics::MassKMinus;
562+
float mMassKp = o2::constants::physics::MassKPlus;
563+
float mMassKm = o2::constants::physics::MassKMinus;
563564

564565
for (auto const& [kaon1, kaon2] : combinations(CombinationsStrictlyUpperIndexPolicy(partsKaons, partsKaons))) {
565-
if ((kaon1.mAntiLambda() == 1) && (kaon2.mAntiLambda() == 1)) {
566-
part1Vec.SetPtEtaPhiM(kaon1.pt(), kaon1.eta(), kaon1.phi(), mMassOne);
567-
part2Vec.SetPtEtaPhiM(kaon2.pt(), kaon2.eta(), kaon2.phi(), mMassOne);
566+
if ((confFillMinvBackgroundKpKp) && (kaon1.mAntiLambda() == 1) && (kaon2.mAntiLambda() == 1)) {
567+
part1Vec.SetPtEtaPhiM(kaon1.pt(), kaon1.eta(), kaon1.phi(), mMassKp);
568+
part2Vec.SetPtEtaPhiM(kaon2.pt(), kaon2.eta(), kaon2.phi(), mMassKp);
568569
TLorentzVector sumVec(part1Vec);
569570
sumVec += part2Vec;
570571
registryPhiMinvBackground.fill(HIST("InvariantMassKpKp"), sumVec.M());
571572
}
572-
if ((kaon1.mAntiLambda() == -1) && (kaon2.mAntiLambda() == -1)) {
573-
part1Vec.SetPtEtaPhiM(kaon1.pt(), kaon1.eta(), kaon1.phi(), mMassTwo);
574-
part2Vec.SetPtEtaPhiM(kaon2.pt(), kaon2.eta(), kaon2.phi(), mMassTwo);
573+
if ((confFillMinvBackgroundKmKm) && (kaon1.mAntiLambda() == -1) && (kaon2.mAntiLambda() == -1)) {
574+
part1Vec.SetPtEtaPhiM(kaon1.pt(), kaon1.eta(), kaon1.phi(), mMassKm);
575+
part2Vec.SetPtEtaPhiM(kaon2.pt(), kaon2.eta(), kaon2.phi(), mMassKm);
575576

576577
TLorentzVector sumVec(part1Vec);
577578
sumVec += part2Vec;
578579
registryPhiMinvBackground.fill(HIST("InvariantMassKmKm"), sumVec.M());
579580
}
580-
if ((kaon1.mAntiLambda() == 1) && (kaon2.mAntiLambda() == -1)) {
581-
part1Vec.SetPtEtaPhiM(kaon1.pt(), kaon1.eta(), kaon1.phi(), mMassOne);
582-
part2Vec.SetPtEtaPhiM(kaon2.pt(), kaon2.eta(), kaon2.phi(), mMassTwo);
581+
if ((confFillMinvBackgroundKpKm) && (kaon1.mAntiLambda() == 1) && (kaon2.mAntiLambda() == -1)) {
582+
part1Vec.SetPtEtaPhiM(kaon1.pt(), kaon1.eta(), kaon1.phi(), mMassKp);
583+
part2Vec.SetPtEtaPhiM(kaon2.pt(), kaon2.eta(), kaon2.phi(), mMassKm);
583584

584585
TLorentzVector sumVec(part1Vec);
585586
sumVec += part2Vec;
@@ -681,7 +682,7 @@ struct FemtoUniversePairTaskTrackPhi {
681682
void processMCTruth(aod::FDParticles const& parts)
682683
{
683684
for (auto const& part : parts) {
684-
if (part.partType() != uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) {
685+
if (part.partType() != static_cast<uint8_t>(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) {
685686
continue;
686687
}
687688

@@ -781,6 +782,46 @@ struct FemtoUniversePairTaskTrackPhi {
781782
}
782783

783784
PROCESS_SWITCH(FemtoUniversePairTaskTrackPhi, processMCReco, "Process MC reco data", false);
785+
786+
void processMinvBackground()
787+
{
788+
if (!confFillMinvBackground) {
789+
return;
790+
}
791+
792+
TLorentzVector part1Vec;
793+
TLorentzVector part2Vec;
794+
795+
float mMassOne = o2::constants::physics::MassKPlus;
796+
float mMassTwo = o2::constants::physics::MassKMinus;
797+
798+
for (auto const& [kaon1, kaon2] : combinations(CombinationsStrictlyUpperIndexPolicy(partsKaons, partsKaons))) {
799+
if ((confFillMinvBackgroundKpKp) && (kaon1.mAntiLambda() == 1) && (kaon2.mAntiLambda() == 1)) {
800+
part1Vec.SetPtEtaPhiM(kaon1.pt(), kaon1.eta(), kaon1.phi(), mMassOne);
801+
part2Vec.SetPtEtaPhiM(kaon2.pt(), kaon2.eta(), kaon2.phi(), mMassOne);
802+
TLorentzVector sumVec(part1Vec);
803+
sumVec += part2Vec;
804+
registryPhiMinvBackground.fill(HIST("InvariantMassKpKp"), sumVec.M());
805+
}
806+
if ((confFillMinvBackgroundKmKm) && (kaon1.mAntiLambda() == -1) && (kaon2.mAntiLambda() == -1)) {
807+
part1Vec.SetPtEtaPhiM(kaon1.pt(), kaon1.eta(), kaon1.phi(), mMassTwo);
808+
part2Vec.SetPtEtaPhiM(kaon2.pt(), kaon2.eta(), kaon2.phi(), mMassTwo);
809+
810+
TLorentzVector sumVec(part1Vec);
811+
sumVec += part2Vec;
812+
registryPhiMinvBackground.fill(HIST("InvariantMassKmKm"), sumVec.M());
813+
}
814+
if ((confFillMinvBackgroundKpKm) && (kaon1.mAntiLambda() == 1) && (kaon2.mAntiLambda() == -1)) {
815+
part1Vec.SetPtEtaPhiM(kaon1.pt(), kaon1.eta(), kaon1.phi(), mMassOne);
816+
part2Vec.SetPtEtaPhiM(kaon2.pt(), kaon2.eta(), kaon2.phi(), mMassTwo);
817+
818+
TLorentzVector sumVec(part1Vec);
819+
sumVec += part2Vec;
820+
registryPhiMinvBackground.fill(HIST("InvariantMassKpKm"), sumVec.M());
821+
}
822+
}
823+
}
824+
PROCESS_SWITCH(FemtoUniversePairTaskTrackPhi, processMinvBackground, "Enable processing invariant mass background for kaon pairs (K+K+, K-K-, K+K-)", false);
784825
};
785826

786827
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
@@ -789,4 +830,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
789830
adaptAnalysisTask<FemtoUniversePairTaskTrackPhi>(cfgc),
790831
};
791832
return workflow;
792-
}
833+
}

0 commit comments

Comments
 (0)