#include <SusyPostProcessor.h>
Public Member Functions | |
virtual void | analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup) |
virtual void | beginJob (void) |
virtual void | beginRun (const edm::Run &, const edm::EventSetup &iSetup) |
virtual void | endJob () |
void | endRun (const edm::Run &, const edm::EventSetup &) |
SusyPostProcessor (const edm::ParameterSet &pSet) | |
~SusyPostProcessor () | |
Private Member Functions | |
void | QuantilePlots (MonitorElement *ME, double q_value) |
Private Attributes | |
double | _quantile |
std::vector< std::string > | Dirs |
DQMStore * | dqm |
std::vector< MonitorElement * > | histoVector |
edm::ParameterSet | iConfig |
MonitorElement * | MEx |
MonitorElement * | MEy |
std::string | SUSYFolder |
Static Private Attributes | |
static const char * | messageLoggerCatregory = "SusyDQMPostProcessor" |
Definition at line 22 of file SusyPostProcessor.h.
SusyPostProcessor::SusyPostProcessor | ( | const edm::ParameterSet & | pSet | ) | [explicit] |
Definition at line 12 of file SusyPostProcessor.cc.
References edm::ParameterSet::getParameter(), and cmsCodeRules::cppFunctionSkipper::operator.
{ dqm = edm::Service<DQMStore>().operator->(); iConfig = pSet; SUSYFolder = iConfig.getParameter<string>("folderName"); _quantile = iConfig.getParameter<double>("quantile"); }
SusyPostProcessor::~SusyPostProcessor | ( | ) |
Definition at line 23 of file SusyPostProcessor.cc.
{ }
void SusyPostProcessor::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
void SusyPostProcessor::beginJob | ( | void | ) | [virtual] |
void SusyPostProcessor::beginRun | ( | const edm::Run & | , |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
void SusyPostProcessor::endJob | ( | void | ) | [virtual] |
void SusyPostProcessor::endRun | ( | const edm::Run & | , |
const edm::EventSetup & | |||
) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 66 of file SusyPostProcessor.cc.
References TrackerOfflineValidation_Dqm_cff::dirName, MonitorElement::DQM_KIND_TH1F, spr::find(), newFWLiteAna::found, i, and prof2calltree::prefix.
{ // MET //---------------------------------------------------------------------------- dqm->setCurrentFolder("JetMET/MET"); Dirs = dqm->getSubdirs(); std::vector<std::string> metFolders; metFolders.push_back("All/"); metFolders.push_back("BasicCleanup/"); metFolders.push_back("ExtraCleanup/"); for (int i=0; i<int(Dirs.size()); i++) { std::string prefix = "dummy"; if (size_t(Dirs[i].find("Calo")) != string::npos) prefix = "Calo"; if (size_t(Dirs[i].find("Pf")) != string::npos) prefix = "Pf"; if (size_t(Dirs[i].find("Tc")) != string::npos) prefix = ""; for (std::vector<std::string>::const_iterator ic=metFolders.begin(); ic!=metFolders.end(); ic++) { std::string dirName = Dirs[i] + "/" + *ic; MEx = dqm->get(dirName + "METTask_" + prefix + "MEx"); MEy = dqm->get(dirName + "METTask_" + prefix + "MEx"); if (MEx && MEx->kind() == MonitorElement::DQM_KIND_TH1F) { if (MEx->getTH1F()->GetEntries() > 50) MEx->getTH1F()->Fit("gaus", "q"); } if (MEy && MEy->kind() == MonitorElement::DQM_KIND_TH1F) { if (MEy->getTH1F()->GetEntries() > 50) MEy->getTH1F()->Fit("gaus", "q"); } } } // SUSY //---------------------------------------------------------------------------- dqm->setCurrentFolder(SUSYFolder); Dirs = dqm->getSubdirs(); for (int i=0; i<int(Dirs.size()); i++) { size_t found = Dirs[i].find("Alpha"); if (found!=string::npos) continue; if(!dqm->dirExists(Dirs[i])){ edm::LogError(messageLoggerCatregory)<< "Directory "<<Dirs[i]<<" doesn't exist!!"; continue; } vector<MonitorElement*> histoVector = dqm->getContents(Dirs[i]); for (int i=0; i<int(histoVector.size()); i++) { QuantilePlots(histoVector[i],_quantile); } } }
void SusyPostProcessor::QuantilePlots | ( | MonitorElement * | ME, |
double | q_value | ||
) | [private] |
Definition at line 35 of file SusyPostProcessor.cc.
References MonitorElement::Fill(), MonitorElement::getPathname(), MonitorElement::getTH1(), timingPdfMaker::mean, mergeVDriftHistosByStation::name, and lumiQueryAPI::q.
{ if(ME->getTH1()->GetEntries()>0.) { Quantile q(static_cast<const TH1*>(ME->getTH1())); Float_t mean=q[q_value].first; Float_t RMS=q[q_value].second; Float_t xLow=-5.5; Float_t xUp=9.5; Int_t NBin=15; if(mean>0.) { Float_t DBin=RMS*TMath::Sqrt(12.)/2.; xLow=mean-int(mean/DBin+2)*DBin; xUp=int(0.2*mean/DBin)*DBin+mean+5*DBin; NBin=(xUp-xLow)/DBin; } dqm->setCurrentFolder(ME->getPathname()); TString name=ME->getTH1()->GetName(); name+="_quant"; ME=dqm->book1D(name,"",NBin, xLow, xUp); ME->Fill(mean-RMS); ME->Fill(mean+RMS); } }
double SusyPostProcessor::_quantile [private] |
Definition at line 43 of file SusyPostProcessor.h.
std::vector<std::string> SusyPostProcessor::Dirs [private] |
Definition at line 47 of file SusyPostProcessor.h.
DQMStore* SusyPostProcessor::dqm [private] |
Definition at line 45 of file SusyPostProcessor.h.
std::vector<MonitorElement*> SusyPostProcessor::histoVector [private] |
Definition at line 46 of file SusyPostProcessor.h.
edm::ParameterSet SusyPostProcessor::iConfig [private] |
Definition at line 37 of file SusyPostProcessor.h.
const char * SusyPostProcessor::messageLoggerCatregory = "SusyDQMPostProcessor" [static, private] |
Definition at line 40 of file SusyPostProcessor.h.
MonitorElement* SusyPostProcessor::MEx [private] |
Definition at line 49 of file SusyPostProcessor.h.
MonitorElement* SusyPostProcessor::MEy [private] |
Definition at line 50 of file SusyPostProcessor.h.
std::string SusyPostProcessor::SUSYFolder [private] |
Definition at line 42 of file SusyPostProcessor.h.