CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcSegInfoAxialO Class Reference

#include <MdcSegInfoAxialO.h>

+ Inheritance diagram for MdcSegInfoAxialO:

Public Member Functions

 MdcSegInfoAxialO ()
 
 ~MdcSegInfoAxialO ()
 
double phi0 () const
 
double curv () const
 
double sigCurv () const
 
double sigPhi0 () const
 
bool parIsAngle (int i) const
 
void calcFromOrigin (const MdcSeg *parentSeg)
 
void calcFromOrigin (double phi, double slope, double rad, const double *inErr)
 
- Public Member Functions inherited from MdcSegInfo
 MdcSegInfo ()
 
virtual ~MdcSegInfo ()
 
const double * errmat () const
 
const double * inverr () const
 
double par (int i) const
 
double arc () const
 
void plotSegInfo () const
 

Additional Inherited Members

- Protected Attributes inherited from MdcSegInfo
double _par0
 
double _par1
 
double _errmat [3]
 
double _inverr [3]
 
double _arc
 

Detailed Description

Definition at line 27 of file MdcSegInfoAxialO.h.

Constructor & Destructor Documentation

◆ MdcSegInfoAxialO()

MdcSegInfoAxialO::MdcSegInfoAxialO ( )
inline

Definition at line 30 of file MdcSegInfoAxialO.h.

30{ };

◆ ~MdcSegInfoAxialO()

MdcSegInfoAxialO::~MdcSegInfoAxialO ( )
inline

Definition at line 31 of file MdcSegInfoAxialO.h.

31{ };

Member Function Documentation

◆ calcFromOrigin() [1/2]

void MdcSegInfoAxialO::calcFromOrigin ( const MdcSeg * parentSeg)

Definition at line 67 of file MdcSegInfoAxialO.cxx.

67 {
68//-------------------------------------------------------------------
69 double slope = parentSeg->slope();
70 double radius = parentSeg->superlayer()->rad0();
71 double phi = parentSeg->phi();
72 const double *inErr = parentSeg->errmat();
73
74 calcFromOrigin(phi, slope, radius, inErr);
75}
void calcFromOrigin(const MdcSeg *parentSeg)
const MdcSuperLayer * superlayer() const
Definition MdcSeg.h:51
const double * errmat() const
Definition MdcSeg.h:50
double phi() const
Definition MdcSeg.h:46
double slope() const
Definition MdcSeg.h:47
double rad0(void) const

Referenced by calcFromOrigin(), and MdcSegGrouperAx::fillWithSegs().

◆ calcFromOrigin() [2/2]

void MdcSegInfoAxialO::calcFromOrigin ( double phi,
double slope,
double rad,
const double * inErr )

Definition at line 34 of file MdcSegInfoAxialO.cxx.

35 {
36//------------------------------------------------------------------
37
38 if (slope == 0.) slope = 0.00000001;
39 double slinv = 1./slope;
40 _par1 = slope / sqrt(1. + radius*radius * slope*slope); //curve
41 double temp = 1. - _par1*_par1 * radius*radius;
42 if (temp < 0.) temp = 0.;
43 double dphi0ds = -radius * _par1 * sqrt(temp) * slinv;
44 BesAngle phi0 = phi - asin(_par1 * radius);
45 _par0 = phi0.posRad();
46
47 // phi0:
48 _errmat[0] = inErr[2] * dphi0ds * dphi0ds + inErr[0] +
49 inErr[1] * 2. * dphi0ds;
50 if (_errmat[0] < 0.) _errmat[0] = 0.;
51 // curv:
52 _errmat[2] = inErr[2] * _par1*_par1 * temp*temp * slinv*slinv;
53 if (_errmat[2] < 0.) _errmat[2] = 0.;
54 // phi0|curv:
55 _errmat[1] = inErr[2] *_par1 * slinv * temp * dphi0ds +
56 inErr[1] *_par1 * slinv * temp;
58 if (error) {
59 std::cout << " ErrMsg(warning) "
60 << "Failed to invert matrix -- MdcSegInfo::calcFromOrigin" << endl
61 << _errmat[0] << " " << _errmat[1] << " " << _errmat[2]<< endl;
62 }
63}
double phi0() const
double _par0
Definition MdcSegInfo.h:49
double _inverr[3]
Definition MdcSegInfo.h:52
double _errmat[3]
Definition MdcSegInfo.h:51
double _par1
Definition MdcSegInfo.h:50
int mdcTwoInv(double matrix[3], double invmat[3])
Definition mdcTwoInv.h:1
@ error
Definition Core.h:24

◆ curv()

double MdcSegInfoAxialO::curv ( ) const
inline

Definition at line 34 of file MdcSegInfoAxialO.h.

34{return _par1;}

Referenced by MdcSegGrouperAx::incompWithSeg().

◆ parIsAngle()

bool MdcSegInfoAxialO::parIsAngle ( int i) const
virtual

Implements MdcSegInfo.

Definition at line 27 of file MdcSegInfoAxialO.cxx.

27 {
28//---------------------------------------------------------------------------
29 assert (i >= 0 && i < 2);
30 return (0 == i); //i.e., 0th parameter is an angle
31}

◆ phi0()

double MdcSegInfoAxialO::phi0 ( ) const
inline

◆ sigCurv()

double MdcSegInfoAxialO::sigCurv ( ) const

Definition at line 85 of file MdcSegInfoAxialO.cxx.

85 {
86//-------------------------------------------------------------------
87return sqrt(_errmat[2]);}

Referenced by MdcSegGrouperAx::incompWithSeg().

◆ sigPhi0()

double MdcSegInfoAxialO::sigPhi0 ( ) const

Definition at line 79 of file MdcSegInfoAxialO.cxx.

79 {
80//-------------------------------------------------------------------
81return sqrt(_errmat[0]);}

Referenced by MdcSegGrouperAx::incompWithSeg().


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