CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CartesianLorentzForce.h
Go to the documentation of this file.
1 #ifndef CartesianLorentzForce_H
2 #define CartesianLorentzForce_H
3 
5 #include "RKDerivative.h"
6 #include "RKLocalFieldProvider.h"
7 
9 
10 class dso_internal CartesianLorentzForce final : public RKDerivative<double,6> {
11 public:
12 
16 
17  CartesianLorentzForce( const RKLocalFieldProvider& field, double ch) :
18  theField(field), theCharge(ch) {}
19 
20  virtual Vector operator()( Scalar z, const Vector& state) const;
21 
22 private:
23 
25  double theCharge;
26 
27 };
28 
29 
30 #include "CartesianStateAdaptor.h"
31 inline
34 {
35  // derivatives in case S is the free parameter
38  double k = 2.99792458e-3; // conversion to [cm]
39 
42 
44  CartesianStateAdaptor::Vector3D dmom = (k*theCharge) * dpos.cross( bfield);
45 
46  return CartesianStateAdaptor::rkstate( dpos, dmom);
47 }
48 
49 #endif
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
CartesianLorentzForce(const RKLocalFieldProvider &field, double ch)
double Scalar
Definition: Definitions.h:27
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
Basic3DVector unit() const
Basic3DVector cross(const Basic3DVector &lh) const
Vector product, or &quot;cross&quot; product, with a vector of same type.
float float float z
RKDerivative< double, 6 > Base
Derivative calculation for the 6D cartesian case.
static RKSmallVector< double, 6 > rkstate(const Vector3D &pos, const Vector3D &mom)
const Vector3D & momentum() const
Base class for derivative calculation.
Definition: RKDerivative.h:13
virtual Vector operator()(Scalar startPar, const Vector &startState) const =0
#define dso_internal
virtual Vector operator()(Scalar z, const Vector &state) const
RKSmallVector< double, N > Vector
Definition: RKDerivative.h:17
const Vector3D & position() const
const RKLocalFieldProvider & theField
Vector inTesla(const LocalPoint &lp) const
the argument lp is in the local frame specified in the constructor