8#include <tracking/trackFindingCDC/topology/CDCWireSuperLayer.h>
10#include <tracking/trackFindingCDC/numerics/Modulo.h>
13using namespace TrackFindingCDC;
31 IWire iOtherWire)
const
36 const ILayer iLayerDifference = iOtherLayer - iLayer;
37 const ILayer absILayerDifference = abs(iLayerDifference);
41 const IWire nWires = layer.size();
44 int iOtherRow = 2 * iOtherWire + deltaShift;
45 int iRowDelta = symmetricModuloFast(iOtherRow - iRow, 2 * nWires);
46 int absIRowDelta = abs(iRowDelta);
48 if ((absILayerDifference + absIRowDelta) > 4 or absILayerDifference > 2)
return WireNeighborKind();
51 int cellDistance = absILayerDifference == 2 ? 2 : (absILayerDifference + absIRowDelta) / 2;
56 }
else if (iLayerDifference == 0) {
58 }
else if (absIRowDelta == 3) {
68 if (iLayerDifference > 0) {
72 int oClockDirection = moduloFast(slope + 3 , 12);
82 const ERotation deltaShift = neighborLayer.
getShiftDelta(layer);
84 if (deltaShift == ERotation::c_CounterClockwise) {
87 }
else if (deltaShift == ERotation::c_Clockwise) {
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);
104 const ERotation deltaShift = neighborLayer.
getShiftDelta(layer);
106 if (deltaShift == ERotation::c_CounterClockwise) {
109 }
else if (deltaShift == ERotation::c_Clockwise) {
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);
Class representing a sense wire layer in the central drift chamber.
const CDCWire & getWireWrappedAround(IWire iWire) const
Returns the wire by its id in the layer.
ERotation getShiftDelta(const CDCWireLayer &baseLayer) const
Getter for the relative difference in wire numbering shift.
double m_refTanLambda
Memory for (fitted) proportionality factor between the increasing cylindrical radius and the referenc...
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...
WireNeighborPair getNeighborsOutwards(ILayer iLayer, IWire iWire) const
Getter for the two closest neighbors in the layer outwards of the given on.
ConstVectorRange< CDCWireLayer > Super
Type of the base class.
CDCWireSuperLayer()
Empty constructor for creating an empty dummy CDCWireSuperLayer for studies with a CDC with missing s...
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.
WireNeighborKind getNeighborKind(ILayer iLayer, IWire iWire, ILayer iOtherLayer, IWire iOtherWire) const
Checks if two wires are closest neighbors.
WireNeighborPair getNeighborsInwards(ILayer iLayer, IWire iWire) const
Getter for the two closest neighbors in the layer inwards of the given on.
Type for the neighbor relationship from one wire to another.
Class representing a pair of neighbors in the CDC in a single layer For certain circumstances it is a...
Abstract base class for different kinds of events.