CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/RecoEgamma/ElectronIdentification/src/LikelihoodSpecies.cc

Go to the documentation of this file.
00001 #include "RecoEgamma/ElectronIdentification/interface/LikelihoodSpecies.h"
00002 
00003 LikelihoodSpecies::LikelihoodSpecies(const char* name, float prior) {
00004   _name=std::string(name);
00005   _prior=prior;
00006 }
00007 
00008 LikelihoodSpecies::~LikelihoodSpecies() {
00009   std::vector<LikelihoodPdf*>::iterator pdfItr;
00010   for(pdfItr=_pdfList.begin(); pdfItr!=_pdfList.end(); pdfItr++) {
00011     delete *pdfItr;
00012   }
00013 }
00014 
00015 void LikelihoodSpecies::setName(const char* name) {
00016   _name = std::string(name);
00017 }
00018 
00019 void LikelihoodSpecies::addPdf(LikelihoodPdf* pdf) {
00020   _pdfList.push_back(pdf);
00021 }
00022 
00023 void LikelihoodSpecies::setPrior(float prior) {
00024   _prior=prior;
00025 }
00026 
00027 void LikelihoodSpecies::setSplitFraction(std::pair<std::string,float> splitfrac) {
00028   _splitFractions.insert(splitfrac);
00029 }
00030 
00031 std::vector<LikelihoodPdf*> LikelihoodSpecies::getListOfPdfs() {
00032   return _pdfList;
00033 }
00034 
00035 const char* LikelihoodSpecies::getName() {
00036   return _name.c_str();
00037 }
00038 
00039 float LikelihoodSpecies::getPrior() {
00040   return _prior;
00041 }
00042 
00043 std::map<std::string,float> LikelihoodSpecies::getSplitFractions() {
00044   return _splitFractions;
00045 }
00046