Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -3267,7 +3267,7 @@ void VarManager::FillPairMC(T1 const& t1, T2 const& t2, float* values)
values[kMCEta] = v12.Eta();
values[kMCPhi] = v12.Phi();
values[kMCY] = -v12.Rapidity();
double BeamMomentum = TMath::Sqrt(fgCenterOfMassEnergy * fgCenterOfMassEnergy / 4 - fgMassofCollidingParticle * fgMassofCollidingParticle); // GeV
double BeamMomentum = TMath::Sqrt(fgCenterOfMassEnergy * fgCenterOfMassEnergy / 4 - fgMassofCollidingParticle * fgMassofCollidingParticle); // GeV
ROOT::Math::PxPyPzEVector Beam1(0., 0., -BeamMomentum, fgCenterOfMassEnergy / 2);
ROOT::Math::PxPyPzEVector Beam2(0., 0., BeamMomentum, fgCenterOfMassEnergy / 2);

Expand All @@ -3288,9 +3288,9 @@ void VarManager::FillPairMC(T1 const& t1, T2 const& t2, float* values)
ROOT::Math::XYZVectorF yaxis_CS{(Beam1_CM.Cross(Beam2_CM)).Unit()};
ROOT::Math::XYZVectorF xaxis_CS{(yaxis_CS.Cross(zaxis_CS)).Unit()};

//Production frame
// Production frame
ROOT::Math::XYZVector normalVec = ROOT::Math::XYZVector(v1.Py(), -v1.Px(), 0.f);

if (fgUsedVars[kMCCosThetaHE]) {
values[kMCCosThetaHE] = (t1.pdgCode() < 0 ? zaxis_HE.Dot(v1_CM) : zaxis_HE.Dot(v2_CM));
}
Expand All @@ -3310,11 +3310,10 @@ void VarManager::FillPairMC(T1 const& t1, T2 const& t2, float* values)
if (fgUsedVars[kMCCosThetaPP]) {
values[kMCCosThetaPP] = (t1.pdgCode() < 0 ? normalVec.Dot(v1_CM) : normalVec.Dot(v2_CM));
}

if (fgUsedVars[kMCPhiPP]) {
values[kMCPhiPP] = (t1.pdgCode() < 0 ? TMath::ATan2((normalVec.Dot(v1_CM)), zaxis_HE.Dot(v1_CM)) : TMath::ATan2((normalVec.Dot(v2_CM)), zaxis_HE.Dot(v2_CM)));
}

}

template <typename T1, typename T2, typename T3>
Expand Down
Loading