Belle II Software development
SVDClusterTimeShifter Class Reference

This class store the shift in svd time w.r.t. More...

#include <SVDClusterTimeShifter.h>

Inheritance diagram for SVDClusterTimeShifter:

Public Member Functions

 SVDClusterTimeShifter (const TString &uniqueID="")
 Default constructor.
 
Double_t getClusterTimeShift (const TString &alg, const int &layer, const int &sensor, const bool &isU, const int &size) const
 Returns cluster time shift in ns.
 
void setClusterTimeShift (const TString &alg, const TString &sensorType, const std::vector< Double_t > &shiftValues)
 Sets the cluster time shift in ns.
 
TString get_uniqueID () const
 Get the unique ID of the payload.
 

Static Public Attributes

static std::string name = std::string("SVDClusterTimeShifter")
 name of the payload
 

Protected Member Functions

TString getSensorType (const int &layer, const int &sensor, const bool &isU) const
 Returns the types of sensor grouping.
 

Private Member Functions

 ClassDef (SVDClusterTimeShifter, 1)
 needed by root
 

Private Attributes

TString m_uniqueID
 unique identifier of the SVD reconstruction configuration payload
 
std::map< TString, std::map< TString, std::vector< Double_t > > > m_svdClusterTimeShift
 cluster time shifts
 

Detailed Description

This class store the shift in svd time w.r.t.

cluster time also for any possible time algorithm. The shift value should be subtracted from the calibrated cluster time.

Definition at line 29 of file SVDClusterTimeShifter.h.

Constructor & Destructor Documentation

◆ SVDClusterTimeShifter()

SVDClusterTimeShifter ( const TString &  uniqueID = "")
inline

Default constructor.

Definition at line 34 of file SVDClusterTimeShifter.h.

35 : m_uniqueID(uniqueID)
36 {
38 };
TString m_uniqueID
unique identifier of the SVD reconstruction configuration payload
std::map< TString, std::map< TString, std::vector< Double_t > > > m_svdClusterTimeShift
cluster time shifts

Member Function Documentation

◆ get_uniqueID()

TString get_uniqueID ( ) const
inline

Get the unique ID of the payload.

Definition at line 86 of file SVDClusterTimeShifter.h.

86{return m_uniqueID;}

◆ getClusterTimeShift()

Double_t getClusterTimeShift ( const TString &  alg,
const int &  layer,
const int &  sensor,
const bool &  isU,
const int &  size 
) const
inline

Returns cluster time shift in ns.

Parameters
alg: Cluster time algorithm
layer: layer number
sensor: sensor number
isU: is U side?
size: Cluster size
Returns
double : value of the cluster time shift

Definition at line 49 of file SVDClusterTimeShifter.h.

52 {
53 if (auto searchAlg = m_svdClusterTimeShift.find(alg); // search for time alg
54 searchAlg != m_svdClusterTimeShift.end()) {
55 TString sensorType = getSensorType(layer, sensor, isU);
56 if (auto searchShift = (searchAlg->second).find(sensorType); // search for shift values
57 searchShift != (searchAlg->second).end()) {
58 int maxClusters = (searchShift->second).size();
59 if (maxClusters == 0)
60 return 0.;
61 else if (size > maxClusters)
62 return (searchShift->second)[maxClusters - 1];
63 else
64 return (searchShift->second)[size - 1];
65 }
66 }
67 return 0.; // returns zero if map is empty
68 };
TString getSensorType(const int &layer, const int &sensor, const bool &isU) const
Returns the types of sensor grouping.

◆ getSensorType()

TString getSensorType ( const int &  layer,
const int &  sensor,
const bool &  isU 
) const
inlineprotected

Returns the types of sensor grouping.

Parameters
layer: layer number
sensor: sensor number
isU: is U side?
Returns
TString : type of sensor group

Definition at line 100 of file SVDClusterTimeShifter.h.

101 {
102 return TString::Format("L%iS%iS%c", layer, sensor, (isU ? 'U' : 'V'));
103 };

◆ setClusterTimeShift()

void setClusterTimeShift ( const TString &  alg,
const TString &  sensorType,
const std::vector< Double_t > &  shiftValues 
)
inline

Sets the cluster time shift in ns.

Parameters
alg: Cluster time algorithm
sensorType: type of sensor group
shiftValues: vector of shift values to be set

Definition at line 76 of file SVDClusterTimeShifter.h.

78 {
79 B2INFO("Shift values for " << alg << " and " << sensorType << " is set.");
80 m_svdClusterTimeShift[alg][sensorType] = shiftValues;
81 };

Member Data Documentation

◆ m_svdClusterTimeShift

std::map<TString, std::map<TString, std::vector<Double_t> > > m_svdClusterTimeShift
private

cluster time shifts

Definition at line 111 of file SVDClusterTimeShifter.h.

◆ m_uniqueID

TString m_uniqueID
private

unique identifier of the SVD reconstruction configuration payload

Definition at line 108 of file SVDClusterTimeShifter.h.

◆ name

std::string name = std::string("SVDClusterTimeShifter")
static

name of the payload

Definition at line 89 of file SVDClusterTimeShifter.h.


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