Skip to content

Commit 7f3b65b

Browse files
committed
PWGUD: fix o2 build error
1 parent a5a28f6 commit 7f3b65b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

PWGUD/Tasks/upcJpsiCorr.cxx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111
//
12-
/// \file upcJpsiCentralBarrelCorr.cxx
12+
/// \file upcJpsiCorr.cxx
1313
/// \brief Personal task for analysis of azimuthal asymmetry and quantum tomography in J/Psi system.
1414
///
1515
/// \author Sara Haidlova, [email protected]
@@ -1311,8 +1311,10 @@ struct UpcJpsiCorr {
13111311
if (collision.has_udMcCollision()) {
13121312
std::array<float, 3> recoTrack;
13131313
std::array<float, 3> truePart;
1314+
bool mesonFound = false;
13141315
for (const auto& track : tracks) {
13151316
rMC.get<TH1>(HIST("MC/hNumberOfMatchedMCTracks"))->Fill(1.);
1317+
mesonFound = false;
13161318
if (track.has_udMcParticle()) {
13171319
rMC.get<TH1>(HIST("MC/hNumberOfMatchedMCTracks"))->Fill(2.);
13181320
auto mcParticle = track.udMcParticle();
@@ -1326,10 +1328,13 @@ struct UpcJpsiCorr {
13261328
rMC.get<TH1>(HIST("MC/hNumberOfMatchedMCTracks"))->Fill(5.);
13271329
recoTrack = {track.px(), track.py(), track.pz()};
13281330
truePart = {mcParticle.px(), mcParticle.py(), mcParticle.pz()};
1331+
mesonFound = true;
13291332
}
13301333
}
13311334
}
1332-
rMC.fill(HIST("MC/hResolutionPhi"), RecoDecay::phi(recoTrack) - RecoDecay::phi(truePart));
1335+
if (mesonFound) {
1336+
rMC.fill(HIST("MC/hResolutionPhi"), RecoDecay::phi(recoTrack) - RecoDecay::phi(truePart));
1337+
}
13331338
}
13341339
}
13351340
}

0 commit comments

Comments
 (0)