CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
EgHLTOfflineClient Class Reference

#include <EgHLTOfflineClient.h>

Inheritance diagram for EgHLTOfflineClient:
edm::EDAnalyzer edm::EDConsumerBase

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 &region, const std::vector< std::string > &varNames)
 
void createLooseTightTrigEff (const std::vector< std::string > &tightLooseTrigNames, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName)
 
void createN1EffHists (const std::string &filterName, const std::string &baseName, const std::string &region, const std::vector< std::string > &varNames)
 
void createSingleEffHists (const std::string &filterName, const std::string &baseName, const std::string &region, const std::vector< std::string > &varNames)
 
void createTrigTagProbeEffHists (const std::string &filterName, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName)
 
void createTrigTagProbeEffHists2Leg (const std::string &filterNameLeg1, const std::string &filterNameLeg2, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName)
 
void createTrigTagProbeEffHistsNewAlgo (const std::string &filterName, const std::string &region, 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)
 
MonitorElementFillHLTvsOfflineHist (const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *numer, const MonitorElement *denom)
 
MonitorElementmakeEffMonElem2Leg (const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *Leg1Eff, const MonitorElement *Leg2NotLeg1Source, const MonitorElement *all)
 
MonitorElementmakeEffMonElemFromPassAndAll (const std::string &filterName, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *all)
 
MonitorElementmakeEffMonElemFromPassAndFail (const std::string &filterName, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *fail)
 
MonitorElementmakeEffMonElemFromPassAndFailAndTagTag (const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *fail, const MonitorElement *tagtag)
 
virtual ~EgHLTOfflineClient ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

 EgHLTOfflineClient (const EgHLTOfflineClient &rhs)
 
EgHLTOfflineClientoperator= (const EgHLTOfflineClient &rhs)
 
void runClient_ ()
 

Private Attributes

DQMStoredbe_
 
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_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 37 of file EgHLTOfflineClient.h.

Constructor & Destructor Documentation

EgHLTOfflineClient::EgHLTOfflineClient ( const EgHLTOfflineClient rhs)
inlineprivate

Definition at line 77 of file EgHLTOfflineClient.h.

77 {}
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_, cppFunctionSkipper::operator, phoEffTags_, phoHLTFilterNames2Leg_, phoHLTFilterNames_, phoHLTvOfflineVars_, phoLooseTightTrigEffVsVars_, phoN1EffVars_, phoSingleEffVars_, phoTightLooseTrigNames_, phoTrigTPEffVsVars_, runClientEndJob_, runClientEndLumiBlock_, runClientEndRun_, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), and AlCaHLTBitMon_QueryRunRegistry::string.

22  :dbe_(NULL),isSetup_(false)
23 {
24  dbe_ = edm::Service<DQMStore>().operator->(); //only one chance to get this, if we every have another shot, remember to check isSetup is okay
25  if (!dbe_) {
26  edm::LogError("EgHLTOfflineClient") << "unable to get DQMStore service, upshot is no client histograms will be made";
27  }
28  if(iConfig.getUntrackedParameter<bool>("DQMStore", false)) {
29  if(dbe_) dbe_->setVerbose(0);
30  }
31 
32 
33  eleHLTFilterNames_ = iConfig.getParameter<std::vector<std::string> >("eleHLTFilterNames");
34  eleHLTFilterNames2Leg_ = iConfig.getParameter<std::vector<std::string> >("eleHLTFilterNames2Leg");
35  eleTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("eleTightLooseTrigNames");
36  phoHLTFilterNames_ = iConfig.getParameter<std::vector<std::string> >("phoHLTFilterNames");
37  phoHLTFilterNames2Leg_ = iConfig.getParameter<std::vector<std::string> >("phoHLTFilterNames2Leg");
38  phoTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("phoTightLooseTrigNames");
39 
40  eleN1EffVars_=iConfig.getParameter<std::vector<std::string> >("eleN1EffVars");
41  eleSingleEffVars_ = iConfig.getParameter<std::vector<std::string> >("eleSingleEffVars");
42  eleEffTags_ = iConfig.getParameter<std::vector<std::string> >("eleEffTags");
43  eleTrigTPEffVsVars_ = iConfig.getParameter<std::vector<std::string> >("eleTrigTPEffVsVars");
44  eleLooseTightTrigEffVsVars_ = iConfig.getParameter<std::vector<std::string> >("eleLooseTightTrigEffVsVars");
45  eleHLTvOfflineVars_ = iConfig.getParameter<std::vector<std::string> >("eleHLTvOfflineVars");
46 
47  phoN1EffVars_=iConfig.getParameter<std::vector<std::string> >("phoN1EffVars");
48  phoSingleEffVars_ = iConfig.getParameter<std::vector<std::string> >("phoSingleEffVars");
49  phoEffTags_ = iConfig.getParameter<std::vector<std::string> >("phoEffTags");
50  phoTrigTPEffVsVars_ = iConfig.getParameter<std::vector<std::string> >("phoTrigTPEffVsVars");
51  phoLooseTightTrigEffVsVars_ = iConfig.getParameter<std::vector<std::string> >("phoLooseTightTrigEffVsVars");
52  phoHLTvOfflineVars_ = iConfig.getParameter<std::vector<std::string> >("phoHLTvOfflineVars");
53 
54  runClientEndLumiBlock_ = iConfig.getParameter<bool>("runClientEndLumiBlock");
55  runClientEndRun_ = iConfig.getParameter<bool>("runClientEndRun");
56  runClientEndJob_ = iConfig.getParameter<bool>("runClientEndJob");
57 
58 
59 
60  dirName_=iConfig.getParameter<std::string>("DQMDirName");
61  if(dbe_) dbe_->setCurrentFolder(dirName_);
62 
63 
64  filterInactiveTriggers_ =iConfig.getParameter<bool>("filterInactiveTriggers");
65  hltTag_ = iConfig.getParameter<std::string>("hltTag");
66 
67 
68 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::string > eleHLTFilterNames_
std::vector< std::string > phoHLTFilterNames2Leg_
std::vector< std::string > phoLooseTightTrigEffVsVars_
#define NULL
Definition: scimark2.h:8
std::vector< std::string > phoTrigTPEffVsVars_
std::vector< std::string > eleTightLooseTrigNames_
std::vector< std::string > phoN1EffVars_
std::vector< std::string > eleHLTvOfflineVars_
std::vector< std::string > eleTrigTPEffVsVars_
void setVerbose(unsigned level)
Definition: DQMStore.cc:631
std::vector< std::string > phoEffTags_
std::vector< std::string > phoSingleEffVars_
std::vector< std::string > eleN1EffVars_
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > phoHLTvOfflineVars_
std::vector< std::string > phoHLTFilterNames_
std::vector< std::string > eleLooseTightTrigEffVsVars_
std::vector< std::string > eleEffTags_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
std::vector< std::string > eleHLTFilterNames2Leg_
std::vector< std::string > eleSingleEffVars_
EgHLTOfflineClient::~EgHLTOfflineClient ( )
virtual

Definition at line 71 of file EgHLTOfflineClient.cc.

72 {
73 
74 }

Member Function Documentation

void EgHLTOfflineClient::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 118 of file EgHLTOfflineClient.cc.

119 {
120 
121 }
void EgHLTOfflineClient::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 76 of file EgHLTOfflineClient.cc.

77 {
78 
79 
80 }
virtual void EgHLTOfflineClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
inlinevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 92 of file EgHLTOfflineClient.h.

92 {}
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_.

88 {
89  if(!isSetup_){
92  bool changed=false;
93  hltConfig.init(run,c,hltTag_,changed);
94  std::vector<std::string> activeFilters;
95  std::vector<std::string> activeEleFilters;
96  std::vector<std::string> activeEle2LegFilters;
97  std::vector<std::string> activePhoFilters;
98  std::vector<std::string> activePho2LegFilters;
99  egHLT::trigTools::getActiveFilters(hltConfig,activeFilters,activeEleFilters,activeEle2LegFilters,activePhoFilters,activePho2LegFilters);
100 
106  }
107  isSetup_=true;
108  }
109 }
std::vector< std::string > eleHLTFilterNames_
std::vector< std::string > eleTightLooseTrigNames_
void getActiveFilters(const HLTConfigProvider &hltConfig, 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)
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > phoHLTFilterNames_
void filterInactiveTriggers(std::vector< std::string > &namesToFilter, std::vector< std::string > &activeFilters)
void filterInactiveTightLooseTriggers(std::vector< std::string > &namesToFilter, const std::vector< std::string > &activeFilters)
std::vector< std::string > eleHLTFilterNames2Leg_
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(), NULL, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by runClient_().

197  {
198  //need to do Energy manually to get SC Energy
199  /*
200  MonitorElement* numer = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_HLTenergy"+"_"+region);
201  MonitorElement* denom = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_energy"+"_"+region);
202 
203  if(numer!=NULL && denom!=NULL){
204  std::string effHistName(baseName+"_HLToverOfflineSC_energy_"+region);//std::cout<<"hltVSoffline: "<<effHistName<<std::endl;
205  std::string effHistTitle(effHistName);
206  if(region=="eb" || region=="ee"){
207  if(region=="eb") effHistTitle = "Barrel "+baseName+" HLToverOfflineSC Energy";
208  if(region=="ee") effHistTitle = "Endcap "+baseName+" HLToverOfflineSC Energy";
209  FillHLTvsOfflineHist(filterName,effHistName,effHistTitle,numer,denom);
210  }
211  }//end Et
212  */
213  //now eta, phi automatically
214  for(size_t varNr=0;varNr<varNames.size();varNr++){
215  MonitorElement* numer = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_HLT"+varNames[varNr]+"_"+region);
216  MonitorElement* denom = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_"+varNames[varNr]+"_"+region);
217  if(numer!=NULL && denom!=NULL){
218  std::string effHistName(baseName+"_HLToverOffline_"+varNames[varNr]+"_"+region);//std::cout<<"hltVSoffline: "<<effHistName<<std::endl;
219  std::string effHistTitle(effHistName);
220  if(region=="eb" || region=="ee"){
221  if(region=="eb") effHistTitle = "Barrel "+baseName+" HLToverOffline "+varNames[varNr];
222  if(region=="ee") effHistTitle = "Endcap "+baseName+" HLToverOffline "+varNames[varNr];
223  FillHLTvsOfflineHist(filterName,effHistName,effHistTitle,numer,denom);
224  }
225  }
226  }//end loop over varNames
227 }
#define NULL
Definition: scimark2.h:8
MonitorElement * FillHLTvsOfflineHist(const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *numer, const MonitorElement *denom)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
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, splitString(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by runClient_().

385 {
386  for(size_t varNr=0;varNr<vsVarNames.size();varNr++){
387  for(size_t trigNr=0;trigNr<tightLooseTrigNames.size();trigNr++){
388  std::vector<std::string> splitString;
389  boost::split(splitString,tightLooseTrigNames[trigNr],boost::is_any_of(std::string(":")));
390  if(splitString.size()!=2) continue; //format incorrect
391  const std::string& tightTrig = splitString[0];
392  const std::string& looseTrig = splitString[1];
393  MonitorElement* fail = dbe_->get(dirName_+"/Source_Histos/"+tightTrig+"_"+looseTrig+"_"+objName+"_failTrig_"+vsVarNames[varNr]+"_"+region);
394  if(fail==NULL){
395  //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<dirName_+"/"+tightTrig+"_"+looseTrig+"_"+objName+"_failTrig_"+vsVarNames[varNr]+"_"+region;
396 
397  continue;
398  }
399 
400  MonitorElement* pass = dbe_->get(dirName_+"/Source_Histos/"+tightTrig+"_"+looseTrig+"_"+objName+"_passTrig_"+vsVarNames[varNr]+"_"+region);
401  if(pass==NULL){
402 
403  //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<dirName_+"/"+tightTrig+"_"+looseTrig+"_"+objName+"_passTrig_"+vsVarNames[varNr]+"_"+region;
404  continue;
405  }
406  const std::string newHistName(tightTrig+"_trigEffTo_"+looseTrig+"_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region);
407  //----Morse-----
408  std::string effHistTitle(newHistName);//std::cout<<effHistTitle<<std::endl;
409  if(region=="eb" || region=="ee"){
410  if(region=="eb") effHistTitle = "Barrel "+tightTrig+"_TrigEffTo_"+looseTrig+"_"+objName+" vs "+vsVarNames[varNr];
411  if(region=="ee") effHistTitle = "Endcap "+tightTrig+"_TrigEffTo_"+looseTrig+"_"+objName+" vs "+vsVarNames[varNr];
412  }
413  //std::cout<<effHistTitle<<std::endl;
414  //dbe_->setCurrentFolder(dirName_+"/"+tightTrig+"_"+looseTrig);
415  //------------
416  makeEffMonElemFromPassAndFail("LooseTight",newHistName,effHistTitle,pass,fail);
417  }//end loop over trigger pairs
418  } //end loop over vsVarNames
419 
420 }
#define NULL
Definition: scimark2.h:8
std::vector< std::string > splitString(const std::string &fLine)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
MonitorElement * makeEffMonElemFromPassAndFail(const std::string &filterName, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *fail)
double split
Definition: MVATrainer.cc:139
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(), NULL, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by runClient_().

244 {
245  MonitorElement* numer = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_allCuts_"+region);
246 
247  for(size_t varNr=0;varNr<varNames.size();varNr++){
248  MonitorElement* denom = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_n1_"+varNames[varNr]+"_"+region);
249  if(numer!=NULL && denom!=NULL){
250  std::string effHistName(baseName+"_n1Eff_"+varNames[varNr]+"_"+region);//std::cout<<"N1: "<<effHistName<<std::endl;
251  //std::cout<<region<<" ";
252  //----Morse-----------
253  std::string effHistTitle(effHistName);//std::cout<<effHistTitle<<std::endl;
254  if(region=="eb" || region=="ee"){
255  if(region=="eb") effHistTitle = "Barrel "+baseName+" N1eff "+varNames[varNr];
256  if(region=="ee") effHistTitle = "Endcap "+baseName+" N1eff "+varNames[varNr];
257  }//std::cout<<effHistTitle<<std::endl;
258  //makeEffMonElemFromPassAndAll(effHistName,numer,denom);
259  makeEffMonElemFromPassAndAll(filterName,effHistName,effHistTitle,numer,denom);
260  //---------------------
261  }
262  }//end loop over varNames
263 }
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
MonitorElement * makeEffMonElemFromPassAndAll(const std::string &filterName, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *all)
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(), NULL, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by runClient_().

266 {
267  MonitorElement* denom = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_noCuts_"+region);
268 
269  for(size_t varNr=0;varNr<varNames.size();varNr++){
270  MonitorElement* numer = dbe_->get(dirName_+"/Source_Histos/"+filterName+"/"+baseName+"_single_"+varNames[varNr]+"_"+region);
271  if(numer!=NULL && denom!=NULL){
272  std::string effHistName(baseName+"_singleEff_"+varNames[varNr]+"_"+region);//std::cout<<"Si: "<<effHistName<<std::endl;
273  //----Morse-----------
274  std::string effHistTitle(effHistName);//std::cout<<effHistTitle<<std::endl;
275  if(region=="eb" || region=="ee"){
276  if(region=="eb") effHistTitle = "Barrel "+baseName+" SingleEff "+varNames[varNr];
277  if(region=="ee") effHistTitle = "Endcap "+baseName+" SingleEff "+varNames[varNr];
278  }//std::cout<<effHistTitle<<std::endl;
279  //makeEffMonElemFromPassAndAll(effHistName,numer,denom);
280  makeEffMonElemFromPassAndAll(filterName,effHistName,effHistTitle,numer,denom);
281  //--------------------
282  }
283  }//end loop over varNames
284 }
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
MonitorElement * makeEffMonElemFromPassAndAll(const std::string &filterName, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *all)
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(), NULL, and AlCaHLTBitMon_QueryRunRegistry::string.

287 {
288  for(size_t varNr=0;varNr<vsVarNames.size();varNr++){
289  std::string allName(dirName_+"/Source_Histos/"+filterName+"/"+filterName+"_trigTagProbe_"+objName+"_all_"+vsVarNames[varNr]+"_"+region);
290  MonitorElement* all = dbe_->get(allName);
291  if(all==NULL){
292  //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<allName;
293  continue;
294  }
295  std::string passName(dirName_+"/Source_Histos/"+filterName+"/"+filterName+"_trigTagProbe_"+objName+"_pass_"+vsVarNames[varNr]+"_"+region);
296  MonitorElement* pass = dbe_->get(passName);
297  if(pass==NULL){
298  //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<passName;
299  continue;
300  }
301  //----Morse-----
302  std::string effHistTitle(filterName+"_trigTagProbeEff_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region);//std::cout<<effHistTitle<<std::endl;
303  if(region=="eb" || region=="ee"){
304  if(region=="eb") effHistTitle = "Barrel "+filterName+"_"+objName+" TrigTagProbeEff vs "+vsVarNames[varNr];
305  if(region=="ee") effHistTitle = "Endcap "+filterName+"_"+objName+" TrigTagProbeEff vs "+vsVarNames[varNr];
306  }//std::cout<<effHistTitle<<std::endl;
307  //------------
308  makeEffMonElemFromPassAndAll(filterName,filterName+"_trigTagProbeEff_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region,effHistTitle,pass,all);
309  }//end loop over vsVarNames
310 }
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
MonitorElement * makeEffMonElemFromPassAndAll(const std::string &filterName, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *all)
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(), NULL, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by runClient_().

352 {
353  for(size_t varNr=0;varNr<vsVarNames.size();varNr++){
354 
355  std::string allName(dirName_+"/Source_Histos/"+filterNameLeg2+"/"+filterNameLeg2+"_trigTagProbe_"+objName+"_all_"+vsVarNames[varNr]+"_"+region);
356  MonitorElement* all = dbe_->get(allName);
357  if(all==NULL){
358  edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<allName;
359  continue;
360  }
361  std::string Leg2NotLeg1SourceName(dirName_+"/Source_Histos/"+filterNameLeg2+"/"+filterNameLeg2+"_trigTagProbe_"+objName+"_passLeg2failLeg1_"+vsVarNames[varNr]+"_"+region);
362  MonitorElement* Leg2NotLeg1Source = dbe_->get(Leg2NotLeg1SourceName);
363  if(Leg2NotLeg1Source==NULL){
364  edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<Leg2NotLeg1SourceName;
365  continue;
366  }
367 
368  std::string Leg1EffName(dirName_+"/Client_Histos/"+filterNameLeg1+"/"+filterNameLeg1+"_trigTagProbeEff_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region);
369  MonitorElement *Leg1Eff = dbe_->get(Leg1EffName);
370  if(Leg1Eff==NULL){
371  edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<Leg1EffName;
372  continue;
373  }
374  std::string effHistTitle(filterNameLeg2+"_trigTagProbeEff2Leg_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region);//std::cout<<effHistTitle<<std::endl;
375  if(region=="eb" || region=="ee"){
376  if(region=="eb") effHistTitle = "Barrel "+filterNameLeg2+"_"+objName+" TrigTagProbeEff2Leg vs "+vsVarNames[varNr];
377  if(region=="ee") effHistTitle = "Endcap "+filterNameLeg2+"_"+objName+" TrigTagProbeEff2Leg vs "+vsVarNames[varNr];
378  }//std::cout<<effHistTitle<<std::endl;
379  makeEffMonElem2Leg(filterNameLeg2,filterNameLeg2+"_trigTagProbeEff2Leg_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region,effHistTitle,Leg1Eff,Leg2NotLeg1Source,all);
380  }//end loop over vsVarNames
381 }
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
MonitorElement * makeEffMonElem2Leg(const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *Leg1Eff, const MonitorElement *Leg2NotLeg1Source, const MonitorElement *all)
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(), NULL, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by runClient_().

313 {
314  for(size_t varNr=0;varNr<vsVarNames.size();varNr++){
315  /*
316  std::string allName(dirName_+"/Source_Histos/"+filterName+"/"+filterName+"_trigTagProbe_"+objName+"_all_"+vsVarNames[varNr]+"_"+region);
317  MonitorElement* all = dbe_->get(allName);
318  if(all==NULL){
319  //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<allName;
320  continue;
321  }*/
322  std::string passName(dirName_+"/Source_Histos/"+filterName+"/"+filterName+"_trigTagProbe_"+objName+"_passNotTag_"+vsVarNames[varNr]+"_"+region);
323  MonitorElement* passNotTag = dbe_->get(passName);
324  if(passNotTag==NULL){
325  //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<passName;
326  continue;
327  }
328  std::string passTagTagName(dirName_+"/Source_Histos/"+filterName+"/"+filterName+"_trigTagProbe_"+objName+"_passTagTag_"+vsVarNames[varNr]+"_"+region);
329  MonitorElement* passTagTag = dbe_->get(passTagTagName);
330  if(passTagTag==NULL){
331  //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<passTagTagName;
332  continue;
333  }
334  std::string failName(dirName_+"/Source_Histos/"+filterName+"/"+filterName+"_trigTagProbe_"+objName+"_fail_"+vsVarNames[varNr]+"_"+region);
335  MonitorElement* fail = dbe_->get(failName);
336  if(fail==NULL){
337  //edm::LogInfo("EgHLTOfflineClient") <<" couldnt get hist "<<failName;
338  continue;
339  }
340  //----Morse-----
341  std::string effHistTitle(filterName+"_trigTagProbeEff_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region);//std::cout<<effHistTitle<<std::endl;
342  if(region=="eb" || region=="ee"){
343  if(region=="eb") effHistTitle = "Barrel "+filterName+"_"+objName+" TrigTagProbeEff vs "+vsVarNames[varNr];
344  if(region=="ee") effHistTitle = "Endcap "+filterName+"_"+objName+" TrigTagProbeEff vs "+vsVarNames[varNr];
345  }//std::cout<<effHistTitle<<std::endl;
346  //------------
347  makeEffMonElemFromPassAndFailAndTagTag(filterName,filterName+"_trigTagProbeEff_"+objName+"_vs_"+vsVarNames[varNr]+"_"+region,effHistTitle,passNotTag,fail,passTagTag);
348  }//end loop over vsVarNames
349 }
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
MonitorElement * makeEffMonElemFromPassAndFailAndTagTag(const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *fail, const MonitorElement *tagtag)
void EgHLTOfflineClient::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 82 of file EgHLTOfflineClient.cc.

References runClient_(), and runClientEndJob_.

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_.

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_.

113 {
115 }
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(), NULL, and pileupDistInMC::num.

Referenced by createHLTvsOfflineHists().

228  {
229  TH1F* num = numer->getTH1F();if(num->GetSumw2N()==0) num->Sumw2();
230  TH1F* den = denom->getTH1F();if(den->GetSumw2N()==0) den->Sumw2();
231  TH1F* h_eff = (TH1F*)num->Clone(name.c_str());
232  h_eff->Divide(num,den,1,1,"B");
233  h_eff->SetTitle(title.c_str());
234  MonitorElement* eff = dbe_->get(dirName_+"/Client_Histos/"+filter+"/"+name);
235  if(eff==NULL)eff=dbe_->book1D(name,h_eff);
236  else{ //I was having problems with collating the histograms, hence why I'm just resetting the histogram value
237  *eff->getTH1F()=*h_eff;
238  delete h_eff;
239  }
240  return eff;
241 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
TH1F * getTH1F(void) const
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().

476 {
477  TH1F* allHist = all->getTH1F();
478  if(allHist->GetSumw2()==0)allHist->Sumw2();
479  TH1F* Leg2NotLeg1SourceHist = Leg2NotLeg1Source->getTH1F();
480  if(Leg2NotLeg1SourceHist->GetSumw2()==0)Leg2NotLeg1SourceHist->Sumw2();
481 
482  TH1F* effHistLeg2NotLeg1 = (TH1F*)allHist->Clone(name.c_str());
483  if(effHistLeg2NotLeg1->GetSumw2()==0)effHistLeg2NotLeg1->Sumw2();
484  effHistLeg2NotLeg1->Divide(Leg2NotLeg1SourceHist, allHist, 1, 1, "B");
485 
486  TH1F* Leg1EffHist = Leg1Eff->getTH1F();
487  if(Leg1EffHist->GetSumw2()==0)Leg1EffHist->Sumw2();
488 
489  TH1F* effHistTerm1 = (TH1F*)allHist->Clone(name.c_str());
490  if(effHistTerm1->GetSumw2()==0)effHistTerm1->Sumw2();
491  effHistTerm1->Multiply(Leg1EffHist, Leg1EffHist, 1, 1, "B");
492 
493  TH1F* effHistTerm2 = (TH1F*)allHist->Clone(name.c_str());
494  if(effHistTerm2->GetSumw2()==0)effHistTerm2->Sumw2();
495  effHistTerm2->Multiply(Leg1EffHist, effHistLeg2NotLeg1, 1, 1, "B");
496  effHistTerm2->Scale(2);
497 
498  TH1F* effHist = (TH1F*)allHist->Clone(name.c_str());
499  if(effHist->GetSumw2()==0)effHist->Sumw2();
500  effHist->Add(effHistTerm1, effHistTerm2, 1, 1);
501  effHist->SetTitle(title.c_str());
502 
503  MonitorElement* eff = dbe_->get(dirName_+"/Client_Histos/"+filter+"/"+name);
504  if(eff==NULL) eff= dbe_->book1D(name,effHist);
505  else{ //I was having problems with collating the histograms, hence why I'm just resetting the histogram value
506  *eff->getTH1F()=*effHist;
507  delete effHist;
508  }
509  return eff;
510 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
TH1F * getTH1F(void) const
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().

425 {
426  TH1F* passHist = pass->getTH1F();
427  if(passHist->GetSumw2N()==0) passHist->Sumw2();
428  TH1F* allHist = all->getTH1F();
429  if(allHist->GetSumw2N()==0) allHist->Sumw2();
430  TH1F* effHist = (TH1F*) passHist->Clone(name.c_str());
431  effHist->Divide(passHist,allHist,1,1,"B");
432  //----Morse---------
433  effHist->SetTitle(title.c_str());
434  //------------------
435  MonitorElement* eff = dbe_->get(dirName_+"/Client_Histos/"+filterName+"/"+name);
436  if(eff==NULL) eff= dbe_->book1D(name,effHist);
437  else{ //I was having problems with collating the histograms, hence why I'm just resetting the histogram value
438  *eff->getTH1F()=*effHist;
439  delete effHist;
440  }
441  return eff;
442 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
TH1F * getTH1F(void) const
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().

516 {
517  TH1F* failHist = fail->getTH1F();
518  if(failHist->GetSumw2N()==0) failHist->Sumw2();
519  TH1F* passHist = pass->getTH1F();
520  if(passHist->GetSumw2N()==0) passHist->Sumw2();
521 
522  TH1F* effHist = (TH1F*) passHist->Clone(name.c_str());
523  effHist->Add(failHist);
524  effHist->Divide(passHist,effHist,1,1,"B");
525  //----Morse---------
526  effHist->SetTitle(title.c_str());
527  //------------------
528  MonitorElement* eff = dbe_->get(dirName_+"/Client_Histos/"+filterName+"/"+name);
529  if(eff==NULL) eff = dbe_->book1D(name,effHist);
530  else{ //I was having problems with collating the histograms, hence why I'm just reseting the histogram value
531  *eff->getTH1F()=*effHist;
532  delete effHist;
533  }
534  return eff;
535 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
TH1F * getTH1F(void) const
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().

446 {
447  TH1F* passHist = passNotTag->getTH1F();
448  if(passHist->GetSumw2N()==0) passHist->Sumw2();
449  TH1F* failHist = fail->getTH1F();
450  if(failHist->GetSumw2N()==0) failHist->Sumw2();
451  TH1F* tagtagHist = tagtag->getTH1F();
452  if(tagtagHist->GetSumw2N()==0) tagtagHist->Sumw2();
453  TH1F* numer = (TH1F*) passHist->Clone(name.c_str());if(numer->GetSumw2N()==0) numer->Sumw2();
454  numer->Add(tagtagHist,passHist,2,1);
455  TH1F* denom = (TH1F*) passHist->Clone(name.c_str());if(denom->GetSumw2N()==0) denom->Sumw2();
456  denom->Add(tagtagHist,passHist,2,1);
457  denom->Add(failHist,1);
458  TH1F* effHist = (TH1F*) passHist->Clone(name.c_str());
459  //TGraphAsymmErrors *effHist = new TGraphAsymmErrors(numer,denom,"cl=0.683 b(1,1) mode");
460  effHist->Divide(numer,denom,1,1,"B");
461  //effHist->Divide(numer,denom,"cl=0.683 b(1,1) mode");
462  //----Morse---------
463  effHist->SetTitle(title.c_str());
464  //------------------
465  MonitorElement* eff = dbe_->get(dirName_+"/Client_Histos/"+filter+"/"+name);
466  if(eff==NULL) eff= dbe_->book1D(name,effHist);
467  //if(eff==NULL) eff = dbe_->bookGraphAsymmErrors(name,effHist);
468  else{ //I was having problems with collating the histograms, hence why I'm just resetting the histogram value
469  *eff->getTH1F()=*effHist;
470  //*eff->getTGraphAsymmErrors()=*effHist;
471  delete effHist;
472  }
473  return eff;
474 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
#define NULL
Definition: scimark2.h:8
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
TH1F * getTH1F(void) const
EgHLTOfflineClient& EgHLTOfflineClient::operator= ( const EgHLTOfflineClient rhs)
inlineprivate

Definition at line 78 of file EgHLTOfflineClient.h.

78 {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_, DQMStore::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by endJob(), endLuminosityBlock(), and endRun().

129 {
130  if(!dbe_) return; //we dont have the DQMStore so we cant do anything
131  dbe_->setCurrentFolder(dirName_+"/Client_Histos");
132 
133 
134  std::vector<std::string> regions;
135  regions.push_back("eb");
136  regions.push_back("ee");
137 
138  for(size_t filterNr=0;filterNr<eleHLTFilterNames_.size();filterNr++){
139  //std::cout<<"FilterName: "<<eleHLTFilterNames_[filterNr]<<std::endl;
140  for(size_t regionNr=0;regionNr<regions.size();regionNr++){
141  for(size_t effNr=0;effNr<eleEffTags_.size();effNr++){
142  //----Morse----
143  dbe_->setCurrentFolder(dirName_+"/Client_Histos/"+eleHLTFilterNames_[filterNr]);
144  //--------------
145  createN1EffHists(eleHLTFilterNames_[filterNr],eleHLTFilterNames_[filterNr]+"_gsfEle_"+eleEffTags_[effNr],regions[regionNr],eleN1EffVars_);
146  createSingleEffHists(eleHLTFilterNames_[filterNr],eleHLTFilterNames_[filterNr]+"_gsfEle_"+eleEffTags_[effNr],regions[regionNr],eleSingleEffVars_);
147  createTrigTagProbeEffHistsNewAlgo(eleHLTFilterNames_[filterNr],regions[regionNr],eleTrigTPEffVsVars_,"gsfEle");
148  createHLTvsOfflineHists(eleHLTFilterNames_[filterNr],eleHLTFilterNames_[filterNr]+"_gsfEle_passFilter",regions[regionNr],eleHLTvOfflineVars_);
149  }
150  }
151  }
152  for(size_t filterNr=0;filterNr<eleHLTFilterNames2Leg_.size();filterNr++){
153  //std::cout<<"FilterName: "<<eleHLTFilterNames2Leg_[filterNr]<<std::endl;
154  for(size_t regionNr=0;regionNr<regions.size();regionNr++){
155  for(size_t effNr=0;effNr<eleEffTags_.size();effNr++){
156  std::string trigNameLeg1 = eleHLTFilterNames2Leg_[filterNr].substr(0,eleHLTFilterNames2Leg_[filterNr].find("::"));
157  std::string trigNameLeg2 = eleHLTFilterNames2Leg_[filterNr].substr(eleHLTFilterNames2Leg_[filterNr].find("::")+2);
158  dbe_->setCurrentFolder(dirName_+"/Client_Histos/"+trigNameLeg2);
159  createTrigTagProbeEffHists2Leg(trigNameLeg1,trigNameLeg2,regions[regionNr],eleTrigTPEffVsVars_,"gsfEle");
160  }
161  }
162  }
163  //------Morse
164  // dbe_->setCurrentFolder(dirName_);
165  //--------------
166 
167  for(size_t filterNr=0;filterNr<phoHLTFilterNames_.size();filterNr++){
168  for(size_t regionNr=0;regionNr<regions.size();regionNr++){
169  for(size_t effNr=0;effNr<phoEffTags_.size();effNr++){
170  //----Morse----
171  dbe_->setCurrentFolder(dirName_+"/Client_Histos/"+phoHLTFilterNames_[filterNr]);
172  //createN1EffHists(eleHLTFilterNames_[filterNr]+"_pho_"+phoEffTags_[effNr],regions[regionNr],phoN1EffVars_);
173  //createSingleEffHists(eleHLTFilterNames_[filterNr]+"_gsfEle_"+phoEffTags_[effNr],regions[regionNr],phoSingleEffVars_);
174  createN1EffHists(phoHLTFilterNames_[filterNr],phoHLTFilterNames_[filterNr]+"_pho_"+phoEffTags_[effNr],regions[regionNr],phoN1EffVars_);
175  createSingleEffHists(phoHLTFilterNames_[filterNr],phoHLTFilterNames_[filterNr]+"_pho_"+phoEffTags_[effNr],regions[regionNr],phoSingleEffVars_);
177  createHLTvsOfflineHists(phoHLTFilterNames_[filterNr],phoHLTFilterNames_[filterNr]+"_pho_passFilter",regions[regionNr],phoHLTvOfflineVars_);
178 
179  //--------------
180  }
181  }
182  }
183  //------Morse
184  // dbe_->setCurrentFolder(dirName_);
185  //--------------
186  for(size_t regionNr=0;regionNr<regions.size();regionNr++){
191  }
192  //----Morse-----
194  //----------
195 }
std::vector< std::string > eleHLTFilterNames_
void createSingleEffHists(const std::string &filterName, const std::string &baseName, const std::string &region, const std::vector< std::string > &varNames)
std::vector< std::string > phoLooseTightTrigEffVsVars_
void createN1EffHists(const std::string &filterName, const std::string &baseName, const std::string &region, const std::vector< std::string > &varNames)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
std::vector< std::string > phoTrigTPEffVsVars_
std::vector< std::string > eleTightLooseTrigNames_
std::vector< std::string > phoN1EffVars_
std::vector< std::string > eleHLTvOfflineVars_
void createTrigTagProbeEffHistsNewAlgo(const std::string &filterName, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName)
std::vector< std::string > eleTrigTPEffVsVars_
std::vector< std::string > phoEffTags_
std::vector< std::string > phoSingleEffVars_
void createHLTvsOfflineHists(const std::string &filterName, const std::string &baseName, const std::string &region, const std::vector< std::string > &varNames)
std::vector< std::string > eleN1EffVars_
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > phoHLTvOfflineVars_
void createTrigTagProbeEffHists2Leg(const std::string &filterNameLeg1, const std::string &filterNameLeg2, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName)
std::vector< std::string > phoHLTFilterNames_
std::vector< std::string > eleLooseTightTrigEffVsVars_
std::vector< std::string > eleEffTags_
void createLooseTightTrigEff(const std::vector< std::string > &tightLooseTrigNames, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
std::vector< std::string > eleHLTFilterNames2Leg_
std::vector< std::string > eleSingleEffVars_

Member Data Documentation

DQMStore* EgHLTOfflineClient::dbe_
private
std::string EgHLTOfflineClient::dirName_
private
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().