1 #ifndef ColinearityKinematicConstraintT_H 2 #define ColinearityKinematicConstraintT_H 23 template<enum colinearityKinematic::Constra
intDim Dim>
43 void init(
const std::vector<KinematicState>& states,
45 if(states.size()!=2)
throw VertexException(
"ColinearityKinematicConstraint::<2 states passed");
49 a_1 = -states[0].particleCharge()*fieldValue.
z();
50 a_2 = -states[1].particleCharge()*fieldValue.
z();
52 p1 = states[0].kinematicParameters().vector();
53 p2 = states[1].kinematicParameters().vector();
71 virtual void fillValue()
const;
79 virtual void fillParametersDerivative()
const;
86 virtual void fillPositionDerivative()
const;
92 template<enum colinearityKinematic::Constra
intDim Dim>
97 double p1vx =
p1(3) - a_1*(
point.y() -
p1(1));
98 double p1vy =
p1(4) + a_1*(
point.x() -
p1(0));
100 double p2vx =
p2(3) - a_2*(
point.y() -
p2(1));
101 double p2vy =
p2(4) + a_2*(
point.x() -
p2(0));
105 vl(0) = atan2(p1vy,p1vx) - atan2(p2vy,p2vx);
106 if ( vl(0) >
M_PI ) vl(0) -= 2.0*
M_PI;
107 if ( vl(0) <= -
M_PI ) vl(0) += 2.0*
M_PI;
112 vl(1) = atan2(pt1,
p1(5)) - atan2(pt2,
p2(5));
113 if ( vl(1) >
M_PI ) vl(1) -= 2.0*
M_PI;
114 if ( vl(1) <= -
M_PI ) vl(1) += 2.0*
M_PI;
118 template<enum colinearityKinematic::Constra
intDim Dim>
124 double p1vx =
p1(3) - a_1*(
point.y() -
p1(1));
125 double p1vy =
p1(4) + a_1*(
point.x() -
p1(0));
126 double k1 = 1.0/(p1vx*p1vx + p1vy*p1vy);
128 double p2vx =
p2(3) - a_2*(
point.y() -
p2(1));
129 double p2vy =
p2(4) + a_2*(
point.x() -
p2(0));
130 double k2 = 1.0/(p2vx*p2vx + p2vy*p2vy);
135 jac_d(0,0) = -k1*a_1*p1vx;
136 jac_d(0,7) = k2*a_2*p2vx;
139 jac_d(0,1) = -k1*a_1*p1vy;
140 jac_d(0,8) = k2*a_2*p2vy;
143 jac_d(0,2) = 0.; jac_d(0,9) = 0.;
146 jac_d(0,3) = -k1*p1vy;
147 jac_d(0,10) = k2*p2vy;
150 jac_d(0,4) = k1*p1vx;
151 jac_d(0,11) = -k2*p2vx;
155 jac_d(0,5) = 0.; jac_d(0,12) = 0.;
157 jac_d(0,6) = 0.; jac_d(0,13) = 0.;
167 jac_d(1,0) = 0.; jac_d(1,7) = 0.;
170 jac_d(1,1) = 0.; jac_d(1,8) = 0.;
173 jac_d(1,2) = 0.; jac_d(1,9) = 0.;
175 jac_d(1,3) =
p1(3) * (
p1(5)/(pTot1*
pt1));
176 jac_d(1,10) =
p2(3) * (-
p2(5)/(pTot2*
pt2));
179 jac_d(1,4) =
p1(4) * (
p1(5)/(pTot1*
pt1));
180 jac_d(1,11) =
p2(4) * (-
p2(5)/(pTot2*
pt2));
183 jac_d(1,5) = - pt1/pTot1;
184 jac_d(1,12) = pt2/pTot2;
187 jac_d(1,6) = 0.; jac_d(1,13) = 0.;
191 template<enum colinearityKinematic::Constra
intDim Dim>
197 double p1vx =
p1(3) - a_1*(
point.y() -
p1(1));
198 double p1vy =
p1(4) + a_1*(
point.x() -
p1(0));
199 double k1 = 1.0/(p1vx*p1vx + p1vy*p1vy);
201 double p2vx =
p2(3) - a_2*(
point.y() -
p2(1));
202 double p2vy =
p2(4) + a_2*(
point.x() -
p2(0));
203 double k2 = 1.0/(p2vx*p2vx + p2vy*p2vy);
208 jac_e(0,0) = k1*a_1*p1vx - k2*a_2*p2vx;
211 jac_e(0,1) = k1*a_1*p1vy - k2*a_2*p2vy;
ROOT::Math::SMatrix< double, DIM, 3 > positionDerivativeType
virtual void fillPositionDerivative() const
ROOT::Math::SMatrix< double, DIM, 7 *NTRK > parametersDerivativeType
ROOT::Math::SVector< double, 7 > AlgebraicVector7
void init(const std::vector< KinematicState > &states, const GlobalPoint &ipoint, const GlobalVector &fieldValue)
virtual ColinearityKinematicConstraintT< Dim > * clone() const
MultiTrackKinematicConstraintT< 2, int(Dim)> super
ROOT::Math::SVector< double, DIM > valueType
virtual int numberOfEquations() const
ColinearityKinematicConstraintT()
virtual void fillValue() 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
virtual void fillParametersDerivative() const