CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ME0BaseValidation.cc
Go to the documentation of this file.
3 
4 using namespace std;
6 {
7  nBinZR_ = ps.getUntrackedParameter<std::vector<double>>("nBinGlobalZR") ;
8  RangeZR_ = ps.getUntrackedParameter< std::vector<double> >("RangeGlobalZR");
9  nBinXY_ = ps.getUntrackedParameter<int>("nBinGlobalXY",160) ;
10 
11  regionLabel.push_back("-1");
12  regionLabel.push_back("1" );
13 
14  layerLabel.push_back("1");
15  layerLabel.push_back("2");
16  layerLabel.push_back("3");
17  layerLabel.push_back("4");
18  layerLabel.push_back("5");
19  layerLabel.push_back("6");
20 
21 }
22 
23 
25 }
26 
27 MonitorElement* ME0BaseValidation::BookHistZR( DQMStore::IBooker& ibooker, const char* name, const char* label, unsigned int region_num, unsigned int layer_num) {
28  string hist_name, hist_label;
29  if ( layer_num == 0 || layer_num==1 || layer_num==2 || layer_num==3 || layer_num==4 || layer_num==5 || layer_num==6 ) {
30  hist_name = name+string("_zr_r") + regionLabel[region_num]+"_l"+layerLabel[layer_num];
31  hist_label = label+string(" occupancy : region")+regionLabel[region_num]+" layer "+layerLabel[layer_num]+" "+" ; globalZ [cm]; globalR[cm]";
32  }
33  else {
34  hist_name = name+string("_zr_r") + regionLabel[region_num];
35  hist_label = label+string(" occupancy : region")+regionLabel[region_num]+" ; globalZ [cm]; globalR[cm]";
36  }
37  int xbin = (int)nBinZR_[0];
38  int ybin = (int)nBinZR_[1];
39  double xmin = 0;
40  double xmax = 0;
41  double ymin = 0;
42  double ymax = 0;
43  ymin = RangeZR_[ RangeZR_.size()/2 + 0];;
44  ymax = RangeZR_[ RangeZR_.size()/2 + 1];;
45  if ( region_num ==0 ) {
46  xmin = -RangeZR_[1];
47  xmax = -RangeZR_[0];
48  }
49  else {
50  xmin = RangeZR_[0];
51  xmax = RangeZR_[1];
52  }
53  return ibooker.book2D( hist_name, hist_label, xbin, xmin, xmax, ybin,ymin, ymax);
54 }
55 
56 MonitorElement* ME0BaseValidation::BookHistXY( 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 || layer_num==6 ) {
59  hist_name = name+string("_xy_r") + regionLabel[region_num]+"_l"+layerLabel[layer_num];
60  hist_label = label+string(" occupancy : region")+regionLabel[region_num]+" layer "+layerLabel[layer_num]+" "+" ; globalX [cm]; globalY[cm]";
61  }
62  else {
63  hist_name = name+string("_xy_r") + regionLabel[region_num];
64  hist_label = label+string(" occupancy : region")+regionLabel[region_num]+" ; globalX [cm]; globalY[cm]";
65  }
66  return ibooker.book2D( hist_name, hist_label, nBinXY_, -160,160,nBinXY_,-160,160);
67 }
68 
MonitorElement * BookHistZR(DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int layer_num=99)
T getUntrackedParameter(std::string const &, T const &) const
ME0BaseValidation(const edm::ParameterSet &ps)
MonitorElement * BookHistXY(DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int layer_num=99)
virtual ~ME0BaseValidation()
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133