CMS 3D CMS Logo

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