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 #include "GaudiKernel/ThreadLocalContext.h"
15 
21 
22 //Gaudi Includes
23 #include "GaudiKernel/ServiceHandle.h"
24 
25 class IdentifierHash;
26 namespace InDetDD {
27  class SiDetectorElement;
28 }
29 
36 class SiLorentzAngleTool: public extends<AthAlgTool, ISiLorentzAngleTool>
37 {
38 public:
39 
40  SiLorentzAngleTool(const std::string& type, const std::string& name, const IInterface* parent);
41  virtual ~SiLorentzAngleTool() = default;
42 
43  virtual StatusCode initialize() override;
44  virtual StatusCode finalize() override;
45 
48  virtual double getLorentzShift(const IdentifierHash& elementHash, const EventContext& ctx ) const override;
49 
52  virtual double getLorentzShift(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) const override;
53 
56  virtual double getLorentzShiftEta(const IdentifierHash& elementHash) const override;
57 
60  virtual double getLorentzShiftEta(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) const override;
61 
64  virtual double getTanLorentzAngle(const IdentifierHash& elementHash, const EventContext& ctx) const override;
65 
68  virtual double getTanLorentzAngle(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) const override;
69 
72  virtual double getTanLorentzAngleEta(const IdentifierHash& elementHash) const override;
73 
76  virtual double getTanLorentzAngleEta(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) const override;
77 
79  virtual double getBiasVoltage(const IdentifierHash& elementHash) const override;
80 
82  virtual double getTemperature(const IdentifierHash& elementHash) const override;
83 
85  virtual double getDepletionVoltage(const IdentifierHash& elementHash) const override;
86 
87 private:
89 
90  double getValue(const IdentifierHash& elementHash, const Amg::Vector2D& locPos, Variable variable) const;
91  double getCorrectionFactor() const;
92  Amg::Vector3D getMagneticField(const Amg::Vector3D& pointvec) const;
93  const SiLorentzAngleCondData* getCondData(const EventContext& ctx) const;
94  const InDetDD::SiDetectorElement* getDetectorElement(const IdentifierHash& waferHash) const;
95 
96  // Properties
97  std::string m_detectorName;
100  bool m_ignoreLocalPos; // Makes methods using localPosition behave as method without passing localPosition.
102  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_detEleCollKey{this, "DetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT or Pixel"};
103  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey{this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
104 
105  static const double s_invalidValue;
106 };
107 
108 #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:97
SiLorentzAngleCondData
Definition: SiLorentzAngleCondData.h:22
SiLorentzAngleTool::m_fieldCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Definition: SiLorentzAngleTool.h:103
SiLorentzAngleTool::getCondData
const SiLorentzAngleCondData * getCondData(const EventContext &ctx) const
Definition: SiLorentzAngleTool.cxx:239
ISiLorentzAngleTool.h
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:102
SiLorentzAngleTool::m_condData
SG::ReadCondHandleKey< SiLorentzAngleCondData > m_condData
Definition: SiLorentzAngleTool.h:101
GeoPrimitives.h
SiLorentzAngleTool::getTanLorentzAngle
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...
Definition: SiLorentzAngleTool.cxx:85
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:88
SiLorentzAngleTool::TanLorentzAngle
@ TanLorentzAngle
Definition: SiLorentzAngleTool.h:88
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:37
SiLorentzAngleTool::m_ignoreLocalPos
bool m_ignoreLocalPos
Definition: SiLorentzAngleTool.h:100
ReadCondHandleKey.h
SiLorentzAngleTool::initialize
virtual StatusCode initialize() override
Service init.
Definition: SiLorentzAngleTool.cxx:31
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SiLorentzAngleTool::TanLorentzAngleEta
@ TanLorentzAngleEta
Definition: SiLorentzAngleTool.h:88
SiLorentzAngleCondData.h
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SiDetectorElementCollection.h
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:98
SiLorentzAngleTool::s_invalidValue
static const double s_invalidValue
Definition: SiLorentzAngleTool.h:105
SiLorentzAngleTool::finalize
virtual StatusCode finalize() override
Service finalize.
Definition: SiLorentzAngleTool.cxx:53
SiLorentzAngleTool::LorentzShiftEta
@ LorentzShiftEta
Definition: SiLorentzAngleTool.h:88
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:99
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
SiLorentzAngleTool::getLorentzShift
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...
Definition: SiLorentzAngleTool.cxx:57
SiLorentzAngleTool::getDetectorElement
const InDetDD::SiDetectorElement * getDetectorElement(const IdentifierHash &waferHash) const
Definition: SiLorentzAngleTool.cxx:249