Belle II Software development
ISuperLayerUtil Struct Reference

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

#include <ISuperLayer.h>

Public Member Functions

 ISuperLayerUtil ()=delete
 Utility classes should not be instantiated.
 

Static Public Member Functions

static bool isInvalid (ISuperLayer iSuperLayer)
 Indicates if the given number corresponds to a true cdc superlayer - excludes the logic ids for inner and outer volume.
 
static bool isInCDC (ISuperLayer iSuperLayer)
 Indicates if the given number corresponds to a true cdc superlayer - excludes the logic ids for inner and outer volume.
 
static bool isLogical (ISuperLayer iSuperLayer)
 Indicates if the given number corresponds to a logical superlayer - includes the logic ids for inner and outer volume.
 
static bool isInnerVolume (ISuperLayer iSuperLayer)
 Indicates if the given number corresponds to the logical superlayer of the column inside the CDC.
 
static bool isOuterVolume (ISuperLayer iSuperLayer)
 Indicates if the given number corresponds to the logical superlayer of the volume outside the CDC.
 
static bool isAxial (ISuperLayer iSuperLayer)
 Returns if the super layer with the given id is axial.
 
static EStereoKind getStereoKind (ISuperLayer iSuperLayer)
 Returns the stereo kind of the super layer.
 
static ISuperLayer getNextInwards (ISuperLayer iSuperLayer)
 Returns the super layer that is inside of the given super layer.
 
static ISuperLayer getNextOutwards (ISuperLayer iSuperLayer)
 Returns the super layer that is outside of the given super layer.
 
template<class T >
static ISuperLayer getFrom (const T &t)
 Returns the superlayer of an object.
 

Static Public Attributes

static const ISuperLayer c_N = 9
 Constant representing the total number of cdc superlayers.
 
static const ISuperLayer c_InnerVolume = -1
 Constant marking the subdetectors closer to the IP than the CDC.
 
static const ISuperLayer c_OuterVolume = 9
 Constant marking the subdetectors further away from the IP than the CDC.
 
static const ISuperLayer c_Invalid = SHRT_MIN
 Constant making an invalid superlayer id.
 

Detailed Description

This is a utility class for the free ISuperLayer type.

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

Definition at line 50 of file ISuperLayer.h.

Member Function Documentation

◆ getFrom()

static ISuperLayer getFrom ( const T &  t)
inlinestatic

Returns the superlayer of an object.

Definition at line 102 of file ISuperLayer.h.

103 {
104 return GetISuperLayer()(t);
105 }

◆ getNextInwards()

ISuperLayer getNextInwards ( ISuperLayer  iSuperLayer)
static

Returns the super layer that is inside of the given super layer.

Return c_Invalid for the inner volume and for invalid super layers

Definition at line 63 of file ISuperLayer.cc.

64{
65 if (isInvalid(iSuperLayer) or isInnerVolume(iSuperLayer)) {
66 return c_Invalid;
67 } else {
68 return iSuperLayer - 1;
69 }
70}
static const ISuperLayer c_Invalid
Constant making an invalid superlayer id.
Definition: ISuperLayer.h:65
static bool isInvalid(ISuperLayer iSuperLayer)
Indicates if the given number corresponds to a true cdc superlayer - excludes the logic ids for inner...
Definition: ISuperLayer.cc:38
static bool isInnerVolume(ISuperLayer iSuperLayer)
Indicates if the given number corresponds to the logical superlayer of the column inside the CDC.
Definition: ISuperLayer.cc:53

◆ getNextOutwards()

ISuperLayer getNextOutwards ( ISuperLayer  iSuperLayer)
static

Returns the super layer that is outside of the given super layer.

Return c_Invalid for the outer volume and for invalid super layers

Definition at line 72 of file ISuperLayer.cc.

73{
74 if (isInvalid(iSuperLayer) or isOuterVolume(iSuperLayer)) {
75 return c_Invalid;
76 } else {
77 return iSuperLayer + 1;
78 }
79}
static bool isOuterVolume(ISuperLayer iSuperLayer)
Indicates if the given number corresponds to the logical superlayer of the volume outside the CDC.
Definition: ISuperLayer.cc:58

◆ getStereoKind()

EStereoKind getStereoKind ( ISuperLayer  iSuperLayer)
static

Returns the stereo kind of the super layer.

Definition at line 26 of file ISuperLayer.cc.

27{
28 if (not isInCDC(iSuperLayer)) return EStereoKind::c_Invalid;
29 if (isAxial(iSuperLayer)) {
30 return EStereoKind::c_Axial;
31 } else if ((iSuperLayer % 4) == 1) {
32 return EStereoKind::c_StereoU;
33 } else {
34 return EStereoKind::c_StereoV;
35 }
36}
static bool isAxial(ISuperLayer iSuperLayer)
Returns if the super layer with the given id is axial.
Definition: ISuperLayer.cc:21
static bool isInCDC(ISuperLayer iSuperLayer)
Indicates if the given number corresponds to a true cdc superlayer - excludes the logic ids for inner...
Definition: ISuperLayer.cc:43

◆ isAxial()

bool isAxial ( ISuperLayer  iSuperLayer)
static

Returns if the super layer with the given id is axial.

Definition at line 21 of file ISuperLayer.cc.

22{
23 return isInCDC(iSuperLayer) and (iSuperLayer % 2) == 0;
24}

◆ isInCDC()

bool isInCDC ( ISuperLayer  iSuperLayer)
static

Indicates if the given number corresponds to a true cdc superlayer - excludes the logic ids for inner and outer volume.

Definition at line 43 of file ISuperLayer.cc.

44{
45 return 0 <= iSuperLayer and iSuperLayer < c_N;
46}
static const ISuperLayer c_N
Constant representing the total number of cdc superlayers.
Definition: ISuperLayer.h:56

◆ isInnerVolume()

bool isInnerVolume ( ISuperLayer  iSuperLayer)
static

Indicates if the given number corresponds to the logical superlayer of the column inside the CDC.

Definition at line 53 of file ISuperLayer.cc.

54{
55 return c_InnerVolume == iSuperLayer;
56}
static const ISuperLayer c_InnerVolume
Constant marking the subdetectors closer to the IP than the CDC.
Definition: ISuperLayer.h:59

◆ isInvalid()

bool isInvalid ( ISuperLayer  iSuperLayer)
static

Indicates if the given number corresponds to a true cdc superlayer - excludes the logic ids for inner and outer volume.

Definition at line 38 of file ISuperLayer.cc.

39{
40 return not isLogical(iSuperLayer);
41}
static bool isLogical(ISuperLayer iSuperLayer)
Indicates if the given number corresponds to a logical superlayer - includes the logic ids for inner ...
Definition: ISuperLayer.cc:48

◆ isLogical()

bool isLogical ( ISuperLayer  iSuperLayer)
static

Indicates if the given number corresponds to a logical superlayer - includes the logic ids for inner and outer volume.

Definition at line 48 of file ISuperLayer.cc.

49{
50 return c_InnerVolume <= iSuperLayer and iSuperLayer <= c_OuterVolume;
51}
static const ISuperLayer c_OuterVolume
Constant marking the subdetectors further away from the IP than the CDC.
Definition: ISuperLayer.h:62

◆ isOuterVolume()

bool isOuterVolume ( ISuperLayer  iSuperLayer)
static

Indicates if the given number corresponds to the logical superlayer of the volume outside the CDC.

Definition at line 58 of file ISuperLayer.cc.

59{
60 return c_OuterVolume == iSuperLayer;
61}

Member Data Documentation

◆ c_InnerVolume

const ISuperLayer c_InnerVolume = -1
static

Constant marking the subdetectors closer to the IP than the CDC.

Definition at line 59 of file ISuperLayer.h.

◆ c_Invalid

const ISuperLayer c_Invalid = SHRT_MIN
static

Constant making an invalid superlayer id.

Definition at line 65 of file ISuperLayer.h.

◆ c_N

const ISuperLayer c_N = 9
static

Constant representing the total number of cdc superlayers.

Definition at line 56 of file ISuperLayer.h.

◆ c_OuterVolume

const ISuperLayer c_OuterVolume = 9
static

Constant marking the subdetectors further away from the IP than the CDC.

Definition at line 62 of file ISuperLayer.h.


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