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
a389fc81
Commit
a389fc81
authored
Jul 21, 2017
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ThetaAT() implemented.
parent
9d4118df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
195 additions
and
6 deletions
+195
-6
BeAnalysis.cpp
Be/BeAnalysis.cpp
+188
-4
BeAnalysis.h
Be/BeAnalysis.h
+3
-0
lib_test.cxx
macros/BeCorrPRC/lib_test.cxx
+4
-2
No files found.
Be/BeAnalysis.cpp
View file @
a389fc81
...
@@ -54,6 +54,22 @@ BeAnalysis::BeAnalysis() : che(0), spectra(1) {
...
@@ -54,6 +54,22 @@ BeAnalysis::BeAnalysis() : che(0), spectra(1) {
cosThetaY
[
2
]
=
1
;
cosThetaY
[
2
]
=
1
;
cosThetaY
[
4
]
=
1
;
cosThetaY
[
4
]
=
1
;
// thetaP1T = new Bool_t[noIntervals];
// for (Int_t i = 0; i < noIntervals; i++) {
// thetaP1T[i] = 0;
// }
// thetaP1T[0] = 1;
// thetaP1T[2] = 1;
// thetaP1T[4] = 1;
thetaAT
=
new
Bool_t
[
noIntervals
];
for
(
Int_t
i
=
0
;
i
<
noIntervals
;
i
++
)
{
thetaAT
[
i
]
=
0
;
}
thetaAT
[
0
]
=
1
;
thetaAT
[
2
]
=
1
;
thetaAT
[
4
]
=
1
;
kVerbose
=
1
;
kVerbose
=
1
;
kRangeProportionIn
=
2.0
;
kRangeProportionIn
=
2.0
;
...
@@ -770,7 +786,178 @@ void BeAnalysis::CosThetaYk() {
...
@@ -770,7 +786,178 @@ void BeAnalysis::CosThetaYk() {
}
}
void
BeAnalysis
::
ThetaP1T
()
{
//void BeAnalysis::ThetaP1T() {
//
// const Double_t tP1Range[5][6] = {90, 90, 90, 90, 90, 90,
// 140, 140, 140, 140, 140, 140,
// 130, 130, 130, 130, 130, 130,
// 190, 190, 190, 190, 190, 190,
// 200, 200, 200, 200, 200, 200};
//
//
// TCanvas *cThetaP1T[noIntervals];
// for (Int_t i = 0; i<noIntervals; i++) { //energy intervals (canvases)
//
// TH1F *hsthetaP1T[noIntervals][6];
// TH1F *hethetaP1T[noIntervals][6];
// TH1F *hithetaP1T[noIntervals][6];
//
// if (!thetaP1T[i]) continue;
// // {
//
// cThetaP1T[i] = new TCanvas();
//
// canvasTitle.Form("cos theta p1 in %s T-system;\t(%d,%d) degrees", (const char*)cBeE[i], kMinAngle, kMaxAngle);
// cThetaP1T[i]->SetTitle(canvasTitle.Data());
// cThetaP1T[i]->Divide(2, 3);
//
// che->SetLineColor(kBlack);
// for (Int_t j = 0; j < 6; j++) { //different files
// cThetaP1T[i]->cd(j+1);
// chs[j]->SetLineColor(kGray+1);
// chs[j]->SetFillColor(kGray+1);
// hsName.Form("hsthetaP1T%d_%d", i, j);
// drawCommand.Form("fP1ThetaCM>>%s(50,0,3.14)", hsName.Data());
// chs[j]->Draw(drawCommand.Data(), cQ && crBeE[i] && crAngles && crEpsilonT && sRatio[j], "", sEvents[j]);
// hsthetaP1T[i][j] = (TH1F*)gPad->FindObject(hsName.Data());
// heName.Form("hethetaP1T%d_%d", i, j);
// drawCommand.Form("fP1ThetaCM>>%s(50,0,3.14)", heName.Data());
// che->Draw(drawCommand.Data(), cQ && cBeE[i] && cAngles && cEpsilonT, "E same", eEvents[j]);
// hethetaP1T[i][j] = (TH1F*)gPad->FindObject(heName.Data());
//
// hsthetaP1T[i][j]->Draw();
// hsthetaP1T[i][j]->GetYaxis()->SetRangeUser(0, tP1Range[i][j]);
// hethetaP1T[i][j]->Draw("E same");
// cThetaP1T[i]->Update();
//
//
// hiName.Form("hithetaP1T%d_%d", i, j);
// drawCommand.Form("sP1CM.Theta()>>%s", hiName.Data());
// ti[j]->Draw(drawCommand.Data(), ciEpsilon && ciBeE[i] && sRatio[j], "same");
// hithetaP1T[i][j] = (TH1F*)gPad->FindObject(hiName.Data());
// Float_t rightmax = 1.1*hithetaP1T[i][j]->GetMaximum();
// Float_t scale = cThetaP1T[i]->GetPad(j+1)->GetUymax()/rightmax;
// hithetaP1T[i][j]->SetLineColor(kRed);
// hithetaP1T[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();
//
// cThetaP1T[i]->Update();
//
//
// }//for j
// /*if (savePictures) {
// canvasName.Form("%sfig%dthetaP1T:%s%s", ppath.Data(), i, configuration.Data(), pictFormat.Data());
// cThetaP1T[i]->SaveAs(canvasName.Data());
// cThetaP1T[i]->cd();
// cThetaP1T[i]->Close();
// }*/
// // }//if
// }//for i
//
//}
void
BeAnalysis
::
ThetaAT
()
{
TCanvas
*
cThetaAT
[
noIntervals
];
for
(
Int_t
i
=
0
;
i
<
noIntervals
;
i
++
)
{
//energy intervals (canvases)
TH1F
*
hsthetaAT
[
noIntervals
][
6
];
TH1F
*
hethetaAT
[
noIntervals
][
6
];
TH1F
*
hithetaAT
[
noIntervals
][
6
];
if
(
!
thetaAT
[
i
])
continue
;
// {
cThetaAT
[
i
]
=
new
TCanvas
();
canvasTitle
.
Form
(
"cos theta alpha in %s T-system;
\t
(%d,%d) degrees"
,
(
const
char
*
)
cBeE
[
i
],
kMinAngle
,
kMaxAngle
);
cThetaAT
[
i
]
->
SetTitle
(
canvasTitle
.
Data
());
cThetaAT
[
i
]
->
Divide
(
2
,
3
);
che
->
SetLineColor
(
kBlack
);
for
(
Int_t
j
=
0
;
j
<
6
;
j
++
)
{
//different files
if
(
!
kChains
[
j
])
continue
;
cThetaAT
[
i
]
->
cd
(
j
+
1
);
hsName
.
Form
(
"hsthetaAT%d_%d"
,
i
,
j
);
hsthetaAT
[
i
][
j
]
=
new
TH1F
(
hsName
.
Data
(),
"title"
,
50
,
0
,
3.14
);
// hsthetaAT[i][j] = new TH1F(hsName.Data(), "title", 50, -1, 1);
hsthetaAT
[
i
][
j
]
->
SetLineColor
(
kGray
+
1
);
hsthetaAT
[
i
][
j
]
->
SetFillColor
(
kGray
+
1
);
drawCommand
.
Form
(
"fAThetaCM>>%s"
,
hsthetaAT
[
i
][
j
]
->
GetName
());
// drawCommand.Form("cos(fAThetaCM)>>%s", hsthetaAT[i][j]->GetName());
chs
[
j
]
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
crBeE
[
i
]
&&
crAngles
&&
crEpsilonT
&&
sRatio
[
j
],
"goff"
,
sEventsECuts
[
i
][
j
]);
heName
.
Form
(
"hethetaAT%d_%d"
,
i
,
j
);
hethetaAT
[
i
][
j
]
=
new
TH1F
(
heName
.
Data
(),
"title"
,
50
,
0
,
3.14
);
// hethetaAT[i][j] = new TH1F(heName.Data(), "title", 50, -1, 1);
drawCommand
.
Form
(
"fAThetaCM>>%s"
,
hethetaAT
[
i
][
j
]
->
GetName
());
// drawCommand.Form("cos(fAThetaCM)>>%s", hethetaAT[i][j]->GetName());
che
->
Draw
(
drawCommand
.
Data
(),
cQ
&&
cBeE
[
i
]
&&
cAngles
&&
cEpsilonT
,
"goff"
,
eEventsECuts
[
i
][
j
]);
hsthetaAT
[
i
][
j
]
->
Draw
();
hsthetaAT
[
i
][
j
]
->
SetTitle
(
""
);
hsthetaAT
[
i
][
j
]
->
SetXTitle
(
"
\\
theta_{
\\
alpha} [rad]"
);
hsthetaAT
[
i
][
j
]
->
GetXaxis
()
->
SetTitleOffset
(
0.95
);
hsthetaAT
[
i
][
j
]
->
GetXaxis
()
->
CenterTitle
();
hsthetaAT
[
i
][
j
]
->
SetYTitle
(
"counts"
);
// hsthetaAT[i][j]->GetYaxis()->SetTitleOffset(1.09);
hsthetaAT
[
i
][
j
]
->
GetYaxis
()
->
SetTitleOffset
(
0.7
);
hsthetaAT
[
i
][
j
]
->
GetYaxis
()
->
CenterTitle
();
hethetaAT
[
i
][
j
]
->
Draw
(
"E same"
);
if
(
kAutoRange
)
{
Float_t
leftMaxMC
=
kRangeProportion
*
hethetaAT
[
i
][
j
]
->
GetMaximum
();
Float_t
leftMaxE
=
kRangeProportion
*
hsthetaAT
[
i
][
j
]
->
GetMaximum
();
hsthetaAT
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxE
);
leftMaxMC
>
leftMaxE
?
hsthetaAT
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxMC
)
:
hsthetaAT
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxE
);
}
else
{
hsthetaAT
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
eTRange
[
i
][
j
]);
}
cThetaAT
[
i
]
->
Update
();
hiName
.
Form
(
"hithetaAT%d_%d"
,
i
,
j
);
drawCommand
.
Form
(
"sACM.Theta()>>%s(50,0,3.14)"
,
hiName
.
Data
());
// drawCommand.Form("cos(sACM.Theta())>>%s(50,-1,1)", hiName.Data());
ti
[
j
]
->
Draw
(
drawCommand
.
Data
(),
ciEpsilon
&&
ciBeE
[
i
]
&&
sRatio
[
j
],
"same"
);
hithetaAT
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
hiName
.
Data
());
Float_t
rightmax
=
1.1
*
hithetaAT
[
i
][
j
]
->
GetMaximum
();
Float_t
scale
=
cThetaAT
[
i
]
->
GetPad
(
j
+
1
)
->
GetUymax
()
/
rightmax
;
hithetaAT
[
i
][
j
]
->
SetLineColor
(
kRed
);
hithetaAT
[
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
();
cThetaAT
[
i
]
->
Update
();
if
(
kVerbose
)
{
Info
(
"sfAngInt_thetaAT.cxx"
,
"cut%d; case%d: %3.1f (exp)/ %3.1f (sim) = %3.3f"
,
i
,
j
,
hethetaAT
[
i
][
j
]
->
Integral
(
0
,
hethetaAT
[
i
][
j
]
->
GetNbinsX
()),
hsthetaAT
[
i
][
j
]
->
Integral
(
0
,
hsthetaAT
[
i
][
j
]
->
GetNbinsX
()),
hethetaAT
[
i
][
j
]
->
Integral
(
0
,
hethetaAT
[
i
][
j
]
->
GetNbinsX
())
/
hsthetaAT
[
i
][
j
]
->
Integral
(
0
,
hsthetaAT
[
i
][
j
]
->
GetNbinsX
())
);
}
}
//for j
/*if (savePictures) {
canvasName.Form("%sfig%dthetaAT:%s%s", ppath.Data(), i, configuration.Data(), pictFormat.Data());
cThetaAT[i]->SaveAs(canvasName.Data());
cThetaAT[i]->cd();
cThetaAT[i]->Close();
}*/
// }//if
}
//for i
}
}
void
BeAnalysis
::
ExpEventsECuts
()
{
void
BeAnalysis
::
ExpEventsECuts
()
{
...
@@ -836,6 +1023,3 @@ void BeAnalysis::EpsilonTRange() {
...
@@ -836,6 +1023,3 @@ void BeAnalysis::EpsilonTRange() {
}
}
void
BeAnalysis
::
ThetaAT
()
{
}
Be/BeAnalysis.h
View file @
a389fc81
...
@@ -71,6 +71,9 @@ private:
...
@@ -71,6 +71,9 @@ private:
Bool_t
*
epsilonY
;
//!
Bool_t
*
epsilonY
;
//!
Bool_t
*
cosThetaY
;
//!
Bool_t
*
cosThetaY
;
//!
// Bool_t *thetaP1T; //!
Bool_t
*
thetaAT
;
//!
Bool_t
kAutoRange
;
Bool_t
kAutoRange
;
Float_t
kRangeProportion
;
Float_t
kRangeProportion
;
Bool_t
kVerbose
;
Bool_t
kVerbose
;
...
...
macros/BeCorrPRC/lib_test.cxx
View file @
a389fc81
...
@@ -20,6 +20,8 @@ void lib_test() {
...
@@ -20,6 +20,8 @@ void lib_test() {
// ana.EpsilonT();
// ana.EpsilonT();
// ana.CosThetaTk();
// ana.CosThetaTk();
ana
.
EpsilonY
();
// ana.EpsilonY();
ana
.
CosThetaYk
();
// ana.CosThetaYk();
ana
.
ThetaAT
();
}
}
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