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();