7 if(exPoint.num_row() ==0 )
throw VertexException(
"PointingKinematicConstraint::value requested for zero Linearization point");
10 int inSize = exPoint.num_row();
11 if((inSize%7) !=0)
throw VertexException(
"PointingKinematicConstraint::linearization point has a wrong dimension");
12 int nStates = inSize/7;
13 if(nStates != 1)
throw VertexException(
"PointingKinematicConstraint::Current version does not support the multistate refit");
22 return std::pair<AlgebraicVector,AlgebraicVector>(vl,lPar);
27 if(exPoint.num_row() ==0 )
throw VertexException(
"PointingKinematicConstraint::value requested for zero Linearization point");
30 int inSize = exPoint.num_row();
31 if((inSize%7) !=0)
throw VertexException(
"PointingKinematicConstraint::linearization point has a wrong dimension");
32 int nStates = inSize/7;
33 if(nStates != 1)
throw VertexException(
"PointingKinematicConstraint::Current version does not support the multistate refit");
40 return std::pair<AlgebraicMatrix,AlgebraicVector>(dr,lPar);
45 int nStates = par.size();
46 if(nStates == 0)
throw VertexException(
"PointingKinematicConstraint::Empty vector of particles passed");
47 if(nStates != 1)
throw VertexException(
"PointingKinematicConstraint::Current version does not support the multistate refit");
50 AlgebraicVector lPoint = asHepVector<7>(par.front()->currentState().kinematicParameters().vector());
57 return std::pair<AlgebraicMatrix,AlgebraicVector>(dr,lPoint);
62 int nStates = par.size();
63 if(nStates == 0)
throw VertexException(
"PointingKinematicConstraint::Empty vector of particles passed");
64 if(nStates != 1)
throw VertexException(
"PointingKinematicConstraint::Current version does not support the multistate refit");
66 AlgebraicVector lPoint = asHepVector<7>(par.front()->currentState().kinematicParameters().vector());
72 return std::pair<AlgebraicVector,AlgebraicVector>(vl,lPoint);
96 double cos_phi_p = px/
sqrt(px*px + py*py);
97 double sin_phi_p = py/
sqrt(px*px + py*py);
98 double cos_phi_x = dx/
sqrt(dx*dx + dy*dy);
99 double sin_phi_x = dy/
sqrt(dx*dx + dy*dy);
101 double sin_theta_p = pz/
sqrt(px*px + py*py + pz*pz);
102 double sin_theta_x = dz/
sqrt(dx*dx + dy*dy + dz*dz);
104 double cos_theta_p =
sqrt(px*px + py*py)/
sqrt(px*px + py*py + pz*pz);
105 double cos_theta_x =
sqrt(dx*dx + dy*dy)/
sqrt(dx*dx + dy*dy + dz*dz);
107 float feq = sin_phi_p*cos_phi_x - cos_phi_p*sin_phi_x;
108 float seq = sin_theta_p* cos_theta_x - cos_theta_p * sin_theta_x;
113 return std::pair<AlgebraicVector,AlgebraicVector>(vl,
point);
123 double px =
point(4);
124 double py =
point(5);
125 double pz =
point(6);
131 dr(1,1) = (dy*(dx*px + dy*py))/(
pow(
pow(dx,2) +
pow(dy,2),1.5)*
sqrt(
pow(px,2) +
pow(py,2))) ;
133 dr(1,2) = -((dx*(dx*px + dy*py))/(
pow(
pow(dx,2) +
pow(dy,2),1.5)*
sqrt(
pow(px,2) +
pow(py,2)))) ;
139 dr(1,4) = -((py*(dx*px + dy*py))/(
sqrt(
pow(dx,2) +
pow(dy,2))*
pow(
pow(px,2) +
pow(py,2),1.5)));
141 dr(1,5) = (px*(dx*px + dy*py))/(
sqrt(
pow(dx,2) +
pow(dy,2))*
pow(
pow(px,2) +
pow(py,2),1.5));
180 return std::pair<AlgebraicMatrix,AlgebraicVector>(dr,
point);
virtual int numberOfEquations() const
std::pair< AlgebraicVector, AlgebraicVector > makeValue(const AlgebraicVector &exPoint) const
virtual std::pair< AlgebraicVector, AlgebraicVector > value(const AlgebraicVector &exPoint) const
virtual AlgebraicVector deviations(int nStates) const
CLHEP::HepMatrix AlgebraicMatrix
virtual std::pair< AlgebraicMatrix, AlgebraicVector > derivative(const AlgebraicVector &exPoint) const
CLHEP::HepVector AlgebraicVector
std::pair< AlgebraicMatrix, AlgebraicVector > makeDerivative(const AlgebraicVector &exPoint) const
Power< A, B >::type pow(const A &a, const B &b)
*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