2 #include "../include/vertexfunctionclassic.h"
4 #include "../include/gausstube.h"
5 #include "../include/gaussellipsoid.h"
6 #include "../include/interactionpoint.h"
7 #include "../../util/inc/vector3.h"
9 namespace vertex_lcfi {
namespace ZVTOP
17 for (std::vector<Track*>::iterator iTrack = Tracks.begin();iTrack != Tracks.end();++iTrack)
20 _AllElements.push_back(element);
21 _Tubes.push_back(element);
22 _ElementsNewedByThis.push_back(element);
33 for (std::vector<Track*>::iterator iTrack = Tracks.begin();iTrack != Tracks.end();++iTrack)
36 _AllElements.push_back(element);
37 _Tubes.push_back(element);
38 _ElementsNewedByThis.push_back(element);
43 _AllElements.push_back(element);
45 _ElementsNewedByThis.push_back(element);
55 for (std::vector<VertexFunctionElement*>::iterator iElement = _ElementsNewedByThis.begin();iElement != _ElementsNewedByThis.end();++iElement)
63 double SumOfTubes = 0;
64 double SumOfSquaredTubes = 0;
70 for (std::vector<GaussTube*>::const_iterator iTube = _Tubes.begin();iTube != _Tubes.end();++iTube)
72 double Tube = (*iTube)->valueAt(Point);
74 SumOfSquaredTubes += (Tube*Tube);
80 IPValue = _Ellipsoid->
valueAt(Point);
86 dlong = Point.subtract(_Ellipsoid->
ip()->
position()).dot(_JetAxis) / _JetAxis.mag();
93 dtran = sqrt(dmag*dmag - dlong*dlong);
99 double alpha = acos((dlong + 0.01) / sqrt(((dlong + 0.01)*(dlong + 0.01)) + (dtran - 0.005)*(dtran - 0.005)));
100 return exp(-_Kalpha*alpha*alpha)*((_Kip*IPValue) + SumOfTubes - ( ((_Kip*IPValue*IPValue)+SumOfSquaredTubes) / ((_Kip*IPValue)+SumOfTubes)));
103 return (_Kip*IPValue) + SumOfTubes - ( ((_Kip*IPValue*IPValue)+SumOfSquaredTubes) / ((_Kip*IPValue)+SumOfTubes));
double valueAt(const Vector3 &Point) const
Calculate the value of the ellipsoid at a point.
Interaction Point representation.
double valueAt(const Vector3 &Point) const
Find the value of the vertex function at Point.
const Vector3 & position() const
Return position of IP.
VertexFunctionClassic(std::vector< Track * > &Tracks, const double Kip, const double Kalpha, const Vector3 &JetAxis)
Constructor.
double distanceTo(const Vector3 &Point) const
Return distance from this interacion point to a point.
~VertexFunctionClassic()
Destructor.
Matrix3x3 firstDervAt(const Vector3 &Point) const
Find the spacial derivative of the vertex function at Point (not implemented)
Gaussian tube component of the vertex function.
InteractionPoint * ip()
InteractionPoint object used.
Gaussian ellipsoid component of the vertex function.
Matrix3x3 secondDervAt(const Vector3 &Point) const
Find the 2nd spacial derivative of the vertex function at Point (not implemented) ...