8 #include <tracking/trackFindingCDC/eventdata/hits/CDCRecoHit2D.h>
10 #include <tracking/trackFindingCDC/eventdata/hits/CDCRLWireHit.h>
12 #include <tracking/trackFindingCDC/geometry/Vector3D.h>
13 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
15 #include <tracking/trackFindingCDC/numerics/ESign.h>
17 #include <cdc/dataobjects/CDCSimHit.h>
22 using namespace TrackFindingCDC;
25 m_rlWireHit(rlWireHit),
31 m_rlWireHit(rlWireHit),
32 m_recoDisp2D(recoDisp2D)
41 Vector2D(-trackPosToWire.x(), -trackPosToWire.y()));
59 result.snapToDriftCircle();
79 result.snapToDriftCircle();
89 if (snap) result.snapToDriftCircle();
102 return reversedRecoHit;
116 bool switchSide = sign(oldDriftLength) != sign(driftLength);
136 output <<
"CDCRecoHit2D(" << recohit.
getRLWireHit() <<
","
B2Vector3D getPosWire() const
The method to get position on wire.
B2Vector3D getPosTrack() const
The method to get position on the track.
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
void reverse()
Swiches the right left passage to its opposite inplace.
double getRefDriftLength() const
Getter for the drift length at the reference position of the wire.
void setRefDriftLength(double driftLength)
Setter for the drift length at the reference position of the wire.
static CDCRLWireHit fromSimHit(const CDCWireHit *wirehit, const CDCSimHit &simhit)
Constructs an oriented wire hit from a CDCSimHit and the associated wirehit.
static CDCRLWireHit average(const CDCRLWireHit &rlWireHit1, const CDCRLWireHit &rlWireHit2)
Constructs the average of two wire hits with right left passage informations.
const Vector2D & getRefPos2D() const
The two dimensional reference position of the underlying wire.
Vector3D reconstruct3D(const CDCTrajectory2D &trajectory2D, double z=0) const
Attempts to reconstruct a three dimensional position (especially of stereo hits).
Class representing a two dimensional reconstructed hit in the central drift chamber.
void setRefDriftLength(double driftLength, bool snapRecoPos)
Setter for the drift length at the wire reference position.
Vector2D m_recoDisp2D
Memory for the displacement fo the assoziated wire reference position.
void reverse()
Turns the orientation in place.
double getRefDriftLength() const
Getter for the drift length at the wire reference position.
CDCRecoHit2D()=default
Default constructor for ROOT.
CDCRecoHit2D getAlias() const
Getter for the alias version of the reco hit.
static CDCRecoHit2D fromRecoPos2D(const CDCRLWireHit &rlWireHit, const Vector2D &recoPos2D, bool snap=true)
Constructs a two dimensional reconstructed hit from an absolute position.
Vector3D reconstruct3D(const CDCTrajectory2D &trajectory2D, const double z=0) const
Reconstruct the three dimensional position (especially of stereo hits) by determinating the z coordin...
CDCRecoHit2D reversed() const
Returns the recohit with the opposite right left information.
static CDCRecoHit2D average(const CDCRecoHit2D &recoHit1, const CDCRecoHit2D &recoHit2)
Constructs the average of two reconstructed hit positions and snaps it to the drift circle.
const CDCRLWireHit & getRLWireHit() const
Getter for the oriented wire hit assoziated with the reconstructed hit.
const Vector2D & getRecoDisp2D() const
Getter for the displacement from the wire reference position.
void snapToDriftCircle(bool switchSide=false)
Scales the displacement vector in place to lie on the dirft circle.
static CDCRecoHit2D fromSimHit(const CDCWireHit *wireHit, const CDCSimHit &simHit)
Constructs a two dimensional reconstructed hit from a sim hit and the assoziated wirehit.
CDCRLWireHit m_rlWireHit
Memory for the reference to the assiziated wire hit.
Particle trajectory as it is seen in xy projection represented as a circle.
Class representing a hit wire in the central drift chamber.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
double normalizeTo(const double toLength)
Normalizes the vector to the given length.
static Vector2D average(const Vector2D &one, const Vector2D &two)
Constructs the average of two vectors.
A three dimensional vector.
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
Abstract base class for different kinds of events.