|
ATLAS Offline Software
|
#include <VolumeBuilder.h>
|
| VolumeBuilder (const Zone &zone, const std::vector< const ServiceVolume * > &services) |
|
| VolumeBuilder (const std::vector< const ServiceVolume * > &services) |
|
| VolumeBuilder (const Zone &zone, const std::vector< const ServiceVolume * > &services, const std::vector< const ServiceVolume * > &servEnv, const std::vector< const ServiceVolume * > &servChild) |
|
void | setRegion (const std::string ®ion, double zcenter) |
|
void | setMaterialManager (InDetMaterialManager *matManager) |
|
const std::vector< const ServiceVolume * > & | services () |
|
const std::vector< const ServiceVolume * > & | servicesEnv () |
|
const std::vector< const ServiceVolume * > & | servicesChild () |
|
void | buildAndPlace (const std::string ®ion, GeoPhysVol *parent, double zcenter=0) |
|
void | buildAndPlace (const std::string ®ion, GeoFullPhysVol *parent, double zcenter=0) |
|
void | buildAndPlaceEnvelope (const std::string ®ion, GeoFullPhysVol *parent, int iParent, int iElement, double zcenter=0) |
|
void | buildAndPlaceEnvelope (const std::string ®ion, GeoPhysVol *parent, int iParent, int iElement, double zcenter=0) |
|
void | addServices (const Zone &zone, const std::vector< const ServiceVolume * > &services) |
|
PhysVolPtr | build (int iElement) |
|
int | numCopies (int iElement) |
|
GeoTransform * | getPlacement (int iElement, int iCopy) |
|
GeoTransform * | getPlacementEnvelope (int iElement, int iCopy, int iMothElement) |
|
bool | isEnvelopeOrChild (int iElement) |
|
int | getEnvelopeNum (int iElement) |
|
int | getParentNum (int iElement) |
|
bool | isChildService (int iElt, int iChld) |
|
double | getZcenter (int iElt) |
|
bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. More...
|
|
MsgStream & | msg () const |
| The standard message stream. More...
|
|
MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. More...
|
|
void | setLevel (MSG::Level lvl) |
| Change the current logging level. More...
|
|
◆ PhysVolPtr
◆ VolumeBuilder() [1/3]
◆ VolumeBuilder() [2/3]
◆ VolumeBuilder() [3/3]
◆ addServices()
◆ build()
Definition at line 187 of file VolumeBuilder.cxx.
194 if (param.region() !=
m_region)
return nullptr;
196 const GeoShape* serviceShape = param.getShape();
197 double volume = param.origVolume();
198 std::string logName = param.fullLabel();
199 const GeoMaterial* serviceMat = param.material();
200 std::string materialName;
202 materialName = param.materialName();
208 ATH_MSG_ERROR(
"Material manager not available. Cannot build material.");
212 materialName = serviceMat->getName();
216 if (!param.shapeType().empty())
msg(
MSG::DEBUG) <<
" shape: " << param.shapeType() <<
endmsg;
219 << param.rmin() <<
", "
220 << param.rmax() <<
", "
221 << param.zmin() <<
", "
222 << param.zmax() <<
endmsg;
226 GeoLogVol* serviceLog =
new GeoLogVol(logName, serviceShape, serviceMat);
227 PhysVolPtr servicePhys{
new GeoPhysVol(serviceLog)};
◆ buildAndPlace() [1/2]
void VolumeBuilder::buildAndPlace |
( |
const std::string & |
region, |
|
|
GeoFullPhysVol * |
parent, |
|
|
double |
zcenter = 0 |
|
) |
| |
Definition at line 99 of file VolumeBuilder.cxx.
102 for (
unsigned int iElement = 0; iElement <
services().size(); ++iElement) {
106 for (
int iCopy = 0; iCopy <
numCopies(iElement); ++iCopy) {
114 if (region.compare(
"Pixel") != 0)
return;
116 for (
unsigned int iElement = 0; iElement <
services().size(); ++iElement) {
◆ buildAndPlace() [2/2]
void VolumeBuilder::buildAndPlace |
( |
const std::string & |
region, |
|
|
GeoPhysVol * |
parent, |
|
|
double |
zcenter = 0 |
|
) |
| |
Definition at line 83 of file VolumeBuilder.cxx.
86 for (
unsigned int iElement = 0; iElement <
services().size(); ++iElement)
90 for (
int iCopy = 0; iCopy <
numCopies(iElement); ++iCopy) {
◆ buildAndPlaceEnvelope() [1/2]
void VolumeBuilder::buildAndPlaceEnvelope |
( |
const std::string & |
region, |
|
|
GeoFullPhysVol * |
parent, |
|
|
int |
iParent, |
|
|
int |
iElement, |
|
|
double |
zcenter = 0 |
|
) |
| |
Definition at line 124 of file VolumeBuilder.cxx.
128 for (
unsigned int iChild = 0; iChild <
services().size(); ++iChild) {
134 for (
unsigned int iChild = 0; iChild <
services().size(); ++iChild) {
139 for (
int iCopy2 = 0; iCopy2 <
numCopies(iChild); ++iCopy2) {
141 physVol->add(physVol_child);
146 for (
int iCopy = 0; iCopy <
numCopies(iElement); ++iCopy) {
◆ buildAndPlaceEnvelope() [2/2]
void VolumeBuilder::buildAndPlaceEnvelope |
( |
const std::string & |
region, |
|
|
GeoPhysVol * |
parent, |
|
|
int |
iParent, |
|
|
int |
iElement, |
|
|
double |
zcenter = 0 |
|
) |
| |
Definition at line 156 of file VolumeBuilder.cxx.
160 for (
unsigned int iChild = 0; iChild <
services().size(); ++iChild) {
166 for (
unsigned int iChild = 0; iChild <
services().size(); ++iChild) {
171 for (
int iCopy2 = 0; iCopy2 <
numCopies(iChild); ++iCopy2) {
173 physVol->add(physVol_child);
178 for (
int iCopy = 0; iCopy <
numCopies(iElement); ++iCopy) {
◆ getEnvelopeNum()
int VolumeBuilder::getEnvelopeNum |
( |
int |
iElement | ) |
|
◆ getParentNum()
int VolumeBuilder::getParentNum |
( |
int |
iElement | ) |
|
◆ getPlacement()
GeoTransform * VolumeBuilder::getPlacement |
( |
int |
iElement, |
|
|
int |
iCopy |
|
) |
| |
Definition at line 274 of file VolumeBuilder.cxx.
277 double zpos = param.zposition() -
m_zcenter;
279 double zshift = param.zShift();
282 bool rotateAroundY =
false;
283 if (param.needsRotation()) {
285 rotateAroundY =
true;
291 const std::string& shapeType = param.shapeType();
292 if (shapeType ==
"TRAP" || shapeType ==
"TRAP2") {
296 if (shapeType ==
"TRAP2") {
299 if (shapeType ==
"BOX" || shapeType ==
"TRAP" || shapeType ==
"TRAP2") {
300 double radius = 0.5 * (param.rmin() + param.rmax());
301 xform = GeoTrf::TranslateX3D(
radius) * xform;
302 phiStart = param.phiLoc();
303 }
else if (shapeType ==
"ROD" || shapeType ==
"ROD2") {
304 double radius = param.rmin();
305 xform = GeoTrf::TranslateX3D(
radius) * xform;
306 phiStart = param.phiLoc();
315 xform = GeoTrf::RotateZ3D(phi) * xform;
321 return new GeoTransform(xform);
◆ getPlacementEnvelope()
GeoTransform * VolumeBuilder::getPlacementEnvelope |
( |
int |
iElement, |
|
|
int |
iCopy, |
|
|
int |
iMothElement |
|
) |
| |
Definition at line 325 of file VolumeBuilder.cxx.
328 double zCenter = (paramEnv.zmin() + paramEnv.zmax()) * 0.5;
330 bool bMoveToCenter =
false;
331 if (paramEnv.shapeType() ==
"BOX") bMoveToCenter =
true;
332 if (paramEnv.shapeType() ==
"TUBE" && paramEnv.zsymm() == 1 && fabs(paramEnv.zmin()) > 0.01) bMoveToCenter =
true;
333 if (bMoveToCenter) rCenter = (paramEnv.rmin() + paramEnv.rmax()) * 0.5;
335 double zpos = param.zposition() - zCenter;
337 bool rotateAroundY =
false;
338 if (param.needsRotation()) {
340 rotateAroundY =
true;
344 const std::string& shapeType = param.shapeType();
347 if (shapeType ==
"TRAP") {
351 if (shapeType ==
"TRAP2") {
355 if (shapeType ==
"BOX" || shapeType ==
"TRAP" || shapeType ==
"TRAP2") {
356 double radius = 0.5 * (param.rmin() + param.rmax()) - rCenter;
357 xform = GeoTrf::TranslateX3D(
radius) * xform;
358 phiStart = param.phiLoc();
359 }
else if (shapeType ==
"ROD" || shapeType ==
"ROD2") {
360 double radius = param.rmin();
361 xform = GeoTrf::TranslateX3D(
radius) * xform;
362 phiStart = param.phiLoc();
371 xform = GeoTrf::RotateZ3D(phi) * xform;
377 return new GeoTransform(xform);
◆ getZcenter()
double VolumeBuilder::getZcenter |
( |
int |
iElt | ) |
|
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ isChildService()
bool VolumeBuilder::isChildService |
( |
int |
iElt, |
|
|
int |
iChld |
|
) |
| |
Definition at line 256 of file VolumeBuilder.cxx.
259 if (iElt == iChld || param1.envelopeNum() != param2.envelopeParent())
return false;
260 if (param1.zsymm() == 1) {
261 double zmin = (param1.zmin() * param2.zmin());
262 double zmax = (param1.zmax() * param2.zmax());
◆ isEnvelopeOrChild()
bool VolumeBuilder::isEnvelopeOrChild |
( |
int |
iElement | ) |
|
Definition at line 232 of file VolumeBuilder.cxx.
234 return !(param.envelopeNum() == 0 && param.envelopeParent() == 0);
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ numCopies()
int VolumeBuilder::numCopies |
( |
int |
iElement | ) |
|
◆ services()
◆ servicesChild()
◆ servicesEnv()
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ setMaterialManager()
◆ setRegion()
void VolumeBuilder::setRegion |
( |
const std::string & |
region, |
|
|
double |
zcenter |
|
) |
| |
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_matManager
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_region
std::string InDetDD::VolumeBuilder::m_region |
|
private |
◆ m_servChild
◆ m_servEnvelope
◆ m_services
◆ m_splitter
◆ m_zcenter
double InDetDD::VolumeBuilder::m_zcenter |
|
private |
The documentation for this class was generated from the following files:
std::atomic< MSG::Level > m_lvl
Current logging level.
const std::vector< const ServiceVolume * > & splitAll(const Zone &zone, const std::vector< const ServiceVolume * > &)
VolumeSplitter m_splitter
bool isEnvelopeOrChild(int iElement)
GeoIntrusivePtr< GeoPhysVol > PhysVolPtr
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
InDetMaterialManager * m_matManager
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
const std::vector< const ServiceVolume * > * m_servChild
GeoTransform * getPlacementEnvelope(int iElement, int iCopy, int iMothElement)
IMessageSvc * getMessageSvc(bool quiet=false)
PhysVolPtr build(int iElement)
const std::vector< const ServiceVolume * > & services()
AthMessaging()
Default constructor:
void buildAndPlaceEnvelope(const std::string ®ion, GeoFullPhysVol *parent, int iParent, int iElement, double zcenter=0)
bool msgLvl(const MSG::Level lvl) const
Test the output level.
const std::vector< const ServiceVolume * > & getVolumes() const
Eigen::Affine3d Transform3D
const GeoMaterial * getMaterialForVolume(const std::string &materialName, double volume, const std::string &newName="")
Create and get material with a density calculated to give weight in predefined weight table.
int numCopies(int iElement)
void setRegion(const std::string ®ion, double zcenter)
MsgStream & msg() const
The standard message stream.
const std::vector< const ServiceVolume * > * m_services
bool isChildService(int iElt, int iChld)
std::string m_nm
Message source name.
void initMessaging() const
Initialize our message level and MessageSvc.
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
GeoTransform * getPlacement(int iElement, int iCopy)
const std::vector< const ServiceVolume * > * m_servEnvelope
int getEnvelopeNum(int iElement)