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

Class representating the sense wire arrangement in the whole of the central drift chamber. More...

#include <CDCWireTopology.h>

Collaboration diagram for CDCWireTopology:

Public Member Functions

 CDCWireTopology ()
 Default constructor for ROOT compatibility. Use rather getInstance to get the shared singleton instance.
 
 CDCWireTopology (const CDCWireTopology &wireTopology)=delete
 Disallow copy construction of the wire topology.
 
void operator= (const CDCWireTopology &wireTopology)=delete
 Disallow copy assignment of the wire topology.
 
void reinitialize (EWirePosition wirePosition, bool ignoreWireSag)
 Reload all geometry parameters form the CDCGeometryPar to adjust to changes in geometry.
 
double getOuterCylindricalR () const
 Getter for the outer radius of the outer most wire layer.
 
double getInnerCylindricalR () const
 Getter for the inner radius of the inner most wire layer.
 
Wire getters

Gets the wires from a WireID.

bool isValidWireID (const WireID &wireID) const
 Checks the validity of a wireID convinience object.
 
bool isValidIWire (ILayer iCLayer, IWire iWire) const
 Checks the validity of the continuous layer id, wire id combination.
 
bool isValidIWire (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Checks the validity of the superlayer id, layer id, wire id combination.
 
const CDCWiregetWire (const WireID &wireId) const
 Getter for wire getter by wireID object.
 
const CDCWiregetWire (ILayer iCLayer, IWire iWire) const
 Getter for wire getter by continuous layer id and wire id.
 
const CDCWiregetWire (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for wire getter by superlayer id, layer id and wire id.
 
const std::vector< Belle2::TrackFindingCDC::CDCWire > & getWires () const
 Getter for the underlying storing wire vector.
 
Wire layer getters

Getters for the wire layer

ILayer getNLayers () const
 Getter for the total number of wire layers.
 
bool isValidICLayer (ILayer iCLayer) const
 Checks the validity of the continuous layer id.
 
bool isValidILayer (ISuperLayer iSuperLayer, ILayer iLayer) const
 Checks the validity of the superlayer id, layer id combination.
 
const CDCWireLayergetWireLayer (const WireID &wireId) const
 Getter for wire layer getter by wireID object.
 
const CDCWireLayergetWireLayer (ILayer iCLayer) const
 Getter for wire layer getter by continuous layer id.
 
const CDCWireLayergetWireLayer (ISuperLayer iSuperLayer, ILayer iLayer) const
 Getter for wire layer getter by superlayer id and layer id.
 
const std::vector< Belle2::TrackFindingCDC::CDCWireLayer > & getWireLayers () const
 Getter for the underlying storing layer vector.
 
Wire superlayer getters

Getters for the wire superlayers

ISuperLayer getNSuperLayers () const
 Getter for the total number of superlayers.
 
bool isValidISuperLayer (ISuperLayer iSuperLayer) const
 Checks the validity of the superlayer id.
 
ISuperLayer getISuperLayerAtCylindricalR (double cylindricalR)
 Returns the logical superlayer number at the given radius.
 
const CDCWireSuperLayergetWireSuperLayer (const WireID &wireID) const
 Getter for wire superlayer getter by wireID object.
 
const CDCWireSuperLayergetWireSuperLayer (ISuperLayer iSuperLayer) const
 Getter for wire superlayer getter by superlayer id.
 
const std::vector< Belle2::TrackFindingCDC::CDCWireSuperLayer > & getWireSuperLayers () const
 Getter for the underlying storing superlayer vector.
 
Getters for the closest neighbors of a wire by wireID

They do not cross superlayer boundaries.


Note : Not all neighbors might be present at the boundaries of the superlayer.
In case the neighbor asked for does not exist the function return nullptr instead.

WireNeighborKind getNeighborKind (const WireID &wireID, const WireID &otherWireID) const
 Checks if two wires are closest neighbors. More...
 
bool arePrimaryNeighbors (const WireID &wireID, const WireID &otherWireID) const
 Checks if two wires are primary neighbors.
 
bool areSeconaryNeighbors (const WireID &wireID, const WireID &otherWireID) const
 Checks if two wires are secondary neighbors.
 
MayBePtr< const CDCWiregetPrimaryNeighbor (short oClockDirection, const WireID &wireID) const
 Getter for the primary neighbor of the given wire id.
 
WireNeighborPair getNeighborsOutwards (const WireID &wireID) const
 Getter for the two closest neighbors in the layer outwards.
 
WireNeighborPair getNeighborsInwards (const WireID &wireID) const
 Getter for the two closest neighbors in the layer inwards.
 
MayBePtr< const CDCWiregetNeighborCCWOutwards (const WireID &wireID) const
 Getter for the nearest counterclockwise neighbor in the next layer outwards.
 
MayBePtr< const CDCWiregetNeighborCWOutwards (const WireID &wireID) const
 Getter for the nearest clockwise neighbor in the next layer outwards.
 
MayBePtr< const CDCWiregetNeighborCCW (const WireID &wireID) const
 Getter for the nearest counterclockwise neighbor.
 
MayBePtr< const CDCWiregetNeighborCW (const WireID &wireID) const
 Getter for the nearest clockwise neighbor.
 
MayBePtr< const CDCWiregetNeighborCCWInwards (const WireID &wireID) const
 Getter for the nearest counterclockwise neighbor in the next layer outwards.
 
MayBePtr< const CDCWiregetNeighborCWInwards (const WireID &wireID) const
 Getter for the nearest clockwise neighbor in the next layer outwards.
 
Getters for the closest neighbors of a wire by superlayer id, layer id and wire id

They do not cross superlayer boundaries.


Note : Not all neighbors might be present at the boundaries of the superlayer.
In case the neighbor asked for does not exist the function return nullptr instead.

MayBePtr< const CDCWiregetPrimaryNeighbor (short oClockDirection, ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for the primary neighbor of the given wire id following the direction on the clock.
 
WireNeighborPair getNeighborsOutwards (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for the two closest neighbors in the layer outwards.
 
WireNeighborPair getNeighborsInwards (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for the two closest neighbors in the layer inwards.
 
MayBePtr< const CDCWiregetNeighborCCWOutwards (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for the nearest counterclockwise neighbor in the next layer outwards.
 
MayBePtr< const CDCWiregetNeighborCWOutwards (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for the nearest clockwise neighbor in the next layer outwards.
 
MayBePtr< const CDCWiregetNeighborCCW (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for the nearest counterclockwise neighbor.
 
MayBePtr< const CDCWiregetNeighborCW (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for the nearest clockwise neighbor.
 
MayBePtr< const CDCWiregetNeighborCCWInwards (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for the nearest counterclockwise neighbor in the next layer outwards.
 
MayBePtr< const CDCWiregetNeighborCWInwards (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for the nearest clockwise neighbor in the next layer outwards.
 
Secondary neighbor getters by wireID object

The secondary neighbors are numbered like positions on the normal twelve hour clock.

The rational of this is that the secondary neighbors are positioned
just like the numbers on the clock if you took the center of the clock to the wire position
and the twelve o'clock points in the direction outwards.
Note : Not all neighbors might be present at the boundaries of the superlayer.
In case the neighbor asked for does not exist the function return nullptr instead.

MayBePtr< const CDCWiregetSecondaryNeighbor (short oClockDirection, const WireID &wireID) const
 Getter for the secondary neighbor of the given wire id.
 
MayBePtr< const CDCWiregetSecondNeighborOneOClock (const WireID &wireID) const
 Getter for secondary neighbor at the one o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborTwoOClock (const WireID &wireID) const
 Getter for secondary neighbor at the two o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborThreeOClock (const WireID &wireID) const
 Getter for secondary neighbor at the three o'clock position - always exists.
 
MayBePtr< const CDCWiregetSecondNeighborFourOClock (const WireID &wireID) const
 Getter for secondary neighbor at the four o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborFiveOClock (const WireID &wireID) const
 Getter for secondary neighbor at the five o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborSixOClock (const WireID &wireID) const
 Getter for secondary neighbor at the six o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborSevenOClock (const WireID &wireID) const
 Getter for secondary neighbor at the seven o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborEightOClock (const WireID &wireID) const
 Getter for secondary neighbor at the eight o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborNineOClock (const WireID &wireID) const
 Getter for secondary neighbor at the nine o'clock position - always exists.
 
MayBePtr< const CDCWiregetSecondNeighborTenOClock (const WireID &wireID) const
 Getter for secondary neighbor at the ten o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborElevenOClock (const WireID &wireID) const
 Getter for secondary neighbor at the eleven o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborTwelveOClock (const WireID &wireID) const
 Getter for secondary neighbor at the twelve o'clock position.
 
Secondary neighbor getters by superlayer id , layer id and wire id.

The secondary neighbors are numbered like positions on the normal twelve hour clock.

The rational of this is that the secondary neighbors are positioned
just like the numbers on the clock if you took the center of the clock to the wire position
and the twelve o'clock points in the direction outwards.

Note : Not all neighbors might be present at the boundaries of the superlayer.
In case the neighbor asked for does not exist the function return nullptr instead.

MayBePtr< const CDCWiregetSecondaryNeighbor (short oClockDirection, ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for the secondary neighbor of the given wire id following the direction on the clock.
 
MayBePtr< const CDCWiregetSecondNeighborOneOClock (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the one o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborTwoOClock (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the two o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborThreeOClock (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the three o'clock position - always exists.
 
MayBePtr< const CDCWiregetSecondNeighborFourOClock (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the four o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborFiveOClock (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the five o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborSixOClock (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the six o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborSevenOClock (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the seven o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborEightOClock (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the eight o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborNineOClock (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the nine o'clock position - always exists.
 
MayBePtr< const CDCWiregetSecondNeighborTenOClock (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the ten o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborElevenOClock (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the eleven o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborTwelveOClock (ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the twelve o'clock position.
 

Static Public Member Functions

static CDCWireTopologygetInstance ()
 Getter for the singleton instance of the wire topology.
 

Static Public Attributes

static const IWire c_NWires = 14336
 Total number of wires.
 
static const ILayer c_NLayers = 56
 Total number of layers.
 
static const ISuperLayer c_NSuperLayers = 9
 Total number of superlayers.
 

Private Member Functions

void initialize ()
 Create all wires, wire layers and wire superlayers and their interdependences with base geometry from the CDCGeometryPar.
 

Private Attributes

std::vector< Belle2::TrackFindingCDC::CDCWirem_wires
 Storage for all wires in the CDC.
 
std::vector< Belle2::TrackFindingCDC::CDCWireLayerm_wireLayers
 Storage for all wire layers in the CDC.
 
std::vector< Belle2::TrackFindingCDC::CDCWireSuperLayerm_wireSuperLayers
 Storage for all wire superlayers in the CDC.
 
ILayer m_FirstLayerOffset = 0
 Offset of first layer.
 

Detailed Description

Class representating the sense wire arrangement in the whole of the central drift chamber.

This class represents the the whole CDC layer geometry and the neighborhood relations in it.
Since their is only one CDC at a time it is implemented as a singletone object, with getInstance().
Their should rarely be the need to construct additional instances.
It provides getters for all wires, layers and superlayers and can check the validity of wire id combinations.
Also there are methods for getting to the closest and secondary of each wire.
The class does provide the memory for all instances of wires, layers and superlayers.

Definition at line 44 of file CDCWireTopology.h.

Member Function Documentation

◆ getNeighborKind()

WireNeighborKind getNeighborKind ( const WireID wireID,
const WireID otherWireID 
) const

Checks if two wires are closest neighbors.

see details. Returns the relation of the first wire to the second wire give by their layer id within the superlayer and the wire id.

Definition at line 107 of file CDCWireTopology.cc.

108 {
109  if (wireID.getISuperLayer() != otherWireID.getISuperLayer() and
111  return WireNeighborKind();
112  } else {
113  const CDCWireSuperLayer& superlayer = getWireSuperLayer(wireID.getISuperLayer());
114  return superlayer.getNeighborKind(wireID.getILayer(),
115  wireID.getIWire(),
116  otherWireID.getILayer(),
117  otherWireID.getIWire());
118  }
119 }
Class representating a sense wire superlayer in the central drift chamber.
WireNeighborKind getNeighborKind(ILayer iLayer, IWire iWire, ILayer iOtherLayer, IWire iOtherWire) const
Checks if two wires are closest neighbors.
const CDCWireSuperLayer & getWireSuperLayer(const WireID &wireID) const
Getter for wire superlayer getter by wireID object.
bool isValidISuperLayer(ISuperLayer iSuperLayer) const
Checks the validity of the superlayer id.
Type for the neighbor relationship from one wire to another.
unsigned short getIWire() const
Getter for wire within the layer.
Definition: WireID.h:145
unsigned short getISuperLayer() const
Getter for Super-Layer.
Definition: WireID.h:130
unsigned short getILayer() const
Getter for layer within the Super-Layer.
Definition: WireID.h:136

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