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 GCC11_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
33 CartesianLorentzForce::operator()( Scalar z, const Vector& state) const
34 {
35  // derivatives in case S is the free parameter
37  RKLocalFieldProvider::Vector bfield = theField.inTesla( RKLocalFieldProvider::LocalPoint(start.position()));
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
const RKLocalFieldProvider & theField
double Scalar
Definition: Definitions.h:27
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
Base::Vector Vector
Basic3DVector unit() const
Basic3DVector cross(const Basic3DVector &lh) const
Vector product, or &quot;cross&quot; product, with a vector of same type.
RKDerivative< double, 6 > Base
Base::Scalar Scalar
float float float z
static RKSmallVector< double, 6 > rkstate(const Vector3D &pos, const Vector3D &mom)
const Vector3D & momentum() const
#define dso_internal
Definition: Visibility.h:13
Base class for derivative calculation.
Definition: RKDerivative.h:13
int k[5][pyjets_maxn]
virtual Vector operator()(Scalar startPar, const Vector &startState) const =0
CartesianLorentzForce(const RKLocalFieldProvider &field, double ch)
char state
Definition: procUtils.cc:75
const Vector3D & position() const
Unlimited (trivial) bounds.