Skip to content

Commit affeced

Browse files
mapalharesalibuild
andauthored
Tritons identification correction on lnnRecoTask (#6015)
* Corrections for the Triton identification and expBethePos to Triton * Changes of the Triton identification and expBethePos declaration * Remove tf selection (included in sel8) * posTritonPID and negTritonPID variables to hdEdx plotting * Please consider the following formatting changes * PWGLF: corection of TPCRigidityMin3H value on lnnRecoTask * Rigidity corrections + nSigma3HxTPC_momentum plot on lnnRecoTask * Please consider the following formatting changes * Please consider the following formatting changes * Merge conflict corrections * Please consider the following formatting changes --------- Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent ce3e658 commit affeced

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ std::shared_ptr<TH2> hdEdxTot;
6565
std::shared_ptr<TH1> hDecayChannel;
6666
std::shared_ptr<TH1> hIsMatterGen;
6767
std::shared_ptr<TH1> hIsMatterGenTwoBody;
68+
std::shared_ptr<TH2> hnSigmaTPCp_momentum;
69+
std::shared_ptr<TH2> hnSigmaTPCn_momentum;
6870
} // namespace
6971

7072
struct lnnCandidate {
@@ -119,7 +121,7 @@ struct lnnRecoTask {
119121
Configurable<float> masswidth{"lnnmasswidth", 0.06, "Mass width (GeV/c^2)"};
120122
Configurable<float> dcav0dau{"lnndcaDau", 1.0, "DCA V0 Daughters"};
121123
Configurable<float> ptMin{"ptMin", 0.5, "Minimum pT of the lnncandidate"};
122-
Configurable<float> TPCRigidityMin3H{"TPCRigidityMin3H", 1, "Minimum rigidity of the triton candidate"};
124+
Configurable<float> TPCRigidityMin3H{"TPCRigidityMin3H", 0.5, "Minimum rigidity of the triton candidate"};
123125
Configurable<float> etaMax{"eta", 1., "eta daughter"};
124126
Configurable<float> nSigmaMax3H{"nSigmaMax3H", 5, "triton dEdx cut (n sigma)"};
125127
Configurable<float> nTPCClusMin3H{"nTPCClusMin3H", 80, "triton NTPC clusters cut"};
@@ -146,11 +148,12 @@ struct lnnRecoTask {
146148
Configurable<std::string> pidPath{"pidPath", "", "Path to the PID response object"};
147149

148150
// histogram axes
149-
ConfigurableAxis rigidityBins{"rigidityBins", {200, -10.f, 10.f}, "Binning for rigidity #it{p}^{TPC}/#it{z}"};
151+
ConfigurableAxis rigidityBins{"rigidityBins", {1000, -10.f, 10.f}, "Binning for rigidity #it{p}^{TPC}/#it{z}"};
150152
ConfigurableAxis dEdxBins{"dEdxBins", {1000, 0.f, 1000.f}, "Binning for dE/dx"};
151153
ConfigurableAxis nSigmaBins{"nSigmaBins", {200, -5.f, 5.f}, "Binning for n sigma"};
152154
ConfigurableAxis zVtxBins{"zVtxBins", {100, -20.f, 20.f}, "Binning for n sigma"};
153155
ConfigurableAxis centBins{"centBins", {100, 0.f, 100.f}, "Binning for centrality"};
156+
ConfigurableAxis nBinsP{"BinsP", {200, 0.f, 10.f}, "N bins in p histo"};
154157

155158
// std vector of candidates
156159
std::vector<lnnCandidate> lnnCandidates;
@@ -193,14 +196,17 @@ struct lnnRecoTask {
193196
const AxisSpec nSigma3HAxis{nSigmaBins, "n_{#sigma}({}^{3}H)"};
194197
const AxisSpec zVtxAxis{zVtxBins, "z_{vtx} (cm)"};
195198
const AxisSpec centAxis{centBins, "Centrality"};
199+
const AxisSpec PAxis{nBinsP, "#it{p}^{TPC}"};
196200

197201
hNsigma3HSel = qaRegistry.add<TH2>("hNsigma3HSel", "; p_{TPC}/z (GeV/#it{c}); n_{#sigma} ({}^{3}H)", HistType::kTH2F, {rigidityAxis, nSigma3HAxis});
198202
hdEdx3HSel = qaRegistry.add<TH2>("hdEdx3HSel", ";p_{TPC}/z (GeV/#it{c}); dE/dx", HistType::kTH2F, {rigidityAxis, dEdxAxis});
199203
hdEdxTot = qaRegistry.add<TH2>("hdEdxTot", ";p_{TPC}/z (GeV/#it{c}); dE/dx", HistType::kTH2F, {rigidityAxis, dEdxAxis});
200204
hEvents = qaRegistry.add<TH1>("hEvents", ";Events; ", HistType::kTH1D, {{2, -0.5, 1.5}});
205+
hnSigmaTPCp_momentum = qaRegistry.add<TH2>("SigmaTPCpos_vs_TPCmomentum", "; p_{TPC}/z (GeV/#it{c}); nSigmaTPCpos", HistType::kTH2F, {PAxis, nSigma3HAxis});
206+
hnSigmaTPCn_momentum = qaRegistry.add<TH2>("SigmaTPCneg_vs_TPCmomentum", "; p_{TPC}/z (GeV/#it{c}); nSigmaTPCneg", HistType::kTH2F, {PAxis, nSigma3HAxis});
207+
201208
hEvents->GetXaxis()->SetBinLabel(1, "All");
202209
hEvents->GetXaxis()->SetBinLabel(2, "sel8");
203-
hEvents->GetXaxis()->SetBinLabel(3, "z vtx");
204210
if (doprocessMC) {
205211
hDecayChannel = qaRegistry.add<TH1>("hDecayChannel", ";Decay channel; ", HistType::kTH1D, {{2, -0.5, 1.5}});
206212
hDecayChannel->GetXaxis()->SetBinLabel(1, "2-body");
@@ -280,24 +286,15 @@ struct lnnRecoTask {
280286
if (std::abs(posTrack.eta()) > etaMax || std::abs(negTrack.eta()) > etaMax)
281287
continue;
282288

283-
// temporary fix: tpcInnerParam() returns the momentum in all the software tags before: https://github.com/AliceO2Group/AliceO2/pull/12521
284-
bool posTritonPID = posTrack.pidForTracking() == o2::track::PID::Triton;
285-
bool negTritonPID = negTrack.pidForTracking() == o2::track::PID::Triton;
286289
float posRigidity = posTrack.tpcInnerParam();
287290
float negRigidity = negTrack.tpcInnerParam();
288291

289-
if (posTritonPID) {
290-
hdEdxTot->Fill(posRigidity, posTrack.tpcSignal());
291-
}
292-
293-
if (negTritonPID) {
294-
hdEdxTot->Fill(-negRigidity, negTrack.tpcSignal());
295-
}
292+
hdEdxTot->Fill(posRigidity, posTrack.tpcSignal());
293+
hdEdxTot->Fill(-negRigidity, negTrack.tpcSignal());
296294

297295
// Bethe-Bloch calcution for 3H
298-
double expBethePos{tpc::BetheBlochAleph(static_cast<float>(posRigidity / constants::physics::MassTriton), mBBparams3H[0], mBBparams3H[1], mBBparams3H[2], mBBparams3H[3], mBBparams3H[4])};
299-
300-
double expBetheNeg{tpc::BetheBlochAleph(static_cast<float>(negRigidity / constants::physics::MassTriton), mBBparams3H[0], mBBparams3H[1], mBBparams3H[2], mBBparams3H[3], mBBparams3H[4])};
296+
double expBethePos{o2::tpc::BetheBlochAleph(static_cast<float>(posRigidity / constants::physics::MassTriton), mBBparams3H[0], mBBparams3H[1], mBBparams3H[2], mBBparams3H[3], mBBparams3H[4])};
297+
double expBetheNeg{o2::tpc::BetheBlochAleph(static_cast<float>(negRigidity / constants::physics::MassTriton), mBBparams3H[0], mBBparams3H[1], mBBparams3H[2], mBBparams3H[3], mBBparams3H[4])};
301298

302299
// nSigma calculation
303300
double expSigmaPos{expBethePos * mBBparams3H[5]};
@@ -330,6 +327,13 @@ struct lnnRecoTask {
330327
lnnCand.mom3HTPC = lnnCand.isMatter ? posRigidity : negRigidity;
331328
lnnCand.momPiTPC = !lnnCand.isMatter ? posRigidity : negRigidity;
332329

330+
hnSigmaTPCp_momentum->Fill(posTrack.tpcInnerParam(), nSigmaTPCpos);
331+
hnSigmaTPCn_momentum->Fill(negTrack.tpcInnerParam(), nSigmaTPCneg);
332+
333+
int chargeFactor = -1 + 2 * lnnCand.isMatter;
334+
hdEdx3HSel->Fill(chargeFactor * lnnCand.mom3HTPC, h3track.tpcSignal());
335+
hNsigma3HSel->Fill(chargeFactor * lnnCand.mom3HTPC, lnnCand.nSigma3H);
336+
333337
lnnCand.flags |= lnnCand.isMatter ? static_cast<uint8_t>((posTrack.pidForTracking() & 0xF) << 4) : static_cast<uint8_t>((negTrack.pidForTracking() & 0xF) << 4);
334338
lnnCand.flags |= lnnCand.isMatter ? static_cast<uint8_t>(negTrack.pidForTracking() & 0xF) : static_cast<uint8_t>(posTrack.pidForTracking() & 0xF);
335339

@@ -394,6 +398,7 @@ struct lnnRecoTask {
394398

395399
for (int i = 0; i < 3; i++) {
396400
lnnCand.decVtx[i] = lnnCand.decVtx[i] - primVtx[i];
401+
LOG(info) << lnnCand.decVtx[i];
397402
}
398403

399404
// if survived all selections, propagate decay daughters to PV
@@ -410,10 +415,6 @@ struct lnnRecoTask {
410415
lnnCand.posTrackID = posTrack.globalIndex();
411416
lnnCand.negTrackID = negTrack.globalIndex();
412417

413-
int chargeFactor = -1 + 2 * lnnCand.isMatter;
414-
hdEdx3HSel->Fill(chargeFactor * lnnCand.mom3HTPC, h3track.tpcSignal());
415-
hNsigma3HSel->Fill(chargeFactor * lnnCand.mom3HTPC, lnnCand.nSigma3H);
416-
417418
lnnCandidates.push_back(lnnCand);
418419
}
419420
}

0 commit comments

Comments
 (0)