Skip to content

Commit 64eb540

Browse files
Adding plots vs TPC occupancy (AliceO2Group#13552)
* Adding plots vs TPC occupancy * Different histos in case of pp or PbPb (waiting for a feature in QC) and sampling * Changes to run outside the QC framework * bins in mult are now configurable * adding cut on DCA and cosPA * Preventing tracks without ITS to be used
1 parent 183a577 commit 64eb540

File tree

6 files changed

+262
-31
lines changed

6 files changed

+262
-31
lines changed

Detectors/GLOQC/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ o2_add_library(GLOQC
1515
SOURCES src/MatchITSTPCQC.cxx
1616
src/ITSTPCMatchingQCParams.cxx
1717

18-
PUBLIC_LINK_LIBRARIES O2::DetectorsVertexing)
18+
PUBLIC_LINK_LIBRARIES O2::DetectorsVertexing
19+
PRIVATE_LINK_LIBRARIES O2::GPUO2Interface
20+
O2::GPUTracking)
1921

2022
o2_target_root_dictionary(GLOQC
2123
HEADERS include/GLOQC/MatchITSTPCQC.h

Detectors/GLOQC/include/GLOQC/ITSTPCMatchingQCParams.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ struct ITSTPCMatchingQCParams : public o2::conf::ConfigurableParamHelper<ITSTPCM
3939
float etaCut = 1.e10f;
4040
float cutK0Mass = 0.05f;
4141
float maxEtaK0 = 0.8f;
42+
float K0Scaling = 1.f;
43+
float minTPCOccpp = 0.f;
44+
float maxTPCOccpp = 1.e6;
45+
int nBinsTPCOccpp = 6;
46+
float minTPCOccPbPb = 0.f;
47+
float maxTPCOccPbPb = 8.e6;
48+
int nBinsTPCOccPbPb = 8;
49+
float maxK0DCA = 0.01;
50+
float minK0CosPA = 0.995;
4251

4352
O2ParamDef(ITSTPCMatchingQCParams, "ITSTPCMatchingQC");
4453
};

Detectors/GLOQC/include/GLOQC/MatchITSTPCQC.h

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <TH1D.h>
2020
#include <TH1F.h>
2121
#include <TH2F.h>
22+
#include <TH3F.h>
2223
#include <TEfficiency.h>
2324
#include <TObjArray.h>
2425
#include "DataFormatsGlobalTracking/RecoContainer.h"
@@ -28,6 +29,11 @@
2829
#include "Steer/MCKinematicsReader.h"
2930
#include "ReconstructionDataFormats/PID.h"
3031
#include "DCAFitter/DCAFitterN.h"
32+
#include "GPUO2InterfaceConfiguration.h"
33+
// #include "GPUSettingsO2.h"
34+
#include "GPUParam.h"
35+
#include "GPUParam.inc"
36+
3137
#include <unordered_map>
3238
#include <vector>
3339
#include <array>
@@ -63,7 +69,7 @@ class MatchITSTPCQC
6369
void setDataRequest(const std::shared_ptr<o2::globaltracking::DataRequest>& dr) { mDataRequest = dr; }
6470
void finalize();
6571
void reset();
66-
bool processV0(int iv, o2::globaltracking::RecoContainer& recoData);
72+
bool processV0(int iv, o2::globaltracking::RecoContainer& recoData, std::vector<float>& mTBinClOcc, float pvTime);
6773
bool refitV0(const o2::dataformats::V0Index& id, o2::dataformats::V0& v0, o2::globaltracking::RecoContainer& recoData);
6874

6975
TH1D* getHistoPtNum(matchType m) const { return mPtNum[m]; }
@@ -130,7 +136,8 @@ class MatchITSTPCQC
130136
TH1D* getHisto1OverPtPhysPrimDen(matchType m) const { return m1OverPtPhysPrimDen[m]; }
131137
TEfficiency* getFractionITSTPCmatchPhysPrim1OverPt(matchType m) const { return mFractionITSTPCmatchPhysPrim1OverPt[m]; }
132138

133-
TH2F* getHistoK0MassVsPt() const { return mK0MassVsPt; }
139+
TH3F* getHistoK0MassVsPtVsOccpp() const { return mK0MassVsPtVsOccpp; }
140+
TH3F* getHistoK0MassVsPtVsOccPbPb() const { return mK0MassVsPtVsOccPbPb; }
134141

135142
void getHistos(TObjArray& objar);
136143

@@ -228,7 +235,8 @@ class MatchITSTPCQC
228235
publisher->startPublishing(mDCArVsPtDen);
229236
publisher->startPublishing(mFractionITSTPCmatchDCArVsPt);
230237
if (mDoK0QC) {
231-
publisher->startPublishing(mK0MassVsPt);
238+
publisher->startPublishing(mK0MassVsPtVsOccpp);
239+
publisher->startPublishing(mK0MassVsPtVsOccPbPb);
232240
}
233241
}
234242

@@ -269,6 +277,18 @@ class MatchITSTPCQC
269277
void setMaxK0Eta(float v) { mMaxEtaK0 = v; }
270278
void setRefitK0(bool v) { mRefit = v; }
271279
void setCutK0Mass(float v) { mCutK0Mass = v; }
280+
void setMinTPCOccpp(float v) { mMinTPCOccpp = v; }
281+
void setMaxTPCOccpp(float v) { mMaxTPCOccpp = v; }
282+
void setNBinsTPCOccpp(int v) { mNBinsTPCOccpp = v; }
283+
void setMinTPCOccPbPb(float v) { mMinTPCOccPbPb = v; }
284+
void setMaxTPCOccPbPb(float v) { mMaxTPCOccPbPb = v; }
285+
void setNBinsTPCOccPbPb(int v) { mNBinsTPCOccPbPb = v; }
286+
void setK0Scaling(float v) { mK0Scaling = v; }
287+
float getK0Scaling() const { return mK0Scaling; }
288+
void setK0MaxDCA(float v) { mK0MaxDCA = v; }
289+
float getK0MaxDCA() { return mK0MaxDCA; }
290+
void setK0MinCosPA(float v) { mK0MinCosPA = v; }
291+
float getK0MinCosPA() const { return mK0MinCosPA; }
272292

273293
void printParams()
274294
{
@@ -286,6 +306,12 @@ class MatchITSTPCQC
286306
LOG(info) << "etaCut = " << mEtaCut;
287307
LOG(info) << "cutK0Mass = " << mCutK0Mass;
288308
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;
289315
}
290316

291317
private:
@@ -408,12 +434,33 @@ class MatchITSTPCQC
408434

409435
// for V0s
410436
o2::vertexing::DCAFitterN<2> mFitterV0;
411-
TH2F* mK0MassVsPt = nullptr;
437+
TH3F* mK0MassVsPtVsOccpp = nullptr;
438+
TH3F* mK0MassVsPtVsOccPbPb = nullptr;
412439
bool mDoK0QC = false; // whether to fill the K0 QC plot(s)
413440
float mCutK0Mass = 0.05; // cut on the difference between the K0 mass and the PDG mass
414441
bool mRefit = false; // whether to refit or not
415442
float mMaxEtaK0 = 0.8; // cut on the K0 eta
416443
long int mTimestamp = -1; // timestamp used to load the SVertexParam object: if differnt from -1, we don't load (it means we already did it)
444+
std::unique_ptr<o2::gpu::GPUO2InterfaceConfiguration> mConfig;
445+
std::unique_ptr<o2::gpu::GPUSettingsO2> mConfParam;
446+
// std::unique_ptr<o2::gpu::GPUParam> mParam;
447+
std::shared_ptr<o2::gpu::GPUParam> mParam = nullptr;
448+
int mNHBPerTF = 0;
449+
int mNTPCOccBinLength = 0; ///< TPC occ. histo bin length in TBs
450+
float mNTPCOccBinLengthInv;
451+
std::vector<float> mTBinClOcc; ///< TPC occupancy histo: i-th entry is the integrated occupancy for ~1 orbit starting from the TB = i*mNTPCOccBinLength
452+
gsl::span<const unsigned int> mTPCRefitterOccMap; ///< externally set TPC clusters occupancy map
453+
bool mIsHI = false;
454+
float mK0Scaling = 1.f; // permill that we want to keep of K0S
455+
uint64_t mNK0 = 0; // number of found V0s
456+
float mMinTPCOccpp = 0.f; // min TPC occupancy for K0s plot for pp collisions
457+
float mMaxTPCOccpp = 1.e6; // max TPC occupancy for K0s plot for pp collisions
458+
int mNBinsTPCOccpp = 6; // number of bins in TPC occupancy for K0s plot for pp collisions
459+
float mMinTPCOccPbPb = 0.f; // min TPC occupancy for K0s plot for PbPb collisions
460+
float mMaxTPCOccPbPb = 8.e6; // max TPC occupancy for K0s plot for PbPb collisions
461+
int mNBinsTPCOccPbPb = 8; // number of bins in TPC occupancy for K0s plot for PbPb collisions
462+
float mK0MaxDCA = 0.01; // max DCA to select the K0
463+
float mK0MinCosPA = 0.995; // min cosPA to select the K0
417464

418465
ClassDefNV(MatchITSTPCQC, 3);
419466
};

0 commit comments

Comments
 (0)