CMS 3D CMS Logo

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