Skip to content

Commit

Permalink
SVERTEXER: Recover ITSonly OB tracks for PCM
Browse files Browse the repository at this point in the history
  • Loading branch information
f3sch committed Dec 7, 2023
1 parent 21f9731 commit f1c7bfb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions Detectors/Vertexing/include/DetectorsVertexing/SVertexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class SVertexer
bool hasTPC = false;
int8_t nITSclu = -1;
bool compatibleProton = false; // dE/dx compatibility with proton hypothesis (FIXME: use better, uint8_t compat mask?)
bool bITSOB = false; // ITS-only OB track, important for photons converting at tungsten wires
bool hasITS() const
{
return nITSclu > 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ struct SVertexerParams : public o2::conf::ConfigurableParamHelper<SVertexerParam
float mTPCTrackMaxDXYIni = 8.; ///< don't consider as a seed (circles intersection) if XY distance exceeds this, for photon TPC-only track only
float mTPCTrackMaxDCAXY2ToMeanVertex = 2.; ///< max DCA^2 of V0 from beam line (mean vertex) for prompt V0 candidates, for photon TPC-only track only

bool mITSTrackPhotonTune = true; // use ITS-only photon tuning
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.
bool mRequireTPCforCascBaryons = true; // require that baryon daughter of cascade has TPC
Expand Down
12 changes: 9 additions & 3 deletions Detectors/Vertexing/src/SVertexer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -513,16 +513,19 @@ void SVertexer::buildT2V(const o2::globaltracking::RecoContainer& recoData) // a

// get Nclusters in the ITS if available
int8_t nITSclu = -1;
bool bITSOBonly = false;
auto itsGID = recoData.getITSContributorGID(tvid);
if (itsGID.getSource() == GIndex::ITS) {
if (isITSloaded) {
auto& itsTrack = recoData.getITSTrack(itsGID);
nITSclu = itsTrack.getNumberOfClusters();
bITSOBonly = itsTrack.getFirstClusterLayer() > 3;
}
} else if (itsGID.getSource() == GIndex::ITSAB) {
if (isITSTPCloaded) {
auto& itsABTracklet = recoData.getITSABRef(itsGID);
nITSclu = itsABTracklet.getNClusters();
bITSOBonly = itsABTracklet.getFirstEntry() > 3;
}
}
if (!acceptTrack(tvid, trc) && !heavyIonisingParticle) {
Expand All @@ -532,13 +535,13 @@ void SVertexer::buildT2V(const o2::globaltracking::RecoContainer& recoData) // a
continue;
}

if (!hasTPC && nITSclu < mSVParams->mITSSAminNclu) {
if (!hasTPC && ((nITSclu < mSVParams->mITSSAminNclu) && !(mSVParams->mITSTrackPhotonTune && bITSOBonly))) {
continue; // reject short ITS-only
}

int posneg = trc.getSign() < 0 ? 1 : 0;
float r = std::sqrt(trc.getX() * trc.getX() + trc.getY() * trc.getY());
mTracksPool[posneg].emplace_back(TrackCand{trc, tvid, {iv, iv}, r, hasTPC, nITSclu, compatibleWithProton});
mTracksPool[posneg].emplace_back(TrackCand{trc, tvid, {iv, iv}, r, hasTPC, nITSclu, compatibleWithProton, bITSOBonly});
if (tvid.getSource() == GIndex::TPC) { // constrained TPC track?
correctTPCTrack(mTracksPool[posneg].back(), mTPCTracksArray[tvid], -1, -1);
}
Expand Down Expand Up @@ -570,6 +573,7 @@ bool SVertexer::checkV0(const TrackCand& seedP, const TrackCand& seedN, int iP,
auto& fitterV0 = mFitterV0[ithread];
// Fast rough cuts on pairs before feeding to DCAFitter, tracks are not in the same Frame or at same X
bool isTPConly = (seedP.gid.getSource() == GIndex::TPC || seedN.gid.getSource() == GIndex::TPC);
bool isITSOBonly = (seedP.bITSOB || seedN.bITSOB);
if (mSVParams->mTPCTrackPhotonTune && isTPConly) {
// Check if Tgl is close enough
if (std::abs(seedP.getTgl() - seedN.getTgl()) > mSVParams->maxV0TglAbsDiff) {
Expand Down Expand Up @@ -661,7 +665,7 @@ bool SVertexer::checkV0(const TrackCand& seedP, const TrackCand& seedN, int iP,

bool goodHyp = false;
std::array<bool, NHypV0> hypCheckStatus{};
int nPID = (mSVParams->mTPCTrackPhotonTune && isTPConly) ? (Photon + 1) : NHypV0;
int nPID = ((mSVParams->mTPCTrackPhotonTune && isTPConly) || (mSVParams->mITSTrackPhotonTune && isITSOBonly)) ? (Photon + 1) : NHypV0;
for (int ipid = 0; (ipid < nPID) && mSVParams->checkV0Hypothesis; ipid++) {
if (mV0Hyps[ipid].check(p2Pos, p2Neg, p2V0, ptV0)) {
goodHyp = hypCheckStatus[ipid] = true;
Expand Down Expand Up @@ -726,11 +730,13 @@ bool SVertexer::checkV0(const TrackCand& seedP, const TrackCand& seedN, int iP,

// 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-)))
bool checkFor3BodyDecays = mEnable3BodyDecays &&
(!mSVParams->mITSTrackPhotonTune || !isITSOBonly) &&
(!mSVParams->checkV0Hypothesis || good3bodyV0Hyp) &&
(pt2V0 > 0.5) &&
(!mSVParams->mSkipTPCOnly3Body || !isTPConly);
bool rejectAfter3BodyCheck = false; // To reject v0s which can be 3-body decay candidates but not cascade or v0
bool checkForCascade = mEnableCascades &&
(!mSVParams->mITSTrackPhotonTune || !isITSOBonly) &&
(!mSVParams->mSkipTPCOnlyCascade || !usesTPCOnly) &&
r2v0 < mMaxR2ToMeanVertexCascV0 &&
(!mSVParams->checkV0Hypothesis || (goodLamForCascade || goodALamForCascade) &&
Expand Down

0 comments on commit f1c7bfb

Please sign in to comment.