ATLAS Offline Software
Loading...
Searching...
No Matches
SiLorentzAngleTool Class Reference

Concrete class for tool providing Lorentz angle (and the corresponding correction for the shift of the measurement) for each detector element. More...

#include <SiLorentzAngleTool.h>

Inheritance diagram for SiLorentzAngleTool:
Collaboration diagram for SiLorentzAngleTool:

Public Member Functions

 SiLorentzAngleTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~SiLorentzAngleTool ()=default
virtual StatusCode initialize () override
 Service init.
virtual StatusCode finalize () override
 Service finalize.
virtual double getLorentzShift (const IdentifierHash &elementHash, const EventContext &ctx) const override
 Get the Lorentz shift correction in the local x (phiDist) direction Assumes the center of the detector and is generally cached.
virtual double getLorentzShift (const IdentifierHash &elementHash, const Amg::Vector2D &locPos) const override
 As above, but provide the local position.
virtual double getLorentzShiftEta (const IdentifierHash &elementHash) const override
 Get the Lorentz shift correction in the local y (etaDist) direction Assumes the center of the detector and is generally cached.
virtual double getLorentzShiftEta (const IdentifierHash &elementHash, const Amg::Vector2D &locPos) const override
 As above, but provide the local position.
virtual double getTanLorentzAngle (const IdentifierHash &elementHash, const EventContext &ctx) const override
 Get tan af the Lorentz angle in the local x (phiDist) direction Assumes the center of the detector and is generally cached.
virtual double getTanLorentzAngle (const IdentifierHash &elementHash, const Amg::Vector2D &locPos) const override
 As above, but provide the local position.
virtual double getTanLorentzAngleEta (const IdentifierHash &elementHash) const override
 Get tan af the Lorentz angle in the local y (etaDist) direction Assumes the center of the detector and is generally cached.
virtual double getTanLorentzAngleEta (const IdentifierHash &elementHash, const Amg::Vector2D &locPos) const override
 As above, but provide the local position.
virtual double getBiasVoltage (const IdentifierHash &elementHash) const override
 Get bias voltage.
virtual double getTemperature (const IdentifierHash &elementHash) const override
 Get temperature.
virtual double getDepletionVoltage (const IdentifierHash &elementHash) const override
 Get depletion voltage.

Private Types

enum  Variable { LorentzShift , LorentzShiftEta , TanLorentzAngle , TanLorentzAngleEta }

Private Member Functions

double getValue (const IdentifierHash &elementHash, const Amg::Vector2D &locPos, Variable variable) const
double getCorrectionFactor () const
Amg::Vector3D getMagneticField (const Amg::Vector3D &pointvec) const
const SiLorentzAngleCondDatagetCondData (const EventContext &ctx) const
const InDetDD::SiDetectorElementgetDetectorElement (const IdentifierHash &waferHash) const

Private Attributes

std::string m_detectorName
double m_nominalField
bool m_useMagFieldCache
bool m_ignoreLocalPos
SG::ReadCondHandleKey< SiLorentzAngleCondDatam_condData
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_detEleCollKey {this, "DetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT or Pixel"}
SG::ReadCondHandleKey< AtlasFieldCacheCondObjm_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"}

Static Private Attributes

static const double s_invalidValue {std::numeric_limits<double>::quiet_NaN()}

Detailed Description

Concrete class for tool providing Lorentz angle (and the corresponding correction for the shift of the measurement) for each detector element.

Definition at line 36 of file SiLorentzAngleTool.h.

Member Enumeration Documentation

◆ Variable

Enumerator
LorentzShift 
LorentzShiftEta 
TanLorentzAngle 
TanLorentzAngleEta 

Definition at line 88 of file SiLorentzAngleTool.h.

Constructor & Destructor Documentation

◆ SiLorentzAngleTool()

SiLorentzAngleTool::SiLorentzAngleTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 18 of file SiLorentzAngleTool.cxx.

18 :
19 base_class(type, name, parent),
20 m_condData{"SCTSiLorentzAngleCondData"}
21{
22 declareProperty("IgnoreLocalPos", m_ignoreLocalPos = false,
23 "Treat methods that take a local position as if one called the methods without a local position");
24 // YOU NEED TO USE THE SAME PROPERTIES AS USED IN Pixel/SCTSiLorentzAngleCondAlg!!!
25 declareProperty("DetectorName", m_detectorName="Pixel", "Detector name (Pixel, SCT or PLR)");
26 declareProperty("NominalField", m_nominalField = 2.0834*Gaudi::Units::tesla);
27 declareProperty("UseMagFieldCache", m_useMagFieldCache = true);
28 declareProperty("SiLorentzAngleCondData", m_condData, "Key of input SiLorentzAngleCondData");
29}
SG::ReadCondHandleKey< SiLorentzAngleCondData > m_condData

◆ ~SiLorentzAngleTool()

virtual SiLorentzAngleTool::~SiLorentzAngleTool ( )
virtualdefault

Member Function Documentation

◆ finalize()

StatusCode SiLorentzAngleTool::finalize ( )
overridevirtual

Service finalize.

Definition at line 53 of file SiLorentzAngleTool.cxx.

53 {
54 return StatusCode::SUCCESS;
55}

◆ getBiasVoltage()

double SiLorentzAngleTool::getBiasVoltage ( const IdentifierHash & elementHash) const
overridevirtual

Get bias voltage.

Definition at line 113 of file SiLorentzAngleTool.cxx.

113 {
114 const SiLorentzAngleCondData* condData{getCondData(Gaudi::Hive::currentContext())};
115 if (condData) {
116 return condData->getBiasVoltage(elementHash);
117 }
118 return s_invalidValue;
119}
double getBiasVoltage(const IdentifierHash &elementHash) const
Get bias voltage.
const SiLorentzAngleCondData * getCondData(const EventContext &ctx) const
static const double s_invalidValue

◆ getCondData()

const SiLorentzAngleCondData * SiLorentzAngleTool::getCondData ( const EventContext & ctx) const
private

Definition at line 239 of file SiLorentzAngleTool.cxx.

239 {
240 SG::ReadCondHandle<SiLorentzAngleCondData> handle{m_condData, ctx};
241 if (handle.isValid()) {
242 const SiLorentzAngleCondData* data{*handle};
243 return data;
244 }
245 ATH_MSG_WARNING(m_condData.key() << " cannot be retrieved.");
246 return nullptr;
247}
#define ATH_MSG_WARNING(x)
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11

◆ getCorrectionFactor()

double SiLorentzAngleTool::getCorrectionFactor ( ) const
private

Definition at line 201 of file SiLorentzAngleTool.cxx.

202{
203 const SiLorentzAngleCondData* condData{getCondData(Gaudi::Hive::currentContext())};
204 if (condData) {
205 return condData->getCorrectionFactor();
206 }
207 return s_invalidValue;
208}
double getCorrectionFactor() const
Get correction factor.

◆ getDepletionVoltage()

double SiLorentzAngleTool::getDepletionVoltage ( const IdentifierHash & elementHash) const
overridevirtual

Get depletion voltage.

Definition at line 129 of file SiLorentzAngleTool.cxx.

129 {
130 const SiLorentzAngleCondData* condData{getCondData(Gaudi::Hive::currentContext())};
131 if (condData) {
132 return condData->getDepletionVoltage(elementHash);
133 }
134 return s_invalidValue;
135}
double getDepletionVoltage(const IdentifierHash &elementHash) const
Get depletion voltage.

◆ getDetectorElement()

const InDetDD::SiDetectorElement * SiLorentzAngleTool::getDetectorElement ( const IdentifierHash & waferHash) const
private

Definition at line 249 of file SiLorentzAngleTool.cxx.

249 {
250 SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> handle{m_detEleCollKey};
251 const InDetDD::SiDetectorElementCollection* elements{nullptr};
252 if (handle.isValid()) elements = *handle;
253 if (elements!=nullptr) return elements->getDetectorElement(waferHash);
254
255 ATH_MSG_WARNING(m_detEleCollKey.key() << " cannot be retrieved.");
256 return nullptr;
257}
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_detEleCollKey

◆ getLorentzShift() [1/2]

double SiLorentzAngleTool::getLorentzShift ( const IdentifierHash & elementHash,
const Amg::Vector2D & locPos ) const
overridevirtual

As above, but provide the local position.

More accurate but slower.

Definition at line 65 of file SiLorentzAngleTool.cxx.

65 {
66 if (m_ignoreLocalPos) return getLorentzShift(elementHash, Gaudi::Hive::currentContext());
67 // The cache is used to store the results. The cache is therefore invalidated if we specify a position.
68 return getValue(elementHash, locPos, LorentzShift);
69}
virtual double getLorentzShift(const IdentifierHash &elementHash, const EventContext &ctx) const override
Get the Lorentz shift correction in the local x (phiDist) direction Assumes the center of the detecto...
double getValue(const IdentifierHash &elementHash, const Amg::Vector2D &locPos, Variable variable) const

◆ getLorentzShift() [2/2]

double SiLorentzAngleTool::getLorentzShift ( const IdentifierHash & elementHash,
const EventContext & ctx ) const
overridevirtual

Get the Lorentz shift correction in the local x (phiDist) direction Assumes the center of the detector and is generally cached.

Definition at line 57 of file SiLorentzAngleTool.cxx.

57 {
58 const SiLorentzAngleCondData* condData{getCondData(ctx)};
59 if (condData) {
60 return condData->getLorentzShift(elementHash);
61 }
62 return s_invalidValue;
63}
double getLorentzShift(const IdentifierHash &elementHash) const
Get the Lorentz shift correction in the local x (phiDist) direction Assumes the center of the detecto...

◆ getLorentzShiftEta() [1/2]

double SiLorentzAngleTool::getLorentzShiftEta ( const IdentifierHash & elementHash) const
overridevirtual

Get the Lorentz shift correction in the local y (etaDist) direction Assumes the center of the detector and is generally cached.

Definition at line 71 of file SiLorentzAngleTool.cxx.

71 {
72 const SiLorentzAngleCondData* condData{getCondData(Gaudi::Hive::currentContext())};
73 if (condData) {
74 return condData->getLorentzShiftEta(elementHash);
75 }
76 return s_invalidValue;
77}
double getLorentzShiftEta(const IdentifierHash &elementHash) const
Get the Lorentz shift correction in the local y (etaDist) direction Assumes the center of the detecto...

◆ getLorentzShiftEta() [2/2]

double SiLorentzAngleTool::getLorentzShiftEta ( const IdentifierHash & elementHash,
const Amg::Vector2D & locPos ) const
overridevirtual

As above, but provide the local position.

More accurate but slower.

Definition at line 79 of file SiLorentzAngleTool.cxx.

79 {
80 if (m_ignoreLocalPos) return getLorentzShiftEta(elementHash);
81 // The cache is used to store the results. The cache is therefore invalidated if we specify a position.
82 return getValue(elementHash, locPos, LorentzShiftEta);
83}
virtual double getLorentzShiftEta(const IdentifierHash &elementHash) const override
Get the Lorentz shift correction in the local y (etaDist) direction Assumes the center of the detecto...

◆ getMagneticField()

Amg::Vector3D SiLorentzAngleTool::getMagneticField ( const Amg::Vector3D & pointvec) const
private

Definition at line 210 of file SiLorentzAngleTool.cxx.

210 {
211 // Get the magnetic field.
212 bool useMagFieldCache{m_useMagFieldCache};
213 MagField::AtlasFieldCache fieldCache;
214 if (useMagFieldCache) {
215 SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCondObjInputKey, Gaudi::Hive::currentContext()};
216 const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
217 if (fieldCondObj == nullptr) {
218 ATH_MSG_ERROR("SCTSiLorentzAngleCondAlg : Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCondObjInputKey.key());
219 useMagFieldCache = false;
220 } else {
221 fieldCondObj->getInitializedCache(fieldCache);
222 }
223 }
224 if (useMagFieldCache) {
225 ATH_MSG_VERBOSE("Getting magnetic field from magnetic field service.");
226 double field[3];
227 double point[3];
228 point[0] = pointvec[0];
229 point[1] = pointvec[1];
230 point[2] = pointvec[2];
231 fieldCache.getField(point, field);
232 return Amg::Vector3D(field[0], field[1], field[2]);
233 } else {
234 ATH_MSG_VERBOSE("Using Nominal Field");
235 return Amg::Vector3D(0., 0., m_nominalField);
236 }
237}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
void getInitializedCache(MagField::AtlasFieldCache &cache) const
get B field cache for evaluation as a function of 2-d or 3-d position.
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,...
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Eigen::Matrix< double, 3, 1 > Vector3D

◆ getTanLorentzAngle() [1/2]

double SiLorentzAngleTool::getTanLorentzAngle ( const IdentifierHash & elementHash,
const Amg::Vector2D & locPos ) const
overridevirtual

As above, but provide the local position.

More accurate but slower.

Definition at line 93 of file SiLorentzAngleTool.cxx.

93 {
94 if (m_ignoreLocalPos) return getTanLorentzAngle(elementHash, Gaudi::Hive::currentContext());
95 // The cache is used to store the results. The cache is therefore invalidated if we specify a position.
96 return getValue(elementHash, locPos, TanLorentzAngle);
97}
virtual double getTanLorentzAngle(const IdentifierHash &elementHash, const EventContext &ctx) const override
Get tan af the Lorentz angle in the local x (phiDist) direction Assumes the center of the detector an...

◆ getTanLorentzAngle() [2/2]

double SiLorentzAngleTool::getTanLorentzAngle ( const IdentifierHash & elementHash,
const EventContext & ctx ) const
overridevirtual

Get tan af the Lorentz angle in the local x (phiDist) direction Assumes the center of the detector and is generally cached.

Definition at line 85 of file SiLorentzAngleTool.cxx.

85 {
86 const SiLorentzAngleCondData* condData{getCondData(ctx)};
87 if (condData) {
88 return condData->getTanLorentzAngle(elementHash);
89 }
90 return s_invalidValue;
91}
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...

◆ getTanLorentzAngleEta() [1/2]

double SiLorentzAngleTool::getTanLorentzAngleEta ( const IdentifierHash & elementHash) const
overridevirtual

Get tan af the Lorentz angle in the local y (etaDist) direction Assumes the center of the detector and is generally cached.

Definition at line 99 of file SiLorentzAngleTool.cxx.

99 {
100 const SiLorentzAngleCondData* condData{getCondData(Gaudi::Hive::currentContext())};
101 if (condData) {
102 return condData->getTanLorentzAngleEta(elementHash);
103 }
104 return s_invalidValue;
105}
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...

◆ getTanLorentzAngleEta() [2/2]

double SiLorentzAngleTool::getTanLorentzAngleEta ( const IdentifierHash & elementHash,
const Amg::Vector2D & locPos ) const
overridevirtual

As above, but provide the local position.

More accurate but slower.

Definition at line 107 of file SiLorentzAngleTool.cxx.

107 {
108 if (m_ignoreLocalPos) return getTanLorentzAngleEta(elementHash);
109 // The cache is used to store the results. The cache is therefore invalidated if we specify a position.
110 return getValue(elementHash, locPos, TanLorentzAngleEta);
111}
virtual double getTanLorentzAngleEta(const IdentifierHash &elementHash) const override
Get tan af the Lorentz angle in the local y (etaDist) direction Assumes the center of the detector an...

◆ getTemperature()

double SiLorentzAngleTool::getTemperature ( const IdentifierHash & elementHash) const
overridevirtual

Get temperature.

Definition at line 121 of file SiLorentzAngleTool.cxx.

121 {
122 const SiLorentzAngleCondData* condData{getCondData(Gaudi::Hive::currentContext())};
123 if (condData) {
124 return condData->getTemperature(elementHash);
125 }
126 return s_invalidValue;
127}
double getTemperature(const IdentifierHash &elementHash) const
Get temperature.

◆ getValue()

double SiLorentzAngleTool::getValue ( const IdentifierHash & elementHash,
const Amg::Vector2D & locPos,
Variable variable ) const
private

Definition at line 137 of file SiLorentzAngleTool.cxx.

137 {
138 if (not (variable==TanLorentzAngle or variable==LorentzShift or variable==TanLorentzAngleEta or variable==LorentzShiftEta)) {
139 ATH_MSG_WARNING("getValue with Variable=" << variable << " is not available");
140 return s_invalidValue;
141 }
142
143 double temperature{getTemperature(elementHash)};
144 double deplVoltage{getDepletionVoltage(elementHash)};
145 double biasVoltage{getBiasVoltage(elementHash)};
146
147 // Calculate depletion depth. If biasVoltage is less than depletionVoltage
148 // the detector is not fully depleted and we need to take this into account.
149 // We take absolute values just in case voltages are signed.
150 const InDetDD::SiDetectorElement* element{getDetectorElement(elementHash)};
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));
155 }
156 double meanElectricField{0.};
157 if (depletionDepth) {
158 meanElectricField = biasVoltage / depletionDepth;
159 }
160 double mobility{0.};
161 InDet::SiliconProperties siProperties;
162 siProperties.setConditions(temperature, meanElectricField);
163 mobility = siProperties.signedHallMobility(element->carrierType());
164 // Get magnetic field.
165 Amg::Vector3D pointvec{element->globalPosition(locPos)};
166 Amg::Vector3D magneticField{getMagneticField(pointvec)};
167
168 double correctionFactor{getCorrectionFactor()};
169
170 // The angles are in the hit frame. This is because that is what is needed by the digization and also
171 // gives a more physical sign of the angle (ie dosen't flip sign when the detector is flipped).
172 // The hit depth axis is pointing from the readout side to the backside if m_design->readoutSide() < 0
173 // The hit depth axis is pointing from the backside to the readout side if m_design->readoutSide() > 0
174 if (variable==TanLorentzAngle or variable==LorentzShift) {
175 double tanLorentzAnglePhi{element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitPhiDirection()*(element->normal().cross(magneticField)).dot(element->phiAxis())};
176 if (variable==TanLorentzAngle) {
177 return correctionFactor*tanLorentzAnglePhi;
178 }
179 // This gives the effective correction in the reconstruction frame hence the extra hitPhiDirection()
180 // as the angle above is in the hit frame.
181 double lorentzCorrectionPhi{-0.5*element->hitPhiDirection()*tanLorentzAnglePhi*depletionDepth};
182 return correctionFactor*lorentzCorrectionPhi;
183 }
184
185 // The Lorentz eta shift very small and so can be ignored, but we include it for completeness.
186 // It is < ~0.1 um in the pixel.
187 // In the SCT its largest in the stereo side of the barrel modules where it is about 0.3 micron along the strip.
188 if (variable==TanLorentzAngleEta or variable==LorentzShiftEta) {
189 double tanLorentzAngleEta{element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitEtaDirection()*(element->normal().cross(magneticField)).dot(element->etaAxis())};
190 if (variable==TanLorentzAngleEta) {
191 return correctionFactor*tanLorentzAngleEta;
192 }
193 double lorentzCorrectionEta{-0.5*element->hitPhiDirection()*tanLorentzAngleEta*depletionDepth};
194 return correctionFactor*lorentzCorrectionEta;
195 }
196
197 ATH_MSG_WARNING("You should not see this message. Something is wrong in getValue");
198 return s_invalidValue;
199}
int readoutSide() const
ReadoutSide.
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
InDetDD::CarrierType carrierType() const
carrier type for readout.
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):
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
virtual double getDepletionVoltage(const IdentifierHash &elementHash) const override
Get depletion voltage.
virtual double getBiasVoltage(const IdentifierHash &elementHash) const override
Get bias voltage.
Amg::Vector3D getMagneticField(const Amg::Vector3D &pointvec) const
virtual double getTemperature(const IdentifierHash &elementHash) const override
Get temperature.
const InDetDD::SiDetectorElement * getDetectorElement(const IdentifierHash &waferHash) const
double getCorrectionFactor() const

◆ initialize()

StatusCode SiLorentzAngleTool::initialize ( )
overridevirtual

Service init.

Definition at line 31 of file SiLorentzAngleTool.cxx.

31 {
32
33 ATH_MSG_DEBUG("SiLorentzAngleTool Initialized");
34
35 if ((m_detectorName not_eq "Pixel") and (m_detectorName not_eq "SCT") and (m_detectorName not_eq "PLR")) {
36 ATH_MSG_FATAL("Invalid detector name: " << m_detectorName << ". Must be Pixel, SCT or PLR.");
37 return StatusCode::FAILURE;
38 }
39
40 // Read Cond Handle
41 ATH_CHECK(m_condData.initialize());
42 ATH_CHECK(m_detEleCollKey.initialize());
43
44 // MagneticFieldCache
45 if (not m_useMagFieldCache) {
46 ATH_MSG_DEBUG("Not using Magnetic Field cache - Will be using Nominal Field!");
47 }
49
50 return StatusCode::SUCCESS;
51}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)

Member Data Documentation

◆ m_condData

SG::ReadCondHandleKey<SiLorentzAngleCondData> SiLorentzAngleTool::m_condData
private

Definition at line 101 of file SiLorentzAngleTool.h.

◆ m_detectorName

std::string SiLorentzAngleTool::m_detectorName
private

Definition at line 97 of file SiLorentzAngleTool.h.

◆ m_detEleCollKey

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> SiLorentzAngleTool::m_detEleCollKey {this, "DetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT or Pixel"}
private

Definition at line 102 of file SiLorentzAngleTool.h.

102{this, "DetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT or Pixel"};

◆ m_fieldCondObjInputKey

SG::ReadCondHandleKey<AtlasFieldCacheCondObj> SiLorentzAngleTool::m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"}
private

Definition at line 103 of file SiLorentzAngleTool.h.

103{this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};

◆ m_ignoreLocalPos

bool SiLorentzAngleTool::m_ignoreLocalPos
private

Definition at line 100 of file SiLorentzAngleTool.h.

◆ m_nominalField

double SiLorentzAngleTool::m_nominalField
private

Definition at line 98 of file SiLorentzAngleTool.h.

◆ m_useMagFieldCache

bool SiLorentzAngleTool::m_useMagFieldCache
private

Definition at line 99 of file SiLorentzAngleTool.h.

◆ s_invalidValue

const double SiLorentzAngleTool::s_invalidValue {std::numeric_limits<double>::quiet_NaN()}
staticprivate

Definition at line 259 of file SiLorentzAngleTool.h.

284{
285 class SiDetectorElement;
286}
287
293
294class SiLorentzAngleTool: public extends<AthAlgTool, ISiLorentzAngleTool>
295{
296public:
297
298 SiLorentzAngleTool(const std::string& type, const std::string& name, const IInterface* parent);
299 virtual ~SiLorentzAngleTool() = default;
300
301 virtual StatusCode initialize() override;
302 virtual StatusCode finalize() override;
303
306 virtual double getLorentzShift(const IdentifierHash& elementHash, const EventContext& ctx ) const override;
307
310 virtual double getLorentzShift(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) const override;
311
314 virtual double getLorentzShiftEta(const IdentifierHash& elementHash) const override;
315
318 virtual double getLorentzShiftEta(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) const override;
319
322 virtual double getTanLorentzAngle(const IdentifierHash& elementHash, const EventContext& ctx) const override;
323
326 virtual double getTanLorentzAngle(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) const override;
327
330 virtual double getTanLorentzAngleEta(const IdentifierHash& elementHash) const override;
331
334 virtual double getTanLorentzAngleEta(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) const override;
335
337 virtual double getBiasVoltage(const IdentifierHash& elementHash) const override;
338
340 virtual double getTemperature(const IdentifierHash& elementHash) const override;
341
343 virtual double getDepletionVoltage(const IdentifierHash& elementHash) const override;
344
345private:
347
348 double getValue(const IdentifierHash& elementHash, const Amg::Vector2D& locPos, Variable variable) const;
349 double getCorrectionFactor() const;
350 Amg::Vector3D getMagneticField(const Amg::Vector3D& pointvec) const;
351 const SiLorentzAngleCondData* getCondData(const EventContext& ctx) const;
352 const InDetDD::SiDetectorElement* getDetectorElement(const IdentifierHash& waferHash) const;
353
354 // Properties
355 std::string m_detectorName;
356 double m_nominalField;
358 bool m_ignoreLocalPos; // Makes methods using localPosition behave as method without passing localPosition.
359 SG::ReadCondHandleKey<SiLorentzAngleCondData> m_condData;
360 SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_detEleCollKey{this, "DetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT or Pixel"};
361 SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey{this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
362
363 static const double s_invalidValue;
364};
365
366#endif // SiLorentzAngleTool_h
virtual StatusCode initialize() override
Service init.
SiLorentzAngleTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual ~SiLorentzAngleTool()=default
virtual StatusCode finalize() override
Service finalize.
Eigen::Matrix< double, 2, 1 > Vector2D
::StatusCode StatusCode
StatusCode definition for legacy code.

The documentation for this class was generated from the following files: