ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
InDetDD::TubeVolData Class Reference

Helper class to read in generic TUBE, TUBS, CONS or PCON type volumes. More...

#include <TubeVolData.h>

Collaboration diagram for InDetDD::TubeVolData:

Public Types

enum  VolShape { TUBE, TUBS, CONS, RADIAL }
 

Public Member Functions

 TubeVolData (const IRDBRecord *)
 
double rmin () const
 
double rmax () const
 
double rmin2 () const
 
double rmax2 () const
 
double length () const
 
double zMid () const
 
double phiStart () const
 
double phiDelta () const
 
double phiStep () const
 
int nRepeat () const
 
int radialDivisions () const
 
bool bothZ () const
 
VolShape shape () const
 
std::string material () const
 
double maxRadius () const
 

Private Attributes

const IRDBRecordm_record
 
bool m_bothZ
 
int m_nRepeat
 
int m_radialDiv
 
double m_phiStart
 
double m_phiDelta
 
double m_phiStep
 
double m_rmin1
 
double m_rmin2
 
double m_rmax1
 
double m_rmax2
 
double m_length
 
double m_zMid
 
VolShape m_shape {CONS}
 

Detailed Description

Helper class to read in generic TUBE, TUBS, CONS or PCON type volumes.

Definition at line 16 of file TubeVolData.h.

Member Enumeration Documentation

◆ VolShape

Enumerator
TUBE 
TUBS 
CONS 
RADIAL 

Definition at line 19 of file TubeVolData.h.

19 {TUBE, TUBS, CONS, RADIAL};

Constructor & Destructor Documentation

◆ TubeVolData()

InDetDD::TubeVolData::TubeVolData ( const IRDBRecord record)

Definition at line 24 of file TubeVolData.cxx.

25  : m_record(record),
26  m_bothZ(false),
27  m_nRepeat(0),
28  m_radialDiv(0),
29  m_phiStart(0.),
30  m_phiDelta(0.),
31  m_phiStep(0.),
32  m_rmin1(0.),
33  m_rmin2(0.),
34  m_rmax1(0.),
35  m_rmax2(0.),
36  m_length(0.),
37  m_zMid(0.) {
38  // add an 2*epsilon gap between phi sectors.
39  const double phiepsilon = 0.001 * Gaudi::Units::degree;
40 
41  bool fullPhiSector = false;
42 
43 
44  // Get the parameters which we need to do some preprocessing with.
45  // The rest are obtained directly from RDB.
46 
47  if (m_record) {
51  m_nRepeat = m_record->getInt("NREPEAT");
56  m_radialDiv = 0;
57  if (!m_record->isFieldNull("RADIAL")) {
58  m_radialDiv = m_record->getInt("RADIAL");
59  }
60  m_bothZ = 0;
61  if (!m_record->isFieldNull("ZSYMM")) {
62  m_bothZ = m_record->getInt("ZSYMM");
63  }
64 
65  double zmin = m_record->getDouble("ZMIN") * Gaudi::Units::mm;
66  double zmax = m_record->getDouble("ZMAX") * Gaudi::Units::mm;
67  m_length = std::abs(zmax - zmin);
68  m_zMid = 0.5 * (zmin + zmax);
69 
70  if (m_phiDelta == 0 || m_phiDelta >= 359.9 * Gaudi::Units::degree) {
72  fullPhiSector = true;
73  } else {
74  m_phiDelta -= 2 * phiepsilon;
75  m_phiStart += phiepsilon;
76  }
77 
78  // Force nRepeat to be >= 1;
79  if (m_nRepeat <= 0) m_nRepeat = 1;
80  // if PHISTEP==0 then set it to be equi-distant steps filling up phi.
81  if (m_phiStep == 0) {
83  }
84 
85  if (m_rmin2 <= 0) m_rmin2 = m_rmin1;
86  if (m_rmax2 <= 0) m_rmax2 = m_rmax1;
87 
88  if (m_radialDiv > 0) {
90  } else if (m_rmin1 == m_rmin2 && m_rmax1 == m_rmax2) {
91  if (fullPhiSector) {
93  } else {
95  }
96  } else {
98  }
99  } else std::cout << "Unexpected ERROR in ExtraMaterial!" << std::endl;
100  }

Member Function Documentation

◆ bothZ()

bool InDetDD::TubeVolData::bothZ ( ) const
inline

Definition at line 33 of file TubeVolData.h.

33 {return m_bothZ;}

◆ length()

double InDetDD::TubeVolData::length ( ) const
inline

Definition at line 26 of file TubeVolData.h.

26 {return m_length;}

◆ material()

std::string InDetDD::TubeVolData::material ( ) const

Definition at line 15 of file TubeVolData.cxx.

15  {
16  return m_record->getString("MATERIAL");
17  }

◆ maxRadius()

double InDetDD::TubeVolData::maxRadius ( ) const

Definition at line 20 of file TubeVolData.cxx.

20  {
21  return std::max(m_rmax1, m_rmax2);
22  }

◆ nRepeat()

int InDetDD::TubeVolData::nRepeat ( ) const
inline

Definition at line 31 of file TubeVolData.h.

31 {return m_nRepeat;}

◆ phiDelta()

double InDetDD::TubeVolData::phiDelta ( ) const
inline

Definition at line 29 of file TubeVolData.h.

29 {return m_phiDelta;}

◆ phiStart()

double InDetDD::TubeVolData::phiStart ( ) const
inline

Definition at line 28 of file TubeVolData.h.

28 {return m_phiStart;}

◆ phiStep()

double InDetDD::TubeVolData::phiStep ( ) const
inline

Definition at line 30 of file TubeVolData.h.

30 {return m_phiStep;}

◆ radialDivisions()

int InDetDD::TubeVolData::radialDivisions ( ) const
inline

Definition at line 32 of file TubeVolData.h.

32 {return m_radialDiv;}

◆ rmax()

double InDetDD::TubeVolData::rmax ( ) const
inline

Definition at line 23 of file TubeVolData.h.

23 {return m_rmax1;}

◆ rmax2()

double InDetDD::TubeVolData::rmax2 ( ) const
inline

Definition at line 25 of file TubeVolData.h.

25 {return m_rmax2;}

◆ rmin()

double InDetDD::TubeVolData::rmin ( ) const
inline

Definition at line 22 of file TubeVolData.h.

22 {return m_rmin1;}

◆ rmin2()

double InDetDD::TubeVolData::rmin2 ( ) const
inline

Definition at line 24 of file TubeVolData.h.

24 {return m_rmin2;}

◆ shape()

VolShape InDetDD::TubeVolData::shape ( ) const
inline

Definition at line 35 of file TubeVolData.h.

35 {return m_shape;}

◆ zMid()

double InDetDD::TubeVolData::zMid ( ) const
inline

Definition at line 27 of file TubeVolData.h.

27 {return m_zMid;}

Member Data Documentation

◆ m_bothZ

bool InDetDD::TubeVolData::m_bothZ
private

Definition at line 42 of file TubeVolData.h.

◆ m_length

double InDetDD::TubeVolData::m_length
private

Definition at line 52 of file TubeVolData.h.

◆ m_nRepeat

int InDetDD::TubeVolData::m_nRepeat
private

Definition at line 43 of file TubeVolData.h.

◆ m_phiDelta

double InDetDD::TubeVolData::m_phiDelta
private

Definition at line 46 of file TubeVolData.h.

◆ m_phiStart

double InDetDD::TubeVolData::m_phiStart
private

Definition at line 45 of file TubeVolData.h.

◆ m_phiStep

double InDetDD::TubeVolData::m_phiStep
private

Definition at line 47 of file TubeVolData.h.

◆ m_radialDiv

int InDetDD::TubeVolData::m_radialDiv
private

Definition at line 44 of file TubeVolData.h.

◆ m_record

const IRDBRecord* InDetDD::TubeVolData::m_record
private

Definition at line 41 of file TubeVolData.h.

◆ m_rmax1

double InDetDD::TubeVolData::m_rmax1
private

Definition at line 50 of file TubeVolData.h.

◆ m_rmax2

double InDetDD::TubeVolData::m_rmax2
private

Definition at line 51 of file TubeVolData.h.

◆ m_rmin1

double InDetDD::TubeVolData::m_rmin1
private

Definition at line 48 of file TubeVolData.h.

◆ m_rmin2

double InDetDD::TubeVolData::m_rmin2
private

Definition at line 49 of file TubeVolData.h.

◆ m_shape

VolShape InDetDD::TubeVolData::m_shape {CONS}
private

Definition at line 54 of file TubeVolData.h.

◆ m_zMid

double InDetDD::TubeVolData::m_zMid
private

Definition at line 53 of file TubeVolData.h.


The documentation for this class was generated from the following files:
IRDBRecord::getInt
virtual int getInt(const std::string &fieldName) const =0
Get int field value.
InDetDD::TubeVolData::m_zMid
double m_zMid
Definition: TubeVolData.h:53
InDetDD::TubeVolData::CONS
@ CONS
Definition: TubeVolData.h:19
max
#define max(a, b)
Definition: cfImp.cxx:41
PixelAthClusterMonAlgCfg.zmin
zmin
Definition: PixelAthClusterMonAlgCfg.py:169
InDetDD::TubeVolData::m_rmin1
double m_rmin1
Definition: TubeVolData.h:48
IRDBRecord::getString
virtual const std::string & getString(const std::string &fieldName) const =0
Get string field value.
InDetDD::TubeVolData::TUBS
@ TUBS
Definition: TubeVolData.h:19
InDetDD::TubeVolData::m_rmin2
double m_rmin2
Definition: TubeVolData.h:49
InDetDD::TubeVolData::m_radialDiv
int m_radialDiv
Definition: TubeVolData.h:44
InDetDD::TubeVolData::m_shape
VolShape m_shape
Definition: TubeVolData.h:54
PixelAthClusterMonAlgCfg.zmax
zmax
Definition: PixelAthClusterMonAlgCfg.py:169
InDetDD::TubeVolData::TUBE
@ TUBE
Definition: TubeVolData.h:19
InDetDD::TubeVolData::m_phiDelta
double m_phiDelta
Definition: TubeVolData.h:46
InDetDD::TubeVolData::m_phiStep
double m_phiStep
Definition: TubeVolData.h:47
InDetDD::TubeVolData::m_record
const IRDBRecord * m_record
Definition: TubeVolData.h:41
InDetDD::TubeVolData::m_nRepeat
int m_nRepeat
Definition: TubeVolData.h:43
InDetDD::TubeVolData::RADIAL
@ RADIAL
Definition: TubeVolData.h:19
InDetDD::TubeVolData::m_rmax1
double m_rmax1
Definition: TubeVolData.h:50
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
InDetDD::TubeVolData::m_bothZ
bool m_bothZ
Definition: TubeVolData.h:42
IRDBRecord::isFieldNull
virtual bool isFieldNull(const std::string &fieldName) const =0
Check if the field value is NULL.
InDetDD::TubeVolData::m_length
double m_length
Definition: TubeVolData.h:52
InDetDD::TubeVolData::m_rmax2
double m_rmax2
Definition: TubeVolData.h:51
InDetDD::TubeVolData::m_phiStart
double m_phiStart
Definition: TubeVolData.h:45
IRDBRecord::getDouble
virtual double getDouble(const std::string &fieldName) const =0
Get double field value.
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106