CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
MagBSlab Class Reference

#include <MagBSlab.h>

Public Member Functions

const 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.

MagBSlab::~MagBSlab ( )
virtual

Destructor.

Definition at line 20 of file MagBSlab.cc.

References theVolumes.

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

Member Function Documentation

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

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

Definition at line 26 of file MagBSlab.cc.

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

26  {
27  for (vector<MagVolume*>::const_iterator ivol = theVolumes.begin(); ivol != theVolumes.end(); ++ivol) {
28  // FIXME : use a binfinder
29  // TOFIX
31  cout << " Trying volume " << (static_cast<MagVolume6Faces*>(*ivol))->volumeNo << endl;
32  if ((*ivol)->inside(gp, tolerance))
33  return (*ivol);
34  }
35 
36  return nullptr;
37 }
const double tolerance
std::vector< MagVolume * > theVolumes
Definition: MagBSlab.h:38
static constexpr bool debugOut
Definition: MagVerbosity.h:17
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().