BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
TCircle.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TCircle.h,v 1.13 2012/05/28 05:16:29 maoh Exp $
3//-----------------------------------------------------------------------------
4// Filename : TCircle.h
5// Section : Tracking
6// Owner : Yoshi Iwasaki
7// Email : [email protected]
8//-----------------------------------------------------------------------------
9// Description : A class to represent a circle in tracking.
10// See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
11//-----------------------------------------------------------------------------
12
13#ifndef TCircle_FLAG_
14#define TCircle_FLAG_
15
16#ifdef TRKRECO_DEBUG_DETAIL
17#ifndef TRKRECO_DEBUG
18#define TRKRECO_DEBUG
19#endif
20#endif
21
22#include <string>
23
24#define HEP_SHORT_NAMES
25
26#ifndef CLHEP_POINT3D_H
27#include "CLHEP/Geometry/Point3D.h"
28#endif
29#ifndef ENABLE_BACKWARDS_COMPATIBILITY
31#endif
33
34#include "TrkReco/TMDCUtil.h"
35#include "TrkReco/TTrackBase.h"
37//#include "lpav/Lpav.h"
38//#include "TrkReco/Lpav.h"
39#include "TrackUtil/Lpav.h"
40
41/// A class to represent a circle in tracking.
42class TCircle : public TTrackBase {
43
44 public:
45 /// Constructor.
47
48 /// Destructor
49 virtual ~TCircle();
50
51 public:// Selectors
52 /// returns type.
53 virtual unsigned objectType(void) const;
54
55 /// dumps debug information.
56 void dump(const std::string & message = std::string(""),
57 const std::string & prefix = std::string("")) const;
58
59 /// returns position of center.
60 const HepPoint3D & center(void) const;
61
62 /// returns radius.
63 double radius(void) const;
64
65 /// returns Pt.
66 double pt(void) const;
67
68 /// returns impact parameter to the origin.
69 double impact(void) const;
70
71 /// returns charge.
72 double charge(void) const;
73
74 /// returns weight of TMLink in order to fit and make a circle.
75 double weight(const TMLink & l) const;
76
77 public:// Modifiers
78 /// fits itself. Error was happened if return value is not zero.
79 // int fitx(void);
80
81 /// fits itself only for curl finder. Error was happened if return value is not zero.
82 int fitForCurl(int ipConst = 0);
83
84 /// sets circle properties.
85 void property(double charge, double radius, HepPoint3D center);
86
87 private:// Updated when fitted
88 Lpav _circle;
89 double _charge;
90 double _radius;
91 HepPoint3D _center;
92 static const TCircleFitter _fitter;
93};
94
95//-----------------------------------------------------------------------------
96
97#ifdef TCircle_NO_INLINE
98#define inline
99#else
100#undef inline
101#define TCircle_INLINE_DEFINE_HERE
102#endif
103
104#ifdef TCircle_INLINE_DEFINE_HERE
105
106inline
107const HepPoint3D &
108TCircle::center(void) const {
109#ifdef TRKRECO_DEBUG
110 if (! _fitted) std::cout << "TCircle::center !!! fit not performed" << std::endl;
111#endif
112 return _center;
113}
114
115inline
116double
117TCircle::radius(void) const {
118#ifdef TRKRECO_DEBUG
119 if (! _fitted) std::cout << "TCircle::radius !!! fit not performed" << std::endl;
120#endif
121 return _radius;
122}
123
124inline
125double
126TCircle::pt(void) const {
127#ifdef TRKRECO_DEBUG
128 if (! _fitted) std::cout << "TCircle::pt !!! fit not performed" << std::endl;
129#endif
130 // return fabs(_radius) / Helix::ConstantAlpha;
131 return fabs(_radius) / 333.564095;
132}
133
134inline
135double
136TCircle::impact(void) const {
137#ifdef TRKRECO_DEBUG
138 if (! _fitted) std::cout << "TCircle::impact !!! fit not performed" << std::endl;
139#endif
140 return fabs(sqrt(_center.x() * _center.x() +
141 _center.y() * _center.y())
142 - fabs(_radius));
143}
144
145inline
146double
147TCircle::charge(void) const {
148#ifdef TRKRECO_DEBUG
149 if (! _fitted) std::cout << "TCircle::charge !!! fit not performed" << std::endl;
150#endif
151 return _charge;
152
153}
154
155inline
156void
157TCircle::property(double c, double r, HepPoint3D e) {
158 _charge = c;
159 _radius = r;
160 _center = e;
161}
162
163inline
164unsigned
166 return Circle;
167}
168
169#endif
170
171#undef inline
172
173#endif /* TCircle_FLAG_ */
*********Class see also m_nmax DOUBLE PRECISION m_MasPhot DOUBLE PRECISION m_phsu DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_r2 DOUBLE PRECISION m_WtMass INTEGER m_nmax INTEGER m_Nevgen INTEGER m_IsFSR INTEGER m_MarTot *COMMON c_KarFin $ !Output file $ !Event serial number $ !alpha QED at Thomson limit $ !minimum energy at CMS for remooval $ !infrared dimensionless $ !dummy photon IR regulator $ !crude photon multiplicity enhancement factor *EVENT $ !MC crude volume of PhhSpace *Sfactors $ !YFS formfactor IR part only $ !YFS formfactor non IR finite part $ !mass weight
Definition: KarFin.h:34
HepGeom::Point3D< double > HepPoint3D
Definition: TCircle.h:30
#define Circle
Definition: TTrackBase.h:28
A class to fit a TTrackBase object to a circle.
Definition: TCircleFitter.h:32
A class to represent a circle in tracking.
Definition: TCircle.h:42
virtual ~TCircle()
Destructor.
Definition: TCircle.cxx:29
virtual unsigned objectType(void) const
returns type.
Definition: TCircle.h:165
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
Definition: TCircle.cxx:33
double radius(void) const
returns radius.
Definition: TCircle.h:117
double impact(void) const
returns impact parameter to the origin.
Definition: TCircle.h:136
double pt(void) const
returns Pt.
Definition: TCircle.h:126
const HepPoint3D & center(void) const
returns position of center.
Definition: TCircle.h:108
void property(double charge, double radius, HepPoint3D center)
sets circle properties.
Definition: TCircle.h:157
double charge(void) const
returns charge.
Definition: TCircle.h:147
int fitForCurl(int ipConst=0)
fits itself. Error was happened if return value is not zero.
Definition: TCircle.cxx:136
A virtual class for a track class in tracking.
Definition: TTrackBase.h:46
bool _fitted
Definition: TTrackBase.h:162
const AList< TMLink > & links(unsigned mask=0) const
returns a list of masked TMLinks assigned to this track. 'mask' will be applied if mask is not 0.
Definition: TTrackBase.cxx:297