Skip to content

Commit 9e3673d

Browse files
author
David Dobrigkeit Chinellato
committed
Tighter windows when doing decay chains
1 parent 93573a8 commit 9e3673d

4 files changed

Lines changed: 44 additions & 21 deletions

File tree

Detectors/Vertexing/include/DetectorsVertexing/SVertexHypothesis.h

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,16 @@ class SVertexHypothesis
3333
enum PIDParams { SigmaM, // sigma of mass res at 0 pt
3434
NSigmaM, // number of sigmas of mass res
3535
MarginM, // additive safety margin in mass cut
36+
NSigmaTightM, // number of sigmas of mass res when doing tight cut around mass (V0s used in cascades)
37+
MarginTightM, // additive safety margin in mass cut when doing tight cut around mass (V0s used in cascades)
3638
CPt, // pT dependence of mass resolution parameterized as mSigma*(1+mC1*pt);
3739
CPt1,
3840
CPt2,
3941
CPt3 }; // pT dependence of mass resolution of Cascade parameterized as CPt+CPt1*pt +CPt2*TMath::Exp(-CPt3*pt);
4042

41-
static constexpr int NPIDParams = 7;
43+
static constexpr int NPIDParams = 9;
4244

43-
void set(PID v0, PID ppos, PID pneg, float sig, float nSig, float margin, float cpt, float cpt1, float cpt2, float cpt3, float bz = 0.f, float maxSigma = 0.01);
45+
void set(PID v0, PID ppos, PID pneg, float sig, float nSig, float margin, float nSigTight, float marginTight, float cpt, float cpt1, float cpt2, float cpt3, float bz = 0.f, float maxSigma = 0.01);
4446
void set(PID v0, PID ppos, PID pneg, const float pars[NPIDParams], float bz = 0.f, float maxSigma = 0.01);
4547

4648
float getMassV0Hyp() const { return PID::getMass(mPIDV0); }
@@ -60,28 +62,43 @@ class SVertexHypothesis
6062
{ // check if given mass and pt is matching to hypothesis
6163
return check(calcMass(p2Pos, p2Neg, p2V0), ptV0);
6264
}
63-
6465
bool check(float mass, float pt) const
6566
{ // check if given mass and pt is matching to hypothesis
6667
return std::abs(mass - getMassV0Hyp()) < getMargin(pt);
6768
}
6869

70+
bool checkTight(float p2Pos, float p2Neg, float p2V0, float ptV0) const
71+
{ // check if given mass and pt is matching to hypothesis
72+
return checkTight(calcMass(p2Pos, p2Neg, p2V0), ptV0);
73+
}
74+
bool checkTight(float mass, float pt) const
75+
{ // check if given mass and pt is matching to hypothesis
76+
return std::abs(mass - getMassV0Hyp()) < getMarginTight(pt);
77+
}
78+
6979
float getSigmaV0Cascade(float pt) const { return mPars[CPt] + mPars[CPt1] * pt + mPars[CPt2] * std::exp(-mPars[CPt3] * pt); }
7080
float getSigma(float pt) const { return mPars[SigmaM] * (1.f + mPars[CPt] * pt); }
71-
float getMargin(float pt) const
81+
float getMargin(float pt, bool tight = false) const
7282
{
83+
int idxNsigma = NSigmaM;
84+
int idxMargin = MarginM;
85+
if(tight){ // move to indices for tight variables in case asked to do so (tighter peak cuts for decay chains)
86+
idxNsigma = NSigmaTightM;
87+
idxMargin = MarginTightM;
88+
}
7389
if (mPIDV0 == PID::XiMinus || mPIDV0 == PID::OmegaMinus) { // case for cascades, antiparticles included
7490
if (getSigmaV0Cascade(pt) > maxSigma) { // insuring that at low pt one gets reasonable width as the parametrisation function may explode to unphysical values
75-
return mPars[NSigmaM] * maxSigma + mPars[MarginM];
91+
return mPars[idxNsigma] * maxSigma + mPars[idxMargin];
7692
} else {
77-
return mPars[NSigmaM] * getSigmaV0Cascade(pt) + mPars[MarginM];
93+
return mPars[idxNsigma] * getSigmaV0Cascade(pt) + mPars[idxMargin];
7894
}
7995
} else if (mPIDV0 == PID::K0 || mPIDV0 == PID::Lambda) { // case for V0s, AntiLambda is included in PID::Lambda
80-
return mPars[NSigmaM] * getSigmaV0Cascade(pt) + mPars[MarginM];
96+
return mPars[idxNsigma] * getSigmaV0Cascade(pt) + mPars[idxMargin];
8197
} else {
82-
return mPars[NSigmaM] * getSigma(pt) + mPars[MarginM]; // case for HyperTriton and Hyperhydrog4
98+
return mPars[idxNsigma] * getSigma(pt) + mPars[idxMargin]; // case for HyperTriton and Hyperhydrog4
8399
}
84100
}
101+
float getMarginTight(float pt) const { return getMargin(pt, true); }
85102

86103
private:
87104
float getMass2PosProng() const { return PID::getMass2(mPIDPosProng); }

Detectors/Vertexing/include/DetectorsVertexing/SVertexerParams.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,17 @@ struct SVertexerParams : public o2::conf::ConfigurableParamHelper<SVertexerParam
9696

9797
// cuts on different V0 PID params
9898
bool checkV0Hypothesis = true;
99-
float pidCutsPhoton[SVertexHypothesis::NPIDParams] = {0.001, 20, 0.60, 0.0, 0.0, 0.0, 0.0}; // Photon
100-
float pidCutsK0[SVertexHypothesis::NPIDParams] = {0., 20, 0., 2.84798e-03, 9.84206e-04, 3.31951e-03, 2.39438}; // K0
101-
float pidCutsLambda[SVertexHypothesis::NPIDParams] = {0., 20, 0., 1.09004e-03, 2.62291e-04, 8.93179e-03, 2.83121}; // Lambda
102-
float pidCutsHTriton[SVertexHypothesis::NPIDParams] = {0.0025, 14, 0.07, 0.5, 0.0, 0.0, 0.0}; // HyperTriton
103-
float pidCutsHhydrog4[SVertexHypothesis::NPIDParams] = {0.0025, 14, 0.07, 0.5, 0.0, 0.0, 0.0}; // Hyperhydrog4 - Need to update
99+
float pidCutsPhoton[SVertexHypothesis::NPIDParams] = {0.001, 20, 0.60, 20, 0.60, 0.0, 0.0, 0.0, 0.0}; // Photon
100+
float pidCutsK0[SVertexHypothesis::NPIDParams] = {0., 20, 0., 4.0, 0.0, 2.84798e-03, 9.84206e-04, 3.31951e-03, 2.39438}; // K0
101+
float pidCutsLambda[SVertexHypothesis::NPIDParams] = {0., 20, 0., 4.0, 0.0, 1.09004e-03, 2.62291e-04, 8.93179e-03, 2.83121}; // Lambda
102+
float pidCutsHTriton[SVertexHypothesis::NPIDParams] = {0.0025, 14, 0.07, 14, 0.0, 0.5, 0.0, 0.0, 0.0}; // HyperTriton
103+
float pidCutsHhydrog4[SVertexHypothesis::NPIDParams] = {0.0025, 14, 0.07, 14, 0.0, 0.5, 0.0, 0.0, 0.0}; // Hyperhydrog4 - Need to update
104104
//
105105
// cuts on different Cascade PID params
106106
bool checkCascadeHypothesis = true;
107-
float pidCutsXiMinus[SVertexHypothesis::NPIDParams] = {0.0, 10, 0.0, 1.56315e-03, 2.23279e-04, 2.75136e-02, 3.309}; // XiMinus
108-
float pidCutsOmegaMinus[SVertexHypothesis::NPIDParams] = {0.0, 10, 0.0, 1.43572e-03, 6.94416e-04, 2.13534e+05, 1.48889e+01}; // OmegaMinus
107+
float pidCutsXiMinus[SVertexHypothesis::NPIDParams] = {0.0, 10, 0.0, 4.0, 0.0, 1.56315e-03, 2.23279e-04, 2.75136e-02, 3.309}; // XiMinus
108+
float pidCutsOmegaMinus[SVertexHypothesis::NPIDParams] = {0.0, 10, 0.0, 4.0, 0.0, 1.43572e-03, 6.94416e-04, 2.13534e+05, 1.48889e+01}; // OmegaMinus
109+
float maximalCascadeWidth = 0.006;
109110
//
110111
// cuts on different 3 body PID params
111112
bool check3bodyHypothesis = true;

Detectors/Vertexing/src/SVertexHypothesis.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@
1717

1818
using namespace o2::vertexing;
1919

20-
void SVertexHypothesis::set(PID v0, PID ppos, PID pneg, float sig, float nSig, float margin, float cpt, float cpt1, float cpt2, float cpt3, float bz, float maxSigma)
20+
void SVertexHypothesis::set(PID v0, PID ppos, PID pneg, float sig, float nSig, float margin, float nSigTight, float marginTight, float cpt, float cpt1, float cpt2, float cpt3, float bz, float maxSigma)
2121
{
2222
mPIDV0 = v0;
2323
mPIDPosProng = ppos;
2424
mPIDNegProng = pneg;
2525
mPars[SigmaM] = sig;
2626
mPars[NSigmaM] = nSig;
2727
mPars[MarginM] = margin;
28+
mPars[NSigmaTightM] = nSigTight;
29+
mPars[MarginTightM] = marginTight;
2830
mPars[CPt] = cpt;
2931
mPars[CPt1] = cpt1;
3032
mPars[CPt2] = cpt2;
@@ -37,7 +39,7 @@ void SVertexHypothesis::set(PID v0, PID ppos, PID pneg, float sig, float nSig, f
3739

3840
void SVertexHypothesis::set(PID v0, PID ppos, PID pneg, const float pars[NPIDParams], float bz, float maxSigma)
3941
{
40-
set(v0, ppos, pneg, pars[SigmaM], pars[NSigmaM], pars[MarginM], pars[CPt], pars[CPt1], pars[CPt2], pars[CPt3], bz, maxSigma);
42+
set(v0, ppos, pneg, pars[SigmaM], pars[NSigmaM], pars[MarginM], pars[NSigmaTightM], pars[MarginTightM], pars[CPt], pars[CPt1], pars[CPt2], pars[CPt3], bz, maxSigma);
4143
}
4244

4345
void SVertex3Hypothesis::set(PID v0, PID ppos, PID pneg, PID pbach, float sig, float nSig, float margin, float cpt, float bz)

Detectors/Vertexing/src/SVertexer.cxx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,11 +561,14 @@ bool SVertexer::checkV0(const TrackCand& seedP, const TrackCand& seedN, int iP,
561561
float p2Pos = pP[0] * pP[0] + pP[1] * pP[1] + pP[2] * pP[2], p2Neg = pN[0] * pN[0] + pN[1] * pN[1] + pN[2] * pN[2];
562562

563563
bool goodHyp = false;
564-
std::array<bool, NHypV0> hypCheckStatus{};
564+
std::array<bool, NHypV0> hypCheckStatus{}, hypCheckTightStatus{};
565565
for (int ipid = 0; ipid < NHypV0; ipid++) {
566566
if (mV0Hyps[ipid].check(p2Pos, p2Neg, p2V0, ptV0)) {
567567
goodHyp = hypCheckStatus[ipid] = true;
568568
}
569+
if (mV0Hyps[ipid].checkTight(p2Pos, p2Neg, p2V0, ptV0)) {
570+
hypCheckTightStatus[ipid] = true;
571+
}
569572
}
570573

571574
// apply mass selections for 3-body decay
@@ -581,7 +584,7 @@ bool SVertexer::checkV0(const TrackCand& seedP, const TrackCand& seedN, int iP,
581584
// we want to reconstruct the 3 body decay of hypernuclei starting from the V0 of a proton and a pion (e.g. H3L->d + (p + pi-), or He4L->He3 + (p + pi-)))
582585
bool checkFor3BodyDecays = mEnable3BodyDecays && (!mSVParams->checkV0Hypothesis || good3bodyV0Hyp) && (pt2V0 > 0.5);
583586
bool rejectAfter3BodyCheck = false; // To reject v0s which can be 3-body decay candidates but not cascade or v0
584-
bool checkForCascade = mEnableCascades && r2v0 < mMaxR2ToMeanVertexCascV0 && (!mSVParams->checkV0Hypothesis || (hypCheckStatus[HypV0::Lambda] || hypCheckStatus[HypV0::AntiLambda]));
587+
bool checkForCascade = mEnableCascades && r2v0 < mMaxR2ToMeanVertexCascV0 && (!mSVParams->checkV0Hypothesis || (hypCheckTightStatus[HypV0::Lambda] || hypCheckTightStatus[HypV0::AntiLambda]));
585588
bool rejectIfNotCascade = false;
586589

587590
if (!goodHyp && mSVParams->checkV0Hypothesis) {
@@ -673,10 +676,10 @@ bool SVertexer::checkV0(const TrackCand& seedP, const TrackCand& seedN, int iP,
673676
// check cascades
674677
int nCascIni = mCascadesIdxTmp[ithread].size(), nV0Used = 0; // number of times this particular v0 (with assigned PV) was used (not counting using its clones with other PV)
675678
if (checkForCascade) {
676-
if (hypCheckStatus[HypV0::Lambda] || !mSVParams->checkCascadeHypothesis) {
679+
if (hypCheckTightStatus[HypV0::Lambda] || !mSVParams->checkCascadeHypothesis) {
677680
nV0Used += checkCascades(v0Idxnew, v0new, rv0, pV0, p2V0, iN, NEG, vlist, ithread);
678681
}
679-
if (hypCheckStatus[HypV0::AntiLambda] || !mSVParams->checkCascadeHypothesis) {
682+
if (hypCheckTightStatus[HypV0::AntiLambda] || !mSVParams->checkCascadeHypothesis) {
680683
nV0Used += checkCascades(v0Idxnew, v0new, rv0, pV0, p2V0, iP, POS, vlist, ithread);
681684
}
682685
}

0 commit comments

Comments
 (0)