Skip to content

Commit

Permalink
Merge branch 'cvs'
Browse files Browse the repository at this point in the history
  • Loading branch information
plexoos committed Oct 4, 2016
2 parents 0638dd8 + 2982d39 commit 8927800
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions StPicoDstMaker/StPicoDstMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,6 @@ Int_t StPicoDstMaker::MakeWrite()
return kStOK;
}

mEmcCollection = mMuDst->emcCollection();
if (mEmcCollection) buildEmcIndex();

Int_t refMult = muEvent->refMult();
mBField = muEvent->magneticField();

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

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

mEmcCollection = mMuDst->emcCollection();
if (mEmcCollection)
{
// build EmcIndex before ::fillTracks()
buildEmcIndex();
// fill BTOW hits only if ::buildEmcIndex() has been called for this event
fillBTOWHits();
}

fillTracks();
fillEvent();
fillEmcTrigger();
fillMtdTrigger();
fillBTOWHits();
fillBTofHits();
fillMtdHits();

Expand Down Expand Up @@ -1104,7 +1109,7 @@ void StPicoDstMaker::fillMtdHits()

bool StPicoDstMaker::selectVertex()
{
mMuDst->setVertexIndex(-1);
mMuDst->setVertexIndex(-2);

if (mVtxMode == PicoVtxMode::Default)
{
Expand Down Expand Up @@ -1140,5 +1145,5 @@ bool StPicoDstMaker::selectVertex()
}

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

0 comments on commit 8927800

Please sign in to comment.