Skip to content
Closed
Show file tree
Hide file tree
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
467 changes: 462 additions & 5 deletions PWGDQ/Core/CutsLibrary.cxx

Large diffs are not rendered by default.

90 changes: 64 additions & 26 deletions PWGDQ/Core/HistogramsLibrary.cxx

Large diffs are not rendered by default.

78 changes: 78 additions & 0 deletions PWGDQ/Core/MCSignalLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1834,18 +1834,55 @@
return signal;
}

if (!nameStr.compare("JpsiFromPromptPsi2S")) {
MCProng prong(2,{443, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {503}, {true});
signal = new MCSignal(name, "Jpsi from prompt Psi2S", {prong}, {-1});
return signal;
}

if (!nameStr.compare("JpsiFromNonpromptPsi2S")) {
MCProng prong(2,{443, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {503}, {false});
signal = new MCSignal(name, "Jpsi from non-prompt Psi2S", {prong}, {-1});
return signal;
}

Check failure on line 1848 in PWGDQ/Core/MCSignalLibrary.cxx

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.

if (!nameStr.compare("eFromJpsiFromPsi2S")) {
MCProng prong(3, {11, 443, 100443}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false});
signal = new MCSignal(name, "Electron from Jpsi from Psi2S", {prong}, {1});
return signal;
}

if (!nameStr.compare("eFromJpsiFromPromptPsi2S")) {
MCProng prong(3, {11, 443, 100443}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false}, false, {503}, {true});
signal = new MCSignal(name, "Electron from Jpsi from prompt Psi2S", {prong}, {1});
return signal;
}

if (!nameStr.compare("eFromJpsiFromNonpromptPsi2S")) {
MCProng prong(3, {11, 443, 100443}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false}, false, {503}, {false});
signal = new MCSignal(name, "Electron from Jpsi from non-prompt Psi2S", {prong}, {1});
return signal;
}

if (!nameStr.compare("PionFromPsi2S")) {
MCProng prong(1, {211}, {true}, {false}, {0}, {0}, {false}, false, {100443}, {false});
signal = new MCSignal(name, "Pion from Jpsi from Psi2S", {prong}, {-1});
return signal;
}

if (!nameStr.compare("PionFromPromptPsi2S")) {
MCProng prong(2, {211, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {503}, {true});
signal = new MCSignal(name, "Pion from prompt Psi2S", {prong}, {-1});
return signal;
}

if (!nameStr.compare("PionFromNonpromptPsi2S")) {
MCProng prong(2, {211, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {503}, {false});
signal = new MCSignal(name, "Pion from non-prompt Psi2S", {prong}, {-1});
return signal;
}

if (!nameStr.compare("eeFromJpsiFromX3872")) {
MCProng prong(2, {11, 443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {9920443}, {false});
signal = new MCSignal(name, "Electron pair from Jpsi from X3872", {prong, prong}, {1, 1});
Expand All @@ -1872,19 +1909,60 @@
return signal;
}

if (!nameStr.compare("eeFromJpsiFromPromptPsi2S")) {
MCProng prong(3, {11, 443, 100443}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false}, false, {503}, {true});
signal = new MCSignal(name, "Electron pair from Jpsi from prompt Psi2S", {prong, prong}, {1, 1});
return signal;
}

if (!nameStr.compare("eeFromJpsiFromNonpromptPsi2S")) {
MCProng prong(3, {11, 443, 100443}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false}, false, {503}, {false});
signal = new MCSignal(name, "Electron pair from Jpsi from non-prompt Psi2S", {prong, prong}, {1, 1});
return signal;
}

if (!nameStr.compare("JpsiPiPiFromPsi2S")) {
MCProng prongJpsi(2, {443, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
MCProng prongPi(2, {211, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
signal = new MCSignal(name, "Jpsi and pion pair from Psi2S", {prongJpsi, prongPi, prongPi}, {1, 1, 1});
return signal;
}

if (!nameStr.compare("JpsiPiPiFromPromptPsi2S")) {
MCProng prongJpsi(2, {443, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {503}, {true});
MCProng prongPi(2, {211, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {503}, {true});
signal = new MCSignal(name, "Jpsi and pion pair from prompt Psi2S", {prongJpsi, prongPi, prongPi}, {1, 1, 1});
return signal;
}

if (!nameStr.compare("JpsiPiPiFromNonpromptPsi2S")) {
MCProng prongJpsi(2, {443, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {503}, {false});
MCProng prongPi(2, {211, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {503}, {false});
signal = new MCSignal(name, "Jpsi and pion pair from non-prompt Psi2S", {prongJpsi, prongPi, prongPi}, {1, 1, 1});
return signal;
}

if (!nameStr.compare("eePiPiFromPsi2S")) {
MCProng pronge(3, {11, 443, 100443}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false});
MCProng prongPi(2, {211, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
signal = new MCSignal(name, "Electron pair and pion pair from Psi2S", {pronge, pronge, prongPi, prongPi}, {2, 2, 1, 1});
return signal;
}

if (!nameStr.compare("eePiPiFromPromptPsi2S")) {
MCProng pronge(3, {11, 443, 100443}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false}, false, {503}, {true});
MCProng prongPi(2, {211, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {503}, {true});
signal = new MCSignal(name, "Electron pair and pion pair from prompt Psi2S", {pronge, pronge, prongPi, prongPi}, {2, 2, 1, 1});
return signal;
}

if (!nameStr.compare("eePiPiFromNonpromptPsi2S")) {
MCProng pronge(3, {11, 443, 100443}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false}, false, {503}, {false});
MCProng prongPi(2, {211, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {503}, {false});
signal = new MCSignal(name, "Electron pair and pion pair from non-prompt Psi2S", {pronge, pronge, prongPi, prongPi}, {2, 2, 1, 1});
return signal;
}

return nullptr;
}

Expand Down
8 changes: 8 additions & 0 deletions PWGDQ/Core/VarManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,8 @@ void VarManager::SetDefaultVarNames()
fgVariableUnits[kVertexingTauxyErr] = "ns";
fgVariableNames[kVertexingProcCode] = "DCAFitterN<2> processing code";
fgVariableUnits[kVertexingProcCode] = "";
fgVariableNames[kVertexingQuadProcCode] = "DCAFitterN<4> processing code dilepton";
fgVariableUnits[kVertexingQuadProcCode] = "";
fgVariableNames[kVertexingChi2PCA] = "Pair #chi^{2} at PCA";
fgVariableUnits[kVertexingChi2PCA] = "";
fgVariableNames[kVertexingLxyOverErr] = "Pair Lxy/DLxy";
Expand Down Expand Up @@ -1258,6 +1260,10 @@ void VarManager::SetDefaultVarNames()
fgVariableUnits[kDeltaR1] = "";
fgVariableNames[kDeltaR2] = "angular distance prong 2";
fgVariableUnits[kDeltaR2] = "";
fgVariableNames[kDeltaR] = "angular distance";
fgVariableUnits[kDeltaR] = "";
fgVariableNames[kPtOverPairPt] = "p_{T}^{Quad}/p_{T}^{dilepton}";
fgVariableUnits[kPtOverPairPt] = "";
fgVariableNames[kV22m] = "v_{2}(2)_{#mu^{-}}";
fgVariableUnits[kV22m] = "";
fgVariableNames[kV24m] = "v_{2}(4)_{#mu^{-}}";
Expand Down Expand Up @@ -1734,6 +1740,7 @@ void VarManager::SetDefaultVarNames()
fgVarNamesMap["kVertexingPz"] = kVertexingPz;
fgVarNamesMap["kVertexingSV"] = kVertexingSV;
fgVarNamesMap["kVertexingProcCode"] = kVertexingProcCode;
fgVarNamesMap["kVertexingQuadProcCode"] = kVertexingQuadProcCode;
fgVarNamesMap["kVertexingChi2PCA"] = kVertexingChi2PCA;
fgVarNamesMap["kCosThetaHE"] = kCosThetaHE;
fgVarNamesMap["kPhiHE"] = kPhiHE;
Expand Down Expand Up @@ -1902,6 +1909,7 @@ void VarManager::SetDefaultVarNames()
fgVarNamesMap["kQ"] = kQ;
fgVarNamesMap["kDeltaR1"] = kDeltaR1;
fgVarNamesMap["kDeltaR2"] = kDeltaR2;
fgVarNamesMap["kPtOverPairPt"] = kPtOverPairPt;
fgVarNamesMap["kMassCharmHadron"] = kMassCharmHadron;
fgVarNamesMap["kPtCharmHadron"] = kPtCharmHadron;
fgVarNamesMap["kRapCharmHadron"] = kRapCharmHadron;
Expand Down
57 changes: 53 additions & 4 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class VarManager : public TObject
ReducedEventMultExtra = BIT(19),
CollisionQvectCentr = BIT(20),
RapidityGapFilter = BIT(21),
ReducedEventCollInfo = BIT(22),
Track = BIT(0),
TrackCov = BIT(1),
TrackExtra = BIT(2),
Expand Down Expand Up @@ -136,7 +137,8 @@ class VarManager : public TObject
ReducedMuonCollInfo = BIT(25), // TODO: remove it once new reduced data tables are produced for dielectron with ReducedTracksBarrelInfo
MuonRealign = BIT(26),
MuonCovRealign = BIT(27),
MFTCov = BIT(28)
MFTCov = BIT(28),
MCTPCtuneOnData = BIT(29)
};

enum PairCandidateType {
Expand All @@ -147,6 +149,9 @@ class VarManager : public TObject
kElectronMuon, // e.g. Electron - muon correlations
kBcToThreeMuons, // e.g. Bc -> mu+ mu- mu+
kBtoJpsiEEK, // e.g. B+ -> e+ e- K+
kBtoJpsiEEK0S, // e.g. B0 -> e+ e- K0s
kB0toJpsiEEPiPi, // e.g. B0 -> e+ e- pi+ pi-
kBstoJpsiEEPhi, // e.g. Bs -> e+ e- phi
kJpsiEEProton, // e.g. Jpsi-proton correlation, Jpsi to e+e-
kXtoJpsiPiPi, // e.g. X(3872) -> J/psi pi+ pi-
kPsi2StoJpsiPiPi, // e.g. Psi(2S) -> J/psi pi+ pi-
Expand Down Expand Up @@ -652,6 +657,8 @@ class VarManager : public TObject
kVertexingTauxyzProjected,
kVertexingTauz,
kVertexingTauzErr,
kVertexingTauxyz,
kVertexingTauxyzErr,
kVertexingPz,
kVertexingSV,
kVertexingProcCode,
Expand Down Expand Up @@ -836,6 +843,8 @@ class VarManager : public TObject
kDeltaR1,
kDeltaR2,
kDeltaR,
kPtOverPairPt,
kVertexingQuadProcCode,

// DQ-HF correlation variables
kMassCharmHadron,
Expand Down Expand Up @@ -2389,6 +2398,10 @@ void VarManager::FillTrack(T const& track, float* values)
values[kTRDPattern] = track.trdPattern();

values[kTPCsignal] = track.tpcSignal();
if constexpr ((fillMap & MCTPCtuneOnData) > 0) {
// TPC signal without the gain correction for MC TPC tune on data
values[kTPCsignal] = track.mcTunedTPCSignal();
}
values[kTRDsignal] = track.trdSignal();

values[kDetectorMap] = track.detectorMap();
Expand Down Expand Up @@ -3691,6 +3704,10 @@ void VarManager::FillPairVertexing(C const& collision, T const& t1, T const& t2,
m1 = o2::constants::physics::MassMuon;
m2 = o2::constants::physics::MassMuon;
}
if constexpr (pairType == kDecayToPiPi) {
m1 = o2::constants::physics::MassPionCharged;
m2 = o2::constants::physics::MassPionCharged;
}
ROOT::Math::PtEtaPhiMVector v1(t1.pt(), t1.eta(), t1.phi(), m1);
ROOT::Math::PtEtaPhiMVector v2(t2.pt(), t2.eta(), t2.phi(), m2);
ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
Expand Down Expand Up @@ -3895,7 +3912,8 @@ void VarManager::FillPairVertexing(C const& collision, T const& t1, T const& t2,
if (fabs(values[kVertexingLxyz]) < 1.e-8f)
values[kVertexingLxyz] = 1.e-8f;
values[kVertexingLxyzErr] = values[kVertexingLxyzErr] < 0. ? 1.e8f : std::sqrt(values[kVertexingLxyzErr]) / values[kVertexingLxyz];
values[kVertexingTauxy] = KFGeoTwoProng.GetPseudoProperDecayTime(KFPV, KFGeoTwoProng.GetMass()) / (o2::constants::physics::LightSpeedCm2NS);
// values[kVertexingTauxy] = KFGeoTwoProng.GetPseudoProperDecayTime(KFPV, KFGeoTwoProng.GetMass()) / (o2::constants::physics::LightSpeedCm2NS);
values[kVertexingTauxy] = values[kVertexingLxy] * KFGeoTwoProng.GetMass() / (KFGeoTwoProng.GetPt() * o2::constants::physics::LightSpeedCm2NS);
values[kVertexingTauz] = -1 * dzPair2PV * KFGeoTwoProng.GetMass() / (TMath::Abs(KFGeoTwoProng.GetPz()) * o2::constants::physics::LightSpeedCm2NS);
values[kVertexingPz] = TMath::Abs(KFGeoTwoProng.GetPz());
values[kVertexingSV] = KFGeoTwoProng.GetZ();
Expand All @@ -3913,7 +3931,7 @@ void VarManager::FillPairVertexing(C const& collision, T const& t1, T const& t2,
values[kVertexingLxyProjected] = values[kVertexingLxyProjected] / TMath::Sqrt((KFGeoTwoProng.GetPx() * KFGeoTwoProng.GetPx()) + (KFGeoTwoProng.GetPy() * KFGeoTwoProng.GetPy()));
values[kVertexingLxyzProjected] = (dxPair2PV * KFGeoTwoProng.GetPx()) + (dyPair2PV * KFGeoTwoProng.GetPy()) + (dzPair2PV * KFGeoTwoProng.GetPz());
values[kVertexingLxyzProjected] = values[kVertexingLxyzProjected] / TMath::Sqrt((KFGeoTwoProng.GetPx() * KFGeoTwoProng.GetPx()) + (KFGeoTwoProng.GetPy() * KFGeoTwoProng.GetPy()) + (KFGeoTwoProng.GetPz() * KFGeoTwoProng.GetPz()));
values[kVertexingTauxyProjected] = values[kVertexingLxyProjected] * KFGeoTwoProng.GetMass() / (KFGeoTwoProng.GetPt());
values[kVertexingTauxyProjected] = KFGeoTwoProng.GetPseudoProperDecayTime(KFPV, KFGeoTwoProng.GetMass()) / (o2::constants::physics::LightSpeedCm2NS);
values[kVertexingTauxyProjectedPoleJPsiMass] = values[kVertexingLxyProjected] * o2::constants::physics::MassJPsi / (KFGeoTwoProng.GetPt());
values[kVertexingTauxyProjectedNs] = values[kVertexingTauxyProjected] / o2::constants::physics::LightSpeedCm2NS;
values[kVertexingTauzProjected] = values[kVertexingLzProjected] * KFGeoTwoProng.GetMass() / TMath::Abs(KFGeoTwoProng.GetPz());
Expand Down Expand Up @@ -5169,6 +5187,11 @@ void VarManager::FillDileptonTrackTrack(T1 const& dilepton, T2 const& hadron1, T
hadronMass1 = o2::constants::physics::MassElectron;
hadronMass2 = o2::constants::physics::MassElectron;
}
if (candidateType == kBstoJpsiEEPhi) {
defaultDileptonMass = 3.096;
hadronMass1 = o2::constants::physics::MassKaonCharged;
hadronMass2 = o2::constants::physics::MassKaonCharged;
}

ROOT::Math::PtEtaPhiMVector v1(dilepton.pt(), dilepton.eta(), dilepton.phi(), dilepton.mass());
ROOT::Math::PtEtaPhiMVector v2(hadron1.pt(), hadron1.eta(), hadron1.phi(), hadronMass1);
Expand All @@ -5192,6 +5215,7 @@ void VarManager::FillDileptonTrackTrack(T1 const& dilepton, T2 const& hadron1, T
ROOT::Math::PtEtaPhiMVector v23 = v2 + v3;
values[kPairMass] = v1.M();
values[kPairPt] = v1.Pt();
values[kPtOverPairPt] = values[kPairPt] > 0 ? values[kQuadPt] / values[kPairPt] : 0;
values[kDitrackMass] = v23.M();
values[kDitrackPt] = v23.Pt();
values[kCosthetaDileptonDitrack] = (v1.Px() * v123.Px() + v1.Py() * v123.Py() + v1.Pz() * v123.Pz()) / (v1.P() * v123.P());
Expand Down Expand Up @@ -5221,7 +5245,7 @@ void VarManager::FillDileptonTrackTrackVertexing(C const& collision, T1 const& l
float mtrack1, mtrack2;
float mlepton1, mlepton2;

if constexpr (candidateType == kXtoJpsiPiPi || candidateType == kPsi2StoJpsiPiPi) {
if constexpr (candidateType == kXtoJpsiPiPi || candidateType == kPsi2StoJpsiPiPi || candidateType == kB0toJpsiEEPiPi) {
mlepton1 = o2::constants::physics::MassElectron;
mlepton2 = o2::constants::physics::MassElectron;
mtrack1 = o2::constants::physics::MassPionCharged;
Expand Down Expand Up @@ -5280,6 +5304,8 @@ void VarManager::FillDileptonTrackTrackVertexing(C const& collision, T1 const& l
values[kVertexingTauxyErr] = -999.;
values[kVertexingTauz] = -999.;
values[kVertexingTauzErr] = -999.;
values[kVertexingTauxyz] = -999.;
values[kVertexingTauxyzErr] = -999.;
values[kVertexingLzProjected] = -999.;
values[kVertexingLxyProjected] = -999.;
values[kVertexingLxyzProjected] = -999.;
Expand All @@ -5290,8 +5316,27 @@ void VarManager::FillDileptonTrackTrackVertexing(C const& collision, T1 const& l
} else {
Vec3D secondaryVertex;
std::array<float, 6> covMatrixPCA;
if (candidateType == kB0toJpsiEEPiPi) {
if (!fgFitterTwoProngBarrel.process(pars3,pars4))
return;
else {
o2::track::TrackParCov parsV0 = fgFitterTwoProngBarrel.createParentTrackParCov(0);
procCodeDileptonTrackTrack = fgFitterThreeProngBarrel.process(pars1, pars2, parsV0);
secondaryVertex = fgFitterThreeProngBarrel.getPCACandidate();
covMatrixPCA = fgFitterThreeProngBarrel.calcPCACovMatrixFlat();
values[kVertexingChi2PCA] = fgFitterThreeProngBarrel.getChi2AtPCACandidate();
}
} else if (candidateType == kXtoJpsiPiPi || candidateType == kPsi2StoJpsiPiPi) {
secondaryVertex = fgFitterFourProngBarrel.getPCACandidate();
covMatrixPCA = fgFitterFourProngBarrel.calcPCACovMatrixFlat();
values[kVertexingChi2PCA] = fgFitterFourProngBarrel.getChi2AtPCACandidate();
} else {
return; // unsupported candidate type
}
values[kVertexingProcCode] = procCodeDilepton;
values[kVertexingQuadProcCode] = procCodeDileptonTrackTrack;
// secondaryVertex = fgFitterFourProngBarrel.getPCACandidate();
// covMatrixPCA = fgFitterFourProngBarrel.calcPCACovMatrixFlat();

o2::math_utils::Point3D<float> vtxXYZ(collision.posX(), collision.posY(), collision.posZ());
std::array<float, 6> vtxCov{collision.covXX(), collision.covXY(), collision.covYY(), collision.covXZ(), collision.covYZ(), collision.covZZ()};
Expand Down Expand Up @@ -5321,6 +5366,9 @@ void VarManager::FillDileptonTrackTrackVertexing(C const& collision, T1 const& l
values[kVertexingTauzErr] = values[kVertexingLzErr] * v1234.M() / (TMath::Abs(v1234.Pz()) * o2::constants::physics::LightSpeedCm2NS);
values[kVertexingTauxyErr] = values[kVertexingLxyErr] * v1234.M() / (v1234.Pt() * o2::constants::physics::LightSpeedCm2NS);

values[kVertexingTauxyz] = values[kVertexingLxyz] * v1234.M() / (v1234.P() * o2::constants::physics::LightSpeedCm2NS);
values[kVertexingTauxyzErr] = values[kVertexingLxyzErr] * v1234.M() / (v1234.P() * o2::constants::physics::LightSpeedCm2NS);

values[kCosPointingAngle] = ((collision.posX() - secondaryVertex[0]) * v1234.Px() +
(collision.posY() - secondaryVertex[1]) * v1234.Py() +
(collision.posZ() - secondaryVertex[2]) * v1234.Pz()) /
Expand Down Expand Up @@ -5496,6 +5544,7 @@ void VarManager::FillQuadMC(T1 const& dilepton, T2 const& track1, T2 const& trac
values[kDeltaR] = sqrt(pow(values[kDeltaR1], 2) + pow(values[kDeltaR2], 2));
values[kDitrackMass] = v23.M();
values[kDitrackPt] = v23.Pt();
values[kPairPt] = v1.Pt();
}

//__________________________________________________________________
Expand Down
Loading
Loading