ATLAS Offline Software
SiLorentzAngleTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
9 #ifndef SiLorentzAngleTool_h
10 #define SiLorentzAngleTool_h
11 
14 
20 
21 //Gaudi Includes
22 #include "GaudiKernel/ServiceHandle.h"
23 
24 class IdentifierHash;
25 namespace InDetDD {
26  class SiDetectorElement;
27 }
28 
35 class SiLorentzAngleTool: public extends<AthAlgTool, ISiLorentzAngleTool>
36 {
37 public:
38 
39  SiLorentzAngleTool(const std::string& type, const std::string& name, const IInterface* parent);
40  virtual ~SiLorentzAngleTool() = default;
41 
42  virtual StatusCode initialize() override;
43  virtual StatusCode finalize() override;
44 
47  virtual double getLorentzShift(const IdentifierHash& elementHash) const override;
48 
51  virtual double getLorentzShift(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) const override;
52 
55  virtual double getLorentzShiftEta(const IdentifierHash& elementHash) const override;
56 
59  virtual double getLorentzShiftEta(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) const override;
60 
63  virtual double getTanLorentzAngle(const IdentifierHash& elementHash) const override;
64 
67  virtual double getTanLorentzAngle(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) const override;
68 
71  virtual double getTanLorentzAngleEta(const IdentifierHash& elementHash) const override;
72 
75  virtual double getTanLorentzAngleEta(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) const override;
76 
78  virtual double getBiasVoltage(const IdentifierHash& elementHash) const override;
79 
81  virtual double getTemperature(const IdentifierHash& elementHash) const override;
82 
84  virtual double getDepletionVoltage(const IdentifierHash& elementHash) const override;
85 
86 private:
88 
89  double getValue(const IdentifierHash& elementHash, const Amg::Vector2D& locPos, Variable variable) const;
90  double getCorrectionFactor() const;
91  Amg::Vector3D getMagneticField(const Amg::Vector3D& pointvec) const;
92  const SiLorentzAngleCondData* getCondData() const;
93  const InDetDD::SiDetectorElement* getDetectorElement(const IdentifierHash& waferHash) const;
94 
95  // Properties
96  std::string m_detectorName;
99  bool m_ignoreLocalPos; // Makes methods using localPosition behave as method without passing localPosition.
101  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_detEleCollKey{this, "DetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT or Pixel"};
102  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey{this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
103 
104  static const double s_invalidValue;
105 };
106 
107 #endif // SiLorentzAngleTool_h
SiLorentzAngleTool::getValue
double getValue(const IdentifierHash &elementHash, const Amg::Vector2D &locPos, Variable variable) const
Definition: SiLorentzAngleTool.cxx:137
SiLorentzAngleTool::getMagneticField
Amg::Vector3D getMagneticField(const Amg::Vector3D &pointvec) const
Definition: SiLorentzAngleTool.cxx:210
AtlasFieldCacheCondObj.h
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SiLorentzAngleTool::m_detectorName
std::string m_detectorName
Definition: SiLorentzAngleTool.h:96
SiLorentzAngleCondData
Definition: SiLorentzAngleCondData.h:22
SiLorentzAngleTool::m_fieldCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Definition: SiLorentzAngleTool.h:102
ISiLorentzAngleTool.h
SiLorentzAngleTool::getLorentzShift
virtual double getLorentzShift(const IdentifierHash &elementHash) const override
Get the Lorentz shift correction in the local x (phiDist) direction Assumes the center of the detecto...
Definition: SiLorentzAngleTool.cxx:57
SiLorentzAngleTool::~SiLorentzAngleTool
virtual ~SiLorentzAngleTool()=default
SiLorentzAngleTool::getCorrectionFactor
double getCorrectionFactor() const
Definition: SiLorentzAngleTool.cxx:201
SiLorentzAngleTool::m_detEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_detEleCollKey
Definition: SiLorentzAngleTool.h:101
SiLorentzAngleTool::m_condData
SG::ReadCondHandleKey< SiLorentzAngleCondData > m_condData
Definition: SiLorentzAngleTool.h:100
GeoPrimitives.h
SiLorentzAngleTool::SiLorentzAngleTool
SiLorentzAngleTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: SiLorentzAngleTool.cxx:18
SiLorentzAngleTool::getTemperature
virtual double getTemperature(const IdentifierHash &elementHash) const override
Get temperature.
Definition: SiLorentzAngleTool.cxx:121
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
SiLorentzAngleTool::getTanLorentzAngleEta
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...
Definition: SiLorentzAngleTool.cxx:99
test_pyathena.parent
parent
Definition: test_pyathena.py:15
python.selection.variable
variable
Definition: selection.py:33
SiLorentzAngleTool::LorentzShift
@ LorentzShift
Definition: SiLorentzAngleTool.h:87
SiLorentzAngleTool::TanLorentzAngle
@ TanLorentzAngle
Definition: SiLorentzAngleTool.h:87
SiLorentzAngleTool::getLorentzShiftEta
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...
Definition: SiLorentzAngleTool.cxx:71
SiLorentzAngleTool
Definition: SiLorentzAngleTool.h:36
SiLorentzAngleTool::m_ignoreLocalPos
bool m_ignoreLocalPos
Definition: SiLorentzAngleTool.h:99
ReadCondHandleKey.h
SiLorentzAngleTool::initialize
virtual StatusCode initialize() override
Service init.
Definition: SiLorentzAngleTool.cxx:31
SiLorentzAngleTool::getTanLorentzAngle
virtual double getTanLorentzAngle(const IdentifierHash &elementHash) const override
Get tan af the Lorentz angle in the local x (phiDist) direction Assumes the center of the detector an...
Definition: SiLorentzAngleTool.cxx:85
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SiLorentzAngleTool::TanLorentzAngleEta
@ TanLorentzAngleEta
Definition: SiLorentzAngleTool.h:87
SiLorentzAngleCondData.h
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SiDetectorElementCollection.h
SiLorentzAngleTool::getCondData
const SiLorentzAngleCondData * getCondData() const
Definition: SiLorentzAngleTool.cxx:239
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Variable
Wrapper around a histogram which allows for some additional filling patterns and data manipulation.
Definition: Trigger/TrigCost/TrigCostAnalysis/src/Variable.h:39
SG::ReadCondHandleKey< SiLorentzAngleCondData >
SiLorentzAngleTool::m_nominalField
double m_nominalField
Definition: SiLorentzAngleTool.h:97
SiLorentzAngleTool::s_invalidValue
static const double s_invalidValue
Definition: SiLorentzAngleTool.h:104
SiLorentzAngleTool::finalize
virtual StatusCode finalize() override
Service finalize.
Definition: SiLorentzAngleTool.cxx:53
SiLorentzAngleTool::LorentzShiftEta
@ LorentzShiftEta
Definition: SiLorentzAngleTool.h:87
SiLorentzAngleTool::getDepletionVoltage
virtual double getDepletionVoltage(const IdentifierHash &elementHash) const override
Get depletion voltage.
Definition: SiLorentzAngleTool.cxx:129
SiLorentzAngleTool::getBiasVoltage
virtual double getBiasVoltage(const IdentifierHash &elementHash) const override
Get bias voltage.
Definition: SiLorentzAngleTool.cxx:113
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SiLorentzAngleTool::m_useMagFieldCache
bool m_useMagFieldCache
Definition: SiLorentzAngleTool.h:98
IdentifierHash
Definition: IdentifierHash.h:38
SiLorentzAngleTool::getDetectorElement
const InDetDD::SiDetectorElement * getDetectorElement(const IdentifierHash &waferHash) const
Definition: SiLorentzAngleTool.cxx:249