goodness.C
Go to the documentation of this file.
2 {
3  gStyle->SetOptStat(0);
4 
5  TCut rsqr1("sqrt((xf-xmc)**2+(yf-ymc)**2+(zf-zmc)**2)<10");
6  TCut rsqr2("sqrt((xf-xmc)**2+(yf-ymc)**2+(zf-zmc)**2)<50");
7  TCut rsqr3("sqrt((xf-xmc)**2+(yf-ymc)**2+(zf-zmc)**2)>50");
8 
9  TCut badf("e/(nhit-3-2*m)>15&&sumvia/nhit<0.5");
10 
11  TCanvas* c1 = new TCanvas("c1","c1",800,800);
12  c1->Divide(2,2);
13  c1->cd(1);
14  gPad->SetLogy();
15  TH1F* h11 = new TH1F("h11",";E/DoF;Events",70,0.0,70);
16  TH1F* h12 = new TH1F("h12",";E/DoF;Events",70,0.0,70);
17  TH1F* h13 = new TH1F("h13",";E/DoF;Events",70,0.0,70);
18  nt->Project("h11","e/(nhit-3-2*m)",rsqr1);
19  nt->Project("h12","e/(nhit-3-2*m)",rsqr2&&!rsqr1);
20  nt->Project("h13","e/(nhit-3-2*m)",rsqr3);
21  h11->SetMinimum(0.5);
22  h11->Draw();
23  h12->SetLineColor(kOrange);
24  h12->Draw("same");
25  h13->SetLineColor(kRed);
26  h13->Draw("same");
27 
28  c1->cd(2);
29  TH2F* h2 = new TH2F("h2",
30  "h2;#Sigma V_{ia} / N_{hit};E/DoF",
31  50,0,1,
32  70,0,70);
33  h2->Draw();
34  nt->SetMarkerColor(kBlack);
35  nt->SetMarkerStyle(20);
36  nt->SetMarkerSize(0.6);
37  nt->Draw("e/(nhit-3-2*m):sumvia/nhit","","same");
38 
39  c1->cd(4);
40  gPad->SetLogy(1);
41  TH1F* h31 = new TH1F("h31",
42  "h31;#Sigma V_{ia} / N_{hit}",
43  50,0,1);
44  TH1F* h32 = new TH1F("h32",
45  "h31;#Sigma V_{ia} / N_{hit}",
46  50,0,1);
47  TH1F* h33 = new TH1F("h33",
48  "h31;#Sigma V_{ia} / N_{hit}",
49  50,0,1);
50  nt->Project("h31","sumvia/nhit",rsqr1);
51  nt->Project("h32","sumvia/nhit",rsqr2&&!rsqr1);
52  nt->Project("h33","sumvia/nhit",rsqr3);
53  h31->SetMinimum(0.5);
54  h31->Draw();
55  h32->SetLineColor(kOrange);
56  h32->Draw("same");
57  h33->SetLineColor(kRed);
58  h33->Draw("same");
59 }
60 ////////////////////////////////////////////////////////////////////////
61 
goodness()
Definition: goodness.C:1
TH1F * h2
Definition: plot.C:45
TH1F * h11
Definition: plot.C:43
TH1D * h13
Definition: plot_hist.C:28
TH1D * h12
Definition: plot_hist.C:27
c1
Definition: demo5.py:24
TNtuple * nt
Definition: drawXsec.C:2