CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
CartesianLorentzForce Class Reference

Derivative calculation for the 6D cartesian case. More...

#include <CartesianLorentzForce.h>

Inheritance diagram for CartesianLorentzForce:
RKDerivative< double, 6 >

Public Types

typedef RKDerivative< double, 6 > Base
 
typedef Base::Scalar Scalar
 
typedef Base::Vector Vector
 
- Public Types inherited from RKDerivative< double, 6 >
typedef double Scalar
 
typedef RKSmallVector< double, N > Vector
 

Public Member Functions

 CartesianLorentzForce (const RKLocalFieldProvider &field, double ch)
 
virtual Vector operator() (Scalar z, const Vector &state) const
 
- Public Member Functions inherited from RKDerivative< double, 6 >
virtual Vector operator() (Scalar startPar, const Vector &startState) const =0
 
virtual ~RKDerivative ()
 

Private Attributes

double theCharge
 
const RKLocalFieldProvidertheField
 

Detailed Description

Derivative calculation for the 6D cartesian case.

Definition at line 9 of file CartesianLorentzForce.h.

Member Typedef Documentation

Definition at line 12 of file CartesianLorentzForce.h.

Definition at line 13 of file CartesianLorentzForce.h.

Definition at line 14 of file CartesianLorentzForce.h.

Constructor & Destructor Documentation

CartesianLorentzForce::CartesianLorentzForce ( const RKLocalFieldProvider field,
double  ch 
)
inline

Definition at line 16 of file CartesianLorentzForce.h.

16  :
17  theField(field), theCharge(ch) {}
const RKLocalFieldProvider & theField

Member Function Documentation

CartesianLorentzForce::Vector CartesianLorentzForce::operator() ( Scalar  z,
const Vector state 
) const
virtual

Derivative d(pos)/ds is simply normalized momentum

Lorentz force in absence of electric field

Definition at line 6 of file CartesianLorentzForce.cc.

References Basic3DVector< T >::cross(), RKLocalFieldProvider::inTesla(), gen::k, CartesianStateAdaptor::momentum(), CartesianStateAdaptor::position(), CartesianStateAdaptor::rkstate(), theCharge, theField, and Basic3DVector< T >::unit().

7 {
8  // derivatives in case S is the free parameter
11  double k = 2.99792458e-3; // conversion to [cm]
12 
14  CartesianStateAdaptor::Vector3D dpos = start.momentum().unit();
15 
17  CartesianStateAdaptor::Vector3D dmom = k*theCharge * dpos.cross( bfield);
18 
19  return CartesianStateAdaptor::rkstate( dpos, dmom);
20 }
Basic3DVector unit() const
Basic3DVector cross(const Basic3DVector &lh) const
Vector product, or &quot;cross&quot; product, with a vector of same type.
static RKSmallVector< double, 6 > rkstate(const Vector3D &pos, const Vector3D &mom)
int k[5][pyjets_maxn]
char state
Definition: procUtils.cc:75
const RKLocalFieldProvider & theField
Vector inTesla(const LocalPoint &lp) const
the argument lp is in the local frame specified in the constructor

Member Data Documentation

double CartesianLorentzForce::theCharge
private

Definition at line 24 of file CartesianLorentzForce.h.

Referenced by operator()().

const RKLocalFieldProvider& CartesianLorentzForce::theField
private

Definition at line 23 of file CartesianLorentzForce.h.

Referenced by operator()().