test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
ConformalMappingFit Class Reference

#include <ConformalMappingFit.h>

Classes

class  MappedPoint
 

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
 

Detailed Description

Definition at line 14 of file ConformalMappingFit.h.

Member Typedef Documentation

Definition at line 17 of file ConformalMappingFit.h.

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, point, theFit, and theRotation.

10 {
12  int hits_size = hits.size();
13  for ( int i= 0; i < hits_size; i++) {
14  if (!theRotation) findRot( hits[i] );
15  PointUV point( hits[i], 1./errRPhi2[i], theRotation);
16  theFit.addPoint( point.u(), point.v(), point.weight());
17  }
18 }
int i
Definition: DBlmapReader.cc:9
const Rotation * theRotation
void findRot(const PointXY &)
void addPoint(double x, double y)
Definition: ParabolaFit.cc:6
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
ConformalMappingFit::~ConformalMappingFit ( )

Definition at line 30 of file ConformalMappingFit.cc.

References myRotation, and theRotation.

31 { if( myRotation) delete theRotation; }
const Rotation * theRotation

Member Function Documentation

int ConformalMappingFit::charge ( void  ) const

Definition at line 57 of file ConformalMappingFit.cc.

References ParabolaFit::parA(), and theFit.

Referenced by PixelFitterByConformalMappingAndLine::run().

58 { return (theFit.parA() > 0.) ? -1 : 1; }
double parA() const
Definition: ParabolaFit.h:27
double ConformalMappingFit::chi2 ( void  ) const
inline

Definition at line 29 of file ConformalMappingFit.h.

References ParabolaFit::chi2(), and theFit.

Referenced by PixelFitterByConformalMappingAndLine::run().

29 { return theFit.chi2(); }
double chi2() const
Definition: ParabolaFit.cc:104
Measurement1D ConformalMappingFit::curvature ( ) const

Definition at line 36 of file ConformalMappingFit.cc.

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

Referenced by PixelFitterByConformalMappingAndLine::run().

37 {
38  double val = fabs( 2. * theFit.parA() );
39  double err = 2.*sqrt(theFit.varAA());
40  return Measurement1D(val,err);
41 }
T sqrt(T t)
Definition: SSEVec.h:18
double parA() const
Definition: ParabolaFit.h:27
double varAA() const
Definition: ParabolaFit.h:30
Measurement1D ConformalMappingFit::directionPhi ( ) const

Definition at line 43 of file ConformalMappingFit.cc.

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

Referenced by PixelFitterByConformalMappingAndLine::run().

44 {
45  double val = phiRot() + atan(theFit.parB());
46  double err = sqrt(theFit.varBB());
47  return Measurement1D(val,err);
48 }
double varBB() const
Definition: ParabolaFit.h:31
T sqrt(T t)
Definition: SSEVec.h:18
double parB() const
Definition: ParabolaFit.h:28
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().

21 {
22  myRotation = true;
23  typedef Rotation::GlobalVector GlobalVector; // ::GlobalVector is float!
24  GlobalVector aX = GlobalVector( p.x(), p.y(), 0.).unit();
25  GlobalVector aY( -aX.y(), aX.x(), 0.);
26  GlobalVector aZ( 0., 0., 1.);
27  theRotation = new Rotation(aX,aY,aZ);
28 }
const Rotation * theRotation
T y() const
Definition: PV3DBase.h:63
Vector3DBase< double, GlobalTag > GlobalVector
Definition: extTkRotation.h:35
Vector3DBase unit() const
Definition: Vector3DBase.h:57
TkRotation< double > Rotation
T x() const
Definition: PV3DBase.h:62
Global3DVector GlobalVector
Definition: GlobalVector.h:10
void ConformalMappingFit::fixImpactParmaeter ( double  ip)
inline

Definition at line 33 of file ConformalMappingFit.h.

References ParabolaFit::fixParC(), and theFit.

Referenced by PixelFitterByConformalMappingAndLine::run().

33 { theFit.fixParC(ip); }
void fixParC(double val)
Definition: ParabolaFit.h:23
Measurement1D ConformalMappingFit::impactParameter ( ) const

Definition at line 50 of file ConformalMappingFit.cc.

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

Referenced by PixelFitterByConformalMappingAndLine::run().

51 {
52  double val = -theFit.parC();
53  double err = sqrt(theFit.varCC());
54  return Measurement1D(val,err);
55 }
double parC() const
Definition: ParabolaFit.h:29
double varCC() const
Definition: ParabolaFit.h:32
T sqrt(T t)
Definition: SSEVec.h:18
double ConformalMappingFit::phiRot ( ) const
private

Definition at line 33 of file ConformalMappingFit.cc.

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

Referenced by directionPhi().

34 { return atan2( theRotation->xy(), theRotation->xx() ); }
T xx() const
const Rotation * theRotation
T xy() const
const Rotation* ConformalMappingFit::rotation ( void  ) const
inline

Definition at line 31 of file ConformalMappingFit.h.

References theRotation.

31 { return theRotation; }
const Rotation * theRotation
void ConformalMappingFit::skipErrorCalculation ( )
inline

Member Data Documentation

bool ConformalMappingFit::myRotation
private

Definition at line 41 of file ConformalMappingFit.h.

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

ParabolaFit ConformalMappingFit::theFit
private
const Rotation* ConformalMappingFit::theRotation
private