Skip to content

Commit

Permalink
adding cut on DCA and cosPA
Browse files Browse the repository at this point in the history
  • Loading branch information
chiarazampolli committed Oct 10, 2024
1 parent 3da680b commit fc69bda
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Detectors/GLOQC/include/GLOQC/ITSTPCMatchingQCParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ struct ITSTPCMatchingQCParams : public o2::conf::ConfigurableParamHelper<ITSTPCM
float minTPCOccPbPb = 0.f;
float maxTPCOccPbPb = 8.e6;
int nBinsTPCOccPbPb = 8;
float maxK0DCA = 0.01;
float minK0CosPA = 0.995;

O2ParamDef(ITSTPCMatchingQCParams, "ITSTPCMatchingQC");
};
Expand Down
10 changes: 8 additions & 2 deletions Detectors/GLOQC/include/GLOQC/MatchITSTPCQC.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,6 @@ class MatchITSTPCQC
void setBz(float bz) { mBz = bz; }
void setDoK0QC(bool v) { mDoK0QC = v; }
bool getDoK0QC() const { return mDoK0QC; }
void setK0Scaling(float v) { mK0Scaling = v; }
float getK0Scaling() const { return mK0Scaling; }

// ITS track
void setMinPtITSCut(float v) { mPtITSCut = v; };
Expand Down Expand Up @@ -285,6 +283,12 @@ class MatchITSTPCQC
void setMinTPCOccPbPb(float v) { mMinTPCOccPbPb = v; }
void setMaxTPCOccPbPb(float v) { mMaxTPCOccPbPb = v; }
void setNBinsTPCOccPbPb(int v) { mNBinsTPCOccPbPb = v; }
void setK0Scaling(float v) { mK0Scaling = v; }
float getK0Scaling() const { return mK0Scaling; }
void setK0MaxDCA(float v) { mK0MaxDCA = v; }
float getK0MaxDCA() { return mK0MaxDCA; }
void setK0MinCosPA(float v) { mK0MinCosPA = v; }
float getK0MinCosPA() const { return mK0MinCosPA; }

void printParams()
{
Expand Down Expand Up @@ -455,6 +459,8 @@ class MatchITSTPCQC
float mMinTPCOccPbPb = 0.f; // min TPC occupancy for K0s plot for PbPb collisions
float mMaxTPCOccPbPb = 8.e6; // max TPC occupancy for K0s plot for PbPb collisions
int mNBinsTPCOccPbPb = 8; // number of bins in TPC occupancy for K0s plot for PbPb collisions
float mK0MaxDCA = 0.01; // max DCA to select the K0
float mK0MinCosPA = 0.995; // min cosPA to select the K0

ClassDefNV(MatchITSTPCQC, 3);
};
Expand Down
9 changes: 8 additions & 1 deletion Detectors/GLOQC/src/MatchITSTPCQC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,14 @@ bool MatchITSTPCQC::processV0(int iv, o2::globaltracking::RecoContainer& recoDat
if (mMaxEtaK0 < std::abs(v0sel.getEta())) {
return false;
}
if (mCutK0Mass > 0 && std::abs(std::sqrt(v0sel.calcMass2AsK0()) - 0.497) > mCutK0Mass) {

if (mCutK0Mass > 0 && std::abs(std::sqrt(v0sel.calcMass2AsK0()) - 0.497) > mCutK0Mass || v0sel.getDCA() > mK0MaxDCA || v0sel.getCosPA() < mK0MinCosPA) {
if (v0sel.getDCA() > mK0MaxDCA && v0sel.getCosPA() < mK0MinCosPA) {
LOG(debug) << "v0sel.getDCA() = " << v0sel.getDCA() << " max is " << mK0MaxDCA << " returning ... ";
}
if (v0sel.getCosPA() > mK0MinCosPA) {
LOG(debug) << "v0sel.getCosPA() = " << v0sel.getCosPA() << " min is " << mK0MinCosPA << " returning ... ";
}
return false;
}
// get the corresponding PV
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ void ITSTPCMatchingQCDevice::init(InitContext& /*ic*/)
mMatchITSTPCQC->setMinTPCOccPbPb(params.minTPCOccPbPb);
mMatchITSTPCQC->setMaxTPCOccPbPb(params.maxTPCOccPbPb);
mMatchITSTPCQC->setNBinsTPCOccPbPb(params.nBinsTPCOccPbPb);
mMatchITSTPCQC->setK0MaxDCA(params.maxK0DCA);
mMatchITSTPCQC->setK0MinCosPA(params.minK0CosPA);
o2::base::GRPGeomHelper::instance().setRequest(mCCDBRequest);
if (mUseMC) {
mMatchITSTPCQC->setUseMC(mUseMC);
Expand Down

0 comments on commit fc69bda

Please sign in to comment.