49 m_color.push_back(kOrange + 10);
64 m_color.push_back(kMagenta + 1);
65 m_color.push_back(kMagenta + 2);
66 m_color.push_back(kMagenta + 3);
67 m_color.push_back(kMagenta + 4);
68 m_color.push_back(kMagenta + 5);
69 m_color.push_back(kMagenta + 6);
70 m_color.push_back(kMagenta + 7);
71 m_color.push_back(kMagenta + 8);
79 index = ((TObjArray*) gROOT->GetListOfColors())->GetLast() + 1;
83 first.GetRGB(r1, g1, b1);
84 last.GetRGB(r2, g2, b2);
86 float delta_g = (g2 -
g1) / (steps - 1);
87 float delta_b = (b2 - b1) / (steps - 1);
90 for (
unsigned int i = 0;
i <
steps; ++
i) {
91 new TColor(static_cast<Int_t>(index +
i), r1 + delta_r *
i, g1 + delta_g * i, b1 + delta_b * i);
100 return fill_gradient(* (TColor *) gROOT->GetListOfColors()->At(first), * (TColor *) gROOT->GetListOfColors()->At(last),
steps,
index);
105 const float rzMinZ = -
maxZ;
106 const float rzMaxZ =
maxZ;
107 const float rzMinR = 0.;
108 const float rzMaxR = maxR;
109 const int rzBinsZ = (int) (2. * maxZ * resolution);
110 const int rzBinsR = (int) ( maxR * resolution);
112 std::vector<double>
max;
113 max.push_back( 0.02 );
114 max.push_back( 0.00004 );
117 TColor::InitializeColors();
124 std::vector<double>
w(2);
134 std::vector<double>
w(2);
139 w, step.
length(), layer+1 );
145 const double scale = 10.;
149 canvas =
new TCanvas(
"radlen_rz",
"RadiationLengths - RZ view", (
int) (600 * scale * 1.25), (
int) (120 * scale * 1.50));
150 gStyle->SetOptStat(0);
152 gStyle->SetNumberContours(
m_gradient.size() );
153 canvas->GetFrame()->SetFillColor(kWhite);
154 radlen->Draw(
"colz");
155 radlen->Draw(
"same axis y+");
156 radlen->SaveAs(
"radlen.root");
157 canvas->SaveAs(
"radlen.png");
161 canvas =
new TCanvas(
"dedx_rz",
"-dE/dx term - RZ view", (
int) (600 * scale * 1.25), (
int) (120 * scale * 1.50));
162 canvas->GetFrame()->SetFillColor(kWhite);
163 gStyle->SetOptStat(0);
165 gStyle->SetNumberContours(
m_gradient.size() );
167 dedx->Draw(
"same axis y+");
168 dedx->SaveAs(
"dedx.root");
169 canvas->SaveAs(
"dedx.png");
173 canvas =
new TCanvas(
"layer_rz",
"Layers - RZ view", (
int) (600 * scale * 1.25), (
int) (120 * scale * 1.50));
174 canvas->GetFrame()->SetFillColor(kWhite);
175 gStyle->SetOptStat(0);
177 gStyle->SetNumberContours(
m_color.size() );
178 colormap->SetMinimum( 1 );
179 colormap->SetMaximum(
m_color.size() );
180 colormap->Draw(
"col");
181 colormap->Draw(
"same axis y+");
182 colormap->SaveAs(
"layers.root");
183 canvas->SaveAs(
"layers.png");
void plotSegmentUnassigned(const MaterialAccountingStep &step)
ColorMap * colormap(void) const
access the colormap
double length(void) const
double radiationLengths(void) const
Histogram * get(size_t h=0) const
access one of the histograms
std::vector< int > m_color
double energyLoss(void) const
TrackingMaterialPlotter(float maxZ, float maxR, float resolution)
double delta_r(const Fourvec &a, const Fourvec &b)
Find the distance between two four-vectors in the two-dimensional space .
std::vector< int > m_gradient
unsigned int fill_gradient(const TColor &first, const TColor &last, unsigned int steps=100, unsigned int index=0)
const GlobalPoint & out(void) const
void plotSegmentInLayer(const MaterialAccountingStep &step, int layer)
void fill(double x, double y, const std::vector< double > &weight, double norm)
fill one point
const GlobalPoint & in(void) const