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
0167e84b
Commit
0167e84b
authored
4 years ago
by
Whitney Armstrong
Browse files
Options
Downloads
Patches
Plain Diff
modified: benchmarks/barrel_ecal/scripts/e_pi_separation.cxx
parent
436c4ac7
Branches
Branches containing commit
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/e_pi_separation.cxx
+14
-3
14 additions, 3 deletions
benchmarks/barrel_ecal/scripts/e_pi_separation.cxx
with
14 additions
and
3 deletions
benchmarks/barrel_ecal/scripts/e_pi_separation.cxx
+
14
−
3
View file @
0167e84b
...
...
@@ -59,9 +59,9 @@ void e_pi_separation(const char* input_fname =
//dd4hep::rec::CellIDPositionConverter cellid_converter(detector);
auto
decoder
=
detector
.
readout
(
"EcalBarrelHits"
).
idSpec
().
decoder
();
std
::
cout
<<
decoder
->
fieldDescription
()
<<
"
\n
"
;
fmt
::
print
(
"{}
\n
"
,
decoder
->
fieldDescription
()
)
;
auto
layer_index
=
decoder
->
index
(
"layer"
);
fmt
::
print
(
" layer index is {}.
\n
"
,
layer_index
);
// Thrown Energy [GeV]
...
...
@@ -81,6 +81,16 @@ void e_pi_separation(const char* input_fname =
total_edep
+=
i
.
energyDeposit
;
return
total_edep
;
};
auto
Esim_front
=
[
=
](
const
std
::
vector
<
dd4pod
::
CalorimeterHitData
>&
evt
)
{
auto
total_edep
=
0.0
;
for
(
const
auto
&
i
:
evt
)
{
fmt
::
print
(
"cell id {}, layer {}
\n
"
,
i
.
cellID
,
decoder
->
get
(
i
.
cellID
,
layer_index
));
if
(
decoder
->
get
(
i
.
cellID
,
layer_index
)
<
5
){
total_edep
+=
i
.
energyDeposit
;
}
}
return
total_edep
;
};
// Sampling fraction = Esampling / Ethrown
auto
fsam
=
[](
const
double
sampled
,
const
double
thrown
)
{
...
...
@@ -91,6 +101,7 @@ void e_pi_separation(const char* input_fname =
auto
d1
=
d0
.
Define
(
"Ethr"
,
Ethr
,
{
"mcparticles"
})
.
Define
(
"nhits"
,
nhits
,
{
"EcalBarrelHits"
})
.
Define
(
"Esim"
,
Esim
,
{
"EcalBarrelHits"
})
.
Define
(
"Esim_front"
,
Esim_front
,
{
"EcalBarrelHits"
})
.
Define
(
"fsam"
,
fsam
,
{
"Esim"
,
"Ethr"
});
// Define Histograms
...
...
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