CMS 3D CMS Logo

Public Member Functions | Public Attributes | Private Attributes

MagVolume6Faces Class Reference

#include <MagVolume6Faces.h>

Inheritance diagram for MagVolume6Faces:
MagVolume GloballyPositioned< float > MagneticField

List of all members.

Public Member Functions

virtual const std::vector
< VolumeSide > & 
faces () const
 Access to volume faces.
virtual bool inside (const GlobalPoint &gp, double tolerance=0.) const
 MagVolume6Faces (const PositionType &pos, const RotationType &rot, DDSolidShape shape, const std::vector< VolumeSide > &faces, const MagneticFieldProvider< float > *mfp, double sf=1.)

Public Attributes

char copyno
short volumeNo

Private Attributes

std::vector< VolumeSidetheFaces

Detailed Description

A MagVolume defined by a number of sides (surfaces) NOTE that despite the name the sides can be less (or more) than 6!!!

inside() is implemented by checking that the given point is on the correct side of each of the surfaces sides.

Date:
2013/05/03 20:03:24
Revision:
1.6
Author:
T. Todorov, N. Amapane

Definition at line 29 of file MagVolume6Faces.h.


Constructor & Destructor Documentation

MagVolume6Faces::MagVolume6Faces ( const PositionType pos,
const RotationType rot,
DDSolidShape  shape,
const std::vector< VolumeSide > &  faces,
const MagneticFieldProvider< float > *  mfp,
double  sf = 1. 
)

Definition at line 3 of file MagVolume6Faces.cc.

  : MagVolume(pos,rot,shape,mfp,sf),  volumeNo(0), copyno(0), theFaces(faces)
{}

Member Function Documentation

virtual const std::vector<VolumeSide>& MagVolume6Faces::faces ( ) const [inline, virtual]

Access to volume faces.

Implements MagVolume.

Definition at line 41 of file MagVolume6Faces.h.

References theFaces.

{return theFaces;}
bool MagVolume6Faces::inside ( const GlobalPoint gp,
double  tolerance = 0. 
) const [virtual]

Implements MagVolume.

Definition at line 12 of file MagVolume6Faces.cc.

References i, SurfaceOrientation::onSurface, and theFaces.

{

  // check if the point is on the correct side of all delimiting surfaces
  for (std::vector<VolumeSide>::const_iterator i=theFaces.begin(); i!=theFaces.end(); ++i) {
    Surface::Side side = i->surface().side( gp, tolerance);
    if ( side != i->surfaceSide() && side != SurfaceOrientation::onSurface) return false;
  }
  return true;
}

Member Data Documentation

Definition at line 45 of file MagVolume6Faces.h.

std::vector<VolumeSide> MagVolume6Faces::theFaces [private]

Definition at line 50 of file MagVolume6Faces.h.

Referenced by faces(), and inside().

Definition at line 44 of file MagVolume6Faces.h.