ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
AFP_GeoModelTool Class Referencefinal

#include <AFP_GeoModelTool.h>

Inheritance diagram for AFP_GeoModelTool:
Collaboration diagram for AFP_GeoModelTool:

Public Member Functions

 AFP_GeoModelTool (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor(s) More...
 
virtual ~AFP_GeoModelTool () override final
 Destructor. More...
 
virtual StatusCode create () override final
 
virtual GeoVDetectorManager * manager ()
 The Detector Node corresponding to this tool. More...
 
virtual const GeoVDetectorManager * manager () const
 
virtual StatusCode clear () override
 
virtual StatusCode registerCallback ATLAS_NOT_THREAD_SAFE () override
 
virtual StatusCode align (IOVSVC_CALLBACK_ARGS) override
 

Protected Attributes

GeoVDetectorManager * m_detector
 

Private Member Functions

StatusCode checkPropertiesSettings ()
 

Private Attributes

AFP_CONFIGURATION m_CfgParams
 
AFP_Geometrym_pGeometry
 
std::unique_ptr< AFP_GeoModelFactorym_pAFPDetectorFactory
 
AFP_SIDCONFIGURATION m_defsidcfg
 
std::vector< double > m_vecAFP00XStaggering
 
std::vector< double > m_vecAFP00YStaggering
 
std::vector< double > m_vecAFP01XStaggering
 
std::vector< double > m_vecAFP01YStaggering
 
std::vector< double > m_vecAFP02XStaggering
 
std::vector< double > m_vecAFP02YStaggering
 
std::vector< double > m_vecAFP03XStaggering
 
std::vector< double > m_vecAFP03YStaggering
 

Detailed Description

Definition at line 13 of file AFP_GeoModelTool.h.

Constructor & Destructor Documentation

◆ AFP_GeoModelTool()

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

Constructor(s)

Definition at line 17 of file AFP_GeoModelTool.cxx.

19 {
21  m_pGeometry=nullptr;
22 
24 
33 
34  //Properties of SID
35  declareProperty("SID_AddVacuumSensors",m_defsidcfg.bAddVacuumSensors=false);
36 
37 
38  //Properties of TD
39 
40 
41  //Properties of stations
42  declareProperty("AFP00_RPotFloorDistance",m_CfgParams.vecRPotFloorDistance[0]=AFP_CONSTANTS::Stat_RPotFloorDistance);
43  declareProperty("AFP01_RPotFloorDistance",m_CfgParams.vecRPotFloorDistance[1]=AFP_CONSTANTS::Stat_RPotFloorDistance);
44  declareProperty("AFP02_RPotFloorDistance",m_CfgParams.vecRPotFloorDistance[2]=AFP_CONSTANTS::Stat_RPotFloorDistance);
45  declareProperty("AFP03_RPotFloorDistance",m_CfgParams.vecRPotFloorDistance[3]=AFP_CONSTANTS::Stat_RPotFloorDistance);
46 
47  declareProperty("AFP00_RPotYPos",m_CfgParams.vecRPotYPos[0]=AFP_CONSTANTS::Stat_ShiftInYAxis);
48  declareProperty("AFP01_RPotYPos",m_CfgParams.vecRPotYPos[1]=AFP_CONSTANTS::Stat_ShiftInYAxis);
49  declareProperty("AFP02_RPotYPos",m_CfgParams.vecRPotYPos[2]=AFP_CONSTANTS::Stat_ShiftInYAxis);
50  declareProperty("AFP03_RPotYPos",m_CfgParams.vecRPotYPos[3]=AFP_CONSTANTS::Stat_ShiftInYAxis);
51 
52  declareProperty("AFP00_ZPos",m_CfgParams.vecStatNominalZPos[0]=AFP_CONSTANTS::Stat_OuterZDistance);
53  declareProperty("AFP01_ZPos",m_CfgParams.vecStatNominalZPos[1]=AFP_CONSTANTS::Stat_InnerZDistance);
54  declareProperty("AFP02_ZPos",m_CfgParams.vecStatNominalZPos[2]=-AFP_CONSTANTS::Stat_InnerZDistance);
55  declareProperty("AFP03_ZPos",m_CfgParams.vecStatNominalZPos[3]=-AFP_CONSTANTS::Stat_OuterZDistance);
56 
61 }

◆ ~AFP_GeoModelTool()

AFP_GeoModelTool::~AFP_GeoModelTool ( )
finaloverridevirtual

Destructor.

Definition at line 66 of file AFP_GeoModelTool.cxx.

67 {
68  // This will need to be modified once we register the DetectorNode in
69  // the Transient Detector Store
70  if(m_detector!=nullptr) {
71  delete m_detector;
72  m_detector=nullptr;
73  }
74 
75  if(m_pGeometry!=nullptr){
76  delete m_pGeometry;
77  m_pGeometry=nullptr;
78  }
79 }

Member Function Documentation

◆ align()

StatusCode GeoModelTool::align ( IOVSVC_CALLBACK_ARGS  )
overridevirtualinherited

Reimplemented in ALFA_DetectorTool, HGTD_DetectorTool, TRT_DetectorTool, LArDetectorToolNV, PixelDetectorTool, and SCT_DetectorTool.

Definition at line 33 of file GeoModelTool.cxx.

34 {
35  return StatusCode::SUCCESS;
36 }

◆ ATLAS_NOT_THREAD_SAFE()

virtual StatusCode registerCallback GeoModelTool::ATLAS_NOT_THREAD_SAFE ( )
overridevirtualinherited

◆ checkPropertiesSettings()

StatusCode AFP_GeoModelTool::checkPropertiesSettings ( )
private

Definition at line 81 of file AFP_GeoModelTool.cxx.

82 {
83  bool bRes=true;
84 
85  if(!m_vecAFP00XStaggering.empty()){
86  if(m_vecAFP00XStaggering.size()==m_CfgParams.sidcfg[EAS_AFP00].fLayerCount){
88  }
89  else{
90  ATH_MSG_ERROR("Mismatch between SID_AFP01XStaggering and number of plates (SID_NumberOfLayers)");
91  bRes=false;
92  }
93  }
94  if(!m_vecAFP00YStaggering.empty()){
95  if(m_vecAFP00YStaggering.size()==m_CfgParams.sidcfg[EAS_AFP00].fLayerCount){
97  }
98  else{
99  ATH_MSG_ERROR("Mismatch between SID_AFP00YStaggering and number of plates (SID_NumberOfLayers)");
100  bRes=false;
101  }
102  }
103 
104  if(!m_vecAFP01XStaggering.empty()){
105  if(m_vecAFP01XStaggering.size()==m_CfgParams.sidcfg[EAS_AFP01].fLayerCount){
107  }
108  else{
109  ATH_MSG_ERROR("Mismatch between SID_AFP01XStaggering and number of plates (SID_NumberOfLayers)");
110  bRes=false;
111  }
112  }
113  if(!m_vecAFP01YStaggering.empty()){
114  if(m_vecAFP01YStaggering.size()==m_CfgParams.sidcfg[EAS_AFP01].fLayerCount){
116  }
117  else{
118  ATH_MSG_ERROR("Mismatch between SID_AFP01YStaggering and number of plates (SID_NumberOfLayers)");
119  bRes=false;
120  }
121  }
122 
123  if(!m_vecAFP02XStaggering.empty()){
124  if(m_vecAFP02XStaggering.size()==m_CfgParams.sidcfg[EAS_AFP02].fLayerCount){
126  }
127  else{
128  ATH_MSG_ERROR("Mismatch between SID_AFP02XStaggering and number of plates (SID_NumberOfLayers)");
129  bRes=false;
130  }
131  }
132  if(!m_vecAFP02YStaggering.empty()){
133  if(m_vecAFP02YStaggering.size()==m_CfgParams.sidcfg[EAS_AFP02].fLayerCount){
135  }
136  else{
137  ATH_MSG_ERROR("Mismatch between SID_AFP02YStaggering and number of plates (SID_NumberOfLayers)");
138  bRes=false;
139  }
140  }
141 
142  if(!m_vecAFP03XStaggering.empty()){
143  if(m_vecAFP03XStaggering.size()==m_CfgParams.sidcfg[EAS_AFP03].fLayerCount){
145  }
146  else{
147  ATH_MSG_ERROR("Mismatch between SID_AFP03XStaggering and number of plates (SID_NumberOfLayers)");
148  bRes=false;
149  }
150  }
151  if(!m_vecAFP03YStaggering.empty()){
152  if(m_vecAFP03YStaggering.size()==m_CfgParams.sidcfg[EAS_AFP03].fLayerCount){
154  }
155  else{
156  ATH_MSG_ERROR("Mismatch between SID_AFP03YStaggering and number of plates (SID_NumberOfLayers)");
157  bRes=false;
158  }
159  }
160 
161  return bRes? StatusCode::SUCCESS:StatusCode::FAILURE;
162 }

◆ clear()

StatusCode GeoModelTool::clear ( )
overridevirtualinherited

◆ create()

StatusCode AFP_GeoModelTool::create ( )
finaloverridevirtual

Definition at line 164 of file AFP_GeoModelTool.cxx.

165 {
166  GeoModelExperiment * theExpt = nullptr;
167  ATH_CHECK( detStore()->retrieve( theExpt, "ATLAS" ) );
168 
170 
172  m_pAFPDetectorFactory=std::make_unique<AFP_GeoModelFactory>(detStore().operator->(), m_pGeometry);
173 
174  if (m_detector==nullptr)
175  {
176  try
177  {
178  GeoPhysVol *world=&*theExpt->getPhysVol();
179  m_pAFPDetectorFactory->create(world);
180  }
181  catch (std::bad_alloc const&)
182  {
183  ATH_MSG_FATAL("Could not create new DetectorNode!");
184  return StatusCode::FAILURE;
185  }
186 
187  // Register the DetectorNode instance with the Transient Detector Store
188  theExpt->addManager(m_pAFPDetectorFactory->getDetectorManager());
189  ATH_CHECK( detStore()->record(m_pAFPDetectorFactory->getDetectorManager(),
190  m_pAFPDetectorFactory->getDetectorManager()->getName()) );
191  return StatusCode::SUCCESS;
192  }
193 
194  return StatusCode::FAILURE;
195 }

◆ manager() [1/2]

GeoVDetectorManager * GeoModelTool::manager ( )
virtualinherited

The Detector Node corresponding to this tool.

Definition at line 21 of file GeoModelTool.cxx.

21  {
22  return m_detector;
23 }

◆ manager() [2/2]

const GeoVDetectorManager * GeoModelTool::manager ( ) const
virtualinherited

Definition at line 24 of file GeoModelTool.cxx.

24  {
25  return m_detector;
26 }

Member Data Documentation

◆ m_CfgParams

AFP_CONFIGURATION AFP_GeoModelTool::m_CfgParams
private

Definition at line 23 of file AFP_GeoModelTool.h.

◆ m_defsidcfg

AFP_SIDCONFIGURATION AFP_GeoModelTool::m_defsidcfg
private

Definition at line 26 of file AFP_GeoModelTool.h.

◆ m_detector

GeoVDetectorManager* GeoModelTool::m_detector
protectedinherited

Definition at line 36 of file GeoModelTool.h.

◆ m_pAFPDetectorFactory

std::unique_ptr<AFP_GeoModelFactory> AFP_GeoModelTool::m_pAFPDetectorFactory
private

Definition at line 25 of file AFP_GeoModelTool.h.

◆ m_pGeometry

AFP_Geometry* AFP_GeoModelTool::m_pGeometry
private

Definition at line 24 of file AFP_GeoModelTool.h.

◆ m_vecAFP00XStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP00XStaggering
private

Definition at line 27 of file AFP_GeoModelTool.h.

◆ m_vecAFP00YStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP00YStaggering
private

Definition at line 27 of file AFP_GeoModelTool.h.

◆ m_vecAFP01XStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP01XStaggering
private

Definition at line 28 of file AFP_GeoModelTool.h.

◆ m_vecAFP01YStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP01YStaggering
private

Definition at line 28 of file AFP_GeoModelTool.h.

◆ m_vecAFP02XStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP02XStaggering
private

Definition at line 29 of file AFP_GeoModelTool.h.

◆ m_vecAFP02YStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP02YStaggering
private

Definition at line 29 of file AFP_GeoModelTool.h.

◆ m_vecAFP03XStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP03XStaggering
private

Definition at line 30 of file AFP_GeoModelTool.h.

◆ m_vecAFP03YStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP03YStaggering
private

Definition at line 30 of file AFP_GeoModelTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
EAS_AFP02
@ EAS_AFP02
Definition: AFP_ConfigParams.h:18
AFP_CONSTANTS::Stat_ShiftInYAxis
static constexpr double Stat_ShiftInYAxis
Definition: AFP_constants.h:88
AFP_CONSTANTS::Stat_InnerZDistance
static constexpr double Stat_InnerZDistance
Definition: AFP_constants.h:86
GeoModelExperiment::getPhysVol
GeoPhysVol * getPhysVol()
Destructor.
Definition: GeoModelExperiment.cxx:21
AFP_GeoModelTool::m_vecAFP02XStaggering
std::vector< double > m_vecAFP02XStaggering
Definition: AFP_GeoModelTool.h:29
AFP_GeoModelTool::m_defsidcfg
AFP_SIDCONFIGURATION m_defsidcfg
Definition: AFP_GeoModelTool.h:26
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
AFP_GeoModelTool::m_vecAFP03XStaggering
std::vector< double > m_vecAFP03XStaggering
Definition: AFP_GeoModelTool.h:30
AFP_CONSTANTS::SiT_NearDistanceToFloor
static constexpr double SiT_NearDistanceToFloor
Definition: AFP_constants.h:20
AFP_CONFIGURATION::sidcfg
std::map< eAFPStation, AFP_SIDCONFIGURATION > sidcfg
Definition: AFP_ConfigParams.h:136
AFP_CONSTANTS::SiT_FarDistanceToFloor
static constexpr double SiT_FarDistanceToFloor
Definition: AFP_constants.h:21
EAS_AFP00
@ EAS_AFP00
Definition: AFP_ConfigParams.h:18
EAS_AFP01
@ EAS_AFP01
Definition: AFP_ConfigParams.h:18
GeoModelExperiment
Definition: GeoModelExperiment.h:32
AFP_GeoModelTool::checkPropertiesSettings
StatusCode checkPropertiesSettings()
Definition: AFP_GeoModelTool.cxx:81
AFP_CONSTANTS::SiT_Plate_amount
static constexpr double SiT_Plate_amount
Definition: AFP_constants.h:18
AFP_CONFIGURATION::vecRPotFloorDistance
std::vector< double > vecRPotFloorDistance
Definition: AFP_ConfigParams.h:139
GeoModelTool::GeoModelTool
GeoModelTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor(s)
Definition: GeoModelTool.cxx:12
AFP_GeoModelTool::m_vecAFP02YStaggering
std::vector< double > m_vecAFP02YStaggering
Definition: AFP_GeoModelTool.h:29
AFP_CONSTANTS::Stat_OuterZDistance
static constexpr double Stat_OuterZDistance
Definition: AFP_constants.h:87
AFP_GeoModelTool::m_pAFPDetectorFactory
std::unique_ptr< AFP_GeoModelFactory > m_pAFPDetectorFactory
Definition: AFP_GeoModelTool.h:25
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AFP_SIDCONFIGURATION::bAddVacuumSensors
bool bAddVacuumSensors
Definition: AFP_ConfigParams.h:110
AFP_CONSTANTS::Stat_RPotFloorDistance
static constexpr double Stat_RPotFloorDistance
Definition: AFP_constants.h:89
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AFP_CONFIGURATION::vecStatNominalZPos
std::vector< double > vecStatNominalZPos
Definition: AFP_ConfigParams.h:141
EAS_AFP03
@ EAS_AFP03
Definition: AFP_ConfigParams.h:18
AFP_Geometry
Definition: AFP_Geometry.h:20
AFP_GeoModelTool::m_vecAFP03YStaggering
std::vector< double > m_vecAFP03YStaggering
Definition: AFP_GeoModelTool.h:30
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
AFP_GeoModelTool::m_vecAFP01XStaggering
std::vector< double > m_vecAFP01XStaggering
Definition: AFP_GeoModelTool.h:28
AFP_GeoModelTool::m_vecAFP01YStaggering
std::vector< double > m_vecAFP01YStaggering
Definition: AFP_GeoModelTool.h:28
GeoModelTool::m_detector
GeoVDetectorManager * m_detector
Definition: GeoModelTool.h:36
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
AFP_GeoModelTool::m_vecAFP00XStaggering
std::vector< double > m_vecAFP00XStaggering
Definition: AFP_GeoModelTool.h:27
AFP_GeoModelTool::m_vecAFP00YStaggering
std::vector< double > m_vecAFP00YStaggering
Definition: AFP_GeoModelTool.h:27
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
AFP_CONFIGURATION::clear
void clear()
Definition: AFP_ConfigParams.cxx:9
GeoModelExperiment::addManager
void addManager(const GeoVDetectorManager *)
Definition: GeoModelExperiment.cxx:40
AFP_SIDCONFIGURATION::clear
void clear()
Definition: AFP_ConfigParams.cxx:45
AFP_GeoModelTool::m_CfgParams
AFP_CONFIGURATION m_CfgParams
Definition: AFP_GeoModelTool.h:23
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AFP_GeoModelTool::m_pGeometry
AFP_Geometry * m_pGeometry
Definition: AFP_GeoModelTool.h:24
AFP_CONFIGURATION::vecRPotYPos
std::vector< double > vecRPotYPos
Definition: AFP_ConfigParams.h:140