Belle II Software  release-08-01-10
WireID Class Reference

Class to identify a wire inside the CDC. More...

#include <WireID.h>

Inheritance diagram for WireID:
Collaboration diagram for WireID:

Public Member Functions

 WireID (unsigned short eWire=65535)
 Constructor taking the encoded wire number. More...
 
 WireID (const WireID &wireID)
 Copy constructor.
 
 WireID (unsigned short iSuperLayer, unsigned short iLayer, unsigned short iWire)
 Constructor using the official numbering scheme. More...
 
 WireID (unsigned short iCLayer, unsigned short iWire)
 Constructor using continuous layer numbers as used in the geometry build-up for the simulation. More...
 
WireIDoperator= (const WireID &wireID)
 Assignment operator.
 
WireIDoperator= (unsigned short eWire)
 Assignment from unsigned short. More...
 
 operator unsigned short () const
 Convert to unsigned short.
 
bool operator== (const WireID &rhs) const
 Check for equality.
 
bool operator< (const WireID &rhs) const
 Order by unique id.
 
void setWireID (unsigned short iSuperLayer, unsigned short iLayer, unsigned short iWire)
 Setter using official numbering.
 
void setWireID (unsigned short iCLayer, unsigned short iWire)
 Setter using numbering of geometry build-up.
 
void setWireID (unsigned short eWire)
 Setter using the encoded wire number.
 
unsigned short getISuperLayer () const
 Getter for Super-Layer.
 
unsigned short getILayer () const
 Getter for layer within the Super-Layer.
 
unsigned short getIWire () const
 Getter for wire within the layer. More...
 
unsigned short getICLayer () const
 Getter for continuous layer numbering.
 
unsigned short getEWire () const
 Getter for encoded wire number.
 

Private Member Functions

 ClassDef (WireID, 2)
 ROOT Macro.
 

Private Attributes

unsigned short m_eWire
 Internal storage for the wire identifier in the encoded form.
 

Detailed Description

Class to identify a wire inside the CDC.

There are three representations for this:

  • Super-Layer, Layer within the Super-Layer, Wire within the Layer as documented here,
  • Layer as continuous counted through all Super-Layers, Wire within the Layer,
  • Wire number encoded into a single unsigned short. This works as following:
    SuperLayer: bits 1 - 4 (/4096)
    Layer: bits 5 - 7 (% 4096, / 512)
    Wire: bits 8 - 16 (% 512)
    Note: These operations could as well be achieved by bit-shifting operations.

Definition at line 34 of file WireID.h.

Constructor & Destructor Documentation

◆ WireID() [1/3]

WireID ( unsigned short  eWire = 65535)
inlineexplicit

Constructor taking the encoded wire number.

Parameters
eWireNumber of wire using the encoded format. Careful - wires are not continuously within the encoded number. The default is set to the maximum allowed value, as 0 corresponds already to some wire. This assigned value does NOT correspond to any real wire.

Definition at line 45 of file WireID.h.

46  {
47  m_eWire = eWire;
48  }
unsigned short m_eWire
Internal storage for the wire identifier in the encoded form.
Definition: WireID.h:161

◆ WireID() [2/3]

WireID ( unsigned short  iSuperLayer,
unsigned short  iLayer,
unsigned short  iWire 
)

Constructor using the official numbering scheme.

Parameters
iSuperLayerNumber of Super-Layer.
iLayerNumber of Layer within the Super-Layer.
iWireWire number within the layer.

Definition at line 35 of file WireID.cc.

36 {
37  setWireID(iSuperLayer, iLayer, iWire);
38 }
void setWireID(unsigned short iSuperLayer, unsigned short iLayer, unsigned short iWire)
Setter using official numbering.
Definition: WireID.h:112

◆ WireID() [3/3]

WireID ( unsigned short  iCLayer,
unsigned short  iWire 
)

Constructor using continuous layer numbers as used in the geometry build-up for the simulation.

Parameters
iCLayerNumber of Layer counted continuously over the full CDC.
iWireNumber of Wire within the layer equivalenty to the official numbering.

Definition at line 30 of file WireID.cc.

Member Function Documentation

◆ getIWire()

unsigned short getIWire ( ) const
inline

Getter for wire within the layer.

This getter works for the official numbering scheme as well as the one used in the geometry build-up.

Definition at line 145 of file WireID.h.

◆ operator=()

WireID& operator= ( unsigned short  eWire)
inline

Assignment from unsigned short.

Parameters
eWireThis parameter should be the wire number in the encoded format.

Definition at line 85 of file WireID.h.


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