21 topFolder << MEFolderName +
"Alignment/Muon";
23 if (!(doDT || doCSC)) {
24 edm::LogError(
"MuonAlignmentSummary") <<
" Error!! At least one Muon subsystem (DT or CSC) must be " 28 <<
" Please enable doDT or doCSC to True in your python cfg file!!!" << std::endl;
36 metname =
"MuonAlignmentSummary";
38 LogTrace(
metname) <<
"[MuonAlignmentSummary] Parameters initialization";
43 "hLocalPositionDT",
"Local DT position (cm) absolute MEAN residuals;Sector;;cm", 14, 1, 15, 40, 0, 40);
46 "hLocalAngleDT",
"Local DT angle (rad) absolute MEAN residuals;Sector;;rad", 14, 1, 15, 40, 0, 40);
49 ibooker.
book2D(
"hLocalPositionRmsDT",
"Local DT position (cm) RMS residuals;Sector;;cm", 14, 1, 15, 40, 0, 40);
52 ibooker.
book2D(
"hLocalAngleRmsDT",
"Local DT angle (rad) RMS residuals;Sector;;rad", 14, 1, 15, 40, 0, 40);
55 "Distribution of absolute MEAN Local X (cm) residuals " 56 "for DT;<X> (cm);number of chambers",
62 "Distribution of RMS Local X (cm) residuals " 63 "for DT;X RMS (cm);number of chambers",
69 "Distribution of absolute MEAN Local Y (cm) residuals " 70 "for DT;<Y> (cm);number of chambers",
76 "Distribution of RMS Local Y (cm) residuals " 77 "for DT;Y RMS (cm);number of chambers",
83 "Distribution of absolute MEAN #phi (rad) residuals for " 84 "DT;<#phi>(rad);number of chambers",
90 "Distribution of RMS #phi (rad) residuals " 91 "for DT;#phi RMS (rad);number of chambers",
97 "Distribution of absolute MEAN #theta (rad) residuals " 98 "for DT;<#theta>(rad);number of chambers",
104 "Distribution of RMS #theta (rad) residuals for " 105 "DT;#theta RMS (rad);number of chambers",
127 "hLocalPositionCSC",
"Local CSC position (cm) absolute MEAN residuals;Sector;;cm", 36, 1, 37, 40, 0, 40);
130 "hLocalAngleCSC",
"Local CSC angle (rad) absolute MEAN residuals;Sector;;rad", 36, 1, 37, 40, 0, 40);
133 "hLocalPositionRmsCSC",
"Local CSC position (cm) RMS residuals;Sector;;cm", 36, 1, 37, 40, 0, 40);
136 ibooker.
book2D(
"hLocalAngleRmsCSC",
"Local CSC angle (rad) RMS residuals;Sector;;rad", 36, 1, 37, 40, 0, 40);
139 "Distribution of absolute MEAN Local X (cm) residuals " 140 "for CSC;<X> (cm);number of chambers",
146 "Distribution of RMS Local X (cm) residuals " 147 "for CSC;X RMS (cm);number of chambers",
153 "Distribution of absolute MEAN Local Y (cm) residuals " 154 "for CSC;<Y> (cm);number of chambers",
160 "Distribution of RMS Local Y (cm) residuals " 161 "for CSC;Y RMS (cm);number of chambers",
167 "Distribution of absolute MEAN #phi (rad) residuals for " 168 "CSC;<#phi>(rad);number of chambers",
174 "Distribution of RMS #phi (rad) residuals for CSC;#phi " 175 "RMS (rad);number of chambers",
181 "Distribution of absolute MEAN #theta (rad) residuals " 182 "for CSC;<#theta>(rad);number of chambers",
188 "Distribution of RMS #theta (rad) residuals for " 189 "CSC;#theta RMS (rad);number of chambers",
216 for (
int sector = 1; sector < 15; sector++) {
217 if (!((sector == 13 || sector == 14) &&
station != 4)) {
218 std::stringstream Wheel;
220 std::stringstream Station;
222 std::stringstream Sector;
226 "ResidualLocalX_W" + Wheel.str() +
"MB" + Station.str() +
"S" + Sector.str();
228 "ResidualLocalPhi_W" + Wheel.str() +
"MB" + Station.str() +
"S" + Sector.str();
230 "ResidualLocalTheta_W" + Wheel.str() +
"MB" + Station.str() +
"S" + Sector.str();
232 "ResidualLocalY_W" + Wheel.str() +
"MB" + Station.str() +
"S" + Sector.str();
239 Int_t nstation = station - 1;
240 Int_t nwheel = wheel + 2;
246 Int_t ybin = 1 + nwheel * 8 + nstation * 2;
248 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_X", wheel, station);
259 histo = path + nameOfHistoLocalPhi;
265 Int_t ybin = 1 + nwheel * 8 + nstation * 2;
267 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_#phi", wheel, station);
279 histo = path + nameOfHistoLocalY;
285 Int_t ybin = 2 + nwheel * 8 + nstation * 2;
287 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_Y", wheel, station);
296 histo = path + nameOfHistoLocalTheta;
302 Int_t ybin = 2 + nwheel * 8 + nstation * 2;
304 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_#theta", wheel, station);
326 std::stringstream Ring;
328 std::stringstream Station;
330 std::stringstream Chamber;
334 "ResidualLocalX_ME" + Station.str() +
"R" + Ring.str() +
"C" + Chamber.str();
336 "ResidualLocalPhi_ME" + Station.str() +
"R" + Ring.str() +
"C" + Chamber.str();
338 "ResidualLocalTheta_ME" + Station.str() +
"R" + Ring.str() +
"C" + Chamber.str();
340 "ResidualLocalY_ME" + Station.str() +
"R" + Ring.str() +
"C" + Chamber.str();
345 Int_t ybin =
abs(station) * 2 +
ring;
346 if (
abs(station) == 1)
358 Int_t ybin2 = 2 * ybin - 1;
360 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_X", station, ring);
369 histo = path + nameOfHistoLocalPhi;
376 Int_t ybin2 = 2 * ybin - 1;
378 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_#phi", station, ring);
387 histo = path + nameOfHistoLocalTheta;
393 Int_t ybin2 = 2 * ybin;
395 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_#theta", station, ring);
404 histo = path + nameOfHistoLocalY;
411 Int_t ybin2 = 2 * ybin;
413 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_Y", station, ring);
edm::ErrorSummaryEntry Error
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * hLocalPositionRmsDT
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * hLocalAngleRmsDT
constexpr uint16_t localY(uint16_t py)
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
double getMeanError(int axis=1) const
MonitorElement * hLocalYRmsDT
MuonAlignmentSummary(const edm::ParameterSet &)
Constructor.
void setCurrentFolder(std::string const &fullpath)
MonitorElement * hLocalPositionRmsCSC
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
MonitorElement * hLocalThetaRmsDT
MonitorElement * hLocalAngleRmsCSC
MonitorElement * hLocalPhiMeanCSC
MonitorElement * hLocalYRmsCSC
void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * hLocalThetaRmsCSC
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
~MuonAlignmentSummary() override
Destructor.
MonitorElement * hLocalXMeanCSC
MonitorElement * get(std::string const &path)
MonitorElement * hLocalXRmsCSC
MonitorElement * hLocalThetaMeanCSC
MonitorElement * hLocalPhiRmsDT
MonitorElement * hLocalYMeanCSC
MonitorElement * hLocalThetaMeanDT
double getEntries() const
get # of entries
MonitorElement * book2D(Args &&...args)
constexpr uint16_t localX(uint16_t px)
MonitorElement * hLocalPhiMeanDT
MonitorElement * hLocalAngleCSC
MonitorElement * hLocalPhiRmsCSC
MonitorElement * hLocalPositionDT
MonitorElement * hLocalXRmsDT
std::stringstream topFolder
MonitorElement * hLocalYMeanDT
MonitorElement * hLocalXMeanDT
MonitorElement * hLocalPositionCSC
MonitorElement * hLocalAngleDT