00001
00002
00003 #include "StjFourVecCutTrgBJP.h"
00004
00005 #include <StjTrgBEMCJetPatchTowerIdMap.h>
00006
00007 #include <StjTrg.h>
00008
00009 #include <vector>
00010 #include <algorithm>
00011 #include <iostream>
00012
00013 ClassImp(StjFourVecCutTrgBJP)
00014
00015 using namespace std;
00016
00017 bool StjFourVecCutTrgBJP::operator()(const StjFourVec& p4)
00018 {
00019 if(p4.type != 2) return true;
00020 if(p4.detectorId != 9) return true;
00021 int jp = _jetPatchTowerMap->getJetPatchIdForTower(p4.towerId);
00022 vector<int> jetPatches = _trg->jetPatches();
00023 vector<int>::const_iterator it = find(jetPatches.begin(), jetPatches.end(), jp);
00024 if(it == jetPatches.end()) return true;
00025 return false;
00026 }