10#include "GaudiKernel/SystemOfUnits.h"
19 base_class(
type, name, parent),
23 "Treat methods that take a local position as if one called the methods without a local position");
25 declareProperty(
"DetectorName",
m_detectorName=
"Pixel",
"Detector name (Pixel, SCT or PLR)");
26 declareProperty(
"NominalField",
m_nominalField = 2.0834*Gaudi::Units::tesla);
28 declareProperty(
"SiLorentzAngleCondData",
m_condData,
"Key of input SiLorentzAngleCondData");
37 return StatusCode::FAILURE;
46 ATH_MSG_DEBUG(
"Not using Magnetic Field cache - Will be using Nominal Field!");
50 return StatusCode::SUCCESS;
54 return StatusCode::SUCCESS;
139 ATH_MSG_WARNING(
"getValue with Variable=" << variable <<
" is not available");
151 double depletionDepth{element->
thickness()};
152 if (deplVoltage==0.0)
ATH_MSG_WARNING(
"Depletion voltage in "<<__FILE__<<
" is zero, which might be a bug.");
153 if (std::abs(biasVoltage) < std::abs(deplVoltage)) {
154 depletionDepth *= std::sqrt(std::abs(biasVoltage / deplVoltage));
156 double meanElectricField{0.};
157 if (depletionDepth) {
158 meanElectricField = biasVoltage / depletionDepth;
177 return correctionFactor*tanLorentzAnglePhi;
181 double lorentzCorrectionPhi{-0.5*element->
hitPhiDirection()*tanLorentzAnglePhi*depletionDepth};
182 return correctionFactor*lorentzCorrectionPhi;
191 return correctionFactor*tanLorentzAngleEta;
193 double lorentzCorrectionEta{-0.5*element->
hitPhiDirection()*tanLorentzAngleEta*depletionDepth};
194 return correctionFactor*lorentzCorrectionEta;
197 ATH_MSG_WARNING(
"You should not see this message. Something is wrong in getValue");
214 if (useMagFieldCache) {
217 if (fieldCondObj ==
nullptr) {
219 useMagFieldCache =
false;
224 if (useMagFieldCache) {
225 ATH_MSG_VERBOSE(
"Getting magnetic field from magnetic field service.");
228 point[0] = pointvec[0];
229 point[1] = pointvec[1];
230 point[2] = pointvec[2];
252 if (handle.
isValid()) elements = *handle;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
char data[hepevt_bytes_allocation_ATLAS]
void getInitializedCache(MagField::AtlasFieldCache &cache) const
get B field cache for evaluation as a function of 2-d or 3-d position.
This is a "hash" representation of an Identifier.
int readoutSide() const
ReadoutSide.
Class to hold the SiDetectorElement objects to be put in the detector store.
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Class to hold geometrical description of a silicon detector element.
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
InDetDD::CarrierType carrierType() const
carrier type for readout.
const Amg::Vector3D & etaAxis() const
double hitPhiDirection() const
See previous method.
virtual const Amg::Vector3D & normal() const override final
Get reconstruction local normal axes in global frame.
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
const Amg::Vector3D & phiAxis() const
double hitDepthDirection() const
Directions of hit depth,phi,eta axes relative to reconstruction local position axes (LocalPosition).
double hitEtaDirection() const
See previous method.
void setConditions(double temperature, double electricField)
double signedHallMobility(InDetDD::CarrierType carrier) const
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
void getField(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT bxyz, double *ATH_RESTRICT deriv=nullptr)
get B field value at given position xyz[3] is in mm, bxyz[3] is in kT if deriv[9] is given,...
Concrete class for Lorentz angle conditions data for each detector element.
double getLorentzShift(const IdentifierHash &elementHash) const
Get the Lorentz shift correction in the local x (phiDist) direction Assumes the center of the detecto...
double getTemperature(const IdentifierHash &elementHash) const
Get temperature.
double getTanLorentzAngleEta(const IdentifierHash &elementHash) const
Get tan af the Lorentz angle in the local y (etaDist) direction Assumes the center of the detector an...
double getDepletionVoltage(const IdentifierHash &elementHash) const
Get depletion voltage.
double getBiasVoltage(const IdentifierHash &elementHash) const
Get bias voltage.
double getCorrectionFactor() const
Get correction factor.
double getTanLorentzAngle(const IdentifierHash &elementHash) const
Get tan af the Lorentz angle in the local x (phiDist) direction Assumes the center of the detector an...
double getLorentzShiftEta(const IdentifierHash &elementHash) const
Get the Lorentz shift correction in the local y (etaDist) direction Assumes the center of the detecto...
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D