CMS 3D CMS Logo

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

#include <MagVolume6Faces.h>

Inheritance diagram for MagVolume6Faces:
MagVolume GloballyPositioned< float > MagneticField

Public Member Functions

const std::vector< VolumeSide > & faces () const override
 Access to volume faces. More...
 
bool inside (const GlobalPoint &gp, double tolerance=0.) const override
 
virtual bool inside (const GlobalPoint &gp, double tolerance=0.) const=0
 
virtual bool inside (const LocalPoint &lp, double tolerance=0.) const
 
 MagVolume6Faces (const PositionType &pos, const RotationType &rot, const std::vector< VolumeSide > &faces, const MagneticFieldProvider< float > *mfp, double sf=1.)
 
- Public Member Functions inherited from MagVolume
GlobalVector fieldInTesla (const GlobalPoint &lp) const
 
LocalVector fieldInTesla (const LocalPoint &lp) const
 
virtual bool inside (const LocalPoint &lp, double tolerance=0.) const
 
::GlobalVector inTesla (const ::GlobalPoint &gp) const override
 
bool isIron () const
 Temporary hack to pass information on material. Will eventually be replaced! More...
 
 MagVolume (const PositionType &pos, const RotationType &rot, const MagneticFieldProvider< float > *mfp, double sf=1.)
 
void ownsFieldProvider (bool o)
 
const MagneticFieldProvider< float > * provider () const
 
void setIsIron (bool iron)
 
 ~MagVolume () override
 
- Public Member Functions inherited from GloballyPositioned< float >
float eta () const
 
 GloballyPositioned ()
 
 GloballyPositioned (const PositionType &pos, const RotationType &rot)
 
void move (const GlobalVector &displacement)
 
float phi () const
 
const PositionTypeposition () const
 
void rotate (const RotationType &rotation)
 
const RotationTyperotation () const
 
GlobalPoint toGlobal (const LocalPoint &lp) const
 
GlobalVector toGlobal (const LocalVector &lv) const
 
Point3DBase< U, GlobalTagtoGlobal (const Point3DBase< U, LocalTag > &lp) const
 
Vector3DBase< U, GlobalTagtoGlobal (const Vector3DBase< U, LocalTag > &lv) const
 
LocalPoint toLocal (const GlobalPoint &gp) const
 
LocalVector toLocal (const GlobalVector &gv) const
 
Point3DBase< U, LocalTagtoLocal (const Point3DBase< U, GlobalTag > &gp) const
 
Vector3DBase< U, LocalTagtoLocal (const Vector3DBase< U, GlobalTag > &gv) const
 
virtual ~GloballyPositioned ()
 
- Public Member Functions inherited from MagneticField
virtual MagneticFieldclone () const
 
GlobalVector inInverseGeV (const GlobalPoint &gp) const
 Field value ad specified global point, in 1/Gev. More...
 
GlobalVector inKGauss (const GlobalPoint &gp) const
 Field value ad specified global point, in KGauss. More...
 
virtual GlobalVector inTesla (const GlobalPoint &gp) const =0
 Field value ad specified global point, in Tesla. More...
 
virtual GlobalVector inTeslaUnchecked (const GlobalPoint &gp) const
 
virtual bool isDefined (const GlobalPoint &) const
 True if the point is within the region where the concrete field. More...
 
 MagneticField ()
 
 MagneticField (const MagneticField &orig)
 
int nominalValue () const
 The nominal field value for this map in kGauss. More...
 
virtual ~MagneticField ()
 

Public Attributes

char copyno
 
short volumeNo
 

Private Attributes

std::vector< VolumeSidetheFaces
 

Additional Inherited Members

- Public Types inherited from MagVolume
typedef GloballyPositioned< float > Base
 
typedef GloballyPositioned< float >::GlobalPoint GlobalPoint
 
typedef GloballyPositioned< float >::GlobalVector GlobalVector
 
typedef GloballyPositioned< float >::LocalPoint LocalPoint
 
typedef GloballyPositioned< float >::LocalVector LocalVector
 
- Public Types inherited from GloballyPositioned< float >
typedef Point3DBase< float, GlobalTagGlobalPoint
 
typedef Vector3DBase< float, GlobalTagGlobalVector
 
typedef Point3DBase< float, LocalTagLocalPoint
 
typedef Vector3DBase< float, LocalTagLocalVector
 
typedef Point3DBase< float, GlobalTagPositionType
 
typedef TkRotation< float > RotationType
 
typedef float Scalar
 
- Static Public Member Functions inherited from GloballyPositioned< float >
static float iniEta ()
 
static float iniPhi ()
 

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.

Author
T. Todorov, N. Amapane

Definition at line 23 of file MagVolume6Faces.h.

Constructor & Destructor Documentation

◆ MagVolume6Faces()

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

Definition at line 3 of file MagVolume6Faces.cc.

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

Member Function Documentation

◆ faces()

const std::vector<VolumeSide>& MagVolume6Faces::faces ( ) const
inlineoverridevirtual

Access to volume faces.

Implements MagVolume.

Definition at line 35 of file MagVolume6Faces.h.

35 { return theFaces; }

References theFaces.

◆ inside() [1/3]

bool MagVolume6Faces::inside ( const GlobalPoint gp,
double  tolerance = 0. 
) const
overridevirtual

Implements MagVolume.

Definition at line 10 of file MagVolume6Faces.cc.

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

References runTauDisplay::gp, mps_fire::i, SurfaceOrientation::onSurface, theFaces, and tolerance.

◆ inside() [2/3]

virtual bool MagVolume::inside

◆ inside() [3/3]

virtual bool MagVolume::inside
inline

Definition at line 35 of file MagVolume.h.

35 { return inside(toGlobal(lp), tolerance); }

Member Data Documentation

◆ copyno

char MagVolume6Faces::copyno

Definition at line 39 of file MagVolume6Faces.h.

Referenced by MagELayer::findVolume().

◆ theFaces

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

Definition at line 43 of file MagVolume6Faces.h.

Referenced by faces(), and inside().

◆ volumeNo

short MagVolume6Faces::volumeNo

Definition at line 38 of file MagVolume6Faces.h.

Referenced by MagELayer::findVolume().

mps_fire.i
i
Definition: mps_fire.py:428
SurfaceOrientation::onSurface
Definition: Surface.h:18
MagVolume6Faces::theFaces
std::vector< VolumeSide > theFaces
Definition: MagVolume6Faces.h:43
pos
Definition: PixelAliasList.h:18
MagVolume6Faces::volumeNo
short volumeNo
Definition: MagVolume6Faces.h:38
MagVolume6Faces::faces
const std::vector< VolumeSide > & faces() const override
Access to volume faces.
Definition: MagVolume6Faces.h:35
MagVolume6Faces::copyno
char copyno
Definition: MagVolume6Faces.h:39
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:26
SurfaceOrientation::Side
Side
Definition: Surface.h:18
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
MagVolume6Faces::inside
bool inside(const GlobalPoint &gp, double tolerance=0.) const override
Definition: MagVolume6Faces.cc:10
GloballyPositioned< float >::toGlobal
GlobalPoint toGlobal(const LocalPoint &lp) const
Definition: GloballyPositioned.h:66
MagVolume::MagVolume
MagVolume(const PositionType &pos, const RotationType &rot, const MagneticFieldProvider< float > *mfp, double sf=1.)
Definition: MagVolume.h:21