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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
detector_benchmarks
Commits
559cd2ff
Commit
559cd2ff
authored
4 years ago
by
Marshall Scott
Browse files
Options
Downloads
Patches
Plain Diff
Final commit, fixed issue 3
parent
8bd010a8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmarks/barrel_ecal/scripts/emcal_barrel_pi0_analysis.cxx
+8
-6
8 additions, 6 deletions
benchmarks/barrel_ecal/scripts/emcal_barrel_pi0_analysis.cxx
with
8 additions
and
6 deletions
benchmarks/barrel_ecal/scripts/emcal_barrel_pi0_analysis.cxx
+
8
−
6
View file @
559cd2ff
...
...
@@ -30,7 +30,7 @@ using namespace ROOT::VecOps;
void
emcal_barrel_pi0_analysis
(
const
char
*
input_fname
=
"sim_output/sim_emcal_barrel_pi0.root"
)
{
//input_fname = "../../../temp_pi0.root";
//
input_fname = "../sim_output/sim_emcal_barrel_pi0.root";
input_fname
=
"../sim_output/sim_emcal_barrel_pi0.root"
;
// Setting for graphs
gROOT
->
SetStyle
(
"Plain"
);
gStyle
->
SetOptFit
(
1
);
...
...
@@ -50,6 +50,7 @@ void emcal_barrel_pi0_analysis(const char* input_fname = "sim_output/sim_emcal_b
double
samp_frac
=
1.0
;
// Thrown Energy [GeV]
double
meanE
=
5
;
// Calculated later
auto
Ethr
=
[](
std
::
vector
<
dd4pod
::
Geant4ParticleData
>
const
&
input
)
{
return
TMath
::
Sqrt
(
input
[
2
].
psx
*
input
[
2
].
psx
+
input
[
2
].
psy
*
input
[
2
].
psy
+
input
[
2
].
psz
*
input
[
2
].
psz
+
input
[
2
].
mass
*
input
[
2
].
mass
);
};
...
...
@@ -110,8 +111,9 @@ void emcal_barrel_pi0_analysis(const char* input_fname = "sim_output/sim_emcal_b
auto
hpid
=
d1
.
Histo1D
({
"hpid"
,
"PID; PID; Count"
,
100
,
-
220
,
220
},
"pid"
);
auto
hdau
=
d1
.
Histo1D
({
"hdau"
,
"Number of Daughters; Number of Daughters; Count"
,
10
,
0
,
10
},
"dau"
);
// Set sampling Fraction, ideally this will be taken from a json file
samp_frac
=
hfsam
->
GetMean
();
// Gather Sampling fraction and mean Energy, ideally this will be taken from a json file
samp_frac
=
hfsam
->
GetMean
();
meanE
=
hEthr
->
GetMean
();
// Event Counts
auto
nevents_thrown
=
d1
.
Count
();
...
...
@@ -183,8 +185,8 @@ void emcal_barrel_pi0_analysis(const char* input_fname = "sim_output/sim_emcal_b
// Taken from : Initial considerations for EMCal of the EIC detector by A. Bazilevsky
// 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
=
hEthr
->
GetMean
();
// Current thrown energy, will need to grab from json file
double
resolutionTarget
=
TMath
::
Sqrt
(
0.12
*
0.12
/
thrown_energy
+
0.02
*
0.02
);
double
resolutionTarget
=
TMath
::
Sqrt
(
0.12
*
0.12
/
meanE
+
0.02
*
0.02
);
eic
::
util
::
Test
pi0_energy_resolution
{
{{
"name"
,
fmt
::
format
(
"{}_energy_resolution"
,
test_tag
)},
...
...
@@ -200,7 +202,7 @@ void emcal_barrel_pi0_analysis(const char* input_fname = "sim_output/sim_emcal_b
auto
hdE_rel
=
(
d1
.
Histo1D
({
"hdE_rel"
,
"dE Relative; dE Relative; Events"
,
100
,
-
3.0
,
3.0
},
"dE_rel"
))
->
DrawCopy
();
hdE
->
Fit
(
"gaus"
,
""
,
""
,
-
3.0
,
3.0
);
double
*
res
=
hdE
->
GetFunction
(
"gaus"
)
->
GetParameters
();
double
sigmaOverE
=
res
[
2
]
/
thrown_energy
;
double
sigmaOverE
=
res
[
2
]
/
meanE
;
//Pass/Fail
sigmaOverE
<=
resolutionTarget
?
pi0_energy_resolution
.
pass
(
sigmaOverE
)
:
pi0_energy_resolution
.
fail
(
sigmaOverE
);
...
...
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