This modules receives a list of optical photons as inputs and generates analogic waveforms that feed the UMD electronics. More...
#include <MdOptoElectronicSimulatorAG/MdOptoElectronicSimulator.h>
Classes | |
struct | SignalInformation |
Simple struct to store signal information in containers. More... | |
Public Types | |
typedef utl::TraceC | FrequencyTrace |
enum | IntegratorSimulationType { eStepByStep, eSimplified } |
enum | ResultFlag { eSuccess, eFailure, eBreakLoop, eContinueLoop } |
Flag returned by module methods to the RunController. More... | |
typedef utl::TraceD | TimeTrace |
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 | |
VModule::ResultFlag | Finish () |
Finish: invoked at end of the run (NOT end of the event) More... | |
utl::Stopwatch & | GetStopwatch () |
const utl::Stopwatch & | GetStopwatch () const |
std::string | GetVersionInfo (const VersionInfoType v) const |
Retrieve different sorts of module version info. More... | |
VModule::ResultFlag | Init () |
Initialize: invoked at beginning of run (NOT beginning of event) More... | |
void | InitTiming () |
MdOptoElectronicSimulator () | |
VModule::ResultFlag | Run (evt::Event &e) |
Run: invoked once per event. More... | |
ResultFlag | RunWithTiming (evt::Event &event) |
~MdOptoElectronicSimulator () | |
Static Public Member Functions | |
static std::string | GetResultFlagByName (const ResultFlag flag) |
Static Public Attributes | |
static const char *const | kIntegratorSimulationTypeTags [] = { "StepByStep", "Simplified"} |
Tags for the types of integrator simulation. More... | |
static const char *const | kSimulationTypeTags [] = { "FromMEvent", "FromMEventSimulatedScint"} |
Tags for the types of simulation. More... | |
Protected Types | |
enum | InfoLevel { eInfoNone = 0, eInfoFinal = 1, eInfoIntermediate = 2, eInfoDebug = 3 } |
Protected Attributes | |
int | fInfoLevel = 0 |
Private Types | |
typedef int | ParticleType |
Simple own typedef for the real datatype of the particles' type. In the class utl::Particle there's a nested enumeration, tough the method utl::Particle::GetType returns a plain int: that's why this typedef uses int. More... | |
typedef std::list < mdet::Pixel::SPE > | PulseContainer |
typedef std::map< int, SignalInformation > | SignalsMap |
Map associating the information with IDs (meant to be from pixel's). More... | |
typedef std::list< mdet::SiPM::PE > | SiPMPulseContainer |
Private Member Functions | |
virtual void | ApplyBackEndTransfer (const mdet::BackEndSiPM &backEnd, const double maxTimePreFE, const double minTimePreFE, TimeTrace &traceAfterADCLowGain, TimeTrace &traceAfterADCHighGain, TVectorD &totalAnalogicalInput, const std::vector< utl::TraceD > traceAnalogical) |
virtual void | ApplyBackEndTransferWStepSaturation (const mdet::BackEndSiPM &backEnd, const double maxTimePreFE, const double minTimePreFE, TimeTrace &traceAfterADCLowGain, TimeTrace &traceAfterADCHighGain, TVectorD &totalAnalogicalInput, const std::vector< utl::TraceD > traceAnalogical) |
virtual void | ApplyCITIROCTransfer (const mdet::ChannelSiPM &channel, const SignalInformation &si, const double pulseTimeSpan, double minTimePreFE, TimeTrace &totalPulsePostFrontEndTrace, TimeTrace &totalPulsePostDiscriminatorTrace, utl::TraceD &traceAnalogical) |
virtual void | ApplyTransferBlock (utl::FFTDataContainer< utl::Trace, TimeTrace::ValueType, FrequencyTrace::ValueType > &fft, const mdet::BackEndSiPM &backEnd, BackEndSiPM::TransferStep step) |
virtual void | ApplyTransferBlocks (utl::FFTDataContainer< utl::Trace, TimeTrace::ValueType, FrequencyTrace::ValueType > &fft, utl::FFTDataContainer< utl::Trace, TimeTrace::ValueType, FrequencyTrace::ValueType > &fftHG, const mdet::BackEndSiPM &backEnd) |
void | Dump (const TF1 &fun, const std::string &suffix) |
Helper to dump a TF1 to the configured file. More... | |
virtual double | GetPulseTimeSpan (const SignalInformation &si, double &minTimePreFE, double &maxTimePreFE) |
int | GetTriggerTimeFromSD (evt::Event &, const mdet::Counter &, mevt::MEvent::CounterIterator, double &) |
Retrieve T1 time from associated SD tank. More... | |
void | Init (std::unique_ptr< utl::TabularStream > &pt, unsigned int nCol) const |
Helper to init a tabular stream. More... | |
virtual void | InjectDigitalNoise (const mdet::Module &module, mevt::Module &evtModule) |
VModule::ResultFlag | OptoElectronics (evt::Event &e) |
virtual void | PlotChannel (const double traceStartTime, const double minTimePreFE, const double binning, const mdet::ChannelSiPM &channel, utl::TraceD &traceAnalogical, TimeTrace &totalPulsePostFrontEndTrace, TimeTrace &totalPulsePostDiscriminatorTrace, utl::TraceB &trace) |
virtual void | PlotIntegrator (const double traceStartTime, const double minTimePreFE, const double binning, const mdet::FrontEndSiPM &frontEnd, TVectorD &traceAnalogical, TimeTrace &traceIntegratorAAmplifier, TimeTrace &traceIntegratorBAmplifier, utl::TraceUSI &traceIntegratorA, utl::TraceUSI &traceIntegratorB, const double delay) |
virtual void | ProcessPulses (const mdet::Channel &c, const SignalInformation &signalInfo, utl::TraceB &trace, double &span, const utl::TimeInterval &traceStart) |
Process: analyze, electronic simulation and sampling. More... | |
virtual void | ProcessPulses (const mdet::ChannelSiPM &c, const SignalInformation &signalInfo, utl::TraceB &trace, utl::TraceD &analogSignal, double &span, const utl::TimeInterval &traceStart, double &minTimePreFE, double &maxTimePreFE) |
virtual void | ProcessPulsesIntegrator (const mdet::Module &module, std::vector< utl::TraceD > analogicalTraces, utl::TraceUSI &traceIntegratorA, utl::TraceUSI &traceIntegratorB, const utl::TimeInterval &traceStart, double &minTimePreFE, double &maxTimePreFE) |
REGISTER_MODULE ("MdOptoElectronicSimulator", MdOptoElectronicSimulator) | |
virtual void | SampleTrace (double minTimePostFE, double maxTimePostFE, double binning, const mdet::FrontEndSiPM &frontEnd, const utl::TimeInterval &traceStart, TimeTrace &totalPulsePostDiscriminatorTrace, utl::TraceB &trace) |
virtual void | SampleTraceADC (const double minTimePostFE, const double maxTimePostFE, const mdet::FrontEndSiPM &frontEnd, const utl::TimeInterval &traceStart, TimeTrace &traceAfterADCLowGain, TimeTrace &traceAfterADCHighGain, utl::TraceUSI &traceIntegratorA, utl::TraceUSI &traceIntegratorB) |
virtual VModule::ResultFlag | SimulateElectronics (mevt::Module &evtModule, const mdet::Module &module, const SignalsMap &sm, const utl::TimeStamp &eventTime) |
Peform the simulation of the electronics response. More... | |
Private Attributes | |
std::set< ParticleType > | fAllowedParticleTypes |
Particle types that are considered to generate signal, if empty then every kind of particle is allowed. More... | |
bool | fForcedSDTrigger |
Ignore WCD trigger condition. More... | |
bool | fGeneratePostFETotalPulseOutput |
To include the total pulse after front-end in the output file. More... | |
bool | fGeneratePreFETotalPulseOutput |
To include the total pulse prior front-end in the output file. More... | |
bool | fGenerateSPEPulseOutput |
To include individual pulses samples in the output file. More... | |
bool | fIgnoreCrossTalk |
Ignore cross-talk effects. More... | |
bool | fIncludeBaseLineFluctuationIntegrator |
To simulate baseline fluctuation in the integrator output. More... | |
bool | fInjectNoiseBinary |
To inject noise in binary traces. More... | |
IntegratorSimulationType | fIntegratorSimType |
Type of integrator simulation. Step by step simulates the complete transfer functions and applies saturation and offsets in each step (very slow). In fast mode the whole transfer is simplified to a low pass filter. More... | |
utl::MessageLoggerConfig | fLog |
Output messages handler. More... | |
unsigned int | fMaxSPE |
Maximum number of spe (inclusive). More... | |
unsigned int | fMinSPE |
Minimum number of spe (inclusive). More... | |
unsigned int | fNBinsHistograms |
Number of bins for histograms. More... | |
unsigned int | fNDiscretization |
Discretization over the continuous functions. More... | |
unsigned int | fNPulseSamples |
Number of samples to use in the output files for pulses. More... | |
unsigned int | fNRepetitions |
Repetitions for in-module loop. More... | |
unsigned int | fNumPlotPoints |
Number of points to be used in plotting (theoretically) continuous functions. More... | |
bool | fPlotChannelPulses |
bool | fPlotDelay |
bool | fPlotFftPostAmp |
bool | fPlotFftPriorAmp |
std::vector< std::string > | fPlotFileExtensions |
File extensions for plots (dot included). More... | |
bool | fPlotInputOutput |
bool | fPlotOutcome |
bool | fPlotTransferAmpResponse |
bool | fPlotTransferPhaseResponse |
std::ofstream | fPulseFile |
Associated stream. More... | |
std::string | fPulseFilename |
Pulse output file filename. More... | |
double | fPulseSampleWindow |
Define the length of the window within which the pulse is sampled. More... | |
unsigned int | fRunNumber |
Tracks the number of runs. More... | |
unsigned int | fStepSPE |
Step size for spe iteration. More... | |
TStyle * | fStyle |
bool | fToggleDelay |
bool | fToggleFftPriorAmp |
bool | fToggleInputOutput |
bool | fToggleOutcome |
bool | fTogglePlotchannelPulses |
bool | fTogglePlotFftPostAmp |
bool | fToggleTransferAmpResponse |
bool | fToggleTransferPhaseResponse |
utl::UnitsConfig | fUnits |
Units configuration. More... | |
This modules receives a list of optical photons as inputs and generates analogic waveforms that feed the UMD electronics.
Simulate the signal given a list of optical photons arrivnig at the photo-sensor (PMT or SiPM).
Simulations of opto-electronics response of UMD eKits. May be used to simulate either PMTs or SiPMs.
Simulate the electronic response: pulse amplification, discrimination and sampling.
This workflow is materialized in two steps: SimulateElectronics which calls ProcessPulses. This methods are defined as virtual so as to allow deriving class and customization of some particular stage.
In the future: more stages could be defined (and so new methods) or directly most of this information could be put in the event.
Definition at line 90 of file MdOptoElectronicSimulator.h.
Definition at line 112 of file MdOptoElectronicSimulator.h.
|
private |
Simple own typedef for the real datatype of the particles' type. In the class utl::Particle there's a nested enumeration, tough the method utl::Particle::GetType returns a plain int: that's why this typedef uses int.
Definition at line 414 of file MdOptoElectronicSimulator.h.
|
private |
Definition at line 115 of file MdOptoElectronicSimulator.h.
|
private |
Map associating the information with IDs (meant to be from pixel's).
Definition at line 144 of file MdOptoElectronicSimulator.h.
|
private |
Definition at line 116 of file MdOptoElectronicSimulator.h.
Definition at line 111 of file MdOptoElectronicSimulator.h.
|
protectedinherited |
Enumerator | |
---|---|
eStepByStep |
Simulate the inteagrator with intermediate saturation steps and full transfer functions (very consuming) |
eSimplified |
Simulate the integrator in one step with simplified transfer |
Definition at line 95 of file MdOptoElectronicSimulator.h.
|
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. |
|
inherited |
MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::MdOptoElectronicSimulator | ( | ) |
Definition at line 371 of file MdOptoElectronicSimulator.cc.
MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::~MdOptoElectronicSimulator | ( | ) |
Definition at line 376 of file MdOptoElectronicSimulator.cc.
|
privatevirtual |
Definition at line 1924 of file MdOptoElectronicSimulator.cc.
References mdet::BackEndSiPM::ApplySaturation(), ApplyTransferBlocks(), mdet::BackEndSiPM::eHighGainAmplifier, mdet::BackEndSiPM::eLowGainAmplifier, fLog, fNDiscretization, fUnits, utl::UnitsConfig::GetTimeName(), utl::FFTDataContainer< C, T, F >::GetTimeSeries(), utl::UnitsConfig::GetTimeUnit(), and utl::Trace< T >::PushBack().
Referenced by ProcessPulsesIntegrator().
|
privatevirtual |
Definition at line 1831 of file MdOptoElectronicSimulator.cc.
References mdet::BackEndSiPM::ApplySaturation(), ApplyTransferBlock(), mdet::BackEndSiPM::eADC, mdet::BackEndSiPM::eFirstAdder, mdet::BackEndSiPM::eHighGainAmplifier, mdet::BackEndSiPM::eLowGainAmplifier, mdet::BackEndSiPM::eSecondAdder, fLog, fNDiscretization, fUnits, mdet::BackEndSiPM::GetNumberOfChannelsToGroup(), utl::UnitsConfig::GetTimeName(), utl::FFTDataContainer< C, T, F >::GetTimeSeries(), utl::UnitsConfig::GetTimeUnit(), and utl::Trace< T >::PushBack().
Referenced by ProcessPulsesIntegrator().
|
privatevirtual |
Definition at line 1480 of file MdOptoElectronicSimulator.cc.
References RdGeoCeLDFFitter::c, mdet::ChannelSiPM::ComputeDiscriminator(), mdet::ChannelSiPM::ComputeTransfer(), utl::endc, utl::endr, fLog, fNDiscretization, freq, MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::SignalInformation::fSiPMPulses, fUnits, utl::UnitsConfig::GetElectricPotentialUnit(), utl::UnitsConfig::GetFrequencyName(), utl::FFTDataContainer< C, T, F >::GetFrequencySpectrum(), utl::UnitsConfig::GetFrequencyUnit(), utl::Trace< T >::GetSize(), utl::UnitsConfig::GetTimeName(), utl::FFTDataContainer< C, T, F >::GetTimeSeries(), utl::UnitsConfig::GetTimeUnit(), utl::hline(), Init(), utl::Trace< T >::PushBack(), and utl::Trace< T >::SetBinning().
Referenced by ProcessPulses().
|
privatevirtual |
Definition at line 1969 of file MdOptoElectronicSimulator.cc.
References RdGeoCeLDFFitter::c, mdet::BackEndSiPM::ComputeTransfer(), utl::endc, utl::endr, fLog, freq, fUnits, utl::UnitsConfig::GetFrequencyName(), utl::FFTDataContainer< C, T, F >::GetFrequencySpectrum(), utl::UnitsConfig::GetFrequencyUnit(), utl::MessageLoggerConfig::GetLevel(), utl::hline(), and Init().
Referenced by ApplyBackEndTransferWStepSaturation().
|
privatevirtual |
Definition at line 2008 of file MdOptoElectronicSimulator.cc.
References mdet::BackEndSiPM::ComputeTransfer(), utl::endc, utl::endr, mdet::BackEndSiPM::eSimplifiedHG, mdet::BackEndSiPM::eSimplifiedLG, fLog, freq, fUnits, utl::UnitsConfig::GetFrequencyName(), utl::FFTDataContainer< C, T, F >::GetFrequencySpectrum(), utl::UnitsConfig::GetFrequencyUnit(), utl::MessageLoggerConfig::GetLevel(), utl::hline(), Init(), utl::Trace< T >::PushBack(), and utl::Trace< T >::SetBinning().
Referenced by ApplyBackEndTransfer().
|
private |
Helper to dump a TF1 to the configured file.
Definition at line 2539 of file MdOptoElectronicSimulator.cc.
References fNPulseSamples, fPulseFile, fPulseSampleWindow, fRunNumber, and max.
Referenced by ProcessPulses().
|
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 2355 of file MdOptoElectronicSimulator.cc.
References fwk::VModule::eSuccess.
|
privatevirtual |
Definition at line 1428 of file MdOptoElectronicSimulator.cc.
References utl::endc, utl::endr, fLog, MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::SignalInformation::fSiPMPulses, fUnits, utl::MessageLoggerConfig::GetLevel(), utl::UnitsConfig::GetTimeName(), utl::UnitsConfig::GetTimeUnit(), utl::hline(), Init(), max, and G4StationSimulatorOG::p.
Referenced by SimulateElectronics().
|
staticinherited |
Definition at line 8 of file VModule.cc.
References fwk::VModule::eBreakLoop, fwk::VModule::eContinueLoop, fwk::VModule::eFailure, and fwk::VModule::eSuccess.
Referenced by fwk::RunController::DoNextInSequence(), fwk::RunController::FinishBranch(), and fwk::RunController::InitBranch().
|
inlineinherited |
Definition at line 106 of file VModule.h.
References fwk::VModule::fStopwatch.
|
inlineinherited |
Definition at line 107 of file VModule.h.
References fwk::VModule::fStopwatch.
|
private |
Retrieve T1 time from associated SD tank.
PMTs ////
SiPMs ////
Definition at line 2398 of file MdOptoElectronicSimulator.cc.
References utl::endc, utl::endr, ERROR, fForcedSDTrigger, mdet::Counter::GetAssociatedTankId(), sdet::Station::GetFADCBinSize(), sdet::Station::GetFADCTraceLength(), mdet::Module::GetFrontEnd(), mdet::Module::GetFrontEndSiPM(), sevt::Station::GetId(), sdet::Station::GetLatchBin(), mdet::Counter::GetModule(), sevt::Station::GetSimData(), sevt::SEvent::GetStation(), sevt::StationSimData::GetTriggerData(), evt::Event::HasSEvent(), sevt::Station::HasSimData(), sevt::SEvent::HasStation(), sevt::StationTriggerData::IsMultiplicityOfPositiveSteps(), mdet::Module::IsSiPM(), sevt::StationTriggerData::IsT1Threshold(), sevt::StationTriggerData::IsT2Threshold(), sevt::StationTriggerData::IsTimeOverThreshold(), sevt::StationTriggerData::IsTimeOverThresholdDeconvoluted(), tab, sevt::StationSimData::TriggerTimeIterator, sevt::StationSimData::TriggerTimesBegin(), sevt::StationSimData::TriggerTimesEnd(), and WARNING.
Referenced by OptoElectronics().
|
inherited |
Retrieve different sorts of module version info.
Definition at line 26 of file VModule.cc.
Referenced by fwk::CentralConfig::GetConfig(), ThresholdCalculatorKG::ThresholdCalculator::Init(), fdDoubleBumpFinder::FdDoubleBumpFinder::Init(), LaserGeneratorNA::LaserGenerator::Init(), LaserLightSimulatorNA::LaserLightSimulator::Init(), FdElectronicsSimulatorOG::FdElectronicsSimulator::Init(), TelescopeSimulatorKG::TelescopeSimulator::Init(), TelescopeSimulatorKG2::TelescopeSimulator::Init(), SdSimpleSimKG::SdSimpleSim::Init(), ShowerPhotonGeneratorOG::ShowerPhotonGenerator::Init(), and testRunController::testModuleVersionInfo().
|
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 381 of file MdOptoElectronicSimulator.cc.
References utl::ampere, utl::cm, utl::UnitsConfig::Configure(), utl::MessageLoggerConfig::Configure(), utl::ConsecutiveEnumFactory< EnumType, last, tags, NoConversionPolicy, first >::Create(), fwk::VModule::eSuccess, fAllowedParticleTypes, fForcedSDTrigger, fGeneratePostFETotalPulseOutput, fGeneratePreFETotalPulseOutput, fGenerateSPEPulseOutput, fIgnoreCrossTalk, fIncludeBaseLineFluctuationIntegrator, fInjectNoiseBinary, fIntegratorSimType, fLog, fMaxSPE, fMinSPE, fNBinsHistograms, fNDiscretization, fNPulseSamples, fNRepetitions, fNumPlotPoints, fPlotChannelPulses, fPlotDelay, fPlotFftPostAmp, fPlotFftPriorAmp, fPlotFileExtensions, fPlotInputOutput, fPlotOutcome, fPlotTransferAmpResponse, fPlotTransferPhaseResponse, fPulseFile, fPulseFilename, fPulseSampleWindow, fStepSPE, fStyle, fToggleDelay, fToggleFftPriorAmp, fToggleInputOutput, fToggleOutcome, fTogglePlotchannelPulses, fTogglePlotFftPostAmp, fToggleTransferAmpResponse, fToggleTransferPhaseResponse, fUnits, fwk::CentralConfig::GetInstance(), utl::UnitsConfig::GetTimeUnit(), fwk::CentralConfig::GetTopBranch(), kIntegratorSimulationTypeTags, utl::LoadConfig(), utl::megahertz, utl::milli, utl::ns, utl::UnitsConfig::SetElectricCurrentDefault(), utl::UnitsConfig::SetElectricPotentialDefault(), utl::UnitsConfig::SetFrequencyDefault(), utl::UnitsConfig::SetLengthDefault(), utl::UnitsConfig::SetTimeDefault(), and utl::volt.
Referenced by ApplyCITIROCTransfer(), ApplyTransferBlock(), ApplyTransferBlocks(), GetPulseTimeSpan(), and ProcessPulses().
|
private |
Helper to init a tabular stream.
Definition at line 2567 of file MdOptoElectronicSimulator.cc.
References fLog.
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
privatevirtual |
Definition at line 1622 of file MdOptoElectronicSimulator.cc.
References mevt::Module::GetChannel(), mdet::Module::GetFrontEndSiPM(), mdet::FrontEndSiPM::GetInjectDigitalNoiseBin(), mdet::FrontEndSiPM::GetInjectDigitalNoiseChannel(), mdet::FrontEndSiPM::GetInjectDigitalNoiseWidth(), utl::Trace< T >::GetSize(), mevt::Channel::GetTrace(), mevt::Module::HasChannel(), mevt::Channel::HasTrace(), and mevt::Channel::MakeTrace().
Referenced by SimulateElectronics().
|
private |
PMTs ////
SiPMs ///
Definition at line 561 of file MdOptoElectronicSimulator.cc.
References mevt::ScintillatorSimData::AddPEPulse(), mevt::ScintillatorSimData::AddSPEPulse(), mdet::PMT::ComputePulseDestination(), mevt::MEvent::CountersBegin(), mevt::MEvent::CountersEnd(), delay, fwk::VModule::eSuccess, fForcedSDTrigger, fIgnoreCrossTalk, fLog, mdet::Pixel::SPE::GetAmplitude(), mdet::SiPM::PE::GetAmplitude1(), mdet::SiPM::PE::GetAmplitude2(), mdet::SiPM::PE::GetAmplitude3(), mdet::MDetector::GetCounter(), mdet::SiPM::PE::GetFallTime1(), mdet::SiPM::PE::GetFallTime2(), mdet::SiPM::PE::GetFallTime3(), det::DetectorComponent< C, ManagerProvider >::GetId(), mdet::Counter::GetModule(), mdet::Pixel::SPE::GetMu(), mevt::ScintillatorSimData::GetPhotonTime(), mdet::Module::GetPixelFor(), mdet::Pixel::GetPMT(), mdet::SiPM::PE::GetRiseTime(), mdet::Module::GetScintillator(), mdet::Pixel::SPE::GetSigma(), mdet::Module::GetSiPMFor(), mdet::SiPM::PE::GetStartTime(), GetTriggerTimeFromSD(), evt::Event::HasMEvent(), INFO, is(), mdet::Module::IsSiPM(), mdet::SiPM::MakePEAt(), mdet::Pixel::MakeSPEAt(), mdet::Counter::ModulesBegin(), mdet::Counter::ModulesEnd(), mevt::ScintillatorSimData::PhotonTimesBegin(), mevt::ScintillatorSimData::PhotonTimesEnd(), and SimulateElectronics().
Referenced by Run().
|
privatevirtual |
Definition at line 1646 of file MdOptoElectronicSimulator.cc.
References fGeneratePostFETotalPulseOutput, fGeneratePreFETotalPulseOutput, fGenerateSPEPulseOutput, fLog, fPlotFileExtensions, fPlotOutcome, fRunNumber, fStyle, fUnits, mdet::Module::GetCounter(), utl::UnitsConfig::GetElectricPotentialName(), utl::UnitsConfig::GetElectricPotentialUnit(), mdet::ChannelSiPM::GetFrontEnd(), det::DetectorComponent< C, ManagerProvider >::GetId(), mdet::FrontEndSiPM::GetMeanSampleRatePeriod(), mdet::FrontEndSiPM::GetModule(), utl::Trace< T >::GetSize(), and utl::UnitsConfig::GetTimeName().
Referenced by ProcessPulses().
|
privatevirtual |
Definition at line 2129 of file MdOptoElectronicSimulator.cc.
References delay, fGeneratePostFETotalPulseOutput, fGeneratePreFETotalPulseOutput, fLog, fPlotFileExtensions, fPlotOutcome, fRunNumber, fStyle, fUnits, mdet::FrontEndSiPM::GetADCCounts(), mdet::Module::GetCounter(), det::DetectorComponent< C, ManagerProvider >::GetId(), mdet::FrontEndSiPM::GetModule(), mdet::FrontEndSiPM::GetSampleTimeADC(), utl::Trace< T >::GetSize(), and utl::UnitsConfig::GetTimeName().
Referenced by ProcessPulsesIntegrator().
|
privatevirtual |
Process: analyze, electronic simulation and sampling.
c | The corresponding channel. |
signalInfo | The pulses and other information that generates signal. |
trace | Output parameter with the trace to be filled with the samples. |
span | Output parameter with the total time of the discriminator output signal. |
traceStart | TimeInterval for trace start. |
eventTime | Time of the event, reference base time. |
Definition at line 651 of file MdOptoElectronicSimulator.cc.
References utl::abs(), mdet::Channel::Discriminator::AtThresholdBegin(), mdet::Channel::Discriminator::AtThresholdEnd(), RdGeoCeLDFFitter::b, RdGeoCeLDFFitter::c, utl::Trace< T >::Clear(), mdet::Channel::ComputeSignalShift(), mdet::Channel::ComputeTransfer(), Dump(), utl::endc, utl::endr, fGeneratePostFETotalPulseOutput, fGeneratePreFETotalPulseOutput, fGenerateSPEPulseOutput, fLog, fNDiscretization, fNumPlotPoints, fPlotChannelPulses, fPlotDelay, fPlotFftPostAmp, fPlotFftPriorAmp, fPlotFileExtensions, fPlotInputOutput, fPlotOutcome, fPlotTransferAmpResponse, fPlotTransferPhaseResponse, MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::SignalInformation::fPulses, freq, fRunNumber, fStyle, fUnits, utl::UnitsConfig::GetAngleName(), utl::UnitsConfig::GetAngleUnit(), mdet::Module::GetCounter(), utl::UnitsConfig::GetElectricCurrentName(), utl::UnitsConfig::GetElectricCurrentUnit(), utl::UnitsConfig::GetElectricPotentialName(), utl::UnitsConfig::GetElectricPotentialUnit(), utl::UnitsConfig::GetElectricResistanceName(), utl::UnitsConfig::GetElectricResistanceUnit(), utl::UnitsConfig::GetFrequencyName(), utl::FFTDataContainer< C, T, F >::GetFrequencySpectrum(), utl::UnitsConfig::GetFrequencyUnit(), mdet::Channel::GetFrontEnd(), det::DetectorComponent< C, ManagerProvider >::GetId(), utl::TimeInterval::GetInterval(), utl::MessageLoggerConfig::GetLevel(), mdet::FrontEnd::GetMeanSampleRatePeriod(), mdet::FrontEnd::GetModule(), mdet::Channel::Discriminator::GetOverThresholdTimeSpan(), mdet::FrontEnd::GetPostT1BufferLength(), mdet::FrontEnd::GetPreT1BufferLength(), utl::Trace< T >::GetSize(), mdet::Channel::GetThreshold(), utl::UnitsConfig::GetTimeName(), utl::FFTDataContainer< C, T, F >::GetTimeSeries(), utl::UnitsConfig::GetTimeUnit(), utl::hline(), Init(), utl::kTwoPi, mdet::FrontEnd::MakeSampler(), max, G4StationSimulatorOG::p, utl::Trace< T >::PushBack(), utl::s, and utl::Trace< T >::SetBinning().
Referenced by SimulateElectronics().
|
privatevirtual |
Definition at line 1365 of file MdOptoElectronicSimulator.cc.
References ApplyCITIROCTransfer(), utl::Trace< T >::Clear(), fLog, fNDiscretization, MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::SignalInformation::fSiPMPulses, fUnits, mdet::ChannelSiPM::GetFrontEnd(), det::DetectorComponent< C, ManagerProvider >::GetId(), utl::TimeInterval::GetInterval(), mdet::FrontEndSiPM::GetMeanSampleRatePeriod(), mdet::FrontEndSiPM::GetPostT1BufferLength(), mdet::FrontEndSiPM::GetPreT1BufferLength(), utl::UnitsConfig::GetTimeName(), utl::UnitsConfig::GetTimeUnit(), PlotChannel(), utl::Trace< T >::PushBack(), SampleTrace(), and utl::Trace< T >::SetBinning().
|
privatevirtual |
Definition at line 1760 of file MdOptoElectronicSimulator.cc.
References ApplyBackEndTransfer(), ApplyBackEndTransferWStepSaturation(), utl::Trace< T >::Clear(), eSimplified, fIntegratorSimType, fLog, fNDiscretization, fUnits, mdet::Module::GetBackEndSiPM(), mdet::FrontEndSiPM::GetDelayBinaryADC(), mdet::Module::GetFrontEndSiPM(), det::DetectorComponent< C, ManagerProvider >::GetId(), utl::TimeInterval::GetInterval(), mdet::FrontEndSiPM::GetMeanSampleRatePeriod(), mdet::FrontEndSiPM::GetPostT1BufferLength(), mdet::FrontEndSiPM::GetPreT1BufferLength(), mdet::FrontEndSiPM::GetSampleTimeADC(), utl::UnitsConfig::GetTimeName(), utl::UnitsConfig::GetTimeUnit(), PlotIntegrator(), utl::Trace< T >::PushBack(), SampleTraceADC(), and utl::Trace< T >::SetBinning().
Referenced by SimulateElectronics().
|
private |
|
virtual |
Run: invoked once per event.
This method is for things that should be done once per event {You must override this method in your concrete module}
Implements fwk::VModule.
Definition at line 541 of file MdOptoElectronicSimulator.cc.
References fwk::VModule::eFailure, fRunNumber, fStyle, and OptoElectronics().
|
inlineinherited |
Definition at line 98 of file VModule.h.
References fwk::VModule::fStopwatch, fwk::VModule::Run(), utl::Stopwatch::Start(), and utl::Stopwatch::Stop().
Referenced by fwk::RunController::DoNextInSequence().
|
privatevirtual |
Definition at line 1565 of file MdOptoElectronicSimulator.cc.
References fLog, fUnits, utl::TimeInterval::GetInterval(), mdet::FrontEndSiPM::GetMeanSampleRatePeriod(), mdet::FrontEndSiPM::GetPostT1BufferLength(), mdet::FrontEndSiPM::GetPreT1BufferLength(), utl::Trace< T >::GetSize(), utl::UnitsConfig::GetTimeName(), utl::UnitsConfig::GetTimeUnit(), mdet::FrontEndSiPM::MakeSampler(), utl::Trace< T >::PushBack(), and utl::s.
Referenced by ProcessPulses().
|
privatevirtual |
Definition at line 2055 of file MdOptoElectronicSimulator.cc.
References fIncludeBaseLineFluctuationIntegrator, fLog, fNDiscretization, fUnits, mdet::FrontEndSiPM::GetADCBaseLineFluctuationHG(), mdet::FrontEndSiPM::GetADCBaseLineFluctuationLG(), mdet::FrontEndSiPM::GetADCCounts(), mdet::Module::GetBackEndSiPM(), mdet::FrontEndSiPM::GetDelayBinaryADC(), mdet::BackEndSiPM::GetHighGainAmplifierOffset(), utl::TimeInterval::GetInterval(), mdet::BackEndSiPM::GetLowGainAmplifierOffset(), mdet::FrontEndSiPM::GetMeanSampleRatePeriod(), mdet::FrontEndSiPM::GetModule(), mdet::FrontEndSiPM::GetPostT1BufferLength(), mdet::FrontEndSiPM::GetPreT1BufferLength(), mdet::FrontEndSiPM::GetSampleTimeADC(), utl::Trace< T >::GetSize(), utl::UnitsConfig::GetTimeName(), utl::UnitsConfig::GetTimeUnit(), and utl::Trace< T >::PushBack().
Referenced by ProcessPulsesIntegrator().
|
privatevirtual |
Peform the simulation of the electronics response.
This method iterates over the different channels and then forwards to the actual electronic processing in ProcessPulses.
Definition at line 2240 of file MdOptoElectronicSimulator.cc.
References fwk::VModule::eSuccess, fInjectNoiseBinary, fLog, fUnits, mevt::Module::GetChannel(), mdet::Module::GetChannelFor(), mdet::Module::GetChannelSiPMFor(), det::DetectorComponent< C, ManagerProvider >::GetId(), mevt::Module::GetIntegratorATrace(), mevt::Module::GetIntegratorBTrace(), mdet::Module::GetPixel(), GetPulseTimeSpan(), mdet::Module::GetSiPM(), utl::UnitsConfig::GetTimeName(), utl::UnitsConfig::GetTimeUnit(), mevt::Channel::GetTrace(), mevt::Channel::GetTraceStartTime(), mevt::Module::HasChannel(), mevt::Module::HasIntegratorATrace(), mevt::Module::HasIntegratorBTrace(), mevt::Channel::HasTrace(), InjectDigitalNoise(), mdet::Module::IsSiPM(), mevt::Module::MakeChannel(), mevt::Module::MakeIntegratorATrace(), mevt::Module::MakeIntegratorBTrace(), mevt::Channel::MakeTrace(), max, ProcessPulses(), ProcessPulsesIntegrator(), and det::DetectorComponent< C, ManagerProvider >::second.
Referenced by OptoElectronics().
|
private |
Particle types that are considered to generate signal, if empty then every kind of particle is allowed.
The particle sensitive part of the detector, the scintillator, gives a signal for negative charged particle's. Nevertheless, the actual charge is not used so far. Originally, the loop over the impinging particles was filtered only to consider muons: something not very ellaborated, and that discarded the possibility to take also into account the presence of electrons (something which may be desired to analyze the so-called punch-through effects). So, it was considered to change that filter to restrict the simulation to negatively charged particles, but the class utl::Particle lacks a GetCharge method. This method could have been added, but it would have been used here to code something like if (p.GetCharge() < 0) which, I think, does not add much and missed the point (note that besides this condition the charge is not used in any other place). The correct alternative, I think, is to have configured here which particles are allowed in the simulation, and so restrict with this set of particle types the impinging particles.
It may sound wrong to take empty to mean all, but certainly is a, say, nice shorcut taking into account that so far it doesn't mean anything to filter out every kind of particle: no signal is generated is every particle is rejected.
Definition at line 439 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Ignore WCD trigger condition.
Definition at line 358 of file MdOptoElectronicSimulator.h.
Referenced by GetTriggerTimeFromSD(), Init(), and OptoElectronics().
|
private |
To include the total pulse after front-end in the output file.
Definition at line 397 of file MdOptoElectronicSimulator.h.
Referenced by Init(), PlotChannel(), PlotIntegrator(), and ProcessPulses().
|
private |
To include the total pulse prior front-end in the output file.
Definition at line 393 of file MdOptoElectronicSimulator.h.
Referenced by Init(), PlotChannel(), PlotIntegrator(), and ProcessPulses().
|
private |
To include individual pulses samples in the output file.
Definition at line 389 of file MdOptoElectronicSimulator.h.
Referenced by Init(), PlotChannel(), and ProcessPulses().
|
private |
Ignore cross-talk effects.
Definition at line 362 of file MdOptoElectronicSimulator.h.
Referenced by Init(), and OptoElectronics().
|
private |
To simulate baseline fluctuation in the integrator output.
Definition at line 401 of file MdOptoElectronicSimulator.h.
Referenced by Init(), and SampleTraceADC().
|
protectedinherited |
Definition at line 123 of file VModule.h.
Referenced by RdChannelASCIINoiseImporterRD::RdChannelASCIINoiseImporterRD::Init(), Rd2dLDFFitter::Rd2dLDFFitter::Init(), RdChannelNoiseImporter_AERA::RdChannelNoiseImporter_AERA::Init(), and Rd2dLDFFitter::Rd2dLDFFitter::Run().
|
private |
To inject noise in binary traces.
Definition at line 406 of file MdOptoElectronicSimulator.h.
Referenced by Init(), and SimulateElectronics().
|
private |
Type of integrator simulation. Step by step simulates the complete transfer functions and applies saturation and offsets in each step (very slow). In fast mode the whole transfer is simplified to a low pass filter.
Definition at line 325 of file MdOptoElectronicSimulator.h.
Referenced by Init(), and ProcessPulsesIntegrator().
|
private |
Output messages handler.
Definition at line 312 of file MdOptoElectronicSimulator.h.
Referenced by ApplyBackEndTransfer(), ApplyBackEndTransferWStepSaturation(), ApplyCITIROCTransfer(), ApplyTransferBlock(), ApplyTransferBlocks(), GetPulseTimeSpan(), Init(), OptoElectronics(), PlotChannel(), PlotIntegrator(), ProcessPulses(), ProcessPulsesIntegrator(), SampleTrace(), SampleTraceADC(), and SimulateElectronics().
|
private |
Maximum number of spe (inclusive).
Definition at line 348 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Minimum number of spe (inclusive).
Used a starting point for simulations where an iteration over spes is desired.
Definition at line 342 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Number of bins for histograms.
Definition at line 333 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Discretization over the continuous functions.
Definition at line 308 of file MdOptoElectronicSimulator.h.
Referenced by ApplyBackEndTransfer(), ApplyBackEndTransferWStepSaturation(), ApplyCITIROCTransfer(), Init(), ProcessPulses(), ProcessPulsesIntegrator(), and SampleTraceADC().
|
private |
Number of samples to use in the output files for pulses.
Definition at line 378 of file MdOptoElectronicSimulator.h.
|
private |
Repetitions for in-module loop.
Definition at line 329 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Number of points to be used in plotting (theoretically) continuous functions.
Definition at line 320 of file MdOptoElectronicSimulator.h.
Referenced by Init(), and ProcessPulses().
|
private |
Definition at line 444 of file MdOptoElectronicSimulator.h.
Referenced by Init(), and ProcessPulses().
|
private |
Definition at line 449 of file MdOptoElectronicSimulator.h.
Referenced by Init(), and ProcessPulses().
|
private |
Definition at line 451 of file MdOptoElectronicSimulator.h.
Referenced by Init(), and ProcessPulses().
|
private |
Definition at line 450 of file MdOptoElectronicSimulator.h.
Referenced by Init(), and ProcessPulses().
|
private |
File extensions for plots (dot included).
Definition at line 316 of file MdOptoElectronicSimulator.h.
Referenced by Init(), PlotChannel(), PlotIntegrator(), and ProcessPulses().
|
private |
Definition at line 446 of file MdOptoElectronicSimulator.h.
Referenced by Init(), and ProcessPulses().
|
private |
Definition at line 445 of file MdOptoElectronicSimulator.h.
Referenced by Init(), PlotChannel(), PlotIntegrator(), and ProcessPulses().
|
private |
Definition at line 447 of file MdOptoElectronicSimulator.h.
Referenced by Init(), and ProcessPulses().
|
private |
Definition at line 448 of file MdOptoElectronicSimulator.h.
Referenced by Init(), and ProcessPulses().
|
private |
Associated stream.
Definition at line 374 of file MdOptoElectronicSimulator.h.
|
private |
Pulse output file filename.
Definition at line 370 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Define the length of the window within which the pulse is sampled.
Actually, there are two samples, one with a fixed window (defined by this value) and another that spans the whole pulse.
Definition at line 385 of file MdOptoElectronicSimulator.h.
|
private |
Tracks the number of runs.
Definition at line 304 of file MdOptoElectronicSimulator.h.
Referenced by Dump(), PlotChannel(), PlotIntegrator(), ProcessPulses(), and Run().
|
private |
Step size for spe iteration.
Definition at line 354 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Definition at line 463 of file MdOptoElectronicSimulator.h.
Referenced by Init(), PlotChannel(), PlotIntegrator(), ProcessPulses(), and Run().
|
private |
Definition at line 459 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Definition at line 460 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Definition at line 456 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Definition at line 455 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Definition at line 454 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Definition at line 461 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Definition at line 457 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Definition at line 458 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
private |
Units configuration.
Definition at line 366 of file MdOptoElectronicSimulator.h.
Referenced by ApplyBackEndTransfer(), ApplyBackEndTransferWStepSaturation(), ApplyCITIROCTransfer(), ApplyTransferBlock(), ApplyTransferBlocks(), GetPulseTimeSpan(), Init(), PlotChannel(), PlotIntegrator(), ProcessPulses(), ProcessPulsesIntegrator(), SampleTrace(), SampleTraceADC(), and SimulateElectronics().
|
static |
Tags for the types of integrator simulation.
Definition at line 103 of file MdOptoElectronicSimulator.h.
Referenced by Init().
|
static |
Tags for the types of simulation.
Definition at line 100 of file MdOptoElectronicSimulator.h.