|
|
Go to the documentation of this file.
40 : theInnerPoint(innerPoint), theOuterPoint(outerPoint), theVertexPoint(vertexPoint) {
70 double s = (SecInnerPoint - InitialVertex).
mag();
71 double deltaTheta =
s / primCircle.
rho();
73 double minTangentCondition = 1E12;
77 double theta = deltaTheta / (NITER - 1);
79 for (
int i = 0;
i < NITER;
i++) {
84 double minCond =
isTangent(primCircle, secCircle);
89 if (minCond < minTangentCondition) {
90 minTangentCondition = minCond;
91 theCorrectSecCircle = secCircle;
93 if (
i == 0 && ((
vertex - SecInnerPoint).
mag() > (InitialVertex - SecInnerPoint).
mag())) {
96 LogDebug(
"NuclearSeedGenerator") <<
"Change direction to look for vertex"
105 theX0 = theCorrectSecCircle.
x0();
106 theY0 = theCorrectSecCircle.
y0();
117 double distanceBetweenCircle = (primCircle.
x0() - secCircle.
x0()) * (primCircle.
x0() - secCircle.
x0()) +
118 (primCircle.
y0() - secCircle.
y0()) * (primCircle.
y0() - secCircle.
y0());
119 double RadiusSum = (primCircle.
rho() + secCircle.
rho()) * (primCircle.
rho() + secCircle.
rho());
120 double RadiusDifference = (primCircle.
rho() - secCircle.
rho()) * (primCircle.
rho() - secCircle.
rho());
122 return std::min(fabs(RadiusSum - distanceBetweenCircle), fabs(RadiusDifference - distanceBetweenCircle));
127 LogDebug(
"NuclearSeedGenerator") <<
"Center of TangentCircle not calculated but used !!!"
139 double sum = (
dir + fastDir).
mag();
158 double x2 = initalPosition.
x();
159 double y2 = initalPosition.
y();
161 if ((
x2 > circle.
x0()) &&
dir > 0) {
166 if ((
x2 > circle.
x0()) &&
dir < 0) {
171 if ((
x2 < circle.
x0()) &&
dir > 0) {
176 if ((
x2 < circle.
x0()) &&
dir < 0) {
183 double alpha = atan((
y2 - circle.
y0()) / (
x2 - circle.
x0()));
197 return fabs(1 / circle1.
rho() - 1 / circle2.
rho());
201 return fabs(1 / circle1.
rho() - 1 / circle2.
rho());
218 if (u.
x() *
F.x() + u.
y() *
F.y() > 0)
224 LogDebug(
"NuclearSeedGenerator") <<
"Inconsistency in calculation of the charge"
233 double tz =
v.x() * u.
y() -
v.y() * u.
x();
GlobalPoint theOuterPoint
Global3DVector GlobalVector
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Sin< T >::type sin(const T &t)
Cos< T >::type cos(const T &t)
double isTangent(const TangentCircle &primCircle, const TangentCircle &secCircle) const
GlobalPoint getPosition(const TangentCircle &circle, const GlobalPoint &initalPosition, double theta, int direction) const
Geom::Theta< T > theta() const
Global3DPoint GlobalPoint
GlobalVector direction(const GlobalPoint &point) const
GlobalPoint vertexPoint() const
GlobalVector theDirectionAtVertex
GlobalPoint innerPoint() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
GlobalPoint outerPoint() const
GlobalVector directionAtVertex()
Return the direction at the vertex.
GlobalPoint theInnerPoint
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
GlobalPoint theVertexPoint
int chargeLocally(float magz, GlobalVector v) const