48 m_color.push_back(kOrange + 10);
63 m_color.push_back(kMagenta + 1);
64 m_color.push_back(kMagenta + 2);
65 m_color.push_back(kMagenta + 3);
66 m_color.push_back(kMagenta + 4);
67 m_color.push_back(kMagenta + 5);
68 m_color.push_back(kMagenta + 6);
69 m_color.push_back(kMagenta + 7);
70 m_color.push_back(kMagenta + 8);
76 unsigned int index ) {
79 index = ((TObjArray*)gROOT->GetListOfColors())->GetLast() + 1;
90 for (
unsigned int i = 0;
i <
steps; ++
i) {
101 unsigned int index ) {
103 *(TColor*)gROOT->GetListOfColors()->At(
first), *(TColor*)gROOT->GetListOfColors()->At(
last),
steps,
index);
107 const float rzMinZ = -
maxZ;
108 const float rzMaxZ =
maxZ;
109 const float rzMinR = 0.;
110 const float rzMaxR = maxR;
114 std::vector<double>
max;
116 max.push_back(0.00016);
118 2, rzBinsZ, rzBinsR, std::make_pair(rzMinZ, rzMaxZ), std::make_pair(rzMinR, rzMaxR),
m_color.size(),
max);
120 TColor::InitializeColors();
126 std::vector<double>
w(2);
127 w[0] =
step.radiationLengths();
128 w[1] =
step.energyLoss();
130 std::make_pair(
step.in().perp(),
step.out().perp()),
137 std::vector<double>
w(2);
138 w[0] =
step.radiationLengths();
139 w[1] =
step.energyLoss();
141 std::make_pair(
step.in().perp(),
step.out().perp()),
148 const double scale = 10.;
152 canvas =
new TCanvas(
"radlen_rz",
"RadiationLengths - RZ view", (
int)(600 *
scale * 1.25), (
int)(120 *
scale * 1.50));
153 gStyle->SetOptStat(0);
156 canvas->GetFrame()->SetFillColor(kWhite);
157 radlen->Draw(
"colz");
158 radlen->Draw(
"same axis y+");
159 radlen->SaveAs(
"radlen.root");
160 canvas->SaveAs(
"radlen.png");
165 double stops[9] = {0.0000, 0.1250, 0.2500, 0.3750, 0.5000, 0.6250, 0.7500, 0.8750, 1.0000};
167 0. / 255., 5. / 255., 15. / 255., 35. / 255., 102. / 255., 196. / 255., 208. / 255., 199. / 255., 110. / 255.};
169 0. / 255., 48. / 255., 124. / 255., 192. / 255., 206. / 255., 226. / 255., 97. / 255., 16. / 255., 0. / 255.};
171 99. / 255., 142. / 255., 198. / 255., 201. / 255., 90. / 255., 22. / 255., 13. / 255., 8. / 255., 2. / 255.};
172 int palette_index = TColor::CreateGradientColorTable(9, stops,
red, green,
blue, 100 - white_slots);
173 for (
int i = 0;
i < white_slots;
i++)
174 MyPalette[
i] = kWhite;
175 for (
int i = 0;
i < 100 - white_slots;
i++)
176 MyPalette[
i + white_slots] = palette_index +
i;
178 gStyle->SetNumberContours(100);
179 gStyle->SetPalette(100, MyPalette);
180 radlen->Draw(
"colz");
181 radlen->Draw(
"same axis y+");
182 canvas->SaveAs(
"radlenColor.png");
187 canvas =
new TCanvas(
"dedx_rz",
"-dE/dx term - RZ view", (
int)(600 *
scale * 1.25), (
int)(120 *
scale * 1.50));
188 canvas->GetFrame()->SetFillColor(kWhite);
189 gStyle->SetOptStat(0);
193 dedx->Draw(
"same axis y+");
194 dedx->SaveAs(
"dedx.root");
195 canvas->SaveAs(
"dedx.png");
197 gStyle->SetNumberContours(100);
198 gStyle->SetPalette(100, MyPalette);
200 dedx->Draw(
"same axis y+");
201 canvas->SaveAs(
"dedxColor.png");
205 canvas =
new TCanvas(
"layer_rz",
"Layers - RZ view", (
int)(600 *
scale * 1.25), (
int)(120 *
scale * 1.50));
206 canvas->GetFrame()->SetFillColor(kWhite);
207 gStyle->SetOptStat(0);
209 gStyle->SetNumberContours(
m_color.size());
210 colormap->SetMinimum(1);
211 colormap->SetMaximum(
m_color.size());
212 colormap->Draw(
"col");
213 colormap->Draw(
"same axis y+");
214 colormap->SaveAs(
"layers.root");
215 canvas->SaveAs(
"layers.png");
void plotSegmentUnassigned(const MaterialAccountingStep &step)
std::vector< int > m_color
ColorMap * colormap(void) const
access the colormap
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)
void plotSegmentInLayer(const MaterialAccountingStep &step, int layer)
void fill(double x, double y, const std::vector< double > &weight, double norm)
fill one point
Histogram * get(size_t h=0) const
access one of the histograms