CMS 3D CMS Logo

MuIsoValidation.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 // MuIsoValidation.h
3 // Package: Muon Isolation Validation
4 // Class: MuIsoValidation
5 //
6 /*
7 
8  Description: Muon Isolation Validation 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 MuIsoValidation::CONST_INT = 5;
16  FooType MuIsoValidation::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 //Member types
33 
34 //Other include files
39 
41 
42 //----------------------------------------
43 
44 //Forward declarations
45 class TH1;
46 class TH1I;
47 class TH1D;
48 class TH2;
49 class TProfile;
50 
51 //------------------------------------------
52 // Class Declaration: MuIsoValidation
53 //--------------------------------------
54 
56  //---------namespace and typedefs--------------
61 
62 public:
63  //---------methods----------------------------
64  explicit MuIsoValidation(const edm::ParameterSet&);
65  ~MuIsoValidation() override;
66 
67 private:
68  //---------methods----------------------------
69  void analyze(const edm::Event&, const edm::EventSetup&) override;
70  void InitStatics();
71  void RecordData(MuonIterator muon); //Fills Histograms with info from single muon
72  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
73 
74  void MakeLogBinsForProfile(Double_t* bin_edges, const double min, const double max);
75  void FillHistos(); //Fills histograms with data
76 
77  //----------Static Variables---------------
78 
79  //Collection labels
86 
87  //root file name
89  // Directories within the rootfile
92 
94 
95  //Histogram parameters
96  static const int NUM_VARS = 21;
97  double L_BIN_WIDTH; //large bins
98  double S_BIN_WIDTH; //small bins
99  int LOG_BINNING_ENABLED; //pseudo log binning for profile plots
103 
107 
108  std::vector<std::string> main_titles; //[NUM_VARS]
109  std::vector<std::string> axis_titles; //[NUM_VARS]
110  std::vector<std::string> names; //[NUM_VARS]
111  std::vector<std::vector<double> > param; //[NUM_VARS][3]
112  std::vector<int> isContinuous; //[NUM_VARS]
113  std::vector<int> cdCompNeeded; //[NUM_VARS]
114 
115  //---------------Dynamic Variables---------------------
116 
117  //MonitorElement
118 
120  //The Data
121  int theMuonData; //[number of muons]
122  double theData[NUM_VARS];
123 
124  //Histograms
126  std::vector<MonitorElement*> h_1D; //[NUM_VARS]
127  std::vector<MonitorElement*> cd_plots; //[NUM_VARS]
128  // std::vector< std::vector<MonitorElement*> > h_2D;//[NUM_VARS][NUM_VARS]
129  std::vector<std::vector<MonitorElement*> > p_2D; //[NUM_VARS][NUM_VARS]
130 
131  //Counters
132  int nEvents;
134  // int nCombinedMuons;
135 
136  //enums for monitorElement
137  enum { NOAXIS, XAXIS, YAXIS, ZAXIS };
138 };
void RecordData(MuonIterator muon)
edm::InputTag ecalIsoDeposit_Tag
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< int > isContinuous
std::vector< std::string > names
std::string title_cd
edm::View< reco::Muon >::const_iterator MuonIterator
std::vector< std::string > main_titles
double theData[NUM_VARS]
edm::InputTag hcalIsoDeposit_Tag
edm::InputTag tkIsoDeposit_Tag
MuIsoValidation(const edm::ParameterSet &)
const reco::IsoDeposit MuIsoDepRef
std::vector< std::vector< MonitorElement * > > p_2D
std::vector< MonitorElement * > h_1D
edm::EDGetTokenT< edm::View< reco::Muon > > Muon_Token
edm::InputTag hoIsoDeposit_Tag
MonitorElement * h_nMuons
edm::ParameterSet iConfig
std::string title_sam
edm::RefToBase< reco::Muon > MuonBaseRef
std::vector< MonitorElement * > cd_plots
std::string dirName
std::string title_cone
std::string rootfilename
static const int NUM_VARS
~MuIsoValidation() override
std::vector< std::vector< double > > param
edm::Handle< reco::IsoDepositMap > MuIsoDepHandle
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:88
void MakeLogBinsForProfile(Double_t *bin_edges, const double min, const double max)
std::vector< std::string > axis_titles
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::InputTag Muon_Tag
Definition: Run.h:45
std::string subsystemname_
std::vector< int > cdCompNeeded
std::string subDirName