1 #ifndef _MdCounterSimulatorAG_MdCounterSimulator_h_
2 #define _MdCounterSimulatorAG_MdCounterSimulator_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 MdCounterSimulatorAG {
97 public boost::noncopyable,
103 eFromMEventSimulatedScint
111 static const char*
const kSimulationTypeTags[];
114 static const char*
const kIntegratorSimulationTypeTags[];
118 VModule::ResultFlag
Init();
120 VModule::ResultFlag Finish();
165 virtual void ProcessPulses(
174 virtual void ProcessPulses(
181 double& minTimePreFE,
182 double& maxTimePreFE,
183 double& analogicTraceStartTime,
184 double& analogicTraceEndTime);
186 virtual double GetPulseTimeSpan(
189 double& minTimePreFE,
190 double& maxTimePreFE,
191 double& analogicTraceStartTime,
192 double& analogicTraceEndTime);
194 virtual void ApplyCITIROCTransfer(
197 const double pulseTimeSpan,
199 double analogicTraceStartTime,
200 double analogicTraceEndTime,
202 TimeTrace& totalPulsePostDiscriminatorTrace,
205 virtual void SampleTrace(
206 double minTimePostFE,
207 double maxTimePostFE,
211 TimeTrace& totalPulsePostDiscriminatorTrace,
214 virtual void InjectDigitalNoise(
218 virtual void PlotChannel(
219 const double traceStartTime,
220 const double minTimePreFE,
221 const double binning,
225 TimeTrace& totalPulsePostDiscriminatorTrace,
229 virtual void ProcessPulsesIntegrator(
231 std::vector<utl::TraceD> analogicalTraces,
235 double& minTimePreFE,
236 double& maxTimePreFE);
238 virtual void ApplyBackEndTransferWStepSaturation(
240 const double maxTimePreFE,
241 const double minTimePreFE,
244 TVectorD& totalAnalogicalInput,
245 const std::vector<utl::TraceD> traceAnalogical);
247 virtual void ApplyBackEndTransfer(
249 const double maxTimePreFE,
250 const double minTimePreFE,
253 TVectorD& totalAnalogicalInput,
254 const std::vector<utl::TraceD> traceAnalogical);
257 virtual void ApplyTransferBlock(
262 virtual void ApplyTransferBlocks(
267 virtual void SampleTraceADC(
268 const double minTimePostFE,
269 const double maxTimePostFE,
277 virtual void PlotIntegrator(
278 const double traceStartTime,
279 const double minTimePreFE,
280 const double binning,
282 TVectorD& traceAnalogical,
289 VModule::ResultFlag RunFromMEvent(
evt::Event& e);
290 VModule::ResultFlag RunFromMEventScintillatorSimulated(
evt::Event& e);
301 virtual VModule::ResultFlag SimulatePulses(
312 virtual VModule::ResultFlag SimulateElectronics(
324 void Init(std::unique_ptr<utl::TabularStream>& pt,
unsigned int nCol)
const;
328 void Dump(
const TF1& fun,
const std::string& suffix);
501 #endif // _MdCounterSimulatorAG_MdCounterSimulator_h_
bool fTogglePlotFftPostAmp
unsigned int fStepSPE
Step size for spe iteration.
unsigned int fNBinsHistograms
Number of bins for histograms.
utl::MessageLoggerConfig fLog
Output messages handler.
SimulationType
Kind of possible simulation to be performed.
bool fTogglePlotchannelPulses
Helper class for configuration of units: value and name.
std::list< mdet::SiPM::PE > SiPMPulseContainer
int ParticleType
Simple own typedef for the real datatype of the particles' type. In the class utl::Particle there's a...
unsigned int fNDiscretization
Discretization over the continuous functions.
double fPulseSampleWindow
Define the length of the window within which the pulse is sampled.
unsigned int fNumPlotPoints
Number of points to be used in plotting (theoretically) continuous functions.
bool fIncludeBaseLineFluctuationIntegrator
To simulate baseline fluctuation in the integrator output.
unsigned int fRunNumber
Tracks the number of runs.
bool fGeneratePreFETotalPulseOutput
To include the total pulse prior front-end in the output file.
Electronic front-end for the modules.
void Init()
Initialise the registry.
Describe your module. In one sentence.
bool fToggleTransferPhaseResponse
std::map< int, SignalInformation > SignalsMap
Map associating the information with IDs (meant to be from pixel's).
unsigned int fMinSPE
Minimum number of spe (inclusive).
Electronic front-end for the modules.
A TimeStamp holds GPS second and nanosecond for some event.
std::string fPulseFilename
Pulse output file filename.
Actual muon-sensitive objects.
std::vector< std::string > fPlotFileExtensions
File extensions for plots (dot included).
bool fInjectNoiseBinary
To inject noise in binary traces.
std::list< mdet::Pixel::SPE > PulseContainer
Wraps a message to logger (received as parameter or created here), its access and configuration...
utl::UnitsConfig fUnits
Units configuration.
unsigned int fNRepetitions
Repetitions for in-module loop.
bool fForcedSDTrigger
Ignore WCD trigger condition.
IntegratorSimulationType fIntegratorSimType
Type of integrator simulation. Step by step simulates the complete transfer functions and applies sat...
#define REGISTER_MODULE(_moduleName_, _ModuleType_)
bool fIgnoreCrossTalk
Ignore cross-talk effects.
Root detector of the muon detector hierarchy.
bool fToggleTransferAmpResponse
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.
std::set< ParticleType > fAllowedParticleTypes
Particle types that are considered to generate signal, if empty then every kind of particle is allowe...
InternalCounterCollection::ComponentIterator CounterIterator
utl::TraceC FrequencyTrace
bool fPlotTransferPhaseResponse
void Dump(const FEvent &fevent)
std::ofstream fPulseFile
Associated stream.
SimulationType fSimType
Type of simulation.
bool fPlotTransferAmpResponse
unsigned int fMaxSPE
Maximum number of spe (inclusive).
bool fGeneratePostFETotalPulseOutput
To include the total pulse after front-end in the output file.
unsigned int fNPulseSamples
Number of samples to use in the output files for pulses.
bool fGenerateSPEPulseOutput
To include individual pulses samples in the output file.