StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjFourVecCutTrgBHT.cxx
1 // $Id: StjFourVecCutTrgBHT.cxx,v 1.1 2008/11/27 07:29:50 tai Exp $
2 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
3 #include "StjFourVecCutTrgBHT.h"
4 
5 #include <StjTrg.h>
6 
7 #include <vector>
8 #include <algorithm>
9 
10 ClassImp(StjFourVecCutTrgBHT)
11 
12 using namespace std;
13 
14 bool StjFourVecCutTrgBHT::operator()(const StjFourVec& p4)
15 {
16  if(p4.type != 2) return true;
17  if(p4.detectorId != 9) return true;
18  vector<int> towers = _trg->towers();
19  vector<int>::const_iterator it = find(towers.begin(), towers.end(), p4.towerId);
20  if(it == towers.end()) return true;
21  return false;
22 }