Belle II Software
release-08-01-10
|
Digitize EKLMSim2Hits to get EKLM StripHits. More...
#include <ScintillatorSimulator.h>
Classes | |
struct | Photoelectron |
Photoelectron data. More... | |
Public Member Functions | |
ScintillatorSimulator (const KLMScintillatorDigitizationParameters *digPar, ScintillatorFirmware *fitter, double digitizationInitialTime, bool debug) | |
Constructor. More... | |
ScintillatorSimulator (const ScintillatorSimulator &)=delete | |
Copy constructor (disabled). | |
ScintillatorSimulator & | operator= (const ScintillatorSimulator &)=delete |
Operator = (disabled). | |
~ScintillatorSimulator () | |
Destructor. | |
void | simulate (const std::multimap< KLMChannelNumber, const KLMSimHit * >::iterator &firstHit, const std::multimap< KLMChannelNumber, const KLMSimHit * >::iterator &end) |
Simulate a strip. More... | |
KLMScintillatorFirmwareFitResult * | getFPGAFit () |
Get fit data. | |
enum ScintillatorFirmwareFitStatus | getFitStatus () const |
Get fit status. More... | |
double | getNPhotoelectrons () |
Get number of photoelectrons (fit result). | |
int | getNGeneratedPhotoelectrons () |
Get generated number of photoelectrons. | |
double | getEnergy () |
Get total energy deposited in the strip (sum over ssimulation hits). | |
void | setFEEData (const KLMScintillatorFEEData *FEEData) |
Set FEE data. | |
void | generatePhotoelectrons (double stripLen, double distSiPM, int nPhotons, double timeShift, bool isReflected) |
Generate photoelectrons. More... | |
void | fillSiPMOutput (float *hist, bool useDirect, bool useReflected) |
Fill SiPM output. More... | |
float | getMCTime () const |
Get MC time. More... | |
float | getSiPMMCTime () const |
Get SiPM MC time. More... | |
Private Member Functions | |
void | reallocPhotoElectronBuffers (int size) |
Reallocate photoelectron buffers. More... | |
void | prepareSimulation () |
Prepare simulation. | |
void | performSimulation () |
Perform common simulation stage. | |
int * | sortPhotoelectrons (int nPhotoelectrons) |
Sort photoelectrons. More... | |
void | addRandomSiPMNoise () |
Add random noise to the signal (amplitude-dependend). | |
void | simulateADC () |
Simulate ADC (create digital signal from analog),. | |
void | debugOutput () |
Debug output (signal and fit result histograms). | |
Private Attributes | |
const KLMTime * | m_Time |
Time. | |
const KLMScintillatorDigitizationParameters * | m_DigPar |
Parameters. | |
ScintillatorFirmware * | m_fitter |
Fitter. | |
double | m_DigitizationInitialTime |
Initial digitization time. | |
bool | m_Debug |
Debug mode (generates additional output files with histograms). | |
double | m_histRange |
Time range, (number of digitizations) * (ADC sampling time). | |
float * | m_amplitudeDirect |
Analog amplitude (direct). | |
float * | m_amplitudeReflected |
Analog amplitude (reflected). | |
float * | m_amplitude |
Analog amplitude. | |
int * | m_ADCAmplitude |
Digital amplitude. | |
double * | m_SignalTimeDependence |
Buffer for signal time dependence calculation. | |
double * | m_SignalTimeDependenceDiff |
Buffer for signal time dependence calculation. | |
struct Photoelectron * | m_Photoelectrons |
Buffer for photoelectron data. | |
int * | m_PhotoelectronIndex |
Buffer for photoelectron indices. | |
int * | m_PhotoelectronIndex2 |
Buffer for photoelectron indices. | |
int | m_PhotoelectronBufferSize |
Size of photoelectron data buffer. | |
enum ScintillatorFirmwareFitStatus | m_FPGAStat |
FPGA fit status. | |
KLMScintillatorFirmwareFitResult | m_FPGAFit |
FPGA fit data. | |
int | m_npe |
Number of photoelectrons (generated). | |
double | m_Energy |
Total energy deposited in the strip. | |
std::string | m_stripName |
Name of the strip. | |
double | m_Pedestal |
Pedestal. | |
double | m_PhotoelectronAmplitude |
Photoelectron amplitude. | |
int | m_Threshold |
Threshold. | |
float | m_MCTime |
MC time. | |
float | m_SiPMMCTime |
MC time at SiPM. | |
Digitize EKLMSim2Hits to get EKLM StripHits.
Definition at line 30 of file ScintillatorSimulator.h.
ScintillatorSimulator | ( | const KLMScintillatorDigitizationParameters * | digPar, |
ScintillatorFirmware * | fitter, | ||
double | digitizationInitialTime, | ||
bool | debug | ||
) |
Constructor.
[in] | digPar | Digitization parameters. |
[in] | digitizationInitialTime | Initial digitization time. |
[in] | fitter | Fitter. |
[in] | debug | Use debug mode. |
Definition at line 62 of file ScintillatorSimulator.cc.
void fillSiPMOutput | ( | float * | hist, |
bool | useDirect, | ||
bool | useReflected | ||
) |
Fill SiPM output.
[in,out] | hist | Output histogram (signal is added to it). |
[in] | useDirect | Use direct photons. |
[in] | useReflected | Use reflected photons. |
Definition at line 418 of file ScintillatorSimulator.cc.
void generatePhotoelectrons | ( | double | stripLen, |
double | distSiPM, | ||
int | nPhotons, | ||
double | timeShift, | ||
bool | isReflected | ||
) |
Generate photoelectrons.
[in] | stripLen | Strip length. |
[in] | distSiPM | Distance from hit to SiPM. |
[in] | nPhotons | Number of photons to be simulated. |
[in] | timeShift | Time of hit. |
[in] | isReflected | Whether the hits are reflected or not. |
Definition at line 308 of file ScintillatorSimulator.cc.
enum KLM::ScintillatorFirmwareFitStatus getFitStatus | ( | ) | const |
|
inline |
|
inline |
|
private |
Reallocate photoelectron buffers.
[in] | size | New size of buffers. |
Definition at line 41 of file ScintillatorSimulator.cc.
void simulate | ( | const std::multimap< KLMChannelNumber, const KLMSimHit * >::iterator & | firstHit, |
const std::multimap< KLMChannelNumber, const KLMSimHit * >::iterator & | end | ||
) |
Simulate a strip.
[in] | firstHit | First hit in this strip. |
[in] | end | End of hit range. |
Definition at line 163 of file ScintillatorSimulator.cc.
|
private |
Sort photoelectrons.
[in] | nPhotoelectrons | Number of photoelectrons. |
Definition at line 260 of file ScintillatorSimulator.cc.