CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
MagELayer Class Reference

#include <MagELayer.h>

Public Member Functions

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

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.

Definition at line 21 of file MagELayer.cc.

21  :
22  theVolumes(volumes),
23  theZMin(zMin),
24  theZMax(zMax)
25 {}
double theZMin
Definition: MagELayer.h:37
double theZMax
Definition: MagELayer.h:38
std::vector< MagVolume * > theVolumes
Definition: MagELayer.h:36
MagELayer::~MagELayer ( )
virtual

Destructor.

Definition at line 27 of file MagELayer.cc.

References theVolumes.

27  {
28  for (vector<MagVolume *>::const_iterator ivol = theVolumes.begin();
29  ivol != theVolumes.end(); ++ivol) {
30  delete (*ivol);
31  }
32 }
std::vector< MagVolume * > theVolumes
Definition: MagELayer.h:36

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.

36  {
37  for(vector<MagVolume*>::const_iterator ivol = theVolumes.begin();
38  ivol != theVolumes.end(); ++ivol) {
39  // FIXME : use a binfinder
40  // TOFIX
41 // if (verbose.debugOut) cout << " Trying volume "
42 // << (static_cast<MagVolume6Faces*> (*ivol))->name << endl;
43  if ( (*ivol)->inside(gp,tolerance) ) return (*ivol);
44  }
45 
46  return 0;
47 }
std::vector< MagVolume * > theVolumes
Definition: MagELayer.h:36
double MagELayer::maxZ ( ) const
inline

Upper Z bound.

Definition at line 33 of file MagELayer.h.

References theZMax.

33 {return theZMax;}
double theZMax
Definition: MagELayer.h:38
double MagELayer::minZ ( ) const
inline

Lower Z bound.

Definition at line 30 of file MagELayer.h.

References theZMin.

30 {return theZMin;}
double theZMin
Definition: MagELayer.h:37

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().