src
RecoEgamma
EgammaElectronAlgos
src
ElectronClassification.cc
Go to the documentation of this file.
1
#include "
RecoEgamma/EgammaElectronAlgos/interface/ElectronClassification.h
"
2
#include "
DataFormats/EgammaReco/interface/SuperCluster.h
"
3
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
4
5
//===================================================================
6
// Author: Federico Ferri - INFN Milano, Bicocca university
7
// 12/2005
8
// See GsfElectron::Classification
9
//===================================================================
10
11
using namespace
reco
;
12
13
GsfElectron::Classification
egamma::classifyElectron
(
GsfElectron
const
&
electron
) {
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
}
36
return
GsfElectron::SHOWERING
;
37
}
reco::GsfElectron::UNKNOWN
Definition:
GsfElectron.h:799
reco::GsfElectron::GOLDEN
Definition:
GsfElectron.h:799
reco::GsfElectron::BIGBREM
Definition:
GsfElectron.h:799
MessageLogger.h
reco::GsfElectron
Definition:
GsfElectron.h:36
reco::GsfElectron::Classification
Classification
Definition:
GsfElectron.h:799
reco::GsfElectron::BADTRACK
Definition:
GsfElectron.h:799
reco::GsfElectron::GAP
Definition:
GsfElectron.h:799
ElectronClassification.h
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:46
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition:
MessageLogger.h:122
reco::GsfElectron::SHOWERING
Definition:
GsfElectron.h:799
HPSPFTauProducerPuppi_cfi.electron
electron
Definition:
HPSPFTauProducerPuppi_cfi.py:13
egamma::classifyElectron
reco::GsfElectron::Classification classifyElectron(reco::GsfElectron const &)
SuperCluster.h
Generated for CMSSW Reference Manual by
1.8.14