302 const double scale = 10.;
303 std::vector<TText *> nukem_text;
304 static int markerStyles[10] = {kFullCircle,
322 std::unique_ptr<TCanvas>
canvas(
323 new TCanvas(
"Grouping_rz",
"Grouping - RZ view", (
int)(600 *
scale * 1.25), (
int)(120 *
scale * 1.50)));
324 canvas->GetFrame()->SetFillColor(kWhite);
325 gStyle->SetOptStat(0);
327 unsigned int color_index = 1;
329 std::unique_ptr<TLegend> leg(
new TLegend(0.1, 0.1, 0.23, 0.34));
330 leg->SetHeader(
"Tracker Material Grouping");
331 leg->SetTextFont(42);
332 leg->SetTextSize(0.008);
334 std::unique_ptr<TProfile2D> radlen(
335 new TProfile2D(
"OverallRadLen",
"OverallRadLen", 600., -300., 300, 120., 0., 120.));
336 std::unique_ptr<TProfile2D> eneloss(
337 new TProfile2D(
"OverallEnergyLoss",
"OverallEnergyLoss", 600., -300., 300, 120., 0., 120.));
338 std::unique_ptr<TProfile2D> radlen_diff(
339 new TProfile2D(
"OverallDifferencesRadLen",
"OverallDifferencesRadLen", 600., -300., 300, 120., 0., 120.));
340 std::unique_ptr<TProfile2D> eneloss_diff(
341 new TProfile2D(
"OverallDifferencesEnergyLoss",
"OverallDifferencesEnergyLoss", 600., -300., 300, 120., 0., 120.));
345 new TH2F(
g->name().c_str(),
g->name().c_str(), 6000., -300., 300, 1200., 0., 120.));
346 TH2F ¤t = *
m_plots.back();
347 current.SetMarkerColor(
m_color[color_index]);
348 current.SetMarkerStyle(markerStyles[color_index % 10]);
349 current.SetMarkerSize(0.8);
350 current.SetLineWidth(1);
351 for (
const auto &element :
g->elements()) {
352 current.Fill(element.z(), element.perp());
353 radlen->Fill(element.z(), element.perp(),
m_values[
g->name()].first);
354 eneloss->Fill(element.z(), element.perp(),
m_values[
g->name()].second);
355 radlen_diff->Fill(element.z(), element.perp(),
m_diff[
g->name()].first);
356 eneloss_diff->Fill(element.z(), element.perp(),
m_diff[
g->name()].second);
359 if (color_index == 1)
362 current.Draw(
"SAME");
364 leg->AddEntry(¤t,
g->name().c_str(),
"lp")->SetTextColor(
m_color[color_index]);
369 color_index = color_index %
m_color.size();
372 canvas->SaveAs(
"Grouping.png");
377 radlen->SetMinimum(0);
378 radlen->SetMaximum(0.25);
379 radlen->Draw(
"COLZ");
381 line.first->SetLineWidth(5);
385 canvas->SaveAs(
"RadLenValues.png");
388 eneloss->SetMinimum(0.00001);
389 eneloss->SetMaximum(0.0005);
390 eneloss->Draw(
"COLZ");
392 line.first->SetLineWidth(5);
396 canvas->SaveAs(
"EnergyLossValues.png");
401 radlen_diff->SetMinimum(-100);
402 radlen_diff->SetMaximum(100);
403 radlen_diff->Draw(
"COLZ");
405 line.first->SetLineWidth(5);
409 canvas->SaveAs(
"RadLenChanges.png");
412 eneloss_diff->SetMinimum(-100);
413 eneloss_diff->SetMaximum(100);
414 eneloss_diff->Draw(
"COLZ");
416 line.first->SetLineWidth(5);
420 canvas->SaveAs(
"EnergyLossChanges.png");
422 for (
auto g : nukem_text)