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;
44 metname =
"MuonAlignmentSummary";
51 hLocalPositionDT=
dbe->
book2D(
"hLocalPositionDT",
"Local DT position (cm) absolute MEAN residuals;Sector;;cm", 14,1, 15,40,0,40);
52 hLocalAngleDT=
dbe->
book2D(
"hLocalAngleDT",
"Local DT angle (rad) absolute MEAN residuals;Sector;;rad", 14,1, 15,40,0,40);
84 hLocalPositionCSC=
dbe->
book2D(
"hLocalPositionCSC",
"Local CSC position (cm) absolute MEAN residuals;Sector;;cm",36,1,37,40,0,40);
85 hLocalAngleCSC=
dbe->
book2D(
"hLocalAngleCSC",
"Local CSC angle (rad) absolute MEAN residuals;Sector;;rad", 36,1,37,40,0,40);
128 for(
int wheel=-2;wheel<3;wheel++){
130 for (
int sector=1;sector<15;sector++){
132 if(!((sector==13 || sector ==14) &&
station!=4)){
134 std::stringstream Wheel; Wheel<<wheel;
135 std::stringstream Station; Station<<
station;
136 std::stringstream Sector; Sector<<sector;
138 std::string nameOfHistoLocalX=
"ResidualLocalX_W"+Wheel.str()+
"MB"+Station.str()+
"S"+Sector.str();
139 std::string nameOfHistoLocalPhi=
"ResidualLocalPhi_W"+Wheel.str()+
"MB"+Station.str()+
"S"+Sector.str();
140 std::string nameOfHistoLocalTheta=
"ResidualLocalTheta_W"+Wheel.str()+
"MB"+Station.str()+
"S"+Sector.str();
141 std::string nameOfHistoLocalY=
"ResidualLocalY_W"+Wheel.str()+
"MB"+Station.str()+
"S"+Sector.str();
144 "/DT/Wheel"+Wheel.str()+
145 "/Station"+Station.str()+
146 "/Sector"+Sector.str()+
"/";
150 Int_t nstation=station - 1;
151 Int_t nwheel=wheel+2;
158 Int_t ybin=1+nwheel*8+nstation*2;
160 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_X",wheel, station );
170 histo = path+nameOfHistoLocalPhi;
177 Int_t ybin=1+nwheel*8+nstation*2;
179 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_#phi", wheel,station );
191 histo=path+nameOfHistoLocalY;
198 Int_t ybin=2+nwheel*8+nstation*2;
200 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_Y", wheel,station );
208 histo = path+nameOfHistoLocalTheta;
214 Int_t ybin=2+nwheel*8+nstation*2;
216 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_#theta",wheel,station );
238 for(
int chamber=1;chamber<37;chamber++){
242 std::stringstream Ring; Ring<<
ring;
243 std::stringstream Station; Station<<
station;
244 std::stringstream Chamber; Chamber<<chamber;
246 std::string nameOfHistoLocalX=
"ResidualLocalX_ME"+Station.str()+
"R"+Ring.str()+
"C"+Chamber.str();
247 std::string nameOfHistoLocalPhi=
"ResidualLocalPhi_ME"+Station.str()+
"R"+Ring.str()+
"C"+Chamber.str();
248 std::string nameOfHistoLocalTheta=
"ResidualLocalTheta_ME"+Station.str()+
"R"+Ring.str()+
"C"+Chamber.str();
249 std::string nameOfHistoLocalY=
"ResidualLocalY_ME"+Station.str()+
"R"+Ring.str()+
"C"+Chamber.str();
252 "/CSC/Station"+Station.str()+
254 "/Chamber"+Chamber.str()+
"/";
256 Int_t ybin=
abs(station)*2+
ring;
258 if (station>0) ybin=ybin+10;
259 else ybin = 11 -ybin;
267 Int_t ybin2=2*ybin-1;
269 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_X", station,ring );
277 histo = path + nameOfHistoLocalPhi;
286 Int_t ybin2=2*ybin-1;
288 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_#phi", station,ring );
296 histo = path + nameOfHistoLocalTheta;
306 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_#theta", station,ring );
315 histo = path + nameOfHistoLocalY;
325 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
Abs< T >::type abs(const T &t)
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)