6 if(exPoint.num_row() ==0 )
throw VertexException(
"PointingKinematicConstraint::value requested for zero Linearization point");
9 int inSize = exPoint.num_row();
10 if((inSize%7) !=0)
throw VertexException(
"PointingKinematicConstraint::linearization point has a wrong dimension");
11 int nStates = inSize/7;
12 if(nStates != 1)
throw VertexException(
"PointingKinematicConstraint::Current version does not support the multistate refit");
21 return std::pair<AlgebraicVector,AlgebraicVector>(vl,lPar);
26 if(exPoint.num_row() ==0 )
throw VertexException(
"PointingKinematicConstraint::value requested for zero Linearization point");
29 int inSize = exPoint.num_row();
30 if((inSize%7) !=0)
throw VertexException(
"PointingKinematicConstraint::linearization point has a wrong dimension");
31 int nStates = inSize/7;
32 if(nStates != 1)
throw VertexException(
"PointingKinematicConstraint::Current version does not support the multistate refit");
39 return std::pair<AlgebraicMatrix,AlgebraicVector>(dr,lPar);
44 int nStates = par.size();
45 if(nStates == 0)
throw VertexException(
"PointingKinematicConstraint::Empty vector of particles passed");
46 if(nStates != 1)
throw VertexException(
"PointingKinematicConstraint::Current version does not support the multistate refit");
49 AlgebraicVector lPoint = asHepVector<7>(par.front()->currentState().kinematicParameters().vector());
54 return std::pair<AlgebraicMatrix,AlgebraicVector>(dr,lPoint);
59 int nStates = par.size();
60 if(nStates == 0)
throw VertexException(
"PointingKinematicConstraint::Empty vector of particles passed");
61 if(nStates != 1)
throw VertexException(
"PointingKinematicConstraint::Current version does not support the multistate refit");
63 AlgebraicVector lPoint = asHepVector<7>(par.front()->currentState().kinematicParameters().vector());
66 return std::pair<AlgebraicVector,AlgebraicVector>(vl,lPoint);
86 double sin_p = py/
sqrt(px*px + py*py);
87 double cos_p = px/
sqrt(px*px + py*py);
88 double sin_x = dy/
sqrt(dx*dx + dy*dy);
89 double cos_x = dx/
sqrt(dx*dx + dy*dy);
91 double sin_pt = pz/
sqrt(px*px + py*py + pz*pz);
92 double cos_pt =
sqrt(px*px + py*py)/
sqrt(px*px + py*py + pz*pz);
93 double sin_xt = dz/
sqrt(dx*dx + dy*dy + dz*dz);
94 double cos_xt =
sqrt(dx*dx + dy*dy)/
sqrt(dx*dx + dy*dy + dz*dz);
96 vl(1) = (1-cos_x)/sin_x - (1-cos_p)/sin_p;
97 vl(2) = (1-cos_xt)/sin_xt - (1-cos_pt)/sin_pt;
102 return std::pair<AlgebraicVector,AlgebraicVector>(vl,
point);
113 double px =
point(4);
114 double py =
point(5);
115 double pz =
point(6);
153 dr(1,1) = dx/(dy*
sqrt(dx*dx + dy*dy)) - 1/dy;
154 dr(1,2) = 1/
sqrt(dx*dx+dy*dy) -
sqrt(dx*dx+dy*dy)/(dy*dy)+ dx/(dy*dy);
156 dr(1,4) = -(px/(py*
sqrt(px*px + py*py)) - 1/py);
157 dr(1,5) = -(1/
sqrt(px*px+py*py) -
sqrt(px*px+py*py)/(py*py)+ px/(py*py));
163 dr(2,1) = (dx/dz)*(1/
sqrt(dx*dx + dy*dy + dz*dz) - 1/
sqrt(dx*dx + dy*dy));
164 dr(2,2) = (dy/dz)*(1/
sqrt(dx*dx + dy*dy + dz*dz) - 1/
sqrt(dx*dx + dy*dy));
165 dr(2,3) = (1/(dz*dz))*(
sqrt(dx*dx + dy*dy) -
sqrt(dx*dx+dy*dy+dz*dz)) + 1/
sqrt(dx*dx+dy*dy+dz*dz);
166 dr(2,4) = -(px/pz)*(1/
sqrt(px*px + py*py + pz*pz) - 1/
sqrt(px*px + py*py));
167 dr(2,5) = -(py/pz)*(1/
sqrt(px*px + py*py + pz*pz) - 1/
sqrt(px*px + py*py));
168 dr(2,6) = -((1/(pz*pz))*(
sqrt(px*px + py*py) -
sqrt(px*px+py*py+pz*pz)) + 1/
sqrt(px*px+py*py+pz*pz));
171 return std::pair<AlgebraicMatrix,AlgebraicVector>(dr,
point);
virtual std::pair< AlgebraicVector, AlgebraicVector > value(const AlgebraicVector &exPoint) const
virtual int numberOfEquations() const
CLHEP::HepMatrix AlgebraicMatrix
std::pair< AlgebraicVector, AlgebraicVector > makeValue(const AlgebraicVector &exPoint) const
CLHEP::HepVector AlgebraicVector
virtual std::pair< AlgebraicMatrix, AlgebraicVector > derivative(const AlgebraicVector &exPoint) const
virtual AlgebraicVector deviations(int nStates) const
std::pair< AlgebraicMatrix, AlgebraicVector > makeDerivative(const AlgebraicVector &exPoint) const
*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