|
28 | 28 | #include "Common/CCDB/TriggerAliases.h" |
29 | 29 | #include "Common/Core/CollisionTypeHelper.h" |
30 | 30 | #include "Common/Core/EventPlaneHelper.h" |
| 31 | +#include "Common/Core/fwdtrackUtilities.h" |
31 | 32 | #include "Common/Core/trackUtilities.h" |
32 | 33 |
|
33 | 34 | #include "CommonConstants/LHCConstants.h" |
@@ -134,7 +135,8 @@ class VarManager : public TObject |
134 | 135 | ReducedTrackCollInfo = BIT(24), // TODO: remove it once new reduced data tables are produced for dielectron with ReducedTracksBarrelInfo |
135 | 136 | ReducedMuonCollInfo = BIT(25), // TODO: remove it once new reduced data tables are produced for dielectron with ReducedTracksBarrelInfo |
136 | 137 | MuonRealign = BIT(26), |
137 | | - MuonCovRealign = BIT(27) |
| 138 | + MuonCovRealign = BIT(27), |
| 139 | + MFTCov = BIT(28) |
138 | 140 | }; |
139 | 141 |
|
140 | 142 | enum PairCandidateType { |
@@ -1081,6 +1083,8 @@ class VarManager : public TObject |
1081 | 1083 | static void FillPairPropagateMuon(T1 const& muon1, T2 const& muon2, const C& collision, float* values = nullptr); |
1082 | 1084 | template <uint32_t fillMap, typename T1, typename T2, typename C> |
1083 | 1085 | static void FillGlobalMuonRefit(T1 const& muontrack, T2 const& mfttrack, const C& collision, float* values = nullptr); |
| 1086 | + template <uint32_t MuonfillMap, uint32_t MFTfillMap, typename T1, typename T2, typename C, typename C2> |
| 1087 | + static void FillGlobalMuonRefitCov(T1 const& muontrack, T2 const& mfttrack, const C& collision, C2 const& mftcov, float* values = nullptr); |
1084 | 1088 | template <int pairType, uint32_t fillMap, typename T1, typename T2> |
1085 | 1089 | static void FillPair(T1 const& t1, T2 const& t2, float* values = nullptr); |
1086 | 1090 | template <int pairType, uint32_t fillMap, typename C, typename T1, typename T2> |
@@ -1478,6 +1482,35 @@ void VarManager::FillGlobalMuonRefit(T1 const& muontrack, T2 const& mfttrack, co |
1478 | 1482 | } |
1479 | 1483 | } |
1480 | 1484 |
|
| 1485 | +template <uint32_t MuonfillMap, uint32_t MFTfillMap, typename T1, typename T2, typename C, typename C2> |
| 1486 | +void VarManager::FillGlobalMuonRefitCov(T1 const& muontrack, T2 const& mfttrack, const C& collision, C2 const& mftcov, float* values) |
| 1487 | +{ |
| 1488 | + if (!values) { |
| 1489 | + values = fgValues; |
| 1490 | + } |
| 1491 | + if constexpr ((MuonfillMap & MuonCov) > 0) { |
| 1492 | + if constexpr ((MFTfillMap & MFTCov) > 0) { |
| 1493 | + 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()}; |
| 1500 | + |
| 1501 | + o2::dataformats::GlobalFwdTrack globalRefit = o2::aod::fwdtrackutils::refitGlobalMuonCov(propmuon, mft); |
| 1502 | + values[kX] = globalRefit.getX(); |
| 1503 | + values[kY] = globalRefit.getY(); |
| 1504 | + values[kZ] = globalRefit.getZ(); |
| 1505 | + values[kTgl] = globalRefit.getTgl(); |
| 1506 | + values[kPt] = globalRefit.getPt(); |
| 1507 | + values[kPz] = globalRefit.getPz(); |
| 1508 | + values[kEta] = globalRefit.getEta(); |
| 1509 | + values[kPhi] = globalRefit.getPhi(); |
| 1510 | + } |
| 1511 | + } |
| 1512 | +} |
| 1513 | + |
1481 | 1514 | template <typename T> |
1482 | 1515 | void VarManager::FillBC(T const& bc, float* values) |
1483 | 1516 | { |
|
0 commit comments