ATLAS Offline Software
Loading...
Searching...
No Matches
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)
virtual ~AFP_GeoModelTool () override final
 Destructor.
virtual StatusCode create () override final
virtual GeoVDetectorManager * manager ()
virtual const GeoVDetectorManager * manager () const
virtual StatusCode clear () override
virtual StatusCode registerCallback ATLAS_NOT_THREAD_SAFE () override
virtual StatusCode align ATLAS_NOT_THREAD_SAFE (IOVSVC_CALLBACK_ARGS) override

Protected Attributes

GeoVDetectorManager * m_detector {nullptr}

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.

18 : GeoModelTool( type, name, parent )
19{
20 m_CfgParams.clear();
21 m_pGeometry=nullptr;
22
23 m_defsidcfg.clear();
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}
@ EAS_AFP02
@ EAS_AFP03
@ EAS_AFP00
@ EAS_AFP01
std::vector< double > m_vecAFP02YStaggering
std::vector< double > m_vecAFP01XStaggering
std::vector< double > m_vecAFP03XStaggering
AFP_Geometry * m_pGeometry
std::vector< double > m_vecAFP00YStaggering
std::vector< double > m_vecAFP03YStaggering
std::vector< double > m_vecAFP00XStaggering
std::vector< double > m_vecAFP01YStaggering
AFP_SIDCONFIGURATION m_defsidcfg
AFP_CONFIGURATION m_CfgParams
std::vector< double > m_vecAFP02XStaggering
static constexpr double Stat_OuterZDistance
static constexpr double SiT_FarDistanceToFloor
static constexpr double Stat_ShiftInYAxis
static constexpr double Stat_InnerZDistance
static constexpr double SiT_Plate_amount
static constexpr double Stat_RPotFloorDistance
static constexpr double SiT_NearDistanceToFloor

◆ ~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}
GeoVDetectorManager * m_detector

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE() [1/2]

virtual StatusCode registerCallback GeoModelTool::ATLAS_NOT_THREAD_SAFE ( )
inlineoverridevirtualinherited

Reimplemented in BCMPrimeDetectorTool, HGTD_DetectorTool, HGTD_GMX_DetectorTool, PLRDetectorTool, and TRT_DetectorTool.

Definition at line 26 of file GeoModelTool.h.

26{return StatusCode::FAILURE;}

◆ ATLAS_NOT_THREAD_SAFE() [2/2]

virtual StatusCode align GeoModelTool::ATLAS_NOT_THREAD_SAFE ( IOVSVC_CALLBACK_ARGS )
inlineoverridevirtualinherited

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

Definition at line 27 of file GeoModelTool.h.

27{return StatusCode::SUCCESS;}

◆ 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){
87 m_CfgParams.sidcfg[EAS_AFP00].vecXStaggering=m_vecAFP00XStaggering;
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){
96 m_CfgParams.sidcfg[EAS_AFP00].vecYStaggering=m_vecAFP00YStaggering;
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){
106 m_CfgParams.sidcfg[EAS_AFP01].vecXStaggering=m_vecAFP01XStaggering;
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){
115 m_CfgParams.sidcfg[EAS_AFP01].vecYStaggering=m_vecAFP01YStaggering;
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){
125 m_CfgParams.sidcfg[EAS_AFP02].vecXStaggering=m_vecAFP02XStaggering;
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){
134 m_CfgParams.sidcfg[EAS_AFP02].vecYStaggering=m_vecAFP02YStaggering;
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){
144 m_CfgParams.sidcfg[EAS_AFP03].vecXStaggering=m_vecAFP03XStaggering;
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){
153 m_CfgParams.sidcfg[EAS_AFP03].vecYStaggering=m_vecAFP03YStaggering;
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}
#define ATH_MSG_ERROR(x)

◆ clear()

◆ 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
171 m_pGeometry=new AFP_Geometry(&m_CfgParams);
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}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
std::unique_ptr< AFP_GeoModelFactory > m_pAFPDetectorFactory
StatusCode checkPropertiesSettings()
GeoPhysVol * getPhysVol()
Destructor.
void addManager(const GeoVDetectorManager *)
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ manager() [1/2]

virtual GeoVDetectorManager * GeoModelTool::manager ( )
inlinevirtualinherited

Definition at line 22 of file GeoModelTool.h.

22{return m_detector;}

◆ manager() [2/2]

virtual const GeoVDetectorManager * GeoModelTool::manager ( ) const
inlinevirtualinherited

Definition at line 23 of file GeoModelTool.h.

23{return m_detector;}

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 {nullptr}
protectedinherited

Definition at line 30 of file GeoModelTool.h.

30{nullptr};

◆ 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: