CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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=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

Definition at line 19 of file ConformalMappingFit.h.

Definition at line 18 of file ConformalMappingFit.h.

Constructor & Destructor Documentation

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(), 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 ( )

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

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
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
Measurement1D ConformalMappingFit::curvature ( ) const

Definition at line 40 of file ConformalMappingFit.cc.

References submitPVValidationJobs::err, ParabolaFit::parA(), mathSSE::sqrt(), theFit, hgcalPerformanceValidation::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 }
T sqrt(T t)
Definition: SSEVec.h:19
double parA() const
Definition: ParabolaFit.h:30
double varAA() const
Definition: ParabolaFit.h:45
Measurement1D ConformalMappingFit::directionPhi ( ) const
void ConformalMappingFit::findRot ( const PointXY p)
private

Definition at line 24 of file ConformalMappingFit.cc.

References myRotation, theRotation, Vector3DBase< T, FrameTag >::unit(), Basic2DVector< T >::x(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and Basic2DVector< T >::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
T y() const
Definition: PV3DBase.h:60
Vector3DBase< double, GlobalTag > GlobalVector
Definition: extTkRotation.h:34
Vector3DBase unit() const
Definition: Vector3DBase.h:54
TkRotation< double > Rotation
T x() const
Definition: PV3DBase.h:59
Global3DVector GlobalVector
Definition: GlobalVector.h:10
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
Measurement1D ConformalMappingFit::impactParameter ( ) const
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
const Rotation* ConformalMappingFit::rotation ( void  ) const
inline

Definition at line 34 of file ConformalMappingFit.h.

References theRotation.

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

Member Data Documentation

bool ConformalMappingFit::myRotation
private

Definition at line 45 of file ConformalMappingFit.h.

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

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