305 const double scale = 10.;
306 std::vector<TText *> nukem_text;
307 static int markerStyles[10] = {kFullCircle,
325 std::unique_ptr<TCanvas>
canvas(
326 new TCanvas(
"Grouping_rz",
"Grouping - RZ view", (
int)(600 *
scale * 1.25), (
int)(120 *
scale * 1.50)));
327 canvas->GetFrame()->SetFillColor(kWhite);
328 gStyle->SetOptStat(0);
330 unsigned int color_index = 1;
332 std::unique_ptr<TLegend> leg(
new TLegend(0.1, 0.1, 0.23, 0.34));
333 leg->SetHeader(
"Tracker Material Grouping");
334 leg->SetTextFont(42);
335 leg->SetTextSize(0.008);
337 std::unique_ptr<TProfile2D> radlen(
338 new TProfile2D(
"OverallRadLen",
"OverallRadLen", 600., -300., 300, 120., 0., 120.));
339 std::unique_ptr<TProfile2D> eneloss(
340 new TProfile2D(
"OverallEnergyLoss",
"OverallEnergyLoss", 600., -300., 300, 120., 0., 120.));
341 std::unique_ptr<TProfile2D> radlen_diff(
342 new TProfile2D(
"OverallDifferencesRadLen",
"OverallDifferencesRadLen", 600., -300., 300, 120., 0., 120.));
343 std::unique_ptr<TProfile2D> eneloss_diff(
344 new TProfile2D(
"OverallDifferencesEnergyLoss",
"OverallDifferencesEnergyLoss", 600., -300., 300, 120., 0., 120.));
348 new TH2F(
g->name().c_str(),
g->name().c_str(), 6000., -300., 300, 1200., 0., 120.));
349 TH2F ¤t = *
m_plots.back();
350 current.SetMarkerColor(
m_color[color_index]);
351 current.SetMarkerStyle(markerStyles[color_index % 10]);
352 current.SetMarkerSize(0.8);
353 current.SetLineWidth(1);
354 for (
auto element :
g->elements()) {
355 current.Fill(element.z(), element.perp());
356 radlen->Fill(element.z(), element.perp(),
m_values[
g->name()].first);
357 eneloss->Fill(element.z(), element.perp(),
m_values[
g->name()].second);
358 radlen_diff->Fill(element.z(), element.perp(),
m_diff[
g->name()].first);
359 eneloss_diff->Fill(element.z(), element.perp(),
m_diff[
g->name()].second);
362 if (color_index == 1)
365 current.Draw(
"SAME");
367 leg->AddEntry(¤t,
g->name().c_str(),
"lp")->SetTextColor(
m_color[color_index]);
372 color_index = color_index %
m_color.size();
375 canvas->SaveAs(
"Grouping.png");
380 radlen->SetMinimum(0);
381 radlen->SetMaximum(0.25);
382 radlen->Draw(
"COLZ");
384 line.first->SetLineWidth(5);
388 canvas->SaveAs(
"RadLenValues.png");
391 eneloss->SetMinimum(0.00001);
392 eneloss->SetMaximum(0.0005);
393 eneloss->Draw(
"COLZ");
395 line.first->SetLineWidth(5);
399 canvas->SaveAs(
"EnergyLossValues.png");
404 radlen_diff->SetMinimum(-100);
405 radlen_diff->SetMaximum(100);
406 radlen_diff->Draw(
"COLZ");
408 line.first->SetLineWidth(5);
412 canvas->SaveAs(
"RadLenChanges.png");
415 eneloss_diff->SetMinimum(-100);
416 eneloss_diff->SetMaximum(100);
417 eneloss_diff->Draw(
"COLZ");
419 line.first->SetLineWidth(5);
423 canvas->SaveAs(
"EnergyLossChanges.png");
425 for (
auto g : nukem_text)