CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 {class ParameterSet;}
13 
15 public:
18 
19  ConformalMappingFit( const std::vector<PointXY> & hits, const std::vector<float> & errRPhi2,
20  const Rotation * rotation = 0);
21 
23 
24  Measurement1D curvature() const;
27 
28  int charge() const;
29  double chi2() const { return theFit.chi2(); }
30 
31  const Rotation * rotation() const { return theRotation; }
32 
33  void fixImpactParmaeter(double ip) { theFit.fixParC(ip); }
35 
36 private:
37  double phiRot() const;
38  void findRot( const PointXY &);
39 
40 private:
43 
44  template <class T> class MappedPoint {
45  public:
47  MappedPoint() : theU(0), theV(0), theW(0), pRot(0) { }
48  MappedPoint( const T & aU, const T & aV, const T & aWeight,
49  const TkRotation<T> * aRot)
50  : theU(aU), theV(aV), theW(aWeight), pRot(aRot) { }
52  const PointXY & point, const T & weight, const TkRotation<T> * aRot)
53  : pRot(aRot) {
54  T radius2 = point.mag2();
55  Basic3DVector<T> rotated = (*pRot) * point;
56  theU = rotated.x() / radius2;
57  theV = rotated.y() / radius2;
58  theW = weight * radius2 * radius2;
59  }
60  T u() const {return theU; }
61  T v() const {return theV; }
62  T weight() const {return theW; }
63  PointXY unmap () const {
64  T invRadius2 = theU*theU+theV*theV;
66  = (*pRot).multiplyInverse(Basic2DVector<T>(theU,theV));
67  return PointXY(tmp.x()/invRadius2, tmp.y()/invRadius2);
68  }
69  T unmappedWeight() const {
70  T invRadius2 = theU*theU+theV*theV;
71  return theW * invRadius2 * invRadius2;
72  }
73  private:
76  };
77 
78 };
79 
80 #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:104
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)
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
ConformalMappingFit(const std::vector< PointXY > &hits, const std::vector< float > &errRPhi2, const Rotation *rotation=0)
MappedPoint(const T &aU, const T &aV, const T &aWeight, const TkRotation< T > *aRot)
const Rotation * rotation() const
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