@@ -74,6 +74,7 @@ struct matchingMFT {
7474 Configurable<int > minNclustersMFT{" minNclustersMFT" , 5 , " min nclusters MFT" };
7575 Configurable<bool > refitGlobalMuon{" refitGlobalMuon" , true , " flag to refit global muon" };
7676 Configurable<bool > requireTrueAssociation{" requireTrueAssociation" , false , " flag to require true mc collision association" };
77+ Configurable<float > maxRelDPt{" maxRelDPt" , 1e+10f , " max. relative dpt between MFT-MCH-MID and MCH-MID" };
7778 Configurable<float > maxDEta{" maxDEta" , 1e+10f , " max. deta between MFT-MCH-MID and MCH-MID" };
7879 Configurable<float > maxDPhi{" maxDPhi" , 1e+10f , " max. dphi between MFT-MCH-MID and MCH-MID" };
7980 Configurable<bool > requireMFTHitMap{" requireMFTHitMap" , false , " flag to require MFT hit map" };
@@ -154,7 +155,7 @@ struct matchingMFT {
154155 fRegistry .add (" MFTMCHMID/primary/correct/hPt" , " pT;p_{T} (GeV/c)" , kTH1F , {{100 , 0 .0f , 10 }}, false );
155156 fRegistry .add (" MFTMCHMID/primary/correct/hEtaPhi" , " #eta vs. #varphi;#varphi (rad.);#eta" , kTH2F , {{180 , 0 , 2 * M_PI}, {80 , -5 .f , -1 .f }}, false );
156157 fRegistry .add (" MFTMCHMID/primary/correct/hEtaPhi_MatchedMCHMID" , " #eta vs. #varphi;#varphi (rad.);#eta" , kTH2F , {{180 , 0 , 2 * M_PI}, {80 , -5 .f , -1 .f }}, false );
157- fRegistry .add (" MFTMCHMID/primary/correct/hsDelta" , " diff. between GL and associated SA;p_{T}^{gl} (GeV/c);#Delta#eta;#Delta#varphi (rad.);" , kTHnSparseF , {axis_pt, {100 , -0.5 , +0.5 }, {90 , -M_PI / 4 , M_PI / 4 }}, false );
158+ fRegistry .add (" MFTMCHMID/primary/correct/hsDelta" , " diff. between GL and associated SA;p_{T}^{gl} (GeV/c);(p_{T}^{sa} - p_{T}^{gl})/p_{T}^{gl}; #Delta#eta;#Delta#varphi (rad.);" , kTHnSparseF , {axis_pt, { 100 , - 0.5 , + 0.5 } , {100 , -0.5 , +0.5 }, {90 , -M_PI / 4 , M_PI / 4 }}, false );
158159 fRegistry .add (" MFTMCHMID/primary/correct/hDiffCollId" , " difference in collision index;collisionId_{TTCA} - collisionId_{MP}" , kTH1F , {{41 , -20.5 , +20.5 }}, false );
159160 fRegistry .add (" MFTMCHMID/primary/correct/hSign" , " sign;sign" , kTH1F , {{3 , -1.5 , +1.5 }}, false );
160161 fRegistry .add (" MFTMCHMID/primary/correct/hNclusters" , " Nclusters;Nclusters" , kTH1F , {{21 , -0 .5f , 20.5 }}, false );
@@ -320,13 +321,15 @@ struct matchingMFT {
320321 float sigma_dcaXY = dcaXY / dcaXYinSigma;
321322
322323 o2::dataformats::GlobalFwdTrack propmuonAtPV_Matched = propagateMuon (mchtrack, collision, propagationPoint::kToVertex );
324+ float ptMatchedMCHMID = propmuonAtPV_Matched.getPt ();
323325 float etaMatchedMCHMID = propmuonAtPV_Matched.getEta ();
324326 float phiMatchedMCHMID = propmuonAtPV_Matched.getPhi ();
325327 o2::math_utils::bringTo02Pi (phiMatchedMCHMID);
328+ float dpt = (ptMatchedMCHMID - pt) / pt;
326329 float deta = etaMatchedMCHMID - eta;
327330 float dphi = phiMatchedMCHMID - phi;
328331 o2::math_utils::bringToPMPi (dphi);
329- if (std::sqrt (std::pow (deta / maxDEta, 2 ) + std::pow (dphi / maxDPhi, 2 )) > 1 .f ) {
332+ if (std::sqrt (std::pow (deta / maxDEta, 2 ) + std::pow (dphi / maxDPhi, 2 )) > 1 .f || std::fabs (dpt) > maxRelDPt ) {
330333 return ;
331334 }
332335
@@ -368,7 +371,7 @@ struct matchingMFT {
368371 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hPt" ), pt);
369372 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hEtaPhi" ), phi, eta);
370373 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hEtaPhi_MatchedMCHMID" ), phiMatchedMCHMID, etaMatchedMCHMID);
371- fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hsDelta" ), pt, deta, dphi);
374+ fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hsDelta" ), pt, dpt, deta, dphi);
372375 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hDiffCollId" ), collision.globalIndex () - fwdtrack.collisionId ());
373376 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hSign" ), fwdtrack.sign ());
374377 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hNclusters" ), fwdtrack.nClusters ());
@@ -402,7 +405,7 @@ struct matchingMFT {
402405 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hPt" ), pt);
403406 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hEtaPhi" ), phi, eta);
404407 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hEtaPhi_MatchedMCHMID" ), phiMatchedMCHMID, etaMatchedMCHMID);
405- fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hsDelta" ), pt, deta, dphi);
408+ fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hsDelta" ), pt, dpt, deta, dphi);
406409 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hDiffCollId" ), collision.globalIndex () - fwdtrack.collisionId ());
407410 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hSign" ), fwdtrack.sign ());
408411 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hNclusters" ), fwdtrack.nClusters ());
@@ -437,7 +440,7 @@ struct matchingMFT {
437440 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hPt" ), pt);
438441 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hEtaPhi" ), phi, eta);
439442 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hEtaPhi_MatchedMCHMID" ), phiMatchedMCHMID, etaMatchedMCHMID);
440- fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hsDelta" ), pt, deta, dphi);
443+ fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hsDelta" ), pt, dpt, deta, dphi);
441444 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hDiffCollId" ), collision.globalIndex () - fwdtrack.collisionId ());
442445 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hSign" ), fwdtrack.sign ());
443446 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hNclusters" ), fwdtrack.nClusters ());
@@ -470,7 +473,7 @@ struct matchingMFT {
470473 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hPt" ), pt);
471474 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hEtaPhi" ), phi, eta);
472475 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hEtaPhi_MatchedMCHMID" ), phiMatchedMCHMID, etaMatchedMCHMID);
473- fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hsDelta" ), pt, deta, dphi);
476+ fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hsDelta" ), pt, dpt, deta, dphi);
474477 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hDiffCollId" ), collision.globalIndex () - fwdtrack.collisionId ());
475478 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hSign" ), fwdtrack.sign ());
476479 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hNclusters" ), fwdtrack.nClusters ());
0 commit comments