Skip to content
Snippets Groups Projects

Patch for DD4Hep #862: do not change momentum in getParticleDirection

Merged Wouter Deconinck requested to merge do-not-change-momentum-in-getParticleDirection into master
2 files
+ 38
0
Compare changes
  • Side-by-side
  • Inline
Files
2
 
diff --git a/DDG4/src/Geant4IsotropeGenerator.cpp b/DDG4/src/Geant4IsotropeGenerator.cpp
 
index 54588aaf..f63b29b4 100644
 
--- a/DDG4/src/Geant4IsotropeGenerator.cpp
 
+++ b/DDG4/src/Geant4IsotropeGenerator.cpp
 
@@ -48,7 +48,6 @@ void Geant4IsotropeGenerator::getParticleDirectionUniform(int, ROOT::Math::XYZVe
 
double x3 = std::cos(theta);
 
 
direction.SetXYZ(x1,x2,x3);
 
- momentum = rnd.rndm()*momentum;
 
}
 
 
/// Particle distribution ~ cos(theta)
 
@@ -63,7 +62,6 @@ void Geant4IsotropeGenerator::getParticleDirectionCosTheta(int, ROOT::Math::XYZV
 
double x3 = cos_theta;
 
 
direction.SetXYZ(x1,x2,x3);
 
- momentum = rnd.rndm()*momentum;
 
}
 
 
/// Particle distribution flat in eta (pseudo rapidity)
 
@@ -84,7 +82,6 @@ void Geant4IsotropeGenerator::getParticleDirectionEta(int, ROOT::Math::XYZVector
 
double x3 = std::sinh(eta);
 
double r = std::sqrt(1.0+x3*x3);
 
direction.SetXYZ(x1/r,x2/r,x3/r);
 
- momentum = rnd.rndm()*momentum;
 
}
 
 
/// e+e- --> ffbar particle distribution ~ 1 + cos^2(theta)
 
@@ -110,7 +107,6 @@ void Geant4IsotropeGenerator::getParticleDirectionFFbar(int, ROOT::Math::XYZVect
 
double x2 = std::sin(theta)*std::sin(phi);
 
double x3 = std::cos(theta);
 
direction.SetXYZ(x1,x2,x3);
 
- momentum = rnd.rndm()*momentum;
 
return;
 
}
 
}
Loading