test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
SimpleCutBasedElectronIDSelectionFunctor Class Reference

#include <SimpleCutBasedElectronIDSelectionFunctor.h>

Inheritance diagram for SimpleCutBasedElectronIDSelectionFunctor:
Selector< pat::Electron >

Public Types

enum  Version_t {
  relIso95 =0, cIso95, relIso90, cIso90,
  relIso85, cIso85, relIso80, cIso80,
  relIso70, cIso70, relIso60, cIso60,
  NONE
}
 
- Public Types inherited from Selector< pat::Electron >
typedef std::binary_function
< pat::Electron,
pat::strbitset, bool > 
base_type
 
typedef std::pair< index_type,
size_t > 
cut_flow_item
 
typedef std::vector
< cut_flow_item
cut_flow_map
 
typedef pat::Electron data_type
 
typedef std::map< index_type,
double > 
double_map
 
typedef pat::strbitset::index_type index_type
 
typedef std::map< index_type, int > int_map
 

Public Member Functions

void initialize (Version_t version)
 
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)
 
bool operator() (const pat::Electron &electron, pat::strbitset &ret)
 This provides the interface for base classes to select objects. More...
 
 SimpleCutBasedElectronIDSelectionFunctor ()
 
 SimpleCutBasedElectronIDSelectionFunctor (edm::ParameterSet const &parameters)
 
 SimpleCutBasedElectronIDSelectionFunctor (Version_t version)
 
bool spring10Variables (const pat::Electron &electron, pat::strbitset &ret)
 
- Public Member Functions inherited from Selector< pat::Electron >
void clear (std::string const &s)
 Turn off a given selection cut. More...
 
void clear (index_type const &i)
 
bool considerCut (std::string const &s) const
 consider the cut at index "s" More...
 
bool considerCut (index_type const &i) const
 
int cut (index_type const &i, int val) const
 Access the int cut values at index "s". More...
 
double cut (index_type const &i, double val) const
 Access the double cut values at index "s". More...
 
int cut (std::string s, int val) const
 Access the int cut values at index "s". More...
 
double cut (std::string s, double val) const
 Access the double cut values at index "s". More...
 
pat::strbitset getBitTemplate () const
 Get an empty bitset with the proper names. More...
 
double getPasses (std::string const &s) const
 Return the number of passing cases. More...
 
double getPasses (index_type const &i) const
 
bool ignoreCut (std::string const &s) const
 ignore the cut at index "s" More...
 
bool ignoreCut (index_type const &i) const
 
virtual bool operator() (pat::Electronconst &t)
 This provides an alternative signature without the second ret. More...
 
virtual bool operator() (pat::Electronconst &t, edm::EventBase const &e, pat::strbitset &ret)
 This provides an alternative signature that includes extra information. More...
 
virtual bool operator() (pat::Electronconst &t, edm::EventBase const &e)
 This provides an alternative signature that includes extra information. More...
 
bool operator[] (std::string const &s) const
 
bool operator[] (index_type const &i) const
 
void passCut (pat::strbitset &ret, std::string const &s)
 Passing cuts. More...
 
void passCut (pat::strbitset &ret, index_type const &i)
 
void print (std::ostream &out) const
 Print the cut flow. More...
 
void printActiveCuts (std::ostream &out) const
 Print the cuts being considered. More...
 
virtual void push_back (std::string const &s)
 This is the registration of an individual cut string. More...
 
virtual void push_back (std::string const &s, int cut)
 This is the registration of an individual cut string, with an int cut value. More...
 
virtual void push_back (std::string const &s, double cut)
 This is the registration of an individual cut string, with a double cut value. More...
 
 Selector ()
 Constructor clears the bits. More...
 
void set (std::string const &s, bool val=true)
 Set a given selection cut, on or off. More...
 
void set (index_type const &i, bool val=true)
 
void set (std::string const &s, int cut, bool val=true)
 Set a given selection cut, on or off, and reset int cut value. More...
 
void set (index_type const &i, int cut, bool val=true)
 
void set (std::string const &s, double cut, bool val=true)
 Set a given selection cut, on or off, and reset int cut value. More...
 
void set (index_type const &i, double cut, bool val=true)
 
void setIgnored (pat::strbitset &ret)
 set ignored bits More...
 
void setIgnoredCuts (std::vector< std::string > const &bitsToIgnore)
 set the bits to ignore from a vector More...
 
virtual ~Selector ()
 

Private Attributes

Version_t version_
 

Additional Inherited Members

- Protected Attributes inherited from Selector< pat::Electron >
pat::strbitset bits_
 the bitset indexed by strings More...
 
cut_flow_map cutFlow_
 map of cut flows in "human" order More...
 
double_map doubleCuts_
 the double-value cut map More...
 
int_map intCuts_
 the int-value cut map More...
 
pat::strbitset retInternal_
 internal ret if users don't care about return bits More...
 

Detailed Description

Definition at line 61 of file SimpleCutBasedElectronIDSelectionFunctor.h.

Member Enumeration Documentation

Enumerator
relIso95 
cIso95 
relIso90 
cIso90 
relIso85 
cIso85 
relIso80 
cIso80 
relIso70 
cIso70 
relIso60 
cIso60 
NONE 

Definition at line 65 of file SimpleCutBasedElectronIDSelectionFunctor.h.

Constructor & Destructor Documentation

SimpleCutBasedElectronIDSelectionFunctor::SimpleCutBasedElectronIDSelectionFunctor ( )
inline

Definition at line 68 of file SimpleCutBasedElectronIDSelectionFunctor.h.

68 {}
SimpleCutBasedElectronIDSelectionFunctor::SimpleCutBasedElectronIDSelectionFunctor ( edm::ParameterSet const &  parameters)
inline

Definition at line 71 of file SimpleCutBasedElectronIDSelectionFunctor.h.

References Selector< pat::Electron >::getBitTemplate(), edm::ParameterSet::getParameter(), initialize(), and Selector< pat::Electron >::retInternal_.

72  {
73  // get the cuts from the PS
74  initialize( parameters.getParameter<Double_t>("trackIso_EB"),
75  parameters.getParameter<Double_t>("ecalIso_EB"),
76  parameters.getParameter<Double_t>("hcalIso_EB"),
77  parameters.getParameter<Double_t>("sihih_EB"),
78  parameters.getParameter<Double_t>("dphi_EB"),
79  parameters.getParameter<Double_t>("deta_EB"),
80  parameters.getParameter<Double_t>("hoe_EB"),
81  parameters.getParameter<Double_t>("cIso_EB"),
82  parameters.getParameter<Double_t>("trackIso_EE"),
83  parameters.getParameter<Double_t>("ecalIso_EE"),
84  parameters.getParameter<Double_t>("hcalIso_EE"),
85  parameters.getParameter<Double_t>("sihih_EE"),
86  parameters.getParameter<Double_t>("dphi_EE"),
87  parameters.getParameter<Double_t>("deta_EE"),
88  parameters.getParameter<Double_t>("hoe_EE"),
89  parameters.getParameter<Double_t>("cIso_EE"),
90  parameters.getParameter<Int_t>("conversionRejection"),
91  parameters.getParameter<Int_t>("maxNumberOfExpectedMissingHits"));
93  }
pat::strbitset retInternal_
internal ret if users don&#39;t care about return bits
Definition: Selector.h:287
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
Definition: Selector.h:212
SimpleCutBasedElectronIDSelectionFunctor::SimpleCutBasedElectronIDSelectionFunctor ( Version_t  version)
inline

Definition at line 95 of file SimpleCutBasedElectronIDSelectionFunctor.h.

References cIso80, gather_cfg::cout, Selector< pat::Electron >::getBitTemplate(), initialize(), NONE, and Selector< pat::Electron >::retInternal_.

96  {
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 "
101  << std::endl;
102  version = cIso80;
103  }
106  }
pat::strbitset retInternal_
internal ret if users don&#39;t care about return bits
Definition: Selector.h:287
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
Definition: Selector.h:212
tuple cout
Definition: gather_cfg.py:145

Member Function Documentation

void SimpleCutBasedElectronIDSelectionFunctor::initialize ( Version_t  version)
inline

Definition at line 108 of file SimpleCutBasedElectronIDSelectionFunctor.h.

References cIso60, cIso70, cIso80, cIso85, cIso90, cIso95, alignCSCRings::e, Selector< pat::Electron >::push_back(), relIso60, relIso70, relIso80, relIso85, relIso90, relIso95, Selector< pat::Electron >::set(), relval_steps::version, and version_.

Referenced by SimpleCutBasedElectronIDSelectionFunctor().

109  {
110  version_ = version;
111  // push back the variables
112  push_back("trackIso_EB");
113  push_back("ecalIso_EB" );
114  push_back("hcalIso_EB" );
115  push_back("sihih_EB" );
116  push_back("dphi_EB" );
117  push_back("deta_EB" );
118  push_back("hoe_EB" );
119  push_back("cIso_EB" );
120 
121  push_back("trackIso_EE");
122  push_back("ecalIso_EE" );
123  push_back("hcalIso_EE" );
124  push_back("sihih_EE" );
125  push_back("dphi_EE" );
126  push_back("deta_EE" );
127  push_back("hoe_EE" );
128  push_back("cIso_EE" );
129 
130  push_back("conversionRejection" );
131  push_back("maxNumberOfExpectedMissingHits" );
132 
133 
134 
135 
136  if (version_ == relIso95) {
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. );
145 
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. );
154 
155  set("conversionRejection", 0);
156  set("maxNumberOfExpectedMissingHits", 1);
157 
158  }
159  else if (version_ == cIso95) {
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);
168 
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);
177 
178  set("conversionRejection", 0);
179  set("maxNumberOfExpectedMissingHits", 1);
180 
181  }
182  else if (version_ == relIso90) {
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. );
191 
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. );
200 
201  set("conversionRejection", 1);
202  set("maxNumberOfExpectedMissingHits", 1);
203  }
204  else if (version_ == cIso90) {
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);
213 
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);
222 
223  set("conversionRejection", 1);
224  set("maxNumberOfExpectedMissingHits", 1);
225  }
226  else if (version_ == relIso85) {
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. );
235 
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. );
244 
245  set("conversionRejection", 1);
246  set("maxNumberOfExpectedMissingHits", 1);
247  }
248  else if (version_ == cIso85) {
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);
257 
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);
266 
267  set("conversionRejection", 1);
268  set("maxNumberOfExpectedMissingHits", 1);
269  }
270  else if (version_ == relIso80) {
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.);
279 
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.);
288 
289  set("conversionRejection", 1);
290  set("maxNumberOfExpectedMissingHits", 0);
291  }
292  else if (version_ == cIso80) {
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);
301 
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);
310 
311  set("conversionRejection", 1);
312  set("maxNumberOfExpectedMissingHits", 0);
313  }
314  else if (version_ == relIso70) {
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.);
323 
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.);
332 
333  set("conversionRejection", 1);
334  set("maxNumberOfExpectedMissingHits", 0);
335  }
336  else if (version_ == cIso70) {
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);
345 
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);
354 
355  set("conversionRejection", 1);
356  set("maxNumberOfExpectedMissingHits", 0);
357  }
358  else if (version_ == relIso60) {
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.);
367 
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.);
376 
377  set("conversionRejection", 1);
378  set("maxNumberOfExpectedMissingHits", 0);
379  }
380  else if (version_ == cIso60) {
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);
389 
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);
398 
399  set("conversionRejection", 1);
400  set("maxNumberOfExpectedMissingHits", 0);
401  }
402  }
void set(std::string const &s, bool val=true)
Set a given selection cut, on or off.
Definition: Selector.h:105
virtual void push_back(std::string const &s)
This is the registration of an individual cut string.
Definition: Selector.h:46
void SimpleCutBasedElectronIDSelectionFunctor::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 
)
inline

Definition at line 404 of file SimpleCutBasedElectronIDSelectionFunctor.h.

References NONE, Selector< pat::Electron >::push_back(), Selector< pat::Electron >::set(), and version_.

411  {
412  version_ = NONE;
413  push_back("trackIso_EB");
414  push_back("ecalIso_EB" );
415  push_back("hcalIso_EB" );
416  push_back("sihih_EB" );
417  push_back("dphi_EB" );
418  push_back("deta_EB" );
419  push_back("hoe_EB" );
420  push_back("cIso_EB" );
421 
422  push_back("trackIso_EE");
423  push_back("ecalIso_EE" );
424  push_back("hcalIso_EE" );
425  push_back("sihih_EE" );
426  push_back("dphi_EE" );
427  push_back("deta_EE" );
428  push_back("hoe_EE" );
429  push_back("cIso_EE" );
430 
431  push_back("conversionRejection" );
432  push_back("maxNumberOfExpectedMissingHits" );
433 
434 
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);
443 
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);
452 
453  set("conversionRejection", conversionRejection);
454  set("maxNumberOfExpectedMissingHits", maxNumberOfExpectedMissingHits);
455 
456  }
void set(std::string const &s, bool val=true)
Set a given selection cut, on or off.
Definition: Selector.h:105
virtual void push_back(std::string const &s)
This is the registration of an individual cut string.
Definition: Selector.h:46
bool SimpleCutBasedElectronIDSelectionFunctor::operator() ( const pat::Electron t,
pat::strbitset ret 
)
inlinevirtual

This provides the interface for base classes to select objects.

Implements Selector< pat::Electron >.

Definition at line 458 of file SimpleCutBasedElectronIDSelectionFunctor.h.

References spring10Variables().

459  {
460  // for the time being only Spring10 variable definition
461  return spring10Variables(electron, ret);
462  }
bool spring10Variables(const pat::Electron &electron, pat::strbitset &ret)
bool SimpleCutBasedElectronIDSelectionFunctor::spring10Variables ( const pat::Electron electron,
pat::strbitset ret 
)
inline

Definition at line 465 of file SimpleCutBasedElectronIDSelectionFunctor.h.

References reco::GsfElectron::convDcot(), reco::GsfElectron::convDist(), Selector< pat::Electron >::cut(), reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), reco::GsfElectron::dr03EcalRecHitSumEt(), reco::GsfElectron::dr03HcalTowerSumEt(), reco::GsfElectron::dr03TkSumPt(), pat::Electron::gsfTrack(), reco::GsfElectron::hadronicOverEm(), Selector< pat::Electron >::ignoreCut(), reco::GsfElectron::isEB(), bookConverter::max, reco::HitPattern::MISSING_INNER_HITS, reco::GsfElectron::p4(), Selector< pat::Electron >::passCut(), runTheMatrix::ret, pat::strbitset::set(), Selector< pat::Electron >::setIgnored(), and reco::GsfElectron::sigmaIetaIeta().

Referenced by operator()().

466  {
467  ret.set(false);
468  //
469  Double_t eleET = electron.p4().Pt();
470  Double_t trackIso = electron.dr03TkSumPt()/eleET;
471  Double_t ecalIso = electron.dr03EcalRecHitSumEt()/eleET;
472  Double_t hcalIso = electron.dr03HcalTowerSumEt()/eleET;
473  Double_t sihih = electron.sigmaIetaIeta();
474  Double_t Dphi = electron.deltaPhiSuperClusterTrackAtVtx();
475  Double_t Deta = electron.deltaEtaSuperClusterTrackAtVtx();
476  Double_t HoE = electron.hadronicOverEm();
477  Double_t cIso = 0;
478  if (electron.isEB()) { cIso =
479  ( electron.dr03TkSumPt() + std::max(0.,electron.dr03EcalRecHitSumEt() -1.)
480  + electron.dr03HcalTowerSumEt() ) / eleET;
481  }
482  else {
483  cIso = ( electron.dr03TkSumPt()+electron.dr03EcalRecHitSumEt()+
484  electron.dr03HcalTowerSumEt() ) / eleET;
485  }
486  Int_t innerHits = electron.gsfTrack()->hitPattern().numberOfHits(reco::HitPattern::MISSING_INNER_HITS);
487  // in 39 conversion rejection variables are accessible from Gsf electron
488  Double_t dist = electron.convDist(); // default value is -9999 if conversion partner not found
489  Double_t dcot = electron.convDcot(); // default value is -9999 if conversion partner not found
490  Bool_t isConv = fabs(dist) < 0.02 && fabs(dcot) < 0.02;
491  // now apply the cuts
492  if (electron.isEB()) { // BARREL case
493  // check the EB cuts
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");
500  if ( HoE < cut("hoe_EB", double()) || ignoreCut("hoe_EB") ) passCut(ret, "hoe_EB");
501  if ( cIso < cut("cIso_EB", double()) || ignoreCut("cIso_EB") ) passCut(ret, "cIso_EB");
502  // pass all the EE cuts
503  passCut(ret, "trackIso_EE");
504  passCut(ret, "ecalIso_EE");
505  passCut(ret, "hcalIso_EE");
506  passCut(ret, "sihih_EE");
507  passCut(ret, "dphi_EE");
508  passCut(ret, "deta_EE");
509  passCut(ret, "hoe_EE");
510  passCut(ret, "cIso_EE");
511  } else { // ENDCAPS case
512  // check the EE cuts
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");
519  if ( HoE < cut("hoe_EE", double()) || ignoreCut("hoe_EE") ) passCut(ret, "hoe_EE");
520  if ( cIso < cut("cIso_EE", double()) || ignoreCut("cIso_EE") ) passCut(ret, "cIso_EE");
521  // pass all the EB cuts
522  passCut(ret, "trackIso_EB");
523  passCut(ret, "ecalIso_EB");
524  passCut(ret, "hcalIso_EB");
525  passCut(ret, "sihih_EB");
526  passCut(ret, "dphi_EB");
527  passCut(ret, "deta_EB");
528  passCut(ret, "hoe_EB");
529  passCut(ret, "cIso_EB");
530  }
531 
532  // conversion rejection common for EB and EE
533  if ( innerHits <= cut("maxNumberOfExpectedMissingHits", int()))
534  passCut(ret, "maxNumberOfExpectedMissingHits");
535  if ( 0==cut("conversionRejection", int()) || isConv==false)
536  passCut(ret, "conversionRejection");
537  setIgnored(ret);
538  return (bool)ret;
539  }
tuple ret
prodAgent to be discontinued
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:224
void setIgnored(pat::strbitset &ret)
set ignored bits
Definition: Selector.h:224
float convDist() const
Definition: GsfElectron.h:553
bool isEB() const
Definition: GsfElectron.h:350
float convDcot() const
Definition: GsfElectron.h:554
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:247
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
Definition: Selector.h:176
float sigmaIetaIeta() const
Definition: GsfElectron.h:416
float hadronicOverEm() const
Definition: GsfElectron.h:457
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 &quot;s&quot;
Definition: Selector.h:159
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:250
float dr03TkSumPt() const
Definition: GsfElectron.h:491
strbitset & set(bool val=true)
set method of all bits
Definition: strbitset.h:144
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:492
float dr03HcalTowerSumEt() const
Definition: GsfElectron.h:495
int cut(index_type const &i, int val) const
Access the int cut values at index &quot;s&quot;.
Definition: Selector.h:194

Member Data Documentation

Version_t SimpleCutBasedElectronIDSelectionFunctor::version_
private

Definition at line 545 of file SimpleCutBasedElectronIDSelectionFunctor.h.

Referenced by initialize().