Implements details of distance calculation to parts of the LAr endcap with sagging taken into account.
More...
#include <DistanceCalculatorSaggingOn.h>
Implements details of distance calculation to parts of the LAr endcap with sagging taken into account.
Definition at line 18 of file DistanceCalculatorSaggingOn.h.
◆ parent
◆ DistanceCalculatorSaggingOn()
LArWheelCalculator_Impl::DistanceCalculatorSaggingOn::DistanceCalculatorSaggingOn |
( |
const std::string & |
saggingOptions, |
|
|
LArWheelCalculator * |
lwc |
|
) |
| |
◆ AmplitudeOfSurface()
double LArWheelCalculator_Impl::DistanceCalculatorSaggingOn::AmplitudeOfSurface |
( |
const CLHEP::Hep3Vector & |
P, |
|
|
int |
side, |
|
|
int |
fan_number |
|
) |
| const |
|
virtual |
◆ DistanceToTheNeutralFibre()
double LArWheelCalculator_Impl::DistanceCalculatorSaggingOn::DistanceToTheNeutralFibre |
( |
const CLHEP::Hep3Vector & |
p, |
|
|
int |
fan_number |
|
) |
| const |
|
virtual |
◆ DistanceToTheNeutralFibre_ref()
double LArWheelCalculator_Impl::DistanceCalculatorSaggingOff::DistanceToTheNeutralFibre_ref |
( |
const CLHEP::Hep3Vector & |
p, |
|
|
int |
fan_number |
|
) |
| const |
|
virtualinherited |
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;
◆ get_sagging()
double LArWheelCalculator_Impl::DistanceCalculatorSaggingOn::get_sagging |
( |
const CLHEP::Hep3Vector & |
P, |
|
|
int |
fan_number |
|
) |
| const |
|
private |
Definition at line 133 of file DistanceCalculatorSaggingOn.cxx.
135 std::cout <<
"get_sagging: MFN = " << fan_number << std::endl;
147 double R =
P.r() /
mm;
162 printf(
"get_sagging: (%6.3f, %6.3f, %6.3f) %6.3f;"
163 " sp %6.4f %6.4f; dx %6.3f; %.6f\n",
P.x()/
mm,
P.y()/
mm,
P.z()/
mm,
◆ init_sagging_parameters()
void LArWheelCalculator_Impl::DistanceCalculatorSaggingOn::init_sagging_parameters |
( |
| ) |
|
|
private |
Definition at line 36 of file DistanceCalculatorSaggingOn.cxx.
40 #ifndef PORTABLE_LAR_SHAPE
41 SmartIF<IMessageSvc>
msgSvc{Gaudi::svcLocator()->service(
"MessageSvc")};
43 throw std::runtime_error(
"LArWheelCalculator constructor: cannot initialze message service");
45 MsgStream
msg(
msgSvc,
"LArWheelCalculator_Impl::DistanceCalculatorSaggingOn");
47 PortableMsgStream
msg(
"LArWheelCalculator_Impl::DistanceCalculatorSaggingOn");
52 if(sagging_opt_value.substr(0, 4) ==
"file"){
53 std::string sag_file = sagging_opt_value.substr(5);
55 <<
"geting sagging parameters from file "
56 << sag_file <<
" ..." <<
endmsg;
57 FILE *
F = fopen(sag_file.c_str(),
"r");
60 <<
"cannot open EMEC sagging parameters file "
63 throw std::runtime_error(
"LArWheelCalculator: read sagging parameters from file");
68 fscanf(F,
"%80d %80d %80d %80d %80le %80le %80le %80le %80le",
71 if(
s ==
lwc()->m_AtlasZside &&
72 ((
w == 0 &&
lwc()->m_isInner) || (
w == 1 && !
lwc()->m_isInner)) &&
73 ((
t == 0 && !
lwc()->m_isElectrode) || (
t == 1 &&
lwc()->m_isElectrode)) &&
74 (
n >= 0 &&
n <
lwc()->m_NumberOfFans))
82 <<
"sagging for " <<
s <<
" " <<
w <<
" " <<
t
83 <<
" " <<
n <<
": " <<
p0 <<
" " <<
p1 <<
" "
90 if(sscanf(sagging_opt_value.c_str(),
"%80le %80le %80le %80le", &
a, &
b, &
c, &
d) != 4){
93 <<
" for EMEC sagging parameters: "
94 << sagging_opt_value <<
", defaults are used" <<
endmsg;
◆ lwc()
◆ NearestPointOnNeutralFibre()
CLHEP::Hep3Vector LArWheelCalculator_Impl::DistanceCalculatorSaggingOn::NearestPointOnNeutralFibre |
( |
const CLHEP::Hep3Vector & |
p, |
|
|
int |
fan_number |
|
) |
| const |
|
virtual |
◆ NearestPointOnNeutralFibre_ref()
CLHEP::Hep3Vector LArWheelCalculator_Impl::DistanceCalculatorSaggingOff::NearestPointOnNeutralFibre_ref |
( |
const CLHEP::Hep3Vector & |
p, |
|
|
int |
fan_number |
|
) |
| const |
|
virtualinherited |
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 |
|
privateinherited |
◆ m_lwc
◆ m_sagging_parameter
std::vector<std::vector<double> > LArWheelCalculator_Impl::DistanceCalculatorSaggingOn::m_sagging_parameter |
|
private |
◆ m_saggingOptions
std::string LArWheelCalculator_Impl::DistanceCalculatorSaggingOn::m_saggingOptions |
|
private |
The documentation for this class was generated from the following files: