![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "GeoModelKernel/GeoFullPhysVol.h"
10 #include "GeoModelKernel/GeoTransform.h"
11 #include "GeoModelKernel/GeoNameTag.h"
12 #include "GeoModelKernel/GeoIdentifierTag.h"
21 #include "GaudiKernel/SystemOfUnits.h"
63 if (
sc.isFailure())
return sc;
66 return StatusCode::SUCCESS;
83 return StatusCode::SUCCESS;
88 GeoFullPhysVol* Phys =
dynamic_cast<GeoFullPhysVol *
>(
pv);
90 ATH_MSG_ERROR(
"Parent volume is not a GeoFullPhysVol as expected.");
91 return StatusCode::FAILURE;
97 if (StatusCode::SUCCESS !=
detStore()->
retrieve(materialManager, std::string(
"MATERIALS"))) {
99 return StatusCode::FAILURE;
112 if (versionKey.
tag() ==
"AUTO")
114 ATH_MSG_ERROR(
"AUTO Atlas version. Please select a version.");
117 ATH_MSG_INFO(
"Building BCM with Version Tag: " << versionKey.
tag() <<
" at Node: " << versionKey.
node());
120 sc = service(
"RDBAccessSvc",accessSvc);
125 return StatusCode::FAILURE;
129 std::string BCMVersionTag;
134 if (BCMVersionTag.empty())
138 return StatusCode::SUCCESS;
144 ATH_MSG_DEBUG(
" --> Number of records fetched = " << DBmodul->size());
149 for(
ind = 0;
ind < DBmodul->size();
ind++)
153 moduleNo = rec->
getLong(
"MODULE_ID");
156 unsigned int mask = (1 << moduleNo);
163 std::vector<double> module_property;
164 module_property.push_back(rec->
getFloat(
"TRANS_X"));
165 module_property.push_back(rec->
getFloat(
"TRANS_Y"));
166 module_property.push_back(rec->
getFloat(
"TRANS_Z"));
167 module_property.push_back(rec->
getFloat(
"ROT_X"));
168 module_property.push_back(rec->
getFloat(
"ROT_Y"));
169 module_property.push_back(rec->
getFloat(
"ROT_Z"));
170 module_property.push_back(rec->
getFloat(
"DIMESION_Z"));
171 module_property.push_back(rec->
getFloat(
"DIAM_TRANS_Y"));
172 module_property.push_back(rec->
getFloat(
"DIAM_TRANS_Z"));
173 module_property.push_back(rec->
getFloat(
"DIAM_DIAM_X"));
174 module_property.push_back(rec->
getFloat(
"DIAM_DAIM_Y"));
175 module_property.push_back(rec->
getFloat(
"DIAM_DIAM_Z"));
176 module_property.push_back(rec->
getFloat(
"OFF_H"));
177 module_property.push_back(rec->
getFloat(
"OFF_I"));
178 module_property.push_back(rec->
getFloat(
"OFF_J"));
182 manager->Module(moduleNo)->Set(moduleNo, &module_property);
190 const std::vector<double>* module_property =
nullptr;
191 for(moduleNo = 0; moduleNo < 8; moduleNo++)
193 unsigned int mask = (1 << moduleNo);
199 if(moduleNo == 0) module_property = &m_module0;
200 else if(moduleNo == 1) module_property = &m_moduleI;
201 else if(moduleNo == 2) module_property = &m_moduleII;
202 else if(moduleNo == 3) module_property = &m_moduleIII;
203 else if(moduleNo == 4) module_property = &m_moduleIV;
204 else if(moduleNo == 5) module_property = &m_moduleV;
205 else if(moduleNo == 6) module_property = &m_moduleVI;
206 else if(moduleNo == 7) module_property = &m_moduleVII;
210 if (module_property){
211 manager->Module(moduleNo)->Set(moduleNo, module_property);
213 ATH_MSG_ERROR(
"module_property pointer is null in BCM_Builder.cxx");
221 for(
int i=0;
i<8;
i++)
243 GeoIntrusivePtr<GeoNameTag>
tag{
new GeoNameTag(
"BCM Module")};
244 if (materialManager){
245 GeoVPhysVol* bcmModPhys = bcm.
Build(materialManager,
parameters, (msgLvl(MSG::INFO) ? &
msg(MSG::INFO) :
nullptr));
247 Phys->add(
new GeoIdentifierTag(
k));
249 Phys->add(bcmModPhys);
259 return StatusCode::FAILURE ;
261 return StatusCode::SUCCESS;
270 return StatusCode::SUCCESS;
278 return StatusCode::FAILURE;
def retrieve(aClass, aKey=None)
std::vector< double > m_moduleV
std::vector< double > m_moduleVI
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
virtual StatusCode build(GeoVPhysVol *parent)
build the BCM geometry
GeoPhysVol * Build(StoredMaterialManager *mat_mgr, const BCM_ModuleParameters *parameters, MsgStream *msg)
const std::string & node() const
Return the version node.
std::vector< double > m_moduleIV
#define IOVSVC_CALLBACK_ARGS
short hand for IOVSvc call back argument list, to be used when no access to formal arguments is neede...
virtual StatusCode registerCallback(StoreGateSvc *detStore)
For alignment.
std::vector< double > m_moduleII
std::vector< double > m_moduleVII
virtual StatusCode align(IOVSVC_CALLBACK_ARGS)
The Athena Transient Store API.
Definition of the abstract IRDBAccessSvc interface.
virtual std::string getChildTag(const std::string &childNode, const std::string &parentTag, const std::string &parentNode, const std::string &connName="ATLASDD")=0
Gets the tag name for the node by giving its parent node tag.
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
::StatusCode StatusCode
StatusCode definition for legacy code.
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
Eigen::Affine3d Transform3D
const std::string & tag() const
Return version tag.
virtual long getLong(const std::string &fieldName) const =0
Get long field value.
virtual StatusCode finalize()
standard Athena-Algorithm method
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
std::vector< double > m_module0
member variables for algorithm properties:
virtual StatusCode initialize()
standard Athena-Algorithm method
std::vector< double > m_moduleI
std::vector< double > m_moduleIII
Definition of the abstract IRDBRecord interface.
IRDBRecord is one record in the IRDBRecordset object.
Eigen::Translation< double, 3 > Translation3D
BCM_Builder(const std::string &, const std::string &, const IInterface *)
This class holds one or more material managers and makes them storeable, under StoreGate.
Definition of the abstract IRDBRecordset interface.
virtual float getFloat(const std::string &fieldName) const =0
Get float field value.