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
50d85eef
Commit
50d85eef
authored
May 4, 2021
by
Marshall Scott
Browse files
Options
Downloads
Patches
Plain Diff
Final
parent
c8a596d5
Branches
Branches containing commit
No related tags found
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
+9
-17
9 additions, 17 deletions
...marks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
with
9 additions
and
17 deletions
benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
+
9
−
17
View file @
50d85eef
...
...
@@ -121,12 +121,8 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
return
input
[
2
].
pdgID
;
};
// Returns
the pdgID of the
particle daughters
(hopefully?)
// Returns
number of
particle daughters
auto
getdau
=
[](
std
::
vector
<
dd4pod
::
Geant4ParticleData
>
const
&
input
)
{
std
::
vector
<
int
>
result
;
//for (auto part : input[2].daughters_begin)
// result.push_back(part)
return
input
[
2
].
daughters_begin
;
};
...
...
@@ -145,19 +141,15 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
auto
hEsim
=
d1
.
Histo1D
({
"hEsim"
,
"Energy Deposit; Energy Deposit [GeV]; Events"
,
100
,
0.0
,
1.0
},
"Esim"
);
auto
hfsam
=
d1
.
Histo1D
({
"hfsam"
,
"Sampling Fraction; Sampling Fraction; Events"
,
100
,
0.0
,
0.1
},
"fsam"
);
auto
hpid
=
d1
.
Histo1D
({
"hpid"
,
"PID; PID; Count"
,
100
,
-
220
,
220
},
"pid"
);
auto
h
pid2
=
d1
.
Histo1D
({
"h
pid2
"
,
"
PID; PID; Count"
,
10
0
,
-
220
,
220
},
"dau"
);
auto
h
dau
=
d1
.
Histo1D
({
"h
dau
"
,
"
Number of Daughters; Number of Daughters; Count"
,
10
,
0
,
10
}
,
"dau"
);
// Set sampling Fraction, ideally this will be taken from a json file
cout
<<
"The sampling fraction mean is "
<<
samp_frac
<<
endl
;
samp_frac
=
hfsam
->
GetMean
();
cout
<<
"The sampling fraction mean is "
<<
samp_frac
<<
endl
;
auto
d2
=
d1
.
Define
(
"dE"
,
eResol
,
{
"Esim"
,
"Ethr"
})
.
Define
(
"dE_rel"
,
eResol_rel
,
{
"Esim"
,
"Ethr"
})
;
// Event Counts
auto
nevents_thrown
=
d1
.
Count
();
std
::
cout
<<
"Number of Thrown Events: "
<<
(
*
nevents_thrown
)
<<
"
\n
"
;
...
...
@@ -213,12 +205,12 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
TCanvas
*
c6
=
new
TCanvas
(
"c6"
,
"c6"
,
700
,
500
);
c5
->
SetLogy
(
1
);
h
pid2
->
GetYaxis
()
->
SetTitleOffset
(
1.4
);
h
pid2
->
SetLineWidth
(
2
);
h
pid2
->
SetLineColor
(
kBlue
);
h
pid2
->
DrawClone
();
c6
->
SaveAs
(
"results/emcal_barrel_pions_
pid2
.png"
);
c6
->
SaveAs
(
"results/emcal_barrel_pions_
pid2
.pdf"
);
h
dau
->
GetYaxis
()
->
SetTitleOffset
(
1.4
);
h
dau
->
SetLineWidth
(
2
);
h
dau
->
SetLineColor
(
kBlue
);
h
dau
->
DrawClone
();
c6
->
SaveAs
(
"results/emcal_barrel_pions_
dau
.png"
);
c6
->
SaveAs
(
"results/emcal_barrel_pions_
dau
.pdf"
);
//Energy Resolution Calculation
auto
hdE
=
d2
.
Histo1D
({
"hdE"
,
"dE; dE[GeV]; Events"
,
20
,
-
2.5
,
2.5
},
"dE"
);
//changed from 100
...
...
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