82 return StatusCode::SUCCESS;
87 GeoFullPhysVol* Phys =
dynamic_cast<GeoFullPhysVol *
>(
pv);
89 ATH_MSG_ERROR(
"Parent volume is not a GeoFullPhysVol as expected.");
90 return StatusCode::FAILURE;
97 std::unique_ptr<BCM_GeometryManager>
manager = std::make_unique<BCM_GeometryManager>();
106 if (versionKey.tag() ==
"AUTO") {
107 ATH_MSG_ERROR(
"AUTO Atlas version. Please select a version.");
108 return StatusCode::FAILURE;
111 ATH_MSG_INFO(
"Building BCM with Version Tag: " << versionKey.tag() <<
" at Node: " << versionKey.node());
112 SmartIF<IRDBAccessSvc> accessSvc{Gaudi::svcLocator()->service(
"RDBAccessSvc")};
116 std::string BCMVersionTag;
117 BCMVersionTag = accessSvc->getChildTag(
"BCM", versionKey.tag(), versionKey.node());
121 if (BCMVersionTag.empty()) {
123 return StatusCode::SUCCESS;
126 IRDBRecordset_ptr DBmodul = accessSvc->getRecordsetPtr(
"BCMModule", versionKey.tag(), versionKey.node());
127 ATH_MSG_DEBUG(
" --> Number of records fetched = " << DBmodul->size());
132 for(
ind = 0;
ind < DBmodul->size();
ind++) {
134 moduleNo = rec->
getLong(
"MODULE_ID");
137 unsigned int mask = (1 << moduleNo);
143 std::vector<double> module_property;
144 module_property.push_back(rec->
getFloat(
"TRANS_X"));
145 module_property.push_back(rec->
getFloat(
"TRANS_Y"));
146 module_property.push_back(rec->
getFloat(
"TRANS_Z"));
147 module_property.push_back(rec->
getFloat(
"ROT_X"));
148 module_property.push_back(rec->
getFloat(
"ROT_Y"));
149 module_property.push_back(rec->
getFloat(
"ROT_Z"));
150 module_property.push_back(rec->
getFloat(
"DIMESION_Z"));
151 module_property.push_back(rec->
getFloat(
"DIAM_TRANS_Y"));
152 module_property.push_back(rec->
getFloat(
"DIAM_TRANS_Z"));
153 module_property.push_back(rec->
getFloat(
"DIAM_DIAM_X"));
154 module_property.push_back(rec->
getFloat(
"DIAM_DAIM_Y"));
155 module_property.push_back(rec->
getFloat(
"DIAM_DIAM_Z"));
156 module_property.push_back(rec->
getFloat(
"OFF_H"));
157 module_property.push_back(rec->
getFloat(
"OFF_I"));
158 module_property.push_back(rec->
getFloat(
"OFF_J"));
162 manager->Module(moduleNo)->Set(moduleNo, &module_property);
170 const std::vector<double>* module_property =
nullptr;
171 for(moduleNo = 0; moduleNo < 8; moduleNo++)
173 unsigned int mask = (1 << moduleNo);
179 if(moduleNo == 0) module_property = &
m_module0;
180 else if(moduleNo == 1) module_property = &
m_moduleI;
181 else if(moduleNo == 2) module_property = &
m_moduleII;
182 else if(moduleNo == 3) module_property = &
m_moduleIII;
183 else if(moduleNo == 4) module_property = &
m_moduleIV;
184 else if(moduleNo == 5) module_property = &
m_moduleV;
185 else if(moduleNo == 6) module_property = &
m_moduleVI;
186 else if(moduleNo == 7) module_property = &
m_moduleVII;
190 if (module_property){
191 manager->Module(moduleNo)->Set(moduleNo, module_property);
193 ATH_MSG_ERROR(
"module_property pointer is null in BCM_Builder.cxx");
201 for(
int i=0;
i<8;
i++)
223 GeoIntrusivePtr<GeoNameTag>
tag{
new GeoNameTag(
"BCM Module")};
224 if (materialManager){
225 GeoVPhysVol* bcmModPhys = bcm.
Build(materialManager,
parameters, (msgLvl(MSG::INFO) ? &
msg(MSG::INFO) :
nullptr));
227 Phys->add(
new GeoIdentifierTag(
k));
229 Phys->add(bcmModPhys);
236 return StatusCode::SUCCESS;