|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "GaudiKernel/SystemOfUnits.h"
20 m_condData{
"SCTSiLorentzAngleCondData"}
22 declareProperty(
"IgnoreLocalPos", m_ignoreLocalPos =
false,
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)");
27 declareProperty(
"UseMagFieldCache", m_useMagFieldCache =
true);
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;
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 *= sqrt(std::abs(biasVoltage / deplVoltage));
156 double meanElectricField{0.};
157 if (depletionDepth) {
158 meanElectricField = biasVoltage / depletionDepth;
175 double tanLorentzAnglePhi{element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitPhiDirection()*(element->normal().cross(magneticField)).
dot(element->phiAxis())};
177 return correctionFactor*tanLorentzAnglePhi;
181 double lorentzCorrectionPhi{-0.5*element->hitPhiDirection()*tanLorentzAnglePhi*depletionDepth};
182 return correctionFactor*lorentzCorrectionPhi;
189 double tanLorentzAngleEta{element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitEtaDirection()*(element->normal().cross(magneticField)).
dot(element->etaAxis())};
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;
221 fieldCondObj->getInitializedCache(fieldCache);
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];
241 if (handle.isValid()) {
252 if (handle.isValid()) elements = *handle;
char data[hepevt_bytes_allocation_ATLAS]
Eigen::Matrix< double, 2, 1 > Vector2D
double getCorrectionFactor() const
Get correction factor.
double getLorentzShiftEta(const IdentifierHash &elementHash) const
Get the Lorentz shift correction in the local y (etaDist) direction Assumes the center of the detecto...
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...
#define ATH_MSG_VERBOSE(x)
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...
const std::string & key() const
Return the StoreGate ID for the referenced object.
double getBiasVoltage(const IdentifierHash &elementHash) const
Get bias voltage.
::StatusCode StatusCode
StatusCode definition for legacy code.
double getDepletionVoltage(const IdentifierHash &elementHash) const
Get depletion voltage.
def dot(G, fn, nodesToHighlight=[])
StatusCode initialize(bool used=true)
double signedHallMobility(InDetDD::CarrierType carrier) const
Eigen::Matrix< double, 3, 1 > Vector3D
Wrapper around a histogram which allows for some additional filling patterns and data manipulation.
#define ATH_MSG_WARNING(x)
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
double getLorentzShift(const IdentifierHash &elementHash) const
Get the Lorentz shift correction in the local x (phiDist) direction Assumes the center of the detecto...
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,...
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
void setConditions(double temperature, double electricField)
double getTemperature(const IdentifierHash &elementHash) const
Get temperature.