Belle II Software development
Circle.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9//-----------------------------------------------------------------------------
10// Description : A class to represent a circle
11//-----------------------------------------------------------------------------
12
13#ifndef TRGCDCCircle_FLAG_
14#define TRGCDCCircle_FLAG_
15
16#include "trg/trg/Point2D.h"
17#include "trg/cdc/TrackBase.h"
18
19#ifdef TRGCDC_SHORT_NAMES
20#define TCCircle TRGCDCCircle
21#endif
22
23namespace Belle2 {
29 class TRGCDCHoughPlane;
30 class TRGCDCCircleFitter;
31
34
35 public:
36
38 explicit TRGCDCCircle(const std::vector<TRGCDCLink*>& links);
39
41 TRGCDCCircle(double r,
42 double phi,
43 double charge,
44 const TRGCDCHoughPlane& plane);
45
47 virtual ~TRGCDCCircle();
48
49 public:
50
52 virtual unsigned objectType(void) const override;
53
55 const TRGPoint2D& center(void) const;
56
58 double pt(void) const override;
59
61 double radius(void) const;
62
64 virtual void dump(const std::string& message = std::string(""),
65 const std::string& prefix = std::string("")) const override;
66
68 void property(double charge,
69 double radius,
71// void property(double charge, double radius, TPoint2D & center);
72
73 public: // Utility functions
74
76 int approach2D(TRGCDCLink&) const override;
77
78 private:
79
82
84 double _radius;
85
88
91
92 };
93
94//-----------------------------------------------------------------------------
95
96 inline
97 double
98 TRGCDCCircle::pt(void) const
99 {
100 const double ConstantAlpha = 222.376063; // for 1.5T
101 return _radius / ConstantAlpha;
102 }
103
104 inline
105 const TRGPoint2D&
107 {
108 return _center;
109 }
110
111 inline
112 double
114 {
115 return _radius;
116 }
117
118 inline
119 unsigned
121 {
122 return TRGCDCCircleType;
123 }
124
125 inline
126 void
128 {
129 charge(c);
130 _radius = r;
131 _center = e;
132 }
133
135} // namespace Belle2
136
137#endif /* TRGCDCCircle_FLAG_ */
A class to fit a TTrackBase object to a circle.
Definition: CircleFitter.h:31
A class to represent a circle.
Definition: Circle.h:33
TRGPoint2D _center
Position of the circle center.
Definition: Circle.h:81
double _radius
Radius multiplied by charge.
Definition: Circle.h:84
const TRGCDCHoughPlane * _plane
Hough plane.
Definition: Circle.h:87
A class to represent a Hough parameter plane.
Definition: HoughPlane.h:30
A class to represent a track object in TRGCDC.
Definition: TrackBase.h:40
A class to represent a point in 2D.
Definition: Point2D.h:27
int approach2D(TRGCDCLink &) const override
calculate closest approach. Error was happened if return value is not zero.
Definition: Circle.cc:73
double charge(void) const
returns charge.
Definition: TrackBase.h:248
static const TRGCDCCircleFitter _fitter
Default fitter.
Definition: Circle.h:90
virtual ~TRGCDCCircle()
Destructor.
Definition: Circle.cc:56
double radius(void) const
returns radius.
Definition: Circle.h:113
virtual void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const override
dumps debug information.
Definition: Circle.cc:61
void property(double charge, double radius, HepGeom::Point3D< double > center)
sets circle properties.
Definition: Circle.h:127
const TRGPoint2D & center(void) const
returns the circle center.
Definition: Circle.h:106
const std::vector< TRGCDCLink * > & links(void) const
returns a vector to track segments.
Definition: TrackBase.cc:123
double pt(void) const override
returns Pt.
Definition: Circle.h:98
virtual unsigned objectType(void) const override
returns type.
Definition: Circle.h:120
Abstract base class for different kinds of events.