Skip to content

Commit

Permalink
SVERTEXER: V0 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 20, 2023
1 parent d8bf8ee commit c6a933b
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 53 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
3 changes: 2 additions & 1 deletion Detectors/Vertexing/include/DetectorsVertexing/SVertexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,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 +153,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
51 changes: 31 additions & 20 deletions Detectors/Vertexing/include/DetectorsVertexing/SVertexerParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "CommonUtils/ConfigurableParam.h"
#include "CommonUtils/ConfigurableParamHelper.h"
#include "DetectorsVertexing/SVertexHypothesis.h"
#include "CommonConstants/GeomConstants.h"
#include "DetectorsBase/Propagator.h"

namespace o2
Expand All @@ -40,6 +41,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 +53,23 @@ 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 maxV0EtaAbsDiff = 1.; ///< max absolute difference in eta for V0 before rotate into same Frame and x
float maxV0PhiAbsDiff = 2.; ///< max absolute difference in phi for V0 before rotate into same Frame and x
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 +87,19 @@ 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 = constants::geom::XTPCInnerRef; // don't use TPC standalone tracks with X exceeding this;
float mTPCTrack2Beam = 21.f; // Straight line for TPC track back to beamline
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

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 +114,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;
bool checkV0Hypothesis = true; // enable Mass Hypothesis check
bool checkV0AP = true; // enable Armenteros-Podolanski check
float pidCutsPhoton[SVertexHypothesis::NPIDParams] = {0.001, 20, 0.60, 20, 0.60, 0.0, 0.0, 0.0, 0.0}; // Photon
float pidCutsPhotonAP_qT = 0.05; // 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 c6a933b

Please sign in to comment.