@@ -199,10 +199,9 @@ struct matchingMFT {
199199 fRegistry .add (" MFTMCHMID/primary/correct/hDCAxyResolutionvsPt" , " DCA_{xy} resolution vs. p_{T};p_{T} (GeV/c);DCA_{xy} resolution (#mum);" , kTH2F , {{100 , 0 , 10 .f }, {500 , 0 , 500 }}, false );
200200 fRegistry .add (" MFTMCHMID/primary/correct/hMCHBitMap" , " MCH bit map;MCH bit map" , kTH1F , {{1024 , -0.5 , 1023.5 }}, false );
201201 fRegistry .add (" MFTMCHMID/primary/correct/hMIDBitMap" , " MID bit map;MID bit map" , kTH1F , {{256 , -0.5 , 255.5 }}, false );
202- fRegistry .add (" MFTMCHMID/primary/correct/hMeanMFTClusterSize" , " mean MFT cluster size vs. p;p (GeV/c);<MFT cluster size> #times sin(#lambda)" , kTH2F , {{100 , 0 , 100 }, {100 , 0 , 10 }}, false );
203202
204203 fRegistry .add (" MFTMCHMID/primary/correct/hProdVtxZ" , " prod. vtx Z of muon;V_{z} (cm)" , kTH1F , {{200 , -100 , 100 }}, false );
205- fRegistry .add (" MFTMCHMID/primary/correct/hRelDeltaPt" , " pT resolution;p_{T}^{gen} (GeV/c);(p_{T}^{rec} - p_{T}^{gen})/p_{T}^{gen}" , kTH2F , {{100 , 0 , 10 }, {400 , -1 , +1 }}, false );
204+ fRegistry .add (" MFTMCHMID/primary/correct/hRelDeltaPt" , " pT resolution;p_{T}^{gen} (GeV/c);(p_{T}^{rec} - p_{T}^{gen})/p_{T}^{gen}" , kTH2F , {{100 , 0 , 10 }, {200 , -1 , +1 }}, false );
206205 fRegistry .add (" MFTMCHMID/primary/correct/hDeltaEta_Pos" , " #eta resolution;p_{T}^{gen} (GeV/c);#eta^{rec} - #eta^{gen}" , kTH2F , {{100 , 0 , 10 }, {400 , -0.2 , +0.2 }}, false );
207206 fRegistry .add (" MFTMCHMID/primary/correct/hDeltaEta_Neg" , " #eta resolution;p_{T}^{gen} (GeV/c);#eta^{rec} - #eta^{gen}" , kTH2F , {{100 , 0 , 10 }, {400 , -0.2 , +0.2 }}, false );
208207 fRegistry .add (" MFTMCHMID/primary/correct/hDeltaPhi_Pos" , " #varphi resolution;p_{T}^{gen} (GeV/c);#varphi^{rec} - #varphi^{gen} (rad.)" , kTH2F , {{100 , 0 , 10 }, {400 , -0.2 , +0.2 }}, false );
@@ -275,27 +274,27 @@ struct matchingMFT {
275274 return (clmap > 0 );
276275 }
277276
278- template <typename T>
279- float meanClusterSizeMFT (T const & track)
280- {
281- uint64_t mftClusterSizesAndTrackFlags = track.mftClusterSizesAndTrackFlags ();
282- uint16_t clsSize = 0 ;
283- uint16_t n = 0 ;
284- for (unsigned int layer = 0 ; layer < 10 ; layer++) {
285- uint16_t size_per_layer = (mftClusterSizesAndTrackFlags >> (layer * 6 )) & 0x3f ;
286- clsSize += size_per_layer;
287- if (size_per_layer > 0 ) {
288- n++;
289- }
290- // LOGF(info, "track.globalIndex() = %d, layer = %d, size_per_layer = %d", track.globalIndex(), layer, size_per_layer);
291- }
292-
293- if (n > 0 ) {
294- return static_cast <float >(clsSize) / static_cast <float >(n) * std::fabs (std::sin (std::atan (track.tgl ())));
295- } else {
296- return 0 .f ;
297- }
298- }
277+ // template <typename T>
278+ // float meanClusterSizeMFT(T const& track)
279+ // {
280+ // uint64_t mftClusterSizesAndTrackFlags = track.mftClusterSizesAndTrackFlags();
281+ // uint16_t clsSize = 0;
282+ // uint16_t n = 0;
283+ // for (unsigned int layer = 0; layer < 10; layer++) {
284+ // uint16_t size_per_layer = (mftClusterSizesAndTrackFlags >> (layer * 6)) & 0x3f;
285+ // clsSize += size_per_layer;
286+ // if (size_per_layer > 0) {
287+ // n++;
288+ // }
289+ // // LOGF(info, "track.globalIndex() = %d, layer = %d, size_per_layer = %d", track.globalIndex(), layer, size_per_layer);
290+ // }
291+
292+ // if (n > 0) {
293+ // return static_cast<float>(clsSize) / static_cast<float>(n) * std::fabs(std::sin(std::atan(track.tgl())));
294+ // } else {
295+ // return 0.f;
296+ // }
297+ // }
299298
300299 template <typename TFwdTracks, typename TMFTTracks, typename TCollision, typename TFwdTrack, typename TMFTrackCov>
301300 void getDeltaEtaDeltaPhiAtMatchingPlane (TCollision const & collision, TFwdTrack const & fwdtrack, TMFTrackCov const & mftCovs, float & deta, float & dphi)
@@ -393,7 +392,6 @@ struct matchingMFT {
393392 o2::dataformats::GlobalFwdTrack propmuonAtDCA_Matched = propagateMuon (mchtrack, mchtrack, collision, propagationPoint::kToDCA , matchingZ, mBz );
394393 o2::dataformats::GlobalFwdTrack propmuonAtPV_Matched = propagateMuon (mchtrack, mchtrack, collision, propagationPoint::kToVertex , matchingZ, mBz );
395394
396- float p = propmuonAtPV.getP ();
397395 float pt = propmuonAtPV.getPt ();
398396 float eta = propmuonAtPV.getEta ();
399397 float phi = propmuonAtPV.getPhi ();
@@ -424,13 +422,13 @@ struct matchingMFT {
424422 float dphiMP = 999 .f , detaMP = 999 .f ;
425423
426424 if (refitGlobalMuon) {
427- eta = mfttrack.eta ();
425+ // eta = mfttrack.eta();
428426 // phi = mfttrack.phi();
429427 // o2::math_utils::bringTo02Pi(phi);
430- pt = propmuonAtPV_Matched.getP () * std::sin (2 .f * std::atan (std::exp (-eta)));
431- p = propmuonAtPV_Matched.getP ();
428+ eta = propmuonAtDCA.getEta ();
432429 phi = propmuonAtDCA.getPhi ();
433430 o2::math_utils::bringTo02Pi (phi);
431+ pt = propmuonAtPV_Matched.getP () * std::sin (2 .f * std::atan (std::exp (-eta)));
434432
435433 if constexpr (withMFTCov) {
436434 // auto mfttrackcov = mftCovs.rawIteratorAt(map_mfttrackcovs[mfttrack.globalIndex()]);
@@ -464,8 +462,6 @@ struct matchingMFT {
464462 // }
465463 // sigma_dcaXY = dcaXY / dcaXYinSigma;
466464
467- // o2::track::TrackParCovFwd mftsaAtDCA = getTrackParCovFwd(mfttrack, mfttrackcov); // values at innermost update
468- // mftsaAtDCA.propagateToZhelix(collision.posZ(), mBz); // propagated to matching plane
469465 // cXXatDCA = mftsaAtDCA.getSigma2X();
470466 // cYYatDCA = mftsaAtDCA.getSigma2Y();
471467 // cXYatDCA = mftsaAtDCA.getSigmaXY();
@@ -541,7 +537,6 @@ struct matchingMFT {
541537 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hDCAxyinSigma" ), dcaXYinSigma);
542538 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hMCHBitMap" ), fwdtrack.mchBitMap ());
543539 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hMIDBitMap" ), fwdtrack.midBitMap ());
544- fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hMeanMFTClusterSize" ), p, meanClusterSizeMFT (mfttrack));
545540 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hDCAxResolutionvsPt" ), pt, std::sqrt (cXXatDCA) * 1e+4 ); // convert cm to um
546541 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hDCAyResolutionvsPt" ), pt, std::sqrt (cYYatDCA) * 1e+4 ); // convert cm to um
547542 fRegistry .fill (HIST (" MFTMCHMID/primary/correct/hDCAxyResolutionvsPt" ), pt, sigma_dcaXY * 1e+4 ); // convert cm to um
@@ -578,7 +573,6 @@ struct matchingMFT {
578573 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hDCAxyinSigma" ), dcaXYinSigma);
579574 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hMCHBitMap" ), fwdtrack.mchBitMap ());
580575 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hMIDBitMap" ), fwdtrack.midBitMap ());
581- fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hMeanMFTClusterSize" ), p, meanClusterSizeMFT (mfttrack));
582576 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hDCAxResolutionvsPt" ), pt, std::sqrt (cXXatDCA) * 1e+4 ); // convert cm to um
583577 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hDCAyResolutionvsPt" ), pt, std::sqrt (cYYatDCA) * 1e+4 ); // convert cm to um
584578 fRegistry .fill (HIST (" MFTMCHMID/primary/wrong/hDCAxyResolutionvsPt" ), pt, sigma_dcaXY * 1e+4 ); // convert cm to um
@@ -617,7 +611,6 @@ struct matchingMFT {
617611 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hDCAxyinSigma" ), dcaXYinSigma);
618612 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hMCHBitMap" ), fwdtrack.mchBitMap ());
619613 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hMIDBitMap" ), fwdtrack.midBitMap ());
620- fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hMeanMFTClusterSize" ), p, meanClusterSizeMFT (mfttrack));
621614 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hDCAxResolutionvsPt" ), pt, std::sqrt (cXXatDCA) * 1e+4 ); // convert cm to um
622615 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hDCAyResolutionvsPt" ), pt, std::sqrt (cYYatDCA) * 1e+4 ); // convert cm to um
623616 fRegistry .fill (HIST (" MFTMCHMID/secondary/correct/hDCAxyResolutionvsPt" ), pt, sigma_dcaXY * 1e+4 ); // convert cm to um
@@ -654,7 +647,6 @@ struct matchingMFT {
654647 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hDCAxyinSigma" ), dcaXYinSigma);
655648 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hMCHBitMap" ), fwdtrack.mchBitMap ());
656649 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hMIDBitMap" ), fwdtrack.midBitMap ());
657- fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hMeanMFTClusterSize" ), p, meanClusterSizeMFT (mfttrack));
658650 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hDCAxResolutionvsPt" ), pt, std::sqrt (cXXatDCA) * 1e+4 ); // convert cm to um
659651 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hDCAyResolutionvsPt" ), pt, std::sqrt (cYYatDCA) * 1e+4 ); // convert cm to um
660652 fRegistry .fill (HIST (" MFTMCHMID/secondary/wrong/hDCAxyResolutionvsPt" ), pt, sigma_dcaXY * 1e+4 ); // convert cm to um
0 commit comments