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");
123 m_ly =
new TLine(0, 0, 0, 210);
124 m_ly->SetLineStyle(kDashed);
125 m_ly->SetLineWidth(2);
127 m_lx =
new TLine(0, 0, 210, 0);
128 m_lx->SetLineStyle(kDashed);
129 m_lx->SetLineWidth(2);
131 m_arrowy =
new TArrow(0, 0, 0, 10, 0.01,
"|>");
136 m_arrowx =
new TArrow(0, 0, 10, 0, 0.01,
"|>");
274 vector<TText*> ladders;
275 vector<TText*> sensors;
277 const double rLayer[4] = {40, 70, 110, 160};
278 const double nLadders[4] = {7, 10, 12, 16};
279 const double nSensors[4] = {2, 3, 4, 5};
280 const double position[4] = {0.8, 1.2, 1., 0.8};
281 const double delta[4] = {9, 8, 8, 8};
282 const double inclination[4] = {-17, -5, -13, -12};
284 double pi = TMath::Pi();
286 for (
int layer = 0; layer < 4; layer ++) {
287 for (
int ladder = 1; ladder <= nLadders[layer]; ladder++) {
288 double deltaText = delta[layer] + position[layer];
289 double r = rLayer[layer] + (deltaText) * nSensors[layer];
290 double phi = 2 * pi / nLadders[layer];
291 double dphiThisPoint = (ladder - 1) * phi - phi / 2 + inclination[layer] * pi / 180.;
292 double dphiNextPoint = dphiThisPoint + phi;
293 double minX = r * TMath::Cos(dphiThisPoint);
294 double maxX = (r + deltaText) * TMath::Cos(dphiNextPoint);
295 double minY = r * TMath::Sin(dphiThisPoint);
296 double maxY = (r + deltaText) * TMath::Sin(dphiNextPoint);
298 double xcen = (minX + maxX) / 2.;
299 double ycen = (minY + maxY) / 2.;
301 double angle = TMath::ATan2(ycen, xcen) * 180. / TMath::Pi() - 90.;
302 if (ycen < 0) angle = TMath::ATan2(ycen, xcen) * 180. / TMath::Pi() + 90;
304 TText* t =
new TText(xcen, ycen, Form(
"%d.%d", layer + 3, ladder));
306 t->SetTextAngle(angle);
307 t->SetTextSize(0.025);
309 ladders.push_back(t);
311 for (
int sensor = 1; sensor <= nSensors[layer]; sensor++) {
312 if ((layer == 0 && ladder == 4) || (layer == 1 && ladder == 5) || (layer == 2 && ladder == 6) || (layer == 3 && ladder == 7)) {
313 double rs = rLayer[layer] + (delta[layer]) * (sensor - 1);
314 double xcens = rs * TMath::Cos(dphiThisPoint);
315 double ycens = rs * TMath::Sin(dphiThisPoint);
317 double angles = TMath::ATan2(ycens, xcens) * 180. / pi - 90.;
318 if (ycen < 0) angles = TMath::ATan2(ycens, xcens) * 180. / pi + 90;
320 TText* ts =
new TText(xcens, ycens, Form(
"%d ", sensor));
321 ts->SetTextAlign(31);
322 ts->SetTextAngle(angles);
323 ts->SetTextSize(0.018);
325 sensors.push_back(ts);
331 return std::make_pair(ladders, sensors);
348 int pos = cName.Last(
'/');
351 hName = cName(pos + 1, cName.Length() - pos - 1);
355 hName.ReplaceAll(cPrefix, hPrefix);
357 if (!view.IsNull()) {
359 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.