Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Be_libraries
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vratislav Chudoba
Be_libraries
Commits
3edca5dd
Commit
3edca5dd
authored
Jul 21, 2017
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CosThetaTk() and EpsilonY() implemented.
parent
5e0723a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
194 additions
and
1 deletion
+194
-1
BeAnalysis.cpp
Be/BeAnalysis.cpp
+187
-0
BeAnalysis.h
Be/BeAnalysis.h
+2
-0
lib_test.cxx
macros/BeCorrPRC/lib_test.cxx
+5
-1
No files found.
Be/BeAnalysis.cpp
View file @
3edca5dd
...
...
@@ -30,6 +30,23 @@ BeAnalysis::BeAnalysis() : che(0), spectra(1) {
epsilonT
[
0
]
=
1
;
epsilonT
[
2
]
=
1
;
cosThetaT
=
new
Bool_t
[
noIntervals
];
for
(
Int_t
i
=
0
;
i
<
noIntervals
;
i
++
)
{
cosThetaT
[
i
]
=
0
;
}
cosThetaT
[
0
]
=
1
;
cosThetaT
[
2
]
=
1
;
cosThetaT
[
4
]
=
1
;
epsilonY
=
new
Bool_t
[
noIntervals
];
for
(
Int_t
i
=
0
;
i
<
noIntervals
;
i
++
)
{
epsilonY
[
i
]
=
0
;
}
epsilonY
[
0
]
=
1
;
epsilonY
[
2
]
=
1
;
kVerbose
=
1
;
kRangeProportionIn
=
2.0
;
...
...
@@ -483,9 +500,179 @@ void BeAnalysis::EpsilonT() {
void
BeAnalysis
::
CosThetaTk
()
{
TCanvas
*
cThetaT
[
noIntervals
];
for
(
Int_t
i
=
0
;
i
<
noIntervals
;
i
++
)
{
//energy intervals (canvases)
TH1F
*
hscoskT
[
noIntervals
][
6
];
TH1F
*
hecoskT
[
noIntervals
][
6
];
TH1F
*
hicoskT
[
noIntervals
][
6
];
if
(
!
cosThetaT
[
i
])
continue
;
// {
cThetaT
[
i
]
=
new
TCanvas
();
canvasTitle
.
Form
(
"cos thetak in %s T-system;
\t
(%d,%d) degrees"
,
(
const
char
*
)
cBeE
[
i
],
kMinAngle
,
kMaxAngle
);
cThetaT
[
i
]
->
SetTitle
(
canvasTitle
.
Data
());
cThetaT
[
i
]
->
Divide
(
2
,
3
);
che
->
SetLineColor
(
kBlack
);
for
(
Int_t
j
=
0
;
j
<
6
;
j
++
)
{
//different files
if
(
!
kChains
[
j
])
continue
;
cThetaT
[
i
]
->
cd
(
j
+
1
);
chs
[
j
]
->
SetLineColor
(
kGray
+
1
);
chs
[
j
]
->
SetFillColor
(
kGray
+
1
);
hsName
.
Form
(
"hscoskT%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"fCosThetaTk>>%s(50,-1,1)"
,
hsName
.
Data
());
chs
[
j
]
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
crBeE
[
i
]
&&
crAngles
&&
sRatio
[
j
],
""
,
sEventsECuts
[
i
][
j
]);
hscoskT
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
hsName
.
Data
());
heName
.
Form
(
"hecoskT%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"fCosThetaTk>>%s(50,-1,1)"
,
heName
.
Data
());
che
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
cBeE
[
i
]
&&
cAngles
,
"E same"
,
eEventsECuts
[
i
][
j
]);
hecoskT
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
heName
.
Data
());
hscoskT
[
i
][
j
]
->
Draw
();
// hscoskT[i][j]->GetYaxis()->SetRangeUser(0, coskTRange[i][j]);
hecoskT
[
i
][
j
]
->
Draw
(
"E same"
);
if
(
kAutoRange
)
{
Float_t
leftMaxMC
=
kRangeProportion
*
hecoskT
[
i
][
j
]
->
GetMaximum
();
Float_t
leftMaxE
=
kRangeProportion
*
hscoskT
[
i
][
j
]
->
GetMaximum
();
hscoskT
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxE
);
leftMaxMC
>
leftMaxE
?
hscoskT
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxMC
)
:
hscoskT
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxE
);
}
else
{
hscoskT
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
eTRange
[
i
][
j
]);
}
cThetaT
[
i
]
->
Update
();
hiName
.
Form
(
"hicoskT%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"sCosThetaTk>>%s(50,0,1)"
,
hiName
.
Data
());
ti
[
j
]
->
Draw
(
drawCommand
.
Data
(),
ciBeE
[
i
]
&&
sRatio
[
j
],
"same"
);
hicoskT
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
hiName
.
Data
());
Float_t
rightmax
=
1.1
*
hicoskT
[
i
][
j
]
->
GetMaximum
();
Float_t
scale
=
cThetaT
[
i
]
->
GetPad
(
j
+
1
)
->
GetUymax
()
/
rightmax
;
hicoskT
[
i
][
j
]
->
SetLineColor
(
kRed
);
hicoskT
[
i
][
j
]
->
Scale
(
scale
);
//draw an axis on the right side
TGaxis
*
axis
=
new
TGaxis
(
gPad
->
GetUxmax
(),
gPad
->
GetUymin
(),
gPad
->
GetUxmax
(),
gPad
->
GetUymax
(),
0
,
rightmax
,
510
,
"+L"
);
axis
->
SetLineColor
(
kRed
);
axis
->
SetLabelColor
(
kRed
);
axis
->
Draw
();
cThetaT
[
i
]
->
Update
();
if
(
kVerbose
)
{
Info
(
"sfAngInt_cosThetaTk.cxx"
,
"cut%d; case%d: %3.1f (exp)/ %3.1f (sim) = %3.3f"
,
i
,
j
,
hecoskT
[
i
][
j
]
->
Integral
(
0
,
hecoskT
[
i
][
j
]
->
GetNbinsX
()),
hscoskT
[
i
][
j
]
->
Integral
(
0
,
hscoskT
[
i
][
j
]
->
GetNbinsX
()),
hecoskT
[
i
][
j
]
->
Integral
(
0
,
hecoskT
[
i
][
j
]
->
GetNbinsX
())
/
hscoskT
[
i
][
j
]
->
Integral
(
0
,
hscoskT
[
i
][
j
]
->
GetNbinsX
())
);
}
}
//for j
/*if (savePictures) {
canvasName.Form("%sfig%dcosThetakT:%s%s", ppath.Data(), i, configuration.Data(), pictFormat.Data());
cThetaT[i]->SaveAs(canvasName.Data());
cThetaT[i]->cd();
cThetaT[i]->Close();
}*/
// }//if
}
//for i
}
void
BeAnalysis
::
EpsilonY
()
{
TCanvas
*
canEpsilonY
[
noIntervals
];
for
(
Int_t
i
=
0
;
i
<
noIntervals
;
i
++
)
{
//energy intervals (canvases)
TH1F
*
hseY
[
noIntervals
][
6
];
TH1F
*
heeY
[
noIntervals
][
6
];
TH1F
*
hieY
[
noIntervals
][
6
];
if
(
!
epsilonY
[
i
])
continue
;
// {
canEpsilonY
[
i
]
=
new
TCanvas
();
canvasTitle
.
Form
(
"epsilon in %s Y-system;
\t
(%d,%d) degrees"
,
(
const
char
*
)
cBeE
[
i
],
kMinAngle
,
kMaxAngle
);
canEpsilonY
[
i
]
->
SetTitle
(
canvasTitle
.
Data
());
canEpsilonY
[
i
]
->
Divide
(
2
,
3
);
che
->
SetLineColor
(
kBlack
);
for
(
Int_t
j
=
0
;
j
<
6
;
j
++
)
{
//different files
canEpsilonY
[
i
]
->
cd
(
j
+
1
);
chs
[
j
]
->
SetLineColor
(
kGray
+
1
);
chs
[
j
]
->
SetFillColor
(
kGray
+
1
);
hsName
.
Form
(
"hseY%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"fTap/f6BeIM>>%s(50,0,1)"
,
hsName
.
Data
());
chs
[
j
]
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
crBeE
[
i
]
&&
crAngles
&&
sRatio
[
j
],
""
,
sEvents
[
j
]);
hseY
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
hsName
.
Data
());
heName
.
Form
(
"heeY%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"fTap/fBeIM>>%s(50,0,1)"
,
heName
.
Data
());
che
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
cBeE
[
i
]
&&
cAngles
,
"E same"
,
eEvents
[
j
]);
heeY
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
heName
.
Data
());
hseY
[
i
][
j
]
->
Draw
();
heeY
[
i
][
j
]
->
Draw
(
"E same"
);
if
(
kAutoRange
)
{
Float_t
leftMaxMC
=
kRangeProportion
*
heeY
[
i
][
j
]
->
GetMaximum
();
Float_t
leftMaxE
=
kRangeProportion
*
hseY
[
i
][
j
]
->
GetMaximum
();
hseY
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxE
);
leftMaxMC
>
leftMaxE
?
hseY
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxMC
)
:
hseY
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxE
);
}
else
{
hseY
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
eTRange
[
i
][
j
]);
}
canEpsilonY
[
i
]
->
Update
();
// ti[j]->Draw("sTap/E_IM", ciBeE[i] && sRatio[j], "same", iEvents[j]);
hiName
.
Form
(
"hieY%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"sTap/E_IM>>%s(50,0,1)"
,
hiName
.
Data
());
ti
[
j
]
->
Draw
(
drawCommand
.
Data
(),
ciBeE
[
i
]
&&
sRatio
[
j
],
"same"
);
hieY
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
hiName
.
Data
());
Float_t
rightmax
=
1.1
*
hieY
[
i
][
j
]
->
GetMaximum
();
Float_t
scale
=
canEpsilonY
[
i
]
->
GetPad
(
j
+
1
)
->
GetUymax
()
/
rightmax
;
hieY
[
i
][
j
]
->
SetLineColor
(
kRed
);
hieY
[
i
][
j
]
->
Scale
(
scale
);
//draw an axis on the right side
TGaxis
*
axis
=
new
TGaxis
(
gPad
->
GetUxmax
(),
gPad
->
GetUymin
(),
gPad
->
GetUxmax
(),
gPad
->
GetUymax
(),
0
,
rightmax
,
510
,
"+L"
);
axis
->
SetLineColor
(
kRed
);
axis
->
SetLabelColor
(
kRed
);
axis
->
Draw
();
canEpsilonY
[
i
]
->
Update
();
if
(
kVerbose
)
{
Info
(
"sfAngInt_epsilonY.cxx"
,
"cut%d; case%d: %3.1f (exp)/ %3.1f (sim) = %3.3f"
,
i
,
j
,
heeY
[
i
][
j
]
->
Integral
(
0
,
heeY
[
i
][
j
]
->
GetNbinsX
()),
hseY
[
i
][
j
]
->
Integral
(
0
,
hseY
[
i
][
j
]
->
GetNbinsX
()),
heeY
[
i
][
j
]
->
Integral
(
0
,
heeY
[
i
][
j
]
->
GetNbinsX
())
/
hseY
[
i
][
j
]
->
Integral
(
0
,
hseY
[
i
][
j
]
->
GetNbinsX
())
);
}
}
//for j
/*if (savePictures) {
canvasName.Form("%sfig%dEpsilonY:%s%s", ppath.Data(), i, configuration.Data(), pictFormat.Data());
cout << canvasName.Data() << endl;
canEpsilonY[i]->SaveAs(canvasName.Data());
canEpsilonY[i]->cd();
canEpsilonY[i]->Close();
}//if save pictures*/
// }//if
}
//for i
}
void
BeAnalysis
::
CosThetaYk
()
{
...
...
Be/BeAnalysis.h
View file @
3edca5dd
...
...
@@ -67,6 +67,8 @@ private:
Bool_t
kChains
[
6
];
Int_t
noIntervals
;
Bool_t
*
epsilonT
;
//!
Bool_t
*
cosThetaT
;
//!
Bool_t
*
epsilonY
;
//!
Bool_t
kAutoRange
;
Float_t
kRangeProportion
;
...
...
macros/BeCorrPRC/lib_test.cxx
View file @
3edca5dd
...
...
@@ -16,5 +16,9 @@ void lib_test() {
ana
.
ExpEventsECuts
();
ana
.
SimEventsECuts
();
ana
.
EpsilonTRange
();
ana
.
EpsilonT
();
// ana.EpsilonT();
ana
.
CosThetaTk
();
ana
.
EpsilonY
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment