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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
detector_benchmarks
Commits
19de0a0a
Commit
19de0a0a
authored
Sep 27, 2021
by
Zhenyu Ye
Browse files
Options
Downloads
Patches
Plain Diff
Debug TOF
parent
fd459df1
Branches
Branches containing commit
No related tags found
1 merge request
!92
Draft: Resolve "Add TOF benchmark"
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
benchmarks/tof/scripts/gen_tof_hits.cxx
+1
-1
1 addition, 1 deletion
benchmarks/tof/scripts/gen_tof_hits.cxx
benchmarks/tof/scripts/sim_tof_hits.cxx
+6
-7
6 additions, 7 deletions
benchmarks/tof/scripts/sim_tof_hits.cxx
benchmarks/tof/tof_hits.sh
+2
-2
2 additions, 2 deletions
benchmarks/tof/tof_hits.sh
with
9 additions
and
10 deletions
benchmarks/tof/scripts/gen_tof_hits.cxx
+
1
−
1
View file @
19de0a0a
...
@@ -34,12 +34,12 @@ void gen_tof_hits(int n_events = 100,
...
@@ -34,12 +34,12 @@ void gen_tof_hits(int n_events = 100,
// pdgid 11 - electron
// pdgid 11 - electron
// pdgid 111 - pi0
// pdgid 111 - pi0
// pdgid 2212 - proton
// pdgid 2212 - proton
Double_t
p
=
r1
->
Uniform
(
0.2
,
2
);
for
(
int
ip
=
0
;
ip
<
n_parts
;
ip
++
)
{
for
(
int
ip
=
0
;
ip
<
n_parts
;
ip
++
)
{
GenParticlePtr
p1
=
std
::
make_shared
<
GenParticle
>
(
FourVector
(
0.0
,
0.0
,
10.0
,
10.0
),
11
,
4
);
GenParticlePtr
p1
=
std
::
make_shared
<
GenParticle
>
(
FourVector
(
0.0
,
0.0
,
10.0
,
10.0
),
11
,
4
);
GenParticlePtr
p2
=
std
::
make_shared
<
GenParticle
>
(
FourVector
(
0.0
,
0.0
,
0.0
,
0.938
),
2212
,
4
);
GenParticlePtr
p2
=
std
::
make_shared
<
GenParticle
>
(
FourVector
(
0.0
,
0.0
,
0.0
,
0.938
),
2212
,
4
);
// Define momentum
// Define momentum
Double_t
p
=
r1
->
Uniform
(
0.2
,
2
);
Double_t
phi
=
r1
->
Uniform
(
0.0
,
2.0
*
M_PI
);
Double_t
phi
=
r1
->
Uniform
(
0.0
,
2.0
*
M_PI
);
Double_t
costh
=
0
;
//r1->Uniform(cos_theta_min, cos_theta_max);
Double_t
costh
=
0
;
//r1->Uniform(cos_theta_min, cos_theta_max);
Double_t
th
=
std
::
acos
(
costh
);
Double_t
th
=
std
::
acos
(
costh
);
...
...
This diff is collapsed.
Click to expand it.
benchmarks/tof/scripts/sim_tof_hits.cxx
+
6
−
7
View file @
19de0a0a
...
@@ -96,7 +96,6 @@ int sim_tof_hits(const char* fname = "sim_tof_hits.root")
...
@@ -96,7 +96,6 @@ int sim_tof_hits(const char* fname = "sim_tof_hits.root")
.
Define
(
"N_VertexBarrelHits"
,
[](
std
::
vector
<
dd4pod
::
TrackerHitData
>
hits
)
{
return
hits
.
size
();},
{
"VertexBarrelHits"
})
.
Define
(
"N_VertexBarrelHits"
,
[](
std
::
vector
<
dd4pod
::
TrackerHitData
>
hits
)
{
return
hits
.
size
();},
{
"VertexBarrelHits"
})
.
Define
(
"N_VertexEndcapHits"
,
[](
std
::
vector
<
dd4pod
::
TrackerHitData
>
hits
)
{
return
hits
.
size
();},
{
"VertexEndcapHits"
})
.
Define
(
"N_VertexEndcapHits"
,
[](
std
::
vector
<
dd4pod
::
TrackerHitData
>
hits
)
{
return
hits
.
size
();},
{
"VertexEndcapHits"
})
.
Define
(
"N_BarrelHits"
,
[](
std
::
vector
<
dd4pod
::
TrackerHitData
>
hits
)
{
return
hits
.
size
();},
{
"TrackerBarrelHits"
})
.
Define
(
"N_BarrelHits"
,
[](
std
::
vector
<
dd4pod
::
TrackerHitData
>
hits
)
{
return
hits
.
size
();},
{
"TrackerBarrelHits"
})
.
Define
(
"p_barrelhits"
,
momentum
,
{
"BarrelTOFHits.momentum"
})
.
Define
(
"N_EndcapHits"
,
[](
std
::
vector
<
dd4pod
::
TrackerHitData
>
hits
)
{
return
hits
.
size
();},
{
"TrackerEndcapHits"
})
.
Define
(
"N_EndcapHits"
,
[](
std
::
vector
<
dd4pod
::
TrackerHitData
>
hits
)
{
return
hits
.
size
();},
{
"TrackerEndcapHits"
})
.
Define
(
"N_BarrelTOFHits"
,
[](
std
::
vector
<
dd4pod
::
TrackerHitData
>
hits
)
{
return
hits
.
size
();},
{
"BarrelTOFHits"
})
.
Define
(
"N_BarrelTOFHits"
,
[](
std
::
vector
<
dd4pod
::
TrackerHitData
>
hits
)
{
return
hits
.
size
();},
{
"BarrelTOFHits"
})
.
Define
(
"N_ForwardTOFHits"
,
[](
std
::
vector
<
dd4pod
::
TrackerHitData
>
hits
)
{
return
hits
.
size
();},
{
"ForwardTOFHits"
})
.
Define
(
"N_ForwardTOFHits"
,
[](
std
::
vector
<
dd4pod
::
TrackerHitData
>
hits
)
{
return
hits
.
size
();},
{
"ForwardTOFHits"
})
...
@@ -148,9 +147,9 @@ int sim_tof_hits(const char* fname = "sim_tof_hits.root")
...
@@ -148,9 +147,9 @@ int sim_tof_hits(const char* fname = "sim_tof_hits.root")
auto
hVertexEndcap_N_vs_theta
=
df0
.
Histo1D
({
"hVertexEndcap_N_vs_theta"
,
"; #theta [deg.]"
,
20
,
0
,
180
},
"theta0"
,
"N_VertexEndcapHits"
);
auto
hVertexEndcap_N_vs_theta
=
df0
.
Histo1D
({
"hVertexEndcap_N_vs_theta"
,
"; #theta [deg.]"
,
20
,
0
,
180
},
"theta0"
,
"N_VertexEndcapHits"
);
auto
hBarrelTof_time_vs_
momentum
=
df0
.
Histo2D
(
auto
hBarrelTof_time_vs_
length
=
df0
.
Histo2D
(
{
"hBarrelTof_time_vs_
momentum
"
,
"; time ;
momentum
"
,
100
,
0
,
3
,
100
,
0
,
5
},
{
"hBarrelTof_time_vs_
length
"
,
"; time ;
length
"
,
100
,
0
,
10
,
100
,
0
,
1
},
"BarrelTOFHits.truth.time"
,
"
p_b
arrel
hits
"
);
"BarrelTOFHits.truth.time"
,
"
B
arrel
TOFHits.length
"
);
auto
hBarrelTof_x_vs_y
=
df0
.
Histo2D
(
auto
hBarrelTof_x_vs_y
=
df0
.
Histo2D
(
{
"hBarrelTof_x_vs_y"
,
"; x ; y "
,
100
,
-
600
,
600
,
100
,
-
600
,
600
},
{
"hBarrelTof_x_vs_y"
,
"; x ; y "
,
100
,
-
600
,
600
,
100
,
-
600
,
600
},
...
@@ -291,9 +290,9 @@ int sim_tof_hits(const char* fname = "sim_tof_hits.root")
...
@@ -291,9 +290,9 @@ int sim_tof_hits(const char* fname = "sim_tof_hits.root")
c
=
new
TCanvas
();
c
=
new
TCanvas
();
hBarrelTof_time_vs_
momentum
->
DrawCopy
(
"colz"
);
hBarrelTof_time_vs_
length
->
DrawCopy
(
"colz"
);
c
->
SaveAs
(
"results/tof/sim_tof_hits_tofBarrel_t
p
.png"
);
c
->
SaveAs
(
"results/tof/sim_tof_hits_tofBarrel_t
l
.png"
);
c
->
SaveAs
(
"results/tof/sim_tof_hits_tofBarrel_t
p
.pdf"
);
c
->
SaveAs
(
"results/tof/sim_tof_hits_tofBarrel_t
l
.pdf"
);
c
=
new
TCanvas
();
c
=
new
TCanvas
();
hBarrelTof_x_vs_y
->
DrawCopy
(
"colz"
);
hBarrelTof_x_vs_y
->
DrawCopy
(
"colz"
);
c
->
SaveAs
(
"results/tof/sim_tof_hits_tofBarrel_xy.png"
);
c
->
SaveAs
(
"results/tof/sim_tof_hits_tofBarrel_xy.png"
);
...
...
This diff is collapsed.
Click to expand it.
benchmarks/tof/tof_hits.sh
+
2
−
2
View file @
19de0a0a
...
@@ -57,7 +57,7 @@ if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then
...
@@ -57,7 +57,7 @@ if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then
export
JUGGLER_N_EVENTS
=
100
export
JUGGLER_N_EVENTS
=
100
fi
fi
export
JUGGLER_N_EVENTS
=
5
export
JUGGLER_N_EVENTS
=
100
export
JUGGLER_FILE_NAME_TAG
=
"tof_hits"
export
JUGGLER_FILE_NAME_TAG
=
"tof_hits"
export
JUGGLER_GEN_FILE
=
"
${
LOCAL_DATA_PATH
}
/
${
JUGGLER_FILE_NAME_TAG
}
.hepmc"
export
JUGGLER_GEN_FILE
=
"
${
LOCAL_DATA_PATH
}
/
${
JUGGLER_FILE_NAME_TAG
}
.hepmc"
...
@@ -111,7 +111,7 @@ fi
...
@@ -111,7 +111,7 @@ fi
root_filesize
=
$(
stat
--format
=
%s
"
${
JUGGLER_SIM_FILE
}
"
)
root_filesize
=
$(
stat
--format
=
%s
"
${
JUGGLER_SIM_FILE
}
"
)
if
[[
"
${
JUGGLER_N_EVENTS
}
"
-lt
"500"
]]
;
then
if
[[
"
${
JUGGLER_N_EVENTS
}
"
-lt
"500"
]]
;
then
# file must be less than 10 MB to upload
# file must be less than 10 MB to upload
if
[[
"
${
root_filesize
}
"
-lt
"
1
0000000"
]]
;
then
if
[[
"
${
root_filesize
}
"
-lt
"
5
0000000"
]]
;
then
cp
${
JUGGLER_SIM_FILE
}
results/.
cp
${
JUGGLER_SIM_FILE
}
results/.
fi
fi
fi
fi
...
...
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