Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reconstruction_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
reconstruction_benchmarks
Commits
d68c3882
Commit
d68c3882
authored
4 years ago
by
Whitney Armstrong
Browse files
Options
Downloads
Patches
Plain Diff
modified: ecal/emcal_electrons.sh
modified: ecal/emcal_pi0s.sh modified: ecal/scripts/crystal_cal_electrons.cxx
parent
3189dc1d
No related branches found
No related tags found
1 merge request
!22
Scripts
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ecal/emcal_electrons.sh
+3
-0
3 additions, 0 deletions
ecal/emcal_electrons.sh
ecal/emcal_pi0s.sh
+1
-0
1 addition, 0 deletions
ecal/emcal_pi0s.sh
ecal/scripts/crystal_cal_electrons.cxx
+29
-5
29 additions, 5 deletions
ecal/scripts/crystal_cal_electrons.cxx
with
33 additions
and
5 deletions
ecal/emcal_electrons.sh
+
3
−
0
View file @
d68c3882
...
@@ -48,6 +48,7 @@ ls -l
...
@@ -48,6 +48,7 @@ ls -l
# run geant4 simulations
# run geant4 simulations
npsim
--runType
batch
\
npsim
--runType
batch
\
-v
WARNING
\
-v
WARNING
\
--part
.minimalKineticEnergy 1000
*
GeV
\
--numberOfEvents
${
JUGGLER_N_EVENTS
}
\
--numberOfEvents
${
JUGGLER_N_EVENTS
}
\
--compactFile
${
JUGGLER_DETECTOR
}
.xml
\
--compactFile
${
JUGGLER_DETECTOR
}
.xml
\
--inputFiles
../
${
JUGGLER_FILE_NAME_TAG
}
.hepmc
\
--inputFiles
../
${
JUGGLER_FILE_NAME_TAG
}
.hepmc
\
...
@@ -64,6 +65,8 @@ root -b -q "ecal/scripts/rec_emcal_electrons_reader.C(${E_start}, ${E_end}, \"${
...
@@ -64,6 +65,8 @@ root -b -q "ecal/scripts/rec_emcal_electrons_reader.C(${E_start}, ${E_end}, \"${
#root -b -q "ecal/scripts/makeplot.C(${E_start}, ${E_end}, \"${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE}\", \"results/rec_${JUGGLER_FILE_NAME_TAG}.txt\")"
#root -b -q "ecal/scripts/makeplot.C(${E_start}, ${E_end}, \"${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE}\", \"results/rec_${JUGGLER_FILE_NAME_TAG}.txt\")"
#root -b -q "ecal/scripts/makeplot_input.C(\"${JUGGLER_DETECTOR}/${JUGGLER_SIM_FILE}\", \"results/sim_${JUGGLER_FILE_NAME_TAG}.txt\")"
#root -b -q "ecal/scripts/makeplot_input.C(\"${JUGGLER_DETECTOR}/${JUGGLER_SIM_FILE}\", \"results/sim_${JUGGLER_FILE_NAME_TAG}.txt\")"
root
-b
-q
"ecal/scripts/crystal_cal_electrons.cxx(
\"
${
JUGGLER_DETECTOR
}
/
${
JUGGLER_REC_FILE
}
\"
)"
#paste results/sim_${JUGGLER_FILE_NAME_TAG}.txt results/rec_${JUGGLER_FILE_NAME_TAG}.txt > results/eng_${JUGGLER_FILE_NAME_TAG}.txt
#paste results/sim_${JUGGLER_FILE_NAME_TAG}.txt results/rec_${JUGGLER_FILE_NAME_TAG}.txt > results/eng_${JUGGLER_FILE_NAME_TAG}.txt
#root -b -q "ecal/scripts/read_eng.C(\"results/eng_${JUGGLER_FILE_NAME_TAG}.root\", \"results/eng_${JUGGLER_FILE_NAME_TAG}.txt\")"
#root -b -q "ecal/scripts/read_eng.C(\"results/eng_${JUGGLER_FILE_NAME_TAG}.root\", \"results/eng_${JUGGLER_FILE_NAME_TAG}.txt\")"
#root -b -q "ecal/scripts/cal_eng_res.C(\"results/eng_${JUGGLER_FILE_NAME_TAG}.root\")"
#root -b -q "ecal/scripts/cal_eng_res.C(\"results/eng_${JUGGLER_FILE_NAME_TAG}.root\")"
...
...
This diff is collapsed.
Click to expand it.
ecal/emcal_pi0s.sh
+
1
−
0
View file @
d68c3882
...
@@ -41,6 +41,7 @@ echo "JUGGLER_SIM_FILE = ${JUGGLER_SIM_FILE}"
...
@@ -41,6 +41,7 @@ echo "JUGGLER_SIM_FILE = ${JUGGLER_SIM_FILE}"
# run geant4 simulations
# run geant4 simulations
npsim
--runType
batch
\
npsim
--runType
batch
\
-v
WARNING
\
-v
WARNING
\
--part
.minimalKineticEnergy 1000
*
GeV
\
--numberOfEvents
${
JUGGLER_N_EVENTS
}
\
--numberOfEvents
${
JUGGLER_N_EVENTS
}
\
--compactFile
${
JUGGLER_DETECTOR
}
.xml
\
--compactFile
${
JUGGLER_DETECTOR
}
.xml
\
--inputFiles
../
${
JUGGLER_FILE_NAME_TAG
}
.hepmc
\
--inputFiles
../
${
JUGGLER_FILE_NAME_TAG
}
.hepmc
\
...
...
This diff is collapsed.
Click to expand it.
ecal/scripts/crystal_cal_electrons.cxx
+
29
−
5
View file @
d68c3882
...
@@ -50,7 +50,7 @@ auto eta = [](ROOT::VecOps::RVec<dd4pod::Geant4ParticleData> const& in) {
...
@@ -50,7 +50,7 @@ auto eta = [](ROOT::VecOps::RVec<dd4pod::Geant4ParticleData> const& in) {
return
result
;
return
result
;
};
};
void
crystal_cal_electrons
(
const
char
*
in_fname
=
"rec_emcal_uniform_electrons.root"
)
void
crystal_cal_electrons
(
const
char
*
in_fname
=
"
topside/
rec_emcal_uniform_electrons.root"
)
{
{
ROOT
::
EnableImplicitMT
();
ROOT
::
EnableImplicitMT
();
ROOT
::
RDataFrame
df
(
"events"
,
in_fname
);
ROOT
::
RDataFrame
df
(
"events"
,
in_fname
);
...
@@ -62,8 +62,13 @@ void crystal_cal_electrons(const char* in_fname = "rec_emcal_uniform_electrons.r
...
@@ -62,8 +62,13 @@ void crystal_cal_electrons(const char* in_fname = "rec_emcal_uniform_electrons.r
//TH1D* h5 = new TH1D("h5", "Number of Clusters per event", 5, -0.5, 4.5);
//TH1D* h5 = new TH1D("h5", "Number of Clusters per event", 5, -0.5, 4.5);
//TH1D* h6 = new TH1D("h6", "Scattering Angle(#theta) with CUT", 100, 130.0, 180.0);
//TH1D* h6 = new TH1D("h6", "Scattering Angle(#theta) with CUT", 100, 130.0, 180.0);
//TH1D* h7 = new TH1D("h7", "Pseudo-rapidity(#eta) with CUT", 100, -5.0, 0.0);
//TH1D* h7 = new TH1D("h7", "Pseudo-rapidity(#eta) with CUT", 100, -5.0, 0.0);
//TH2D* h8 = new TH2D("h8", "Cluster Hit Position", 62, -62.0, 62.0, 62, -62.0, 62.0);
//TH2D *h8 = new TH2D("h8","Cluster Hit Position", 62,-62.0,62.0,62,-62.0,62.0);
//TH2D* h9 = new TH2D("h9", "All Hit Position", 62, -62.0, 62.0, 62, -62.0, 62.0);
//TH2D *h9 = new TH2D("h9","All Hit Position", 62,-62.0,62.0,62,-62.0,62.0);
//TH1D *h10 = new TH1D("hEnergyRes","Energy Resolution", 100,-0.3,0.3);
//TH1D *h11 = new TH1D("hEnergyResCUT","Energy Resolution with CUT", 100,-0.3,0.3);
//TH1D *h12 = new TH1D("h12","Thrown momentum", 61,e_start-0.5,e_end+0.5);
//TH1D *h13 = new TH1D("h13","Thrown momentum for reconstructed particle", 61,e_start-0.5,e_end+0.5);
//TH1D *h14 = new TH1D("h14","Ratio p_{rec}/p_{thr}", 61,e_start-0.5,e_end+0.5);
auto
d0
=
df
.
Define
(
"isThrown"
,
"mcparticles2.genStatus == 1"
)
auto
d0
=
df
.
Define
(
"isThrown"
,
"mcparticles2.genStatus == 1"
)
.
Define
(
"thrownParticles"
,
"mcparticles2[isThrown]"
)
.
Define
(
"thrownParticles"
,
"mcparticles2[isThrown]"
)
...
@@ -76,15 +81,34 @@ void crystal_cal_electrons(const char* in_fname = "rec_emcal_uniform_electrons.r
...
@@ -76,15 +81,34 @@ void crystal_cal_electrons(const char* in_fname = "rec_emcal_uniform_electrons.r
for
(
const
auto
&
i
:
in
)
for
(
const
auto
&
i
:
in
)
res
.
push_back
(
i
.
energy
);
res
.
push_back
(
i
.
energy
);
return
res
;
return
res
;
},{
"EcalClusters"
});
},{
"EcalClusters"
})
.
Define
(
"nclusters"
,
"EcalClusters.size()"
)
;
auto
d1
=
d0
.
Filter
(
"nclusters==1"
);
auto
h_eta_thrown
=
d0
.
Histo1D
({
"h_eta_thrown"
,
" ; #eta "
,
100
,
-
5.0
,
0.0
},
"thrownEta"
);
auto
h_eta_thrown
=
d0
.
Histo1D
({
"h_eta_thrown"
,
" ; #eta "
,
100
,
-
5.0
,
0.0
},
"thrownEta"
);
auto
h_theta_thrown
=
d0
.
Histo1D
({
"h_theta_thrown"
,
"; #theta"
,
100
,
30.0
,
180.0
},
"thrownTheta"
);
auto
h_theta_thrown
=
d0
.
Histo1D
({
"h_theta_thrown"
,
"; #theta"
,
100
,
30.0
,
180.0
},
"thrownTheta"
);
auto
h_nclusters
=
d0
.
Histo1D
({
"h_nclusters"
,
"; N clusters"
,
6
,
0
,
6
},
"nclusters"
);
auto
h_Ecluster
=
d0
.
Histo1D
({
"h_Ecluster"
,
"; cluster E [GeV]"
,
100
,
0
,
30
},
"Ecluster"
);
auto
h_Ecluster1
=
d1
.
Histo1D
({
"h_Ecluster1"
,
"One cluster events; cluster E [GeV]"
,
100
,
0
,
30
},
"Ecluster"
);
auto
c
=
new
TCanvas
();
auto
c
=
new
TCanvas
();
h_eta_thrown
->
DrawCopy
();
h_eta_thrown
->
DrawCopy
();
c
=
new
TCanvas
();
c
->
SaveAs
(
"results/crystal_cal_electrons_etaThrown.png"
);
h_theta_thrown
->
DrawCopy
();
h_theta_thrown
->
DrawCopy
();
c
->
SaveAs
(
"results/crystal_cal_electrons_thetaThrown.png"
);
h_nclusters
->
DrawCopy
();
c
->
SaveAs
(
"results/crystal_cal_electrons_nclusters.png"
);
h_Ecluster
->
DrawCopy
();
h_Ecluster1
->
SetLineColor
(
2
);
h_Ecluster1
->
DrawCopy
(
"same"
);
c
->
SaveAs
(
"results/crystal_cal_electrons_Ecluster.png"
);
//std::string outfilename = "rdf_test.root";
//std::string outfilename = "rdf_test.root";
//df2.Snapshot("events", outfilename, {"MCParticles_pt", "mcparticles"});
//df2.Snapshot("events", outfilename, {"MCParticles_pt", "mcparticles"});
...
...
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