#include <eLayer.h>
Public Member Functions | |
MagELayer * | buildMagELayer () const |
Construct the MagELayer upon request. | |
eLayer (handles::const_iterator begin, handles::const_iterator end) | |
Constructor from list of volumes. | |
~eLayer () | |
Destructor. | |
Private Attributes | |
MagELayer * | mlayer |
handles | theVolumes |
A layer of volumes in an endcap sector.
MagGeoBuilderFromDDD::eLayer::eLayer | ( | handles::const_iterator | begin, |
handles::const_iterator | end | ||
) |
Constructor from list of volumes.
Definition at line 21 of file eLayer.cc.
References precomputed_value_sort(), and theVolumes.
: theVolumes(begin,end), mlayer(0) { // bool debug=MagGeoBuilderFromDDD::debug; // Sort in R precomputed_value_sort(theVolumes.begin(), theVolumes.end(), ExtractR()); // if (debug) { // cout << " elements: " << theVolumes.size() << " unique volumes: "; // volumeHandle::printUniqueNames(theVolumes.begin(), theVolumes.end()); // } }
MagELayer * MagGeoBuilderFromDDD::eLayer::buildMagELayer | ( | ) | const |
Construct the MagELayer upon request.
Definition at line 49 of file eLayer.cc.
{ if (mlayer==0) { //FIXME not guaranteed that all volumes in layer have the same zmin // and zmax! double zmin = 1e19; double zmax = -1e19; vector<MagVolume*> mVols; for (handles::const_iterator vol = theVolumes.begin(); vol!=theVolumes.end(); ++vol) { mVols.push_back((*vol)->magVolume); zmin = min(zmin, (*vol)->minZ()); zmax = max(zmax, (*vol)->maxZ()); } mlayer = new MagELayer(mVols, zmin, zmax); } return mlayer; }
MagELayer* MagGeoBuilderFromDDD::eLayer::mlayer [mutable, private] |