![]() |
![]() |
#include <ElectronValidator.h>
Protected Member Functions | |
MonitorElement * | bookH1 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events") |
MonitorElement * | bookH1andDivide (const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="", bool print=false) |
MonitorElement * | bookH1withSumw2 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events") |
MonitorElement * | bookH2 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="") |
MonitorElement * | bookH2andDivide (const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="", bool print=false) |
MonitorElement * | bookH2withSumw2 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="") |
MonitorElement * | bookP1 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, double lowY, double highY, const std::string &titleX="", const std::string &titleY="") |
ElectronValidator (const edm::ParameterSet &conf) | |
void | prepareStore () |
MonitorElement * | profileX (const std::string &name, MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111) |
MonitorElement * | profileY (const std::string &name, MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111) |
void | saveStore (const std::string &filename) |
void | setStoreFolder (const std::string &path) |
virtual | ~ElectronValidator () |
Private Attributes | |
DQMStore * | store_ |
Definition at line 12 of file ElectronValidator.h.
ElectronValidator::ElectronValidator | ( | const edm::ParameterSet & | conf | ) | [explicit, protected] |
Definition at line 17 of file ElectronValidator.cc.
{}
ElectronValidator::~ElectronValidator | ( | ) | [protected, virtual] |
Definition at line 20 of file ElectronValidator.cc.
{}
MonitorElement * ElectronValidator::bookH1 | ( | const std::string & | name, |
const std::string & | title, | ||
int | nchX, | ||
double | lowX, | ||
double | highX, | ||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "Events" |
||
) | [protected] |
Definition at line 37 of file ElectronValidator.cc.
References MonitorElement::getTH1F().
Referenced by ElectronMcFakeValidator::beginJob(), and ElectronMcSignalValidator::beginJob().
MonitorElement * ElectronValidator::bookH1andDivide | ( | const std::string & | name, |
MonitorElement * | num, | ||
MonitorElement * | denom, | ||
const std::string & | titleX, | ||
const std::string & | titleY, | ||
const std::string & | title = "" , |
||
bool | print = false |
||
) | [protected] |
Definition at line 97 of file ElectronValidator.cc.
References MonitorElement::getTH1(), and MonitorElement::getTH1F().
Referenced by ElectronMcFakeValidator::endJob(), and ElectronMcSignalValidator::endJob().
{ TH1F * h_temp = (TH1F *)num->getTH1F()->Clone(name.c_str()) ; h_temp->Reset() ; h_temp->Divide(num->getTH1(),denom->getTH1(),1,1,"b") ; h_temp->GetXaxis()->SetTitle(titleX.c_str()) ; h_temp->GetYaxis()->SetTitle(titleY.c_str()) ; if (title!="") { h_temp->SetTitle(title.c_str()) ; } if (print) { h_temp->Print() ; } MonitorElement * me = store_->book1D(name,h_temp) ; delete h_temp ; return me ; }
MonitorElement * ElectronValidator::bookH1withSumw2 | ( | const std::string & | name, |
const std::string & | title, | ||
int | nchX, | ||
double | lowX, | ||
double | highX, | ||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "Events" |
||
) | [protected] |
Definition at line 48 of file ElectronValidator.cc.
References MonitorElement::getTH1F().
Referenced by ElectronMcFakeValidator::beginJob(), ElectronMcSignalValidator::beginJob(), ElectronMcFakeValidator::endJob(), and ElectronMcSignalValidator::endJob().
MonitorElement * ElectronValidator::bookH2 | ( | const std::string & | name, |
const std::string & | title, | ||
int | nchX, | ||
double | lowX, | ||
double | highX, | ||
int | nchY, | ||
double | lowY, | ||
double | highY, | ||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "" |
||
) | [protected] |
Definition at line 60 of file ElectronValidator.cc.
References MonitorElement::getTH2F().
Referenced by ElectronMcFakeValidator::beginJob(), and ElectronMcSignalValidator::beginJob().
MonitorElement * ElectronValidator::bookH2andDivide | ( | const std::string & | name, |
MonitorElement * | num, | ||
MonitorElement * | denom, | ||
const std::string & | titleX, | ||
const std::string & | titleY, | ||
const std::string & | title = "" , |
||
bool | print = false |
||
) | [protected] |
Definition at line 114 of file ElectronValidator.cc.
References MonitorElement::getTH1(), and MonitorElement::getTH2F().
Referenced by ElectronMcSignalValidator::endJob().
{ TH2F * h_temp = (TH2F *)num->getTH2F()->Clone(name.c_str()) ; h_temp->Reset() ; h_temp->Divide(num->getTH1(),denom->getTH1(),1,1,"b") ; h_temp->GetXaxis()->SetTitle(titleX.c_str()) ; h_temp->GetYaxis()->SetTitle(titleY.c_str()) ; if (title!="") { h_temp->SetTitle(title.c_str()) ; } if (print) { h_temp->Print() ; } MonitorElement * me = store_->book2D(name,h_temp) ; delete h_temp ; return me ; }
MonitorElement * ElectronValidator::bookH2withSumw2 | ( | const std::string & | name, |
const std::string & | title, | ||
int | nchX, | ||
double | lowX, | ||
double | highX, | ||
int | nchY, | ||
double | lowY, | ||
double | highY, | ||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "" |
||
) | [protected] |
Definition at line 72 of file ElectronValidator.cc.
References MonitorElement::getTH2F().
Referenced by ElectronMcSignalValidator::beginJob().
MonitorElement * ElectronValidator::bookP1 | ( | const std::string & | name, |
const std::string & | title, | ||
int | nchX, | ||
double | lowX, | ||
double | highX, | ||
double | lowY, | ||
double | highY, | ||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "" |
||
) | [protected] |
Definition at line 85 of file ElectronValidator.cc.
References MonitorElement::getTProfile().
Referenced by ElectronMcFakeValidator::beginJob(), and ElectronMcSignalValidator::beginJob().
{ MonitorElement * me = store_->bookProfile(name,title,nchX,lowX,highX,lowY,highY) ; if (titleX!="") { me->getTProfile()->GetXaxis()->SetTitle(titleX.c_str()) ; } if (titleY!="") { me->getTProfile()->GetYaxis()->SetTitle(titleY.c_str()) ; } return me ; }
void ElectronValidator::prepareStore | ( | ) | [protected] |
Definition at line 23 of file ElectronValidator.cc.
References cmsCodeRules::cppFunctionSkipper::operator, and store_.
Referenced by ElectronMcFakeValidator::beginJob(), and ElectronMcSignalValidator::beginJob().
{ store_ = edm::Service<DQMStore>().operator->() ; if (!store_) { edm::LogError("ElectronValidator::prepareStore")<<"No DQMStore found !" ; } }
MonitorElement * ElectronValidator::profileX | ( | const std::string & | name, |
MonitorElement * | me2d, | ||
const std::string & | title = "" , |
||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "" , |
||
Double_t | minimum = -1111 , |
||
Double_t | maximum = -1111 |
||
) | [protected] |
Definition at line 131 of file ElectronValidator.cc.
References MonitorElement::getTH2F().
Referenced by ElectronMcFakeValidator::endJob(), and ElectronMcSignalValidator::endJob().
{ TProfile * p1_temp = me2d->getTH2F()->ProfileX() ; if (title!="") { p1_temp->SetTitle(title.c_str()) ; } if (titleX!="") { p1_temp->GetXaxis()->SetTitle(titleX.c_str()) ; } if (titleY!="") { p1_temp->GetYaxis()->SetTitle(titleY.c_str()) ; } if (minimum!=-1111) { p1_temp->SetMinimum(minimum) ; } if (maximum!=-1111) { p1_temp->SetMaximum(maximum) ; } MonitorElement * me = store_->bookProfile(name,p1_temp) ; delete p1_temp ; return me ; }
MonitorElement * ElectronValidator::profileY | ( | const std::string & | name, |
MonitorElement * | me2d, | ||
const std::string & | title = "" , |
||
const std::string & | titleX = "" , |
||
const std::string & | titleY = "" , |
||
Double_t | minimum = -1111 , |
||
Double_t | maximum = -1111 |
||
) | [protected] |
Definition at line 147 of file ElectronValidator.cc.
References MonitorElement::getTH2F().
Referenced by ElectronMcSignalValidator::endJob().
{ TProfile * p1_temp = me2d->getTH2F()->ProfileY() ; if (title!="") { p1_temp->SetTitle(title.c_str()) ; } if (titleX!="") { p1_temp->GetXaxis()->SetTitle(titleX.c_str()) ; } if (titleY!="") { p1_temp->GetYaxis()->SetTitle(titleY.c_str()) ; } if (minimum!=-1111) { p1_temp->SetMinimum(minimum) ; } if (maximum!=-1111) { p1_temp->SetMaximum(maximum) ; } MonitorElement * me = store_->bookProfile(name,p1_temp) ; delete p1_temp ; return me ; }
void ElectronValidator::saveStore | ( | const std::string & | filename | ) | [protected] |
Definition at line 33 of file ElectronValidator.cc.
References DQMStore::save(), and store_.
Referenced by ElectronMcSignalValidator::endJob(), and ElectronMcFakeValidator::endJob().
void ElectronValidator::setStoreFolder | ( | const std::string & | path | ) | [protected] |
Definition at line 30 of file ElectronValidator.cc.
References DQMStore::setCurrentFolder(), and store_.
Referenced by ElectronMcSignalValidator::beginJob(), ElectronMcFakeValidator::beginJob(), ElectronMcSignalValidator::endJob(), and ElectronMcFakeValidator::endJob().
{ store_->setCurrentFolder(path) ; }
DQMStore* ElectronValidator::store_ [private] |
Definition at line 74 of file ElectronValidator.h.
Referenced by prepareStore(), saveStore(), and setStoreFolder().