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
 
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 ()
 

Detailed Description

Definition at line 13 of file MagVolume.h.

Member Typedef Documentation

Definition at line 16 of file MagVolume.h.

Definition at line 19 of file MagVolume.h.

Definition at line 20 of file MagVolume.h.

Definition at line 17 of file MagVolume.h.

Definition at line 18 of file MagVolume.h.

Constructor & Destructor Documentation

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

Definition at line 22 of file MagVolume.h.

References fieldInTesla(), runTauDisplay::gp, inside(), tolerance, and ~MagVolume().

24  :
26  theProviderOwned(false), theScalingFactor(sf), isIronFlag(false) {}
bool theProviderOwned
Definition: MagVolume.h:55
double theScalingFactor
Definition: MagVolume.h:56
bool isIronFlag
Definition: MagVolume.h:58
GloballyPositioned< float > Base
Definition: MagVolume.h:16
const MagneticFieldProvider< float > * theProvider
Definition: MagVolume.h:54
MagVolume::~MagVolume ( )
override

Definition at line 6 of file MagVolume.cc.

References theProvider, and theProviderOwned.

Referenced by MagVolume().

6  {
7  if (theProviderOwned) delete theProvider;
8 }
bool theProviderOwned
Definition: MagVolume.h:55
const MagneticFieldProvider< float > * theProvider
Definition: MagVolume.h:54

Member Function Documentation

virtual const std::vector<VolumeSide>& MagVolume::faces ( ) const
pure virtual
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 MagGeometry::fieldInTesla(), RKLocalFieldProvider::inTesla(), inTesla(), SteppingHelixPropagator::loadState(), and MagVolume().

12 {
14 }
virtual LocalVectorType valueInTesla(const LocalPointType &p) const =0
double theScalingFactor
Definition: MagVolume.h:56
const MagneticFieldProvider< float > * theProvider
Definition: MagVolume.h:54
MagVolume::GlobalVector MagVolume::fieldInTesla ( const GlobalPoint lp) const

Definition at line 16 of file MagVolume.cc.

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

17 {
19 }
virtual LocalVectorType valueInTesla(const LocalPointType &p) const =0
double theScalingFactor
Definition: MagVolume.h:56
LocalPoint toLocal(const GlobalPoint &gp) const
GlobalPoint toGlobal(const LocalPoint &lp) const
const MagneticFieldProvider< float > * theProvider
Definition: MagVolume.h:54
virtual bool MagVolume::inside ( const GlobalPoint gp,
double  tolerance = 0. 
) const
pure virtual
virtual bool MagVolume::inside ( const LocalPoint lp,
double  tolerance = 0. 
) const
inlinevirtual

Reimplemented in MagCylinder.

Definition at line 34 of file MagVolume.h.

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

34  {
35  return inside( toGlobal(lp), tolerance);
36  }
const double tolerance
virtual bool inside(const GlobalPoint &gp, double tolerance=0.) const =0
GlobalPoint toGlobal(const LocalPoint &lp) const
::GlobalVector MagVolume::inTesla ( const ::GlobalPoint gp) const
inlineoverride

Definition at line 43 of file MagVolume.h.

References fieldInTesla().

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

43  {
44  return fieldInTesla( gp);
45  }
LocalVector fieldInTesla(const LocalPoint &lp) const
Definition: MagVolume.cc:11
bool MagVolume::isIron ( ) const
inline

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

Definition at line 48 of file MagVolume.h.

References isIronFlag.

Referenced by SteppingHelixPropagator::isYokeVolume().

48 {return isIronFlag;}
bool isIronFlag
Definition: MagVolume.h:58
void MagVolume::ownsFieldProvider ( bool  o)
inline
const MagneticFieldProvider<float>* MagVolume::provider ( ) const
inline

Definition at line 38 of file MagVolume.h.

References faces(), and theProvider.

38 {return theProvider;}
const MagneticFieldProvider< float > * theProvider
Definition: MagVolume.h:54
void MagVolume::setIsIron ( bool  iron)
inline

Definition at line 49 of file MagVolume.h.

References isIronFlag.

49 {isIronFlag = iron;}
bool isIronFlag
Definition: MagVolume.h:58

Member Data Documentation

bool MagVolume::isIronFlag
private

Definition at line 58 of file MagVolume.h.

Referenced by isIron(), and setIsIron().

const MagneticFieldProvider<float>* MagVolume::theProvider
private

Definition at line 54 of file MagVolume.h.

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

bool MagVolume::theProviderOwned
private

Definition at line 55 of file MagVolume.h.

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

double MagVolume::theScalingFactor
private

Definition at line 56 of file MagVolume.h.

Referenced by fieldInTesla().