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

Calibration constants of a single ASIC window: pedestals. More...

#include <TOPASICPedestals.h>

Inheritance diagram for TOPASICPedestals:
Collaboration diagram for TOPASICPedestals:

Public Types

enum  {
  c_WindowSize = 64 ,
  c_Bits = 9
}
 Various constants. More...
 

Public Member Functions

 TOPASICPedestals ()
 Default constructor.
 
 TOPASICPedestals (unsigned short asicWindow)
 Constructor with ASIC window number. More...
 
int setPedestals (const TProfile *profile, double average=0)
 Set pedestals from profile histogram with c_WindowSize bins. More...
 
unsigned getASICWindow () const
 Return ASIC window number. More...
 
unsigned getSize () const
 Return window size (number of pedestal samples) More...
 
float getValue (unsigned i) const
 Return pedestal value of i-th sample. More...
 
float getError (unsigned i) const
 Return pedestal uncertainly of i-th sample. More...
 
bool isValid (unsigned i) const
 Check whether the pedestal of i-th sample is valid. More...
 
unsigned getNumofUnvalid () const
 Return number of un-valid pedestals (e.g. More...
 

Private Member Functions

unsigned getOptimizedOffset (const std::vector< unsigned > &values, const std::vector< unsigned > &errors, unsigned maxDif, unsigned maxErr)
 Return the offset that can allow for the maximal number of good pedestal samples. More...
 
 ClassDef (TOPASICPedestals, 1)
 ClassDef.
 

Private Attributes

unsigned short m_asicWindow
 ASIC window number.
 
unsigned short m_offset
 common pedestal offset
 
unsigned short m_pedestals [c_WindowSize]
 pedestals (packed: value, error)
 

Detailed Description

Calibration constants of a single ASIC window: pedestals.

Definition at line 24 of file TOPASICPedestals.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Various constants.

Enumerator
c_WindowSize 

number of samples

c_Bits 

number of bits reserved for pedestal value

Definition at line 30 of file TOPASICPedestals.h.

30  {c_WindowSize = 64,
31  c_Bits = 9
32  };
@ c_Bits
number of bits reserved for pedestal value
@ c_WindowSize
number of samples

Constructor & Destructor Documentation

◆ TOPASICPedestals()

TOPASICPedestals ( unsigned short  asicWindow)
inlineexplicit

Constructor with ASIC window number.

Parameters
asicWindowASIC window number

Definition at line 46 of file TOPASICPedestals.h.

Member Function Documentation

◆ getASICWindow()

unsigned getASICWindow ( ) const
inline

Return ASIC window number.

Returns
window number

Definition at line 64 of file TOPASICPedestals.h.

◆ getError()

float getError ( unsigned  i) const
inline

Return pedestal uncertainly of i-th sample.

Parameters
isample number
Returns
pedestal uncertainty

Definition at line 92 of file TOPASICPedestals.h.

◆ getNumofUnvalid()

unsigned getNumofUnvalid ( ) const
inline

Return number of un-valid pedestals (e.g.

those cannot be packed into 16-bit word)

Returns
number of un-valid pedestals

Definition at line 118 of file TOPASICPedestals.h.

◆ getSize()

unsigned getSize ( ) const
inline

Return window size (number of pedestal samples)

Returns
window size

Definition at line 70 of file TOPASICPedestals.h.

◆ getValue()

float getValue ( unsigned  i) const
inline

Return pedestal value of i-th sample.

Parameters
isample number
Returns
pedestal value

Definition at line 77 of file TOPASICPedestals.h.

◆ isValid()

bool isValid ( unsigned  i) const
inline

Check whether the pedestal of i-th sample is valid.

Parameters
isample number
Returns
true if available

Definition at line 105 of file TOPASICPedestals.h.


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