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
9d4118df
Commit
9d4118df
authored
Jul 21, 2017
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CosThetaYk()implemented.
parent
3edca5dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
2 deletions
+96
-2
BeAnalysis.cpp
Be/BeAnalysis.cpp
+92
-0
BeAnalysis.h
Be/BeAnalysis.h
+1
-0
lib_test.cxx
macros/BeCorrPRC/lib_test.cxx
+3
-2
No files found.
Be/BeAnalysis.cpp
View file @
9d4118df
...
...
@@ -46,6 +46,13 @@ BeAnalysis::BeAnalysis() : che(0), spectra(1) {
epsilonY
[
0
]
=
1
;
epsilonY
[
2
]
=
1
;
cosThetaY
=
new
Bool_t
[
noIntervals
];
for
(
Int_t
i
=
0
;
i
<
noIntervals
;
i
++
)
{
cosThetaY
[
i
]
=
0
;
}
cosThetaY
[
0
]
=
1
;
cosThetaY
[
2
]
=
1
;
cosThetaY
[
4
]
=
1
;
kVerbose
=
1
;
kRangeProportionIn
=
2.0
;
...
...
@@ -676,6 +683,91 @@ void BeAnalysis::EpsilonY() {
}
void
BeAnalysis
::
CosThetaYk
()
{
TCanvas
*
cThetaY
[
noIntervals
];
for
(
Int_t
i
=
0
;
i
<
noIntervals
;
i
++
)
{
//energy intervals (canvases)
TH1F
*
hscoskY
[
noIntervals
][
6
];
TH1F
*
hecoskY
[
noIntervals
][
6
];
TH1F
*
hicoskY
[
noIntervals
][
6
];
if
(
cosThetaY
[
i
])
continue
;
// {
cThetaY
[
i
]
=
new
TCanvas
();
canvasTitle
.
Form
(
"cos thetak in %s Y-system;
\t
(%d,%d) degrees"
,
(
const
char
*
)
cBeE
[
i
],
kMinAngle
,
kMaxAngle
);
cThetaY
[
i
]
->
SetTitle
(
canvasTitle
.
Data
());
cThetaY
[
i
]
->
Divide
(
2
,
3
);
che
->
SetLineColor
(
kBlack
);
for
(
Int_t
j
=
0
;
j
<
6
;
j
++
)
{
//different files
cThetaY
[
i
]
->
cd
(
j
+
1
);
chs
[
j
]
->
SetLineColor
(
kGray
+
1
);
chs
[
j
]
->
SetFillColor
(
kGray
+
1
);
hsName
.
Form
(
"hscoskY%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"fCosThetaYk>>%s(50,-1,1)"
,
hsName
.
Data
());
chs
[
j
]
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
crBeE
[
i
]
&&
crAngles
&&
sRatio
[
j
],
""
,
sEvents
[
j
]);
hscoskY
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
hsName
.
Data
());
heName
.
Form
(
"hecoskY%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"fCosThetaYk>>%s(50,-1,1)"
,
heName
.
Data
());
che
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
cBeE
[
i
]
&&
cAngles
,
"E same"
,
eEvents
[
j
]);
// TH1F *hecoskY[i][j] = (TH1F*)gPad->FindObject(heName.Data());
hecoskY
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
heName
.
Data
());
hscoskY
[
i
][
j
]
->
Draw
();
// hscoskY[i][j]->GetYaxis()->SetRangeUser(0, coskYRange[i][j]);
hecoskY
[
i
][
j
]
->
Draw
(
"E same"
);
if
(
kAutoRange
)
{
Float_t
leftMaxMC
=
kRangeProportion
*
hecoskY
[
i
][
j
]
->
GetMaximum
();
Float_t
leftMaxE
=
kRangeProportion
*
hscoskY
[
i
][
j
]
->
GetMaximum
();
hscoskY
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxE
);
leftMaxMC
>
leftMaxE
?
hscoskY
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxMC
)
:
hscoskY
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxE
);
}
else
{
hscoskY
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
eTRange
[
i
][
j
]);
}
cThetaY
[
i
]
->
Update
();
hiName
.
Form
(
"hicoskY%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"sCosThetaYk>>%s"
,
hiName
.
Data
());
ti
[
j
]
->
Draw
(
drawCommand
.
Data
(),
ciBeE
[
i
]
&&
sRatio
[
j
],
"same"
);
hicoskY
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
hiName
.
Data
());
Float_t
rightmax
=
1.1
*
hicoskY
[
i
][
j
]
->
GetMaximum
();
Float_t
scale
=
cThetaY
[
i
]
->
GetPad
(
j
+
1
)
->
GetUymax
()
/
rightmax
;
hicoskY
[
i
][
j
]
->
SetLineColor
(
kRed
);
hicoskY
[
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
();
cThetaY
[
i
]
->
Update
();
if
(
kVerbose
)
{
Info
(
"sfAngInt_cosThetaYk.cxx"
,
"cut%d; case%d: %3.1f (exp)/ %3.1f (sim) = %3.3f"
,
i
,
j
,
hecoskY
[
i
][
j
]
->
Integral
(
0
,
hecoskY
[
i
][
j
]
->
GetNbinsX
()),
hscoskY
[
i
][
j
]
->
Integral
(
0
,
hscoskY
[
i
][
j
]
->
GetNbinsX
()),
hecoskY
[
i
][
j
]
->
Integral
(
0
,
hecoskY
[
i
][
j
]
->
GetNbinsX
())
/
hscoskY
[
i
][
j
]
->
Integral
(
0
,
hscoskY
[
i
][
j
]
->
GetNbinsX
())
);
}
}
//for j
/*if (savePictures) {
canvasName.Form("%sfig%dcosThetakY:%s%s", ppath.Data(), i, configuration.Data(), pictFormat.Data());
cThetaY[i]->SaveAs(canvasName.Data());
cThetaY[i]->cd();
cThetaY[i]->Close();
}*/
// }//if
}
//for i
}
void
BeAnalysis
::
ThetaP1T
()
{
...
...
Be/BeAnalysis.h
View file @
9d4118df
...
...
@@ -69,6 +69,7 @@ private:
Bool_t
*
epsilonT
;
//!
Bool_t
*
cosThetaT
;
//!
Bool_t
*
epsilonY
;
//!
Bool_t
*
cosThetaY
;
//!
Bool_t
kAutoRange
;
Float_t
kRangeProportion
;
...
...
macros/BeCorrPRC/lib_test.cxx
View file @
9d4118df
...
...
@@ -16,9 +16,10 @@ void lib_test() {
ana
.
ExpEventsECuts
();
ana
.
SimEventsECuts
();
ana
.
EpsilonTRange
();
// ana.EpsilonT();
ana
.
CosThetaTk
();
// ana.EpsilonT();
// ana.CosThetaTk();
ana
.
EpsilonY
();
ana
.
CosThetaYk
();
}
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