CMS 3D CMS Logo

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

#include <MagELayer.h>

Public Member Functions

const MagVolumefindVolume (const GlobalPoint &gp, double tolerance) const
 Find the volume containing a point, with a given tolerance. More...
 
 MagELayer (const 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.

Author
N. Amapane - INFN Torino

Definition at line 16 of file MagELayer.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 18 of file MagELayer.cc.

19  : theVolumes(volumes), theZMin(zMin), theZMax(zMax) {}
double theZMin
Definition: MagELayer.h:35
double theZMax
Definition: MagELayer.h:36
std::vector< MagVolume * > theVolumes
Definition: MagELayer.h:34
MagELayer::~MagELayer ( )
virtual

Destructor.

Definition at line 21 of file MagELayer.cc.

References theVolumes.

21  {
22  for (vector<MagVolume*>::const_iterator ivol = theVolumes.begin(); ivol != theVolumes.end(); ++ivol) {
23  delete (*ivol);
24  }
25 }
std::vector< MagVolume * > theVolumes
Definition: MagELayer.h:34

Member Function Documentation

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

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

Definition at line 27 of file MagELayer.cc.

References MagVolume6Faces::copyno, LogTrace, theVolumes, and MagVolume6Faces::volumeNo.

27  {
28  for (vector<MagVolume*>::const_iterator ivol = theVolumes.begin(); ivol != theVolumes.end(); ++ivol) {
29  // FIXME : use a binfinder
30 #ifdef EDM_ML_DEBUG
31  {
32  MagVolume6Faces* mv = static_cast<MagVolume6Faces*>(*ivol);
33  LogTrace("MagGeometry") << " Trying volume " << mv->volumeNo << " " << int(mv->copyno) << endl;
34  }
35 #endif
36  if ((*ivol)->inside(gp, tolerance))
37  return (*ivol);
38  }
39 
40  return nullptr;
41 }
const double tolerance
#define LogTrace(id)
std::vector< MagVolume * > theVolumes
Definition: MagELayer.h:34
double MagELayer::maxZ ( ) const
inline

Upper Z bound.

Definition at line 31 of file MagELayer.h.

References theZMax.

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

Lower Z bound.

Definition at line 28 of file MagELayer.h.

References theZMin.

28 { return theZMin; }
double theZMin
Definition: MagELayer.h:35

Member Data Documentation

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

Definition at line 34 of file MagELayer.h.

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

double MagELayer::theZMax
private

Definition at line 36 of file MagELayer.h.

Referenced by maxZ().

double MagELayer::theZMin
private

Definition at line 35 of file MagELayer.h.

Referenced by minZ().