Belle II Software development
CDCTrajectory2D Class Reference

Particle trajectory as it is seen in xy projection represented as a circle. More...

#include <CDCTrajectory2D.h>

Public Member Functions

 CDCTrajectory2D ()
 Default constructor for ROOT compatibility.
 
 CDCTrajectory2D (const UncertainPerigeeCircle &perigeeCircle)
 Constructs a trajectory from a generalized circle.
 
 CDCTrajectory2D (const ROOT::Math::XYVector &localOrigin, const UncertainPerigeeCircle &localPerigeeCircle, double flightTime=NAN)
 Constructs a trajectory from a generalized circle and a start point.
 
 CDCTrajectory2D (const ROOT::Math::XYVector &pos2D, double time, const ROOT::Math::XYVector &mom2D, double charge, double bZ)
 Construct a trajectory with given start point, transverse momentum at the start point, the given charge and the magnetic field value in z direction.
 
 CDCTrajectory2D (const ROOT::Math::XYVector &pos2D, double time, const ROOT::Math::XYVector &mom2D, double charge)
 Construct a trajectory with given start point, transverse momentum at the start point and given charge.
 
bool isFitted () const
 Checks if the circle is already set to a valid value.
 
void clear ()
 Clears all information from this trajectory.
 
void reverse ()
 Reverses the trajectory in place.
 
CDCTrajectory2D reversed () const
 Returns the reverse trajectory as a copy.
 
std::array< double, 2 > reconstructBothZ (const CDC::WireLine &wireLine, double distance=0.0, double z=0) const
 Gives the two z positions where the given drift circle on the wire line touches the trajectory.
 
double reconstructZ (const CDC::WireLine &wireLine, double distance=0.0, double z=0) const
 Gives the one z positions within the CDC closest to the given z where the given drift circle on the wire line touches the trajectory.
 
std::array< ROOT::Math::XYZVector, 2 > reconstructBoth3D (const CDC::WireLine &wireLine, double distance=0.0, double z=0) const
 Gives the two three dimensional points where the drift circle touches the wire line.
 
ROOT::Math::XYZVector reconstruct3D (const CDC::WireLine &wireLine, double distance=0.0, double z=0) const
 Gives the one three dimensional positions within the CDC closest to the given z where the given drift circle on the wire line touches the trajectory.
 
ROOT::Math::XYVector getClosest (const ROOT::Math::XYVector &point) const
 Calculates the closest approach on the trajectory to the given point.
 
CDC::ISuperLayer getNextISuperLayer () const
 Indicates which superlayer the trajectory traverses after the one, where the start point of the trajectory is located.
 
CDC::ISuperLayer getPreviousISuperLayer () const
 Indicates which superlayer the trajectory traverses before the one, where the start point of the trajectory is located.
 
CDC::ISuperLayer getNextAxialISuperLayer () const
 Indicates which axial superlayer the trajectory traverses after the one, where the start point of the trajectory is located.
 
CDC::ISuperLayer getPreviousAxialISuperLayer () const
 Indicates which axial superlayer the trajectory traverses before the one, where the start point of the trajectory is located.
 
CDC::ISuperLayer getMaximalISuperLayer () const
 Indicates the maximal superlayer the trajectory traverses.
 
CDC::ISuperLayer getStartISuperLayer () const
 Indicates the superlayer the trajectory starts in.
 
CDC::ISuperLayer getMinimalISuperLayer () const
 Indicates the minimal superlayer the trajectory traverses.
 
template<class AHits>
EForwardBackward isForwardOrBackwardTo (const AHits &hits) const
 Calculates if this trajectory and the hits are coaligned Returns:
 
template<class AFromHits, class AToHits>
double getArcLength2DGap (const AFromHits &fromHits, const AToHits &toHits) const
 Calculates the perpendicular travel distance from the last position of the fromHits to the first position of the toHits.
 
template<class AFromHits, class AToHits>
double getArcLength2DFrontOffset (const AFromHits &fromHits, const AToHits &toHits) const
 Calculates the perpendicular travel distance from the first position of the fromHits to the first position of the toHits.
 
template<class AFromHits, class AToHits>
double getArcLength2DBackOffset (const AFromHits &fromHits, const AToHits &toHits) const
 Calculates the perpendicular travel distance from the last position of the fromHits to the last position of the toHits.
 
template<class AHits>
double getTotalArcLength2D (const AHits &hits) const
 Calculates the perpendicular travel distance from the first position of the hits to the last position of the hits.
 
double calcArcLength2D (const ROOT::Math::XYVector &point) const
 Calculate the travel distance from the start position of the trajectory.
 
double calcArcLength2DBetween (const ROOT::Math::XYVector &fromPoint, const ROOT::Math::XYVector &toPoint) const
 Calculate the travel distance between the two given positions Returns the travel distance on the trajectory from the first given point to
the second given point.
 
double getArcLength2DPeriod () const
 Getter for the arc length for one round trip around the trajectory.
 
void setPosMom2D (const ROOT::Math::XYVector &pos2D, const ROOT::Math::XYVector &mom2D, double charge)
 Setter for start point and momentum at the start point subjected to the charge sign.
 
ESign getChargeSign () const
 Gets the charge sign of the trajectory.
 
double getAbsMom2D (double bZ) const
 Get the estimation for the absolute value of the transvers momentum.
 
double getAbsMom2D () const
 Get the estimation for the absolute value of the transvers momentum.
 
ROOT::Math::XYVector getMom2DAtSupport (const double bZ) const
 Get the momentum at the support point of the trajectory.
 
ROOT::Math::XYVector getMom2DAtSupport () const
 Get the momentum at the support point of the trajectory.
 
ROOT::Math::XYVector getFlightDirection2D (const ROOT::Math::XYVector &point) const
 Get the unit direction of flight at the given point, where arcLength2D = 0.
 
ROOT::Math::XYVector getFlightDirection2DAtSupport () const
 Get the unit direction of flight at the support point, where arcLength2D = 0.
 
bool isMovingOutward () const
 Indicates if the trajectory is moving outwards or inwards (to or away from the origin) from the start point on.
 
ROOT::Math::XYVector getPos2DAtArcLength2D (double arcLength2D)
 Getter for the position at a given two dimensional arc length.
 
ROOT::Math::XYVector getSupport () const
 Get the support point of the trajectory in global coordinates.
 
ROOT::Math::XYVector getGlobalPerigee () const
 Getter for the closest approach on the trajectory to the global origin.
 
ROOT::Math::XYVector getGlobalCenter () const
 Getter for the center of the trajectory in global coordinates.
 
ROOT::Math::XYVector getOuterExit (double factor=1) const
 Calculates the point where the trajectory meets the outer wall of the CDC.
 
ROOT::Math::XYVector getInnerExit () const
 Calculates the point where the trajectory meets the inner wall of the CDC.
 
ROOT::Math::XYVector getExit () const
 Calculates the point where the trajectory leaves the CDC.
 
bool isCurler (double factor=1) const
 Checks if the trajectory leaves the outer radius of the CDC times the given tolerance factor.
 
bool isOriginer (double factor=1) const
 Checks if the trajectory intersects with the inner radius of the CDC time the given tolerance factor.
 
double getMaximalCylindricalR () const
 Getter for the maximal distance from the origin.
 
double getMinimalCylindricalR () const
 Getter for the minimal distance from the origin - same as absolute value of the impact parameter.
 
double getGlobalImpact () const
 Getter for the signed impact parameter of the trajectory.
 
double getDist2D (const ROOT::Math::XYVector &point) const
 Calculates the distance from the point to the trajectory as seen from the xy projection.
 
ERightLeft isRightOrLeft (const ROOT::Math::XYVector &point) const
 Checks if the given point is to the right or to the left of the trajectory.
 
double getCurvature () const
 Getter for the curvature as seen from the xy projection.
 
double getLocalCovariance (EPerigeeParameter iRow, EPerigeeParameter iCol) const
 Getter for an individual element of the covariance matrix of the local helix parameters.
 
double getLocalVariance (EPerigeeParameter i) const
 Getter for an individual diagonal element of the covariance matrix of the local helix parameters.
 
PerigeeCircle getGlobalCircle () const
 Getter for the circle in global coordinates.
 
void setGlobalCircle (const UncertainPerigeeCircle &perigeeCircle)
 Setter for the generalized circle that describes the trajectory.
 
const UncertainPerigeeCirclegetLocalCircle () const
 Getter for the circle in local coordinates.
 
double getPValue () const
 Getter for p-value.
 
double getChi2 () const
 Getter for the chi2 value of the circle fit.
 
void setChi2 (const double chi2)
 Setter for the chi square value of the circle fit.
 
size_t getNDF () const
 Getter for the number of degrees of freedom of the circle fit.
 
void setNDF (std::size_t ndf)
 Setter for the number of degrees of freedom of the circle fit.
 
void setLocalCircle (const UncertainPerigeeCircle &localPerigeeCircle)
 Setter for the generalized circle that describes the trajectory.
 
const ROOT::Math::XYVector & getLocalOrigin () const
 Getter for the origin of the local coordinate system.
 
double setLocalOrigin (const ROOT::Math::XYVector &localOrigin)
 Setter for the origin of the local coordinate system.
 
double getFlightTime () const
 Getter for the time when the particle reached the support point position.
 
void setFlightTime (double flightTime)
 Setter for the time when the particle reached the support point position.
 

Private Member Functions

CDC::ISuperLayer getISuperLayerAfter (CDC::ISuperLayer iSuperLayer, bool movingOutward) const
 Returns which superlayer is traversed after the current one following the trajectory outward or inward as indicated by the boolean input.
 
CDC::ISuperLayer getISuperLayerAfterStart (bool movingOutward) const
 Returns which superlayer is traversed after the current one following the trajectory outward or inward as indicated by the boolean input.
 
CDC::ISuperLayer getISuperLayerAfterStart (EForwardBackward forwardBackwardInfo) const
 Indicates which superlayer is traversed after the current one following the trajectory forward or backward as indicated by the input.
 
CDC::ISuperLayer getAxialISuperLayerAfterStart (EForwardBackward forwardBackwardInfo) const
 Indicates which axial superlayer is traversed after the one, where the start point of the trajectory is located considering if you want to follow the trajectory in the forward or backward direction.
 

Private Attributes

ROOT::Math::XYVector m_localOrigin
 Memory for local coordinate origin of the circle representing the trajectory in global coordinates.
 
UncertainPerigeeCircle m_localPerigeeCircle
 Memory for the generalized circle describing the trajectory in coordinates from the local origin.
 
double m_flightTime = NAN
 Memory for the estimation of the time at which the particle arrived at the support point.
 

Detailed Description

Particle trajectory as it is seen in xy projection represented as a circle.

Definition at line 39 of file CDCTrajectory2D.h.

Constructor & Destructor Documentation

◆ CDCTrajectory2D() [1/5]

Default constructor for ROOT compatibility.

Definition at line 37 of file CDCTrajectory2D.cc.

40{
41}
ROOT::Math::XYVector m_localOrigin
Memory for local coordinate origin of the circle representing the trajectory in global coordinates.
UncertainPerigeeCircle m_localPerigeeCircle
Memory for the generalized circle describing the trajectory in coordinates from the local origin.

◆ CDCTrajectory2D() [2/5]

CDCTrajectory2D ( const UncertainPerigeeCircle & perigeeCircle)
explicit

Constructs a trajectory from a generalized circle.

Constructs a trajectory which is described by the given line or circle. The start point is set to the closest approach to the origin.

Definition at line 43 of file CDCTrajectory2D.cc.

44 : m_localOrigin(0.0, 0.0)
45 , m_localPerigeeCircle(perigeeCircle)
46{
47}

◆ CDCTrajectory2D() [3/5]

CDCTrajectory2D ( const ROOT::Math::XYVector & localOrigin,
const UncertainPerigeeCircle & localPerigeeCircle,
double flightTime = NAN )

Constructs a trajectory from a generalized circle and a start point.

Constructs a trajectory which is described by the given line or circle and starts in the given point. The point is taken to be the closest approach to the circle.

Definition at line 49 of file CDCTrajectory2D.cc.

52 : m_localOrigin(localOrigin)
53 , m_localPerigeeCircle(localPerigeeCircle)
54 , m_flightTime(flightTime)
55{
56}
double m_flightTime
Memory for the estimation of the time at which the particle arrived at the support point.

◆ CDCTrajectory2D() [4/5]

CDCTrajectory2D ( const ROOT::Math::XYVector & pos2D,
double time,
const ROOT::Math::XYVector & mom2D,
double charge,
double bZ )

Construct a trajectory with given start point, transverse momentum at the start point, the given charge and the magnetic field value in z direction.

Definition at line 58 of file CDCTrajectory2D.cc.

63 : m_localOrigin(pos2D)
65 VectorUtil::unit(mom2D),
66 0.0)
67 , m_flightTime(time)
68{
69}
static double absMom2DToCurvature(double absMom2D, double charge, double bZ)
Conversion helper for momenta to two dimensional curvature.

◆ CDCTrajectory2D() [5/5]

CDCTrajectory2D ( const ROOT::Math::XYVector & pos2D,
double time,
const ROOT::Math::XYVector & mom2D,
double charge )

Construct a trajectory with given start point, transverse momentum at the start point and given charge.

Definition at line 71 of file CDCTrajectory2D.cc.

75 : m_localOrigin(pos2D)
77 VectorUtil::unit(mom2D),
78 0.0)
79 , m_flightTime(time)
80{
81}

Member Function Documentation

◆ calcArcLength2D()

double calcArcLength2D ( const ROOT::Math::XYVector & point) const
inline

Calculate the travel distance from the start position of the trajectory.

Returns the travel distance on the trajectory from the start point to
the given point. This is subjected to a discontinuity at the far point
of the circle. Hence the value return is in the range from -pi*radius to pi*radius
If you have a heavily curling track you have care about the feasibility of this
calculation.

Definition at line 263 of file CDCTrajectory2D.h.

264 {
265 return getLocalCircle()->arcLengthBetween(ROOT::Math::XYVector(0.0, 0.0), point - getLocalOrigin());
266 }

◆ calcArcLength2DBetween()

double calcArcLength2DBetween ( const ROOT::Math::XYVector & fromPoint,
const ROOT::Math::XYVector & toPoint ) const
inline

Calculate the travel distance between the two given positions Returns the travel distance on the trajectory from the first given point to
the second given point.

This is subjected to a discontinuity at the far point
of the circle. Hence the value return is in the range from -pi*radius to pi*radius
If you have a heavily curling track you have care about the feasibility of this
calculation.

Definition at line 276 of file CDCTrajectory2D.h.

277 {
278 return getLocalCircle()->arcLengthBetween(fromPoint - getLocalOrigin(),
279 toPoint - getLocalOrigin());
280 }

◆ clear()

void clear ( )

Clears all information from this trajectory.

Definition at line 88 of file CDCTrajectory2D.cc.

89{
90 m_localOrigin.SetXY(0.0, 0.0);
91 m_localPerigeeCircle.invalidate();
92 m_flightTime = NAN;
93}

◆ getAbsMom2D() [1/2]

double getAbsMom2D ( ) const

Get the estimation for the absolute value of the transvers momentum.

Definition at line 291 of file CDCTrajectory2D.cc.

292{
293 ROOT::Math::XYVector position = getSupport();
294 return CDCBFieldUtil::curvatureToAbsMom2D(getLocalCircle()->curvature(), position);
295}
static double curvatureToAbsMom2D(double curvature, double bZ)
Conversion helper for two dimensional curvature to momenta.
ROOT::Math::XYVector getSupport() const
Get the support point of the trajectory in global coordinates.
const UncertainPerigeeCircle & getLocalCircle() const
Getter for the circle in local coordinates.

◆ getAbsMom2D() [2/2]

double getAbsMom2D ( double bZ) const

Get the estimation for the absolute value of the transvers momentum.

Definition at line 286 of file CDCTrajectory2D.cc.

287{
288 return CDCBFieldUtil::curvatureToAbsMom2D(getLocalCircle()->curvature(), bZ);
289}

◆ getArcLength2DBackOffset()

template<class AFromHits, class AToHits>
double getArcLength2DBackOffset ( const AFromHits & fromHits,
const AToHits & toHits ) const
inline

Calculates the perpendicular travel distance from the last position of the fromHits to the last position of the toHits.

Definition at line 237 of file CDCTrajectory2D.h.

238 {
239 const ROOT::Math::XYVector& fromRecoPos2D = fromHits.back().getRecoPos2D();
240 const ROOT::Math::XYVector& toRecoPos2D = toHits.back().getRecoPos2D();
241 return calcArcLength2DBetween(fromRecoPos2D, toRecoPos2D);
242 }

◆ getArcLength2DFrontOffset()

template<class AFromHits, class AToHits>
double getArcLength2DFrontOffset ( const AFromHits & fromHits,
const AToHits & toHits ) const
inline

Calculates the perpendicular travel distance from the first position of the fromHits to the first position of the toHits.

Definition at line 225 of file CDCTrajectory2D.h.

226 {
227 const ROOT::Math::XYVector& fromRecoPos2D = fromHits.front().getRecoPos2D();
228 const ROOT::Math::XYVector& toRecoPos2D = toHits.front().getRecoPos2D();
229 return calcArcLength2DBetween(fromRecoPos2D, toRecoPos2D);
230 }

◆ getArcLength2DGap()

template<class AFromHits, class AToHits>
double getArcLength2DGap ( const AFromHits & fromHits,
const AToHits & toHits ) const
inline

Calculates the perpendicular travel distance from the last position of the fromHits to the first position of the toHits.

Definition at line 213 of file CDCTrajectory2D.h.

214 {
215 const ROOT::Math::XYVector& fromRecoPos2D = fromHits.back().getRecoPos2D();
216 const ROOT::Math::XYVector& toRecoPos2D = toHits.front().getRecoPos2D();
217 return calcArcLength2DBetween(fromRecoPos2D, toRecoPos2D);
218 }

◆ getArcLength2DPeriod()

double getArcLength2DPeriod ( ) const
inline

Getter for the arc length for one round trip around the trajectory.

Definition at line 282 of file CDCTrajectory2D.h.

283 {
284 return getLocalCircle()->arcLengthPeriod();
285 }

◆ getAxialISuperLayerAfterStart()

ISuperLayer getAxialISuperLayerAfterStart ( EForwardBackward forwardBackwardInfo) const
private

Indicates which axial superlayer is traversed after the one, where the start point of the trajectory is located considering if you want to follow the trajectory in the forward or backward direction.

Definition at line 221 of file CDCTrajectory2D.cc.

222{
223 bool movingOutward = isMovingOutward();
224 if (forwardBackwardInfo == EForwardBackward::c_Backward) {
225 movingOutward = not movingOutward;
226 }
227 ISuperLayer startISuperLayer = getStartISuperLayer();
228 if (ISuperLayerUtil::isInvalid(startISuperLayer)) return ISuperLayerUtil::c_Invalid;
229
230 ISuperLayer nextISuperLayer = getISuperLayerAfter(startISuperLayer, movingOutward);
231 if (ISuperLayerUtil::isInvalid(nextISuperLayer)) return ISuperLayerUtil::c_Invalid;
232 if (ISuperLayerUtil::isAxial(nextISuperLayer)) return nextISuperLayer;
233
234 ISuperLayer iSuperLayerStep = nextISuperLayer - startISuperLayer;
235 assert(std::abs(iSuperLayerStep) == 1);
236 bool nextMovingOutward = iSuperLayerStep > 0;
237 return getISuperLayerAfter(nextISuperLayer, nextMovingOutward);
238}
CDC::ISuperLayer getISuperLayerAfter(CDC::ISuperLayer iSuperLayer, bool movingOutward) const
Returns which superlayer is traversed after the current one following the trajectory outward or inwar...
CDC::ISuperLayer getStartISuperLayer() const
Indicates the superlayer the trajectory starts in.
bool isMovingOutward() const
Indicates if the trajectory is moving outwards or inwards (to or away from the origin) from the start...
signed short ISuperLayer
The type of the layer and superlayer ids.
Definition ISuperLayer.h:24
static const ISuperLayer c_Invalid
Constant making an invalid superlayer id.
Definition ISuperLayer.h:65
static bool isAxial(ISuperLayer iSuperLayer)
Returns if the super layer with the given id is axial.
static bool isInvalid(ISuperLayer iSuperLayer)
Indicates if the given number corresponds to a true cdc superlayer - excludes the logic ids for inner...

◆ getChargeSign()

ESign getChargeSign ( ) const

Gets the charge sign of the trajectory.

Definition at line 281 of file CDCTrajectory2D.cc.

282{
283 return CDCBFieldUtil::ccwInfoToChargeSign(getLocalCircle()->orientation());
284}
static ESign ccwInfoToChargeSign(ERotation ccwInfo)
Conversion helper from clockwise or counterclockwise travel to the charge sign.

◆ getChi2()

double getChi2 ( ) const
inline

Getter for the chi2 value of the circle fit.

Definition at line 471 of file CDCTrajectory2D.h.

472 {
473 return getLocalCircle().chi2();
474 }

◆ getClosest()

ROOT::Math::XYVector getClosest ( const ROOT::Math::XYVector & point) const

Calculates the closest approach on the trajectory to the given point.

Definition at line 174 of file CDCTrajectory2D.cc.

175{
176 return getLocalCircle()->closest(point - getLocalOrigin()) + getLocalOrigin();
177}
const ROOT::Math::XYVector & getLocalOrigin() const
Getter for the origin of the local coordinate system.
ROOT::Math::XYVector closest(const ROOT::Math::XYVector &point) const
Calculates the point of closest approach on the circle to the given point.

◆ getCurvature()

double getCurvature ( ) const
inline

Getter for the curvature as seen from the xy projection.

Definition at line 425 of file CDCTrajectory2D.h.

426 {
427 return getLocalCircle()->curvature();
428 }

◆ getDist2D()

double getDist2D ( const ROOT::Math::XYVector & point) const
inline

Calculates the distance from the point to the trajectory as seen from the xy projection.

Definition at line 412 of file CDCTrajectory2D.h.

413 {
414 return getLocalCircle()->distance(point - getLocalOrigin());
415 }

◆ getExit()

ROOT::Math::XYVector getExit ( ) const

Calculates the point where the trajectory leaves the CDC.

This method returns the first point in forward flight direction from the start point of the trajectory where it meets either the radius of the inner most layer or the outer radius of the outer most wall. If the trajectory does not leave the CDC by the inner or outer wall this will return ROOT::Math::XYVector(nan,nan).

Definition at line 337 of file CDCTrajectory2D.cc.

338{
339 const ROOT::Math::XYVector outerExit = getOuterExit();
340 const ROOT::Math::XYVector innerExit = getInnerExit();
341 const ROOT::Math::XYVector localExit = getLocalCircle()->chooseNextForwardOf(ROOT::Math::XYVector(0, 0),
342 outerExit - getLocalOrigin(),
343 innerExit - getLocalOrigin());
344 return localExit + getLocalOrigin();
345}
ROOT::Math::XYVector getOuterExit(double factor=1) const
Calculates the point where the trajectory meets the outer wall of the CDC.
ROOT::Math::XYVector getInnerExit() const
Calculates the point where the trajectory meets the inner wall of the CDC.
ROOT::Math::XYVector chooseNextForwardOf(const ROOT::Math::XYVector &start, const ROOT::Math::XYVector &end1, const ROOT::Math::XYVector &end2) const
Returns the one of two end point which is first reached from the given start if one strictly follows ...

◆ getFlightDirection2D()

ROOT::Math::XYVector getFlightDirection2D ( const ROOT::Math::XYVector & point) const
inline

Get the unit direction of flight at the given point, where arcLength2D = 0.

Definition at line 313 of file CDCTrajectory2D.h.

314 {
315 return getLocalCircle()->tangential(point - getLocalOrigin());
316 }

◆ getFlightDirection2DAtSupport()

ROOT::Math::XYVector getFlightDirection2DAtSupport ( ) const
inline

Get the unit direction of flight at the support point, where arcLength2D = 0.

Definition at line 319 of file CDCTrajectory2D.h.

320 {
321 return getLocalCircle()->tangential();
322 }

◆ getFlightTime()

double getFlightTime ( ) const
inline

Getter for the time when the particle reached the support point position.

Definition at line 525 of file CDCTrajectory2D.h.

526 {
527 return m_flightTime;
528 }

◆ getGlobalCenter()

ROOT::Math::XYVector getGlobalCenter ( ) const
inline

Getter for the center of the trajectory in global coordinates.

Definition at line 350 of file CDCTrajectory2D.h.

351 {
352 return getLocalCircle()->center() + m_localOrigin;
353 }

◆ getGlobalCircle()

PerigeeCircle getGlobalCircle ( ) const
inline

Getter for the circle in global coordinates.

Definition at line 444 of file CDCTrajectory2D.h.

445 {
446 PerigeeCircle result = getLocalCircle();
447 result.passiveMoveBy(-getLocalOrigin());
448 return result;
449 }

◆ getGlobalImpact()

double getGlobalImpact ( ) const
inline

Getter for the signed impact parameter of the trajectory.

Definition at line 406 of file CDCTrajectory2D.h.

407 {
408 return getLocalCircle()->distance(-m_localOrigin);
409 }

◆ getGlobalPerigee()

ROOT::Math::XYVector getGlobalPerigee ( ) const
inline

Getter for the closest approach on the trajectory to the global origin.

Definition at line 344 of file CDCTrajectory2D.h.

345 {
346 return getLocalCircle()->closest(-m_localOrigin) + m_localOrigin;
347 }

◆ getInnerExit()

ROOT::Math::XYVector getInnerExit ( ) const

Calculates the point where the trajectory meets the inner wall of the CDC.

This method returns the first point in forward flight direction from the start point of the trajectory where it meets the inner radius of the inner most layer. If the trajectory does not meet the CDC by the inner wall this will return ROOT::Math::XYVector(nan,nan)

Definition at line 297 of file CDCTrajectory2D.cc.

298{
299 const CDCWireTopology& topology = CDCWireTopology::getInstance();
300 const CDCWireLayer& innerMostLayer = topology.getWireLayers().front();
301 double innerCylindricalR = innerMostLayer.getInnerCylindricalR();
302
303 const ROOT::Math::XYVector support = getSupport();
304 const PerigeeCircle globalCircle = getGlobalCircle();
305 if (support.Mag2() < innerCylindricalR * innerCylindricalR) {
306 // If we start within the inner volume of the CDC we want the trajectory to enter the CDC
307 // and not stop at first intersection with the inner wall.
308 // Therefore we take the inner exit that comes after the apogee (far point of the circle).
309 const ROOT::Math::XYVector apogee = globalCircle.apogee();
310 return globalCircle.atCylindricalRForwardOf(apogee, innerCylindricalR);
311
312 } else {
313 return globalCircle.atCylindricalRForwardOf(support, innerCylindricalR);
314 }
315}
double getInnerCylindricalR() const
Getter for inner radius of the layer as taken from the CDCGeometryPar.
const std::vector< CDCWireLayer > & getWireLayers() const
Getter for the underlying storing layer vector.
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
PerigeeCircle getGlobalCircle() const
Getter for the circle in global coordinates.
ROOT::Math::XYVector apogee() const
Getter for the apogee of the circle. If it was a line both components will be infinity.
ROOT::Math::XYVector atCylindricalRForwardOf(const ROOT::Math::XYVector &startPoint, double cylindricalR) const
Approach on the circle with the given cylindrical radius that lies in the forward direction of a star...

◆ getISuperLayerAfter()

ISuperLayer getISuperLayerAfter ( CDC::ISuperLayer iSuperLayer,
bool movingOutward ) const
private

Returns which superlayer is traversed after the current one following the trajectory outward or inward as indicated by the boolean input.

Definition at line 179 of file CDCTrajectory2D.cc.

180{
182
183 ISuperLayer minimalISuperLayer = getMinimalISuperLayer();
184 ISuperLayer maximalISuperLayer = getMaximalISuperLayer();
185 if (minimalISuperLayer == maximalISuperLayer) return ISuperLayerUtil::c_Invalid; // No next super layer to go to
186 if (iSuperLayer == minimalISuperLayer) return ISuperLayerUtil::getNextOutwards(iSuperLayer);
187 if (iSuperLayer == maximalISuperLayer) return ISuperLayerUtil::getNextInwards(iSuperLayer);
188
189 if (movingOutward) {
190 return ISuperLayerUtil::getNextOutwards(iSuperLayer);
191 } else {
192 return ISuperLayerUtil::getNextInwards(iSuperLayer);
193 }
194}
CDC::ISuperLayer getMinimalISuperLayer() const
Indicates the minimal superlayer the trajectory traverses.
CDC::ISuperLayer getMaximalISuperLayer() const
Indicates the maximal superlayer the trajectory traverses.
static ISuperLayer getNextInwards(ISuperLayer iSuperLayer)
Returns the super layer that is inside of the given super layer.
static ISuperLayer getNextOutwards(ISuperLayer iSuperLayer)
Returns the super layer that is outside of the given super layer.

◆ getISuperLayerAfterStart() [1/2]

ISuperLayer getISuperLayerAfterStart ( bool movingOutward) const
private

Returns which superlayer is traversed after the current one following the trajectory outward or inward as indicated by the boolean input.

Definition at line 196 of file CDCTrajectory2D.cc.

197{
198 ISuperLayer iSuperLayer = getStartISuperLayer();
199 return getISuperLayerAfter(iSuperLayer, movingOutward);
200}

◆ getISuperLayerAfterStart() [2/2]

ISuperLayer getISuperLayerAfterStart ( EForwardBackward forwardBackwardInfo) const
private

Indicates which superlayer is traversed after the current one following the trajectory forward or backward as indicated by the input.

Definition at line 202 of file CDCTrajectory2D.cc.

203{
204 bool movingOutward = isMovingOutward();
205 if (forwardBackwardInfo == EForwardBackward::c_Backward) {
206 movingOutward = not movingOutward;
207 }
208 return getISuperLayerAfterStart(movingOutward);
209}
CDC::ISuperLayer getISuperLayerAfterStart(bool movingOutward) const
Returns which superlayer is traversed after the current one following the trajectory outward or inwar...

◆ getLocalCircle()

const UncertainPerigeeCircle & getLocalCircle ( ) const
inline

Getter for the circle in local coordinates.

Definition at line 459 of file CDCTrajectory2D.h.

460 {
461 return m_localPerigeeCircle;
462 }

◆ getLocalCovariance()

double getLocalCovariance ( EPerigeeParameter iRow,
EPerigeeParameter iCol ) const
inline

Getter for an individual element of the covariance matrix of the local helix parameters.

Definition at line 431 of file CDCTrajectory2D.h.

432 {
433 return getLocalCircle().covariance(iRow, iCol);
434 }

◆ getLocalOrigin()

const ROOT::Math::XYVector & getLocalOrigin ( ) const
inline

Getter for the origin of the local coordinate system.

Definition at line 501 of file CDCTrajectory2D.h.

502 {
503 return m_localOrigin;
504 }

◆ getLocalVariance()

double getLocalVariance ( EPerigeeParameter i) const
inline

Getter for an individual diagonal element of the covariance matrix of the local helix parameters.

Definition at line 438 of file CDCTrajectory2D.h.

439 {
440 return getLocalCircle().variance(i);
441 }

◆ getMaximalCylindricalR()

double getMaximalCylindricalR ( ) const
inline

Getter for the maximal distance from the origin.

Definition at line 393 of file CDCTrajectory2D.h.

394 {
395 return std::fabs(getGlobalImpact() + 2 * getLocalCircle()->radius());
396 }

◆ getMaximalISuperLayer()

ISuperLayer getMaximalISuperLayer ( ) const

Indicates the maximal superlayer the trajectory traverses.

Definition at line 250 of file CDCTrajectory2D.cc.

251{
252 double maximalCylindricalR = getMaximalCylindricalR();
254}
ISuperLayer getISuperLayerAtCylindricalR(double cylindricalR)
Returns the logical superlayer number at the given radius.
double getMaximalCylindricalR() const
Getter for the maximal distance from the origin.

◆ getMinimalCylindricalR()

double getMinimalCylindricalR ( ) const
inline

Getter for the minimal distance from the origin - same as absolute value of the impact parameter.

Definition at line 400 of file CDCTrajectory2D.h.

401 {
402 return std::fabs(getGlobalImpact());
403 }

◆ getMinimalISuperLayer()

ISuperLayer getMinimalISuperLayer ( ) const

Indicates the minimal superlayer the trajectory traverses.

Definition at line 262 of file CDCTrajectory2D.cc.

263{
264 double minimalCylindricalR = getMinimalCylindricalR();
266}
double getMinimalCylindricalR() const
Getter for the minimal distance from the origin - same as absolute value of the impact parameter.

◆ getMom2DAtSupport() [1/2]

ROOT::Math::XYVector getMom2DAtSupport ( ) const
inline

Get the momentum at the support point of the trajectory.

Definition at line 307 of file CDCTrajectory2D.h.

308 {
309 return getFlightDirection2DAtSupport() * getAbsMom2D();
310 }

◆ getMom2DAtSupport() [2/2]

ROOT::Math::XYVector getMom2DAtSupport ( const double bZ) const
inline

Get the momentum at the support point of the trajectory.

Definition at line 301 of file CDCTrajectory2D.h.

302 {
303 return getFlightDirection2DAtSupport() * getAbsMom2D(bZ);
304 }

◆ getNDF()

size_t getNDF ( ) const
inline

Getter for the number of degrees of freedom of the circle fit.

Definition at line 483 of file CDCTrajectory2D.h.

484 {
485 return getLocalCircle().ndf();
486 }

◆ getNextAxialISuperLayer()

ISuperLayer getNextAxialISuperLayer ( ) const

Indicates which axial superlayer the trajectory traverses after the one, where the start point of the trajectory is located.

Definition at line 240 of file CDCTrajectory2D.cc.

241{
242 return getAxialISuperLayerAfterStart(EForwardBackward::c_Forward);
243}
CDC::ISuperLayer getAxialISuperLayerAfterStart(EForwardBackward forwardBackwardInfo) const
Indicates which axial superlayer is traversed after the one, where the start point of the trajectory ...

◆ getNextISuperLayer()

ISuperLayer getNextISuperLayer ( ) const

Indicates which superlayer the trajectory traverses after the one, where the start point of the trajectory is located.

Definition at line 211 of file CDCTrajectory2D.cc.

212{
213 return getISuperLayerAfterStart(EForwardBackward::c_Forward);
214}

◆ getOuterExit()

ROOT::Math::XYVector getOuterExit ( double factor = 1) const

Calculates the point where the trajectory meets the outer wall of the CDC.

This method returns the first point in forward flight direction from the start point of the trajectory where it meets the outer radius of the outer most layer. If the trajectory does not meet the CDC by the outer wall this will return ROOT::Math::XYVector(nan,nan) The factor can be used to virtually resize the CDC.

Definition at line 317 of file CDCTrajectory2D.cc.

318{
319 const CDCWireTopology& topology = CDCWireTopology::getInstance();
320 const CDCWireLayer& outerMostLayer = topology.getWireLayers().back();
321 double outerCylindricalR = outerMostLayer.getOuterCylindricalR() * factor;
322
323 const ROOT::Math::XYVector support = getSupport();
324 const PerigeeCircle globalCircle = getGlobalCircle();
325 if (support.Mag2() > outerCylindricalR * outerCylindricalR) {
326 // If we start outside of the volume of the CDC we want the trajectory to enter the CDC
327 // and not stop at first intersection with the outer wall.
328 // Therefore we take the outer exit that comes after the perigee.
329 const ROOT::Math::XYVector perigee = globalCircle.perigee();
330 return globalCircle.atCylindricalRForwardOf(perigee, outerCylindricalR);
331
332 } else {
333 return getGlobalCircle().atCylindricalRForwardOf(support, outerCylindricalR);
334 }
335}
double getOuterCylindricalR() const
Getter for outer radius of the layer as taken from the CDCGeometryPar.
ROOT::Math::XYVector perigee() const
Getter for the perigee point.

◆ getPos2DAtArcLength2D()

ROOT::Math::XYVector getPos2DAtArcLength2D ( double arcLength2D)
inline

Getter for the position at a given two dimensional arc length.

Definition at line 332 of file CDCTrajectory2D.h.

333 {
334 return getLocalOrigin() + getLocalCircle()->atArcLength(arcLength2D);
335 }

◆ getPreviousAxialISuperLayer()

ISuperLayer getPreviousAxialISuperLayer ( ) const

Indicates which axial superlayer the trajectory traverses before the one, where the start point of the trajectory is located.

Definition at line 245 of file CDCTrajectory2D.cc.

246{
247 return getAxialISuperLayerAfterStart(EForwardBackward::c_Backward);
248}

◆ getPreviousISuperLayer()

ISuperLayer getPreviousISuperLayer ( ) const

Indicates which superlayer the trajectory traverses before the one, where the start point of the trajectory is located.

Definition at line 216 of file CDCTrajectory2D.cc.

217{
218 return getISuperLayerAfterStart(EForwardBackward::c_Backward);
219}

◆ getPValue()

double getPValue ( ) const
inline

Getter for p-value.

Definition at line 465 of file CDCTrajectory2D.h.

466 {
467 return TMath::Prob(getChi2(), getNDF());
468 }

◆ getStartISuperLayer()

ISuperLayer getStartISuperLayer ( ) const

Indicates the superlayer the trajectory starts in.

Definition at line 256 of file CDCTrajectory2D.cc.

257{
258 double startCylindricalR = getLocalOrigin().R();
260}

◆ getSupport()

ROOT::Math::XYVector getSupport ( ) const
inline

Get the support point of the trajectory in global coordinates.

Definition at line 338 of file CDCTrajectory2D.h.

339 {
340 return getLocalCircle()->perigee() + getLocalOrigin();
341 }

◆ getTotalArcLength2D()

template<class AHits>
double getTotalArcLength2D ( const AHits & hits) const
inline

Calculates the perpendicular travel distance from the first position of the hits to the last position of the hits.

Definition at line 247 of file CDCTrajectory2D.h.

248 {
249 ROOT::Math::XYVector frontRecoPos2D = hits.front().getRecoPos2D();
250 ROOT::Math::XYVector backRecoPos2D = hits.back().getRecoPos2D();
251 return calcArcLength2DBetween(frontRecoPos2D, backRecoPos2D);
252 }

◆ isCurler()

bool isCurler ( double factor = 1) const

Checks if the trajectory leaves the outer radius of the CDC times the given tolerance factor.

Definition at line 268 of file CDCTrajectory2D.cc.

269{
270 const CDCWireTopology& topology = CDCWireTopology::getInstance();
271 return getMaximalCylindricalR() < factor * topology.getOuterCylindricalR();
272}
double getOuterCylindricalR() const
Getter for the outer radius of the outer most wire layer.

◆ isFitted()

bool isFitted ( ) const

Checks if the circle is already set to a valid value.

Definition at line 83 of file CDCTrajectory2D.cc.

84{
85 return not getLocalCircle()->isInvalid();
86}
bool isInvalid() const
Indicates if all circle parameters are zero.

◆ isForwardOrBackwardTo()

template<class AHits>
EForwardBackward isForwardOrBackwardTo ( const AHits & hits) const
inline

Calculates if this trajectory and the hits are coaligned Returns:

  • EForwardBackward::c_Forward if the last entity lies behind the first.
  • EForwardBackward::c_Backward if the last entity lies before the first.

Definition at line 203 of file CDCTrajectory2D.h.

204 {
205 return static_cast<EForwardBackward>(sign(getTotalArcLength2D(hits)));
206 }
EForwardBackward
Enumeration to represent the distinct possibilities of the right left passage information.

◆ isMovingOutward()

bool isMovingOutward ( ) const
inline

Indicates if the trajectory is moving outwards or inwards (to or away from the origin) from the start point on.

Definition at line 326 of file CDCTrajectory2D.h.

327 {
328 return getFlightDirection2DAtSupport().Dot(getSupport()) > 0;
329 }

◆ isOriginer()

bool isOriginer ( double factor = 1) const

Checks if the trajectory intersects with the inner radius of the CDC time the given tolerance factor.

Definition at line 274 of file CDCTrajectory2D.cc.

275{
276 const CDCWireTopology& topology = CDCWireTopology::getInstance();
277 return getMinimalCylindricalR() < factor * topology.getInnerCylindricalR();
278}
double getInnerCylindricalR() const
Getter for the inner radius of the inner most wire layer.

◆ isRightOrLeft()

ERightLeft isRightOrLeft ( const ROOT::Math::XYVector & point) const
inline

Checks if the given point is to the right or to the left of the trajectory.

Definition at line 418 of file CDCTrajectory2D.h.

419 {
420 return getLocalCircle()->isRightOrLeft(point - getLocalOrigin());
421 }

◆ reconstruct3D()

ROOT::Math::XYZVector reconstruct3D ( const CDC::WireLine & wireLine,
double distance = 0.0,
double z = 0 ) const

Gives the one three dimensional positions within the CDC closest to the given z where the given drift circle on the wire line touches the trajectory.

This method makes the reconstruction of the z coordinate possible by using the skewness
stereo layer of the stereo wires. The point is determined such that it is at the (signed) distance to the wire line.

Parameters
wireLineThe geometrical wire line on which the hit is located-
distanceThe desired distance from the wire line a.k.a. drift length
zThe expected value of z to which to closest solution should be selected.

Definition at line 164 of file CDCTrajectory2D.cc.

167{
168 const double recoZ = reconstructZ(wireLine, distance, z);
169 const ROOT::Math::XYZVector recoWirePos2D = wireLine.sagPos3DAtZ(recoZ);
170 const auto& tmp = getClosest(VectorUtil::getXYVector(recoWirePos2D));
171 return ROOT::Math::XYZVector(tmp.X(), tmp.Y(), recoZ);
172}
ROOT::Math::XYZVector sagPos3DAtZ(const double z) const
Gives the three dimensional position with wire sag effect of the line at the given z value.
Definition WireLine.h:61
double reconstructZ(const CDC::WireLine &wireLine, double distance=0.0, double z=0) const
Gives the one z positions within the CDC closest to the given z where the given drift circle on the w...
ROOT::Math::XYVector getClosest(const ROOT::Math::XYVector &point) const
Calculates the closest approach on the trajectory to the given point.

◆ reconstructBoth3D()

std::array< ROOT::Math::XYZVector, 2 > reconstructBoth3D ( const CDC::WireLine & wireLine,
double distance = 0.0,
double z = 0 ) const

Gives the two three dimensional points where the drift circle touches the wire line.

Only works for the skew stereo wires.

Parameters
wireLineThe geometrical wire line on which the hit is located-
distanceThe desired distance from the wire line a.k.a. drift length
zThe expected value of z to which to closest solution should be selected.

Definition at line 149 of file CDCTrajectory2D.cc.

152{
153 const std::array<double, 2> solutionsZ = reconstructBothZ(wireLine, distance, z);
154
155 const ROOT::Math::XYZVector firstRecoWirePos3D = wireLine.sagPos3DAtZ(solutionsZ[0]);
156 const ROOT::Math::XYZVector secondRecoWirePos3D = wireLine.sagPos3DAtZ(solutionsZ[1]);
157 const auto& tmp1 = getClosest(VectorUtil::getXYVector(firstRecoWirePos3D));
158 const auto& tmp2 = getClosest(VectorUtil::getXYVector(secondRecoWirePos3D));
159 return {{{tmp1.X(), tmp1.Y(), firstRecoWirePos3D.z()},
160 {tmp2.X(), tmp2.Y(), secondRecoWirePos3D.z()}
161 }};
162}
std::array< double, 2 > reconstructBothZ(const CDC::WireLine &wireLine, double distance=0.0, double z=0) const
Gives the two z positions where the given drift circle on the wire line touches the trajectory.

◆ reconstructBothZ()

std::array< double, 2 > reconstructBothZ ( const CDC::WireLine & wireLine,
double distance = 0.0,
double z = 0 ) const

Gives the two z positions where the given drift circle on the wire line touches the trajectory.

Only works for the skew stereo wires

Parameters
wireLineThe geometrical wire line on which the hit is located-
distanceThe desired distance from the wire line a.k.a. drift length
zThe expected value of z to which to closest solution should be selected.

Definition at line 109 of file CDCTrajectory2D.cc.

112{
113 ROOT::Math::XYVector globalPos2D = wireLine.sagPos2DAtZ(z);
114 ROOT::Math::XYVector movePerZ = wireLine.sagMovePerZ(z);
115
116 ROOT::Math::XYVector localPos2D = globalPos2D - getLocalOrigin();
117 const PerigeeCircle& localCircle = getLocalCircle();
118
119 double fastDistance = distance != 0.0 ? localCircle.fastDistance(distance) : 0.0;
120
121 double c = localCircle.fastDistance(localPos2D) - fastDistance;
122 double b = localCircle.gradient(localPos2D).Dot(movePerZ);
123 double a = localCircle.n3() * movePerZ.Mag2();
124
125 const std::pair<double, double> solutionsDeltaZ = solveQuadraticABC(a, b, c);
126
127 // Put the solution of smaller deviation first
128 const std::array<double, 2> solutionsZ{solutionsDeltaZ.second + z, solutionsDeltaZ.first + z};
129 return solutionsZ;
130}
ROOT::Math::XYVector sagPos2DAtZ(const double z) const
Gives the two dimensional position with wire sag effect of the line at the given z value.
Definition WireLine.h:68
ROOT::Math::XYVector sagMovePerZ(const double z) const
Gives the two dimensional position with wire sag effect of the line at the given z value.
Definition WireLine.h:83
ROOT::Math::XYVector gradient(const ROOT::Math::XYVector &point) const
Gradient of the distance field, hence indicates the direction of increasing distance.
double fastDistance(const ROOT::Math::XYVector &point) const
Getter for the linearised distance measure to a point.
double n3() const
Getter for the generalised circle parameter n3.

◆ reconstructZ()

double reconstructZ ( const CDC::WireLine & wireLine,
double distance = 0.0,
double z = 0 ) const

Gives the one z positions within the CDC closest to the given z where the given drift circle on the wire line touches the trajectory.

Only works for the skew stereo wires.

Parameters
wireLineThe geometrical wire line on which the hit is located-
distanceThe desired distance from the wire line a.k.a. drift length
zThe expected value of z to which to closest solution should be selected.

Definition at line 132 of file CDCTrajectory2D.cc.

135{
136 const std::array<double, 2> solutionsZ = reconstructBothZ(wireLine, distance, z);
137
138 bool firstIsInCDC = (wireLine.backwardZ() < solutionsZ[0] and
139 solutionsZ[0] < wireLine.forwardZ());
140 bool secondIsInCDC = (wireLine.backwardZ() < solutionsZ[1] and
141 solutionsZ[1] < wireLine.forwardZ());
142
143 // Prefer the solution with the smaller deviation from the given z position which is the first
144 assert(not(std::fabs(solutionsZ[0] - z) > std::fabs(solutionsZ[1] - z)));
145 const double recoZ = (firstIsInCDC or not secondIsInCDC) ? solutionsZ[0] : solutionsZ[1];
146 return recoZ;
147}
double backwardZ() const
Gives the backward z coordinate.
Definition WireLine.h:152
double forwardZ() const
Gives the forward z coordinate.
Definition WireLine.h:148

◆ reverse()

void reverse ( )

Reverses the trajectory in place.

Definition at line 95 of file CDCTrajectory2D.cc.

96{
97 m_localPerigeeCircle.reverse();
99}

◆ reversed()

CDCTrajectory2D reversed ( ) const

Returns the reverse trajectory as a copy.

Definition at line 102 of file CDCTrajectory2D.cc.

103{
104 CDCTrajectory2D result = *this;
105 result.reverse();
106 return result;
107}
CDCTrajectory2D()
Default constructor for ROOT compatibility.

◆ setChi2()

void setChi2 ( const double chi2)
inline

Setter for the chi square value of the circle fit.

Definition at line 477 of file CDCTrajectory2D.h.

478 {
479 return m_localPerigeeCircle.setChi2(chi2);
480 }

◆ setFlightTime()

void setFlightTime ( double flightTime)
inline

Setter for the time when the particle reached the support point position.

Definition at line 531 of file CDCTrajectory2D.h.

532 {
533 m_flightTime = flightTime;
534 }

◆ setGlobalCircle()

void setGlobalCircle ( const UncertainPerigeeCircle & perigeeCircle)
inline

Setter for the generalized circle that describes the trajectory.

Definition at line 452 of file CDCTrajectory2D.h.

453 {
454 m_localPerigeeCircle = perigeeCircle;
455 m_localPerigeeCircle.passiveMoveBy(getLocalOrigin());
456 }

◆ setLocalCircle()

void setLocalCircle ( const UncertainPerigeeCircle & localPerigeeCircle)
inline

Setter for the generalized circle that describes the trajectory.

Definition at line 495 of file CDCTrajectory2D.h.

496 {
497 m_localPerigeeCircle = localPerigeeCircle;
498 }

◆ setLocalOrigin()

double setLocalOrigin ( const ROOT::Math::XYVector & localOrigin)

Setter for the origin of the local coordinate system.

This sets the origin point the local circle representation is subjected. The local circle is also changed such that the set of points in global space is not changed on repositioning the local parameterisation. It also implicitly sets up a new reference position for all travel distances.
To be able to keep track how the travel distances have to be shifted by this change
the setter returns the value by which the coordinate s parameter was moved ( passively ).
The relation "old traveldistance - return value == new traveldistance" holds.
(if they are not to far away from the reference points, up to the discontinuity at the
far point on the circle)

Parameters
localOriginNew local reference point in the global coordinate system
Returns
Travel distance from the old to the new origin point

Definition at line 358 of file CDCTrajectory2D.cc.

359{
360 double arcLength2D = calcArcLength2D(localOrigin);
361 m_flightTime += arcLength2D / Const::speedOfLight;
362 m_localPerigeeCircle.passiveMoveBy(localOrigin - m_localOrigin);
363 m_localOrigin = localOrigin;
364 return arcLength2D;
365}
static const double speedOfLight
[cm/ns]
Definition Const.h:695
double calcArcLength2D(const ROOT::Math::XYVector &point) const
Calculate the travel distance from the start position of the trajectory.

◆ setNDF()

void setNDF ( std::size_t ndf)
inline

Setter for the number of degrees of freedom of the circle fit.

Definition at line 489 of file CDCTrajectory2D.h.

490 {
491 return m_localPerigeeCircle.setNDF(ndf);
492 }

◆ setPosMom2D()

void setPosMom2D ( const ROOT::Math::XYVector & pos2D,
const ROOT::Math::XYVector & mom2D,
double charge )

Setter for start point and momentum at the start point subjected to the charge sign.

Definition at line 347 of file CDCTrajectory2D.cc.

350{
351 m_localOrigin = pos2D;
352 double curvature = CDCBFieldUtil::absMom2DToCurvature(mom2D.R(), charge, pos2D);
353 ROOT::Math::XYVector phiVec = VectorUtil::unit(mom2D);
354 double impact = 0.0;
355 m_localPerigeeCircle = UncertainPerigeeCircle(curvature, phiVec, impact);
356}

Member Data Documentation

◆ m_flightTime

double m_flightTime = NAN
private

Memory for the estimation of the time at which the particle arrived at the support point.

Definition at line 544 of file CDCTrajectory2D.h.

◆ m_localOrigin

ROOT::Math::XYVector m_localOrigin
private

Memory for local coordinate origin of the circle representing the trajectory in global coordinates.

Definition at line 538 of file CDCTrajectory2D.h.

◆ m_localPerigeeCircle

UncertainPerigeeCircle m_localPerigeeCircle
private

Memory for the generalized circle describing the trajectory in coordinates from the local origin.

Definition at line 541 of file CDCTrajectory2D.h.


The documentation for this class was generated from the following files: