Skip to content
Merged
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
10 changes: 10 additions & 0 deletions PWGDQ/Core/HistogramsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,17 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
hm->AddHistogram(histClass, "KFTracksDCAxyMax", "", false, 400, -2.0, 2.0, VarManager::kKFTracksDCAxyMax);
hm->AddHistogram(histClass, "KFDCAxyBetweenProngs", "", false, 400, -2.0, 2.0, VarManager::kKFDCAxyBetweenProngs);
hm->AddHistogram(histClass, "KFChi2OverNDFGeo", "", false, 150, -5, 10, VarManager::kKFChi2OverNDFGeo);
hm->AddHistogram(histClass, "KFTrack0DeviationFromPV", "", false, 150, 0, 15e+6, VarManager::kKFTrack0DeviationFromPV);
hm->AddHistogram(histClass, "KFTrack1DeviationFromPV", "", false, 150, 0, 15e+6, VarManager::kKFTrack1DeviationFromPV);
hm->AddHistogram(histClass, "KFTrack0DeviationxyFromPV", "", false, 150, 0, 15e+6, VarManager::kKFTrack0DeviationxyFromPV);
hm->AddHistogram(histClass, "KFTrack1DeviationxyFromPV", "", false, 150, 0, 15e+6, VarManager::kKFTrack1DeviationxyFromPV);
hm->AddHistogram(histClass, "KFPairDCAxyz", "", false, 400, -2.0, 2.0, VarManager::kKFJpsiDCAxyz);
hm->AddHistogram(histClass, "KFPairDCAxy", "", false, 400, -2.0, 2.0, VarManager::kKFJpsiDCAxy);
hm->AddHistogram(histClass, "KFPairDeviationFromPV", "", false, 150, 0, 15e+6, VarManager::kKFPairDeviationFromPV);
hm->AddHistogram(histClass, "KFPairDeviationxyFromPV", "", false, 150, 0, 15e+6, VarManager::kKFPairDeviationxyFromPV);
hm->AddHistogram(histClass, "KFCosPA", "", false, 300, -1.5, 1.5, VarManager::kKFCosPA);
hm->AddHistogram(histClass, "KFMassGeoTop", "", false, 500, 0.0, 5.0, VarManager::kKFMassGeoTop);
hm->AddHistogram(histClass, "KFChi2OverNDFGeoTop", "", false, 150, -5, 10, VarManager::kKFChi2OverNDFGeoTop);
hm->AddHistogram(histClass, "KFNTrks2PV", "", false, 210, -10, 200, VarManager::kKFNContributorsPV);
hm->AddHistogram(histClass, "Mass_DCAxyzTwoProngs", "", false, 500, 0.0, 5.0, VarManager::kMass, 400, -2.0, 2.0, VarManager::kKFDCAxyzBetweenProngs);
hm->AddHistogram(histClass, "Mass_DCAxyTwoProngs", "", false, 500, 0.0, 5.0, VarManager::kMass, 400, -2.0, 2.0, VarManager::kKFDCAxyBetweenProngs);
Expand Down
56 changes: 49 additions & 7 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ class VarManager : public TObject
kNBasicTrackVariables,
kUsedKF,
kKFMass,
kKFMassGeoTop,

kPt1,
kEta1,
Expand Down Expand Up @@ -579,9 +580,18 @@ class VarManager : public TObject
kKFTrack1DCAxy,
kKFTracksDCAxyMax,
kKFDCAxyBetweenProngs,
kKFTrack0DeviationFromPV,
kKFTrack1DeviationFromPV,
kKFTrack0DeviationxyFromPV,
kKFTrack1DeviationxyFromPV,
kKFChi2OverNDFGeo,
kKFNContributorsPV,
kKFCosPA,
kKFChi2OverNDFGeoTop,
kKFJpsiDCAxyz,
kKFJpsiDCAxy,
kKFPairDeviationFromPV,
kKFPairDeviationxyFromPV,
kNPairVariables,

// Candidate-track correlation variables
Expand Down Expand Up @@ -1024,8 +1034,8 @@ KFPVertex VarManager::createKFPVertexFromCollision(const T& collision)
kfpVertex.SetXYZ(collision.posX(), collision.posY(), collision.posZ());
kfpVertex.SetCovarianceMatrix(collision.covXX(), collision.covXY(), collision.covYY(), collision.covXZ(), collision.covYZ(), collision.covZZ());
kfpVertex.SetChi2(collision.chi2());
kfpVertex.SetNDF(2 * collision.multNTracksPV() - 3);
kfpVertex.SetNContributors(collision.multNTracksPV());
kfpVertex.SetNDF(2 * collision.numContrib() - 3);
kfpVertex.SetNContributors(collision.numContrib());
Comment thread
iarsene marked this conversation as resolved.
return kfpVertex;
}

Expand Down Expand Up @@ -2566,13 +2576,13 @@ void VarManager::FillPairVertexing(C const& collision, T const& t1, T const& t2,
values[kVertexingLxyz] = std::sqrt(values[kVertexingLxyz]);

values[kVertexingTauz] = (collision.posZ() - secondaryVertex[2]) * v12.M() / (TMath::Abs(v12.Pz()) * o2::constants::physics::LightSpeedCm2NS);
values[kVertexingTauxy] = values[kVertexingLxy] * v12.M() / (v12.P() * o2::constants::physics::LightSpeedCm2NS);
values[kVertexingTauxy] = values[kVertexingLxy] * v12.M() / (v12.Pt() * o2::constants::physics::LightSpeedCm2NS);

values[kVertexingPz] = TMath::Abs(v12.Pz());
values[kVertexingSV] = secondaryVertex[2];

values[kVertexingTauzErr] = values[kVertexingLzErr] * v12.M() / (TMath::Abs(v12.Pz()) * o2::constants::physics::LightSpeedCm2NS);
values[kVertexingTauxyErr] = values[kVertexingLxyErr] * v12.M() / (v12.P() * o2::constants::physics::LightSpeedCm2NS);
values[kVertexingTauxyErr] = values[kVertexingLxyErr] * v12.M() / (v12.Pt() * o2::constants::physics::LightSpeedCm2NS);

values[kCosPointingAngle] = ((collision.posX() - secondaryVertex[0]) * v12.Px() +
(collision.posY() - secondaryVertex[1]) * v12.Py() +
Expand Down Expand Up @@ -2614,7 +2624,11 @@ void VarManager::FillPairVertexing(C const& collision, T const& t1, T const& t2,
KFGeoTwoProng.AddDaughter(trk1KF);
}
if (fgUsedVars[kKFMass]) {
values[kKFMass] = KFGeoTwoProng.GetMass();
float mass = 0., massErr = 0.;
if (!KFGeoTwoProng.GetMass(mass, massErr))
values[kKFMass] = mass;
else
values[kKFMass] = -999.;
}

if constexpr (eventHasVtxCov) {
Expand Down Expand Up @@ -2694,6 +2708,34 @@ void VarManager::FillPairVertexing(C const& collision, T const& t1, T const& t2,
if (fgUsedVars[kKFTracksDCAxyMax]) {
values[kKFTracksDCAxyMax] = TMath::Abs(values[kKFTrack0DCAxy]) > TMath::Abs(values[kKFTrack1DCAxy]) ? values[kKFTrack0DCAxy] : values[kKFTrack1DCAxy];
}
if (fgUsedVars[kKFTrack0DeviationFromPV] || fgUsedVars[kKFTrack1DeviationFromPV]) {
values[kKFTrack0DeviationFromPV] = trk0KF.GetDeviationFromVertex(KFPV);
values[kKFTrack1DeviationFromPV] = trk1KF.GetDeviationFromVertex(KFPV);
}
if (fgUsedVars[kKFTrack0DeviationxyFromPV] || fgUsedVars[kKFTrack1DeviationxyFromPV]) {
values[kKFTrack0DeviationxyFromPV] = trk0KF.GetDeviationFromVertexXY(KFPV);
values[kKFTrack1DeviationxyFromPV] = trk1KF.GetDeviationFromVertexXY(KFPV);
}
if (fgUsedVars[kKFJpsiDCAxyz]) {
values[kKFJpsiDCAxyz] = KFGeoTwoProng.GetDistanceFromVertex(KFPV);
}
if (fgUsedVars[kKFJpsiDCAxy]) {
values[kKFJpsiDCAxy] = KFGeoTwoProng.GetDistanceFromVertexXY(KFPV);
}
if (fgUsedVars[kKFPairDeviationFromPV] || fgUsedVars[kKFPairDeviationxyFromPV]) {
values[kKFPairDeviationFromPV] = KFGeoTwoProng.GetDeviationFromVertex(KFPV);
values[kKFPairDeviationxyFromPV] = KFGeoTwoProng.GetDeviationFromVertexXY(KFPV);
}
if (fgUsedVars[kKFChi2OverNDFGeoTop] || fgUsedVars[kKFMassGeoTop]) {
KFParticle KFGeoTopTwoProngBarrel = KFGeoTwoProng;
KFGeoTopTwoProngBarrel.SetProductionVertex(KFPV);
values[kKFChi2OverNDFGeoTop] = KFGeoTopTwoProngBarrel.GetChi2() / KFGeoTopTwoProngBarrel.GetNDF();
float mass = 0., massErr = 0.;
if (!KFGeoTopTwoProngBarrel.GetMass(mass, massErr))
values[kKFMassGeoTop] = mass;
else
values[kKFMassGeoTop] = -999.;
}
if (propToSV) {
if constexpr ((pairType == kDecayToMuMu) && muonHasCov) {
double chi21 = t1.chi2();
Expand Down Expand Up @@ -2924,13 +2966,13 @@ void VarManager::FillDileptonTrackVertexing(C const& collision, T1 const& lepton
}

values[kVertexingTauz] = (collision.posZ() - secondaryVertex[2]) * v123.M() / (TMath::Abs(v123.Pz()) * o2::constants::physics::LightSpeedCm2NS);
values[kVertexingTauxy] = values[kVertexingLxy] * v123.M() / (v123.P() * o2::constants::physics::LightSpeedCm2NS);
values[kVertexingTauxy] = values[kVertexingLxy] * v123.M() / (v123.Pt() * o2::constants::physics::LightSpeedCm2NS);

values[kVertexingPz] = TMath::Abs(v123.Pz());
values[kVertexingSV] = secondaryVertex[2];

values[kVertexingTauzErr] = values[kVertexingLzErr] * v123.M() / (TMath::Abs(v123.Pz()) * o2::constants::physics::LightSpeedCm2NS);
values[kVertexingTauxyErr] = values[kVertexingLxyErr] * v123.M() / (v123.P() * o2::constants::physics::LightSpeedCm2NS);
values[kVertexingTauxyErr] = values[kVertexingLxyErr] * v123.M() / (v123.Pt() * o2::constants::physics::LightSpeedCm2NS);

if (fgUsedVars[kCosPointingAngle] && fgUsedVars[kVertexingLxyz]) {
values[VarManager::kCosPointingAngle] = ((collision.posX() - secondaryVertex[0]) * v123.Px() +
Expand Down
71 changes: 70 additions & 1 deletion PWGDQ/DataModel/ReducedInfoTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,44 @@ DECLARE_SOA_COLUMN(FwdDcaX1, fwdDcaX1, float); //! X component of forward DCA
DECLARE_SOA_COLUMN(FwdDcaY1, fwdDcaY1, float); //! Y component of forward DCA
DECLARE_SOA_COLUMN(FwdDcaX2, fwdDcaX2, float); //! X component of forward DCA
DECLARE_SOA_COLUMN(FwdDcaY2, fwdDcaY2, float); //! Y component of forward DCA

DECLARE_SOA_COLUMN(ITSNCls1, itsNCls1, int); //! Number of ITS clusters
DECLARE_SOA_COLUMN(TPCNClsFound1, tpcNClsFound1, float); //! Number of TPC clusters found
DECLARE_SOA_COLUMN(TPCNClsCR1, tpcNClsCR1, float); //! Number of TPC crossed rows
DECLARE_SOA_COLUMN(TPCChi2NCl1, tpcChi2NCl1, float); //! TPC chi2/Ncls
DECLARE_SOA_COLUMN(DcaXY1, dcaXY1, float); //! DCA in XY plane
DECLARE_SOA_COLUMN(DcaZ1, dcaZ1, float); //! DCA in Z
DECLARE_SOA_COLUMN(TPCSignal1, tpcSignal1, float); //! TPC dE/dx signal
DECLARE_SOA_COLUMN(TPCNSigmaEl1, tpcNSigmaEl1, float); //! TPC nSigma electron
DECLARE_SOA_COLUMN(TPCNSigmaPi1, tpcNSigmaPi1, float); //! TPC nSigma pion
DECLARE_SOA_COLUMN(TPCNSigmaPr1, tpcNSigmaPr1, float); //! TPC nSigma proton
DECLARE_SOA_COLUMN(TOFBeta1, tofBeta1, float); //! TOF beta
DECLARE_SOA_COLUMN(TOFNSigmaEl1, tofNSigmaEl1, float); //! TOF nSigma electron
DECLARE_SOA_COLUMN(TOFNSigmaPi1, tofNSigmaPi1, float); //! TOF nSigma pion
DECLARE_SOA_COLUMN(TOFNSigmaPr1, tofNSigmaPr1, float); //! TOF nSigma proton
DECLARE_SOA_COLUMN(ITSNCls2, itsNCls2, int); //! Number of ITS clusters
DECLARE_SOA_COLUMN(TPCNClsFound2, tpcNClsFound2, float); //! Number of TPC clusters found
DECLARE_SOA_COLUMN(TPCNClsCR2, tpcNClsCR2, float); //! Number of TPC crossed rows
DECLARE_SOA_COLUMN(TPCChi2NCl2, tpcChi2NCl2, float); //! TPC chi2/Ncls
DECLARE_SOA_COLUMN(DcaXY2, dcaXY2, float); //! DCA in XY plane
DECLARE_SOA_COLUMN(DcaZ2, dcaZ2, float); //! DCA in Z
DECLARE_SOA_COLUMN(TPCSignal2, tpcSignal2, float); //! TPC dE/dx signal
DECLARE_SOA_COLUMN(TPCNSigmaEl2, tpcNSigmaEl2, float); //! TPC nSigma electron
DECLARE_SOA_COLUMN(TPCNSigmaPi2, tpcNSigmaPi2, float); //! TPC nSigma pion
DECLARE_SOA_COLUMN(TPCNSigmaPr2, tpcNSigmaPr2, float); //! TPC nSigma proton
DECLARE_SOA_COLUMN(TOFBeta2, tofBeta2, float); //! TOF beta
DECLARE_SOA_COLUMN(TOFNSigmaEl2, tofNSigmaEl2, float); //! TOF nSigma electron
DECLARE_SOA_COLUMN(TOFNSigmaPi2, tofNSigmaPi2, float); //! TOF nSigma pion
DECLARE_SOA_COLUMN(TOFNSigmaPr2, tofNSigmaPr2, float); //! TOF nSigma proton

DECLARE_SOA_COLUMN(DCAxyzTrk0KF, dcaxyztrk0KF, float); //! 3D DCA to primary vertex of the first track
DECLARE_SOA_COLUMN(DCAxyzTrk1KF, dcaxyztrk1KF, float); //! 3D DCA to primary vertex of the second track
DECLARE_SOA_COLUMN(DCAxyTrk0KF, dcaxytrk0KF, float); //! 2D DCA to primary vertex of the first track
DECLARE_SOA_COLUMN(DCAxyTrk1KF, dcaxytrk1KF, float); //! 2D DCA to primary vertex of the second track

DECLARE_SOA_COLUMN(DeviationTrk0KF, deviationTrk0KF, float); //! 3D chi2 deviation to primary vertex of the first track
DECLARE_SOA_COLUMN(DeviationTrk1KF, deviationTrk1KF, float); //! 3D chi2 deviation to primary vertex of the second track
DECLARE_SOA_COLUMN(DeviationxyTrk0KF, deviationxyTrk0KF, float); //! 2D chi2 deviation to primary vertex of the first track
DECLARE_SOA_COLUMN(DeviationxyTrk1KF, deviationxyTrk1KF, float); //! 2D chi2 deviation to primary vertex of the second track
} // namespace dilepton_track_index

// pair information
Expand Down Expand Up @@ -564,6 +601,23 @@ DECLARE_SOA_COLUMN(MultDimuons, multdimuons, int); //! Dim
DECLARE_SOA_COLUMN(CentFT0C, centft0c, float); //! Centrality information from FT0C
DECLARE_SOA_COLUMN(CollisionId, collisionId, int32_t); //!
DECLARE_SOA_COLUMN(IsFirst, isfirst, int); //! Flag for the first dilepton in the collision
DECLARE_SOA_COLUMN(DCAxyzBetweenTrksKF, dcaxyzbetweentrksKF, float); //! DCAxyz between the two tracks
DECLARE_SOA_COLUMN(DCAxyBetweenTrksKF, dcaxybetweentrksKF, float); //! DCAxy between the two tracks
DECLARE_SOA_COLUMN(MassKFGeo, massKFGeo, float); //! Pair mass from KFParticle
DECLARE_SOA_COLUMN(CosPAKFGeo, cosPAKFGeo, float); //! Cosine of the pointing angle from KFParticle
DECLARE_SOA_COLUMN(Chi2OverNDFKFGeo, chi2overndfKFGeo, float); //! Chi2 over NDF from KFParticle
DECLARE_SOA_COLUMN(DecayLengthKFGeo, decaylengthKFGeo, float); //! Decay length from KFParticle
DECLARE_SOA_COLUMN(DecayLengthOverErrKFGeo, decaylengthovererrKFGeo, float); //! Decay length over error from KFParticle
DECLARE_SOA_COLUMN(DecayLengthXYKFGeo, decaylengthxyKFGeo, float); //! Decay length XY from KFParticle
DECLARE_SOA_COLUMN(DecayLengthXYOverErrKFGeo, decaylengthxyovererrKFGeo, float); //! Decay length XY over error from KFParticle
DECLARE_SOA_COLUMN(PseudoproperDecayTimeKFGeo, pseudoproperdecaytimeKFGeo, float); //! Pseudoproper decay time from KFParticle
DECLARE_SOA_COLUMN(PseudoproperDecayTimeErrKFGeo, pseudoproperdecaytimeErrKFGeo, float); //! Pseudoproper decay time error from KFParticle
DECLARE_SOA_COLUMN(MassKFGeoTop, massKFGeoTop, float); //! Pair mass after topological constraint from KFParticle
DECLARE_SOA_COLUMN(Chi2OverNDFKFGeoTop, chi2overndfKFGeoTop, float); //! Chi2 over NDF after topological constraint from KFParticle
DECLARE_SOA_COLUMN(PairDCAxyz, pairDCAxyz, float); //! Pair DCAxyz to PV from KFParticle
DECLARE_SOA_COLUMN(PairDCAxy, pairDCAxy, float); //! Pair DCAxy to PV from KFParticle
DECLARE_SOA_COLUMN(DeviationPairKF, deviationPairKF, float); //! Pair chi2 deviation to PV from KFParticle
DECLARE_SOA_COLUMN(DeviationxyPairKF, deviationxyPairKF, float); //! Pair chi2 deviation to PV in XY from KFParticle
// DECLARE_SOA_INDEX_COLUMN(ReducedMuon, reducedmuon2); //!
DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //!
[](float pt, float phi) -> float { return pt * std::cos(phi); });
Expand Down Expand Up @@ -627,6 +681,20 @@ DECLARE_SOA_TABLE(DileptonsFlow, "AOD", "RTDILEPTONFLOW", //!
DECLARE_SOA_TABLE(DileptonsInfo, "AOD", "RTDILEPTONINFO",
reducedpair::CollisionId, collision::PosX, collision::PosY, collision::PosZ);

DECLARE_SOA_TABLE(DielectronsAll, "AOD", "RTDIELECTRONALL", //!
reducedpair::ReducedEventId,
reducedpair::Mass,
reducedpair::Pt, reducedpair::Eta, reducedpair::Phi, reducedpair::Sign,
reducedpair::FilterMap,
reducedpair::McDecision,
dilepton_track_index::Pt1, dilepton_track_index::Eta1, dilepton_track_index::Phi1, dilepton_track_index::TPCNClsCR1, dilepton_track_index::TPCNClsFound1, dilepton_track_index::TPCChi2NCl1, dilepton_track_index::DcaXY1, dilepton_track_index::DcaZ1, dilepton_track_index::TPCSignal1, dilepton_track_index::TPCNSigmaEl1, dilepton_track_index::TPCNSigmaPi1, dilepton_track_index::TPCNSigmaPr1, dilepton_track_index::TOFBeta1, dilepton_track_index::TOFNSigmaEl1, dilepton_track_index::TOFNSigmaPi1, dilepton_track_index::TOFNSigmaPr1,
dilepton_track_index::Pt2, dilepton_track_index::Eta2, dilepton_track_index::Phi2, dilepton_track_index::TPCNClsCR2, dilepton_track_index::TPCNClsFound2, dilepton_track_index::TPCChi2NCl2, dilepton_track_index::DcaXY2, dilepton_track_index::DcaZ2, dilepton_track_index::TPCSignal2, dilepton_track_index::TPCNSigmaEl2, dilepton_track_index::TPCNSigmaPi2, dilepton_track_index::TPCNSigmaPr2, dilepton_track_index::TOFBeta2, dilepton_track_index::TOFNSigmaEl2, dilepton_track_index::TOFNSigmaPi2, dilepton_track_index::TOFNSigmaPr2,
dilepton_track_index::DCAxyzTrk0KF, dilepton_track_index::DCAxyzTrk1KF, reducedpair::DCAxyzBetweenTrksKF, dilepton_track_index::DCAxyTrk0KF, dilepton_track_index::DCAxyTrk1KF, reducedpair::DCAxyBetweenTrksKF,
dilepton_track_index::DeviationTrk0KF, dilepton_track_index::DeviationTrk1KF, dilepton_track_index::DeviationxyTrk0KF, dilepton_track_index::DeviationxyTrk1KF,
reducedpair::MassKFGeo, reducedpair::Chi2OverNDFKFGeo, reducedpair::DecayLengthKFGeo, reducedpair::DecayLengthOverErrKFGeo, reducedpair::DecayLengthXYKFGeo, reducedpair::DecayLengthXYOverErrKFGeo, reducedpair::PseudoproperDecayTimeKFGeo, reducedpair::PseudoproperDecayTimeErrKFGeo, reducedpair::CosPAKFGeo, reducedpair::PairDCAxyz, reducedpair::PairDCAxy,
reducedpair::DeviationPairKF, reducedpair::DeviationxyPairKF,
reducedpair::MassKFGeoTop, reducedpair::Chi2OverNDFKFGeoTop);

DECLARE_SOA_TABLE(DimuonsAll, "AOD", "RTDIMUONALL", //!
collision::PosX, collision::PosY, collision::PosZ, collision::NumContrib,
reducedevent::MCPosX, reducedevent::MCPosY, reducedevent::MCPosZ,
Expand Down Expand Up @@ -669,6 +737,7 @@ using DielectronExtra = DielectronsExtra::iterator;
using DimuonExtra = DimuonsExtra::iterator;
using DileptonFlow = DileptonsFlow::iterator;
using DileptonInfo = DileptonsInfo::iterator;
using DielectronAll = DielectronsAll::iterator;
using DimuonAll = DimuonsAll::iterator;

// mft PID reduced data model
Expand Down
Loading