Skip to content

Commit 66b051f

Browse files
mcoquet642Maurice CoquetMaurice Coquetalibuild
authored
[PWGDQ] New muon ML method and implementation in tableMaker (#13107)
Co-authored-by: Maurice Coquet <mcoquet@lxplus964.cern.ch> Co-authored-by: Maurice Coquet <mcoquet@lxplus990.cern.ch> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 369184d commit 66b051f

File tree

5 files changed

+220
-82
lines changed

5 files changed

+220
-82
lines changed

PWGDQ/Core/MuonMatchingMlResponse.h

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@
4040
break; \
4141
}
4242

43+
// Check if the index of mCachedIndices (index associated to a FEATURE)
44+
// matches the entry in EnumInputFeatures associated to this FEATURE
45+
// if so, the inputFeatures vector is filled with the FEATURE's value
46+
// by calling the corresponding GETTER=FEATURE from track
47+
#define CHECK_AND_FILL_MUONGLOB_TRACK(FEATURE, GETTER) \
48+
case static_cast<uint8_t>(InputFeaturesMFTMuonMatch::FEATURE): { \
49+
inputFeature = muonglob.GETTER(); \
50+
break; \
51+
}
52+
4353
// Check if the index of mCachedIndices (index associated to a FEATURE)
4454
// matches the entry in EnumInputFeatures associated to this FEATURE
4555
// if so, the inputFeatures vector is filled with the FEATURE's value
@@ -112,6 +122,7 @@ enum class InputFeaturesMFTMuonMatch : uint8_t {
112122
nClustersMCH,
113123
chi2MCH,
114124
pdca,
125+
Rabs,
115126
cXXMFT,
116127
cXYMFT,
117128
cYYMFT,
@@ -164,7 +175,8 @@ enum class InputFeaturesMFTMuonMatch : uint8_t {
164175
centFT0M,
165176
centFT0A,
166177
centFT0C,
167-
chi2MCHMFT
178+
chi2MCHMFT,
179+
chi2GlobMUON
168180
};
169181

170182
template <typename TypeOutputScore = float>
@@ -251,6 +263,33 @@ class MlResponseMFTMuonMatch : public MlResponse<TypeOutputScore>
251263
return inputFeature;
252264
}
253265

266+
template <typename T1, typename T2, typename T3, typename C1, typename U>
267+
float returnFeatureGlob(uint8_t idx, T1 const& muonglob, T2 const& muon, T3 const& mft, C1 const& mftcov, U const& collision)
268+
{
269+
float inputFeature = 0.;
270+
switch (idx) {
271+
CHECK_AND_FILL_MFT_TRACK(xMFT, getX);
272+
CHECK_AND_FILL_MFT_TRACK(yMFT, getY);
273+
CHECK_AND_FILL_MFT_TRACK(qOverptMFT, getInvQPt);
274+
CHECK_AND_FILL_MFT_TRACK(tglMFT, getTanl);
275+
CHECK_AND_FILL_MFT_TRACK(phiMFT, getPhi);
276+
CHECK_AND_FILL_MFT_TRACK(chi2MFT, getTrackChi2);
277+
CHECK_AND_FILL_MUON_TRACK(xMCH, getX);
278+
CHECK_AND_FILL_MUON_TRACK(yMCH, getY);
279+
CHECK_AND_FILL_MUON_TRACK(qOverptMCH, getInvQPt);
280+
CHECK_AND_FILL_MUON_TRACK(tglMCH, getTanl);
281+
CHECK_AND_FILL_MUON_TRACK(phiMCH, getPhi);
282+
CHECK_AND_FILL_MUON_TRACK(chi2MCH, getTrackChi2);
283+
CHECK_AND_FILL_MUONGLOB_TRACK(chi2MCHMFT, chi2MatchMCHMFT);
284+
CHECK_AND_FILL_MUONGLOB_TRACK(chi2GlobMUON, chi2);
285+
CHECK_AND_FILL_MUONGLOB_TRACK(Rabs, rAtAbsorberEnd);
286+
// Below are dummy files to remove warning of unused parameters
287+
CHECK_AND_FILL_MFTMUON_COLLISION(posZ);
288+
CHECK_AND_FILL_MFT_COV(cXXMFT, cXX);
289+
}
290+
return inputFeature;
291+
}
292+
254293
template <typename T1>
255294
float returnFeatureTest(uint8_t idx, T1 const& muon)
256295
{
@@ -286,6 +325,17 @@ class MlResponseMFTMuonMatch : public MlResponse<TypeOutputScore>
286325
return inputFeatures;
287326
}
288327

328+
template <typename T1, typename T2, typename T3, typename C1, typename U>
329+
std::vector<float> getInputFeaturesGlob(T1 const& muonglob, T2 const& muon, T3 const& mft, C1 const& mftcov, U const& collision)
330+
{
331+
std::vector<float> inputFeatures;
332+
for (const auto& idx : MlResponse<TypeOutputScore>::mCachedIndices) {
333+
float inputFeature = returnFeatureGlob(idx, muonglob, muon, mft, mftcov, collision);
334+
inputFeatures.emplace_back(inputFeature);
335+
}
336+
return inputFeatures;
337+
}
338+
289339
/// Method to get the value of variable chosen for binning
290340
/// \param track is the single track, \param collision is the collision
291341
/// \return binning variable
@@ -328,6 +378,7 @@ class MlResponseMFTMuonMatch : public MlResponse<TypeOutputScore>
328378
FILL_MAP_MFTMUON_MATCH(nClustersMCH),
329379
FILL_MAP_MFTMUON_MATCH(chi2MCH),
330380
FILL_MAP_MFTMUON_MATCH(pdca),
381+
FILL_MAP_MFTMUON_MATCH(Rabs),
331382
FILL_MAP_MFTMUON_MATCH(cXXMFT),
332383
FILL_MAP_MFTMUON_MATCH(cXYMFT),
333384
FILL_MAP_MFTMUON_MATCH(cYYMFT),
@@ -358,7 +409,8 @@ class MlResponseMFTMuonMatch : public MlResponse<TypeOutputScore>
358409
FILL_MAP_MFTMUON_MATCH(c1PtPhiMCH),
359410
FILL_MAP_MFTMUON_MATCH(c1PtTglMCH),
360411
FILL_MAP_MFTMUON_MATCH(c1Pt21Pt2MCH),
361-
FILL_MAP_MFTMUON_MATCH(chi2MCHMFT)};
412+
FILL_MAP_MFTMUON_MATCH(chi2MCHMFT),
413+
FILL_MAP_MFTMUON_MATCH(chi2GlobMUON)};
362414
}
363415

364416
uint8_t mCachedIndexBinning; // index correspondance between configurable and available input features

PWGDQ/Core/VarManager.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ std::map<TString, int> VarManager::fgVarNamesMap;
2727
bool VarManager::fgUsedVars[VarManager::kNVars] = {false};
2828
bool VarManager::fgUsedKF = false;
2929
float VarManager::fgMagField = 0.5;
30+
float VarManager::fgzMatching = -77.5;
3031
float VarManager::fgValues[VarManager::kNVars] = {0.0f};
3132
float VarManager::fgTPCInterSectorBoundary = 1.0; // cm
3233
int VarManager::fgITSROFbias = 0;
@@ -241,7 +242,7 @@ double VarManager::ComputePIDcalibration(int species, double nSigmaValue)
241242
default:
242243
LOG(fatal) << "Invalid species for PID calibration: " << species;
243244
return -999.0; // Return zero if species is invalid
244-
};
245+
}
245246

246247
TH3F* calibMeanHist = reinterpret_cast<TH3F*>(fgCalibs[calibMean]);
247248
TH3F* calibSigmaHist = reinterpret_cast<TH3F*>(fgCalibs[calibSigma]);
@@ -291,7 +292,7 @@ double VarManager::ComputePIDcalibration(int species, double nSigmaValue)
291292
default:
292293
LOG(fatal) << "Invalid species for PID calibration: " << species;
293294
return -999.0; // Return zero if species is invalid
294-
};
295+
}
295296

296297
THnF* calibMeanHist = reinterpret_cast<THnF*>(fgCalibs[calibMean]);
297298
THnF* calibSigmaHist = reinterpret_cast<THnF*>(fgCalibs[calibSigma]);
@@ -345,7 +346,7 @@ double VarManager::ComputePIDcalibration(int species, double nSigmaValue)
345346
default:
346347
return nSigmaValue; // unknown status, return the original nSigma value
347348
break;
348-
};
349+
}
349350
} else {
350351
// unknown calibration type, return the original nSigma value
351352
LOG(fatal) << "Unknown calibration type: " << fgCalibrationType;

PWGDQ/Core/VarManager.h

Lines changed: 56 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,8 @@ class VarManager : public TObject
891891
// Index used to set different options for Muon propagation
892892
kToVertex = 0, // propagtion to vertex by default
893893
kToDCA,
894-
kToRabs
894+
kToRabs,
895+
kToMatching
895896
};
896897

897898
static TString fgVariableNames[kNVars]; // variable names
@@ -938,6 +939,17 @@ class VarManager : public TObject
938939
fgMagField = magField;
939940
}
940941

942+
// Setup plane position for MFT-MCH matching
943+
static void SetMatchingPlane(float z)
944+
{
945+
fgzMatching = z;
946+
}
947+
948+
static float GetMatchingPlane()
949+
{
950+
return fgzMatching;
951+
}
952+
941953
// Setup the 2 prong KFParticle
942954
static void SetupTwoProngKFParticle(float magField)
943955
{
@@ -1047,8 +1059,12 @@ class VarManager : public TObject
10471059
return deltaPsi;
10481060
}
10491061

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

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

1272+
template <typename T, typename C>
1273+
o2::track::TrackParCovFwd VarManager::FwdToTrackPar(const T& track, const C& cov)
1274+
{
1275+
double chi2 = track.chi2();
1276+
SMatrix5 tpars(track.x(), track.y(), track.phi(), track.tgl(), track.signed1Pt());
1277+
std::vector<double> v1{cov.cXX(), cov.cXY(), cov.cYY(), cov.cPhiX(), cov.cPhiY(),
1278+
cov.cPhiPhi(), cov.cTglX(), cov.cTglY(), cov.cTglPhi(), cov.cTglTgl(),
1279+
cov.c1PtX(), cov.c1PtY(), cov.c1PtPhi(), cov.c1PtTgl(), cov.c1Pt21Pt2()};
1280+
SMatrix55 tcovs(v1.begin(), v1.end());
1281+
o2::track::TrackParCovFwd trackparCov{track.z(), tpars, tcovs, chi2};
1282+
return trackparCov;
1283+
}
1284+
12551285
template <typename T, typename U, typename V>
12561286
auto VarManager::getRotatedCovMatrixXX(const T& matrix, U phi, V theta)
12571287
{
@@ -1300,13 +1330,7 @@ KFPTrack VarManager::createKFPTrackFromTrack(const T& track)
13001330
template <typename T>
13011331
KFPTrack VarManager::createKFPFwdTrackFromFwdTrack(const T& muon)
13021332
{
1303-
double chi2 = muon.chi2();
1304-
SMatrix5 tpars(muon.x(), muon.y(), muon.phi(), muon.tgl(), muon.signed1Pt());
1305-
std::vector<double> v1{muon.cXX(), muon.cXY(), muon.cYY(), muon.cPhiX(), muon.cPhiY(),
1306-
muon.cPhiPhi(), muon.cTglX(), muon.cTglY(), muon.cTglPhi(), muon.cTglTgl(),
1307-
muon.c1PtX(), muon.c1PtY(), muon.c1PtPhi(), muon.c1PtTgl(), muon.c1Pt21Pt2()};
1308-
SMatrix55 tcovs(v1.begin(), v1.end());
1309-
o2::track::TrackParCovFwd trackparCov{muon.z(), tpars, tcovs, chi2};
1333+
o2::track::TrackParCovFwd trackparCov = FwdToTrackPar(muon, muon);
13101334

13111335
std::array<float, 21> trk_cov;
13121336
trackparCov.getCovXYZPxPyPzGlo(trk_cov);
@@ -1321,7 +1345,7 @@ KFPTrack VarManager::createKFPFwdTrackFromFwdTrack(const T& muon)
13211345
kfpTrack.SetCovarianceMatrix(trkcov_KF);
13221346
kfpTrack.SetCharge(muon.sign());
13231347
kfpTrack.SetNDF(muon.nClusters() - 5);
1324-
kfpTrack.SetChi2(chi2);
1348+
kfpTrack.SetChi2(muon.chi2());
13251349
return kfpTrack;
13261350
}
13271351

@@ -1340,19 +1364,13 @@ KFPVertex VarManager::createKFPVertexFromCollision(const T& collision)
13401364
template <typename T, typename C>
13411365
o2::dataformats::GlobalFwdTrack VarManager::PropagateMuon(const T& muon, const C& collision, const int endPoint)
13421366
{
1343-
double chi2 = muon.chi2();
1344-
SMatrix5 tpars(muon.x(), muon.y(), muon.phi(), muon.tgl(), muon.signed1Pt());
1345-
std::vector<double> v1{muon.cXX(), muon.cXY(), muon.cYY(), muon.cPhiX(), muon.cPhiY(),
1346-
muon.cPhiPhi(), muon.cTglX(), muon.cTglY(), muon.cTglPhi(), muon.cTglTgl(),
1347-
muon.c1PtX(), muon.c1PtY(), muon.c1PtPhi(), muon.c1PtTgl(), muon.c1Pt21Pt2()};
1348-
SMatrix55 tcovs(v1.begin(), v1.end());
1349-
o2::track::TrackParCovFwd fwdtrack{muon.z(), tpars, tcovs, chi2};
1367+
o2::track::TrackParCovFwd fwdtrack = FwdToTrackPar(muon, muon);
13501368
o2::dataformats::GlobalFwdTrack propmuon;
13511369
if (static_cast<int>(muon.trackType()) > 2) {
13521370
o2::dataformats::GlobalFwdTrack track;
1353-
track.setParameters(tpars);
1371+
track.setParameters(fwdtrack.getParameters());
13541372
track.setZ(fwdtrack.getZ());
1355-
track.setCovariances(tcovs);
1373+
track.setCovariances(fwdtrack.getCovariances());
13561374
auto mchTrack = mMatching.FwdtoMCH(track);
13571375

13581376
if (endPoint == kToVertex) {
@@ -1364,6 +1382,9 @@ o2::dataformats::GlobalFwdTrack VarManager::PropagateMuon(const T& muon, const C
13641382
if (endPoint == kToRabs) {
13651383
o2::mch::TrackExtrap::extrapToZ(mchTrack, -505.);
13661384
}
1385+
if (endPoint == kToMatching) {
1386+
o2::mch::TrackExtrap::extrapToVertexWithoutBranson(mchTrack, fgzMatching);
1387+
}
13671388

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

1408+
template <typename T, typename C>
1409+
o2::track::TrackParCovFwd VarManager::PropagateFwd(const T& track, const C& cov, float z)
1410+
{
1411+
o2::track::TrackParCovFwd fwdtrack = FwdToTrackPar(track, cov);
1412+
fwdtrack.propagateToZhelix(z, fgMagField);
1413+
return fwdtrack;
1414+
}
1415+
13871416
template <uint32_t fillMap, typename T, typename C>
13881417
void VarManager::FillMuonPDca(const T& muon, const C& collision, float* values)
13891418
{
@@ -1491,12 +1520,7 @@ void VarManager::FillGlobalMuonRefitCov(T1 const& muontrack, T2 const& mfttrack,
14911520
if constexpr ((MuonfillMap & MuonCov) > 0) {
14921521
if constexpr ((MFTfillMap & MFTCov) > 0) {
14931522
o2::dataformats::GlobalFwdTrack propmuon = PropagateMuon(muontrack, collision);
1494-
SMatrix5 tpars(mfttrack.x(), mfttrack.y(), mfttrack.phi(), mfttrack.tgl(), mfttrack.signed1Pt());
1495-
std::vector<double> v1{mftcov.cXX(), mftcov.cXY(), mftcov.cYY(), mftcov.cPhiX(), mftcov.cPhiY(),
1496-
mftcov.cPhiPhi(), mftcov.cTglX(), mftcov.cTglY(), mftcov.cTglPhi(), mftcov.cTglTgl(),
1497-
mftcov.c1PtX(), mftcov.c1PtY(), mftcov.c1PtPhi(), mftcov.c1PtTgl(), mftcov.c1Pt21Pt2()};
1498-
SMatrix55 tcovs(v1.begin(), v1.end());
1499-
o2::track::TrackParCovFwd mft{mfttrack.z(), tpars, tcovs, mfttrack.chi2()};
1523+
o2::track::TrackParCovFwd mft = FwdToTrackPar(mfttrack, mftcov);
15001524

15011525
o2::dataformats::GlobalFwdTrack globalRefit = o2::aod::fwdtrackutils::refitGlobalMuonCov(propmuon, mft);
15021526
values[kX] = globalRefit.getX();
@@ -3685,20 +3709,8 @@ void VarManager::FillPairVertexing(C const& collision, T const& t1, T const& t2,
36853709
procCode = fgFitterTwoProngBarrel.process(pars1, pars2);
36863710
} else if constexpr ((pairType == kDecayToMuMu) && muonHasCov) {
36873711
// Initialize track parameters for forward
3688-
double chi21 = t1.chi2();
3689-
double chi22 = t2.chi2();
3690-
SMatrix5 t1pars(t1.x(), t1.y(), t1.phi(), t1.tgl(), t1.signed1Pt());
3691-
std::vector<double> v1{t1.cXX(), t1.cXY(), t1.cYY(), t1.cPhiX(), t1.cPhiY(),
3692-
t1.cPhiPhi(), t1.cTglX(), t1.cTglY(), t1.cTglPhi(), t1.cTglTgl(),
3693-
t1.c1PtX(), t1.c1PtY(), t1.c1PtPhi(), t1.c1PtTgl(), t1.c1Pt21Pt2()};
3694-
SMatrix55 t1covs(v1.begin(), v1.end());
3695-
o2::track::TrackParCovFwd pars1{t1.z(), t1pars, t1covs, chi21};
3696-
SMatrix5 t2pars(t2.x(), t2.y(), t2.phi(), t2.tgl(), t2.signed1Pt());
3697-
std::vector<double> v2{t2.cXX(), t2.cXY(), t2.cYY(), t2.cPhiX(), t2.cPhiY(),
3698-
t2.cPhiPhi(), t2.cTglX(), t2.cTglY(), t2.cTglPhi(), t2.cTglTgl(),
3699-
t2.c1PtX(), t2.c1PtY(), t2.c1PtPhi(), t2.c1PtTgl(), t2.c1Pt21Pt2()};
3700-
SMatrix55 t2covs(v2.begin(), v2.end());
3701-
o2::track::TrackParCovFwd pars2{t2.z(), t2pars, t2covs, chi22};
3712+
o2::track::TrackParCovFwd pars1 = FwdToTrackPar(t1, t1);
3713+
o2::track::TrackParCovFwd pars2 = FwdToTrackPar(t2, t2);
37023714
procCode = fgFitterTwoProngFwd.process(pars1, pars2);
37033715
} else {
37043716
return;
@@ -3960,20 +3972,8 @@ void VarManager::FillPairVertexing(C const& collision, T const& t1, T const& t2,
39603972
}
39613973
if (propToSV) {
39623974
if constexpr ((pairType == kDecayToMuMu) && muonHasCov) {
3963-
double chi21 = t1.chi2();
3964-
double chi22 = t2.chi2();
3965-
SMatrix5 t1pars(t1.x(), t1.y(), t1.phi(), t1.tgl(), t1.signed1Pt());
3966-
std::vector<double> c1{t1.cXX(), t1.cXY(), t1.cYY(), t1.cPhiX(), t1.cPhiY(),
3967-
t1.cPhiPhi(), t1.cTglX(), t1.cTglY(), t1.cTglPhi(), t1.cTglTgl(),
3968-
t1.c1PtX(), t1.c1PtY(), t1.c1PtPhi(), t1.c1PtTgl(), t1.c1Pt21Pt2()};
3969-
SMatrix55 t1covs(c1.begin(), c1.end());
3970-
o2::track::TrackParCovFwd pars1{t1.z(), t1pars, t1covs, chi21};
3971-
SMatrix5 t2pars(t2.x(), t2.y(), t2.phi(), t2.tgl(), t2.signed1Pt());
3972-
std::vector<double> c2{t2.cXX(), t2.cXY(), t2.cYY(), t2.cPhiX(), t2.cPhiY(),
3973-
t2.cPhiPhi(), t2.cTglX(), t2.cTglY(), t2.cTglPhi(), t2.cTglTgl(),
3974-
t2.c1PtX(), t2.c1PtY(), t2.c1PtPhi(), t2.c1PtTgl(), t2.c1Pt21Pt2()};
3975-
SMatrix55 t2covs(c2.begin(), c2.end());
3976-
o2::track::TrackParCovFwd pars2{t2.z(), t2pars, t2covs, chi22};
3975+
o2::track::TrackParCovFwd pars1 = FwdToTrackPar(t1, t1);
3976+
o2::track::TrackParCovFwd pars2 = FwdToTrackPar(t2, t2);
39773977

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

4285-
double chi21 = lepton1.chi2();
4286-
double chi22 = lepton2.chi2();
4287-
double chi23 = track.chi2();
4288-
SMatrix5 t1pars(lepton1.x(), lepton1.y(), lepton1.phi(), lepton1.tgl(), lepton1.signed1Pt());
4289-
std::vector<double> v1{lepton1.cXX(), lepton1.cXY(), lepton1.cYY(), lepton1.cPhiX(), lepton1.cPhiY(),
4290-
lepton1.cPhiPhi(), lepton1.cTglX(), lepton1.cTglY(), lepton1.cTglPhi(), lepton1.cTglTgl(),
4291-
lepton1.c1PtX(), lepton1.c1PtY(), lepton1.c1PtPhi(), lepton1.c1PtTgl(), lepton1.c1Pt21Pt2()};
4292-
SMatrix55 t1covs(v1.begin(), v1.end());
4293-
o2::track::TrackParCovFwd pars1{lepton1.z(), t1pars, t1covs, chi21};
4294-
4295-
SMatrix5 t2pars(lepton2.x(), lepton2.y(), lepton2.phi(), lepton2.tgl(), lepton2.signed1Pt());
4296-
std::vector<double> v2{lepton2.cXX(), lepton2.cXY(), lepton2.cYY(), lepton2.cPhiX(), lepton2.cPhiY(),
4297-
lepton2.cPhiPhi(), lepton2.cTglX(), lepton2.cTglY(), lepton2.cTglPhi(), lepton2.cTglTgl(),
4298-
lepton2.c1PtX(), lepton2.c1PtY(), lepton2.c1PtPhi(), lepton2.c1PtTgl(), lepton2.c1Pt21Pt2()};
4299-
SMatrix55 t2covs(v2.begin(), v2.end());
4300-
o2::track::TrackParCovFwd pars2{lepton2.z(), t2pars, t2covs, chi22};
4301-
4302-
SMatrix5 t3pars(track.x(), track.y(), track.phi(), track.tgl(), track.signed1Pt());
4303-
std::vector<double> v3{track.cXX(), track.cXY(), track.cYY(), track.cPhiX(), track.cPhiY(),
4304-
track.cPhiPhi(), track.cTglX(), track.cTglY(), track.cTglPhi(), track.cTglTgl(),
4305-
track.c1PtX(), track.c1PtY(), track.c1PtPhi(), track.c1PtTgl(), track.c1Pt21Pt2()};
4306-
SMatrix55 t3covs(v3.begin(), v3.end());
4307-
o2::track::TrackParCovFwd pars3{track.z(), t3pars, t3covs, chi23};
4285+
o2::track::TrackParCovFwd pars1 = FwdToTrackPar(lepton1, lepton1);
4286+
o2::track::TrackParCovFwd pars2 = FwdToTrackPar(lepton2, lepton2);
4287+
o2::track::TrackParCovFwd pars3 = FwdToTrackPar(track, track);
4288+
43084289
procCode = VarManager::fgFitterThreeProngFwd.process(pars1, pars2, pars3);
43094290
procCodeJpsi = VarManager::fgFitterTwoProngFwd.process(pars1, pars2);
43104291
} else if constexpr ((candidateType == kBtoJpsiEEK || candidateType == kDstarToD0KPiPi) && trackHasCov) {

0 commit comments

Comments
 (0)