![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include "GeoModelKernel/GeoNameTag.h"
13 #include "GeoModelKernel/GeoIdentifierTag.h"
14 #include "GeoModelKernel/GeoTransform.h"
15 #include "GeoModelKernel/GeoVPhysVol.h"
16 #include "GeoModelKernel/GeoPhysVol.h"
18 #include "GeoModelKernel/GeoFullPhysVol.h"
24 #include "GaudiKernel/SystemOfUnits.h"
73 if (
sc.isFailure())
return sc;
76 return StatusCode::SUCCESS;
93 return StatusCode::SUCCESS;
98 GeoFullPhysVol* Phys =
dynamic_cast<GeoFullPhysVol *
>(
pv);
100 ATH_MSG_ERROR(
"Parent volume is not a GeoFullPhysVol as expected.");
101 return StatusCode::FAILURE;
107 if (StatusCode::SUCCESS !=
detStore()->
retrieve(materialManager, std::string(
"MATERIALS"))) {
109 return StatusCode::FAILURE;
121 if (versionKey.
tag() ==
"AUTO")
123 ATH_MSG_ERROR(
"AUTO Atlas version. Please select a version.");
126 ATH_MSG_INFO(
"Building BLM with Version Tag: "<< versionKey.
tag() <<
" at Node: " << versionKey.
node());
129 sc = service(
"RDBAccessSvc",accessSvc);
134 return StatusCode::FAILURE;
138 std::string BLMVersionTag;
143 if (BLMVersionTag.empty())
147 return StatusCode::SUCCESS;
153 ATH_MSG_DEBUG(
" --> Number of records fetched = " << DBmodul->size());
160 for(
ind = 0;
ind < DBmodul->size();
ind++)
164 moduleNo = rec->
getLong(
"MODULE_ID");
167 unsigned int mask = (1 << moduleNo);
174 std::vector<double> module_property;
175 module_property.push_back(rec->
getFloat(
"Z"));
176 module_property.push_back(rec->
getFloat(
"R"));
177 module_property.push_back(rec->
getFloat(
"PHI"));
178 module_property.push_back(rec->
getFloat(
"ROT_X"));
179 module_property.push_back(rec->
getFloat(
"ROT_Y"));
180 module_property.push_back(rec->
getFloat(
"ROT_Z"));
181 module_property.push_back(rec->
getFloat(
"DIAM_X"));
182 module_property.push_back(rec->
getFloat(
"DIAM_Y"));
183 module_property.push_back(rec->
getFloat(
"DIAM_Z"));
187 manager->Module(moduleNo)->Set(moduleNo, &module_property);
193 ATH_MSG_DEBUG(
" --> BLM parameters via jobOptions or default");
196 const std::vector<double>* module_property =
nullptr;
197 for(moduleNo = 0; moduleNo < 12; moduleNo++)
199 unsigned int mask = (1 << moduleNo);
205 if(moduleNo == 0) module_property = &m_module0;
206 else if(moduleNo == 1) module_property = &m_moduleI;
207 else if(moduleNo == 2) module_property = &m_moduleII;
208 else if(moduleNo == 3) module_property = &m_moduleIII;
209 else if(moduleNo == 4) module_property = &m_moduleIV;
210 else if(moduleNo == 5) module_property = &m_moduleV;
211 else if(moduleNo == 6) module_property = &m_moduleVI;
212 else if(moduleNo == 7) module_property = &m_moduleVII;
213 else if(moduleNo == 8) module_property = &m_moduleVIII;
214 else if(moduleNo == 9) module_property = &m_moduleIX;
215 else if(moduleNo == 10) module_property = &m_moduleX;
216 else if(moduleNo == 11) module_property = &m_moduleXI;
220 if (module_property){
221 manager->Module(moduleNo)->Set(moduleNo, module_property);
231 for(
int i=0;
i<12;
i++)
249 GeoIntrusivePtr<GeoNameTag>
tag{
new GeoNameTag(
"BLM Module")};
250 if (materialManager){
251 GeoVPhysVol* blmModPhys = blm.
Build(materialManager,
parameters, (msgLvl(MSG::INFO) ? &
msg(MSG::INFO) :
nullptr));
253 Phys->add(
new GeoIdentifierTag(
k));
255 Phys->add(blmModPhys);
267 return StatusCode::FAILURE;
269 return StatusCode::SUCCESS;
276 return StatusCode::SUCCESS;
284 return StatusCode::FAILURE;
def retrieve(aClass, aKey=None)
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
BLM_Builder(const std::string &, const std::string &, const IInterface *)
std::vector< double > m_moduleIX
std::vector< double > m_moduleV
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 registerCallback(StoreGateSvc *detStore)
For alignment.
std::vector< double > m_moduleXI
std::vector< double > m_moduleVII
const std::string & node() const
Return the version node.
std::vector< double > m_module0
member variables for algorithm properties:
#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 build(GeoVPhysVol *parent)
build the BCM geometry
std::vector< double > m_moduleVI
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
virtual StatusCode initialize()
standard Athena-Algorithm method
const std::string & tag() const
Return version tag.
virtual long getLong(const std::string &fieldName) const =0
Get long field value.
std::vector< double > m_moduleVIII
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
std::vector< double > m_moduleIV
std::vector< double > m_moduleX
Definition of the abstract IRDBRecord interface.
IRDBRecord is one record in the IRDBRecordset object.
std::vector< double > m_moduleII
std::vector< double > m_moduleIII
Eigen::Translation< double, 3 > Translation3D
This class holds one or more material managers and makes them storeable, under StoreGate.
Beam Loss Monitor module builder.
Definition of the abstract IRDBRecordset interface.
virtual float getFloat(const std::string &fieldName) const =0
Get float field value.
std::vector< double > m_moduleI
virtual StatusCode finalize()
standard Athena-Algorithm method
virtual StatusCode align(IOVSVC_CALLBACK_ARGS)
GeoPhysVol * Build(StoredMaterialManager *mat_mgr, const BLM_ModuleParameters *parameters, MsgStream *msg)