CMS 3D CMS Logo

MagELayer Class Reference

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

#include <MagneticField/Layers/interface/MagELayer.h>

List of all members.

Public Member Functions

MagVolumefindVolume (const GlobalPoint &gp, double tolerance) const
 Find the volume containing a point, with a given tolerance.
 MagELayer (std::vector< MagVolume * > volumes, double zMin, double zMax)
 Constructor.
double maxZ () const
 Upper Z bound.
double minZ () const
 Lower Z bound.
virtual ~MagELayer ()
 Destructor.

Private Attributes

std::vector< MagVolume * > theVolumes
double theZMax
double theZMin


Detailed Description

A layer of volumes in an endcap sector.

Date
2007/02/03 16:08:50
Revision
1.2
Author:
N. Amapane - INFN Torino

Definition at line 18 of file MagELayer.h.


Constructor & Destructor Documentation

MagELayer::MagELayer ( std::vector< MagVolume * >  volumes,
double  zMin,
double  zMax 
)

Constructor.

MagELayer::~MagELayer (  )  [virtual]

Destructor.

Definition at line 27 of file MagELayer.cc.

References theVolumes.

00027                      {
00028   for (vector<MagVolume *>::const_iterator ivol = theVolumes.begin();
00029        ivol != theVolumes.end(); ++ivol) {
00030     delete (*ivol);
00031   }
00032 }


Member Function Documentation

MagVolume * MagELayer::findVolume ( const GlobalPoint gp,
double  tolerance 
) const

Find the volume containing a point, with a given tolerance.

Definition at line 36 of file MagELayer.cc.

References theVolumes.

00036                                                                     {
00037   for(vector<MagVolume*>::const_iterator ivol = theVolumes.begin();
00038         ivol != theVolumes.end(); ++ivol) {
00039     // FIXME : use a binfinder
00040     // TOFIX
00041 //     if (verbose.debugOut) cout << "        Trying volume "
00042 //                  << (static_cast<MagVolume6Faces*> (*ivol))->name << endl;
00043     if ( (*ivol)->inside(gp,tolerance) ) return (*ivol);
00044   }
00045 
00046   return 0;
00047 }

double MagELayer::maxZ (  )  const [inline]

Upper Z bound.

Definition at line 33 of file MagELayer.h.

References theZMax.

00033 {return theZMax;}

double MagELayer::minZ (  )  const [inline]

Lower Z bound.

Definition at line 30 of file MagELayer.h.

References theZMin.

00030 {return theZMin;}


Member Data Documentation

std::vector<MagVolume*> MagELayer::theVolumes [private]

Definition at line 36 of file MagELayer.h.

Referenced by findVolume(), and ~MagELayer().

double MagELayer::theZMax [private]

Definition at line 38 of file MagELayer.h.

Referenced by maxZ().

double MagELayer::theZMin [private]

Definition at line 37 of file MagELayer.h.

Referenced by minZ().


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