41 B2DEBUG(10,
"DQMHistAnalysisSVD: Constructor done.");
46 "If true you can set the range of the histogram in Z with 'ColzMax' and 'ColzMin' parameters.",
77 m_legNormal =
new TPaveText(x1, y1, x2, y2,
"brNDC");
81 m_legEmpty =
new TPaveText(x1, y1, x2, y2,
"brNDC");
109 m_ly =
new TLine(0, 0, 0, 210);
110 m_ly->SetLineStyle(kDashed);
111 m_ly->SetLineWidth(2);
113 m_lx =
new TLine(0, 0, 210, 0);
114 m_lx->SetLineStyle(kDashed);
115 m_lx->SetLineWidth(2);
117 m_arrowy =
new TArrow(0, 0, 0, 10, 0.01,
"|>");
122 m_arrowx =
new TArrow(0, 0, 10, 0, 0.01,
"|>");
249 vector<TText*> ladders;
250 vector<TText*> sensors;
252 const double rLayer[4] = {40, 70, 110, 160};
253 const double nLadders[4] = {7, 10, 12, 16};
254 const double nSensors[4] = {2, 3, 4, 5};
255 const double position[4] = {0.8, 1.2, 1., 0.8};
256 const double delta[4] = {9, 8, 8, 8};
257 const double inclination[4] = {-17, -5, -13, -12};
259 double pi = TMath::Pi();
261 for (
int layer = 0; layer < 4; layer ++) {
262 for (
int ladder = 1; ladder <= nLadders[layer]; ladder++) {
263 double deltaText = delta[layer] + position[layer];
264 double r = rLayer[layer] + (deltaText) * nSensors[layer];
265 double phi = 2 * pi / nLadders[layer];
266 double dphiThisPoint = (ladder - 1) * phi - phi / 2 + inclination[layer] * pi / 180.;
267 double dphiNextPoint = dphiThisPoint + phi;
268 double minX = r * TMath::Cos(dphiThisPoint);
269 double maxX = (r + deltaText) * TMath::Cos(dphiNextPoint);
270 double minY = r * TMath::Sin(dphiThisPoint);
271 double maxY = (r + deltaText) * TMath::Sin(dphiNextPoint);
273 double xcen = (minX + maxX) / 2.;
274 double ycen = (minY + maxY) / 2.;
276 double angle = TMath::ATan2(ycen, xcen) * 180. / TMath::Pi() - 90.;
277 if (ycen < 0) angle = TMath::ATan2(ycen, xcen) * 180. / TMath::Pi() + 90;
279 TText* t =
new TText(xcen, ycen, Form(
"%d.%d", layer + 3, ladder));
281 t->SetTextAngle(angle);
282 t->SetTextSize(0.025);
284 ladders.push_back(t);
286 for (
int sensor = 1; sensor <= nSensors[layer]; sensor++) {
287 if ((layer == 0 && ladder == 4) || (layer == 1 && ladder == 5) || (layer == 2 && ladder == 6) || (layer == 3 && ladder == 7)) {
288 double rs = rLayer[layer] + (delta[layer]) * (sensor - 1);
289 double xcens = rs * TMath::Cos(dphiThisPoint);
290 double ycens = rs * TMath::Sin(dphiThisPoint);
292 double angles = TMath::ATan2(ycens, xcens) * 180. / pi - 90.;
293 if (ycen < 0) angles = TMath::ATan2(ycens, xcens) * 180. / pi + 90;
295 TText* ts =
new TText(xcens, ycens, Form(
"%d ", sensor));
296 ts->SetTextAlign(31);
297 ts->SetTextAngle(angles);
298 ts->SetTextSize(0.018);
300 sensors.push_back(ts);
306 return std::make_pair(ladders, sensors);
323 int pos = cName.Last(
'/');
326 hName = cName(pos + 1, cName.Length() - pos - 1);
330 hName.ReplaceAll(cPrefix, hPrefix);
332 if (!view.IsNull()) {
334 hName.Replace(hName.Length() - 1, 1,
"");
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.