ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
GeoXPEngine Class Reference

#include <GeoXPEngine.h>

Collaboration diagram for GeoXPEngine:

Public Member Functions

 GeoXPEngine (const Genfun::AbsFunction &Bx, const Genfun::AbsFunction &By, const Genfun::AbsFunction &Bz, const HepGeom::Point3D< double > &x0, const CLHEP::HepLorentzVector &p0, double q)
 
 ~GeoXPEngine ()
 
const Genfun::AbsFunction & x () const
 
const Genfun::AbsFunction & y () const
 
const Genfun::AbsFunction & z () const
 
const Genfun::AbsFunction & px () const
 
const Genfun::AbsFunction & py () const
 
const Genfun::AbsFunction & pz () const
 

Private Attributes

const Genfun::AbsFunction * m_x
 
const Genfun::AbsFunction * m_y
 
const Genfun::AbsFunction * m_z
 
const Genfun::AbsFunction * m_px
 
const Genfun::AbsFunction * m_py
 
const Genfun::AbsFunction * m_pz
 

Detailed Description

Definition at line 22 of file GeoXPEngine.h.

Constructor & Destructor Documentation

◆ GeoXPEngine()

GeoXPEngine::GeoXPEngine ( const Genfun::AbsFunction &  Bx,
const Genfun::AbsFunction &  By,
const Genfun::AbsFunction &  Bz,
const HepGeom::Point3D< double > &  x0,
const CLHEP::HepLorentzVector &  p0,
double  q 
)

Definition at line 14 of file GeoXPEngine.cxx.

20 {
21 
22 
23  // Peform a Runge-Kutte Integration of the trajectory of the charged
24  // particle in a magnetic field. Physics input is the Lorentz force
25  // law; note, relativistic expression applies.
26 
27  double m = p0.m();
28  double E = p0.e();
29  Genfun::Variable t;
30 
31 
32  if (m<100*CLHEP::keV) {
33  m_x= (Genfun::FixedConstant(x0.x()) + (CLHEP::c_light*p0.x()/p0.vect().mag())*t).clone();
34  m_y= (Genfun::FixedConstant(x0.y()) + (CLHEP::c_light*p0.y()/p0.vect().mag())*t).clone();
35  m_z= (Genfun::FixedConstant(x0.z()) + (CLHEP::c_light*p0.z()/p0.vect().mag())*t).clone();
36  m_px = Genfun::FixedConstant(p0.x()).clone();
37  m_py = Genfun::FixedConstant(p0.y()).clone();
38  m_pz = Genfun::FixedConstant(p0.z()).clone();
39 
40 
41  }
42  else {
43 
44  Genfun::RKIntegrator rkIntegrator;
45  Genfun::Variable Px(0,6),Py(1,6), Pz(2,6), X(3,6), Y(4,6), Z(5,6);
46  Genfun::FixedConstant I(1.0);
47 
48  const double inv_E = 1. / E;
49  Genfun::GENFUNCTION DPxDt = (q*inv_E)*(Py*(I%I%I%Bz) -Pz*(I%I%I%By))*CLHEP::c_light;
50  Genfun::GENFUNCTION DPyDt = (q*inv_E)*(Pz*(I%I%I%Bx) -Px*(I%I%I%Bz))*CLHEP::c_light;
51  Genfun::GENFUNCTION DPzDt = (q*inv_E)*(Px*(I%I%I%By) -Py*(I%I%I%Bx))*CLHEP::c_light;
52  Genfun::GENFUNCTION DxDt = Px*inv_E;
53  Genfun::GENFUNCTION DyDt = Py*inv_E;
54  Genfun::GENFUNCTION DzDt = Pz*inv_E;
55 
56  rkIntegrator.addDiffEquation(&DPxDt, "Px",p0.x(), p0.x(), p0.x());
57  rkIntegrator.addDiffEquation(&DPyDt, "Py",p0.y(), p0.y(), p0.y());
58  rkIntegrator.addDiffEquation(&DPzDt, "Pz",p0.z(), p0.z(), p0.z());
59  rkIntegrator.addDiffEquation(&DxDt, "x", x0.x(), x0.x(), x0.x());
60  rkIntegrator.addDiffEquation(&DyDt, "y", x0.y(), x0.y(), x0.y());
61  rkIntegrator.addDiffEquation(&DzDt, "z", x0.z(), x0.z(), x0.z());
62 
63 
64 
65  m_px = (*rkIntegrator.getFunction(0))(CLHEP::c_light*t).clone();
66  m_py = (*rkIntegrator.getFunction(1))(CLHEP::c_light*t).clone();
67  m_pz = (*rkIntegrator.getFunction(2))(CLHEP::c_light*t).clone();
68  m_x = (*rkIntegrator.getFunction(3))(CLHEP::c_light*t).clone();
69  m_y = (*rkIntegrator.getFunction(4))(CLHEP::c_light*t).clone();
70  m_z = (*rkIntegrator.getFunction(5))(CLHEP::c_light*t).clone();
71  }
72 }

◆ ~GeoXPEngine()

GeoXPEngine::~GeoXPEngine ( )

Definition at line 74 of file GeoXPEngine.cxx.

74  {
75  delete m_x;
76  delete m_y;
77  delete m_z;
78  delete m_px;
79  delete m_py;
80  delete m_pz;
81 }

Member Function Documentation

◆ px()

const Genfun::AbsFunction & GeoXPEngine::px ( ) const

Definition at line 92 of file GeoXPEngine.cxx.

92  {
93  return *m_px;
94 }

◆ py()

const Genfun::AbsFunction & GeoXPEngine::py ( ) const

Definition at line 95 of file GeoXPEngine.cxx.

95  {
96  return *m_py;
97 }

◆ pz()

const Genfun::AbsFunction & GeoXPEngine::pz ( ) const

Definition at line 98 of file GeoXPEngine.cxx.

98  {
99  return *m_pz;
100 }

◆ x()

const Genfun::AbsFunction & GeoXPEngine::x ( ) const

Definition at line 83 of file GeoXPEngine.cxx.

83  {
84  return *m_x;
85 }

◆ y()

const Genfun::AbsFunction & GeoXPEngine::y ( ) const

Definition at line 86 of file GeoXPEngine.cxx.

86  {
87  return *m_y;
88 }

◆ z()

const Genfun::AbsFunction & GeoXPEngine::z ( ) const

Definition at line 89 of file GeoXPEngine.cxx.

89  {
90  return *m_z;
91 }

Member Data Documentation

◆ m_px

const Genfun::AbsFunction* GeoXPEngine::m_px
private

Definition at line 58 of file GeoXPEngine.h.

◆ m_py

const Genfun::AbsFunction* GeoXPEngine::m_py
private

Definition at line 59 of file GeoXPEngine.h.

◆ m_pz

const Genfun::AbsFunction* GeoXPEngine::m_pz
private

Definition at line 60 of file GeoXPEngine.h.

◆ m_x

const Genfun::AbsFunction* GeoXPEngine::m_x
private

Definition at line 55 of file GeoXPEngine.h.

◆ m_y

const Genfun::AbsFunction* GeoXPEngine::m_y
private

Definition at line 56 of file GeoXPEngine.h.

◆ m_z

const Genfun::AbsFunction* GeoXPEngine::m_z
private

Definition at line 57 of file GeoXPEngine.h.


The documentation for this class was generated from the following files:
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
GeoXPEngine::m_pz
const Genfun::AbsFunction * m_pz
Definition: GeoXPEngine.h:60
GeoXPEngine::m_y
const Genfun::AbsFunction * m_y
Definition: GeoXPEngine.h:56
Monitored::Z
@ Z
Definition: HistogramFillerUtils.h:24
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Monitored::X
@ X
Definition: HistogramFillerUtils.h:24
python.SystemOfUnits.keV
int keV
Definition: SystemOfUnits.py:156
MuonR4::SegmentFit::ParamDefs::x0
@ x0
Monitored::Y
@ Y
Definition: HistogramFillerUtils.h:24
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
python.PhysicalConstants.c_light
float c_light
Definition: PhysicalConstants.py:63
GeoXPEngine::m_px
const Genfun::AbsFunction * m_px
Definition: GeoXPEngine.h:58
GeoXPEngine::m_x
const Genfun::AbsFunction * m_x
Definition: GeoXPEngine.h:55
GeoXPEngine::m_py
const Genfun::AbsFunction * m_py
Definition: GeoXPEngine.h:59
extractSporadic.q
list q
Definition: extractSporadic.py:98
GeoXPEngine::m_z
const Genfun::AbsFunction * m_z
Definition: GeoXPEngine.h:57
I
#define I(x, y, z)
Definition: MD5.cxx:116
TRTCalib_cfilter.p0
p0
Definition: TRTCalib_cfilter.py:129