3 #include "StjeParticleCollector.h"
5 #include <StJetFinder/AbstractFourVec.h>
7 #include <emulator/StMuTrackFourVec.h>
8 #include <StFourPMaker.h>
14 StjeParticleCollector::StjeParticleCollector(
const StppAnaPars* ap,
StFourPMaker* fp, ParticleList& particleList)
16 , _particleList(particleList)
21 void StjeParticleCollector::Do(
int iVertex)
23 const vector<AbstractFourVec*> &particleList = _fourPMaker->getVertexNodes()[iVertex].tracks;
25 _particleList.clear();
27 for(vector<AbstractFourVec*>::const_iterator particle = particleList.begin(); particle != particleList.end(); ++particle) {
29 if(shoudNotPassToJetFinder(*particle))
continue;
31 _particleList.push_back(*particle);
35 size_t StjeParticleCollector::numberOfVertices()
const
37 return _fourPMaker->getVertexNodes().size();
40 bool StjeParticleCollector::shoudNotPassToJetFinder(
const AbstractFourVec* particle)
const
44 if (p == 0)
return true;
46 if (p->
pt() <= _anaPar.mPtMin)
return true;
48 if (fabs(p->eta()) >= _anaPar.mEtaMax)
return true;
50 if(isChargedTrack(p)) {
53 if (track->flag() <= _anaPar.mFlagMin)
return true;
55 if (track->nHits() <= _anaPar.mNhits)
return true;
63 return p->track() != 0;
double pt() const
momenta