ATLAS Offline Software
SCT_ChargeTrappingTool.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
13 #ifndef SCT_ChargeTrappingTool_h
14 #define SCT_ChargeTrappingTool_h
15 
16 // Athena includes
19 
24 
25 // Gaudi includes
26 #include "GaudiKernel/EventContext.h"
27 #include "GaudiKernel/ToolHandle.h"
28 
29 // STL includes
30 #include <atomic>
31 #include <string>
32 
33 //forward declarations
34 class IdentifierHash;
35 
44 class SCT_ChargeTrappingTool: public extends<AthAlgTool, ISCT_ChargeTrappingTool>
45 {
46  public:
47  SCT_ChargeTrappingTool(const std::string& type, const std::string& name, const IInterface* parent);
48  virtual ~SCT_ChargeTrappingTool() = default;
49  virtual StatusCode initialize() override;
50  virtual StatusCode finalize() override;
51 
52  virtual SCT_ChargeTrappingCondData getCondData(const IdentifierHash& elementHash, double pos, const EventContext& ctx) const override;
53  virtual SCT_ChargeTrappingCondData getCondData(const IdentifierHash& elementHash, double pos) const override;
54  virtual void getHoleTransport(double& x0, double& y0, double& xfin, double& yfin, double& Q_m2, double& Q_m1, double& Q_00, double& Q_p1, double& Q_p2, const EventContext& ctx) const override;
55  virtual void getHoleTransport(double& x0, double& y0, double& xfin, double& yfin, double& Q_m2, double& Q_m1, double& Q_00, double& Q_p1, double& Q_p2) const override;
56 
57  private:
58  SCT_ChargeTrappingCondData calculate(const IdentifierHash& elementHash, double pos, const EventContext& ctx) const;
59  double induced(int istrip, double x, double y) const;
60  static double getPotentialValue(int& ix, int& iy) ;
61  void holeTransport(double& x0, double& y0, double& xfin, double& yfin, double& Q_m2, double& Q_m1, double& Q_00, double& Q_p1, double& Q_p2) const;
62 
63  private:
64  // Properties
65  StringProperty m_detectorName{this, "DetectorName", "SCT", "Detector name"};
66  bool m_isSCT{false};
67 
68  // Temperature and voltages from job options only used if SiConditionsServices is None or
69  // if value read from database is out of range.
70  DoubleProperty m_temperature{this, "Temperature", -2., "Default temperature in Celcius."};
71  DoubleProperty m_temperatureMin{this, "TemperatureMin", -80., "Minimum temperature allowed in Celcius."};
72  DoubleProperty m_temperatureMax{this, "TemperatureMax", 100., "Maximum temperature allowed in Celcius."};
73  DoubleProperty m_deplVoltage{this, "DepletionVoltage", -30., "Default depletion voltage in Volt."};
74  DoubleProperty m_biasVoltage{this, "BiasVoltage", 150., "Default bias voltage in Volt."};
75 
76  bool m_conditionsToolValid{false};
77  mutable std::atomic_bool m_conditionsToolWarning{false};
78 
79  // -- Radiation damage specific
80  BooleanProperty m_calcHoles{this, "CalcHoles", true, "Default is to consider holes in signal formation."};
81 
82  // -- Fluence: Need to make it layer-dependent
83  DoubleProperty m_fluence{this, "Fluence", 3.0E13, "Fluence received by the detector."};
84  DoubleProperty m_betaElectrons{this, "BetaElectrons", 3.1E-16, "Constant for the trapping model for electrons, in [cm^2/ns] -- average value from Table 2 in ATL-INDET-2003-014"};
85  DoubleProperty m_betaHoles{this, "BetaHoles", 5.1E-16, "Constant for the trapping model for holes in [cm^2/ns] -- average value from Table 2 in ATL-INDET-2003-014"};
86 
87  double m_PotentialValue[81][115]{{0.}};
88 
89  // -- Tool Handle
90  ToolHandle<ISiliconConditionsTool> m_siConditionsTool{this, "SiConditionsTool", "SCT_SiliconConditionsTool", "SCT silicon conditions tool"};
91  ToolHandle<ISCT_ElectricFieldTool> m_electricFieldTool{this, "SCT_ElectricFieldTool", "SCT_ElectricFieldTool", "SCT electric field tool"};
92 
93  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
94  const InDetDD::SiDetectorElement* getDetectorElement(const IdentifierHash& waferHash, const EventContext& ctx) const;
95 };
96 
97 #endif // SCT_ChargeTrappingTool_h
SCT_ChargeTrappingTool::getPotentialValue
static double getPotentialValue(int &ix, int &iy)
Definition: SCT_ChargeTrappingTool.cxx:330
SCT_ChargeTrappingTool::m_electricFieldTool
ToolHandle< ISCT_ElectricFieldTool > m_electricFieldTool
Definition: SCT_ChargeTrappingTool.h:91
SCT_ChargeTrappingTool::m_calcHoles
BooleanProperty m_calcHoles
Definition: SCT_ChargeTrappingTool.h:80
SCT_ChargeTrappingCondData
Data object for SCT_ChargeTrappingTool, SCT_RadDamageSummaryTool, SCT_SurfaceChargesGenerator.
Definition: SCT_ChargeTrappingCondData.h:22
SCT_ChargeTrappingTool::getHoleTransport
virtual void getHoleTransport(double &x0, double &y0, double &xfin, double &yfin, double &Q_m2, double &Q_m1, double &Q_00, double &Q_p1, double &Q_p2, const EventContext &ctx) const override
Definition: SCT_ChargeTrappingTool.cxx:80
SCT_ChargeTrappingTool::m_detectorName
StringProperty m_detectorName
Definition: SCT_ChargeTrappingTool.h:65
SCT_ChargeTrappingTool::m_temperatureMin
DoubleProperty m_temperatureMin
Definition: SCT_ChargeTrappingTool.h:71
SCT_ChargeTrappingTool::m_conditionsToolWarning
std::atomic_bool m_conditionsToolWarning
Definition: SCT_ChargeTrappingTool.h:77
ISCT_ElectricFieldTool.h
SCT_ChargeTrappingTool::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: SCT_ChargeTrappingTool.h:93
SCT_ChargeTrappingTool::m_temperature
DoubleProperty m_temperature
Definition: SCT_ChargeTrappingTool.h:70
x
#define x
SCT_ChargeTrappingTool::calculate
SCT_ChargeTrappingCondData calculate(const IdentifierHash &elementHash, double pos, const EventContext &ctx) const
Definition: SCT_ChargeTrappingTool.cxx:92
ISCT_ChargeTrappingTool.h
SCT_ChargeTrappingTool::getCondData
virtual SCT_ChargeTrappingCondData getCondData(const IdentifierHash &elementHash, double pos, const EventContext &ctx) const override
Definition: SCT_ChargeTrappingTool.cxx:69
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SCT_ChargeTrappingTool::holeTransport
void holeTransport(double &x0, double &y0, double &xfin, double &yfin, double &Q_m2, double &Q_m1, double &Q_00, double &Q_p1, double &Q_p2) const
Definition: SCT_ChargeTrappingTool.cxx:285
AthAlgTool.h
SCT_ChargeTrappingTool::m_PotentialValue
double m_PotentialValue[81][115]
Definition: SCT_ChargeTrappingTool.h:87
SCT_ChargeTrappingTool::m_betaHoles
DoubleProperty m_betaHoles
Definition: SCT_ChargeTrappingTool.h:85
test_pyathena.parent
parent
Definition: test_pyathena.py:15
SCT_ChargeTrappingTool::getDetectorElement
const InDetDD::SiDetectorElement * getDetectorElement(const IdentifierHash &waferHash, const EventContext &ctx) const
Definition: SCT_ChargeTrappingTool.cxx:334
SCT_ChargeTrappingTool::finalize
virtual StatusCode finalize() override
Definition: SCT_ChargeTrappingTool.cxx:64
ReadCondHandleKey.h
SCT_ChargeTrappingTool::m_conditionsToolValid
bool m_conditionsToolValid
Definition: SCT_ChargeTrappingTool.h:76
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SCT_ChargeTrappingTool::m_temperatureMax
DoubleProperty m_temperatureMax
Definition: SCT_ChargeTrappingTool.h:72
SCT_ChargeTrappingTool
Definition: SCT_ChargeTrappingTool.h:45
SCT_ChargeTrappingTool::m_deplVoltage
DoubleProperty m_deplVoltage
Definition: SCT_ChargeTrappingTool.h:73
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SiDetectorElementCollection.h
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
SCT_ChargeTrappingTool::m_siConditionsTool
ToolHandle< ISiliconConditionsTool > m_siConditionsTool
Definition: SCT_ChargeTrappingTool.h:90
SCT_ChargeTrappingTool::SCT_ChargeTrappingTool
SCT_ChargeTrappingTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: SCT_ChargeTrappingTool.cxx:26
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection >
SCT_ChargeTrappingTool::m_fluence
DoubleProperty m_fluence
Definition: SCT_ChargeTrappingTool.h:83
y
#define y
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SCT_ChargeTrappingTool::initialize
virtual StatusCode initialize() override
Definition: SCT_ChargeTrappingTool.cxx:32
ISiliconConditionsTool.h
SCT_ChargeTrappingTool::induced
double induced(int istrip, double x, double y) const
Definition: SCT_ChargeTrappingTool.cxx:250
IdentifierHash
Definition: IdentifierHash.h:38
SCT_ChargeTrappingTool::~SCT_ChargeTrappingTool
virtual ~SCT_ChargeTrappingTool()=default
SCT_ChargeTrappingTool::m_biasVoltage
DoubleProperty m_biasVoltage
Definition: SCT_ChargeTrappingTool.h:74
SCT_ChargeTrappingTool::m_isSCT
bool m_isSCT
Definition: SCT_ChargeTrappingTool.h:66
SCT_ChargeTrappingTool::m_betaElectrons
DoubleProperty m_betaElectrons
Definition: SCT_ChargeTrappingTool.h:84