BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
CFCir Class Reference

#include <CFCir.h>

Public Member Functions

 CFCir ()
 CFCir (double x, double y, double phi, int n, double, double, double)
 CFCir (const CFCir &)
CFCiroperator= (const CFCir &)
double getx () const
double gety () const
double getphi () const
int getn () const
double getTheta () const
double getRho () const
double getSlant () const
double getCenterX () const
double getCenterY () const
double getCenterR () const

Detailed Description

Definition at line 3 of file CFCir.h.

Constructor & Destructor Documentation

◆ CFCir() [1/3]

CFCir::CFCir ( )

Definition at line 5 of file CFCir.cxx.

5{}

Referenced by CFCir(), and operator=().

◆ CFCir() [2/3]

CFCir::CFCir ( double x,
double y,
double phi,
int n,
double centerX,
double centerY,
double centerR )

Definition at line 7 of file CFCir.cxx.

9 : _x( x )
10 , _y( y )
11 , _phi( phi )
12 , _n( n )
13 , _centerX( centerX )
14 , _centerY( centerY )
15 , _centerR( centerR ) {
16 double normal = ( y - _centerY ) / ( x - centerX );
17 double k = -1. / normal;
18 double b = y - k * x;
19 double x_cross = -b / ( k + 1 / k );
20 double y_cross = b / ( 1 + k * k );
21 // std::cout<<"x y centerX centerY "<<x<<" "<<y<<" "<<centerX<<" "<<centerY<<std::endl;
22 // std::cout<<"k b "<<k<<" "<<b<<std::endl;
23 // std::cout<<"xcross ycross "<<x_cross<<" "<<y_cross<<std::endl;
24
25 double rho_temp = sqrt( x_cross * x_cross + y_cross * y_cross );
26 double theta_temp = atan2( y_cross, x_cross );
27 if ( theta_temp < 0 )
28 {
29 theta_temp = theta_temp + M_PI;
30 rho_temp = -rho_temp;
31 }
32 if ( normal == 0 && x > 0 )
33 {
34 rho_temp = fabs( x );
35 theta_temp = 0;
36 }
37 if ( normal == 0 && x < 0 )
38 {
39 rho_temp = -fabs( x );
40 theta_temp = M_PI;
41 }
42 _theta = theta_temp;
43 _rho = rho_temp;
44 double slant = _y * cos( _theta ) - _x * sin( _theta );
45 _slant = slant;
46 // std::cout<<"THETA RHO "<<theta_temp<<" "<<rho_temp<<std::endl;
47 // std::cout<<std::endl;
48}
const Int_t n
Double_t x[10]
#define M_PI
Definition TConstant.h:4

◆ CFCir() [3/3]

CFCir::CFCir ( const CFCir & cir)

Definition at line 74 of file CFCir.cxx.

75 : _x( cir._x )
76 , _y( cir._y )
77 , _phi( cir._phi )
78 , _n( cir._n )
79 ,
80
81 _theta( cir._theta )
82 , _rho( cir._rho )
83 , _centerX( cir._centerX )
84 , _centerY( cir._centerY )
85 , _centerR( cir._centerR )
86 , _slant( cir._slant ) {}

Member Function Documentation

◆ getCenterR()

double CFCir::getCenterR ( ) const
inline

Definition at line 19 of file CFCir.h.

19{ return _centerR; }

◆ getCenterX()

double CFCir::getCenterX ( ) const
inline

Definition at line 17 of file CFCir.h.

17{ return _centerX; }

◆ getCenterY()

double CFCir::getCenterY ( ) const
inline

Definition at line 18 of file CFCir.h.

18{ return _centerY; }

◆ getn()

int CFCir::getn ( ) const
inline

Definition at line 13 of file CFCir.h.

13{ return _n; }

◆ getphi()

double CFCir::getphi ( ) const
inline

Definition at line 12 of file CFCir.h.

12{ return _phi; }

◆ getRho()

double CFCir::getRho ( ) const
inline

Definition at line 15 of file CFCir.h.

15{ return _rho; }

◆ getSlant()

double CFCir::getSlant ( ) const
inline

Definition at line 16 of file CFCir.h.

16{ return _slant; }

◆ getTheta()

double CFCir::getTheta ( ) const
inline

Definition at line 14 of file CFCir.h.

14{ return _theta; }

◆ getx()

double CFCir::getx ( ) const
inline

Definition at line 10 of file CFCir.h.

10{ return _x; }

◆ gety()

double CFCir::gety ( ) const
inline

Definition at line 11 of file CFCir.h.

11{ return _y; }

◆ operator=()

CFCir & CFCir::operator= ( const CFCir & cir)

Definition at line 58 of file CFCir.cxx.

58 {
59 _x = cir._x;
60 _y = cir._y;
61 _phi = cir._phi;
62 _n = cir._n;
63
64 _theta = cir._theta;
65 _rho = cir._rho;
66 _centerX = cir._centerX;
67 _centerY = cir._centerY;
68 _centerR = cir._centerR;
69 _slant = cir._slant;
70
71 return *this;
72}

The documentation for this class was generated from the following files: