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 = 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 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.
 
void initialize ()
 Initializes the superlayer variables of according the layer range. Set the numbering shift of contained 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.
 
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.
 
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.
 
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.
 
MayBePtr< const CDCWiregetNeighborCW (ILayer iLayer, IWire iWire) const
 Getter for the nearest clockwise neighbor by wire id and layer id with in this superlayer.
 
MayBePtr< const CDCWiregetNeighborCCW (ILayer iLayer, IWire iWire) const
 Getter for the nearest counterclockwise neighbor by wire id and layer id with in this superlayer.
 
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.
 
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.
 
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.
 
MayBePtr< const CDCWiregetSecondNeighborOneOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the one o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborTwoOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the two o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborThreeOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the three o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborFourOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the four o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborFiveOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the five o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborSixOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the six o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborSevenOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the seven o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborEightOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the eight o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborNineOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the nine o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborTenOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the ten o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborElevenOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the elven o'clock position.
 
MayBePtr< const CDCWiregetSecondNeighborTwelveOClock (ILayer iLayer, IWire iWire) const
 Getter for secondary neighbor at the twelve o'clock position.
 

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

using Iterator = AIterator
inherited

Iterator type of the range.

Definition at line 33 of file Range.h.

◆ iterator

using iterator = Iterator
inherited

Iterator definition for stl.

Definition at line 36 of file Range.h.

◆ Reference

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

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 {};
double m_refTanLambda
Memory for (fitted) proportionality factor between the increasing cylindrical radius and the referenc...
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...

◆ CDCWireSuperLayer() [2/2]

CDCWireSuperLayer ( const ConstVectorRange< CDCWireLayer > &  wireLayers)
explicit

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

Definition at line 15 of file CDCWireSuperLayer.cc.

16 : Super(wireLayers)
17 , m_innerRefZ(0.0)
18 , m_outerRefZ(0.0)
19 , m_refTanLambda(0.0)
20{
21 initialize();
22}
void initialize()
Initializes the superlayer variables of according the layer range. Set the numbering shift of contain...
ConstVectorRange< CDCWireLayer > Super
Type of the base class.

Member Function Documentation

◆ at()

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 }
Reference operator[](std::size_t i) const
Returns the object at index i.
Definition: Range.h:88
std::size_t size() const
Returns the total number of objects in this range.
Definition: Range.h:76

◆ back()

Reference back ( ) const
inlineinherited

Returns the dereferenced iterator before end()

Definition at line 84 of file Range.h.

85 { return *(end() - 1); }
Iterator end() const
End of the range for range based for.
Definition: Range.h:68

◆ begin()

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()

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); }
Iterator begin() const
Begin of the range for range based for.
Definition: Range.h:64

◆ empty()

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()

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()

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 132 of file CDCWireSuperLayer.h.

133 { return front().getInnerCylindricalR(); }
Reference front() const
Returns the dereferenced iterator at begin()
Definition: Range.h:80

◆ 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 145 of file CDCWireSuperLayer.h.

146 { 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 140 of file CDCWireSuperLayer.h.

141 { return (getOuterCylindricalR() + getInnerCylindricalR()) / 2.0; }
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...

◆ getNeighborCCW()

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 221 of file CDCWireSuperLayer.h.

222 { return &(getWireLayer(iLayer).getNeighborCCW(iWire)); }
const CDCWire & getNeighborCCW(IWire iWire) const
Getter for the first counterclockwise neighbor by wire id in the layer.
Definition: CDCWireLayer.h:165
const CDCWireLayer & getWireLayer(ILayer iLayer) const
Gives the layer by its layer id within the superlayer.

◆ getNeighborCCWInwards()

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 225 of file CDCWireSuperLayer.h.

226 { return getNeighborsInwards(iLayer, iWire).first; } // not optimal since a second wire gets fetched additionally
WireNeighborPair getNeighborsInwards(ILayer iLayer, IWire iWire) const
Getter for the two closest neighbors in the layer inwards of the given on.

◆ getNeighborCCWOutwards()

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 209 of file CDCWireSuperLayer.h.

210 { return getNeighborsOutwards(iLayer, iWire).first; } // not optimal since a second wire gets fetched additionally
WireNeighborPair getNeighborsOutwards(ILayer iLayer, IWire iWire) const
Getter for the two closest neighbors in the layer outwards of the given on.

◆ getNeighborCW()

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 217 of file CDCWireSuperLayer.h.

218 { return &(getWireLayer(iLayer).getNeighborCW(iWire)); }
const CDCWire & getNeighborCW(IWire iWire) const
Getter for the first clockwise neighbor by wire id in the layer.
Definition: CDCWireLayer.h:169

◆ getNeighborCWInwards()

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 229 of file CDCWireSuperLayer.h.

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

◆ getNeighborCWOutwards()

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 213 of file CDCWireSuperLayer.h.

214 { 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 28 of file CDCWireSuperLayer.cc.

32{
33 if (not isValidILayer(iLayer)) return WireNeighborKind();
34 if (not isValidILayer(iOtherLayer)) return WireNeighborKind();
35
36 const ILayer iLayerDifference = iOtherLayer - iLayer;
37 const ILayer absILayerDifference = abs(iLayerDifference);
38 const CDCWireLayer& layer = getWireLayer(iLayer);
39 const CDCWireLayer& otherLayer = getWireLayer(iOtherLayer);
40 const ERotation deltaShift = otherLayer.getShiftDelta(layer);
41 const IWire nWires = layer.size();
42
43 int iRow = 2 * iWire;
44 int iOtherRow = 2 * iOtherWire + deltaShift;
45 int iRowDelta = symmetricModuloFast(iOtherRow - iRow, 2 * nWires);
46 int absIRowDelta = abs(iRowDelta);
47
48 if ((absILayerDifference + absIRowDelta) > 4 or absILayerDifference > 2) return WireNeighborKind(); // Invalid case
49 if (absILayerDifference + absIRowDelta == 0) return WireNeighborKind(0, 0);
50
51 int cellDistance = absILayerDifference == 2 ? 2 : (absILayerDifference + absIRowDelta) / 2;
52
53 int slope = 0;
54 if (iRowDelta == 0) {
55 slope = 3;
56 } else if (iLayerDifference == 0) {
57 slope = 0;
58 } else if (absIRowDelta == 3) {
59 slope = 1;
60 } else {
61 slope = 2;
62 }
63
64 if (iRowDelta > 0) {
65 slope = 6 - slope;
66 }
67
68 if (iLayerDifference > 0) {
69 slope = -slope;
70 }
71
72 int oClockDirection = moduloFast(slope + 3 , 12);
73 return WireNeighborKind(cellDistance, oClockDirection);
74}
Class representing a sense wire layer in the central drift chamber.
Definition: CDCWireLayer.h:42
ERotation getShiftDelta(const CDCWireLayer &baseLayer) const
Getter for the relative difference in wire numbering shift.
Definition: CDCWireLayer.h:124
bool isValidILayer(ILayer iLayer) const
Checks if the given layer id belongs to a valid layer in this superlayer.
Type for the neighbor relationship from one wire to another.
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 76 of file CDCWireSuperLayer.cc.

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

◆ 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 98 of file CDCWireSuperLayer.cc.

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

◆ 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 136 of file CDCWireSuperLayer.h.

137 { return back().getOuterCylindricalR(); }
Reference back() const
Returns the dereferenced iterator before end()
Definition: Range.h:84

◆ 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 149 of file CDCWireSuperLayer.h.

150 { return m_outerRefZ; }

◆ getPrimaryNeighbor()

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 179 of file CDCWireSuperLayer.h.

182 {
183 oClockDirection = modulo(oClockDirection, 12);
184 switch (oClockDirection) {
185 case 1:
186 return getNeighborCWOutwards(iLayer, iWire);
187 case 3:
188 return getNeighborCW(iLayer, iWire);
189 case 5:
190 return getNeighborCWInwards(iLayer, iWire);
191 case 7:
192 return getNeighborCCWInwards(iLayer, iWire);
193 case 9:
194 return getNeighborCCW(iLayer, iWire);
195 case 11:
196 return getNeighborCCWOutwards(iLayer, iWire);
197 default:
198 return nullptr;
199 }
200 }
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 > 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 > getNeighborCCW(ILayer iLayer, IWire iWire) const
Getter for the nearest counterclockwise neighbor by wire id and layer id with in this superlayer.
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.
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 > 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 ...

◆ 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 153 of file CDCWireSuperLayer.h.

154 { return m_refTanLambda; }

◆ getSecondaryNeighbor()

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 245 of file CDCWireSuperLayer.h.

248 {
249 oClockDirection = modulo(oClockDirection, 12);
250 switch (oClockDirection) {
251 case 0:
252 return getSecondNeighborTwelveOClock(iLayer, iWire);
253 case 1:
254 return getSecondNeighborOneOClock(iLayer, iWire);
255 case 2:
256 return getSecondNeighborTwoOClock(iLayer, iWire);
257 case 3:
258 return getSecondNeighborThreeOClock(iLayer, iWire);
259 case 4:
260 return getSecondNeighborFourOClock(iLayer, iWire);
261 case 5:
262 return getSecondNeighborFiveOClock(iLayer, iWire);
263 case 6:
264 return getSecondNeighborSixOClock(iLayer, iWire);
265 case 7:
266 return getSecondNeighborSevenOClock(iLayer, iWire);
267 case 8:
268 return getSecondNeighborEightOClock(iLayer, iWire);
269 case 9:
270 return getSecondNeighborNineOClock(iLayer, iWire);
271 case 10:
272 return getSecondNeighborTenOClock(iLayer, iWire);
273 case 11:
274 return getSecondNeighborElevenOClock(iLayer, iWire);
275 default:
276 return nullptr;
277 }
278 }
MayBePtr< const CDCWire > getSecondNeighborSixOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the six 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 > getSecondNeighborSevenOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the seven o'clock position.
MayBePtr< const CDCWire > getSecondNeighborThreeOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the three o'clock position.
MayBePtr< const CDCWire > getSecondNeighborElevenOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the elven o'clock position.
MayBePtr< const CDCWire > getSecondNeighborFiveOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the five 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 > getSecondNeighborTenOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the ten o'clock position.
MayBePtr< const CDCWire > getSecondNeighborFourOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the four o'clock position.
MayBePtr< const CDCWire > getSecondNeighborTwoOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the two 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 > getSecondNeighborOneOClock(ILayer iLayer, IWire iWire) const
Getter for secondary neighbor at the one o'clock position.

◆ getSecondNeighborEightOClock()

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

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

Definition at line 312 of file CDCWireSuperLayer.h.

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

◆ getSecondNeighborElevenOClock()

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

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

Definition at line 325 of file CDCWireSuperLayer.h.

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

◆ getSecondNeighborFiveOClock()

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

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

Definition at line 299 of file CDCWireSuperLayer.h.

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

◆ getSecondNeighborFourOClock()

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

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

Definition at line 294 of file CDCWireSuperLayer.h.

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

◆ getSecondNeighborNineOClock()

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

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

Definition at line 316 of file CDCWireSuperLayer.h.

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

◆ getSecondNeighborOneOClock()

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

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

Definition at line 281 of file CDCWireSuperLayer.h.

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

◆ getSecondNeighborSevenOClock()

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

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

Definition at line 307 of file CDCWireSuperLayer.h.

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

◆ getSecondNeighborSixOClock()

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

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

Definition at line 303 of file CDCWireSuperLayer.h.

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

◆ getSecondNeighborTenOClock()

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

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

Definition at line 320 of file CDCWireSuperLayer.h.

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

◆ getSecondNeighborThreeOClock()

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

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

Definition at line 290 of file CDCWireSuperLayer.h.

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

◆ getSecondNeighborTwelveOClock()

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

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

Definition at line 329 of file CDCWireSuperLayer.h.

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

◆ getSecondNeighborTwoOClock()

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

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

Definition at line 286 of file CDCWireSuperLayer.h.

287 { 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 128 of file CDCWireSuperLayer.h.

129 { 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 107 of file CDCWireSuperLayer.h.

108 { return getWireLayer(iLayer).getWire(iWire); }
const CDCWire & getWire(IWire iWire) const
Gives the wire by its id in the layer.
Definition: CDCWireLayer.h:138

◆ 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 // cppcheck-suppress returnTempReference
93 return at(iLayer);
94 }
Reference at(std::size_t i) const
Returns the object at index i.
Definition: Range.h:92

◆ initialize()

void initialize ( )

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

Definition at line 24 of file CDCWireSuperLayer.cc.

25{
26}

◆ isAxial()

bool isAxial ( ) const
inline

Indicates if the wire is axial or stereo.

Definition at line 118 of file CDCWireSuperLayer.h.

119 { return getStereoKind() == EStereoKind::c_Axial; }
EStereoKind getStereoKind() const
Getter for the stereo type of the wire layer Gives the stereo type of the wire.

◆ 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 103 of file CDCWireSuperLayer.h.

104 { return isValidILayer(iLayer) and getWireLayer(iLayer).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

◆ operator[]()

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()

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 335 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 338 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 341 of file CDCWireSuperLayer.h.


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