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 
11  using RKPropagator = RKPropagatorInS;
12 
13  // not clear why we need all this
14  class TrivialFieldProvider GCC11_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());
23  return LocalVectorType(theField->inTesla(gp).basicVector());
24  }
25 
26  private:
28  };
29 
30  class RKMagVolume GCC11_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){}
50  TrivialFieldProvider mpf;
51  RKMagVolume volume;
53  };
54 
55 }
56 
57 #endif // RKPropagatorDefault
TkRotation< Scalar > RotationType
Definition: Definitions.h:29
LocalVectorType valueInTesla(const LocalPointType &lp) const override
GloballyPositioned< float >::GlobalPoint GlobalPoint
Definition: MagVolume.h:20
DDSolidShape
Definition: DDSolidShapes.h:6
PropagationDirection
tuple field
Definition: statics.py:62
Point3DBase< Scalar, GlobalTag > PositionType
Definition: Definitions.h:30
std::vector< VolumeSide > theFaces
TrivialFieldProvider(const MagneticField *field)
RKPropagatorInS RKPropagator
virtual const std::vector< VolumeSide > & faces() const
Access to volume faces - dummy implementation.
virtual bool inside(const GlobalPoint &gp, double tolerance=0.) const
Product(const MagneticField *field, PropagationDirection dir=alongMomentum, double tolerance=5.e-5)
dbl *** dir
Definition: mlp_gen.cc:35
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
RKMagVolume(const PositionType &pos, const RotationType &rot, DDSolidShape shape, const MagneticFieldProvider< float > *mfp)