CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
MagBSlab Class Reference

#include <MagBSlab.h>

Public Member Functions

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

Author
N. Amapane - INFN Torino

Definition at line 23 of file MagBSlab.h.

Constructor & Destructor Documentation

◆ MagBSlab()

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

Constructor.

Definition at line 18 of file MagBSlab.cc.

◆ ~MagBSlab()

MagBSlab::~MagBSlab ( )
virtual

Destructor.

Definition at line 20 of file MagBSlab.cc.

20  {
21  for (vector<MagVolume*>::const_iterator ivol = theVolumes.begin(); ivol != theVolumes.end(); ++ivol) {
22  delete (*ivol);
23  }
24 }

References theVolumes.

Member Function Documentation

◆ findVolume()

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

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

Definition at line 26 of file MagBSlab.cc.

26  {
27  for (vector<MagVolume*>::const_iterator ivol = theVolumes.begin(); ivol != theVolumes.end(); ++ivol) {
28  // FIXME : use a binfinder
29  LogTrace("MagGeometry") << " Trying volume " << (static_cast<MagVolume6Faces*>(*ivol))->volumeNo << endl;
30  if ((*ivol)->inside(gp, tolerance))
31  return (*ivol);
32  }
33 
34  return nullptr;
35 }

References runTauDisplay::gp, LogTrace, theVolumes, and tolerance.

◆ minZ()

double MagBSlab::minZ ( ) const
inline

Lower Z bound.

Definition at line 35 of file MagBSlab.h.

35 { return theZMin; }

References theZMin.

Member Data Documentation

◆ theVolumes

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

Definition at line 38 of file MagBSlab.h.

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

◆ theZMin

double MagBSlab::theZMin
private

Definition at line 39 of file MagBSlab.h.

Referenced by minZ().

MagBSlab::theVolumes
std::vector< MagVolume * > theVolumes
Definition: MagBSlab.h:38
MagBSlab::theZMin
double theZMin
Definition: MagBSlab.h:39
volumeBasedMagneticField_160812_cfi.volumes
volumes
Definition: volumeBasedMagneticField_160812_cfi.py:57
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
photonAnalyzer_cfi.zMin
zMin
Definition: photonAnalyzer_cfi.py:94
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:26
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224