Skip to content

Commit 195e97e

Browse files
Maximilian Korwieserwiechula
authored andcommitted
TPC: Add DCA histograms without min pT selection.
1 parent 81408f4 commit 195e97e

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

Detectors/TPC/qc/src/Tracks.cxx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ void Tracks::initializeHistograms()
8585
// DCA Histograms
8686
for (const auto type : types) {
8787
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.);
88+
mMapHist[fmt::format("hDCAr_{}_pTmin", type).data()] = std::make_unique<TH2F>(fmt::format("hDCAr_{}_pTmin", type).data(), fmt::format("DCAr {} #it{{p}}_{{T}}^{{min}};#phi;DCAr (cm)", type).data(), 360, 0, o2::math_utils::twoPid(), 250, -10., 10.);
8889
}
8990
// DCA vs variables Histograms
9091
mMapHist["hDCArVsPtPos"] = std::make_unique<TH2F>("hDCArVsPtPos", "DCAr Pos;#it{p}_{T} (GeV/#it{c});DCAr (cm)", logPtBinning.size() - 1, logPtBinning.data(), 250, -10., 10.);
@@ -93,6 +94,11 @@ void Tracks::initializeHistograms()
9394
mMapHist["hDCArVsPtNeg"] = std::make_unique<TH2F>("hDCArVsPtNeg", "DCAr Neg;#it{p}_{T} (GeV/#it{c});DCAr (cm)", logPtBinning.size() - 1, logPtBinning.data(), 250, -10., 10.);
9495
mMapHist["hDCArVsEtaNeg"] = std::make_unique<TH2F>("hDCArVsEtaNeg", "DCAr Neg;#eta;DCAr (cm)", 400, -2., 2., 250, -10., 10.);
9596
mMapHist["hDCArVsNClsNeg"] = std::make_unique<TH2F>("hDCArVsNClsNeg", "DCAr Neg;# TPC clusters;DCAr (cm)", 400, -0.5, 399.5, 250, -10., 10.);
97+
// DCA vs variables Histogram with pT min selection
98+
mMapHist["hDCArVsEtaPos_pTmin"] = std::make_unique<TH2F>("hDCArVsEtaPos_pTmin", "DCAr Pos #it{p}_{T}^{min};#eta;DCAr (cm)", 400, -2., 2., 250, -10., 10.);
99+
mMapHist["hDCArVsNClsPos_pTmin"] = std::make_unique<TH2F>("hDCArVsNClsPos_pTmin", "DCAr Pos #it{p}_{T}^{min};# TPC clusters;DCAr (cm)", 400, -0.5, 399.5, 250, -10., 10.);
100+
mMapHist["hDCArVsEtaNeg_pTmin"] = std::make_unique<TH2F>("hDCArVsEtaNeg_pTmin", "DCAr Neg #it{p}_{T}^{min};#eta;DCAr (cm)", 400, -2., 2., 250, -10., 10.);
101+
mMapHist["hDCArVsNClsNeg_pTmin"] = std::make_unique<TH2F>("hDCArVsNClsNeg_pTmin", "DCAr Neg #it{p}_{T}^{min};# TPC clusters;DCAr (cm)", 400, -0.5, 399.5, 250, -10., 10.);
96102
}
97103
//______________________________________________________________________________
98104
void Tracks::resetHistograms()
@@ -138,10 +144,13 @@ bool Tracks::processTrack(const o2::tpc::TrackTPC& track)
138144
auto propagator = o2::base::Propagator::Instance(true);
139145
const int type = (track.getQ2Pt() < 0) + 2 * track.hasCSideClustersOnly();
140146
auto dcaHist = mMapHist[fmt::format("hDCAr_{}", types[type]).data()].get();
147+
auto dcaHist_pTmin = mMapHist[fmt::format("hDCAr_{}_pTmin", types[type]).data()].get();
141148
const std::string signType((sign < 0) ? "Neg" : "Pos");
142149
auto dcaHistPT = mMapHist["hDCArVsPt" + signType].get();
143150
auto dcaHistEta = mMapHist["hDCArVsEta" + signType].get();
144151
auto dcaHistNCluster = mMapHist["hDCArVsNCls" + signType].get();
152+
auto dcaHistEta_pTmin = mMapHist["hDCArVsEta" + signType + "_pTmin"].get();
153+
auto dcaHistNCluster_pTmin = mMapHist["hDCArVsNCls" + signType + "_pTmin"].get();
145154

146155
// set-up sampling for the DCA calculation
147156
Double_t sampleProb = 2;
@@ -161,10 +170,13 @@ bool Tracks::processTrack(const o2::tpc::TrackTPC& track)
161170
if (propagator->propagateToDCABxByBz(refPoint, propTrack, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrLUT, &dca)) {
162171
const auto phi = o2::math_utils::to02PiGen(track.getPhi());
163172
dcaHistPT->Fill(pt, dca[0]);
173+
dcaHist->Fill(phi, dca[0]);
174+
dcaHistEta->Fill(eta, dca[0]);
175+
dcaHistNCluster->Fill(nCls, dca[0]);
164176
if (pt > mCutMinPtDCAr) {
165-
dcaHist->Fill(phi, dca[0]);
166-
dcaHistEta->Fill(eta, dca[0]);
167-
dcaHistNCluster->Fill(nCls, dca[0]);
177+
dcaHist_pTmin->Fill(phi, dca[0]);
178+
dcaHistEta_pTmin->Fill(eta, dca[0]);
179+
dcaHistNCluster_pTmin->Fill(nCls, dca[0]);
168180
}
169181
}
170182
} else {
@@ -173,8 +185,11 @@ bool Tracks::processTrack(const o2::tpc::TrackTPC& track)
173185
LOGP(error, "o2::base::Propagator not properly initialized, MatLUT ({}) and / or Field ({}) missing, will not fill DCA histograms", (void*)propagator->getMatLUT(), propagator->hasMagFieldSet());
174186
dcaHist->SetTitle(fmt::format("DCAr {} o2::base::Propagator not properly initialized", types[type]).data());
175187
dcaHistPT->SetTitle(fmt::format("DCAr #it{{p}}_{{T}} {} o2::base::Propagator not properly initialized", signType).data());
188+
dcaHist_pTmin->SetTitle(fmt::format("DCAr {} #it{{p}}_{{T}}^{{min}} o2::base::Propagator not properly initialized", types[type]).data());
176189
dcaHistEta->SetTitle(fmt::format("DCAr #eta {} o2::base::Propagator not properly initialized", signType).data());
177190
dcaHistNCluster->SetTitle(fmt::format("DCAr nClusters {} o2::base::Propagator not properly initialized", signType).data());
191+
dcaHistEta_pTmin->SetTitle(fmt::format("DCAr #eta {} #it{{p}}_{{T}}^{{min}} o2::base::Propagator not properly initialized", signType).data());
192+
dcaHistNCluster_pTmin->SetTitle(fmt::format("DCAr nClusters {} #it{{p}}_{{T}}^{{min}} o2::base::Propagator not properly initialized", signType).data());
178193
reported = true;
179194
}
180195
}

0 commit comments

Comments
 (0)