CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
defaultRKPropagator.h
Go to the documentation of this file.
1 #ifndef RKPropagatorDefault_H
2 #define RKPropagatorDefault_H
3 
4 
7 
8 
9 namespace defaultRKPropagator {
10 
12 
13  // not clear why we need all this
14  class TrivialFieldProvider final : public MagneticFieldProvider<float> {
15  public:
16 
17  TrivialFieldProvider (const MagneticField* field) : theField(field) {}
18 
19  LocalVectorType valueInTesla( const LocalPointType& lp) const override {
20  // NOTE: the following transformation only works for the central volume
21  // where global and local coordinates are numerically equal !
22  GlobalPoint gp(lp.basicVector());
24  }
25 
26  private:
28  };
29 
30  class RKMagVolume final : public MagVolume {
31  public:
32  RKMagVolume( const PositionType& pos, const RotationType& rot,
33  DDSolidShape shape, const MagneticFieldProvider<float> * mfp) :
34  MagVolume( pos, rot, shape, mfp) {}
35 
36  virtual bool inside( const GlobalPoint& gp, double tolerance=0.) const {return true;}
37 
39  virtual const std::vector<VolumeSide>& faces() const {return theFaces;}
40 
41  private:
42  std::vector<VolumeSide> theFaces;
43  };
44 
45  struct Product {
46  explicit Product(const MagneticField* field,PropagationDirection dir = alongMomentum, double tolerance = 5.e-5) :
47  mpf(field),
49  propagator(volume, dir, tolerance){}
53  };
54 
55 }
56 
57 #endif // RKPropagatorDefault
TkRotation< Scalar > RotationType
Definition: Definitions.h:29
GloballyPositioned< float >::GlobalPoint GlobalPoint
Definition: MagVolume.h:20
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
DDSolidShape
Definition: DDSolidShapes.h:6
PropagationDirection
Point3DBase< Scalar, GlobalTag > PositionType
Definition: Definitions.h:30
Vector3DBase< float, LocalTag > LocalVectorType
TrivialFieldProvider(const MagneticField *field)
virtual bool inside(const GlobalPoint &gp, double tolerance=0.) const
Product(const MagneticField *field, PropagationDirection dir=alongMomentum, double tolerance=5.e-5)
LocalVectorType valueInTesla(const LocalPointType &lp) const override
virtual const std::vector< VolumeSide > & faces() const
Access to volume faces - dummy implementation.
dbl *** dir
Definition: mlp_gen.cc:35
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
std::vector< VolumeSide > theFaces
RKMagVolume(const PositionType &pos, const RotationType &rot, DDSolidShape shape, const MagneticFieldProvider< float > *mfp)