Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
detector_benchmarks
Manage
Activity
Members
Labels
Plan
Issues
21
Issue boards
Milestones
Wiki
Code
Merge requests
7
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
c4dba70a
Commit
c4dba70a
authored
3 years ago
by
Maria Zurek
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "Add separate plots for sampling fraction from ScFi Cal"
parent
a38676b5
No related branches found
Branches containing commit
No related tags found
1 merge request
!55
Resolve "Add separate plots for sampling fraction from ScFi Cal"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmarks/barrel_ecal/scripts/emcal_barrel_particles_analysis.cxx
+48
-4
48 additions, 4 deletions
...s/barrel_ecal/scripts/emcal_barrel_particles_analysis.cxx
with
48 additions
and
4 deletions
benchmarks/barrel_ecal/scripts/emcal_barrel_particles_analysis.cxx
+
48
−
4
View file @
c4dba70a
...
@@ -97,7 +97,10 @@ void emcal_barrel_particles_analysis(std::string particle_name = "electron", boo
...
@@ -97,7 +97,10 @@ void emcal_barrel_particles_analysis(std::string particle_name = "electron", boo
.
Define
(
"EsimImg"
,
Esim
,
{
"EcalBarrelHits"
})
.
Define
(
"EsimImg"
,
Esim
,
{
"EcalBarrelHits"
})
.
Define
(
"EsimScFi"
,
Esim
,
{
"EcalBarrelScFiHits"
})
.
Define
(
"EsimScFi"
,
Esim
,
{
"EcalBarrelScFiHits"
})
.
Define
(
"Esim"
,
"EsimImg+EsimScFi"
)
.
Define
(
"Esim"
,
"EsimImg+EsimScFi"
)
.
Define
(
"fsam"
,
fsam
,
{
"Esim"
,
"Ethr"
});
.
Define
(
"fsam"
,
fsam
,
{
"Esim"
,
"Ethr"
})
.
Define
(
"fsamImg"
,
fsam
,
{
"EsimImg"
,
"Ethr"
})
.
Define
(
"fsamScFi"
,
fsam
,
{
"EsimScFi"
,
"Ethr"
});
// Define Histograms
// Define Histograms
auto
hEthr
=
d1
.
Histo1D
(
auto
hEthr
=
d1
.
Histo1D
(
...
@@ -109,9 +112,21 @@ void emcal_barrel_particles_analysis(std::string particle_name = "electron", boo
...
@@ -109,9 +112,21 @@ void emcal_barrel_particles_analysis(std::string particle_name = "electron", boo
auto
hEsim
=
d1
.
Histo1D
(
auto
hEsim
=
d1
.
Histo1D
(
{
"hEsim"
,
"Energy Deposit; Energy Deposit [GeV]; Events"
,
500
,
0.0
,
0.5
},
{
"hEsim"
,
"Energy Deposit; Energy Deposit [GeV]; Events"
,
500
,
0.0
,
0.5
},
"Esim"
);
"Esim"
);
auto
hEsimImg
=
d1
.
Histo1D
(
{
"hEsimImg"
,
"Energy Deposit; Energy Deposit [GeV]; Events"
,
500
,
0.0
,
0.5
},
"EsimImg"
);
auto
hEsimScFi
=
d1
.
Histo1D
(
{
"hEsimScFi"
,
"Energy Deposit; Energy Deposit [GeV]; Events"
,
500
,
0.0
,
0.5
},
"EsimScFi"
);
auto
hfsam
=
d1
.
Histo1D
(
auto
hfsam
=
d1
.
Histo1D
(
{
"hfsam"
,
"Sampling Fraction; Sampling Fraction; Events"
,
8
00
,
0.0
,
0.2
},
{
"hfsam"
,
"Sampling Fraction; Sampling Fraction; Events"
,
4
00
,
0.0
,
0.2
},
"fsam"
);
"fsam"
);
auto
hfsamImg
=
d1
.
Histo1D
(
{
"hfsamImg"
,
"Sampling Fraction; Sampling Fraction; Events"
,
400
,
0.0
,
0.2
},
"fsamImg"
);
auto
hfsamScFi
=
d1
.
Histo1D
(
{
"hfsamScFi"
,
"Sampling Fraction; Sampling Fraction; Events"
,
400
,
0.0
,
0.2
},
"fsamScFi"
);
addDetectorName
(
detector_name
,
hEthr
.
GetPtr
());
addDetectorName
(
detector_name
,
hEthr
.
GetPtr
());
addDetectorName
(
detector_name
,
hEsim
.
GetPtr
());
addDetectorName
(
detector_name
,
hEsim
.
GetPtr
());
...
@@ -155,14 +170,13 @@ void emcal_barrel_particles_analysis(std::string particle_name = "electron", boo
...
@@ -155,14 +170,13 @@ void emcal_barrel_particles_analysis(std::string particle_name = "electron", boo
{
{
TCanvas
*
c4
=
new
TCanvas
(
"c4"
,
"c4"
,
700
,
500
);
TCanvas
*
c4
=
new
TCanvas
(
"c4"
,
"c4"
,
700
,
500
);
c4
->
SetLogy
(
1
);
auto
h
=
hfsam
->
DrawCopy
();
auto
h
=
hfsam
->
DrawCopy
();
h
->
SetLineWidth
(
2
);
h
->
SetLineWidth
(
2
);
h
->
SetLineColor
(
kBlue
);
h
->
SetLineColor
(
kBlue
);
double
up_fit
=
h
->
GetMean
()
+
5
*
h
->
GetStdDev
();
double
up_fit
=
h
->
GetMean
()
+
5
*
h
->
GetStdDev
();
double
down_fit
=
h
->
GetMean
()
-
5
*
h
->
GetStdDev
();
double
down_fit
=
h
->
GetMean
()
-
5
*
h
->
GetStdDev
();
h
->
Fit
(
"gaus"
,
""
,
""
,
down_fit
,
up_fit
);
h
->
Fit
(
"gaus"
,
""
,
""
,
down_fit
,
up_fit
);
h
->
GetXaxis
()
->
SetRangeUser
(
0.
,
up_fit
);
h
->
GetXaxis
()
->
SetRangeUser
(
down_fit
,
up_fit
);
TF1
*
gaus
=
h
->
GetFunction
(
"gaus"
);
TF1
*
gaus
=
h
->
GetFunction
(
"gaus"
);
fSam_mean
=
gaus
->
GetParameter
(
1
);
fSam_mean
=
gaus
->
GetParameter
(
1
);
gaus
->
SetLineWidth
(
2
);
gaus
->
SetLineWidth
(
2
);
...
@@ -170,6 +184,36 @@ void emcal_barrel_particles_analysis(std::string particle_name = "electron", boo
...
@@ -170,6 +184,36 @@ void emcal_barrel_particles_analysis(std::string particle_name = "electron", boo
save_canvas
(
c4
,
"fsam"
,
particle_name
);
save_canvas
(
c4
,
"fsam"
,
particle_name
);
}
}
{
TCanvas
*
c5
=
new
TCanvas
(
"c5"
,
"c5"
,
700
,
500
);
auto
h
=
hfsamImg
->
DrawCopy
();
h
->
SetLineWidth
(
2
);
h
->
SetLineColor
(
kBlue
);
double
up_fit
=
h
->
GetMean
()
+
5
*
h
->
GetStdDev
();
double
down_fit
=
h
->
GetMean
()
-
5
*
h
->
GetStdDev
();
h
->
Fit
(
"gaus"
,
""
,
""
,
down_fit
,
up_fit
);
h
->
GetXaxis
()
->
SetRangeUser
(
down_fit
,
up_fit
);
TF1
*
gaus
=
h
->
GetFunction
(
"gaus"
);
gaus
->
SetLineWidth
(
2
);
gaus
->
SetLineColor
(
kRed
);
save_canvas
(
c5
,
"fsamImg"
,
particle_name
);
}
{
TCanvas
*
c6
=
new
TCanvas
(
"c6"
,
"c6"
,
700
,
500
);
auto
h
=
hfsamScFi
->
DrawCopy
();
h
->
SetLineWidth
(
2
);
h
->
SetLineColor
(
kBlue
);
double
up_fit
=
h
->
GetMean
()
+
5
*
h
->
GetStdDev
();
double
down_fit
=
h
->
GetMean
()
-
5
*
h
->
GetStdDev
();
h
->
Fit
(
"gaus"
,
""
,
""
,
down_fit
,
up_fit
);
h
->
GetXaxis
()
->
SetRangeUser
(
down_fit
,
up_fit
);
TF1
*
gaus
=
h
->
GetFunction
(
"gaus"
);
gaus
->
SetLineWidth
(
2
);
gaus
->
SetLineColor
(
kRed
);
save_canvas
(
c6
,
"fsamScFi"
,
particle_name
);
}
j
[
particle_name
]
=
{
j
[
particle_name
]
=
{
{
"particle_name"
,
particle_name
},
{
"particle_name"
,
particle_name
},
{
"thrown_energy"
,
Ethr_mean
},
{
"thrown_energy"
,
Ethr_mean
},
...
...
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