Skip to content

Commit 47fa296

Browse files
Fix in MC rapidity selection
1 parent 5589b47 commit 47fa296

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

PWGLF/TableProducer/Strangeness/sigma0builder.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,12 @@ struct sigma0builder {
888888

889889
auto arrMom = std::array{pVecPhotons, pVecLambda};
890890
float sigmaMass = RecoDecay::m(arrMom, std::array{o2::constants::physics::MassPhoton, o2::constants::physics::MassLambda0});
891-
float sigmaY = RecoDecay::y(std::array{gamma.px() + lambda.px(), gamma.py() + lambda.py(), gamma.pz() + lambda.pz()}, o2::constants::physics::MassSigma0);
891+
float sigmaY = -999.f;
892+
893+
if constexpr (requires { gamma.pxMC(); lambda.pxMC(); }) // If MC
894+
sigmaY = RecoDecay::y(std::array{gamma.pxMC() + lambda.pxMC(), gamma.pyMC() + lambda.pyMC(), gamma.pzMC() + lambda.pzMC()}, o2::constants::physics::MassSigma0);
895+
else // If DATA
896+
sigmaY = RecoDecay::y(std::array{gamma.px() + lambda.px(), gamma.py() + lambda.py(), gamma.pz() + lambda.pz()}, o2::constants::physics::MassSigma0);
892897

893898
histos.fill(HIST("SigmaSel/hSelectionStatistics"), 1.);
894899
if (TMath::Abs(sigmaMass - o2::constants::physics::MassSigma0) > Sigma0Window)

0 commit comments

Comments
 (0)