1 #include "StEvent/StFstHitCollection.h"
2 #include "StEvent/StFstHit.h"
3 #include "StEvent/StFstEvtCollection.h"
4 #include "StEvent/StFstRawHit.h"
6 #include "StMuDSTMaker/COMMON/StMuFstHit.h"
7 #include "StMuDSTMaker/COMMON/StMuFstRawHit.h"
8 #include "StMuDSTMaker/COMMON/StMuFstUtil.h"
9 #include "StMuDSTMaker/COMMON/StMuFstCollection.h"
10 #include "StMuDSTMaker/COMMON/StMuDst.h"
11 #include "StMuDSTMaker/COMMON/StMuEvent.h"
12 #include "StEvent/StEvent.h"
13 #include "St_base/StMessMgr.h"
14 #include "StEvent/StEventTypes.h"
15 #include "StEvent/StTriggerData.h"
16 #include "StEvent/StContainers.h"
21 #include "TCollection.h"
22 #include "TRefArray.h"
30 StMuFstUtil::~StMuFstUtil()
36 LOG_DEBUG <<
"StMuFstUtil::getMuFst" << endm;
37 if(!fstcol)
return NULL;
39 fillMuFst(muFst,fstcol,fstevtcol);
45 if(!muFst)
return NULL;
54 LOG_INFO <<
"fillMuFst" << endm;
58 fillMuFstHits(muFst, fstcol, fstevtcol);
66 fillFstHits(fstcol, muFst);
73 LOG_INFO <<
"fillMuFstHits" << endm;
76 LOG_DEBUG <<
"fillMuFstHits (raw hits)" << endm;
77 if(fstevtcol->numberOfRawHits() > 0) {
78 const StSPtrVecFstRawHit &vecRawHit = fstevtcol->rawHits();
79 for(
unsigned int i=0; i<fstevtcol->numberOfRawHits(); i++)
82 muFstRawHit->set( vecRawHit[i] );
89 for(
int wedgeIdx=0; wedgeIdx<kFstNumWedges; wedgeIdx++ )
92 for(
int sensorIdx=0; sensorIdx<kFstNumSensorsPerWedge; sensorIdx++)
96 const StSPtrVecFstHit &vecHit = sensorHitCollection->hits();
97 for(
unsigned int i=0; i<sensorHitCollection->numberOfHits(); i++)
100 muFstHit->set( vecHit[i] );
111 TIter next(muFst->getHitArray());
113 while ((muHit = static_cast<StMuFstHit*>(next())))
115 StFstHit *newHit =
new StFstHit(muHit->getDisk(), muHit->getWedge(), muHit->getSensor(), muHit->getApv(), muHit->getCharge(), muHit->getChargeErr(), muHit->getMaxTimeBin(), muHit->getMeanRStrip(), muHit->getMeanPhiStrip(), muHit->getNRawHits(), muHit->getNRawHitsR(), muHit->getNRawHitsPhi());
116 newHit->setId(muHit->getId());
117 newHit->setIdTruth(muHit->getIdTruth());
119 newHit->setLocalPosition(muHit->localPosition(0), muHit->localPosition(1), muHit->localPosition(2));
121 fstcol->addHit(newHit);