Belle II Software development
IWireUtil Struct Reference

This is a utility class for the free IWire type. More...

#include <IWire.h>

Static Public Member Functions

static IWire wrappedAround (IWire iWire, IWire nWires)
 Wraps the given in layer wire index by the total number of wires in this layer.
 
static IWire getNextCCW (IWire iWire, IWire nWires)
 Gets the next counter clockwise wire id properly wrapping near wire of highest index.
 
static IWire getNextCW (IWire iWire, IWire nWires)
 Gets the next clockwise wire id properly wrapping near the wire of index zero.
 

Detailed Description

This is a utility class for the free IWire type.

It provides the basic methods to operate on the ISuperLayer numbers.

Definition at line 26 of file IWire.h.

Member Function Documentation

◆ getNextCCW()

static IWire getNextCCW ( IWire  iWire,
IWire  nWires 
)
inlinestatic

Gets the next counter clockwise wire id properly wrapping near wire of highest index.

Definition at line 43 of file IWire.h.

44 {
45 return wrappedAround(iWire + 1, nWires);
46 }
static IWire wrappedAround(IWire iWire, IWire nWires)
Wraps the given in layer wire index by the total number of wires in this layer.
Definition: IWire.h:37

◆ getNextCW()

static IWire getNextCW ( IWire  iWire,
IWire  nWires 
)
inlinestatic

Gets the next clockwise wire id properly wrapping near the wire of index zero.

Definition at line 49 of file IWire.h.

50 {
51 return wrappedAround(iWire - 1, nWires);
52 }

◆ wrappedAround()

static IWire wrappedAround ( IWire  iWire,
IWire  nWires 
)
inlinestatic

Wraps the given in layer wire index by the total number of wires in this layer.

Applying this function allows the advance over the numbering jumb near the wire of index zero in both directions. It brings the (incremented / decremented) wire index back to the valid range. Works for both negative and too large wire indices.

Parameters
iWireThe potentially unnormalised wire index to be brought to the valid range
nWiresThe total number of wires in the layer.
Returns
Normalised wire index brought to the valid range.

Definition at line 37 of file IWire.h.

38 {
39 return moduloFast(iWire, nWires);
40 }

The documentation for this struct was generated from the following file: