Skip to content
Snippets Groups Projects
Commit 35eb953f authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

Patch for DD4Hep #862

parent a1ce312c
No related branches found
No related tags found
1 merge request!127Patch for DD4Hep #862: do not change momentum in getParticleDirection
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;
}
}
...@@ -54,6 +54,8 @@ class Dd4hep(CMakePackage): ...@@ -54,6 +54,8 @@ class Dd4hep(CMakePackage):
# https://github.com/AIDASoft/DD4hep/pull/849 # https://github.com/AIDASoft/DD4hep/pull/849
# https://github.com/AIDASoft/DD4hep/pull/851 # https://github.com/AIDASoft/DD4hep/pull/851
patch('2021-07-27.patch', when='@1.17p1') patch('2021-07-27.patch', when='@1.17p1')
# patch for https://github.com/AIDASoft/DD4hep/issues/862
patch('0001-do-not-change-momentum-in-getParticleDirection.patch', when='@1.17p1')
variant('xercesc', default=False, description="Enable 'Detector Builders' based on XercesC") variant('xercesc', default=False, description="Enable 'Detector Builders' based on XercesC")
variant('geant4', default=False, description="Enable the simulation part based on Geant4") variant('geant4', default=False, description="Enable the simulation part based on Geant4")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment