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
MagBSlab Class Reference

#include <MagBSlab.h>

Public Member Functions

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

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.

Definition at line 20 of file MagBSlab.cc.

20  :
21  theVolumes(volumes),
22  theZMin(zMin)
23 {}
std::vector< MagVolume * > theVolumes
Definition: MagBSlab.h:40
double theZMin
Definition: MagBSlab.h:41
MagBSlab::~MagBSlab ( )
virtual

Destructor.

Definition at line 25 of file MagBSlab.cc.

References theVolumes.

25  {
26  for (vector<MagVolume *>::const_iterator ivol = theVolumes.begin();
27  ivol != theVolumes.end(); ++ivol) {
28  delete (*ivol);
29  }
30 }
std::vector< MagVolume * > theVolumes
Definition: MagBSlab.h:40

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 gather_cfg::cout, verbose::debugOut, mergeVDriftHistosByStation::name, and theVolumes.

33  {
34  for(vector<MagVolume*>::const_iterator ivol = theVolumes.begin();
35  ivol != theVolumes.end(); ++ivol) {
36  // FIXME : use a binfinder
37  // TOFIX
38  if (verbose::debugOut) cout << " Trying volume "
39  << (static_cast<MagVolume6Faces*>(*ivol))->name << endl;
40  if ( (*ivol)->inside(gp,tolerance) ) return (*ivol);
41  }
42 
43  return 0;
44 }
static bool debugOut
Definition: MagVerbosity.h:14
std::vector< MagVolume * > theVolumes
Definition: MagBSlab.h:40
tuple cout
Definition: gather_cfg.py:121
double MagBSlab::minZ ( ) const
inline

Lower Z bound.

Definition at line 37 of file MagBSlab.h.

References theZMin.

37 { return theZMin;}
double theZMin
Definition: MagBSlab.h:41

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