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
56 changes: 54 additions & 2 deletions PWGDQ/Core/MuonMatchingMlResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@
break; \
}

// Check if the index of mCachedIndices (index associated to a FEATURE)
// matches the entry in EnumInputFeatures associated to this FEATURE
// if so, the inputFeatures vector is filled with the FEATURE's value
// by calling the corresponding GETTER=FEATURE from track
#define CHECK_AND_FILL_MUONGLOB_TRACK(FEATURE, GETTER) \
case static_cast<uint8_t>(InputFeaturesMFTMuonMatch::FEATURE): { \
inputFeature = muonglob.GETTER(); \
break; \
}

// Check if the index of mCachedIndices (index associated to a FEATURE)
// matches the entry in EnumInputFeatures associated to this FEATURE
// if so, the inputFeatures vector is filled with the FEATURE's value
Expand Down Expand Up @@ -112,6 +122,7 @@ enum class InputFeaturesMFTMuonMatch : uint8_t {
nClustersMCH,
chi2MCH,
pdca,
Rabs,
cXXMFT,
cXYMFT,
cYYMFT,
Expand Down Expand Up @@ -164,7 +175,8 @@ enum class InputFeaturesMFTMuonMatch : uint8_t {
centFT0M,
centFT0A,
centFT0C,
chi2MCHMFT
chi2MCHMFT,
chi2GlobMUON
};

template <typename TypeOutputScore = float>
Expand Down Expand Up @@ -251,6 +263,33 @@ class MlResponseMFTMuonMatch : public MlResponse<TypeOutputScore>
return inputFeature;
}

template <typename T1, typename T2, typename T3, typename C1, typename U>
float returnFeatureGlob(uint8_t idx, T1 const& muonglob, T2 const& muon, T3 const& mft, C1 const& mftcov, U const& collision)
{
float inputFeature = 0.;
switch (idx) {
CHECK_AND_FILL_MFT_TRACK(xMFT, getX);
CHECK_AND_FILL_MFT_TRACK(yMFT, getY);
CHECK_AND_FILL_MFT_TRACK(qOverptMFT, getInvQPt);
CHECK_AND_FILL_MFT_TRACK(tglMFT, getTanl);
CHECK_AND_FILL_MFT_TRACK(phiMFT, getPhi);
CHECK_AND_FILL_MFT_TRACK(chi2MFT, getTrackChi2);
CHECK_AND_FILL_MUON_TRACK(xMCH, getX);
CHECK_AND_FILL_MUON_TRACK(yMCH, getY);
CHECK_AND_FILL_MUON_TRACK(qOverptMCH, getInvQPt);
CHECK_AND_FILL_MUON_TRACK(tglMCH, getTanl);
CHECK_AND_FILL_MUON_TRACK(phiMCH, getPhi);
CHECK_AND_FILL_MUON_TRACK(chi2MCH, getTrackChi2);
CHECK_AND_FILL_MUONGLOB_TRACK(chi2MCHMFT, chi2MatchMCHMFT);
CHECK_AND_FILL_MUONGLOB_TRACK(chi2GlobMUON, chi2);
CHECK_AND_FILL_MUONGLOB_TRACK(Rabs, rAtAbsorberEnd);
// Below are dummy files to remove warning of unused parameters
CHECK_AND_FILL_MFTMUON_COLLISION(posZ);
CHECK_AND_FILL_MFT_COV(cXXMFT, cXX);
}
return inputFeature;
}

template <typename T1>
float returnFeatureTest(uint8_t idx, T1 const& muon)
{
Expand Down Expand Up @@ -286,6 +325,17 @@ class MlResponseMFTMuonMatch : public MlResponse<TypeOutputScore>
return inputFeatures;
}

template <typename T1, typename T2, typename T3, typename C1, typename U>
std::vector<float> getInputFeaturesGlob(T1 const& muonglob, T2 const& muon, T3 const& mft, C1 const& mftcov, U const& collision)
{
std::vector<float> inputFeatures;
for (const auto& idx : MlResponse<TypeOutputScore>::mCachedIndices) {
float inputFeature = returnFeatureGlob(idx, muonglob, muon, mft, mftcov, collision);
inputFeatures.emplace_back(inputFeature);
}
return inputFeatures;
}

/// Method to get the value of variable chosen for binning
/// \param track is the single track, \param collision is the collision
/// \return binning variable
Expand Down Expand Up @@ -328,6 +378,7 @@ class MlResponseMFTMuonMatch : public MlResponse<TypeOutputScore>
FILL_MAP_MFTMUON_MATCH(nClustersMCH),
FILL_MAP_MFTMUON_MATCH(chi2MCH),
FILL_MAP_MFTMUON_MATCH(pdca),
FILL_MAP_MFTMUON_MATCH(Rabs),
FILL_MAP_MFTMUON_MATCH(cXXMFT),
FILL_MAP_MFTMUON_MATCH(cXYMFT),
FILL_MAP_MFTMUON_MATCH(cYYMFT),
Expand Down Expand Up @@ -358,7 +409,8 @@ class MlResponseMFTMuonMatch : public MlResponse<TypeOutputScore>
FILL_MAP_MFTMUON_MATCH(c1PtPhiMCH),
FILL_MAP_MFTMUON_MATCH(c1PtTglMCH),
FILL_MAP_MFTMUON_MATCH(c1Pt21Pt2MCH),
FILL_MAP_MFTMUON_MATCH(chi2MCHMFT)};
FILL_MAP_MFTMUON_MATCH(chi2MCHMFT),
FILL_MAP_MFTMUON_MATCH(chi2GlobMUON)};
}

uint8_t mCachedIndexBinning; // index correspondance between configurable and available input features
Expand Down
7 changes: 4 additions & 3 deletions PWGDQ/Core/VarManager.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -8,8 +8,8 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
#include <cmath>

Check failure on line 11 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.

Check failure on line 11 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check failure on line 11 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.
#include <iostream>

Check failure on line 12 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <vector>
#include <map>
#include "PWGDQ/Core/VarManager.h"
Expand All @@ -27,6 +27,7 @@
bool VarManager::fgUsedVars[VarManager::kNVars] = {false};
bool VarManager::fgUsedKF = false;
float VarManager::fgMagField = 0.5;
float VarManager::fgzMatching = -77.5;
float VarManager::fgValues[VarManager::kNVars] = {0.0f};
float VarManager::fgTPCInterSectorBoundary = 1.0; // cm
int VarManager::fgITSROFbias = 0;
Expand Down Expand Up @@ -105,7 +106,7 @@
if (!values) {
values = fgValues;
}
for (Int_t i = startValue; i < endValue; ++i) {

Check failure on line 109 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
values[i] = -9999.;
}
}
Expand Down Expand Up @@ -164,8 +165,8 @@
// TO Do: add more systems

// set the beam 4-momentum vectors
float beamAEnergy = energy / 2.0 * sqrt(NumberOfProtonsA * NumberOfProtonsC / NumberOfProtonsC / NumberOfProtonsA); // GeV

Check failure on line 168 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
float beamCEnergy = energy / 2.0 * sqrt(NumberOfProtonsC * NumberOfProtonsA / NumberOfProtonsA / NumberOfProtonsC); // GeV

Check failure on line 169 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
float beamAMomentum = std::sqrt(beamAEnergy * beamAEnergy - NumberOfNucleonsA * NumberOfNucleonsA * MassProton * MassProton);
float beamCMomentum = std::sqrt(beamCEnergy * beamCEnergy - NumberOfNucleonsC * NumberOfNucleonsC * MassProton * MassProton);
fgBeamA.SetPxPyPzE(0, 0, beamAMomentum, beamAEnergy);
Expand Down Expand Up @@ -241,7 +242,7 @@
default:
LOG(fatal) << "Invalid species for PID calibration: " << species;
return -999.0; // Return zero if species is invalid
};
}

TH3F* calibMeanHist = reinterpret_cast<TH3F*>(fgCalibs[calibMean]);
TH3F* calibSigmaHist = reinterpret_cast<TH3F*>(fgCalibs[calibSigma]);
Expand All @@ -264,7 +265,7 @@
double mean = calibMeanHist->GetBinContent(binTPCncls, binPin, binEta);
double sigma = calibSigmaHist->GetBinContent(binTPCncls, binPin, binEta);
return (nSigmaValue - mean) / sigma; // Return the calibrated nSigma value
} else if (fgCalibrationType == 2) {

Check failure on line 268 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
// get the calibration histograms
CalibObjects calibMean, calibSigma, calibStatus;
switch (species) {
Expand All @@ -291,7 +292,7 @@
default:
LOG(fatal) << "Invalid species for PID calibration: " << species;
return -999.0; // Return zero if species is invalid
};
}

THnF* calibMeanHist = reinterpret_cast<THnF*>(fgCalibs[calibMean]);
THnF* calibSigmaHist = reinterpret_cast<THnF*>(fgCalibs[calibSigma]);
Expand Down Expand Up @@ -345,7 +346,7 @@
default:
return nSigmaValue; // unknown status, return the original nSigma value
break;
};
}
} else {
// unknown calibration type, return the original nSigma value
LOG(fatal) << "Unknown calibration type: " << fgCalibrationType;
Expand All @@ -359,7 +360,7 @@
//
// Set default variable names
//
for (Int_t ivar = 0; ivar < kNVars; ++ivar) {

Check failure on line 363 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
fgVariableNames[ivar] = "DEFAULT NOT DEFINED";
fgVariableUnits[ivar] = "n/a";
}
Expand Down
131 changes: 56 additions & 75 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,8 @@ class VarManager : public TObject
// Index used to set different options for Muon propagation
kToVertex = 0, // propagtion to vertex by default
kToDCA,
kToRabs
kToRabs,
kToMatching
};

static TString fgVariableNames[kNVars]; // variable names
Expand Down Expand Up @@ -938,6 +939,17 @@ class VarManager : public TObject
fgMagField = magField;
}

// Setup plane position for MFT-MCH matching
static void SetMatchingPlane(float z)
{
fgzMatching = z;
}

static float GetMatchingPlane()
{
return fgzMatching;
}

// Setup the 2 prong KFParticle
static void SetupTwoProngKFParticle(float magField)
{
Expand Down Expand Up @@ -1047,8 +1059,12 @@ class VarManager : public TObject
return deltaPsi;
}

template <typename T, typename C>
static o2::track::TrackParCovFwd FwdToTrackPar(const T& track, const C& cov);
template <typename T, typename C>
static o2::dataformats::GlobalFwdTrack PropagateMuon(const T& muon, const C& collision, int endPoint = kToVertex);
template <typename T, typename C>
static o2::track::TrackParCovFwd PropagateFwd(const T& track, const C& cov, float z);
template <uint32_t fillMap, typename T, typename C>
static void FillMuonPDca(const T& muon, const C& collision, float* values = nullptr);
template <uint32_t fillMap, typename T, typename C>
Expand Down Expand Up @@ -1208,6 +1224,7 @@ class VarManager : public TObject
static void SetVariableDependencies(); // toggle those variables on which other used variables might depend

static float fgMagField;
static float fgzMatching;
static float fgCenterOfMassEnergy; // collision energy
static float fgMassofCollidingParticle; // mass of the colliding particle
static float fgTPCInterSectorBoundary; // TPC inter-sector border size at the TPC outer radius, in cm
Expand Down Expand Up @@ -1252,6 +1269,19 @@ class VarManager : public TObject
ClassDef(VarManager, 4);
};

template <typename T, typename C>
o2::track::TrackParCovFwd VarManager::FwdToTrackPar(const T& track, const C& cov)
{
double chi2 = track.chi2();
SMatrix5 tpars(track.x(), track.y(), track.phi(), track.tgl(), track.signed1Pt());
std::vector<double> v1{cov.cXX(), cov.cXY(), cov.cYY(), cov.cPhiX(), cov.cPhiY(),
cov.cPhiPhi(), cov.cTglX(), cov.cTglY(), cov.cTglPhi(), cov.cTglTgl(),
cov.c1PtX(), cov.c1PtY(), cov.c1PtPhi(), cov.c1PtTgl(), cov.c1Pt21Pt2()};
SMatrix55 tcovs(v1.begin(), v1.end());
o2::track::TrackParCovFwd trackparCov{track.z(), tpars, tcovs, chi2};
return trackparCov;
}

template <typename T, typename U, typename V>
auto VarManager::getRotatedCovMatrixXX(const T& matrix, U phi, V theta)
{
Expand Down Expand Up @@ -1300,13 +1330,7 @@ KFPTrack VarManager::createKFPTrackFromTrack(const T& track)
template <typename T>
KFPTrack VarManager::createKFPFwdTrackFromFwdTrack(const T& muon)
{
double chi2 = muon.chi2();
SMatrix5 tpars(muon.x(), muon.y(), muon.phi(), muon.tgl(), muon.signed1Pt());
std::vector<double> v1{muon.cXX(), muon.cXY(), muon.cYY(), muon.cPhiX(), muon.cPhiY(),
muon.cPhiPhi(), muon.cTglX(), muon.cTglY(), muon.cTglPhi(), muon.cTglTgl(),
muon.c1PtX(), muon.c1PtY(), muon.c1PtPhi(), muon.c1PtTgl(), muon.c1Pt21Pt2()};
SMatrix55 tcovs(v1.begin(), v1.end());
o2::track::TrackParCovFwd trackparCov{muon.z(), tpars, tcovs, chi2};
o2::track::TrackParCovFwd trackparCov = FwdToTrackPar(muon, muon);

std::array<float, 21> trk_cov;
trackparCov.getCovXYZPxPyPzGlo(trk_cov);
Expand All @@ -1321,7 +1345,7 @@ KFPTrack VarManager::createKFPFwdTrackFromFwdTrack(const T& muon)
kfpTrack.SetCovarianceMatrix(trkcov_KF);
kfpTrack.SetCharge(muon.sign());
kfpTrack.SetNDF(muon.nClusters() - 5);
kfpTrack.SetChi2(chi2);
kfpTrack.SetChi2(muon.chi2());
return kfpTrack;
}

Expand All @@ -1340,19 +1364,13 @@ KFPVertex VarManager::createKFPVertexFromCollision(const T& collision)
template <typename T, typename C>
o2::dataformats::GlobalFwdTrack VarManager::PropagateMuon(const T& muon, const C& collision, const int endPoint)
{
double chi2 = muon.chi2();
SMatrix5 tpars(muon.x(), muon.y(), muon.phi(), muon.tgl(), muon.signed1Pt());
std::vector<double> v1{muon.cXX(), muon.cXY(), muon.cYY(), muon.cPhiX(), muon.cPhiY(),
muon.cPhiPhi(), muon.cTglX(), muon.cTglY(), muon.cTglPhi(), muon.cTglTgl(),
muon.c1PtX(), muon.c1PtY(), muon.c1PtPhi(), muon.c1PtTgl(), muon.c1Pt21Pt2()};
SMatrix55 tcovs(v1.begin(), v1.end());
o2::track::TrackParCovFwd fwdtrack{muon.z(), tpars, tcovs, chi2};
o2::track::TrackParCovFwd fwdtrack = FwdToTrackPar(muon, muon);
o2::dataformats::GlobalFwdTrack propmuon;
if (static_cast<int>(muon.trackType()) > 2) {
o2::dataformats::GlobalFwdTrack track;
track.setParameters(tpars);
track.setParameters(fwdtrack.getParameters());
track.setZ(fwdtrack.getZ());
track.setCovariances(tcovs);
track.setCovariances(fwdtrack.getCovariances());
auto mchTrack = mMatching.FwdtoMCH(track);

if (endPoint == kToVertex) {
Expand All @@ -1364,6 +1382,9 @@ o2::dataformats::GlobalFwdTrack VarManager::PropagateMuon(const T& muon, const C
if (endPoint == kToRabs) {
o2::mch::TrackExtrap::extrapToZ(mchTrack, -505.);
}
if (endPoint == kToMatching) {
o2::mch::TrackExtrap::extrapToVertexWithoutBranson(mchTrack, fgzMatching);
}

auto proptrack = mMatching.MCHtoFwd(mchTrack);
propmuon.setParameters(proptrack.getParameters());
Expand All @@ -1384,6 +1405,14 @@ o2::dataformats::GlobalFwdTrack VarManager::PropagateMuon(const T& muon, const C
return propmuon;
}

template <typename T, typename C>
o2::track::TrackParCovFwd VarManager::PropagateFwd(const T& track, const C& cov, float z)
{
o2::track::TrackParCovFwd fwdtrack = FwdToTrackPar(track, cov);
fwdtrack.propagateToZhelix(z, fgMagField);
return fwdtrack;
}

template <uint32_t fillMap, typename T, typename C>
void VarManager::FillMuonPDca(const T& muon, const C& collision, float* values)
{
Expand Down Expand Up @@ -1491,12 +1520,7 @@ void VarManager::FillGlobalMuonRefitCov(T1 const& muontrack, T2 const& mfttrack,
if constexpr ((MuonfillMap & MuonCov) > 0) {
if constexpr ((MFTfillMap & MFTCov) > 0) {
o2::dataformats::GlobalFwdTrack propmuon = PropagateMuon(muontrack, collision);
SMatrix5 tpars(mfttrack.x(), mfttrack.y(), mfttrack.phi(), mfttrack.tgl(), mfttrack.signed1Pt());
std::vector<double> v1{mftcov.cXX(), mftcov.cXY(), mftcov.cYY(), mftcov.cPhiX(), mftcov.cPhiY(),
mftcov.cPhiPhi(), mftcov.cTglX(), mftcov.cTglY(), mftcov.cTglPhi(), mftcov.cTglTgl(),
mftcov.c1PtX(), mftcov.c1PtY(), mftcov.c1PtPhi(), mftcov.c1PtTgl(), mftcov.c1Pt21Pt2()};
SMatrix55 tcovs(v1.begin(), v1.end());
o2::track::TrackParCovFwd mft{mfttrack.z(), tpars, tcovs, mfttrack.chi2()};
o2::track::TrackParCovFwd mft = FwdToTrackPar(mfttrack, mftcov);

o2::dataformats::GlobalFwdTrack globalRefit = o2::aod::fwdtrackutils::refitGlobalMuonCov(propmuon, mft);
values[kX] = globalRefit.getX();
Expand Down Expand Up @@ -3685,20 +3709,8 @@ void VarManager::FillPairVertexing(C const& collision, T const& t1, T const& t2,
procCode = fgFitterTwoProngBarrel.process(pars1, pars2);
} else if constexpr ((pairType == kDecayToMuMu) && muonHasCov) {
// Initialize track parameters for forward
double chi21 = t1.chi2();
double chi22 = t2.chi2();
SMatrix5 t1pars(t1.x(), t1.y(), t1.phi(), t1.tgl(), t1.signed1Pt());
std::vector<double> v1{t1.cXX(), t1.cXY(), t1.cYY(), t1.cPhiX(), t1.cPhiY(),
t1.cPhiPhi(), t1.cTglX(), t1.cTglY(), t1.cTglPhi(), t1.cTglTgl(),
t1.c1PtX(), t1.c1PtY(), t1.c1PtPhi(), t1.c1PtTgl(), t1.c1Pt21Pt2()};
SMatrix55 t1covs(v1.begin(), v1.end());
o2::track::TrackParCovFwd pars1{t1.z(), t1pars, t1covs, chi21};
SMatrix5 t2pars(t2.x(), t2.y(), t2.phi(), t2.tgl(), t2.signed1Pt());
std::vector<double> v2{t2.cXX(), t2.cXY(), t2.cYY(), t2.cPhiX(), t2.cPhiY(),
t2.cPhiPhi(), t2.cTglX(), t2.cTglY(), t2.cTglPhi(), t2.cTglTgl(),
t2.c1PtX(), t2.c1PtY(), t2.c1PtPhi(), t2.c1PtTgl(), t2.c1Pt21Pt2()};
SMatrix55 t2covs(v2.begin(), v2.end());
o2::track::TrackParCovFwd pars2{t2.z(), t2pars, t2covs, chi22};
o2::track::TrackParCovFwd pars1 = FwdToTrackPar(t1, t1);
o2::track::TrackParCovFwd pars2 = FwdToTrackPar(t2, t2);
procCode = fgFitterTwoProngFwd.process(pars1, pars2);
} else {
return;
Expand Down Expand Up @@ -3960,20 +3972,8 @@ void VarManager::FillPairVertexing(C const& collision, T const& t1, T const& t2,
}
if (propToSV) {
if constexpr ((pairType == kDecayToMuMu) && muonHasCov) {
double chi21 = t1.chi2();
double chi22 = t2.chi2();
SMatrix5 t1pars(t1.x(), t1.y(), t1.phi(), t1.tgl(), t1.signed1Pt());
std::vector<double> c1{t1.cXX(), t1.cXY(), t1.cYY(), t1.cPhiX(), t1.cPhiY(),
t1.cPhiPhi(), t1.cTglX(), t1.cTglY(), t1.cTglPhi(), t1.cTglTgl(),
t1.c1PtX(), t1.c1PtY(), t1.c1PtPhi(), t1.c1PtTgl(), t1.c1Pt21Pt2()};
SMatrix55 t1covs(c1.begin(), c1.end());
o2::track::TrackParCovFwd pars1{t1.z(), t1pars, t1covs, chi21};
SMatrix5 t2pars(t2.x(), t2.y(), t2.phi(), t2.tgl(), t2.signed1Pt());
std::vector<double> c2{t2.cXX(), t2.cXY(), t2.cYY(), t2.cPhiX(), t2.cPhiY(),
t2.cPhiPhi(), t2.cTglX(), t2.cTglY(), t2.cTglPhi(), t2.cTglTgl(),
t2.c1PtX(), t2.c1PtY(), t2.c1PtPhi(), t2.c1PtTgl(), t2.c1Pt21Pt2()};
SMatrix55 t2covs(c2.begin(), c2.end());
o2::track::TrackParCovFwd pars2{t2.z(), t2pars, t2covs, chi22};
o2::track::TrackParCovFwd pars1 = FwdToTrackPar(t1, t1);
o2::track::TrackParCovFwd pars2 = FwdToTrackPar(t2, t2);

auto geoMan1 = o2::base::GeometryManager::meanMaterialBudget(t1.x(), t1.y(), t1.z(), KFGeoTwoProng.GetX(), KFGeoTwoProng.GetY(), KFGeoTwoProng.GetZ());
auto geoMan2 = o2::base::GeometryManager::meanMaterialBudget(t2.x(), t2.y(), t2.z(), KFGeoTwoProng.GetX(), KFGeoTwoProng.GetY(), KFGeoTwoProng.GetZ());
Expand Down Expand Up @@ -4282,29 +4282,10 @@ void VarManager::FillDileptonTrackVertexing(C const& collision, T1 const& lepton
mlepton2 = o2::constants::physics::MassMuon;
mtrack = o2::constants::physics::MassMuon;

double chi21 = lepton1.chi2();
double chi22 = lepton2.chi2();
double chi23 = track.chi2();
SMatrix5 t1pars(lepton1.x(), lepton1.y(), lepton1.phi(), lepton1.tgl(), lepton1.signed1Pt());
std::vector<double> v1{lepton1.cXX(), lepton1.cXY(), lepton1.cYY(), lepton1.cPhiX(), lepton1.cPhiY(),
lepton1.cPhiPhi(), lepton1.cTglX(), lepton1.cTglY(), lepton1.cTglPhi(), lepton1.cTglTgl(),
lepton1.c1PtX(), lepton1.c1PtY(), lepton1.c1PtPhi(), lepton1.c1PtTgl(), lepton1.c1Pt21Pt2()};
SMatrix55 t1covs(v1.begin(), v1.end());
o2::track::TrackParCovFwd pars1{lepton1.z(), t1pars, t1covs, chi21};

SMatrix5 t2pars(lepton2.x(), lepton2.y(), lepton2.phi(), lepton2.tgl(), lepton2.signed1Pt());
std::vector<double> v2{lepton2.cXX(), lepton2.cXY(), lepton2.cYY(), lepton2.cPhiX(), lepton2.cPhiY(),
lepton2.cPhiPhi(), lepton2.cTglX(), lepton2.cTglY(), lepton2.cTglPhi(), lepton2.cTglTgl(),
lepton2.c1PtX(), lepton2.c1PtY(), lepton2.c1PtPhi(), lepton2.c1PtTgl(), lepton2.c1Pt21Pt2()};
SMatrix55 t2covs(v2.begin(), v2.end());
o2::track::TrackParCovFwd pars2{lepton2.z(), t2pars, t2covs, chi22};

SMatrix5 t3pars(track.x(), track.y(), track.phi(), track.tgl(), track.signed1Pt());
std::vector<double> v3{track.cXX(), track.cXY(), track.cYY(), track.cPhiX(), track.cPhiY(),
track.cPhiPhi(), track.cTglX(), track.cTglY(), track.cTglPhi(), track.cTglTgl(),
track.c1PtX(), track.c1PtY(), track.c1PtPhi(), track.c1PtTgl(), track.c1Pt21Pt2()};
SMatrix55 t3covs(v3.begin(), v3.end());
o2::track::TrackParCovFwd pars3{track.z(), t3pars, t3covs, chi23};
o2::track::TrackParCovFwd pars1 = FwdToTrackPar(lepton1, lepton1);
o2::track::TrackParCovFwd pars2 = FwdToTrackPar(lepton2, lepton2);
o2::track::TrackParCovFwd pars3 = FwdToTrackPar(track, track);

procCode = VarManager::fgFitterThreeProngFwd.process(pars1, pars2, pars3);
procCodeJpsi = VarManager::fgFitterTwoProngFwd.process(pars1, pars2);
} else if constexpr ((candidateType == kBtoJpsiEEK || candidateType == kDstarToD0KPiPi) && trackHasCov) {
Expand Down
Loading
Loading