Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MdcSegInfoCsmc Class Reference

#include <MdcSegInfoCsmc.h>

Inheritance diagram for MdcSegInfoCsmc:

MdcSegInfo MdcSegInfo List of all members.

Public Member Functions

double arc () const
double arc () const
void calcStraight (const MdcSeg *parentSeg)
void calcStraight (double phi, double slope, double rad, const double *inErr)
void calcStraight (const MdcSeg *parentSeg)
void calcStraight (double phi, double slope, double rad, const double *inErr)
double d0 () const
double d0 () const
const double * errmat () const
const double * errmat () const
const double * inverr () const
const double * inverr () const
 MdcSegInfoCsmc ()
 MdcSegInfoCsmc ()
double par (int i) const
double par (int i) const
bool parIsAngle (int i) const
bool parIsAngle (int i) const
double phi0 () const
double phi0 () const
void plotSegInfo () const
void plotSegInfo () const
double sigD0 () const
double sigD0 () const
double sigPhi0 () const
double sigPhi0 () const
 ~MdcSegInfoCsmc ()
 ~MdcSegInfoCsmc ()

Protected Attributes

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

Private Member Functions

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

Constructor & Destructor Documentation

MdcSegInfoCsmc::MdcSegInfoCsmc  )  [inline]
 

00030 { };

MdcSegInfoCsmc::~MdcSegInfoCsmc  )  [inline]
 

00031 { };

MdcSegInfoCsmc::MdcSegInfoCsmc const MdcSegInfoCsmc  )  [private]
 

MdcSegInfoCsmc::MdcSegInfoCsmc  )  [inline]
 

00030 { };

MdcSegInfoCsmc::~MdcSegInfoCsmc  )  [inline]
 

00031 { };

MdcSegInfoCsmc::MdcSegInfoCsmc const MdcSegInfoCsmc  )  [private]
 


Member Function Documentation

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

00044 {return _arc;}

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

00044 {return _arc;}

void MdcSegInfoCsmc::calcStraight const MdcSeg parentSeg  ) 
 

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

void MdcSegInfoCsmc::calcStraight const MdcSeg parentSeg  ) 
 

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
 

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]
 

00033 {return _par0;}

double MdcSegInfoCsmc::d0  )  const [inline]
 

00033 {return _par0;}

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

00039 {return _errmat;}

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

00039 {return _errmat;}

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

00040 {return _inverr;}

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

00040 {return _inverr;}

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

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

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

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

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

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

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

Implements MdcSegInfo.

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

Implements MdcSegInfo.

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]
 

00034 {return _par1;}

double MdcSegInfoCsmc::phi0 void   )  const [inline]
 

00034 {return _par1;}

void MdcSegInfo::plotSegInfo  )  const [inherited]
 

void MdcSegInfo::plotSegInfo  )  const [inherited]
 

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

double MdcSegInfoCsmc::sigD0  )  const
 

double MdcSegInfoCsmc::sigD0  )  const
 

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

double MdcSegInfoCsmc::sigPhi0  )  const
 

double MdcSegInfoCsmc::sigPhi0  )  const
 

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


Member Data Documentation

double MdcSegInfo::_arc [protected, inherited]
 

double MdcSegInfo::_errmat [protected, inherited]
 

double MdcSegInfo::_inverr [protected, inherited]
 

double MdcSegInfo::_par0 [protected, inherited]
 

double MdcSegInfo::_par1 [protected, inherited]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:28:36 2011 for BOSS6.5.5 by  doxygen 1.3.9.1