CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MultiTrackKinematicConstraintT.h
Go to the documentation of this file.
1 #ifndef MultiTrackKinematicConstraintT_H
2 #define MultiTrackKinematicConstraintT_H
3 
7 
8 
28 {
29 public:
31 
32  // initialize the constraint so it can precompute common qualtities to the three next call
33  virtual void init(const std::vector<KinematicState>& states,
34  const GlobalPoint& point, const GlobalVector& mf) =0;
35 
36  virtual int numberOfEquations() const = 0;
37 
38  virtual MultiTrackKinematicConstraintBaseT * clone() const = 0;
39 
40 
41 };
42 
43 template<int NTRK, int DIM>
45 {
46 public:
47  enum {nTrk=NTRK, nDim=DIM};
48 
50 
51  typedef ROOT::Math::SVector<double, DIM> valueType;
52 
53  typedef ROOT::Math::SMatrix<double, DIM,7*NTRK> parametersDerivativeType;
54 
55 
56  typedef ROOT::Math::SMatrix<double, DIM,3> positionDerivativeType;
57 
58 
60 
61 
70  valueType const & value() const {
71  fillValue();
72  return m_vl;
73  }
74 
77  return m_jac_d;
78  };
79 
80 
83  return m_jac_e;
84  }
85 
86 private:
95  virtual void fillValue() const = 0;
96 
97  virtual void fillParametersDerivative() const = 0;
98 
99 
100  virtual void fillPositionDerivative() const = 0;
101 
102 protected:
103 
104  valueType & vl() const { return m_vl; }
106  positionDerivativeType & jac_e() const { return m_jac_e;}
107 
108  // self & me() const { return *const_cast<self*>(this); }
109 
110  double & vl(size_t i) const { return m_vl(i);}
111  double & jac_d(size_t i, size_t j) const { return m_jac_d(i,j);}
112  double & jac_e(size_t i, size_t j) const { return m_jac_e(i,j);}
113 
114 private:
115 
116  mutable valueType m_vl;
119 
120 };
121 
122 
123 #endif
int i
Definition: DBlmapReader.cc:9
ROOT::Math::SMatrix< double, DIM, 3 > positionDerivativeType
double & jac_d(size_t i, size_t j) const
ROOT::Math::SMatrix< double, DIM, 7 *NTRK > parametersDerivativeType
virtual int numberOfEquations() const =0
positionDerivativeType & jac_e() const
int j
Definition: DBlmapReader.cc:9
double & jac_e(size_t i, size_t j) const
parametersDerivativeType & jac_d() const
ROOT::Math::SVector< double, DIM > valueType
virtual void fillPositionDerivative() const =0
parametersDerivativeType const & parametersDerivative() const
positionDerivativeType const & positionDerivative() const
#define DIM
virtual MultiTrackKinematicConstraintBaseT * clone() const =0
virtual void fillParametersDerivative() const =0
virtual void init(const std::vector< KinematicState > &states, const GlobalPoint &point, const GlobalVector &mf)=0
virtual void fillValue() const =0
*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