MdcSegInfoCsmc Class Reference

#include <MdcSegInfoCsmc.h>

Inheritance diagram for MdcSegInfoCsmc:

MdcSegInfo List of all members.

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)
const double * errmat () const
const double * inverr () const
double par (int i) const
double arc () const
void plotSegInfo () const

Protected Attributes

double _par0
double _par1
double _errmat [3]
double _inverr [3]
double _arc

Private Member Functions

MdcSegInfoCsmcoperator= (const MdcSegInfoCsmc &)
 MdcSegInfoCsmc (const MdcSegInfoCsmc &)

Detailed Description

Definition at line 27 of file MdcSegInfoCsmc.h.


Constructor & Destructor Documentation

MdcSegInfoCsmc::MdcSegInfoCsmc (  )  [inline]

Definition at line 30 of file MdcSegInfoCsmc.h.

00030 { };

MdcSegInfoCsmc::~MdcSegInfoCsmc (  )  [inline]

Definition at line 31 of file MdcSegInfoCsmc.h.

00031 { };

MdcSegInfoCsmc::MdcSegInfoCsmc ( const MdcSegInfoCsmc  )  [private]


Member Function Documentation

double MdcSegInfo::arc (  )  const [inline, inherited]

Definition at line 44 of file MdcSegInfo.h.

References MdcSegInfo::_arc.

Referenced by MdcSegInfoSterO::calcStereo(), MdcSegGrouperSt::incompWithGroup(), and MdcSeg::plotSegAll().

00044 {return _arc;}

void MdcSegInfoCsmc::calcStraight ( const MdcSeg parentSeg  ) 

Definition at line 99 of file MdcSegInfoCsmc.cxx.

References calcStraight(), MdcSeg::errmat(), MdcSeg::phi(), MdcSuperLayer::rad0(), MdcSeg::slope(), and MdcSeg::superlayer().

00099                                                     {
00100 //------------------------------------------------------------------
00101   double slope = parentSeg->slope();
00102   double radius = parentSeg->superlayer()->rad0();
00103   double phi = parentSeg->phi();
00104   const double *inErr = parentSeg->errmat();
00105 
00106   calcStraight(phi, slope, radius, inErr);
00107 }

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

Definition at line 38 of file MdcSegInfoCsmc.cxx.

References MdcSegInfo::_errmat, MdcSegInfo::_inverr, MdcSegInfo::_par0, MdcSegInfo::_par1, d0(), ers::error, mdcTwoInv(), and phi0().

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

00039                                                                    {
00040 //------------------------------------------------------------------
00041   // Load the segment info obj with phi0 and d0 values, calc. assuming 
00042   // the segments lie on straight tracks.
00043   //     
00044   // d0 defined to be positive for tracks that intercept x axis on positive 
00045   //   phi (neg x) side of origin.  At least that's what I claim. */
00046   
00047   // error matrix conversion: 
00048   //   Vij(f) = SUM(n,m) ( d(fi)/d(yn) * d(fj)/d(ym) * Vnm(y) )
00049   //   The derivatives are calculated from:
00050   //       d0 = r**2 * slope / sqrt( 1 + r**2 * slope**2 )   &
00051   //       phi0 = phiseg - asin(d0 / r) 
00052   
00053   //    d0ovSlope = r**2/sqrt(1 + slope**2 * r**2) = d0 / slope
00054   //    d0ovrad = d0/r
00055   //    d0ovradsq = (d0/r)**2
00056   //    dphi0dphi = d(phi0)/d(seg-phi)
00057   //    dphi0ds   = d(phi0)/d(seg-slope)
00058   //    dd0ds   = d(d0)/d(seg-slope)
00059   //    dd0dphi = 0
00060   
00061   double d0ovSlope = -rad * rad / sqrt( 1. + slope*slope * rad*rad );
00062   double d0 = slope * d0ovSlope;
00063   _par0 = d0;
00064 
00065   double d0ovRad =  d0 / rad ;
00066   // Don't blow away arcsine:
00067   d0ovRad = ( d0ovRad > 1.0 || d0ovRad < -1.0) ? 
00068     (d0ovRad+0.00001)/fabs(d0ovRad) : d0ovRad; 
00069   BesAngle phi0 = phi - asin( d0ovRad );
00070   _par1 = phi0.posRad();
00071 
00072   // Error matrix (anal calculation).
00073   //  double dphi0dphi = 1.;
00074   double dphi0ds = -d0ovSlope * sqrt( 1. - d0ovRad*d0ovRad ) / rad;
00075   double dd0ds = d0ovSlope * ( 1. - d0ovRad*d0ovRad );
00076 
00077   // d0:
00078   _errmat[0] = inErr[2] * dd0ds * dd0ds;
00079   if (_errmat[0] < 0.) _errmat[0] = 0.;
00080 
00081   // phi0:
00082   _errmat[2] = inErr[2] * dphi0ds * dphi0ds  + inErr[0]  +  
00083     inErr[1] * 2. * dphi0ds;
00084   if (_errmat[2] < 0.) _errmat[2] = 0.;
00085   // phi0|d0:
00086   _errmat[1] = inErr[2] * dd0ds * dphi0ds + 
00087                inErr[1] * dd0ds;
00088 
00089   int error = mdcTwoInv(_errmat, _inverr);
00090   if (error) {
00091     std::cout << " ErrMsg(warning) " 
00092       << "Failed to invert matrix -- MdcSegInfo::calcStraight" << endl 
00093       << _errmat[0] << " " << _errmat[1] << " " << _errmat[2]<< std::endl;
00094   }
00095 }

double MdcSegInfoCsmc::d0 (  )  const [inline]

Definition at line 33 of file MdcSegInfoCsmc.h.

References MdcSegInfo::_par0.

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

00033 {return _par0;}

const double* MdcSegInfo::errmat (  )  const [inline, inherited]

Definition at line 39 of file MdcSegInfo.h.

References MdcSegInfo::_errmat.

Referenced by MdcSegGrouper::calcParBySegs().

00039 {return _errmat;}

const double* MdcSegInfo::inverr (  )  const [inline, inherited]

Definition at line 40 of file MdcSegInfo.h.

References MdcSegInfo::_inverr.

Referenced by MdcSegGrouper::calcParBySegs().

00040 {return _inverr;}

MdcSegInfoCsmc& MdcSegInfoCsmc::operator= ( const MdcSegInfoCsmc  )  [private]

double MdcSegInfo::par ( int  i  )  const [inline, inherited]

Definition at line 43 of file MdcSegInfo.h.

References MdcSegInfo::_par0, and MdcSegInfo::_par1.

Referenced by MdcSegGrouper::calcParBySegs(), MdcSegInfoSterO::calcStereo(), MdcSegGrouper::combineSegs(), MdcSeg::plotSegAll(), and MdcSegInfoSterO::zPosition().

00043 {return (0 == i) ? _par0 : _par1;}

bool MdcSegInfoCsmc::parIsAngle ( int  i  )  const [virtual]

Implements MdcSegInfo.

Definition at line 31 of file MdcSegInfoCsmc.cxx.

00031                                       {
00032 //---------------------------------------------------------------------------
00033   assert (i >= 0 && i < 2);
00034   return (0 != i);   //i.e., parameter 1 is an angle
00035 }

double MdcSegInfoCsmc::phi0 ( void   )  const [inline]

Definition at line 34 of file MdcSegInfoCsmc.h.

References MdcSegInfo::_par1.

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

00034 {return _par1;}

void MdcSegInfo::plotSegInfo (  )  const [inherited]

Definition at line 28 of file MdcSegInfo.cxx.

References MdcSegInfo::_arc, MdcSegInfo::_par0, and MdcSegInfo::_par1.

00028                                   {
00029 //------------------------------------------------------------------------
00030   std::cout<<"seginfo: "<<_par0<<" "<<_par1<<" "<<_arc<<  std::endl;
00031 } 

double MdcSegInfoCsmc::sigD0 (  )  const

Definition at line 117 of file MdcSegInfoCsmc.cxx.

References MdcSegInfo::_errmat.

Referenced by MdcSegGrouperCsmc::incompWithSeg().

00117                             {
00118 //------------------------------------------------------------------
00119   return sqrt(_errmat[0]);
00120 }

double MdcSegInfoCsmc::sigPhi0 (  )  const

Definition at line 111 of file MdcSegInfoCsmc.cxx.

References MdcSegInfo::_errmat.

Referenced by MdcSegGrouperCsmc::incompWithSeg().

00111                               {
00112 //------------------------------------------------------------------
00113   return sqrt(_errmat[2]);
00114 }


Member Data Documentation

double MdcSegInfo::_arc [protected, inherited]

Definition at line 53 of file MdcSegInfo.h.

Referenced by MdcSegInfo::arc(), MdcSegInfoSterO::calcStereo(), and MdcSegInfo::plotSegInfo().

double MdcSegInfo::_errmat[3] [protected, inherited]

Definition at line 51 of file MdcSegInfo.h.

Referenced by MdcSegInfoAxialO::calcFromOrigin(), MdcSegInfoSterO::calcStereo(), calcStraight(), MdcSegInfo::errmat(), MdcSegInfoAxialO::sigCurv(), sigD0(), sigPhi0(), and MdcSegInfoAxialO::sigPhi0().

double MdcSegInfo::_inverr[3] [protected, inherited]

Definition at line 52 of file MdcSegInfo.h.

Referenced by MdcSegInfoAxialO::calcFromOrigin(), MdcSegInfoSterO::calcStereo(), calcStraight(), and MdcSegInfo::inverr().

double MdcSegInfo::_par0 [protected, inherited]

Definition at line 49 of file MdcSegInfo.h.

Referenced by MdcSegInfoAxialO::calcFromOrigin(), MdcSegInfoSterO::calcStereo(), calcStraight(), d0(), MdcSegInfo::par(), MdcSegInfoAxialO::phi0(), MdcSegInfo::plotSegInfo(), and MdcSegInfoSterO::z0().

double MdcSegInfo::_par1 [protected, inherited]

Definition at line 50 of file MdcSegInfo.h.

Referenced by MdcSegInfoAxialO::calcFromOrigin(), MdcSegInfoSterO::calcStereo(), calcStraight(), MdcSegInfoSterO::ct(), MdcSegInfoAxialO::curv(), MdcSegInfo::par(), phi0(), and MdcSegInfo::plotSegInfo().


Generated on Tue Nov 29 23:20:17 2016 for BOSS_7.0.2 by  doxygen 1.4.7