8#include <tracking/trackFindingCDC/eventdata/hits/CDCRLWireHit.h>
10#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
12#include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory2D.h>
14#include <tracking/trackFindingCDC/topology/CDCWire.h>
15#include <tracking/trackFindingCDC/topology/EStereoKind.h>
16#include <tracking/trackFindingCDC/topology/ISuperLayer.h>
18#include <tracking/trackFindingCDC/geometry/Vector3D.h>
19#include <tracking/trackFindingCDC/geometry/Vector2D.h>
21#include <tracking/trackFindingCDC/numerics/ERightLeft.h>
23#include <cdc/dataobjects/CDCSimHit.h>
25#include <framework/logging/Logger.h>
31using namespace TrackFindingCDC;
38 namespace TrackFindingCDC {
44 :
CDCRLWireHit(wireHit, rlInfo, wireHit->getRefDriftLength(), wireHit->getRefDriftLengthVariance())
51 double driftLengthVariance)
54 , m_refDriftLength(driftLength)
55 , m_refDriftLengthVariance(driftLengthVariance)
62 B2ASSERT(
"Average of two CDCRLWireHits with different wire hits requested.",
65 B2ASSERT(
"Average of two CDCRLWireHits with different right left passage information requested.",
77 CDCRLWireHit result(&wireHit, rlInfo, driftLength, driftLengthVariance);
85 B2ASSERT(
"Average of three CDCRLWireHits with different wire hits requested.",
89 B2ASSERT(
"Average of three CDCRLWireHits with different right left passage information requested.",
105 CDCRLWireHit result(&wireHit, rlInfo, driftLength, driftLengthVariance);
117 ERightLeft rlInfo = trackPosToWire.xy().isRightOrLeftOf(directionOfFlight.xy());
172 Vector2D disp2D = recoPos2D - wirePos2D;
176 return wirePos2D + disp2D;
184 if (stereoType == EStereoKind::c_StereoV or stereoType == EStereoKind::c_StereoU) {
186 const double signedDriftLength = isValid(rlInfo) ?
static_cast<double>(rlInfo) *
getRefDriftLength() : 0.0;
187 return trajectory2D.
reconstruct3D(wireLine, signedDriftLength, z);
197std::ostream& TrackFindingCDC::operator<<(std::ostream& output,
const CDCRLWireHit& rlWireHit)
199 output <<
"CDCRLWireHit(" << rlWireHit.
getWireHit() <<
","
200 <<
static_cast<typename std::underlying_type<ERightLeft>::type
>(rlWireHit.
getRLInfo()) <<
")" ;
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
B2Vector3D getPosWire() const
The method to get position on wire.
B2Vector3D getPosTrack() const
The method to get position on the track.
double getDriftLength() const
The method to get drift length.
B2Vector3D getMomentum() const
The method to get momentum.
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
double getRefCylindricalR() const
The distance from the beam line at reference position of the underlying wire.
const CDCHit * getHit() const
Getter for the CDCHit pointer into the StoreArray.
const CDCWireHit & getWireHit() const
Getter for the wire hit associated with the oriented hit.
ISuperLayer getISuperLayer() const
Getter for the superlayer id.
double getRefDriftLengthVariance() const
Getter for the variance of the drift length at the reference position of the wire.
double getRefDriftLength() const
Getter for the drift length at the reference position of the wire.
const WireID & getWireID() const
Getter for the WireID of the wire the hit is located on.
bool isAxial() const
Indicator if the underlying wire is axial.
CDCRLWireHit()=default
Default constructor for ROOT.
const CDCWire & getWire() const
Getter for the wire the oriented hit associated to.
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 information.
Vector2D reconstruct2D(const CDCTrajectory2D &trajectory2D) const
Reconstructs a position of primary ionisation on the drift circle.
const Vector2D & getRefPos2D() const
The two dimensional reference position of the underlying wire.
EStereoKind getStereoKind() const
Getter for the stereo type of the underlying wire.
ERightLeft getRLInfo() const
Getter for the right left passage information.
Vector3D reconstruct3D(const CDCTrajectory2D &trajectory2D, double z=0) const
Attempts to reconstruct a three dimensional position (especially of stereo hits).
Particle trajectory as it is seen in xy projection represented as a circle.
Vector2D getClosest(const Vector2D &point) const
Calculates the closest approach on the trajectory to the given point.
Vector3D reconstruct3D(const 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...
Class representing a hit wire in the central drift chamber.
const CDCHit * getHit() const
Getter for the CDCHit pointer into the StoreArray.
const CDCWire & getWire() const
Getter for the CDCWire the hit is located on.
static constexpr const double c_simpleDriftLengthVariance
A default value for the drift length variance if no variance from the drift length translation is ava...
Class representing a sense wire in the central drift chamber.
double getRefCylindricalR() const
Getter for the cylindrical radius at the wire reference position.
ISuperLayer getISuperLayer() const
Gives the superlayer id ranging from 0 - 8.
const WireID & getWireID() const
Getter for the wire id.
bool isAxial() const
Indicates if the wire is axial or stereo.
const Vector2D & getRefPos2D() const
Getter for the wire reference position for 2D tracking Gives the wire's reference position projected ...
EStereoKind getStereoKind() const
Getter for the stereo type of the wire.
const WireLine & getWireLine() const
Getter for the wire line representation of the wire.
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
double normalizeTo(const double toLength)
Normalizes the vector to the given length.
A three dimensional vector.
A three dimensional limited line represented by its closest approach to the z-axes (reference positio...
Class to identify a wire inside the CDC.
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
Abstract base class for different kinds of events.