Skip to content

Commit 26d4a4e

Browse files
committed
Fix small issues
Add check on number of tracks per candidates in the reco MC workflow. Add a return if gen tracks are not muons Remove misleading check on zdc time Remove commented out code and old comments
1 parent ad365b0 commit 26d4a4e

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

PWGUD/Tasks/fwdMuonsUpc.cxx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ struct FwdMuonsUpc {
359359
{
360360
float rAbs = fwdTrack.rAtAbsorberEnd();
361361
float pDca = fwdTrack.pDca();
362-
// ROOT::Math::PxPyPzMVector p{fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), o2::constants::physics::MassMuon};
363362

364363
std::array<float, 3> trackMomentum{fwdTrack.px(), fwdTrack.py(), fwdTrack.pz()};
365364
float eta = RecoDecay::eta(trackMomentum);
@@ -428,7 +427,6 @@ struct FwdMuonsUpc {
428427

429428
// select opposite charge events only
430429
if (cand.netCharge() != 0) {
431-
// registry.fill(HIST("hSameSign"), cand.numContrib());
432430
return;
433431
}
434432

@@ -499,12 +497,7 @@ struct FwdMuonsUpc {
499497
if (std::abs(zdc.timeC) < kMaxZDCTime)
500498
neutronC = true;
501499

502-
if (std::isinf(zdc.timeC))
503-
neutronC = false;
504-
if (std::isinf(zdc.timeA))
505-
neutronA = false;
506-
507-
// fill the histos in neutron classes and assign neutron class label
500+
// assign neutron class label
508501
// 0n0n
509502
if (neutronC == false && neutronA == false) {
510503
znClass = 1;
@@ -613,8 +606,10 @@ struct FwdMuonsUpc {
613606
{
614607

615608
// check that all pairs are mu+mu-
616-
if (std::abs(McPart1.pdgCode()) != PDG_t::kMuonMinus || std::abs(McPart2.pdgCode()) != PDG_t::kMuonMinus)
609+
if (std::abs(McPart1.pdgCode()) != PDG_t::kMuonMinus || std::abs(McPart2.pdgCode()) != PDG_t::kMuonMinus) {
617610
LOGF(debug, "PDG codes: %d | %d", McPart1.pdgCode(), McPart2.pdgCode());
611+
return;
612+
}
618613

619614
// V0 selection
620615
const auto& ampsV0A = cand.amplitudesV0A();
@@ -626,9 +621,13 @@ struct FwdMuonsUpc {
626621
}
627622
}
628623

624+
// select events with exactly 2 forward tracks
625+
if (cand.numContrib() != k2Tracks) {
626+
return;
627+
}
628+
629629
// select opposite charge events only
630630
if (cand.netCharge() != 0) {
631-
// registry.fill(HIST("hSameSign"), cand.numContrib());
632631
return;
633632
}
634633

0 commit comments

Comments
 (0)