Implements details of distance calculation to parts of the LAr endcap without sagging corrections.
More...
#include <DistanceCalculatorSaggingOff.h>
Implements details of distance calculation to parts of the LAr endcap without sagging corrections.
Definition at line 20 of file DistanceCalculatorSaggingOff.h.
◆ DistanceCalculatorSaggingOff()
LArWheelCalculator_Impl::DistanceCalculatorSaggingOff::DistanceCalculatorSaggingOff |
( |
LArWheelCalculator * |
lwc | ) |
|
◆ AmplitudeOfSurface()
double LArWheelCalculator_Impl::DistanceCalculatorSaggingOff::AmplitudeOfSurface |
( |
const CLHEP::Hep3Vector & |
P, |
|
|
int |
side, |
|
|
int |
fan_number |
|
) |
| const |
|
virtual |
Implements LArWheelCalculator_Impl::IDistanceCalculator.
Reimplemented in LArWheelCalculator_Impl::DistanceCalculatorSaggingOn.
Definition at line 418 of file DistanceCalculatorSaggingOff.cxx.
424 #ifdef LWC_PARAM_ANGLE //old variant
429 const double cos_a = scalpha.cs, sin_a = scalpha.sn;
433 lwc()->m_vsincos_par.eval(
P.y(), sin_a, cos_a);
438 if(
z < 0.) nqwave = 0;
439 else nqwave =
int(
z /
lwc()->m_QuarterWaveLength);
440 bool begin_qw =
false;
441 if((nqwave % 2) != 0){
450 if(nqwave != 0 && nqwave !=
lwc()->m_NumberOfHalfWaves){
456 if((nqwave % 2) == 0){
457 if(begin_qw) local_side = -1;
459 if(!begin_qw) local_side = -1;
464 if(dz >=
rho * sin_a){
468 + sqrt(
rho *
rho - dz * dz);
483 const double tan_beta = sin_a/(1.0+cos_a);
484 const double min_local_fold_region = rho1i * tan_beta;
486 if(
z <= - min_local_fold_region){
491 const double max_local_fold_region = rho1 * sin_a - min_local_fold_region;
493 if(
z < max_local_fold_region){
494 z += min_local_fold_region;
495 result = rho1 - sqrt(rho1 * rho1 -
z *
z);
502 if(dz >=
rho * sin_a){
506 + sqrt(
rho *
rho - dz * dz);
◆ DistanceToTheNeutralFibre()
double LArWheelCalculator_Impl::DistanceCalculatorSaggingOff::DistanceToTheNeutralFibre |
( |
const CLHEP::Hep3Vector & |
p, |
|
|
int |
fan_number |
|
) |
| const |
|
virtual |
Implements LArWheelCalculator_Impl::IDistanceCalculator.
Reimplemented in LArWheelCalculator_Impl::DistanceCalculatorSaggingOn.
Definition at line 29 of file DistanceCalculatorSaggingOff.cxx.
39 #ifdef LWC_PARAM_ANGLE //old variant
44 const double cos_a = scalpha.cs, sin_a = scalpha.sn;
45 #else // parameterized sine
47 lwc()->m_vsincos_par.eval(
P.y(), sin_a, cos_a);
50 int nqwave = (
z < 0.) ? 0 :
int(
z /
lwc()->m_QuarterWaveLength);
54 bool begin_qw =
false;
55 if((nqwave % 2) != 0){
66 if(nqwave != 0 && nqwave !=
lwc()->m_NumberOfHalfWaves){
69 if((nqwave % 2) == 0)
x = -
x;
76 const double z_prime =
z * cos_a +
x * sin_a;
77 const double x_prime =
x * cos_a -
z * sin_a;
79 if(z_prime > straight_part){
80 const double dz = straight_part - z_prime;
83 }
else if(z_prime > -straight_part){
86 const double dz = straight_part + z_prime;
101 const double tan_beta = sin_a/(1.0 + cos_a);
103 if(
z < - local_straight_section &&
104 (
x <
lwc()->m_FanFoldRadius ||
105 x < -
lwc()->m_StraightStartSection *
z / local_straight_section / tan_beta ) )
110 const double z_prime =
z * cos_a +
x * sin_a;
111 const double x_prime =
x * cos_a -
z * sin_a;
112 if (z_prime < local_straight_section) {
113 const double dz = local_straight_section - z_prime;
118 if (z_prime <= straight_part) {
121 const double dz = straight_part - z_prime;
134 std::cout <<
"DTNF MISMATCH " <<
this <<
" " <<
P <<
" "
◆ DistanceToTheNeutralFibre_ref()
double LArWheelCalculator_Impl::DistanceCalculatorSaggingOff::DistanceToTheNeutralFibre_ref |
( |
const CLHEP::Hep3Vector & |
p, |
|
|
int |
fan_number |
|
) |
| const |
|
virtual |
Definition at line 147 of file DistanceCalculatorSaggingOff.cxx.
153 #ifdef LWC_PARAM_ANGLE //old variant
156 double cos_a = scalpha.cs, sin_a = scalpha.sn;
157 #else // parameterized sine
159 lwc()->m_vsincos_par.eval(
P.y(), sin_a, cos_a);
163 if(
z >
lwc()->m_QuarterWaveLength){
169 if(nhwave == 0) sin_a = - sin_a;
170 double z_prime =
z * cos_a +
x * sin_a;
171 const double x_prime =
z * sin_a -
x * cos_a;
172 if(z_prime > straight_part){
173 const double dz = z_prime - straight_part;
182 z_prime += straight_part;
186 const double &dz = z_prime;
204 const double tan_beta = sin_a/(1.0 + cos_a);
206 if(
z < - local_straight_section &&
207 (
x <
lwc()->m_FanFoldRadius ||
208 x < -
lwc()->m_StraightStartSection *
z / local_straight_section / tan_beta ))
213 const double z_prime =
z * cos_a +
x * sin_a;
214 const double x_prime =
x * cos_a -
z * sin_a;
215 if (z_prime < local_straight_section) {
216 const double dz = local_straight_section - z_prime;
221 const double straight_part =
223 if (z_prime <= straight_part) {
224 return sqw? x_prime: (-x_prime);
226 const double dz = straight_part - z_prime;
◆ lwc()
◆ NearestPointOnNeutralFibre()
CLHEP::Hep3Vector LArWheelCalculator_Impl::DistanceCalculatorSaggingOff::NearestPointOnNeutralFibre |
( |
const CLHEP::Hep3Vector & |
p, |
|
|
int |
fan_number |
|
) |
| const |
|
virtual |
Implements LArWheelCalculator_Impl::IDistanceCalculator.
Reimplemented in LArWheelCalculator_Impl::DistanceCalculatorSaggingOn.
Definition at line 237 of file DistanceCalculatorSaggingOff.cxx.
244 #ifdef LWC_PARAM_ANGLE //old variant
247 const double cos_a = scalpha.cs, sin_a = scalpha.sn;
248 #else // parameterized sine
250 lwc()->m_vsincos_par.eval(
P.y(), sin_a, cos_a);
254 if(
z < 0.) nqwave = 0;
255 else nqwave =
int(
z /
lwc()->m_QuarterWaveLength);
256 bool begin_qw =
false;
257 if((nqwave % 2) != 0){
262 if(nqwave != 0 && nqwave !=
lwc()->m_NumberOfHalfWaves){
264 if((nqwave % 2) == 0)
x = -
x;
269 const double z_prime =
z * cos_a +
x * sin_a;
270 const double x_prime =
x * cos_a -
z * sin_a;
272 const double dz = straight_part - z_prime;
273 if (dz > 0)
result.set(0.,
y, z_prime);
275 double a =
atan(fabs(dz / (x_prime +
lwc()->m_FanFoldRadius)));
276 result.set(
lwc()->m_FanFoldRadius * (
cos(
a) - 1),
y, straight_part +
lwc()->m_FanFoldRadius *
sin(
a));
278 result.rotateY(asin(sin_a));
286 if(nqwave == 0)
x = -
x;
288 const double tan_beta = sin_a/(1.0+cos_a);
290 if(
z < - local_straight_section &&
291 (
x <
lwc()->m_FanFoldRadius ||
292 x < -
lwc()->m_StraightStartSection *
z / local_straight_section / tan_beta))
297 const double z_prime =
z * cos_a +
x * sin_a;
298 const double x_prime =
x * cos_a -
z * sin_a;
299 if(z_prime < local_straight_section) {
300 double a = fabs(
atan((local_straight_section - z_prime) / (x_prime -
lwc()->m_FanFoldRadius)));
302 result.set(
lwc()->m_FanFoldRadius * (1 -
cos(
a)),
y, local_straight_section -
lwc()->m_FanFoldRadius *
sin(
a));
305 if(z_prime <= straight_part) {
308 double a = fabs(
atan((straight_part - z_prime) / (x_prime +
lwc()->m_FanFoldRadius)) );
309 result.set(
lwc()->m_FanFoldRadius * (
cos(
a) - 1),
y, straight_part +
lwc()->m_FanFoldRadius *
sin(
a));
312 result.rotateY(asin(sin_a));
◆ NearestPointOnNeutralFibre_ref()
CLHEP::Hep3Vector LArWheelCalculator_Impl::DistanceCalculatorSaggingOff::NearestPointOnNeutralFibre_ref |
( |
const CLHEP::Hep3Vector & |
p, |
|
|
int |
fan_number |
|
) |
| const |
|
virtual |
Definition at line 325 of file DistanceCalculatorSaggingOff.cxx.
332 #ifdef LWC_PARAM_ANGLE //old variant
335 double cos_a = scalpha.cs, sin_a = scalpha.sn;
336 #else // parameterized sine
338 lwc()->m_vsincos_par.eval(
P.y(), sin_a, cos_a);
342 if(
z >
lwc()->m_QuarterWaveLength){
347 const double straight_part =
350 if(nhwave == 0) sin_a = - sin_a;
351 const double z_prime =
z * cos_a +
x * sin_a;
352 if(z_prime > straight_part){
353 const double x_prime =
x * cos_a -
z * sin_a;
354 const double dz = straight_part - z_prime;
355 double a1 =
atan(fabs(dz / (x_prime +
lwc()->m_FanFoldRadius)));
358 result.set(
x1*cos_a - z1*sin_a,
y, z1*cos_a + z1*sin_a);
360 }
else if(z_prime > -straight_part){
361 result.set(-z_prime * sin_a,
y, z_prime*cos_a + zshift);
364 const double x_prime =
x * cos_a -
z * sin_a;
365 const double dz = straight_part + z_prime;
366 double a1 =
atan(fabs(dz / (x_prime +
lwc()->m_FanFoldRadius)));
369 result.set(
x1*cos_a - z1*sin_a,
y, z1*cos_a + z1*sin_a);
381 const double tan_beta = sin_a / (1.0 + cos_a);
383 if(
z < - local_straight_section &&
384 (
x <
lwc()->m_FanFoldRadius ||
385 x < -
lwc()->m_StraightStartSection *
z / local_straight_section / tan_beta))
390 const double z_prime =
z * cos_a +
x * sin_a;
391 const double x_prime =
x * cos_a -
z * sin_a;
392 if(z_prime < local_straight_section) {
393 double a = fabs(
atan((local_straight_section - z_prime) / (x_prime -
lwc()->m_FanFoldRadius)));
394 result.set(
lwc()->m_FanFoldRadius * (1 -
cos(
a)),
y, local_straight_section -
lwc()->m_FanFoldRadius *
sin(
a));
397 if(z_prime <= straight_part) {
400 double a = fabs(
atan((straight_part - z_prime) / (x_prime +
lwc()->m_FanFoldRadius)) );
401 result.set(
lwc()->m_FanFoldRadius * (
cos(
a) - 1),
y, straight_part +
lwc()->m_FanFoldRadius *
sin(
a));
404 result.rotateY(asin(sin_a));
◆ m_EndQuarterWave
double LArWheelCalculator_Impl::DistanceCalculatorSaggingOff::m_EndQuarterWave |
|
private |
◆ m_lwc
The documentation for this class was generated from the following files: