Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
detector_benchmarks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
detector_benchmarks
Commits
f8060c86
Commit
f8060c86
authored
May 3, 2021
by
Marshall Scott
Browse files
Options
Downloads
Patches
Plain Diff
using eic requirememnts for resolution
parent
ed6a8a42
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!24
Resolve "pi0 resolution for ECal barrel"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
+14
-7
14 additions, 7 deletions
...marks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
with
14 additions
and
7 deletions
benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
+
14
−
7
View file @
f8060c86
...
@@ -41,7 +41,11 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
...
@@ -41,7 +41,11 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
std
::
string
test_tag
=
"Barrel_emcal_pi0"
;
std
::
string
test_tag
=
"Barrel_emcal_pi0"
;
//TODO: Change test_tag to something else
//TODO: Change test_tag to something else
std:
string
detector
=
"Barrel_emcal"
;
std:
string
detector
=
"Barrel_emcal"
;
double
resolutionTarget
=
0.1
;
//Energy resolution in teh barrel region(-1 < eta < 1)
// sigma_E / E = 12% / E^0.5 convoluted with 2%
// sigma_E / E = [ (0.12/E^0.5)^2 + 0.02^2]^0.5, with E in [GeV]
double
thrown_energy
=
5
;
// Current thrown energy, will need to grab from json file
double
resolutionTarget
=
TMath
::
Sqrt
(
0.12
*
0.12
/
thrown_energy
+
0.02
*
0.02
);
eic
::
util
::
Test
pi0_energy_resolution
{
eic
::
util
::
Test
pi0_energy_resolution
{
{{
"name"
,
fmt
::
format
(
"{}_energy_resolution"
,
test_tag
)},
{{
"name"
,
fmt
::
format
(
"{}_energy_resolution"
,
test_tag
)},
...
@@ -195,18 +199,19 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
...
@@ -195,18 +199,19 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
c5
->
SaveAs
(
"results/emcal_barrel_pions_pid.png"
);
c5
->
SaveAs
(
"results/emcal_barrel_pions_pid.png"
);
c5
->
SaveAs
(
"results/emcal_barrel_pions_pid.pdf"
);
c5
->
SaveAs
(
"results/emcal_barrel_pions_pid.pdf"
);
//Energy Resolution
Work
//Energy Resolution
Calculation
auto
hdE
=
d2
.
Histo1D
({
"hdE"
,
"dE; dE[GeV]; Events"
,
20
,
-
7.5
,
7.5
},
"dE"
);
//changed from 100
auto
hdE
=
d2
.
Histo1D
({
"hdE"
,
"dE; dE[GeV]; Events"
,
20
,
-
7.5
,
7.5
},
"dE"
);
//changed from 100
auto
hdE_rel
=
d2
.
Histo1D
({
"hdE_rel"
,
"dE Relative; dE Relative; Events"
,
20
,
-
2
,
2
},
"dE_rel"
);
//changed from 100
auto
hdE_rel
=
d2
.
Histo1D
({
"hdE_rel"
,
"dE Relative; dE Relative; Events"
,
20
,
-
2
,
2
},
"dE_rel"
);
//changed from 100
hdE_rel
->
Fit
(
"gaus"
,
""
,
""
,
-
2
,
2
);
hdE
->
Fit
(
"gaus"
,
""
,
""
,
-
2
,
2
);
double
*
res
=
hdE_rel
->
GetFunction
(
"gaus"
)
->
GetParameters
();
double
*
res
=
hdE
->
GetFunction
(
"gaus"
)
->
GetParameters
();
double
sigmaOverE
=
res
[
2
]
/
thrown_energy
;
//Pass/Fail
//Pass/Fail
if
(
res
[
2
]
<=
resolutionTarget
)
{
if
(
sigmaOverE
<=
resolutionTarget
)
{
pi0_energy_resolution
.
pass
(
res
[
2
]
);
pi0_energy_resolution
.
pass
(
sigmaOverE
);
}
else
{
}
else
{
pi0_energy_resolution
.
fail
(
res
[
2
]
);
pi0_energy_resolution
.
fail
(
sigmaOverE
);
}
}
//std::printf("Energy Resolution is %f\n", res[2]);
//std::printf("Energy Resolution is %f\n", res[2]);
...
@@ -216,6 +221,8 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
...
@@ -216,6 +221,8 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
hdE
->
GetYaxis
()
->
SetTitleOffset
(
1.4
);
hdE
->
GetYaxis
()
->
SetTitleOffset
(
1.4
);
hdE
->
SetLineWidth
(
2
);
hdE
->
SetLineWidth
(
2
);
hdE
->
SetLineColor
(
kBlue
);
hdE
->
SetLineColor
(
kBlue
);
hdE
->
GetFunction
(
"gaus"
)
->
SetLineWidth
(
2
);
hdE
->
GetFunction
(
"gaus"
)
->
SetLineColor
(
kRed
);
hdE
->
DrawClone
();
hdE
->
DrawClone
();
cdE
->
SaveAs
(
"results/emcal_barrel_pi0_dE.png"
);
cdE
->
SaveAs
(
"results/emcal_barrel_pi0_dE.png"
);
cdE
->
SaveAs
(
"results/emcal_barrel_pi0_dE.pdf"
);
cdE
->
SaveAs
(
"results/emcal_barrel_pi0_dE.pdf"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment