 |
Belle II Software
release-05-02-19
|
13 #include <top/dataobjects/TOPSimHit.h>
14 #include <top/dataobjects/TOPDigit.h>
15 #include <top/dataobjects/TOPRawDigit.h>
16 #include <top/dataobjects/TOPRawWaveform.h>
17 #include <framework/datastore/StoreArray.h>
18 #include <top/dbobjects/TOPSampleTimes.h>
19 #include <top/dbobjects/TOPSignalShape.h>
20 #include <top/dbobjects/TOPCalTimeWalk.h>
21 #include <framework/database/DBObjPtr.h>
69 TimeDigitizer(
int moduleID,
int pixelID,
double timeOffset,
double calErrorsSq,
116 B2ERROR(
"TOP::TimeDigitizer::setSampleTimes: argument is NULL pointer");
208 void digitize(StoreArray<TOPRawDigit>& rawDigits,
209 StoreArray<TOPDigit>& digits,
211 int thresholdCount = 0,
212 double timeJitter = 0)
const;
227 void digitize(StoreArray<TOPRawWaveform>& waveforms,
228 StoreArray<TOPRawDigit>& rawDigits,
229 StoreArray<TOPDigit>& digits,
232 int thresholdCount = 0)
const;
243 double gauss(
double x,
double mean,
double sigma)
const
245 double xx = (x - mean) / sigma;
246 return exp(-0.5 * xx * xx);
261 const std::vector<double>& baselines,
262 const std::vector<double>& rmsNoises,
263 const std::vector<double>& pedestals,
288 std::multimap<double, const Hit>
m_times;
static bool s_maskSamples
mask samples at window boundary (phase-2)
unsigned getASICNumber() const
Returns ASIC number.
static unsigned s_storageDepth
ASIC analog storage depth.
int getModuleID() const
Return bar ID.
static void setOffsetWindows(int offsetWin)
Sets the number of windows before the first ASIC window.
static void setReadoutWindows(unsigned numWin)
Sets the number of readout windows.
static unsigned s_readoutWindows
number of readout windows
Class to store simulated hits of Cherenkov photons on PMT's input for digitization module (TOPDigitiz...
const TOPSimHit * simHit
pointer to simulated hit
double m_calErrorsSq
calibration uncertainties squared
unsigned getASICWindow() const
Returns ASIC storage window number.
bool isValid() const
Check if digitizer instance is valid (e.g.
void digitize(StoreArray< TOPRawDigit > &rawDigits, StoreArray< TOPDigit > &digits, int threshold=0, int thresholdCount=0, double timeJitter=0) const
Do time digitization using simplified pile-up and double-hit-resolution model.
std::multimap< double, const Hit > m_times
hits sorted by time
static unsigned s_window
first window number
static void setStorageDepth(unsigned storageDepth)
Sets storage depth.
unsigned getCarrierNumber() const
Returns carrier board number.
Normalized shape of single photon pulse (waveform) Pulse must be positive.
static DBObjPtr< TOPCalTimeWalk > * s_timeWalk
pointer to DB object
unsigned m_channel
hardware channel number (0-based)
unsigned m_carrier
carrier board number
static void setFirstWindow(unsigned window)
Sets first ASIC window.
unsigned getUniqueID() const
Return unique pixel ID.
Calibration constants of a singe ASIC channel: time axis (sample times)
double pulseHeight
generated pulse height
Abstract base class for different kinds of events.
TimeDigitizer(int moduleID, int pixelID, double timeOffset, double calErrorsSq, int shift, double rmsNoise, const TOPSampleTimes &sampleTimes)
Constructor.
const TOPSampleTimes * m_sampleTimes
sample times
double gauss(double x, double mean, double sigma) const
Gauss function (pulse shape approximation)
void addTimeOfHit(double t, double pulseHeight, EType type, const TOPSimHit *simHit=0)
Add time of simulated hit.
double m_rmsNoise
r.m.s of noise [ADC counts]
double m_timeOffset
time offset [ns]
bool m_valid
true, if module/pixel is mapped to hardware
static void maskSamples(bool maskThem)
Mask samples at the end of a window to emulate phase-2 data.
unsigned getScrodID() const
Returns SCROD ID.
unsigned m_scrodID
SCROD ID.
int m_windowShift
additional wf window shift due to asic mis-alignment
unsigned m_asic
ASIC number.
const TOPSignalShape * shape
waveform shape of this hit
int m_moduleID
module ID (1-based)
unsigned int getChannel() const
Returns hardware channel number.
unsigned m_chan
ASIC channel number.
std::vector< short > generateWaveform(int startSample, const std::vector< double > &baselines, const std::vector< double > &rmsNoises, const std::vector< double > &pedestals, int ADCRange) const
Generate waveform.
int getPixelID() const
Return pixel ID.
static int s_offsetWindows
number of windows before first wf window
EType
hit type enumerators
unsigned getASICChannel() const
Returns ASIC channel number.
void setNoise(double rmsNoise)
Sets noise level.
Structure to hold some of the calpulse data.
void setSampleTimes(const TOPSampleTimes *sampleTimes)
Sets sample times.
static void setTimeWalk(DBObjPtr< TOPCalTimeWalk > *timeWalk)
Stores pointer to time walk DB object defined in TOPDigitizerModule.