11#ifndef PORTABLE_LAR_SHAPE
12#include "GaudiKernel/Bootstrap.h"
13#include "GaudiKernel/ISvcLocator.h"
14#include "GaudiKernel/MsgStream.h"
26#include "GeoModelKernel/Units.h"
28using namespace GeoModelKernelUnits;
61 { -50.069, 0.50073, -0.10127E-02, 0.10390E-05, -0.42176E-09 },
62 { -34.254, 0.15528, -0.11670E-03, 0.45018E-07, -0.68473E-11 }
106#ifndef PORTABLE_LAR_SHAPE
108 SmartIF<IMessageSvc> msgSvc{Gaudi::svcLocator()->service(
"MessageSvc")};
109 if(!msgSvc.isValid()){
110 throw std::runtime_error(
"LArWheelCalculator constructor: cannot initialze message service");
112 MsgStream
msg(msgSvc,
"LArWheelCalculator");
114 PortableMsgStream
msg(
"LArWheelCalculator");
116 msg << MSG::VERBOSE <<
"LArWheelCalculator constructor at " <<
this
121 msg << MSG::VERBOSE <<
"LArWheelCalculator constructor at " <<
this
126 msg << MSG::VERBOSE <<
"compiled with new DTNF" <<
endmsg;
131 <<
"initializing data members from DB..." <<
endmsg;
165 std::string pr_opt_value=emecData.
emecparams[0].PHIROTATION;
166 std::string sagging_opt_value=emecData.
emecparams[0].SAGGING;
173 msg << MSG::DEBUG <<
"... got these values:" <<
endmsg
185 msg << MSG::VERBOSE <<
"hardcoded constants: " <<
endmsg
281 throw std::runtime_error(
"LArWheelCalculator constructor:unknown LArWheelCalculator_t");
294 msg << MSG::VERBOSE <<
"SAGGING value = " << sagging_opt_value <<
endmsg;
297 m_SaggingOn = (sagging_opt_value !=
"" && sagging_opt_value !=
"off")?
true:
false;
300 sagging_opt_value,
this);
302 msg << MSG::VERBOSE <<
"Creating DistanceCalculatorSaggingOn = " <<
this
305 msg << MSG::VERBOSE <<
"Creating DistanceCalculatorSaggingOff = " <<
this
318 msg << MSG::VERBOSE <<
"Loading SlantAngle parameters ...";
319 std::string slant_params;
322 slant_params=emecData.
emecparams[0].INNERSLANTPARAM;
324 slant_params=emecData.
emecparams[0].OUTERSLANTPARAM;
329 if(slant_params !=
"" && slant_params !=
"default"){
330 double a, b, c, d, e;
331 if(sscanf(slant_params.c_str(),
"%80le %80le %80le %80le %80le", &
a, &b, &c, &d, &e) != 5){
333 <<
"LArWheelCalculator: ERROR: wrong value(s) "
334 <<
"for EMEC slant angle parameters: "
335 << slant_params <<
", "
336 <<
"defaults are used" <<
endmsg;
349 msg << MSG::VERBOSE <<
"All params initialized. Print some internal variables" <<
endmsg;
351 msg << MSG::VERBOSE <<
"Data members:" <<
endmsg
360 <<
"slant_params = " << slant_params <<
"" <<
endmsg
361 <<
"Sagging option = " << sagging_opt_value <<
"" <<
endmsg
363 <<
"Slant parameters : ";
410 for(
int i = 0; i < 5; ++ i) {
426 for(
int i = 0; i < 5; ++ i) {
476 throw std::runtime_error(
"LArWheelCalculator::GetFanHalfThickness: wrong wheel type");
static const double default_slant_parametrization[2][5]
static IDistanceCalculator * Create(const std::string &sagging_opt, LArWheelCalculator *lwc)
static IFanCalculator * Create(bool isSaggingOn, bool isModule, LArWheelCalculator *lwc)
double GetFanHalfThickness() const
double m_StraightStartSection
void outer_wheel_init(const EMECData &)
double m_electrodeTotalThickness
double m_leadThicknessOuter
double m_QuarterWaveLength
double m_leadThicknessInner
std::array< double, 5 > m_slant_parametrization
double m_HalfWheelThickness
double m_electrodeInvContraction
double m_FanHalfThickness
virtual ~LArWheelCalculator()
LArWheelCalculator_Impl::IFanCalculator * m_fanCalcImpl
int PhiGapNumberForWheel(int) const
void inner_wheel_init(const EMECData &)
LArG4::LArWheelCalculator_t m_type
LArWheelCalculator(const EMECData &emecData, LArG4::LArWheelCalculator_t a_wheelType, int zside=1)
double GetWheelInnerRadius(std::array< double, 2 > &rInner) const
LArWheelCalculator_Impl::IDistanceCalculator * m_distanceCalcImpl
virtual LArG4::LArWheelCalculator_t type() const
static const char * LArWheelCalculatorTypeString(LArG4::LArWheelCalculator_t)
void fill_sincos_parameterization()
void GetWheelOuterRadius(std::array< double, 2 > &rOuter) const
double m_HalfGapBetweenWheels
double m_ZeroFanPhi_ForDetNeaFan
@ BackInnerBarretteModule
@ BackOuterBarretteModule
@ BackOuterBarretteWheelCalib
@ BackInnerBarretteWheelCalib
@ BackInnerBarretteModuleCalib
@ BackOuterBarretteModuleCalib
std::vector< EMECPARAMS > emecparams
std::vector< EMECFAN > emecfan
std::vector< COLDCONTRACTION > coldcontraction
std::vector< EMECGEOMETRY > emecgeometry
std::vector< EMECMAGICNUMBERS > emecmagicnumbers
std::vector< EMECWHEELPARAMETERS > emecwheelparameters