BOSS 7.0.9
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 {
6 }

◆ CFCir() [2/3]

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

Definition at line 8 of file CFCir.cxx.

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

◆ CFCir() [3/3]

CFCir::CFCir ( const CFCir cir)

Definition at line 63 of file CFCir.cxx.

63 :
64 _x(cir._x),
65 _y(cir._y),
66 _phi(cir._phi),
67 _n(cir._n),
68
69 _theta(cir._theta),
70 _rho(cir._rho),
71 _centerX(cir._centerX),
72 _centerY(cir._centerY),
73 _centerR(cir._centerR),
74 _slant (cir._slant)
75{}

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 49 of file CFCir.cxx.

49 {
50 _x =cir._x;
51 _y =cir._y;
52 _phi=cir._phi;
53 _n =cir._n;
54
55 _theta =cir._theta;
56 _rho =cir._rho;
57 _centerX =cir._centerX;
58 _centerY =cir._centerY;
59 _centerR =cir._centerR;
60 _slant =cir._slant;
61}

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