1 #ifndef _MdOptoElectronicSimulatorAG_MdOptoElectronicSimulator_h_
2 #define _MdOptoElectronicSimulatorAG_MdOptoElectronicSimulator_h_
10 #include <utl/config.h>
12 #include <fwk/VModule.h>
14 #include <mdet/Pixel.h>
15 #include <mdet/SiPM.h>
16 #include <mdet/BackEndSiPM.h>
17 #include <mdet/MDetector.h>
19 #include <evt/Event.h>
20 #include <mevt/MEvent.h>
22 #include <utl/AugerUnits.h>
23 #include <utl/Trace-fwd.h>
25 #include <utl/MessageLoggerConfig.h>
26 #include <utl/UnitsConfig.h>
27 #include <utl/FFTDataContainer.h>
39 #include <boost/utility.hpp>
58 class ScintillatorSimData;
70 namespace MdOptoElectronicSimulatorAG {
91 public boost::noncopyable,
100 static const char*
const kSimulationTypeTags[];
103 static const char*
const kIntegratorSimulationTypeTags[];
107 VModule::ResultFlag
Init();
109 VModule::ResultFlag Finish();
155 virtual void ProcessPulses(
164 virtual void ProcessPulses(
171 double& minTimePreFE,
175 virtual double GetPulseTimeSpan(
178 double& minTimePreFE,
182 virtual void ApplyCITIROCTransfer(
185 const double pulseTimeSpan,
189 TimeTrace& totalPulsePostDiscriminatorTrace,
192 virtual void SampleTrace(
193 double minTimePostFE,
194 double maxTimePostFE,
198 TimeTrace& totalPulsePostDiscriminatorTrace,
201 virtual void InjectDigitalNoise(
205 virtual void PlotChannel(
206 const double traceStartTime,
207 const double minTimePreFE,
208 const double binning,
212 TimeTrace& totalPulsePostDiscriminatorTrace,
216 virtual void ProcessPulsesIntegrator(
218 std::vector<utl::TraceD> analogicalTraces,
222 double& minTimePreFE,
223 double& maxTimePreFE);
225 virtual void ApplyBackEndTransferWStepSaturation(
227 const double maxTimePreFE,
228 const double minTimePreFE,
231 TVectorD& totalAnalogicalInput,
232 const std::vector<utl::TraceD> traceAnalogical);
234 virtual void ApplyBackEndTransfer(
236 const double maxTimePreFE,
237 const double minTimePreFE,
240 TVectorD& totalAnalogicalInput,
241 const std::vector<utl::TraceD> traceAnalogical);
244 virtual void ApplyTransferBlock(
249 virtual void ApplyTransferBlocks(
254 virtual void SampleTraceADC(
255 const double minTimePostFE,
256 const double maxTimePostFE,
264 virtual void PlotIntegrator(
265 const double traceStartTime,
266 const double minTimePreFE,
267 const double binning,
269 TVectorD& traceAnalogical,
277 VModule::ResultFlag OptoElectronics(
evt::Event& e);
284 virtual VModule::ResultFlag SimulateElectronics(
296 void Init(std::unique_ptr<utl::TabularStream>& pt,
unsigned int nCol)
const;
300 void Dump(
const TF1& fun,
const std::string& suffix);
469 #endif // _MdOptoElectronicSimulatorAG_MdOptoElectronicSimulator_h_
std::string fPulseFilename
Pulse output file filename.
bool fGenerateSPEPulseOutput
To include individual pulses samples in the output file.
unsigned int fNPulseSamples
Number of samples to use in the output files for pulses.
utl::MessageLoggerConfig fLog
Output messages handler.
int ParticleType
Simple own typedef for the real datatype of the particles' type. In the class utl::Particle there's a...
Helper class for configuration of units: value and name.
bool fIncludeBaseLineFluctuationIntegrator
To simulate baseline fluctuation in the integrator output.
bool fPlotTransferPhaseResponse
utl::UnitsConfig fUnits
Units configuration.
double fPulseSampleWindow
Define the length of the window within which the pulse is sampled.
Electronic front-end for the modules.
void Init()
Initialise the registry.
unsigned int fStepSPE
Step size for spe iteration.
std::list< mdet::Pixel::SPE > PulseContainer
Electronic front-end for the modules.
IntegratorSimulationType fIntegratorSimType
Type of integrator simulation. Step by step simulates the complete transfer functions and applies sat...
std::list< mdet::SiPM::PE > SiPMPulseContainer
A TimeStamp holds GPS second and nanosecond for some event.
std::map< int, SignalInformation > SignalsMap
Map associating the information with IDs (meant to be from pixel's).
This modules receives a list of optical photons as inputs and generates analogic waveforms that feed ...
Actual muon-sensitive objects.
Wraps a message to logger (received as parameter or created here), its access and configuration...
bool fTogglePlotFftPostAmp
unsigned int fMaxSPE
Maximum number of spe (inclusive).
std::vector< std::string > fPlotFileExtensions
File extensions for plots (dot included).
bool fPlotTransferAmpResponse
unsigned int fMinSPE
Minimum number of spe (inclusive).
bool fInjectNoiseBinary
To inject noise in binary traces.
unsigned int fNRepetitions
Repetitions for in-module loop.
bool fGeneratePreFETotalPulseOutput
To include the total pulse prior front-end in the output file.
#define REGISTER_MODULE(_moduleName_, _ModuleType_)
Root detector of the muon detector hierarchy.
Template class for a data container that offers and takes both time series and corresponding frequenc...
Scintillator level simulation data.
A TimeInterval is used to represent time elapsed between two events.
bool fToggleTransferPhaseResponse
std::ofstream fPulseFile
Associated stream.
InternalCounterCollection::ComponentIterator CounterIterator
void Dump(const FEvent &fevent)
unsigned int fNBinsHistograms
Number of bins for histograms.
unsigned int fRunNumber
Tracks the number of runs.
std::set< ParticleType > fAllowedParticleTypes
Particle types that are considered to generate signal, if empty then every kind of particle is allowe...
bool fIgnoreCrossTalk
Ignore cross-talk effects.
bool fTogglePlotchannelPulses
unsigned int fNDiscretization
Discretization over the continuous functions.
bool fForcedSDTrigger
Ignore WCD trigger condition.
unsigned int fNumPlotPoints
Number of points to be used in plotting (theoretically) continuous functions.
bool fGeneratePostFETotalPulseOutput
To include the total pulse after front-end in the output file.
utl::TraceC FrequencyTrace
bool fToggleTransferAmpResponse