11 (ea/a)*(ea/a) + (eb/b)*(eb/b)
21 return sqrt(r*(1-r)/b);
29 TH1D *h = h1->Clone(hname);
30 int nbin = h->GetNbinsX();
31 for(
int ibin=1; ibin<=nbin; ++ibin) {
32 double a = h1->GetBinContent(ibin);
33 double b = h2->GetBinContent(ibin);
36 h->SetBinContent(ibin, r);
37 h->SetBinError(ibin, e);
46 float y[] = { 43.0, 23.6, 11.6};
47 float x[] = { 0, 2, 3};
49 float y_error[] = { 0, 0, 0, 0, 0, 0};
50 float x_error[] = { 0, 0, 0, 0, 0, 0};
52 for(
int i=0;i<n;++i) {
53 y_error[i] = 0.1*y[i];
56 TCanvas *c0 =
new TCanvas(
"drawTimeNumber",
"drawTimeNumber");
57 TGraphErrors* gr =
new TGraphErrors(n, x, y, x_error, y_error);
58 gr->SetTitle(
";DS level ; Time/event [sec.]");
59 gr->SetMarkerStyle(20);
70 float y[] = { 0.074, 0.207, 0.913, 5.503, 10.950, 46.440};
71 float y_error[] = { 0, 0, 0, 0, 0, 0};
72 float x[] = { 1, 2, 5, 8, 10, 20};
73 float x_error[] = { 0, 0, 0, 0, 0, 0};
75 for(
int i=0;i<n;++i) {
77 y_error[i] = 0.1*y[i];
80 TCanvas *c0 =
new TCanvas(
"drawTimeMul",
"drawTimeMul");
81 TGraphErrors* gr =
new TGraphErrors(n, x, y, x_error, y_error);
82 gr->SetTitle(
";multiplicity ; Time/event/particle [sec.]");
83 gr->SetMarkerStyle(20);
87 TF1 *fpol =
new TF1(
"fpol",
"[0]*pow(x,[1])+[2]");
98 "no_event_reducer/T7_2_res222_ds0_200/ktracker_ana.root",
99 "no_event_reducer/T7_2_res222_ds2_200/ktracker_ana.root"
105 float y[] = { 0, 0, 0, 0, 0, 0};
106 float y_error[] = { 0, 0, 0, 0, 0, 0};
107 float x_error[] = { 0, 0, 0, 0, 0, 0};
109 for(
int i=0;i<n;++i) {
110 TFile *f = TFile::Open(inputs[i],
"read");
111 TH1D *h =
new TH1D(
"h",
"h",50,-0.5,49.5);
112 TNtuple *T = (TNtuple*) f->Get(
"Event");
113 T->Project(
"h",name,cut);
115 y_error[i] = h->GetMeanError();
118 TCanvas *c0 =
new TCanvas(name, name);
121 TGraphErrors* gr =
new TGraphErrors(n, x, y, x_error, y_error);
122 gr->SetTitle(
";DS Level ; Time/event [sec.]");
123 gr->SetMarkerStyle(20);
127 gr->GetXaxis()->SetRangeUser(-1,4);
136 "batch1/mu1/trk_eval.root",
137 "batch1/mu2/trk_eval.root",
138 "batch1/mu5/trk_eval.root",
139 "batch1/mu8/trk_eval.root",
140 "batch1/mu10/trk_eval.root",
141 "batch1/mu20/trk_eval.root"
144 float y[] = { 0, 0, 0, 0, 0, 0};
145 float y_error[] = { 0, 0, 0, 0, 0, 0};
146 float x[] = { 1, 2, 5, 8, 10,20};
147 float x_error[] = { 0, 0, 0, 0, 0, 0};
149 for(
int i=0;i<n;++i) {
150 TFile *f = TFile::Open(inputs[i],
"read");
151 TH1D *h =
new TH1D(
"h",
"h",2,-0.5,1.5);
152 T->Project(
"h",
"ntruhits>0",
"gndc>=18");
154 y_error[i] = h->GetMeanError();
157 TCanvas *c0 =
new TCanvas(
"drawEffMul",
"drawEffMul");
158 TGraphErrors* gr =
new TGraphErrors(n, x, y, x_error, y_error);
159 gr->SetTitle(
";multiplicity ; Eff.");
160 gr->SetMarkerStyle(20);
171 "st123/0.0cm/trk_eval.root"
172 ,
"st123/.15cm/trk_eval.root"
173 ,
"st123/0.1cm/trk_eval.root"
174 ,
"st123/0.2cm/trk_eval.root"
175 ,
"st123/0.5cm/trk_eval.root"
176 ,
"st123/1.0cm/trk_eval.root"
179 float y[] = { 0, 0, 0, 0, 0, 0};
180 float y_error[] = { 0, 0, 0, 0, 0, 0};
181 float x[] = { 0, 0.1, 0.15, 0.2, 0.5, 1};
182 float x_error[] = { 0, 0, 0, 0, 0, 0};
184 for(
int i=0;i<n;++i) {
185 TFile *f = TFile::Open(inputs[i],
"read");
186 TH1D *h =
new TH1D(
"h",
"h",2,-0.5,1.5);
187 T->Project(
"h",
"ntruhits>0",
"gndc>=18");
189 y_error[i] = h->GetMeanError();
192 TCanvas *c0 =
new TCanvas(
"drawEffDS123Survey",
"drawEffDS123Survey");
194 TGraphErrors* gr =
new TGraphErrors(n, x, y, x_error, y_error);
195 gr->SetTitle(
"; X0 shift [cm] ; Eff.");
196 gr->SetMarkerStyle(20);
204 const char* tree =
"T",
205 const char* var =
"pz<500",
206 const char* cut =
"krecstat!=-1&&gndc>=18"
214 "emb1_ds0_er1/trk_eval.root",
215 "emb1_ds2_er1/trk_eval.root"
218 float x[] = { 1, 2, 3, 4};
220 float x_error[] = { 0, 0, 0, 0, 0, 0};
221 float y[] = { 0, 0, 0, 0, 0, 0};
222 float y_error[] = { 0, 0, 0, 0, 0, 0};
224 float ref_mean = 1.0;
226 for(
int i=0;i<n;++i) {
227 TFile *f = TFile::Open(inputs[i],
"read");
228 TH1D *h =
new TH1D(
"h",
"h",2,-0.5,1.5);
229 TTree *T = (TTree*) f->Get(tree);
230 T->Project(
"h", var, cut);
232 y[i] = h->GetMean()/ref_mean;
233 y_error[i] = h->GetMeanError()/ref_mean;
236 TCanvas *c0 =
new TCanvas(
"EffDSLevel",
"EffDSLevel");
238 TGraphErrors* gr =
new TGraphErrors(n, x, y, x_error, y_error);
239 gr->SetTitle(
"; Category; Eff.");
240 gr->SetMarkerStyle(20);
244 gr->GetXaxis()->SetRangeUser(-1,6);
253 "st23/0.0cm/trk_eval.root"
254 ,
"st23/0.5cm/trk_eval.root"
255 ,
"st23/1.0cm/trk_eval.root"
256 ,
"st23/2.0cm/trk_eval.root"
259 float y[] = { 0, 0, 0, 0, 0, 0};
260 float y_error[] = { 0, 0, 0, 0, 0, 0};
261 float x[] = { 0, 0.5, 1, 2};
262 float x_error[] = { 0, 0, 0, 0, 0, 0};
264 for(
int i=0;i<n;++i) {
265 TFile *f = TFile::Open(inputs[i],
"read");
266 TH1D *h =
new TH1D(
"h",
"h",2,-0.5,1.5);
267 T->Project(
"h",
"ntruhits>0",
"gndc>=18");
269 y_error[i] = h->GetMeanError();
272 TCanvas *c0 =
new TCanvas(
"drawEffDS23Survey",
"drawEffDS23Survey");
274 TGraphErrors* gr =
new TGraphErrors(n, x, y, x_error, y_error);
275 gr->SetTitle(
"; X0 shift [cm] ; Eff.");
276 gr->SetMarkerStyle(20);
TH1D * getEffHist(const char *hname, const TH1D *h1, const TH1D *h2)
void drawEffDSLevel(const char *tree="T", const char *var="pz<500", const char *cut="krecstat!=-1&&gndc>=18")
double binom_error(const double a, const double b)
void drawEffDS123Survey()
void drawTimeAna(const char *name, const char *cut)
double ratio_error(const double a, const double b, const double ea, const double eb)