CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/DQMOffline/Trigger/interface/EgHLTOfflineClient.h

Go to the documentation of this file.
00001 #ifndef DQMOFFLINE_TRIGGER_EGHLTOFFLINECLIENT
00002 #define DQMOFFLINE_TRIGGER_EGHLTOFFLINECLIENT
00003 
00004 // -*- C++ -*-
00005 //
00006 // Package:    EgammaHLTOfflineClient
00007 // Class:      EgammaHLTOffline
00008 // 
00009 /*
00010  Description: This is a DQM client meant to plot high-level HLT trigger 
00011  quantities as stored in the HLT results object TriggerResults for the Egamma triggers
00012 
00013  Notes:
00014   Currently I would like to plot simple histograms of three seperate types of variables
00015   1) global event quantities: eg nr of electrons
00016   2) di-object quanities: transverse mass, di-electron mass
00017   3) single object kinematic and id variables: eg et,eta,isolation
00018 
00019 */
00020 //
00021 // Original Author:  Sam Harper
00022 //         Created:  June 2008
00023 // 
00024 //
00025 //
00026 
00027 #include "FWCore/Framework/interface/Frameworkfwd.h"
00028 #include "FWCore/Framework/interface/EDAnalyzer.h"
00029 
00030 #include <vector>
00031 #include <string>
00032 
00033 class DQMStore;
00034 class MonitorElement;
00035 
00036 
00037 class EgHLTOfflineClient : public edm::EDAnalyzer {
00038 
00039  private:
00040   DQMStore* dbe_; //dbe seems to be the standard name for this, I dont know why. We of course dont own it
00041   std::string dirName_;
00042   
00043   std::vector<std::string> eleHLTFilterNames_;//names of the filters monitored using electrons to make plots for
00044   std::vector<std::string> eleHLTFilterNames2Leg_;
00045   std::vector<std::string> eleTightLooseTrigNames_;
00046   std::vector<std::string> phoHLTFilterNames_;//names of the filters monitored using photons to make plots for
00047   std::vector<std::string> phoHLTFilterNames2Leg_;
00048   std::vector<std::string> phoTightLooseTrigNames_;
00049   
00050 
00051   std::vector<std::string> eleN1EffVars_;
00052   std::vector<std::string> eleSingleEffVars_;
00053   std::vector<std::string> eleEffTags_;
00054 
00055   std::vector<std::string> phoN1EffVars_;
00056   std::vector<std::string> phoSingleEffVars_;
00057   std::vector<std::string> phoEffTags_;
00058 
00059   std::vector<std::string> eleTrigTPEffVsVars_;
00060   std::vector<std::string> phoTrigTPEffVsVars_;
00061   std::vector<std::string> eleLooseTightTrigEffVsVars_;
00062   std::vector<std::string> phoLooseTightTrigEffVsVars_;
00063                                 
00064   std::vector<std::string> eleHLTvOfflineVars_;  
00065   std::vector<std::string> phoHLTvOfflineVars_;
00066                 
00067   bool runClientEndLumiBlock_;
00068   bool runClientEndRun_;
00069   bool runClientEndJob_;
00070 
00071   bool filterInactiveTriggers_;
00072   bool isSetup_;
00073   std::string hltTag_;
00074   
00075 
00076   //disabling copying/assignment (in theory this is copyable but lets not just in case)
00077   EgHLTOfflineClient(const EgHLTOfflineClient& rhs){}
00078   EgHLTOfflineClient& operator=(const EgHLTOfflineClient& rhs){return *this;}
00079 
00080  public:
00081   explicit EgHLTOfflineClient(const edm::ParameterSet& );
00082   virtual ~EgHLTOfflineClient();
00083   
00084   
00085   virtual void beginJob();
00086   virtual void analyze(const edm::Event&, const edm::EventSetup&); //dummy
00087   virtual void endJob();
00088   virtual void beginRun(const edm::Run& run, const edm::EventSetup& c);
00089   virtual void endRun(const edm::Run& run, const edm::EventSetup& c);
00090   
00091   
00092   virtual void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg,const edm::EventSetup& context){}
00093   // DQM Client Diagnostic
00094   virtual void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg,const edm::EventSetup& c);
00095 
00096   //at somepoint these all may migrate to a helper class
00097   void createN1EffHists(const std::string& filterName,const std::string& baseName,const std::string& region,const std::vector<std::string>& varNames);
00098   void createSingleEffHists(const std::string& filterName,const std::string& baseName,const std::string& region,const std::vector<std::string>& varNames);
00099   void createLooseTightTrigEff(const std::vector<std::string>&  tightLooseTrigNames,const std::string& region,const std::vector<std::string>& vsVarNames,const std::string& objName);
00100   void createTrigTagProbeEffHists(const std::string& filterName,const std::string& region,const std::vector<std::string>& vsVarNames,const std::string& objName);
00101   void createTrigTagProbeEffHistsNewAlgo(const std::string& filterName,const std::string& region,const std::vector<std::string>& vsVarNames,const std::string& objName);
00102   void createTrigTagProbeEffHists2Leg(const std::string& filterNameLeg1,const std::string& filterNameLeg2,const std::string& region,const std::vector<std::string>& vsVarNames,const std::string& objName);
00103   void createHLTvsOfflineHists(const std::string& filterName,const std::string& baseName,const std::string& region,const std::vector<std::string>& varNames);
00104   MonitorElement* FillHLTvsOfflineHist(const std::string& filter,const std::string& name,const std::string& title,const MonitorElement* numer,const MonitorElement* denom);
00105 
00106   MonitorElement* makeEffMonElemFromPassAndAll(const std::string& filterName,const std::string& name,const std::string& title,const MonitorElement* pass,const MonitorElement* all);
00107   MonitorElement* makeEffMonElemFromPassAndFail(const std::string& filterName,const std::string& name,const std::string& title,const MonitorElement* pass,const MonitorElement* fail);
00108   MonitorElement* makeEffMonElemFromPassAndFailAndTagTag(const std::string& filter,const std::string& name,const std::string& title,const MonitorElement* pass,const MonitorElement* fail, const MonitorElement* tagtag);
00109   MonitorElement* makeEffMonElem2Leg(const std::string& filter,const std::string& name,const std::string& title,const MonitorElement* Leg1Eff,const MonitorElement* Leg2NotLeg1Source, const MonitorElement* all);
00110 
00111 private:
00112   void runClient_(); //master function which runs the client
00113   
00114 };
00115  
00116 
00117 
00118 #endif