#include <MagneticField/GeomBuilder/src/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 |
In most cases, a slab is a single volume, but in few cases it consists in several volumes contiguous in phi.
Definition at line 20 of file bSlab.h.
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 GenMuonPlsPt100GeV_cfg::cout, MagGeoBuilderFromDDD::debug, lat::endl(), geometryDiff::epsilon, i, precomputed_value_sort(), volumes, Gflash::Zmax, Gflash::Zmin, SurfaceOrientation::zminus, and SurfaceOrientation::zplus.
00021 : 00022 volumes(begin, end), 00023 mslab(0) 00024 { 00025 if (volumes.size() > 1) { 00026 // Sort volumes by dphi i.e. phi(j)-phi(i) > 0 if j>1. 00027 precomputed_value_sort(volumes.begin(), volumes.end(), 00028 ExtractPhiMax(), LessDPhi()); 00029 00030 if (MagGeoBuilderFromDDD::debug) cout << " Slab has " << volumes.size() 00031 << " volumes" << endl; 00032 00033 // Check that all volumes have the same dZ 00034 handles::const_iterator i = volumes.begin(); 00035 float Zmax = (*i)->surface(zplus).position().z(); 00036 float Zmin= (*i)->surface(zminus).position().z(); 00037 for (++i; i != volumes.end(); ++i){ 00038 const float epsilon = 0.001; 00039 if (fabs(Zmax - (*i)->surface(zplus).position().z()) > epsilon || 00040 fabs(Zmin - (*i)->surface(zminus).position().z()) > epsilon) { 00041 if (MagGeoBuilderFromDDD::debug) cout << "*** WARNING: slabs Z coords not matching: D_Zmax = " 00042 << fabs(Zmax - (*i)->surface(zplus).position().z()) 00043 << " D_Zmin = " 00044 << fabs(Zmin - (*i)->surface(zminus).position().z()) 00045 << endl; 00046 } 00047 } 00048 } 00049 }
MagGeoBuilderFromDDD::bSlab::~bSlab | ( | ) |
MagBSlab * MagGeoBuilderFromDDD::bSlab::buildMagBSlab | ( | ) | const |
Construct the MagBSlab upon request.
Definition at line 60 of file bSlab.cc.
References mslab, volumes, and SurfaceOrientation::zminus.
00060 { 00061 if (mslab==0) { 00062 vector<MagVolume*> mVols; 00063 for (handles::const_iterator vol = volumes.begin(); 00064 vol!=volumes.end(); ++vol) { 00065 mVols.push_back((*vol)->magVolume); 00066 } 00067 mslab = new MagBSlab(mVols, volumes.front()->surface(zminus).position().z()); //FIXME 00068 } 00069 return mslab; 00070 }
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] |
handles MagGeoBuilderFromDDD::bSlab::volumes [private] |