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
ce1fff36
Commit
ce1fff36
authored
Jul 20, 2017
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BeAnalysis::EpsilonT() implemented
parent
a9e26ea7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
129 additions
and
1 deletion
+129
-1
BeAnalysis.cpp
Be/BeAnalysis.cpp
+125
-1
BeAnalysis.h
Be/BeAnalysis.h
+3
-0
lib_test.cxx
macros/BeCorrPRC/lib_test.cxx
+1
-0
No files found.
Be/BeAnalysis.cpp
View file @
ce1fff36
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include "BeWork.h"
#include "BeWork.h"
#include "TCanvas.h"
#include "TCanvas.h"
#include "TGaxis.h"
BeAnalysis
::
BeAnalysis
()
:
che
(
0
),
spectra
(
1
)
{
BeAnalysis
::
BeAnalysis
()
:
che
(
0
),
spectra
(
1
)
{
// TODO Auto-generated constructor stub
// TODO Auto-generated constructor stub
...
@@ -279,7 +280,7 @@ void BeAnalysis::Spectra() {
...
@@ -279,7 +280,7 @@ void BeAnalysis::Spectra() {
if
(
!
che
)
return
;
if
(
!
che
)
return
;
TCanvas
*
cSpectra
=
new
TCanvas
();
TCanvas
*
cSpectra
=
new
TCanvas
();
TString
canvasTitle
;
//
TString canvasTitle;
TH1F
*
hsSpectra
[
6
];
TH1F
*
hsSpectra
[
6
];
TH1F
*
heSpectra
[
6
];
TH1F
*
heSpectra
[
6
];
...
@@ -367,3 +368,126 @@ void BeAnalysis::Spectra() {
...
@@ -367,3 +368,126 @@ void BeAnalysis::Spectra() {
Info
(
"sfAngInt_spectra.cxx"
,
"Finished."
);
Info
(
"sfAngInt_spectra.cxx"
,
"Finished."
);
}
}
void
BeAnalysis
::
EpsilonT
()
{
const
Int_t
nointervals
=
5
;
const
Bool_t
epsilonT
[
nointervals
]
=
{
1
,
0
,
0
,
0
,
0
};
const
Bool_t
kVerbose
=
1
;
const
Float_t
kRangeProportionIn
=
2.0
;
Long64_t
eEventsECuts
[
5
][
6
]
=
{
3950000
,
3950000
,
3800000
,
3850000
,
3950000
,
3900000
,
eMaxEvents
,
eMaxEvents
,
4100000
,
eMaxEvents
,
eMaxEvents
,
eMaxEvents
,
3050000
,
3150000
,
3200000
,
3200000
,
3250000
,
3350000
,
3850000
,
3950000
,
3900000
,
3900000
,
4000000
,
4000000
,
4100000
,
4100000
,
4000000
,
4100000
,
eMaxEvents
,
eMaxEvents
};
Long64_t
sEventsECuts
[
5
][
6
]
=
{
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
2630000
,
sMaxEvents
,
sMaxEvents
,
2660000
,
2660000
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
,
sMaxEvents
};
const
Double_t
eTRange
[
5
][
6
]
=
{
300
,
300
,
300
,
300
,
300
,
300
,
380
,
380
,
380
,
380
,
380
,
380
,
300
,
300
,
300
,
300
,
300
,
300
,
500
,
500
,
500
,
500
,
500
,
500
,
500
,
500
,
500
,
500
,
500
,
500
};
TCanvas
*
canEpsilonT
[
nointervals
];
for
(
Int_t
i
=
0
;
i
<
nointervals
;
i
++
)
{
//energy intervals (canvases)
TH1F
*
hseT
[
nointervals
][
6
];
TH1F
*
heeT
[
nointervals
][
6
];
TH1F
*
hieT
[
nointervals
][
6
];
if
(
!
epsilonT
[
i
])
continue
;
// {
canEpsilonT
[
i
]
=
new
TCanvas
();
canvasTitle
.
Form
(
"epsilon in %s T-system;
\t
(%d,%d) degrees"
,
(
const
char
*
)
cBeE
[
i
],
kMinAngle
,
kMaxAngle
);
canEpsilonT
[
i
]
->
SetTitle
(
canvasTitle
.
Data
());
canEpsilonT
[
i
]
->
Divide
(
2
,
3
);
che
->
SetLineColor
(
kBlack
);
for
(
Int_t
j
=
0
;
j
<
6
;
j
++
)
{
//different files
if
(
!
kChains
[
j
])
continue
;
canEpsilonT
[
i
]
->
cd
(
j
+
1
);
chs
[
j
]
->
SetLineColor
(
kGray
+
1
);
chs
[
j
]
->
SetFillColor
(
kGray
+
1
);
hsName
.
Form
(
"hseT%d_%d"
,
i
,
j
);
// drawCommand.Form("fTpp/f6BeIM>>%s(50,0,1)", hsName.Data());
drawCommand
.
Form
(
"fTpp/f6BeIM>>%s(30,0,1)"
,
hsName
.
Data
());
// chs[j]->Draw(drawCommand.Data(), cQ && crBeE[i] && crAngles && sRatio[j], "", sEventsECuts[i][j]);
chs
[
j
]
->
Draw
(
drawCommand
.
Data
(),
cProtons
&&
cQ
&&
crBeE
[
i
]
&&
crAngles
&&
sRatio
[
j
],
""
,
sEventsECuts
[
i
][
j
]);
hseT
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
hsName
.
Data
());
heName
.
Form
(
"heeT%d_%d"
,
i
,
j
);
// drawCommand.Form("fTpp/fBeIM>>%s(50,0,1)", heName.Data());
drawCommand
.
Form
(
"fTpp/fBeIM>>%s"
,
heName
.
Data
());
// che->Draw(drawCommand.Data(), cQ && cBeE[i] && cAngles, "E same", eEventsECuts[i][j]);
che
->
Draw
(
drawCommand
.
Data
(),
cProtons
&&
cQ
&&
cBeE
[
i
]
&&
cAngles
,
"E same"
,
eEventsECuts
[
i
][
j
]);
heeT
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
heName
.
Data
());
hseT
[
i
][
j
]
->
Draw
();
hseT
[
i
][
j
]
->
SetTitle
(
""
);
hseT
[
i
][
j
]
->
SetXTitle
(
"
\\
varepsilon"
);
hseT
[
i
][
j
]
->
GetXaxis
()
->
SetTitleOffset
(
0.95
);
hseT
[
i
][
j
]
->
GetXaxis
()
->
CenterTitle
();
hseT
[
i
][
j
]
->
SetYTitle
(
"counts"
);
// hseT[i][j]->GetYaxis()->SetTitleOffset(1.09);
hseT
[
i
][
j
]
->
GetYaxis
()
->
SetTitleOffset
(
0.7
);
hseT
[
i
][
j
]
->
GetYaxis
()
->
CenterTitle
();
heeT
[
i
][
j
]
->
Draw
(
"E same"
);
if
(
kAutoRange
)
{
Float_t
leftMaxMC
=
kRangeProportion
*
hseT
[
i
][
j
]
->
GetMaximum
();
Float_t
leftMaxE
=
kRangeProportion
*
heeT
[
i
][
j
]
->
GetMaximum
();
hseT
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxE
);
leftMaxMC
>
leftMaxE
?
hseT
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxMC
)
:
hseT
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
leftMaxE
);
}
else
{
hseT
[
i
][
j
]
->
GetYaxis
()
->
SetRangeUser
(
0
,
eTRange
[
i
][
j
]);
}
canEpsilonT
[
i
]
->
Update
();
hiName
.
Form
(
"hieT%d_%d"
,
i
,
j
);
// drawCommand.Form("sTpp/E_IM>>%s(50,0,1)", hiName.Data());
drawCommand
.
Form
(
"sTpp/E_IM>>%s"
,
hiName
.
Data
());
ti
[
j
]
->
Draw
(
drawCommand
.
Data
(),
ciBeE
[
i
]
&&
sRatio
[
j
],
"same"
);
hieT
[
i
][
j
]
=
(
TH1F
*
)
gPad
->
FindObject
(
hiName
.
Data
());
Float_t
rightmax
=
kRangeProportionIn
*
hieT
[
i
][
j
]
->
GetMaximum
();
Float_t
scale
=
canEpsilonT
[
i
]
->
GetPad
(
j
+
1
)
->
GetUymax
()
/
rightmax
;
hieT
[
i
][
j
]
->
SetLineColor
(
kRed
);
hieT
[
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
();
canEpsilonT
[
i
]
->
Update
();
if
(
kVerbose
)
{
Info
(
"sfAngInt_epsilonT.cxx"
,
"cut%d; case%d: %3.1f (exp)/ %3.1f (sim) = %3.3f"
,
i
,
j
,
heeT
[
i
][
j
]
->
Integral
(
0
,
heeT
[
i
][
j
]
->
GetNbinsX
()),
hseT
[
i
][
j
]
->
Integral
(
0
,
hseT
[
i
][
j
]
->
GetNbinsX
()),
heeT
[
i
][
j
]
->
Integral
(
0
,
heeT
[
i
][
j
]
->
GetNbinsX
())
/
hseT
[
i
][
j
]
->
Integral
(
0
,
hseT
[
i
][
j
]
->
GetNbinsX
())
);
}
}
//for j
if
(
kVerbose
)
cout
<<
endl
;
/*if (savePictures) {
canvasName.Form("%sfig%depsilonT:%s%s", ppath.Data(), i, configuration.Data(), pictFormat.Data());
cout << canvasName.Data() << endl;
canEpsilonT[i]->SaveAs(canvasName.Data());
canEpsilonT[i]->cd();
canEpsilonT[i]->Close();
}//if save pictures*/
// }//if
}
//for i
}
Be/BeAnalysis.h
View file @
ce1fff36
...
@@ -42,6 +42,7 @@ public:
...
@@ -42,6 +42,7 @@ public:
void
SetRatiosGStoEX
();
void
SetRatiosGStoEX
();
void
Spectra
();
void
Spectra
();
void
EpsilonT
();
//
//
private
:
private
:
TChain
*
che
;
//chain with experimental trees
TChain
*
che
;
//chain with experimental trees
...
@@ -150,6 +151,8 @@ private:
...
@@ -150,6 +151,8 @@ private:
TString
drawCommand
;
TString
drawCommand
;
TString
hsName
;
TString
hsName
;
TString
heName
;
TString
heName
;
TString
hiName
;
TString
canvasTitle
;
};
};
...
...
macros/BeCorrPRC/lib_test.cxx
View file @
ce1fff36
...
@@ -12,4 +12,5 @@ void lib_test() {
...
@@ -12,4 +12,5 @@ void lib_test() {
ana
.
SetRatiosGStoEX
();
ana
.
SetRatiosGStoEX
();
ana
.
Spectra
();
ana
.
Spectra
();
ana
.
EpsilonT
();
}
}
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