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
63320f5a
Commit
63320f5a
authored
4 years ago
by
Marshall Scott
Browse files
Options
Downloads
Patches
Plain Diff
plotting charge
parent
103bc4e5
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!24
Resolve "pi0 resolution for ECal barrel"
This commit is part of merge request
!24
. Comments created here will be created in the context of that merge request.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
+13
-2
13 additions, 2 deletions
...marks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
with
13 additions
and
2 deletions
benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
+
13
−
2
Edit
View file @
63320f5a
...
@@ -53,16 +53,17 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
...
@@ -53,16 +53,17 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
{"quantity", "resolution (in %)"},
{"quantity", "resolution (in %)"},
{"target", std::to_string(resolutionTarget)}}};
{"target", std::to_string(resolutionTarget)}}};
*/
*/
//gSystem->Exec("cp sim_output/sim_emcal_barrel_uniform_pions.root results/sim_emcal_barrel_uniform_pions.root");
ROOT
::
EnableImplicitMT
();
ROOT
::
EnableImplicitMT
();
ROOT
::
RDataFrame
d0
(
"events"
,
input_fname
);
ROOT
::
RDataFrame
d0
(
"events"
,
input_fname
);
/*
auto colNames = d0.GetColumnNames();
auto colNames = d0.GetColumnNames();
ofstream out;
ofstream out;
out.open("results/column_list.txt");
out.open("results/column_list.txt");
for (auto &&col : colNames){out << col << endl; cout << col << endl;}
for (auto &&col : colNames){out << col << endl; cout << col << endl;}
out.close();
out.close();
*/
// Thrown Energy [GeV]
// Thrown Energy [GeV]
auto
Ethr
=
[](
std
::
vector
<
dd4pod
::
Geant4ParticleData
>
const
&
input
)
{
auto
Ethr
=
[](
std
::
vector
<
dd4pod
::
Geant4ParticleData
>
const
&
input
)
{
...
@@ -135,6 +136,7 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
...
@@ -135,6 +136,7 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
.
Define
(
"fsam"
,
fsam2
,
{
"Esim"
,
"Ethr"
})
.
Define
(
"fsam"
,
fsam2
,
{
"Esim"
,
"Ethr"
})
.
Define
(
"dE"
,
eResol
,
{
"Esim"
,
"Ethr"
})
.
Define
(
"dE"
,
eResol
,
{
"Esim"
,
"Ethr"
})
.
Define
(
"dE_rel"
,
eResol_rel
,
{
"Esim"
,
"Ethr"
})
.
Define
(
"dE_rel"
,
eResol_rel
,
{
"Esim"
,
"Ethr"
})
.
Define
(
"charge"
,
{
"charge"
})
;
;
// Define Histograms
// Define Histograms
...
@@ -142,6 +144,7 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
...
@@ -142,6 +144,7 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
auto
hNhits
=
d1
.
Histo1D
({
"hNhits"
,
"Number of hits per events; Number of hits; Events"
,
100
,
0.0
,
2000.0
},
"nhits"
);
auto
hNhits
=
d1
.
Histo1D
({
"hNhits"
,
"Number of hits per events; Number of hits; Events"
,
100
,
0.0
,
2000.0
},
"nhits"
);
auto
hEsim
=
d1
.
Histo1D
({
"hEsim"
,
"Energy Deposit; Energy Deposit [GeV]; Events"
,
100
,
0.0
,
1.0
},
"Esim"
);
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
hfsam
=
d1
.
Histo1D
({
"hfsam"
,
"Sampling Fraction; Sampling Fraction; Events"
,
100
,
0.0
,
0.1
},
"fsam"
);
auto
hcharge
=
d1
.
Histo1D
({
"hcharge"
,
"charge; charge; Count"
,
10
,
-
2
,
2
},
"charge"
);
// Event Counts
// Event Counts
auto
nevents_thrown
=
d1
.
Count
();
auto
nevents_thrown
=
d1
.
Count
();
...
@@ -187,6 +190,14 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
...
@@ -187,6 +190,14 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
c4
->
SaveAs
(
"results/emcal_barrel_pions_fsam.png"
);
c4
->
SaveAs
(
"results/emcal_barrel_pions_fsam.png"
);
c4
->
SaveAs
(
"results/emcal_barrel_pions_fsam.pdf"
);
c4
->
SaveAs
(
"results/emcal_barrel_pions_fsam.pdf"
);
TCanvas
*
c5
=
new
TCanvas
(
"c5"
,
"c5"
,
700
,
500
);
hcharge
->
GetYaxis
()
->
SetTitleOffset
(
1.4
);
hcharge
->
SetLineWidth
(
2
);
hcharge
->
SetLineColor
(
kBlue
);
hcharge
->
DrawClone
();
c5
->
SaveAs
(
"results/emcal_barrel_pions_charge.png"
);
c5
->
SaveAs
(
"results/emcal_barrel_pions_chage.pdf"
);
//Energy Resolution Work
//Energy Resolution Work
auto
hdE
=
d1
.
Histo1D
({
"hdE"
,
"dE; dE[GeV]; Events"
,
20
,
-
7.5
,
7.5
},
"dE"
);
//changed from 100
auto
hdE
=
d1
.
Histo1D
({
"hdE"
,
"dE; dE[GeV]; Events"
,
20
,
-
7.5
,
7.5
},
"dE"
);
//changed from 100
auto
hdE_rel
=
d1
.
Histo1D
({
"hdE_rel"
,
"dE Relative; dE Relative; Events"
,
20
,
-
7.5
,
7.5
},
"dE_rel"
);
//changed from 100
auto
hdE_rel
=
d1
.
Histo1D
({
"hdE_rel"
,
"dE Relative; dE Relative; Events"
,
20
,
-
7.5
,
7.5
},
"dE_rel"
);
//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