BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkCircleRep.cxx
Go to the documentation of this file.
1// File and Version Information:
2// $Id: TrkCircleRep.cxx,v 1.3 2011/09/26 00:56:56 zhangy Exp $
3//
4// Description:
5// Implements circle track representation
6//
7// Author(s): Steve Schaffner
8//------------------------------------------------------------------------
9//#include "BaBar/BaBar.h"
11#include "TrkBase/TrkSimpTraj.h"
12#include "TrkBase/TrkRecoTrk.h"
14#include "MdcGeom/BesAngle.h"
15using std::endl;
16using std::ostream;
17
18// Construct from exchange paramters
20 TrkRecoTrk* trk,
21 PdtPid::PidType hypo,
22 const TrkHotList *inHots):
23 TrkSimpleRep(inHots, trk, hypo),
24 _traj(inPar)
25{
26 set2d(true);
27}
28
29// Construct from exchange paramters, no hits
31 PdtPid::PidType hypo, int nact, int nsv, int ndc, double chi2,
32 double stFndRng, double endFndRng) :
33 TrkSimpleRep(trk, hypo, nact, nsv, ndc, chi2, stFndRng, endFndRng),
34 _traj(inPar)
35{
36 set2d(true);
37}
38
39// copy ctor
41 PdtPid::PidType hypo) :
42 TrkSimpleRep(right, trk, hypo), _traj(right._traj)
43{
44 set2d(true);
45}
46
48{}
49
52{
53 TrkCircleRep* newRep = new TrkCircleRep(*this, theTrack, this->particleType());
54 newRep->setValid(fitValid());
55 newRep->setCurrent(fitCurrent());
56 return newRep;
57
58}
59
62{
63 TrkCircleRep* newRep = new TrkCircleRep(*this, parentTrack(), hypo);
64 newRep->setValid(fitValid());
65 newRep->setCurrent(fitCurrent()); // true for circles, anyway
66 return newRep;
67}
68
70TrkCircleRep::helix(double ) const
71{
72 TrkExchangePar localPar(_traj.d0(), BesAngle(_traj.phi0()).rad(),
73 _traj.omega(), 0.0, 0.0);
74 HepSymMatrix& theCov = localPar.covariance();
75 for (int i = 1; i < 4; i++) {
76 for (int j = 1; j < 4; j++) {
77 theCov(i,j) = _traj.parameters()->covariance()(i,j);
78 }
79 }
80 return localPar;
81}
82
83void
84TrkCircleRep::print(ostream& ostr) const
85{
86 ostr << "TrkCircleRep "
87 << " q: "<<charge()
88 << " phi0: " << BesAngle(_traj.phi0()).rad()
89 << " om: "<<_traj.omega()
90 << " pt: "<<pt()
91 << " p: "<<momentum()
92 << " d0: " << _traj.d0()
93 << " parent track:"<<parentTrack()->id()
94 << endl;
95
96}
97
98void
99TrkCircleRep::printAll(ostream& ostr) const
100{
101 print(ostr);
102}
103
106{
107 return _traj;
108}
109
110const TrkSimpTraj&
112{
113 return _traj;
114}
115
118{
119 return _traj;
120}
121const TrkDifTraj&
123{
124 return _traj;
125}
**********INTEGER nmxhep !maximum number of particles DOUBLE PRECISION vhep INTEGER jdahep COMMON hepevt $ !serial number $ !number of particles $ !status code $ !particle ident KF $ !parent particles $ !childreen particles $ !four momentum
double rad() const
Definition: BesAngle.h:118
PidType
Definition: PdtPid.h:11
virtual void print(std::ostream &ostr) const
virtual void printAll(std::ostream &ostr) const
virtual TrkCircleRep * clone(TrkRecoTrk *newTrack) const
virtual TrkDifTraj & traj()
virtual ~TrkCircleRep()
virtual TrkCircleRep * cloneNewHypo(PdtPid::PidType hypo)
virtual TrkSimpTraj & simpTraj()
virtual TrkExchangePar helix(double fltLen) const
TrkCircleRep(const TrkExchangePar &inPar, TrkRecoTrk *myTrack, PdtPid::PidType hypo, const TrkHotList *=0)
double d0() const
Definition: TrkCircleTraj.h:88
double phi0() const
double omega() const
Definition: TrkCircleTraj.h:90
const HepSymMatrix & covariance() const
void setValid(bool v)
bool fitValid() const
Definition: TrkFitStatus.h:34
bool fitCurrent() const
Definition: TrkFitStatus.h:33
void set2d(bool d)
Definition: TrkFitStatus.h:40
void setCurrent(bool c)
Definition: TrkFitStatus.h:39
HepSymMatrix & covariance()
Definition: TrkParams.h:54
const TrkId & id() const
Definition: TrkRecoTrk.cxx:134
TrkRecoTrk * parentTrack()
Definition: TrkRep.h:82
virtual PdtPid::PidType particleType() const
Definition: TrkRep.cxx:308
TrkParams * parameters()
Definition: TrkSimpTraj.h:80
virtual double pt(double fltL=0.) const
virtual int charge() const