CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
ElasticPlotDQMSource::DiagonalPlots Struct Reference

plots related to one (anti)diagonal More...

Public Member Functions

 DiagonalPlots ()
 
 DiagonalPlots (DQMStore::IBooker &ibooker, int _id)
 

Public Attributes

MonitorElementh2_track_corr_vert = 0
 
MonitorElementh_rate_vs_time_dgn_2rp = 0
 
MonitorElementh_rate_vs_time_dgn_4rp = 0
 
std::array< unsigned int, 4 > rpIds
 
std::array< MonitorElement *, 4 > v_h2_y_vs_x_dgn_2rp
 
std::array< MonitorElement *, 4 > v_h2_y_vs_x_dgn_4rp
 
std::array< std::array< MonitorElement *, 4 >, 4 > v_h_y
 

Detailed Description

plots related to one (anti)diagonal

Definition at line 53 of file ElasticPlotDQMSource.cc.

Constructor & Destructor Documentation

ElasticPlotDQMSource::DiagonalPlots::DiagonalPlots ( )
inline

Definition at line 74 of file ElasticPlotDQMSource.cc.

74 {}
ElasticPlotDQMSource::DiagonalPlots::DiagonalPlots ( DQMStore::IBooker ibooker,
int  _id 
)

Definition at line 107 of file ElasticPlotDQMSource.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), MonitorElement::getTH2F(), h2_track_corr_vert, h_rate_vs_time_dgn_2rp, h_rate_vs_time_dgn_4rp, mps_fire::i, ElasticPlotDQMSource::ls_max, ElasticPlotDQMSource::ls_min, dataset::name, CTPPSDetId::nFull, rpIds, CTPPSDetId::rpName(), DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, runGCPTkAlMap::title, v_h2_y_vs_x_dgn_2rp, v_h2_y_vs_x_dgn_4rp, and v_h_y.

108 {
109  // determine captions
110  bool top45 = id & 2;
111  bool top56 = id & 1;
112  bool diag = (top45 != top56);
113 
114  string name = string( (diag) ? "diagonal" : "antidiagonal" )
115  + " 45" + ( (top45) ? "top" : "bot")
116  + " - 56" + ( (top56) ? "top" : "bot" );
117 
118  const string &title = name;
119 
120  // dermine RP ids of this diagonal
121  rpIds[0] = TotemRPDetId(0, 2, (top45) ? 4 : 5);
122  rpIds[1] = TotemRPDetId(0, 0, (top45) ? 4 : 5);
123  rpIds[2] = TotemRPDetId(1, 0, (top56) ? 4 : 5);
124  rpIds[3] = TotemRPDetId(1, 2, (top56) ? 4 : 5);
125 
126  // book histograms
127  ibooker.setCurrentFolder("CTPPS/TrackingStrip/" + name);
128 
129  h2_track_corr_vert = ibooker.book2D("track correlation in verticals", title+";;", 4, -0.5, 3.5, 4, -0.5, 3.5);
130  TH2F *h2 = h2_track_corr_vert->getTH2F();
131  TAxis *xa = h2->GetXaxis(), *ya = h2->GetYaxis();
132  for (unsigned int i = 0; i < 4; i++)
133  {
134  string rpName;
136  rpName = rpName.substr(15); // removes obvious prefix for better readability
137 
138  xa->SetBinLabel(i+1, rpName.c_str());
139  ya->SetBinLabel(i+1, rpName.c_str());
140  }
141 
142  h_rate_vs_time_dgn_4rp = ibooker.book1D("rate - 4 RPs", title+";lumi section", ls_max-ls_min+1, -0.5+ls_min, +0.5+ls_max);
143  h_rate_vs_time_dgn_2rp = ibooker.book1D("rate - 2 RPs (220-fr)", title+";lumi section", ls_max-ls_min+1, -0.5+ls_min, +0.5+ls_max);
144 
145  for (unsigned int i = 0; i < 4; i++)
146  {
147  string rpName;
149  rpName = rpName.substr(15);
150 
151  ibooker.setCurrentFolder("CTPPS/TrackingStrip/" + name + "/xy hists");
152 
153  v_h2_y_vs_x_dgn_4rp[i] = ibooker.book2D("xy hist - " + rpName + " - 4 RPs cond", title+";x (mm);y (mm)", 100, -18., +18., 100, -18., +18.);
154  v_h2_y_vs_x_dgn_2rp[i] = ibooker.book2D("xy hist - " + rpName + " - 2 RPs cond", title+";x (mm);y (mm)", 100, -18., +18., 100, -18., +18.);
155 
156  ibooker.setCurrentFolder("CTPPS/TrackingStrip/" + name + "/y hists");
157 
158  for (unsigned int j = 0; j < 4; j++)
159  {
160  string rpCoincName;
161  TotemRPDetId(rpIds[j]).rpName(rpCoincName, TotemRPDetId::nFull);
162  rpCoincName = rpCoincName.substr(15);
163 
164  v_h_y[i][j] = ibooker.book1D("y hist - " + rpName + " - coinc " + rpCoincName, title+";y (mm)", 180, -18., +18.);
165  }
166  }
167 }
Detector ID class for TOTEM Si strip detectors.
Definition: TotemRPDetId.h:30
static unsigned int ls_max
std::array< unsigned int, 4 > rpIds
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
static unsigned int ls_min
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
std::array< std::array< MonitorElement *, 4 >, 4 > v_h_y
void rpName(std::string &name, NameFlag flag=nFull) const
Definition: CTPPSDetId.h:128
TH2F * getTH2F() const
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
std::array< MonitorElement *, 4 > v_h2_y_vs_x_dgn_4rp
std::array< MonitorElement *, 4 > v_h2_y_vs_x_dgn_2rp

Member Data Documentation

MonitorElement* ElasticPlotDQMSource::DiagonalPlots::h2_track_corr_vert = 0

Definition at line 59 of file ElasticPlotDQMSource.cc.

Referenced by DiagonalPlots().

MonitorElement* ElasticPlotDQMSource::DiagonalPlots::h_rate_vs_time_dgn_2rp = 0

Definition at line 72 of file ElasticPlotDQMSource.cc.

Referenced by DiagonalPlots().

MonitorElement* ElasticPlotDQMSource::DiagonalPlots::h_rate_vs_time_dgn_4rp = 0

Definition at line 71 of file ElasticPlotDQMSource.cc.

Referenced by DiagonalPlots().

std::array<unsigned int, 4> ElasticPlotDQMSource::DiagonalPlots::rpIds

Definition at line 56 of file ElasticPlotDQMSource.cc.

Referenced by DiagonalPlots().

std::array<MonitorElement *, 4> ElasticPlotDQMSource::DiagonalPlots::v_h2_y_vs_x_dgn_2rp

Definition at line 68 of file ElasticPlotDQMSource.cc.

Referenced by DiagonalPlots().

std::array<MonitorElement *, 4> ElasticPlotDQMSource::DiagonalPlots::v_h2_y_vs_x_dgn_4rp

Definition at line 67 of file ElasticPlotDQMSource.cc.

Referenced by DiagonalPlots().

std::array<std::array<MonitorElement *, 4>, 4> ElasticPlotDQMSource::DiagonalPlots::v_h_y

Definition at line 62 of file ElasticPlotDQMSource.cc.

Referenced by DiagonalPlots().