10#include <tracking/trackFindingCDC/fitting/EFitPos.h>
11#include <tracking/trackFindingCDC/fitting/EFitVariance.h>
13#include <tracking/trackingUtilities/geometry/Vector2D.h>
15#include <tracking/trackingUtilities/numerics/ERightLeft.h>
16#include <tracking/trackingUtilities/numerics/EForwardBackward.h>
30 namespace TrackingUtilities {
45 namespace TrackFindingCDC {
56 EFitVariance fitVariance = EFitVariance::c_Proper)
74 double driftLengthVariance)
76 return driftLength * driftLength + driftLengthVariance;
113 double getX(
int iObservation)
const
119 double getY(
int iObservation)
const
149 std::size_t
fill(
double x,
double y,
double signedRadius = 0.0,
double weight = 1.0);
177 TrackingUtilities::ERightLeft rlInfo = TrackingUtilities::ERightLeft::c_Unknown);
190 TrackingUtilities::ERightLeft rlInfo = TrackingUtilities::ERightLeft::c_Unknown);
248 std::size_t
appendRange(
const std::vector<const CDC::CDCWire*>& wires);
258 template<
class ARange>
261 std::size_t nAppendedHits = 0;
264 for (
const auto& item : range) {
265 nAppendedHits +=
append(item);
267 return nAppendedHits;
304 return static_cast<TrackingUtilities::EForwardBackward
>(TrackingUtilities::sign(
getTotalPerpS(trajectory2D)));
Class representing a sense wire in the central drift chamber.
EFitPos m_fitPos
Indicator which positional information should preferably be extracted from hits in calls to append.
static double getPseudoDriftLengthVariance(double driftLength, double driftLengthVariance)
Gets the pseudo variance.
double getX(int iObservation) const
Getter for the x value of the observation at the given index.
TrackingUtilities::Vector2D centralize()
Picks one observation as a reference point and transform all observations to that new origin.
void reserve(std::size_t nObservations)
Reserves enough space for nObservations.
void setFitVariance(EFitVariance fitVariance)
Setter for the indicator that the drift variance should be used.
std::size_t appendRange(const ARange &range)
Append all hits from a generic range.
double getY(int iObservation) const
Getter for the y value of the observation at the given index.
bool empty() const
Returns true if there are no observations stored.
TrackingUtilities::Vector2D getCentralPoint() const
Extracts the observation center that is at the index in the middle.
bool isForwardTrajectory(const TrackingUtilities::CDCTrajectory2D &trajectory2D) const
Checks if the last position of these observations lies at greater travel distance than the first.
CDCObservations2D(EFitPos fitPos=EFitPos::c_RecoPos, EFitVariance fitVariance=EFitVariance::c_Proper)
Constructor taking the flag if the reconstructed position of the hits should be used when they are av...
std::size_t append(const TrackingUtilities::CDCWireHit &wireHit, TrackingUtilities::ERightLeft rlInfo=TrackingUtilities::ERightLeft::c_Unknown)
Appends the hit circle at wire reference position without a right left passage hypotheses.
void passiveMoveBy(const TrackingUtilities::Vector2D &origin)
Moves all observations passively such that the given vector becomes to origin of the new coordinate s...
std::size_t appendRange(const TrackingUtilities::CDCSegment2D &segment2D)
Appends all reconstructed hits from the two dimensional segment.
EFitPos getFitPos() const
Getter for the indicator that the reconstructed position should be favoured.
double getDriftLength(int iObservation) const
Getter for the signed drift radius of the observation at the given index.
double getWeight(int iObservation) const
Getter for the weight / inverse variance of the observation at the given index.
std::size_t fill(double x, double y, double signedRadius=0.0, double weight=1.0)
Appends the observed position.
double getTotalPerpS(const TrackingUtilities::CDCTrajectory2D &trajectory2D) const
Calculate the total transverse travel distance traversed by these observations comparing the travel d...
double * data()
Return the pointer to the number buffer.
TrackingUtilities::Vector2D getFrontPos2D() const
Get the position of the first observation.
void clear()
Removes all observations stored.
EFitVariance m_fitVariance
Indicator which variance information should preferably be extracted from hits in calls to append.
std::size_t size() const
Returns the number of observations stored.
TrackingUtilities::Vector2D getBackPos2D() const
Get the position of the first observation.
TrackingUtilities::EForwardBackward isCoaligned(const TrackingUtilities::CDCTrajectory2D &trajectory2D) const
Checks if the last observation in the vector lies at greater or lower travel distance than the last o...
void setFitPos(EFitPos fitPos)
Setter for the indicator that the reconstructed position should be favoured.
std::size_t getNObservationsWithDriftRadius() const
Returns the number of observations having a drift radius radius.
std::vector< double > m_observations
Memory for the individual observations.
Class representing a pair of reconstructed axial segments in adjacent superlayer.
Class representing a triple of neighboring oriented wire with additional trajectory information.
A pair of oriented wire hits.
Class representing a triple of neighboring wire hits.
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
Class representing a two dimensional reconstructed hit in the central drift chamber.
Class representing a three dimensional reconstructed hit.
A reconstructed sequence of two dimensional hits in one super layer.
A segment consisting of three dimensional reconstructed hits.
Class representing a sequence of three dimensional reconstructed hits.
Particle trajectory as it is seen in xy projection represented as a circle.
A segment consisting of two dimensional reconstructed hits.
Class representing a hit wire in the central drift chamber.
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
Abstract base class for different kinds of events.