CMS 3D CMS Logo

EGammaCutBasedEleId.h
Go to the documentation of this file.
1 
2 //
3 // to use this code outside of CMSSW
4 // set this definition
5 //
6 
7 //#define STANDALONEID
8 #ifndef STANDALONEID
16 #endif
18 
19 #include <vector>
20 
22 
23  //
24  // typedefs
25  //
26 
27  typedef std::vector<edm::Handle<edm::ValueMap<reco::IsoDeposit> > > IsoDepositMaps;
28  typedef std::vector<edm::Handle<edm::ValueMap<double> > > IsoDepositVals;
29 
30  //
31  // defined ID working points
32  //
33 
35 
37 
38  //
39  // cuts used within working points
40  //
41 
42  enum CutType {
43  DETAIN = (1 << 0),
44  DPHIIN = (1 << 1),
45  SIGMAIETAIETA = (1 << 2),
46  HOE = (1 << 3),
47  OOEMOOP = (1 << 4),
48  D0VTX = (1 << 5),
49  DZVTX = (1 << 6),
50  ISO = (1 << 7),
51  VTXFIT = (1 << 8),
52  MHITS = (1 << 9)
53  };
54 
55  //
56  // all possible cuts pass
57  //
58 
59  static const unsigned int PassAll =
61 
62  //
63  // CMSSW interface
64  //
65 
66 #ifndef STANDALONEID
67 
68  bool PassWP(const WorkingPoint workingPoint,
69  const reco::GsfElectronRef &ele,
71  const reco::BeamSpot &beamspot,
73  const double &iso_ch,
74  const double &iso_em,
75  const double &iso_nh,
76  const double &rho,
78 
79  bool PassWP(const WorkingPoint workingPoint,
80  const reco::GsfElectron &ele,
82  const reco::BeamSpot &beamspot,
84  const double &iso_ch,
85  const double &iso_em,
86  const double &iso_nh,
87  const double &rho,
89 
90  bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele);
91 
92  bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectron &ele);
93 
94  bool PassEoverPCuts(const reco::GsfElectronRef &ele);
95 
96  bool PassEoverPCuts(const reco::GsfElectron &ele);
97 
98  unsigned int TestWP(const WorkingPoint workingPoint,
99  const reco::GsfElectronRef &ele,
101  const reco::BeamSpot &beamspot,
103  const double &iso_ch,
104  const double &iso_em,
105  const double &iso_nh,
106  const double &rho,
108 
109  unsigned int TestWP(const WorkingPoint workingPoint,
110  const reco::GsfElectron &ele,
112  const reco::BeamSpot &beamspot,
114  const double &iso_ch,
115  const double &iso_em,
116  const double &iso_nh,
117  const double &rho,
119 
120 #endif
121 
122  //
123  // implementation of working points
124  // used by CMSSW interface, does not
125  // itself depend on CMSSW code
126  //
127 
129  const bool isEB,
130  const float pt,
131  const float eta,
132  const float dEtaIn,
133  const float dPhiIn,
134  const float sigmaIEtaIEta,
135  const float hoe,
136  const float ooemoop,
137  const float d0vtx,
138  const float dzvtx,
139  const float iso_ch,
140  const float iso_em,
141  const float iso_nh,
142  const bool vtxFitConversion,
143  const unsigned int mHits,
144  const double rho,
146 
147  bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint,
148  const bool isEB,
149  const float pt,
150  const float dEtaIn,
151  const float dPhiIn,
152  const float sigmaIEtaIEta,
153  const float hoe,
154  const float trackIso,
155  const float ecalIso,
156  const float hcalIso);
157 
158  bool PassEoverPCuts(const float eta, const float eopin, const float fbrem);
159 
160  unsigned int TestWP(WorkingPoint workingPoint,
161  const bool isEB,
162  const float pt,
163  const float eta,
164  const float dEtaIn,
165  const float dPhiIn,
166  const float sigmaIEtaIEta,
167  const float hoe,
168  const float ooemoop,
169  const float d0vtx,
170  const float dzvtx,
171  const float iso_ch,
172  const float iso_em,
173  const float iso_nh,
174  const bool vtxFitConversion,
175  const unsigned int mHits,
176  const double rho,
178 
179  // print the bit mask
180  void PrintDebug(unsigned int mask);
181 
182 } // namespace EgammaCutBasedEleId
unsigned int TestWP(const WorkingPoint workingPoint, const reco::GsfElectronRef &ele, const edm::Handle< reco::ConversionCollection > &conversions, const reco::BeamSpot &beamspot, const edm::Handle< reco::VertexCollection > &vtxs, const double &iso_ch, const double &iso_em, const double &iso_nh, const double &rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
void PrintDebug(unsigned int mask)
bool PassWP(const WorkingPoint workingPoint, const reco::GsfElectronRef &ele, const edm::Handle< reco::ConversionCollection > &conversions, const reco::BeamSpot &beamspot, const edm::Handle< reco::VertexCollection > &vtxs, const double &iso_ch, const double &iso_em, const double &iso_nh, const double &rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
std::vector< edm::Handle< edm::ValueMap< reco::IsoDeposit > > > IsoDepositMaps
std::vector< edm::Handle< edm::ValueMap< double > > > IsoDepositVals
constexpr uint32_t mask
Definition: gpuClustering.h:26
bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele)
bool PassEoverPCuts(const reco::GsfElectronRef &ele)
static const unsigned int PassAll