10#include <tracking/trackFindingCDC/topology/WireNeighborPair.h>
11#include <tracking/trackFindingCDC/topology/WireLine.h>
13#include <tracking/trackFindingCDC/topology/ISuperLayer.h>
14#include <tracking/trackFindingCDC/topology/ILayer.h>
15#include <tracking/trackFindingCDC/topology/IWire.h>
17#include <tracking/trackFindingCDC/topology/WireNeighborKind.h>
18#include <tracking/trackFindingCDC/topology/EStereoKind.h>
19#include <tracking/trackFindingCDC/topology/EWirePosition.h>
21#include <tracking/trackFindingCDC/geometry/Vector3D.h>
22#include <tracking/trackFindingCDC/geometry/Vector2D.h>
24#include <tracking/trackFindingCDC/utilities/MayBePtr.h>
26#include <cdc/dataobjects/WireID.h>
44 namespace TrackFindingCDC {
48 class CDCWireSuperLayer;
71 static const CDCWire*
getInstance(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire);
81 CDCWire(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire);
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Class representing a sense wire layer in the central drift chamber.
Class representing a sense wire superlayer in the central drift chamber.
Class representing a sense wire in the central drift chamber.
double getRefCylindricalR() const
Getter for the cylindrical radius at the wire reference position.
void operator=(const CDCWire &wire)=delete
Disallow copy assignment of wires.
double getStereoAngle() const
Getter for the stereo angle of the wire.
ISuperLayer getISuperLayer() const
Gives the superlayer id ranging from 0 - 8.
CDCWire(const CDCWire &wire)=delete
Disallow copy construction of wires.
MayBePtr< const CDCWire > getNeighborCWOutwards() const
Gives the closest neighbor in the clockwise outwards direction This does not cross superlayer boundar...
WireNeighborKind getNeighborKind(const CDCWire &wire) const
Returns gives the kind of neighborhood relation from this wire to the given wire.
bool isInCell(const Vector3D &pos3D) const
Checks whether the position is in the drift cell surrounding the wire.
double getBackwardCylindricalR() const
Getter for the distance to the beamline ( z-axes ) at the backward joint point.
WireLine m_wireLine
The line representation of the wire.
double getDriftLength(const Vector3D &pos3D) const
Calculates the straight drift length from the position to the wire This is essentially the same as th...
bool isInCellZBounds(const Vector3D &pos3D, const double factor=1) const
Checks whether the position is in the z bounds of the drift cell (scaled by the factor) surrounding t...
const WireID & getWireID() const
Getter for the wire id.
bool isAxial() const
Indicates if the wire is axial or stereo.
MayBePtr< const CDCWire > getNeighborCCWOutwards() const
Gives the closest neighbor in the countclockwise outwards direction This does not cross superlayer bo...
Vector3D getWirePos3DAtZ(const double z) const
Gives position of the wire at the given z coordinate.
double getForwardCylindricalR() const
Getter for the nominal distance to the beamline ( z-axes ) at the forward joint point.
Vector2D getWirePos2DAtZ(const double z) const
Gives the xy projected position of the wire at the given z coordinate.
Vector3D getClosest(const Vector3D &pos3D) const
Calculates the closest approach in the wire to the position.
MayBePtr< const CDCWire > getNeighborCCW() const
Gives the closest neighbor in the counterclockwise direction - always exists.
MayBePtr< const CDCWire > getSecondaryNeighbor(short oClockDirection) const
Getter for the secondary neighbors of this wire id following the direction on the clock.
bool operator==(const CDCWire &other) const
Equality comparison based on wireID.
double getForwardZ() const
Getter for the z coordinate at the forward joint points of the wires.
WireNeighborPair getNeighborsOutwards() const
Gives the two wires in the next layer outward.
Vector2D getMovePerZ() const
Getter for the vector describing the nominal positional change in the xy plane per unit z.
IWire getIWire() const
Getter for the wire id within its layer.
bool isPrimaryNeighborWith(const CDCWire &wire) const
Returns whether the give wire is a neighbor of this wire.
void initialize(EWirePosition wirePosition, bool ignoreWireSag)
(Re)load all geometry parameters form the CDCGeometryPar to adjust to changes in geometry.
unsigned short getEWire() const
Getter for the encoded wire number.
Vector3D getForwardPos3D() const
Getter for the forward joint point of the wire with the wall.
static const CDCWire * getInstance(const WireID &wireID)
Getter from the wireID convenience object. Does not construct a new object.
ILayer getICLayer() const
Getter for the continuous layer id ranging from 0 - 55.
const Vector3D & getRefPos3D() const
Getter for the wire reference position.
ILayer getILayer() const
Getter for the layer id within its superlayer Gives the layer id within its superlayer ranging from ...
WireID m_wireID
The wireID of the wire.
Vector3D getWireVector() const
Getter for the vector pointing from the back end of the wire to the front end of the wire.
MayBePtr< const CDCWire > getNeighborCWInwards() const
Gives the closest neighbor in the clockwise inwards direction This does not cross superlayer boundari...
MayBePtr< const CDCWire > getNeighborCW() const
Gives the closest neighbor in the clockwise direction - always exists.
const Vector2D & getRefPos2D() const
Getter for the wire reference position for 2D tracking Gives the wire's reference position projected ...
Vector2D getMovePerZAtZ(double z) const
Getter for the vector describing the real positional change in the xy plane per unit z at the z posit...
double getDistance(const Vector3D &pos3D) const
Calculates the distance from the position to the wire.
const CDCWireLayer & getWireLayer() const
Getter for the wire layer.
double getLateralCellWidth() const
Getter for the cell widths in lateral direction.
double getTanStereoAngle() const
Getter for the tangents of the stereo angle of the wire.
friend std::ostream & operator<<(std::ostream &output, const CDCWire &wire)
String output operator for wire objects to help debugging.
MayBePtr< const CDCWire > getNeighborCCWInwards() const
Gives the closest neighbor in the countclockwise inwards direction This does not cross superlayer bou...
EStereoKind getStereoKind() const
Getter for the stereo type of the wire.
double getRefZ() const
Getter for the wire reference z coordinate Gives the wire's reference z coordinate.
double m_refCylindricalR
Precomputed distance to the beam line at the reference position.
WireNeighborPair getNeighborsInwards() const
Gives the two wires in the next layer inward.
Vector3D getBackwardPos3D() const
Getter for the forward joint point of the wire with the wall.
double getMinCylindricalR() const
Getter for the closest distance to the beamline ( z-axes )
CDCWire(CDCWire &&wire)=default
Allow move construction of wires for use in std::vector.
const CDCWireSuperLayer & getWireSuperLayer() const
Getter for the wire super layer.
double getBackwardZ() const
Getter for the z coordinate at the backward joint points of the wires.
double getRadialCellWidth() const
Getter for the cell widths in radial direction.
bool operator<(const CDCWire &other) const
Total ordering relation based on the wire id Defines a total ordering scheme for wire objects based o...
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 norm() const
Calculates the length of the vector.
A three dimensional vector.
double z() const
Getter for the z coordinate.
A three dimensional limited line represented by its closest approach to the z-axes (reference positio...
const Vector3D & refPos3D() const
Returns the reference position.
const Vector2D & nominalMovePerZ() const
Gives the positional move in the xy projection per unit z.
Vector2D sagMovePerZ(const double z) const
Gives the two dimensional position with wire sag effect of the line at the given z value.
const Vector2D & refPos2D() const
Returns the xy vector of the reference position.
double backwardZ() const
Gives the backward z coordinate.
double refZ() const
Returns the the z coordinate of the reference point.
double tanTheta() const
Returns the tangent of the opening angle between tangential vector and the z axes Also know as ds / d...
double forwardZ() const
Gives the forward z coordinate.
Vector2D nominalPerigee2D() const
Returns the point of nominal closest approach to the z axes.
Vector3D sagPos3DAtZ(const double z) const
Gives the three dimensional position with wire sag effect of the line at the given z value.
Vector3D sagClosest3D(const Vector3D &point) const
Returns the closest approach on the wire with wire sag effect to the give point.
Vector3D backward3D() const
Gives the position of the backward point.
double forwardCylindricalR() const
Gives the cylindrical radius of the forward position.
Vector2D sagPos2DAtZ(const double z) const
Gives the two dimensional position with wire sag effect of the line at the given z value.
double sagDistance(const Vector3D &pos3D) const
Calculates the distance of the given point to the wire with wire sag effect.
Vector3D wireVector() const
Getter for the vector from backward to the forward position.
Vector3D forward3D() const
Gives the position of the forward point.
double theta() const
Returns the nominal opening angle between tangential vector and the z axes.
Type for the neighbor relationship from one wire to another.
Class representing a pair of neighbors in the CDC in a single layer For certain circumstances it is a...
Class to identify a wire inside the CDC.
unsigned short getICLayer() const
Getter for continuous layer numbering.
unsigned short getIWire() const
Getter for wire within the layer.
unsigned short getEWire() const
Getter for encoded wire number.
unsigned short getISuperLayer() const
Getter for Super-Layer.
unsigned short getILayer() const
Getter for layer within the Super-Layer.
EWirePosition
Wire position set.
Abstract base class for different kinds of events.
static EStereoKind getStereoKind(ISuperLayer iSuperLayer)
Returns the stereo kind of the super layer.