#include <MagBSector.h>
Public Member Functions | |
MagVolume * | findVolume (const GlobalPoint &gp, double tolerance) const |
Find the volume containing a point, with a given tolerance. | |
MagBSector (std::vector< MagBRod * > &rods, Geom::Phi< float > phiMin) | |
Constructor. | |
Geom::Phi< float > | minPhi () const |
Phi of sector start. | |
virtual | ~MagBSector () |
Destructor. | |
Private Attributes | |
Geom::Phi< float > | thePhiMin |
std::vector< MagBRod * > | theRods |
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 26 of file MagBSector.h.
MagBSector::~MagBSector | ( | ) | [virtual] |
Destructor.
Definition at line 25 of file MagBSector.cc.
References theRods.
{ for (vector<MagBRod *>::const_iterator irod = theRods.begin(); irod != theRods.end(); ++irod) { delete (*irod); } }
MagVolume * MagBSector::findVolume | ( | const GlobalPoint & | gp, |
double | tolerance | ||
) | const |
Find the volume containing a point, with a given tolerance.
Definition at line 32 of file MagBSector.cc.
References gather_cfg::cout, verbose::debugOut, PV3DBase< T, PVType, FrameType >::phi(), phi, query::result, and theRods.
{ MagVolume * result = 0; Geom::Phi<float> phi = gp.phi(); // FIXME : use a binfinder for(vector<MagBRod*>::const_iterator irod = theRods.begin(); irod != theRods.end(); ++irod) { // TOFIX if (verbose::debugOut) cout << " Trying rod at phi " << (*irod)->minPhi() << " " << phi << endl ; result = (*irod)->findVolume(gp, tolerance); if (result!=0) return result; } return 0; }
Geom::Phi<float> MagBSector::minPhi | ( | ) | const [inline] |
Phi of sector start.
Definition at line 38 of file MagBSector.h.
References thePhiMin.
{return thePhiMin;}
Geom::Phi<float> MagBSector::thePhiMin [private] |
Definition at line 42 of file MagBSector.h.
Referenced by minPhi().
std::vector<MagBRod*> MagBSector::theRods [private] |
Definition at line 41 of file MagBSector.h.
Referenced by findVolume(), and ~MagBSector().