305 const double scale = 10.;
306 std::vector<TText *> nukem_text;
307 static int markerStyles[10] = {kFullCircle,
324 std::unique_ptr<TCanvas>
canvas(
325 new TCanvas(
"Grouping_rz",
"Grouping - RZ view", (
int)(600 *
scale * 1.25), (
int)(120 *
scale * 1.50)));
326 canvas->GetFrame()->SetFillColor(kWhite);
327 gStyle->SetOptStat(0);
329 unsigned int color_index = 1;
331 std::unique_ptr<TLegend> leg(
new TLegend(0.1, 0.1, 0.23, 0.34));
332 leg->SetHeader(
"Tracker Material Grouping");
333 leg->SetTextFont(42);
334 leg->SetTextSize(0.008);
336 std::unique_ptr<TProfile2D> radlen(
337 new TProfile2D(
"OverallRadLen",
"OverallRadLen", 600., -300., 300, 120., 0., 120.));
338 std::unique_ptr<TProfile2D> eneloss(
339 new TProfile2D(
"OverallEnergyLoss",
"OverallEnergyLoss", 600., -300., 300, 120., 0., 120.));
340 std::unique_ptr<TProfile2D> radlen_diff(
341 new TProfile2D(
"OverallDifferencesRadLen",
"OverallDifferencesRadLen", 600., -300., 300, 120., 0., 120.));
342 std::unique_ptr<TProfile2D> eneloss_diff(
343 new TProfile2D(
"OverallDifferencesEnergyLoss",
"OverallDifferencesEnergyLoss", 600., -300., 300, 120., 0., 120.));
347 new TH2F(
g->name().c_str(),
g->name().c_str(), 6000., -300., 300, 1200., 0., 120.));
348 TH2F ¤t = *
m_plots.back();
349 current.SetMarkerColor(
m_color[color_index]);
350 current.SetMarkerStyle(markerStyles[color_index % 10]);
351 current.SetMarkerSize(0.8);
352 current.SetLineWidth(1);
353 for (
const auto &element :
g->elements()) {
354 current.Fill(element.z(), element.perp());
355 radlen->Fill(element.z(), element.perp(),
m_values[
g->name()].first);
356 eneloss->Fill(element.z(), element.perp(),
m_values[
g->name()].second);
357 radlen_diff->Fill(element.z(), element.perp(),
m_diff[
g->name()].first);
358 eneloss_diff->Fill(element.z(), element.perp(),
m_diff[
g->name()].second);
361 if (color_index == 1)
364 current.Draw(
"SAME");
366 leg->AddEntry(¤t,
g->name().c_str(),
"lp")->SetTextColor(
m_color[color_index]);
371 color_index = color_index %
m_color.size();
374 canvas->SaveAs(
"Grouping.png");
379 radlen->SetMinimum(0);
380 radlen->SetMaximum(0.25);
381 radlen->Draw(
"COLZ");
383 line.first->SetLineWidth(5);
387 canvas->SaveAs(
"RadLenValues.png");
390 eneloss->SetMinimum(0.00001);
391 eneloss->SetMaximum(0.0005);
392 eneloss->Draw(
"COLZ");
394 line.first->SetLineWidth(5);
398 canvas->SaveAs(
"EnergyLossValues.png");
403 radlen_diff->SetMinimum(-100);
404 radlen_diff->SetMaximum(100);
405 radlen_diff->Draw(
"COLZ");
407 line.first->SetLineWidth(5);
411 canvas->SaveAs(
"RadLenChanges.png");
414 eneloss_diff->SetMinimum(-100);
415 eneloss_diff->SetMaximum(100);
416 eneloss_diff->Draw(
"COLZ");
418 line.first->SetLineWidth(5);
422 canvas->SaveAs(
"EnergyLossChanges.png");
424 for (
auto g : nukem_text)
std::vector< TH2F * > m_plots
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
std::vector< std::pair< std::shared_ptr< TLine >, std::shared_ptr< TText > > > overlayEtaReferences()
std::vector< unsigned int > m_color
std::map< std::string, std::pair< float, float > > m_diff
const edm::ESGetToken< DDCompactView, IdealGeometryRecord > ddToken_
std::set< std::string > m_group_names
std::vector< MaterialAccountingGroup * > m_groups
std::vector< int > m_gradient
std::map< std::string, std::pair< float, float > > m_values