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;
28  Measurement1D directionPhi() const;
29  Measurement1D impactParameter() 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); }
37  void skipErrorCalculation() { theFit.skipErrorCalculationByDefault(); }
38 
39 private:
40  double phiRot() const;
41  void findRot(const PointXY &);
42 
43 private:
44  const Rotation *theRotation;
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:
76  T theU, theV, theW;
78  };
79 };
80 
81 #endif
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
const Rotation * theRotation
MappedPoint(const PointXY &point, const T &weight, const TkRotation< T > *aRot)
Basic2DVector< double > PointXY
Definition: weight.py:1
T theW
T curvature(T InversePt, const edm::EventSetup &iSetup)
void fixImpactParmaeter(double ip)
TkRotation< double > Rotation
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
HLT enums.
MappedPoint(const T &aU, const T &aV, const T &aWeight, const TkRotation< T > *aRot)
const Rotation * rotation() const
tmp
align.sh
Definition: createJobs.py:716
long double T
*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