CMS 3D CMS Logo

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=nullptr)
 
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 16 of file ConformalMappingFit.h.

Member Typedef Documentation

◆ PointXY

Definition at line 19 of file ConformalMappingFit.h.

◆ Rotation

Definition at line 18 of file ConformalMappingFit.h.

Constructor & Destructor Documentation

◆ ConformalMappingFit()

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

Definition at line 10 of file ConformalMappingFit.cc.

References ParabolaFit::addPoint(), findRot(), hfClusterShapes_cfi::hits, mps_fire::i, point, theFit, and theRotation.

13  : theRotation(rot), myRotation(rot == nullptr) {
15  int hits_size = hits.size();
16  for (int i = 0; i < hits_size; i++) {
17  if (!theRotation)
18  findRot(hits[i]);
19  PointUV point(hits[i], 1. / errRPhi2[i], theRotation);
20  theFit.addPoint(point.u(), point.v(), point.weight());
21  }
22 }
const Rotation * theRotation
void findRot(const PointXY &)
void addPoint(double x, double y)
Definition: ParabolaFit.cc:9
*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::~ConformalMappingFit ( )

Definition at line 33 of file ConformalMappingFit.cc.

References myRotation, and theRotation.

33  {
34  if (myRotation)
35  delete theRotation;
36 }
const Rotation * theRotation

Member Function Documentation

◆ charge()

int ConformalMappingFit::charge ( void  ) const

Definition at line 58 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:30

◆ chi2()

double ConformalMappingFit::chi2 ( void  ) const
inline

Definition at line 32 of file ConformalMappingFit.h.

References ParabolaFit::chi2(), and theFit.

Referenced by PixelFitterByConformalMappingAndLine::run().

32 { return theFit.chi2(); }
double chi2() const
Definition: ParabolaFit.cc:111

◆ curvature()

Measurement1D ConformalMappingFit::curvature ( ) const

Definition at line 40 of file ConformalMappingFit.cc.

References submitPVResolutionJobs::err, ParabolaFit::parA(), mathSSE::sqrt(), theFit, heppy_batch::val, and ParabolaFit::varAA().

Referenced by PixelFitterByConformalMappingAndLine::run().

40  {
41  double val = fabs(2. * theFit.parA());
42  double err = 2. * sqrt(theFit.varAA());
43  return Measurement1D(val, err);
44 }
double varAA() const
Definition: ParabolaFit.h:45
double parA() const
Definition: ParabolaFit.h:30
T sqrt(T t)
Definition: SSEVec.h:23

◆ directionPhi()

Measurement1D ConformalMappingFit::directionPhi ( ) const

◆ findRot()

void ConformalMappingFit::findRot ( const PointXY p)
private

Definition at line 24 of file ConformalMappingFit.cc.

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

Referenced by ConformalMappingFit().

24  {
25  myRotation = true;
26  typedef Rotation::GlobalVector GlobalVector; // ::GlobalVector is float!
27  GlobalVector aX = GlobalVector(p.x(), p.y(), 0.).unit();
28  GlobalVector aY(-aX.y(), aX.x(), 0.);
29  GlobalVector aZ(0., 0., 1.);
30  theRotation = new Rotation(aX, aY, aZ);
31 }
const Rotation * theRotation
Vector3DBase< double, GlobalTag > GlobalVector
Definition: extTkRotation.h:34
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
TkRotation< double > Rotation
Vector3DBase unit() const
Definition: Vector3DBase.h:54
Global3DVector GlobalVector
Definition: GlobalVector.h:10

◆ fixImpactParmaeter()

void ConformalMappingFit::fixImpactParmaeter ( double  ip)
inline

Definition at line 36 of file ConformalMappingFit.h.

References ParabolaFit::fixParC(), and theFit.

Referenced by PixelFitterByConformalMappingAndLine::run().

36 { theFit.fixParC(ip); }
void fixParC(double val)
Definition: ParabolaFit.h:23

◆ impactParameter()

Measurement1D ConformalMappingFit::impactParameter ( ) const

◆ phiRot()

double ConformalMappingFit::phiRot ( ) const
private

Definition at line 38 of file ConformalMappingFit.cc.

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

Referenced by directionPhi().

38 { return atan2(theRotation->xy(), theRotation->xx()); }
T xx() const
const Rotation * theRotation
T xy() const

◆ rotation()

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

Definition at line 34 of file ConformalMappingFit.h.

References theRotation.

34 { return theRotation; }
const Rotation * theRotation

◆ skipErrorCalculation()

void ConformalMappingFit::skipErrorCalculation ( )
inline

Member Data Documentation

◆ myRotation

bool ConformalMappingFit::myRotation
private

Definition at line 45 of file ConformalMappingFit.h.

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

◆ theFit

ParabolaFit ConformalMappingFit::theFit
private

◆ theRotation

const Rotation* ConformalMappingFit::theRotation
private