Skip to content

Commit

Permalink
SVertexer: V0 Photon tuning
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com>
  • Loading branch information
f3sch committed Nov 28, 2023
1 parent 1360d47 commit 1449089
Show file tree
Hide file tree
Showing 5 changed files with 200 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ struct StrangenessTrackingParamConfig : public o2::conf::ConfigurableParamHelper
float mMinMotherClus = 3.; // minimum number of cluster to be attached to the mother
float mMaxChi2 = 50; // Maximum matching chi2
bool mVertexMatching = true; // Flag to enable/disable vertex matching
bool mSkipTPC = true; // Flag to enable/disable TPC only tracks

O2ParamDef(StrangenessTrackingParamConfig, "strtracker");
};

} // namespace strangeness_tracking
} // namespace o2
#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ void StrangenessTracker::prepareITStracks() // sort tracks by eta and phi and se

void StrangenessTracker::processV0(int iv0, const V0& v0, const V0Index& v0Idx, int iThread)
{
if (mStrParams->mSkipTPC && (v0Idx.getProngID(kV0DauNeg).getSource() == GIndex::TPC || v0Idx.getProngID(kV0DauPos).getSource() == GIndex::TPC)) {
return;
}
ClusAttachments structClus;
auto& daughterTracks = mDaughterTracks[iThread];
daughterTracks.resize(2); // resize to 2 prongs: first positive second negative
Expand Down Expand Up @@ -205,10 +208,10 @@ void StrangenessTracker::processCascade(int iCasc, const Cascade& casc, const Ca
}
decayVtxTrackClone.getPxPyPzGlo(strangeTrack.mDecayMom);
std::array<float, 3> momV0, mombach;
mFitter3Body[iThread].getTrack(0).getPxPyPzGlo(momV0); // V0 momentum at decay vertex
mFitter3Body[iThread].getTrack(1).getPxPyPzGlo(mombach); // bachelor momentum at decay vertex
strangeTrack.mMasses[0] = calcMotherMass(momV0, mombach, PID::Lambda, PID::Pion); // Xi invariant mass at decay vertex
strangeTrack.mMasses[1] = calcMotherMass(momV0, mombach, PID::Lambda, PID::Kaon); // Omega invariant mass at decay vertex
mFitter3Body[iThread].getTrack(0).getPxPyPzGlo(momV0); // V0 momentum at decay vertex
mFitter3Body[iThread].getTrack(1).getPxPyPzGlo(mombach); // bachelor momentum at decay vertex
strangeTrack.mMasses[0] = calcMotherMass(momV0, mombach, PID::Lambda, PID::Pion); // Xi invariant mass at decay vertex
strangeTrack.mMasses[1] = calcMotherMass(momV0, mombach, PID::Lambda, PID::Kaon); // Omega invariant mass at decay vertex

LOG(debug) << "ITS Track matched with a Cascade decay topology ....";
LOG(debug) << "Number of ITS track clusters attached: " << itsTrack.getNumberOfClusters();
Expand Down
10 changes: 8 additions & 2 deletions Detectors/Vertexing/include/DetectorsVertexing/SVertexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ class SVertexer
VBracket vBracket{};
float minR = 0; // track lowest point r
bool hasTPC = false;
uint8_t nITSclu = -1;
int8_t nITSclu = -1;
bool compatibleProton = false; // dE/dx compatibility with proton hypothesis (FIXME: use better, uint8_t compat mask?)
bool hasITS() const
{
return nITSclu > 0;
}
};

SVertexer(bool enabCascades = true, bool enab3body = false) : mEnableCascades{enabCascades}, mEnable3BodyDecays{enab3body}
Expand All @@ -112,6 +116,7 @@ class SVertexer
void setEnable3BodyDecays(bool v) { mEnable3BodyDecays = v; }
void init();
void process(const o2::globaltracking::RecoContainer& recoTracks, o2::framework::ProcessingContext& pc);
void produceOutput(o2::framework::ProcessingContext& pc);
int getNV0s() const { return mNV0s; }
int getNCascades() const { return mNCascades; }
int getN3Bodies() const { return mN3Bodies; }
Expand Down Expand Up @@ -152,7 +157,7 @@ class SVertexer
void setupThreads();
void buildT2V(const o2::globaltracking::RecoContainer& recoTracks);
void updateTimeDependentParams();
bool acceptTrack(GIndex gid, const o2::track::TrackParCov& trc) const;
bool acceptTrack(const GIndex gid, const o2::track::TrackParCov& trc) const;
bool processTPCTrack(const o2::tpc::TrackTPC& trTPC, GIndex gid, int vtxid);
float correctTPCTrack(TrackCand& trc, const o2::tpc::TrackTPC& tTPC, float tmus, float tmusErr) const;

Expand Down Expand Up @@ -193,6 +198,7 @@ class SVertexer

int mNThreads = 1;
int mNV0s = 0, mNCascades = 0, mN3Bodies = 0, mNStrangeTracks = 0;
float mBz = 0;
float mMinR2ToMeanVertex = 0;
float mMaxDCAXY2ToMeanVertex = 0;
float mMaxDCAXY2ToMeanVertexV0Casc = 0;
Expand Down
57 changes: 36 additions & 21 deletions Detectors/Vertexing/include/DetectorsVertexing/SVertexerParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ struct SVertexerParams : public o2::conf::ConfigurableParamHelper<SVertexerParam
float minParamChange = 1e-3; ///< stop when tracks X-params being minimized change by less that this value
float minRelChi2Change = 0.9; ///< stop when chi2 changes by less than this value
float maxDZIni = 5.; ///< don't consider as a seed (circles intersection) if Z distance exceeds this
float maxDXYIni = 4.; ///< don't consider as a seed (circles intersection) if XY distance exceeds this
float maxRIni = 150; ///< don't consider as a seed (circles intersection) if its R exceeds this
//
// propagation options
Expand All @@ -51,21 +52,21 @@ struct SVertexerParams : public o2::conf::ConfigurableParamHelper<SVertexerParam
bool usePropagator = false; ///< use external propagator
bool refitWithMatCorr = false; ///< refit V0 applying material corrections
//
int maxPVContributors = 2; ///< max number PV contributors to allow in V0
float minDCAToPV = 0.05; ///< min DCA to PV of single track to accept
float minRToMeanVertex = 0.5; ///< min radial distance of V0 from beam line (mean vertex)
float maxDCAXYToMeanVertex = 0.2; ///< max DCA of V0 from beam line (mean vertex) for prompt V0 candidates
float maxDCAXYToMeanVertexV0Casc = 2.; ///< max DCA of V0 from beam line (mean vertex) for cascade V0 candidates
float maxDCAXYToMeanVertex3bodyV0 = 2; ///< max DCA of V0 from beam line (mean vertex) for 3body V0 candidates
float minPtV0 = 0.01; ///< v0 minimum pT
float minPtV0FromCascade = 0.3; ///< v0 minimum pT for v0 to be used in cascading (lowest pT Run 2 lambda: 0.4)
float maxTglV0 = 2.; ///< maximum tgLambda of V0
int maxPVContributors = 2; ///< max number PV contributors to allow in V0
float minDCAToPV = 0.05; ///< min DCA to PV of single track to accept
float minRToMeanVertex = 0.5; ///< min radial distance of V0 from beam line (mean vertex)
float maxDCAXYToMeanVertex = 0.2; ///< max DCA of V0 from beam line (mean vertex) for prompt V0 candidates
float maxDCAXYToMeanVertexV0Casc = 2.; ///< max DCA of V0 from beam line (mean vertex) for cascade V0 candidates
float maxDCAXYToMeanVertex3bodyV0 = 2.; ///< max DCA of V0 from beam line (mean vertex) for 3body V0 candidates
float minPtV0 = 0.01; ///< v0 minimum pT
float minPtV0FromCascade = 0.3; ///< v0 minimum pT for v0 to be used in cascading (lowest pT Run 2 lambda: 0.4)
float maxTglV0 = 2.; ///< maximum tgLambda of V0

float causalityRTolerance = 1.; ///< V0 radius cannot exceed its contributors minR by more than this value
float maxV0ToProngsRDiff = 50.; ///< V0 radius cannot be lower than this ammount wrt minR of contributors

float minCosPAXYMeanVertex = 0.95; ///< min cos of PA to beam line (mean vertex) in tr. plane for prompt V0 candidates
float minCosPAXYMeanVertexCascV0 = 0.8; ///< min cos of PA to beam line (mean vertex) in tr. plane for V0 of cascade cand.
float minCosPAXYMeanVertex = 0.95; ///< min cos of PA to beam line (mean vertex) in tr. plane for prompt V0 candidates
float minCosPAXYMeanVertexCascV0 = 0.8; ///< min cos of PA to beam line (mean vertex) in tr. plane for V0 of cascade cand.
float minCosPAXYMeanVertex3bodyV0 = 0.9; ///< min cos of PA to beam line (mean vertex) in tr. plane for 3body V0 cand.

float maxRToMeanVertexCascV0 = 80; // don't consider as a cascade V0 seed if above this R
Expand All @@ -83,17 +84,26 @@ struct SVertexerParams : public o2::conf::ConfigurableParamHelper<SVertexerParam
float maxDCAZ3Body = 1.; // max DCA of 3 body decay to PV in Z
float minCosPACasc = 0.7; // min cos of PA to PV for cascade candidates
float minCosPA3body = 0.8; // min cos of PA to PV for 3body decay candidates
float minPtCasc = 0.01; // cascade minimum pT
float maxTglCasc = 2.; // maximum tgLambda of cascade
float minPt3Body = 0.01; // minimum pT of 3body V0
float maxTgl3Body = 2.; // maximum tgLambda of 3body V0
float minPtCasc = 0.01; // cascade minimum pT
float maxTglCasc = 2.; // maximum tgLambda of cascade
float minPt3Body = 0.01; // minimum pT of 3body V0
float maxTgl3Body = 2.; // maximum tgLambda of 3body V0

float maxRIni3body = 90.; // don't consider as a 3body seed (circles/line intersection) if its R exceeds this

bool mExcludeTPCtracks = false; // don't loop over TPC tracks if true (if loaded, dEdx info is used instead)
float mTPCTrackMaxX = -1.f; // don't use TPC standalone tracks with X exceeding this
float minTPCdEdx = 250; // starting from this dEdx value, tracks with p > minMomTPCdEdx are always accepted
float minMomTPCdEdx = 0.8; // minimum p for tracks with dEdx > mMinTPCdEdx to be accepted
// Cuts for TPC only tracks
bool mExcludeTPCtracks = false; // don't loop over TPC tracks if true (if loaded, dEdx info is used instead)
float mTPCTrackMaxX = -1.; // don't use TPC standalone tracks with X exceeding this;
float mTPCTrack2Beam = 14.f; // straight line for TPC track back to beamline
bool mTPCTrackPhotonTune = true; // use TPC-only photon tuning
int mTPCTrackMinNClusters = -1; // minimum number of clusters
float mTPCTrackXY2Radius = 90.f; // check for realistic conversion point, e.g., in material
float mTPCTrackD2R = 4.f; // check for maximal distance of pairs and their radii
float mTPCTrackDR = 90.f; // check if preliminary conversion point can lie somewhere reasonable
float minTPCdEdx = 250; // starting from this dEdx value, tracks with p > minMomTPCdEdx are always accepted
float minMomTPCdEdx = 0.8; // minimum p for tracks with dEdx > mMinTPCdEdx to be accepted
float maxV0TglAbsDiff = 0.05; ///< max absolute difference in tgl for V0 for photons only
float maxV0PhiAbsDiff = 2.0; ///< max absolute difference in phi for V0 for photons only

uint8_t mITSSAminNclu = 6; // global requirement of at least this many ITS clusters if no TPC info present (N.B.: affects all secondary vertexing)
uint8_t mITSSAminNcluCascades = 6; // require at least this many ITS clusters if no TPC info present for cascade finding.
Expand All @@ -108,10 +118,15 @@ struct SVertexerParams : public o2::conf::ConfigurableParamHelper<SVertexerParam
float mBBpars[5] = {0.217553, 4.02762, 0.00850178, 2.33324, 0.880904};

// cuts on different V0 PID params
bool checkV0Hypothesis = true;
float pidCutsPhoton[SVertexHypothesis::NPIDParams] = {0.001, 20, 0.60, 20, 0.60, 0.0, 0.0, 0.0, 0.0}; // Photon
bool checkV0Hypothesis = true; // enable Mass Hypothesis check
bool checkV0AP = false; // enable Armenteros-Podolanski check
float pidCutsPhoton[SVertexHypothesis::NPIDParams] = {0.001, 20, 0.10, 20, 0.10, 0.0, 0.0, 0.0, 0.0}; // Photon
float pidCutsPhotonAP_qT = 0.04; // Loose Armenteros-Podolanski q_T cut for photons in case mass-hypothesis was good
float pidCutsK0[SVertexHypothesis::NPIDParams] = {0., 20, 0., 5.0, 0.0, 2.84798e-03, 9.84206e-04, 3.31951e-03, 2.39438}; // K0
float pidCutsK0AP_qT = 0.6; // Loose Armenteros-Podolanski q_T cut for K0s in case mass-hypothesis was good
float pidCutsLambda[SVertexHypothesis::NPIDParams] = {0., 20, 0., 5.0, 0.0, 1.09004e-03, 2.62291e-04, 8.93179e-03, 2.83121}; // Lambda
float pidCutsLambdaAP_qT = 0.9; // Loose Armenteros-Podolanski q_T cut for Lambda in case mass-hypothesis was good
float pidCutsLambdaAP_a = 0.9; // Loose Armenteros-Podolanski alpha cut for Lambda in case mass-hypothesis was good
float pidCutsHTriton[SVertexHypothesis::NPIDParams] = {0.0025, 14, 0.07, 14, 0.0, 0.5, 0.0, 0.0, 0.0}; // HyperTriton
float pidCutsHhydrog4[SVertexHypothesis::NPIDParams] = {0.0025, 14, 0.07, 14, 0.0, 0.5, 0.0, 0.0, 0.0}; // Hyperhydrog4 - Need to update
//
Expand Down
Loading

0 comments on commit 1449089

Please sign in to comment.