CMS 3D CMS Logo

MuonIsolationDQM.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 // MuonIsolationDQM.h
3 // Package: Muon Isolation DQM
4 // Class: MuonIsolationDQM
5 //
6 /*
7 
8 Description: Muon Isolation DQM class
9 
10 NOTE: The static member variable declarations *should* include the key word "static", but
11 I haven't found an elegant way to initalize the vectors. Static primatives (e.g. int,
12 float, ...) and simple static objects are easy to initialze. Outside of the class
13 decleration, you would write
14 
15 int MuonIsolationDQM::CONST_INT = 5;
16 FooType MuonIsolationDQM::CONST_FOOT = Foo(constructor_argument);
17 
18 but you can't do this if you want to, say, initalize a std::vector with a bunch of
19 different values. So, you can't make them static and you have to initialize them using
20 a member method. To keep it consistent, I've just initialized them all in the same
21 method, even the simple types.
22 */
23 
24 //
25 // Original Author: "C. Jess Riedel", UC Santa Barbara
26 // Created: Tue Jul 17 15:58:24 CDT 2007
27 //
28 
29 //Base class
31 
32 //Member types
36 
37 //Other include files
43 
46 
47 //----------------------------------------
48 
49 //Forward declarations
50 class TH1;
51 class TH1I;
52 class TH1D;
53 class TH2;
54 class TProfile;
55 
56 //------------------------------------------
57 // Class Declaration: MuonIsolationDQM
58 //--------------------------------------
60  //---------namespace and typedefs--------------
65 
66 public:
67  //---------methods----------------------------
68  explicit MuonIsolationDQM(const edm::ParameterSet&);
69  ~MuonIsolationDQM() override;
70 
71  void analyze(const edm::Event&, const edm::EventSetup&) override;
72  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
73 
74 private:
75  //---------methods----------------------------
76  void InitStatics();
77  void RecordData(const reco::Muon& muon); //Fills Histograms with info from single muo
78  // void doPFIsoPlots(MuonIterator muon); //Fills Histograms with PF info from single muo (only for GLB)
79  void InitHistos(); //adds title, bin information to member histograms
80  void FillHistos(int); //Fills histograms with data
81  void FillNVtxHistos(int);
82  void NormalizeHistos(); //Normalize to number of muons
83 
84  //----- helper methods
85  int GetNVtxBin(int);
87 
88  //----------Static Variables---------------
89 
90  //Collection labels
93 
94  //root file name
96  // Directories within the rootfile
98 
99  //Histogram parameters
100  static const int NUM_VARS = 48; // looking at R03 and R05. Total of 54 histos.
101  static const int NUM_VARS_2D = 10; // looking only at R03. Total of 8 TH2F.
102  static const int NUM_VARS_NVTX = 6;
103 
104  double L_BIN_WIDTH; //large bins
105  double S_BIN_WIDTH; //small bins
106  int LOG_BINNING_ENABLED; //pseudo log binning for profile plots
112 
115  // std::string title_cd;
116 
117  std::vector<std::string> main_titles; //[NUM_VARS]
118  std::vector<std::string> axis_titles; //[NUM_VARS]
119  std::vector<std::string> names; //[NUM_VARS]
120  std::vector<std::vector<double> > param; //[NUM_VARS][3]
121  std::vector<int> isContinuous; //[NUM_VARS]
122 
123  std::vector<std::string> titles_2D; //[NUM_VARS]
124  std::vector<std::string> names_2D; //[NUM_VARS]
125 
126  std::vector<std::string> main_titles_NVtxs;
127  std::vector<std::string> names_NVtxs;
128  std::vector<std::string> axis_titles_NVtxs;
129  //---------------Dynamic Variables---------------------
130 
131  //The Data
132  double theData[NUM_VARS];
135 
136  //Histograms
138  std::vector<MonitorElement*> h_1D; //[NUM_VARS]
139  std::vector<MonitorElement*> h_2D; //[NUM_VARS_2D]
140  std::vector<MonitorElement*> h_1D_NVTX; //[NUM_VARS_NVTX]
141 
142  // std::vector<MonitorElement*> cd_plots;//[NUM_VARS]
143 
144  //Counters
145  int nEvents;
149 
150  //enums for monitorElement
151  enum { NOAXIS, XAXIS, YAXIS, ZAXIS };
152 };
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
MuonIsolationDQM::S_BIN_WIDTH
double S_BIN_WIDTH
Definition: MuonIsolationDQM.h:105
MuonIsolationDQM::title_sam
std::string title_sam
Definition: MuonIsolationDQM.h:113
MuonIsolationDQM::~MuonIsolationDQM
~MuonIsolationDQM() override
Definition: MuonIsolationDQM.cc:87
Muon.h
MuonIsolationDQM::title_cone
std::string title_cone
Definition: MuonIsolationDQM.h:114
MuonIsolationDQM::rootfilename
std::string rootfilename
Definition: MuonIsolationDQM.h:95
MuonIsolationDQM::titles_2D
std::vector< std::string > titles_2D
Definition: MuonIsolationDQM.h:123
muon
Definition: MuonCocktails.h:17
MuonIsolationDQM::isContinuous
std::vector< int > isContinuous
Definition: MuonIsolationDQM.h:121
edm::Run
Definition: Run.h:45
MuonIsolationDQM::FillHistos
void FillHistos(int)
Definition: MuonIsolationDQM.cc:804
MuonIsolationDQM::GetNVtxBin
int GetNVtxBin(int)
MuonIsolationDQM::MuIsoDepHandle
edm::Handle< reco::IsoDepositMap > MuIsoDepHandle
Definition: MuonIsolationDQM.h:63
edm::EDGetTokenT< reco::VertexCollection >
MuonIsolationDQM::theDataNVtx
double theDataNVtx[NUM_VARS_NVTX]
Definition: MuonIsolationDQM.h:134
MuonIsolationDQM::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: MuonIsolationDQM.cc:758
MuonIsolationDQM::param
std::vector< std::vector< double > > param
Definition: MuonIsolationDQM.h:120
DQMStore.h
MuonIsolationDQM::axis_titles
std::vector< std::string > axis_titles
Definition: MuonIsolationDQM.h:118
MuonIsolationDQM::axis_titles_NVtxs
std::vector< std::string > axis_titles_NVtxs
Definition: MuonIsolationDQM.h:128
MuonIsolationDQM::YAXIS
Definition: MuonIsolationDQM.h:151
edm::Handle
Definition: AssociativeIterator.h:50
reco::Muon
Definition: Muon.h:27
MuonIsolationDQM::NUM_VARS
static const int NUM_VARS
Definition: MuonIsolationDQM.h:100
MuonIsolationDQM::requireGLBMuon
bool requireGLBMuon
Definition: MuonIsolationDQM.h:109
MuonIsolationDQM::MuonBaseRef
edm::RefToBase< reco::Muon > MuonBaseRef
Definition: MuonIsolationDQM.h:62
Track.h
MuonIsolationDQM::theData2D
double theData2D[NUM_VARS_2D]
Definition: MuonIsolationDQM.h:133
MuonIsolationDQM::InitHistos
void InitHistos()
Service.h
MuonFwd.h
MuonIsolationDQM::theMuonCollectionLabel_
edm::EDGetTokenT< edm::View< reco::Muon > > theMuonCollectionLabel_
Definition: MuonIsolationDQM.h:92
MuonIsolationDQM::theData
double theData[NUM_VARS]
Definition: MuonIsolationDQM.h:132
MuonIsolationDQM::nTRKMuons
int nTRKMuons
Definition: MuonIsolationDQM.h:148
MuonIsolationDQM::theVertexCollectionLabel_
edm::EDGetTokenT< reco::VertexCollection > theVertexCollectionLabel_
Definition: MuonIsolationDQM.h:91
MuonIsolationDQM::NormalizeHistos
void NormalizeHistos()
Definition: MuonIsolationDQM.cc:797
IsoDeposit.h
DQMEDAnalyzer.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MuonIsolationDQM::NUM_VARS_NVTX
static const int NUM_VARS_NVTX
Definition: MuonIsolationDQM.h:102
Vertex.h
MuonIsolationDQM::L_BIN_WIDTH
double L_BIN_WIDTH
Definition: MuonIsolationDQM.h:104
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
MuonIsolationDQM::main_titles_NVtxs
std::vector< std::string > main_titles_NVtxs
Definition: MuonIsolationDQM.h:126
MuonIsolationDQM::GetTH1FromMonitorElement
TH1 * GetTH1FromMonitorElement(MonitorElement *me)
Definition: MuonIsolationDQM.cc:844
MuonIsolationDQM::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: MuonIsolationDQM.cc:595
edm::ParameterSet
Definition: ParameterSet.h:47
MuonIsolationDQM
Definition: MuonIsolationDQM.h:59
MuonIsolationDQM::h_2D
std::vector< MonitorElement * > h_2D
Definition: MuonIsolationDQM.h:139
MuonIsolationDQM::nGLBMuons
int nGLBMuons
Definition: MuonIsolationDQM.h:147
MuonIsolationDQM::XAXIS
Definition: MuonIsolationDQM.h:151
MuonIsolationDQM::main_titles
std::vector< std::string > main_titles
Definition: MuonIsolationDQM.h:117
MuonIsolationDQM::dirName
std::string dirName
Definition: MuonIsolationDQM.h:97
edm::EventSetup
Definition: EventSetup.h:57
MuonIsolationDQM::h_nMuons
MonitorElement * h_nMuons
Definition: MuonIsolationDQM.h:137
MuonIsolationDQM::FillNVtxHistos
void FillNVtxHistos(int)
Definition: MuonIsolationDQM.cc:829
InputTag.h
MuonIsolationDQM::LOG_BINNING_RATIO
double LOG_BINNING_RATIO
Definition: MuonIsolationDQM.h:108
MuonIsolationDQM::nSTAMuons
int nSTAMuons
Definition: MuonIsolationDQM.h:146
MuonIsolationDQM::InitStatics
void InitStatics()
Definition: MuonIsolationDQM.cc:97
VertexFwd.h
MuonIsolationDQM::MuonIsolationDQM
MuonIsolationDQM(const edm::ParameterSet &)
Definition: MuonIsolationDQM.cc:55
MuonIsolationDQM::h_1D
std::vector< MonitorElement * > h_1D
Definition: MuonIsolationDQM.h:138
MuonIsolationDQM::names
std::vector< std::string > names
Definition: MuonIsolationDQM.h:119
MuonIsolationDQM::NOAXIS
Definition: MuonIsolationDQM.h:151
MuonIsolationDQM::requireSTAMuon
bool requireSTAMuon
Definition: MuonIsolationDQM.h:110
MuonIsolationDQM::MuonIterator
edm::View< reco::Muon >::const_iterator MuonIterator
Definition: MuonIsolationDQM.h:61
reco::IsoDeposit
Definition: IsoDeposit.h:49
edm::RefToBase
Definition: AssociativeIterator.h:54
dqm::implementation::IBooker
Definition: DQMStore.h:43
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
MuonIsolationDQM::h_1D_NVTX
std::vector< MonitorElement * > h_1D_NVTX
Definition: MuonIsolationDQM.h:140
IsoDepositFwd.h
MuonIsolationDQM::NUM_LOG_BINS
int NUM_LOG_BINS
Definition: MuonIsolationDQM.h:107
MuonIsolationDQM::names_2D
std::vector< std::string > names_2D
Definition: MuonIsolationDQM.h:124
MuonIsolationDQM::requireTRKMuon
bool requireTRKMuon
Definition: MuonIsolationDQM.h:111
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
MuonIsolationDQM::RecordData
void RecordData(const reco::Muon &muon)
Definition: MuonIsolationDQM.cc:659
edm::Event
Definition: Event.h:73
MuonIsolationDQM::LOG_BINNING_ENABLED
int LOG_BINNING_ENABLED
Definition: MuonIsolationDQM.h:106
MuonIsolationDQM::NUM_VARS_2D
static const int NUM_VARS_2D
Definition: MuonIsolationDQM.h:101
MuonIsolationDQM::ZAXIS
Definition: MuonIsolationDQM.h:151
MuonIsolationDQM::nEvents
int nEvents
Definition: MuonIsolationDQM.h:145
MuonIsolationDQM::MuIsoDepRef
const typedef reco::IsoDeposit MuIsoDepRef
Definition: MuonIsolationDQM.h:64
MuonIsolationDQM::names_NVtxs
std::vector< std::string > names_NVtxs
Definition: MuonIsolationDQM.h:127