CMS 3D CMS Logo

ConformalMappingFit.h
Go to the documentation of this file.
1 #ifndef ConformalMappingFit_H
2 #define ConformalMappingFit_H
3 
8 
9 #include "ParabolaFit.h"
10 #include <vector>
11 
12 namespace edm {
13  class ParameterSet;
14 }
15 
17 public:
20 
21  ConformalMappingFit(const std::vector<PointXY> &hits,
22  const std::vector<float> &errRPhi2,
23  const Rotation *rotation = nullptr);
24 
26 
27  Measurement1D curvature() const;
30 
31  int charge() const;
32  double chi2() const { return theFit.chi2(); }
33 
34  const Rotation *rotation() const { return theRotation; }
35 
36  void fixImpactParmaeter(double ip) { theFit.fixParC(ip); }
38 
39 private:
40  double phiRot() const;
41  void findRot(const PointXY &);
42 
43 private:
45  bool myRotation;
47 
48  template <class T>
49  class MappedPoint {
50  public:
52  MappedPoint() : theU(0), theV(0), theW(0), pRot(0) {}
53  MappedPoint(const T &aU, const T &aV, const T &aWeight, const TkRotation<T> *aRot)
54  : theU(aU), theV(aV), theW(aWeight), pRot(aRot) {}
55  MappedPoint(const PointXY &point, const T &weight, const TkRotation<T> *aRot) : pRot(aRot) {
56  T radius2 = point.mag2();
57  Basic3DVector<T> rotated = (*pRot) * point;
58  theU = rotated.x() / radius2;
59  theV = rotated.y() / radius2;
60  theW = weight * radius2 * radius2;
61  }
62  T u() const { return theU; }
63  T v() const { return theV; }
64  T weight() const { return theW; }
65  PointXY unmap() const {
66  T invRadius2 = theU * theU + theV * theV;
67  Basic3DVector<T> tmp = (*pRot).multiplyInverse(Basic2DVector<T>(theU, theV));
68  return PointXY(tmp.x() / invRadius2, tmp.y() / invRadius2);
69  }
70  T unmappedWeight() const {
71  T invRadius2 = theU * theU + theV * theV;
72  return theW * invRadius2 * invRadius2;
73  }
74 
75  private:
78  };
79 };
80 
81 #endif
ConformalMappingFit::MappedPoint::u
T u() const
Definition: ConformalMappingFit.h:62
ConformalMappingFit::MappedPoint::weight
T weight() const
Definition: ConformalMappingFit.h:64
TkRotation< double >
ConformalMappingFit::MappedPoint::unmappedWeight
T unmappedWeight() const
Definition: ConformalMappingFit.h:70
Measurement1D
Definition: Measurement1D.h:11
ConformalMappingFit
Definition: ConformalMappingFit.h:16
ParabolaFit
Definition: ParabolaFit.h:11
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
edm
HLT enums.
Definition: AlignableModifier.h:19
ConformalMappingFit::MappedPoint::theV
T theV
Definition: ConformalMappingFit.h:76
Measurement1D.h
Basic3DVector.h
ConformalMappingFit::MappedPoint::v
T v() const
Definition: ConformalMappingFit.h:63
ConformalMappingFit::Rotation
TkRotation< double > Rotation
Definition: ConformalMappingFit.h:18
ConformalMappingFit::skipErrorCalculation
void skipErrorCalculation()
Definition: ConformalMappingFit.h:37
ConformalMappingFit::MappedPoint::unmap
PointXY unmap() const
Definition: ConformalMappingFit.h:65
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
ConformalMappingFit::PointXY
Basic2DVector< double > PointXY
Definition: ConformalMappingFit.h:19
ConformalMappingFit::ConformalMappingFit
ConformalMappingFit(const std::vector< PointXY > &hits, const std::vector< float > &errRPhi2, const Rotation *rotation=nullptr)
Definition: ConformalMappingFit.cc:10
ConformalMappingFit::fixImpactParmaeter
void fixImpactParmaeter(double ip)
Definition: ConformalMappingFit.h:36
ConformalMappingFit::findRot
void findRot(const PointXY &)
Definition: ConformalMappingFit.cc:24
ConformalMappingFit::MappedPoint::MappedPoint
MappedPoint(const T &aU, const T &aV, const T &aWeight, const TkRotation< T > *aRot)
Definition: ConformalMappingFit.h:53
Basic3DVector::y
T y() const
Cartesian y coordinate.
Definition: extBasic3DVector.h:97
ConformalMappingFit::curvature
Measurement1D curvature() const
Definition: ConformalMappingFit.cc:40
ConformalMappingFit::theFit
ParabolaFit theFit
Definition: ConformalMappingFit.h:46
TkRotation.h
ParabolaFit::skipErrorCalculationByDefault
void skipErrorCalculationByDefault()
Definition: ParabolaFit.h:22
Basic2DVector< double >
ConformalMappingFit::chi2
double chi2() const
Definition: ConformalMappingFit.h:32
ParameterSet
Definition: Functions.h:16
ConformalMappingFit::phiRot
double phiRot() const
Definition: ConformalMappingFit.cc:38
ConformalMappingFit::MappedPoint
Definition: ConformalMappingFit.h:49
ConformalMappingFit::directionPhi
Measurement1D directionPhi() const
Definition: ConformalMappingFit.cc:46
ConformalMappingFit::MappedPoint::MappedPoint
MappedPoint(const PointXY &point, const T &weight, const TkRotation< T > *aRot)
Definition: ConformalMappingFit.h:55
ConformalMappingFit::charge
int charge() const
Definition: ConformalMappingFit.cc:58
ConformalMappingFit::MappedPoint::pRot
const TkRotation< T > * pRot
Definition: ConformalMappingFit.h:77
ParabolaFit::fixParC
void fixParC(double val)
Definition: ParabolaFit.h:23
ConformalMappingFit::myRotation
bool myRotation
Definition: ConformalMappingFit.h:45
ConformalMappingFit::MappedPoint::theW
T theW
Definition: ConformalMappingFit.h:76
Basic2DVector.h
T
long double T
Definition: Basic3DVectorLD.h:48
ConformalMappingFit::impactParameter
Measurement1D impactParameter() const
Definition: ConformalMappingFit.cc:52
ConformalMappingFit::theRotation
const Rotation * theRotation
Definition: ConformalMappingFit.h:44
ConformalMappingFit::MappedPoint::MappedPoint
MappedPoint()
Definition: ConformalMappingFit.h:52
ConformalMappingFit::rotation
const Rotation * rotation() const
Definition: ConformalMappingFit.h:34
Basic3DVector::x
T x() const
Cartesian x coordinate.
Definition: extBasic3DVector.h:94
ParabolaFit.h
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
ConformalMappingFit::MappedPoint::PointXY
Basic2DVector< T > PointXY
Definition: ConformalMappingFit.h:51
ConformalMappingFit::~ConformalMappingFit
~ConformalMappingFit()
Definition: ConformalMappingFit.cc:33
ConformalMappingFit::MappedPoint::theU
T theU
Definition: ConformalMappingFit.h:76
Basic3DVector
Definition: extBasic3DVector.h:30
ParabolaFit::chi2
double chi2() const
Definition: ParabolaFit.cc:111
weight
Definition: weight.py:1