test
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
18 
19 #include <vector>
20 
21 namespace EgammaCutBasedEleId {
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 
39 };
40 
44 };
45 
46 //
47 // cuts used within working points
48 //
49 
50 enum CutType {
51  DETAIN = (1<<0),
52  DPHIIN = (1<<1),
53  SIGMAIETAIETA = (1<<2),
54  HOE = (1<<3),
55  OOEMOOP = (1<<4),
56  D0VTX = (1<<5),
57  DZVTX = (1<<6),
58  ISO = (1<<7),
59  VTXFIT = (1<<8),
60  MHITS = (1<<9)
61 };
62 
63 //
64 // all possible cuts pass
65 //
66 
67 static const unsigned int PassAll = DETAIN | DPHIIN | SIGMAIETAIETA | HOE | OOEMOOP | D0VTX | DZVTX | ISO | VTXFIT | MHITS;
68 
69 //
70 // CMSSW interface
71 //
72 
73 #ifndef STANDALONEID
74 
75 bool PassWP(const WorkingPoint workingPoint,
76  const reco::GsfElectronRef &ele,
78  const reco::BeamSpot &beamspot,
80  const double &iso_ch,
81  const double &iso_em,
82  const double &iso_nh,
83  const double &rho,
85 
86 
87 bool PassWP(const WorkingPoint workingPoint,
88  const reco::GsfElectron &ele,
90  const reco::BeamSpot &beamspot,
92  const double &iso_ch,
93  const double &iso_em,
94  const double &iso_nh,
95  const double &rho,
97 
98 
99 bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele);
100 
101 bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectron &ele);
102 
103 bool PassEoverPCuts(const reco::GsfElectronRef &ele);
104 
105 bool PassEoverPCuts(const reco::GsfElectron &ele);
106 
107 unsigned int TestWP(const WorkingPoint workingPoint,
108  const reco::GsfElectronRef &ele,
110  const reco::BeamSpot &beamspot,
112  const double &iso_ch,
113  const double &iso_em,
114  const double &iso_nh,
115  const double &rho,
117 
118 unsigned int TestWP(const WorkingPoint workingPoint,
119  const reco::GsfElectron &ele,
121  const reco::BeamSpot &beamspot,
123  const double &iso_ch,
124  const double &iso_em,
125  const double &iso_nh,
126  const double &rho,
128 
129 #endif
130 
131 //
132 // implementation of working points
133 // used by CMSSW interface, does not
134 // itself depend on CMSSW code
135 //
136 
137 bool PassWP(WorkingPoint workingPoint, const bool isEB, const float pt, const float eta,
138  const float dEtaIn, const float dPhiIn, const float sigmaIEtaIEta, const float hoe,
139  const float ooemoop, const float d0vtx, const float dzvtx, const float iso_ch, const float iso_em, const float iso_nh,
140  const bool vtxFitConversion, const unsigned int mHits, const double rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget);
141 
142 bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const bool isEB, const float pt,
143  const float dEtaIn, const float dPhiIn, const float sigmaIEtaIEta, const float hoe,
144  const float trackIso, const float ecalIso, const float hcalIso);
145 
146 bool PassEoverPCuts(const float eta, const float eopin, const float fbrem);
147 
148 unsigned int TestWP(WorkingPoint workingPoint, const bool isEB, const float pt, const float eta,
149  const float dEtaIn, const float dPhiIn, const float sigmaIEtaIEta, const float hoe,
150  const float ooemoop, const float d0vtx, const float dzvtx, const float iso_ch, const float iso_em, const float iso_nh,
151  const bool vtxFitConversion, const unsigned int mHits, const double rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget);
152 
153 // print the bit mask
154 void PrintDebug(unsigned int mask);
155 
156 }
157 
std::vector< edm::Handle< edm::ValueMap< reco::IsoDeposit > > > IsoDepositMaps
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)
bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele)
bool PassEoverPCuts(const reco::GsfElectronRef &ele)
static const unsigned int PassAll
std::vector< edm::Handle< edm::ValueMap< double > > > IsoDepositVals