@@ -63,13 +63,15 @@ struct matchingMFT {
6363 Configurable<float > minRabs{" minRabs" , 17.6 , " min. R at absorber end" };
6464 Configurable<float > midRabs{" midRabs" , 26.5 , " middle R at absorber end for pDCA cut" };
6565 Configurable<float > maxRabs{" maxRabs" , 89.5 , " max. R at absorber end" };
66+ Configurable<float > maxDCAxy{" maxDCAxy" , 1e+10 , " max. DCAxy for global muons" };
6667 Configurable<float > maxPDCAforLargeR{" maxPDCAforLargeR" , 324 .f , " max. pDCA for large R at absorber end" };
6768 Configurable<float > maxPDCAforSmallR{" maxPDCAforSmallR" , 594 .f , " max. pDCA for small R at absorber end" };
6869 Configurable<float > maxMatchingChi2MCHMFT{" maxMatchingChi2MCHMFT" , 1e+10 , " max. chi2 for MCH-MFT matching" };
69- Configurable<float > maxChi2{" maxChi2" , 1e+6 , " max. chi2 for muon tracking" };
70+ Configurable<float > maxChi2SA{" maxChi2SA" , 1e+6 , " max. chi2 for standalone muon" };
71+ Configurable<float > maxChi2GL{" maxChi2GL" , 1e+6 , " max. chi2 for global muon" };
7072 Configurable<bool > refitGlobalMuon{" refitGlobalMuon" , true , " flag to refit global muon" };
7173 Configurable<bool > applyEtaCutToSAinGL{" applyEtaCutToSAinGL" , false , " flag to apply eta cut to samuon in global muon" };
72- Configurable<bool > cfgRequireTrueAssociation{ " cfgRequireTrueAssociation " , false , " flag to require true mc collision association" };
74+ Configurable<bool > requireTrueAssociation{ " requireTrueAssociation " , false , " flag to require true mc collision association" };
7375
7476 Configurable<int > cfgCentEstimator{" cfgCentEstimator" , 2 , " FT0M:0, FT0A:1, FT0C:2" };
7577 Configurable<float > cfgCentMin{" cfgCentMin" , -1 .f , " min. centrality" };
@@ -79,7 +81,6 @@ struct matchingMFT {
7981
8082 HistogramRegistry fRegistry {" fRegistry" };
8183 static constexpr std::string_view muon_types[5 ] = {" MFTMCHMID/" , " MFTMCHMIDOtherMatch/" , " MFTMCH/" , " MCHMID/" , " MCH/" };
82- static constexpr std::string_view muon_matching_types[3 ] = {" correct/" , " fake/" , " miss/" };
8384
8485 void init (o2::framework::InitContext&)
8586 {
@@ -145,6 +146,7 @@ struct matchingMFT {
145146 fRegistry .add (" MFTMCHMID/primary/correct/hPt" , " pT;p_{T} (GeV/c)" , kTH1F , {{100 , 0 .0f , 10 }}, false );
146147 fRegistry .add (" MFTMCHMID/primary/correct/hEtaPhi" , " #eta vs. #varphi;#varphi (rad.);#eta" , kTH2F , {{180 , 0 , 2 * M_PI}, {100 , -6 .f , -1 .f }}, false );
147148 fRegistry .add (" MFTMCHMID/primary/correct/hEtaPhi_MatchedMCHMID" , " #eta vs. #varphi;#varphi (rad.);#eta" , kTH2F , {{180 , 0 , 2 * M_PI}, {100 , -6 .f , -1 .f }}, false );
149+ fRegistry .add (" MFTMCHMID/primary/correct/hDeltaEtaDeltaPhi" , " #Delta#eta vs. #Delta#varphi;#Delta#varphi = #varphi_{sa} - #varphi_{gl} (rad.);#Delta#eta = #eta_{sa} - #eta_{gl}" , kTH2F , {{180 , -M_PI, M_PI}, {400 , -2 .f , 2 .f }}, false );
148150 fRegistry .add (" MFTMCHMID/primary/correct/hDiffCollId" , " difference in collision index;collisionId_{TTCA} - collisionId_{MP}" , kTH1F , {{41 , -20.5 , +20.5 }}, false );
149151 fRegistry .add (" MFTMCHMID/primary/correct/hSign" , " sign;sign" , kTH1F , {{3 , -1.5 , +1.5 }}, false );
150152 fRegistry .add (" MFTMCHMID/primary/correct/hNclusters" , " Nclusters;Nclusters" , kTH1F , {{21 , -0 .5f , 20.5 }}, false );
@@ -170,17 +172,15 @@ struct matchingMFT {
170172 fRegistry .addClone (" MFTMCHMID/primary/" , " MFTMCHMID/secondary/" );
171173 }
172174
173- bool isSelected (const float pt, const float eta, const float rAtAbsorberEnd, const float pDCA, const float chi2, const uint8_t trackType, const float etaMatchedMCHMID)
175+ bool isSelected (const float pt, const float eta, const float rAtAbsorberEnd, const float pDCA, const float chi2, const uint8_t trackType, const float etaMatchedMCHMID, const float dcaXY )
174176 {
175177 if (pt < minPt || maxPt < pt) {
176178 return false ;
177179 }
178-
179180 if (rAtAbsorberEnd < minRabs || maxRabs < rAtAbsorberEnd) {
180181 return false ;
181182 }
182-
183- if (chi2 < 0 .f || maxChi2 < chi2) {
183+ if (rAtAbsorberEnd < midRabs ? pDCA > maxPDCAforSmallR : pDCA > maxPDCAforLargeR) {
184184 return false ;
185185 }
186186
@@ -191,17 +191,23 @@ struct matchingMFT {
191191 if (applyEtaCutToSAinGL && (etaMatchedMCHMID < minEtaGL || maxEtaGL < etaMatchedMCHMID)) {
192192 return false ;
193193 }
194+ if (maxDCAxy < dcaXY) {
195+ return false ;
196+ }
197+ if (chi2 < 0 .f || maxChi2GL < chi2) {
198+ return false ;
199+ }
194200 } else if (trackType == static_cast <uint8_t >(o2::aod::fwdtrack::ForwardTrackTypeEnum::MuonStandaloneTrack)) {
195201 if (eta < minEtaSA || maxEtaSA < eta) {
196202 return false ;
197203 }
204+ if (chi2 < 0 .f || maxChi2SA < chi2) {
205+ return false ;
206+ }
198207 } else {
199208 return false ;
200209 }
201210
202- if (rAtAbsorberEnd < midRabs ? pDCA > maxPDCAforSmallR : pDCA > maxPDCAforLargeR) {
203- return false ;
204- }
205211 return true ;
206212 }
207213
@@ -225,7 +231,7 @@ struct matchingMFT {
225231 return ;
226232 }
227233
228- if (cfgRequireTrueAssociation && (mcParticle_MCHMID.mcCollisionId () != collision.mcCollisionId ())) {
234+ if (requireTrueAssociation && (mcParticle_MCHMID.mcCollisionId () != collision.mcCollisionId ())) {
229235 return ;
230236 }
231237
@@ -274,16 +280,21 @@ struct matchingMFT {
274280 pt = propmuonAtPV_Matched.getP () * std::sin (2 .f * std::atan (std::exp (-eta)));
275281 }
276282
277- if (!isSelected (pt, eta, rAtAbsorberEnd, pDCA, fwdtrack.chi2 (), fwdtrack.trackType (), etaMatchedMCHMID)) {
283+ if (!isSelected (pt, eta, rAtAbsorberEnd, pDCA, fwdtrack.chi2 (), fwdtrack.trackType (), etaMatchedMCHMID, dcaXY )) {
278284 return ;
279285 }
280286
287+ float deta = etaMatchedMCHMID - eta;
288+ float dphi = phiMatchedMCHMID - phi;
289+ o2::math_utils::bringToPMPi (dphi);
290+
281291 fRegistry .fill (HIST (" hMuonType" ), fwdtrack.trackType ());
282292 if (isPrimary) {
283293 if (isMatched) {
284294 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hPt" ), pt);
285295 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hEtaPhi" ), phi, eta);
286296 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hEtaPhi_MatchedMCHMID" ), phiMatchedMCHMID, etaMatchedMCHMID);
297+ fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hDeltaEtaDeltaPhi" ), dphi, deta);
287298 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hDiffCollId" ), collision.globalIndex () - fwdtrack.collisionId ());
288299 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hSign" ), fwdtrack.sign ());
289300 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hNclusters" ), fwdtrack.nClusters ());
@@ -312,6 +323,7 @@ struct matchingMFT {
312323 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hPt" ), pt);
313324 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hEtaPhi" ), phi, eta);
314325 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hEtaPhi_MatchedMCHMID" ), phiMatchedMCHMID, etaMatchedMCHMID);
326+ fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hDeltaEtaDeltaPhi" ), dphi, deta);
315327 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hDiffCollId" ), collision.globalIndex () - fwdtrack.collisionId ());
316328 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hSign" ), fwdtrack.sign ());
317329 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hNclusters" ), fwdtrack.nClusters ());
@@ -342,6 +354,7 @@ struct matchingMFT {
342354 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hPt" ), pt);
343355 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hEtaPhi" ), phi, eta);
344356 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hEtaPhi_MatchedMCHMID" ), phiMatchedMCHMID, etaMatchedMCHMID);
357+ fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hDeltaEtaDeltaPhi" ), dphi, deta);
345358 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hDiffCollId" ), collision.globalIndex () - fwdtrack.collisionId ());
346359 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hSign" ), fwdtrack.sign ());
347360 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hNclusters" ), fwdtrack.nClusters ());
@@ -370,6 +383,7 @@ struct matchingMFT {
370383 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hPt" ), pt);
371384 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hEtaPhi" ), phi, eta);
372385 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hEtaPhi_MatchedMCHMID" ), phiMatchedMCHMID, etaMatchedMCHMID);
386+ fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hDeltaEtaDeltaPhi" ), dphi, deta);
373387 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hDiffCollId" ), collision.globalIndex () - fwdtrack.collisionId ());
374388 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hSign" ), fwdtrack.sign ());
375389 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hNclusters" ), fwdtrack.nClusters ());
0 commit comments