CMS 3D CMS Logo

EgHLTOffEgSel.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_EGHLTOFFEGSEL
2 #define DQMOFFLINE_TRIGGER_EGHLTOFFEGSEL
3 
4 //this class works out which cuts the electron/photon passes/fails
5 //why am I rolling my own, simply put there is no electron/photon cut class that I know off
6 //which will allow isolation and id variables to be cut on at the same time and return
7 //a int with the bits corresponding to cut pass/fail
8 //also I'm going to need to modify this to keep up with trigger cuts
11 
13 
14 #include <iostream>
15 
16 namespace edm {
17  class ParameterSet;
18 }
19 
20 namespace egHLT {
21  class OffEle;
22  class OffPho;
23 
24  class OffEgSel {
25  private:
28 
29  public:
30  OffEgSel() = default; //default, it doesnt to anything
31  explicit OffEgSel(const edm::ParameterSet& config) { setup(config); }
32  ~OffEgSel() = default; //we own nothing so default destructor, copy and assignment okay
33 
34  bool passCuts(const OffEle& ele, int cutMask = ~0x0) const { return getCutCode(ele, cutMask) == 0x0; }
35  int getCutCode(const OffEle& ele, int cutMask = ~0x0) const;
36  static int getCutCode(const OffEle& ele, const EgCutValues& cuts, int cutMask = ~0x0);
37 
38  bool passCuts(const OffPho& pho, int cutMask = ~0x0) const { return getCutCode(pho, cutMask) == 0x0; }
39  int getCutCode(const OffPho& pho, int cutMask = ~0x0) const;
40  static int getCutCode(const OffPho& pho, const EgCutValues& cuts, int cutMask = ~0x0);
41 
44 
45  const EgCutValues& ebCuts() const { return ebCutValues_; }
46  const EgCutValues& eeCuts() const { return eeCutValues_; }
47 
48  void setup(const edm::ParameterSet&);
49  };
50 } // namespace egHLT
51 
52 #endif
egHLT::OffEgSel::ebCuts
const EgCutValues & ebCuts() const
Definition: EgHLTOffEgSel.h:45
egHLT::OffEgSel::setEECuts
void setEECuts(const EgCutValues &cuts)
Definition: EgHLTOffEgSel.h:43
edm
HLT enums.
Definition: AlignableModifier.h:19
egHLT::OffEgSel::~OffEgSel
~OffEgSel()=default
egHLT::OffEle
Definition: EgHLTOffEle.h:29
EgHLTEgCutValues.h
egHLT::errCodes::OffPho
Definition: EgHLTErrCodes.h:14
egHLT::OffEgSel::eeCuts
const EgCutValues & eeCuts() const
Definition: EgHLTOffEgSel.h:46
config
Definition: config.py:1
egHLT::OffEgSel::eeCutValues_
EgCutValues eeCutValues_
Definition: EgHLTOffEgSel.h:27
egHLT::OffPho
Definition: EgHLTOffPho.h:26
egHLT::EgCutValues
Definition: EgHLTEgCutValues.h:13
EgHLTOffEle.h
egHLT::OffEgSel::setup
void setup(const edm::ParameterSet &)
Definition: EgHLTOffEgSel.cc:13
egHLT::OffEgSel::setEBCuts
void setEBCuts(const EgCutValues &cuts)
Definition: EgHLTOffEgSel.h:42
edm::ParameterSet
Definition: ParameterSet.h:36
ParameterSet
Definition: Functions.h:16
egHLT::OffEgSel
Definition: EgHLTOffEgSel.h:24
egHLT::OffEgSel::OffEgSel
OffEgSel(const edm::ParameterSet &config)
Definition: EgHLTOffEgSel.h:31
egHLT::errCodes::OffEle
Definition: EgHLTErrCodes.h:13
egHLT::OffEgSel::passCuts
bool passCuts(const OffEle &ele, int cutMask=~0x0) const
Definition: EgHLTOffEgSel.h:34
egHLT::OffEgSel::getCutCode
int getCutCode(const OffEle &ele, int cutMask=~0x0) const
Definition: EgHLTOffEgSel.cc:18
egHLT::OffEgSel::OffEgSel
OffEgSel()=default
L1TMuonDQMOffline_cfi.cuts
cuts
Definition: L1TMuonDQMOffline_cfi.py:41
egHLT::OffEgSel::ebCutValues_
EgCutValues ebCutValues_
Definition: EgHLTOffEgSel.h:26
ParameterSet.h
egHLT
Definition: EgHLTBinData.h:10
egHLT::OffEgSel::passCuts
bool passCuts(const OffPho &pho, int cutMask=~0x0) const
Definition: EgHLTOffEgSel.h:38