Skip to content

Commit 2844597

Browse files
lauraserLaura Serksnyte
andauthored
[PWGCF] Addition of new QA histograms and also track selections (#9997)
Co-authored-by: Laura Serksnyte <laura.serksnyte@cern.ch>
1 parent c7b017e commit 2844597

File tree

6 files changed

+85
-10
lines changed

6 files changed

+85
-10
lines changed

PWGCF/FemtoDream/Core/femtoDreamParticleHisto.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ class FemtoDreamParticleHisto
141141
} else if constexpr (mParticleType == o2::aod::femtodreamparticle::ParticleType::kCascade) {
142142
mHistogramRegistry->add((folderName + folderSuffix + "/hDaughDCA").c_str(), "; DCA^{daugh} (cm); Entries", kTH1F, {{1000, 0, 10}});
143143
mHistogramRegistry->add((folderName + folderSuffix + "/hTransRadius").c_str(), "; #it{r}_{xy} (cm); Entries", kTH1F, {{1500, 0, 150}});
144+
mHistogramRegistry->add((folderName + folderSuffix + "/hTransRadius_pT").c_str(), "; p_{T}; #it{r}_{xy} (cm)", kTH2F, {{100, 0, 6}, {1500, 0, 150}});
144145
mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxX").c_str(), "; #it{Vtx}_{x} (cm); Entries", kTH1F, {{2000, 0, 200}});
145146
mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxY").c_str(), "; #it{Vtx}_{y} (cm)); Entries", kTH1F, {{2000, 0, 200}});
146147
mHistogramRegistry->add((folderName + folderSuffix + "/hDecayVtxZ").c_str(), "; #it{Vtx}_{z} (cm); Entries", kTH1F, {{2000, 0, 200}});
@@ -446,6 +447,7 @@ class FemtoDreamParticleHisto
446447
} else if constexpr (mParticleType == o2::aod::femtodreamparticle::ParticleType::kCascade) {
447448
mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST(o2::aod::femtodreamMCparticle::MCTypeName[mc]) + HIST("/hDaughDCA"), part.daughDCA());
448449
mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST(o2::aod::femtodreamMCparticle::MCTypeName[mc]) + HIST("/hTransRadius"), part.transRadius());
450+
mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST(o2::aod::femtodreamMCparticle::MCTypeName[mc]) + HIST("/hTransRadius_pT"), part.pt(), part.transRadius());
449451
mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST(o2::aod::femtodreamMCparticle::MCTypeName[mc]) + HIST("/hDecayVtxX"), part.decayVtxX());
450452
mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST(o2::aod::femtodreamMCparticle::MCTypeName[mc]) + HIST("/hDecayVtxY"), part.decayVtxY());
451453
mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST(o2::aod::femtodreamMCparticle::MCTypeName[mc]) + HIST("/hDecayVtxZ"), part.decayVtxZ());

PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,16 @@ struct femtoDreamProducerTask {
246246
// (aod::v0data::v0radius > V0TranRadV0Min.value); to be added, not working
247247
// for now do not know why
248248

249+
/// General options
250+
struct : o2::framework::ConfigurableGroup {
251+
Configurable<float> ConfTrkMinChi2PerClusterTPC{"ConfTrkMinChi2PerClusterTPC", 0.f, "Lower limit for chi2 of TPC; currently for testing only"};
252+
Configurable<float> ConfTrkMaxChi2PerClusterTPC{"ConfTrkMaxChi2PerClusterTPC", 1000.f, "Upper limit for chi2 of TPC; currently for testing only"};
253+
Configurable<float> ConfTrkMaxChi2PerClusterITS{"ConfTrkMaxChi2PerClusterITS", 1000.0f, "Minimal track selection: max allowed chi2 per ITS cluster"}; // 36.0 is default
254+
Configurable<bool> ConfTrkTPCRefit{"ConfTrkTPCRefit", false, "True: require TPC refit"};
255+
Configurable<bool> ConfTrkITSRefit{"ConfTrkITSRefit", false, "True: require ITS refit"};
256+
257+
} OptionTrackSpecialSelections;
258+
249259
HistogramRegistry qaRegistry{"QAHistos", {}, OutputObjHandlingPolicy::AnalysisObject};
250260
HistogramRegistry TrackRegistry{"Tracks", {}, OutputObjHandlingPolicy::AnalysisObject};
251261
HistogramRegistry V0Registry{"V0", {}, OutputObjHandlingPolicy::AnalysisObject};
@@ -270,6 +280,8 @@ struct femtoDreamProducerTask {
270280

271281
int CutBits = 8 * sizeof(o2::aod::femtodreamparticle::cutContainerType);
272282
TrackRegistry.add("AnalysisQA/CutCounter", "; Bit; Counter", kTH1F, {{CutBits + 1, -0.5, CutBits + 0.5}});
283+
TrackRegistry.add("AnalysisQA/Chi2ITSTPCperCluster", "; ITS_Chi2; TPC_Chi2", kTH2F, {{100, 0, 50}, {100, 0, 20}});
284+
TrackRegistry.add("AnalysisQA/RefitITSTPC", "; ITS_Refit; TPC_Refit", kTH2F, {{2, 0, 2}, {2, 0, 2}});
273285
TrackRegistry.add("AnalysisQA/getGenStatusCode", "; Bit; Entries", kTH1F, {{200, 0, 200}});
274286
TrackRegistry.add("AnalysisQA/getProcess", "; Bit; Entries", kTH1F, {{200, 0, 200}});
275287
TrackRegistry.add("AnalysisQA/Mother", "; Bit; Entries", kTH1F, {{4000, -4000, 4000}});
@@ -700,9 +712,24 @@ struct femtoDreamProducerTask {
700712
/// if the most open selection criteria are not fulfilled there is no
701713
/// point looking further at the track
702714
trackCuts.fillQA<aod::femtodreamparticle::ParticleType::kTrack, aod::femtodreamparticle::TrackType::kNoChild, 0>(track);
715+
716+
if (track.tpcChi2NCl() < OptionTrackSpecialSelections.ConfTrkMinChi2PerClusterTPC || track.tpcChi2NCl() > OptionTrackSpecialSelections.ConfTrkMaxChi2PerClusterTPC) {
717+
continue;
718+
}
719+
if (track.itsChi2NCl() > OptionTrackSpecialSelections.ConfTrkMaxChi2PerClusterITS) {
720+
continue;
721+
}
722+
if ((OptionTrackSpecialSelections.ConfTrkTPCRefit && !track.hasTPC()) || (OptionTrackSpecialSelections.ConfTrkITSRefit && !track.hasITS())) {
723+
continue;
724+
}
725+
703726
if (!trackCuts.isSelectedMinimal(track)) {
704727
continue;
705728
}
729+
730+
TrackRegistry.fill(HIST("AnalysisQA/Chi2ITSTPCperCluster"), track.itsChi2NCl(), track.tpcChi2NCl());
731+
TrackRegistry.fill(HIST("AnalysisQA/RefitITSTPC"), track.hasITS(), track.hasTPC());
732+
706733
trackCuts.fillQA<aod::femtodreamparticle::ParticleType::kTrack, aod::femtodreamparticle::TrackType::kNoChild, 1>(track);
707734
// the bit-wise container of the systematic variations is obtained
708735
std::array<o2::aod::femtodreamparticle::cutContainerType, 2> cutContainer;

PWGCF/FemtoDream/Tasks/femtoDreamCollisionMasker.cxx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ struct femoDreamCollisionMasker {
264264
FilterTempFitVarMax.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get<float>());
265265
} else if (option.name.compare(std::string("ConfMinDCAxy")) == 0) {
266266
FilterTempFitVarMin.at(CollisionMasks::kPartOne).push_back(option.defaultValue.get<float>());
267+
} else if (option.name.compare(std::string("ConfDCACutPtDep")) == 0) {
268+
TrackDCACutPtDep.push_back(option.defaultValue.get<bool>());
267269
}
268270
}
269271
} else if (device.name.find("femto-dream-triplet-task-track-track-v0") != std::string::npos) {
@@ -308,6 +310,8 @@ struct femoDreamCollisionMasker {
308310
FilterPtMin.at(CollisionMasks::kPartThree).push_back(option.defaultValue.get<float>());
309311
} else if (option.name.compare(std::string("Conf_maxPt_V0")) == 0) {
310312
FilterPtMax.at(CollisionMasks::kPartThree).push_back(option.defaultValue.get<float>());
313+
} else if (option.name.compare(std::string("ConfDCACutPtDep")) == 0) {
314+
TrackDCACutPtDep.push_back(option.defaultValue.get<bool>());
311315
}
312316
}
313317
}
@@ -388,12 +392,24 @@ struct femoDreamCollisionMasker {
388392
if (track.partType() != static_cast<uint8_t>(femtodreamparticle::kTrack)) {
389393
continue;
390394
}
395+
391396
// check filter cuts
392-
if (track.pt() < FilterPtMin.at(P).at(index) || track.pt() > FilterPtMax.at(P).at(index) ||
393-
track.tempFitVar() > FilterTempFitVarMax.at(P).at(index) || track.tempFitVar() < FilterTempFitVarMin.at(P).at(index)) {
397+
if (track.pt() < FilterPtMin.at(P).at(index) || track.pt() > FilterPtMax.at(P).at(index)) {
394398
// if they are not passed, skip the particle
395399
continue;
396400
}
401+
402+
if (TrackDCACutPtDep.at(index)) {
403+
if (std::fabs(track.tempFitVar()) > 0.0105f + (0.035f / std::pow(track.pt(), 1.1f))) {
404+
continue;
405+
}
406+
} else {
407+
// or cut on the DCA directly
408+
if (track.tempFitVar() < FilterTempFitVarMin.at(P).at(index) || track.tempFitVar() > FilterTempFitVarMax.at(P).at(index)) {
409+
continue;
410+
}
411+
}
412+
397413
// set the bit at the index of the selection equal to one if the track passes all selections
398414
// check track cuts
399415
if ((track.cut() & TrackCutBits.at(P).at(index)) == TrackCutBits.at(P).at(index)) {

PWGCF/FemtoDream/Tasks/femtoDreamDebugV0.cxx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
#include <cstdint>
1717
#include <iostream>
1818
#include <vector>
19+
20+
#include "TVector3.h"
21+
1922
#include "Framework/AnalysisTask.h"
2023
#include "Framework/runDataProcessing.h"
2124
#include "Framework/HistogramRegistry.h"
@@ -84,6 +87,7 @@ struct femtoDreamDebugV0 {
8487
posChildHistos.init(&V0Registry, ConfBinmult, ConfDummy, ConfV0ChildTempFitVarMomentumBins, ConfDummy, ConfDummy, ConfChildTempFitVarBins, ConfV0ChildNsigmaTPCBins, ConfV0ChildNsigmaTOFBins, ConfV0ChildNsigmaTPCTOFBins, ConfV0ChildNsigmaITSBins, ConfV0InvMassBins, false, ConfV01_ChildPos_PDGCode.value, true);
8588
negChildHistos.init(&V0Registry, ConfBinmult, ConfDummy, ConfV0ChildTempFitVarMomentumBins, ConfDummy, ConfDummy, ConfChildTempFitVarBins, ConfV0ChildNsigmaTPCBins, ConfV0ChildNsigmaTOFBins, ConfV0ChildNsigmaTPCTOFBins, ConfV0ChildNsigmaITSBins, ConfV0InvMassBins, false, ConfV01_ChildNeg_PDGCode, true);
8689
V0Histos.init(&V0Registry, ConfBinmult, ConfDummy, ConfV0TempFitVarMomentumBins, ConfDummy, ConfDummy, ConfV0TempFitVarBins, ConfV0ChildNsigmaTPCBins, ConfV0ChildNsigmaTOFBins, ConfV0ChildNsigmaTPCTOFBins, ConfV0ChildNsigmaITSBins, ConfV0InvMassBins, false, ConfV01_PDGCode.value, true);
90+
V0Registry.add("hArmenterosPodolanski/hArmenterosPodolanskiPlot", "; #alpha; p_{T} (MeV/#it{c})", kTH2F, {{100, -1, 1}, {500, -0.3, 2}});
8791
}
8892

8993
/// Porduce QA plots for V0 selection in FemtoDream framework
@@ -112,6 +116,20 @@ struct femtoDreamDebugV0 {
112116
negChild.partType() == uint8_t(aod::femtodreamparticle::ParticleType::kV0Child) &&
113117
(negChild.cut() & ConfV01_ChildNeg_CutBit) == ConfV01_ChildNeg_CutBit &&
114118
(negChild.pidcut() & ConfV01_ChildNeg_TPCBit) == ConfV01_ChildNeg_TPCBit) {
119+
120+
TVector3 p_parent(part.px(), part.py(), part.pz()); // Parent momentum (px, py, pz)
121+
TVector3 p_plus(posChild.px(), posChild.py(), posChild.pz()); // Daughter 1 momentum (px, py, pz)
122+
TVector3 p_minus(negChild.px(), negChild.py(), negChild.pz()); // Daughter 2 momentum (px, py, pz)
123+
124+
double pL_plus = p_plus.Dot(p_parent) / p_parent.Mag();
125+
double pL_minus = p_minus.Dot(p_parent) / p_parent.Mag();
126+
float alpha = (pL_plus - pL_minus) / (pL_plus + pL_minus);
127+
128+
TVector3 p_perp = p_plus - (p_parent * (pL_plus / p_parent.Mag()));
129+
double qtarm = p_perp.Mag();
130+
131+
V0Registry.fill(HIST("hArmenterosPodolanski/hArmenterosPodolanskiPlot"), alpha, qtarm);
132+
115133
V0Histos.fillQA<false, true>(part, static_cast<aod::femtodreamparticle::MomentumType>(ConfV0TempFitVarMomentum.value), col.multNtr(), col.multV0M());
116134
posChildHistos.fillQA<false, true>(posChild, static_cast<aod::femtodreamparticle::MomentumType>(ConfV0TempFitVarMomentum.value), col.multNtr(), col.multV0M());
117135
negChildHistos.fillQA<false, true>(negChild, static_cast<aod::femtodreamparticle::MomentumType>(ConfV0TempFitVarMomentum.value), col.multNtr(), col.multV0M());

PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrack.cxx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ struct femtoDreamTripletTaskTrackTrackTrack {
6565
Configurable<o2::aod::femtodreamparticle::cutContainerType> ConfTPCTOFPIDBit{"ConfTPCTOFPIDBit", 8, "PID TPCTOF bit from cutCulator"};
6666
Configurable<bool> ConfIsMC{"ConfIsMC", false, "Enable additional Histogramms in the case of a MonteCarlo Run"};
6767
Configurable<bool> ConfUse3D{"ConfUse3D", false, "Enable three dimensional histogramms (to be used only for analysis with high statistics): k* vs mT vs multiplicity"};
68+
Configurable<bool> ConfDCACutPtDep{"ConfDCACutPtDep", false, "Use pt dependent dca cut for tracks"};
6869

6970
// Which particles to analyse; currently support only for same species and cuts triplets
7071
Configurable<int> ConfPDGCodePart{"ConfPDGCodePart", 2212, "Particle PDG code"};
@@ -76,15 +77,20 @@ struct femtoDreamTripletTaskTrackTrackTrack {
7677
(ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) &&
7778
(aod::femtodreamparticle::pt < ConfMaxpT) &&
7879
(aod::femtodreamparticle::pt > ConfMinpT) &&
79-
(aod::femtodreamparticle::tempFitVar < ConfMaxDCAxy) &&
80-
(aod::femtodreamparticle::tempFitVar > ConfMinDCAxy);
80+
ifnode(ConfDCACutPtDep, (nabs(aod::femtodreamparticle::tempFitVar) <= 0.0105f + (0.035f / npow(aod::femtodreamparticle::pt, 1.1f))),
81+
((aod::femtodreamparticle::tempFitVar >= ConfMinDCAxy) &&
82+
(aod::femtodreamparticle::tempFitVar <= ConfMaxDCAxy)));
83+
;
84+
8185
Partition<soa::Join<aod::FDParticles, aod::FDMCLabels>> SelectedPartsMC = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) &&
8286
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)) &&
8387
(ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) &&
8488
(aod::femtodreamparticle::pt < ConfMaxpT) &&
8589
(aod::femtodreamparticle::pt > ConfMinpT) &&
86-
(aod::femtodreamparticle::tempFitVar < ConfMaxDCAxy) &&
87-
(aod::femtodreamparticle::tempFitVar > ConfMinDCAxy);
90+
ifnode(ConfDCACutPtDep, (nabs(aod::femtodreamparticle::tempFitVar) <= 0.0105f + (0.035f / npow(aod::femtodreamparticle::pt, 1.1f))),
91+
((aod::femtodreamparticle::tempFitVar >= ConfMinDCAxy) &&
92+
(aod::femtodreamparticle::tempFitVar <= ConfMaxDCAxy)));
93+
;
8894

8995
/// Histogramming of Selected Particles
9096
FemtoDreamParticleHisto<aod::femtodreamparticle::ParticleType::kTrack, 1> trackHistoSelectedParts;

PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0.cxx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,28 @@ struct femtoDreamTripletTaskTrackTrackV0 {
6969
Configurable<float> ConfPIDthrMom{"ConfPIDthrMom", 1.f, "Momentum threshold from which TPC and TOF are required for PID"};
7070
Configurable<bool> ConfIsMC{"ConfIsMC", false, "Enable additional Histogramms in the case of a MonteCarlo Run"};
7171
Configurable<bool> ConfUse3D{"ConfUse3D", false, "Enable three dimensional histogramms (to be used only for analysis with high statistics): k* vs mT vs multiplicity"};
72+
Configurable<bool> ConfDCACutPtDep{"ConfDCACutPtDep", false, "Use pt dependent dca cut for tracks"};
7273

7374
/// Partition for selected particles
7475
Partition<aod::FDParticles> SelectedParts = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) &&
7576
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)) &&
7677
(ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) &&
7778
(aod::femtodreamparticle::pt < ConfMaxpT) &&
7879
(aod::femtodreamparticle::pt > ConfMinpT) &&
79-
(aod::femtodreamparticle::tempFitVar < ConfMaxDCAxy) &&
80-
(aod::femtodreamparticle::tempFitVar > ConfMinDCAxy);
80+
ifnode(ConfDCACutPtDep, (nabs(aod::femtodreamparticle::tempFitVar) <= 0.0105f + (0.035f / npow(aod::femtodreamparticle::pt, 1.1f))),
81+
((aod::femtodreamparticle::tempFitVar >= ConfMinDCAxy) &&
82+
(aod::femtodreamparticle::tempFitVar <= ConfMaxDCAxy)));
83+
;
84+
8185
Partition<soa::Join<aod::FDParticles, aod::FDMCLabels>> SelectedPartsMC = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) &&
8286
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)) &&
8387
(ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) &&
8488
(aod::femtodreamparticle::pt < ConfMaxpT) &&
8589
(aod::femtodreamparticle::pt > ConfMinpT) &&
86-
(aod::femtodreamparticle::tempFitVar < ConfMaxDCAxy) &&
87-
(aod::femtodreamparticle::tempFitVar > ConfMinDCAxy);
90+
ifnode(ConfDCACutPtDep, (nabs(aod::femtodreamparticle::tempFitVar) <= 0.0105f + (0.035f / npow(aod::femtodreamparticle::pt, 1.1f))),
91+
((aod::femtodreamparticle::tempFitVar >= ConfMinDCAxy) &&
92+
(aod::femtodreamparticle::tempFitVar <= ConfMaxDCAxy)));
93+
;
8894

8995
/// Histogramming of selected tracks
9096
FemtoDreamParticleHisto<aod::femtodreamparticle::ParticleType::kTrack, 1> trackHistoSelectedParts;

0 commit comments

Comments
 (0)