CMS 3D CMS Logo

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

#include <ElectronClassification.h>

Public Member Functions

virtual void correct (reco::GsfElectron &)
 
 ElectronClassification ()
 
reco::GsfElectron::Classification getClass () const
 

Private Member Functions

void classify (const reco::GsfElectron &)
 

Private Attributes

reco::GsfElectron::Classification electronClass_
 

Detailed Description

Definition at line 14 of file ElectronClassification.h.

Constructor & Destructor Documentation

ElectronClassification::ElectronClassification ( )
inline

Member Function Documentation

void ElectronClassification::classify ( const reco::GsfElectron electron)
private

Definition at line 26 of file ElectronClassification.cc.

References reco::GsfElectron::BIGBREM, reco::LeafCandidate::eta(), reco::GsfElectron::fbrem(), reco::GsfElectron::GAP, reco::GsfElectron::GOLDEN, reco::GsfElectron::isEB(), reco::GsfElectron::isEBEEGap(), reco::GsfElectron::isEBEtaGap(), reco::GsfElectron::isEE(), reco::GsfElectron::isEERingGap(), reco::GsfElectron::numberOfBrems(), mathSSE::return(), reco::GsfElectron::SHOWERING, reco::GsfElectron::superCluster(), reco::GsfElectron::trackMomentumAtVtx(), and reco::GsfElectron::UNKNOWN.

27  {
29 
30 
31  reco::SuperClusterRef sclRef=electron.superCluster();
32 
33  // use supercluster energy including f(Ncry) correction
34  float scEnergy=sclRef->energy();
35 
36  // first look whether it's in crack, barrel or endcap
37  if ((!electron.isEB())&&(!electron.isEE()))
38  {
39  edm::LogWarning("") << "ElectronClassification::init(): Undefined electron, eta = " <<
40  electron.eta() << "!!!!" ;
41  return ;
42  }
43 
44  if (electron.isEBEEGap() || electron.isEBEtaGap() || electron.isEERingGap())
45  {
46  electronClass_ = GsfElectron::GAP ;
47  return ;
48  }
49 
50  float pin = electron.trackMomentumAtVtx().R() ;
51  float fbrem = electron.fbrem() ;
52  int nbrem = electron.numberOfBrems() ;
53 
54  // golden
55  if (nbrem == 0 && (pin - scEnergy)/pin < 0.1 && fbrem < 0.5) {
56  electronClass_ = GsfElectron::GOLDEN ;
57  }
58 
59  // big brem
60  else if (nbrem == 0 && (pin - scEnergy)/pin < 0.1 && fbrem > 0.5) {
61  electronClass_ = GsfElectron::BIGBREM ;
62  }
63 
64  // showering
65  else
66  electronClass_ = GsfElectron::SHOWERING ;
67 
68 }
bool isEBEtaGap() const
Definition: GsfElectron.h:345
bool isEBEEGap() const
Definition: GsfElectron.h:343
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:258
0: Unidentified isolated particle
Definition: ParticleCode.h:19
bool isEERingGap() const
Definition: GsfElectron.h:349
float fbrem() const
Definition: GsfElectron.h:600
SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:168
virtual double eta() const
momentum pseudorapidity
bool isEE() const
Definition: GsfElectron.h:341
bool isEB() const
Definition: GsfElectron.h:340
return((rh^lh)&mask)
int numberOfBrems() const
Definition: GsfElectron.h:601
reco::GsfElectron::Classification electronClass_
void ElectronClassification::correct ( reco::GsfElectron electron)
virtual

Definition at line 20 of file ElectronClassification.cc.

References reco::GsfElectron::classifyElectron().

Referenced by GsfElectronAlgo::createElectron().

20  {
21  classify(electron);
22  // electron.classifyElectron(this);
24 }
void classifyElectron(Classification myclass)
Definition: GsfElectron.h:605
reco::GsfElectron::Classification electronClass_
void classify(const reco::GsfElectron &)
reco::GsfElectron::Classification ElectronClassification::getClass ( ) const
inline

Definition at line 20 of file ElectronClassification.h.

References electronClass_.

20 {return electronClass_;}
reco::GsfElectron::Classification electronClass_

Member Data Documentation

reco::GsfElectron::Classification ElectronClassification::electronClass_
private

Definition at line 32 of file ElectronClassification.h.

Referenced by ElectronClassification(), and getClass().