Skip to content

Commit b401ce6

Browse files
nigmatkulovplexoos
authored andcommitted
Fix of the missing FXT vertex selection mode due to the version missmatch.
1 parent 4d048ed commit b401ce6

File tree

2 files changed

+47
-4
lines changed

2 files changed

+47
-4
lines changed

StRoot/StPicoDstMaker/StPicoDstMaker.cxx

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,18 @@ Int_t StPicoDstMaker::setVtxModeAttr(){
368368
LOG_INFO << " PicoVtxVpdOrDefault is being used " << endm;
369369
return kStOK;
370370
}
371+
else if (strcasecmp(SAttr("PicoVtxMode"), "PicoVtxFXT") == 0) {
372+
setVtxMode( PicoVtxMode::FXT );
373+
LOG_INFO << " PicoVtxFXT is being used " << endm;
374+
return kStOK;
375+
}
376+
#if !defined (__TFG__VERSION__)
377+
else if (strcasecmp(SAttr("PicoVtxMode"), "PicoVtxMtd") == 0) {
378+
setVtxMode( PicoVtxMode::Mtd );
379+
LOG_INFO << " PicoVtxMtd is being used " << endm;
380+
return kStOK;
381+
}
382+
#endif /* !__TFG__VERSION__ */
371383

372384
return kStErr;
373385
}
@@ -2369,7 +2381,27 @@ bool StPicoDstMaker::selectVertex() {
23692381
mMuDst->setVertexIndex(0);
23702382
selectedVertex = mMuDst->primaryVertex();
23712383
}
2372-
else if (mVtxMode == PicoVtxMode::Vpd || mVtxMode == PicoVtxMode::VpdOrDefault) {
2384+
else if ( mVtxMode == PicoVtxMode::FXT ) {
2385+
2386+
// Loop over primary vertices
2387+
for (unsigned int iVtx = 0; iVtx < mMuDst->numberOfPrimaryVertices(); ++iVtx) {
2388+
2389+
// Return pointer to i-th primary vertex
2390+
StMuPrimaryVertex* vtx = mMuDst->primaryVertex(iVtx);
2391+
if (!vtx) continue;
2392+
2393+
// Check TpcVz and VpdVz difference
2394+
if (vtx->position().z() > 198. && vtx->position().z() < 202.) {
2395+
// Reset vertex index
2396+
mMuDst->setVertexIndex( iVtx );
2397+
// Reset pointer to the primary vertex
2398+
selectedVertex = mMuDst->primaryVertex();
2399+
// Quit vertex loop
2400+
break;
2401+
}
2402+
}
2403+
}
2404+
else if ( mVtxMode == PicoVtxMode::Vpd || mVtxMode == PicoVtxMode::VpdOrDefault ) {
23732405

23742406
// For VpdOrDefault option one will take the first primary
23752407
// vertex if no TOF or VPD information is available

StRoot/StPicoDstMaker/StPicoDstMaker.h

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
* c) Vpd - checks if BTof info is available then loops over primary
1616
* vertices and checks if |Vz - VpdVz|<mTpcVpdVzDiffCut. The first
1717
* vertex that satisfies the cut is selected.
18+
* d) Mtd - sets the first primary vertex as a default and then loops
19+
* over all primary vertices. The first one that has at least
20+
* 2 MTD-matched primary tracks is selected.
21+
* e) FXT - set the first vertex that was reconstructed in z
22+
* from 198 to 202 cm along z axis.
1823
* Default is NotSet. In this case the program execution will be terminated.
1924
* Has to be explicitly set.
2025
*
@@ -74,8 +79,14 @@ class StPicoDstMaker : public StMaker {
7479
/// Write/Read mode: 1-write, 2-read
7580
enum PicoIoMode {IoWrite=1, IoRead=2};
7681
#if !defined (__TFG__VERSION__)
77-
/// Primary vertex selection mode: 0-NotSet, 1-Default, 2-Vpd, 3-VpdOrDefault
78-
enum PicoVtxMode {NotSet=0, Default=1, Vpd=2, VpdOrDefault=3};
82+
/// Primary vertex selection mode
83+
/// \par 0 NotSet
84+
/// \par 1 Default
85+
/// \par 2 Vpd
86+
/// \par 3 VpdOrDefault
87+
/// \par 4 Mtd
88+
/// \par 5 FXT
89+
enum PicoVtxMode {NotSet=0, Default=1, Vpd=2, VpdOrDefault=3, Mtd=4, FXT=5};
7990
#endif /* ! __TFG__VERSION__ */
8091
/// Write or not write covariance matrix: 0-skip, 1-write
8192
enum PicoCovMtxMode {Skip=0, Write=1};
@@ -320,7 +331,7 @@ class StPicoDstMaker : public StMaker {
320331

321332
/// Get CVS status
322333
virtual const char *GetCVS() const {
323-
static const char cvs[]="Tag $Name: $ $Id: StPicoDstMaker.h,v 1.26 2020/02/14 17:05:53 gnigmat Exp $ built " __DATE__ " " __TIME__ ;
334+
static const char cvs[]="Tag $Name: $ $Id: StPicoDstMaker.h,v 1.30 2021/02/23 17:27:01 gnigmat Exp $ built " __DATE__ " " __TIME__ ;
324335
return cvs;
325336
}
326337

0 commit comments

Comments
 (0)