List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Attributes | Private Types | Private Member Functions | Private Attributes
MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator Class Reference

This modules receives a list of optical photons as inputs and generates analogic waveforms that feed the UMD electronics. More...

#include <MdOptoElectronicSimulatorAG/MdOptoElectronicSimulator.h>

Inheritance diagram for MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator:
Inheritance graph
[legend]

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::StopwatchGetStopwatch ()
 
const utl::StopwatchGetStopwatch () 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::PESiPMPulseContainer
 

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< ParticleTypefAllowedParticleTypes
 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...
 

Detailed Description

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.

Author
Rodolfo Federico Gamarraa/A.M. Botti
Date
01 Jun 2009

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.

Author
Rodolfo Federico Gamarra
Date
01 Jun 2009

Definition at line 90 of file MdOptoElectronicSimulator.h.

Member Typedef Documentation

Definition at line 112 of file MdOptoElectronicSimulator.h.

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.

See Also
utl::Particle

Definition at line 414 of file MdOptoElectronicSimulator.h.

Definition at line 115 of file MdOptoElectronicSimulator.h.

Map associating the information with IDs (meant to be from pixel's).

Definition at line 144 of file MdOptoElectronicSimulator.h.

Definition at line 116 of file MdOptoElectronicSimulator.h.

Definition at line 111 of file MdOptoElectronicSimulator.h.

Member Enumeration Documentation

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

Definition at line 125 of file VModule.h.

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.

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

MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::MdOptoElectronicSimulator ( )

Definition at line 371 of file MdOptoElectronicSimulator.cc.

MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::~MdOptoElectronicSimulator ( )

Definition at line 376 of file MdOptoElectronicSimulator.cc.

Member Function Documentation

void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ApplyBackEndTransfer ( const mdet::BackEndSiPM backEnd,
const double  maxTimePreFE,
const double  minTimePreFE,
TimeTrace traceAfterADCLowGain,
TimeTrace traceAfterADCHighGain,
TVectorD &  totalAnalogicalInput,
const std::vector< utl::TraceD traceAnalogical 
)
privatevirtual
void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ApplyBackEndTransferWStepSaturation ( const mdet::BackEndSiPM backEnd,
const double  maxTimePreFE,
const double  minTimePreFE,
TimeTrace traceAfterADCLowGain,
TimeTrace traceAfterADCHighGain,
TVectorD &  totalAnalogicalInput,
const std::vector< utl::TraceD traceAnalogical 
)
privatevirtual
void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ApplyCITIROCTransfer ( const mdet::ChannelSiPM channel,
const SignalInformation si,
const double  pulseTimeSpan,
double  minTimePreFE,
TimeTrace totalPulsePostFrontEndTrace,
TimeTrace totalPulsePostDiscriminatorTrace,
utl::TraceD traceAnalogical 
)
privatevirtual
void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ApplyTransferBlock ( utl::FFTDataContainer< utl::Trace, TimeTrace::ValueType, FrequencyTrace::ValueType > &  fft,
const mdet::BackEndSiPM backEnd,
BackEndSiPM::TransferStep  step 
)
privatevirtual
void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ApplyTransferBlocks ( utl::FFTDataContainer< utl::Trace, TimeTrace::ValueType, FrequencyTrace::ValueType > &  fft,
utl::FFTDataContainer< utl::Trace, TimeTrace::ValueType, FrequencyTrace::ValueType > &  fftHG,
const mdet::BackEndSiPM backEnd 
)
privatevirtual
void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::Dump ( const TF1 &  fun,
const std::string &  suffix 
)
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().

VModule::ResultFlag MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::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 2355 of file MdOptoElectronicSimulator.cc.

References fwk::VModule::eSuccess.

double MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::GetPulseTimeSpan ( const SignalInformation si,
double &  minTimePreFE,
double &  maxTimePreFE 
)
privatevirtual
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.

int MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::GetTriggerTimeFromSD ( evt::Event event,
const mdet::Counter cmDet,
mevt::MEvent::CounterIterator  cIt,
double &  deltaLatch 
)
private
std::string fwk::VModule::GetVersionInfo ( const VersionInfoType  v) const
inherited
VModule::ResultFlag MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::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 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().

void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::Init ( std::unique_ptr< utl::TabularStream > &  pt,
unsigned int  nCol 
) const
private

Helper to init a tabular stream.

Definition at line 2567 of file MdOptoElectronicSimulator.cc.

References fLog.

void fwk::VModule::InitTiming ( )
inlineinherited

Definition at line 95 of file VModule.h.

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

void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::InjectDigitalNoise ( const mdet::Module module,
mevt::Module evtModule 
)
privatevirtual
VModule::ResultFlag MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::OptoElectronics ( evt::Event e)
private
void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::PlotChannel ( const double  traceStartTime,
const double  minTimePreFE,
const double  binning,
const mdet::ChannelSiPM channel,
utl::TraceD traceAnalogical,
TimeTrace totalPulsePostFrontEndTrace,
TimeTrace totalPulsePostDiscriminatorTrace,
utl::TraceB trace 
)
privatevirtual
void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::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 
)
privatevirtual
void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ProcessPulses ( const mdet::Channel c,
const SignalInformation signalInfo,
utl::TraceB trace,
double &  span,
const utl::TimeInterval traceStart 
)
privatevirtual

Process: analyze, electronic simulation and sampling.

Parameters
cThe corresponding channel.
signalInfoThe pulses and other information that generates signal.
traceOutput parameter with the trace to be filled with the samples.
spanOutput parameter with the total time of the discriminator output signal.
traceStartTimeInterval for trace start.
eventTimeTime 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().

void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ProcessPulses ( const mdet::ChannelSiPM c,
const SignalInformation signalInfo,
utl::TraceB trace,
utl::TraceD analogSignal,
double &  span,
const utl::TimeInterval traceStart,
double &  minTimePreFE,
double &  maxTimePreFE 
)
privatevirtual
void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ProcessPulsesIntegrator ( const mdet::Module module,
std::vector< utl::TraceD analogicalTraces,
utl::TraceUSI traceIntegratorA,
utl::TraceUSI traceIntegratorB,
const utl::TimeInterval traceStart,
double &  minTimePreFE,
double &  maxTimePreFE 
)
privatevirtual
MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::REGISTER_MODULE ( "MdOptoElectronicSimulator"  ,
MdOptoElectronicSimulator   
)
private
VModule::ResultFlag MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::Run ( evt::Event event)
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().

ResultFlag fwk::VModule::RunWithTiming ( evt::Event event)
inlineinherited
void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::SampleTrace ( double  minTimePostFE,
double  maxTimePostFE,
double  binning,
const mdet::FrontEndSiPM frontEnd,
const utl::TimeInterval traceStart,
TimeTrace totalPulsePostDiscriminatorTrace,
utl::TraceB trace 
)
privatevirtual
void MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::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 
)
privatevirtual
VModule::ResultFlag MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::SimulateElectronics ( mevt::Module evtModule,
const mdet::Module module,
const SignalsMap sm,
const utl::TimeStamp eventTime 
)
privatevirtual

Member Data Documentation

std::set<ParticleType> MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fAllowedParticleTypes
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().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fForcedSDTrigger
private

Ignore WCD trigger condition.

Definition at line 358 of file MdOptoElectronicSimulator.h.

Referenced by GetTriggerTimeFromSD(), Init(), and OptoElectronics().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fGeneratePostFETotalPulseOutput
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().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fGeneratePreFETotalPulseOutput
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().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fGenerateSPEPulseOutput
private

To include individual pulses samples in the output file.

Definition at line 389 of file MdOptoElectronicSimulator.h.

Referenced by Init(), PlotChannel(), and ProcessPulses().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fIgnoreCrossTalk
private

Ignore cross-talk effects.

Definition at line 362 of file MdOptoElectronicSimulator.h.

Referenced by Init(), and OptoElectronics().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fIncludeBaseLineFluctuationIntegrator
private

To simulate baseline fluctuation in the integrator output.

Definition at line 401 of file MdOptoElectronicSimulator.h.

Referenced by Init(), and SampleTraceADC().

int fwk::VModule::fInfoLevel = 0
protectedinherited
bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fInjectNoiseBinary
private

To inject noise in binary traces.

Definition at line 406 of file MdOptoElectronicSimulator.h.

Referenced by Init(), and SimulateElectronics().

IntegratorSimulationType MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fIntegratorSimType
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().

utl::MessageLoggerConfig MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fLog
private
unsigned int MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fMaxSPE
private

Maximum number of spe (inclusive).

See Also
fMaxSPE

Definition at line 348 of file MdOptoElectronicSimulator.h.

Referenced by Init().

unsigned int MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fMinSPE
private

Minimum number of spe (inclusive).

Used a starting point for simulations where an iteration over spes is desired.

See Also
fMinSPE

Definition at line 342 of file MdOptoElectronicSimulator.h.

Referenced by Init().

unsigned int MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fNBinsHistograms
private

Number of bins for histograms.

Definition at line 333 of file MdOptoElectronicSimulator.h.

Referenced by Init().

unsigned int MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fNDiscretization
private
unsigned int MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fNPulseSamples
private

Number of samples to use in the output files for pulses.

Definition at line 378 of file MdOptoElectronicSimulator.h.

Referenced by Dump(), and Init().

unsigned int MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fNRepetitions
private

Repetitions for in-module loop.

Definition at line 329 of file MdOptoElectronicSimulator.h.

Referenced by Init().

unsigned int MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fNumPlotPoints
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().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fPlotChannelPulses
private

Definition at line 444 of file MdOptoElectronicSimulator.h.

Referenced by Init(), and ProcessPulses().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fPlotDelay
private

Definition at line 449 of file MdOptoElectronicSimulator.h.

Referenced by Init(), and ProcessPulses().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fPlotFftPostAmp
private

Definition at line 451 of file MdOptoElectronicSimulator.h.

Referenced by Init(), and ProcessPulses().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fPlotFftPriorAmp
private

Definition at line 450 of file MdOptoElectronicSimulator.h.

Referenced by Init(), and ProcessPulses().

std::vector<std::string> MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fPlotFileExtensions
private

File extensions for plots (dot included).

Definition at line 316 of file MdOptoElectronicSimulator.h.

Referenced by Init(), PlotChannel(), PlotIntegrator(), and ProcessPulses().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fPlotInputOutput
private

Definition at line 446 of file MdOptoElectronicSimulator.h.

Referenced by Init(), and ProcessPulses().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fPlotOutcome
private

Definition at line 445 of file MdOptoElectronicSimulator.h.

Referenced by Init(), PlotChannel(), PlotIntegrator(), and ProcessPulses().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fPlotTransferAmpResponse
private

Definition at line 447 of file MdOptoElectronicSimulator.h.

Referenced by Init(), and ProcessPulses().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fPlotTransferPhaseResponse
private

Definition at line 448 of file MdOptoElectronicSimulator.h.

Referenced by Init(), and ProcessPulses().

std::ofstream MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fPulseFile
private

Associated stream.

Definition at line 374 of file MdOptoElectronicSimulator.h.

Referenced by Dump(), and Init().

std::string MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fPulseFilename
private

Pulse output file filename.

Definition at line 370 of file MdOptoElectronicSimulator.h.

Referenced by Init().

double MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fPulseSampleWindow
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.

Referenced by Dump(), and Init().

unsigned int MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fRunNumber
private

Tracks the number of runs.

Definition at line 304 of file MdOptoElectronicSimulator.h.

Referenced by Dump(), PlotChannel(), PlotIntegrator(), ProcessPulses(), and Run().

unsigned int MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fStepSPE
private

Step size for spe iteration.

See Also
fStepSPE

Definition at line 354 of file MdOptoElectronicSimulator.h.

Referenced by Init().

TStyle* MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fStyle
private

Definition at line 463 of file MdOptoElectronicSimulator.h.

Referenced by Init(), PlotChannel(), PlotIntegrator(), ProcessPulses(), and Run().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fToggleDelay
private

Definition at line 459 of file MdOptoElectronicSimulator.h.

Referenced by Init().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fToggleFftPriorAmp
private

Definition at line 460 of file MdOptoElectronicSimulator.h.

Referenced by Init().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fToggleInputOutput
private

Definition at line 456 of file MdOptoElectronicSimulator.h.

Referenced by Init().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fToggleOutcome
private

Definition at line 455 of file MdOptoElectronicSimulator.h.

Referenced by Init().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fTogglePlotchannelPulses
private

Definition at line 454 of file MdOptoElectronicSimulator.h.

Referenced by Init().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fTogglePlotFftPostAmp
private

Definition at line 461 of file MdOptoElectronicSimulator.h.

Referenced by Init().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fToggleTransferAmpResponse
private

Definition at line 457 of file MdOptoElectronicSimulator.h.

Referenced by Init().

bool MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fToggleTransferPhaseResponse
private

Definition at line 458 of file MdOptoElectronicSimulator.h.

Referenced by Init().

utl::UnitsConfig MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::fUnits
private
const char *const MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::kIntegratorSimulationTypeTags = { "StepByStep", "Simplified"}
static

Tags for the types of integrator simulation.

Definition at line 103 of file MdOptoElectronicSimulator.h.

Referenced by Init().

const char *const MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::kSimulationTypeTags = { "FromMEvent", "FromMEventSimulatedScint"}
static

Tags for the types of simulation.

Definition at line 100 of file MdOptoElectronicSimulator.h.


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

, generated on Tue Sep 26 2023.