10 _name = std::string(name);
30 if(splitFractions.size()>0 && splitPdf) {
31 std::map<std::string,float>::const_iterator splitCatItr;
32 for(splitCatItr=splitFractions.begin();splitCatItr!=splitFractions.end();splitCatItr++) {
34 std::string totPdfName = std::string(buffer);
35 _splitRule.insert( std::make_pair(splitCatItr->first,totPdfName) );
40 else if(splitFractions.size()>0) {
41 std::map<std::string,float>::const_iterator splitCatItr;
42 for(splitCatItr=splitFractions.begin();splitCatItr!=splitFractions.end();splitCatItr++) {
44 std::string totPdfName = std::string(buffer);
45 _splitRule.insert( std::make_pair(splitCatItr->first,totPdfName) );
52 std::string totPdfName = std::string(buffer);
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.compare(ruleItr->second)==0) {
70 _splitPdf.insert( std::make_pair(ruleItr->first,histo) );
77 <<
" is not present in the Conditions DB!";
90 <<
" is SPLITTED by category " << gsfClass;
104 prob=thePdf->
value(x);
108 <<
" for class = " << gsfClass
111 <<
" prob = " << prob;
std::map< std::string, const PhysicsTools::Calibration::HistogramF * > _splitPdf
void initFromDB(const ElectronLikelihoodCalibration *calibration)
initialize PDFs from CondDB
std::vector< Entry > data
void split(std::map< std::string, float > splitFractions, bool splitPdf=false)
float getVal(float x, std::string catName="NOSPLIT", bool normalized=true)
get Value of pdf at point x for class catName
std::map< std::string, std::string > _splitRule