@@ -69,6 +69,7 @@ struct matchingMFT {
6969 Configurable<float > maxMatchingChi2MCHMFT{" maxMatchingChi2MCHMFT" , 1e+10 , " max. chi2 for MCH-MFT matching" };
7070 Configurable<float > maxChi2SA{" maxChi2SA" , 1e+6 , " max. chi2 for standalone muon" };
7171 Configurable<float > maxChi2GL{" maxChi2GL" , 1e+6 , " max. chi2 for global muon" };
72+ // Configurable<float> maxChi2MFT{"maxChi2MFT", 1e+6, "max. chi2/ndf for MFT track in global muon"};
7273 Configurable<int > minNclustersMFT{" minNclustersMFT" , 5 , " min nclusters MFT" };
7374 Configurable<bool > refitGlobalMuon{" refitGlobalMuon" , true , " flag to refit global muon" };
7475 Configurable<bool > requireTrueAssociation{" requireTrueAssociation" , false , " flag to require true mc collision association" };
@@ -157,6 +158,7 @@ struct matchingMFT {
157158 fRegistry .add (" MFTMCHMID/primary/correct/hChi2MatchMCHMID" , " chi2 match MCH-MID;chi2" , kTH1F , {{100 , 0 .0f , 100 }}, false );
158159 fRegistry .add (" MFTMCHMID/primary/correct/hChi2MatchMCHMFT" , " chi2 match MCH-MFT;chi2" , kTH1F , {{100 , 0 .0f , 100 }}, false );
159160 fRegistry .add (" MFTMCHMID/primary/correct/hDCAxy2D" , " DCA x vs. y;DCA_{x} (cm);DCA_{y} (cm)" , kTH2F , {{200 , -0.5 , 0.5 }, {200 , -0.5 , +0.5 }}, false );
161+ fRegistry .add (" MFTMCHMID/primary/correct/hDCAz" , " DCA z;DCA_{z} (cm);" , kTH1F , {{1000 , 0 , 10 }}, false );
160162 fRegistry .add (" MFTMCHMID/primary/correct/hDCAxy2DinSigma" , " DCA x vs. y in sigma;DCA_{x} (#sigma);DCA_{y} (#sigma)" , kTH2F , {{200 , -10 , 10 }, {200 , -10 , +10 }}, false );
161163 fRegistry .add (" MFTMCHMID/primary/correct/hDCAxy" , " DCAxy;DCA_{xy} (cm);" , kTH1F , {{100 , 0 , 1 }}, false );
162164 fRegistry .add (" MFTMCHMID/primary/correct/hDCAxyinSigma" , " DCAxy in sigma;DCA_{xy} (#sigma);" , kTH1F , {{100 , 0 , 10 }}, false );
@@ -269,6 +271,7 @@ struct matchingMFT {
269271 float dcaY = propmuonAtDCA.getY () - collision.posY ();
270272 float rAtAbsorberEnd = fwdtrack.rAtAbsorberEnd (); // this works only for GlobalMuonTrack
271273 float dcaXY = std::sqrt (dcaX * dcaX + dcaY * dcaY);
274+ float dcaZ = -dcaXY * std::sinh (eta);
272275
273276 float dFdx = 2 .f * dcaX / dcaXY;
274277 float dFdy = 2 .f * dcaY / dcaXY;
@@ -285,7 +288,11 @@ struct matchingMFT {
285288 float dcaXY_Matched = std::sqrt (dcaX_Matched * dcaX_Matched + dcaY_Matched * dcaY_Matched);
286289 float pDCA = mchtrack.p () * dcaXY_Matched;
287290 int nClustersMFT = mfttrack.nClusters ();
291+ // float chi2mft = mfttrack.chi2()/(2.f * nClustersMFT - 5.f);
288292 float chi2mft = mfttrack.chi2 ();
293+ // if (chi2mft < 0.f || maxChi2MFT < chi2mft) {
294+ // return;
295+ // }
289296
290297 if (refitGlobalMuon) {
291298 eta = mfttrack.eta ();
@@ -315,6 +322,7 @@ struct matchingMFT {
315322 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hChi2MatchMCHMID" ), fwdtrack.chi2MatchMCHMID ());
316323 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hChi2MatchMCHMFT" ), fwdtrack.chi2MatchMCHMFT ());
317324 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hDCAxy2D" ), dcaX, dcaY);
325+ fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hDCAz" ), dcaZ);
318326 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hDCAxy2DinSigma" ), dcaX / std::sqrt (cXXatDCA), dcaY / std::sqrt (cYYatDCA));
319327 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hDCAxy" ), dcaXY);
320328 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hDCAxyinSigma" ), dcaXY / sigma_dcaXY);
@@ -345,6 +353,7 @@ struct matchingMFT {
345353 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hChi2MatchMCHMID" ), fwdtrack.chi2MatchMCHMID ());
346354 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hChi2MatchMCHMFT" ), fwdtrack.chi2MatchMCHMFT ());
347355 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hDCAxy2D" ), dcaX, dcaY);
356+ fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hDCAz" ), dcaZ);
348357 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hDCAxy2DinSigma" ), dcaX / std::sqrt (cXXatDCA), dcaY / std::sqrt (cYYatDCA));
349358 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hDCAxy" ), dcaXY);
350359 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hDCAxyinSigma" ), dcaXY / sigma_dcaXY);
@@ -376,6 +385,7 @@ struct matchingMFT {
376385 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hChi2MatchMCHMID" ), fwdtrack.chi2MatchMCHMID ());
377386 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hChi2MatchMCHMFT" ), fwdtrack.chi2MatchMCHMFT ());
378387 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hDCAxy2D" ), dcaX, dcaY);
388+ fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hDCAz" ), dcaZ);
379389 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hDCAxy2DinSigma" ), dcaX / std::sqrt (cXXatDCA), dcaY / std::sqrt (cYYatDCA));
380390 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hDCAxy" ), dcaXY);
381391 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hDCAxyinSigma" ), dcaXY / sigma_dcaXY);
@@ -405,6 +415,7 @@ struct matchingMFT {
405415 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hChi2MatchMCHMID" ), fwdtrack.chi2MatchMCHMID ());
406416 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hChi2MatchMCHMFT" ), fwdtrack.chi2MatchMCHMFT ());
407417 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hDCAxy2D" ), dcaX, dcaY);
418+ fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hDCAz" ), dcaZ);
408419 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hDCAxy2DinSigma" ), dcaX / std::sqrt (cXXatDCA), dcaY / std::sqrt (cYYatDCA));
409420 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hDCAxy" ), dcaXY);
410421 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hDCAxyinSigma" ), dcaXY / sigma_dcaXY);
0 commit comments