CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
MagBSlab Class Reference

#include <MagBSlab.h>

Public Member Functions

MagVolumefindVolume (const GlobalPoint &gp, double tolerance) const
 Find the volume containing a point, with a given tolerance. More...
 
 MagBSlab (const std::vector< MagVolume * > &volumes, double zMin)
 Constructor. More...
 
double minZ () const
 Lower Z bound. More...
 
virtual ~MagBSlab ()
 Destructor. More...
 

Private Attributes

std::vector< MagVolume * > theVolumes
 
double theZMin
 

Detailed Description

A container of volumes in the barrel. It is part of the hierarchical organisation of barrel volumes:

A barrel layer (MagBLayer) groups volumes at the same distance to the origin. It consists of 12 sectors in phi (MagBSector). Each sector consists of one or more rods (MagBRods) of equal width in phi. Rods consist of one or more slabs (MagBSlab); each one consisting of one or, in few cases, several volumes with the same lenght in Z.

Author
N. Amapane - INFN Torino

Definition at line 23 of file MagBSlab.h.

Constructor & Destructor Documentation

MagBSlab::MagBSlab ( const std::vector< MagVolume * > &  volumes,
double  zMin 
)

Constructor.

Definition at line 18 of file MagBSlab.cc.

18  :
20  theZMin(zMin)
21 {}
std::vector< MagVolume * > theVolumes
Definition: MagBSlab.h:38
double theZMin
Definition: MagBSlab.h:39
MagBSlab::~MagBSlab ( )
virtual

Destructor.

Definition at line 23 of file MagBSlab.cc.

References theVolumes.

23  {
24  for (vector<MagVolume *>::const_iterator ivol = theVolumes.begin();
25  ivol != theVolumes.end(); ++ivol) {
26  delete (*ivol);
27  }
28 }
std::vector< MagVolume * > theVolumes
Definition: MagBSlab.h:38

Member Function Documentation

MagVolume * MagBSlab::findVolume ( const GlobalPoint gp,
double  tolerance 
) const

Find the volume containing a point, with a given tolerance.

Definition at line 31 of file MagBSlab.cc.

References gather_cfg::cout, verbose::debugOut, and theVolumes.

31  {
32  for(vector<MagVolume*>::const_iterator ivol = theVolumes.begin();
33  ivol != theVolumes.end(); ++ivol) {
34  // FIXME : use a binfinder
35  // TOFIX
36  if (verbose::debugOut) cout << " Trying volume "
37  << (static_cast<MagVolume6Faces*>(*ivol))->volumeNo << endl;
38  if ( (*ivol)->inside(gp,tolerance) ) return (*ivol);
39  }
40 
41  return 0;
42 }
std::vector< MagVolume * > theVolumes
Definition: MagBSlab.h:38
tuple cout
Definition: gather_cfg.py:121
static constexpr bool debugOut
Definition: MagVerbosity.h:12
double MagBSlab::minZ ( ) const
inline

Lower Z bound.

Definition at line 35 of file MagBSlab.h.

References theZMin.

35 { return theZMin;}
double theZMin
Definition: MagBSlab.h:39

Member Data Documentation

std::vector<MagVolume*> MagBSlab::theVolumes
private

Definition at line 38 of file MagBSlab.h.

Referenced by findVolume(), and ~MagBSlab().

double MagBSlab::theZMin
private

Definition at line 39 of file MagBSlab.h.

Referenced by minZ().