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