CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/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   bool runClientEndLumiBlock_;
00065   bool runClientEndRun_;
00066   bool runClientEndJob_;
00067 
00068   bool filterInactiveTriggers_;
00069   bool isSetup_;
00070   std::string hltTag_;
00071   
00072 
00073   //disabling copying/assignment (in theory this is copyable but lets not just in case)
00074   EgHLTOfflineClient(const EgHLTOfflineClient& rhs){}
00075   EgHLTOfflineClient& operator=(const EgHLTOfflineClient& rhs){return *this;}
00076 
00077  public:
00078   explicit EgHLTOfflineClient(const edm::ParameterSet& );
00079   virtual ~EgHLTOfflineClient();
00080   
00081   
00082   virtual void beginJob();
00083   virtual void analyze(const edm::Event&, const edm::EventSetup&); //dummy
00084   virtual void endJob();
00085   virtual void beginRun(const edm::Run& run, const edm::EventSetup& c);
00086   virtual void endRun(const edm::Run& run, const edm::EventSetup& c);
00087   
00088   
00089   virtual void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg,const edm::EventSetup& context){}
00090   // DQM Client Diagnostic
00091   virtual void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg,const edm::EventSetup& c);
00092 
00093   //at somepoint these all may migrate to a helper class
00094   void createN1EffHists(const std::string& filterName,const std::string& baseName,const std::string& region,const std::vector<std::string>& varNames);
00095   void createSingleEffHists(const std::string& filterName,const std::string& baseName,const std::string& region,const std::vector<std::string>& varNames);
00096   void createLooseTightTrigEff(const std::vector<std::string>&  tightLooseTrigNames,const std::string& region,const std::vector<std::string>& vsVarNames,const std::string& objName);
00097   void createTrigTagProbeEffHists(const std::string& filterName,const std::string& region,const std::vector<std::string>& vsVarNames,const std::string& objName);
00098   void createTrigTagProbeEffHistsNewAlgo(const std::string& filterName,const std::string& region,const std::vector<std::string>& vsVarNames,const std::string& objName);
00099   void createTrigTagProbeEffHists2Leg(const std::string& filterNameLeg1,const std::string& filterNameLeg2,const std::string& region,const std::vector<std::string>& vsVarNames,const std::string& objName);
00100   
00101   MonitorElement* makeEffMonElemFromPassAndAll(const std::string& filterName,const std::string& name,const std::string& title,const MonitorElement* pass,const MonitorElement* all);
00102   MonitorElement* makeEffMonElemFromPassAndFail(const std::string& filterName,const std::string& name,const std::string& title,const MonitorElement* pass,const MonitorElement* fail);
00103   MonitorElement* makeEffMonElemFromPassAndFailAndTagTag(const std::string& filter,const std::string& name,const std::string& title,const MonitorElement* pass,const MonitorElement* fail, const MonitorElement* tagtag);
00104   MonitorElement* makeEffMonElem2Leg(const std::string& filter,const std::string& name,const std::string& title,const MonitorElement* Leg1Eff,const MonitorElement* Leg2NotLeg1Source, const MonitorElement* all);
00105 
00106 private:
00107   void runClient_(); //master function which runs the client
00108   
00109 };
00110  
00111 
00112 
00113 #endif