9#include <tracking/trackFindingCDC/topology/CDCWireTopology.h>
11#include <tracking/trackFindingCDC/utilities/Algorithms.h>
13#include <tracking/trackFindingCDC/utilities/Common.h>
15#include <cdc/geometry/CDCGeometryPar.h>
18using namespace TrackFindingCDC;
41 for (
size_t iCLayer = 0; iCLayer < cdcGeo.
nWireLayers() ; ++iCLayer) {
42 for (
size_t iWire = 0; iWire < cdcGeo.
nWiresInLayer(iCLayer); ++iWire) {
48 std::vector<VectorRange<CDCWire>> wiresByILayer =
56 std::vector<VectorRange<CDCWireLayer> > layersByISuperLayer =
73 wire.initialize(wirePosition, ignoreWireSag);
77 wireLayer.initialize();
81 wireSuperLayer.initialize();
88 const std::vector<CDCWireSuperLayer>& wireSuperLayers = cdcWireTopology.
getWireSuperLayers();
90 if (std::isnan(cylindricalR) or cylindricalR < 0) {
99 if (cylindricalR <= wireSuperLayer.getOuterCylindricalR()) {
100 return wireSuperLayer.getISuperLayer();
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 representing a sense wire layer in the central drift chamber.
Class representing a sense wire superlayer in the central drift chamber.
double getInnerCylindricalR() const
Getter for the inner radius of the layer as retrieved from the CDCGeometryPar by the inner most layer...
WireNeighborKind getNeighborKind(ILayer iLayer, IWire iWire, ILayer iOtherLayer, IWire iOtherWire) const
Checks if two wires are closest neighbors.
Class representing the sense wire arrangement in the whole of the central drift chamber.
static const ISuperLayer c_NSuperLayers
Total number of superlayers.
std::vector< Belle2::TrackFindingCDC::CDCWire > m_wires
Storage for all wires in the CDC.
WireNeighborKind getNeighborKind(const WireID &wireID, const WireID &otherWireID) const
Checks if two wires are closest neighbors.
void initialize()
Create all wires, wire layers and wire superlayers and their interdependences with base geometry from...
static const ILayer c_NLayers
Total number of layers.
const std::vector< Belle2::TrackFindingCDC::CDCWireSuperLayer > & getWireSuperLayers() const
Getter for the underlying storing superlayer vector.
ISuperLayer getISuperLayerAtCylindricalR(double cylindricalR)
Returns the logical superlayer number at the given radius.
const CDCWireSuperLayer & getWireSuperLayer(const WireID &wireID) const
Getter for wire superlayer getter by wireID object.
std::vector< Belle2::TrackFindingCDC::CDCWireLayer > m_wireLayers
Storage for all wire layers in the CDC.
void reinitialize(EWirePosition wirePosition, bool ignoreWireSag)
Reload all geometry parameters form the CDCGeometryPar to adjust to changes in geometry.
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
ILayer m_FirstLayerOffset
Offset of first layer.
static const IWire c_NWires
Total number of wires.
bool isValidISuperLayer(ISuperLayer iSuperLayer) const
Checks the validity of the superlayer id.
std::vector< Belle2::TrackFindingCDC::CDCWireSuperLayer > m_wireSuperLayers
Storage for all wire superlayers in the CDC.
Class representing a sense wire in the central drift chamber.
A pair of iterators usable with the range base for loop.
Type for the neighbor relationship from one wire to another.
Class to identify a wire inside the CDC.
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.
Adapter of a category function to find the common category of several objects.
Generic functor to get the superlayer id from an object.
static const ISuperLayer c_Invalid
Constant making an invalid superlayer id.
static const ISuperLayer c_InnerVolume
Constant marking the subdetectors closer to the IP than the CDC.
static const ISuperLayer c_OuterVolume
Constant marking the subdetectors further away from the IP than the CDC.