Belle II Software development
|
Class representing a sense wire in the central drift chamber. More...
#include <CDCWire.h>
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 comparison 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. | |
void | initialize (EWirePosition wirePosition, bool ignoreWireSag) |
(Re)load all geometry parameters form the CDCGeometryPar to adjust to changes in geometry. | |
MayBePtr< const CDCWire > | getSecondaryNeighbor (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 WireID & | getWireID () const |
Getter for the wire id. | |
unsigned short | getEWire () const |
Getter for the encoded wire number. | |
IWire | getIWire () const |
Getter for the wire id within its layer. | |
ILayer | getICLayer () const |
Getter for the continuous 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. | |
const WireLine & | getWireLine () const |
Getter for the wire line representation 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. | |
const Vector3D & | getRefPos3D () const |
Getter for the wire reference position. | |
const Vector2D & | getRefPos2D () 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 of the 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 CDCWireLayer & | getWireLayer () const |
Getter for the wire layer. | |
const CDCWireSuperLayer & | getWireSuperLayer () 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. | |
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. | |
WireNeighborPair | getNeighborsOutwards () const |
Gives the two wires in the next layer outward. | |
MayBePtr< const CDCWire > | getNeighborCCW () const |
Gives the closest neighbor in the counterclockwise direction - always exists. | |
MayBePtr< const CDCWire > | getNeighborCW () const |
Gives the closest neighbor in the clockwise direction - always exists. | |
MayBePtr< const CDCWire > | getNeighborCCWInwards () const |
Gives the closest neighbor in the countclockwise inwards direction This does not cross superlayer boundaries. | |
MayBePtr< const CDCWire > | getNeighborCWInwards () const |
Gives the closest neighbor in the clockwise inwards direction This does not cross superlayer boundaries. | |
MayBePtr< const CDCWire > | getNeighborCCWOutwards () const |
Gives the closest neighbor in the countclockwise outwards direction This does not cross superlayer boundaries. | |
MayBePtr< const CDCWire > | getNeighborCWOutwards () const |
Gives the closest neighbor in the clockwise outwards direction This does not cross superlayer boundaries. | |
Static Public Member Functions | |
Static instance getters | |
Getter for the already constructed instances form the CDCWireTopology::getInstance() object. | |
static const CDCWire * | getInstance (const WireID &wireID) |
Getter from the wireID convenience object. Does not construct a new object. | |
static const CDCWire * | getInstance (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 CDCWire * | getInstance (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) |
String output operator for wire objects to help debugging. | |
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.
Constructor taking the combined wire id convenience object.
Definition at line 57 of file CDCWire.cc.
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.
Definition at line 64 of file CDCWire.cc.
|
inline |
Getter for the distance to the beamline ( z-axes ) at the backward joint point.
Definition at line 272 of file CDCWire.h.
|
inline |
Getter for the forward joint point of the wire with the wall.
Definition at line 288 of file CDCWire.h.
|
inline |
Getter for the z coordinate at the backward joint points of the wires.
Definition at line 280 of file CDCWire.h.
Calculates the closest approach in the wire to the position.
Definition at line 204 of file CDCWire.h.
|
inline |
Calculates the distance from the position to the wire.
Definition at line 200 of file CDCWire.h.
|
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.
Definition at line 214 of file CDCWire.h.
|
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.
|
inline |
|
inline |
Getter for the forward joint point of the wire with the wall.
Definition at line 284 of file CDCWire.h.
|
inline |
Getter for the z coordinate at the forward joint points of the wires.
Definition at line 276 of file CDCWire.h.
|
inline |
Getter for the continuous layer id ranging from 0 - 55.
Definition at line 150 of file CDCWire.h.
|
inline |
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.
Definition at line 159 of file CDCWire.h.
Convenience getter for the wire from a hit object.
Definition at line 34 of file CDCWire.cc.
Getter from the wireID convenience object. Does not construct a new object.
Definition at line 24 of file CDCWire.cc.
|
static |
Getter from the superlayer id, the layer id and the wire id. Does not construct a new object.
Definition at line 29 of file CDCWire.cc.
|
inline |
Gives the superlayer id ranging from 0 - 8.
Definition at line 163 of file CDCWire.h.
|
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.
double getLateralCellWidth | ( | ) | const |
Getter for the cell widths in lateral direction.
Definition at line 122 of file CDCWire.cc.
|
inline |
Getter for the closest distance to the beamline ( z-axes )
Definition at line 264 of file CDCWire.h.
|
inline |
Getter for the vector describing the nominal positional change in the xy plane per unit z.
Definition at line 252 of file CDCWire.h.
|
inline |
Getter for the vector describing the real positional change in the xy plane per unit z at the z position of the wire .
Definition at line 256 of file CDCWire.h.
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 homogeneity of the interface.
Definition at line 159 of file CDCWire.cc.
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.
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.
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 homogeneity of the interface.
Definition at line 164 of file CDCWire.cc.
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.
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.
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.
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.
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.
double getRadialCellWidth | ( | ) | const |
Getter for the cell widths in radial direction.
Definition at line 117 of file CDCWire.cc.
|
inline |
Getter for the cylindrical radius at the wire reference position.
Definition at line 260 of file CDCWire.h.
|
inline |
Getter for the wire reference position for 2D tracking Gives the wire's reference position projected to the xy plane.
Definition at line 229 of file CDCWire.h.
|
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.
|
inline |
Getter for the wire reference z coordinate Gives the wire's reference z coordinate.
Definition at line 236 of file CDCWire.h.
MayBePtr< const CDCWire > getSecondaryNeighbor | ( | short | oClockDirection | ) | const |
Getter for the secondary neighbors of this wire id following the direction on the clock.
Definition at line 189 of file CDCWire.cc.
|
inline |
Getter for the stereo angle of the wire.
Definition at line 244 of file CDCWire.h.
|
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.
|
inline |
Getter for the tangents of the stereo angle of the wire.
Definition at line 240 of file CDCWire.h.
|
inline |
const CDCWireLayer & getWireLayer | ( | ) | const |
Getter for the wire layer.
Definition at line 127 of file CDCWire.cc.
|
inline |
Getter for the wire line representation of the wire.
Definition at line 188 of file CDCWire.h.
|
inline |
Gives the xy projected position of the wire at the given z coordinate.
Definition at line 192 of file CDCWire.h.
|
inline |
Gives position of the wire at the given z coordinate.
Definition at line 196 of file CDCWire.h.
const CDCWireSuperLayer & getWireSuperLayer | ( | ) | const |
Getter for the wire super layer.
Definition at line 133 of file CDCWire.cc.
|
inline |
Getter for the vector pointing from the back end of the wire to the front end of the wire.
Definition at line 248 of file CDCWire.h.
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.
|
inline |
Indicates if the wire is axial or stereo.
Definition at line 174 of file CDCWire.h.
bool isInCell | ( | const Vector3D & | pos3D | ) | const |
Checks whether the position is in the drift cell surrounding the wire.
Definition at line 96 of file CDCWire.cc.
|
inline |
bool isPrimaryNeighborWith | ( | const CDCWire & | wire | ) | const |
Returns whether the give wire is a neighbor of this wire.
Definition at line 144 of file CDCWire.cc.
|
inline |
|
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.
|
inline |
|
friend |
|
private |
|
private |