60 #include "StEventTypes.h"
64 const StSPtrVecPrimaryTrack& tracks = primVtx->daughters();
65 size_t countedTracks = 0;
66 for (StSPtrVecPrimaryTrackConstIterator iter = tracks.begin(); iter != tracks.end(); iter++) {
69 if (track->flag()<0 || track->geometry()->charge()>0 || track->fitTraits().numberOfFitPoints()<10 )
continue;
71 if (fabs(track->geometry()->momentum().mag())<1.e-10)
continue;
72 if (fabs(track->geometry()->momentum().pseudoRapidity())>0.5)
continue;
74 if (track->geometry()->helix().
distance(primVtx->position())<3) ++countedTracks;
80 uncorrectedNumberOfNegativePrimaries(
const StEvent& evt,
int vtx_id = 0)
84 if (!primVtx)
return 0;
85 return uncorrectedNumberOfNegativePrimaries(primVtx);
90 const StSPtrVecPrimaryTrack& tracks = primVtx->daughters();
91 size_t countedTracks = 0;
92 for (StSPtrVecPrimaryTrackConstIterator iter = tracks.begin(); iter != tracks.end(); iter++) {
95 if (track->flag()<0 || track->geometry()->charge()<0 || track->fitTraits().numberOfFitPoints()<10 )
continue;
97 if (fabs(track->geometry()->momentum().mag())<=1.e-10)
continue;
98 if (fabs(track->geometry()->momentum().pseudoRapidity())>0.5)
continue;
100 if (track->geometry()->helix().
distance(primVtx->position())<3) ++countedTracks;
102 return countedTracks;
106 uncorrectedNumberOfPositivePrimaries(
const StEvent& evt,
int vtx_id = 0)
110 if (!primVtx)
return 0;
112 return uncorrectedNumberOfPositivePrimaries(primVtx);
116 uncorrectedNumberOfPrimaries(
const StEvent& evt,
int vtx_id = 0)
120 if (!primVtx)
return 0;
122 return uncorrectedNumberOfPositivePrimaries(primVtx) + uncorrectedNumberOfNegativePrimaries(primVtx);
double distance(const StThreeVector< double > &p, bool scanPeriods=true) const
minimal distance between point and helix