Belle II Software development
TOPNominalTDC Class Reference

Nominal time-to-digit conversion parameters (simplified model) More...

#include <TOPNominalTDC.h>

Inheritance diagram for TOPNominalTDC:
TOPGeoBase

Public Types

enum  {
  c_WindowSize = 64 ,
  c_syncWindows = 2
}
 Various constants. More...
 

Public Member Functions

 TOPNominalTDC ()
 Default constructor.
 
 TOPNominalTDC (int numWindows, int subBits, double syncTimeBase, int numofBunches, double offset, double pileupTime, double doubleHitResolution, double timeJitter, double efficiency, const std::string &name="TOPNominalTDC")
 Useful constructor (new xml file version)
 
 TOPNominalTDC (unsigned numBits, double binWidth, double offset, double pileupTime, double doubleHitResolution, double timeJitter, double efficiency, const std::string &name="TOPNominalTDCold")
 Useful constructor (old xml file version)
 
void setADCBits (unsigned adcBits)
 Sets the number of ADC bits.
 
void setAveragePedestal (int averagePedestal)
 Sets average of pedestals.
 
unsigned getADCBits () const
 Returns the number of ADC bits.
 
unsigned getADCRange () const
 Returns ADC range.
 
int getAveragePedestal () const
 Returns average of pedestals.
 
unsigned getNumWindows () const
 Returns number of ASIC windows per waveform.
 
unsigned getSubBits () const
 Returns number of bits per sample.
 
double getSyncTimeBase () const
 Returns synchonization time base (time width of c_syncWindows)
 
unsigned getNumofBunches () const
 Returns number of bunches in the synchonization time base.
 
double getBunchSeparationTime () const
 Returns bunch separation time (e.g.
 
double getOffset () const
 Returns time offset.
 
double getPileupTime () const
 Returns pile-up time.
 
double getDoubleHitResolution () const
 Returns double hit resolution time.
 
double getTimeJitter () const
 Returns r.m.s.
 
double getEfficiency () const
 Returns electronic efficiency.
 
unsigned getNumBits () const
 Returns number of bits.
 
double getBinWidth () const
 Returns time width of a TDC bin.
 
double getSampleWidth () const
 Returns time difference between two samples.
 
int getOverflowValue () const
 Returns TDC overflow value.
 
double getTime (int TDC) const
 Convert TDC count to time.
 
double getTimeMin () const
 Returns time range lower limit.
 
double getTimeMax () const
 Returns time range upper limit.
 
int getTDCcount (double time) const
 Converts time to TDC count.
 
int getSample (double time) const
 Converts time to sample number.
 
double getSampleTime (int sample) const
 Converts sample number to time.
 
bool isSampleValid (int sample) const
 Check for the validity of sample number.
 
bool isConsistent () const override
 Check for consistency of data members.
 
void print (const std::string &title="Nominal time-to-digit conversion parameters") const override
 Print the content of the class.
 
void setName (const std::string &name)
 Sets object name.
 
const std::string & getName () const
 Returns object name.
 
virtual void printSurface (const GeoOpticalSurface &surface) const
 Print the content of optical surface.
 
double getReflectivity (const GeoOpticalSurface &surface, double energy) const
 Returns reflectivity of optical surface at given photon energy.
 

Protected Member Functions

void printUnderlined (const std::string &title) const
 Print the content of the class.
 
 ClassDef (TOPGeoBase, 1)
 ClassDef.
 

Protected Attributes

std::string m_name
 geometry object name
 

Static Protected Attributes

static double s_unit = Unit::cm
 conversion unit for length
 
static std::string s_unitName
 conversion unit name
 

Private Member Functions

 ClassDefOverride (TOPNominalTDC, 3)
 ClassDef.
 

Private Attributes

unsigned m_numWindows = 0
 number of ASIC windows per waveform
 
unsigned m_subBits = 0
 number of bits per sample
 
float m_syncTimeBase = 0
 time width of c_syncWindows
 
unsigned m_numofBunches = 0
 number of bunches per syncTimeBase
 
float m_offset = 0
 time offset
 
float m_pileupTime = 0
 pile-up time
 
float m_doubleHitResolution = 0
 double hit resolution time
 
float m_timeJitter = 0
 r.m.s.
 
float m_efficiency = 0
 electronic efficiency (fract.
 
unsigned m_numBits = 0
 number of bits
 
float m_binWidth = 0
 time width of a TDC bin
 
float m_sampleWidth = 0
 time between two samples
 
unsigned m_adcBits = 12
 number of ADC bits
 
int m_averagePedestal = 0
 average of pedestals [ADC bins]
 

Detailed Description

Nominal time-to-digit conversion parameters (simplified model)

Definition at line 22 of file TOPNominalTDC.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Various constants.

Enumerator
c_WindowSize 

number of samples per ASIC window

c_syncWindows 

number of windows corresponding to syncTimeBase

Definition at line 28 of file TOPNominalTDC.h.

28 {c_WindowSize = 64,
29 c_syncWindows = 2
30 };
@ c_syncWindows
number of windows corresponding to syncTimeBase
Definition: TOPNominalTDC.h:29
@ c_WindowSize
number of samples per ASIC window
Definition: TOPNominalTDC.h:28

Constructor & Destructor Documentation

◆ TOPNominalTDC() [1/2]

TOPNominalTDC ( )
inline

Default constructor.

Definition at line 35 of file TOPNominalTDC.h.

36 {}

◆ TOPNominalTDC() [2/2]

TOPNominalTDC ( unsigned  numBits,
double  binWidth,
double  offset,
double  pileupTime,
double  doubleHitResolution,
double  timeJitter,
double  efficiency,
const std::string &  name = "TOPNominalTDCold" 
)
inline

Useful constructor (old xml file version)

Parameters
numBitsnumber of bits
binWidthtime width of a TDC bin
offsettime offset
pileupTimepile-up time
doubleHitResolutiondouble hit resolution time
timeJitterr.m.s. of time jitter
efficiencyelectronic efficiency (fraction of hits above threshold)
nameobject name

Definition at line 73 of file TOPNominalTDC.h.

80 :
81 TOPGeoBase(name),
82 m_offset(offset),
83 m_pileupTime(pileupTime),
84 m_doubleHitResolution(doubleHitResolution),
85 m_timeJitter(timeJitter),
86 m_efficiency(efficiency),
87 m_numBits(numBits),
88 m_binWidth(binWidth),
89 m_sampleWidth(binWidth)
90 {}
TOPGeoBase()
Default constructor.
Definition: TOPGeoBase.h:31
float m_efficiency
electronic efficiency (fract.
unsigned m_numBits
number of bits
float m_offset
time offset
float m_pileupTime
pile-up time
float m_doubleHitResolution
double hit resolution time
float m_timeJitter
r.m.s.
float m_sampleWidth
time between two samples
float m_binWidth
time width of a TDC bin

Member Function Documentation

◆ getADCBits()

unsigned getADCBits ( ) const
inline

Returns the number of ADC bits.

Returns
number of ADC bits

Definition at line 108 of file TOPNominalTDC.h.

108{return m_adcBits;}
unsigned m_adcBits
number of ADC bits

◆ getADCRange()

unsigned getADCRange ( ) const
inline

Returns ADC range.

Returns
overflow value

Definition at line 114 of file TOPNominalTDC.h.

114{return 1 << m_adcBits;}

◆ getAveragePedestal()

int getAveragePedestal ( ) const
inline

Returns average of pedestals.

Returns
average of pedestals

Definition at line 120 of file TOPNominalTDC.h.

120{return m_averagePedestal;}
int m_averagePedestal
average of pedestals [ADC bins]

◆ getBinWidth()

double getBinWidth ( ) const
inline

Returns time width of a TDC bin.

Returns
time width of a TDC bin

Definition at line 191 of file TOPNominalTDC.h.

191{return m_binWidth;}

◆ getBunchSeparationTime()

double getBunchSeparationTime ( ) const
inline

Returns bunch separation time (e.g.

RF cycle - empty bunches are included!)

Returns
bunch separation time

Definition at line 149 of file TOPNominalTDC.h.

float m_syncTimeBase
time width of c_syncWindows
unsigned m_numofBunches
number of bunches per syncTimeBase

◆ getDoubleHitResolution()

double getDoubleHitResolution ( ) const
inline

Returns double hit resolution time.

Returns
double hit resolution time

Definition at line 167 of file TOPNominalTDC.h.

167{return m_doubleHitResolution;}

◆ getEfficiency()

double getEfficiency ( ) const
inline

Returns electronic efficiency.

Returns
electronic efficiency

Definition at line 179 of file TOPNominalTDC.h.

179{return m_efficiency;}

◆ getName()

const std::string & getName ( ) const
inlineinherited

Returns object name.

Returns
object name

Definition at line 51 of file TOPGeoBase.h.

51{return m_name;}
std::string m_name
geometry object name
Definition: TOPGeoBase.h:89

◆ getNumBits()

unsigned getNumBits ( ) const
inline

Returns number of bits.

Returns
number of bits

Definition at line 185 of file TOPNominalTDC.h.

185{return m_numBits;}

◆ getNumofBunches()

unsigned getNumofBunches ( ) const
inline

Returns number of bunches in the synchonization time base.

Returns
number of bunches

Definition at line 143 of file TOPNominalTDC.h.

143{return m_numofBunches;}

◆ getNumWindows()

unsigned getNumWindows ( ) const
inline

Returns number of ASIC windows per waveform.

Returns
number of ASIC windows per waveform

Definition at line 126 of file TOPNominalTDC.h.

126{return m_numWindows;}
unsigned m_numWindows
number of ASIC windows per waveform

◆ getOffset()

double getOffset ( ) const
inline

Returns time offset.

Returns
time offset

Definition at line 155 of file TOPNominalTDC.h.

155{return m_offset;}

◆ getOverflowValue()

int getOverflowValue ( ) const
inline

Returns TDC overflow value.

Returns
overflow value

Definition at line 203 of file TOPNominalTDC.h.

203{return 1 << m_numBits;}

◆ getPileupTime()

double getPileupTime ( ) const
inline

Returns pile-up time.

Returns
pile-up time

Definition at line 161 of file TOPNominalTDC.h.

161{return m_pileupTime;}

◆ getSampleTime()

double getSampleTime ( int  sample) const
inline

Converts sample number to time.

Parameters
samplesample number
Returns
time [ns]

Definition at line 245 of file TOPNominalTDC.h.

245{return sample * m_sampleWidth - m_offset;}

◆ getSampleWidth()

double getSampleWidth ( ) const
inline

Returns time difference between two samples.

Returns
time between two samples

Definition at line 197 of file TOPNominalTDC.h.

197{return m_sampleWidth;}

◆ getSubBits()

unsigned getSubBits ( ) const
inline

Returns number of bits per sample.

Returns
number of bits per sample

Definition at line 131 of file TOPNominalTDC.h.

131{return m_subBits;}
unsigned m_subBits
number of bits per sample

◆ getSyncTimeBase()

double getSyncTimeBase ( ) const
inline

Returns synchonization time base (time width of c_syncWindows)

Returns
synchonization time base

Definition at line 137 of file TOPNominalTDC.h.

137{return m_syncTimeBase;}

◆ getTime()

double getTime ( int  TDC) const
inline

Convert TDC count to time.

Parameters
TDCTDC count
Returns
time [ns]

Definition at line 210 of file TOPNominalTDC.h.

210{return (TDC + 0.5) * m_binWidth - m_offset;}

◆ getTimeJitter()

double getTimeJitter ( ) const
inline

Returns r.m.s.

of time jitter

Returns
r.m.s. of time jitter

Definition at line 173 of file TOPNominalTDC.h.

173{return m_timeJitter;}

◆ getTimeMax()

double getTimeMax ( ) const
inline

Returns time range upper limit.

Returns
upper limit

Definition at line 222 of file TOPNominalTDC.h.

int getOverflowValue() const
Returns TDC overflow value.

◆ getTimeMin()

double getTimeMin ( ) const
inline

Returns time range lower limit.

Returns
lower limit

Definition at line 216 of file TOPNominalTDC.h.

216{return -m_offset;}

◆ setADCBits()

void setADCBits ( unsigned  adcBits)
inline

Sets the number of ADC bits.

Parameters
adcBitsnumber of adcBits

Definition at line 96 of file TOPNominalTDC.h.

96{m_adcBits = adcBits;}

◆ setAveragePedestal()

void setAveragePedestal ( int  averagePedestal)
inline

Sets average of pedestals.

Parameters
averagePedestalaverage pedestal value

Definition at line 102 of file TOPNominalTDC.h.

102{m_averagePedestal = averagePedestal;}

◆ setName()

void setName ( const std::string &  name)
inlineinherited

Sets object name.

Parameters
nameobject name

Definition at line 45 of file TOPGeoBase.h.

45{m_name = name;}

Member Data Documentation

◆ m_adcBits

unsigned m_adcBits = 12
private

number of ADC bits

Definition at line 283 of file TOPNominalTDC.h.

◆ m_averagePedestal

int m_averagePedestal = 0
private

average of pedestals [ADC bins]

Definition at line 284 of file TOPNominalTDC.h.

◆ m_binWidth

float m_binWidth = 0
private

time width of a TDC bin

Definition at line 280 of file TOPNominalTDC.h.

◆ m_doubleHitResolution

float m_doubleHitResolution = 0
private

double hit resolution time

Definition at line 275 of file TOPNominalTDC.h.

◆ m_efficiency

float m_efficiency = 0
private

electronic efficiency (fract.

of hits above threshold)

Definition at line 277 of file TOPNominalTDC.h.

◆ m_name

std::string m_name
protectedinherited

geometry object name

Definition at line 89 of file TOPGeoBase.h.

◆ m_numBits

unsigned m_numBits = 0
private

number of bits

Definition at line 279 of file TOPNominalTDC.h.

◆ m_numofBunches

unsigned m_numofBunches = 0
private

number of bunches per syncTimeBase

Definition at line 272 of file TOPNominalTDC.h.

◆ m_numWindows

unsigned m_numWindows = 0
private

number of ASIC windows per waveform

Definition at line 269 of file TOPNominalTDC.h.

◆ m_offset

float m_offset = 0
private

time offset

Definition at line 273 of file TOPNominalTDC.h.

◆ m_pileupTime

float m_pileupTime = 0
private

pile-up time

Definition at line 274 of file TOPNominalTDC.h.

◆ m_sampleWidth

float m_sampleWidth = 0
private

time between two samples

Definition at line 281 of file TOPNominalTDC.h.

◆ m_subBits

unsigned m_subBits = 0
private

number of bits per sample

Definition at line 270 of file TOPNominalTDC.h.

◆ m_syncTimeBase

float m_syncTimeBase = 0
private

time width of c_syncWindows

Definition at line 271 of file TOPNominalTDC.h.

◆ m_timeJitter

float m_timeJitter = 0
private

r.m.s.

of time jitter

Definition at line 276 of file TOPNominalTDC.h.


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