ATLAS Offline Software
Loading...
Searching...
No Matches
ServiceVolume Class Reference

#include <ServiceVolume.h>

Collaboration diagram for ServiceVolume:

Public Types

enum  Shape { Cylinder , Disk }
typedef std::vector< const ServicesLayer * > LayerContainer

Public Member Functions

 ServiceVolume (Shape sh, double rmin, double rmax, double zmin, double zmax, const std::string &name)
void addLayer (const ServicesLayer *l)
 Add a layer the services of which are routed through this volume.
void addLayers (const LayerContainer &lc)
void addEosServices (const ServicesLayer *l)
Shape shape () const
double zPos () const
double rMin () const
double rMax () const
double zMin () const
double zMax () const
double radius () const
double position () const
double length () const
const std::string & name () const
bool contains (double x) const
const LayerContainerlayers () const
ServiceVolumenext ()
void addPrevious (ServiceVolume *prev)
void setNext (ServiceVolume *next)
void dump (bool dumpMaterial=true) const
const std::vector< ServiceMaterial > & materials () const
void setMaterials (const std::vector< ServiceMaterial > &mat)
void addMaterial (const ServiceMaterial &mat)
bool isEOS () const

Private Attributes

Shape m_shape
double m_rMin
double m_rMax
double m_zMin
double m_zMax
std::string m_name
LayerContainer m_layers
std::vector< ServiceVolume * > m_previous
ServiceVolumem_next
std::vector< ServiceMaterialm_materials

Detailed Description

Definition at line 14 of file InDetServMatGeoModel/src/ServiceVolume.h.

Member Typedef Documentation

◆ LayerContainer

typedef std::vector<const ServicesLayer*> ServiceVolume::LayerContainer

Definition at line 19 of file InDetServMatGeoModel/src/ServiceVolume.h.

Member Enumeration Documentation

◆ Shape

Constructor & Destructor Documentation

◆ ServiceVolume()

ServiceVolume::ServiceVolume ( Shape sh,
double rmin,
double rmax,
double zmin,
double zmax,
const std::string & name )
inline

Member Function Documentation

◆ addEosServices()

void ServiceVolume::addEosServices ( const ServicesLayer * l)

Definition at line 35 of file InDetServMatGeoModel/src/ServiceVolume.cxx.

36{
37 //FIXME: add it back!!!
38 /*
39 // Here we treat the fixed mass end of stave material as linear material, with mass per mm equal
40 // to the EOS mass of one stave (this should be set in the weight table), "length" inside the volume
41 // equal to the number of staves in the layer.
42 if (l->type() == DetType::Pixel) {
43 m_materials.push_back( ServiceMaterial( "PixelEOS", l->nStaves()));
44 }
45 else {
46 m_materials.push_back( ServiceMaterial( "StripEOS", l->nStaves()));
47 }
48 */
49}

◆ addLayer()

void ServiceVolume::addLayer ( const ServicesLayer * l)
inline

Add a layer the services of which are routed through this volume.

Definition at line 26 of file InDetServMatGeoModel/src/ServiceVolume.h.

26 {
27 m_layers.push_back(l);
28 }

◆ addLayers()

void ServiceVolume::addLayers ( const LayerContainer & lc)
inline

Definition at line 30 of file InDetServMatGeoModel/src/ServiceVolume.h.

30 {
31 m_layers.insert( m_layers.end(), lc.begin(), lc.end());
32 }

◆ addMaterial()

void ServiceVolume::addMaterial ( const ServiceMaterial & mat)
inline

Definition at line 83 of file InDetServMatGeoModel/src/ServiceVolume.h.

83{m_materials.push_back( mat);}
std::vector< ServiceMaterial > m_materials

◆ addPrevious()

void ServiceVolume::addPrevious ( ServiceVolume * prev)
inline

Definition at line 73 of file InDetServMatGeoModel/src/ServiceVolume.h.

73{ m_previous.push_back(prev);}

◆ contains()

bool ServiceVolume::contains ( double x) const
inline

Definition at line 62 of file InDetServMatGeoModel/src/ServiceVolume.h.

62 {
63 // one-dimensional check, radial for disks and along Z for cylinders)
64 double eps = 0.0001; // hard-wired tolerance
65 if (shape()==Disk) return (x > rMin()-eps && x < rMax()+eps);
66 else return (x > zMin()-eps && x < zMax()+eps);
67 }
#define x

◆ dump()

void ServiceVolume::dump ( bool dumpMaterial = true) const

Definition at line 10 of file InDetServMatGeoModel/src/ServiceVolume.cxx.

11{
12 using namespace std;
13 if (shape() == Cylinder) cout << "Cylinder ";
14 else if (shape() == Disk) cout << "Disk";
15
16 cout << "Radial extent " << m_rMin << "," << m_rMax
17 << " Z extent " << m_zMin << "," << m_zMax;
18
19 cout << " routes " << layers().size() << " layers" << endl;
20
21 if ( dumpMaterial && !materials().empty()) {
22 for (std::vector<ServiceMaterial>::const_iterator i=materials().begin(); i!=materials().end(); ++i) {
23 cout << " service material " << i->name() << " has the following components" << endl;
24 for ( ServiceMaterial::EntryIter ient= i->components().begin(); ient!=i->components().end(); ++ient) {
25 cout << ient->name << " linear? " << ient->linear
26 << " number " << ient->number
27 << " l/w " << ient->weight
28 << " total l/w " << ient->weight*ient->number << endl;
29 }
30 }
31 cout << endl;
32 }
33}
static const Attributes_t empty
EntryContainer::const_iterator EntryIter
const LayerContainer & layers() const
const std::vector< ServiceMaterial > & materials() const

◆ isEOS()

bool ServiceVolume::isEOS ( ) const
inline

Definition at line 85 of file InDetServMatGeoModel/src/ServiceVolume.h.

85 {
86 if (m_name.size() < 4) return false;
87 if (m_name.substr(m_name.size()-3) == "EOS") return true;
88 return false;
89 }

◆ layers()

const LayerContainer & ServiceVolume::layers ( ) const
inline

Definition at line 69 of file InDetServMatGeoModel/src/ServiceVolume.h.

69{return m_layers;}

◆ length()

double ServiceVolume::length ( ) const
inline

Definition at line 55 of file InDetServMatGeoModel/src/ServiceVolume.h.

55 {
56 if (shape() == Cylinder) return zMax()-zMin();
57 else return rMax() - rMin();
58 }

◆ materials()

const std::vector< ServiceMaterial > & ServiceVolume::materials ( ) const
inline

Definition at line 79 of file InDetServMatGeoModel/src/ServiceVolume.h.

79{return m_materials;}

◆ name()

const std::string & ServiceVolume::name ( ) const
inline

Definition at line 60 of file InDetServMatGeoModel/src/ServiceVolume.h.

60{return m_name;}

◆ next()

ServiceVolume * ServiceVolume::next ( )
inline

Definition at line 71 of file InDetServMatGeoModel/src/ServiceVolume.h.

71{return m_next;}

◆ position()

double ServiceVolume::position ( ) const
inline

Definition at line 50 of file InDetServMatGeoModel/src/ServiceVolume.h.

50 {
51 if (shape() == Cylinder) return zPos();
52 else return radius();
53 }

◆ radius()

double ServiceVolume::radius ( ) const
inline

Definition at line 48 of file InDetServMatGeoModel/src/ServiceVolume.h.

48{return 0.5*(rMin() + rMax());}

◆ rMax()

double ServiceVolume::rMax ( ) const
inline

Definition at line 42 of file InDetServMatGeoModel/src/ServiceVolume.h.

42{return m_rMax;}

◆ rMin()

double ServiceVolume::rMin ( ) const
inline

Definition at line 40 of file InDetServMatGeoModel/src/ServiceVolume.h.

40{return m_rMin;}

◆ setMaterials()

void ServiceVolume::setMaterials ( const std::vector< ServiceMaterial > & mat)
inline

◆ setNext()

void ServiceVolume::setNext ( ServiceVolume * next)
inline

◆ shape()

Shape ServiceVolume::shape ( ) const
inline

Definition at line 36 of file InDetServMatGeoModel/src/ServiceVolume.h.

36{return m_shape;}

◆ zMax()

double ServiceVolume::zMax ( ) const
inline

Definition at line 46 of file InDetServMatGeoModel/src/ServiceVolume.h.

46{return m_zMax;}

◆ zMin()

double ServiceVolume::zMin ( ) const
inline

Definition at line 44 of file InDetServMatGeoModel/src/ServiceVolume.h.

44{return m_zMin;}

◆ zPos()

double ServiceVolume::zPos ( ) const
inline

Definition at line 38 of file InDetServMatGeoModel/src/ServiceVolume.h.

38{return 0.5*(m_zMin+m_zMax);}

Member Data Documentation

◆ m_layers

LayerContainer ServiceVolume::m_layers
private

Definition at line 100 of file InDetServMatGeoModel/src/ServiceVolume.h.

◆ m_materials

std::vector<ServiceMaterial> ServiceVolume::m_materials
private

Definition at line 105 of file InDetServMatGeoModel/src/ServiceVolume.h.

◆ m_name

std::string ServiceVolume::m_name
private

Definition at line 98 of file InDetServMatGeoModel/src/ServiceVolume.h.

◆ m_next

ServiceVolume* ServiceVolume::m_next
private

Definition at line 103 of file InDetServMatGeoModel/src/ServiceVolume.h.

◆ m_previous

std::vector<ServiceVolume*> ServiceVolume::m_previous
private

Definition at line 102 of file InDetServMatGeoModel/src/ServiceVolume.h.

◆ m_rMax

double ServiceVolume::m_rMax
private

Definition at line 95 of file InDetServMatGeoModel/src/ServiceVolume.h.

◆ m_rMin

double ServiceVolume::m_rMin
private

Definition at line 94 of file InDetServMatGeoModel/src/ServiceVolume.h.

◆ m_shape

Shape ServiceVolume::m_shape
private

Definition at line 93 of file InDetServMatGeoModel/src/ServiceVolume.h.

◆ m_zMax

double ServiceVolume::m_zMax
private

Definition at line 97 of file InDetServMatGeoModel/src/ServiceVolume.h.

◆ m_zMin

double ServiceVolume::m_zMin
private

Definition at line 96 of file InDetServMatGeoModel/src/ServiceVolume.h.


The documentation for this class was generated from the following files: