CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
MagVolume Class Referenceabstract

#include <MagVolume.h>

Inheritance diagram for MagVolume:
GloballyPositioned< float > MagneticField defaultRKPropagator::RKMagVolume MagCylinder MagVolume6Faces

Public Types

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
 

Public Member Functions

virtual const std::vector< VolumeSide > & faces () const =0
 Access to volume faces. More...
 
LocalVector fieldInTesla (const LocalPoint &lp) const
 
GlobalVector fieldInTesla (const GlobalPoint &lp) const
 
virtual bool inside (const GlobalPoint &gp, double tolerance=0.) const =0
 
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
 
Point3DBase< U, GlobalTagtoGlobal (const Point3DBase< U, LocalTag > &lp) const
 
GlobalVector toGlobal (const LocalVector &lv) const
 
Vector3DBase< U, GlobalTagtoGlobal (const Vector3DBase< U, LocalTag > &lv) const
 
LocalPoint toLocal (const GlobalPoint &gp) const
 
Point3DBase< U, LocalTagtoLocal (const Point3DBase< U, GlobalTag > &gp) const
 
LocalVector toLocal (const GlobalVector &gv) 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
 
float inverseBzAtOriginInGeV () const
 The inverse of field z component for this map in GeV. More...
 
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 ()
 

Private Attributes

bool isIronFlag
 
const MagneticFieldProvider< float > * theProvider
 
bool theProviderOwned
 
double theScalingFactor
 

Additional Inherited Members

- Static Public Member Functions inherited from GloballyPositioned< float >
static float iniEta ()
 
static float iniPhi ()
 
- Protected Member Functions inherited from MagneticField
void setNominalValue ()
 

Detailed Description

Definition at line 13 of file MagVolume.h.

Member Typedef Documentation

◆ Base

Definition at line 15 of file MagVolume.h.

◆ GlobalPoint

Definition at line 18 of file MagVolume.h.

◆ GlobalVector

Definition at line 19 of file MagVolume.h.

◆ LocalPoint

Definition at line 16 of file MagVolume.h.

◆ LocalVector

Definition at line 17 of file MagVolume.h.

Constructor & Destructor Documentation

◆ MagVolume()

MagVolume::MagVolume ( const PositionType pos,
const RotationType rot,
const MagneticFieldProvider< float > *  mfp,
double  sf = 1. 
)
inline

Definition at line 21 of file MagVolume.h.

22  : Base(pos, rot),
23  MagneticField(),
24  theProvider(mfp),
25  theProviderOwned(false),
26  theScalingFactor(sf),
27  isIronFlag(false) {}
bool theProviderOwned
Definition: MagVolume.h:51
double theScalingFactor
Definition: MagVolume.h:52
bool isIronFlag
Definition: MagVolume.h:54
GloballyPositioned< float > Base
Definition: MagVolume.h:15
const MagneticFieldProvider< float > * theProvider
Definition: MagVolume.h:50

◆ ~MagVolume()

MagVolume::~MagVolume ( )
override

Definition at line 6 of file MagVolume.cc.

References theProvider, and theProviderOwned.

6  {
8  delete theProvider;
9 }
bool theProviderOwned
Definition: MagVolume.h:51
const MagneticFieldProvider< float > * theProvider
Definition: MagVolume.h:50

Member Function Documentation

◆ faces()

virtual const std::vector<VolumeSide>& MagVolume::faces ( ) const
pure virtual

Access to volume faces.

Implemented in defaultRKPropagator::RKMagVolume, MagVolume6Faces, and MagCylinder.

Referenced by SteppingHelixPropagator::refToMagVolume().

◆ fieldInTesla() [1/2]

MagVolume::LocalVector MagVolume::fieldInTesla ( const LocalPoint lp) const

Definition at line 11 of file MagVolume.cc.

References theProvider, theScalingFactor, and MagneticFieldProvider< T >::valueInTesla().

Referenced by RKLocalFieldProvider::inTesla(), inTesla(), and SteppingHelixPropagator::loadState().

11  {
13 }
double theScalingFactor
Definition: MagVolume.h:52
virtual LocalVectorType valueInTesla(const LocalPointType &p) const =0
const MagneticFieldProvider< float > * theProvider
Definition: MagVolume.h:50

◆ fieldInTesla() [2/2]

MagVolume::GlobalVector MagVolume::fieldInTesla ( const GlobalPoint lp) const

Definition at line 15 of file MagVolume.cc.

References runTauDisplay::gp, theProvider, theScalingFactor, GloballyPositioned< float >::toGlobal(), GloballyPositioned< float >::toLocal(), and MagneticFieldProvider< T >::valueInTesla().

15  {
17 }
GlobalPoint toGlobal(const LocalPoint &lp) const
double theScalingFactor
Definition: MagVolume.h:52
LocalPoint toLocal(const GlobalPoint &gp) const
virtual LocalVectorType valueInTesla(const LocalPointType &p) const =0
const MagneticFieldProvider< float > * theProvider
Definition: MagVolume.h:50

◆ inside() [1/2]

virtual bool MagVolume::inside ( const GlobalPoint gp,
double  tolerance = 0. 
) const
pure virtual

◆ inside() [2/2]

virtual bool MagVolume::inside ( const LocalPoint lp,
double  tolerance = 0. 
) const
inlinevirtual

Reimplemented in MagCylinder.

Definition at line 35 of file MagVolume.h.

References inside(), GloballyPositioned< float >::toGlobal(), and tolerance.

Referenced by inside().

35 { return inside(toGlobal(lp), tolerance); }
GlobalPoint toGlobal(const LocalPoint &lp) const
const double tolerance
virtual bool inside(const GlobalPoint &gp, double tolerance=0.) const =0

◆ inTesla()

::GlobalVector MagVolume::inTesla ( const ::GlobalPoint gp) const
inlineoverride

Definition at line 42 of file MagVolume.h.

References fieldInTesla(), and runTauDisplay::gp.

Referenced by SteppingHelixPropagator::getNextState(), SteppingHelixPropagator::loadState(), and SteppingHelixPropagator::makeAtomStep().

42 { return fieldInTesla(gp); }
LocalVector fieldInTesla(const LocalPoint &lp) const
Definition: MagVolume.cc:11

◆ isIron()

bool MagVolume::isIron ( ) const
inline

Temporary hack to pass information on material. Will eventually be replaced!

Definition at line 45 of file MagVolume.h.

References isIronFlag.

Referenced by SteppingHelixPropagator::isYokeVolume().

45 { return isIronFlag; }
bool isIronFlag
Definition: MagVolume.h:54

◆ ownsFieldProvider()

void MagVolume::ownsFieldProvider ( bool  o)
inline

◆ provider()

const MagneticFieldProvider<float>* MagVolume::provider ( ) const
inline

Definition at line 37 of file MagVolume.h.

References theProvider.

37 { return theProvider; }
const MagneticFieldProvider< float > * theProvider
Definition: MagVolume.h:50

◆ setIsIron()

void MagVolume::setIsIron ( bool  iron)
inline

Definition at line 46 of file MagVolume.h.

References isIronFlag.

46 { isIronFlag = iron; }
bool isIronFlag
Definition: MagVolume.h:54

Member Data Documentation

◆ isIronFlag

bool MagVolume::isIronFlag
private

Definition at line 54 of file MagVolume.h.

Referenced by isIron(), and setIsIron().

◆ theProvider

const MagneticFieldProvider<float>* MagVolume::theProvider
private

Definition at line 50 of file MagVolume.h.

Referenced by fieldInTesla(), provider(), and ~MagVolume().

◆ theProviderOwned

bool MagVolume::theProviderOwned
private

Definition at line 51 of file MagVolume.h.

Referenced by ownsFieldProvider(), and ~MagVolume().

◆ theScalingFactor

double MagVolume::theScalingFactor
private

Definition at line 52 of file MagVolume.h.

Referenced by fieldInTesla().