00001
00002
00003
00004 #ifndef STJMCPARTICLECUTFIRSTMOTHERID_H
00005 #define STJMCPARTICLECUTFIRSTMOTHERID_H
00006
00007 #include "StjMCParticleCut.h"
00008
00009 #include <set>
00010
00011 class StjMCParticleCutFirstMotherId : public StjMCParticleCut {
00012
00013 public:
00014 StjMCParticleCutFirstMotherId(int goodFirstMotherId = 1)
00015 : _goodFirstMotherIdSet(&goodFirstMotherId, &goodFirstMotherId + 1) { }
00016 StjMCParticleCutFirstMotherId(int nGoodFirstMotherIdes, int* goodFirstMotherIdes)
00017 : _goodFirstMotherIdSet(goodFirstMotherIdes, goodFirstMotherIdes + nGoodFirstMotherIdes) { }
00018 virtual ~StjMCParticleCutFirstMotherId() { }
00019
00020 bool operator()(const StjMCParticle& p4)
00021 {
00022 if( _goodFirstMotherIdSet.count(p4.firstMotherId) == 0 ) return true;
00023
00024 return false;
00025 }
00026
00027 private:
00028
00029 std::set<int> _goodFirstMotherIdSet;
00030 ClassDef(StjMCParticleCutFirstMotherId, 1)
00031
00032 };
00033
00034 #endif // STJMCPARTICLECUTFIRSTMOTHERID_H