25#include "GaudiKernel/MsgStream.h"
26#include "GaudiKernel/AlgFactory.h"
27#include "GaudiKernel/ISvcLocator.h"
28#include "GaudiKernel/SmartDataPtr.h"
29#include "GaudiKernel/IDataProviderSvc.h"
30#include "GaudiKernel/PropertyMgr.h"
31#include "EventModel/Event.h"
32#include "MdcRawEvent/MdcDigi.h"
33#include "EmcRawEvent/EmcDigi.h"
34#include "McTruth/McParticle.h"
36#include "MdcGeomSvc/IMdcGeomSvc.h"
37#include "MdcGeomSvc/MdcGeoWire.h"
38#include "MdcGeomSvc/MdcGeoLayer.h"
44#include "EsTimeAlg/Emc_helix.h"
45#include "CLHEP/Vector/ThreeVector.h"
46#include "MdcFastTrkAlg/FTFinder.h"
48#include "CLHEP/Geometry/Point3D.h"
50#ifndef ENABLE_BACKWARDS_COMPATIBILITY
54using CLHEP::HepVector;
55using CLHEP::Hep3Vector;
75 double aa,ca,cb,cc,detm;
79 int Id_cdfztrk = id;
R_emc = rEmc;
82 if (_debug) std::cout <<
" Emc_helix *** wrong id_cdfztrk ="
83 << Id_cdfztrk << std::endl;
115 if (
abs(a[3])>50.0 ||
abs(a[4])>500.0)
return (-5);
118 Helix helix1(pivot1,a);
120 Phi0 = helix1.
a()[1];
123 Tanl = helix1.
a()[4];
141 if( xc==0.0 && yc==0.0 )
return(-3);
151 detm = cb*cb - ca*cc;
153 yy[0] = ( cb + sqrt(detm) )/ ca;
154 xx[0] = ( aa - yy[0]*yc )/xc;
155 yy[1] = ( cb - sqrt(detm) )/ ca;
156 xx[1] = ( aa - yy[1]*yc )/xc;
163 detm = cb*cb - ca*cc;
165 xx[0] = ( cb + sqrt(detm) )/ca;
166 yy[0] = ( aa - xx[0]*xc )/yc;
167 xx[1] = ( cb - sqrt(detm) )/ca;
168 yy[1] = ( aa - xx[1]*xc )/yc;
175 if( xx[0]*nx + yy[0]*ny > 0.0 ) { emcx = xx[0]; emcy = yy[0]; }
176 else { emcx = xx[1]; emcy = yy[1]; }
178 double fi = atan2(emcy ,emcx );
180 if( fi < 0.0 ) fi=pi2+fi;
185 helix1.
pivot(pivot2);
192 Hep3Vector intersec(emcx, emcy,
Z_emc);
HepGeom::Point3D< double > HepPoint3D
double abs(const EvtComplex &c)
int Emc_Get(double, int, double[])
const HepPoint3D & center(void) const
returns position of helix center(z = 0.);
double radius(void) const
returns radious of helix.
const HepVector & a(void) const
returns helix parameters.
const HepPoint3D & pivot(void) const
returns pivot position.
Hep3Vector direction(double dPhi=0.) const
returns direction vector after rotating angle dPhi in phi direction.