@@ -132,6 +132,8 @@ struct muonGlobalAlignment {
132132
133133 Configurable<bool > fEnableVertexShiftAnalysis {" cfgEnableVertexShiftAnalysis" , true , " Enable the analysis of vertex shift" };
134134 Configurable<bool > fEnableMftDcaAnalysis {" cfgEnableMftDcaAnalysis" , true , " Enable the analysis of DCA-based MFT alignment" };
135+ Configurable<bool > fEnableMftDcaExtraPlots {" cfgEnableMftDcaExtraPlots" , false , " Enable additional plots for the analysis of DCA-based MFT alignment" };
136+ Configurable<bool > fEnableGlobalFwdDcaAnalysis {" cfgEnableGlobalFwdDcaAnalysis" , true , " Enable the analysis of DCA-based MFT alignment using global forward tracks" };
135137 Configurable<bool > fEnableMftMchResidualsAnalysis {" cfgEnableMftMchResidualsAnalysis" , true , " Enable the analysis of residuals between MFT tracks and MCH clusters" };
136138
137139 int mRunNumber {0 }; // needed to detect if the run changed and trigger update of magnetic field
@@ -171,6 +173,8 @@ struct muonGlobalAlignment {
171173 double mBzAtMftCenter {0 };
172174
173175 HistogramRegistry registry{" registry" , {}};
176+ std::array<o2::framework::HistPtr, 10 > mMftTrackEffNum ;
177+ std::array<o2::framework::HistPtr, 10 > mMftTrackEffDen ;
174178
175179 // vector of all MFT-MCH(-MID) matching candidates associated to the same MCH(-MID) track,
176180 // to be sorted in descending order with respect to the matching quality
@@ -362,17 +366,22 @@ struct muonGlobalAlignment {
362366 AxisSpec dcaxMCHAxis = {400 , -10.0 , 10.0 , " DCA_{x} (cm)" };
363367 AxisSpec dcayMCHAxis = {400 , -10.0 , 10.0 , " DCA_{y} (cm)" };
364368 AxisSpec dcazAxis = {20 , -10.0 , 10.0 , " v_{z} (cm)" };
365- AxisSpec txAxis = {30 , -mftLadderWidth * 15 .f / 2 .f , mftLadderWidth * 15 .f / 2 .f , " track_{x} (cm)" };
366- AxisSpec tyAxis = {20 , -10 .f , 10 .f , " track_{y} (cm)" };
369+ AxisSpec txAxis = {30 * 4 , -mftLadderWidth * 15 .f / 2 .f , mftLadderWidth * 15 .f / 2 .f , " track_{x} (cm)" };
370+ AxisSpec tyAxis = {24 * 4 , -12 .f , 12 .f , " track_{y} (cm)" };
371+ AxisSpec txFineAxis = {1500 , -15 .f , 15 .f , " track_{x} (cm)" };
372+ AxisSpec tyFineAxis = {1500 , -15 .f , 15 .f , " track_{y} (cm)" };
367373 AxisSpec vxAxis = {400 , -0.5 , 0.5 , " vtx_{x} (cm)" };
368374 AxisSpec vyAxis = {400 , -0.5 , 0.5 , " vtx_{y} (cm)" };
369375 AxisSpec vzAxis = {1000 , -10.0 , 10.0 , " vtx_{z} (cm)" };
370376 AxisSpec phiAxis = {36 , -180.0 , 180.0 , " #phi (degrees)" };
377+ AxisSpec momAxis = {500 , 0 , 100.0 , " p (GeV/c)" };
371378 AxisSpec nMftClustersAxis = {6 , 5 , 11 , " # of clusters" };
372379 AxisSpec mftTrackTypeAxis = {2 , 0 , 2 , " track type" };
380+ AxisSpec mftLayerAxis = {10 , 0 , 10 , " layer" };
373381 AxisSpec trackChargeSignAxis = {2 , 0 , 0 , " sign" };
374382 AxisSpec layersPatternAxis = {1024 , 0 , 1024 , " layers pattern" };
375383 AxisSpec zshiftAxis = {21 , -5.25 , 5.25 , " z shift (mm)" };
384+ AxisSpec chi2Axis = {500 , 0 , 500 , " chi2" };
376385
377386 registry.add (" vertex_y_vs_x" , std::format (" Vertex y vs. x" ).c_str (), {HistType::kTH2F , {vxAxis, vyAxis}});
378387 registry.add (" vertex_z" , std::format (" Vertex z" ).c_str (), {HistType::kTH1F , {vzAxis}});
@@ -388,12 +397,36 @@ struct muonGlobalAlignment {
388397 }
389398
390399 if (fEnableMftDcaAnalysis ) {
391- registry.add (" DCA/MFT/DCA_x" , " DCA(x) vs. vz, tx, ty, nclus, trackType" ,
392- HistType::kTHnSparseF , {dcaxMFTAxis, dcazAxis, txAxis, tyAxis, nMftClustersAxis, mftTrackTypeAxis});
393- registry.add (" DCA/MFT/DCA_y" , " DCA(y) vs. vz, tx, ty, nclus, trackType" ,
394- HistType::kTHnSparseF , {dcayMFTAxis, dcazAxis, txAxis, tyAxis, nMftClustersAxis, mftTrackTypeAxis});
395- registry.add (" DCA/MFT/layers" , " Layers pattern vs. tx, ty, nclus, trackType" ,
396- HistType::kTHnSparseF , {layersPatternAxis, txAxis, tyAxis, nMftClustersAxis, mftTrackTypeAxis});
400+ registry.add (" DCA/MFT/DCA_x" , " DCA(x) vs. vz, tx, ty, nclus" ,
401+ HistType::kTHnSparseF , {dcaxMFTAxis, dcazAxis, txAxis, tyAxis, nMftClustersAxis});
402+ registry.add (" DCA/MFT/DCA_y" , " DCA(y) vs. vz, tx, ty, nclus" ,
403+ HistType::kTHnSparseF , {dcayMFTAxis, dcazAxis, txAxis, tyAxis, nMftClustersAxis});
404+
405+ if (fEnableMftDcaExtraPlots ) {
406+ registry.add (" DCA/MFT/layers" , " Layers vs. tx, ty, nclus" ,
407+ HistType::kTHnSparseF , {mftLayerAxis, txAxis, tyAxis, nMftClustersAxis});
408+ registry.add (" DCA/MFT/trackChi2" , " Track #chi^{2} vs. tx, ty, nclus, layer" ,
409+ HistType::kTHnSparseF , {chi2Axis, txAxis, tyAxis, nMftClustersAxis});
410+ registry.add (" DCA/MFT/trackMomentum" , " Track momentum vs. tx, ty, nclus, layer" ,
411+ HistType::kTHnSparseF , {momAxis, txAxis, tyAxis, nMftClustersAxis});
412+
413+ const int nMftLayers = 10 ;
414+ for (int i = 0 ; i < nMftLayers; i++) {
415+ mMftTrackEffNum [i] = registry.add ((std::string (" DCA/MFT/mftTrackEffNum_" ) + std::to_string (i)).c_str (),
416+ (std::string (" Track efficiency num. - layer " ) + std::to_string (i)).c_str (),
417+ HistType::kTH2F , {txFineAxis, tyFineAxis});
418+ mMftTrackEffDen [i] = registry.add ((std::string (" DCA/MFT/mftTrackEffDen_" ) + std::to_string (i)).c_str (),
419+ (std::string (" Track efficiency den. - layer " ) + std::to_string (i)).c_str (),
420+ HistType::kTH2F , {txFineAxis, tyFineAxis});
421+ }
422+ }
423+ }
424+
425+ if (fEnableGlobalFwdDcaAnalysis ) {
426+ registry.add (" DCA/GlobalFwd/DCA_x" , " DCA(x) vs. vz, tx, ty, nclus" ,
427+ HistType::kTHnSparseF , {dcaxMFTAxis, dcazAxis, txAxis, tyAxis, nMftClustersAxis});
428+ registry.add (" DCA/GlobalFwd/DCA_y" , " DCA(y) vs. vz, tx, ty, nclus" ,
429+ HistType::kTHnSparseF , {dcayMFTAxis, dcazAxis, txAxis, tyAxis, nMftClustersAxis});
397430 }
398431
399432 if (fEnableMftMchResidualsAnalysis ) {
@@ -934,6 +967,68 @@ struct muonGlobalAlignment {
934967 fwdtrack.setCovariances (transformedTrack.getCovariances ());
935968 }
936969
970+ template <typename T>
971+ T UpdateTrackMomentum (const T& track, const double p, int sign)
972+ {
973+ double px = p * sin (M_PI / 2 - atan (track.tgl ())) * cos (track.phi ());
974+ double py = p * sin (M_PI / 2 - atan (track.tgl ())) * sin (track.phi ());
975+ double pt = std::sqrt (std::pow (px, 2 ) + std::pow (py, 2 ));
976+
977+ SMatrix5 tpars = {track.x (), track.y (), track.phi (), track.tgl (), sign / pt};
978+ std::vector<double > v1{0 , 0 , 0 , 0 , 0 ,
979+ 0 , 0 , 0 , 0 , 0 ,
980+ 0 , 0 , 0 , 0 , 0 };
981+ SMatrix55 tcovs (v1.begin (), v1.end ());
982+
983+ T newTrack;
984+ newTrack.setParameters (tpars);
985+ newTrack.setZ (track.z ());
986+ newTrack.setCovariances (tcovs);
987+
988+ return newTrack;
989+ }
990+
991+ template <typename T>
992+ T UpdateTrackMomentum (const T& track, const o2::mch::TrackParam& track4mom)
993+ {
994+ double px = track4mom.p () * sin (M_PI / 2 - atan (track.tgl ())) * cos (track.phi ());
995+ double py = track4mom.p () * sin (M_PI / 2 - atan (track.tgl ())) * sin (track.phi ());
996+ double pt = std::sqrt (std::pow (px, 2 ) + std::pow (py, 2 ));
997+ double sign = track4mom.getCharge ();
998+
999+ SMatrix5 tpars = {track.x (), track.y (), track.phi (), track.tgl (), sign / pt};
1000+ std::vector<double > v1{0 , 0 , 0 , 0 , 0 ,
1001+ 0 , 0 , 0 , 0 , 0 ,
1002+ 0 , 0 , 0 , 0 , 0 };
1003+ SMatrix55 tcovs (v1.begin (), v1.end ());
1004+
1005+ T newTrack;
1006+ newTrack.setParameters (tpars);
1007+ newTrack.setZ (track.z ());
1008+ newTrack.setCovariances (tcovs);
1009+
1010+ return track;
1011+ }
1012+
1013+ void UpdateTrackMomentum (o2::mch::TrackParam& track, const o2::mch::TrackParam& track4mom)
1014+ {
1015+ double pRatio = track.p () / track4mom.p ();
1016+ double newInvBendMom = track.getInverseBendingMomentum () * pRatio;
1017+ track.setInverseBendingMomentum (newInvBendMom);
1018+ track.setCharge (track4mom.getCharge ());
1019+ }
1020+
1021+ void UpdateTrackMomentum (o2::track::TrackParCovFwd& track, const o2::mch::TrackParam& track4mom)
1022+ {
1023+ auto newTrackMCH = FwdtoMCH (track);
1024+ UpdateTrackMomentum (newTrackMCH, track4mom);
1025+ auto newTrack = MCHtoFwd (newTrackMCH);
1026+
1027+ track.setParameters (newTrack.getParameters ());
1028+ track.setZ (newTrack.getZ ());
1029+ track.setCovariances (newTrack.getCovariances ());
1030+ }
1031+
9371032 o2::dataformats::GlobalFwdTrack PropagateMCHParam (mch::TrackParam mchTrack, const double z)
9381033 {
9391034 float absFront = -90 .f ;
@@ -1041,7 +1136,7 @@ struct muonGlobalAlignment {
10411136 }
10421137
10431138 template <class TMFT , class C >
1044- o2::dataformats::GlobalFwdTrack PropagateMFTToDCA (const TMFT& mftTrack, const C& collision, float zshift = 0 )
1139+ o2::dataformats::GlobalFwdTrack PropagateMFTToDCA (const TMFT& mftTrack, const C& collision, float zshift)
10451140 {
10461141 static double Bz = -10001 ;
10471142 double chi2 = mftTrack.chi2 ();
@@ -1084,55 +1179,53 @@ struct muonGlobalAlignment {
10841179 return propmuon;
10851180 }
10861181
1087- template <typename T >
1088- T UpdateTrackMomentum (const T& track , const double p, int sign )
1182+ template <class TMFT , class TMUON , class C >
1183+ o2::dataformats::GlobalFwdTrack PropagateMFTToDCA (const TMFT& mftTrack , const TMUON& mchTrack, const C& collision, float zshift )
10891184 {
1090- double px = p * sin (M_PI / 2 - atan (track.tgl ())) * cos (track.phi ());
1091- double py = p * sin (M_PI / 2 - atan (track.tgl ())) * sin (track.phi ());
1092- double pt = std::sqrt (std::pow (px, 2 ) + std::pow (py, 2 ));
1093-
1094- SMatrix5 tpars = {track.x (), track.y (), track.phi (), track.tgl (), sign / pt};
1185+ static double Bz = -10001 ;
1186+ double chi2 = mftTrack.chi2 ();
1187+ double phiCorrDeg = 0 ;
1188+ double phiCorr = phiCorrDeg * TMath::Pi () / 180 .f ;
1189+ double tR = std::hypot (mftTrack.x (), mftTrack.y ());
1190+ double tphi = std::atan2 (mftTrack.y (), mftTrack.x ());
1191+ double tx = std::cos (tphi + phiCorr) * tR;
1192+ double ty = std::sin (tphi + phiCorr) * tR;
1193+ SMatrix5 tpars = {tx, ty, mftTrack.phi () + phiCorr, mftTrack.tgl (), mftTrack.signed1Pt ()};
10951194 std::vector<double > v1{0 , 0 , 0 , 0 , 0 ,
10961195 0 , 0 , 0 , 0 , 0 ,
10971196 0 , 0 , 0 , 0 , 0 };
10981197 SMatrix55 tcovs (v1.begin (), v1.end ());
1198+ o2::track::TrackParCovFwd fwdtrack{mftTrack.z (), tpars, tcovs, chi2};
1199+ if (configMFTAlignmentCorrections.fEnableMFTAlignmentCorrections ) {
1200+ TransformMFT (fwdtrack);
1201+ }
10991202
1100- T newTrack;
1101- newTrack.setParameters (tpars);
1102- newTrack.setZ (track.z ());
1103- newTrack.setCovariances (tcovs);
1104-
1105- return newTrack;
1106- }
1107-
1108- template <typename T>
1109- T UpdateTrackMomentum (const T& track, const o2::mch::TrackParam& track4mom)
1110- {
1111- double px = track4mom.p () * sin (M_PI / 2 - atan (track.tgl ())) * cos (track.phi ());
1112- double py = track4mom.p () * sin (M_PI / 2 - atan (track.tgl ())) * sin (track.phi ());
1113- double pt = std::sqrt (std::pow (px, 2 ) + std::pow (py, 2 ));
1114- double sign = track4mom.getCharge ();
1203+ // extrapolation with MCH tools
1204+ auto mchTrackAtMFT = FwdtoMCH (FwdToTrackPar (mchTrack));
1205+ o2::mch::TrackExtrap::extrapToVertexWithoutBranson (mchTrackAtMFT, mftTrack.z ());
1206+ UpdateTrackMomentum (fwdtrack, mchTrackAtMFT);
11151207
1116- SMatrix5 tpars = {track.x (), track.y (), track.phi (), track.tgl (), sign / pt};
1117- std::vector<double > v1{0 , 0 , 0 , 0 , 0 ,
1118- 0 , 0 , 0 , 0 , 0 ,
1119- 0 , 0 , 0 , 0 , 0 };
1120- SMatrix55 tcovs (v1.begin (), v1.end ());
1208+ // double propVec[3] = {};
1209+ // propVec[0] = collision.posX() - mftTrack.x();
1210+ // propVec[1] = collision.posY() - mftTrack.y();
1211+ // propVec[2] = collision.posZ() - mftTrack.z();
11211212
1122- T newTrack;
1123- newTrack.setParameters (tpars);
1124- newTrack.setZ (track.z ());
1125- newTrack.setCovariances (tcovs);
1213+ // double centerZ[3] = {mftTrack.x() + propVec[0] / 2.,
1214+ // mftTrack.y() + propVec[1] / 2.,
1215+ // mftTrack.z() + propVec[2] / 2.};
1216+ if (Bz < -10000 ) {
1217+ double centerZ[3 ] = {0 , 0 , -45 .f / 2 .f };
1218+ o2::field::MagneticField* field = static_cast <o2::field::MagneticField*>(TGeoGlobalMagField::Instance ()->GetField ());
1219+ Bz = field->getBz (centerZ);
1220+ }
1221+ fwdtrack.propagateToZ (collision.posZ () - zshift, Bz);
11261222
1127- return track;
1128- }
1223+ o2::dataformats::GlobalFwdTrack propmuon;
1224+ propmuon.setParameters (fwdtrack.getParameters ());
1225+ propmuon.setZ (fwdtrack.getZ ());
1226+ propmuon.setCovariances (fwdtrack.getCovariances ());
11291227
1130- void UpdateTrackMomentum (o2::mch::TrackParam& track, const o2::mch::TrackParam& track4mom)
1131- {
1132- double pRatio = track.p () / track4mom.p ();
1133- double newInvBendMom = track.getInverseBendingMomentum () * pRatio;
1134- track.setInverseBendingMomentum (newInvBendMom);
1135- track.setCharge (track4mom.getCharge ());
1228+ return propmuon;
11361229 }
11371230
11381231 template <typename TMCH, typename TMFT>
@@ -1170,7 +1263,7 @@ struct muonGlobalAlignment {
11701263
11711264 void FillDCAPlots (MyEvents const & collisions,
11721265 MyBCs const & bcs,
1173- MyMuonsWithCov const & /* muonTracks*/ ,
1266+ MyMuonsWithCov const & muonTracks,
11741267 MyMFTs const & mftTracks,
11751268 const std::map<uint64_t , CollisionInfo>& collisionInfos)
11761269 {
@@ -1203,6 +1296,10 @@ struct muonGlobalAlignment {
12031296 for (auto mftIndex : mftTrackIds) {
12041297 auto const & mftTrack = mftTracks.rawIteratorAt (mftIndex);
12051298
1299+ if (mftTrack.isCA ()) {
1300+ continue ;
1301+ }
1302+
12061303 bool isGoodMFT = IsGoodMFT (mftTrack, 999 .f , 5 );
12071304 if (!isGoodMFT)
12081305 continue ;
@@ -1212,26 +1309,55 @@ struct muonGlobalAlignment {
12121309 double dcay = mftTrackAtDCA.getY () - collision.posY ();
12131310 double phi = mftTrack.phi () * 180 / TMath::Pi ();
12141311 int mftNclusters = mftTrack.nClusters ();
1215- int mftTrackType = mftTrack. isCA () ? 1 : 0 ;
1312+ double chi2NDF = static_cast < double >(mftNclusters) * 2 - 5 ;
12161313
12171314 const int nMftLayers = 10 ;
1218- int layerPattern = 0 ;
1315+ std::array< bool , 10 > firedLayers ;
12191316 for (int layer = 0 ; layer < nMftLayers; layer++) {
12201317 if ((mftTrack.mftClusterSizesAndTrackFlags () >> (layer * 6 )) & 0x3F ) {
1221- layerPattern += (1 << layer);
1318+ firedLayers[layer] = true ;
1319+ } else {
1320+ firedLayers[layer] = false ;
12221321 }
12231322 }
12241323
12251324 if (fEnableMftDcaAnalysis ) {
1226- registry.get <TH2>(HIST (" DCA/MFT/DCA_y_vs_x" ))->Fill (dcax, dcay);
1227- registry.get <THnSparse>(HIST (" DCA/MFT/DCA_x" ))->Fill (dcax, collision.posZ (), mftTrack.x (), mftTrack.y (), mftNclusters, mftTrackType);
1228- registry.get <THnSparse>(HIST (" DCA/MFT/DCA_y" ))->Fill (dcay, collision.posZ (), mftTrack.x (), mftTrack.y (), mftNclusters, mftTrackType);
1325+ const int nMftLayers = 10 ;
1326+ if (fEnableMftDcaExtraPlots ) {
1327+ for (int i = 0 ; i < nMftLayers; i++) {
1328+ if (firedLayers[i]) {
1329+ registry.get <THnSparse>(HIST (" DCA/MFT/trackChi2" ))->Fill (mftTrack.chi2 () / chi2NDF, mftTrack.x (), mftTrack.y (), mftNclusters, i);
1330+ }
1331+ }
1332+ }
12291333
1230- registry.get <THnSparse>(HIST (" DCA/MFT/layers" ))->Fill (layerPattern, mftTrack.x (), mftTrack.y (), mftNclusters, mftTrackType);
1334+ if (mftTrack.chi2 () <= fTrackChi2MftUp ) {
1335+ registry.get <TH2>(HIST (" DCA/MFT/DCA_y_vs_x" ))->Fill (dcax, dcay);
1336+ registry.get <THnSparse>(HIST (" DCA/MFT/DCA_x" ))->Fill (dcax, collision.posZ (), mftTrack.x (), mftTrack.y (), mftNclusters);
1337+ registry.get <THnSparse>(HIST (" DCA/MFT/DCA_y" ))->Fill (dcay, collision.posZ (), mftTrack.x (), mftTrack.y (), mftNclusters);
1338+
1339+ if (fEnableMftDcaExtraPlots ) {
1340+ if (mftNclusters >= 6 ) {
1341+ for (int i = 0 ; i < nMftLayers; i++) {
1342+ auto mftTrackAtLayer = PropagateMFT (mftTrack, o2::mft::constants::mft::LayerZCoordinate ()[i]);
1343+ std::get<std::shared_ptr<TH2>>(mMftTrackEffDen [i])->Fill (mftTrackAtLayer.getX (), mftTrackAtLayer.getY ());
1344+ if (firedLayers[i]) {
1345+ std::get<std::shared_ptr<TH2>>(mMftTrackEffNum [i])->Fill (mftTrackAtLayer.getX (), mftTrackAtLayer.getY ());
1346+ registry.get <THnSparse>(HIST (" DCA/MFT/layers" ))->Fill (i, mftTrack.x (), mftTrack.y (), mftNclusters);
1347+ }
1348+ }
1349+ }
1350+ for (int i = 0 ; i < nMftLayers; i++) {
1351+ if (firedLayers[i]) {
1352+ registry.get <THnSparse>(HIST (" DCA/MFT/trackMomentum" ))->Fill (mftTrack.p (), mftTrack.x (), mftTrack.y (), mftNclusters, i);
1353+ }
1354+ }
1355+ }
1356+ }
12311357 }
12321358
12331359 if (fEnableVertexShiftAnalysis ) {
1234- if (std::fabs (collision.posZ ()) < 1 .f ) {
1360+ if (mftTrack. chi2 () <= fTrackChi2MftUp && std::fabs (collision.posZ ()) < 1 .f ) {
12351361 float zshift[21 ] = {// in millimeters
12361362 -5.0 , -4.5 , -4.0 , -3.5 , -3.0 , -2.5 , -2.0 , -1.5 , -1.0 , -0.5 , 0.0 ,
12371363 0.5 , 1.0 , 1.5 , 2.0 , 2.5 , 3.0 , 3.5 , 4.0 , 4.5 , 5.0 };
@@ -1246,6 +1372,51 @@ struct muonGlobalAlignment {
12461372 }
12471373 }
12481374 }
1375+
1376+ if (fEnableGlobalFwdDcaAnalysis ) {
1377+ // loop over global muon tracks
1378+ for (auto & [muonIndex, globalTracksVector] : collisionInfo.globalMuonTracks ) {
1379+ auto const & muonTrack = muonTracks.rawIteratorAt (globalTracksVector[0 ]);
1380+ const auto & mchTrack = muonTrack.template matchMCHTrack_as <MyMuonsWithCov>();
1381+ const auto & mftTrack = muonTrack.template matchMFTTrack_as <MyMFTs>();
1382+
1383+ if (muonTrack.chi2MatchMCHMFT () < 50 ) {
1384+ continue ;
1385+ }
1386+
1387+ if (globalTracksVector.size () > 1 ) {
1388+ auto const & muonTrack2 = muonTracks.rawIteratorAt (globalTracksVector[1 ]);
1389+ double dchi2 = muonTrack2.chi2MatchMCHMFT () - muonTrack.chi2MatchMCHMFT ();
1390+
1391+ if (dchi2 < 50 ) {
1392+ continue ;
1393+ }
1394+ }
1395+
1396+ if (mftTrack.isCA ()) {
1397+ continue ;
1398+ }
1399+
1400+ bool isGoodMFT = IsGoodMFT (mftTrack, 999 .f , 5 );
1401+ if (!isGoodMFT) {
1402+ continue ;
1403+ }
1404+
1405+ bool isGoodMuon = IsGoodMuon (mchTrack, collision, fTrackChi2MchUp , 0 .f , fPtMchLow , {fEtaMftLow , fEtaMftUp }, {fRabsLow , fRabsUp }, fSigmaPdcaUp );
1406+ if (!isGoodMuon)
1407+ continue ;
1408+
1409+ auto mftTrackAtDCA = PropagateMFTToDCA (mftTrack, mchTrack, collision, fVertexZshift );
1410+ double dcax = mftTrackAtDCA.getX () - collision.posX ();
1411+ double dcay = mftTrackAtDCA.getY () - collision.posY ();
1412+ int mftNclusters = mftTrack.nClusters ();
1413+
1414+ if (mftTrack.chi2 () <= fTrackChi2MftUp ) {
1415+ registry.get <THnSparse>(HIST (" DCA/GlobalFwd/DCA_x" ))->Fill (dcax, collision.posZ (), mftTrack.x (), mftTrack.y (), mftNclusters);
1416+ registry.get <THnSparse>(HIST (" DCA/GlobalFwd/DCA_y" ))->Fill (dcay, collision.posZ (), mftTrack.x (), mftTrack.y (), mftNclusters);
1417+ }
1418+ }
1419+ }
12491420 }
12501421 }
12511422
0 commit comments