25 topFolder << MEFolderName+
"Alignment/Muon";
27 if (!(doDT || doCSC) ) {
28 edm::LogError(
"MuonAlignmentSummary") <<
" Error!! At least one Muon subsystem (DT or CSC) must be monitorized!!" << std::endl;
29 edm::LogError(
"MuonAlignmentSummary") <<
" Please enable doDT or doCSC to True in your python cfg file!!!" << std::endl;
41 metname =
"MuonAlignmentSummary";
49 "Local DT position (cm) absolute MEAN residuals;Sector;;cm", 14, 1, 15, 40, 0, 40);
52 "Local DT angle (rad) absolute MEAN residuals;Sector;;rad", 14, 1, 15, 40, 0, 40);
55 "Local DT position (cm) RMS residuals;Sector;;cm", 14, 1, 15, 40, 0, 40);
58 "Local DT angle (rad) RMS residuals;Sector;;rad", 14, 1, 15, 40, 0, 40);
61 "Distribution of absolute MEAN Local X (cm) residuals for DT;<X> (cm);number of chambers", 100, 0,
meanPositionRange);
64 "Distribution of RMS Local X (cm) residuals for DT;X RMS (cm);number of chambers", 100, 0,
rmsPositionRange);
67 "Distribution of absolute MEAN Local Y (cm) residuals for DT;<Y> (cm);number of chambers", 100, 0,
meanPositionRange);
70 "Distribution of RMS Local Y (cm) residuals for DT;Y RMS (cm);number of chambers", 100, 0,
rmsPositionRange);
73 "Distribution of absolute MEAN #phi (rad) residuals for DT;<#phi>(rad);number of chambers", 100, 0,
meanAngleRange);
76 "Distribution of RMS #phi (rad) residuals for DT;#phi RMS (rad);number of chambers", 100, 0,
rmsAngleRange);
79 "Distribution of absolute MEAN #theta (rad) residuals for DT;<#theta>(rad);number of chambers", 100, 0,
meanAngleRange);
82 "Distribution of RMS #theta (rad) residuals for DT;#theta RMS (rad);number of chambers", 100, 0,
rmsAngleRange);
103 "Local CSC position (cm) absolute MEAN residuals;Sector;;cm", 36, 1, 37, 40, 0, 40);
106 "Local CSC angle (rad) absolute MEAN residuals;Sector;;rad", 36, 1, 37, 40, 0, 40);
109 "Local CSC position (cm) RMS residuals;Sector;;cm", 36, 1, 37, 40, 0, 40);
112 "Local CSC angle (rad) RMS residuals;Sector;;rad", 36, 1, 37, 40, 0, 40);
115 "Distribution of absolute MEAN Local X (cm) residuals for CSC;<X> (cm);number of chambers", 100, 0,
meanPositionRange);
118 "Distribution of RMS Local X (cm) residuals for CSC;X RMS (cm);number of chambers", 100, 0,
rmsPositionRange);
121 "Distribution of absolute MEAN Local Y (cm) residuals for CSC;<Y> (cm);number of chambers", 100, 0,
meanPositionRange);
124 "Distribution of RMS Local Y (cm) residuals for CSC;Y RMS (cm);number of chambers", 100, 0,
rmsPositionRange);
127 "Distribution of absolute MEAN #phi (rad) residuals for CSC;<#phi>(rad);number of chambers", 100, 0,
meanAngleRange);
130 "Distribution of RMS #phi (rad) residuals for CSC;#phi RMS (rad);number of chambers", 100, 0,
rmsAngleRange);
133 "Distribution of absolute MEAN #theta (rad) residuals for CSC;<#theta>(rad);number of chambers", 100, 0,
meanAngleRange);
136 "Distribution of RMS #theta (rad) residuals for CSC;#theta RMS (rad);number of chambers", 100, 0,
rmsAngleRange);
163 for (
int sector = 1; sector < 15; sector++) {
165 if (!((sector == 13 || sector == 14) &&
station != 4)) {
167 std::stringstream Wheel; Wheel<<
wheel;
168 std::stringstream Station; Station<<
station;
169 std::stringstream Sector; Sector<<sector;
171 std::string nameOfHistoLocalX=
"ResidualLocalX_W"+Wheel.str()+
"MB"+Station.str()+
"S"+Sector.str();
172 std::string nameOfHistoLocalPhi=
"ResidualLocalPhi_W"+Wheel.str()+
"MB"+Station.str()+
"S"+Sector.str();
173 std::string nameOfHistoLocalTheta=
"ResidualLocalTheta_W"+Wheel.str()+
"MB"+Station.str()+
"S"+Sector.str();
174 std::string nameOfHistoLocalY=
"ResidualLocalY_W"+Wheel.str()+
"MB"+Station.str()+
"S"+Sector.str();
177 "/DT/Wheel"+Wheel.str()+
178 "/Station"+Station.str()+
179 "/Sector"+Sector.str()+
"/";
183 Int_t nstation=station - 1;
184 Int_t nwheel=wheel+2;
191 Int_t ybin = 1 + nwheel * 8 + nstation * 2;
193 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_X", wheel, station);
203 histo = path+nameOfHistoLocalPhi;
210 Int_t ybin = 1 + nwheel * 8 + nstation * 2;
212 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_#phi", wheel, station);
224 histo=path+nameOfHistoLocalY;
231 Int_t ybin = 2 + nwheel * 8 + nstation * 2;
233 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_Y", wheel, station);
241 histo = path+nameOfHistoLocalTheta;
247 Int_t ybin = 2 + nwheel * 8 + nstation * 2;
249 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_#theta", wheel, station);
273 std::stringstream Ring; Ring<<
ring;
274 std::stringstream Station; Station<<
station;
275 std::stringstream Chamber; Chamber<<
chamber;
277 std::string nameOfHistoLocalX=
"ResidualLocalX_ME"+Station.str()+
"R"+Ring.str()+
"C"+Chamber.str();
278 std::string nameOfHistoLocalPhi=
"ResidualLocalPhi_ME"+Station.str()+
"R"+Ring.str()+
"C"+Chamber.str();
279 std::string nameOfHistoLocalTheta=
"ResidualLocalTheta_ME"+Station.str()+
"R"+Ring.str()+
"C"+Chamber.str();
280 std::string nameOfHistoLocalY=
"ResidualLocalY_ME"+Station.str()+
"R"+Ring.str()+
"C"+Chamber.str();
283 "/CSC/Station"+Station.str()+
285 "/Chamber"+Chamber.str()+
"/";
287 Int_t ybin =
abs(station) * 2 +
ring;
288 if (
abs(station) == 1) ybin =
ring;
289 if (station > 0) ybin = ybin + 10;
290 else ybin = 11 - ybin;
298 Int_t ybin2= 2 * ybin - 1;
300 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_X", station, ring);
308 histo = path + nameOfHistoLocalPhi;
316 Int_t ybin2 = 2 * ybin - 1;
318 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_#phi", station, ring);
326 histo = path + nameOfHistoLocalTheta;
333 Int_t ybin2 = 2 * ybin;
335 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_#theta", station, ring);
344 histo = path + nameOfHistoLocalY;
352 Int_t ybin2 = 2 * ybin;
354 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 * get(const std::string &path)
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.
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 * hLocalXRmsCSC
MonitorElement * hLocalThetaMeanCSC
MonitorElement * hLocalPhiRmsDT
MonitorElement * hLocalYMeanCSC
MonitorElement * hLocalThetaMeanDT
double getEntries() const
get # of entries
void setCurrentFolder(const std::string &fullpath)
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