1616
1717// root includes
1818#include " TFile.h"
19+ #include " TMathBase.h"
1920
2021// o2 includes
2122#include " DataFormatsTPC/TrackTPC.h"
2223#include " DataFormatsTPC/dEdxInfo.h"
23- #include " GPUCommonArray.h"
24- #include " DetectorsBase/Propagator.h"
2524#include " TPCQC/Tracks.h"
2625#include " TPCQC/Helpers.h"
2726
2827ClassImp (o2::tpc::qc::Tracks);
2928
3029using namespace o2 ::tpc::qc;
31- // DCA histograms
32- const std::vector<std::string_view> types{" A_Pos" , " A_Neg" , " C_Pos" , " C_Neg" };
30+
3331// ______________________________________________________________________________
3432void Tracks::initializeHistograms ()
3533{
@@ -80,11 +78,6 @@ void Tracks::initializeHistograms()
8078 mMapHist [" hPhiAsideRatio" ] = std::make_unique<TH1F >(" hPhiAsideRatio" , " Azimuthal angle, A side, ratio neg./pos. ;phi" , 360 , 0 ., 2 * M_PI );
8179 mMapHist [" hPhiCsideRatio" ] = std::make_unique<TH1F >(" hPhiCsideRatio" , " Azimuthal angle, C side, ratio neg./pos. ;phi" , 360 , 0 ., 2 * M_PI );
8280 mMapHist [" hPtRatio" ] = std::make_unique<TH1F >(" hPtRatio" , " Transverse momentum, ratio neg./pos. ;p_T" , logPtBinning.size () - 1 , logPtBinning.data ());
83-
84- // DCA Histograms
85- for (const auto type : types) {
86- mMapHist [fmt::format (" hDCAr_{}" , type).data ()] = std::make_unique<TH2F >(fmt::format (" hDCAr_{}" , type).data (), fmt::format (" DCAr {};phi;DCAr (cm)" , type).data (), 360 , 0 , o2::math_utils::twoPid (), 250 , -10 ., 10 .);
87- }
8881}
8982// ______________________________________________________________________________
9083void Tracks::resetHistograms ()
@@ -107,7 +100,7 @@ bool Tracks::processTrack(const o2::tpc::TrackTPC& track)
107100 const auto hasASideOnly = track.hasASideClustersOnly ();
108101 const auto hasCSideOnly = track.hasCSideClustersOnly ();
109102
110- const auto absEta = std::abs (eta);
103+ double absEta = TMath::Abs (eta);
111104
112105 // ===| histogram filling before cuts |===
113106 mMapHist [" hNClustersBeforeCuts" ]->Fill (nCls);
@@ -124,31 +117,6 @@ bool Tracks::processTrack(const o2::tpc::TrackTPC& track)
124117 mMapHist [" hNClustersAfterCuts" ]->Fill (nCls);
125118 mMapHist [" hEta" ]->Fill (eta);
126119
127- // ---| propagate to 0,0,0 |---
128- //
129- // propagator instance must be configured before (LUT, MagField)
130- auto propagator = o2::base::Propagator::Instance (true );
131- const int type = (track.getQ2Pt () < 0 ) + 2 * track.hasCSideClustersOnly ();
132- auto dcaHist = mMapHist [fmt::format (" hDCAr_{}" , types[type]).data ()].get ();
133-
134- if (propagator->getMatLUT () && propagator->hasMagFieldSet ()) {
135- // ---| fill DCA histos |---
136- o2::gpu::gpustd::array<float , 2 > dca;
137- const o2::math_utils::Point3D<float > refPoint{0 , 0 , 0 };
138- o2::track::TrackPar propTrack (track);
139- if (propagator->propagateToDCABxByBz (refPoint, propTrack, 2 .f , o2::base::Propagator::MatCorrType::USEMatCorrLUT, &dca)) {
140- const auto phi = o2::math_utils::to02PiGen (track.getPhi ());
141- dcaHist->Fill (phi, dca[0 ]);
142- }
143- } else {
144- static bool reported = false ;
145- if (!reported) {
146- LOGP (error, " o2::base::Propagator not properly initialized, MatLUT ({}) and / or Field ({}) missing, will not fill DCA histograms" , (void *)propagator->getMatLUT (), (void *)propagator->hasMagFieldSet ());
147- reported = true ;
148- }
149- dcaHist->SetTitle (fmt::format (" DCAr {} o2::base::Propagator not properly initialized" , types[type]).data ());
150- }
151-
152120 if (hasASideOnly == 1 ) {
153121 mMapHist [" hPhiAside" ]->Fill (phi);
154122 } else if (hasCSideOnly == 1 ) {
0 commit comments