CMS 3D CMS Logo

MagBSlab Class Reference

A container of volumes in the barrel. More...

#include <MagneticField/Layers/interface/MagBSlab.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.
 MagBSlab (std::vector< MagVolume * > volumes, double zMin)
 Constructor.
double minZ () const
 Lower Z bound.
virtual ~MagBSlab ()
 Destructor.

Private Attributes

std::vector< MagVolume * > theVolumes
double theZMin


Detailed Description

A container of volumes in the barrel.

It is part of the hierarchical organisation of barrel volumes:

A barrel layer (MagBLayer) groups volumes at the same distance to the origin. It consists of 12 sectors in phi (MagBSector). Each sector consists of one or more rods (MagBRods) of equal width in phi. Rods consist of one or more slabs (MagBSlab); each one consisting of one or, in few cases, several volumes with the same lenght in Z.

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

Definition at line 25 of file MagBSlab.h.


Constructor & Destructor Documentation

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

Constructor.

MagBSlab::~MagBSlab (  )  [virtual]

Destructor.

Definition at line 25 of file MagBSlab.cc.

References theVolumes.

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


Member Function Documentation

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

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

Definition at line 33 of file MagBSlab.cc.

References GenMuonPlsPt100GeV_cfg::cout, verbose::debugOut, lat::endl(), name, and theVolumes.

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

double MagBSlab::minZ (  )  const [inline]

Lower Z bound.

Definition at line 37 of file MagBSlab.h.

References theZMin.

00037 { return theZMin;}


Member Data Documentation

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

Definition at line 40 of file MagBSlab.h.

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

double MagBSlab::theZMin [private]

Definition at line 41 of file MagBSlab.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