ATLAS Offline Software
SCT_GeneralParameters.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
9 #include "GaudiKernel/SystemOfUnits.h"
10 #include "GeoModelKernel/GeoDefinitions.h"
12 
13 const double SCT_SAFETY = 0.01 * Gaudi::Units::mm; // Used in some places to make envelopes slightly larger to ensure
14  // no overlaps due to rounding errors.
15 
16 
18 {
19  m_rdb = rdb;
20  m_placements = std::make_unique<TopLevelPlacements>(m_rdb->topLevelTable());
21 }
22 
23 
25 {
26 }
27 
28 
29 const GeoTrf::Transform3D &
30 SCT_GeneralParameters::partTransform(const std::string & partName) const
31 {
32  return m_placements->transform(partName);
33 }
34 
35 
36 bool
37 SCT_GeneralParameters::partPresent(const std::string & partName) const
38 {
39  return m_placements->present(partName);
40 }
41 
42 
43 
44 //
45 // General
46 //
47 double
49 {
50  return SCT_SAFETY;
51 }
52 
53 // Default Conditions. Values should be come form conditions data base. These values provide
54 // default vlaues if nothing from the conditions database is provided.
55 
56 
57 double
59 {
60  if (m_rdb->conditionsTable()->size() == 0) {
61  return 266.15 * Gaudi::Units::kelvin; // -7 C
62  }
63  return (m_rdb->conditions()->getDouble("TEMPERATURE") + 273.15) * Gaudi::Units::kelvin;
64 }
65 
66 
67 double
69 {
70  if (m_rdb->conditionsTable()->size() == 0) {
71  return 100 * Gaudi::Units::volt;
72  }
73  return m_rdb->conditions()->getDouble("BIASVOLT") * Gaudi::Units::volt;
74 }
75 
76 double
78 {
79  if (m_rdb->conditionsTable()->size() == 0) {
80  return 20 * Gaudi::Units::volt;
81  }
82  return m_rdb->conditions()->getDouble("DEPLETIONVOLT") * Gaudi::Units::volt;
83 }
84 
85 
86 
87 
SCT_SAFETY
const double SCT_SAFETY
Definition: SCT_GeneralParameters.cxx:13
SCT_GeneralParameters::partPresent
bool partPresent(const std::string &partName) const
Definition: SCT_GeneralParameters.cxx:37
SCT_GeneralParameters::safety
double safety() const
Definition: SCT_GeneralParameters.cxx:48
SCT_DataBase::conditionsTable
IRDBRecordset_ptr conditionsTable() const
Definition: SCT_DataBase.cxx:193
SCT_DataBase.h
SCT_GeneralParameters::SCT_GeneralParameters
SCT_GeneralParameters(SCT_DataBase *rdb)
Definition: SCT_GeneralParameters.cxx:17
SCT_GeneralParameters::partTransform
const GeoTrf::Transform3D & partTransform(const std::string &partName) const
Definition: SCT_GeneralParameters.cxx:30
python.SystemOfUnits.kelvin
int kelvin
Definition: SystemOfUnits.py:241
SCT_GeneralParameters.h
SCT_GeneralParameters::depletionVoltage
double depletionVoltage() const
Definition: SCT_GeneralParameters.cxx:77
SCT_GeneralParameters::m_rdb
SCT_DataBase * m_rdb
Definition: SCT_GeneralParameters.h:39
SCT_DataBase
Definition: SCT_DataBase.h:17
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
SCT_DataBase::topLevelTable
IRDBRecordset_ptr topLevelTable() const
Definition: SCT_DataBase.cxx:191
SCT_GeneralParameters::m_placements
std::unique_ptr< TopLevelPlacements > m_placements
Definition: SCT_GeneralParameters.h:40
python.SystemOfUnits.volt
int volt
Definition: SystemOfUnits.py:204
SCT_GeneralParameters::temperature
double temperature() const
Definition: SCT_GeneralParameters.cxx:58
SCT_GeneralParameters::biasVoltage
double biasVoltage() const
Definition: SCT_GeneralParameters.cxx:68
SCT_GeneralParameters::~SCT_GeneralParameters
~SCT_GeneralParameters()
Definition: SCT_GeneralParameters.cxx:24
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
IRDBRecord.h
Definition of the abstract IRDBRecord interface.
IRDBRecord::getDouble
virtual double getDouble(const std::string &fieldName) const =0
Get double field value.
TopLevelPlacements.h
IRDBRecordset.h
Definition of the abstract IRDBRecordset interface.
SCT_DataBase::conditions
const IRDBRecord * conditions() const
Definition: SCT_DataBase.cxx:194