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.

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 }

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

◆ ~ConformalMappingFit()

ConformalMappingFit::~ConformalMappingFit ( )

Definition at line 33 of file ConformalMappingFit.cc.

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

References myRotation, and theRotation.

Member Function Documentation

◆ charge()

int ConformalMappingFit::charge ( void  ) const

Definition at line 58 of file ConformalMappingFit.cc.

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

References ParabolaFit::parA(), and theFit.

Referenced by PixelFitterByConformalMappingAndLine::run().

◆ chi2()

double ConformalMappingFit::chi2 ( void  ) const
inline

Definition at line 32 of file ConformalMappingFit.h.

32 { return theFit.chi2(); }

References ParabolaFit::chi2(), and theFit.

Referenced by PixelFitterByConformalMappingAndLine::run().

◆ curvature()

Measurement1D ConformalMappingFit::curvature ( ) const

Definition at line 40 of file ConformalMappingFit.cc.

40  {
41  double val = fabs(2. * theFit.parA());
42  double err = 2. * sqrt(theFit.varAA());
43  return Measurement1D(val, err);
44 }

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

Referenced by PixelFitterByConformalMappingAndLine::run().

◆ directionPhi()

Measurement1D ConformalMappingFit::directionPhi ( ) const

Definition at line 46 of file ConformalMappingFit.cc.

46  {
47  double val = phiRot() + atan(theFit.parB());
48  double err = sqrt(theFit.varBB());
49  return Measurement1D(val, err);
50 }

References submitPVResolutionJobs::err, ParabolaFit::parB(), phiRot(), mathSSE::sqrt(), theFit, heppy_batch::val, and ParabolaFit::varBB().

Referenced by PixelFitterByConformalMappingAndLine::run().

◆ findRot()

void ConformalMappingFit::findRot ( const PointXY p)
private

Definition at line 24 of file ConformalMappingFit.cc.

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 }

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

Referenced by ConformalMappingFit().

◆ fixImpactParmaeter()

void ConformalMappingFit::fixImpactParmaeter ( double  ip)
inline

Definition at line 36 of file ConformalMappingFit.h.

36 { theFit.fixParC(ip); }

References ParabolaFit::fixParC(), and theFit.

Referenced by PixelFitterByConformalMappingAndLine::run().

◆ impactParameter()

Measurement1D ConformalMappingFit::impactParameter ( ) const

Definition at line 52 of file ConformalMappingFit.cc.

52  {
53  double val = -theFit.parC();
54  double err = sqrt(theFit.varCC());
55  return Measurement1D(val, err);
56 }

References submitPVResolutionJobs::err, ParabolaFit::parC(), mathSSE::sqrt(), theFit, heppy_batch::val, and ParabolaFit::varCC().

Referenced by PixelFitterByConformalMappingAndLine::run().

◆ phiRot()

double ConformalMappingFit::phiRot ( ) const
private

Definition at line 38 of file ConformalMappingFit.cc.

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

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

Referenced by directionPhi().

◆ rotation()

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

Definition at line 34 of file ConformalMappingFit.h.

34 { return theRotation; }

References 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
Vector3DBase
Definition: Vector3DBase.h:8
Measurement1D
Definition: Measurement1D.h:11
mps_fire.i
i
Definition: mps_fire.py:428
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
ParabolaFit::varAA
double varAA() const
Definition: ParabolaFit.h:45
ConformalMappingFit::Rotation
TkRotation< double > Rotation
Definition: ConformalMappingFit.h:18
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
ConformalMappingFit::findRot
void findRot(const PointXY &)
Definition: ConformalMappingFit.cc:24
Vector3DBase::unit
Vector3DBase unit() const
Definition: Vector3DBase.h:54
ParabolaFit::parA
double parA() const
Definition: ParabolaFit.h:30
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
ConformalMappingFit::theFit
ParabolaFit theFit
Definition: ConformalMappingFit.h:46
ParabolaFit::skipErrorCalculationByDefault
void skipErrorCalculationByDefault()
Definition: ParabolaFit.h:22
TkRotation::xx
T xx() const
Definition: extTkRotation.h:251
ConformalMappingFit::phiRot
double phiRot() const
Definition: ConformalMappingFit.cc:38
ParabolaFit::addPoint
void addPoint(double x, double y)
Definition: ParabolaFit.cc:9
ConformalMappingFit::MappedPoint
Definition: ConformalMappingFit.h:49
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
TkRotation::xy
T xy() const
Definition: extTkRotation.h:252
ParabolaFit::varBB
double varBB() const
Definition: ParabolaFit.h:50
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
TkRotation< double >::GlobalVector
Vector3DBase< double, GlobalTag > GlobalVector
Definition: extTkRotation.h:35
ParabolaFit::fixParC
void fixParC(double val)
Definition: ParabolaFit.h:23
ConformalMappingFit::myRotation
bool myRotation
Definition: ConformalMappingFit.h:45
heppy_batch.val
val
Definition: heppy_batch.py:351
ParabolaFit::parC
double parC() const
Definition: ParabolaFit.h:40
ConformalMappingFit::theRotation
const Rotation * theRotation
Definition: ConformalMappingFit.h:44
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
ParabolaFit::varCC
double varCC() const
Definition: ParabolaFit.h:55
point
*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
ParabolaFit::chi2
double chi2() const
Definition: ParabolaFit.cc:111
ParabolaFit::parB
double parB() const
Definition: ParabolaFit.h:35