Skip to content

Commit 3e245f1

Browse files
committed
posTritonPID and negTritonPID variables to hdEdx plotting
1 parent ffda42f commit 3e245f1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,20 @@ struct lnnRecoTask {
280280
if (std::abs(posTrack.eta()) > etaMax || std::abs(negTrack.eta()) > etaMax)
281281
continue;
282282

283+
283284
// temporary fix: tpcInnerParam() returns the momentum in all the software tags before: https://github.com/AliceO2Group/AliceO2/pull/12521
284285
bool posTritonPID = posTrack.pidForTracking() == o2::track::PID::Triton;
285286
bool negTritonPID = negTrack.pidForTracking() == o2::track::PID::Triton;
286287
float posRigidity = posTrack.tpcInnerParam();
287288
float negRigidity = negTrack.tpcInnerParam();
288289

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

292298
// Bethe-Bloch calcution for 3H
293299
double expBethePos{tpc::BetheBlochAleph(static_cast<float>(posRigidity / constants::physics::MassTriton), mBBparams3H[0], mBBparams3H[1], mBBparams3H[2], mBBparams3H[3], mBBparams3H[4])};
@@ -380,13 +386,15 @@ struct lnnRecoTask {
380386
continue;
381387
}
382388

389+
383390
std::array<float, 3> primVtx = {collision.posX(), collision.posY(), collision.posZ()};
384391

385392
double cosPA = RecoDecay::cpa(primVtx, lnnCand.decVtx, lnnMom);
386393
if (cosPA < v0cospa) {
387394
continue;
388395
}
389396

397+
390398
for (int i = 0; i < 3; i++) {
391399
lnnCand.decVtx[i] = lnnCand.decVtx[i] - primVtx[i];
392400
}

0 commit comments

Comments
 (0)