#include <EgHLTOfflineClient.h>
Public Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) |
virtual void | beginRun (const edm::Run &run, const edm::EventSetup &c) |
void | createHLTvsOfflineHists (const std::string &filterName, const std::string &baseName, const std::string ®ion, const std::vector< std::string > &varNames) |
void | createLooseTightTrigEff (const std::vector< std::string > &tightLooseTrigNames, const std::string ®ion, const std::vector< std::string > &vsVarNames, const std::string &objName) |
void | createN1EffHists (const std::string &filterName, const std::string &baseName, const std::string ®ion, const std::vector< std::string > &varNames) |
void | createSingleEffHists (const std::string &filterName, const std::string &baseName, const std::string ®ion, const std::vector< std::string > &varNames) |
void | createTrigTagProbeEffHists (const std::string &filterName, const std::string ®ion, const std::vector< std::string > &vsVarNames, const std::string &objName) |
void | createTrigTagProbeEffHists2Leg (const std::string &filterNameLeg1, const std::string &filterNameLeg2, const std::string ®ion, const std::vector< std::string > &vsVarNames, const std::string &objName) |
void | createTrigTagProbeEffHistsNewAlgo (const std::string &filterName, const std::string ®ion, const std::vector< std::string > &vsVarNames, const std::string &objName) |
EgHLTOfflineClient (const edm::ParameterSet &) | |
virtual void | endJob () |
virtual void | endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) |
virtual void | endRun (const edm::Run &run, const edm::EventSetup &c) |
MonitorElement * | FillHLTvsOfflineHist (const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *numer, const MonitorElement *denom) |
MonitorElement * | makeEffMonElem2Leg (const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *Leg1Eff, const MonitorElement *Leg2NotLeg1Source, const MonitorElement *all) |
MonitorElement * | makeEffMonElemFromPassAndAll (const std::string &filterName, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *all) |
MonitorElement * | makeEffMonElemFromPassAndFail (const std::string &filterName, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *fail) |
MonitorElement * | makeEffMonElemFromPassAndFailAndTagTag (const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *fail, const MonitorElement *tagtag) |
virtual | ~EgHLTOfflineClient () |
Private Member Functions | |
EgHLTOfflineClient (const EgHLTOfflineClient &rhs) | |
EgHLTOfflineClient & | operator= (const EgHLTOfflineClient &rhs) |
void | runClient_ () |
Private Attributes | |
DQMStore * | dbe_ |
std::string | dirName_ |
std::vector< std::string > | eleEffTags_ |
std::vector< std::string > | eleHLTFilterNames2Leg_ |
std::vector< std::string > | eleHLTFilterNames_ |
std::vector< std::string > | eleHLTvOfflineVars_ |
std::vector< std::string > | eleLooseTightTrigEffVsVars_ |
std::vector< std::string > | eleN1EffVars_ |
std::vector< std::string > | eleSingleEffVars_ |
std::vector< std::string > | eleTightLooseTrigNames_ |
std::vector< std::string > | eleTrigTPEffVsVars_ |
bool | filterInactiveTriggers_ |
std::string | hltTag_ |
bool | isSetup_ |
std::vector< std::string > | phoEffTags_ |
std::vector< std::string > | phoHLTFilterNames2Leg_ |
std::vector< std::string > | phoHLTFilterNames_ |
std::vector< std::string > | phoHLTvOfflineVars_ |
std::vector< std::string > | phoLooseTightTrigEffVsVars_ |
std::vector< std::string > | phoN1EffVars_ |
std::vector< std::string > | phoSingleEffVars_ |
std::vector< std::string > | phoTightLooseTrigNames_ |
std::vector< std::string > | phoTrigTPEffVsVars_ |
bool | runClientEndJob_ |
bool | runClientEndLumiBlock_ |
bool | runClientEndRun_ |
Definition at line 37 of file EgHLTOfflineClient.h.
EgHLTOfflineClient::EgHLTOfflineClient | ( | const EgHLTOfflineClient & | rhs | ) | [inline, private] |
Definition at line 77 of file EgHLTOfflineClient.h.
{}
EgHLTOfflineClient::EgHLTOfflineClient | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 22 of file EgHLTOfflineClient.cc.
References dbe_, dirName_, eleEffTags_, eleHLTFilterNames2Leg_, eleHLTFilterNames_, eleHLTvOfflineVars_, eleLooseTightTrigEffVsVars_, eleN1EffVars_, eleSingleEffVars_, eleTightLooseTrigNames_, eleTrigTPEffVsVars_, filterInactiveTriggers_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hltTag_, cmsCodeRules::cppFunctionSkipper::operator, phoEffTags_, phoHLTFilterNames2Leg_, phoHLTFilterNames_, phoHLTvOfflineVars_, phoLooseTightTrigEffVsVars_, phoN1EffVars_, phoSingleEffVars_, phoTightLooseTrigNames_, phoTrigTPEffVsVars_, runClientEndJob_, runClientEndLumiBlock_, runClientEndRun_, DQMStore::setCurrentFolder(), and DQMStore::setVerbose().
:dbe_(NULL),isSetup_(false) { dbe_ = edm::Service<DQMStore>().operator->(); //only one chance to get this, if we every have another shot, remember to check isSetup is okay if (!dbe_) { edm::LogError("EgHLTOfflineClient") << "unable to get DQMStore service, upshot is no client histograms will be made"; } if(iConfig.getUntrackedParameter<bool>("DQMStore", false)) { if(dbe_) dbe_->setVerbose(0); } eleHLTFilterNames_ = iConfig.getParameter<std::vector<std::string> >("eleHLTFilterNames"); eleHLTFilterNames2Leg_ = iConfig.getParameter<std::vector<std::string> >("eleHLTFilterNames2Leg"); eleTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("eleTightLooseTrigNames"); phoHLTFilterNames_ = iConfig.getParameter<std::vector<std::string> >("phoHLTFilterNames"); phoHLTFilterNames2Leg_ = iConfig.getParameter<std::vector<std::string> >("phoHLTFilterNames2Leg"); phoTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("phoTightLooseTrigNames"); eleN1EffVars_=iConfig.getParameter<std::vector<std::string> >("eleN1EffVars"); eleSingleEffVars_ = iConfig.getParameter<std::vector<std::string> >("eleSingleEffVars"); eleEffTags_ = iConfig.getParameter<std::vector<std::string> >("eleEffTags"); eleTrigTPEffVsVars_ = iConfig.getParameter<std::vector<std::string> >("eleTrigTPEffVsVars"); eleLooseTightTrigEffVsVars_ = iConfig.getParameter<std::vector<std::string> >("eleLooseTightTrigEffVsVars"); eleHLTvOfflineVars_ = iConfig.getParameter<std::vector<std::string> >("eleHLTvOfflineVars"); phoN1EffVars_=iConfig.getParameter<std::vector<std::string> >("phoN1EffVars"); phoSingleEffVars_ = iConfig.getParameter<std::vector<std::string> >("phoSingleEffVars"); phoEffTags_ = iConfig.getParameter<std::vector<std::string> >("phoEffTags"); phoTrigTPEffVsVars_ = iConfig.getParameter<std::vector<std::string> >("phoTrigTPEffVsVars"); phoLooseTightTrigEffVsVars_ = iConfig.getParameter<std::vector<std::string> >("phoLooseTightTrigEffVsVars"); phoHLTvOfflineVars_ = iConfig.getParameter<std::vector<std::string> >("phoHLTvOfflineVars"); runClientEndLumiBlock_ = iConfig.getParameter<bool>("runClientEndLumiBlock"); runClientEndRun_ = iConfig.getParameter<bool>("runClientEndRun"); runClientEndJob_ = iConfig.getParameter<bool>("runClientEndJob"); dirName_=iConfig.getParameter<std::string>("DQMDirName"); if(dbe_) dbe_->setCurrentFolder(dirName_); filterInactiveTriggers_ =iConfig.getParameter<bool>("filterInactiveTriggers"); hltTag_ = iConfig.getParameter<std::string>("hltTag"); }
EgHLTOfflineClient::~EgHLTOfflineClient | ( | ) | [virtual] |
Definition at line 71 of file EgHLTOfflineClient.cc.
{ }
void EgHLTOfflineClient::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
void EgHLTOfflineClient::beginJob | ( | void | ) | [virtual] |
virtual void EgHLTOfflineClient::beginLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, |
const edm::EventSetup & | context | ||
) | [inline, virtual] |
void EgHLTOfflineClient::beginRun | ( | const edm::Run & | run, |
const edm::EventSetup & | c | ||
) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 87 of file EgHLTOfflineClient.cc.
References eleHLTFilterNames2Leg_, eleHLTFilterNames_, eleTightLooseTrigNames_, egHLT::trigTools::filterInactiveTightLooseTriggers(), egHLT::trigTools::filterInactiveTriggers(), filterInactiveTriggers_, egHLT::trigTools::getActiveFilters(), HltComparatorCreateWorkflow::hltConfig, hltTag_, HLTConfigProvider::init(), isSetup_, phoHLTFilterNames_, and phoTightLooseTrigNames_.
{ if(!isSetup_){ if(filterInactiveTriggers_){ HLTConfigProvider hltConfig; bool changed=false; hltConfig.init(run,c,hltTag_,changed); std::vector<std::string> activeFilters; std::vector<std::string> activeEleFilters; std::vector<std::string> activeEle2LegFilters; std::vector<std::string> activePhoFilters; std::vector<std::string> activePho2LegFilters; egHLT::trigTools::getActiveFilters(hltConfig,activeFilters,activeEleFilters,activeEle2LegFilters,activePhoFilters,activePho2LegFilters); egHLT::trigTools::filterInactiveTriggers(eleHLTFilterNames_,activeEleFilters); egHLT::trigTools::filterInactiveTriggers(eleHLTFilterNames2Leg_,activeEle2LegFilters); egHLT::trigTools::filterInactiveTriggers(phoHLTFilterNames_,activePhoFilters); egHLT::trigTools::filterInactiveTightLooseTriggers(eleTightLooseTrigNames_,activeEleFilters); egHLT::trigTools::filterInactiveTightLooseTriggers(phoTightLooseTrigNames_,activePhoFilters); } isSetup_=true; } }
void EgHLTOfflineClient::createHLTvsOfflineHists | ( | const std::string & | filterName, |
const std::string & | baseName, | ||
const std::string & | region, | ||
const std::vector< std::string > & | varNames | ||
) |
Definition at line 197 of file EgHLTOfflineClient.cc.
References dbe_, dirName_, FillHLTvsOfflineHist(), DQMStore::get(), and NULL.
Referenced by runClient_().
{ //need to do Energy manually to get SC Energy /* MonitorElement* numer = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_HLTenergy"+"_"+region); MonitorElement* denom = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_energy"+"_"+region); if(numer!=NULL && denom!=NULL){ std::string effHistName(baseName+"_HLToverOfflineSC_energy_"+region);//std::cout<<"hltVSoffline: "<<effHistName<<std::endl; std::string effHistTitle(effHistName); if(region=="eb" || region=="ee"){ if(region=="eb") effHistTitle = "Barrel "+baseName+" HLToverOfflineSC Energy"; if(region=="ee") effHistTitle = "Endcap "+baseName+" HLToverOfflineSC Energy"; FillHLTvsOfflineHist(filterName,effHistName,effHistTitle,numer,denom); } }//end Et */ //now eta, phi automatically for(size_t varNr=0;varNr<varNames.size();varNr++){ MonitorElement* numer = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_HLT"+varNames[varNr]+"_"+region); MonitorElement* denom = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_"+varNames[varNr]+"_"+region); if(numer!=NULL && denom!=NULL){ std::string effHistName(baseName+"_HLToverOffline_"+varNames[varNr]+"_"+region);//std::cout<<"hltVSoffline: "<<effHistName<<std::endl; std::string effHistTitle(effHistName); if(region=="eb" || region=="ee"){ if(region=="eb") effHistTitle = "Barrel "+baseName+" HLToverOffline "+varNames[varNr]; if(region=="ee") effHistTitle = "Endcap "+baseName+" HLToverOffline "+varNames[varNr]; FillHLTvsOfflineHist(filterName,effHistName,effHistTitle,numer,denom); } } }//end loop over varNames }
void EgHLTOfflineClient::createLooseTightTrigEff | ( | const std::vector< std::string > & | tightLooseTrigNames, |
const std::string & | region, | ||
const std::vector< std::string > & | vsVarNames, | ||
const std::string & | objName | ||
) |
Definition at line 384 of file EgHLTOfflineClient.cc.
References dbe_, dirName_, cmsPerfPublish::fail(), DQMStore::get(), makeEffMonElemFromPassAndFail(), NULL, split, and splitString().
Referenced by runClient_().
{ for(size_t varNr=0;varNr<vsVarNames.size();varNr++){ for(size_t trigNr=0;trigNr<tightLooseTrigNames.size();trigNr++){ std::vector<std::string> splitString; boost::split(splitString,tightLooseTrigNames[trigNr],boost::is_any_of(std::string(":"))); if(splitString.size()!=2) continue; //format incorrect const std::string& tightTrig = splitString[0]; const std::string& looseTrig = splitString[1]; MonitorElement* fail = dbe_->get(dirName_+"/Source_Histos/"+tightTrig+"_"+looseTrig+"_"+objName+"_failTrig_"+vsVarNames[varNr]+"_"+region); if(fail==NULL){ //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<dirName_+"/"+tightTrig+"_"+looseTrig+"_"+objName+"_failTrig_"+vsVarNames[varNr]+"_"+region; continue; } MonitorElement* pass = dbe_->get(dirName_+"/Source_Histos/"+tightTrig+"_"+looseTrig+"_"+objName+"_passTrig_"+vsVarNames[varNr]+"_"+region); if(pass==NULL){ //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<dirName_+"/"+tightTrig+"_"+looseTrig+"_"+objName+"_passTrig_"+vsVarNames[varNr]+"_"+region; continue; } const std::string newHistName(tightTrig+"_trigEffTo_"+looseTrig+"_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region); //----Morse----- std::string effHistTitle(newHistName);//std::cout<<effHistTitle<<std::endl; if(region=="eb" || region=="ee"){ if(region=="eb") effHistTitle = "Barrel "+tightTrig+"_TrigEffTo_"+looseTrig+"_"+objName+" vs "+vsVarNames[varNr]; if(region=="ee") effHistTitle = "Endcap "+tightTrig+"_TrigEffTo_"+looseTrig+"_"+objName+" vs "+vsVarNames[varNr]; } //std::cout<<effHistTitle<<std::endl; //dbe_->setCurrentFolder(dirName_+"/"+tightTrig+"_"+looseTrig); //------------ makeEffMonElemFromPassAndFail("LooseTight",newHistName,effHistTitle,pass,fail); }//end loop over trigger pairs } //end loop over vsVarNames }
void EgHLTOfflineClient::createN1EffHists | ( | const std::string & | filterName, |
const std::string & | baseName, | ||
const std::string & | region, | ||
const std::vector< std::string > & | varNames | ||
) |
Definition at line 243 of file EgHLTOfflineClient.cc.
References dbe_, dirName_, DQMStore::get(), makeEffMonElemFromPassAndAll(), and NULL.
Referenced by runClient_().
{ MonitorElement* numer = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_allCuts_"+region); for(size_t varNr=0;varNr<varNames.size();varNr++){ MonitorElement* denom = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_n1_"+varNames[varNr]+"_"+region); if(numer!=NULL && denom!=NULL){ std::string effHistName(baseName+"_n1Eff_"+varNames[varNr]+"_"+region);//std::cout<<"N1: "<<effHistName<<std::endl; //std::cout<<region<<" "; //----Morse----------- std::string effHistTitle(effHistName);//std::cout<<effHistTitle<<std::endl; if(region=="eb" || region=="ee"){ if(region=="eb") effHistTitle = "Barrel "+baseName+" N1eff "+varNames[varNr]; if(region=="ee") effHistTitle = "Endcap "+baseName+" N1eff "+varNames[varNr]; }//std::cout<<effHistTitle<<std::endl; //makeEffMonElemFromPassAndAll(effHistName,numer,denom); makeEffMonElemFromPassAndAll(filterName,effHistName,effHistTitle,numer,denom); //--------------------- } }//end loop over varNames }
void EgHLTOfflineClient::createSingleEffHists | ( | const std::string & | filterName, |
const std::string & | baseName, | ||
const std::string & | region, | ||
const std::vector< std::string > & | varNames | ||
) |
Definition at line 265 of file EgHLTOfflineClient.cc.
References dbe_, dirName_, DQMStore::get(), makeEffMonElemFromPassAndAll(), and NULL.
Referenced by runClient_().
{ MonitorElement* denom = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_noCuts_"+region); for(size_t varNr=0;varNr<varNames.size();varNr++){ MonitorElement* numer = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_single_"+varNames[varNr]+"_"+region); if(numer!=NULL && denom!=NULL){ std::string effHistName(baseName+"_singleEff_"+varNames[varNr]+"_"+region);//std::cout<<"Si: "<<effHistName<<std::endl; //----Morse----------- std::string effHistTitle(effHistName);//std::cout<<effHistTitle<<std::endl; if(region=="eb" || region=="ee"){ if(region=="eb") effHistTitle = "Barrel "+baseName+" SingleEff "+varNames[varNr]; if(region=="ee") effHistTitle = "Endcap "+baseName+" SingleEff "+varNames[varNr]; }//std::cout<<effHistTitle<<std::endl; //makeEffMonElemFromPassAndAll(effHistName,numer,denom); makeEffMonElemFromPassAndAll(filterName,effHistName,effHistTitle,numer,denom); //-------------------- } }//end loop over varNames }
void EgHLTOfflineClient::createTrigTagProbeEffHists | ( | const std::string & | filterName, |
const std::string & | region, | ||
const std::vector< std::string > & | vsVarNames, | ||
const std::string & | objName | ||
) |
Definition at line 286 of file EgHLTOfflineClient.cc.
References cond::ecalcond::all, dbe_, dirName_, DQMStore::get(), makeEffMonElemFromPassAndAll(), and NULL.
{ for(size_t varNr=0;varNr<vsVarNames.size();varNr++){ std::string allName(dirName_+"/Source_Histos/"+filterName+"/"+filterName+"_trigTagProbe_"+objName+"_all_"+vsVarNames[varNr]+"_"+region); MonitorElement* all = dbe_->get(allName); if(all==NULL){ //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<allName; continue; } std::string passName(dirName_+"/Source_Histos/"+filterName+"/"+filterName+"_trigTagProbe_"+objName+"_pass_"+vsVarNames[varNr]+"_"+region); MonitorElement* pass = dbe_->get(passName); if(pass==NULL){ //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<passName; continue; } //----Morse----- std::string effHistTitle(filterName+"_trigTagProbeEff_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region);//std::cout<<effHistTitle<<std::endl; if(region=="eb" || region=="ee"){ if(region=="eb") effHistTitle = "Barrel "+filterName+"_"+objName+" TrigTagProbeEff vs "+vsVarNames[varNr]; if(region=="ee") effHistTitle = "Endcap "+filterName+"_"+objName+" TrigTagProbeEff vs "+vsVarNames[varNr]; }//std::cout<<effHistTitle<<std::endl; //------------ makeEffMonElemFromPassAndAll(filterName,filterName+"_trigTagProbeEff_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region,effHistTitle,pass,all); }//end loop over vsVarNames }
void EgHLTOfflineClient::createTrigTagProbeEffHists2Leg | ( | const std::string & | filterNameLeg1, |
const std::string & | filterNameLeg2, | ||
const std::string & | region, | ||
const std::vector< std::string > & | vsVarNames, | ||
const std::string & | objName | ||
) |
Definition at line 351 of file EgHLTOfflineClient.cc.
References cond::ecalcond::all, dbe_, dirName_, DQMStore::get(), makeEffMonElem2Leg(), and NULL.
Referenced by runClient_().
{ for(size_t varNr=0;varNr<vsVarNames.size();varNr++){ std::string allName(dirName_+"/Source_Histos/"+filterNameLeg2+"/"+filterNameLeg2+"_trigTagProbe_"+objName+"_all_"+vsVarNames[varNr]+"_"+region); MonitorElement* all = dbe_->get(allName); if(all==NULL){ edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<allName; continue; } std::string Leg2NotLeg1SourceName(dirName_+"/Source_Histos/"+filterNameLeg2+"/"+filterNameLeg2+"_trigTagProbe_"+objName+"_passLeg2failLeg1_"+vsVarNames[varNr]+"_"+region); MonitorElement* Leg2NotLeg1Source = dbe_->get(Leg2NotLeg1SourceName); if(Leg2NotLeg1Source==NULL){ edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<Leg2NotLeg1SourceName; continue; } std::string Leg1EffName(dirName_+"/Client_Histos/"+filterNameLeg1+"/"+filterNameLeg1+"_trigTagProbeEff_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region); MonitorElement *Leg1Eff = dbe_->get(Leg1EffName); if(Leg1Eff==NULL){ edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<Leg1EffName; continue; } std::string effHistTitle(filterNameLeg2+"_trigTagProbeEff2Leg_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region);//std::cout<<effHistTitle<<std::endl; if(region=="eb" || region=="ee"){ if(region=="eb") effHistTitle = "Barrel "+filterNameLeg2+"_"+objName+" TrigTagProbeEff2Leg vs "+vsVarNames[varNr]; if(region=="ee") effHistTitle = "Endcap "+filterNameLeg2+"_"+objName+" TrigTagProbeEff2Leg vs "+vsVarNames[varNr]; }//std::cout<<effHistTitle<<std::endl; makeEffMonElem2Leg(filterNameLeg2,filterNameLeg2+"_trigTagProbeEff2Leg_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region,effHistTitle,Leg1Eff,Leg2NotLeg1Source,all); }//end loop over vsVarNames }
void EgHLTOfflineClient::createTrigTagProbeEffHistsNewAlgo | ( | const std::string & | filterName, |
const std::string & | region, | ||
const std::vector< std::string > & | vsVarNames, | ||
const std::string & | objName | ||
) |
Definition at line 312 of file EgHLTOfflineClient.cc.
References dbe_, dirName_, cmsPerfPublish::fail(), DQMStore::get(), makeEffMonElemFromPassAndFailAndTagTag(), and NULL.
Referenced by runClient_().
{ for(size_t varNr=0;varNr<vsVarNames.size();varNr++){ /* std::string allName(dirName_+"/Source_Histos/"+filterName+"/"+filterName+"_trigTagProbe_"+objName+"_all_"+vsVarNames[varNr]+"_"+region); MonitorElement* all = dbe_->get(allName); if(all==NULL){ //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<allName; continue; }*/ std::string passName(dirName_+"/Source_Histos/"+filterName+"/"+filterName+"_trigTagProbe_"+objName+"_passNotTag_"+vsVarNames[varNr]+"_"+region); MonitorElement* passNotTag = dbe_->get(passName); if(passNotTag==NULL){ //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<passName; continue; } std::string passTagTagName(dirName_+"/Source_Histos/"+filterName+"/"+filterName+"_trigTagProbe_"+objName+"_passTagTag_"+vsVarNames[varNr]+"_"+region); MonitorElement* passTagTag = dbe_->get(passTagTagName); if(passTagTag==NULL){ //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<passTagTagName; continue; } std::string failName(dirName_+"/Source_Histos/"+filterName+"/"+filterName+"_trigTagProbe_"+objName+"_fail_"+vsVarNames[varNr]+"_"+region); MonitorElement* fail = dbe_->get(failName); if(fail==NULL){ //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<failName; continue; } //----Morse----- std::string effHistTitle(filterName+"_trigTagProbeEff_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region);//std::cout<<effHistTitle<<std::endl; if(region=="eb" || region=="ee"){ if(region=="eb") effHistTitle = "Barrel "+filterName+"_"+objName+" TrigTagProbeEff vs "+vsVarNames[varNr]; if(region=="ee") effHistTitle = "Endcap "+filterName+"_"+objName+" TrigTagProbeEff vs "+vsVarNames[varNr]; }//std::cout<<effHistTitle<<std::endl; //------------ makeEffMonElemFromPassAndFailAndTagTag(filterName,filterName+"_trigTagProbeEff_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region,effHistTitle,passNotTag,fail,passTagTag); }//end loop over vsVarNames }
void EgHLTOfflineClient::endJob | ( | void | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 82 of file EgHLTOfflineClient.cc.
References runClient_(), and runClientEndJob_.
{ if(runClientEndJob_) runClient_(); }
void EgHLTOfflineClient::endLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, |
const edm::EventSetup & | c | ||
) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 123 of file EgHLTOfflineClient.cc.
References runClient_(), and runClientEndLumiBlock_.
{ if(runClientEndLumiBlock_) runClient_(); }
void EgHLTOfflineClient::endRun | ( | const edm::Run & | run, |
const edm::EventSetup & | c | ||
) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 112 of file EgHLTOfflineClient.cc.
References runClient_(), and runClientEndRun_.
{ if(runClientEndRun_) runClient_(); }
MonitorElement * EgHLTOfflineClient::FillHLTvsOfflineHist | ( | const std::string & | filter, |
const std::string & | name, | ||
const std::string & | title, | ||
const MonitorElement * | numer, | ||
const MonitorElement * | denom | ||
) |
Definition at line 228 of file EgHLTOfflineClient.cc.
References DQMStore::book1D(), dbe_, dirName_, DQMStore::get(), MonitorElement::getTH1F(), and NULL.
Referenced by createHLTvsOfflineHists().
{ TH1F* num = numer->getTH1F();if(num->GetSumw2N()==0) num->Sumw2(); TH1F* den = denom->getTH1F();if(den->GetSumw2N()==0) den->Sumw2(); TH1F* h_eff = (TH1F*)num->Clone(name.c_str()); h_eff->Divide(num,den,1,1,"B"); h_eff->SetTitle(title.c_str()); MonitorElement* eff = dbe_->get(dirName_+"/Client_Histos/"+filter+"/"+name); if(eff==NULL)eff=dbe_->book1D(name,h_eff); else{ //I was having problems with collating the histograms, hence why I'm just resetting the histogram value *eff->getTH1F()=*h_eff; delete h_eff; } return eff; }
MonitorElement * EgHLTOfflineClient::makeEffMonElem2Leg | ( | const std::string & | filter, |
const std::string & | name, | ||
const std::string & | title, | ||
const MonitorElement * | Leg1Eff, | ||
const MonitorElement * | Leg2NotLeg1Source, | ||
const MonitorElement * | all | ||
) |
Definition at line 475 of file EgHLTOfflineClient.cc.
References DQMStore::book1D(), dbe_, dirName_, DQMStore::get(), MonitorElement::getTH1F(), and NULL.
Referenced by createTrigTagProbeEffHists2Leg().
{ TH1F* allHist = all->getTH1F(); if(allHist->GetSumw2()==0)allHist->Sumw2(); TH1F* Leg2NotLeg1SourceHist = Leg2NotLeg1Source->getTH1F(); if(Leg2NotLeg1SourceHist->GetSumw2()==0)Leg2NotLeg1SourceHist->Sumw2(); TH1F* effHistLeg2NotLeg1 = (TH1F*)allHist->Clone(name.c_str()); if(effHistLeg2NotLeg1->GetSumw2()==0)effHistLeg2NotLeg1->Sumw2(); effHistLeg2NotLeg1->Divide(Leg2NotLeg1SourceHist, allHist, 1, 1, "B"); TH1F* Leg1EffHist = Leg1Eff->getTH1F(); if(Leg1EffHist->GetSumw2()==0)Leg1EffHist->Sumw2(); TH1F* effHistTerm1 = (TH1F*)allHist->Clone(name.c_str()); if(effHistTerm1->GetSumw2()==0)effHistTerm1->Sumw2(); effHistTerm1->Multiply(Leg1EffHist, Leg1EffHist, 1, 1, "B"); TH1F* effHistTerm2 = (TH1F*)allHist->Clone(name.c_str()); if(effHistTerm2->GetSumw2()==0)effHistTerm2->Sumw2(); effHistTerm2->Multiply(Leg1EffHist, effHistLeg2NotLeg1, 1, 1, "B"); effHistTerm2->Scale(2); TH1F* effHist = (TH1F*)allHist->Clone(name.c_str()); if(effHist->GetSumw2()==0)effHist->Sumw2(); effHist->Add(effHistTerm1, effHistTerm2, 1, 1); effHist->SetTitle(title.c_str()); MonitorElement* eff = dbe_->get(dirName_+"/Client_Histos/"+filter+"/"+name); if(eff==NULL) eff= dbe_->book1D(name,effHist); else{ //I was having problems with collating the histograms, hence why I'm just resetting the histogram value *eff->getTH1F()=*effHist; delete effHist; } return eff; }
MonitorElement * EgHLTOfflineClient::makeEffMonElemFromPassAndAll | ( | const std::string & | filterName, |
const std::string & | name, | ||
const std::string & | title, | ||
const MonitorElement * | pass, | ||
const MonitorElement * | all | ||
) |
Definition at line 423 of file EgHLTOfflineClient.cc.
References DQMStore::book1D(), dbe_, dirName_, DQMStore::get(), MonitorElement::getTH1F(), and NULL.
Referenced by createN1EffHists(), createSingleEffHists(), and createTrigTagProbeEffHists().
{ TH1F* passHist = pass->getTH1F(); if(passHist->GetSumw2N()==0) passHist->Sumw2(); TH1F* allHist = all->getTH1F(); if(allHist->GetSumw2N()==0) allHist->Sumw2(); TH1F* effHist = (TH1F*) passHist->Clone(name.c_str()); effHist->Divide(passHist,allHist,1,1,"B"); //----Morse--------- effHist->SetTitle(title.c_str()); //------------------ MonitorElement* eff = dbe_->get(dirName_+"/Client_Histos/"+filterName+"/"+name); if(eff==NULL) eff= dbe_->book1D(name,effHist); else{ //I was having problems with collating the histograms, hence why I'm just resetting the histogram value *eff->getTH1F()=*effHist; delete effHist; } return eff; }
MonitorElement * EgHLTOfflineClient::makeEffMonElemFromPassAndFail | ( | const std::string & | filterName, |
const std::string & | name, | ||
const std::string & | title, | ||
const MonitorElement * | pass, | ||
const MonitorElement * | fail | ||
) |
Definition at line 514 of file EgHLTOfflineClient.cc.
References DQMStore::book1D(), dbe_, dirName_, DQMStore::get(), MonitorElement::getTH1F(), and NULL.
Referenced by createLooseTightTrigEff().
{ TH1F* failHist = fail->getTH1F(); if(failHist->GetSumw2N()==0) failHist->Sumw2(); TH1F* passHist = pass->getTH1F(); if(passHist->GetSumw2N()==0) passHist->Sumw2(); TH1F* effHist = (TH1F*) passHist->Clone(name.c_str()); effHist->Add(failHist); effHist->Divide(passHist,effHist,1,1,"B"); //----Morse--------- effHist->SetTitle(title.c_str()); //------------------ MonitorElement* eff = dbe_->get(dirName_+"/Client_Histos/"+filterName+"/"+name); if(eff==NULL) eff = dbe_->book1D(name,effHist); else{ //I was having problems with collating the histograms, hence why I'm just reseting the histogram value *eff->getTH1F()=*effHist; delete effHist; } return eff; }
MonitorElement * EgHLTOfflineClient::makeEffMonElemFromPassAndFailAndTagTag | ( | const std::string & | filter, |
const std::string & | name, | ||
const std::string & | title, | ||
const MonitorElement * | pass, | ||
const MonitorElement * | fail, | ||
const MonitorElement * | tagtag | ||
) |
Definition at line 444 of file EgHLTOfflineClient.cc.
References DQMStore::book1D(), dbe_, dirName_, DQMStore::get(), MonitorElement::getTH1F(), and NULL.
Referenced by createTrigTagProbeEffHistsNewAlgo().
{ TH1F* passHist = passNotTag->getTH1F(); if(passHist->GetSumw2N()==0) passHist->Sumw2(); TH1F* failHist = fail->getTH1F(); if(failHist->GetSumw2N()==0) failHist->Sumw2(); TH1F* tagtagHist = tagtag->getTH1F(); if(tagtagHist->GetSumw2N()==0) tagtagHist->Sumw2(); TH1F* numer = (TH1F*) passHist->Clone(name.c_str());if(numer->GetSumw2N()==0) numer->Sumw2(); numer->Add(tagtagHist,passHist,2,1); TH1F* denom = (TH1F*) passHist->Clone(name.c_str());if(denom->GetSumw2N()==0) denom->Sumw2(); denom->Add(tagtagHist,passHist,2,1); denom->Add(failHist,1); TH1F* effHist = (TH1F*) passHist->Clone(name.c_str()); //TGraphAsymmErrors *effHist = new TGraphAsymmErrors(numer,denom,"cl=0.683 b(1,1) mode"); effHist->Divide(numer,denom,1,1,"B"); //effHist->Divide(numer,denom,"cl=0.683 b(1,1) mode"); //----Morse--------- effHist->SetTitle(title.c_str()); //------------------ MonitorElement* eff = dbe_->get(dirName_+"/Client_Histos/"+filter+"/"+name); if(eff==NULL) eff= dbe_->book1D(name,effHist); //if(eff==NULL) eff = dbe_->bookGraphAsymmErrors(name,effHist); else{ //I was having problems with collating the histograms, hence why I'm just resetting the histogram value *eff->getTH1F()=*effHist; //*eff->getTGraphAsymmErrors()=*effHist; delete effHist; } return eff; }
EgHLTOfflineClient& EgHLTOfflineClient::operator= | ( | const EgHLTOfflineClient & | rhs | ) | [inline, private] |
Definition at line 78 of file EgHLTOfflineClient.h.
{return *this;}
void EgHLTOfflineClient::runClient_ | ( | ) | [private] |
Definition at line 128 of file EgHLTOfflineClient.cc.
References createHLTvsOfflineHists(), createLooseTightTrigEff(), createN1EffHists(), createSingleEffHists(), createTrigTagProbeEffHists2Leg(), createTrigTagProbeEffHistsNewAlgo(), dbe_, dirName_, eleEffTags_, eleHLTFilterNames2Leg_, eleHLTFilterNames_, eleHLTvOfflineVars_, eleLooseTightTrigEffVsVars_, eleN1EffVars_, eleSingleEffVars_, eleTightLooseTrigNames_, eleTrigTPEffVsVars_, spr::find(), phoEffTags_, phoHLTFilterNames_, phoHLTvOfflineVars_, phoLooseTightTrigEffVsVars_, phoN1EffVars_, phoSingleEffVars_, phoTightLooseTrigNames_, phoTrigTPEffVsVars_, and DQMStore::setCurrentFolder().
Referenced by endJob(), endLuminosityBlock(), and endRun().
{ if(!dbe_) return; //we dont have the DQMStore so we cant do anything dbe_->setCurrentFolder(dirName_+"/Client_Histos"); std::vector<std::string> regions; regions.push_back("eb"); regions.push_back("ee"); for(size_t filterNr=0;filterNr<eleHLTFilterNames_.size();filterNr++){ //std::cout<<"FilterName: "<<eleHLTFilterNames_[filterNr]<<std::endl; for(size_t regionNr=0;regionNr<regions.size();regionNr++){ for(size_t effNr=0;effNr<eleEffTags_.size();effNr++){ //----Morse---- dbe_->setCurrentFolder(dirName_+"/Client_Histos/"+eleHLTFilterNames_[filterNr]); //-------------- createN1EffHists(eleHLTFilterNames_[filterNr],eleHLTFilterNames_[filterNr]+"_gsfEle_"+eleEffTags_[effNr],regions[regionNr],eleN1EffVars_); createSingleEffHists(eleHLTFilterNames_[filterNr],eleHLTFilterNames_[filterNr]+"_gsfEle_"+eleEffTags_[effNr],regions[regionNr],eleSingleEffVars_); createTrigTagProbeEffHistsNewAlgo(eleHLTFilterNames_[filterNr],regions[regionNr],eleTrigTPEffVsVars_,"gsfEle"); createHLTvsOfflineHists(eleHLTFilterNames_[filterNr],eleHLTFilterNames_[filterNr]+"_gsfEle_passFilter",regions[regionNr],eleHLTvOfflineVars_); } } } for(size_t filterNr=0;filterNr<eleHLTFilterNames2Leg_.size();filterNr++){ //std::cout<<"FilterName: "<<eleHLTFilterNames2Leg_[filterNr]<<std::endl; for(size_t regionNr=0;regionNr<regions.size();regionNr++){ for(size_t effNr=0;effNr<eleEffTags_.size();effNr++){ std::string trigNameLeg1 = eleHLTFilterNames2Leg_[filterNr].substr(0,eleHLTFilterNames2Leg_[filterNr].find("::")); std::string trigNameLeg2 = eleHLTFilterNames2Leg_[filterNr].substr(eleHLTFilterNames2Leg_[filterNr].find("::")+2); dbe_->setCurrentFolder(dirName_+"/Client_Histos/"+trigNameLeg2); createTrigTagProbeEffHists2Leg(trigNameLeg1,trigNameLeg2,regions[regionNr],eleTrigTPEffVsVars_,"gsfEle"); } } } //------Morse // dbe_->setCurrentFolder(dirName_); //-------------- for(size_t filterNr=0;filterNr<phoHLTFilterNames_.size();filterNr++){ for(size_t regionNr=0;regionNr<regions.size();regionNr++){ for(size_t effNr=0;effNr<phoEffTags_.size();effNr++){ //----Morse---- dbe_->setCurrentFolder(dirName_+"/Client_Histos/"+phoHLTFilterNames_[filterNr]); //createN1EffHists(eleHLTFilterNames_[filterNr]+"_pho_"+phoEffTags_[effNr],regions[regionNr],phoN1EffVars_); //createSingleEffHists(eleHLTFilterNames_[filterNr]+"_gsfEle_"+phoEffTags_[effNr],regions[regionNr],phoSingleEffVars_); createN1EffHists(phoHLTFilterNames_[filterNr],phoHLTFilterNames_[filterNr]+"_pho_"+phoEffTags_[effNr],regions[regionNr],phoN1EffVars_); createSingleEffHists(phoHLTFilterNames_[filterNr],phoHLTFilterNames_[filterNr]+"_pho_"+phoEffTags_[effNr],regions[regionNr],phoSingleEffVars_); createTrigTagProbeEffHistsNewAlgo(phoHLTFilterNames_[filterNr],regions[regionNr],phoTrigTPEffVsVars_,"pho"); createHLTvsOfflineHists(phoHLTFilterNames_[filterNr],phoHLTFilterNames_[filterNr]+"_pho_passFilter",regions[regionNr],phoHLTvOfflineVars_); //-------------- } } } //------Morse // dbe_->setCurrentFolder(dirName_); //-------------- for(size_t regionNr=0;regionNr<regions.size();regionNr++){ createLooseTightTrigEff(eleTightLooseTrigNames_,regions[regionNr],eleLooseTightTrigEffVsVars_,"gsfEle"); createLooseTightTrigEff(eleTightLooseTrigNames_,regions[regionNr],eleLooseTightTrigEffVsVars_,"gsfEle_trigCuts"); createLooseTightTrigEff(phoTightLooseTrigNames_,regions[regionNr],phoLooseTightTrigEffVsVars_,"pho"); createLooseTightTrigEff(phoTightLooseTrigNames_,regions[regionNr],phoLooseTightTrigEffVsVars_,"pho_trigCuts"); } //----Morse----- dbe_->setCurrentFolder(dirName_); //---------- }
DQMStore* EgHLTOfflineClient::dbe_ [private] |
Definition at line 40 of file EgHLTOfflineClient.h.
Referenced by createHLTvsOfflineHists(), createLooseTightTrigEff(), createN1EffHists(), createSingleEffHists(), createTrigTagProbeEffHists(), createTrigTagProbeEffHists2Leg(), createTrigTagProbeEffHistsNewAlgo(), EgHLTOfflineClient(), FillHLTvsOfflineHist(), makeEffMonElem2Leg(), makeEffMonElemFromPassAndAll(), makeEffMonElemFromPassAndFail(), makeEffMonElemFromPassAndFailAndTagTag(), and runClient_().
std::string EgHLTOfflineClient::dirName_ [private] |
Definition at line 41 of file EgHLTOfflineClient.h.
Referenced by createHLTvsOfflineHists(), createLooseTightTrigEff(), createN1EffHists(), createSingleEffHists(), createTrigTagProbeEffHists(), createTrigTagProbeEffHists2Leg(), createTrigTagProbeEffHistsNewAlgo(), EgHLTOfflineClient(), FillHLTvsOfflineHist(), makeEffMonElem2Leg(), makeEffMonElemFromPassAndAll(), makeEffMonElemFromPassAndFail(), makeEffMonElemFromPassAndFailAndTagTag(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::eleEffTags_ [private] |
Definition at line 53 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::eleHLTFilterNames2Leg_ [private] |
Definition at line 44 of file EgHLTOfflineClient.h.
Referenced by beginRun(), EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::eleHLTFilterNames_ [private] |
Definition at line 43 of file EgHLTOfflineClient.h.
Referenced by beginRun(), EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::eleHLTvOfflineVars_ [private] |
Definition at line 64 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::eleLooseTightTrigEffVsVars_ [private] |
Definition at line 61 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::eleN1EffVars_ [private] |
Definition at line 51 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::eleSingleEffVars_ [private] |
Definition at line 52 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::eleTightLooseTrigNames_ [private] |
Definition at line 45 of file EgHLTOfflineClient.h.
Referenced by beginRun(), EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::eleTrigTPEffVsVars_ [private] |
Definition at line 59 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and runClient_().
bool EgHLTOfflineClient::filterInactiveTriggers_ [private] |
Definition at line 71 of file EgHLTOfflineClient.h.
Referenced by beginRun(), and EgHLTOfflineClient().
std::string EgHLTOfflineClient::hltTag_ [private] |
Definition at line 73 of file EgHLTOfflineClient.h.
Referenced by beginRun(), and EgHLTOfflineClient().
bool EgHLTOfflineClient::isSetup_ [private] |
Definition at line 72 of file EgHLTOfflineClient.h.
Referenced by beginRun().
std::vector<std::string> EgHLTOfflineClient::phoEffTags_ [private] |
Definition at line 57 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::phoHLTFilterNames2Leg_ [private] |
Definition at line 47 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient().
std::vector<std::string> EgHLTOfflineClient::phoHLTFilterNames_ [private] |
Definition at line 46 of file EgHLTOfflineClient.h.
Referenced by beginRun(), EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::phoHLTvOfflineVars_ [private] |
Definition at line 65 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::phoLooseTightTrigEffVsVars_ [private] |
Definition at line 62 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::phoN1EffVars_ [private] |
Definition at line 55 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::phoSingleEffVars_ [private] |
Definition at line 56 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::phoTightLooseTrigNames_ [private] |
Definition at line 48 of file EgHLTOfflineClient.h.
Referenced by beginRun(), EgHLTOfflineClient(), and runClient_().
std::vector<std::string> EgHLTOfflineClient::phoTrigTPEffVsVars_ [private] |
Definition at line 60 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and runClient_().
bool EgHLTOfflineClient::runClientEndJob_ [private] |
Definition at line 69 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and endJob().
bool EgHLTOfflineClient::runClientEndLumiBlock_ [private] |
Definition at line 67 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and endLuminosityBlock().
bool EgHLTOfflineClient::runClientEndRun_ [private] |
Definition at line 68 of file EgHLTOfflineClient.h.
Referenced by EgHLTOfflineClient(), and endRun().