Simulates filter and FADC sampling for SD. More...
#include "Modules/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h"
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 | |
fwk::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... | |
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) |
SdFilterFADCSimulator () | |
virtual | ~SdFilterFADCSimulator () |
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 | FillConvolResult (utl::TimeDistributionD &convRes, const utl::TimeDistributionD &trace, bool IsASCII) |
template<typename T > | |
void | FillFADCTraces (utl::TimeDistribution< T > &trace, const unsigned int traceLength, const double binSize, const utl::TimeDistributionD &convRes, const double gain, const double tickTime, const double delay, const std::vector< double > &tau, const std::vector< double > &l) |
void | NormalizeFrequencyResponse (bool IsASCII) |
bool | ReadImpulseResponse () |
REGISTER_MODULE ("SdFilterFADCSimulatorASCII", SdFilterFADCSimulator) | |
bool | SetImpulseResponse_ASCII () |
void | SimulateUndershoot (utl::TimeDistributionD &trace, const double timeconst, const double ampl=1, const int postfix=0) |
Private Attributes | |
std::vector< double > | fAmplAn |
std::vector< double > | fAmplDyn |
double | fAmplSaturation |
double | fAnodeMultiplier |
double | fCurrent2VoltageMultiplier |
double | fDynode2AnodeDelay |
double | fDynodeMultiplier |
std::string | filename |
utl::TraceD | fImpulseResponse |
utl::TraceD | fImpulseResponse_ASCII |
utl::RandomEngine * | fRandomEngine |
bool | fStoreBaseSignals |
bool | fStoreFilterSignals |
std::vector< double > | fTauAn |
std::vector< double > | fTauDyn |
double | fVoltage2FADCMultiplier |
Simulates filter and FADC sampling for SD.
Definition at line 45 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
|
protectedinherited |
|
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 |
SdFilterFADCSimulator::SdFilterFADCSimulator | ( | ) |
Definition at line 63 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.cc.
|
inlinevirtual |
Definition at line 49 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
|
private |
Definition at line 338 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.cc.
References utl::TimeDistribution< T >::AddTime(), utl::TimeDistribution< T >::At(), utl::TimeDistribution< T >::Clear(), deletey(), fImpulseResponse, fImpulseResponse_ASCII, utl::Trace< T >::GetSize(), utl::TimeDistribution< T >::GetStart(), utl::TimeDistribution< T >::GetStop(), and newy().
Referenced by NormalizeFrequencyResponse(), and Run().
|
private |
Definition at line 156 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.cc.
References utl::TimeDistribution< T >::At(), utl::TimeDistribution< T >::Clear(), fCurrent2VoltageMultiplier, fVoltage2FADCMultiplier, gain, utl::TimeDistribution< T >::GetBinning(), utl::TimeDistribution< T >::GetStart(), utl::TimeDistribution< T >::GetStop(), utl::TimeDistribution< T >::SetTime(), and SimulateUndershoot().
Referenced by Run().
|
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 310 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.cc.
References fwk::VModule::eSuccess.
|
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.
|
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 76 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.cc.
References fwk::VModule::eFailure, ERROR, fwk::VModule::eSuccess, fAmplAn, fAmplDyn, fAmplSaturation, fAnodeMultiplier, fCurrent2VoltageMultiplier, fDynode2AnodeDelay, fDynodeMultiplier, filename, fRandomEngine, fStoreBaseSignals, fStoreFilterSignals, fTauAn, fTauDyn, fVoltage2FADCMultiplier, utl::Branch::GetChild(), utl::Branch::GetData(), utl::Branch::GetTopBranch(), INFO, utl::ms, NormalizeFrequencyResponse(), ReadImpulseResponse(), SetImpulseResponse_ASCII(), utl::StringEquivalent(), and galactic::volt.
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
private |
Definition at line 374 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.cc.
References utl::TimeDistribution< T >::AddTime(), utl::Trace< T >::Begin(), utl::Trace< T >::End(), FillConvolResult(), fImpulseResponse, fImpulseResponse_ASCII, utl::nanosecond, RdBeamFormer::norm(), utl::TimeDistribution< T >::SparseBegin(), and utl::TimeDistribution< T >::SparseEnd().
Referenced by Init().
|
private |
Definition at line 437 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.cc.
References ERROR, filename, fImpulseResponse, utl::nanosecond, utl::Trace< T >::PushBack(), and utl::Trace< T >::SetBinning().
Referenced by Init().
|
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 190 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.cc.
References sevt::PMTSimData::BaseSignalsBegin(), sevt::PMTSimData::BaseSignalsEnd(), sevt::PMTSimData::ClearBaseSignals(), sdet::PMTConstants::eAnyType, fwk::VModule::eFailure, sdet::PMTConstants::eHighGain, sdet::PMTConstants::eLowGain, sdet::PMTConstants::eScintillator, fwk::VModule::eSuccess, sevt::StationConstants::eTotal, fAmplAn, fAmplDyn, fAnodeMultiplier, fDynode2AnodeDelay, fDynodeMultiplier, FillConvolResult(), FillFADCTraces(), fRandomEngine, fStoreBaseSignals, fStoreFilterSignals, fTauAn, fTauDyn, sevt::PMTSimData::GetBaseSignal(), utl::TimeDistribution< T >::GetBinning(), utl::RandomEngine::GetEngine(), sdet::Station::GetFADCBinSize(), sevt::PMTSimData::GetFADCTrace(), sevt::PMTSimData::GetFADCTraceD(), sdet::Station::GetFADCTraceLength(), sevt::PMTSimData::GetFilterSignal(), utl::TimeDistribution< T >::GetStart(), sevt::PMTSimData::HasFADCTrace(), sevt::PMTSimData::HasFilterSignal(), evt::Event::HasSEvent(), INFO, sevt::PMTSimData::MakeFADCTrace(), sevt::PMTSimData::MakeFilterSignal(), max, utl::nanosecond, ns, sevt::SEvent::StationsBegin(), and sevt::SEvent::StationsEnd().
|
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().
|
private |
Definition at line 408 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.cc.
References fImpulseResponse_ASCII, max, utl::nanosecond, RdBeamFormer::norm(), utl::Trace< T >::PushBack(), and utl::Trace< T >::SetBinning().
Referenced by Init().
|
private |
The SimulateUndershoot function applies a high pass filter to the trace. A certain number of bins can be appended to the trace.
Definition at line 497 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.cc.
References fAmplSaturation, fCurrent2VoltageMultiplier, utl::TimeDistribution< T >::GetBinning(), utl::TimeDistribution< T >::GetStart(), utl::TimeDistribution< T >::GetStop(), and galactic::volt.
Referenced by FillFADCTraces().
|
private |
Definition at line 61 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
|
private |
Definition at line 61 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
|
private |
Definition at line 62 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
Referenced by Init(), and SimulateUndershoot().
|
private |
Definition at line 56 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
|
private |
Definition at line 58 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
Referenced by FillFADCTraces(), Init(), and SimulateUndershoot().
|
private |
Definition at line 60 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
|
private |
Definition at line 57 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
|
private |
Definition at line 92 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
Referenced by Init(), and ReadImpulseResponse().
|
private |
Definition at line 69 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
Referenced by FillConvolResult(), NormalizeFrequencyResponse(), and ReadImpulseResponse().
|
private |
Definition at line 69 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
Referenced by FillConvolResult(), NormalizeFrequencyResponse(), and SetImpulseResponse_ASCII().
|
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 |
Definition at line 66 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
|
private |
Definition at line 64 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
|
private |
Definition at line 63 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
|
private |
Definition at line 61 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
|
private |
Definition at line 61 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
|
private |
Definition at line 59 of file Deprecated/UpgradeASCIITests/SdFilterFADCSimulatorASCII/SdFilterFADCSimulator.h.
Referenced by FillFADCTraces(), and Init().