CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EgHLTDQMCut.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_EGHLTDQMCUT
2 #define DQMOFFLINE_TRIGGER_EGHLTDQMCUT
3 
4 //class: EgHLTDQMCut
5 //
6 //author: Sam Harper (June 2008)
7 //
8 //WARNING: interface is NOT final, please dont use this class for now without clearing it with me
9 // as I will change it and possibly break all your code
10 //
11 //aim: to allow the user to place a cut on the electron using it or the event
12 //
13 //implimentation:
14 
17 
19 
20 //this is a pure virtual struct which defines the interface to the cut objects
21 //it is also currently uncopyable
22 
23 namespace egHLT {
24 
25  template<class T> struct EgHLTDQMCut {
26 
27  private:
28  //disabling copy and assignment for all objects
29  EgHLTDQMCut& operator=(const EgHLTDQMCut& rhs){return *this;}
30  protected:
31  //only derived classes can call the copy constructor (needed for clone...)
32  EgHLTDQMCut(const EgHLTDQMCut& rhs){}
33 
34  public:
36  virtual ~EgHLTDQMCut(){}
37  virtual bool pass(const T& obj,const OffEvt& evt)const=0;
38  virtual EgHLTDQMCut<T>* clone()const=0; //caller owns the pointer
39  };
40 
41 
42 
43 
44  template<class T> struct EgHLTDQMVarCut : public EgHLTDQMCut<T> {
45  private:
46  int cutsToPass_; //the cuts whose eff we are measuring
47  int (T::*cutCodeFunc_)()const;
48 
49  public:
50  EgHLTDQMVarCut(int cutsToPass,int (T::*cutCodeFunc)()const):cutsToPass_(cutsToPass),cutCodeFunc_(cutCodeFunc){}
52 
53  bool pass(const T& obj,const OffEvt& evt)const;
54  EgHLTDQMCut<T>* clone()const{return new EgHLTDQMVarCut(*this);} //default copy constructor is fine
55 
56  };
57 
58  //to understand this you need to know about
59  //1) templates
60  //2) inheritance (sort of)
61  //3) function pointers
62  //4) bitwise operations
63  //All it does is get the bitword corresponding to the cuts the electron failed and the mask the bits which correspond to cuts we dont care about and then see if any bits are still set
64  template<class T> bool EgHLTDQMVarCut<T>::pass(const T& obj,const OffEvt& evt)const
65  {
66  if(((obj.*cutCodeFunc_)() & cutsToPass_)==0) return true;
67  else return false;
68  }
69 
70 
71  //now this is similar to EgHLTDQMVarCut except that it allows a key to specified to the cut code function
72  template<class T,class Key> struct EgHLTDQMUserVarCut : public EgHLTDQMCut<T> {
73  private:
74 
75  int (T::*cutCodeFunc_)(const Key&)const;
76  const Key key_;
78 
79  public:
80  EgHLTDQMUserVarCut(int (T::*cutCodeFunc)(const Key&)const,const Key& key,int cutsNotToMask=~0x0):cutCodeFunc_(cutCodeFunc),key_(key),cutsNotToMask_(cutsNotToMask){}
82 
83  bool pass(const T& obj,const OffEvt& evt)const;
84  EgHLTDQMCut<T>* clone()const{return new EgHLTDQMUserVarCut(*this);} //default copy constructor is fine
85 
86  };
87 
88  template<class T,class Key> bool EgHLTDQMUserVarCut<T,Key>::pass(const T& obj,const OffEvt& evt)const
89  {
90  if(((obj.*cutCodeFunc_)(key_) & cutsNotToMask_)==0) return true;
91  else return false;
92  }
93 
94  template<class T,typename varType> struct EgGreaterCut : public EgHLTDQMCut<T> {
95  private:
96  varType cutValue_;
97  varType (T::*varFunc_)()const;
98 
99  public:
100 
101  EgGreaterCut(varType cutValue,varType (T::*varFunc)()const):
102  cutValue_(cutValue),varFunc_(varFunc){}
103 
104  bool pass(const T& obj,const OffEvt& evt)const{return (obj.*varFunc_)()>cutValue_;}
105  EgHLTDQMCut<T>* clone()const{return new EgGreaterCut(*this);} //default copy constructor is fine
106  };
107 
108  //this struct allows multiple cuts to be strung together
109  //now I could quite simply have a link to the next cut defined in the base class
110  //and the operator<< defined there also but I dont for the following reason
111  //1) I'm concerned about a circular chain of cuts (hence why you cant do a EgMultiCut << EgMultiCut)
112  //2) it requires all cuts to multi cut aware in the pass function
113  //in the future I may change it so this class isnt required
114  template<class T> struct EgMultiCut : public EgHLTDQMCut<T> {
115  private:
116  std::vector<const EgHLTDQMCut<T>*> cuts_;//all the points to the cuts we own
117 
118  public:
120  EgMultiCut(const EgMultiCut<T>& rhs);
121  ~EgMultiCut(){for(size_t i=0;i<cuts_.size();i++) delete cuts_[i];}
122 
123  //we own any cut given to use this way
124  EgMultiCut<T>& operator<<(const EgHLTDQMCut<T>* inputCut);
125 
126 
127  //basically an AND of all the cuts using short circuit evaluation, starting with the first cut
128  //if no cuts present, will default to true
129  bool pass(const T& obj,const OffEvt& evt)const;
130  EgHLTDQMCut<T>* clone()const{return new EgMultiCut(*this);}
131  };
132 
133  template<class T> EgMultiCut<T>::EgMultiCut(const EgMultiCut<T>& rhs)
134  {
135  for(size_t cutNr=0;cutNr<rhs.cuts_.size();cutNr++){
136  cuts_.push_back(rhs.cuts_[cutNr]->clone());
137  }
138  }
139 
140 
141  template<class T> EgMultiCut<T>& EgMultiCut<T>::operator<<(const EgHLTDQMCut<T>* inputCut)
142  {
143  if(typeid(*inputCut)==typeid(EgMultiCut)){
144  edm::LogError("EgMultiCut") <<" Error can not currently load an EgMultiCut inside a EgMultiCut, the practical upshot is that the selection you think is being loaded isnt ";
145  }else if(inputCut==NULL){
146  edm::LogError("EgMultiCut") << "Error, cut being loaded is null, ignoring";
147  }else cuts_.push_back(inputCut);
148  return *this;
149  }
150 
151  template<class T> bool EgMultiCut<T>::pass(const T& obj,const OffEvt& evt)const
152  {
153  for(size_t i=0;i<cuts_.size();i++){
154  if(!cuts_[i]->pass(obj,evt)) return false;
155  }
156  return true;
157 
158  }
159 
160  //pass in which bits you want the trigger to pass
161  //how this works
162  //1) you specify the trigger bits you want to pass
163  //2) you then specify whether you require all to be passed (AND) or just 1 (OR). It assumes OR by default
164  //3) optionally, you can then specify any trigger bits you want to ensure fail. If any of these trigger bits
165  // are passed (OR), then the cut fails, you can also specify only to fail if all are passed (AND)
166  template<class T> struct EgObjTrigCut : public EgHLTDQMCut<T> {
167  public:
168  enum CutLogic{AND,OR};
169 
170  private:
171  //currently fine for default copy construction
176 
177  public:
179  bitsToPass_(bitsToPass),passLogic_(passLogic),bitsToFail_(bitsToFail),failLogic_(failLogic){}
181 
182  bool pass(const T& obj,const OffEvt& evt)const;
183  EgHLTDQMCut<T>* clone()const{return new EgObjTrigCut(*this);}
184  };
185 
186  template<class T> bool EgObjTrigCut<T>::pass(const T& obj,const OffEvt& evt)const
187  {
188  TrigCodes::TrigBitSet passMasked = bitsToPass_&obj.trigBits();
189  TrigCodes::TrigBitSet failMasked = bitsToFail_&obj.trigBits();
190 
191  bool passResult = passLogic_==AND ? passMasked==bitsToPass_ : passMasked!=0x0;
192  bool failResult = failLogic_==AND ? failMasked==bitsToFail_ : failMasked!=0x0;
193  if(bitsToFail_==0x0) failResult=false; //ensuring it has no effect if bits not specified
194  return passResult && !failResult;
195 
196  }
197 
198 
199 
200  //pass in which bits you want the trigger to pass
201  //can either specify to pass all of the bits (AND) or any of the bits (OR)
202  template<class T> struct EgEvtTrigCut : public EgHLTDQMCut<T> {
203  public:
204  enum CutLogic{AND,OR};
205  private:
206  //currently default copy constructor is fine
209 
210  public:
211  EgEvtTrigCut( TrigCodes::TrigBitSet bitsToPass,CutLogic passLogic=OR):bitsToPass_(bitsToPass),passLogic_(passLogic){}
213 
214  bool pass(const T& obj,const OffEvt& evt)const;
215  EgHLTDQMCut<T>* clone()const{return new EgEvtTrigCut(*this);}
216  };
217 
218  template<class T> bool EgEvtTrigCut<T>::pass(const T& obj,const OffEvt& evt)const
219  {
220  TrigCodes::TrigBitSet passMasked = bitsToPass_&evt.evtTrigBits();
221  return passLogic_==AND ? passMasked==bitsToPass_ : passMasked!=0x0;
222  }
223 
224  //nots the cut, ie makes it return false instead of true
225  template<class T> struct EgNotCut : public EgHLTDQMCut<T> {
226  private:
227  EgHLTDQMCut<T>* cut_; //we own it
228 
229  public:
231  EgNotCut(const EgNotCut<T>& rhs):cut_(rhs.cut_->clone()){}
232  ~EgNotCut(){delete cut_;}
233 
234  bool pass(const T& obj,const OffEvt& evt)const{return !cut_->pass(obj,evt);}
235  EgHLTDQMCut<T>* clone()const{return new EgNotCut(*this);}
236  };
237 
238  //cut on the charge of the electron
239  template<class T> struct ChargeCut : public EgHLTDQMCut<T> {
240  private:
241  int charge_;
242 
243  public:
244  ChargeCut(int charge):charge_(charge){}
246 
247  bool pass(const T& obj,const OffEvt& evt)const{return obj.charge()==charge_;}
248  EgHLTDQMCut<T>* clone()const{return new ChargeCut(*this);}
249  };
250 
251  //this askes if an object statifies the probe criteria and that another electron in the event statisfies the tag
252  //although templated, its hard to think of this working for anything else other then an electron
253  template<class T> struct EgTagProbeCut : public EgHLTDQMCut<T> {
254  private:
256  int (T::*probeCutCodeFunc_)()const;
258  int (OffEle::*tagCutCodeFunc_)()const;
259  float minMass_;
260  float maxMass_;
261  public:
262  EgTagProbeCut(int probeCutCode,int (T::*probeCutCodeFunc)()const,int tagCutCode,int (OffEle::*tagCutCodeFunc)()const,float minMass=81.,float maxMass=101.):probeCutCode_(probeCutCode),probeCutCodeFunc_(probeCutCodeFunc),tagCutCode_(tagCutCode),tagCutCodeFunc_(tagCutCodeFunc),minMass_(minMass),maxMass_(maxMass){}
264 
265  bool pass(const T& obj,const OffEvt& evt)const;
266  EgHLTDQMCut<T>* clone()const{return new EgTagProbeCut(*this);}
267  };
268 
269  template<class T> bool EgTagProbeCut<T>::pass(const T& obj,const OffEvt& evt)const
270  {
271  int nrTags=0;
272  const OffEle* tagEle=NULL;
273  const std::vector<OffEle>& eles = evt.eles();
274  //we are looking for an *additional* tag
275  for(size_t eleNr=0;eleNr<eles.size();eleNr++){
276  if( ((eles[eleNr].*tagCutCodeFunc_)() & tagCutCode_)==0x0){
277  //now a check that the tag is not the same as the probe
278  if(reco::deltaR2(obj.eta(),obj.phi(),eles[eleNr].eta(),eles[eleNr].phi())>0.1*0.1){//not in a cone of 0.1 of probe object
279  nrTags++;
280  tagEle = &eles[eleNr];
281  }
282  }
283  }
284  if(nrTags==1){ //we are requiring one and only one additional tag (the obj is automatically excluded from the tag list)
285  if(((obj.*probeCutCodeFunc_)() & probeCutCode_)==0x0){ //passes probe requirements, lets check the mass
286  float mass = (obj.p4()+tagEle->p4()).mag();
287  if(mass>minMass_ && mass<maxMass_) return true; //mass requirements
288  }
289  }
290  return false;
291  }
292 
293  template<class T> struct EgJetTagProbeCut : public EgHLTDQMCut<T>{
294  private:
296  int (OffEle::*probeCutCodeFunc_)()const;
297 
298  float minDPhi_;
299  float maxDPhi_;
300  public:
301  EgJetTagProbeCut(int probeCutCode,int (T::*probeCutCodeFunc)()const,float minDPhi=-M_PI,float maxDPhi=M_PI):
302  probeCutCode_(probeCutCode),probeCutCodeFunc_(probeCutCodeFunc),minDPhi_(minDPhi),maxDPhi_(maxDPhi){}
303  bool pass(const T& obj,const OffEvt& evt)const;
304  EgHLTDQMCut<T>* clone()const{return new EgJetTagProbeCut(*this);}
305 
306  };
307 
308 
309  template<class T> bool EgJetTagProbeCut<T>::pass(const T& obj,const OffEvt& evt)const
310  {
311  int nrProbes=0;
312  const std::vector<OffEle>& eles = evt.eles();
313  for(size_t eleNr=0;eleNr<eles.size();eleNr++){
314  if( ((eles[eleNr].*probeCutCodeFunc_)() & probeCutCode_)==0x0){
315  nrProbes++;
316  }
317  }
318  bool b2bJet=false;
319  const std::vector<reco::CaloJet>& jets =evt.jets();
320  for(size_t jetNr=0;jetNr<jets.size();jetNr++){
321  if(reco::deltaR2(obj.eta(),obj.phi(),jets[jetNr].eta(),jets[jetNr].phi())>0.1*0.1){//not in a cone of 0.1 of probe object
322  float dPhi = reco::deltaPhi(obj.phi(),jets[jetNr].phi());
323  if(dPhi>minDPhi_ && dPhi<maxDPhi_) b2bJet=true;
324  }
325  }
326 
327  return nrProbes==1 && b2bJet;
328 
329  }
330 
331 
332  template<class T> struct EgJetB2BCut : public EgHLTDQMCut<T>{
333  private:
334 
335  float minDPhi_;
336  float maxDPhi_;
337  float ptRelDiff_;
338 
339  public:
340  EgJetB2BCut(float minDPhi=-M_PI,float maxDPhi=M_PI,float ptRelDiff=999):
341  minDPhi_(minDPhi),maxDPhi_(maxDPhi),ptRelDiff_(ptRelDiff){}
342  bool pass(const T& obj,const OffEvt& evt)const;
343  EgHLTDQMCut<T>* clone()const{return new EgJetB2BCut(*this);}
344 
345  };
346 
347 
348  template<class T> bool EgJetB2BCut<T>::pass(const T& obj,const OffEvt& evt)const
349  {
350 
351  bool b2bJet=false;
352  const std::vector<reco::CaloJet>& jets =evt.jets();
353  for(size_t jetNr=0;jetNr<jets.size();jetNr++){
354  if(reco::deltaR2(obj.eta(),obj.phi(),jets[jetNr].eta(),jets[jetNr].phi())>0.1*0.1){//not in a cone of 0.1 of probe object
355  float dPhi = reco::deltaPhi(obj.phi(),jets[jetNr].phi());
356  if(dPhi>minDPhi_ && dPhi<maxDPhi_ && fabs(1-jets[jetNr].pt()/obj.pt()) < ptRelDiff_) b2bJet=true;
357  }
358  }
359  return b2bJet;
360 
361  }
362 
363 
364  //requires the the passed in electron and another in the event passes the specified cuts
365  struct EgDiEleCut : public EgHLTDQMCut<OffEle> {
366  private:
367  int cutCode_;
368  int (OffEle::*cutCodeFunc_)()const;
369 
370  public:
371  EgDiEleCut(int cutCode,int (OffEle::*cutCodeFunc)()const):cutCode_(cutCode),cutCodeFunc_(cutCodeFunc){}
372  bool pass(const OffEle& obj,const OffEvt& evt)const;
373  EgHLTDQMCut<OffEle>* clone()const{return new EgDiEleCut(*this);}
374  };
375 
376  //requires the the passed in electron and another in the event passes the specified cuts
377  template<class Key> struct EgDiEleUserCut : public EgHLTDQMCut<OffEle> {
378  private:
379  int (OffEle::*cutCodeFunc_)(const Key&)const;
380  const Key& key_;
382  public:
383  EgDiEleUserCut(int (OffEle::*cutCodeFunc)(const Key&)const,const Key& key,int cutsNotToMask=~0x0):cutCodeFunc_(cutCodeFunc),key_(key),cutsNotToMask_(cutsNotToMask){}
385 
386  bool pass(const OffEle& obj,const OffEvt& evt)const;
387  EgHLTDQMCut<OffEle>* clone()const{return new EgDiEleUserCut(*this);} //default copy constructor is fine
388 
389  };
390 
391  template<class Key> bool EgDiEleUserCut<Key>::pass(const OffEle& obj,const OffEvt& evt)const
392  {
393  const std::vector<OffEle>& eles = evt.eles();
394  for(size_t eleNr=0;eleNr<eles.size();eleNr++){
395  if(&eles[eleNr]!=&obj){ //different electrons
396  int diEleCutCode = (obj.*cutCodeFunc_)(key_) | (eles[eleNr].*cutCodeFunc_)(key_);
397  if( (diEleCutCode & cutsNotToMask_)==0x0) return true;
398  }
399  }
400  return false;
401  }
402 
403 
404  //requires the the passed in photon and another in the event passes the specified cuts
405  struct EgDiPhoCut : public EgHLTDQMCut<OffPho> {
406  private:
407  int cutCode_;
408  int (OffPho::*cutCodeFunc_)()const;
409 
410  public:
411  EgDiPhoCut(int cutCode,int (OffPho::*cutCodeFunc)()const):cutCode_(cutCode),cutCodeFunc_(cutCodeFunc){}
412  bool pass(const OffPho& obj,const OffEvt& evt)const;
413  EgHLTDQMCut<OffPho>* clone()const{return new EgDiPhoCut(*this);}
414  };
415 
416 
417  //requires passed photon and another in the event passes the specified cuts
418  template<class Key> struct EgDiPhoUserCut : public EgHLTDQMCut<OffPho> {
419  private:
420  int (OffPho::*cutCodeFunc_)(const Key&)const;
421  const Key& key_;
423  public:
424  EgDiPhoUserCut(int (OffPho::*cutCodeFunc)(const Key&)const,const Key& key,int cutsNotToMask=~0x0):cutCodeFunc_(cutCodeFunc),key_(key),cutsNotToMask_(cutsNotToMask){}
426 
427  bool pass(const OffPho& obj,const OffEvt& evt)const;
428  EgHLTDQMCut<OffPho>* clone()const{return new EgDiPhoUserCut(*this);} //default copy constructor is fine
429 
430  };
431 
432  template<class Key> bool EgDiPhoUserCut<Key>::pass(const OffPho& obj,const OffEvt& evt)const
433  {
434  const std::vector<OffPho>& phos = evt.phos();
435  for(size_t phoNr=0;phoNr<phos.size();phoNr++){
436  if(&phos[phoNr]!=&obj){ //different phoctrons
437 
438  int diPhoCutCode = (obj.*cutCodeFunc_)(key_) | (phos[phoNr].*cutCodeFunc_)(key_);
439  if( (diPhoCutCode & cutsNotToMask_)==0x0) return true;
440  }
441  }
442  return false;
443  }
444 
445  //a trigger tag and probe cut
446  //basically we require the electron to pass some cuts
447  //and then do tag and probe on the trigger
448  //removing templates as it makes no sense
449  struct EgTrigTagProbeCut : public EgHLTDQMCut<OffEle> {
450  private:
452  int cutCode_;
453  int (OffEle::*cutCodeFunc_)()const;
454  float minMass_;
455  float maxMass_;
456  public:
457  EgTrigTagProbeCut(TrigCodes::TrigBitSet bitsToPass,int cutCode,int (OffEle::*cutCodeFunc)()const,float minMass=81.,float maxMass=101.):bitsToPass_(bitsToPass),cutCode_(cutCode),cutCodeFunc_(cutCodeFunc),minMass_(minMass),maxMass_(maxMass){}
459 
460  bool pass(const OffEle& ele,const OffEvt& evt)const;
461  EgHLTDQMCut<OffEle>* clone()const{return new EgTrigTagProbeCut(*this);}
462 
463  };
464 
465  //----Morse----
466  //new tag and probe cut
467  //require two wp80 electrons
468  struct EgTrigTagProbeCut_New : public EgHLTDQMCut<OffEle> {
469  private:
472  int cutCode_;
473  int (OffEle::*cutCodeFunc_)()const;
474  float minMass_;
475  float maxMass_;
476  public:
477  EgTrigTagProbeCut_New(TrigCodes::TrigBitSet bit1ToPass,TrigCodes::TrigBitSet bit2ToPass,int cutCode,int (OffEle::*cutCodeFunc)()const,float minMass=81.,float maxMass=101.):bit1ToPass_(bit1ToPass),bit2ToPass_(bit2ToPass),cutCode_(cutCode),cutCodeFunc_(cutCodeFunc),minMass_(minMass),maxMass_(maxMass){}
479 
480  bool pass(const OffEle& ele,const OffEvt& evt)const;
481  EgHLTDQMCut<OffEle>* clone()const{return new EgTrigTagProbeCut_New(*this);}
482 
483  };
484  //same for photons
485  struct EgTrigTagProbeCut_NewPho : public EgHLTDQMCut<OffPho> {
486  private:
489  int cutCode_;
490  int (OffPho::*cutCodeFunc_)()const;
491  float minMass_;
492  float maxMass_;
493  public:
494  EgTrigTagProbeCut_NewPho(TrigCodes::TrigBitSet bit1ToPass,TrigCodes::TrigBitSet bit2ToPass,int cutCode,int (OffPho::*cutCodeFunc)()const,float minMass=81.,float maxMass=101.):bit1ToPass_(bit1ToPass),bit2ToPass_(bit2ToPass),cutCode_(cutCode),cutCodeFunc_(cutCodeFunc),minMass_(minMass),maxMass_(maxMass){}
496 
497  bool pass(const OffPho& pho,const OffEvt& evt)const;
499 
500  };
501 
502 }//end of namespace
503 #endif
std::vector< const EgHLTDQMCut< T > * > cuts_
Definition: EgHLTDQMCut.h:116
int i
Definition: DBlmapReader.cc:9
bool pass(const OffPho &pho, const OffEvt &evt) const
Definition: EgHLTDQMCut.cc:60
EgHLTDQMCut< T > * clone() const
Definition: EgHLTDQMCut.h:343
virtual ~EgHLTDQMCut()
Definition: EgHLTDQMCut.h:36
bool pass(const T &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.h:151
bool pass(const T &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.h:247
TrigCodes::TrigBitSet bit1ToPass_
Definition: EgHLTDQMCut.h:487
EgHLTDQMCut< T > * clone() const
Definition: EgHLTDQMCut.h:54
EgHLTDQMCut< OffEle > * clone() const
Definition: EgHLTDQMCut.h:461
EgHLTDQMCut< T > * cut_
Definition: EgHLTDQMCut.h:227
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
virtual bool pass(const T &obj, const OffEvt &evt) const =0
bool pass(const T &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.h:88
EgEvtTrigCut(TrigCodes::TrigBitSet bitsToPass, CutLogic passLogic=OR)
Definition: EgHLTDQMCut.h:211
EgHLTDQMCut & operator=(const EgHLTDQMCut &rhs)
Definition: EgHLTDQMCut.h:29
#define NULL
Definition: scimark2.h:8
EgHLTDQMCut< T > * clone() const
Definition: EgHLTDQMCut.h:130
EgHLTDQMCut< T > * clone() const
Definition: EgHLTDQMCut.h:304
int(OffEle::* tagCutCodeFunc_)() const
Definition: EgHLTDQMCut.h:258
int(T::* probeCutCodeFunc_)() const
Definition: EgHLTDQMCut.h:256
bool pass(const T &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.h:64
EgDiEleUserCut(int(OffEle::*cutCodeFunc)(const Key &) const, const Key &key, int cutsNotToMask=~0x0)
Definition: EgHLTDQMCut.h:383
double charge(const std::vector< uint8_t > &Ampls)
bool pass(const T &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.h:186
EgDiPhoUserCut(int(OffPho::*cutCodeFunc)(const Key &) const, const Key &key, int cutsNotToMask=~0x0)
Definition: EgHLTDQMCut.h:424
TrigCodes::TrigBitSet bit1ToPass_
Definition: EgHLTDQMCut.h:470
EgHLTDQMCut< T > * clone() const
Definition: EgHLTDQMCut.h:183
EgMultiCut< T > & operator<<(const EgHLTDQMCut< T > *inputCut)
Definition: EgHLTDQMCut.h:141
varType(T::* varFunc_)() const
Definition: EgHLTDQMCut.h:97
TrigCodes::TrigBitSet evtTrigBits() const
Definition: EgHLTOffEvt.h:50
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
bool pass(const T &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.h:218
int(T::* cutCodeFunc_)(const Key &) const
Definition: EgHLTDQMCut.h:75
bool pass(const OffEle &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.h:391
int(OffEle::* cutCodeFunc_)() const
Definition: EgHLTDQMCut.h:453
vector< PseudoJet > jets
EgHLTDQMCut< OffEle > * clone() const
Definition: EgHLTDQMCut.h:387
TrigCodes::TrigBitSet bit2ToPass_
Definition: EgHLTDQMCut.h:488
EgHLTDQMCut< T > * clone() const
Definition: EgHLTDQMCut.h:215
const std::vector< reco::CaloJet > & jets() const
Definition: EgHLTOffEvt.h:51
TrigCodes::TrigBitSet bitsToPass_
Definition: EgHLTDQMCut.h:207
int(OffEle::* probeCutCodeFunc_)() const
Definition: EgHLTDQMCut.h:296
EgJetTagProbeCut(int probeCutCode, int(T::*probeCutCodeFunc)() const, float minDPhi=-M_PI, float maxDPhi=M_PI)
Definition: EgHLTDQMCut.h:301
bool pass(const OffEle &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.cc:89
virtual EgHLTDQMCut< T > * clone() const =0
EgHLTDQMCut< OffPho > * clone() const
Definition: EgHLTDQMCut.h:498
bool pass(const OffEle &ele, const OffEvt &evt) const
Definition: EgHLTDQMCut.cc:5
EgHLTDQMCut< OffPho > * clone() const
Definition: EgHLTDQMCut.h:413
TrigCodes::TrigBitSet bitsToFail_
Definition: EgHLTDQMCut.h:174
EgHLTDQMCut(const EgHLTDQMCut &rhs)
Definition: EgHLTDQMCut.h:32
TrigCodes::TrigBitSet bitsToPass_
Definition: EgHLTDQMCut.h:451
const std::vector< OffPho > & phos() const
Definition: EgHLTOffEvt.h:48
EgNotCut(EgHLTDQMCut< T > *cut)
Definition: EgHLTDQMCut.h:230
bool pass(const OffEle &ele, const OffEvt &evt) const
Definition: EgHLTDQMCut.cc:31
int(OffPho::* cutCodeFunc_)(const Key &) const
Definition: EgHLTDQMCut.h:420
double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:12
EgJetB2BCut(float minDPhi=-M_PI, float maxDPhi=M_PI, float ptRelDiff=999)
Definition: EgHLTDQMCut.h:340
EgTrigTagProbeCut_NewPho(TrigCodes::TrigBitSet bit1ToPass, TrigCodes::TrigBitSet bit2ToPass, int cutCode, int(OffPho::*cutCodeFunc)() const, float minMass=81., float maxMass=101.)
Definition: EgHLTDQMCut.h:494
EgHLTDQMCut< T > * clone() const
Definition: EgHLTDQMCut.h:235
EgTagProbeCut(int probeCutCode, int(T::*probeCutCodeFunc)() const, int tagCutCode, int(OffEle::*tagCutCodeFunc)() const, float minMass=81., float maxMass=101.)
Definition: EgHLTDQMCut.h:262
EgObjTrigCut(TrigCodes::TrigBitSet bitsToPass, CutLogic passLogic=OR, TrigCodes::TrigBitSet bitsToFail=TrigCodes::TrigBitSet(), CutLogic failLogic=AND)
Definition: EgHLTDQMCut.h:178
#define M_PI
Definition: BFit3D.cc:3
bool pass(const T &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.h:104
EgHLTDQMCut< T > * clone() const
Definition: EgHLTDQMCut.h:105
EgHLTDQMUserVarCut(int(T::*cutCodeFunc)(const Key &) const, const Key &key, int cutsNotToMask=~0x0)
Definition: EgHLTDQMCut.h:80
bool pass(const T &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.h:269
EgHLTDQMCut< OffEle > * clone() const
Definition: EgHLTDQMCut.h:481
EgHLTDQMCut< T > * clone() const
Definition: EgHLTDQMCut.h:248
EgHLTDQMCut< T > * clone() const
Definition: EgHLTDQMCut.h:266
EgGreaterCut(varType cutValue, varType(T::*varFunc)() const)
Definition: EgHLTDQMCut.h:101
EgHLTDQMCut< T > * clone() const
Definition: EgHLTDQMCut.h:84
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
Definition: deltaR.h:58
const std::vector< OffEle > & eles() const
Definition: EgHLTOffEvt.h:46
int(OffEle::* cutCodeFunc_)(const Key &) const
Definition: EgHLTDQMCut.h:379
bool pass(const OffPho &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.cc:104
TrigCodes::TrigBitSet bitsToPass_
Definition: EgHLTDQMCut.h:172
bool AND(const TrackBaseRef &track, const RecoTauQualityCuts::TrackQCutFuncCollection &cuts)
list key
Definition: combine.py:13
int(OffEle::* cutCodeFunc_)() const
Definition: EgHLTDQMCut.h:368
bool pass(const T &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.h:309
EgTrigTagProbeCut(TrigCodes::TrigBitSet bitsToPass, int cutCode, int(OffEle::*cutCodeFunc)() const, float minMass=81., float maxMass=101.)
Definition: EgHLTDQMCut.h:457
EgHLTDQMVarCut(int cutsToPass, int(T::*cutCodeFunc)() const)
Definition: EgHLTDQMCut.h:50
bool pass(const T &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.h:234
EgDiPhoCut(int cutCode, int(OffPho::*cutCodeFunc)() const)
Definition: EgHLTDQMCut.h:411
EgNotCut(const EgNotCut< T > &rhs)
Definition: EgHLTDQMCut.h:231
const math::XYZTLorentzVector & p4() const
Definition: EgHLTOffEle.h:128
bool pass(const T &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.h:348
int(T::* cutCodeFunc_)() const
Definition: EgHLTDQMCut.h:47
int(OffPho::* cutCodeFunc_)() const
Definition: EgHLTDQMCut.h:408
long double T
int(OffEle::* cutCodeFunc_)() const
Definition: EgHLTDQMCut.h:473
EgDiEleCut(int cutCode, int(OffEle::*cutCodeFunc)() const)
Definition: EgHLTDQMCut.h:371
int(OffPho::* cutCodeFunc_)() const
Definition: EgHLTDQMCut.h:490
EgTrigTagProbeCut_New(TrigCodes::TrigBitSet bit1ToPass, TrigCodes::TrigBitSet bit2ToPass, int cutCode, int(OffEle::*cutCodeFunc)() const, float minMass=81., float maxMass=101.)
Definition: EgHLTDQMCut.h:477
bool pass(const OffPho &obj, const OffEvt &evt) const
Definition: EgHLTDQMCut.h:432
EgHLTDQMCut< OffEle > * clone() const
Definition: EgHLTDQMCut.h:373
TrigCodes::TrigBitSet bit2ToPass_
Definition: EgHLTDQMCut.h:471
ChargeCut(int charge)
Definition: EgHLTDQMCut.h:244
std::bitset< maxNrBits_ > TrigBitSet
EgHLTDQMCut< OffPho > * clone() const
Definition: EgHLTDQMCut.h:428