Belle II Software development
CDCWireTopology Class Reference

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

#include <CDCWireTopology.h>

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

Constructor & Destructor Documentation

◆ CDCWireTopology()

CDCWireTopology ( )
inline

Default constructor for ROOT compatibility. Use rather getInstance to get the shared singleton instance.

Definition at line 52 of file CDCWireTopology.h.

53 { initialize(); }
void initialize()
Create all wires, wire layers and wire superlayers and their interdependences with base geometry from...

Member Function Documentation

◆ arePrimaryNeighbors()

bool arePrimaryNeighbors ( const WireID wireID,
const WireID otherWireID 
) const
inline

Checks if two wires are primary neighbors.

Definition at line 201 of file CDCWireTopology.h.

202 { return getNeighborKind(wireID, otherWireID).getCellDistance() == 1; }
WireNeighborKind getNeighborKind(const WireID &wireID, const WireID &otherWireID) const
Checks if two wires are closest neighbors.
short getCellDistance() const
Get the distance to the wire neighbor counted in number of cells.

◆ areSeconaryNeighbors()

bool areSeconaryNeighbors ( const WireID wireID,
const WireID otherWireID 
) const
inline

Checks if two wires are secondary neighbors.

Definition at line 205 of file CDCWireTopology.h.

206 { return getNeighborKind(wireID, otherWireID).getCellDistance() == 2; }

◆ getInnerCylindricalR()

double getInnerCylindricalR ( ) const
inline

Getter for the inner radius of the inner most wire layer.

Definition at line 475 of file CDCWireTopology.h.

476 { return m_wireLayers.front().getInnerCylindricalR(); }
std::vector< Belle2::TrackFindingCDC::CDCWireLayer > m_wireLayers
Storage for all wire layers in the CDC.

◆ getInstance()

CDCWireTopology & getInstance ( )
static

Getter for the singleton instance of the wire topology.

Definition at line 20 of file CDCWireTopology.cc.

21{
22 // Definition of the singleton instance
23 static CDCWireTopology instance;
24 return instance;
25}
Class representating the sense wire arrangement in the whole of the central drift chamber.

◆ getISuperLayerAtCylindricalR()

ISuperLayer getISuperLayerAtCylindricalR ( double  cylindricalR)

Returns the logical superlayer number at the given radius.

Definition at line 85 of file CDCWireTopology.cc.

86{
87 const CDCWireTopology& cdcWireTopology = CDCWireTopology::getInstance();
88 const std::vector<CDCWireSuperLayer>& wireSuperLayers = cdcWireTopology.getWireSuperLayers();
89
90 if (std::isnan(cylindricalR) or cylindricalR < 0) {
92 }
93
94 if (cylindricalR < cdcWireTopology.getWireSuperLayer(0).getInnerCylindricalR()) {
96 }
97
98 for (const CDCWireSuperLayer& wireSuperLayer : wireSuperLayers) {
99 if (cylindricalR <= wireSuperLayer.getOuterCylindricalR()) {
100 return wireSuperLayer.getISuperLayer();
101 }
102 }
103
105}
Class representating a sense wire superlayer in the central drift chamber.
double getInnerCylindricalR() const
Getter for the inner radius of the layer as retrived from the CDCGeometryPar by the inner most layer.
const std::vector< Belle2::TrackFindingCDC::CDCWireSuperLayer > & getWireSuperLayers() const
Getter for the underlying storing superlayer vector.
const CDCWireSuperLayer & getWireSuperLayer(const WireID &wireID) const
Getter for wire superlayer getter by wireID object.
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
static const ISuperLayer c_Invalid
Constant making an invalid superlayer id.
Definition: ISuperLayer.h:65
static const ISuperLayer c_InnerVolume
Constant marking the subdetectors closer to the IP than the CDC.
Definition: ISuperLayer.h:59
static const ISuperLayer c_OuterVolume
Constant marking the subdetectors further away from the IP than the CDC.
Definition: ISuperLayer.h:62

◆ getNeighborCCW() [1/2]

MayBePtr< const CDCWire > getNeighborCCW ( const WireID wireID) const
inline

Getter for the nearest counterclockwise neighbor.

Definition at line 229 of file CDCWireTopology.h.

230 { return getNeighborCCW(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getNeighborCCW(const WireID &wireID) const
Getter for the nearest counterclockwise neighbor.

◆ getNeighborCCW() [2/2]

MayBePtr< const CDCWire > getNeighborCCW ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for the nearest counterclockwise neighbor.

Definition at line 287 of file CDCWireTopology.h.

290 { return getWireSuperLayer(iSuperLayer).getNeighborCCW(iLayer, iWire); }
MayBePtr< const CDCWire > getNeighborCCW(ILayer iLayer, IWire iWire) const
Getter for the nearest counterclockwise neighbor by wire id and layer id with in this superlayer.

◆ getNeighborCCWInwards() [1/2]

MayBePtr< const CDCWire > getNeighborCCWInwards ( const WireID wireID) const
inline

Getter for the nearest counterclockwise neighbor in the next layer outwards.

Definition at line 237 of file CDCWireTopology.h.

238 { return getNeighborCCWInwards(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getNeighborCCWInwards(const WireID &wireID) const
Getter for the nearest counterclockwise neighbor in the next layer outwards.

◆ getNeighborCCWInwards() [2/2]

MayBePtr< const CDCWire > getNeighborCCWInwards ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for the nearest counterclockwise neighbor in the next layer outwards.

Definition at line 299 of file CDCWireTopology.h.

302 { return getWireSuperLayer(iSuperLayer).getNeighborCCWInwards(iLayer, iWire); }
MayBePtr< const CDCWire > getNeighborCCWInwards(ILayer iLayer, IWire iWire) const
Getter for the nearest clockwise neighbor in the next layer outwards by wire id and layer id with in ...

◆ getNeighborCCWOutwards() [1/2]

MayBePtr< const CDCWire > getNeighborCCWOutwards ( const WireID wireID) const
inline

Getter for the nearest counterclockwise neighbor in the next layer outwards.

Definition at line 221 of file CDCWireTopology.h.

222 { return getNeighborCCWOutwards(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getNeighborCCWOutwards(const WireID &wireID) const
Getter for the nearest counterclockwise neighbor in the next layer outwards.

◆ getNeighborCCWOutwards() [2/2]

MayBePtr< const CDCWire > getNeighborCCWOutwards ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for the nearest counterclockwise neighbor in the next layer outwards.

Definition at line 275 of file CDCWireTopology.h.

278 { return getWireSuperLayer(iSuperLayer).getNeighborCCWOutwards(iLayer, iWire); }
MayBePtr< const CDCWire > getNeighborCCWOutwards(ILayer iLayer, IWire iWire) const
Getter for the nearest clockwise neighbor in the next layer outwards by wire id and layer id with in ...

◆ getNeighborCW() [1/2]

MayBePtr< const CDCWire > getNeighborCW ( const WireID wireID) const
inline

Getter for the nearest clockwise neighbor.

Definition at line 233 of file CDCWireTopology.h.

234 { return getNeighborCW(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getNeighborCW(const WireID &wireID) const
Getter for the nearest clockwise neighbor.

◆ getNeighborCW() [2/2]

MayBePtr< const CDCWire > getNeighborCW ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for the nearest clockwise neighbor.

Definition at line 293 of file CDCWireTopology.h.

296 { return getWireSuperLayer(iSuperLayer).getNeighborCW(iLayer, iWire); }
MayBePtr< const CDCWire > getNeighborCW(ILayer iLayer, IWire iWire) const
Getter for the nearest clockwise neighbor by wire id and layer id with in this superlayer.

◆ getNeighborCWInwards() [1/2]

MayBePtr< const CDCWire > getNeighborCWInwards ( const WireID wireID) const
inline

Getter for the nearest clockwise neighbor in the next layer outwards.

Definition at line 241 of file CDCWireTopology.h.

242 { return getNeighborCWInwards(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getNeighborCWInwards(const WireID &wireID) const
Getter for the nearest clockwise neighbor in the next layer outwards.

◆ getNeighborCWInwards() [2/2]

MayBePtr< const CDCWire > getNeighborCWInwards ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for the nearest clockwise neighbor in the next layer outwards.

Definition at line 305 of file CDCWireTopology.h.

308 { return getWireSuperLayer(iSuperLayer).getNeighborCWInwards(iLayer, iWire); }
MayBePtr< const CDCWire > getNeighborCWInwards(ILayer iLayer, IWire iWire) const
Getter for the nearest clockwise neighbor in the next layer outwards by wire id and layer id with in ...

◆ getNeighborCWOutwards() [1/2]

MayBePtr< const CDCWire > getNeighborCWOutwards ( const WireID wireID) const
inline

Getter for the nearest clockwise neighbor in the next layer outwards.

Definition at line 225 of file CDCWireTopology.h.

226 { return getNeighborCWOutwards(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getNeighborCWOutwards(const WireID &wireID) const
Getter for the nearest clockwise neighbor in the next layer outwards.

◆ getNeighborCWOutwards() [2/2]

MayBePtr< const CDCWire > getNeighborCWOutwards ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for the nearest clockwise neighbor in the next layer outwards.

Definition at line 281 of file CDCWireTopology.h.

284 { return getWireSuperLayer(iSuperLayer).getNeighborCWOutwards(iLayer, iWire); }
MayBePtr< const CDCWire > getNeighborCWOutwards(ILayer iLayer, IWire iWire) const
Getter for the nearest clockwise neighbor in the next layer outwards by wire id and layer id with in ...

◆ 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}
WireNeighborKind getNeighborKind(ILayer iLayer, IWire iWire, ILayer iOtherLayer, IWire iOtherWire) const
Checks if two wires are closest neighbors.
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

◆ getNeighborsInwards() [1/2]

WireNeighborPair getNeighborsInwards ( const WireID wireID) const
inline

Getter for the two closest neighbors in the layer inwards.

Definition at line 217 of file CDCWireTopology.h.

218 { return getNeighborsInwards(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
WireNeighborPair getNeighborsInwards(const WireID &wireID) const
Getter for the two closest neighbors in the layer inwards.

◆ getNeighborsInwards() [2/2]

WireNeighborPair getNeighborsInwards ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for the two closest neighbors in the layer inwards.

Definition at line 269 of file CDCWireTopology.h.

272 { return getWireSuperLayer(iSuperLayer).getNeighborsInwards(iLayer, iWire); }
WireNeighborPair getNeighborsInwards(ILayer iLayer, IWire iWire) const
Getter for the two closest neighbors in the layer inwards of the given on.

◆ getNeighborsOutwards() [1/2]

WireNeighborPair getNeighborsOutwards ( const WireID wireID) const
inline

Getter for the two closest neighbors in the layer outwards.

Definition at line 213 of file CDCWireTopology.h.

214 { return getNeighborsOutwards(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
WireNeighborPair getNeighborsOutwards(const WireID &wireID) const
Getter for the two closest neighbors in the layer outwards.

◆ getNeighborsOutwards() [2/2]

WireNeighborPair getNeighborsOutwards ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for the two closest neighbors in the layer outwards.

Definition at line 263 of file CDCWireTopology.h.

266 { return getWireSuperLayer(iSuperLayer).getNeighborsOutwards(iLayer, iWire); }
WireNeighborPair getNeighborsOutwards(ILayer iLayer, IWire iWire) const
Getter for the two closest neighbors in the layer outwards of the given on.

◆ getNLayers()

ILayer getNLayers ( ) const
inline

Getter for the total number of wire layers.

Definition at line 125 of file CDCWireTopology.h.

126 { return getWireLayers().size(); }
const std::vector< Belle2::TrackFindingCDC::CDCWireLayer > & getWireLayers() const
Getter for the underlying storing layer vector.

◆ getNSuperLayers()

ISuperLayer getNSuperLayers ( ) const
inline

Getter for the total number of superlayers.

Definition at line 160 of file CDCWireTopology.h.

161 { return getWireSuperLayers().size(); }

◆ getOuterCylindricalR()

double getOuterCylindricalR ( ) const
inline

Getter for the outer radius of the outer most wire layer.

Definition at line 471 of file CDCWireTopology.h.

472 { return m_wireLayers.back().getOuterCylindricalR(); }

◆ getPrimaryNeighbor() [1/2]

MayBePtr< const CDCWire > getPrimaryNeighbor ( short  oClockDirection,
const WireID wireID 
) const
inline

Getter for the primary neighbor of the given wire id.

Definition at line 209 of file CDCWireTopology.h.

210 { return getPrimaryNeighbor(oClockDirection, wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getPrimaryNeighbor(short oClockDirection, const WireID &wireID) const
Getter for the primary neighbor of the given wire id.

◆ getPrimaryNeighbor() [2/2]

MayBePtr< const CDCWire > getPrimaryNeighbor ( short  oClockDirection,
ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for the primary neighbor of the given wire id following the direction on the clock.

Definition at line 255 of file CDCWireTopology.h.

259 { return getWireSuperLayer(iSuperLayer).getPrimaryNeighbor(oClockDirection, iLayer, iWire);}
MayBePtr< const CDCWire > getPrimaryNeighbor(short oClockDirection, ILayer iLayer, IWire iWire) const
Getter for the two closest neighbors in the given o'clock direction.

◆ getSecondaryNeighbor() [1/2]

MayBePtr< const CDCWire > getSecondaryNeighbor ( short  oClockDirection,
const WireID wireID 
) const
inline

Getter for the secondary neighbor of the given wire id.

Definition at line 325 of file CDCWireTopology.h.

326 { return getSecondaryNeighbor(oClockDirection, wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getSecondaryNeighbor(short oClockDirection, const WireID &wireID) const
Getter for the secondary neighbor of the given wire id.

◆ getSecondaryNeighbor() [2/2]

MayBePtr< const CDCWire > getSecondaryNeighbor ( short  oClockDirection,
ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for the secondary neighbor of the given wire id following the direction on the clock.

Definition at line 390 of file CDCWireTopology.h.

394 { return getWireSuperLayer(iSuperLayer).getSecondaryNeighbor(oClockDirection, iLayer, iWire);}
MayBePtr< const CDCWire > getSecondaryNeighbor(short oClockDirection, ILayer iLayer, IWire iWire) const
getSecondaryNeighbor Secondary neighborhood The secondary neighbors are numbered like positions on th...

◆ getSecondNeighborEightOClock() [1/2]

MayBePtr< const CDCWire > getSecondNeighborEightOClock ( const WireID wireID) const
inline

Getter for secondary neighbor at the eight o'clock position.

Definition at line 357 of file CDCWireTopology.h.

358 { return getSecondNeighborEightOClock(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getSecondNeighborEightOClock(const WireID &wireID) const
Getter for secondary neighbor at the eight o'clock position.

◆ getSecondNeighborEightOClock() [2/2]

MayBePtr< const CDCWire > getSecondNeighborEightOClock ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for secondary neighbor at the eight o'clock position.

Definition at line 439 of file CDCWireTopology.h.

442 { return getWireSuperLayer(iSuperLayer).getSecondNeighborEightOClock(iLayer, iWire); }
MayBePtr< const CDCWire > getSecondNeighborEightOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the eight o'clock position.

◆ getSecondNeighborElevenOClock() [1/2]

MayBePtr< const CDCWire > getSecondNeighborElevenOClock ( const WireID wireID) const
inline

Getter for secondary neighbor at the eleven o'clock position.

Definition at line 369 of file CDCWireTopology.h.

370 { return getSecondNeighborElevenOClock(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getSecondNeighborElevenOClock(const WireID &wireID) const
Getter for secondary neighbor at the eleven o'clock position.

◆ getSecondNeighborElevenOClock() [2/2]

MayBePtr< const CDCWire > getSecondNeighborElevenOClock ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for secondary neighbor at the eleven o'clock position.

Definition at line 457 of file CDCWireTopology.h.

460 { return getWireSuperLayer(iSuperLayer).getSecondNeighborElevenOClock(iLayer, iWire); }
MayBePtr< const CDCWire > getSecondNeighborElevenOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the elven o'clock position.

◆ getSecondNeighborFiveOClock() [1/2]

MayBePtr< const CDCWire > getSecondNeighborFiveOClock ( const WireID wireID) const
inline

Getter for secondary neighbor at the five o'clock position.

Definition at line 345 of file CDCWireTopology.h.

346 { return getSecondNeighborFiveOClock(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getSecondNeighborFiveOClock(const WireID &wireID) const
Getter for secondary neighbor at the five o'clock position.

◆ getSecondNeighborFiveOClock() [2/2]

MayBePtr< const CDCWire > getSecondNeighborFiveOClock ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for secondary neighbor at the five o'clock position.

Definition at line 421 of file CDCWireTopology.h.

424 { return getWireSuperLayer(iSuperLayer).getSecondNeighborFiveOClock(iLayer, iWire); }
MayBePtr< const CDCWire > getSecondNeighborFiveOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the five o'clock position.

◆ getSecondNeighborFourOClock() [1/2]

MayBePtr< const CDCWire > getSecondNeighborFourOClock ( const WireID wireID) const
inline

Getter for secondary neighbor at the four o'clock position.

Definition at line 341 of file CDCWireTopology.h.

342 { return getSecondNeighborFourOClock(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getSecondNeighborFourOClock(const WireID &wireID) const
Getter for secondary neighbor at the four o'clock position.

◆ getSecondNeighborFourOClock() [2/2]

MayBePtr< const CDCWire > getSecondNeighborFourOClock ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for secondary neighbor at the four o'clock position.

Definition at line 415 of file CDCWireTopology.h.

418 { return getWireSuperLayer(iSuperLayer).getSecondNeighborFourOClock(iLayer, iWire); }
MayBePtr< const CDCWire > getSecondNeighborFourOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the four o'clock position.

◆ getSecondNeighborNineOClock() [1/2]

MayBePtr< const CDCWire > getSecondNeighborNineOClock ( const WireID wireID) const
inline

Getter for secondary neighbor at the nine o'clock position - always exists.

Definition at line 361 of file CDCWireTopology.h.

362 { return getSecondNeighborNineOClock(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getSecondNeighborNineOClock(const WireID &wireID) const
Getter for secondary neighbor at the nine o'clock position - always exists.

◆ getSecondNeighborNineOClock() [2/2]

MayBePtr< const CDCWire > getSecondNeighborNineOClock ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for secondary neighbor at the nine o'clock position - always exists.

Definition at line 445 of file CDCWireTopology.h.

448 { return getWireSuperLayer(iSuperLayer).getSecondNeighborNineOClock(iLayer, iWire); }
MayBePtr< const CDCWire > getSecondNeighborNineOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the nine o'clock position.

◆ getSecondNeighborOneOClock() [1/2]

MayBePtr< const CDCWire > getSecondNeighborOneOClock ( const WireID wireID) const
inline

Getter for secondary neighbor at the one o'clock position.

Definition at line 329 of file CDCWireTopology.h.

330 { return getSecondNeighborOneOClock(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getSecondNeighborOneOClock(const WireID &wireID) const
Getter for secondary neighbor at the one o'clock position.

◆ getSecondNeighborOneOClock() [2/2]

MayBePtr< const CDCWire > getSecondNeighborOneOClock ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for secondary neighbor at the one o'clock position.

Definition at line 397 of file CDCWireTopology.h.

400 { return getWireSuperLayer(iSuperLayer).getSecondNeighborOneOClock(iLayer, iWire); }
MayBePtr< const CDCWire > getSecondNeighborOneOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the one o'clock position.

◆ getSecondNeighborSevenOClock() [1/2]

MayBePtr< const CDCWire > getSecondNeighborSevenOClock ( const WireID wireID) const
inline

Getter for secondary neighbor at the seven o'clock position.

Definition at line 353 of file CDCWireTopology.h.

354 { return getSecondNeighborSevenOClock(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getSecondNeighborSevenOClock(const WireID &wireID) const
Getter for secondary neighbor at the seven o'clock position.

◆ getSecondNeighborSevenOClock() [2/2]

MayBePtr< const CDCWire > getSecondNeighborSevenOClock ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for secondary neighbor at the seven o'clock position.

Definition at line 433 of file CDCWireTopology.h.

436 { return getWireSuperLayer(iSuperLayer).getSecondNeighborSevenOClock(iLayer, iWire); }
MayBePtr< const CDCWire > getSecondNeighborSevenOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the seven o'clock position.

◆ getSecondNeighborSixOClock() [1/2]

MayBePtr< const CDCWire > getSecondNeighborSixOClock ( const WireID wireID) const
inline

Getter for secondary neighbor at the six o'clock position.

Definition at line 349 of file CDCWireTopology.h.

350 { return getSecondNeighborSixOClock(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getSecondNeighborSixOClock(const WireID &wireID) const
Getter for secondary neighbor at the six o'clock position.

◆ getSecondNeighborSixOClock() [2/2]

MayBePtr< const CDCWire > getSecondNeighborSixOClock ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for secondary neighbor at the six o'clock position.

Definition at line 427 of file CDCWireTopology.h.

430 { return getWireSuperLayer(iSuperLayer).getSecondNeighborSixOClock(iLayer, iWire); }
MayBePtr< const CDCWire > getSecondNeighborSixOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the six o'clock position.

◆ getSecondNeighborTenOClock() [1/2]

MayBePtr< const CDCWire > getSecondNeighborTenOClock ( const WireID wireID) const
inline

Getter for secondary neighbor at the ten o'clock position.

Definition at line 365 of file CDCWireTopology.h.

366 { return getSecondNeighborTenOClock(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getSecondNeighborTenOClock(const WireID &wireID) const
Getter for secondary neighbor at the ten o'clock position.

◆ getSecondNeighborTenOClock() [2/2]

MayBePtr< const CDCWire > getSecondNeighborTenOClock ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for secondary neighbor at the ten o'clock position.

Definition at line 451 of file CDCWireTopology.h.

454 { return getWireSuperLayer(iSuperLayer).getSecondNeighborTenOClock(iLayer, iWire); }
MayBePtr< const CDCWire > getSecondNeighborTenOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the ten o'clock position.

◆ getSecondNeighborThreeOClock() [1/2]

MayBePtr< const CDCWire > getSecondNeighborThreeOClock ( const WireID wireID) const
inline

Getter for secondary neighbor at the three o'clock position - always exists.

Definition at line 337 of file CDCWireTopology.h.

338 { return getSecondNeighborThreeOClock(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getSecondNeighborThreeOClock(const WireID &wireID) const
Getter for secondary neighbor at the three o'clock position - always exists.

◆ getSecondNeighborThreeOClock() [2/2]

MayBePtr< const CDCWire > getSecondNeighborThreeOClock ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for secondary neighbor at the three o'clock position - always exists.

Definition at line 409 of file CDCWireTopology.h.

412 { return getWireSuperLayer(iSuperLayer).getSecondNeighborThreeOClock(iLayer, iWire); }
MayBePtr< const CDCWire > getSecondNeighborThreeOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the three o'clock position.

◆ getSecondNeighborTwelveOClock() [1/2]

MayBePtr< const CDCWire > getSecondNeighborTwelveOClock ( const WireID wireID) const
inline

Getter for secondary neighbor at the twelve o'clock position.

Definition at line 373 of file CDCWireTopology.h.

374 { return getSecondNeighborTwelveOClock(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getSecondNeighborTwelveOClock(const WireID &wireID) const
Getter for secondary neighbor at the twelve o'clock position.

◆ getSecondNeighborTwelveOClock() [2/2]

MayBePtr< const CDCWire > getSecondNeighborTwelveOClock ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for secondary neighbor at the twelve o'clock position.

Definition at line 463 of file CDCWireTopology.h.

466 { return getWireSuperLayer(iSuperLayer).getSecondNeighborTwelveOClock(iLayer, iWire); }
MayBePtr< const CDCWire > getSecondNeighborTwelveOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the twelve o'clock position.

◆ getSecondNeighborTwoOClock() [1/2]

MayBePtr< const CDCWire > getSecondNeighborTwoOClock ( const WireID wireID) const
inline

Getter for secondary neighbor at the two o'clock position.

Definition at line 333 of file CDCWireTopology.h.

334 { return getSecondNeighborTwoOClock(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
MayBePtr< const CDCWire > getSecondNeighborTwoOClock(const WireID &wireID) const
Getter for secondary neighbor at the two o'clock position.

◆ getSecondNeighborTwoOClock() [2/2]

MayBePtr< const CDCWire > getSecondNeighborTwoOClock ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for secondary neighbor at the two o'clock position.

Definition at line 403 of file CDCWireTopology.h.

406 { return getWireSuperLayer(iSuperLayer).getSecondNeighborTwoOClock(iLayer, iWire); }
MayBePtr< const CDCWire > getSecondNeighborTwoOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the two o'clock position.

◆ getWire() [1/3]

const CDCWire & getWire ( const WireID wireId) const
inline

Getter for wire getter by wireID object.

Definition at line 102 of file CDCWireTopology.h.

103 { return getWireLayer(wireId.getICLayer()).getWire(wireId.getIWire()) ; }
const CDCWire & getWire(IWire iWire) const
Gives the wire by its id in the layer.
Definition: CDCWireLayer.h:138
const CDCWireLayer & getWireLayer(const WireID &wireId) const
Getter for wire layer getter by wireID object.

◆ getWire() [2/3]

const CDCWire & getWire ( ILayer  iCLayer,
IWire  iWire 
) const
inline

Getter for wire getter by continuous layer id and wire id.

Definition at line 106 of file CDCWireTopology.h.

107 { return getWireLayer(iCLayer).getWire(iWire) ; }

◆ getWire() [3/3]

const CDCWire & getWire ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Getter for wire getter by superlayer id, layer id and wire id.

Definition at line 110 of file CDCWireTopology.h.

111 { return getWireSuperLayer(iSuperLayer).getWireLayer(iLayer).getWire(iWire) ; }
const CDCWireLayer & getWireLayer(ILayer iLayer) const
Gives the layer by its layer id within the superlayer.

◆ getWireLayer() [1/3]

const CDCWireLayer & getWireLayer ( const WireID wireId) const
inline

Getter for wire layer getter by wireID object.

Definition at line 137 of file CDCWireTopology.h.

138 { return getWireLayer(wireId.getICLayer()); }

◆ getWireLayer() [2/3]

const CDCWireLayer & getWireLayer ( ILayer  iCLayer) const
inline

Getter for wire layer getter by continuous layer id.

Definition at line 141 of file CDCWireTopology.h.

142 { return m_wireLayers[ iCLayer - m_FirstLayerOffset ]; }
ILayer m_FirstLayerOffset
Offset of first layer.

◆ getWireLayer() [3/3]

const CDCWireLayer & getWireLayer ( ISuperLayer  iSuperLayer,
ILayer  iLayer 
) const
inline

Getter for wire layer getter by superlayer id and layer id.

Definition at line 145 of file CDCWireTopology.h.

146 { return getWireSuperLayer(iSuperLayer).getWireLayer(iLayer); }

◆ getWireLayers()

const std::vector< Belle2::TrackFindingCDC::CDCWireLayer > & getWireLayers ( ) const
inline

Getter for the underlying storing layer vector.

Definition at line 149 of file CDCWireTopology.h.

150 { return m_wireLayers; }

◆ getWires()

const std::vector< Belle2::TrackFindingCDC::CDCWire > & getWires ( ) const
inline

Getter for the underlying storing wire vector.

Definition at line 114 of file CDCWireTopology.h.

115 { return m_wires; }
std::vector< Belle2::TrackFindingCDC::CDCWire > m_wires
Storage for all wires in the CDC.

◆ getWireSuperLayer() [1/2]

const CDCWireSuperLayer & getWireSuperLayer ( const WireID wireID) const
inline

Getter for wire superlayer getter by wireID object.

Definition at line 171 of file CDCWireTopology.h.

172 { return getWireSuperLayer(wireID.getISuperLayer()); }

◆ getWireSuperLayer() [2/2]

const CDCWireSuperLayer & getWireSuperLayer ( ISuperLayer  iSuperLayer) const
inline

Getter for wire superlayer getter by superlayer id.

Definition at line 175 of file CDCWireTopology.h.

176 {
177 return m_wireSuperLayers[iSuperLayer];
178 }
std::vector< Belle2::TrackFindingCDC::CDCWireSuperLayer > m_wireSuperLayers
Storage for all wire superlayers in the CDC.

◆ getWireSuperLayers()

const std::vector< Belle2::TrackFindingCDC::CDCWireSuperLayer > & getWireSuperLayers ( ) const
inline

Getter for the underlying storing superlayer vector.

Definition at line 181 of file CDCWireTopology.h.

182 { return m_wireSuperLayers; }

◆ initialize()

void initialize ( )
private

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

Definition at line 27 of file CDCWireTopology.cc.

28{
29 m_wires.clear();
30 m_wireLayers.clear();
31 m_wireSuperLayers.clear();
32
33 m_wires.reserve(c_NWires);
34 m_wireLayers.reserve(c_NLayers);
36
37 // create all wires
40
41 for (size_t iCLayer = 0; iCLayer < cdcGeo.nWireLayers() ; ++iCLayer) {
42 for (size_t iWire = 0; iWire < cdcGeo.nWiresInLayer(iCLayer); ++iWire) {
43 m_wires.push_back(CDCWire(WireID(iCLayer, iWire)));
44 }
45 }
46
47 // create all wire layers
48 std::vector<VectorRange<CDCWire>> wiresByILayer =
49 adjacent_groupby(m_wires.begin(), m_wires.end(), GetILayer());
50
51 for (VectorRange<CDCWire> wiresForILayer : wiresByILayer) {
52 m_wireLayers.push_back(CDCWireLayer(wiresForILayer));
53 }
54
55 // create all superlayers
56 std::vector<VectorRange<CDCWireLayer> > layersByISuperLayer =
57 adjacent_groupby(m_wireLayers.begin(), m_wireLayers.end(), Common<GetISuperLayer>());
58
59 if (cdcGeo.getOffsetOfFirstSuperLayer() > 0) {
60 for (uint superLayer = 0; superLayer < cdcGeo.getOffsetOfFirstSuperLayer(); ++superLayer) {
62 }
63 }
64
65 for (VectorRange<CDCWireLayer> layersForISuperLayer : layersByISuperLayer) {
66 m_wireSuperLayers.push_back(CDCWireSuperLayer(layersForISuperLayer));
67 }
68}
The Class for CDC Geometry Parameters.
ushort getOffsetOfFirstLayer() const
Get the offset of the first layer.
unsigned nWiresInLayer(int layerId) const
Returns wire numbers in a layer.
static CDCGeometryPar & Instance(const CDCGeometry *=nullptr)
Static method to get a reference to the CDCGeometryPar instance.
ushort getOffsetOfFirstSuperLayer() const
Get the offset of the first super layer.
unsigned nWireLayers() const
Returns a number of wire layers.
Class representating a sense wire layer in the central drift chamber.
Definition: CDCWireLayer.h:42
static const ISuperLayer c_NSuperLayers
Total number of superlayers.
static const ILayer c_NLayers
Total number of layers.
static const IWire c_NWires
Total number of wires.
Class representing a sense wire in the central drift chamber.
Definition: CDCWire.h:58
A pair of iterators usable with the range base for loop.
Definition: Range.h:25
Class to identify a wire inside the CDC.
Definition: WireID.h:34
Adapter of a category function to find the common category of several objects.
Definition: Common.h:19
Generic functor to get the superlayer id from an object.
Definition: ILayer.h:21

◆ isValidICLayer()

bool isValidICLayer ( ILayer  iCLayer) const
inline

Checks the validity of the continuous layer id.

Definition at line 129 of file CDCWireTopology.h.

130 { return 0 <= iCLayer and iCLayer < int(getWireLayers().size()); }

◆ isValidILayer()

bool isValidILayer ( ISuperLayer  iSuperLayer,
ILayer  iLayer 
) const
inline

Checks the validity of the superlayer id, layer id combination.

Definition at line 133 of file CDCWireTopology.h.

134 { return isValidISuperLayer(iSuperLayer) and getWireSuperLayer(iSuperLayer).isValidILayer(iLayer); }
bool isValidILayer(ILayer iLayer) const
Checks if the given layer id belongs to a valid layer in this superlayer.

◆ isValidISuperLayer()

bool isValidISuperLayer ( ISuperLayer  iSuperLayer) const
inline

Checks the validity of the superlayer id.

Definition at line 164 of file CDCWireTopology.h.

165 { return 0 <= iSuperLayer and iSuperLayer < int(getWireSuperLayers().size()); }

◆ isValidIWire() [1/2]

bool isValidIWire ( ILayer  iCLayer,
IWire  iWire 
) const
inline

Checks the validity of the continuous layer id, wire id combination.

Definition at line 94 of file CDCWireTopology.h.

95 { return isValidICLayer(iCLayer) and getWireLayer(iCLayer).isValidIWire(iWire); }
bool isValidIWire(IWire iWire) const
Checks if the given wire id belongs to a valid wire in this layer.
Definition: CDCWireLayer.h:134
bool isValidICLayer(ILayer iCLayer) const
Checks the validity of the continuous layer id.

◆ isValidIWire() [2/2]

bool isValidIWire ( ISuperLayer  iSuperLayer,
ILayer  iLayer,
IWire  iWire 
) const
inline

Checks the validity of the superlayer id, layer id, wire id combination.

Definition at line 98 of file CDCWireTopology.h.

99 { return isValidISuperLayer(iSuperLayer) and getWireSuperLayer(iSuperLayer).isValidIWire(iLayer, iWire); }
bool isValidIWire(ILayer iLayer, IWire iWire) const
Checks if the given wire id belongs to a valid wire in this superlayer.

◆ isValidWireID()

bool isValidWireID ( const WireID wireID) const
inline

Checks the validity of a wireID convinience object.

Definition at line 90 of file CDCWireTopology.h.

91 { return isValidIWire(wireID.getISuperLayer(), wireID.getILayer(), wireID.getIWire()); }
bool isValidIWire(ILayer iCLayer, IWire iWire) const
Checks the validity of the continuous layer id, wire id combination.

◆ reinitialize()

void reinitialize ( EWirePosition  wirePosition,
bool  ignoreWireSag 
)

Reload all geometry parameters form the CDCGeometryPar to adjust to changes in geometry.

Definition at line 70 of file CDCWireTopology.cc.

71{
72 for (CDCWire& wire : m_wires) {
73 wire.initialize(wirePosition, ignoreWireSag);
74 }
75
76 for (CDCWireLayer& wireLayer : m_wireLayers) {
77 wireLayer.initialize();
78 }
79
80 for (CDCWireSuperLayer& wireSuperLayer : m_wireSuperLayers) {
81 wireSuperLayer.initialize();
82 }
83}

Member Data Documentation

◆ c_NLayers

const ILayer c_NLayers = 56
static

Total number of layers.

Definition at line 66 of file CDCWireTopology.h.

◆ c_NSuperLayers

const ISuperLayer c_NSuperLayers = 9
static

Total number of superlayers.

Definition at line 69 of file CDCWireTopology.h.

◆ c_NWires

const IWire c_NWires = 14336
static

Total number of wires.

Definition at line 63 of file CDCWireTopology.h.

◆ m_FirstLayerOffset

ILayer m_FirstLayerOffset = 0
private

Offset of first layer.

Definition at line 489 of file CDCWireTopology.h.

◆ m_wireLayers

std::vector<Belle2::TrackFindingCDC::CDCWireLayer> m_wireLayers
private

Storage for all wire layers in the CDC.

Definition at line 483 of file CDCWireTopology.h.

◆ m_wires

std::vector<Belle2::TrackFindingCDC::CDCWire> m_wires
private

Storage for all wires in the CDC.

Definition at line 480 of file CDCWireTopology.h.

◆ m_wireSuperLayers

std::vector<Belle2::TrackFindingCDC::CDCWireSuperLayer> m_wireSuperLayers
private

Storage for all wire superlayers in the CDC.

Definition at line 486 of file CDCWireTopology.h.


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