Belle II Software development
CDCWireSuperLayer Class Reference

Class representing a sense wire superlayer in the central drift chamber. More...

#include <CDCWireSuperLayer.h>

Inheritance diagram for CDCWireSuperLayer:
Range< AIterator >

Public Types

using Super = TrackingUtilities::ConstVectorRange<CDCWireLayer>
 Type of the base class.
 
using Iterator = AIterator
 Iterator type of the range.
 
using iterator = Iterator
 Iterator definition for stl.
 
using Reference = typename std::iterator_traits<AIterator>::reference
 The type the iterator references.
 
using value_type = typename std::iterator_traits<AIterator>::value_type
 The type behind the iterator (make it possible to use the range as a "list")
 

Public Member Functions

 CDCWireSuperLayer ()
 Empty constructor for creating an empty dummy CDCWireSuperLayer for studies with a CDC with missing super layers.
 
 CDCWireSuperLayer (const TrackingUtilities::ConstVectorRange< CDCWireLayer > &wireLayers)
 Constructor taking the range of layers the superlayer shall contain. Use rather getInstance() to avoid instance constructions.
 
 CDCWireSuperLayer (const CDCWireSuperLayer &wireSuperLayer)=delete
 Disallow copy construction of wire super layers.
 
 CDCWireSuperLayer (CDCWireSuperLayer &&wireSuperLayer)=default
 Allow move construction of wire super layers for use in std::vector.
 
void operator= (const CDCWireSuperLayer &wireSuperLayer)=delete
 Disallow copy assignment of wire super layers.
 
Iterator begin () const
 Begin of the range for range based for.
 
Iterator end () const
 End of the range for range based for.
 
bool empty () const
 Checks if the begin equals the end iterator, hence if the range is empty.
 
std::size_t size () const
 Returns the total number of objects in this range.
 
Reference front () const
 Returns the dereferenced iterator at begin()
 
Reference back () const
 Returns the dereferenced iterator before end()
 
Reference operator[] (std::size_t i) const
 Returns the object at index i.
 
Reference at (std::size_t i) const
 Returns the object at index i.
 
bool count (Reference t)
 Counts the number of equivalent items in the range.
 
Superlayer index
ISuperLayer getISuperLayer () const
 Getter for the super layer id.
 
Layer getters
bool isValidILayer (ILayer iLayer) const
 Checks if the given layer id belongs to a valid layer in this superlayer.
 
const CDCWireLayergetWireLayer (ILayer iLayer) const
 Gives the layer by its layer id within the superlayer.
 
Wire getters
bool isValidIWire (ILayer iLayer, IWire iWire) const
 Checks if the given wire id belongs to a valid wire in this superlayer.
 
const CDCWiregetWire (ILayer iLayer, IWire iWire) const
 Gives the wire by its layer id within the superlayer and the wire id in the layer.
 
Geometry properties
bool isAxial () const
 Indicates if the wire is axial or stereo.
 
EStereoKind getStereoKind () const
 Getter for the stereo type of the wire layer Gives the stereo type of the wire.
 
double getInnerCylindricalR () const
 Getter for the inner radius of the layer as retrieved from the CDCGeometryPar by the inner most layer.
 
double getOuterCylindricalR () const
 Getter for the outer radius of the layer as retrieved from the CDCGeometryPar by the outer most layer.
 
double getMiddleCylindricalR () const
 Getter for the radius in the middle of the layer.
 
double getInnerRefZ () const
 Getter for the (fitted) z of the reference wire reference points at the inner cylindricalR of this super layer.
 
double getOuterRefZ () const
 Getter for the (fitted) z of the reference wire reference points at the outer cylindricalR of this super layer.
 
double getRefTanLambda () const
 Getter for (fitted) proportionality factor between the increasing cylindrical radius and the reference z coordinate in this superlayer.
 
Closest neighborhood

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 (ILayer iLayer, IWire iWire, ILayer iOtherLayer, IWire iOtherWire) const
 Checks if two wires are closest neighbors.
 
TrackingUtilities::MayBePtr< const CDCWiregetPrimaryNeighbor (short oClockDirection, ILayer iLayer, IWire iWire) const
 Getter for the two closest neighbors in the given o'clock direction.
 
WireNeighborPair getNeighborsOutwards (ILayer iLayer, IWire iWire) const
 Getter for the two closest neighbors in the layer outwards of the given on.
 
WireNeighborPair getNeighborsInwards (ILayer iLayer, IWire iWire) const
 Getter for the two closest neighbors in the layer inwards of the given on.
 
TrackingUtilities::MayBePtr< const CDCWiregetNeighborCCWOutwards (ILayer iLayer, IWire iWire) const
 Getter for the nearest clockwise neighbor in the next layer outwards by wire id and layer id with in this superlayer.
 
TrackingUtilities::MayBePtr< const CDCWiregetNeighborCWOutwards (ILayer iLayer, IWire iWire) const
 Getter for the nearest clockwise neighbor in the next layer outwards by wire id and layer id with in this superlayer.
 
TrackingUtilities::MayBePtr< const CDCWiregetNeighborCW (ILayer iLayer, IWire iWire) const
 Getter for the nearest clockwise neighbor by wire id and layer id with in this superlayer.
 
TrackingUtilities::MayBePtr< const CDCWiregetNeighborCCW (ILayer iLayer, IWire iWire) const
 Getter for the nearest counterclockwise neighbor by wire id and layer id with in this superlayer.
 
TrackingUtilities::MayBePtr< const CDCWiregetNeighborCCWInwards (ILayer iLayer, IWire iWire) const
 Getter for the nearest clockwise neighbor in the next layer outwards by wire id and layer id with in this superlayer.
 
TrackingUtilities::MayBePtr< const CDCWiregetNeighborCWInwards (ILayer iLayer, IWire iWire) const
 Getter for the nearest clockwise neighbor in the next layer outwards by wire id and layer id with in this superlayer.
 
TrackingUtilities::MayBePtr< const CDCWiregetSecondaryNeighbor (short oClockDirection, ILayer iLayer, IWire iWire) const
 getSecondaryNeighbor Secondary neighborhood The secondary neighbors are numbered like positions on the normal twelve hour clock.
 
TrackingUtilities::MayBePtr< const CDCWiregetSecondNeighborOneOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the one o'clock position.
 
TrackingUtilities::MayBePtr< const CDCWiregetSecondNeighborTwoOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the two o'clock position.
 
TrackingUtilities::MayBePtr< const CDCWiregetSecondNeighborThreeOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the three o'clock position.
 
TrackingUtilities::MayBePtr< const CDCWiregetSecondNeighborFourOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the four o'clock position.
 
TrackingUtilities::MayBePtr< const CDCWiregetSecondNeighborFiveOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the five o'clock position.
 
TrackingUtilities::MayBePtr< const CDCWiregetSecondNeighborSixOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the six o'clock position.
 
TrackingUtilities::MayBePtr< const CDCWiregetSecondNeighborSevenOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the seven o'clock position.
 
TrackingUtilities::MayBePtr< const CDCWiregetSecondNeighborEightOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the eight o'clock position.
 
TrackingUtilities::MayBePtr< const CDCWiregetSecondNeighborNineOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the nine o'clock position.
 
TrackingUtilities::MayBePtr< const CDCWiregetSecondNeighborTenOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the ten o'clock position.
 
TrackingUtilities::MayBePtr< const CDCWiregetSecondNeighborElevenOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the elven o'clock position.
 
TrackingUtilities::MayBePtr< const CDCWiregetSecondNeighborTwelveOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the twelve o'clock position.
 

Static Public Member Functions

static void initialize ()
 Initializes the superlayer variables of according the layer range. Set the numbering shift of contained layers.
 

Public Attributes

T1 first_type
 STL member.
 
T2 second_type
 STL member.
 

Private Attributes

double m_innerRefZ
 Memory for the (fitted) z of the reference wire reference points at the inner cylindricalR of this super layer.
 
double m_outerRefZ
 Memory for the (fitted) z of the reference wire reference points at the outer cylindricalR of this super layer.
 
double m_refTanLambda
 Memory for (fitted) proportionality factor between the increasing cylindrical radius and the reference z coordinate in this superlayer.
 

Detailed Description

Class representing a sense wire superlayer in the central drift chamber.

This class represents a CDC superlayer as a range of wire layers.
The range is sorted with increasing layer ids for maximal fast look up.
It provides methods for checking the validity of layer and wire ids as well as
a getter for the layers and wires in this layer.
Additionally it is iterable as a range of CDCWireLayers.
The superlayer also defines the closest and the secondary neighborhood.
The class does not provide the memory for the wire layers by itself.
It uses iterators into a vector of CDCWireLayers.
The vector of CDCWireLayers is normally provided by the CDCWireTopology object instance.
Note : All possible superlayer object are stored in the CDCWireTopology
which you can get with the static getInstance() functions.
There is rarely a need for constructing a superlayer object and
it should be avoided.

Definition at line 43 of file CDCWireSuperLayer.h.

Member Typedef Documentation

◆ Iterator

template<class AIterator>
using Iterator = AIterator
inherited

Iterator type of the range.

Definition at line 33 of file Range.h.

◆ iterator

template<class AIterator>
using iterator = Iterator
inherited

Iterator definition for stl.

Definition at line 36 of file Range.h.

◆ Reference

template<class AIterator>
using Reference = typename std::iterator_traits<AIterator>::reference
inherited

The type the iterator references.

Definition at line 39 of file Range.h.

◆ Super

Type of the base class.

Definition at line 48 of file CDCWireSuperLayer.h.

◆ value_type

template<class AIterator>
using value_type = typename std::iterator_traits<AIterator>::value_type
inherited

The type behind the iterator (make it possible to use the range as a "list")

Definition at line 42 of file Range.h.

Constructor & Destructor Documentation

◆ CDCWireSuperLayer() [1/2]

CDCWireSuperLayer ( )
inline

Empty constructor for creating an empty dummy CDCWireSuperLayer for studies with a CDC with missing super layers.

Definition at line 51 of file CDCWireSuperLayer.h.

51 : m_innerRefZ(0.0), m_outerRefZ(0.0), m_refTanLambda(0.0)
52 {};

◆ CDCWireSuperLayer() [2/2]

Constructor taking the range of layers the superlayer shall contain. Use rather getInstance() to avoid instance constructions.

Definition at line 16 of file CDCWireSuperLayer.cc.

17 : Super(wireLayers)
18 , m_innerRefZ(0.0)
19 , m_outerRefZ(0.0)
20 , m_refTanLambda(0.0)
21{
22 initialize();
23}
double m_refTanLambda
Memory for (fitted) proportionality factor between the increasing cylindrical radius and the referenc...
static void initialize()
Initializes the superlayer variables of according the layer range. Set the numbering shift of contain...
double m_outerRefZ
Memory for the (fitted) z of the reference wire reference points at the outer cylindricalR of this su...
double m_innerRefZ
Memory for the (fitted) z of the reference wire reference points at the inner cylindricalR of this su...
TrackingUtilities::ConstVectorRange< CDCWireLayer > Super
Type of the base class.

Member Function Documentation

◆ at()

template<class AIterator>
Reference at ( std::size_t i) const
inlineinherited

Returns the object at index i.

Definition at line 92 of file Range.h.

93 {
94 if (not(i < size())) {
95 throw std::out_of_range("Range : Requested index " + std::to_string(i) + " is out of bounds.");
96 }
97 return operator[](i);
98 }

◆ back()

template<class AIterator>
Reference back ( ) const
inlineinherited

Returns the dereferenced iterator before end()

Definition at line 84 of file Range.h.

85 { return *(end() - 1); }

◆ begin()

template<class AIterator>
Iterator begin ( ) const
inlineinherited

Begin of the range for range based for.

Definition at line 64 of file Range.h.

65 { return this->first; }

◆ count()

template<class AIterator>
bool count ( Reference t)
inlineinherited

Counts the number of equivalent items in the range.

Definition at line 101 of file Range.h.

102 { return std::count(this->begin(), this->end(), t); }

◆ empty()

template<class AIterator>
bool empty ( ) const
inlineinherited

Checks if the begin equals the end iterator, hence if the range is empty.

Definition at line 72 of file Range.h.

73 { return begin() == end(); }

◆ end()

template<class AIterator>
Iterator end ( ) const
inlineinherited

End of the range for range based for.

Definition at line 68 of file Range.h.

69 { return this->second; }

◆ front()

template<class AIterator>
Reference front ( ) const
inlineinherited

Returns the dereferenced iterator at begin()

Definition at line 80 of file Range.h.

81 { return *(begin()); }

◆ getInnerCylindricalR()

double getInnerCylindricalR ( ) const
inline

Getter for the inner radius of the layer as retrieved from the CDCGeometryPar by the inner most layer.

Definition at line 131 of file CDCWireSuperLayer.h.

132 { return front().getInnerCylindricalR(); }

◆ getInnerRefZ()

double getInnerRefZ ( ) const
inline

Getter for the (fitted) z of the reference wire reference points at the inner cylindricalR of this super layer.

Definition at line 144 of file CDCWireSuperLayer.h.

145 { return m_innerRefZ; }

◆ getISuperLayer()

ISuperLayer getISuperLayer ( ) const
inline

Getter for the super layer id.

Definition at line 76 of file CDCWireSuperLayer.h.

77 { return front().getISuperLayer(); }

◆ getMiddleCylindricalR()

double getMiddleCylindricalR ( ) const
inline

Getter for the radius in the middle of the layer.

Definition at line 139 of file CDCWireSuperLayer.h.

140 { return (getOuterCylindricalR() + getInnerCylindricalR()) / 2.0; }

◆ getNeighborCCW()

TrackingUtilities::MayBePtr< const CDCWire > getNeighborCCW ( ILayer iLayer,
IWire iWire ) const
inline

Getter for the nearest counterclockwise neighbor by wire id and layer id with in this superlayer.

Definition at line 220 of file CDCWireSuperLayer.h.

221 { return &(getWireLayer(iLayer).getNeighborCCW(iWire)); }

◆ getNeighborCCWInwards()

TrackingUtilities::MayBePtr< const CDCWire > getNeighborCCWInwards ( ILayer iLayer,
IWire iWire ) const
inline

Getter for the nearest clockwise neighbor in the next layer outwards by wire id and layer id with in this superlayer.

Definition at line 224 of file CDCWireSuperLayer.h.

225 { return getNeighborsInwards(iLayer, iWire).first; } // not optimal since a second wire gets fetched additionally

◆ getNeighborCCWOutwards()

TrackingUtilities::MayBePtr< const CDCWire > getNeighborCCWOutwards ( ILayer iLayer,
IWire iWire ) const
inline

Getter for the nearest clockwise neighbor in the next layer outwards by wire id and layer id with in this superlayer.

Definition at line 208 of file CDCWireSuperLayer.h.

209 { return getNeighborsOutwards(iLayer, iWire).first; } // not optimal since a second wire gets fetched additionally

◆ getNeighborCW()

TrackingUtilities::MayBePtr< const CDCWire > getNeighborCW ( ILayer iLayer,
IWire iWire ) const
inline

Getter for the nearest clockwise neighbor by wire id and layer id with in this superlayer.

Definition at line 216 of file CDCWireSuperLayer.h.

217 { return &(getWireLayer(iLayer).getNeighborCW(iWire)); }

◆ getNeighborCWInwards()

TrackingUtilities::MayBePtr< const CDCWire > getNeighborCWInwards ( ILayer iLayer,
IWire iWire ) const
inline

Getter for the nearest clockwise neighbor in the next layer outwards by wire id and layer id with in this superlayer.

Definition at line 228 of file CDCWireSuperLayer.h.

229 { return getNeighborsInwards(iLayer, iWire).second; } // not optimal since a second wire gets fetched additionally

◆ getNeighborCWOutwards()

TrackingUtilities::MayBePtr< const CDCWire > getNeighborCWOutwards ( ILayer iLayer,
IWire iWire ) const
inline

Getter for the nearest clockwise neighbor in the next layer outwards by wire id and layer id with in this superlayer.

Definition at line 212 of file CDCWireSuperLayer.h.

213 { return getNeighborsOutwards(iLayer, iWire).second; } // not optimal since a second wire gets fetched additionally

◆ getNeighborKind()

WireNeighborKind getNeighborKind ( ILayer iLayer,
IWire iWire,
ILayer iOtherLayer,
IWire iOtherWire ) 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 29 of file CDCWireSuperLayer.cc.

33{
34 if (not isValidILayer(iLayer)) return WireNeighborKind();
35 if (not isValidILayer(iOtherLayer)) return WireNeighborKind();
36
37 const ILayer iLayerDifference = iOtherLayer - iLayer;
38 const ILayer absILayerDifference = abs(iLayerDifference);
39 const CDCWireLayer& layer = getWireLayer(iLayer);
40 const CDCWireLayer& otherLayer = getWireLayer(iOtherLayer);
41 const ERotation deltaShift = otherLayer.getShiftDelta(layer);
42 const IWire nWires = layer.size();
43
44 int iRow = 2 * iWire;
45 int iOtherRow = 2 * iOtherWire + deltaShift;
46 int iRowDelta = symmetricModuloFast(iOtherRow - iRow, 2 * nWires);
47 int absIRowDelta = abs(iRowDelta);
48
49 if ((absILayerDifference + absIRowDelta) > 4 or absILayerDifference > 2) return WireNeighborKind(); // Invalid case
50 if (absILayerDifference + absIRowDelta == 0) return WireNeighborKind(0, 0);
51
52 int cellDistance = absILayerDifference == 2 ? 2 : (absILayerDifference + absIRowDelta) / 2;
53
54 int slope = 0;
55 if (iRowDelta == 0) {
56 slope = 3;
57 } else if (iLayerDifference == 0) {
58 slope = 0;
59 } else if (absIRowDelta == 3) {
60 slope = 1;
61 } else {
62 slope = 2;
63 }
64
65 if (iRowDelta > 0) {
66 slope = 6 - slope;
67 }
68
69 if (iLayerDifference > 0) {
70 slope = -slope;
71 }
72
73 int oClockDirection = moduloFast(slope + 3, 12);
74 return WireNeighborKind(cellDistance, oClockDirection);
75}
TrackingUtilities::ERotation getShiftDelta(const CDCWireLayer &baseLayer) const
Getter for the relative difference in wire numbering shift.
bool isValidILayer(ILayer iLayer) const
Checks if the given layer id belongs to a valid layer in this superlayer.
const CDCWireLayer & getWireLayer(ILayer iLayer) const
Gives the layer by its layer id within the superlayer.
signed short IWire
The type of the wire ids enumerating wires within a given layer.
Definition IWire.h:20
signed short ILayer
The type of the layer ids enumerating layers within a superlayer.
Definition ILayer.h:18
ERotation
Enumeration to represent the distinct possibilities of the right left passage information.
Definition ERotation.h:25

◆ getNeighborsInwards()

WireNeighborPair getNeighborsInwards ( ILayer iLayer,
IWire iWire ) const

Getter for the two closest neighbors in the layer inwards of the given on.

Definition at line 77 of file CDCWireSuperLayer.cc.

78{
79 if (not isValidILayer(iLayer - 1)) return WireNeighborPair(nullptr, nullptr);
80
81 const CDCWireLayer& layer = getWireLayer(iLayer);
82 const CDCWireLayer& neighborLayer = getWireLayer(iLayer - 1);
83 const ERotation deltaShift = neighborLayer.getShiftDelta(layer);
84
85 if (deltaShift == ERotation::c_CounterClockwise) {
86 return WireNeighborPair(&(neighborLayer.getWireWrappedAround(iWire)),
87 &(neighborLayer.getWireWrappedAround(iWire - 1)));
88 } else if (deltaShift == ERotation::c_Clockwise) {
89 return WireNeighborPair(&(neighborLayer.getWireWrappedAround(iWire + 1)),
90 &(neighborLayer.getWireWrappedAround(iWire)));
91 } else {
92 B2WARNING("Wire numbering shift bigger than one in magnitude. Adjust getNeighbor functions " << static_cast<int>(deltaShift));
93 B2WARNING("From iLayer " << iLayer << " and wire " << iWire << " to iLayer " << iLayer - 1);
94 return WireNeighborPair(nullptr, nullptr);
95 }
96
97}
const CDCWire & getWireWrappedAround(IWire iWire) const
Returns the wire by its id in the layer.

◆ getNeighborsOutwards()

WireNeighborPair getNeighborsOutwards ( ILayer iLayer,
IWire iWire ) const

Getter for the two closest neighbors in the layer outwards of the given on.

Definition at line 99 of file CDCWireSuperLayer.cc.

100{
101 if (not isValidILayer(iLayer + 1)) return WireNeighborPair(nullptr, nullptr);
102
103 const CDCWireLayer& layer = getWireLayer(iLayer);
104 const CDCWireLayer& neighborLayer = getWireLayer(iLayer + 1);
105 const ERotation deltaShift = neighborLayer.getShiftDelta(layer);
106
107 if (deltaShift == ERotation::c_CounterClockwise) {
108 return WireNeighborPair(&(neighborLayer.getWireWrappedAround(iWire)),
109 &(neighborLayer.getWireWrappedAround(iWire - 1)));
110 } else if (deltaShift == ERotation::c_Clockwise) {
111 return WireNeighborPair(&(neighborLayer.getWireWrappedAround(iWire + 1)),
112 &(neighborLayer.getWireWrappedAround(iWire)));
113 } else {
114 B2WARNING("Wire numbering shift bigger than one in magnitude. Adjust getNeighbor functions " << static_cast<int>(deltaShift));
115 B2WARNING("From iLayer " << iLayer << " and wire " << iWire << " to iLayer " << iLayer + 1);
116 return WireNeighborPair(nullptr, nullptr);
117 }
118
119}

◆ getOuterCylindricalR()

double getOuterCylindricalR ( ) const
inline

Getter for the outer radius of the layer as retrieved from the CDCGeometryPar by the outer most layer.

Definition at line 135 of file CDCWireSuperLayer.h.

136 { return back().getOuterCylindricalR(); }

◆ getOuterRefZ()

double getOuterRefZ ( ) const
inline

Getter for the (fitted) z of the reference wire reference points at the outer cylindricalR of this super layer.

Definition at line 148 of file CDCWireSuperLayer.h.

149 { return m_outerRefZ; }

◆ getPrimaryNeighbor()

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

Getter for the two closest neighbors in the given o'clock direction.

Valid values for the o clock direction are 1, 3, 5, 7, 9, 11.

Definition at line 178 of file CDCWireSuperLayer.h.

181 {
182 oClockDirection = TrackingUtilities::modulo(oClockDirection, 12);
183 switch (oClockDirection) {
184 case 1:
185 return getNeighborCWOutwards(iLayer, iWire);
186 case 3:
187 return getNeighborCW(iLayer, iWire);
188 case 5:
189 return getNeighborCWInwards(iLayer, iWire);
190 case 7:
191 return getNeighborCCWInwards(iLayer, iWire);
192 case 9:
193 return getNeighborCCW(iLayer, iWire);
194 case 11:
195 return getNeighborCCWOutwards(iLayer, iWire);
196 default:
197 return nullptr;
198 }
199 }

◆ getRefTanLambda()

double getRefTanLambda ( ) const
inline

Getter for (fitted) proportionality factor between the increasing cylindrical radius and the reference z coordinate in this superlayer.

Definition at line 152 of file CDCWireSuperLayer.h.

153 { return m_refTanLambda; }

◆ getSecondaryNeighbor()

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

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

Due to the hexogonal arrangement of the wires, 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 outwards direction.

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

Definition at line 244 of file CDCWireSuperLayer.h.

247 {
248 oClockDirection = TrackingUtilities::modulo(oClockDirection, 12);
249 switch (oClockDirection) {
250 case 0:
251 return getSecondNeighborTwelveOClock(iLayer, iWire);
252 case 1:
253 return getSecondNeighborOneOClock(iLayer, iWire);
254 case 2:
255 return getSecondNeighborTwoOClock(iLayer, iWire);
256 case 3:
257 return getSecondNeighborThreeOClock(iLayer, iWire);
258 case 4:
259 return getSecondNeighborFourOClock(iLayer, iWire);
260 case 5:
261 return getSecondNeighborFiveOClock(iLayer, iWire);
262 case 6:
263 return getSecondNeighborSixOClock(iLayer, iWire);
264 case 7:
265 return getSecondNeighborSevenOClock(iLayer, iWire);
266 case 8:
267 return getSecondNeighborEightOClock(iLayer, iWire);
268 case 9:
269 return getSecondNeighborNineOClock(iLayer, iWire);
270 case 10:
271 return getSecondNeighborTenOClock(iLayer, iWire);
272 case 11:
273 return getSecondNeighborElevenOClock(iLayer, iWire);
274 default:
275 return nullptr;
276 }
277 }

◆ getSecondNeighborEightOClock()

TrackingUtilities::MayBePtr< const CDCWire > getSecondNeighborEightOClock ( ILayer iLayer,
IWire iWire ) const
inline

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

Definition at line 311 of file CDCWireSuperLayer.h.

312 { return getNeighborCCWInwards(iLayer, iWire + 1); }

◆ getSecondNeighborElevenOClock()

TrackingUtilities::MayBePtr< const CDCWire > getSecondNeighborElevenOClock ( ILayer iLayer,
IWire iWire ) const
inline

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

Definition at line 324 of file CDCWireSuperLayer.h.

325 { return isValidILayer(iLayer + 2) ? &(getWireLayer(iLayer + 2).getWireWrappedAround(iWire + 1)) : nullptr; }

◆ getSecondNeighborFiveOClock()

TrackingUtilities::MayBePtr< const CDCWire > getSecondNeighborFiveOClock ( ILayer iLayer,
IWire iWire ) const
inline

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

Definition at line 298 of file CDCWireSuperLayer.h.

299 { return isValidILayer(iLayer - 2) ? &(getWireLayer(iLayer - 2).getWireWrappedAround(iWire - 1)) : nullptr; }

◆ getSecondNeighborFourOClock()

TrackingUtilities::MayBePtr< const CDCWire > getSecondNeighborFourOClock ( ILayer iLayer,
IWire iWire ) const
inline

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

Definition at line 293 of file CDCWireSuperLayer.h.

294 { return getNeighborCWInwards(iLayer, iWire - 1); }

◆ getSecondNeighborNineOClock()

TrackingUtilities::MayBePtr< const CDCWire > getSecondNeighborNineOClock ( ILayer iLayer,
IWire iWire ) const
inline

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

Definition at line 315 of file CDCWireSuperLayer.h.

316 { return getNeighborCCW(iLayer, iWire + 1); }

◆ getSecondNeighborOneOClock()

TrackingUtilities::MayBePtr< const CDCWire > getSecondNeighborOneOClock ( ILayer iLayer,
IWire iWire ) const
inline

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

Definition at line 280 of file CDCWireSuperLayer.h.

281 { return isValidILayer(iLayer + 2) ? &(getWireLayer(iLayer + 2).getWireWrappedAround(iWire - 1)) : nullptr; }

◆ getSecondNeighborSevenOClock()

TrackingUtilities::MayBePtr< const CDCWire > getSecondNeighborSevenOClock ( ILayer iLayer,
IWire iWire ) const
inline

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

Definition at line 306 of file CDCWireSuperLayer.h.

307 { return isValidILayer(iLayer - 2) ? &(getWireLayer(iLayer - 2).getWireWrappedAround(iWire + 1)) : nullptr; }

◆ getSecondNeighborSixOClock()

TrackingUtilities::MayBePtr< const CDCWire > getSecondNeighborSixOClock ( ILayer iLayer,
IWire iWire ) const
inline

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

Definition at line 302 of file CDCWireSuperLayer.h.

303 { return isValidILayer(iLayer - 2) ? &(getWireLayer(iLayer - 2).getWireWrappedAround(iWire)) : nullptr; }

◆ getSecondNeighborTenOClock()

TrackingUtilities::MayBePtr< const CDCWire > getSecondNeighborTenOClock ( ILayer iLayer,
IWire iWire ) const
inline

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

Definition at line 319 of file CDCWireSuperLayer.h.

320 { return getNeighborCCWOutwards(iLayer, iWire + 1); }

◆ getSecondNeighborThreeOClock()

TrackingUtilities::MayBePtr< const CDCWire > getSecondNeighborThreeOClock ( ILayer iLayer,
IWire iWire ) const
inline

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

Definition at line 289 of file CDCWireSuperLayer.h.

290 { return getNeighborCW(iLayer, iWire - 1); }

◆ getSecondNeighborTwelveOClock()

TrackingUtilities::MayBePtr< const CDCWire > getSecondNeighborTwelveOClock ( ILayer iLayer,
IWire iWire ) const
inline

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

Definition at line 328 of file CDCWireSuperLayer.h.

329 { return isValidILayer(iLayer + 2) ? &(getWireLayer(iLayer + 2).getWireWrappedAround(iWire)) : nullptr; }

◆ getSecondNeighborTwoOClock()

TrackingUtilities::MayBePtr< const CDCWire > getSecondNeighborTwoOClock ( ILayer iLayer,
IWire iWire ) const
inline

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

Definition at line 285 of file CDCWireSuperLayer.h.

286 { return getNeighborCWOutwards(iLayer, iWire - 1); }

◆ getStereoKind()

EStereoKind getStereoKind ( ) const
inline

Getter for the stereo type of the wire layer 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 127 of file CDCWireSuperLayer.h.

128 { return front().getStereoKind(); }

◆ getWire()

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

Gives the wire by its layer id within the superlayer and the wire id in the layer.

Definition at line 106 of file CDCWireSuperLayer.h.

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

◆ getWireLayer()

const CDCWireLayer & getWireLayer ( ILayer iLayer) const
inline

Gives the layer by its layer id within the superlayer.

Definition at line 90 of file CDCWireSuperLayer.h.

91 {
92 return at(iLayer);
93 }

◆ initialize()

void initialize ( )
static

Initializes the superlayer variables of according the layer range. Set the numbering shift of contained layers.

Definition at line 25 of file CDCWireSuperLayer.cc.

26{
27}

◆ isAxial()

bool isAxial ( ) const
inline

Indicates if the wire is axial or stereo.

Definition at line 117 of file CDCWireSuperLayer.h.

118 { return getStereoKind() == EStereoKind::c_Axial; }

◆ isValidILayer()

bool isValidILayer ( ILayer iLayer) const
inline

Checks if the given layer id belongs to a valid layer in this superlayer.

Definition at line 86 of file CDCWireSuperLayer.h.

87 { return 0 <= iLayer and iLayer < int(size()); }

◆ isValidIWire()

bool isValidIWire ( ILayer iLayer,
IWire iWire ) const
inline

Checks if the given wire id belongs to a valid wire in this superlayer.

Definition at line 102 of file CDCWireSuperLayer.h.

103 { return isValidILayer(iLayer) and getWireLayer(iLayer).isValidIWire(iWire); }

◆ operator[]()

template<class AIterator>
Reference operator[] ( std::size_t i) const
inlineinherited

Returns the object at index i.

Definition at line 88 of file Range.h.

89 { return *(begin() + i); }

◆ size()

template<class AIterator>
std::size_t size ( ) const
inlineinherited

Returns the total number of objects in this range.

Definition at line 76 of file Range.h.

77 { return std::distance(begin(), end()); }

Member Data Documentation

◆ m_innerRefZ

double m_innerRefZ
private

Memory for the (fitted) z of the reference wire reference points at the inner cylindricalR of this super layer.

Definition at line 334 of file CDCWireSuperLayer.h.

◆ m_outerRefZ

double m_outerRefZ
private

Memory for the (fitted) z of the reference wire reference points at the outer cylindricalR of this super layer.

Definition at line 337 of file CDCWireSuperLayer.h.

◆ m_refTanLambda

double m_refTanLambda
private

Memory for (fitted) proportionality factor between the increasing cylindrical radius and the reference z coordinate in this superlayer.

Definition at line 340 of file CDCWireSuperLayer.h.


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