1 void doBsmdScale(
char *f_100,
char *f_110,
char *f_90){
5 TFile *f_nom=
new TFile(f_100,
"OPEN");
6 TH1F *h_effMB=f_nom->Get(
"h_effMB");
7 TH1F *h_effHT1=f_nom->Get(
"h_effHT1");
8 TH1F *h_effHT2=f_nom->Get(
"h_effHT2");
10 TFile *f_plus=
new TFile(f_110,
"OPEN");
11 TH1F *h_effMB_plus=f_plus->Get(
"h_effMB");
12 TH1F *h_effHT1_plus=f_plus->Get(
"h_effHT1");
13 TH1F *h_effHT2_plus=f_plus->Get(
"h_effHT2");
15 TFile *f_min=
new TFile(f_90,
"OPEN");
16 TH1F *h_effMB_min=f_min->Get(
"h_effMB");
17 TH1F *h_effHT1_min=f_min->Get(
"h_effHT1");
18 TH1F *h_effHT2_min=f_min->Get(
"h_effHT2");
20 h_effMB_plus->Divide(h_effMB);
21 h_effHT1_plus->Divide(h_effHT1);
22 h_effHT2_plus->Divide(h_effHT2);
24 h_effMB_min->Divide(h_effMB);
25 h_effHT1_min->Divide(h_effHT1);
26 h_effHT2_min->Divide(h_effHT2);
28 TF1 *sub=
new TF1(
"sub",
"1.",0.,20.);
29 h_effMB_plus->Add(sub,-1.);
30 h_effHT1_plus->Add(sub,-1.);
31 h_effHT2_plus->Add(sub,-1.);
32 h_effMB_min->Add(sub,-1.);
33 h_effHT1_min->Add(sub,-1.);
34 h_effHT2_min->Add(sub,-1.);
36 TGraphErrors *gMB_plus=
new TGraphErrors(h_effMB_plus);
37 gMB_plus->SetName(
"gMB_plus");
38 TGraphErrors *gHT1_plus=
new TGraphErrors(h_effHT1_plus);
39 gHT1_plus->SetName(
"gHT1_plus");
40 TGraphErrors *gHT2_plus=
new TGraphErrors(h_effHT2_plus);
41 gHT2_plus->SetName(
"gHT2_plus");
43 TGraphErrors *gMB_min=
new TGraphErrors(h_effMB_min);
44 gMB_min->SetName(
"gMB_min");
45 TGraphErrors *gHT1_min=
new TGraphErrors(h_effHT1_min);
46 gHT1_min->SetName(
"gHT1_min");
47 TGraphErrors *gHT2_min=
new TGraphErrors(h_effHT2_min);
48 gHT2_min->SetName(
"gHT2_min");
50 TCanvas *c=
new TCanvas(
"c",
"c",400,250);
51 TMultiGraph *m=
new TMultiGraph();
52 TMultiGraph *mm=
new TMultiGraph();
54 gMB_plus->SetLineColor(1);
55 gMB_min->SetLineColor(1);
56 gHT1_plus->SetLineColor(4);
57 gHT1_min->SetLineColor(4);
58 gHT2_plus->SetLineColor(2);
59 gHT2_min->SetLineColor(2);
61 gMB_plus->RemovePoint(0);
62 gMB_plus->RemovePoint(0);
63 gHT1_plus->RemovePoint(0);
64 gHT1_plus->RemovePoint(0);
65 gHT1_plus->RemovePoint(0);
66 gHT1_plus->RemovePoint(0);
67 gHT2_plus->RemovePoint(0);
68 gHT2_plus->RemovePoint(0);
69 gHT2_plus->RemovePoint(0);
70 gHT2_plus->RemovePoint(0);
71 gHT2_plus->RemovePoint(0);
72 gHT2_plus->RemovePoint(0);
74 gMB_min->RemovePoint(0);
75 gMB_min->RemovePoint(0);
76 gHT1_min->RemovePoint(0);
77 gHT1_min->RemovePoint(0);
78 gHT1_min->RemovePoint(0);
79 gHT1_min->RemovePoint(0);
80 gHT2_min->RemovePoint(0);
81 gHT2_min->RemovePoint(0);
82 gHT2_min->RemovePoint(0);
83 gHT2_min->RemovePoint(0);
84 gHT2_min->RemovePoint(0);
85 gHT2_min->RemovePoint(0);
87 TF1 *fit=
new TF1(
"fit",
"[0]+[1]*exp([2]*x)",1.,15.);
88 fit->SetParameters(0.,1.,-1.);
89 TF1 *fit2=
new TF1(
"fit2",
"[0]+[1]*exp([2]*x)",1.,15.);
90 fit2->SetParameters(0.,1.,-1.);
116 TLegend *leg=
new TLegend(0.5,0.5,0.7,0.7);
117 leg->AddEntry(gMB_plus,
"minimum bias, BSMD E scale +10%",
"p");
118 leg->AddEntry(gHT1_plus,
"hightower 1",
"p");
119 leg->AddEntry(gHT2_plus,
"hightower 2",
"p");
120 leg->AddEntry(gMB_min,
"BSMD E scale -10%",
"p");
123 c->SaveAs(
"bsmd_escale_pp.eps");
124 c->SaveAs(
"bsmd_escale_pp.root");