10 std::string signalWeightSplitting,
11 std::string backgroundWeightSplitting,
13 bool splitBackgroundPdfs) :
18 m_eleIDSwitches (eleIDSwitches) ,
19 m_signalWeightSplitting (signalWeightSplitting),
20 m_backgroundWeightSplitting (backgroundWeightSplitting),
21 m_splitSignalPdfs (splitSignalPdfs),
22 m_splitBackgroundPdfs (splitBackgroundPdfs)
25 signalWeightSplitting, backgroundWeightSplitting,
26 splitSignalPdfs, splitBackgroundPdfs) ;
49 std::string signalWeightSplitting,
50 std::string backgroundWeightSplitting,
52 bool splitBackgroundPdfs)
61 if(signalWeightSplitting.compare(
"class")==0) {
66 throw cms::Exception(
"BadConfig") <<
"Only class (non-showering / showering)"
67 <<
" and fullclass (golden / bigbrem / narrow / showering)"
68 <<
" splitting is implemented right now";
79 if(backgroundWeightSplitting.compare(
"class")==0) {
84 throw cms::Exception(
"BadConfig") <<
"Only class (0 brem clusters / >=1 brem clusters)"
85 <<
" splitting is implemented right now";
102 if(signalWeightSplitting.compare(
"class")==0) {
107 throw cms::Exception(
"BadConfig") <<
"Only class (0 brem clusters / >=1 brem clusters)"
108 <<
" splitting is implemented right now";
119 if(backgroundWeightSplitting.compare(
"class")==0) {
124 throw cms::Exception(
"BadConfig") <<
"Only class (0 brem clusters / >=1 brem clusters)"
125 <<
" splitting is implemented right now";
142 if(signalWeightSplitting.compare(
"class")==0) {
147 throw cms::Exception(
"BadConfig") <<
"Only class (0 brem clusters / >=1 brem clusters)"
148 <<
" splitting is implemented right now";
159 if(backgroundWeightSplitting.compare(
"class")==0) {
164 throw cms::Exception(
"BadConfig") <<
"Only class (0 brem clusters / >=1 brem clusters)"
165 <<
" splitting is implemented right now";
182 if(signalWeightSplitting.compare(
"class")==0) {
187 throw cms::Exception(
"BadConfig") <<
"Only class (0 brem clusters / >=1 brem clusters)"
188 <<
" splitting is implemented right now";
199 if(backgroundWeightSplitting.compare(
"class")==0) {
204 throw cms::Exception(
"BadConfig") <<
"Only class (0 brem clusters / >=1 brem clusters)"
205 <<
" splitting is implemented right now";
225 std::vector<float> &measurements,
258 std::vector<float> measurements ;
259 getInputVar (electron, measurements, myEcalCluster) ;
266 sprintf (className,
"class%d",bitVal);
268 throw cms::Exception(
"BadConfig") <<
"Only class (0 brem clusters / >=1 brem clusters)"
269 <<
" splitting is implemented right now";
274 float thisPt = electron.
pt();
virtual ~ElectronLikelihood()
dtor
void getInputVar(const reco::GsfElectron &electron, std::vector< float > &measuremnts, EcalClusterLazyTools) const
get the input variables from the electron and the e-Setup
void initFromDB(const ElectronLikelihoodCalibration *calibration)
initialize the PDFs from CondDB
float eSuperClusterOverP() const
void setSplitFrac(const char *specname, const char *catName, float frac=1.0)
set the fraction of one category for a given species
ElectronLikelihood()
ctor, not used for this algo (need initialization from ES)
LikelihoodPdfProduct * _EBgt15lh
likelihood above 15GeV/c
void addSpecies(const char *name, float priorWeight=1.)
add a species (hypothesis) to the likelihood, with a priori probability
float getRatio(const char *specName, std::vector< float > measurements, std::string)
get the likelihood ratio p(a priori) * L(specName) / L_tot
SuperClusterRef superCluster() const
reference to a SuperCluster
LikelihoodPdfProduct * _EElt15lh
float deltaEtaSuperClusterTrackAtVtx() const
float hadronicOverEm() const
LikelihoodSwitches m_eleIDSwitches
general parameters of all the ele id algorithms
float deltaPhiSuperClusterTrackAtVtx() const
int numberOfBrems() const
std::string m_signalWeightSplitting
splitting rule for PDF's
void addPdf(const char *specname, const char *name, bool splitPdf=false)
add a pdf for a species, splitted or not
virtual double pt() const
transverse momentum
void Setup(const ElectronLikelihoodCalibration *calibration, std::string signalWeightSplitting, std::string backgroundWeightSplitting, bool splitSignalPdfs, bool splitBackgroundPdfs)
LikelihoodPdfProduct * _EEgt15lh
LikelihoodPdfProduct * _EBlt15lh
likelihood below 15GeV/c
float result(const reco::GsfElectron &electron, EcalClusterLazyTools) const
get the result of the algorithm
std::string className(const T &t)