11 #include "TMultiGraph.h"
98 gStyle->SetCanvasColor(kWhite);
99 gStyle->SetFrameFillColor(kWhite);
100 gStyle->SetPadColor(kWhite);
101 gStyle->SetStatColor(kWhite);
102 gStyle->SetTitleFillColor(kWhite);
103 gStyle->SetPalette(1);
111 TCanvas* c1 =
new TCanvas(
"brem_loss",
"c1", 800, 800);
121 fCalc[
i]->SetLineStyle(1);
122 fCalc[
i]->SetLineColor(4);
123 fCalc[
i]->SetMarkerColor(4);
124 fCalc[
i]->SetLineWidth(3);
125 fCalc[
i]->SetMarkerSize(2);
127 fTable[0]->SetMarkerStyle(20);
128 fTable[1]->SetMarkerStyle(26);
129 fTable[2]->SetMarkerStyle(27);
132 fCalc[0]->SetMarkerStyle(20);
133 fCalc[1]->SetMarkerStyle(26);
134 fCalc[2]->SetMarkerStyle(27);
137 TMultiGraph* mg =
new TMultiGraph();
142 mg->SetMinimum(0.001);
149 mg->GetXaxis()->SetTitle(
"Electron momentum [GeV/c]");
150 mg->GetYaxis()->SetTitle(
"Brehmstrahlung energy loss [GeV/cm]");
151 mg->GetXaxis()->SetLimits(0.04, 11);
153 TLegend* l1 =
new TLegend(0.20, 0.97, 0.9, 0.7);
154 l1->SetFillColor(kWhite);
155 l1->SetHeader(
"Energy losses for muons in iron vs. momentum");
156 l1->AddEntry(
fTable[0],
"N2 (table)",
"lp");
157 l1->AddEntry(
fCalc[0],
"N2 (calculation)",
"lp");
158 l1->AddEntry(
fTable[1],
"Cu (table)",
"lp");
159 l1->AddEntry(
fCalc[1],
"Cu (calculation)",
"lp");
160 l1->AddEntry(
fTable[2],
"Sn (table)",
"lp");
161 l1->AddEntry(
fCalc[2],
"Sn (calculation)",
"lp");
164 c1->SaveAs(
"brem_loss.gif");
165 c1->SaveAs(
"brem_loss.eps");
166 c1->SaveAs(
"brem_loss.svg");
171 Double_t p =
fMom[
i];
180 std::cout <<
"X0=" <<
m.fX0 *
m.fRho <<
" X0calc=" << X0 << std::endl;
181 Double_t brem_calc = p / X0;
182 fCalc[j]->SetPoint(
i, p, brem_calc);
184 Double_t brem_table = (6.022045e23 /
m.fA) * 5.794661e-28 * (
m.fZ *
m.fZ)
185 * (p + 0.000511) *
m.fPHIRAD[
i];
186 fTable[j]->SetPoint(
i, p, brem_table);