Skip to content

Commit 8927800

Browse files
committed
Merge branch 'cvs'
2 parents 0638dd8 + 2982d39 commit 8927800

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

StPicoDstMaker/StPicoDstMaker.cxx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -582,9 +582,6 @@ Int_t StPicoDstMaker::MakeWrite()
582582
return kStOK;
583583
}
584584

585-
mEmcCollection = mMuDst->emcCollection();
586-
if (mEmcCollection) buildEmcIndex();
587-
588585
Int_t refMult = muEvent->refMult();
589586
mBField = muEvent->magneticField();
590587

@@ -593,11 +590,19 @@ Int_t StPicoDstMaker::MakeWrite()
593590

594591
LOG_DEBUG << " eventId = " << muEvent->eventId() << " refMult = " << refMult << " vtx = " << pVtx << endm;
595592

593+
mEmcCollection = mMuDst->emcCollection();
594+
if (mEmcCollection)
595+
{
596+
// build EmcIndex before ::fillTracks()
597+
buildEmcIndex();
598+
// fill BTOW hits only if ::buildEmcIndex() has been called for this event
599+
fillBTOWHits();
600+
}
601+
596602
fillTracks();
597603
fillEvent();
598604
fillEmcTrigger();
599605
fillMtdTrigger();
600-
fillBTOWHits();
601606
fillBTofHits();
602607
fillMtdHits();
603608

@@ -1104,7 +1109,7 @@ void StPicoDstMaker::fillMtdHits()
11041109

11051110
bool StPicoDstMaker::selectVertex()
11061111
{
1107-
mMuDst->setVertexIndex(-1);
1112+
mMuDst->setVertexIndex(-2);
11081113

11091114
if (mVtxMode == PicoVtxMode::Default)
11101115
{
@@ -1140,5 +1145,5 @@ bool StPicoDstMaker::selectVertex()
11401145
}
11411146

11421147
// Retrun false if selected vertex is not valid
1143-
return mMuDst->primaryVertex() ? true : false;
1148+
return (mMuDst->currentVertexIndex() !=-2 && mMuDst->primaryVertex())? true : false;
11441149
}

0 commit comments

Comments
 (0)