CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ElectronClassification.cc
Go to the documentation of this file.
4 
5 //===================================================================
6 // Author: Federico Ferri - INFN Milano, Bicocca university
7 // 12/2005
8 // See GsfElectron::Classification
9 //===================================================================
10 
11 using namespace reco;
12 
14  if (!electron.isEB() && !electron.isEE()) {
15  edm::LogWarning("") << "ElectronClassification::init(): Undefined electron, eta = " << electron.eta() << "!!!!";
16  return GsfElectron::UNKNOWN;
17  }
18 
19  if (electron.isEBEEGap() || electron.isEBEtaGap() || electron.isEERingGap()) {
20  return GsfElectron::GAP;
21  }
22 
23  float fbrem = electron.trackFbrem();
24  int nbrem = electron.numberOfBrems();
25 
26  if (electron.superClusterFbrem() - fbrem >= 0.15) {
27  return GsfElectron::BADTRACK;
28  }
29 
30  if (nbrem == 0 && fbrem < 0.5) {
31  return GsfElectron::GOLDEN;
32  }
33  if (nbrem == 0 && fbrem >= 0.5) {
34  return GsfElectron::BIGBREM;
35  }
37 }
bool isEBEtaGap() const
Definition: GsfElectron.h:333
bool isEBEEGap() const
Definition: GsfElectron.h:331
bool isEERingGap() const
Definition: GsfElectron.h:337
float superClusterFbrem() const
Definition: GsfElectron.h:803
bool isEE() const
Definition: GsfElectron.h:329
bool isEB() const
Definition: GsfElectron.h:328
float trackFbrem() const
Definition: GsfElectron.h:802
int numberOfBrems() const
Definition: GsfElectron.h:808
Log< level::Warning, false > LogWarning
reco::GsfElectron::Classification classifyElectron(reco::GsfElectron const &)
double eta() const final
momentum pseudorapidity