Belle II Software  release-08-01-10
CDCWire Class Reference

Class representing a sense wire in the central drift chamber. More...

#include <CDCWire.h>

Collaboration diagram for CDCWire:

Public Member Functions

 CDCWire (const WireID &wireID)
 Constructor taking the combined wire id convenience object.
 
 CDCWire (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire)
 Constructor taking the superlayer id, the layer id and the wire id. Use rather getInstance() to avoid instance constructions.
 
 CDCWire (const CDCWire &wire)=delete
 Disallow copy construction of wires.
 
 CDCWire (CDCWire &&wire)=default
 Allow move construction of wires for use in std::vector.
 
void operator= (const CDCWire &wire)=delete
 Disallow copy assignment of wires.
 
bool operator== (const CDCWire &other) const
 Equality comparision based on wireID.
 
bool operator< (const CDCWire &other) const
 Total ordering relation based on the wire id Defines a total ordering scheme for wire objects based on the encoded wireID only. More...
 
void initialize (EWirePosition wirePosition, bool ignoreWireSag)
 (Re)load all geometry parameters form the CDCGeometryPar to adjust to changes in geometry. More...
 
MayBePtr< const CDCWiregetSecondaryNeighbor (short oClockDirection) const
 Getter for the secondary neighbors of this wire id following the direction on the clock.
 
Wire index
 operator const Belle2::WireID & () const
 Implicit downcast to WireID forgetting the line information as needed.
 
const WireIDgetWireID () const
 Getter for the wire id.
 
unsigned short getEWire () const
 Getter for the encoded wire number. More...
 
IWire getIWire () const
 Getter for the wire id within its layer. More...
 
ILayer getICLayer () const
 Getter for the continious layer id ranging from 0 - 55.
 
ILayer getILayer () const
 Getter for the layer id within its superlayer Gives the layer id within its superlayer
ranging from 0 - 7 for superlayer 0,
ranging from 0 - 5 for superlayer 1 - 8.
 
ISuperLayer getISuperLayer () const
 Gives the superlayer id ranging from 0 - 8.
 
Geometry properties

Read only.

They get implicitly initialized from the CDCGeometryPar.

bool isAxial () const
 Indicates if the wire is axial or stereo.
 
EStereoKind getStereoKind () const
 Getter for the stereo type of the wire. More...
 
const WireLinegetWireLine () const
 Getter for the wire line represenation of the wire.
 
Vector2D getWirePos2DAtZ (const double z) const
 Gives the xy projected position of the wire at the given z coordinate.
 
Vector3D getWirePos3DAtZ (const double z) const
 Gives position of the wire at the given z coordinate.
 
double getDistance (const Vector3D &pos3D) const
 Calculates the distance from the position to the wire.
 
Vector3D getClosest (const Vector3D &pos3D) const
 Calculates the closest approach in the wire to the position.
 
double getDriftLength (const Vector3D &pos3D) const
 Calculates the straight drift length from the position to the wire This is essentially the same as the distance to the wire but returns NAN if either. More...
 
const Vector3DgetRefPos3D () const
 Getter for the wire reference position. More...
 
const Vector2DgetRefPos2D () const
 Getter for the wire reference position for 2D tracking Gives the wire's reference position projected to the xy plane.
 
double getRefZ () const
 Getter for the wire reference z coordinate Gives the wire's reference z coordinate.
 
double getTanStereoAngle () const
 Getter for the tangents of the stereo angle of the wire.
 
double getStereoAngle () const
 Getter for the stereo angle of the wire.
 
Vector3D getWireVector () const
 Getter for the vector pointing from the back end ofthe wire to the front end of the wire.
 
Vector2D getMovePerZ () const
 Getter for the vector describing the nominal positional change in the xy plane per unit z.
 
Vector2D getMovePerZAtZ (double z) const
 Getter for the vector describing the real positional change in the xy plane per unit z at the z position of the wire .
 
double getRefCylindricalR () const
 Getter for the cylindrical radius at the wire reference position.
 
double getMinCylindricalR () const
 Getter for the closest distance to the beamline ( z-axes )
 
double getForwardCylindricalR () const
 Getter for the nominal distance to the beamline ( z-axes ) at the forward joint point.
 
double getBackwardCylindricalR () const
 Getter for the distance to the beamline ( z-axes ) at the backward joint point.
 
double getForwardZ () const
 Getter for the z coordinate at the forward joint points of the wires.
 
double getBackwardZ () const
 Getter for the z coordinate at the backward joint points of the wires.
 
Vector3D getForwardPos3D () const
 Getter for the forward joint point of the wire with the wall.
 
Vector3D getBackwardPos3D () const
 Getter for the forward joint point of the wire with the wall.
 
bool isInCell (const Vector3D &pos3D) const
 Checks whether the position is in the drift cell surrounding the wire.
 
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 the wire.
 
double getRadialCellWidth () const
 Getter for the cell widths in radial direction.
 
double getLateralCellWidth () const
 Getter for the cell widths in lateral direction.
 
Access to the wire layer and super layer properties
const CDCWireLayergetWireLayer () const
 Getter for the wire layer.
 
const CDCWireSuperLayergetWireSuperLayer () const
 Getter for the wire super layer.
 
Closest neighborhood

Methods for getting the closest neighbors of the wire.

They use the CDCWireTopology::getInstance() object to find the neighbors of this wire.

WireNeighborKind getNeighborKind (const CDCWire &wire) const
 Returns gives the kind of neighborhood relation from this wire to the given wire. More...
 
bool isPrimaryNeighborWith (const CDCWire &wire) const
 Returns whether the give wire is a neighbor of this wire.
 
WireNeighborPair getNeighborsInwards () const
 Gives the two wires in the next layer inward. More...
 
WireNeighborPair getNeighborsOutwards () const
 Gives the two wires in the next layer outward. More...
 
MayBePtr< const CDCWiregetNeighborCCW () const
 Gives the closest neighbor in the counterclockwise direction - always exists. More...
 
MayBePtr< const CDCWiregetNeighborCW () const
 Gives the closest neighbor in the clockwise direction - always exists. More...
 
MayBePtr< const CDCWiregetNeighborCCWInwards () const
 Gives the closest neighbor in the countclockwise inwards direction This does not cross superlayer boundaries. More...
 
MayBePtr< const CDCWiregetNeighborCWInwards () const
 Gives the closest neighbor in the clockwise inwards direction This does not cross superlayer boundaries. More...
 
MayBePtr< const CDCWiregetNeighborCCWOutwards () const
 Gives the closest neighbor in the countclockwise outwards direction This does not cross superlayer boundaries. More...
 
MayBePtr< const CDCWiregetNeighborCWOutwards () const
 Gives the closest neighbor in the clockwise outwards direction This does not cross superlayer boundaries. More...
 

Static Public Member Functions

Static instance getters

Getter for the already constructed instances form the CDCWireTopology::getInstance() object.

static const CDCWiregetInstance (const WireID &wireID)
 Getter from the wireID convinience object. Does not construct a new object.
 
static const CDCWiregetInstance (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire)
 Getter from the superlayer id, the layer id and the wire id. Does not construct a new object.
 
static const CDCWiregetInstance (const CDCHit &hit)
 Convenience getter for the wire from a hit object.
 

Private Attributes

WireID m_wireID
 The wireID of the wire.
 
WireLine m_wireLine
 The line representation of the wire.
 
double m_refCylindricalR
 Precomputed distance to the beam line at the reference position.
 

Friends

std::ostream & operator<< (std::ostream &output, const CDCWire &wire)
 Sting output operator for wire objects to help debugging.
 

Detailed Description

Class representing a sense wire in the central drift chamber.

It combines the wire id and a line representation of the wire from the CDC geometry. It also provides an interface for fetching the closest neighbors for local tracking purposes. Note : All possible wire objects are stored in the CDCWireTopology which you can get with the static getInstance() functions. There is rarely a need for constructing a wire object and it should be avoided.

Definition at line 58 of file CDCWire.h.

Member Function Documentation

◆ getDriftLength()

double getDriftLength ( const Vector3D pos3D) const
inline

Calculates the straight drift length from the position to the wire This is essentially the same as the distance to the wire but returns NAN if either.

  • the position is outside of the CDC
  • the position is outside of the drift cell

Definition at line 214 of file CDCWire.h.

215  { return isInCell(pos3D) ? getDistance(pos3D) : NAN; }
bool isInCell(const Vector3D &pos3D) const
Checks whether the position is in the drift cell surrounding the wire.
Definition: CDCWire.cc:96
double getDistance(const Vector3D &pos3D) const
Calculates the distance from the position to the wire.
Definition: CDCWire.h:200

◆ getEWire()

unsigned short getEWire ( ) const
inline

Getter for the encoded wire number.

It is unique to each wire and increases from the inside out. It increases counterclockwise in the same layer from the wire with wire id zero. Ranging from 0 to 35711 but discontinuously. ( See WireID class for details. )

Definition at line 131 of file CDCWire.h.

◆ getIWire()

IWire getIWire ( ) const
inline

Getter for the wire id within its layer.

ranging from 0 - 159 for superlayer 0,
ranging from 0 - 159 for superlayer 1,
ranging from 0 - 191 for superlayer 2,
ranging from 0 - 223 for superlayer 3,
ranging from 0 - 255 for superlayer 4,
ranging from 0 - 287 for superlayer 5,
ranging from 0 - 319 for superlayer 6,
ranging from 0 - 351 for superlayer 7,
ranging from 0 - 383 for superlayer 8.

Definition at line 146 of file CDCWire.h.

◆ getNeighborCCW()

MayBePtr< const CDCWire > getNeighborCCW ( ) const

Gives the closest neighbor in the counterclockwise direction - always exists.

Always gives the counterclockwise neighbor of this wire, since it always exists. It never returns nullptr (if the wire itself is valid), but we give it as pointer for homogenity of the interface.

Definition at line 159 of file CDCWire.cc.

160 {
162 }
MayBePtr< const CDCWire > getNeighborCCW(const WireID &wireID) const
Getter for the nearest counterclockwise neighbor.
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
const WireID & getWireID() const
Getter for the wire id.
Definition: CDCWire.h:122

◆ getNeighborCCWInwards()

MayBePtr< const CDCWire > getNeighborCCWInwards ( ) const

Gives the closest neighbor in the countclockwise inwards direction This does not cross superlayer boundaries.

Trying to get the countclockwise inwards neighbor from a wire in the innermost layer of a superlayer will return a nullptr. So the result has to be checked before referencing.

Definition at line 169 of file CDCWire.cc.

◆ getNeighborCCWOutwards()

MayBePtr< const CDCWire > getNeighborCCWOutwards ( ) const

Gives the closest neighbor in the countclockwise outwards direction This does not cross superlayer boundaries.

Trying to get the countclockwise outwards neighbor from a wire in the outermost layer of a superlayer will return a nullptr. So the result has to be checked before referencing.

Definition at line 179 of file CDCWire.cc.

◆ getNeighborCW()

MayBePtr< const CDCWire > getNeighborCW ( ) const

Gives the closest neighbor in the clockwise direction - always exists.

Always gives the clockwise neighbor of this wire, since it always exists. It never returns nullptr (if the wire itself is valid), but we give it as pointer for homogenity of the interface.

Definition at line 164 of file CDCWire.cc.

◆ getNeighborCWInwards()

MayBePtr< const CDCWire > getNeighborCWInwards ( ) const

Gives the closest neighbor in the clockwise inwards direction This does not cross superlayer boundaries.

Trying to get the clockwise inwards neighbor from a wire in the innermost layer of a superlayer will return a nullptr. So the result has to be checked before referencing.

Definition at line 174 of file CDCWire.cc.

◆ getNeighborCWOutwards()

MayBePtr< const CDCWire > getNeighborCWOutwards ( ) const

Gives the closest neighbor in the clockwise outwards direction This does not cross superlayer boundaries.

Trying to get the clockwise outwards neighbor from a wire in the outermost layer of a superlayer will return a nullptr. So the result has to be checked before referencing.

Definition at line 184 of file CDCWire.cc.

◆ getNeighborKind()

WireNeighborKind getNeighborKind ( const CDCWire wire) const

Returns gives the kind of neighborhood relation from this wire to the given wire.

Gives the information if the given wire is a neighbor of this wire.

Definition at line 139 of file CDCWire.cc.

◆ getNeighborsInwards()

WireNeighborPair getNeighborsInwards ( ) const

Gives the two wires in the next layer inward.

Gives the two wire in the next layer closer to the interaction point from this wire. The pair is sorted such that the more counterclockwise wire is the .first. This does not cross superlayer boundaries. Trying to get the inwards neighbors from a wire in the innermost layer of a superlayer will return a pair of nullptr. So the result has to be checked before referencing.

Definition at line 149 of file CDCWire.cc.

◆ getNeighborsOutwards()

WireNeighborPair getNeighborsOutwards ( ) const

Gives the two wires in the next layer outward.

Gives the two wire in the next layer further away from the interaction point from this wire. The pair is sorted such that the more counterclockwise wire is the .first. This does not cross superlayer boundaries. Trying to get the outwards neighbors from a wire in the outermost layer of a superlayer will return a pair of nullptr. So the result has to be checked before referencing.

Definition at line 154 of file CDCWire.cc.

◆ getRefPos3D()

const Vector3D& getRefPos3D ( ) const
inline

Getter for the wire reference position.

Gives the wire's reference position which is the point of closest approach to the beam axes.

Definition at line 222 of file CDCWire.h.

◆ getStereoKind()

EStereoKind getStereoKind ( ) const
inline

Getter for the stereo type of the wire.

Gives the stereo type of the wire. Result is one of EStereoKind::c_Axial, EStereoKind::c_StereoU and EStereoKind::c_StereoV The stereo type is shared by all wires in the same superlayer The superlayer pattern for Belle II is AUAVAUAVA according the TDR

Definition at line 184 of file CDCWire.h.

◆ initialize()

void initialize ( EWirePosition  wirePosition,
bool  ignoreWireSag 
)

(Re)load all geometry parameters form the CDCGeometryPar to adjust to changes in geometry.

used to check for odd stereo wires – did not trigger in ages

Definition at line 69 of file CDCWire.cc.

◆ operator<()

bool operator< ( const CDCWire other) const
inline

Total ordering relation based on the wire id Defines a total ordering scheme for wire objects based on the encoded wireID only.

Therefore the wires can get sorted for the super layer, than for the layers and finally for the in layer wire id. Hence the wires increase in counterclockwise spiral like manner from the inside out. It is required for the wires to work with the stl algorithms and containers.

Definition at line 105 of file CDCWire.h.


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