9 #include "CLHEP/Vector/ThreeVector.h"
10 #include "CLHEP/Vector/LorentzVector.h"
11 #include "CLHEP/Matrix/Vector.h"
27 return pair<bool, Measurement1D>(
false,
Measurement1D(0., 0.));
33 return pair<bool, Measurement1D>(
72 GlobalPoint impactPoint = closestOnTransversePlaneState.globalPosition();
73 GlobalVector IPVec(impactPoint.x() - vertex.
x(), impactPoint.y() - vertex.
y(), 0.);
74 double prod = IPVec.dot(direction);
75 double sign = (prod >= 0) ? 1. : -1.;
78 return pair<bool, Measurement1D>(result.first,
Measurement1D(sign * result.second.value(), result.second.error()));
96 GlobalPoint impactPoint = closestIn3DSpaceState.globalPosition();
97 GlobalVector IPVec(impactPoint.x() - vertex.
x(), impactPoint.y() - vertex.
y(), impactPoint.z() - vertex.
z());
98 double prod = IPVec.dot(direction);
99 double sign = (prod >= 0) ? 1. : -1.;
102 return pair<bool, Measurement1D>(result.first,
Measurement1D(sign * result.second.value(), result.second.error()));
109 if (!closestToJetState.
isValid()) {
110 return pair<bool, Measurement1D>(
false,
Measurement1D(0., 0.));
116 double decayLen = jetDirection.dot(closestToJetState.
globalPosition() - vertexPosition);
121 j[0] = jetDirection.x();
122 j[1] = jetDirection.y();
123 j[2] = jetDirection.z();
125 jj[0] = jetDirection.x();
126 jj[1] = jetDirection.y();
127 jj[2] = jetDirection.z();
134 double vertexError2 = ROOT::Math::Similarity(j, vertex.
covariance());
136 double decayLenError =
sqrt(trackError2 + vertexError2);
138 return pair<bool, Measurement1D>(
true,
Measurement1D(decayLen, decayLenError));
145 if (!closestToJetState.
isValid()) {
146 return pair<bool, Measurement1D>(
false,
Measurement1D(0., 0.));
153 double theDistanceAlongJetAxis = jetDir.dot(flightDistance);
154 double signedIP = impactParameter.mag() *
155 ((theDistanceAlongJetAxis != 0) ? theDistanceAlongJetAxis /
abs(theDistanceAlongJetAxis) : 1.);
163 deriv_v[0] = -ipDirection.
x();
164 deriv_v[1] = -ipDirection.y();
165 deriv_v[2] = -ipDirection.z();
168 deriv[0] = ipDirection.x();
169 deriv[1] = ipDirection.y();
170 deriv[2] = ipDirection.z();
171 deriv[3] = -(momentumDir.dot(flightDistance) * ipDirection.x()) / momentumAtClosestPoint.mag();
172 deriv[4] = -(momentumDir.dot(flightDistance) * ipDirection.y()) / momentumAtClosestPoint.mag();
173 deriv[5] = -(momentumDir.dot(flightDistance) * ipDirection.z()) / momentumAtClosestPoint.mag();
175 double trackError2 = ROOT::Math::Similarity(deriv, closestToJetState.
cartesianError().
matrix());
176 double vertexError2 = ROOT::Math::Similarity(deriv_v, vertex.
covariance());
177 double ipError =
sqrt(trackError2 + vertexError2);
179 return pair<bool, Measurement1D>(
true,
Measurement1D(signedIP, ipError));
203 return trackLine.distance(tmp);
209 double theLDist_err(0.);
215 if (!stateAtOrigin.
isValid()) {
217 return pair<bool, Measurement1D>(
false,
Measurement1D(0., 0.));
223 Line trackLine(posTrack, dirTrack);
229 Line jetLine(posJet, dirJet);
233 double theDistanceToJetAxis = (jetLine.
distance(trackLine)).
mag();
235 theDistanceToJetAxis = -theDistanceToJetAxis;
239 GlobalVector Q = dirTrack - jetVector.dot(dirTrack) * jetVector;
240 GlobalVector P = jetVector - jetVector.dot(dirTrack) * dirTrack;
241 double theDistanceAlongJetAxis = P.dot(V - posTrack) / Q.dot(dirTrack);
253 CLHEP::HepVector Hh(3);
272 return pair<double, Measurement1D>(theDistanceAlongJetAxis, DTJA);
reco::Vertex::Point convertPos(const GlobalPoint &p)
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
double y() const
y coordinate
reco::Vertex::Error convertError(const GlobalError &ge)
Global3DPoint GlobalPoint
const CartesianTrajectoryError cartesianError() const
GlobalPoint globalPosition() const
const MagneticField * field() const
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
const Point & position() const
position
GlobalVector distance(const Line &aLine) const
PositionType position() const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t V
Abs< T >::type abs(const T &t)
double z() const
z coordinate
const AlgebraicSymMatrix66 & matrix() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
Vector3DBase unit() const
double x() const
x coordinate
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
const GlobalError position() const
Position error submatrix.
std::pair< OmniClusterRef, TrackingParticleRef > P
Error error() const
return SMatrix
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
GlobalVector globalMomentum() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
ROOT::Math::SVector< double, 6 > AlgebraicVector6
TrajectoryStateOnSurface impactPointState() 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
Basic3DVector unit() const