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

Singleton class providing pre-constructed reconstruction objects. More...

#include <TOPRecoManager.h>

Collaboration diagram for TOPRecoManager:

Static Public Member Functions

static TOPRecoManagergetInstance ()
 Returns instance of the class. More...
 
static const InverseRaytracergetInverseRaytracer (int moduleID)
 Returns inverse ray-tracer of a given module. More...
 
static const FastRaytracergetFastRaytracer (int moduleID)
 Returns fast ray-tracer of a given module. More...
 
static const YScannergetYScanner (int moduleID)
 Returns y-scanner of a given module. More...
 
static const BackgroundPDFgetBackgroundPDF (int moduleID)
 Returns background PDF of a given module. More...
 
static const std::vector< BackgroundPDF > & getBackgroundPDFs ()
 Returns background PDF's of all modules. More...
 
static double getMinTime ()
 Returns time window lower edge. More...
 
static double getMaxTime ()
 Returns time window upper edge. More...
 
static double getTimeWindowSize ()
 Returns size of time window. More...
 
static void setTimeWindow (double minTime, double maxTime)
 Sets time window. More...
 
static void setDefaultTimeWindow ()
 Sets default time window (functions getMinTime(), getMaxTime() will then return default values from DB)
 
static void setChannelMask (const DBObjPtr< TOPCalChannelMask > &mask, const TOPAsicMask &asicMask)
 Sets channel masks. More...
 
static void setUncalibratedChannelsOff (const DBObjPtr< TOPCalChannelT0 > &channelT0)
 Sets uncalibrated channels off. More...
 
static void setUncalibratedChannelsOff (const DBObjPtr< TOPCalTimebase > &timebase)
 Sets uncalibrated channels off. More...
 
static void setChannelEffi ()
 Sets relative efficiencies of pixels.
 
static void setMirrorCenter (int moduleID, double xc, double yc)
 Sets the mirror center-of-curvature. More...
 

Private Member Functions

 TOPRecoManager ()=default
 Singleton: private constructor.
 
 TOPRecoManager (TOPRecoManager &)=delete
 Singleton: no copy constructor.
 
TOPRecoManageroperator= (const TOPRecoManager &)=delete
 Singleton: no assignment operator.
 
 ~TOPRecoManager ()=default
 Singleton: private destructor.
 
void set ()
 Sets the reconstruction object collections.
 
std::vector< InverseRaytracer > & inverseRaytracers ()
 Interface to inverse ray-tracers of all modules. More...
 
std::vector< FastRaytracer > & fastRaytracers ()
 Interface to fast ray-tracers of all modules. More...
 
std::vector< YScanner > & yScanners ()
 Interface to y-scanners of all modules. More...
 
std::vector< BackgroundPDF > & backgroundPDFs ()
 Interface to background PDF's of all modules. More...
 

Private Attributes

std::vector< InverseRaytracerm_inverseRaytracers
 collection of inverse raytracers
 
std::vector< FastRaytracerm_fastRaytracers
 collection of fast raytracers
 
std::vector< YScannerm_yScanners
 collection of y-scanners
 
std::vector< BackgroundPDFm_backgroundPDFs
 collection of background PDF's
 
double m_minTime = 0
 time window lower edge
 
double m_maxTime = 0
 time window upper edge
 
bool m_redoBkg = false
 flag to signal whether backgroundPDF has to be redone
 

Detailed Description

Singleton class providing pre-constructed reconstruction objects.

Definition at line 34 of file TOPRecoManager.h.

Member Function Documentation

◆ backgroundPDFs()

std::vector< BackgroundPDF > & backgroundPDFs ( )
inlineprivate

Interface to background PDF's of all modules.

Any accesses to underlying collection must be made with this method.

Returns
collection of background PDF's (index = moduleID - 1)

Definition at line 233 of file TOPRecoManager.h.

234  {
235  if (m_backgroundPDFs.empty()) set();
236  if (m_redoBkg) {
237  for (auto& pdf : m_backgroundPDFs) pdf.set();
238  m_redoBkg = false;
239  }
240  return m_backgroundPDFs;
241  }
std::vector< BackgroundPDF > m_backgroundPDFs
collection of background PDF's
void set()
Sets the reconstruction object collections.
bool m_redoBkg
flag to signal whether backgroundPDF has to be redone

◆ fastRaytracers()

std::vector< FastRaytracer > & fastRaytracers ( )
inlineprivate

Interface to fast ray-tracers of all modules.

Any accesses to underlying collection must be made with this method.

Returns
collection of fast ray-tracers (index = moduleID - 1)

Definition at line 221 of file TOPRecoManager.h.

◆ getBackgroundPDF()

const BackgroundPDF * getBackgroundPDF ( int  moduleID)
static

Returns background PDF of a given module.

Parameters
moduleIDslot ID (1-based)
Returns
pointer to background PDF or null pointer if moduleID is not valid

Definition at line 76 of file TOPRecoManager.cc.

77  {
78  const auto& collection = getInstance().backgroundPDFs();
79  unsigned k = moduleID - 1;
80  if (k < collection.size()) {
81  return &collection[k];
82  }
83 
84  B2ERROR("TOPRecoManager::getBackgroundPDF: invalid moduleID" << LogVar("moduleID", moduleID));
85  return 0;
86  }
std::vector< BackgroundPDF > & backgroundPDFs()
Interface to background PDF's of all modules.
static TOPRecoManager & getInstance()
Returns instance of the class.
Class to store variables with their name which were sent to the logging service.

◆ getBackgroundPDFs()

static const std::vector<BackgroundPDF>& getBackgroundPDFs ( )
inlinestatic

Returns background PDF's of all modules.

Returns
collection of background PDF's (index = moduleID - 1)

Definition at line 76 of file TOPRecoManager.h.

◆ getFastRaytracer()

const FastRaytracer * getFastRaytracer ( int  moduleID)
static

Returns fast ray-tracer of a given module.

Parameters
moduleIDslot ID (1-based)
Returns
pointer to fast ray-tracer or null pointer if moduleID is not valid

Definition at line 49 of file TOPRecoManager.cc.

◆ getInstance()

TOPRecoManager & getInstance ( )
static

Returns instance of the class.

Returns
class instance

Definition at line 19 of file TOPRecoManager.cc.

◆ getInverseRaytracer()

const InverseRaytracer * getInverseRaytracer ( int  moduleID)
static

Returns inverse ray-tracer of a given module.

Parameters
moduleIDslot ID (1-based)
Returns
pointer to inverse ray-tracer or null pointer if moduleID is not valid

Definition at line 36 of file TOPRecoManager.cc.

◆ getMaxTime()

static double getMaxTime ( )
inlinestatic

Returns time window upper edge.

Returns
time window upper edge

Definition at line 94 of file TOPRecoManager.h.

◆ getMinTime()

static double getMinTime ( )
inlinestatic

Returns time window lower edge.

Returns
time window lower edge

Definition at line 82 of file TOPRecoManager.h.

◆ getTimeWindowSize()

static double getTimeWindowSize ( )
inlinestatic

Returns size of time window.

Returns
size of time window

Definition at line 106 of file TOPRecoManager.h.

◆ getYScanner()

const YScanner * getYScanner ( int  moduleID)
static

Returns y-scanner of a given module.

Parameters
moduleIDslot ID (1-based)
Returns
pointer to y-scanner or null pointer if moduleID is not valid

Definition at line 62 of file TOPRecoManager.cc.

◆ inverseRaytracers()

std::vector< InverseRaytracer > & inverseRaytracers ( )
inlineprivate

Interface to inverse ray-tracers of all modules.

Any accesses to underlying collection must be made with this method.

Returns
collection of inverse ray-tracers (index = moduleID - 1)

Definition at line 215 of file TOPRecoManager.h.

◆ setChannelMask()

void setChannelMask ( const DBObjPtr< TOPCalChannelMask > &  mask,
const TOPAsicMask asicMask 
)
static

Sets channel masks.

Parameters
maskchannel mask
asicMaskmasked asics

Definition at line 88 of file TOPRecoManager.cc.

◆ setMirrorCenter()

void setMirrorCenter ( int  moduleID,
double  xc,
double  yc 
)
static

Sets the mirror center-of-curvature.

Parameters
moduleIDslot ID (1-based)
xccenter of curvature in x
yccenter of curvature in y

Definition at line 183 of file TOPRecoManager.cc.

◆ setTimeWindow()

static void setTimeWindow ( double  minTime,
double  maxTime 
)
inlinestatic

Sets time window.

Parameters
minTimelower edge
maxTimeupper edge

Definition at line 113 of file TOPRecoManager.h.

◆ setUncalibratedChannelsOff() [1/2]

void setUncalibratedChannelsOff ( const DBObjPtr< TOPCalChannelT0 > &  channelT0)
static

Sets uncalibrated channels off.

Parameters
channelT0channel T0 calibration

Definition at line 106 of file TOPRecoManager.cc.

◆ setUncalibratedChannelsOff() [2/2]

void setUncalibratedChannelsOff ( const DBObjPtr< TOPCalTimebase > &  timebase)
static

Sets uncalibrated channels off.

Parameters
timebasetimebase calibration

Definition at line 124 of file TOPRecoManager.cc.

◆ yScanners()

std::vector< YScanner > & yScanners ( )
inlineprivate

Interface to y-scanners of all modules.

Any accesses to underlying collection must be made with this method.

Returns
collection of y-scanners (index = moduleID - 1)

Definition at line 227 of file TOPRecoManager.h.


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