Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reconstruction_benchmarks
Manage
Activity
Members
Labels
Plan
Issues
22
Issue boards
Milestones
Wiki
Code
Merge requests
21
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
reconstruction_benchmarks
Commits
ac1cf66c
Commit
ac1cf66c
authored
3 years ago
by
Maria Zurek
Browse files
Options
Downloads
Patches
Plain Diff
Add efficiency cut
parent
427ce91b
No related branches found
No related tags found
1 merge request
!153
Draft: Resolve "Add energy scan for Barrel Ecal"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmarks/imaging_ecal/scripts/emcal_barrel_energy_scan_analysis_pi_e.cxx
+25
-1
25 additions, 1 deletion
...g_ecal/scripts/emcal_barrel_energy_scan_analysis_pi_e.cxx
with
25 additions
and
1 deletion
benchmarks/imaging_ecal/scripts/emcal_barrel_energy_scan_analysis_pi_e.cxx
+
25
−
1
View file @
ac1cf66c
...
@@ -146,7 +146,7 @@ std::tuple <double, double> extract_sampling_fraction_parameters(std::string E_l
...
@@ -146,7 +146,7 @@ std::tuple <double, double> extract_sampling_fraction_parameters(std::string E_l
// Define variables
// Define variables
auto
d1
=
d0
.
Define
(
"Ethr"
,
Ethr
,
{
"mcparticles2"
})
auto
d1
=
d0
.
Define
(
"Ethr"
,
Ethr
,
{
"mcparticles2"
})
.
Define
(
"Mom"
,
momentum
,
{
"mcparticles2"
})
.
Define
(
"Mom"
,
momentum
,
{
"mcparticles2"
})
.
Define
(
"MomSmeared"
,
momentum_smeared
,
{
"
m
om"
})
.
Define
(
"MomSmeared"
,
momentum_smeared
,
{
"
M
om"
})
.
Define
(
"ErecImg"
,
Erec
,
{
"RecoEcalBarrelImagingHits"
})
.
Define
(
"ErecImg"
,
Erec
,
{
"RecoEcalBarrelImagingHits"
})
.
Define
(
"ErecScFi"
,
Erec
,
{
"EcalBarrelScFiHitsReco"
})
.
Define
(
"ErecScFi"
,
Erec
,
{
"EcalBarrelScFiHitsReco"
})
.
Define
(
"NClusterImg"
,
ncluster
,
{
"EcalBarrelImagingClusters"
})
.
Define
(
"NClusterImg"
,
ncluster
,
{
"EcalBarrelImagingClusters"
})
...
@@ -184,6 +184,30 @@ std::tuple <double, double> extract_sampling_fraction_parameters(std::string E_l
...
@@ -184,6 +184,30 @@ std::tuple <double, double> extract_sampling_fraction_parameters(std::string E_l
hpion
->
SetLineColor
(
kRed
);
hpion
->
SetLineColor
(
kRed
);
hpion
->
DrawClone
(
"same"
);
hpion
->
DrawClone
(
"same"
);
save_canvas
(
c
,
infoHist
.
column
.
c_str
(),
E_label
,
"electron_pion"
);
save_canvas
(
c
,
infoHist
.
column
.
c_str
(),
E_label
,
"electron_pion"
);
// Define efficiency cut
auto
requested_efficiency
=
0.95
;
if
(
col
==
eoverPScFi
||
col
==
eoverPRecScFi
)
{
auto
nbins
=
helectron
->
GetXaxis
()
->
GetNbins
();
auto
integral_helectron
=
helectron
->
Integral
();
auto
ngen_helectron
=
delectrons
.
Count
();
cout
<<
infoHists
[
col
].
name
<<
": Thrown electron events: "
<<
ngen_helectron
<<
" Histo integral: "
<<
integral_helectron
<<
endl
;
auto
efficiency_cut_bin
=
0
;
for
(
int
bin
=
1
;
bin
<=
nbins
;
bin
++
){
auto
inegral_helectron_bin
=
helectron
->
Integral
(
1
,
bin
);
auto
efficiency
=
1.
-
inegral_helectron_bin
/
ngen_helectron
;
if
(
efficiency
>
requested_efficiency
)
continue
;
else
{
efficiency_cut_bin
=
bin
-
1
;
break
;
}
}
cout
<<
"efficiency cut bin: "
<<
efficiency_cut_bin
<<
" efficiency: "
<<
1
-
helectron
->
Integral
(
1
,
efficiency_cut_bin
)
/
ngen_helectron
;
auto
ngen_hpion
=
dpions
.
Count
();
auto
pion_suppresion
=
hpion
->
Integral
(
efficiency_cut_bin
,
nbins
)
/
ngen_hpion
;
cout
<<
"pion supression: "
<<
pion_suppresion
<<
endl
;
}
}
}
auto
nlayers
=
20
;
auto
nlayers
=
20
;
...
...
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