|
ATLAS Offline Software
|
#include <MuonInertMaterialBuilderImpl.h>
|
virtual | ~MuonInertMaterialBuilderImpl ()=default |
| Destructor. More...
|
|
virtual StatusCode | initialize () override |
| AlgTool initialize method. More...
|
|
DetachedVolVec | buildDetachedTrackingVolumesImpl (const PVConstLink treeTop, bool blend) const |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
| MuonInertMaterialBuilderImpl (const std::string &, const std::string &, const IInterface *) |
| Constructor. More...
|
|
DetachedVolumeVecWithTrfs | buildDetachedTrackingVolumeTypes (const PVConstLink top, bool blend) const |
|
void | getObjsForTranslation (const GeoVPhysVol *pv, const Amg::Transform3D &, std::vector< std::pair< const GeoVPhysVol *, std::vector< Amg::Transform3D >>> &vols) const |
| Method extracting material objects from GeoModel tree. More...
|
|
void | printInfo (const GeoVPhysVol *pv) const |
| Dump from GeoModel tree
More...
|
|
void | printChildren (const GeoVPhysVol *pv) const |
|
void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution More...
|
|
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > | renounce (T &h) |
|
void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
| Add StoreName to extra input/output deps as needed. More...
|
|
void | glueVolumes (TrackingVolume &firstVol, BoundarySurfaceFace firstFace, TrackingVolume &secondVol, BoundarySurfaceFace secondFace) const |
| protected method to glue two Volumes together input: More...
|
|
|
static void | setBoundarySurface (TrackingVolume &tvol, SharedObject< BoundarySurface< TrackingVolume >> bsurf, BoundarySurfaceFace face) |
| protected method to set the boundary surface of a tracking volume More...
|
|
static void | setInsideVolume (TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *insidevol) |
| protected method to set inside Volume of a BoundarySurface: input: More...
|
|
static void | setInsideVolumeArray (TrackingVolume &tvol, BoundarySurfaceFace face, BinnedArray< TrackingVolume > *insidevolarray) |
| protected method to set inside VolumeArray of a BoundarySurface: input: More...
|
|
static void | setInsideVolumeArray (TrackingVolume &tvol, BoundarySurfaceFace face, const SharedObject< BinnedArray< TrackingVolume >> &insidevolarray) |
| protected method to set inside VolumeArray of a BoundarySurface: input: More...
|
|
static void | setOutsideVolume (TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *outsidevol) |
| protected method to set outside Volume of a BoundarySurface: input: More...
|
|
static void | setOutsideVolumeArray (TrackingVolume &tvol, BoundarySurfaceFace face, BinnedArray< TrackingVolume > *outsidevolarray) |
| protected method to set outside VolumeArray of a BoundarySurface: input: More...
|
|
static void | setOutsideVolumeArray (TrackingVolume &tvol, BoundarySurfaceFace face, const SharedObject< BinnedArray< TrackingVolume >> &outsidevolarray) |
| protected method to set outside VolumeArray of a BoundarySurface: input: More...
|
|
static void | confineVolume (TrackingVolume &tvol, TrackingVolume *outsidevol) |
| protected method to confine (dense) volumes: input: More...
|
|
◆ DetachedVolumeVecWithTrfs
◆ DetachedVolVec
◆ StoreGateSvc_t
◆ ~MuonInertMaterialBuilderImpl()
virtual Muon::MuonInertMaterialBuilderImpl::~MuonInertMaterialBuilderImpl |
( |
| ) |
|
|
virtualdefault |
◆ MuonInertMaterialBuilderImpl()
Muon::MuonInertMaterialBuilderImpl::MuonInertMaterialBuilderImpl |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
|
protected |
◆ buildDetachedTrackingVolumesImpl()
Definition at line 36 of file MuonInertMaterialBuilderImpl.cxx.
39 throw std::runtime_error(
"No tree top has been parsed");
45 ATH_MSG_DEBUG(
" obtained " << msTypes.size() <<
" prototypes");
48 for (
auto& [msTV, transforms]: msTypes) {
49 std::string msTypeName = msTV->name();
51 std::unique_ptr<Trk::DetachedTrackingVolume> newStat{msTV->clone(msTypeName, combTr)};
52 mInert.push_back(std::move(newStat));
55 ATH_MSG_DEBUG(
" returns " << mInert.size() <<
" objects (detached volumes)");
◆ buildDetachedTrackingVolumeTypes()
link to top tree
Definition at line 62 of file MuonInertMaterialBuilderImpl.cxx.
66 GeoVolumeCursor vol(
top);
67 while (!vol.atEnd()) {
68 const GeoVPhysVol* cv = vol.getVolume();
69 const GeoLogVol* clv = cv->getLogVol();
70 const std::string_view vname = clv->getName();
71 if (vname.size() > 7 && vname.substr(vname.size() - 7, 7) ==
75 if (vname.substr(0, 3) ==
"BAR" || vname.substr(0, 2) ==
"BT" ||
76 vname.substr(0, 6) ==
"EdgeBT" || vname.substr(0, 6) ==
"HeadBT"){
78 }
else if (vname.substr(0, 3) ==
"ECT") {
80 }
else if (vname.substr(0, 4) ==
"Feet" ||
81 (vname.size() > 7 && (vname.substr(3, 4) ==
"Feet" || vname.substr(4, 4) ==
"Feet"))) {
83 }
else if (vname.substr(0, 4) ==
"Rail") {
85 }
else if (vname.substr(0, 1) ==
"J") {
89 }
else if (vname.substr(0, 3) ==
"NSW" && vname.substr(1, 6) ==
"Spacer") {
91 }
else if (vname.substr(0, 3) ==
"NSW" && vname.substr(1, 2) ==
"Al") {
93 }
else if (vname.substr(0, 3) ==
"NJD"){
95 }
else if (vname.substr(0, 1) ==
"A" && vname.substr(1, 5) ==
"Plate"){
98 }
else if (vname.substr(0, 1) !=
"J") {
111 std::vector<std::pair<const GeoVPhysVol*, std::vector<Amg::Transform3D>>> vols;
113 bool simpleTree =
false;
114 if (!cv->getNChildVols()) {
116 std::vector<Amg::Transform3D> volTr;
117 volTr.push_back(vol.getTransform());
118 vols.emplace_back(cv, volTr);
125 for (
auto& [physVol, physVolTrfs]: vols) {
126 std::string protoName(vname);
128 protoName += physVol->getLogVol()->getName();
130 << physVol->getLogVol()->getMaterial()->getName()
131 <<
" x0 " << physVol->getLogVol()->getMaterial()->getRadLength()
132 <<
"," << physVol->getLogVol()->getShape()->type());
136 if (protoName ==
obj.first->name()) {
139 obj.second.push_back(vol.getTransform());
141 obj.second.insert(
obj.second.end(),
142 std::make_move_iterator(physVolTrfs.begin()),
143 std::make_move_iterator(physVolTrfs.end()));
154 const std::string volName = newType->volumeName();
155 auto typeDet = std::make_unique<Trk::DetachedTrackingVolume>(volName, newType.release());
156 objs.emplace_back(std::move(typeDet), std::move(physVolTrfs));
◆ confineVolume()
protected method to confine (dense) volumes: input:
- the volume that holdes the BoundarySurfaces (embedded)
- the volume to be set as outside volume
Definition at line 112 of file TrackingVolumeManipulator.cxx.
116 const auto& bounds = tvol.boundarySurfaces();
117 for (
const auto & bound : bounds) {
118 if (bound->outsideVolume() ==
nullptr) {
119 bound->setOutsideVolume(outsideVol);
121 if (bound->insideVolume() ==
nullptr) {
122 bound->setInsideVolume(outsideVol);
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ getObjsForTranslation()
Method extracting material objects from GeoModel tree.
Definition at line 210 of file MuonInertMaterialBuilderImpl.cxx.
215 unsigned int nc =
pv->getNChildVols();
217 <<
pv->getLogVol()->getName() <<
","
218 <<
pv->getLogVol()->getMaterial()->getName()
219 <<
", looping over " <<
nc <<
" children");
220 for (
unsigned int ic = 0;
ic <
nc;
ic++) {
222 const GeoVPhysVol* cv = &(*(
pv->getChildVol(
ic)));
223 const GeoLogVol* clv = cv->getLogVol();
224 if (clv->getMaterial()->getDensity() > 0. &&
227 if (!cv->getNChildVols()) {
229 for (
auto& vol : vols) {
230 if (clv->getName() == vol.first->getLogVol()->getName()) {
234 "INERT name branch matching differences detected "
238 vol.second.push_back(
transform * transf);
243 std::vector<Amg::Transform3D> volTr;
245 vols.emplace_back(cv, volTr);
247 << clv->getName() <<
","
248 << clv->getMaterial()->getName());
◆ glueVolumes()
protected method to glue two Volumes together input:
- first TrackingVolume that keeps boundary surface
- face of the BoundarySurface to be kept
- second volume that gets glued to the first volume
- face of the BoundarySurface to be shared
Definition at line 17 of file TrackingVolumeManipulator.cxx.
28 return glueVolumes(secondVol, secondFace, firstVol, firstFace);
◆ initialize()
StatusCode Muon::MuonInertMaterialBuilderImpl::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ printChildren()
void Muon::MuonInertMaterialBuilderImpl::printChildren |
( |
const GeoVPhysVol * |
pv | ) |
const |
|
protected |
Definition at line 186 of file MuonInertMaterialBuilderImpl.cxx.
189 unsigned int nc =
pv->getNChildVols();
190 for (
unsigned int ic = 0;
ic <
nc;
ic++) {
193 const GeoVPhysVol* cv = &(*(
pv->getChildVol(
ic)));
194 const GeoLogVol* clv = cv->getLogVol();
198 <<
ic <<
":" << clv->getName() <<
", made of "
199 << clv->getMaterial()->getName() <<
" x0 "
200 << clv->getMaterial()->getRadLength() <<
" , "
201 << clv->getShape()->type() <<
"," << transf.translation().x() <<
" "
202 << transf.translation().y() <<
" " << transf.translation().z());
◆ printInfo()
void Muon::MuonInertMaterialBuilderImpl::printInfo |
( |
const GeoVPhysVol * |
pv | ) |
const |
|
protected |
Dump from GeoModel tree
Definition at line 174 of file MuonInertMaterialBuilderImpl.cxx.
176 const GeoLogVol* lv =
pv->getLogVol();
178 << lv->getName() <<
", made of "
179 << lv->getMaterial()->getName() <<
" x0 "
180 << lv->getMaterial()->getRadLength() <<
","
181 << lv->getShape()->type());
◆ renounce()
◆ renounceArray()
◆ setBoundarySurface()
protected method to set the boundary surface of a tracking volume
Definition at line 43 of file TrackingVolumeManipulator.cxx.
48 (tvol.m_boundarySurfaces)[face] = std::move(bsurf);
◆ setInsideVolume()
protected method to set inside Volume of a BoundarySurface: input:
- the volume that holdes the BoundarySurface
- the face type of the boundary to be set
- the volume to be set as inside volume
Definition at line 52 of file TrackingVolumeManipulator.cxx.
◆ setInsideVolumeArray() [1/2]
protected method to set inside VolumeArray of a BoundarySurface: input:
- ithe volume that holdes the BoundarySurface
- the face type of the boundary to be set
- the volume array to be set as inside volume array
Definition at line 61 of file TrackingVolumeManipulator.cxx.
◆ setInsideVolumeArray() [2/2]
protected method to set inside VolumeArray of a BoundarySurface: input:
- ithe volume that holdes the BoundarySurface
- the face type of the boundary to be set
- the volume array to be set as inside volume array
◆ setOutsideVolume()
protected method to set outside Volume of a BoundarySurface: input:
- the volume that holdes the BoundarySurface
- the face type of the boundary to be set
- the volume to be set as outside volume
Definition at line 82 of file TrackingVolumeManipulator.cxx.
◆ setOutsideVolumeArray() [1/2]
protected method to set outside VolumeArray of a BoundarySurface: input:
- the volume that holdes the BoundarySurface
- the face type of the boundary to be set
- the volume array to be set as outside volume array
Definition at line 91 of file TrackingVolumeManipulator.cxx.
◆ setOutsideVolumeArray() [2/2]
protected method to set outside VolumeArray of a BoundarySurface: input:
- the volume that holdes the BoundarySurface
- the face type of the boundary to be set
- the volume array to be set as outside volume array
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_blendLimit
Gaudi::Property<double> Muon::MuonInertMaterialBuilderImpl::m_blendLimit |
|
protected |
◆ m_buildBT
Gaudi::Property<bool> Muon::MuonInertMaterialBuilderImpl::m_buildBT |
|
protected |
◆ m_buildECT
Gaudi::Property<bool> Muon::MuonInertMaterialBuilderImpl::m_buildECT |
|
protected |
◆ m_buildFeets
Gaudi::Property<bool> Muon::MuonInertMaterialBuilderImpl::m_buildFeets |
|
protected |
◆ m_buildNSWInert
Gaudi::Property<bool> Muon::MuonInertMaterialBuilderImpl::m_buildNSWInert |
|
protected |
◆ m_buildRails
Gaudi::Property<int> Muon::MuonInertMaterialBuilderImpl::m_buildRails {this, "BuildRails", 1} |
|
protected |
◆ m_buildShields
Gaudi::Property<bool> Muon::MuonInertMaterialBuilderImpl::m_buildShields |
|
protected |
◆ m_buildSupports
Gaudi::Property<bool> Muon::MuonInertMaterialBuilderImpl::m_buildSupports |
|
protected |
◆ m_debugMode
Gaudi::Property<bool> Muon::MuonInertMaterialBuilderImpl::m_debugMode |
|
protected |
◆ m_detStore
◆ m_evtStore
◆ m_geoShapeConverter
◆ m_gmBrowser
◆ m_simplify
Gaudi::Property<bool> Muon::MuonInertMaterialBuilderImpl::m_simplify |
|
protected |
◆ m_simplifyToLayers
Gaudi::Property<bool> Muon::MuonInertMaterialBuilderImpl::m_simplifyToLayers |
|
protected |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_volumeConverter
The documentation for this class was generated from the following files:
Gaudi::Property< bool > m_buildBT
Gaudi::Property< bool > m_buildFeets
Gaudi::Property< bool > m_buildECT
Gaudi::Property< int > m_buildRails
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Gaudi::Property< bool > m_simplify
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Gaudi::Property< bool > m_buildShields
std::vector< SG::VarHandleKeyArray * > m_vhka
bool findNamePattern(const GeoVPhysVol *gv, std::string_view name) const
search of matching name patterns
Gaudi::Property< bool > m_buildNSWInert
static void setOutsideVolume(TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *outsidevol)
protected method to set outside Volume of a BoundarySurface: input:
DetachedVolumeVecWithTrfs buildDetachedTrackingVolumeTypes(const PVConstLink top, bool blend) const
#define ATH_MSG_VERBOSE(x)
static void setInsideVolumeArray(TrackingVolume &tvol, BoundarySurfaceFace face, BinnedArray< TrackingVolume > *insidevolarray)
protected method to set inside VolumeArray of a BoundarySurface: input:
Trk::GMTreeBrowser m_gmBrowser
gm tree helper
static void setOutsideVolumeArray(TrackingVolume &tvol, BoundarySurfaceFace face, BinnedArray< TrackingVolume > *outsidevolarray)
protected method to set outside VolumeArray of a BoundarySurface: input:
virtual void setOwner(IDataHandleHolder *o)=0
std::vector< std::pair< std::unique_ptr< Trk::DetachedTrackingVolume >, std::vector< Amg::Transform3D > >> DetachedVolumeVecWithTrfs
Method creating material object prototypes.
int compareGeoVolumes(const GeoVPhysVol *gv1, const GeoVPhysVol *gv2, double tolerance, bool printFullInfo=false, int level=0) const
Recursive comparison of trees/branches/volumes : in quiet mode (printFullInfo=False) ,...
void getObjsForTranslation(const GeoVPhysVol *pv, const Amg::Transform3D &, std::vector< std::pair< const GeoVPhysVol *, std::vector< Amg::Transform3D >>> &vols) const
Method extracting material objects from GeoModel tree.
Eigen::Affine3d Transform3D
Gaudi::Property< bool > m_buildSupports
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
std::vector< std::unique_ptr< Trk::DetachedTrackingVolume > > DetachedVolVec
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
void decodeShape(const GeoShape *) const
Decode and dump arbitrary GeoShape for visual inspection.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void printInfo(const GeoVPhysVol *pv) const
Dump from GeoModel tree
void printChildren(const GeoVPhysVol *pv) const
Trk::VolumeConverter m_volumeConverter
gm->trk volume helper
static void setInsideVolume(TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *insidevol)
protected method to set inside Volume of a BoundarySurface: input:
std::shared_ptr< T > SharedObject
#define ATH_MSG_WARNING(x)
void glueVolumes(TrackingVolume &firstVol, BoundarySurfaceFace firstFace, TrackingVolume &secondVol, BoundarySurfaceFace secondFace) const
protected method to glue two Volumes together input:
const VolumeBounds & volumeBounds() const
returns the volumeBounds()
Gaudi::Property< bool > m_simplifyToLayers
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Gaudi::Property< double > m_blendLimit
std::unique_ptr< TrackingVolume > translate(const GeoVPhysVol *gv, bool simplify, bool blend, double blendMassLimit) const
translation of GeoVPhysVol to Trk::TrackingVolume
std::vector< SharedObject< BoundarySurface< TrackingVolume > > > m_boundarySurfaces
Trk::GeoShapeConverter m_geoShapeConverter
shape converter
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>