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
162c9f3e
Commit
162c9f3e
authored
Aug 01, 2017
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SaveEpsilonYHist() implemented
parent
dd7078c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
15 deletions
+55
-15
BeAnalysis.cpp
Be/BeAnalysis.cpp
+51
-14
BeAnalysis.h
Be/BeAnalysis.h
+4
-1
No files found.
Be/BeAnalysis.cpp
View file @
162c9f3e
...
@@ -252,11 +252,24 @@ void BeAnalysis::InitHistos() {
...
@@ -252,11 +252,24 @@ void BeAnalysis::InitHistos() {
}
}
void
BeAnalysis
::
SaveSpectrumHist
(
Int_t
i
)
{
void
BeAnalysis
::
SaveSpectrumHist
(
Int_t
chain
)
{
TFile
fw
(
"figures/spectra.root"
,
"UPDATE"
);
TFile
fw
(
"figures/spectra.root"
,
"UPDATE"
);
if
(
heSpectra
[
i
]
!=
0
)
heSpectra
[
i
]
->
Write
();
if
(
hsSpectra
[
i
]
!=
0
)
hsSpectra
[
i
]
->
Write
();
TString
hName
;
if
(
heSpectra
[
chain
]
!=
0
)
{
hName
.
Form
(
"heSpectrum%d%d"
,
kMinAngle
,
kMaxAngle
);
heSpectra
[
chain
]
->
SetName
(
hName
.
Data
());
heSpectra
[
chain
]
->
Write
();
Info
(
"BeAnalysis::SaveSpectrumHist"
,
"Histogram saved."
);
}
if
(
hsSpectra
[
chain
]
!=
0
)
{
hName
.
Form
(
"hsSpectrum%d%d"
,
kMinAngle
,
kMaxAngle
);
hsSpectra
[
chain
]
->
SetName
(
hName
.
Data
());
hsSpectra
[
chain
]
->
Write
();
Info
(
"BeAnalysis::SaveSpectrumHist"
,
"Histogram saved."
);
}
fw
.
Close
();
fw
.
Close
();
}
}
...
@@ -302,6 +315,26 @@ void BeAnalysis::SaveCosThetaTHist(Int_t interval, Int_t chain) {
...
@@ -302,6 +315,26 @@ void BeAnalysis::SaveCosThetaTHist(Int_t interval, Int_t chain) {
}
}
void
BeAnalysis
::
SaveEpsilonYHist
(
Int_t
interval
,
Int_t
chain
)
{
TFile
fw
(
"figures/epsilonY.root"
,
"UPDATE"
);
if
(
heeY
[
interval
][
chain
]
!=
0
)
{
heeY
[
interval
][
chain
]
->
Write
();
Info
(
"BeAnalysis::SaveEpsilonYHist"
,
"Histogram saved."
);
}
if
(
hseY
[
interval
][
chain
]
!=
0
)
{
hseY
[
interval
][
chain
]
->
Write
();
Info
(
"BeAnalysis::SaveEpsilonYHist"
,
"Histogram saved."
);
}
if
(
hieY
[
interval
][
chain
]
!=
0
)
{
hieY
[
interval
][
chain
]
->
Write
();
Info
(
"BeAnalysis::SaveEpsilonYHist"
,
"Histogram saved."
);
}
fw
.
Close
();
}
void
BeAnalysis
::
SetCMAngularCuts
()
{
void
BeAnalysis
::
SetCMAngularCuts
()
{
TString
sAngles
,
srAngles
;
TString
sAngles
,
srAngles
;
...
@@ -349,8 +382,8 @@ void BeAnalysis::Spectra() {
...
@@ -349,8 +382,8 @@ void BeAnalysis::Spectra() {
if
(
!
kChains
[
j
])
continue
;
if
(
!
kChains
[
j
])
continue
;
// cout << kChains[j] << endl;
// cout << kChains[j] << endl;
cSpectra
->
cd
(
j
+
1
);
cSpectra
->
cd
(
j
+
1
);
chs
[
j
]
->
SetLineColor
(
kBlue
);
//
chs[j]->SetLineColor(kBlue);
chs
[
j
]
->
SetFillColor
(
kWhite
);
//
chs[j]->SetFillColor(kWhite);
hsName
.
Form
(
"hsSpectra%d"
,
j
);
hsName
.
Form
(
"hsSpectra%d"
,
j
);
hsSpectra
[
j
]
=
new
TH1F
(
hsName
.
Data
(),
cAngles
.
GetTitle
(),
noBinsSpectra
,
0
,
10
);
hsSpectra
[
j
]
=
new
TH1F
(
hsName
.
Data
(),
cAngles
.
GetTitle
(),
noBinsSpectra
,
0
,
10
);
// drawCommand.Form("f6BeIM>>%s(200,0,10)", hsName.Data());
// drawCommand.Form("f6BeIM>>%s(200,0,10)", hsName.Data());
...
@@ -593,7 +626,7 @@ void BeAnalysis::CosThetaTk() {
...
@@ -593,7 +626,7 @@ void BeAnalysis::CosThetaTk() {
// hecoskT[i][j] = (TH1F*)gPad->FindObject(heName.Data());
// hecoskT[i][j] = (TH1F*)gPad->FindObject(heName.Data());
hscoskT
[
i
][
j
]
->
Draw
();
hscoskT
[
i
][
j
]
->
Draw
();
hscoskT
[
i
][
j
]
->
SetTitle
(
""
);
//
hscoskT[i][j]->SetTitle("");
hscoskT
[
i
][
j
]
->
SetXTitle
(
"
\\
cos
\\
theta_k"
);
hscoskT
[
i
][
j
]
->
SetXTitle
(
"
\\
cos
\\
theta_k"
);
// hseT[i][j]->GetXaxis()->SetTitleOffset(0.95);
// hseT[i][j]->GetXaxis()->SetTitleOffset(0.95);
// hseT[i][j]->GetXaxis()->SetTitleSize(0.11);
// hseT[i][j]->GetXaxis()->SetTitleSize(0.11);
...
@@ -679,20 +712,23 @@ void BeAnalysis::EpsilonY() {
...
@@ -679,20 +712,23 @@ void BeAnalysis::EpsilonY() {
for
(
Int_t
j
=
0
;
j
<
6
;
j
++
)
{
//different files
for
(
Int_t
j
=
0
;
j
<
6
;
j
++
)
{
//different files
if
(
!
kChains
[
j
])
continue
;
if
(
!
kChains
[
j
])
continue
;
canEpsilonY
[
i
]
->
cd
(
j
+
1
);
canEpsilonY
[
i
]
->
cd
(
j
+
1
);
chs
[
j
]
->
SetLineColor
(
kGray
+
1
);
chs
[
j
]
->
SetFillColor
(
kGray
+
1
);
hsName
.
Form
(
"hseY%d_%d"
,
i
,
j
);
hsName
.
Form
(
"hseY%d_%d"
,
i
,
j
);
hseY
[
i
][
j
]
=
new
TH1F
(
hsName
.
Data
(),
cAngles
.
GetTitle
(),
noBinsCorr
,
0.
,
1.
);
hseY
[
i
][
j
]
=
new
TH1F
(
hsName
.
Data
(),
cAngles
.
GetTitle
(),
noBinsCorr
,
0.
,
1.
);
drawCommand
.
Form
(
"fTap/f6BeIM>>%s(50,0,1)"
,
hsName
.
Data
());
hseY
[
i
][
j
]
->
SetLineColor
(
kGray
+
1
);
hseY
[
i
][
j
]
->
SetFillColor
(
kGray
+
1
);
drawCommand
.
Form
(
"fTap/f6BeIM>>%s"
,
hsName
.
Data
());
chs
[
j
]
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
crBeE
[
i
]
&&
crAngles
&&
sRatio
[
j
],
""
,
sEvents
[
j
]);
chs
[
j
]
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
crBeE
[
i
]
&&
crAngles
&&
sRatio
[
j
],
""
,
sEvents
[
j
]);
// hseY[i][j] = (TH1F*)gPad->FindObject(hsName.Data());
// hseY[i][j] = (TH1F*)gPad->FindObject(hsName.Data());
heName
.
Form
(
"heeY%d_%d"
,
i
,
j
);
heName
.
Form
(
"heeY%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"fTap/fBeIM>>%s(50,0,1)"
,
heName
.
Data
());
heeY
[
i
][
j
]
=
new
TH1F
(
heName
.
Data
(),
cAngles
.
GetTitle
(),
noBinsCorr
,
0.
,
1.
);
drawCommand
.
Form
(
"fTap/fBeIM>>%s"
,
heName
.
Data
());
che
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
cBeE
[
i
]
&&
cAngles
,
"E same"
,
eEvents
[
j
]);
che
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
cBeE
[
i
]
&&
cAngles
,
"E same"
,
eEvents
[
j
]);
heeY
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
heName
.
Data
());
//
heeY[i][j] = (TH1F*)gPad->FindObject(heName.Data());
hseY
[
i
][
j
]
->
Draw
();
hseY
[
i
][
j
]
->
Draw
();
hseY
[
i
][
j
]
->
SetTitle
(
""
);
//
hseY[i][j]->SetTitle("");
hseY
[
i
][
j
]
->
SetXTitle
(
"
\\
varepsilon"
);
hseY
[
i
][
j
]
->
SetXTitle
(
"
\\
varepsilon"
);
// hseT[i][j]->GetXaxis()->SetTitleOffset(0.95);
// hseT[i][j]->GetXaxis()->SetTitleOffset(0.95);
// hseT[i][j]->GetXaxis()->SetTitleSize(0.11);
// hseT[i][j]->GetXaxis()->SetTitleSize(0.11);
...
@@ -714,9 +750,10 @@ void BeAnalysis::EpsilonY() {
...
@@ -714,9 +750,10 @@ void BeAnalysis::EpsilonY() {
canEpsilonY
[
i
]
->
Update
();
canEpsilonY
[
i
]
->
Update
();
hiName
.
Form
(
"hieY%d_%d"
,
i
,
j
);
hiName
.
Form
(
"hieY%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"sTap/E_IM>>%s(50,0,1)"
,
hiName
.
Data
());
hieY
[
i
][
j
]
=
new
TH1F
(
hiName
.
Data
(),
cAngles
.
GetTitle
(),
noBinsCorr
,
0.
,
1.
);
drawCommand
.
Form
(
"sTap/E_IM>>%s"
,
hiName
.
Data
());
ti
[
j
]
->
Draw
(
drawCommand
.
Data
(),
ciBeE
[
i
]
&&
sRatio
[
j
],
"same"
);
ti
[
j
]
->
Draw
(
drawCommand
.
Data
(),
ciBeE
[
i
]
&&
sRatio
[
j
],
"same"
);
hieY
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
hiName
.
Data
());
//
hieY[i][j] = (TH1F*)gPad->FindObject(hiName.Data());
Float_t
rightmax
=
1.1
*
hieY
[
i
][
j
]
->
GetMaximum
();
Float_t
rightmax
=
1.1
*
hieY
[
i
][
j
]
->
GetMaximum
();
Float_t
scale
=
canEpsilonY
[
i
]
->
GetPad
(
j
+
1
)
->
GetUymax
()
/
rightmax
;
Float_t
scale
=
canEpsilonY
[
i
]
->
GetPad
(
j
+
1
)
->
GetUymax
()
/
rightmax
;
hieY
[
i
][
j
]
->
SetLineColor
(
kRed
);
hieY
[
i
][
j
]
->
SetLineColor
(
kRed
);
...
...
Be/BeAnalysis.h
View file @
162c9f3e
...
@@ -77,10 +77,13 @@ public:
...
@@ -77,10 +77,13 @@ public:
void
SetFigures
(
TString
figPath
=
"figures/"
,
TString
figFormat
=
".eps"
,
Bool_t
kSave
=
1
);
void
SetFigures
(
TString
figPath
=
"figures/"
,
TString
figFormat
=
".eps"
,
Bool_t
kSave
=
1
);
void
SaveSpectrumHist
(
Int_t
i
);
void
SaveSpectrumHist
(
Int_t
chain
);
void
SaveEpsilonTHist
(
Int_t
interval
,
Int_t
chain
);
void
SaveEpsilonTHist
(
Int_t
interval
,
Int_t
chain
);
void
SaveCosThetaTHist
(
Int_t
interval
,
Int_t
chain
);
void
SaveCosThetaTHist
(
Int_t
interval
,
Int_t
chain
);
void
SaveEpsilonYHist
(
Int_t
interval
,
Int_t
chain
);
//
//
private
:
private
:
...
...
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