1 #ifndef ConeDefinition_h 2 #define ConeDefinition_h 27 double dotprod = caloIntersectUnitVector.
dot(rechitUnitVector);
28 double rechitdist = caloIntersectVector.mag()/dotprod;
31 const GlobalVector effectiveRechitVector = rechitdist*rechitUnitVector;
32 const GlobalPoint effectiveRechitPoint(effectiveRechitVector.
x(),
33 effectiveRechitVector.
y(),
34 effectiveRechitVector.
z());
37 GlobalVector distance_vector = effectiveRechitPoint-caloPoint;
41 return distance_vector.
mag();
68 double dotprod_denominator = caloUnitVector.
dot(rechitUnitVector);
69 double dotprod_numerator = caloUnitVector.dot(caloIntersectVector);
70 double rechitdist = dotprod_numerator/dotprod_denominator;
72 const GlobalVector effectiveRechitVector = rechitdist*rechitUnitVector;
73 const GlobalPoint effectiveRechitPoint(effectiveRechitVector.
x(),
74 effectiveRechitVector.
y(),
75 effectiveRechitVector.
z());
76 GlobalVector distance_vector = effectiveRechitPoint-caloPoint;
77 if (dotprod_denominator > 0. && dotprod_numerator > 0.)
80 return distance_vector.
mag();
117 const GlobalVector heightVector = trackDirection*coneHeight;
126 const GlobalVector coneBaseVector = heightVector+caloIntersectVector;
129 const GlobalPoint coneBasePoint(coneBaseVector.x(),
155 double rechitdist = trackDirection.
dot(coneBaseVector)/trackDirection.
dot(rechitDirection);
160 const GlobalVector effectiveRechitVector = rechitdist*rechitDirection;
161 const GlobalPoint effectiveRechitPoint(effectiveRechitVector.
x(),
162 effectiveRechitVector.
y(),
163 effectiveRechitVector.
z());
166 GlobalVector distance_vector = effectiveRechitPoint-coneBasePoint;
167 return distance_vector.
mag();
double getDistInPlaneTrackDir(const GlobalPoint caloPoint, const GlobalVector caloVector, const GlobalPoint rechitPoint)
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
double getDistInPlane(const GlobalVector trackDirection, const GlobalPoint caloPoint, const GlobalPoint rechitPoint, double coneHeight)
Vector3DBase unit() const
double getDistInPlaneSimple(const GlobalPoint caloPoint, const GlobalPoint rechitPoint)