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 Types | Private Member Functions | Private Attributes
PFElectronAlgo Class Reference

#include <PFElectronAlgo.h>

Public Member Functions

const std::vector
< reco::PFCandidate > & 
getAllElectronCandidates ()
 
const std::vector
< reco::PFCandidate > & 
getElectronCandidates ()
 
const std::vector
< reco::PFCandidateElectronExtra > & 
getElectronExtra ()
 
bool isElectronValidCandidate (const reco::PFBlockRef &blockRef, std::vector< bool > &active, const reco::Vertex &primaryVertex)
 
 PFElectronAlgo (const double mvaEleCut, std::string mvaWeightFileEleID, const boost::shared_ptr< PFSCEnergyCalibration > &thePFSCEnergyCalibration, const boost::shared_ptr< PFEnergyCalibration > &thePFEnergyCalibration, bool applyCrackCorrections, bool usePFSCEleCalib, bool useEGElectrons, bool useEGammaSupercluster, double sumEtEcalIsoForEgammaSC_barrel, double sumEtEcalIsoForEgammaSC_endcap, double coneEcalIsoForEgammaSC, double sumPtTrackIsoForEgammaSC_barrel, double sumPtTrackIsoForEgammaSC_endcap, unsigned int nTrackIsoForEgammaSC, double coneTrackIsoForEgammaSC)
 
void setEGElectronCollection (const reco::GsfElectronCollection &egelectrons)
 
 ~PFElectronAlgo ()
 

Private Types

typedef std::map< unsigned int,
std::vector< unsigned int > > 
AssMap
 

Private Member Functions

unsigned int FindClosestElement (const unsigned int iele, std::multimap< double, unsigned int > &Elems, float &chi2cut, std::vector< bool > &active, const reco::PFBlockRef &blockRef)
 
bool isPrimaryTrack (const reco::PFBlockElementTrack &KfEl, const reco::PFBlockElementGsfTrack &GsfEl)
 
void RunPFElectron (const reco::PFBlockRef &blockRef, std::vector< bool > &active, const reco::Vertex &primaryVertex)
 
void SetActive (const reco::PFBlockRef &blockRef, AssMap &associatedToGsf_, AssMap &associatedToBrems_, AssMap &associatedToEcal_, std::vector< bool > &active)
 
void SetCandidates (const reco::PFBlockRef &blockRef, AssMap &associatedToGsf_, AssMap &associatedToBrems_, AssMap &associatedToEcal_)
 
void SetIDOutputs (const reco::PFBlockRef &blockRef, AssMap &associatedToGsf_, AssMap &associatedToBrems_, AssMap &associatedToEcal_, const reco::Vertex &primaryVertex)
 
bool SetLinks (const reco::PFBlockRef &blockRef, AssMap &associatedToGsf_, AssMap &associatedToBrems_, AssMap &associatedToEcal_, std::vector< bool > &active, const reco::Vertex &primaryVertex)
 

Private Attributes

std::vector< reco::PFCandidateallElCandidate_
 
bool applyCrackCorrections_
 
std::vector< double > BDToutput_
 
float chi2_gsf
 
float chi2_kf
 
double coneEcalIsoForEgammaSC_
 
double coneTrackIsoForEgammaSC_
 
std::vector< std::pair
< unsigned int, unsigned int > > 
convGsfTrack_
 
float DEtaGsfEcalClust
 
float dPtOverPt_gsf
 
float DPtOverPt_gsf
 
float DPtOverPt_kf
 
float earlyBrem
 
float EGsfPoutMode
 
std::vector< reco::PFCandidateelCandidate_
 
std::map< unsigned int,
std::vector< reco::PFCandidate > > 
electronConstituents_
 
std::vector
< reco::PFCandidateElectronExtra
electronExtra_
 
float Eta_gsf
 
float EtotBremPinPoutMode
 
float EtotPinMode
 
std::vector< std::pair
< unsigned int, unsigned int > > 
fifthStepKfTrack_
 
float firstBrem
 
std::vector< bool > GsfTrackSingleEcal_
 
float HOverHE
 
float HOverPin
 
bool isvalid_
 
float lateBrem
 
float lnPt_gsf
 
std::vector< bool > lockExtraKf_
 
double mvaEleCut_
 
const char * mvaWeightFile_
 
float nhit_gsf
 
float nhit_kf
 
unsigned int nTrackIsoForEgammaSC_
 
float SigmaEtaEta
 
double sumEtEcalIsoForEgammaSC_barrel_
 
double sumEtEcalIsoForEgammaSC_endcap_
 
double sumPtTrackIsoForEgammaSC_barrel_
 
double sumPtTrackIsoForEgammaSC_endcap_
 
const std::vector
< reco::GsfElectron > * 
theGsfElectrons_
 
boost::shared_ptr
< PFEnergyCalibration
thePFEnergyCalibration_
 
boost::shared_ptr
< PFSCEnergyCalibration
thePFSCEnergyCalibration_
 
TMVA::Reader * tmvaReader_
 
bool useEGammaSupercluster_
 
bool useEGElectrons_
 
bool usePFSCEleCalib_
 

Detailed Description

Definition at line 26 of file PFElectronAlgo.h.

Member Typedef Documentation

typedef std::map< unsigned int, std::vector<unsigned int> > PFElectronAlgo::AssMap
private

Definition at line 71 of file PFElectronAlgo.h.

Constructor & Destructor Documentation

PFElectronAlgo::PFElectronAlgo ( const double  mvaEleCut,
std::string  mvaWeightFileEleID,
const boost::shared_ptr< PFSCEnergyCalibration > &  thePFSCEnergyCalibration,
const boost::shared_ptr< PFEnergyCalibration > &  thePFEnergyCalibration,
bool  applyCrackCorrections,
bool  usePFSCEleCalib,
bool  useEGElectrons,
bool  useEGammaSupercluster,
double  sumEtEcalIsoForEgammaSC_barrel,
double  sumEtEcalIsoForEgammaSC_endcap,
double  coneEcalIsoForEgammaSC,
double  sumPtTrackIsoForEgammaSC_barrel,
double  sumPtTrackIsoForEgammaSC_endcap,
unsigned int  nTrackIsoForEgammaSC,
double  coneTrackIsoForEgammaSC 
)

Definition at line 33 of file PFElectronAlgo.cc.

PFElectronAlgo::~PFElectronAlgo ( )
inline

Definition at line 47 of file PFElectronAlgo.h.

References tmvaReader_.

47 {delete tmvaReader_;};
TMVA::Reader * tmvaReader_

Member Function Documentation

unsigned int PFElectronAlgo::FindClosestElement ( const unsigned int  iele,
std::multimap< double, unsigned int > &  Elems,
float &  chi2cut,
std::vector< bool > &  active,
const reco::PFBlockRef blockRef 
)
private
const std::vector<reco::PFCandidate>& PFElectronAlgo::getAllElectronCandidates ( )
inline

Definition at line 62 of file PFElectronAlgo.h.

References allElCandidate_.

62 {return allElCandidate_;};
std::vector< reco::PFCandidate > allElCandidate_
const std::vector<reco::PFCandidate>& PFElectronAlgo::getElectronCandidates ( )
inline

Definition at line 59 of file PFElectronAlgo.h.

References elCandidate_.

59 {return elCandidate_;};
std::vector< reco::PFCandidate > elCandidate_
const std::vector< reco::PFCandidateElectronExtra>& PFElectronAlgo::getElectronExtra ( )
inline

Definition at line 65 of file PFElectronAlgo.h.

References electronExtra_.

65 {return electronExtra_;};
std::vector< reco::PFCandidateElectronExtra > electronExtra_
bool PFElectronAlgo::isElectronValidCandidate ( const reco::PFBlockRef blockRef,
std::vector< bool > &  active,
const reco::Vertex primaryVertex 
)
inline

Definition at line 50 of file PFElectronAlgo.h.

References isvalid_, and RunPFElectron().

53  {
54  isvalid_=false;
55  RunPFElectron(blockRef,active, primaryVertex);
56  return isvalid_;};
void RunPFElectron(const reco::PFBlockRef &blockRef, std::vector< bool > &active, const reco::Vertex &primaryVertex)
bool PFElectronAlgo::isPrimaryTrack ( const reco::PFBlockElementTrack KfEl,
const reco::PFBlockElementGsfTrack GsfEl 
)
private

Definition at line 2668 of file PFElectronAlgo.cc.

void PFElectronAlgo::RunPFElectron ( const reco::PFBlockRef blockRef,
std::vector< bool > &  active,
const reco::Vertex primaryVertex 
)
private

Definition at line 85 of file PFElectronAlgo.cc.

Referenced by isElectronValidCandidate().

void PFElectronAlgo::SetActive ( const reco::PFBlockRef blockRef,
AssMap associatedToGsf_,
AssMap associatedToBrems_,
AssMap associatedToEcal_,
std::vector< bool > &  active 
)
private

Definition at line 2545 of file PFElectronAlgo.cc.

void PFElectronAlgo::SetCandidates ( const reco::PFBlockRef blockRef,
AssMap associatedToGsf_,
AssMap associatedToBrems_,
AssMap associatedToEcal_ 
)
private

Definition at line 1909 of file PFElectronAlgo.cc.

void PFElectronAlgo::setEGElectronCollection ( const reco::GsfElectronCollection egelectrons)

Definition at line 2664 of file PFElectronAlgo.cc.

void PFElectronAlgo::SetIDOutputs ( const reco::PFBlockRef blockRef,
AssMap associatedToGsf_,
AssMap associatedToBrems_,
AssMap associatedToEcal_,
const reco::Vertex primaryVertex 
)
private

Definition at line 1422 of file PFElectronAlgo.cc.

bool PFElectronAlgo::SetLinks ( const reco::PFBlockRef blockRef,
AssMap associatedToGsf_,
AssMap associatedToBrems_,
AssMap associatedToEcal_,
std::vector< bool > &  active,
const reco::Vertex primaryVertex 
)
private

Definition at line 132 of file PFElectronAlgo.cc.

Member Data Documentation

std::vector<reco::PFCandidate> PFElectronAlgo::allElCandidate_
private

Definition at line 113 of file PFElectronAlgo.h.

Referenced by getAllElectronCandidates().

bool PFElectronAlgo::applyCrackCorrections_
private

Definition at line 127 of file PFElectronAlgo.h.

std::vector<double> PFElectronAlgo::BDToutput_
private

Definition at line 115 of file PFElectronAlgo.h.

float PFElectronAlgo::chi2_gsf
private

Definition at line 146 of file PFElectronAlgo.h.

float PFElectronAlgo::chi2_kf
private

Definition at line 146 of file PFElectronAlgo.h.

double PFElectronAlgo::coneEcalIsoForEgammaSC_
private

Definition at line 133 of file PFElectronAlgo.h.

double PFElectronAlgo::coneTrackIsoForEgammaSC_
private

Definition at line 137 of file PFElectronAlgo.h.

std::vector< std::pair <unsigned int, unsigned int> > PFElectronAlgo::convGsfTrack_
private

Definition at line 120 of file PFElectronAlgo.h.

float PFElectronAlgo::DEtaGsfEcalClust
private

Definition at line 153 of file PFElectronAlgo.h.

float PFElectronAlgo::dPtOverPt_gsf
private

Definition at line 146 of file PFElectronAlgo.h.

float PFElectronAlgo::DPtOverPt_gsf
private

Definition at line 146 of file PFElectronAlgo.h.

float PFElectronAlgo::DPtOverPt_kf
private

Definition at line 146 of file PFElectronAlgo.h.

float PFElectronAlgo::earlyBrem
private

Definition at line 156 of file PFElectronAlgo.h.

float PFElectronAlgo::EGsfPoutMode
private

Definition at line 152 of file PFElectronAlgo.h.

std::vector<reco::PFCandidate> PFElectronAlgo::elCandidate_
private

Definition at line 112 of file PFElectronAlgo.h.

Referenced by getElectronCandidates().

std::map<unsigned int,std::vector<reco::PFCandidate> > PFElectronAlgo::electronConstituents_
private

Definition at line 114 of file PFElectronAlgo.h.

std::vector<reco::PFCandidateElectronExtra > PFElectronAlgo::electronExtra_
private

Definition at line 116 of file PFElectronAlgo.h.

Referenced by getElectronExtra().

float PFElectronAlgo::Eta_gsf
private

Definition at line 143 of file PFElectronAlgo.h.

float PFElectronAlgo::EtotBremPinPoutMode
private

Definition at line 152 of file PFElectronAlgo.h.

float PFElectronAlgo::EtotPinMode
private

Definition at line 152 of file PFElectronAlgo.h.

std::vector< std::pair <unsigned int, unsigned int> > PFElectronAlgo::fifthStepKfTrack_
private

Definition at line 119 of file PFElectronAlgo.h.

float PFElectronAlgo::firstBrem
private

Definition at line 156 of file PFElectronAlgo.h.

std::vector<bool> PFElectronAlgo::GsfTrackSingleEcal_
private

Definition at line 118 of file PFElectronAlgo.h.

float PFElectronAlgo::HOverHE
private

Definition at line 157 of file PFElectronAlgo.h.

float PFElectronAlgo::HOverPin
private

Definition at line 157 of file PFElectronAlgo.h.

bool PFElectronAlgo::isvalid_
private

Definition at line 159 of file PFElectronAlgo.h.

Referenced by isElectronValidCandidate().

float PFElectronAlgo::lateBrem
private

Definition at line 156 of file PFElectronAlgo.h.

float PFElectronAlgo::lnPt_gsf
private

Definition at line 143 of file PFElectronAlgo.h.

std::vector<bool> PFElectronAlgo::lockExtraKf_
private

Definition at line 117 of file PFElectronAlgo.h.

double PFElectronAlgo::mvaEleCut_
private

Definition at line 124 of file PFElectronAlgo.h.

const char* PFElectronAlgo::mvaWeightFile_
private

Definition at line 139 of file PFElectronAlgo.h.

float PFElectronAlgo::nhit_gsf
private

Definition at line 149 of file PFElectronAlgo.h.

float PFElectronAlgo::nhit_kf
private

Definition at line 149 of file PFElectronAlgo.h.

unsigned int PFElectronAlgo::nTrackIsoForEgammaSC_
private

Definition at line 136 of file PFElectronAlgo.h.

float PFElectronAlgo::SigmaEtaEta
private

Definition at line 154 of file PFElectronAlgo.h.

double PFElectronAlgo::sumEtEcalIsoForEgammaSC_barrel_
private

Definition at line 131 of file PFElectronAlgo.h.

double PFElectronAlgo::sumEtEcalIsoForEgammaSC_endcap_
private

Definition at line 132 of file PFElectronAlgo.h.

double PFElectronAlgo::sumPtTrackIsoForEgammaSC_barrel_
private

Definition at line 134 of file PFElectronAlgo.h.

double PFElectronAlgo::sumPtTrackIsoForEgammaSC_endcap_
private

Definition at line 135 of file PFElectronAlgo.h.

const std::vector<reco::GsfElectron>* PFElectronAlgo::theGsfElectrons_
private

Definition at line 161 of file PFElectronAlgo.h.

boost::shared_ptr<PFEnergyCalibration> PFElectronAlgo::thePFEnergyCalibration_
private

Definition at line 126 of file PFElectronAlgo.h.

boost::shared_ptr<PFSCEnergyCalibration> PFElectronAlgo::thePFSCEnergyCalibration_
private

Definition at line 125 of file PFElectronAlgo.h.

TMVA::Reader* PFElectronAlgo::tmvaReader_
private

Definition at line 123 of file PFElectronAlgo.h.

Referenced by ~PFElectronAlgo().

bool PFElectronAlgo::useEGammaSupercluster_
private

Definition at line 130 of file PFElectronAlgo.h.

bool PFElectronAlgo::useEGElectrons_
private

Definition at line 129 of file PFElectronAlgo.h.

bool PFElectronAlgo::usePFSCEleCalib_
private

Definition at line 128 of file PFElectronAlgo.h.