Skip to content

Commit

Permalink
svertex: opt fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
f3sch committed Nov 15, 2023
1 parent 403e507 commit 91ba699
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
14 changes: 8 additions & 6 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 Down Expand Up @@ -92,15 +93,16 @@ struct SVertexerParams : public o2::conf::ConfigurableParamHelper<SVertexerParam
float maxRIni3body = 90.; // don't consider as a 3body seed (circles/line intersection) if its R exceeds this

// 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 = 83.f; // don't use TPC standalone tracks with X exceeding this; 83 cm is the reference x position at minimum, hence this cuts deep conversions
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
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

// cuts on different V0 PID params
bool checkV0Hypothesis = true;
float pidCutsPhoton[SVertexHypothesis::NPIDParams] = {0.001, 20, 0.60, 0.0}; // Photon
float pidCutsPhoton[SVertexHypothesis::NPIDParams] = {0.001, 20, 0.1, 0.0}; // Photon
float pidCutsPhotonAP = 0.05; // Loose Amenteros-Podolanski cut for photons in case mass-hypothesis was good
float pidCutsK0[SVertexHypothesis::NPIDParams] = {0.003, 20, 0.07, 0.5}; // K0
float pidCutsLambda[SVertexHypothesis::NPIDParams] = {0.001, 20, 0.07, 0.5}; // Lambda
float pidCutsHTriton[SVertexHypothesis::NPIDParams] = {0.0025, 14, 0.07, 0.5}; // HyperTriton
Expand Down
18 changes: 17 additions & 1 deletion Detectors/Vertexing/src/SVertexer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -576,12 +576,28 @@ bool SVertexer::checkV0(const TrackCand& seedP, const TrackCand& seedN, int iP,

bool goodHyp = false;
std::array<bool, NHypV0> hypCheckStatus{};
for (int ipid = 0; ipid < NHypV0; ipid++) {
for (int ipid = 0; ipid < NHypV0 && mSVParams->checkV0Hypothesis; ipid++) {
if (mV0Hyps[ipid].check(p2Pos, p2Neg, p2V0, ptV0)) {
goodHyp = hypCheckStatus[ipid] = true;
}
}

// apply Podolanski cut to photons
if (mSVParams->checkV0Hypothesis && hypCheckStatus[HypV0::Photon]) {
float pV0Abs = std::sqrt(p2V0);
float pPos = std::sqrt(p2Pos);
float p1 = (pV0[0] * pP[0] + pV0[1] * pP[1] + pV0[2] * pP[2]) /
(pV0Abs * pPos);
// float p2 = (pV0[0] * pN[0] + pV0[1] * pN[1] + pV0[2] * pN[2]) /
// (pV0Abs * seedN.getP());
// float pL1 = p1 * seedP.getP();
// float pL2 = p2 * seedN.getP();
float pT1 = pPos * std::sqrt(1 - p1);
if (pT1 > mSVParams->pidCutsPhotonAP) {
hypCheckStatus[HypV0::Photon] = false;
}
}

// apply mass selections for 3-body decay
bool good3bodyV0Hyp = false;
for (int ipid = 2; ipid < 4; ipid++) {
Expand Down

0 comments on commit 91ba699

Please sign in to comment.