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 //Base class
31 
32 //Member types
36 
37 //Other include files
42 
44 
45 //----------------------------------------
46 
47 //Forward declarations
48 class TH1;
49 class TH1I;
50 class TH1D;
51 class TH2;
52 class TProfile;
53 
54 //------------------------------------------
55 // Class Declaration: MuIsoValidation
56 //--------------------------------------
57 //class MuIsoValidation : public edm::EDAnalyzer {
58 
60  //---------namespace and typedefs--------------
65 
66 public:
67  //---------methods----------------------------
68  explicit MuIsoValidation(const edm::ParameterSet&);
69  ~MuIsoValidation() override;
70 
71 private:
72  //---------methods----------------------------
73  void analyze(const edm::Event&, const edm::EventSetup&) override;
74  void InitStatics();
75  void RecordData(MuonIterator muon); //Fills Histograms with info from single muon
76  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
77 
78  void MakeLogBinsForProfile(Double_t* bin_edges, const double min, const double max);
79  void FillHistos(); //Fills histograms with data
80 
81  //----------Static Variables---------------
82 
83  //Collection labels
90 
91  //root file name
93  // Directories within the rootfile
96 
98 
99  //Histogram parameters
100  static const int NUM_VARS = 21;
101  double L_BIN_WIDTH; //large bins
102  double S_BIN_WIDTH; //small bins
103  int LOG_BINNING_ENABLED; //pseudo log binning for profile plots
107 
111 
112  std::vector<std::string> main_titles; //[NUM_VARS]
113  std::vector<std::string> axis_titles; //[NUM_VARS]
114  std::vector<std::string> names; //[NUM_VARS]
115  std::vector<std::vector<double> > param; //[NUM_VARS][3]
116  std::vector<int> isContinuous; //[NUM_VARS]
117  std::vector<int> cdCompNeeded; //[NUM_VARS]
118 
119  //---------------Dynamic Variables---------------------
120 
121  //MonitorElement
122 
124  //The Data
125  int theMuonData; //[number of muons]
126  double theData[NUM_VARS];
127 
128  //Histograms
130  std::vector<MonitorElement*> h_1D; //[NUM_VARS]
131  std::vector<MonitorElement*> cd_plots; //[NUM_VARS]
132  // std::vector< std::vector<MonitorElement*> > h_2D;//[NUM_VARS][NUM_VARS]
133  std::vector<std::vector<MonitorElement*> > p_2D; //[NUM_VARS][NUM_VARS]
134 
135  //Counters
136  int nEvents;
138  // int nCombinedMuons;
139 
140  //enums for monitorElement
141  enum { NOAXIS, XAXIS, YAXIS, ZAXIS };
142 };
MuIsoValidation::axis_titles
std::vector< std::string > axis_titles
Definition: MuIsoValidation.h:113
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
MuIsoValidation::MuIsoDepHandle
edm::Handle< reco::IsoDepositMap > MuIsoDepHandle
Definition: MuIsoValidation.h:63
MuIsoValidation::theMuonData
int theMuonData
Definition: MuIsoValidation.h:125
MuIsoValidation::main_titles
std::vector< std::string > main_titles
Definition: MuIsoValidation.h:112
Muon.h
MuIsoValidation::title_cd
std::string title_cd
Definition: MuIsoValidation.h:110
MuIsoValidation::h_nMuons
MonitorElement * h_nMuons
Definition: MuIsoValidation.h:129
MuIsoValidation::iConfig
edm::ParameterSet iConfig
Definition: MuIsoValidation.h:123
MuIsoValidation::Muon_Tag
edm::InputTag Muon_Tag
Definition: MuIsoValidation.h:84
muon
Definition: MuonCocktails.h:17
MuIsoValidation::NUM_VARS
static const int NUM_VARS
Definition: MuIsoValidation.h:100
MuIsoValidation::cdCompNeeded
std::vector< int > cdCompNeeded
Definition: MuIsoValidation.h:117
MuIsoValidation::rootfilename
std::string rootfilename
Definition: MuIsoValidation.h:92
MuIsoValidation::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: MuIsoValidation.cc:315
edm::Run
Definition: Run.h:45
min
T min(T a, T b)
Definition: MathUtil.h:58
edm::EDGetTokenT
Definition: EDGetToken.h:33
MuIsoValidation::nIncMuons
int nIncMuons
Definition: MuIsoValidation.h:137
MuIsoValidation::title_cone
std::string title_cone
Definition: MuIsoValidation.h:109
MuIsoValidation
Definition: MuIsoValidation.h:59
MuIsoValidation::h_1D
std::vector< MonitorElement * > h_1D
Definition: MuIsoValidation.h:130
DQMStore.h
EDAnalyzer.h
edm::Handle
Definition: AssociativeIterator.h:50
MuIsoValidation::subDirName
std::string subDirName
Definition: MuIsoValidation.h:95
MuIsoValidation::cd_plots
std::vector< MonitorElement * > cd_plots
Definition: MuIsoValidation.h:131
MuIsoValidation::p_2D
std::vector< std::vector< MonitorElement * > > p_2D
Definition: MuIsoValidation.h:133
MuIsoValidation::FillHistos
void FillHistos()
Definition: MuIsoValidation.cc:470
MuIsoValidation::requireCombinedMuon
bool requireCombinedMuon
Definition: MuIsoValidation.h:106
MuIsoValidation::ZAXIS
Definition: MuIsoValidation.h:141
Service.h
MuonFwd.h
MuIsoValidation::MuIsoDepRef
const typedef reco::IsoDeposit MuIsoDepRef
Definition: MuIsoValidation.h:64
MuIsoValidation::Muon_Token
edm::EDGetTokenT< edm::View< reco::Muon > > Muon_Token
Definition: MuIsoValidation.h:85
MuIsoValidation::theData
double theData[NUM_VARS]
Definition: MuIsoValidation.h:126
MuIsoValidation::subsystemname_
std::string subsystemname_
Definition: MuIsoValidation.h:97
MuIsoValidation::InitStatics
void InitStatics()
Definition: MuIsoValidation.cc:101
DQMEDAnalyzer.h
IsoDeposit.h
MuIsoValidation::title_sam
std::string title_sam
Definition: MuIsoValidation.h:108
MuIsoValidation::YAXIS
Definition: MuIsoValidation.h:141
MuIsoValidation::RecordData
void RecordData(MuonIterator muon)
Definition: MuIsoValidation.cc:342
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
MuIsoValidation::hoIsoDeposit_Tag
edm::InputTag hoIsoDeposit_Tag
Definition: MuIsoValidation.h:89
MuIsoValidation::MuonBaseRef
edm::RefToBase< reco::Muon > MuonBaseRef
Definition: MuIsoValidation.h:62
edm::ParameterSet
Definition: ParameterSet.h:47
MuIsoValidation::~MuIsoValidation
~MuIsoValidation() override
Definition: MuIsoValidation.cc:94
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
MuIsoValidation::hcalIsoDeposit_Tag
edm::InputTag hcalIsoDeposit_Tag
Definition: MuIsoValidation.h:87
MuIsoValidation::L_BIN_WIDTH
double L_BIN_WIDTH
Definition: MuIsoValidation.h:101
edm::EventSetup
Definition: EventSetup.h:58
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
InputTag.h
MuIsoValidation::tkIsoDeposit_Tag
edm::InputTag tkIsoDeposit_Tag
Definition: MuIsoValidation.h:86
MuIsoValidation::NOAXIS
Definition: MuIsoValidation.h:141
MuIsoValidation::NUM_LOG_BINS
int NUM_LOG_BINS
Definition: MuIsoValidation.h:104
MuIsoValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: MuIsoValidation.cc:384
MuIsoValidation::dirName
std::string dirName
Definition: MuIsoValidation.h:94
MuIsoValidation::S_BIN_WIDTH
double S_BIN_WIDTH
Definition: MuIsoValidation.h:102
reco::IsoDeposit
Definition: IsoDeposit.h:49
edm::RefToBase
Definition: AssociativeIterator.h:54
MuIsoValidation::ecalIsoDeposit_Tag
edm::InputTag ecalIsoDeposit_Tag
Definition: MuIsoValidation.h:88
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
MuIsoValidation::LOG_BINNING_RATIO
double LOG_BINNING_RATIO
Definition: MuIsoValidation.h:105
MuIsoValidation::LOG_BINNING_ENABLED
int LOG_BINNING_ENABLED
Definition: MuIsoValidation.h:103
MuIsoValidation::MuonIterator
edm::View< reco::Muon >::const_iterator MuonIterator
Definition: MuIsoValidation.h:61
IsoDepositFwd.h
MuIsoValidation::nEvents
int nEvents
Definition: MuIsoValidation.h:136
MuIsoValidation::XAXIS
Definition: MuIsoValidation.h:141
MuIsoValidation::param
std::vector< std::vector< double > > param
Definition: MuIsoValidation.h:115
edm::Event
Definition: Event.h:73
MuIsoValidation::isContinuous
std::vector< int > isContinuous
Definition: MuIsoValidation.h:116
MuIsoValidation::MuIsoValidation
MuIsoValidation(const edm::ParameterSet &)
Definition: MuIsoValidation.cc:61
edm::InputTag
Definition: InputTag.h:15
MuIsoValidation::names
std::vector< std::string > names
Definition: MuIsoValidation.h:114
MuIsoValidation::MakeLogBinsForProfile
void MakeLogBinsForProfile(Double_t *bin_edges, const double min, const double max)
Definition: MuIsoValidation.cc:454