BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcSegInfoCsmc Class Reference

#include <MdcSegInfoCsmc.h>

+ Inheritance diagram for MdcSegInfoCsmc:

Public Member Functions

 MdcSegInfoCsmc ()
 
 ~MdcSegInfoCsmc ()
 
double d0 () const
 
double phi0 () const
 
double sigPhi0 () const
 
double sigD0 () const
 
bool parIsAngle (int i) const
 
void calcStraight (double phi, double slope, double rad, const double *inErr)
 
void calcStraight (const MdcSeg *parentSeg)
 
- 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 MdcSegInfoCsmc.h.

Constructor & Destructor Documentation

◆ MdcSegInfoCsmc()

MdcSegInfoCsmc::MdcSegInfoCsmc ( )
inline

Definition at line 30 of file MdcSegInfoCsmc.h.

30{ };

◆ ~MdcSegInfoCsmc()

MdcSegInfoCsmc::~MdcSegInfoCsmc ( )
inline

Definition at line 31 of file MdcSegInfoCsmc.h.

31{ };

Member Function Documentation

◆ calcStraight() [1/2]

void MdcSegInfoCsmc::calcStraight ( const MdcSeg * parentSeg)

Definition at line 99 of file MdcSegInfoCsmc.cxx.

99 {
100//------------------------------------------------------------------
101 double slope = parentSeg->slope();
102 double radius = parentSeg->superlayer()->rad0();
103 double phi = parentSeg->phi();
104 const double *inErr = parentSeg->errmat();
105
106 calcStraight(phi, slope, radius, inErr);
107}
void calcStraight(double phi, double slope, double rad, const double *inErr)
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
void slope()
Definition slope.cxx:12

◆ calcStraight() [2/2]

void MdcSegInfoCsmc::calcStraight ( double phi,
double slope,
double rad,
const double * inErr )

Definition at line 38 of file MdcSegInfoCsmc.cxx.

39 {
40//------------------------------------------------------------------
41 // Load the segment info obj with phi0 and d0 values, calc. assuming
42 // the segments lie on straight tracks.
43 //
44 // d0 defined to be positive for tracks that intercept x axis on positive
45 // phi (neg x) side of origin. At least that's what I claim. */
46
47 // error matrix conversion:
48 // Vij(f) = SUM(n,m) ( d(fi)/d(yn) * d(fj)/d(ym) * Vnm(y) )
49 // The derivatives are calculated from:
50 // d0 = r**2 * slope / sqrt( 1 + r**2 * slope**2 ) &
51 // phi0 = phiseg - asin(d0 / r)
52
53 // d0ovSlope = r**2/sqrt(1 + slope**2 * r**2) = d0 / slope
54 // d0ovrad = d0/r
55 // d0ovradsq = (d0/r)**2
56 // dphi0dphi = d(phi0)/d(seg-phi)
57 // dphi0ds = d(phi0)/d(seg-slope)
58 // dd0ds = d(d0)/d(seg-slope)
59 // dd0dphi = 0
60
61 double d0ovSlope = -rad * rad / sqrt( 1. + slope*slope * rad*rad );
62 double d0 = slope * d0ovSlope;
63 _par0 = d0;
64
65 double d0ovRad = d0 / rad ;
66 // Don't blow away arcsine:
67 d0ovRad = ( d0ovRad > 1.0 || d0ovRad < -1.0) ?
68 (d0ovRad+0.00001)/fabs(d0ovRad) : d0ovRad;
69 BesAngle phi0 = phi - asin( d0ovRad );
70 _par1 = phi0.posRad();
71
72 // Error matrix (anal calculation).
73 // double dphi0dphi = 1.;
74 double dphi0ds = -d0ovSlope * sqrt( 1. - d0ovRad*d0ovRad ) / rad;
75 double dd0ds = d0ovSlope * ( 1. - d0ovRad*d0ovRad );
76
77 // d0:
78 _errmat[0] = inErr[2] * dd0ds * dd0ds;
79 if (_errmat[0] < 0.) _errmat[0] = 0.;
80
81 // phi0:
82 _errmat[2] = inErr[2] * dphi0ds * dphi0ds + inErr[0] +
83 inErr[1] * 2. * dphi0ds;
84 if (_errmat[2] < 0.) _errmat[2] = 0.;
85 // phi0|d0:
86 _errmat[1] = inErr[2] * dd0ds * dphi0ds +
87 inErr[1] * dd0ds;
88
90 if (error) {
91 std::cout << " ErrMsg(warning) "
92 << "Failed to invert matrix -- MdcSegInfo::calcStraight" << endl
93 << _errmat[0] << " " << _errmat[1] << " " << _errmat[2]<< std::endl;
94 }
95}
double phi0() const
double d0() 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
const float rad
Definition vector3.h:134

Referenced by calcStraight(), and MdcSegGrouperCsmc::fillWithSegs().

◆ d0()

double MdcSegInfoCsmc::d0 ( ) const
inline

Definition at line 33 of file MdcSegInfoCsmc.h.

33{return _par0;}

Referenced by calcStraight(), and MdcSegGrouperCsmc::incompWithSeg().

◆ parIsAngle()

bool MdcSegInfoCsmc::parIsAngle ( int i) const
virtual

Implements MdcSegInfo.

Definition at line 31 of file MdcSegInfoCsmc.cxx.

31 {
32//---------------------------------------------------------------------------
33 assert (i >= 0 && i < 2);
34 return (0 != i); //i.e., parameter 1 is an angle
35}

◆ phi0()

double MdcSegInfoCsmc::phi0 ( ) const
inline

◆ sigD0()

double MdcSegInfoCsmc::sigD0 ( ) const

Definition at line 117 of file MdcSegInfoCsmc.cxx.

117 {
118//------------------------------------------------------------------
119 return sqrt(_errmat[0]);
120}

Referenced by MdcSegGrouperCsmc::incompWithSeg().

◆ sigPhi0()

double MdcSegInfoCsmc::sigPhi0 ( ) const

Definition at line 111 of file MdcSegInfoCsmc.cxx.

111 {
112//------------------------------------------------------------------
113 return sqrt(_errmat[2]);
114}

Referenced by MdcSegGrouperCsmc::incompWithSeg().


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