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
EgammaCutBasedEleId::TriggerWorkingPoint
TriggerWorkingPoint
Definition: EGammaCutBasedEleId.h:36
EgammaCutBasedEleId::ISO
Definition: EGammaCutBasedEleId.h:50
EgammaCutBasedEleId::DZVTX
Definition: EGammaCutBasedEleId.h:49
EgammaCutBasedEleId::TIGHT
Definition: EGammaCutBasedEleId.h:34
EgammaCutBasedEleId::MHITS
Definition: EGammaCutBasedEleId.h:52
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
EgammaCutBasedEleId::PrintDebug
void PrintDebug(unsigned int mask)
Definition: EGammaCutBasedEleId.cc:442
EgHLTOffHistBins_cfi.dEtaIn
dEtaIn
Definition: EgHLTOffHistBins_cfi.py:19
EgammaCutBasedEleId::IsoDepositVals
std::vector< edm::Handle< edm::ValueMap< double > > > IsoDepositVals
Definition: EGammaCutBasedEleId.h:28
EgammaCutBasedEleId::IsoDepositMaps
std::vector< edm::Handle< edm::ValueMap< reco::IsoDeposit > > > IsoDepositMaps
Definition: EGammaCutBasedEleId.h:27
ConversionFwd.h
edm::Handle< reco::ConversionCollection >
EgammaCutBasedEleId::WorkingPoint
WorkingPoint
Definition: EGammaCutBasedEleId.h:34
EgammaCutBasedEleId::VETO
Definition: EGammaCutBasedEleId.h:34
ElectronEffectiveArea::ElectronEffectiveAreaTarget
ElectronEffectiveAreaTarget
Definition: ElectronEffectiveArea.h:57
edm::Ref
Definition: AssociativeIterator.h:58
EgammaCutBasedEleId::DETAIN
Definition: EGammaCutBasedEleId.h:43
EgammaCutBasedEleId::TRIGGERTIGHT
Definition: EGammaCutBasedEleId.h:36
PVValHelper::eta
Definition: PVValidationHelpers.h:70
EgammaCutBasedEleId::DPHIIN
Definition: EGammaCutBasedEleId.h:44
reco::BeamSpot
Definition: BeamSpot.h:21
beamspot
Definition: BeamSpotWrite2Txt.h:8
reco::GsfElectron
Definition: GsfElectron.h:35
GsfElectron.h
EgammaCutBasedEleId::TRIGGERWP70
Definition: EGammaCutBasedEleId.h:36
IsoDeposit.h
singleTopDQM_cfi.workingPoint
workingPoint
Definition: singleTopDQM_cfi.py:66
EgHLTOffHistBins_cfi.dPhiIn
dPhiIn
Definition: EgHLTOffHistBins_cfi.py:18
EgammaCutBasedEleId::D0VTX
Definition: EGammaCutBasedEleId.h:48
EgammaCutBasedEleId
Definition: EGammaCutBasedEleId.h:21
EgammaCutBasedEleId::PassAll
static const unsigned int PassAll
Definition: EGammaCutBasedEleId.h:59
EgammaCutBasedEleId::SIGMAIETAIETA
Definition: EGammaCutBasedEleId.h:45
EgammaCutBasedEleId::PassTriggerCuts
bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele)
Definition: EGammaCutBasedEleId.cc:59
EgammaCutBasedEleId::VTXFIT
Definition: EGammaCutBasedEleId.h:51
EgammaCutBasedEleId::PassEoverPCuts
bool PassEoverPCuts(const reco::GsfElectronRef &ele)
Definition: EGammaCutBasedEleId.cc:73
EgammaCutBasedEleId::CutType
CutType
Definition: EGammaCutBasedEleId.h:42
EgammaCutBasedEleId::HOE
Definition: EGammaCutBasedEleId.h:46
electrons_cff.hoe
hoe
Definition: electrons_cff.py:388
ValueMap.h
VertexFwd.h
ElectronEffectiveArea.h
Vertex.h
EgammaCutBasedEleId::MEDIUM
Definition: EGammaCutBasedEleId.h:34
pwdgSkimBPark_cfi.conversions
conversions
Definition: pwdgSkimBPark_cfi.py:10
EgammaCutBasedEleId::LOOSE
Definition: EGammaCutBasedEleId.h:34
EgammaCutBasedEleId::TestWP
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)
Definition: EGammaCutBasedEleId.cc:139
EgammaCutBasedEleId::OOEMOOP
Definition: EGammaCutBasedEleId.h:47
EgammaCutBasedEleId::PassWP
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)
Definition: EGammaCutBasedEleId.cc:29
Conversion.h