CMS 3D CMS Logo

ME0BaseValidation.cc
Go to the documentation of this file.
3 
4 using namespace std;
6  nBinZR_ = ps.getUntrackedParameter<std::vector<double>>("nBinGlobalZR");
7  RangeZR_ = ps.getUntrackedParameter<std::vector<double>>("RangeGlobalZR");
8  nBinXY_ = ps.getUntrackedParameter<int>("nBinGlobalXY", 160);
9 
10  regionLabel.push_back("-1");
11  regionLabel.push_back("1");
12 
13  layerLabel.push_back("1");
14  layerLabel.push_back("2");
15  layerLabel.push_back("3");
16  layerLabel.push_back("4");
17  layerLabel.push_back("5");
18  layerLabel.push_back("6");
19 }
20 
22 
24  DQMStore::IBooker &ibooker, const char *name, const char *label, unsigned int region_num, unsigned int layer_num) {
25  string hist_name, hist_label;
26  if (layer_num == 0 || layer_num == 1 || layer_num == 2 || layer_num == 3 || layer_num == 4 || layer_num == 5 ||
27  layer_num == 6) {
28  hist_name = name + string("_zr_r") + regionLabel[region_num] + "_l" + layerLabel[layer_num];
29  hist_label = label + string(" occupancy : region") + regionLabel[region_num] + " layer " + layerLabel[layer_num] +
30  " " + " ; globalZ [cm]; globalR[cm]";
31  } else {
32  hist_name = name + string("_zr_r") + regionLabel[region_num];
33  hist_label = label + string(" occupancy : region") + regionLabel[region_num] + " ; globalZ [cm]; globalR[cm]";
34  }
35  int xbin = (int)nBinZR_[0];
36  int ybin = (int)nBinZR_[1];
37  double xmin = 0;
38  double xmax = 0;
39  double ymin = 0;
40  double ymax = 0;
41  ymin = RangeZR_[RangeZR_.size() / 2 + 0];
42  ;
43  ymax = RangeZR_[RangeZR_.size() / 2 + 1];
44  ;
45  if (region_num == 0) {
46  xmin = -RangeZR_[1];
47  xmax = -RangeZR_[0];
48  } else {
49  xmin = RangeZR_[0];
50  xmax = RangeZR_[1];
51  }
52  return ibooker.book2D(hist_name, hist_label, xbin, xmin, xmax, ybin, ymin, ymax);
53 }
54 
56  DQMStore::IBooker &ibooker, const char *name, const char *label, unsigned int region_num, unsigned int layer_num) {
57  string hist_name, hist_label;
58  if (layer_num == 0 || layer_num == 1 || layer_num == 2 || layer_num == 3 || layer_num == 4 || layer_num == 5 ||
59  layer_num == 6) {
60  hist_name = name + string("_xy_r") + regionLabel[region_num] + "_l" + layerLabel[layer_num];
61  hist_label = label + string(" occupancy : region") + regionLabel[region_num] + " layer " + layerLabel[layer_num] +
62  " " + " ; globalX [cm]; globalY[cm]";
63  } else {
64  hist_name = name + string("_xy_r") + regionLabel[region_num];
65  hist_label = label + string(" occupancy : region") + regionLabel[region_num] + " ; globalX [cm]; globalY[cm]";
66  }
67  return ibooker.book2D(hist_name, hist_label, nBinXY_, -160, 160, nBinXY_, -160, 160);
68 }
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
Handle.h
ME0BaseValidation.h
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
ME0BaseValidation::ME0BaseValidation
ME0BaseValidation(const edm::ParameterSet &ps)
Definition: ME0BaseValidation.cc:5
ME0BaseValidation::~ME0BaseValidation
~ME0BaseValidation() override
Definition: ME0BaseValidation.cc:21
L1TOccupancyClient_cfi.ymax
ymax
Definition: L1TOccupancyClient_cfi.py:43
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ME0BaseValidation::BookHistXY
MonitorElement * BookHistXY(DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int layer_num=99)
Definition: ME0BaseValidation.cc:55
edm::ParameterSet
Definition: ParameterSet.h:36
ME0BaseValidation::BookHistZR
MonitorElement * BookHistZR(DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int layer_num=99)
Definition: ME0BaseValidation.cc:23
createfilelist.int
int
Definition: createfilelist.py:10
std
Definition: JetResolutionObject.h:76
L1TOccupancyClient_cfi.ymin
ymin
Definition: L1TOccupancyClient_cfi.py:43
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition: TrackerOfflineValidation_Dqm_cff.py:11
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
dqm::implementation::IBooker
Definition: DQMStore.h:43
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10
label
const char * label
Definition: PFTauDecayModeTools.cc:11