Skip to content

Commit 0bd7fb7

Browse files
Maximilian Korwieserwiechula
authored andcommitted
[TPC-QC]Add functionality to set the coordinates of PV.
1 parent c4ba161 commit 0bd7fb7

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

Detectors/TPC/qc/include/TPCQC/Tracks.h

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,26 @@ class Tracks
8181
mUseCutMaxAbsDCArOnHistos = useCutMaxAbsDCArOnHistos;
8282
}
8383

84+
// Set PV position
85+
void setPVposition(const o2::math_utils::Point3D<float> meanVtxPoint3D)
86+
{
87+
mPositionOfPV = meanVtxPoint3D;
88+
}
89+
8490
/// get ratios of 1D histograms
8591
std::unordered_map<std::string, std::unique_ptr<TH1>>& getMapHist() { return mMapHist; }
8692
const std::unordered_map<std::string, std::unique_ptr<TH1>>& getMapHist() const { return mMapHist; }
8793

8894
private:
89-
float mCutAbsEta = 1.f; // Eta cut
90-
int mCutMinnCls = 60; // minimum N clusters
91-
float mCutMindEdxTot = 20.f; // dEdxTot min value
92-
float mCutMinPtDCAr = 1.5f; // minimum pT for DCAr plots DCAr vs. phi, eta, nCluster
93-
float mSamplingFractionDCAr = 0.1f; // sampling rate for calculation of DCAr
94-
bool mTurnOffHistosForAsync = false; // Decide whether to turn off some histograms for async to reduce memory
95-
float mCutMaxAbsDCAr = 1.f; // maximum DCAr
96-
bool mUseCutMaxAbsDCArOnHistos = false; // Decide whether to use the cut on maximum DCAr for the histograms
95+
float mCutAbsEta = 1.f; // Eta cut
96+
int mCutMinnCls = 60; // minimum N clusters
97+
float mCutMindEdxTot = 20.f; // dEdxTot min value
98+
float mCutMinPtDCAr = 1.5f; // minimum pT for DCAr plots DCAr vs. phi, eta, nCluster
99+
float mSamplingFractionDCAr = 0.1f; // sampling rate for calculation of DCAr
100+
bool mTurnOffHistosForAsync = false; // Decide whether to turn off some histograms for async to reduce memory
101+
float mCutMaxAbsDCAr = 1.f; // maximum DCAr
102+
bool mUseCutMaxAbsDCArOnHistos = false; // Decide whether to use the cut on maximum DCAr for the histograms
103+
o2::math_utils::Point3D<float> mPositionOfPV{}; // Position of the PV
97104

98105
std::unordered_map<std::string, std::unique_ptr<TH1>> mMapHist;
99106
std::vector<TH1F> mHist1D{}; ///< Initialize vector of 1D histograms

Detectors/TPC/qc/src/Tracks.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,8 @@ bool Tracks::processTrack(const o2::tpc::TrackTPC& track)
180180
if (propagator->getMatLUT() && propagator->hasMagFieldSet()) {
181181
// ---| fill DCA histos |---
182182
o2::gpu::gpustd::array<float, 2> dca;
183-
const o2::math_utils::Point3D<float> refPoint{0, 0, 0};
184183
o2::track::TrackPar propTrack(track);
185-
if (propagator->propagateToDCABxByBz(refPoint, propTrack, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrLUT, &dca)) {
184+
if (propagator->propagateToDCABxByBz(mPositionOfPV, propTrack, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrLUT, &dca)) {
186185
const auto phi = o2::math_utils::to02PiGen(track.getPhi());
187186
dcaHistPT->Fill(pt, dca[0]);
188187
dcaHist->Fill(phi, dca[0]);

0 commit comments

Comments
 (0)