CMS 3D CMS Logo

RZLine Class Reference

#include <RecoPixelVertexing/PixelTrackFitting/src/RZLine.h>

List of all members.

Public Member Functions

float chi2 (float cotTheta, float intercept) const
void fit (float &cotTheta, float &intercept, float &covss, float &covii, float &covsi) const
 RZLine (const std::vector< float > &aR, const std::vector< float > &aZ, const std::vector< float > &aErrZ)
 RZLine (const std::vector< GlobalPoint > &points, const std::vector< GlobalError > &errors, const std::vector< bool > isBarrel)

Private Attributes

std::vector< float > errZ
std::vector< float > r
std::vector< float > z


Detailed Description

Definition at line 8 of file RZLine.h.


Constructor & Destructor Documentation

RZLine::RZLine ( const std::vector< GlobalPoint > &  points,
const std::vector< GlobalError > &  errors,
const std::vector< bool isBarrel 
)

RZLine::RZLine ( const std::vector< float > &  aR,
const std::vector< float > &  aZ,
const std::vector< float > &  aErrZ 
)

Definition at line 7 of file RZLine.cc.

00010   : r(aR), z(aZ), errZ(aErrZ)
00011 {}


Member Function Documentation

float RZLine::chi2 ( float  cotTheta,
float  intercept 
) const

Definition at line 35 of file RZLine.cc.

References errZ, r, sqr(), and z.

Referenced by PixelFitterByConformalMappingAndLine::run(), TrackFitter::run(), and PixelFitterByHelixProjections::run().

00036 {
00037   float chi2 = 0.;
00038   int r_size = r.size();  
00039   for (int i=0; i< r_size; i++) chi2 += sqr( ((z[i]-intercept) - cotTheta*r[i]) / errZ[i]);
00040   return chi2;
00041 }

void RZLine::fit ( float &  cotTheta,
float &  intercept,
float &  covss,
float &  covii,
float &  covsi 
) const

Definition at line 29 of file RZLine.cc.

References errZ, r, and z.

Referenced by PixelFitterByConformalMappingAndLine::run(), TrackFitter::run(), and PixelFitterByHelixProjections::run().

00031 {
00032   LinearFit().fit( r,z, r.size(), errZ, cotTheta, intercept, covss, covii, covsi);
00033 }


Member Data Documentation

std::vector<float> RZLine::errZ [private]

Definition at line 24 of file RZLine.h.

Referenced by chi2(), and fit().

std::vector<float> RZLine::r [private]

Definition at line 24 of file RZLine.h.

Referenced by chi2(), and fit().

std::vector<float> RZLine::z [private]

Definition at line 24 of file RZLine.h.

Referenced by chi2(), and fit().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:31:14 2009 for CMSSW by  doxygen 1.5.4