CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

ElectronClassification Class Reference

#include <ElectronClassification.h>

List of all members.

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 22 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(), reco::GsfElectron::SHOWERING, reco::GsfElectron::superCluster(), reco::GsfElectron::trackMomentumAtVtx(), and reco::GsfElectron::UNKNOWN.

 {
  electronClass_ = GsfElectron::UNKNOWN ;


   reco::SuperClusterRef sclRef=electron.superCluster();

  // use supercluster energy including f(Ncry) correction
  float scEnergy=sclRef->energy();

  // first look whether it's in crack, barrel or endcap
  if ((!electron.isEB())&&(!electron.isEE()))
   {
    edm::LogWarning("") << "ElectronClassification::init(): Undefined electron, eta = " <<
      electron.eta() << "!!!!" ;
    return ;
   }

  if (electron.isEBEEGap() || electron.isEBEtaGap() || electron.isEERingGap())
   {
        electronClass_ = GsfElectron::GAP ;
        return ;
   }

  float pin  = electron.trackMomentumAtVtx().R() ;
  float fbrem = electron.fbrem() ;
  int nbrem = electron.numberOfBrems() ;

  // golden
  if (nbrem == 0 && (pin - scEnergy)/pin < 0.1 && fbrem < 0.5) {
          electronClass_ = GsfElectron::GOLDEN ;
  }
  
  // big brem
  else if (nbrem == 0 && (pin - scEnergy)/pin < 0.1 && fbrem > 0.5) {
          electronClass_ = GsfElectron::BIGBREM ;
  }
  
  // showering
  else 
          electronClass_ = GsfElectron::SHOWERING ;

}
void ElectronClassification::correct ( reco::GsfElectron electron) [virtual]

Definition at line 16 of file ElectronClassification.cc.

References reco::GsfElectron::classifyElectron().

Referenced by GsfElectronAlgo::createElectron().

                                                          {
  classify(electron);
  //  electron.classifyElectron(this);
  electron.classifyElectron(electronClass_);
}
reco::GsfElectron::Classification ElectronClassification::getClass ( ) const [inline]

Definition at line 20 of file ElectronClassification.h.

References electronClass_.

{return electronClass_;}

Member Data Documentation

Definition at line 32 of file ElectronClassification.h.

Referenced by ElectronClassification(), and getClass().