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 = nullptr
 
MonitorElementh_rate_vs_time_dgn_2rp = nullptr
 
MonitorElementh_rate_vs_time_dgn_4rp = nullptr
 
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 51 of file ElasticPlotDQMSource.cc.

Constructor & Destructor Documentation

◆ DiagonalPlots() [1/2]

ElasticPlotDQMSource::DiagonalPlots::DiagonalPlots ( )
inline

Definition at line 71 of file ElasticPlotDQMSource.cc.

71 {}

◆ DiagonalPlots() [2/2]

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

Definition at line 103 of file ElasticPlotDQMSource.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::legacy::MonitorElement::getTH2F(), mps_fire::i, dqmiolumiharvest::j, Skims_PA_cff::name, CTPPSDetId::nFull, year_2016_cff::rpIds, CTPPSDetId::rpName(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

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

Member Data Documentation

◆ h2_track_corr_vert

MonitorElement* ElasticPlotDQMSource::DiagonalPlots::h2_track_corr_vert = nullptr

Definition at line 56 of file ElasticPlotDQMSource.cc.

◆ h_rate_vs_time_dgn_2rp

MonitorElement* ElasticPlotDQMSource::DiagonalPlots::h_rate_vs_time_dgn_2rp = nullptr

Definition at line 69 of file ElasticPlotDQMSource.cc.

◆ h_rate_vs_time_dgn_4rp

MonitorElement* ElasticPlotDQMSource::DiagonalPlots::h_rate_vs_time_dgn_4rp = nullptr

Definition at line 68 of file ElasticPlotDQMSource.cc.

◆ rpIds

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

Definition at line 53 of file ElasticPlotDQMSource.cc.

◆ v_h2_y_vs_x_dgn_2rp

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

Definition at line 65 of file ElasticPlotDQMSource.cc.

◆ v_h2_y_vs_x_dgn_4rp

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

Definition at line 64 of file ElasticPlotDQMSource.cc.

◆ v_h_y

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

Definition at line 59 of file ElasticPlotDQMSource.cc.