CMS 3D CMS Logo

MagVolume.h
Go to the documentation of this file.
1 #ifndef MagVolume_H
2 #define MagVolume_H
3 
7 
8 #include <vector>
9 
10 template <class T>
12 
13 class MagVolume : public GloballyPositioned<float>, public MagneticField {
14 public:
20 
21  MagVolume(const PositionType& pos, const RotationType& rot, const MagneticFieldProvider<float>* mfp, double sf = 1.)
22  : Base(pos, rot),
23  MagneticField(),
24  theProvider(mfp),
26  theScalingFactor(sf),
27  isIronFlag(false) {}
28 
29  ~MagVolume() override;
30 
31  LocalVector fieldInTesla(const LocalPoint& lp) const;
32  GlobalVector fieldInTesla(const GlobalPoint& lp) const;
33 
34  virtual bool inside(const GlobalPoint& gp, double tolerance = 0.) const = 0;
35  virtual bool inside(const LocalPoint& lp, double tolerance = 0.) const { return inside(toGlobal(lp), tolerance); }
36 
38 
40  virtual const std::vector<VolumeSide>& faces() const = 0;
41 
43 
45  bool isIron() const { return isIronFlag; }
46  void setIsIron(bool iron) { isIronFlag = iron; }
48 
49 private:
53  // Temporary hack to keep information on material. Will eventually be replaced!
54  bool isIronFlag;
55 };
56 
57 #endif
Vector3DBase< float, LocalTag >
GloballyPositioned
Definition: GloballyPositioned.h:18
MagVolume::isIronFlag
bool isIronFlag
Definition: MagVolume.h:54
TkRotation< float >
MagVolume::inTesla
::GlobalVector inTesla(const ::GlobalPoint &gp) const override
Definition: MagVolume.h:42
funct::false
false
Definition: Factorize.h:29
MagVolume::ownsFieldProvider
void ownsFieldProvider(bool o)
Definition: MagVolume.h:47
MagVolume::~MagVolume
~MagVolume() override
Definition: MagVolume.cc:6
pos
Definition: PixelAliasList.h:18
MagneticFieldProvider
Definition: MagCylinder.h:14
MagVolume::theProviderOwned
bool theProviderOwned
Definition: MagVolume.h:51
MagVolume::theScalingFactor
double theScalingFactor
Definition: MagVolume.h:52
MagVolume::GlobalPoint
GloballyPositioned< float >::GlobalPoint GlobalPoint
Definition: MagVolume.h:18
MagVolume::theProvider
const MagneticFieldProvider< float > * theProvider
Definition: MagVolume.h:50
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
VolumeSide.h
GloballyPositioned.h
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
MagVolume::inside
virtual bool inside(const GlobalPoint &gp, double tolerance=0.) const =0
MagVolume::Base
GloballyPositioned< float > Base
Definition: MagVolume.h:15
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
MagVolume
Definition: MagVolume.h:13
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:26
MagneticField.h
MagVolume::setIsIron
void setIsIron(bool iron)
Definition: MagVolume.h:46
MagVolume::faces
virtual const std::vector< VolumeSide > & faces() const =0
Access to volume faces.
MagVolume::LocalPoint
GloballyPositioned< float >::LocalPoint LocalPoint
Definition: MagVolume.h:16
MagVolume::isIron
bool isIron() const
Temporary hack to pass information on material. Will eventually be replaced!
Definition: MagVolume.h:45
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
MagVolume::provider
const MagneticFieldProvider< float > * provider() const
Definition: MagVolume.h:37
MagVolume::fieldInTesla
LocalVector fieldInTesla(const LocalPoint &lp) const
Definition: MagVolume.cc:11
MagVolume::LocalVector
GloballyPositioned< float >::LocalVector LocalVector
Definition: MagVolume.h:17
MagneticField
Definition: MagneticField.h:19
MagVolume::inside
virtual bool inside(const LocalPoint &lp, double tolerance=0.) const
Definition: MagVolume.h:35
GloballyPositioned< float >::toGlobal
GlobalPoint toGlobal(const LocalPoint &lp) const
Definition: GloballyPositioned.h:66
MagVolume::GlobalVector
GloballyPositioned< float >::GlobalVector GlobalVector
Definition: MagVolume.h:19
MagVolume::MagVolume
MagVolume(const PositionType &pos, const RotationType &rot, const MagneticFieldProvider< float > *mfp, double sf=1.)
Definition: MagVolume.h:21