CMS 3D CMS Logo

ElectronClassification.cc
Go to the documentation of this file.
3 
4 //===================================================================
5 // Author: Federico Ferri - INFN Milano, Bicocca university
6 // 12/2005
7 // See GsfElectron::Classification
8 //===================================================================
9 
10 using namespace reco;
11 
13  if (!electron.isEB() && !electron.isEE()) {
14  edm::LogWarning("") << "ElectronClassification::init(): Undefined electron, eta = " << electron.eta() << "!!!!";
15  return GsfElectron::UNKNOWN;
16  }
17 
18  if (electron.isEBEEGap() || electron.isEBEtaGap() || electron.isEERingGap()) {
19  return GsfElectron::GAP;
20  }
21 
22  float fbrem = electron.trackFbrem();
23  int nbrem = electron.numberOfBrems();
24 
25  if (electron.superClusterFbrem() - fbrem >= 0.15) {
26  return GsfElectron::BADTRACK;
27  }
28 
29  if (nbrem == 0 && fbrem < 0.5) {
30  return GsfElectron::GOLDEN;
31  }
32  if (nbrem == 0 && fbrem >= 0.5) {
33  return GsfElectron::BIGBREM;
34  }
36 }
double eta() const final
momentum pseudorapidity
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:720
bool isEE() const
Definition: GsfElectron.h:329
bool isEB() const
Definition: GsfElectron.h:328
float trackFbrem() const
Definition: GsfElectron.h:719
int numberOfBrems() const
Definition: GsfElectron.h:725
fixed size matrix
reco::GsfElectron::Classification classifyElectron(reco::GsfElectron const &)