Belle II Software  release-08-01-10
SVDCalibrationsBase< T > Class Template Reference

base class for calibrations classes More...

#include <SVDCalibrationsBase.h>

Inheritance diagram for SVDCalibrationsBase< T >:
Collaboration diagram for SVDCalibrationsBase< T >:

Public Types

enum  E_side {
  Vindex = 0 ,
  Uindex = 1
}
 This enumeration assure the same semantic of the isU methods defined by Peter Kv.
 
typedef T t_perSideContainer
 typedef of the container of each side
 

Public Member Functions

 SVDCalibrationsBase (typename T::calibrationType defaultT=typename T::calibrationType(), const TString &uniqueID="")
 The default constructor initialize all the vectors.
 
 ~SVDCalibrationsBase ()
 Simple destructor.
 
T::calibrationType get (unsigned int layer, unsigned int ladder, unsigned int sensor, unsigned int side, unsigned int strip) const
 Return the calibration associated to a given strip. More...
 
const T::calibrationType & getReference (unsigned int layer, unsigned int ladder, unsigned int sensor, unsigned int side, unsigned int strip) const
 Return a reference to the calibration associated to a given strip. More...
 
TString get_uniqueID () const
 Get the unique ID of the calibration.
 
void set (unsigned int layer, unsigned int ladder, unsigned int sensor, unsigned int side, unsigned int strip, typename T::calibrationType value)
 Set the calibration associated to a given strip. More...
 
E_side sideIndex (bool isU) const
 Return the array index of the side. More...
 

Private Types

typedef std::vector< typename T::payloadContainerType > SVDSensor
 T::payloadContainerType can be a vector whose length is the number of strips per side or a list of defect on a given side This vector will have length 2. More...
 
typedef std::vector< SVDSensorSVDLadder
 An SVDLadder is a vector of SVDSensors.
 
typedef std::vector< SVDLadderSVDLayer
 An SVDLayer is a vector of SVDLadders.
 
typedef std::vector< SVDLayerSVD
 The SVD is a vector of SVDLayers.
 

Private Attributes

SVD calibrations
 an SVD calibration
 
TString m_uniqueID
 The unique identifier is a private member of SVDCalibrationsBase, whose value is assigned in the constructor.
 

Detailed Description

template<class T>
class Belle2::SVDCalibrationsBase< T >

base class for calibrations classes

Definition at line 24 of file SVDCalibrationsBase.h.

Member Typedef Documentation

◆ SVDSensor

typedef std::vector< typename T::payloadContainerType > SVDSensor
private

T::payloadContainerType can be a vector whose length is the number of strips per side or a list of defect on a given side This vector will have length 2.

Index 0 for the V side, index 1 for the U side Please, please, pleaseeeee use SVDCalibrationBase<...>::UIndex and SVDCalibrationBase<...>::VIndex instead of 1 and 0 for better code readibility

Definition at line 34 of file SVDCalibrationsBase.h.

Member Function Documentation

◆ get()

T::calibrationType get ( unsigned int  layer,
unsigned int  ladder,
unsigned int  sensor,
unsigned int  side,
unsigned int  strip 
) const
inline

Return the calibration associated to a given strip.

Return the calibration associated to a given strip identified by:

Parameters
layeris the layer number (2 to 6 in the present geometry)
ladderis the ladder number ( 1 to 7 for layer 3, 1 to 10 for layer 4 etc...)
sensoris the sensor number ( 1 to 2 for layer 3, 1 to 3 for layer 4 etc...)
sideis the sensor view: 1 for Side U ( Side P ), 0 for side V (Side N)
stripis the strip number: from 1 to 512 or 768 depending on the sensor it throws std::out_of_range if the strip is unknown

Definition at line 94 of file SVDCalibrationsBase.h.

99  {
100  if (calibrations.size() <= layer) {
101  B2FATAL("Layers vector is smaller than " << layer);
102  }
103  const auto& ladders = calibrations[layer];
104  if (ladders.size() <= ladder) {
105  B2FATAL("Ladders vector is smaller than " << ladder);
106  }
107  const auto& sensors = ladders[ladder];
108  if (sensors.size() <= sensor) {
109  B2FATAL("Sensors vector is smaller than " << sensor);
110  }
111  const auto& sides = sensors[sensor];
112  if (sides.size() <= side) {
113  B2FATAL("Sides vector is smaller than " << side);
114  }
115 
116  return T::get(sides[side], strip);
117  }
SVD calibrations
an SVD calibration

◆ getReference()

const T::calibrationType& getReference ( unsigned int  layer,
unsigned int  ladder,
unsigned int  sensor,
unsigned int  side,
unsigned int  strip 
) const
inline

Return a reference to the calibration associated to a given strip.

Return a reference to the calibration associated to a given strip identified by:

Parameters
layeris the layer number (2 to 6 in the present geometry)
ladderis the ladder number ( 1 to 7 for layer 3, 1 to 10 for layer 4 etc...)
sensoris the sensor number ( 1 to 2 for layer 3, 1 to 3 for layer 4 etc...)
sideis the sensor view: 1 for Side U ( Side P ), 0 for side V (Side N)
stripis the strip number: from 1 to 512 or 768 depending on the sensor it throws std::out_of_range if the strip is unknown

Definition at line 129 of file SVDCalibrationsBase.h.

◆ set()

void set ( unsigned int  layer,
unsigned int  ladder,
unsigned int  sensor,
unsigned int  side,
unsigned int  strip,
typename T::calibrationType  value 
)
inline

Set the calibration associated to a given strip.

Return the calibration associated to a given strip identified by:

Parameters
layeris the layer number (2 to 6 in the present geometry)
ladderis the ladder number ( 1 to 7 for layer 3, 1 to 10 for layer 4 etc...)
sensoris the sensor number ( 1 to 2 for layer 3, 1 to 3 for layer 4 etc...)
sideis the sensor view: 1 for Side U ( Side P ), 0 for side V (Side N)
stripis the strip number: from 1 to 512 or 768 depending on the sensor
valueit throws std::out_of_range if the strip is unknown

Definition at line 170 of file SVDCalibrationsBase.h.

◆ sideIndex()

E_side sideIndex ( bool  isU) const
inline

Return the array index of the side.

Parameters
isU

Definition at line 201 of file SVDCalibrationsBase.h.


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