Skip to content

Commit c1509f8

Browse files
authored
GLO: QC: Add 3d plot and widen eta cuts (#13692)
* GLO: QC: Add eta/phi/pt matching eff plot to QC * GLO: QC: set reasonable defaults and steering * GLO: QC: minor cleanup (removal of some headers and other stuff) Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch> --------- Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent ef2b3c1 commit c1509f8

File tree

5 files changed

+202
-165
lines changed

5 files changed

+202
-165
lines changed

Detectors/GLOQC/include/GLOQC/ITSTPCMatchingQCParams.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,26 @@
1717
#include "CommonUtils/ConfigurableParam.h"
1818
#include "CommonUtils/ConfigurableParamHelper.h"
1919

20-
namespace o2
21-
{
22-
namespace gloqc
20+
namespace o2::gloqc
2321
{
2422

2523
// There are configurable params for TPC-ITS matching
2624
struct ITSTPCMatchingQCParams : public o2::conf::ConfigurableParamHelper<ITSTPCMatchingQCParams> {
2725

28-
float minPtITSCut = 0.f;
29-
float etaITSCut = 1e10f;
26+
int nBinsPt = 100;
27+
float minPtITSCut = 0.1;
28+
float etaITSCut = 1.4;
3029
int32_t minNITSClustersCut = 0;
31-
int32_t maxChi2PerClusterITS = 100000;
32-
float minPtTPCCut = 0.1f;
33-
float etaTPCCut = 0.9f;
30+
float maxChi2PerClusterITS = 1e10;
31+
float minPtTPCCut = 0.1;
32+
float etaTPCCut = 1.4;
3433
int32_t minNTPCClustersCut = 60;
35-
float minDCACut = 100.f;
36-
float minDCACutY = 10.f;
37-
float minPtCut = 0.f;
38-
float maxPtCut = 1e10f;
39-
float etaCut = 1.e10f;
34+
float minDCACut = 100.;
35+
float minDCACutY = 10.;
36+
float minPtCut = 0.1;
37+
float maxPtCut = 20;
38+
float etaCut = 1.4;
39+
float etaNo0Cut = 0.05;
4040
float cutK0Mass = 0.05f;
4141
float maxEtaK0 = 0.8f;
4242
float K0Scaling = 1.f;
@@ -52,7 +52,7 @@ struct ITSTPCMatchingQCParams : public o2::conf::ConfigurableParamHelper<ITSTPCM
5252
O2ParamDef(ITSTPCMatchingQCParams, "ITSTPCMatchingQC");
5353
};
5454

55-
} // namespace gloqc
56-
} // end namespace o2
55+
} // namespace o2::gloqc
56+
// end namespace o2
5757

5858
#endif

Detectors/GLOQC/include/GLOQC/MatchITSTPCQC.h

Lines changed: 38 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@
2525
#include "DataFormatsGlobalTracking/RecoContainer.h"
2626
#include "Framework/ProcessingContext.h"
2727
#include "SimulationDataFormat/MCCompLabel.h"
28-
#include "SimulationDataFormat/MCTrack.h"
2928
#include "Steer/MCKinematicsReader.h"
3029
#include "ReconstructionDataFormats/PID.h"
3130
#include "DCAFitter/DCAFitterN.h"
3231
#include "GPUO2InterfaceConfiguration.h"
33-
// #include "GPUSettingsO2.h"
3432
#include "GPUParam.h"
3533
#include "GPUParam.inc"
3634

@@ -56,11 +54,15 @@ struct LblInfo {
5654
class MatchITSTPCQC
5755
{
5856
public:
59-
enum matchType : int { TPC = 0,
60-
ITS,
61-
SIZE };
57+
enum matchType : uint8_t { TPC = 0,
58+
ITS,
59+
SIZE };
6260

6361
MatchITSTPCQC() = default;
62+
MatchITSTPCQC(const MatchITSTPCQC&) = delete;
63+
MatchITSTPCQC(MatchITSTPCQC&&) = delete;
64+
MatchITSTPCQC& operator=(const MatchITSTPCQC&) = delete;
65+
MatchITSTPCQC& operator=(MatchITSTPCQC&&) = delete;
6466
~MatchITSTPCQC();
6567

6668
bool init();
@@ -136,6 +138,9 @@ class MatchITSTPCQC
136138
TH1D* getHisto1OverPtPhysPrimDen(matchType m) const { return m1OverPtPhysPrimDen[m]; }
137139
TEfficiency* getFractionITSTPCmatchPhysPrim1OverPt(matchType m) const { return mFractionITSTPCmatchPhysPrim1OverPt[m]; }
138140

141+
TH3F* getHistoEtaPhiPtNum(matchType m) const { return mEtaPhiPtNum[m]; }
142+
TH3F* getHistoEtaPhiPtDen(matchType m) const { return mEtaPhiPtDen[m]; }
143+
139144
TH3F* getHistoK0MassVsPtVsOccpp() const { return mK0MassVsPtVsOccpp; }
140145
TH3F* getHistoK0MassVsPtVsOccPbPb() const { return mK0MassVsPtVsOccPbPb; }
141146

@@ -190,6 +195,10 @@ class MatchITSTPCQC
190195
publisher->startPublishing(m1OverPtDen[i]);
191196
publisher->startPublishing(mFractionITSTPCmatch1OverPt[i]);
192197

198+
// 3D eta/phi/pt
199+
publisher->startPublishing(mEtaPhiPtNum[i]);
200+
publisher->startPublishing(mEtaPhiPtDen[i]);
201+
193202
if (mUseTrkPID) { // Vs Tracking PID hypothesis
194203
for (int j = 0; j < o2::track::PID::NIDs; ++j) {
195204
// Pt
@@ -253,14 +262,14 @@ class MatchITSTPCQC
253262
// ITS track
254263
void setMinPtITSCut(float v) { mPtITSCut = v; };
255264
void setEtaITSCut(float v) { mEtaITSCut = v; }; // TODO: define 2 different values for min and max (**)
256-
void setMinNClustersITS(float v) { mMinNClustersITS = v; }
265+
void setMinNClustersITS(int v) { mMinNClustersITS = v; }
257266
void setMaxChi2PerClusterITS(float v) { mMaxChi2PerClusterITS = v; }
258267
// TO DO: define an agreed way to implement the setter for ITS matching (min. # layers, which layers)
259268
// [...] --> exploit the method TrackCuts::setRequireHitsInITSLayers(...)
260269
// TPC track
261270
void setMinPtTPCCut(float v) { mPtTPCCut = v; };
262271
void setEtaTPCCut(float v) { mEtaTPCCut = v; }; // TODO: define 2 different values for min and max (***)
263-
void setMinNTPCClustersCut(float v) { mNTPCClustersCut = v; }
272+
void setMinNTPCClustersCut(int v) { mNTPCClustersCut = v; }
264273
void setMinDCAtoBeamPipeCut(std::array<float, 2> v)
265274
{
266275
setMinDCAtoBeamPipeDistanceCut(v[0]);
@@ -269,9 +278,11 @@ class MatchITSTPCQC
269278
void setMinDCAtoBeamPipeDistanceCut(float v) { mDCATPCCut = v; }
270279
void setMinDCAtoBeamPipeYCut(float v) { mDCATPCCutY = v; }
271280
// ITS-TPC kinematics
281+
void setNBinsPt(int v) { mPtBins = v; }
272282
void setPtCut(float v) { mPtCut = v; }
273283
void setMaxPtCut(float v) { mPtMaxCut = v; }
274-
void setEtaCut(float v) { mEtaCut = v; } // TODO: define 2 different values for min and max (*)
284+
void setEtaCut(float v) { mEtaCut = v; }
285+
void setEtaNo0Cut(float v) { mEtaNo0Cut = v; }
275286

276287
// K0
277288
void setMaxK0Eta(float v) { mMaxEtaK0 = v; }
@@ -286,33 +297,11 @@ class MatchITSTPCQC
286297
void setK0Scaling(float v) { mK0Scaling = v; }
287298
float getK0Scaling() const { return mK0Scaling; }
288299
void setK0MaxDCA(float v) { mK0MaxDCA = v; }
289-
float getK0MaxDCA() { return mK0MaxDCA; }
300+
float getK0MaxDCA() const { return mK0MaxDCA; }
290301
void setK0MinCosPA(float v) { mK0MinCosPA = v; }
291302
float getK0MinCosPA() const { return mK0MinCosPA; }
292303

293-
void printParams()
294-
{
295-
LOG(info) << "minPtITSCut = " << mPtITSCut;
296-
LOG(info) << "etaITSCut = " << mEtaITSCut;
297-
LOG(info) << "minNITSClustersCut = " << mMinNClustersITS;
298-
LOG(info) << "maxChi2PerClusterITS = " << mMaxChi2PerClusterITS;
299-
LOG(info) << "minPtTPCCut = " << mPtTPCCut;
300-
LOG(info) << "etaTPCCut = " << mEtaTPCCut;
301-
LOG(info) << "minNTPCClustersCut = " << mNTPCClustersCut;
302-
LOG(info) << "minDCACut = " << mDCATPCCut;
303-
LOG(info) << "minDCACutY = " << mDCATPCCutY;
304-
LOG(info) << "minPtCut = " << mPtCut;
305-
LOG(info) << "maxPtCut = " << mPtMaxCut;
306-
LOG(info) << "etaCut = " << mEtaCut;
307-
LOG(info) << "cutK0Mass = " << mCutK0Mass;
308-
LOG(info) << "maxEtaK0 = " << mMaxEtaK0;
309-
LOG(info) << "minTPCOccpp = " << mMinTPCOccpp;
310-
LOG(info) << "maxTPCOccpp = " << mMaxTPCOccpp;
311-
LOG(info) << "nBinsTPCOccpp = " << mNBinsTPCOccpp;
312-
LOG(info) << "minTPCOccPbPb = " << mMinTPCOccPbPb;
313-
LOG(info) << "maxTPCOccPbPb = " << mMaxTPCOccPbPb;
314-
LOG(info) << "nBinsTPCOccPbPb = " << mNBinsTPCOccPbPb;
315-
}
304+
void printParams() const;
316305

317306
private:
318307
std::shared_ptr<o2::globaltracking::DataRequest> mDataRequest;
@@ -406,31 +395,37 @@ class MatchITSTPCQC
406395
TH1D* m1OverPtPhysPrimNum[matchType::SIZE] = {};
407396
TH1D* m1OverPtPhysPrimDen[matchType::SIZE] = {};
408397
TEfficiency* mFractionITSTPCmatchPhysPrim1OverPt[matchType::SIZE] = {};
398+
// 3D Efficiency in eta/phi/pt
399+
TH3F* mEtaPhiPtNum[matchType::SIZE] = {};
400+
TH3F* mEtaPhiPtDen[matchType::SIZE] = {};
409401

410-
void setEfficiency(TEfficiency* eff, TH1* hnum, TH1* hden, bool is2D = false);
402+
template <int DIM = 1, bool DEBUG = false>
403+
void setEfficiency(TEfficiency* eff, TH1* hnum, TH1* hden);
411404

412405
int mNTPCSelectedTracks = 0;
413406
int mNITSSelectedTracks = 0;
414407
int mNITSTPCSelectedTracks[matchType::SIZE] = {0, 0};
415408

416409
// cut values
417410
// ITS track
418-
float mPtITSCut = 0.f; // min pT for ITS track
419-
float mEtaITSCut = 1e10f; // eta window for ITS track --> TODO: define 2 different values for min and max (**)
420-
int mMinNClustersITS = 0; // min number of ITS clusters
421-
float mMaxChi2PerClusterITS{1e10f}; // max its fit chi2 per ITS cluster
422-
std::vector<std::pair<int8_t, std::set<uint8_t>>> mRequiredITSHits{}; // vector of ITS requirements (minNRequiredHits in specific requiredLayers)
411+
float mPtITSCut = 0.1f; // min pT for ITS track
412+
float mEtaITSCut = 1.4f; // eta window for ITS track --> TODO: define 2 different values for min and max (**)
413+
int mMinNClustersITS = 0; // min number of ITS clusters
414+
float mMaxChi2PerClusterITS{1e10f}; // max its fit chi2 per ITS cluster
415+
std::vector<std::pair<int8_t, std::set<uint8_t>>> mRequiredITSHits; // vector of ITS requirements (minNRequiredHits in specific requiredLayers)
423416
// TPC track
424417
float mPtTPCCut = 0.1f; // min pT for TPC track
425418
float mEtaTPCCut = 1.4f; // eta window for TPC track --> TODO: define 2 different values for min and max (***)
426419
int32_t mNTPCClustersCut = 60; // minimum number of TPC clusters for TPC track
427420
float mDCATPCCut = 100.f; // max DCA 3D to PV for TPC track
428421
float mDCATPCCutY = 10.f; // max DCA xy to PV for TPC track
429422
// ITS-TPC kinematics
423+
int mPtBins = 100;
430424
float mPtCut = 0.1f;
431-
float mPtMaxCut = 1e10f;
432-
float mEtaCut = 1e10f; // 1e10f as defaults of Detectors/GlobalTracking/include/GlobalTracking/TrackCuts.h
433-
// TODO: define 2 different values for min and max (*)
425+
float mPtMaxCut = 20;
426+
float mEtaCut = 1.4f;
427+
float mEtaNo0Cut = 0.05f;
428+
// TODO: define 2 different values for min and max (*)
434429

435430
// for V0s
436431
o2::vertexing::DCAFitterN<2> mFitterV0;
@@ -447,7 +442,7 @@ class MatchITSTPCQC
447442
std::shared_ptr<o2::gpu::GPUParam> mParam = nullptr;
448443
int mNHBPerTF = 0;
449444
int mNTPCOccBinLength = 0; ///< TPC occ. histo bin length in TBs
450-
float mNTPCOccBinLengthInv;
445+
float mNTPCOccBinLengthInv{};
451446
std::vector<float> mTBinClOcc; ///< TPC occupancy histo: i-th entry is the integrated occupancy for ~1 orbit starting from the TB = i*mNTPCOccBinLength
452447
gsl::span<const unsigned int> mTPCRefitterOccMap; ///< externally set TPC clusters occupancy map
453448
bool mIsHI = false;
@@ -462,7 +457,7 @@ class MatchITSTPCQC
462457
float mK0MaxDCA = 0.01; // max DCA to select the K0
463458
float mK0MinCosPA = 0.995; // min cosPA to select the K0
464459

465-
ClassDefNV(MatchITSTPCQC, 3);
460+
ClassDefNV(MatchITSTPCQC, 4);
466461
};
467462
} // namespace gloqc
468463
} // namespace o2

0 commit comments

Comments
 (0)