Belle II Software development
CDCWire Class Reference

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 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.
 
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 WireLinegetWireLine () 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 Vector3DgetRefPos3D () const
 Getter for the wire reference position.
 
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 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 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.
 
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 CDCWiregetNeighborCCW () const
 Gives the closest neighbor in the counterclockwise direction - always exists.
 
MayBePtr< const CDCWiregetNeighborCW () const
 Gives the closest neighbor in the clockwise direction - always exists.
 
MayBePtr< const CDCWiregetNeighborCCWInwards () const
 Gives the closest neighbor in the countclockwise inwards direction This does not cross superlayer boundaries.
 
MayBePtr< const CDCWiregetNeighborCWInwards () const
 Gives the closest neighbor in the clockwise inwards direction This does not cross superlayer boundaries.
 
MayBePtr< const CDCWiregetNeighborCCWOutwards () const
 Gives the closest neighbor in the countclockwise outwards direction This does not cross superlayer boundaries.
 
MayBePtr< const CDCWiregetNeighborCWOutwards () 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 CDCWiregetInstance (const WireID &wireID)
 Getter from the wireID convenience 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)
 String 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.

Constructor & Destructor Documentation

◆ CDCWire() [1/2]

CDCWire ( const WireID wireID)
explicit

Constructor taking the combined wire id convenience object.

Definition at line 57 of file CDCWire.cc.

58 : m_wireID(wireID)
59{
60 EWirePosition wirePosition = EWirePosition::c_Base;
61 initialize(wirePosition, false);
62}
void initialize(EWirePosition wirePosition, bool ignoreWireSag)
(Re)load all geometry parameters form the CDCGeometryPar to adjust to changes in geometry.
Definition: CDCWire.cc:69
WireID m_wireID
The wireID of the wire.
Definition: CDCWire.h:410

◆ CDCWire() [2/2]

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.

65 : CDCWire(WireID(iSuperLayer, iLayer, iWire))
66{
67}
Class representing a sense wire in the central drift chamber.
Definition: CDCWire.h:58
Class to identify a wire inside the CDC.
Definition: WireID.h:34

Member Function Documentation

◆ getBackwardCylindricalR()

double getBackwardCylindricalR ( ) const
inline

Getter for the distance to the beamline ( z-axes ) at the backward joint point.

Definition at line 272 of file CDCWire.h.

273 { return getWireLine().forwardCylindricalR(); };
const WireLine & getWireLine() const
Getter for the wire line representation of the wire.
Definition: CDCWire.h:188
double forwardCylindricalR() const
Gives the cylindrical radius of the forward position.
Definition: WireLine.h:154

◆ getBackwardPos3D()

Vector3D getBackwardPos3D ( ) const
inline

Getter for the forward joint point of the wire with the wall.

Definition at line 288 of file CDCWire.h.

289 { return getWireLine().backward3D(); }
Vector3D backward3D() const
Gives the position of the backward point.
Definition: WireLine.h:118

◆ getBackwardZ()

double getBackwardZ ( ) const
inline

Getter for the z coordinate at the backward joint points of the wires.

Definition at line 280 of file CDCWire.h.

281 { return getWireLine().backwardZ(); }
double backwardZ() const
Gives the backward z coordinate.
Definition: WireLine.h:134

◆ getClosest()

Vector3D getClosest ( const Vector3D pos3D) const
inline

Calculates the closest approach in the wire to the position.

Definition at line 204 of file CDCWire.h.

205 { return getWireLine().sagClosest3D(pos3D); }
Vector3D sagClosest3D(const Vector3D &point) const
Returns the closest approach on the wire with wire sag effect to the give point.
Definition: WireLine.h:102

◆ getDistance()

double getDistance ( const Vector3D pos3D) const
inline

Calculates the distance from the position to the wire.

Definition at line 200 of file CDCWire.h.

201 { return getWireLine().sagDistance(pos3D); }
double sagDistance(const Vector3D &pos3D) const
Calculates the distance of the given point to the wire with wire sag effect.
Definition: WireLine.h:90

◆ 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.

132 { return getWireID().getEWire(); }
const WireID & getWireID() const
Getter for the wire id.
Definition: CDCWire.h:122
unsigned short getEWire() const
Getter for encoded wire number.
Definition: WireID.h:154

◆ getForwardCylindricalR()

double getForwardCylindricalR ( ) const
inline

Getter for the nominal distance to the beamline ( z-axes ) at the forward joint point.

Definition at line 268 of file CDCWire.h.

269 { return getWireLine().forwardCylindricalR(); };

◆ getForwardPos3D()

Vector3D getForwardPos3D ( ) const
inline

Getter for the forward joint point of the wire with the wall.

Definition at line 284 of file CDCWire.h.

285 { return getWireLine().forward3D(); }
Vector3D forward3D() const
Gives the position of the forward point.
Definition: WireLine.h:110

◆ getForwardZ()

double getForwardZ ( ) const
inline

Getter for the z coordinate at the forward joint points of the wires.

Definition at line 276 of file CDCWire.h.

277 { return getWireLine().forwardZ(); }
double forwardZ() const
Gives the forward z coordinate.
Definition: WireLine.h:130

◆ getICLayer()

ILayer getICLayer ( ) const
inline

Getter for the continuous layer id ranging from 0 - 55.

Definition at line 150 of file CDCWire.h.

151 { return getWireID().getICLayer(); }
unsigned short getICLayer() const
Getter for continuous layer numbering.
Definition: WireID.cc:24

◆ getILayer()

ILayer getILayer ( ) const
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.

160 { return getWireID().getILayer(); }
unsigned short getILayer() const
Getter for layer within the Super-Layer.
Definition: WireID.h:136

◆ getInstance() [1/3]

const CDCWire * getInstance ( const CDCHit hit)
static

Convenience getter for the wire from a hit object.

Definition at line 34 of file CDCWire.cc.

35{
36 if (not CDCWireTopology::getInstance().isValidWireID(WireID(hit.getID()))) {
37 WireID wireID(hit.getID());
38 B2ERROR("Invalid encoded wire id of cdc hit " << wireID);
39 B2ERROR("Superlayer id: " << wireID.getISuperLayer());
40 B2ERROR("Layer cid: " << wireID.getICLayer());
41 B2ERROR("Layer id: " << wireID.getILayer());
42 B2ERROR("Wire id: " << wireID.getIWire());
43 B2FATAL("Do not continue with wrong wire id");
44 return nullptr;
45 }
46
47 const CDCWire& wire = CDCWireTopology::getInstance().getWire(WireID(hit.getID()));
48
49 if (wire.getEWire() != hit.getID()) {
50 B2ERROR("WireID.getEWire() differs from CDCHit.getID()");
51 B2ERROR("WireID.getEWire() : " << wire.getEWire());
52 B2ERROR("CDCHit.getEWire() : " << hit.getID());
53 }
54 return &wire;
55}
const CDCWire & getWire(const WireID &wireId) const
Getter for wire getter by wireID object.
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
unsigned short getEWire() const
Getter for the encoded wire number.
Definition: CDCWire.h:131

◆ getInstance() [2/3]

const CDCWire * getInstance ( const WireID wireID)
static

Getter from the wireID convenience object. Does not construct a new object.

Definition at line 24 of file CDCWire.cc.

25{
26 return &(CDCWireTopology::getInstance().getWire(wireID));
27}

◆ getInstance() [3/3]

const CDCWire * getInstance ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
)
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.

30{
31 return &(CDCWireTopology::getInstance().getWire(iSuperLayer, iLayer, iWire));
32}

◆ getISuperLayer()

ISuperLayer getISuperLayer ( ) const
inline

Gives the superlayer id ranging from 0 - 8.

Definition at line 163 of file CDCWire.h.

164 { return getWireID().getISuperLayer(); }
unsigned short getISuperLayer() const
Getter for Super-Layer.
Definition: WireID.h:130

◆ 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.

147 { return getWireID().getIWire(); }
unsigned short getIWire() const
Getter for wire within the layer.
Definition: WireID.h:145

◆ getLateralCellWidth()

double getLateralCellWidth ( ) const

Getter for the cell widths in lateral direction.

Definition at line 122 of file CDCWire.cc.

123{
125}
double getLateralCellWidth() const
Getter for the width of the wire layer in the lateral direction.
Definition: CDCWireLayer.h:262
const CDCWireLayer & getWireLayer() const
Getter for the wire layer.
Definition: CDCWire.cc:127

◆ getMinCylindricalR()

double getMinCylindricalR ( ) const
inline

Getter for the closest distance to the beamline ( z-axes )

Definition at line 264 of file CDCWire.h.

265 { return getWireLine().nominalPerigee2D().norm(); }
double norm() const
Calculates the length of the vector.
Definition: Vector2D.h:175
Vector2D nominalPerigee2D() const
Returns the point of nominal closest approach to the z axes.
Definition: WireLine.h:203

◆ getMovePerZ()

Vector2D getMovePerZ ( ) const
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.

253 { return getWireLine().nominalMovePerZ(); }
const Vector2D & nominalMovePerZ() const
Gives the positional move in the xy projection per unit z.
Definition: WireLine.h:71

◆ getMovePerZAtZ()

Vector2D getMovePerZAtZ ( double  z) const
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.

257 { return getWireLine().sagMovePerZ(z); }
Vector2D sagMovePerZ(const double z) const
Gives the two dimensional position with wire sag effect of the line at the given z value.
Definition: WireLine.h:75

◆ 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 homogeneity 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.

◆ 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.

170{
172}
MayBePtr< const CDCWire > getNeighborCCWInwards(const WireID &wireID) const
Getter for the nearest counterclockwise neighbor in the next layer outwards.

◆ 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.

180{
182}
MayBePtr< const CDCWire > getNeighborCCWOutwards(const WireID &wireID) const
Getter for the nearest counterclockwise neighbor in the next layer outwards.

◆ 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 homogeneity of the interface.

Definition at line 164 of file CDCWire.cc.

165{
167}
MayBePtr< const CDCWire > getNeighborCW(const WireID &wireID) const
Getter for the nearest clockwise neighbor.

◆ 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.

175{
177}
MayBePtr< const CDCWire > getNeighborCWInwards(const WireID &wireID) const
Getter for the nearest clockwise neighbor in the next layer outwards.

◆ 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.

185{
187}
MayBePtr< const CDCWire > getNeighborCWOutwards(const WireID &wireID) const
Getter for the nearest clockwise neighbor in the next layer outwards.

◆ 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.

140{
142}
WireNeighborKind getNeighborKind(const WireID &wireID, const WireID &otherWireID) const
Checks if two wires are closest neighbors.

◆ 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.

150{
152}
WireNeighborPair getNeighborsInwards(const WireID &wireID) const
Getter for the two closest neighbors in the layer inwards.

◆ 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.

155{
157}
WireNeighborPair getNeighborsOutwards(const WireID &wireID) const
Getter for the two closest neighbors in the layer outwards.

◆ getRadialCellWidth()

double getRadialCellWidth ( ) const

Getter for the cell widths in radial direction.

Definition at line 117 of file CDCWire.cc.

118{
120}
double getRadialCellWidth() const
Getter for the width of the wire layer in the radial direction.
Definition: CDCWireLayer.h:253

◆ getRefCylindricalR()

double getRefCylindricalR ( ) const
inline

Getter for the cylindrical radius at the wire reference position.

Definition at line 260 of file CDCWire.h.

261 { return m_refCylindricalR; }
double m_refCylindricalR
Precomputed distance to the beam line at the reference position.
Definition: CDCWire.h:416

◆ getRefPos2D()

const Vector2D & getRefPos2D ( ) const
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.

230 { return getWireLine().refPos2D(); }
const Vector2D & refPos2D() const
Returns the xy vector of the reference position.
Definition: WireLine.h:223

◆ 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.

223 { return getWireLine().refPos3D(); }
const Vector3D & refPos3D() const
Returns the reference position.
Definition: WireLine.h:227

◆ getRefZ()

double getRefZ ( ) const
inline

Getter for the wire reference z coordinate Gives the wire's reference z coordinate.

Definition at line 236 of file CDCWire.h.

237 { return getWireLine().refZ(); }
double refZ() const
Returns the the z coordinate of the reference point.
Definition: WireLine.h:215

◆ getSecondaryNeighbor()

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.

190{
192}
MayBePtr< const CDCWire > getSecondaryNeighbor(short oClockDirection, const WireID &wireID) const
Getter for the secondary neighbor of the given wire id.

◆ getStereoAngle()

double getStereoAngle ( ) const
inline

Getter for the stereo angle of the wire.

Definition at line 244 of file CDCWire.h.

245 { return getWireLine().theta(); }
double theta() const
Returns the nominal opening angle between tangential vector and the z axes.
Definition: WireLine.h:191

◆ 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.

ISuperLayer getISuperLayer() const
Gives the superlayer id ranging from 0 - 8.
Definition: CDCWire.h:163
static EStereoKind getStereoKind(ISuperLayer iSuperLayer)
Returns the stereo kind of the super layer.
Definition: ISuperLayer.cc:26

◆ getTanStereoAngle()

double getTanStereoAngle ( ) const
inline

Getter for the tangents of the stereo angle of the wire.

Definition at line 240 of file CDCWire.h.

241 { return getWireLine().tanTheta(); }
double tanTheta() const
Returns the tangent of the opening angle between tangential vector and the z axes Also know as ds / d...
Definition: WireLine.h:187

◆ getWireID()

const WireID & getWireID ( ) const
inline

Getter for the wire id.

Definition at line 122 of file CDCWire.h.

123 { return m_wireID; }

◆ getWireLayer()

const CDCWireLayer & getWireLayer ( ) const

Getter for the wire layer.

Definition at line 127 of file CDCWire.cc.

128{
129 ILayer iCLayer = getICLayer();
131}
const CDCWireLayer & getWireLayer(const WireID &wireId) const
Getter for wire layer getter by wireID object.
ILayer getICLayer() const
Getter for the continuous layer id ranging from 0 - 55.
Definition: CDCWire.h:150

◆ getWireLine()

const WireLine & getWireLine ( ) const
inline

Getter for the wire line representation of the wire.

Definition at line 188 of file CDCWire.h.

189 { return m_wireLine; }
WireLine m_wireLine
The line representation of the wire.
Definition: CDCWire.h:413

◆ getWirePos2DAtZ()

Vector2D getWirePos2DAtZ ( const double  z) const
inline

Gives the xy projected position of the wire at the given z coordinate.

Definition at line 192 of file CDCWire.h.

193 { return getWireLine().sagPos2DAtZ(z); }
Vector2D sagPos2DAtZ(const double z) const
Gives the two dimensional position with wire sag effect of the line at the given z value.
Definition: WireLine.h:60

◆ getWirePos3DAtZ()

Vector3D getWirePos3DAtZ ( const double  z) const
inline

Gives position of the wire at the given z coordinate.

Definition at line 196 of file CDCWire.h.

197 { return getWireLine().sagPos3DAtZ(z); }
Vector3D sagPos3DAtZ(const double z) const
Gives the three dimensional position with wire sag effect of the line at the given z value.
Definition: WireLine.h:56

◆ getWireSuperLayer()

const CDCWireSuperLayer & getWireSuperLayer ( ) const

Getter for the wire super layer.

Definition at line 133 of file CDCWire.cc.

134{
135 ISuperLayer iSuperLayer = getISuperLayer();
137}
const CDCWireSuperLayer & getWireSuperLayer(const WireID &wireID) const
Getter for wire superlayer getter by wireID object.

◆ getWireVector()

Vector3D getWireVector ( ) const
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.

249 { return getWireLine().wireVector(); }
Vector3D wireVector() const
Getter for the vector from backward to the forward position.
Definition: WireLine.h:126

◆ 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.

70{
72 CDC::CDCGeometryPar::EWirePosition wirePosSet = toCDC(wirePosition);
73
74 IWire iWire = getIWire();
75 ILayer iCLayer = getICLayer();
76
77 Vector3D forwardPos{cdcgp.wireForwardPosition(iCLayer, iWire, wirePosSet)};
78 Vector3D backwardPos{cdcgp.wireBackwardPosition(iCLayer, iWire, wirePosSet)};
79 double sagCoeff = ignoreWireSag ? 0 : cdcgp.getWireSagCoef(wirePosSet, iCLayer, iWire);
80
81 m_wireLine = WireLine(forwardPos, backwardPos, sagCoeff);
83
85 if (not isAxial() and (m_wireLine.tanTheta() == 0)) {
86 B2WARNING("Odd wire " << *this);
87 B2WARNING("wireForwardPosition " << forwardPos);
88 B2WARNING("wireBackwardPosition " << backwardPos);
89 B2WARNING("forward " << m_wireLine.forward3D());
90 B2WARNING("backward " << m_wireLine.backward3D());
91 B2WARNING("ref " << m_wireLine.refPos3D());
92 B2WARNING("tan theta " << m_wireLine.tanTheta());
93 }
94}
The Class for CDC Geometry Parameters.
EWirePosition
Wire position set.
const B2Vector3D wireForwardPosition(uint layerId, int cellId, EWirePosition set=c_Base) const
Returns the forward position of the input sense wire.
const B2Vector3D wireBackwardPosition(uint layerId, int cellId, EWirePosition set=c_Base) const
Returns the backward position of the input sense wire.
double getWireSagCoef(EWirePosition set, uint layerId, int cellId) const
Returns coefficient for the sense wire sag.
static CDCGeometryPar & Instance(const CDCGeometry *=nullptr)
Static method to get a reference to the CDCGeometryPar instance.
bool isAxial() const
Indicates if the wire is axial or stereo.
Definition: CDCWire.h:174
IWire getIWire() const
Getter for the wire id within its layer.
Definition: CDCWire.h:146
const Vector2D & getRefPos2D() const
Getter for the wire reference position for 2D tracking Gives the wire's reference position projected ...
Definition: CDCWire.h:229
A three dimensional vector.
Definition: Vector3D.h:33
A three dimensional limited line represented by its closest approach to the z-axes (reference positio...
Definition: WireLine.h:31

◆ isAxial()

bool isAxial ( ) const
inline

Indicates if the wire is axial or stereo.

Definition at line 174 of file CDCWire.h.

175 { return getStereoKind() == EStereoKind::c_Axial; }
EStereoKind getStereoKind() const
Getter for the stereo type of the wire.
Definition: CDCWire.h:184

◆ isInCell()

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.

97{
98 bool inZ = getBackwardZ() < pos3D.z() and pos3D.z() < getForwardZ();
99 if (not inZ) return false;
100
101 ILayer iCLayer = getICLayer();
102 const CDCWireLayer& wireLayer = getWireLayer();
103 double innerCylindricalR = wireLayer.getInnerCylindricalR();
104 double outerCylindricalR = wireLayer.getOuterCylindricalR();
105 double cylindricalR = pos3D.cylindricalR();
106
107 bool inCylindricalR = innerCylindricalR < cylindricalR and cylindricalR < outerCylindricalR;
108 if (not inCylindricalR) return false;
109
110 IWire iWire = CDC::CDCGeometryPar::Instance().cellId(iCLayer, pos3D);
111 // Safety measure against error in the cellId function
112 iWire %= wireLayer.size();
113 bool inPhi = iWire == getIWire();
114 return inPhi;
115}
unsigned cellId(unsigned layerId, const B2Vector3D &position) const
The method to get cell id based on given layer id and the position.
Class representing a sense wire layer in the central drift chamber.
Definition: CDCWireLayer.h:42
double getInnerCylindricalR() const
Getter for inner radius of the layer as taken from the CDCGeometryPar.
Definition: CDCWireLayer.h:245
double getOuterCylindricalR() const
Getter for outer radius of the layer as taken from the CDCGeometryPar.
Definition: CDCWireLayer.h:249
double getForwardZ() const
Getter for the z coordinate at the forward joint points of the wires.
Definition: CDCWire.h:276
double getBackwardZ() const
Getter for the z coordinate at the backward joint points of the wires.
Definition: CDCWire.h:280
std::size_t size() const
Returns the total number of objects in this range.
Definition: Range.h:76
double cylindricalR() const
Getter for the cylindrical radius ( xy projected norm )
Definition: Vector3D.h:534
double z() const
Getter for the z coordinate.
Definition: Vector3D.h:496

◆ isInCellZBounds()

bool isInCellZBounds ( const Vector3D pos3D,
const double  factor = 1 
) const
inline

Checks whether the position is in the z bounds of the drift cell (scaled by the factor) surrounding the wire.

Definition at line 295 of file CDCWire.h.

296 { return getBackwardZ() * factor < pos3D.z() and pos3D.z() < getForwardZ() * factor; }

◆ isPrimaryNeighborWith()

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.

145{
147}
bool arePrimaryNeighbors(const WireID &wireID, const WireID &otherWireID) const
Checks if two wires are primary neighbors.

◆ operator const Belle2::WireID &()

operator const Belle2::WireID & ( ) const
inline

Implicit downcast to WireID forgetting the line information as needed.

Definition at line 118 of file CDCWire.h.

119 { return getWireID(); }

◆ 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.

106 { return getWireID() < other.getWireID(); }

◆ operator==()

bool operator== ( const CDCWire other) const
inline

Equality comparison based on wireID.

Definition at line 94 of file CDCWire.h.

95 { return getWireID() == other.getWireID(); }

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  output,
const CDCWire wire 
)
friend

String output operator for wire objects to help debugging.

Definition at line 405 of file CDCWire.h.

406 { return (output << "CDCWire(" << wire.getISuperLayer() << "," << wire.getILayer() << "," << wire.getIWire() << ")") ; }

Member Data Documentation

◆ m_refCylindricalR

double m_refCylindricalR
private

Precomputed distance to the beam line at the reference position.

Definition at line 416 of file CDCWire.h.

◆ m_wireID

WireID m_wireID
private

The wireID of the wire.

Definition at line 410 of file CDCWire.h.

◆ m_wireLine

WireLine m_wireLine
private

The line representation of the wire.

Definition at line 413 of file CDCWire.h.


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