Skip to content
Snippets Groups Projects
Commit 2aa74f96 authored by Jihee Kim's avatar Jihee Kim
Browse files

Merge branch 'master' into 'master'

Correct Random Number

See merge request !5
parents 4abee179 1591d3a7
Branches
No related tags found
1 merge request!5Correct Random Number
...@@ -19,9 +19,8 @@ void emcal_electrons(){ ...@@ -19,9 +19,8 @@ void emcal_electrons(){
int events_parsed = 0; int events_parsed = 0;
GenEvent evt(Units::GEV, Units::MM); GenEvent evt(Units::GEV, Units::MM);
// Set up random number generators // Random number pulled from the env variable
std::random_device rd; std::mt19937 gen( std::stoi(std::getenv("SEED")) );
std::mt19937 gen(rd());
std::uniform_real_distribution<double> uniform_theta(135.0*TMath::DegToRad(),178.0*TMath::DegToRad()); // 135-178[degree] 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] std::uniform_real_distribution<double> uniform_phi(0.0,2*TMath::Pi()); // 360[degree]
......
#!/bin/bash
export SEED="1337" export SEED="1337"
...@@ -20,9 +20,8 @@ void zdc_photons(){ ...@@ -20,9 +20,8 @@ void zdc_photons(){
GenEvent evt(Units::GEV, Units::MM); GenEvent evt(Units::GEV, Units::MM);
// Set up random number generators // Random number pulled from the env variable
std::random_device rd; std::mt19937 gen( std::stoi(std::getenv("SEED")) );
std::mt19937 gen(rd());
std::uniform_real_distribution<double> uniform_theta(0.0,2.0*TMath::DegToRad()); // 2[degree] 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] std::uniform_real_distribution<double> uniform_phi(0.0,2.0*TMath::Pi()); // 360[degree]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment