CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
17 
18 #include <vector>
19 
20 namespace EgammaCutBasedEleId {
21 
22 //
23 // typedefs
24 //
25 
26 typedef std::vector< edm::Handle< edm::ValueMap<reco::IsoDeposit> > > IsoDepositMaps;
27 typedef std::vector< edm::Handle< edm::ValueMap<double> > > IsoDepositVals;
28 
29 //
30 // defined ID working points
31 //
32 
38 };
39 
43 };
44 
45 //
46 // cuts used within working points
47 //
48 
49 enum CutType {
50  DETAIN = (1<<0),
51  DPHIIN = (1<<1),
52  SIGMAIETAIETA = (1<<2),
53  HOE = (1<<3),
54  OOEMOOP = (1<<4),
55  D0VTX = (1<<5),
56  DZVTX = (1<<6),
57  ISO = (1<<7),
58  VTXFIT = (1<<8),
59  MHITS = (1<<9)
60 };
61 
62 //
63 // all possible cuts pass
64 //
65 
66 static const unsigned int PassAll = DETAIN | DPHIIN | SIGMAIETAIETA | HOE | OOEMOOP | D0VTX | DZVTX | ISO | VTXFIT | MHITS;
67 
68 //
69 // CMSSW interface
70 //
71 
72 #ifndef STANDALONEID
73 
74 bool PassWP(const WorkingPoint workingPoint,
75  const reco::GsfElectronRef &ele,
77  const reco::BeamSpot &beamspot,
79  const double &iso_ch,
80  const double &iso_em,
81  const double &iso_nh,
82  const double &rho);
83 
84 
85 bool PassWP(const WorkingPoint workingPoint,
86  const reco::GsfElectron &ele,
88  const reco::BeamSpot &beamspot,
90  const double &iso_ch,
91  const double &iso_em,
92  const double &iso_nh,
93  const double &rho);
94 
95 
96 bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele);
97 
98 bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectron &ele);
99 
100 bool PassEoverPCuts(const reco::GsfElectronRef &ele);
101 
102 bool PassEoverPCuts(const reco::GsfElectron &ele);
103 
104 unsigned int TestWP(const WorkingPoint workingPoint,
105  const reco::GsfElectronRef &ele,
107  const reco::BeamSpot &beamspot,
109  const double &iso_ch,
110  const double &iso_em,
111  const double &iso_nh,
112  const double &rho);
113 
114 unsigned int TestWP(const WorkingPoint workingPoint,
115  const reco::GsfElectron &ele,
117  const reco::BeamSpot &beamspot,
119  const double &iso_ch,
120  const double &iso_em,
121  const double &iso_nh,
122  const double &rho);
123 
124 #endif
125 
126 //
127 // implementation of working points
128 // used by CMSSW interface, does not
129 // itself depend on CMSSW code
130 //
131 
132 bool PassWP(WorkingPoint workingPoint, const bool isEB, const float pt, const float eta,
133  const float dEtaIn, const float dPhiIn, const float sigmaIEtaIEta, const float hoe,
134  const float ooemoop, const float d0vtx, const float dzvtx, const float iso_ch, const float iso_em, const float iso_nh,
135  const bool vtxFitConversion, const unsigned int mHits, const double rho);
136 
137 bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const bool isEB, const float pt,
138  const float dEtaIn, const float dPhiIn, const float sigmaIEtaIEta, const float hoe,
139  const float trackIso, const float ecalIso, const float hcalIso);
140 
141 bool PassEoverPCuts(const float eta, const float eopin, const float fbrem);
142 
143 unsigned int TestWP(WorkingPoint workingPoint, const bool isEB, const float pt, const float eta,
144  const float dEtaIn, const float dPhiIn, const float sigmaIEtaIEta, const float hoe,
145  const float ooemoop, const float d0vtx, const float dzvtx, const float iso_ch, const float iso_em, const float iso_nh,
146  const bool vtxFitConversion, const unsigned int mHits, const double rho);
147 
148 // print the bit mask
149 void PrintDebug(unsigned int mask);
150 
151 }
152 
std::vector< edm::Handle< edm::ValueMap< reco::IsoDeposit > > > IsoDepositMaps
void PrintDebug(unsigned int mask)
Definition: DDAxes.h:10
T eta() const
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)
bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele)
bool PassEoverPCuts(const reco::GsfElectronRef &ele)
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)
static const unsigned int PassAll
std::vector< edm::Handle< edm::ValueMap< double > > > IsoDepositVals