#include <MagBSlab.h>
Public Member Functions | |
MagVolume * | findVolume (const GlobalPoint &gp, double tolerance) const |
Find the volume containing a point, with a given tolerance. | |
MagBSlab (std::vector< MagVolume * > volumes, double zMin) | |
Constructor. | |
double | minZ () const |
Lower Z bound. | |
virtual | ~MagBSlab () |
Destructor. | |
Private Attributes | |
std::vector< MagVolume * > | theVolumes |
double | theZMin |
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.
Definition at line 25 of file MagBSlab.h.
MagBSlab::MagBSlab | ( | std::vector< MagVolume * > | volumes, |
double | zMin | ||
) |
MagBSlab::~MagBSlab | ( | ) | [virtual] |
Destructor.
Definition at line 25 of file MagBSlab.cc.
References theVolumes.
{ for (vector<MagVolume *>::const_iterator ivol = theVolumes.begin(); ivol != theVolumes.end(); ++ivol) { delete (*ivol); } }
MagVolume * MagBSlab::findVolume | ( | const GlobalPoint & | gp, |
double | tolerance | ||
) | const |
Find the volume containing a point, with a given tolerance.
Definition at line 33 of file MagBSlab.cc.
References gather_cfg::cout, verbose::debugOut, mergeVDriftHistosByStation::name, and theVolumes.
{ for(vector<MagVolume*>::const_iterator ivol = theVolumes.begin(); ivol != theVolumes.end(); ++ivol) { // FIXME : use a binfinder // TOFIX if (verbose::debugOut) cout << " Trying volume " << (static_cast<MagVolume6Faces*>(*ivol))->name << endl; if ( (*ivol)->inside(gp,tolerance) ) return (*ivol); } return 0; }
double MagBSlab::minZ | ( | ) | const [inline] |
std::vector<MagVolume*> MagBSlab::theVolumes [private] |
Definition at line 40 of file MagBSlab.h.
Referenced by findVolume(), and ~MagBSlab().
double MagBSlab::theZMin [private] |
Definition at line 41 of file MagBSlab.h.
Referenced by minZ().