5 #include "StContainers.h"
6 #include "StTrackNode.h"
8 #include "StTrackDetectorInfo.h"
11 size_t buildRecHitTrackMap(
const StSPtrVecTrackNode& nodes,map<StHit*,StTrack*>& htMap){
12 size_t failedInserts = 0;
13 for (
size_t it = 0; it<nodes.size(); ++it) {
15 if (! track)
continue;
16 if (track->flag() <= 0)
continue;
17 if (! track->detectorInfo())
continue;
18 StPtrVecHit hits = track->detectorInfo()->hits(kTpcId);
19 for (StPtrVecHitIterator hIterTrk = hits.begin(); hIterTrk != hits.end(); ++hIterTrk) {
21 pair<map<StHit*,StTrack*>::iterator,
bool> insRes = htMap.insert(map<StHit*,StTrack*>::value_type(hit,track));
22 if (insRes.second==
false) ++failedInserts;