00001
00002
00003 #include "StjMCParticleListCut.h"
00004
00005 ClassImp(StjMCParticleListCut)
00006
00007 using namespace std;
00008
00009 StjMCParticleList StjMCParticleListCut::operator()(const StjMCParticleList &aList)
00010 {
00011 StjMCParticleList ret;
00012
00013 for(StjMCParticleList::const_iterator it = aList.begin(); it != aList.end(); ++it) {
00014
00015 if(shouldNotKeep(*it)) continue;
00016
00017 ret.push_back(*it);
00018 }
00019
00020 return ret;
00021 }
00022
00023
00024 bool StjMCParticleListCut::shouldNotKeep(const StjMCParticle& p4)
00025 {
00026 for(CutList::iterator cut = _cutList.begin(); cut != _cutList.end(); ++cut){
00027 if((**cut)(p4)) return true;
00028 }
00029
00030 return false;
00031 }