CMS 3D CMS Logo

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::MagELayer ( const std::vector< MagVolume * > &  volumes,
double  zMin,
double  zMax 
)

Constructor.

Definition at line 18 of file MagELayer.cc.

◆ ~MagELayer()

MagELayer::~MagELayer ( )
virtual

Destructor.

Definition at line 21 of file MagELayer.cc.

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

References theVolumes.

Member Function Documentation

◆ findVolume()

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.

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 }

References MagVolume6Faces::copyno, runTauDisplay::gp, createfilelist::int, LogTrace, theVolumes, tolerance, and MagVolume6Faces::volumeNo.

◆ maxZ()

double MagELayer::maxZ ( ) const
inline

Upper Z bound.

Definition at line 31 of file MagELayer.h.

31 { return theZMax; }

References theZMax.

◆ minZ()

double MagELayer::minZ ( ) const
inline

Lower Z bound.

Definition at line 28 of file MagELayer.h.

28 { return theZMin; }

References theZMin.

Member Data Documentation

◆ theVolumes

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

Definition at line 34 of file MagELayer.h.

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

◆ theZMax

double MagELayer::theZMax
private

Definition at line 36 of file MagELayer.h.

Referenced by maxZ().

◆ theZMin

double MagELayer::theZMin
private

Definition at line 35 of file MagELayer.h.

Referenced by minZ().

photonAnalyzer_cfi.zMax
zMax
Definition: photonAnalyzer_cfi.py:95
MagVolume6Faces::volumeNo
short volumeNo
Definition: MagVolume6Faces.h:38
MagELayer::theZMax
double theZMax
Definition: MagELayer.h:36
volumeBasedMagneticField_160812_cfi.volumes
volumes
Definition: volumeBasedMagneticField_160812_cfi.py:57
MagVolume6Faces::copyno
char copyno
Definition: MagVolume6Faces.h:39
MagELayer::theZMin
double theZMin
Definition: MagELayer.h:35
MagVolume6Faces
Definition: MagVolume6Faces.h:23
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
photonAnalyzer_cfi.zMin
zMin
Definition: photonAnalyzer_cfi.py:94
createfilelist.int
int
Definition: createfilelist.py:10
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:29
MagELayer::theVolumes
std::vector< MagVolume * > theVolumes
Definition: MagELayer.h:34
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234