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
dd7078c2
Commit
dd7078c2
authored
Aug 01, 2017
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SaveCosThetaTHist() implemented
parent
cc87a0d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
19 deletions
+61
-19
BeAnalysis.cpp
Be/BeAnalysis.cpp
+53
-16
BeAnalysis.h
Be/BeAnalysis.h
+8
-3
No files found.
Be/BeAnalysis.cpp
View file @
dd7078c2
...
@@ -238,6 +238,14 @@ void BeAnalysis::InitHistos() {
...
@@ -238,6 +238,14 @@ void BeAnalysis::InitHistos() {
hseT
[
i
][
j
]
=
0
;
hseT
[
i
][
j
]
=
0
;
heeT
[
i
][
j
]
=
0
;
heeT
[
i
][
j
]
=
0
;
hieT
[
i
][
j
]
=
0
;
hieT
[
i
][
j
]
=
0
;
hscoskT
[
i
][
j
]
=
0
;
hecoskT
[
i
][
j
]
=
0
;
hicoskT
[
i
][
j
]
=
0
;
hseY
[
i
][
j
]
=
0
;
heeY
[
i
][
j
]
=
0
;
hieY
[
i
][
j
]
=
0
;
}
}
}
}
...
@@ -256,6 +264,7 @@ void BeAnalysis::SaveSpectrumHist(Int_t i) {
...
@@ -256,6 +264,7 @@ void BeAnalysis::SaveSpectrumHist(Int_t i) {
void
BeAnalysis
::
SaveEpsilonTHist
(
Int_t
interval
,
Int_t
chain
)
{
void
BeAnalysis
::
SaveEpsilonTHist
(
Int_t
interval
,
Int_t
chain
)
{
TFile
fw
(
"figures/epsilonT.root"
,
"UPDATE"
);
TFile
fw
(
"figures/epsilonT.root"
,
"UPDATE"
);
if
(
heeT
[
interval
][
chain
]
!=
0
)
{
if
(
heeT
[
interval
][
chain
]
!=
0
)
{
heeT
[
interval
][
chain
]
->
Write
();
heeT
[
interval
][
chain
]
->
Write
();
Info
(
"BeAnalysis::SaveEpsilonTHist"
,
"Histogram saved."
);
Info
(
"BeAnalysis::SaveEpsilonTHist"
,
"Histogram saved."
);
...
@@ -272,6 +281,27 @@ void BeAnalysis::SaveEpsilonTHist(Int_t interval, Int_t chain) {
...
@@ -272,6 +281,27 @@ void BeAnalysis::SaveEpsilonTHist(Int_t interval, Int_t chain) {
}
}
void
BeAnalysis
::
SaveCosThetaTHist
(
Int_t
interval
,
Int_t
chain
)
{
TFile
fw
(
"figures/cosThetaT.root"
,
"UPDATE"
);
if
(
hecoskT
[
interval
][
chain
]
!=
0
)
{
hecoskT
[
interval
][
chain
]
->
Write
();
Info
(
"BeAnalysis::SaveCosThetaTHist"
,
"Histogram saved."
);
}
if
(
hscoskT
[
interval
][
chain
]
!=
0
)
{
Info
(
"BeAnalysis::SaveCosThetaTHist"
,
"Histogram saved."
);
hscoskT
[
interval
][
chain
]
->
Write
();
}
if
(
hicoskT
[
interval
][
chain
]
!=
0
)
{
Info
(
"BeAnalysis::SaveCosThetaTHist"
,
"Histogram saved."
);
hicoskT
[
interval
][
chain
]
->
Write
();
}
fw
.
Close
();
}
void
BeAnalysis
::
SetCMAngularCuts
()
{
void
BeAnalysis
::
SetCMAngularCuts
()
{
TString
sAngles
,
srAngles
;
TString
sAngles
,
srAngles
;
...
@@ -527,9 +557,9 @@ void BeAnalysis::CosThetaTk() {
...
@@ -527,9 +557,9 @@ void BeAnalysis::CosThetaTk() {
TCanvas
*
cThetaT
[
noIntervals
];
TCanvas
*
cThetaT
[
noIntervals
];
for
(
Int_t
i
=
0
;
i
<
noIntervals
;
i
++
)
{
//energy intervals (canvases)
for
(
Int_t
i
=
0
;
i
<
noIntervals
;
i
++
)
{
//energy intervals (canvases)
TH1F
*
hscoskT
[
noIntervals
][
6
];
//
TH1F *hscoskT[noIntervals][6];
TH1F
*
hecoskT
[
noIntervals
][
6
];
//
TH1F *hecoskT[noIntervals][6];
TH1F
*
hicoskT
[
noIntervals
][
6
];
//
TH1F *hicoskT[noIntervals][6];
if
(
!
cosThetaT
[
i
])
continue
;
if
(
!
cosThetaT
[
i
])
continue
;
// {
// {
...
@@ -545,16 +575,22 @@ void BeAnalysis::CosThetaTk() {
...
@@ -545,16 +575,22 @@ void BeAnalysis::CosThetaTk() {
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
;
cThetaT
[
i
]
->
cd
(
j
+
1
);
cThetaT
[
i
]
->
cd
(
j
+
1
);
chs
[
j
]
->
SetLineColor
(
kGray
+
1
);
//
chs[j]->SetLineColor(kGray+1);
chs
[
j
]
->
SetFillColor
(
kGray
+
1
);
//
chs[j]->SetFillColor(kGray+1);
hsName
.
Form
(
"hscoskT%d_%d"
,
i
,
j
);
hsName
.
Form
(
"hscoskT%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"fCosThetaTk>>%s(30,-1,1)"
,
hsName
.
Data
());
hscoskT
[
i
][
j
]
=
new
TH1F
(
hsName
.
Data
(),
cAngles
.
GetTitle
(),
noBinsCorr
,
-
1.
,
1.
);
hscoskT
[
i
][
j
]
->
SetLineColor
(
kGray
+
1
);
hscoskT
[
i
][
j
]
->
SetFillColor
(
kGray
+
1
);
drawCommand
.
Form
(
"fCosThetaTk>>%s"
,
hsName
.
Data
());
chs
[
j
]
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
crBeE
[
i
]
&&
crAngles
&&
sRatio
[
j
],
""
,
sEventsECuts
[
i
][
j
]);
chs
[
j
]
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
crBeE
[
i
]
&&
crAngles
&&
sRatio
[
j
],
""
,
sEventsECuts
[
i
][
j
]);
hscoskT
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
hsName
.
Data
());
// hscoskT[i][j] = (TH1F*)gPad->FindObject(hsName.Data());
heName
.
Form
(
"hecoskT%d_%d"
,
i
,
j
);
heName
.
Form
(
"hecoskT%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"fCosThetaTk>>%s(30,-1,1)"
,
heName
.
Data
());
hecoskT
[
i
][
j
]
=
new
TH1F
(
heName
.
Data
(),
cAngles
.
GetTitle
(),
noBinsCorr
,
-
1.
,
1.
);
drawCommand
.
Form
(
"fCosThetaTk>>%s"
,
heName
.
Data
());
// drawCommand.Form("fCosThetaTk>>%s(30,-1,1)", heName.Data());
che
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
cBeE
[
i
]
&&
cAngles
,
"E same"
,
eEventsECuts
[
i
][
j
]);
che
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
cBeE
[
i
]
&&
cAngles
,
"E same"
,
eEventsECuts
[
i
][
j
]);
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
(
""
);
...
@@ -583,9 +619,10 @@ void BeAnalysis::CosThetaTk() {
...
@@ -583,9 +619,10 @@ void BeAnalysis::CosThetaTk() {
hiName
.
Form
(
"hicoskT%d_%d"
,
i
,
j
);
hiName
.
Form
(
"hicoskT%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"sCosThetaTk>>%s(30,0,1)"
,
hiName
.
Data
());
hicoskT
[
i
][
j
]
=
new
TH1F
(
hiName
.
Data
(),
cAngles
.
GetTitle
(),
noBinsCorr
,
-
1.
,
1.
);
drawCommand
.
Form
(
"sCosThetaTk>>%s"
,
hiName
.
Data
());
ti
[
j
]
->
Draw
(
drawCommand
.
Data
(),
ciBeE
[
i
]
&&
sRatio
[
j
],
"same"
);
ti
[
j
]
->
Draw
(
drawCommand
.
Data
(),
ciBeE
[
i
]
&&
sRatio
[
j
],
"same"
);
hicoskT
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
hiName
.
Data
());
//
hicoskT[i][j] = (TH1F*)gPad->FindObject(hiName.Data());
Float_t
rightmax
=
1.1
*
hicoskT
[
i
][
j
]
->
GetMaximum
();
Float_t
rightmax
=
1.1
*
hicoskT
[
i
][
j
]
->
GetMaximum
();
Float_t
scale
=
cThetaT
[
i
]
->
GetPad
(
j
+
1
)
->
GetUymax
()
/
rightmax
;
Float_t
scale
=
cThetaT
[
i
]
->
GetPad
(
j
+
1
)
->
GetUymax
()
/
rightmax
;
hicoskT
[
i
][
j
]
->
SetLineColor
(
kRed
);
hicoskT
[
i
][
j
]
->
SetLineColor
(
kRed
);
...
@@ -625,15 +662,14 @@ void BeAnalysis::EpsilonY() {
...
@@ -625,15 +662,14 @@ void BeAnalysis::EpsilonY() {
TCanvas
*
canEpsilonY
[
noIntervals
];
TCanvas
*
canEpsilonY
[
noIntervals
];
for
(
Int_t
i
=
0
;
i
<
noIntervals
;
i
++
)
{
//energy intervals (canvases)
for
(
Int_t
i
=
0
;
i
<
noIntervals
;
i
++
)
{
//energy intervals (canvases)
TH1F
*
hseY
[
noIntervals
][
6
];
//
TH1F *hseY[noIntervals][6];
TH1F
*
heeY
[
noIntervals
][
6
];
//
TH1F *heeY[noIntervals][6];
TH1F
*
hieY
[
noIntervals
][
6
];
//
TH1F *hieY[noIntervals][6];
if
(
!
epsilonY
[
i
])
continue
;
if
(
!
epsilonY
[
i
])
continue
;
// {
// {
canEpsilonY
[
i
]
=
new
TCanvas
();
canEpsilonY
[
i
]
=
new
TCanvas
();
canvasTitle
.
Form
(
"epsilon in %s Y-system;
\t
(%d,%d) degrees"
,
(
const
char
*
)
cBeE
[
i
],
kMinAngle
,
kMaxAngle
);
canvasTitle
.
Form
(
"epsilon in %s Y-system;
\t
(%d,%d) degrees"
,
(
const
char
*
)
cBeE
[
i
],
kMinAngle
,
kMaxAngle
);
canEpsilonY
[
i
]
->
SetTitle
(
canvasTitle
.
Data
());
canEpsilonY
[
i
]
->
SetTitle
(
canvasTitle
.
Data
());
// canEpsilonY[i]->Divide(2, 3);
// canEpsilonY[i]->Divide(2, 3);
...
@@ -646,9 +682,10 @@ void BeAnalysis::EpsilonY() {
...
@@ -646,9 +682,10 @@ void BeAnalysis::EpsilonY() {
chs
[
j
]
->
SetLineColor
(
kGray
+
1
);
chs
[
j
]
->
SetLineColor
(
kGray
+
1
);
chs
[
j
]
->
SetFillColor
(
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.
);
drawCommand
.
Form
(
"fTap/f6BeIM>>%s(50,0,1)"
,
hsName
.
Data
());
drawCommand
.
Form
(
"fTap/f6BeIM>>%s(50,0,1)"
,
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
());
drawCommand
.
Form
(
"fTap/fBeIM>>%s(50,0,1)"
,
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
]);
...
...
Be/BeAnalysis.h
View file @
dd7078c2
...
@@ -79,6 +79,7 @@ public:
...
@@ -79,6 +79,7 @@ public:
void
SaveSpectrumHist
(
Int_t
i
);
void
SaveSpectrumHist
(
Int_t
i
);
void
SaveEpsilonTHist
(
Int_t
interval
,
Int_t
chain
);
void
SaveEpsilonTHist
(
Int_t
interval
,
Int_t
chain
);
void
SaveCosThetaTHist
(
Int_t
interval
,
Int_t
chain
);
//
//
...
@@ -111,9 +112,13 @@ private:
...
@@ -111,9 +112,13 @@ private:
TH1F
*
heeT
[
5
][
6
];
TH1F
*
heeT
[
5
][
6
];
TH1F
*
hieT
[
5
][
6
];
TH1F
*
hieT
[
5
][
6
];
// TH1F *hscoskT[noIntervals][6];
TH1F
*
hscoskT
[
5
][
6
];
// TH1F *hecoskT[noIntervals][6];
TH1F
*
hecoskT
[
5
][
6
];
// TH1F *hicoskT[noIntervals][6];
TH1F
*
hicoskT
[
5
][
6
];
TH1F
*
hseY
[
5
][
6
];
TH1F
*
heeY
[
5
][
6
];
TH1F
*
hieY
[
5
][
6
];
//cuts
//cuts
TCut
cAngles
;
TCut
cAngles
;
...
...
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