1 #ifndef PhysicsTools_PatUtils_interface_SimpleCutBasedElectronIDSelectionFunctor_h 2 #define PhysicsTools_PatUtils_interface_SimpleCutBasedElectronIDSelectionFunctor_h 91 parameters.
getParameter<Int_t>(
"maxNumberOfExpectedMissingHits"));
97 if (version == NONE) {
98 std::cout <<
"SimpleCutBasedElectronIDSelectionFunctor: If you want to use version NONE " 99 <<
"then you have also to provide the selection cuts by yourself " << std::endl;
100 std::cout <<
"SimpleCutBasedElectronIDSelectionFunctor: ID Version is changed to 80cIso " 131 push_back(
"maxNumberOfExpectedMissingHits" );
137 set(
"trackIso_EB", 1.5e-01);
138 set(
"ecalIso_EB", 2.0e+00);
139 set(
"hcalIso_EB", 1.2e-01);
140 set(
"sihih_EB", 1.0e-02);
141 set(
"dphi_EB", 8.0e-01);
142 set(
"deta_EB", 7.0e-03);
143 set(
"hoe_EB", 1.5e-01);
144 set(
"cIso_EB", 10000. );
146 set(
"trackIso_EE", 8.0e-02);
147 set(
"ecalIso_EE", 6.0e-02);
148 set(
"hcalIso_EE", 5.0e-02);
149 set(
"sihih_EE", 3.0e-02);
150 set(
"dphi_EE", 7.0e-01);
151 set(
"deta_EE", 1.0e-02);
152 set(
"hoe_EE", 7.0e-02);
153 set(
"cIso_EE", 10000. );
155 set(
"conversionRejection", 0);
156 set(
"maxNumberOfExpectedMissingHits", 1);
160 set(
"trackIso_EB", 100000.);
161 set(
"ecalIso_EB", 100000.);
162 set(
"hcalIso_EB", 100000.);
163 set(
"sihih_EB", 1.0e-02);
164 set(
"dphi_EB", 8.0e-01);
165 set(
"deta_EB", 7.0e-03);
166 set(
"hoe_EB", 1.5e-01);
167 set(
"cIso_EB", 1.5e-01);
169 set(
"trackIso_EE", 100000.);
170 set(
"ecalIso_EE", 100000.);
171 set(
"hcalIso_EE", 100000.);
172 set(
"sihih_EE", 3.0e-02);
173 set(
"dphi_EE", 7.0e-01);
174 set(
"deta_EE", 1.0e-02);
175 set(
"hoe_EE", 7.0e-02);
176 set(
"cIso_EE", 1.0e-01);
178 set(
"conversionRejection", 0);
179 set(
"maxNumberOfExpectedMissingHits", 1);
183 set(
"trackIso_EB", 1.2e-01);
184 set(
"ecalIso_EB", 9.0e-02);
185 set(
"hcalIso_EB", 1.0e-01);
186 set(
"sihih_EB", 1.0e-02);
187 set(
"dphi_EB", 8.0e-01);
188 set(
"deta_EB", 7.0e-03);
189 set(
"hoe_EB", 1.2e-01);
190 set(
"cIso_EB", 10000. );
192 set(
"trackIso_EE", 5.0e-02);
193 set(
"ecalIso_EE", 6.0e-02);
194 set(
"hcalIso_EE", 3.0e-02);
195 set(
"sihih_EE", 3.0e-02);
196 set(
"dphi_EE", 7.0e-01);
197 set(
"deta_EE", 9.0e-03);
198 set(
"hoe_EE", 5.0e-02);
199 set(
"cIso_EE", 10000. );
201 set(
"conversionRejection", 1);
202 set(
"maxNumberOfExpectedMissingHits", 1);
205 set(
"trackIso_EB", 100000.);
206 set(
"ecalIso_EB", 100000.);
207 set(
"hcalIso_EB", 100000.);
208 set(
"sihih_EB", 1.0e-02);
209 set(
"dphi_EB", 8.0e-01);
210 set(
"deta_EB", 7.0e-03);
211 set(
"hoe_EB", 1.2e-01);
212 set(
"cIso_EB", 1.0e-01);
214 set(
"trackIso_EE", 100000.);
215 set(
"ecalIso_EE", 100000.);
216 set(
"hcalIso_EE", 100000.);
217 set(
"sihih_EE", 3.0e-02);
218 set(
"dphi_EE", 7.0e-01);
219 set(
"deta_EE", 9.0e-03);
220 set(
"hoe_EE", 5.0e-02);
221 set(
"cIso_EE", 7.0e-02);
223 set(
"conversionRejection", 1);
224 set(
"maxNumberOfExpectedMissingHits", 1);
227 set(
"trackIso_EB", 9.0e-02);
228 set(
"ecalIso_EB", 8.0e-02);
229 set(
"hcalIso_EB", 1.0e-01);
230 set(
"sihih_EB", 1.0e-02);
231 set(
"dphi_EB", 6.0e-02);
232 set(
"deta_EB", 6.0e-03);
233 set(
"hoe_EB", 4.0e-02);
234 set(
"cIso_EB", 10000. );
236 set(
"trackIso_EE", 5.0e-02);
237 set(
"ecalIso_EE", 5.0e-02);
238 set(
"hcalIso_EE", 2.5e-02);
239 set(
"sihih_EE", 3.0e-02);
240 set(
"dphi_EE", 4.0e-02);
241 set(
"deta_EE", 7.0e-03);
242 set(
"hoe_EE", 2.5e-02);
243 set(
"cIso_EE", 10000. );
245 set(
"conversionRejection", 1);
246 set(
"maxNumberOfExpectedMissingHits", 1);
249 set(
"trackIso_EB", 100000.);
250 set(
"ecalIso_EB", 100000.);
251 set(
"hcalIso_EB", 100000.);
252 set(
"sihih_EB", 1.0e-02);
253 set(
"dphi_EB", 6.0e-02);
254 set(
"deta_EB", 6.0e-03);
255 set(
"hoe_EB", 4.0e-02);
256 set(
"cIso_EB", 9.0e-02);
258 set(
"trackIso_EE", 100000.);
259 set(
"ecalIso_EE", 100000.);
260 set(
"hcalIso_EE", 100000.);
261 set(
"sihih_EE", 3.0e-02);
262 set(
"dphi_EE", 4.0e-02);
263 set(
"deta_EE", 7.0e-03);
264 set(
"hoe_EE", 2.5e-02);
265 set(
"cIso_EE", 6.0e-02);
267 set(
"conversionRejection", 1);
268 set(
"maxNumberOfExpectedMissingHits", 1);
271 set(
"trackIso_EB", 9.0e-02);
272 set(
"ecalIso_EB", 7.0e-02);
273 set(
"hcalIso_EB", 1.0e-01);
274 set(
"sihih_EB", 1.0e-02);
275 set(
"dphi_EB", 6.0e-02);
276 set(
"deta_EB", 4.0e-03);
277 set(
"hoe_EB", 4.0e-02);
278 set(
"cIso_EB", 100000.);
280 set(
"trackIso_EE", 4.0e-02);
281 set(
"ecalIso_EE", 5.0e-02);
282 set(
"hcalIso_EE", 2.5e-02);
283 set(
"sihih_EE", 3.0e-02);
284 set(
"dphi_EE", 3.0e-02);
285 set(
"deta_EE", 7.0e-03);
286 set(
"hoe_EE", 2.5e-02);
287 set(
"cIso_EE", 100000.);
289 set(
"conversionRejection", 1);
290 set(
"maxNumberOfExpectedMissingHits", 0);
293 set(
"trackIso_EB", 100000.);
294 set(
"ecalIso_EB", 100000.);
295 set(
"hcalIso_EB", 100000.);
296 set(
"sihih_EB", 1.0e-02);
297 set(
"dphi_EB", 6.0e-02);
298 set(
"deta_EB", 4.0e-03);
299 set(
"hoe_EB", 4.0e-02);
300 set(
"cIso_EB", 7.0e-02);
302 set(
"trackIso_EE", 100000.);
303 set(
"ecalIso_EE", 100000.);
304 set(
"hcalIso_EE", 100000.);
305 set(
"sihih_EE", 3.0e-02);
306 set(
"dphi_EE", 3.0e-02);
307 set(
"deta_EE", 7.0e-03);
308 set(
"hoe_EE", 2.5e-02);
309 set(
"cIso_EE", 6.0e-02);
311 set(
"conversionRejection", 1);
312 set(
"maxNumberOfExpectedMissingHits", 0);
315 set(
"trackIso_EB", 5.0e-02);
316 set(
"ecalIso_EB", 6.0e-02);
317 set(
"hcalIso_EB", 3.0e-02);
318 set(
"sihih_EB", 1.0e-02);
319 set(
"dphi_EB", 3.0e-02);
320 set(
"deta_EB", 4.0e-03);
321 set(
"hoe_EB", 2.5e-02);
322 set(
"cIso_EB", 100000.);
324 set(
"trackIso_EE", 2.5e-02);
325 set(
"ecalIso_EE", 2.5e-02);
326 set(
"hcalIso_EE", 2.0e-02);
327 set(
"sihih_EE", 3.0e-02);
328 set(
"dphi_EE", 2.0e-02);
329 set(
"deta_EE", 5.0e-03);
330 set(
"hoe_EE", 2.5e-02);
331 set(
"cIso_EE", 100000.);
333 set(
"conversionRejection", 1);
334 set(
"maxNumberOfExpectedMissingHits", 0);
337 set(
"trackIso_EB", 100000.);
338 set(
"ecalIso_EB", 100000.);
339 set(
"hcalIso_EB", 100000.);
340 set(
"sihih_EB", 1.0e-02);
341 set(
"dphi_EB", 3.0e-02);
342 set(
"deta_EB", 4.0e-03);
343 set(
"hoe_EB", 2.5e-02);
344 set(
"cIso_EB", 4.0e-02);
346 set(
"trackIso_EE", 100000.);
347 set(
"ecalIso_EE", 100000.);
348 set(
"hcalIso_EE", 100000.);
349 set(
"sihih_EE", 3.0e-02);
350 set(
"dphi_EE", 2.0e-02);
351 set(
"deta_EE", 5.0e-03);
352 set(
"hoe_EE", 2.5e-02);
353 set(
"cIso_EE", 3.0e-02);
355 set(
"conversionRejection", 1);
356 set(
"maxNumberOfExpectedMissingHits", 0);
359 set(
"trackIso_EB", 4.0e-02);
360 set(
"ecalIso_EB", 4.0e-02);
361 set(
"hcalIso_EB", 3.0e-02);
362 set(
"sihih_EB", 1.0e-02);
363 set(
"dphi_EB", 2.5e-02);
364 set(
"deta_EB", 4.0e-03);
365 set(
"hoe_EB", 2.5e-02);
366 set(
"cIso_EB", 100000.);
368 set(
"trackIso_EE", 2.5e-02);
369 set(
"ecalIso_EE", 2.0e-02);
370 set(
"hcalIso_EE", 2.0e-02);
371 set(
"sihih_EE", 3.0e-02);
372 set(
"dphi_EE", 2.0e-02);
373 set(
"deta_EE", 5.0e-03);
374 set(
"hoe_EE", 2.5e-02);
375 set(
"cIso_EE", 100000.);
377 set(
"conversionRejection", 1);
378 set(
"maxNumberOfExpectedMissingHits", 0);
381 set(
"trackIso_EB", 100000.);
382 set(
"ecalIso_EB", 100000.);
383 set(
"hcalIso_EB", 100000.);
384 set(
"sihih_EB", 1.0e-02);
385 set(
"dphi_EB", 2.5e-02);
386 set(
"deta_EB", 4.0e-03);
387 set(
"hoe_EB", 2.5e-02);
388 set(
"cIso_EB", 3.0e-02);
390 set(
"trackIso_EE", 100000.);
391 set(
"ecalIso_EE", 100000.);
392 set(
"hcalIso_EE", 100000.);
393 set(
"sihih_EE", 3.0e-02);
394 set(
"dphi_EE", 2.0e-02);
395 set(
"deta_EE", 5.0e-03);
396 set(
"hoe_EE", 2.5e-02);
397 set(
"cIso_EE", 2.0e-02);
399 set(
"conversionRejection", 1);
400 set(
"maxNumberOfExpectedMissingHits", 0);
404 void initialize(Double_t trackIso_EB, Double_t ecalIso_EB, Double_t hcalIso_EB,
405 Double_t sihih_EB, Double_t dphi_EB, Double_t deta_EB, Double_t hoe_EB,
407 Double_t trackIso_EE, Double_t ecalIso_EE, Double_t hcalIso_EE,
408 Double_t sihih_EE, Double_t dphi_EE, Double_t deta_EE, Double_t hoe_EE,
409 Double_t cIso_EE, Int_t conversionRejection,
410 Int_t maxNumberOfExpectedMissingHits)
432 push_back(
"maxNumberOfExpectedMissingHits" );
435 set(
"trackIso_EB", trackIso_EB);
436 set(
"ecalIso_EB", ecalIso_EB);
437 set(
"hcalIso_EB", hcalIso_EB);
438 set(
"sihih_EB", sihih_EB);
439 set(
"dphi_EB", dphi_EB);
440 set(
"deta_EB", deta_EB);
441 set(
"hoe_EB", hoe_EB);
442 set(
"cIso_EB", cIso_EB);
444 set(
"trackIso_EE", trackIso_EE);
445 set(
"ecalIso_EE", ecalIso_EE);
446 set(
"hcalIso_EE", hcalIso_EE);
447 set(
"sihih_EE", sihih_EE);
448 set(
"dphi_EE", dphi_EE);
449 set(
"deta_EE", deta_EE);
450 set(
"hoe_EE", hoe_EE);
451 set(
"cIso_EE", cIso_EE);
453 set(
"conversionRejection", conversionRejection);
454 set(
"maxNumberOfExpectedMissingHits", maxNumberOfExpectedMissingHits);
469 Double_t eleET = electron.
p4().Pt();
478 if (electron.
isEB()) { cIso =
488 Double_t dist = electron.
convDist();
489 Double_t dcot = electron.
convDcot();
490 Bool_t isConv = fabs(dist) < 0.02 && fabs(dcot) < 0.02;
492 if (electron.
isEB()) {
494 if ( trackIso <
cut(
"trackIso_EB",
double()) ||
ignoreCut(
"trackIso_EB"))
passCut(ret,
"trackIso_EB");
495 if ( ecalIso <
cut(
"ecalIso_EB",
double()) ||
ignoreCut(
"ecalIso_EB") )
passCut(ret,
"ecalIso_EB");
496 if ( hcalIso <
cut(
"hcalIso_EB",
double()) ||
ignoreCut(
"hcalIso_EB") )
passCut(ret,
"hcalIso_EB");
497 if ( sihih <
cut(
"sihih_EB",
double()) ||
ignoreCut(
"sihih_EB") )
passCut(ret,
"sihih_EB");
498 if ( fabs(Dphi) <
cut(
"dphi_EB",
double()) ||
ignoreCut(
"dphi_EB") )
passCut(ret,
"dphi_EB");
499 if ( fabs(Deta) <
cut(
"deta_EB",
double()) ||
ignoreCut(
"deta_EB") )
passCut(ret,
"deta_EB");
513 if ( trackIso <
cut(
"trackIso_EE",
double()) ||
ignoreCut(
"trackIso_EE"))
passCut(ret,
"trackIso_EE");
514 if ( ecalIso <
cut(
"ecalIso_EE",
double()) ||
ignoreCut(
"ecalIso_EE") )
passCut(ret,
"ecalIso_EE");
515 if ( hcalIso <
cut(
"hcalIso_EE",
double()) ||
ignoreCut(
"hcalIso_EE") )
passCut(ret,
"hcalIso_EE");
516 if ( sihih <
cut(
"sihih_EE",
double()) ||
ignoreCut(
"sihih_EE") )
passCut(ret,
"sihih_EE");
517 if ( fabs(Dphi) <
cut(
"dphi_EE",
double()) ||
ignoreCut(
"dphi_EE") )
passCut(ret,
"dphi_EE");
518 if ( fabs(Deta) <
cut(
"deta_EE",
double()) ||
ignoreCut(
"deta_EE") )
passCut(ret,
"deta_EE");
533 if ( innerHits <=
cut(
"maxNumberOfExpectedMissingHits",
int()))
534 passCut(ret,
"maxNumberOfExpectedMissingHits");
535 if ( 0==
cut(
"conversionRejection",
int()) || isConv==
false)
536 passCut(ret,
"conversionRejection");
T getParameter(std::string const &) const
const LorentzVector & p4(P4Kind kind) const
bool spring10Variables(const pat::Electron &electron, pat::strbitset &ret)
void setIgnored(pat::strbitset &ret)
set ignored bits
pat::strbitset retInternal_
internal ret if users don't care about return bits
float deltaEtaSuperClusterTrackAtVtx() const
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
float sigmaIetaIeta() const
float hadronicOverEm() const
reco::GsfTrackRef gsfTrack() const
override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster ...
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
float deltaPhiSuperClusterTrackAtVtx() const
float dr03TkSumPt() const
virtual void push_back(std::string const &s)
This is the registration of an individual cut string.
Functor that operates on <T>
void initialize(Version_t version)
strbitset & set(bool val=true)
set method of all bits
Analysis-level electron class.
float dr03EcalRecHitSumEt() const
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
void initialize(Double_t trackIso_EB, Double_t ecalIso_EB, Double_t hcalIso_EB, Double_t sihih_EB, Double_t dphi_EB, Double_t deta_EB, Double_t hoe_EB, Double_t cIso_EB, Double_t trackIso_EE, Double_t ecalIso_EE, Double_t hcalIso_EE, Double_t sihih_EE, Double_t dphi_EE, Double_t deta_EE, Double_t hoe_EE, Double_t cIso_EE, Int_t conversionRejection, Int_t maxNumberOfExpectedMissingHits)
SimpleCutBasedElectronIDSelectionFunctor(Version_t version)
float dr03HcalTowerSumEt() const
bool operator()(const pat::Electron &electron, pat::strbitset &ret)
SimpleCutBasedElectronIDSelectionFunctor(edm::ParameterSet const ¶meters)
SimpleCutBasedElectronIDSelectionFunctor()
int cut(index_type const &i, int val) const
Access the int cut values at index "s".