Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
datasets
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
Container registry
Model registry
Operate
Environments
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
datasets
Commits
1591d3a7
Commit
1591d3a7
authored
4 years ago
by
Jihee Kim
Browse files
Options
Downloads
Patches
Plain Diff
Corrected random number pulled from env variable
parent
4abee179
No related branches found
No related tags found
1 merge request
!5
Correct Random Number
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
emcal_electrons.cxx
+2
-3
2 additions, 3 deletions
emcal_electrons.cxx
setup.sh
+2
-0
2 additions, 0 deletions
setup.sh
zdc_photons.cxx
+2
-3
2 additions, 3 deletions
zdc_photons.cxx
with
6 additions
and
6 deletions
emcal_electrons.cxx
+
2
−
3
View file @
1591d3a7
...
...
@@ -19,9 +19,8 @@ void emcal_electrons(){
int
events_parsed
=
0
;
GenEvent
evt
(
Units
::
GEV
,
Units
::
MM
);
// Set up random number generators
std
::
random_device
rd
;
std
::
mt19937
gen
(
rd
());
// Random number pulled from the env variable
std
::
mt19937
gen
(
std
::
stoi
(
std
::
getenv
(
"SEED"
))
);
std
::
uniform_real_distribution
<
double
>
uniform_theta
(
135.0
*
TMath
::
DegToRad
(),
178.0
*
TMath
::
DegToRad
());
// 135-178[degree]
std
::
uniform_real_distribution
<
double
>
uniform_phi
(
0.0
,
2
*
TMath
::
Pi
());
// 360[degree]
...
...
This diff is collapsed.
Click to expand it.
setup.sh
+
2
−
0
View file @
1591d3a7
#!/bin/bash
export
SEED
=
"1337"
This diff is collapsed.
Click to expand it.
zdc_photons.cxx
+
2
−
3
View file @
1591d3a7
...
...
@@ -20,9 +20,8 @@ void zdc_photons(){
GenEvent
evt
(
Units
::
GEV
,
Units
::
MM
);
// Set up random number generators
std
::
random_device
rd
;
std
::
mt19937
gen
(
rd
());
// Random number pulled from the env variable
std
::
mt19937
gen
(
std
::
stoi
(
std
::
getenv
(
"SEED"
))
);
std
::
uniform_real_distribution
<
double
>
uniform_theta
(
0.0
,
2.0
*
TMath
::
DegToRad
());
// 2[degree]
std
::
uniform_real_distribution
<
double
>
uniform_phi
(
0.0
,
2.0
*
TMath
::
Pi
());
// 360[degree]
...
...
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