Skip to content

Commit a20a94f

Browse files
authored
[PWGDQ] fix bug in event mixing (#17094)
1 parent ea6f6dc commit a20a94f

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

PWGDQ/Core/VarManager.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4352,13 +4352,14 @@ void VarManager::FillPairME(T1 const& t1, T2 const& t2, float* values)
43524352
values[kWV24ME] = (std::isnan(V22ME) || std::isinf(V22ME) || std::isnan(V24ME) || std::isinf(V24ME)) ? 0. : 1.0;
43534353

43544354
// coherent Jpsi A2
4355-
bool useCoherentJpsiA2 = fgUsedVars[kA2EP_TPC] || fgUsedVars[kA2EP_FT0A] || fgUsedVars[kA2EP_FT0C];
4355+
bool useCoherentJpsiA2 = fgUsedVars[kA2EPME_TPC] || fgUsedVars[kA2EPME_FT0A] || fgUsedVars[kA2EPME_FT0C];
43564356
if (useCoherentJpsiA2) {
43574357
ROOT::Math::Boost boostv12{v12.BoostToCM()};
43584358
ROOT::Math::PtEtaPhiMVector v_daughter = boostv12(t1.sign() > 0 ? v1 : v2);
43594359
float Psi2A = t1.sign() > 0 ? Psi2A1 : Psi2A2;
43604360
float Psi2B = t1.sign() > 0 ? Psi2B1 : Psi2B2;
43614361
float Psi2C = t1.sign() > 0 ? Psi2C1 : Psi2C2;
4362+
float R2EP = t1.sign() > 0 ? values[kTwoR2EP1] : values[kTwoR2EP2];
43624363

43634364
// reaction plane
43644365
float phi = RecoDecay::constrainAngle(v_daughter.Phi(), -o2::constants::math::PI);
@@ -4376,9 +4377,9 @@ void VarManager::FillPairME(T1 const& t1, T2 const& t2, float* values)
43764377
values[kCos2DeltaPhiME_FT0A] = TMath::Cos(2. * (phi - Psi2B));
43774378
values[kCos2DeltaPhiME_FT0C] = TMath::Cos(2. * (phi - Psi2C));
43784379

4379-
float A2_TPC = values[kCos2DeltaPhiME_TPC] / values[kR2EP];
4380-
float A2_FT0A = values[kCos2DeltaPhiME_FT0A] / values[kR2EP];
4381-
float A2_FT0C = values[kCos2DeltaPhiME_FT0C] / values[kR2EP];
4380+
float A2_TPC = values[kCos2DeltaPhiME_TPC] / R2EP;
4381+
float A2_FT0A = values[kCos2DeltaPhiME_FT0A] / R2EP;
4382+
float A2_FT0C = values[kCos2DeltaPhiME_FT0C] / R2EP;
43824383
values[kA2EPME_TPC] = std::isnan(A2_TPC) || std::isinf(A2_TPC) ? -999. : A2_TPC;
43834384
values[kA2EPME_FT0A] = std::isnan(A2_FT0A) || std::isinf(A2_FT0A) ? -999. : A2_FT0A;
43844385
values[kA2EPME_FT0C] = std::isnan(A2_FT0C) || std::isinf(A2_FT0C) ? -999. : A2_FT0C;

0 commit comments

Comments
 (0)