ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
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. More...
 
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
 
LayerContainer layers () 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

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

Member Enumeration Documentation

◆ Shape

Enumerator
Cylinder 
Disk 

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

17 {Cylinder, Disk};

Constructor & Destructor Documentation

◆ ServiceVolume()

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

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

21  :
22  m_shape(sh), m_rMin( rmin), m_rMax(rmax), m_zMin(zmin), m_zMax(zmax), m_name(name),
23  m_layers(), m_previous(0), m_next(0) {}

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);}

◆ 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  }

◆ 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 }

◆ 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()

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

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

81 {m_materials = mat;}

◆ setNext()

void ServiceVolume::setNext ( ServiceVolume next)
inline

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

75 { m_next = next;}

◆ 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:
ServiceVolume::rMax
double rMax() const
Definition: InDetServMatGeoModel/src/ServiceVolume.h:42
ServiceVolume::m_rMin
double m_rMin
Definition: InDetServMatGeoModel/src/ServiceVolume.h:94
ServiceVolume::rMin
double rMin() const
Definition: InDetServMatGeoModel/src/ServiceVolume.h:40
PixelAthClusterMonAlgCfg.zmin
zmin
Definition: PixelAthClusterMonAlgCfg.py:176
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:53
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
ServiceVolume::m_next
ServiceVolume * m_next
Definition: InDetServMatGeoModel/src/ServiceVolume.h:103
python.LumiCalcHtml.lc
lc
Definition: LumiCalcHtml.py:579
x
#define x
ServiceVolume::m_zMax
double m_zMax
Definition: InDetServMatGeoModel/src/ServiceVolume.h:97
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
ServiceVolume::Cylinder
@ Cylinder
Definition: InDetServMatGeoModel/src/ServiceVolume.h:17
ServiceVolume::zMin
double zMin() const
Definition: InDetServMatGeoModel/src/ServiceVolume.h:44
ServiceVolume::layers
LayerContainer layers() const
Definition: InDetServMatGeoModel/src/ServiceVolume.h:69
lumiFormat.i
int i
Definition: lumiFormat.py:92
RCU::Shell
Definition: ShellExec.cxx:28
PixelAthClusterMonAlgCfg.zmax
zmax
Definition: PixelAthClusterMonAlgCfg.py:176
ServiceVolume::m_rMax
double m_rMax
Definition: InDetServMatGeoModel/src/ServiceVolume.h:95
ServiceVolume::radius
double radius() const
Definition: InDetServMatGeoModel/src/ServiceVolume.h:48
ServiceVolume::zPos
double zPos() const
Definition: InDetServMatGeoModel/src/ServiceVolume.h:38
ServiceVolume::materials
const std::vector< ServiceMaterial > & materials() const
Definition: InDetServMatGeoModel/src/ServiceVolume.h:79
ServiceVolume::Disk
@ Disk
Definition: InDetServMatGeoModel/src/ServiceVolume.h:17
ServiceVolume::zMax
double zMax() const
Definition: InDetServMatGeoModel/src/ServiceVolume.h:46
ServiceMaterial::EntryIter
EntryContainer::const_iterator EntryIter
Definition: ServiceMaterial.h:32
ServiceVolume::m_previous
std::vector< ServiceVolume * > m_previous
Definition: InDetServMatGeoModel/src/ServiceVolume.h:102
ServiceVolume::m_zMin
double m_zMin
Definition: InDetServMatGeoModel/src/ServiceVolume.h:96
ServiceVolume::m_layers
LayerContainer m_layers
Definition: InDetServMatGeoModel/src/ServiceVolume.h:100
ServiceVolume::m_shape
Shape m_shape
Definition: InDetServMatGeoModel/src/ServiceVolume.h:93
ServiceVolume::m_materials
std::vector< ServiceMaterial > m_materials
Definition: InDetServMatGeoModel/src/ServiceVolume.h:105
ServiceVolume::name
const std::string & name() const
Definition: InDetServMatGeoModel/src/ServiceVolume.h:60
ServiceVolume::m_name
std::string m_name
Definition: InDetServMatGeoModel/src/ServiceVolume.h:98
ServiceVolume::next
ServiceVolume * next()
Definition: InDetServMatGeoModel/src/ServiceVolume.h:71
ServiceVolume::shape
Shape shape() const
Definition: InDetServMatGeoModel/src/ServiceVolume.h:36