#include <bSlab.h>
Public Member Functions | |
bSlab (handles::const_iterator begin, handles::const_iterator end) | |
Constructor from list of volumes. | |
MagBSlab * | buildMagBSlab () const |
Construct the MagBSlab upon request. | |
Geom::Phi< float > | maxPhi () const |
Boundary in phi. | |
Geom::Phi< float > | minPhi () const |
Boundary in phi. | |
const float | RN () const |
Distance from center along sector normal. | |
~bSlab () | |
Destructor. | |
Private Attributes | |
MagBSlab * | mslab |
handles | volumes |
One or more slabs constitute a barrel rod. In most cases, a slab is a single volume, but in few cases it consists in several volumes contiguous in phi.
MagGeoBuilderFromDDD::bSlab::bSlab | ( | handles::const_iterator | begin, |
handles::const_iterator | end | ||
) |
Constructor from list of volumes.
Definition at line 21 of file bSlab.cc.
References gather_cfg::cout, MagGeoBuilderFromDDD::debug, epsilon, i, precomputed_value_sort(), volumes, Gflash::Zmax, Gflash::Zmin, SurfaceOrientation::zminus, and SurfaceOrientation::zplus.
: volumes(begin, end), mslab(0) { if (volumes.size() > 1) { // Sort volumes by dphi i.e. phi(j)-phi(i) > 0 if j>1. precomputed_value_sort(volumes.begin(), volumes.end(), ExtractPhiMax(), LessDPhi()); if (MagGeoBuilderFromDDD::debug) cout << " Slab has " << volumes.size() << " volumes" << endl; // Check that all volumes have the same dZ handles::const_iterator i = volumes.begin(); float Zmax = (*i)->surface(zplus).position().z(); float Zmin= (*i)->surface(zminus).position().z(); for (++i; i != volumes.end(); ++i){ const float epsilon = 0.001; if (fabs(Zmax - (*i)->surface(zplus).position().z()) > epsilon || fabs(Zmin - (*i)->surface(zminus).position().z()) > epsilon) { if (MagGeoBuilderFromDDD::debug) cout << "*** WARNING: slabs Z coords not matching: D_Zmax = " << fabs(Zmax - (*i)->surface(zplus).position().z()) << " D_Zmin = " << fabs(Zmin - (*i)->surface(zminus).position().z()) << endl; } } } }
MagBSlab * MagGeoBuilderFromDDD::bSlab::buildMagBSlab | ( | ) | const |
Construct the MagBSlab upon request.
Definition at line 60 of file bSlab.cc.
References SurfaceOrientation::zminus.
Geom::Phi< float > MagGeoBuilderFromDDD::bSlab::maxPhi | ( | ) | const |
Geom::Phi< float > MagGeoBuilderFromDDD::bSlab::minPhi | ( | ) | const |
const float MagGeoBuilderFromDDD::bSlab::RN | ( | ) | const [inline] |
MagBSlab* MagGeoBuilderFromDDD::bSlab::mslab [mutable, private] |