21 m_color.push_back(kGreen + 100);
23 m_color.push_back(kGreen + 100);
33 m_color.push_back(kGreen + 100);
47 m_color.push_back(kGreen + 100);
65 index = ((TObjArray*) gROOT->GetListOfColors())->GetLast() + 1;
69 first.GetRGB(r1, g1, b1);
70 last.GetRGB(r2, g2, b2);
72 float delta_g = (g2 -
g1) / (steps - 1);
73 float delta_b = (b2 - b1) / (steps - 1);
76 for (
unsigned int i = 0;
i <
steps; ++
i) {
77 new TColor(index +
i, r1 + delta_r *
i, g1 + delta_g * i, b1 + delta_b * i);
86 return fill_gradient(* (TColor *) gROOT->GetListOfColors()->At(first), * (TColor *) gROOT->GetListOfColors()->At(last),
steps,
index);
91 const float rzMinZ = -
maxZ;
92 const float rzMaxZ =
maxZ;
93 const float rzMinR = 0.;
94 const float rzMaxR = maxR;
95 const int rzBinsZ = (int) (2. * maxZ * resolution);
96 const int rzBinsR = (int) ( maxR * resolution);
98 std::vector<double>
max;
99 max.push_back( 0.02 );
100 max.push_back( 0.04 );
103 TColor::InitializeColors();
110 std::vector<double>
w(2);
120 std::vector<double>
w(2);
125 w, step.
length(), layer+1 );
131 const double scale = 10.;
135 canvas =
new TCanvas(
"radlen_rz",
"RadiationLengths - RZ view", (
int) (600 * scale * 1.25), (
int) (120 * scale * 1.50));
136 gStyle->SetOptStat(0);
138 gStyle->SetNumberContours(
m_gradient.size() );
139 canvas->GetFrame()->SetFillColor(kWhite);
140 radlen->Draw(
"colz");
141 radlen->Draw(
"same axis y+");
142 canvas->SaveAs(
"radlen.png");
146 canvas =
new TCanvas(
"dedx_rz",
"-dE/dx term - RZ view", (
int) (600 * scale * 1.25), (
int) (120 * scale * 1.50));
147 canvas->GetFrame()->SetFillColor(kWhite);
148 gStyle->SetOptStat(0);
150 gStyle->SetNumberContours(
m_gradient.size() );
152 dedx->Draw(
"same axis y+");
153 canvas->SaveAs(
"dedx.png");
157 canvas =
new TCanvas(
"layer_rz",
"Layers - RZ view", (
int) (600 * scale * 1.25), (
int) (120 * scale * 1.50));
158 canvas->GetFrame()->SetFillColor(kWhite);
159 gStyle->SetOptStat(0);
161 gStyle->SetNumberContours(
m_color.size() );
162 colormap->SetMinimum( 1 );
163 colormap->SetMaximum(
m_color.size() );
164 colormap->Draw(
"col");
165 colormap->Draw(
"same axis y+");
166 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