30 if(!splitFractions.empty() && splitPdf) {
31 std::map<std::string,float>::const_iterator splitCatItr;
32 for(splitCatItr=splitFractions.begin();splitCatItr!=splitFractions.end();splitCatItr++) {
35 _splitRule.insert( std::make_pair(splitCatItr->first,totPdfName) );
40 else if(!splitFractions.empty()) {
41 std::map<std::string,float>::const_iterator splitCatItr;
42 for(splitCatItr=splitFractions.begin();splitCatItr!=splitFractions.end();splitCatItr++) {
45 _splitRule.insert( std::make_pair(splitCatItr->first,totPdfName) );
53 _splitRule.insert( std::make_pair(
"NOSPLIT",totPdfName) );
62 std::map<std::string,std::string>::const_iterator ruleItr;
65 std::vector<ElectronLikelihoodCalibration::Entry>::const_iterator entryItr;
67 for(entryItr=calibration->
data.begin(); entryItr!=calibration->
data.end(); entryItr++) {
68 if(entryItr->category.label==ruleItr->second) {
70 _splitPdf.insert( std::make_pair(ruleItr->first,histo) );
77 <<
" is not present in the Conditions DB!";
86 bool normalized)
const {
90 <<
" is SPLITTED by category " << gsfClass;
106 prob=thePdf->
value(x);
110 <<
" for class = " << gsfClass
114 <<
" prob = " <<
prob;
127 for(
int i=0;
i<=nBins+1;
i++) {
std::map< std::string, const PhysicsTools::Calibration::HistogramF * > _splitPdf
void initFromDB(const ElectronLikelihoodCalibration *calibration)
initialize PDFs from CondDB
void split(const std::map< std::string, float > &splitFractions, bool splitPdf=false)
std::vector< Entry > data
float normalization(const PhysicsTools::Calibration::HistogramF *thePdf) const
float getVal(float x, std::string const &catName="NOSPLIT", bool normalized=true) const
get Value of pdf at point x for class catName
std::map< std::string, std::string > _splitRule