BOSS
7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
CurConst_dEdXCal.cxx
Go to the documentation of this file.
1
2
{
3
4
TFile
f1
(
"../CurConstRoot/DedxCurConst_data_minrun-maxrun_bossversion.root"
,
"recreate"
);
5
TTree *
curve
=
new
TTree(
"curve"
,
"curve parameters"
);
6
TTree*
sigma
=
new
TTree(
"sigma"
,
"sigma parameters"
);
7
8
const
int
size1
=17;
9
const
int
size2
=15;
10
11
Double_t
N_DedxCurve_Parameter
[
size1
];
12
Double_t
N_DedxSigma_Parameter
[
size2
];
13
ifstream
filea
(
"../CurConstRoot/DedxCurConst_data_minrun-maxrun_bossversion.dat"
,ifstream::in);
14
for
(
int
i=0;i<
size1
;i++)
15
{
16
filea
>>
N_DedxCurve_Parameter
[i];
17
cout<<
N_DedxCurve_Parameter
[i]<<endl;
18
}
19
for
(
int
j=0;j<
size2
;j++)
20
{
21
filea
>>
N_DedxSigma_Parameter
[j];
22
cout<<
N_DedxSigma_Parameter
[j]<<endl;
23
}
24
25
26
int
CurveSize
=
sizeof
(
N_DedxCurve_Parameter
)/
sizeof
(
N_DedxCurve_Parameter
[0]);
27
int
SigmaSize
=
sizeof
(
N_DedxSigma_Parameter
)/
sizeof
(
N_DedxSigma_Parameter
[0]);
28
29
30
curve
->Branch(
"CurveSize"
,&
CurveSize
,
"CurveSize/I"
);
31
curve
->Branch(
"curve"
,
N_DedxCurve_Parameter
,
"N_DedxCurve_Parameter[CurveSize]/D"
);
32
curve
->Fill();
33
curve
->Write();
34
sigma
->Branch(
"SigmaSize"
,&
SigmaSize
,
"SigmaSize/I"
);
35
sigma
->Branch(
"sigma"
,
N_DedxSigma_Parameter
,
"N_DedxSigma_Parameter[SigmaSize]/D"
);
36
sigma
->Fill();
37
sigma
->Write();
38
f1
.Close();
39
cout<<
"end"
<<endl;
40
}
41
size2
const int size2
Definition
CurConst_dEdXCal.cxx:9
sigma
TTree * sigma
Definition
CurConst_dEdXCal.cxx:6
filea
ifstream filea("../CurConstRoot/DedxCurConst_data_minrun-maxrun_bossversion.dat", ifstream::in)
N_DedxCurve_Parameter
Double_t N_DedxCurve_Parameter[size1]
Definition
CurConst_dEdXCal.cxx:11
SigmaSize
int SigmaSize
Definition
CurConst_dEdXCal.cxx:27
size1
const int size1
Definition
CurConst_dEdXCal.cxx:8
N_DedxSigma_Parameter
Double_t N_DedxSigma_Parameter[size2]
Definition
CurConst_dEdXCal.cxx:12
curve
TTree * curve
Definition
CurConst_dEdXCal.cxx:5
CurveSize
int CurveSize
Definition
CurConst_dEdXCal.cxx:26
f1
TFile * f1
Definition
DataBase/tau_mode.c:4
7.1.2
Mdc
DedxCalibAlg
DedxCalibAlg-00-02-01
share
template
Curve
draw
CurConst_dEdXCal.cxx
Generated by
1.12.0