List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | Private Member Functions | Private Attributes
FdElectronicsSimulatorOG::FdElectronicsSimulator Class Reference

Simulates the electronics of the telescopes. More...

#include <FdElectronicsSimulator.h>

Inheritance diagram for FdElectronicsSimulatorOG::FdElectronicsSimulator:
Inheritance graph
[legend]

Public Types

enum  ResultFlag { eSuccess, eFailure, eBreakLoop, eContinueLoop }
 Flag returned by module methods to the RunController. More...
 
enum  VersionInfoType {
  eFilename = 1, eRevisionNumber = 2, eDate = 3, eTime = 4,
  eLastEditor = 5
}
 Different types of version info that can be retrieved from GetVersionInfo. More...
 

Public Member Functions

 FdElectronicsSimulator ()
 
fwk::VModule::ResultFlag Finish ()
 Finish: invoked at end of the run (NOT end of the event) More...
 
bool GetPeFluctuations ()
 Returns true if photo electron fluctuations are enabled. More...
 
utl::StopwatchGetStopwatch ()
 
const utl::StopwatchGetStopwatch () const
 
std::string GetVersionInfo (const VersionInfoType v) const
 Retrieve different sorts of module version info. More...
 
fwk::VModule::ResultFlag Init ()
 Initialize: invoked at beginning of run (NOT beginning of event) More...
 
void InitTiming ()
 
fwk::VModule::ResultFlag Run (evt::Event &event)
 Run: invoked once per event. More...
 
ResultFlag RunWithTiming (evt::Event &event)
 
void SetPeFluctuations (bool doFluctuations)
 Set whether photo electron fluctuations should be simulated. More...
 
 ~FdElectronicsSimulator ()
 

Static Public Member Functions

static std::string GetResultFlagByName (const ResultFlag flag)
 

Protected Types

enum  InfoLevel { eInfoNone = 0, eInfoFinal = 1, eInfoIntermediate = 2, eInfoDebug = 3 }
 

Protected Attributes

int fInfoLevel = 0
 

Private Member Functions

void DoTimeConvolution (const std::vector< double > &originalTrace, std::vector< double > &convolutedTrace, unsigned int timeOffset)
 
void ElecSim (fevt::Telescope &tel)
 
double EvalRedThreshold (double npe, int nSamp, double gainVariance)
 
bool InitCamera (fevt::Telescope &tel)
 
void PrepareTimeConvolution (const fdet::Telescope &detTel)
 
 REGISTER_MODULE ("FdElectronicsSimulatorOG", FdElectronicsSimulator)
 

Private Attributes

double fBandWidthFactor
 
int fBaseline
 
std::map< int, double > fCalibCorrection
 
bool fDoAntiAliasingFilter
 
bool fDrumCalibMode
 
std::vector< double > fErrFuncFactors
 
std::map< int, double > fOpticalEfficiencyCorrection
 
std::map< int, double > fPeBgNoiseTable
 
bool fPeFluctuations
 
std::map< int, double > fQEffAtNormWavelength
 
utl::RandomEnginefRandomEngine
 
std::map< std::string,
utl::TabulatedFunction
fSimThresholdValues
 
bool fThresholdBoxCarReducedInMon
 
bool fThresholdMode
 
bool fUseMonitoring
 
bool fUseNewThreshold
 
int fVerbosityLevel
 

Detailed Description

Simulates the electronics of the telescopes.

Author
Luis Prado Jr
Date
05 May 2004
Author
Ralf Ulrich, FZK
Date
Tue Feb 28 12:15:36 CET 2006
Todo:
Virtual channels need to be reprogrammed. The electronics noise does not scale with the VCgain ratio!!!

Definition at line 51 of file FdElectronicsSimulator.h.

Member Enumeration Documentation

enum fwk::VModule::InfoLevel
protectedinherited
Enumerator
eInfoNone 
eInfoFinal 
eInfoIntermediate 
eInfoDebug 

Definition at line 125 of file VModule.h.

enum fwk::VModule::ResultFlag
inherited

Flag returned by module methods to the RunController.

Enumerator
eSuccess 

Report success to RunController.

eFailure 

Report failure to RunController, causing RunController to terminate execution.

eBreakLoop 

Break current loop. It works for nested loops too!

eContinueLoop 

Skip remaining modules in the current loop and continue with next iteration of the loop.

Definition at line 60 of file VModule.h.

Different types of version info that can be retrieved from GetVersionInfo.

Enumerator
eFilename 
eRevisionNumber 
eDate 
eTime 
eLastEditor 

Definition at line 110 of file VModule.h.

Constructor & Destructor Documentation

FdElectronicsSimulator::FdElectronicsSimulator ( )

Definition at line 75 of file FdElectronicsSimulator.cc.

FdElectronicsSimulator::~FdElectronicsSimulator ( )

Definition at line 86 of file FdElectronicsSimulator.cc.

Member Function Documentation

void FdElectronicsSimulator::DoTimeConvolution ( const std::vector< double > &  originalTrace,
std::vector< double > &  convolutedTrace,
unsigned int  timeOffset 
)
private

Definition at line 810 of file FdElectronicsSimulator.cc.

References utl::abs(), ERROR, and fErrFuncFactors.

Referenced by ElecSim().

void FdElectronicsSimulator::ElecSim ( fevt::Telescope tel)
private

Definition at line 492 of file FdElectronicsSimulator.cc.

References DoTimeConvolution(), fevt::ComponentSelector::eDeSelected, ERROR, fevt::FdConstants::eTotal, fBandWidthFactor, fBaseline, fCalibCorrection, fDoAntiAliasingFilter, fErrFuncFactors, fOpticalEfficiencyCorrection, fPeBgNoiseTable, fPeFluctuations, fQEffAtNormWavelength, fRandomEngine, fVerbosityLevel, fdet::Camera::GetADCDynamicRange(), fdet::Telescope::GetCamera(), fevt::Telescope::GetChannel(), fdet::Telescope::GetChannel(), fdet::Camera::GetCutoffFrequency(), fdet::Channel::GetElectronicNoiseVariance(), fdet::Channel::GetElectronicsGain(), utl::RandomEngine::GetEngine(), fevt::Telescope::GetEyeId(), fdet::Camera::GetFADCBinSize(), fevt::ChannelSimData::GetFADCTrace(), fdet::Camera::GetFADCTraceLength(), fdet::Channel::GetGainVariance(), fdet::Channel::GetId(), fevt::Telescope::GetId(), fdet::Telescope::GetLastPixelId(), fevt::PixelSimData::GetMean(), fevt::TelescopeSimData::GetNumberOfPhotonBins(), fevt::PixelSimData::GetPhotonTrace(), fevt::Telescope::GetPixel(), fdet::Channel::GetPixelId(), fevt::Pixel::GetSimData(), fevt::Channel::GetSimData(), fevt::Telescope::GetSimData(), utl::Trace< T >::GetSize(), fdet::Camera::GetSLTTriggerBin(), fevt::Pixel::GetStatus(), fdet::FDetector::GetTelescope(), fdet::Channel::GetVirtualChannelId(), fevt::Telescope::HasChannel(), fevt::ChannelSimData::HasFADCTrace(), fevt::PixelSimData::HasPhotonTrace(), fevt::Telescope::HasPixel(), fevt::Pixel::HasSimData(), fevt::Channel::HasSimData(), fdet::Channel::IsVirtual(), utl::kPi, fevt::Telescope::MakeChannel(), fevt::ChannelSimData::MakeFADCTrace(), fevt::Channel::MakeSimData(), max, ns, and sqrt().

Referenced by Run().

double FdElectronicsSimulator::EvalRedThreshold ( double  npe,
int  nSamp,
double  gainVariance 
)
private

Definition at line 845 of file FdElectronicsSimulator.cc.

References ERROR.

Referenced by InitCamera().

VModule::ResultFlag FdElectronicsSimulator::Finish ( )
virtual

Finish: invoked at end of the run (NOT end of the event)

This method is for things that should be done at the end of the run (for example, closing files or writing out histograms) {You must override this method in your concrete module}

Implements fwk::VModule.

Definition at line 248 of file FdElectronicsSimulator.cc.

References fwk::VModule::eSuccess.

bool FdElectronicsSimulatorOG::FdElectronicsSimulator::GetPeFluctuations ( )
inline

Returns true if photo electron fluctuations are enabled.

Definition at line 63 of file FdElectronicsSimulator.h.

References fPeFluctuations.

std::string fwk::VModule::GetResultFlagByName ( const ResultFlag  flag)
staticinherited
utl::Stopwatch& fwk::VModule::GetStopwatch ( )
inlineinherited

Definition at line 106 of file VModule.h.

References fwk::VModule::fStopwatch.

const utl::Stopwatch& fwk::VModule::GetStopwatch ( ) const
inlineinherited

Definition at line 107 of file VModule.h.

References fwk::VModule::fStopwatch.

std::string fwk::VModule::GetVersionInfo ( const VersionInfoType  v) const
inherited
VModule::ResultFlag FdElectronicsSimulator::Init ( )
virtual

Initialize: invoked at beginning of run (NOT beginning of event)

This method is for things that should be done once at the beginning of a run (for example, booking histograms, performing calculations that need to be done only once, initializing parameters) {You must override this method in your concrete module}

Implements fwk::VModule.

Definition at line 91 of file FdElectronicsSimulator.cc.

References fwk::VModule::eSuccess, fBaseline, fDoAntiAliasingFilter, fPeFluctuations, fRandomEngine, fSimThresholdValues, fThresholdBoxCarReducedInMon, fThresholdMode, fUseMonitoring, fUseNewThreshold, fVerbosityLevel, utl::Branch::GetAttributes(), utl::Branch::GetChild(), utl::Branch::GetData(), utl::Branch::GetFirstChild(), fwk::CentralConfig::GetTopBranch(), fwk::VModule::GetVersionInfo(), and INFO.

bool FdElectronicsSimulator::InitCamera ( fevt::Telescope tel)
private

Definition at line 255 of file FdElectronicsSimulator.cc.

References fevt::FdConstants::eBackground, fevt::ComponentSelector::eDeSelected, fdet::Pixel::eGood, ERROR, EvalRedThreshold(), fBandWidthFactor, fBaseline, fCalibCorrection, fDrumCalibMode, fOpticalEfficiencyCorrection, fPeBgNoiseTable, fQEffAtNormWavelength, fSimThresholdValues, fThresholdBoxCarReducedInMon, fThresholdMode, fUseMonitoring, fUseNewThreshold, fVerbosityLevel, fdet::Channel::GetADCVariance(), fdet::Channel::GetBaseline(), fdet::Telescope::GetCamera(), fdet::FDetector::GetChannel(), fevt::TelescopeSimData::GetConfigSignature(), fdet::Channel::GetElectronicNoiseVariance(), fdet::Channel::GetElectronicsGain(), fdet::Pixel::GetEndToEndCalibrationConstant(), fdet::Pixel::GetEndToEndCalibrationConstantAtReferenceWavelength(), fevt::Pixel::GetEyeId(), fevt::Telescope::GetEyeId(), fdet::Camera::GetFADCBinSize(), fdet::Camera::GetFLTBoxcarSumLength(), fdet::Channel::GetGainVariance(), fevt::Telescope::GetId(), fdet::Telescope::GetLastPixelId(), fevt::PixelSimData::GetMeanBgPhotonFlux(), utl::TabulatedFunction::GetNPoints(), fdet::Pixel::GetOpticalEfficiencyCorrectionAtReferenceWavelength(), fevt::PixelSimData::GetPhotonTrace(), fevt::Telescope::GetPixel(), fdet::FDetector::GetPixel(), fdet::Pixel::GetQEfficiency(), fdet::FDetector::GetReferenceLambda(), fevt::Pixel::GetSimData(), fevt::Telescope::GetSimData(), fdet::Pixel::GetSimulatedEndToEndCalibration(), fevt::Pixel::GetStatus(), fdet::Pixel::GetStatus(), fdet::FDetector::GetTelescope(), fevt::Pixel::GetTelescopeId(), fdet::Channel::GetThreshold(), fdet::Camera::GetThresholdConfigSignature(), fdet::Telescope::HasCorrectorRing(), fevt::PixelSimData::HasPhotonTrace(), fevt::Telescope::HasPixel(), fevt::Pixel::HasSimData(), fdet::Channel::IsVirtual(), ns, PrepareTimeConvolution(), fevt::PixelSimData::SetMean(), fevt::PixelSimData::SetNumSamples(), fevt::PixelSimData::SetRMS(), fevt::Pixel::SetStatus(), fevt::PixelSimData::SetThreshold(), sqrt(), WARNING, and utl::TabulatedFunction::Y().

Referenced by Run().

void fwk::VModule::InitTiming ( )
inlineinherited

Definition at line 95 of file VModule.h.

References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().

void FdElectronicsSimulator::PrepareTimeConvolution ( const fdet::Telescope detTel)
private
FdElectronicsSimulatorOG::FdElectronicsSimulator::REGISTER_MODULE ( "FdElectronicsSimulatorOG"  ,
FdElectronicsSimulator   
)
private
VModule::ResultFlag FdElectronicsSimulator::Run ( evt::Event event)
virtual
ResultFlag fwk::VModule::RunWithTiming ( evt::Event event)
inlineinherited
void FdElectronicsSimulatorOG::FdElectronicsSimulator::SetPeFluctuations ( bool  doFluctuations)
inline

Set whether photo electron fluctuations should be simulated.

Definition at line 65 of file FdElectronicsSimulator.h.

References fPeFluctuations.

Member Data Documentation

double FdElectronicsSimulatorOG::FdElectronicsSimulator::fBandWidthFactor
private

Definition at line 96 of file FdElectronicsSimulator.h.

Referenced by ElecSim(), InitCamera(), and PrepareTimeConvolution().

int FdElectronicsSimulatorOG::FdElectronicsSimulator::fBaseline
private

Definition at line 78 of file FdElectronicsSimulator.h.

Referenced by ElecSim(), Init(), and InitCamera().

std::map<int, double> FdElectronicsSimulatorOG::FdElectronicsSimulator::fCalibCorrection
private

Definition at line 91 of file FdElectronicsSimulator.h.

Referenced by ElecSim(), and InitCamera().

bool FdElectronicsSimulatorOG::FdElectronicsSimulator::fDoAntiAliasingFilter
private

Definition at line 74 of file FdElectronicsSimulator.h.

Referenced by ElecSim(), and Init().

bool FdElectronicsSimulatorOG::FdElectronicsSimulator::fDrumCalibMode
private

Definition at line 82 of file FdElectronicsSimulator.h.

Referenced by InitCamera(), and Run().

std::vector<double> FdElectronicsSimulatorOG::FdElectronicsSimulator::fErrFuncFactors
private

Definition at line 95 of file FdElectronicsSimulator.h.

Referenced by DoTimeConvolution(), ElecSim(), and PrepareTimeConvolution().

int fwk::VModule::fInfoLevel = 0
protectedinherited
std::map<int, double> FdElectronicsSimulatorOG::FdElectronicsSimulator::fOpticalEfficiencyCorrection
private

Definition at line 93 of file FdElectronicsSimulator.h.

Referenced by ElecSim(), and InitCamera().

std::map<int, double> FdElectronicsSimulatorOG::FdElectronicsSimulator::fPeBgNoiseTable
private

Definition at line 89 of file FdElectronicsSimulator.h.

Referenced by ElecSim(), and InitCamera().

bool FdElectronicsSimulatorOG::FdElectronicsSimulator::fPeFluctuations
private

Definition at line 73 of file FdElectronicsSimulator.h.

Referenced by ElecSim(), GetPeFluctuations(), Init(), and SetPeFluctuations().

std::map<int, double> FdElectronicsSimulatorOG::FdElectronicsSimulator::fQEffAtNormWavelength
private

Definition at line 92 of file FdElectronicsSimulator.h.

Referenced by ElecSim(), and InitCamera().

utl::RandomEngine* FdElectronicsSimulatorOG::FdElectronicsSimulator::fRandomEngine
private

Definition at line 106 of file FdElectronicsSimulator.h.

Referenced by ElecSim(), and Init().

std::map<std::string, utl::TabulatedFunction> FdElectronicsSimulatorOG::FdElectronicsSimulator::fSimThresholdValues
private

Definition at line 85 of file FdElectronicsSimulator.h.

Referenced by Init(), and InitCamera().

bool FdElectronicsSimulatorOG::FdElectronicsSimulator::fThresholdBoxCarReducedInMon
private

Definition at line 80 of file FdElectronicsSimulator.h.

Referenced by Init(), and InitCamera().

bool FdElectronicsSimulatorOG::FdElectronicsSimulator::fThresholdMode
private

Definition at line 87 of file FdElectronicsSimulator.h.

Referenced by Init(), and InitCamera().

bool FdElectronicsSimulatorOG::FdElectronicsSimulator::fUseMonitoring
private

Definition at line 79 of file FdElectronicsSimulator.h.

Referenced by Init(), and InitCamera().

bool FdElectronicsSimulatorOG::FdElectronicsSimulator::fUseNewThreshold
private

Definition at line 84 of file FdElectronicsSimulator.h.

Referenced by Init(), and InitCamera().

int FdElectronicsSimulatorOG::FdElectronicsSimulator::fVerbosityLevel
private

Definition at line 71 of file FdElectronicsSimulator.h.

Referenced by ElecSim(), Init(), InitCamera(), and Run().


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

, generated on Tue Sep 26 2023.