10 #include <tracking/trackFindingCDC/topology/CDCWireSuperLayer.h>
11 #include <tracking/trackFindingCDC/topology/CDCWireLayer.h>
13 #include <tracking/trackFindingCDC/topology/WireNeighborKind.h>
14 #include <tracking/trackFindingCDC/topology/WireNeighborPair.h>
15 #include <tracking/trackFindingCDC/topology/CDCWire.h>
17 #include <tracking/trackFindingCDC/topology/ISuperLayer.h>
18 #include <tracking/trackFindingCDC/topology/ILayer.h>
19 #include <tracking/trackFindingCDC/topology/IWire.h>
20 #include <tracking/trackFindingCDC/topology/EWirePosition.h>
22 #include <tracking/trackFindingCDC/utilities/MayBePtr.h>
24 #include <cdc/dataobjects/WireID.h>
33 namespace TrackFindingCDC {
98 bool isValidIWire(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire)
const
110 const CDCWire&
getWire(ISuperLayer iSuperLayer, ILayer iLayer , IWire iWire)
const
114 const std::vector<Belle2::TrackFindingCDC::CDCWire>&
getWires()
const
130 {
return 0 <= iCLayer and iCLayer < int(
getWireLayers().size()); }
149 const std::vector<Belle2::TrackFindingCDC::CDCWireLayer>&
getWireLayers()
const
256 ISuperLayer iSuperLayer,
391 ISuperLayer iSuperLayer,
480 std::vector<Belle2::TrackFindingCDC::CDCWire>
m_wires;
Class representating a sense wire layer in the central drift chamber.
bool isValidIWire(IWire iWire) const
Checks if the given wire id belongs to a valid wire in this layer.
const CDCWire & getWire(IWire iWire) const
Gives the wire by its id in the layer.
Class representating a sense wire superlayer in the central drift chamber.
MayBePtr< const CDCWire > getSecondNeighborTwoOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the two o'clock position.
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 ...
MayBePtr< const CDCWire > getPrimaryNeighbor(short oClockDirection, ILayer iLayer, IWire iWire) const
Getter for the two closest neighbors in the given o'clock direction.
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 ...
MayBePtr< const CDCWire > getSecondNeighborFourOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the four o'clock position.
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.
WireNeighborPair getNeighborsOutwards(ILayer iLayer, IWire iWire) const
Getter for the two closest neighbors in the layer outwards of the given on.
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 ...
bool isValidIWire(ILayer iLayer, IWire iWire) const
Checks if the given wire id belongs to a valid wire in this superlayer.
MayBePtr< const CDCWire > getSecondNeighborThreeOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the three o'clock position.
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 ...
MayBePtr< const CDCWire > getSecondNeighborFiveOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the five o'clock position.
MayBePtr< const CDCWire > getSecondNeighborTwelveOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the twelve o'clock position.
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.
const CDCWireLayer & getWireLayer(ILayer iLayer) const
Gives the layer by its layer id within the superlayer.
MayBePtr< const CDCWire > getSecondNeighborElevenOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the elven o'clock position.
bool isValidILayer(ILayer iLayer) const
Checks if the given layer id belongs to a valid layer in this superlayer.
MayBePtr< const CDCWire > getSecondNeighborSixOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the six o'clock position.
MayBePtr< const CDCWire > getSecondNeighborOneOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the one o'clock position.
MayBePtr< const CDCWire > getSecondNeighborEightOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the eight o'clock position.
MayBePtr< const CDCWire > getSecondNeighborNineOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the nine o'clock position.
MayBePtr< const CDCWire > getSecondaryNeighbor(short oClockDirection, ILayer iLayer, IWire iWire) const
getSecondaryNeighbor Secondary neighborhood The secondary neighbors are numbered like positions on th...
MayBePtr< const CDCWire > getSecondNeighborSevenOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the seven o'clock position.
WireNeighborPair getNeighborsInwards(ILayer iLayer, IWire iWire) const
Getter for the two closest neighbors in the layer inwards of the given on.
MayBePtr< const CDCWire > getSecondNeighborTenOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the ten o'clock position.
Class representating the sense wire arrangement in the whole of the central drift chamber.
MayBePtr< const CDCWire > getNeighborCCW(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for the nearest counterclockwise neighbor.
const CDCWire & getWire(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for wire getter by superlayer id, layer id and wire id.
MayBePtr< const CDCWire > getSecondNeighborFiveOClock(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the five o'clock position.
MayBePtr< const CDCWire > getSecondaryNeighbor(short oClockDirection, const WireID &wireID) const
Getter for the secondary neighbor of the given wire id.
const std::vector< Belle2::TrackFindingCDC::CDCWire > & getWires() const
Getter for the underlying storing wire vector.
static const ISuperLayer c_NSuperLayers
Total number of superlayers.
std::vector< Belle2::TrackFindingCDC::CDCWire > m_wires
Storage for all wires in the CDC.
MayBePtr< const CDCWire > getSecondNeighborTwelveOClock(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the twelve o'clock position.
MayBePtr< const CDCWire > getSecondNeighborTwoOClock(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the two o'clock position.
WireNeighborKind getNeighborKind(const WireID &wireID, const WireID &otherWireID) const
Checks if two wires are closest neighbors.
MayBePtr< const CDCWire > getNeighborCWOutwards(const WireID &wireID) const
Getter for the nearest clockwise neighbor in the next layer outwards.
void initialize()
Create all wires, wire layers and wire superlayers and their interdependences with base geometry from...
MayBePtr< const CDCWire > getSecondNeighborSixOClock(const WireID &wireID) const
Getter for secondary neighbor at the six o'clock position.
CDCWireTopology(const CDCWireTopology &wireTopology)=delete
Disallow copy construction of the wire topology.
MayBePtr< const CDCWire > getSecondNeighborSixOClock(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the six o'clock position.
bool arePrimaryNeighbors(const WireID &wireID, const WireID &otherWireID) const
Checks if two wires are primary neighbors.
static const ILayer c_NLayers
Total number of layers.
const CDCWireLayer & getWireLayer(const WireID &wireId) const
Getter for wire layer getter by wireID object.
MayBePtr< const CDCWire > getSecondNeighborNineOClock(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the nine o'clock position - always exists.
MayBePtr< const CDCWire > getSecondNeighborFourOClock(const WireID &wireID) const
Getter for secondary neighbor at the four o'clock position.
MayBePtr< const CDCWire > getNeighborCWInwards(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for the nearest clockwise neighbor in the next layer outwards.
const std::vector< Belle2::TrackFindingCDC::CDCWireSuperLayer > & getWireSuperLayers() const
Getter for the underlying storing superlayer vector.
MayBePtr< const CDCWire > getNeighborCCW(const WireID &wireID) const
Getter for the nearest counterclockwise neighbor.
WireNeighborPair getNeighborsOutwards(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for the two closest neighbors in the layer outwards.
MayBePtr< const CDCWire > getNeighborCCWInwards(const WireID &wireID) const
Getter for the nearest counterclockwise neighbor in the next layer outwards.
MayBePtr< const CDCWire > getSecondaryNeighbor(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.
ISuperLayer getISuperLayerAtCylindricalR(double cylindricalR)
Returns the logical superlayer number at the given radius.
MayBePtr< const CDCWire > getSecondNeighborFourOClock(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the four o'clock position.
ISuperLayer getNSuperLayers() const
Getter for the total number of superlayers.
MayBePtr< const CDCWire > getSecondNeighborTwelveOClock(const WireID &wireID) const
Getter for secondary neighbor at the twelve o'clock position.
MayBePtr< const CDCWire > getNeighborCWOutwards(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for the nearest clockwise neighbor in the next layer outwards.
const CDCWireLayer & getWireLayer(ISuperLayer iSuperLayer, ILayer iLayer) const
Getter for wire layer getter by superlayer id and layer id.
WireNeighborPair getNeighborsOutwards(const WireID &wireID) const
Getter for the two closest neighbors in the layer outwards.
MayBePtr< const CDCWire > getSecondNeighborNineOClock(const WireID &wireID) const
Getter for secondary neighbor at the nine o'clock position - always exists.
WireNeighborPair getNeighborsInwards(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for the two closest neighbors in the layer inwards.
std::vector< Belle2::TrackFindingCDC::CDCWireLayer > m_wireLayers
Storage for all wire layers in the CDC.
double getInnerCylindricalR() const
Getter for the inner radius of the inner most wire layer.
MayBePtr< const CDCWire > getSecondNeighborTenOClock(const WireID &wireID) const
Getter for secondary neighbor at the ten o'clock position.
void reinitialize(EWirePosition wirePosition, bool ignoreWireSag)
Reload all geometry parameters form the CDCGeometryPar to adjust to changes in geometry.
const CDCWire & getWire(ILayer iCLayer, IWire iWire) const
Getter for wire getter by continuous layer id and wire id.
MayBePtr< const CDCWire > getNeighborCCWOutwards(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for the nearest counterclockwise neighbor in the next layer outwards.
MayBePtr< const CDCWire > getSecondNeighborFiveOClock(const WireID &wireID) const
Getter for secondary neighbor at the five o'clock position.
MayBePtr< const CDCWire > getNeighborCW(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for the nearest clockwise neighbor.
MayBePtr< const CDCWire > getSecondNeighborEightOClock(const WireID &wireID) const
Getter for secondary neighbor at the eight o'clock position.
bool areSeconaryNeighbors(const WireID &wireID, const WireID &otherWireID) const
Checks if two wires are secondary neighbors.
MayBePtr< const CDCWire > getPrimaryNeighbor(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.
MayBePtr< const CDCWire > getPrimaryNeighbor(short oClockDirection, const WireID &wireID) const
Getter for the primary neighbor of the given wire id.
CDCWireTopology()
Default constructor for ROOT compatibility. Use rather getInstance to get the shared singleton instan...
MayBePtr< const CDCWire > getSecondNeighborElevenOClock(const WireID &wireID) const
Getter for secondary neighbor at the eleven o'clock position.
MayBePtr< const CDCWire > getNeighborCWInwards(const WireID &wireID) const
Getter for the nearest clockwise neighbor in the next layer outwards.
MayBePtr< const CDCWire > getSecondNeighborSevenOClock(const WireID &wireID) const
Getter for secondary neighbor at the seven o'clock position.
bool isValidIWire(ILayer iCLayer, IWire iWire) const
Checks the validity of the continuous layer id, wire id combination.
MayBePtr< const CDCWire > getNeighborCCWInwards(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for the nearest counterclockwise neighbor in the next layer outwards.
MayBePtr< const CDCWire > getSecondNeighborElevenOClock(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the eleven o'clock position.
bool isValidICLayer(ILayer iCLayer) const
Checks the validity of the continuous layer id.
MayBePtr< const CDCWire > getSecondNeighborThreeOClock(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the three o'clock position - always exists.
const CDCWireSuperLayer & getWireSuperLayer(const WireID &wireID) const
Getter for wire superlayer getter by wireID object.
MayBePtr< const CDCWire > getSecondNeighborTwoOClock(const WireID &wireID) const
Getter for secondary neighbor at the two o'clock position.
MayBePtr< const CDCWire > getSecondNeighborOneOClock(const WireID &wireID) const
Getter for secondary neighbor at the one o'clock position.
bool isValidILayer(ISuperLayer iSuperLayer, ILayer iLayer) const
Checks the validity of the superlayer id, layer id combination.
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
ILayer m_FirstLayerOffset
Offset of first layer.
MayBePtr< const CDCWire > getSecondNeighborOneOClock(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the one o'clock position.
bool isValidWireID(const WireID &wireID) const
Checks the validity of a wireID convinience object.
ILayer getNLayers() const
Getter for the total number of wire layers.
const CDCWireSuperLayer & getWireSuperLayer(ISuperLayer iSuperLayer) const
Getter for wire superlayer getter by superlayer id.
MayBePtr< const CDCWire > getNeighborCCWOutwards(const WireID &wireID) const
Getter for the nearest counterclockwise neighbor in the next layer outwards.
MayBePtr< const CDCWire > getSecondNeighborTenOClock(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the ten o'clock position.
double getOuterCylindricalR() const
Getter for the outer radius of the outer most wire layer.
bool isValidIWire(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Checks the validity of the superlayer id, layer id, wire id combination.
static const IWire c_NWires
Total number of wires.
void operator=(const CDCWireTopology &wireTopology)=delete
Disallow copy assignment of the wire topology.
bool isValidISuperLayer(ISuperLayer iSuperLayer) const
Checks the validity of the superlayer id.
const CDCWireLayer & getWireLayer(ILayer iCLayer) const
Getter for wire layer getter by continuous layer id.
std::vector< Belle2::TrackFindingCDC::CDCWireSuperLayer > m_wireSuperLayers
Storage for all wire superlayers in the CDC.
const CDCWire & getWire(const WireID &wireId) const
Getter for wire getter by wireID object.
WireNeighborPair getNeighborsInwards(const WireID &wireID) const
Getter for the two closest neighbors in the layer inwards.
MayBePtr< const CDCWire > getSecondNeighborEightOClock(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the eight o'clock position.
const std::vector< Belle2::TrackFindingCDC::CDCWireLayer > & getWireLayers() const
Getter for the underlying storing layer vector.
MayBePtr< const CDCWire > getSecondNeighborThreeOClock(const WireID &wireID) const
Getter for secondary neighbor at the three o'clock position - always exists.
MayBePtr< const CDCWire > getSecondNeighborSevenOClock(ISuperLayer iSuperLayer, ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the seven o'clock position.
MayBePtr< const CDCWire > getNeighborCW(const WireID &wireID) const
Getter for the nearest clockwise neighbor.
Class representing a sense wire in the central drift chamber.
Type for the neighbor relationship from one wire to another.
short getCellDistance() const
Get the distance to the wire neighbor counted in number of cells.
Class representing a pair of neighbors in the CDC in a single layer For certain circumstances it is a...
Class to identify a wire inside the CDC.
unsigned short getICLayer() const
Getter for continuous layer numbering.
unsigned short getIWire() const
Getter for wire within the layer.
unsigned short getISuperLayer() const
Getter for Super-Layer.
unsigned short getILayer() const
Getter for layer within the Super-Layer.
EWirePosition
Wire position set.
Abstract base class for different kinds of events.