Skip to content

Commit 575f012

Browse files
lauraserLaura Serksnyte
andauthored
Added new QA histograms (#5598)
Co-authored-by: Laura Serksnyte <laura.serksnyte@cern.ch>
1 parent 58a56f1 commit 575f012

File tree

5 files changed

+153
-28
lines changed

5 files changed

+153
-28
lines changed

PWGCF/FemtoDream/Core/femtoDreamContainerThreeBody.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,9 @@ class FemtoDreamContainerThreeBody
177177
/// \param part3 Particle three
178178
/// \param mult Multiplicity of the event
179179
template <bool isMC, typename T>
180-
void setTriplet(T const& part1, T const& part2, T const& part3, const int mult)
180+
void setTriplet(T const& part1, T const& part2, T const& part3, const int mult, const float femtoObs)
181181
{
182-
float femtoObs, femtoObsMC;
183-
// Calculate femto observable and the mT with reconstructed information
184-
if constexpr (mFemtoObs == femtoDreamContainerThreeBody::Observable::Q3) {
185-
femtoObs = FemtoDreamMath::getQ3(part1, mMassOne, part2, mMassTwo, part3, mMassThree);
186-
}
182+
float femtoObsMC;
187183

188184
if (mHistogramRegistry) {
189185
setTriplet_base<o2::aod::femtodreamMCparticle::MCType::kRecon>(femtoObs, part1, part2, part3, mult);

PWGCF/FemtoDream/Core/femtoDreamParticleHisto.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -582,11 +582,11 @@ class FemtoDreamParticleHisto
582582
}
583583

584584
private:
585-
HistogramRegistry* mHistogramRegistry; ///< For QA output
586-
static constexpr o2::aod::femtodreamparticle::ParticleType mParticleType = particleType; ///< Type of the particle under analysis
587-
static constexpr int mFolderSuffixType = suffixType; ///< Counter for the folder suffix specified below
588-
static constexpr std::string_view mFolderSuffix[5] = {"", "_one", "_two", "_pos", "_neg"}; ///< Suffix for the folder name in case of analyses of pairs of the same kind (T-T, V-V, C-C)
589-
int mPDG = 0; ///< PDG code of the selected particle
585+
HistogramRegistry* mHistogramRegistry; ///< For QA output
586+
static constexpr o2::aod::femtodreamparticle::ParticleType mParticleType = particleType; ///< Type of the particle under analysis
587+
static constexpr int mFolderSuffixType = suffixType; ///< Counter for the folder suffix specified below
588+
static constexpr std::string_view mFolderSuffix[8] = {"", "_one", "_two", "_pos", "_neg", "_allSelected", "_allSelected_pos", "_allSelected_neg"}; ///< Suffix for the folder name in case of analyses of pairs of the same kind (T-T, V-V, C-C)
589+
int mPDG = 0; ///< PDG code of the selected particle
590590
};
591591
} // namespace o2::analysis::femtoDream
592592

PWGCF/FemtoDream/Tasks/femtoDreamCollisionMasker.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ struct femoDreamCollisionMasker {
220220
TrackPIDThreshold.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get<float>());
221221
} else if (option.name.compare(std::string("ConfMaxpT")) == 0) {
222222
FilterPtMax.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get<float>());
223+
} else if (option.name.compare(std::string("ConfMinpT")) == 0) {
224+
FilterPtMin.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get<float>());
223225
}
224226
}
225227
} else if (device.name.find("femto-dream-triplet-task-track-track-v0") != std::string::npos) {
@@ -236,6 +238,8 @@ struct femoDreamCollisionMasker {
236238
TrackPIDThreshold.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get<float>());
237239
} else if (option.name.compare(std::string("ConfMaxpT")) == 0) {
238240
FilterPtMax.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get<float>());
241+
} else if (option.name.compare(std::string("ConfMinpT")) == 0) {
242+
FilterPtMin.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get<float>());
239243
} else if (option.name.compare(std::string("ConfCutV0")) == 0) {
240244
V0CutBits.at(CollisionMasks::kPartThree).push_back(option.defaultValue.get<femtodreamparticle::cutContainerType>());
241245
} else if (option.name.compare(std::string("Conf_ChildPos_CutV0")) == 0) {
@@ -325,7 +329,7 @@ struct femoDreamCollisionMasker {
325329
continue;
326330
}
327331
// check filter cuts
328-
if (track.pt() > FilterPtMax.at(P).at(index)) {
332+
if (track.pt() < FilterPtMin.at(P).at(index) || track.pt() > FilterPtMax.at(P).at(index)) {
329333
// if they are not passed, skip the particle
330334
continue;
331335
}

PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrack.cxx

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ struct femtoDreamTripletTaskTrackTrackTrack {
4747
using MaskedCollisions = soa::Join<aod::FDCollisions, aod::FDColMasks>;
4848
using MaskedCollision = MaskedCollisions::iterator;
4949
aod::femtodreamcollision::BitMaskType MaskBit = -1;
50+
float mMassOne = -999, mMassTwo = -999, mMassThree = -999;
5051

5152
/// Particle selection part
5253

5354
/// Table for both particles
5455
Configurable<float> 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"};
5556
Configurable<float> ConfMaxpT{"ConfMaxpT", 4.05f, "Maximum transverse momentum of the particles"};
57+
Configurable<float> ConfMinpT{"ConfMinpT", 0.3f, "Minimum transverse momentum of the particles"};
5658
Configurable<float> ConfPIDthrMom{"ConfPIDthrMom", 1.f, "Momentum threshold from which TPC and TOF are required for PID"};
5759
Configurable<o2::aod::femtodreamparticle::cutContainerType> ConfTPCPIDBit{"ConfTPCPIDBit", 16, "PID TPC bit from cutCulator "};
5860
Configurable<o2::aod::femtodreamparticle::cutContainerType> ConfTPCTOFPIDBit{"ConfTPCTOFPIDBit", 8, "PID TPCTOF bit from cutCulator"};
@@ -67,14 +69,17 @@ struct femtoDreamTripletTaskTrackTrackTrack {
6769
Partition<aod::FDParticles> SelectedParts = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) &&
6870
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)) &&
6971
(ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) &&
70-
(aod::femtodreamparticle::pt < ConfMaxpT);
72+
(aod::femtodreamparticle::pt < ConfMaxpT) &&
73+
(aod::femtodreamparticle::pt > ConfMinpT);
7174
Partition<soa::Join<aod::FDParticles, aod::FDMCLabels>> SelectedPartsMC = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) &&
7275
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)) &&
7376
(ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) &&
74-
(aod::femtodreamparticle::pt < ConfMaxpT);
77+
(aod::femtodreamparticle::pt < ConfMaxpT) &&
78+
(aod::femtodreamparticle::pt > ConfMinpT);
7579

7680
/// Histogramming of Selected Particles
7781
FemtoDreamParticleHisto<aod::femtodreamparticle::ParticleType::kTrack, 1> trackHistoSelectedParts;
82+
FemtoDreamParticleHisto<aod::femtodreamparticle::ParticleType::kTrack, 5> trackHistoALLSelectedParts;
7883

7984
/// Histogramming for Event
8085
FemtoDreamEventHisto eventHisto;
@@ -91,6 +96,7 @@ struct femtoDreamTripletTaskTrackTrackTrack {
9196
ColumnBinningPolicy<aod::collision::PosZ, aod::femtodreamcollision::MultNtr> colBinning{{ConfVtxBins, ConfMultBins}, true};
9297

9398
ConfigurableAxis ConfQ3Bins{"ConfQ3Bins", {2000, 0., 8.}, "binning Q3"};
99+
ConfigurableAxis ConfQ3BinsFor4D{"ConfQ3BinsFor4D", {500, 0., 2.}, "binning Q3 for 4D hist"};
94100
Configurable<int> ConfNEventsMix{"ConfNEventsMix", 5, "Number of events for mixing"};
95101
Configurable<bool> ConfIsCPR{"ConfIsCPR", true, "Close Pair Rejection"};
96102
Configurable<bool> ConfCPRPlotPerRadii{"ConfCPRPlotPerRadii", false, "Plot CPR per radii"};
@@ -112,9 +118,12 @@ struct femtoDreamTripletTaskTrackTrackTrack {
112118

113119
eventHisto.init(&qaRegistry);
114120
trackHistoSelectedParts.init(&qaRegistry, ConfBinmultTempFit, ConfDummy, ConfTempFitVarpTBins, ConfDummy, ConfDummy, ConfTempFitVarBins, ConfDummy, ConfDummy, ConfDummy, ConfDummy, ConfDummy, ConfIsMC, ConfPDGCodePart);
121+
trackHistoALLSelectedParts.init(&qaRegistry, ConfBinmultTempFit, ConfDummy, ConfTempFitVarpTBins, ConfDummy, ConfDummy, ConfTempFitVarBins, ConfDummy, ConfDummy, ConfDummy, ConfDummy, ConfDummy, ConfIsMC, ConfPDGCodePart);
115122

116123
ThreeBodyQARegistry.add("TripletTaskQA/hSECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}});
117124
ThreeBodyQARegistry.add("TripletTaskQA/hMECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}});
125+
ThreeBodyQARegistry.add("TripletTaskQA/particle_pT_in_Triplet_SE", "; p_{T1} ; p_{T2} ; p_{T3} ; Q_{3}", kTHnSparseF, {ConfTempFitVarpTBins, ConfTempFitVarpTBins, ConfTempFitVarpTBins, ConfQ3BinsFor4D});
126+
ThreeBodyQARegistry.add("TripletTaskQA/particle_pT_in_Triplet_ME", "; p_{T1} ; p_{T2} ; p_{T3} ; Q_{3}", kTHnSparseF, {ConfTempFitVarpTBins, ConfTempFitVarpTBins, ConfTempFitVarpTBins, ConfQ3BinsFor4D});
118127
std::vector<double> tmpVecMult = ConfMultBins;
119128
framework::AxisSpec multAxis = {tmpVecMult, "Multiplicity"};
120129
ThreeBodyQARegistry.add("TripletTaskQA/hSEMultVSGoodTracks", ";Mult;GoodT", kTH2F, {multAxis, {100, 0, 100}});
@@ -128,6 +137,11 @@ struct femtoDreamTripletTaskTrackTrackTrack {
128137
pairCloseRejection.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiMax.value, ConfCPRdeltaEtaMax.value, ConfCPRPlotPerRadii.value);
129138
}
130139

140+
// get masses
141+
mMassOne = TDatabasePDG::Instance()->GetParticle(ConfPDGCodePart)->Mass();
142+
mMassTwo = TDatabasePDG::Instance()->GetParticle(ConfPDGCodePart)->Mass();
143+
mMassThree = TDatabasePDG::Instance()->GetParticle(ConfPDGCodePart)->Mass();
144+
131145
// get bit for the collision mask
132146
std::bitset<8 * sizeof(aod::femtodreamcollision::BitMaskType)> mask;
133147
int index = 0;
@@ -138,7 +152,8 @@ struct femtoDreamTripletTaskTrackTrackTrack {
138152
containsNameValuePair(device.options, "ConfTPCPIDBit", ConfTPCPIDBit.value) &&
139153
containsNameValuePair(device.options, "ConfTPCTOFPIDBit", ConfTPCTOFPIDBit.value) &&
140154
containsNameValuePair(device.options, "ConfPIDthrMom", ConfPIDthrMom.value) &&
141-
containsNameValuePair(device.options, "ConfMaxpT", ConfMaxpT.value)) {
155+
containsNameValuePair(device.options, "ConfMaxpT", ConfMaxpT.value) &&
156+
containsNameValuePair(device.options, "ConfMinpT", ConfMinpT.value)) {
142157
mask.set(index);
143158
MaskBit = static_cast<aod::femtodreamcollision::BitMaskType>(mask.to_ulong());
144159
LOG(info) << "Device name matched: " << device.name;
@@ -205,7 +220,10 @@ struct femtoDreamTripletTaskTrackTrackTrack {
205220
if (!pairCleaner.isCleanPair(p1, p3, parts)) {
206221
continue;
207222
}
208-
sameEventCont.setTriplet<isMC>(p1, p2, p3, multCol);
223+
// fill pT of all three particles as a function of Q3 for lambda calculations
224+
auto Q3 = FemtoDreamMath::getQ3(p1, mMassOne, p2, mMassTwo, p3, mMassThree);
225+
ThreeBodyQARegistry.fill(HIST("TripletTaskQA/particle_pT_in_Triplet_SE"), p1.pt(), p2.pt(), p3.pt(), Q3);
226+
sameEventCont.setTriplet<isMC>(p1, p2, p3, multCol, Q3);
209227
}
210228
}
211229

@@ -217,6 +235,10 @@ struct femtoDreamTripletTaskTrackTrackTrack {
217235
{
218236
fillCollision(col);
219237
auto thegroupSelectedParts = SelectedParts->sliceByCached(aod::femtodreamparticle::fdCollisionId, col.globalIndex(), cache);
238+
for (auto& part : thegroupSelectedParts) {
239+
trackHistoALLSelectedParts.fillQA<false, false>(part, aod::femtodreamparticle::kPt, col.multNtr(), col.multV0M());
240+
}
241+
220242
if (thegroupSelectedParts.size() < 3) {
221243
return;
222244
}
@@ -231,6 +253,9 @@ struct femtoDreamTripletTaskTrackTrackTrack {
231253
{
232254
fillCollision(col);
233255
auto thegroupSelectedParts = SelectedParts->sliceByCached(aod::femtodreamparticle::fdCollisionId, col.globalIndex(), cache);
256+
for (auto& part : thegroupSelectedParts) {
257+
trackHistoALLSelectedParts.fillQA<false, false>(part, aod::femtodreamparticle::kPt, col.multNtr(), col.multV0M());
258+
}
234259
if (thegroupSelectedParts.size() < 3) {
235260
return;
236261
}
@@ -248,6 +273,9 @@ struct femtoDreamTripletTaskTrackTrackTrack {
248273
{
249274
fillCollision(col);
250275
auto thegroupSelectedParts = SelectedPartsMC->sliceByCached(aod::femtodreamparticle::fdCollisionId, col.globalIndex(), cache);
276+
for (auto& part : thegroupSelectedParts) {
277+
trackHistoALLSelectedParts.fillQA<true, false>(part, aod::femtodreamparticle::kPt, col.multNtr(), col.multV0M());
278+
}
251279
if (thegroupSelectedParts.size() < 3) {
252280
return;
253281
}
@@ -265,6 +293,9 @@ struct femtoDreamTripletTaskTrackTrackTrack {
265293
{
266294
fillCollision(col);
267295
auto thegroupSelectedParts = SelectedPartsMC->sliceByCached(aod::femtodreamparticle::fdCollisionId, col.globalIndex(), cache);
296+
for (auto& part : thegroupSelectedParts) {
297+
trackHistoALLSelectedParts.fillQA<true, false>(part, aod::femtodreamparticle::kPt, col.multNtr(), col.multV0M());
298+
}
268299
if (thegroupSelectedParts.size() < 3) {
269300
return;
270301
}
@@ -298,7 +329,10 @@ struct femtoDreamTripletTaskTrackTrackTrack {
298329
continue;
299330
}
300331
}
301-
mixedEventCont.setTriplet<isMC>(p1, p2, p3, multCol);
332+
// fill pT of all three particles as a function of Q3 for lambda calculations
333+
auto Q3 = FemtoDreamMath::getQ3(p1, mMassOne, p2, mMassTwo, p3, mMassThree);
334+
ThreeBodyQARegistry.fill(HIST("TripletTaskQA/particle_pT_in_Triplet_ME"), p1.pt(), p2.pt(), p3.pt(), Q3);
335+
mixedEventCont.setTriplet<isMC>(p1, p2, p3, multCol, Q3);
302336
}
303337
}
304338

0 commit comments

Comments
 (0)