CMS 3D CMS Logo

ConformalMappingFit Class Reference

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

List of all members.

Public Types

typedef Basic2DVector< double > PointXY
typedef TkRotation< double > Rotation

Public Member Functions

int charge () const
double chi2 () const
 ConformalMappingFit (const std::vector< PointXY > &hits, const std::vector< float > &errRPhi2, const Rotation *rotation=0)
Measurement1D curvature () const
Measurement1D directionPhi () const
void fixImpactParmaeter (double ip)
Measurement1D impactParameter () const
const Rotationrotation () const
void skipErrorCalculation ()
 ~ConformalMappingFit ()

Private Member Functions

void findRot (const PointXY &)
double phiRot () const

Private Attributes

bool myRotation
ParabolaFit theFit
const RotationtheRotation

Classes

class  MappedPoint


Detailed Description

Definition at line 14 of file ConformalMappingFit.h.


Member Typedef Documentation

typedef Basic2DVector<double> ConformalMappingFit::PointXY

Definition at line 17 of file ConformalMappingFit.h.

typedef TkRotation<double> ConformalMappingFit::Rotation

Definition at line 16 of file ConformalMappingFit.h.


Constructor & Destructor Documentation

ConformalMappingFit::ConformalMappingFit ( const std::vector< PointXY > &  hits,
const std::vector< float > &  errRPhi2,
const Rotation rotation = 0 
)

Definition at line 7 of file ConformalMappingFit.cc.

References ParabolaFit::addPoint(), findRot(), i, theFit, and theRotation.

00009   : theRotation(rot), myRotation(rot==0)
00010 {
00011   typedef ConformalMappingFit::MappedPoint<double> PointUV;
00012   int hits_size = hits.size();
00013   for ( int i= 0; i < hits_size; i++) {
00014     if (!theRotation) findRot( hits[i] );
00015     PointUV point( hits[i], 1./errRPhi2[i], theRotation); 
00016     theFit.addPoint( point.u(), point.v(), point.weight());
00017   }
00018 }

ConformalMappingFit::~ConformalMappingFit (  ) 

Definition at line 29 of file ConformalMappingFit.cc.

References myRotation, and theRotation.

00030 { if( myRotation) delete theRotation; }


Member Function Documentation

int ConformalMappingFit::charge ( void   )  const

Definition at line 56 of file ConformalMappingFit.cc.

References ParabolaFit::parA(), and theFit.

Referenced by PixelFitterByConformalMappingAndLine::run().

00057 { return (theFit.parA() > 0.) ? -1 : 1; }

double ConformalMappingFit::chi2 ( void   )  const [inline]

Definition at line 29 of file ConformalMappingFit.h.

References ParabolaFit::chi2(), and theFit.

Referenced by PixelFitterByConformalMappingAndLine::run().

00029 { return theFit.chi2(); }

Measurement1D ConformalMappingFit::curvature (  )  const

Definition at line 35 of file ConformalMappingFit.cc.

References err, ParabolaFit::parA(), funct::sqrt(), theFit, and ParabolaFit::varAA().

Referenced by PixelFitterByConformalMappingAndLine::run().

00036 {
00037   double val = fabs( 2. * theFit.parA() );
00038   double err  = 2.*sqrt(theFit.varAA());
00039   return Measurement1D(val,err);
00040 }

Measurement1D ConformalMappingFit::directionPhi (  )  const

Definition at line 42 of file ConformalMappingFit.cc.

References err, ParabolaFit::parB(), phiRot(), funct::sqrt(), theFit, and ParabolaFit::varBB().

Referenced by PixelFitterByConformalMappingAndLine::run().

00043 {
00044   double val = phiRot() + atan(theFit.parB());
00045   double err = sqrt(theFit.varBB());
00046   return Measurement1D(val,err);
00047 }

void ConformalMappingFit::findRot ( const PointXY p  )  [private]

Definition at line 20 of file ConformalMappingFit.cc.

References myRotation, theRotation, Vector3DBase< T, FrameTag >::unit(), PV3DBase< T, PVType, FrameType >::x(), Basic2DVector< T >::x(), PV3DBase< T, PVType, FrameType >::y(), and Basic2DVector< T >::y().

Referenced by ConformalMappingFit().

00021 {
00022   myRotation = true;
00023   GlobalVector aX = GlobalVector( p.x(), p.y(), 0.).unit();
00024   GlobalVector aY( -aX.y(), aX.x(), 0.);
00025   GlobalVector aZ( 0., 0., 1.);
00026   theRotation = new Rotation(aX,aY,aZ);
00027 }

void ConformalMappingFit::fixImpactParmaeter ( double  ip  )  [inline]

Definition at line 33 of file ConformalMappingFit.h.

References ParabolaFit::fixParC(), and theFit.

Referenced by PixelFitterByConformalMappingAndLine::run().

00033 { theFit.fixParC(ip); }

Measurement1D ConformalMappingFit::impactParameter (  )  const

Definition at line 49 of file ConformalMappingFit.cc.

References err, ParabolaFit::parC(), funct::sqrt(), theFit, and ParabolaFit::varCC().

Referenced by PixelFitterByConformalMappingAndLine::run().

00050 {
00051   double val = -theFit.parC(); 
00052   double err = sqrt(theFit.varCC());
00053   return Measurement1D(val,err);
00054 }

double ConformalMappingFit::phiRot (  )  const [private]

Definition at line 32 of file ConformalMappingFit.cc.

References theRotation, TkRotation< T >::xx(), and TkRotation< T >::xy().

Referenced by directionPhi().

00033 { return atan2( theRotation->xy(), theRotation->xx() ); }

const Rotation* ConformalMappingFit::rotation ( void   )  const [inline]

Definition at line 31 of file ConformalMappingFit.h.

References theRotation.

00031 { return theRotation; }

void ConformalMappingFit::skipErrorCalculation (  )  [inline]

Definition at line 34 of file ConformalMappingFit.h.

References ParabolaFit::skipErrorCalculationByDefault(), and theFit.


Member Data Documentation

bool ConformalMappingFit::myRotation [private]

Definition at line 41 of file ConformalMappingFit.h.

Referenced by findRot(), and ~ConformalMappingFit().

ParabolaFit ConformalMappingFit::theFit [private]

Definition at line 42 of file ConformalMappingFit.h.

Referenced by charge(), chi2(), ConformalMappingFit(), curvature(), directionPhi(), fixImpactParmaeter(), impactParameter(), and skipErrorCalculation().

const Rotation* ConformalMappingFit::theRotation [private]

Definition at line 41 of file ConformalMappingFit.h.

Referenced by ConformalMappingFit(), findRot(), phiRot(), rotation(), and ~ConformalMappingFit().


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