2 #include "StjeJetCuts.h"
4 #include <StJetFinder/StProtoJet.h>
5 #include <StJetFinder/StJetPars.h>
12 StjeJetCuts::StjeJetCuts(
const StppAnaPars* ap, ProtoJetList& protoJets)
13 : _protoJetList(protoJets)
19 StjeJetCuts::~StjeJetCuts()
24 void StjeJetCuts::Apply()
28 for (ProtoJetList::iterator jet = _protoJetList.begin(); jet != _protoJetList.end(); ++jet) {
30 if(shouldNotKeep(*jet))
continue;
32 newList.push_back(*jet);
36 _protoJetList.clear();
38 copy(newList.begin(), newList.end(), back_inserter(_protoJetList));
41 bool StjeJetCuts::shouldNotKeep(
StProtoJet &pj)
43 if(pj.pt() <= _anaPar.mJetPtMin)
return true;
45 if(fabs(pj.eta()) >= _anaPar.mJetEtaMax)
return true;
47 if(fabs(pj.eta()) <= _anaPar.mJetEtaMin)
return true;
49 if((
int)pj.numberOfParticles() < _anaPar.mJetNmin)
return true;