1 #ifndef ConeDefinition_h 2 #define ConeDefinition_h 13 const GlobalVector caloIntersectVector(caloPoint.
x(), caloPoint.
y(), caloPoint.
z());
17 const GlobalVector rechitVector(rechitPoint.
x(), rechitPoint.
y(), rechitPoint.
z());
20 double dotprod = caloIntersectUnitVector.
dot(rechitUnitVector);
21 double rechitdist = caloIntersectVector.mag() / dotprod;
23 const GlobalVector effectiveRechitVector = rechitdist * rechitUnitVector;
25 effectiveRechitVector.
x(), effectiveRechitVector.
y(), effectiveRechitVector.
z());
27 GlobalVector distance_vector = effectiveRechitPoint - caloPoint;
30 return distance_vector.
mag();
42 const GlobalVector caloIntersectVector(caloPoint.
x(), caloPoint.
y(),
46 const GlobalVector rechitVector(rechitPoint.
x(), rechitPoint.
y(), rechitPoint.
z());
48 double dotprod_denominator = caloUnitVector.
dot(rechitUnitVector);
49 double dotprod_numerator = caloUnitVector.dot(caloIntersectVector);
50 double rechitdist = dotprod_numerator / dotprod_denominator;
52 const GlobalVector effectiveRechitVector = rechitdist * rechitUnitVector;
54 effectiveRechitVector.
x(), effectiveRechitVector.
y(), effectiveRechitVector.
z());
55 GlobalVector distance_vector = effectiveRechitPoint - caloPoint;
56 if (dotprod_denominator > 0. && dotprod_numerator > 0.) {
57 return distance_vector.
mag();
87 const GlobalVector heightVector = trackDirection * coneHeight;
91 const GlobalVector caloIntersectVector(caloPoint.
x(), caloPoint.
y(), caloPoint.
z());
94 const GlobalVector coneBaseVector = heightVector + caloIntersectVector;
97 const GlobalPoint coneBasePoint(coneBaseVector.x(), coneBaseVector.y(), coneBaseVector.z());
100 const GlobalVector rechitVector(rechitPoint.
x(), rechitPoint.
y(), rechitPoint.
z());
119 double rechitdist = trackDirection.
dot(coneBaseVector) / trackDirection.
dot(rechitDirection);
124 const GlobalVector effectiveRechitVector = rechitdist * rechitDirection;
126 effectiveRechitVector.
x(), effectiveRechitVector.
y(), effectiveRechitVector.
z());
128 GlobalVector distance_vector = effectiveRechitPoint - coneBasePoint;
129 return distance_vector.
mag();
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
double getDistInPlaneTrackDir(const GlobalPoint caloPoint, const GlobalVector caloVector, const GlobalPoint rechitPoint)
double getDistInPlane(const GlobalVector trackDirection, const GlobalPoint caloPoint, const GlobalPoint rechitPoint, double coneHeight)
double getDistInPlaneSimple(const GlobalPoint caloPoint, const GlobalPoint rechitPoint)
Vector3DBase unit() const