CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
Measurement1D curvature() const
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
Measurement1D directionPhi() const
void findRot(const PointXY &)
void skipErrorCalculationByDefault()
Definition: ParabolaFit.h:22
Measurement1D impactParameter() const
double chi2() const
Definition: ParabolaFit.cc:111
ConformalMappingFit(const std::vector< PointXY > &hits, const std::vector< float > &errRPhi2, const Rotation *rotation=nullptr)
void fixImpactParmaeter(double ip)
void fixParC(double val)
Definition: ParabolaFit.h:23
TkRotation< double > Rotation
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
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