27 topFolder << MEFolderName+
"Alignment/Muon";
29 if(!(doDT || doCSC) ) {
30 edm::LogError(
"MuonAlignmentSummary") <<
" Error!! At least one Muon subsystem (DT or CSC) must be monitorized!!" << std::endl;
31 edm::LogError(
"MuonAlignmentSummary") <<
" Please enable doDT or doCSC to True in your python cfg file!!!" << std::endl;
46 metname =
"MuonAlignmentSummary";
53 hLocalPositionDT=
dbe->
book2D(
"hLocalPositionDT",
"Local DT position (cm) absolute MEAN residuals;Sector;;cm", 14,1, 15,40,0,40);
54 hLocalAngleDT=
dbe->
book2D(
"hLocalAngleDT",
"Local DT angle (rad) absolute MEAN residuals;Sector;;rad", 14,1, 15,40,0,40);
86 hLocalPositionCSC=
dbe->
book2D(
"hLocalPositionCSC",
"Local CSC position (cm) absolute MEAN residuals;Sector;;cm",36,1,37,40,0,40);
87 hLocalAngleCSC=
dbe->
book2D(
"hLocalAngleCSC",
"Local CSC angle (rad) absolute MEAN residuals;Sector;;rad", 36,1,37,40,0,40);
130 for(
int wheel=-2;wheel<3;wheel++){
132 for (
int sector=1;sector<15;sector++){
134 if(!((sector==13 || sector ==14) &&
station!=4)){
136 std::stringstream Wheel; Wheel<<wheel;
137 std::stringstream Station; Station<<
station;
138 std::stringstream Sector; Sector<<sector;
140 std::string nameOfHistoLocalX=
"ResidualLocalX_W"+Wheel.str()+
"MB"+Station.str()+
"S"+Sector.str();
141 std::string nameOfHistoLocalPhi=
"ResidualLocalPhi_W"+Wheel.str()+
"MB"+Station.str()+
"S"+Sector.str();
142 std::string nameOfHistoLocalTheta=
"ResidualLocalTheta_W"+Wheel.str()+
"MB"+Station.str()+
"S"+Sector.str();
143 std::string nameOfHistoLocalY=
"ResidualLocalY_W"+Wheel.str()+
"MB"+Station.str()+
"S"+Sector.str();
146 "/DT/Wheel"+Wheel.str()+
147 "/Station"+Station.str()+
148 "/Sector"+Sector.str()+
"/";
152 Int_t nstation=station - 1;
153 Int_t nwheel=wheel+2;
160 Int_t ybin=1+nwheel*8+nstation*2;
162 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_X",wheel, station );
172 histo = path+nameOfHistoLocalPhi;
179 Int_t ybin=1+nwheel*8+nstation*2;
181 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_#phi", wheel,station );
193 histo=path+nameOfHistoLocalY;
200 Int_t ybin=2+nwheel*8+nstation*2;
202 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_Y", wheel,station );
210 histo = path+nameOfHistoLocalTheta;
216 Int_t ybin=2+nwheel*8+nstation*2;
218 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_#theta",wheel,station );
240 for(
int chamber=1;chamber<37;chamber++){
244 std::stringstream Ring; Ring<<
ring;
245 std::stringstream Station; Station<<
station;
246 std::stringstream Chamber; Chamber<<chamber;
248 std::string nameOfHistoLocalX=
"ResidualLocalX_ME"+Station.str()+
"R"+Ring.str()+
"C"+Chamber.str();
249 std::string nameOfHistoLocalPhi=
"ResidualLocalPhi_ME"+Station.str()+
"R"+Ring.str()+
"C"+Chamber.str();
250 std::string nameOfHistoLocalTheta=
"ResidualLocalTheta_ME"+Station.str()+
"R"+Ring.str()+
"C"+Chamber.str();
251 std::string nameOfHistoLocalY=
"ResidualLocalY_ME"+Station.str()+
"R"+Ring.str()+
"C"+Chamber.str();
254 "/CSC/Station"+Station.str()+
256 "/Chamber"+Chamber.str()+
"/";
258 Int_t ybin=
abs(station)*2+
ring;
260 if (station>0) ybin=ybin+10;
261 else ybin = 11 -ybin;
269 Int_t ybin2=2*ybin-1;
271 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_X", station,ring );
279 histo = path + nameOfHistoLocalPhi;
288 Int_t ybin2=2*ybin-1;
290 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_#phi", station,ring );
298 histo = path + nameOfHistoLocalTheta;
308 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_#theta", station,ring );
317 histo = path + nameOfHistoLocalY;
327 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_Y", station,ring );
void beginRun(edm::Run const &run, edm::EventSetup const &iSetup)
Inizialize parameters for histo binning.
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
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
double getEntries(void) const
get # of entries
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.
virtual ~MuonAlignmentSummary()
Destructor.
MonitorElement * hLocalPositionRmsCSC
edm::ParameterSet parameters
MonitorElement * hLocalThetaRmsDT
MonitorElement * hLocalAngleRmsCSC
MonitorElement * hLocalPhiMeanCSC
MonitorElement * hLocalYRmsCSC
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
MonitorElement * hLocalThetaRmsCSC
MonitorElement * hLocalXMeanCSC
MonitorElement * hLocalXRmsCSC
MonitorElement * hLocalThetaMeanCSC
MonitorElement * hLocalPhiRmsDT
MonitorElement * hLocalYMeanCSC
MonitorElement * hLocalThetaMeanDT
void endRun(edm::Run const &run, edm::EventSetup const &iSetup)
Save the histos.
MonitorElement * hLocalPhiMeanDT
MonitorElement * hLocalAngleCSC
MonitorElement * hLocalPhiRmsCSC
MonitorElement * hLocalPositionDT
MonitorElement * hLocalXRmsDT
std::stringstream topFolder
MonitorElement * hLocalYMeanDT
MonitorElement * hLocalXMeanDT
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
MonitorElement * hLocalPositionCSC
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * hLocalAngleDT
void setCurrentFolder(const std::string &fullpath)