BOSS
7.0.7
BESIII Offline Software System
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
x
z
Typedefs
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
v
Enumerations
Enumerator
a
b
c
d
e
f
i
k
l
m
n
o
p
r
s
t
u
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
Enumerations
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Related Functions
:
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
w
x
Files
File List
File Members
All
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
!
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
p
q
r
s
t
u
v
w
z
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
w
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
draw_separation.cxx
Go to the documentation of this file.
1
void
draw_separation
(){
2
3
int
step = 3;
4
if
(step == 1){
5
TFile *
f
=
new
TFile(
"pion.root"
);
6
TTree *
t
= (TTree*)
f
->Get(
"n103"
);
7
8
TFile *f_save =
new
TFile(
"figs/histo.root"
,
"recreate"
);
9
TH2F *vec_h[5];
10
for
(
int
i=0; i<5; i++){
11
vec_h[i] =
new
TH2F(Form(
"h%d"
,i), Form(
"h%d"
,i), 100, 0., 1.5, 100, 0., 20.);
12
}
13
14
for
(
int
j=0; j<5; j++){
15
cout << j <<
" th project"
<< endl;
16
t
->Project(Form(
"h%d"
,j), Form(
"abs(expectid[2]-expectid[%d])/sqrt(sigmaid[2]*sigmaid[2] + sigmaid[%d]*sigmaid[%d]):ptrk"
, j, j, j));
17
}
18
19
f_save->cd();
20
for
(
int
k=0; k<5; k++) vec_h[k]->
Write
();
21
f_save->Close();
22
}
23
24
else
if
(step == 2){
25
TFile *
f
=
new
TFile(
"figs/histo.root"
,
"update"
);
26
TProfile *vec_p[5];
27
for
(
int
i=0; i<5; i++){
28
TH2F *h_temp = (TH2F*)gDirectory->Get(Form(
"h%d"
,i));
29
vec_p[i] = h_temp->ProfileX();
30
vec_p[i]->Write();
31
delete
h_temp;
32
}
33
f
->Close();
34
}
35
36
else
if
(step == 3){
37
TFile *
f
=
new
TFile(
"figs/histo.root"
,
"update"
);
38
TProfile *vec_p[5];
39
for
(
int
i=0; i<5; i++){
40
vec_p[i] = (TProfile*)
f
->Get(Form(
"h%d_pfx"
,i));
41
}
42
TCanvas *c1 =
new
TCanvas(
"c1"
,
"separation power"
, 10, 10, 800, 642);
43
vec_p[3]->Draw();
44
vec_p[0]->Draw(
"same"
);
45
vec_p[4]->Draw(
"same"
);
46
c1->SaveAs(
"figs/sepa.C"
);
47
f
->Close();
48
}
49
50
}
Write
curve Write()
t
TTree * t
Definition:
binning.cxx:23
draw_separation
void draw_separation()
Definition:
draw_separation.cxx:1
f
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
source
Mdc
DedxCalibAlg
DedxCalibAlg-00-01-20
share
template
Simulation
hadron_track
pion
draw_separation.cxx
Generated by
1.9.6