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

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

#include <SVDClusterTimeShifter.h>

Inheritance diagram for SVDClusterTimeShifter:
Collaboration 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. More...
 
void setClusterTimeShift (const TString &alg, const TString &sensorType, const std::vector< Double_t > &shiftValues)
 Sets the cluster time shift in ns. More...
 
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. More...
 

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.

Member Function Documentation

◆ 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  };
std::map< TString, std::map< TString, std::vector< Double_t > > > m_svdClusterTimeShift
cluster time shifts
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.

◆ 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.


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