BOSS 8.0.0
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"
10#include "TrkFitter/TrkCircleRep.h"
11#include "MdcGeom/BesAngle.h"
12#include "TrkBase/TrkExchangePar.h"
13#include "TrkBase/TrkRecoTrk.h"
14#include "TrkBase/TrkSimpTraj.h"
15using std::endl;
16using std::ostream;
17
18// Construct from exchange paramters
20 const TrkHotList* inHots )
21 : TrkSimpleRep( inHots, trk, hypo ), _traj( inPar ) {
22 set2d( true );
23}
24
25// Construct from exchange paramters, no hits
27 int nact, int nsv, int ndc, double chi2, double stFndRng,
28 double endFndRng )
29 : TrkSimpleRep( trk, hypo, nact, nsv, ndc, chi2, stFndRng, endFndRng ), _traj( inPar ) {
30 set2d( true );
31}
32
33// copy ctor
35 : TrkSimpleRep( right, trk, hypo ), _traj( right._traj ) {
36 set2d( true );
37}
38
40
42 TrkCircleRep* newRep = new TrkCircleRep( *this, theTrack, this->particleType() );
43 newRep->setValid( fitValid() );
44 newRep->setCurrent( fitCurrent() );
45 return newRep;
46}
47
49 TrkCircleRep* newRep = new TrkCircleRep( *this, parentTrack(), hypo );
50 newRep->setValid( fitValid() );
51 newRep->setCurrent( fitCurrent() ); // true for circles, anyway
52 return newRep;
53}
54
56 TrkExchangePar localPar( _traj.d0(), BesAngle( _traj.phi0() ).rad(), _traj.omega(), 0.0,
57 0.0 );
58 HepSymMatrix& theCov = localPar.covariance();
59 for ( int i = 1; i < 4; i++ )
60 {
61 for ( int j = 1; j < 4; j++ )
62 { theCov( i, j ) = _traj.parameters()->covariance()( i, j ); }
63 }
64 return localPar;
65}
66
67void TrkCircleRep::print( ostream& ostr ) const {
68 ostr << "TrkCircleRep "
69 << " q: " << charge() << " phi0: " << BesAngle( _traj.phi0() ).rad()
70 << " om: " << _traj.omega() << " pt: " << pt() << " p: " << momentum()
71 << " d0: " << _traj.d0() << " parent track:" << parentTrack()->id() << endl;
72}
73
74void TrkCircleRep::printAll( ostream& ostr ) const { print( ostr ); }
75
77
78const TrkSimpTraj& TrkCircleRep::simpTraj() const { return _traj; }
79
80TrkDifTraj& TrkCircleRep::traj() { return _traj; }
81const TrkDifTraj& TrkCircleRep::traj() const { return _traj; }
**********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
virtual void printAll(std::ostream &ostr) const
virtual TrkCircleRep * clone(TrkRecoTrk *newTrack) const
virtual void print(std::ostream &ostr) 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 phi0() const
void setValid(bool v)
const TrkId & id() const
virtual PdtPid::PidType particleType() const
Definition TrkRep.cxx:249
virtual double pt(double fltL=0.) const
virtual int charge() const
TrkSimpleRep(const TrkHotList *, TrkRecoTrk *, PdtPid::PidType)