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

#include <VolumeSplitterUtils.h>

Inheritance diagram for InDetDD::TubeZone:
Collaboration diagram for InDetDD::TubeZone:

Public Types

typedef std::vector< const Zone * >::const_iterator ChildIterator
 

Public Member Functions

 TubeZone (const std::string &label, double zmin, double zmax, double rmin, double rmax, bool rotated=false)
 
 TubeZone (const std::string &label, const GeoTube *shape, double zOffset, bool rotated=false)
 
virtual bool inSide (const Point &point) const
 
virtual Point findEntry (const Ray &ray) const
 
virtual Point findExit (const Ray &ray) const
 
virtual double getRmin () const
 
virtual double getRmax () const
 
virtual double getZmin () const
 
virtual double getZmax () const
 
void add (const Zone *)
 
ChildIterator begin () const
 
ChildIterator end () const
 
const std::string & label () const
 
bool rotated () const
 

Private Member Functions

bool inR (double r) const
 
bool inZ (double z) const
 

Private Attributes

double m_zmin
 
double m_zmax
 
double m_rmin
 
double m_rmax
 
std::string m_label
 
bool m_rotated
 
std::vector< const Zone * > m_children
 

Detailed Description

Definition at line 98 of file VolumeSplitterUtils.h.

Member Typedef Documentation

◆ ChildIterator

typedef std::vector<const Zone *>::const_iterator InDetDD::Zone::ChildIterator
inherited

Definition at line 73 of file VolumeSplitterUtils.h.

Constructor & Destructor Documentation

◆ TubeZone() [1/2]

InDetDD::TubeZone::TubeZone ( const std::string &  label,
double  zmin,
double  zmax,
double  rmin,
double  rmax,
bool  rotated = false 
)

Definition at line 149 of file VolumeSplitterUtils.cxx.

150  : Zone(label, rotated),
151  m_zmin(zmin),
152  m_zmax(zmax),
153  m_rmin(rmin),
154  m_rmax(rmax)
155  {}

◆ TubeZone() [2/2]

InDetDD::TubeZone::TubeZone ( const std::string &  label,
const GeoTube *  shape,
double  zOffset,
bool  rotated = false 
)

Definition at line 157 of file VolumeSplitterUtils.cxx.

158  : Zone(label, rotated),
159  m_zmin(zOffset - shape->getZHalfLength()),
160  m_zmax(zOffset + shape->getZHalfLength()),
161  m_rmin(shape->getRMin()),
162  m_rmax(shape->getRMax())
163  {}

Member Function Documentation

◆ add()

void InDetDD::Zone::add ( const Zone zone)
inherited

Definition at line 124 of file VolumeSplitterUtils.cxx.

124  {
125  m_children.push_back(zone);
126  }

◆ begin()

ChildIterator InDetDD::Zone::begin ( ) const
inlineinherited

Definition at line 80 of file VolumeSplitterUtils.h.

80 {return m_children.begin();}

◆ end()

ChildIterator InDetDD::Zone::end ( ) const
inlineinherited

Definition at line 81 of file VolumeSplitterUtils.h.

81 {return m_children.end();}

◆ findEntry()

Point InDetDD::TubeZone::findEntry ( const Ray ray) const
virtual

Implements InDetDD::Zone.

Definition at line 183 of file VolumeSplitterUtils.cxx.

183  {
184  if (ray.horizontal()) {
185  if (inR(ray.start().r()) && ray.start().z() < m_zmin && ray.end().z() > m_zmin) {
186  Point p(m_zmin, ray.start().r());
187  p.setChild(this);
188  return p;
189  }
190  } else if (ray.vertical()) {
191  if (inZ(ray.start().z()) && ray.start().r() < m_rmin && ray.end().r() > m_rmin) {
192  Point p(ray.start().z(), m_rmin);
193  p.setChild(this);
194  return p;
195  }
196  } else {
197  std::cout << "Unexpected case" << std::endl;
198  }
199  // Return invalid point since doesn't intersect.
200  return {}; // invalid point
201  }

◆ findExit()

Point InDetDD::TubeZone::findExit ( const Ray ray) const
virtual

Implements InDetDD::Zone.

Definition at line 205 of file VolumeSplitterUtils.cxx.

205  {
206  if (ray.horizontal()) {
207  if (ray.end().z() > m_zmax) {
208  Point p(m_zmax, ray.start().r());
209  p.setExit();
210  return p;
211  }
212  } else if (ray.vertical()) {
213  if (ray.end().r() > m_rmax) {
214  Point p(ray.start().z(), m_rmax);
215  p.setExit();
216  return p;
217  }
218  } else {
219  std::cout << "Unexpected case" << std::endl;
220  }
221  // ends with. Return invalid point.
222  return {};
223  }

◆ getRmax()

virtual double InDetDD::TubeZone::getRmax ( ) const
inlinevirtual

Definition at line 107 of file VolumeSplitterUtils.h.

107 { return m_rmax; }

◆ getRmin()

virtual double InDetDD::TubeZone::getRmin ( ) const
inlinevirtual

Definition at line 106 of file VolumeSplitterUtils.h.

106 { return m_rmin; }

◆ getZmax()

virtual double InDetDD::TubeZone::getZmax ( ) const
inlinevirtual

Definition at line 109 of file VolumeSplitterUtils.h.

109 { return m_zmax; }

◆ getZmin()

virtual double InDetDD::TubeZone::getZmin ( ) const
inlinevirtual

Definition at line 108 of file VolumeSplitterUtils.h.

108 { return m_zmin; }

◆ inR()

bool InDetDD::TubeZone::inR ( double  r) const
private

Definition at line 177 of file VolumeSplitterUtils.cxx.

177  {
178  return(r >= m_rmin && r < m_rmax);
179  }

◆ inSide()

bool InDetDD::TubeZone::inSide ( const Point point) const
virtual

Implements InDetDD::Zone.

Definition at line 167 of file VolumeSplitterUtils.cxx.

167  {
168  return(inZ(point.z()) && inR(point.r()));
169  }

◆ inZ()

bool InDetDD::TubeZone::inZ ( double  z) const
private

Definition at line 172 of file VolumeSplitterUtils.cxx.

172  {
173  return(z >= m_zmin && z < m_zmax);
174  }

◆ label()

const std::string& InDetDD::Zone::label ( ) const
inlineinherited

Definition at line 82 of file VolumeSplitterUtils.h.

82 {return m_label;}

◆ rotated()

bool InDetDD::Zone::rotated ( ) const
inlineinherited

Definition at line 83 of file VolumeSplitterUtils.h.

83 {return m_rotated;}

Member Data Documentation

◆ m_children

std::vector<const Zone *> InDetDD::Zone::m_children
privateinherited

Definition at line 87 of file VolumeSplitterUtils.h.

◆ m_label

std::string InDetDD::Zone::m_label
privateinherited

Definition at line 85 of file VolumeSplitterUtils.h.

◆ m_rmax

double InDetDD::TubeZone::m_rmax
private

Definition at line 116 of file VolumeSplitterUtils.h.

◆ m_rmin

double InDetDD::TubeZone::m_rmin
private

Definition at line 115 of file VolumeSplitterUtils.h.

◆ m_rotated

bool InDetDD::Zone::m_rotated
privateinherited

Definition at line 86 of file VolumeSplitterUtils.h.

◆ m_zmax

double InDetDD::TubeZone::m_zmax
private

Definition at line 114 of file VolumeSplitterUtils.h.

◆ m_zmin

double InDetDD::TubeZone::m_zmin
private

Definition at line 113 of file VolumeSplitterUtils.h.


The documentation for this class was generated from the following files:
beamspotman.r
def r
Definition: beamspotman.py:676
InDetDD::Zone::m_rotated
bool m_rotated
Definition: VolumeSplitterUtils.h:86
InDetDD::Zone::label
const std::string & label() const
Definition: VolumeSplitterUtils.h:82
PixelAthClusterMonAlgCfg.zmin
zmin
Definition: PixelAthClusterMonAlgCfg.py:169
InDetDD::TubeZone::inZ
bool inZ(double z) const
Definition: VolumeSplitterUtils.cxx:172
InDetDD::TubeZone::m_rmin
double m_rmin
Definition: VolumeSplitterUtils.h:115
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
z
#define z
PixelAthClusterMonAlgCfg.zmax
zmax
Definition: PixelAthClusterMonAlgCfg.py:169
python.draw_obj.zone
def zone(nx, ny)
Definition: draw_obj.py:288
ChargedTracksWeightFilter::Spline::Point
Linear spline representation of a function used to calculate weights.
Definition: ChargedTracksWeightFilter.h:28
InDetDD::Zone::m_children
std::vector< const Zone * > m_children
Definition: VolumeSplitterUtils.h:87
InDetDD::TubeZone::m_rmax
double m_rmax
Definition: VolumeSplitterUtils.h:116
InDetDD::Zone::m_label
std::string m_label
Definition: VolumeSplitterUtils.h:85
InDetDD::Zone::Zone
Zone(const std::string &label, bool rotated=false)
Definition: VolumeSplitterUtils.cxx:112
InDetDD::TubeZone::inR
bool inR(double r) const
Definition: VolumeSplitterUtils.cxx:177
InDetDD::Zone::rotated
bool rotated() const
Definition: VolumeSplitterUtils.h:83
InDetDD::TubeZone::m_zmax
double m_zmax
Definition: VolumeSplitterUtils.h:114
InDetDD::TubeZone::m_zmin
double m_zmin
Definition: VolumeSplitterUtils.h:113