Skip to content

Commit 3791c86

Browse files
lramonaalibuild
andauthored
Update spectraTOF.cxx (#2810)
* Update spectraTOF.cxx add a new branch to THnsparse (DCAz) and add the possibility to enable THnsparse in train configuration * Please consider the following formatting changes --------- Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent e441125 commit 3791c86

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

PWGLF/Tasks/spectraTOF.cxx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ struct tofSpectra {
8989
Configurable<float> maxDcaXYFactor{"maxDcaXYFactor", 1.f, "Additional cut on the maximum value of the DCA xy (multiplicative factor)"};
9090
Configurable<float> maxDcaZ{"maxDcaZ", 2.f, "Additional cut on the maximum value of the DCA z"};
9191
Configurable<float> minTPCNClsFound{"minTPCNClsFound", 0.f, "Additional cut on the minimum value of the number of found clusters in the TPC"};
92-
Configurable<bool> makeTHnSparseChoice{"makeTHnSparseChoice", false, "choose if produce thnsparse"}; // RD
92+
Configurable<bool> makeTHnSparseChoice{"makeTHnSparseChoice", true, "choose if produce thnsparse"}; // RD
9393

9494
// Histograms
9595
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
@@ -165,6 +165,7 @@ struct tofSpectra {
165165
LOG(info) << "\tminTPCNClsFound=" << minTPCNClsFound.value;
166166
LOG(info) << "\tmaxChi2PerClusterITS=" << maxChi2PerClusterITS.value;
167167
LOG(info) << "\tmaxDcaZ=" << maxDcaZ.value;
168+
LOG(info) << "\tmakeTHnSparseChoice=" << makeTHnSparseChoice.value;
168169

169170
customTrackCuts = getGlobalTrackSelectionRun3ITSMatch(itsPattern.value);
170171
LOG(info) << "Customizing track cuts:";
@@ -178,6 +179,7 @@ struct tofSpectra {
178179
customTrackCuts.SetMinNCrossedRowsOverFindableClustersTPC(minNCrossedRowsOverFindableClustersTPC.value);
179180
customTrackCuts.SetMaxDcaXYPtDep([](float pt) { return 10000.f; }); // No DCAxy cut will be used, this is done via the member function of the task
180181
customTrackCuts.SetMaxDcaZ(maxDcaZ.value);
182+
// customTrackCuts.SetMakeTHnSparseChoice(makeTHnSparseChoice.value);
181183
customTrackCuts.print();
182184
}
183185
// Histograms
@@ -417,9 +419,9 @@ struct tofSpectra {
417419
histos.add(hdeltatof[i].data(), pTCharge[i], kTH2D, {ptAxis, deltaTOFAxis});
418420
histos.add(hdeltatpc[i].data(), pTCharge[i], kTH2D, {ptAxis, deltaTPCAxis});
419421
}
420-
} else if (multiplicityEstimator != kNoMultiplicity && makeTHnSparseChoice) { // RD
421-
histos.add(hnsigmatof[i].data(), pTCharge[i], kTHnSparseD, {ptAxis, nsigmaTOFAxis, multAxis, dcaXyAxis}); // RD
422-
histos.add(hnsigmatpc[i].data(), pTCharge[i], kTHnSparseD, {ptAxis, nsigmaTPCAxis, multAxis, dcaXyAxis}); // RD
422+
} else if (multiplicityEstimator != kNoMultiplicity && makeTHnSparseChoice.value) { // RD
423+
histos.add(hnsigmatof[i].data(), pTCharge[i], kTHnSparseD, {ptAxis, nsigmaTOFAxis, multAxis, dcaXyAxis, dcaZAxis}); // RD
424+
histos.add(hnsigmatpc[i].data(), pTCharge[i], kTHnSparseD, {ptAxis, nsigmaTPCAxis, multAxis, dcaXyAxis, dcaZAxis}); // RD
423425

424426
} else {
425427

@@ -544,11 +546,11 @@ struct tofSpectra {
544546
} else {
545547
histos.fill(HIST(hnsigmatpc[id + Np]), track.pt(), nsigmaTPC);
546548
}
547-
} else if (multiplicityEstimator != kNoMultiplicity && makeTHnSparseChoice) { // RD
549+
} else if (multiplicityEstimator != kNoMultiplicity && makeTHnSparseChoice.value) { // RD
548550
if (track.sign() > 0) { // RD
549-
histos.fill(HIST(hnsigmatpc[id]), track.pt(), nsigmaTOF, multiplicity, track.dcaXY()); // RD
551+
histos.fill(HIST(hnsigmatpc[id]), track.pt(), nsigmaTOF, multiplicity, track.dcaXY(), track.dcaZ()); // RD
550552
} else { // RD
551-
histos.fill(HIST(hnsigmatpc[id + Np]), track.pt(), nsigmaTOF, multiplicity, track.dcaXY()); // RD
553+
histos.fill(HIST(hnsigmatpc[id + Np]), track.pt(), nsigmaTOF, multiplicity, track.dcaZ()); // RD
552554
} // RD
553555
} else {
554556
if (track.sign() > 0) {
@@ -664,11 +666,11 @@ struct tofSpectra {
664666
} else {
665667
histos.fill(HIST(hnsigmatof[id + Np]), track.pt(), nsigmaTOF);
666668
}
667-
} else if (multiplicityEstimator != kNoMultiplicity && makeTHnSparseChoice) { // RD
669+
} else if (multiplicityEstimator != kNoMultiplicity && makeTHnSparseChoice.value) { // RD
668670
if (track.sign() > 0) { // RD
669-
histos.fill(HIST(hnsigmatof[id]), track.pt(), nsigmaTOF, multiplicity, track.dcaXY()); // RD
671+
histos.fill(HIST(hnsigmatof[id]), track.pt(), nsigmaTOF, multiplicity, track.dcaXY(), track.dcaZ()); // RD
670672
} else { // RD
671-
histos.fill(HIST(hnsigmatof[id + Np]), track.pt(), nsigmaTOF, multiplicity, track.dcaXY()); // RD
673+
histos.fill(HIST(hnsigmatof[id + Np]), track.pt(), nsigmaTOF, multiplicity, track.dcaXY(), track.dcaZ()); // RD
672674
} // RD
673675
} else {
674676
if (track.sign() > 0) {

0 commit comments

Comments
 (0)