Skip to content

Commit

Permalink
Merge pull request #130 from JamesJieranShen/pr/clang-format-pr129
Browse files Browse the repository at this point in the history
Fix formatting issues in PR #129
  • Loading branch information
JamesJieranShen authored Apr 30, 2024
2 parents 7d82469 + 7361615 commit 0c4ebc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/gen/src/AmBeSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ AmBeSource::AmBeSource() {
double energy = massNeutron + neutronKE;
// info << "energy = " << energy*CLHEP::MeV << newline;
// Generate momentum direction uniformly in phi and cos(theta).
double phi = CLHEP::RandFlat::shoot(0., 2.0*M_PI);
double phi = CLHEP::RandFlat::shoot(0., 2.0 * M_PI);
double cosTheta = CLHEP::RandFlat::shoot(-1., 1.);
double sinTheta = sqrt(1. - cosTheta * cosTheta);

Expand Down Expand Up @@ -147,7 +147,7 @@ AmBeSource::AmBeSource() {
for (int nn = 0; nn < Ngamma; nn++) {
double energy = 4.43; // from the C12 first excited state
// Generate momentum direction uniformly in phi and cos(theta).
double phi = CLHEP::RandFlat::shoot(0., 2.0*M_PI);
double phi = CLHEP::RandFlat::shoot(0., 2.0 * M_PI);
double cosTheta = CLHEP::RandFlat::shoot(-1., 1.);
double sinTheta = sqrt(1. - cosTheta * cosTheta);
double px = energy * sinTheta * cos(phi);
Expand Down
4 changes: 2 additions & 2 deletions src/gen/src/CfSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ CfSource::CfSource(int newIsotope) : Isotope(newIsotope) {
double neutronKE = fGenerate->shoot() * (fhigh - flow) + flow;
double energy = massNeutron + neutronKE;
// Generate momentum direction uniformly in phi and cos(theta).
double phi = CLHEP::RandFlat::shoot(0., 2.0*M_PI);
double phi = CLHEP::RandFlat::shoot(0., 2.0 * M_PI);
double cosTheta = CLHEP::RandFlat::shoot(-1., 1.);
double sinTheta = sqrt(1. - cosTheta * cosTheta);
double neutronP2 = std::max(0., energy * energy - massNeutron * massNeutron);
Expand Down Expand Up @@ -181,7 +181,7 @@ CfSource::CfSource(int newIsotope) : Isotope(newIsotope) {
for (int nn = 0; nn < Ngamma; nn++) {
double energy = gGenerate->shoot() * (ghigh - glow) + glow;
// Generate momentum direction uniformly in phi and cos(theta).
double phi = CLHEP::RandFlat::shoot(0., 2.0*M_PI);
double phi = CLHEP::RandFlat::shoot(0., 2.0 * M_PI);
double cosTheta = CLHEP::RandFlat::shoot(-1., 1.);
double sinTheta = sqrt(1. - cosTheta * cosTheta);
double px = energy * sinTheta * cos(phi);
Expand Down

0 comments on commit 0c4ebc6

Please sign in to comment.