CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 declerations *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
37 
38 //Other include files
43 
44 //----------------------------------------
45 
46 //Forward declarations
47 class TH1;
48 class TH1I;
49 class TH1D;
50 class TH2;
51 class TProfile;
52 
53 //------------------------------------------
54 // Class Declaration: MuonIsolationDQM
55 //--------------------------------------
57  //---------namespace and typedefs--------------
62 
63 public:
64  //---------methods----------------------------
65  explicit MuonIsolationDQM(const edm::ParameterSet&);
67 
68 
69 private:
70  //---------methods----------------------------
71  virtual void beginJob(void) ;
72  virtual void analyze(const edm::Event&, const edm::EventSetup&);
73  virtual void endJob() ;
74  void InitStatics();
75  void RecordData(MuonIterator muon);//Fills Histograms with info from single muon
76  void InitHistos();//adds title, bin information to member histograms
77  void FillHistos();//Fills histograms with data
78  void NormalizeHistos(); //Normalize to number of muons
80 
81  //----------Static Variables---------------
82 
83  //Collection labels
89 
90  //root file name
91  std::string rootfilename;
92  // Directories within the rootfile
93  std::string dirName;
94  // std::string subDirName;
95 
96  //Histogram parameters
97  static const int NUM_VARS = 24; // looking at R03 and R05. Total of 48 histos.
98  double L_BIN_WIDTH;//large bins
99  double S_BIN_WIDTH;//small bins
100  int LOG_BINNING_ENABLED;//pseudo log binning for profile plots
106 
107  std::string title_sam;
108  std::string title_cone;
109  // std::string title_cd;
110 
111  std::vector<std::string> main_titles;//[NUM_VARS]
112  std::vector<std::string> axis_titles;//[NUM_VARS]
113  std::vector<std::string> names;//[NUM_VARS]
114  std::vector< std::vector<double> > param;//[NUM_VARS][3]
115  std::vector<int> isContinuous;//[NUM_VARS]
116 
117  //---------------Dynamic Variables---------------------
118 
119  //MonitorElement
121 
122  //The Data
123  int theMuonData;//[number of muons]
124  double theData[NUM_VARS];
125 
126  //Histograms
128  std::vector<MonitorElement*> h_1D;//[NUM_VARS]
129  // std::vector<MonitorElement*> cd_plots;//[NUM_VARS]
130 
131  //Counters
132  int nEvents;
136 
137  //enums for monitorElement
139 };
140 
void RecordData(MuonIterator muon)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
std::string dirName
edm::InputTag hoIsoDeposit_Tag
const reco::IsoDeposit MuIsoDepRef
MonitorElement * h_nMuons
MuonIsolationDQM(const edm::ParameterSet &)
std::vector< MonitorElement * > h_1D
std::vector< std::string > main_titles
edm::InputTag tkIsoDeposit_Tag
edm::InputTag ecalIsoDeposit_Tag
edm::View< reco::Muon >::const_iterator MuonIterator
std::vector< std::string > names
edm::InputTag hcalIsoDeposit_Tag
std::vector< std::vector< double > > param
virtual void beginJob(void)
std::string title_sam
std::string title_cone
std::vector< int > isContinuous
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::string rootfilename
std::vector< std::string > axis_titles
edm::InputTag Muon_Tag
edm::Handle< reco::IsoDepositMap > MuIsoDepHandle
static const int NUM_VARS
edm::RefToBase< reco::Muon > MuonBaseRef
virtual void endJob()
double theData[NUM_VARS]
TH1 * GetTH1FromMonitorElement(MonitorElement *me)