#include <MdcTrackUtil.h>
Definition at line 8 of file MdcTrackUtil.h.
◆ MdcTrackUtil()
MdcTrackUtil::MdcTrackUtil |
( |
| ) |
|
Definition at line 39 of file MdcTrackUtil.cxx.
39 {
40
41 IService* svc;
42 Gaudi::svcLocator()->getService("MagneticFieldSvc",svc);
44 if(! m_pIMF){
45 std::cout<<" ERROR Unable to open Magnetic field service "<<std::endl;
46 }
47
48 double gaussToTesla = 1000.;
50
51
52 Gaudi::svcLocator()->getService("MdcGeomSvc",svc);
54 if(! m_mdcGeomSvc){
55 std::cout<<" FATAL Could not load MdcGeomSvc! "<<std::endl;
56 }
57}
virtual double getReferField()=0
Referenced by instance().
◆ ~MdcTrackUtil()
MdcTrackUtil::~MdcTrackUtil |
( |
| ) |
|
|
inline |
◆ instance()
Definition at line 31 of file MdcTrackUtil.cxx.
31 {
32 if( 0 == _myself ) {
34 }
35 return _myself;
36}
◆ nLayerTrackPassed() [1/2]
int MdcTrackUtil::nLayerTrackPassed |
( |
const double |
helix[5] | ) |
|
Definition at line 68 of file MdcTrackUtil.cxx.
68 {
69 int nLayer = 0;
70
71 for(unsigned iLayer=0; iLayer<43; iLayer++){
72
73
74 double rMidLayer = m_mdcGeomSvc->
Layer(iLayer)->
Radius();
75 double flightLength = rMidLayer;
76
78 double dz = helix[3];
79 double c = CLHEP::c_light * 100.;
80 double alpha = 1/(c * Bz);
81 double kappa = helix[2];
82 double rc = (-1.)*
alpha/kappa;
83
84 double tanl = helix[4];
85 double phi0 = helix[1];
86 double phi = flightLength/rc + phi0;
87 double z = pivot.z() + dz - (
alpha/kappa) * tanl * phi;
88
89 double layerHalfLength = m_mdcGeomSvc->
Layer(iLayer)->
Length()/2.;
90
91
92
93 if (fabs(z) < fabs(layerHalfLength)) ++nLayer;
94 }
95
96 return nLayer;
97}
double Radius(void) const
double Length(void) const
const MdcGeoLayer *const Layer(unsigned id)
◆ nLayerTrackPassed() [2/2]
int MdcTrackUtil::nLayerTrackPassed |
( |
const HepVector |
helix | ) |
|
Definition at line 60 of file MdcTrackUtil.cxx.
60 {
61 double helixParam[5];
62 for(int i=0; i<5; ++i) helixParam[i] = helix[i];
63
65}
int nLayerTrackPassed(const HepVector helix)
Referenced by nLayerTrackPassed().
◆ patRecErr2BesErr()
HepSymMatrix MdcTrackUtil::patRecErr2BesErr |
( |
const HepSymMatrix & |
err | ) |
|
Definition at line 117 of file MdcTrackUtil.cxx.
117 {
118
119
120
121
122 HepSymMatrix mS(err.num_row(),0);
123 mS[0][0]=-1.;
124 mS[1][1]=1.;
125 mS[2][2]=Bz/-333.567;
126 mS[3][3]=1.;
127 mS[4][4]=1.;
128 HepSymMatrix mVy= err.similarity(mS);
129
130 return mVy;
131}
◆ patRecPar2BesPar()
HepVector MdcTrackUtil::patRecPar2BesPar |
( |
const HepVector & |
helixPar | ) |
|
Definition at line 100 of file MdcTrackUtil.cxx.
100 {
101 HepVector helix(5,0);
102 double d0 = -helixPar[0];
103 double phi0 = helixPar[1]+ CLHEP::halfpi;
104 double omega = Bz*helixPar[2]/-333.567;
105 double z0 = helixPar[3];
106 double tanl = helixPar[4];
107 helix[0] = d0;
108 helix[1] = phi0;
109 helix[2] = omega;
110 helix[3] = z0;
111 helix[4] = tanl;
112
113 return helix;
114}
The documentation for this class was generated from the following files: