23 TF1 *vChanneling =
new TF1(
"vChanneling",
"gaus",fChannelingMinimum,fChannelingMaximum);
24 vChanneling->SetParNames(
"Const",
"Mean",
"Sigma");
25 vChanneling->SetLineColor(4);
26 vChanneling->SetLineStyle(2);
28 TH2D *hChannelingPlot =
new TH2D(
"hChannelingPlot",
"Deflection Angle vs. Incoming Angle;Horizontal Incoming Angle [#murad];Horizontal Deflection Angle [#murad]",21,-10.5,10.5,256,-127.5,128.5);
30 TH1F *hChannelingEfficiency =
new TH1F(
"hChannelingEfficiency",
"G4Channeling;Horizontal Incoming Angle [#murad];Efficiency [%]",21,-10.5,10.5);
32 fTree->Draw(
"(angXout-angXin):angXin>>hChannelingPlot");
34 Double_t vNormalizationToAmorphous = 0.965;
36 for(
int i=2;i<=21;i++){
37 TH1D*
h1 = hChannelingPlot->ProjectionY(
"h1",i,i);
38 h1->Fit(vChanneling,
"QR");
39 Double_t *vChannelingParameters;
40 vChannelingParameters = vChanneling->GetParameters();
41 hChannelingEfficiency->SetBinContent(i,
ComputeEfficiency(h1,vChannelingParameters)/vNormalizationToAmorphous);
44 hChannelingEfficiency->SetLineColor(3);
45 hChannelingEfficiency->SetLineStyle(4);
46 hChannelingEfficiency->SetMarkerColor(3);
47 hChannelingEfficiency->SetFillStyle(0);
48 hChannelingEfficiency->SetMarkerStyle(20);
49 hChannelingEfficiency->Draw(
"PL");
51 TGraph* gRoughExperimentalData =
new TGraph(11);
52 gRoughExperimentalData->SetPoint( 0 , -10 , 20 );
53 gRoughExperimentalData->SetPoint( 1 , -8 , 38 );
54 gRoughExperimentalData->SetPoint( 2 , -6 , 56 );
55 gRoughExperimentalData->SetPoint( 3 , -4 , 72 );
56 gRoughExperimentalData->SetPoint( 4 , -2 , 80 );
57 gRoughExperimentalData->SetPoint( 5 , 0 , 84 );
58 gRoughExperimentalData->SetPoint( 6 , 2 , 82 );
59 gRoughExperimentalData->SetPoint( 7 , 4 , 78 );
60 gRoughExperimentalData->SetPoint( 8 , 6 , 66 );
61 gRoughExperimentalData->SetPoint( 9 , 8 , 52 );
62 gRoughExperimentalData->SetPoint( 10 , 10 , 37 );
64 gRoughExperimentalData->SetLineColor(4);
65 gRoughExperimentalData->SetLineStyle(3);
66 gRoughExperimentalData->SetFillStyle(0);
67 gRoughExperimentalData->SetFillColor(0);
68 gRoughExperimentalData->SetMarkerColor(4);
69 gRoughExperimentalData->SetMarkerStyle(21);
70 gRoughExperimentalData->SetTitle(
"Phys. Lett. B 680, 129");
72 gRoughExperimentalData->Draw(
"sameCP");
74 TLegend *aLegend =
new TLegend(0.30,0.15,0.55,0.3);
75 aLegend->AddEntry(hChannelingEfficiency);
76 aLegend->AddEntry(gRoughExperimentalData);
77 aLegend->SetFillStyle(0);
78 aLegend->SetLineColor(0);
Double_t ComputeEfficiency(TH1D *h1, Double_t *fPar)