CMS 3D CMS Logo

MagGeoBuilderFromDDD::eLayer Class Reference

A layer of volumes in an endcap sector. More...

#include <MagneticField/GeomBuilder/src/eLayer.h>

List of all members.

Public Member Functions

MagELayerbuildMagELayer () const
 Construct the MagELayer upon request.
 eLayer (handles::const_iterator begin, handles::const_iterator end)
 Constructor from list of volumes.
 ~eLayer ()
 Destructor.

Private Attributes

MagELayermlayer
handles theVolumes


Detailed Description

A layer of volumes in an endcap sector.

Date
2005/09/27 15:15:52
Revision
1.2
Author:
N. Amapane - INFN Torino

Definition at line 18 of file eLayer.h.


Constructor & Destructor Documentation

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.

00022                                                                    :
00023   theVolumes(begin,end),
00024   mlayer(0) 
00025 {
00026   //  bool debug=MagGeoBuilderFromDDD::debug;
00027 
00028   // Sort in R  
00029   precomputed_value_sort(theVolumes.begin(), theVolumes.end(), ExtractR());
00030 
00031 //   if (debug) {
00032 //     cout << " elements: " << theVolumes.size() << " unique volumes: ";
00033 //     volumeHandle::printUniqueNames(theVolumes.begin(), theVolumes.end());
00034 //   }
00035 }

MagGeoBuilderFromDDD::eLayer::~eLayer (  ) 

Destructor.

Definition at line 37 of file eLayer.cc.

00037 {}


Member Function Documentation

MagELayer * MagGeoBuilderFromDDD::eLayer::buildMagELayer (  )  const

Construct the MagELayer upon request.

Definition at line 49 of file eLayer.cc.

References max, min, mlayer, and theVolumes.

00049                                                              {
00050   if (mlayer==0) {
00051     //FIXME not guaranteed that all volumes in layer have the same zmin
00052     // and zmax!
00053     double zmin = 1e19;
00054     double zmax = -1e19;
00055     vector<MagVolume*> mVols;
00056     for (handles::const_iterator vol = theVolumes.begin();
00057          vol!=theVolumes.end(); ++vol) {
00058       mVols.push_back((*vol)->magVolume);
00059       zmin = min(zmin, (*vol)->minZ());
00060       zmax = max(zmax, (*vol)->maxZ());
00061     }
00062     mlayer = new MagELayer(mVols, zmin, zmax);
00063   }
00064   return mlayer;
00065 }


Member Data Documentation

MagELayer* MagGeoBuilderFromDDD::eLayer::mlayer [mutable, private]

Definition at line 34 of file eLayer.h.

Referenced by buildMagELayer().

handles MagGeoBuilderFromDDD::eLayer::theVolumes [private]

Definition at line 33 of file eLayer.h.

Referenced by buildMagELayer(), and eLayer().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:27:57 2009 for CMSSW by  doxygen 1.5.4