Simulates the FLT, SLT, TLT and T3 of the telescopes. More...
#include <FdTriggerSimulator.h>
Public Types | |
enum | ETriggerLevel { eT3, eTLT, eSLT, eFLT, eNoTrigger } |
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 | |
FdTriggerSimulator () | |
fwk::VModule::ResultFlag | Finish () |
Finish method of the module. 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 () |
Init method of the module. More... | |
void | InitTiming () |
fwk::VModule::ResultFlag | Run (evt::Event &event) |
Run method of the module. More... | |
ResultFlag | RunWithTiming (evt::Event &event) |
~FdTriggerSimulator () | |
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 Types | |
typedef std::map< int, int > | FltTrace |
Private Member Functions | |
bool | AddEyeEvent (fevt::Eye &eye, evt::Event &event, TEyeEvent &EyeEvent) |
void | DoPixelList (int sltTimeOffset, const fdet::Telescope &detTel) |
Prepare list of pixel to be read-out. More... | |
bool | FLTSim (fevt::Telescope &tel) |
TMirrorEvent * | MakeMirrorEvent (fevt::Telescope &tel, const evt::Event &event, const utl::TimeInterval &offsetFdSd, int sltTimeOffset) |
REGISTER_MODULE ("FdTriggerSimulatorOG", FdTriggerSimulator) | |
int | ShiftEventToSLT (fevt::Telescope &tel, int sltTimeOffset) |
int | SLTSim (fevt::Telescope &tel) |
bool | T1Trigger (unsigned int chId, unsigned int pixelthreshold, unsigned int nSamp, const utl::TraceI &trace, fevt::PixelSimData &pixelSim, const fdet::Channel &detChannel) |
FLT algorithm. More... | |
int | T2Trigger (const fdet::Telescope &detTel, unsigned int lastFLTbin) |
SLT algorithm. More... | |
bool | T3Sim (TEyeEvent &eye, fevt::Eye &evtEye) |
unsigned int | TestPattern (const std::set< int > &pixInCycle, int col, int row, int &multipattern, std::vector< int > &usedInSlt) |
Method to search patterns in list. More... | |
bool | TLTSim (TMirrorEvent *tel, fevt::Telescope &evtTel) |
Private Attributes | |
std::list< int > | fChannelFLT |
std::list< int > | fChannelReadOutList |
int | fColRO |
std::map< int, FltTrace > | fFLT |
ETriggerLevel | fMaxSimTriggerLevel |
ETriggerLevel | fMinRequiredTriggerLevel |
std::map< int, int > | fMultiplicity |
int | fRowRO |
std::map< int, fevt::SLTData > | fSLT |
utl::TimeStamp | fStartMultiplicityTLT |
int | fTLTPrintLevel |
unsigned int | fVerbosity |
Simulates the FLT, SLT, TLT and T3 of the telescopes.
Definition at line 67 of file FdTriggerSimulator.h.
|
private |
Definition at line 136 of file FdTriggerSimulator.h.
Enumerator | |
---|---|
eT3 | |
eTLT | |
eSLT | |
eFLT | |
eNoTrigger |
Definition at line 70 of file FdTriggerSimulator.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 |
FdTriggerSimulator::FdTriggerSimulator | ( | ) |
Definition at line 147 of file FdTriggerSimulator.cc.
|
inline |
Definition at line 79 of file FdTriggerSimulator.h.
|
private |
Definition at line 2182 of file FdTriggerSimulator.cc.
References fevt::ComponentSelector::eHasData, fevt::ComponentSelector::eInDAQ, fdet::FDetector::GetEye(), fdet::Eye::GetFirstTelescopeId(), utl::TimeStamp::GetGPSSecond(), fevt::FEvent::GetHeader(), fevt::Eye::GetHeader(), fevt::Header::GetId(), evt::Header::GetId(), fevt::Eye::GetId(), fdet::Eye::GetLastTelescopeId(), fevt::Header::GetNEyes(), fevt::Eye::GetTelescope(), evt::Header::GetTime(), evt::Event::HasRawEvent(), fevt::Eye::HasTelescope(), INFO, fevt::Eye::MakeHeader(), fevt::Eye::MakeTelescope(), fevt::EyeHeader::SetEventClass(), fevt::EyeHeader::SetEventNumber(), fevt::EyeHeader::SetEventType(), fevt::Header::SetNEyes(), fevt::EyeHeader::SetRunNumber(), fevt::Eye::SetStatus(), fevt::Telescope::SetTimeOffset(), fevt::EyeHeader::SetTimeStamp(), fevt::Eye::TelescopesBegin(), and fevt::Eye::TelescopesEnd().
|
private |
Prepare list of pixel to be read-out.
Definition at line 975 of file FdTriggerSimulator.cc.
References RdGeoCeLDFFitter::c, fdet::Telescope::GetChannel(), fdet::Channel::GetFADCBinSize(), fdet::Channel::GetFADCTraceLength(), fdet::Telescope::GetLastPixelId(), fdet::Channel::GetVirtualChannelId(), ns, and G4StationSimulatorOG::p.
|
virtual |
Finish method of the module.
Implements fwk::VModule.
Definition at line 484 of file FdTriggerSimulator.cc.
References io::eSuccess.
|
private |
Definition at line 497 of file FdTriggerSimulator.cc.
References fevt::FdConstants::eTotal, fevt::Telescope::GetChannel(), fdet::Telescope::GetChannel(), fevt::Telescope::GetEyeId(), fevt::ChannelSimData::GetFADCTrace(), fevt::Telescope::GetId(), fdet::Telescope::GetLastPixelId(), fevt::PixelSimData::GetNumSamples(), fevt::PixelSimData::GetPhotonTrace(), fevt::Telescope::GetPixel(), fdet::Channel::GetPixelId(), fevt::Pixel::GetSimData(), fevt::Channel::GetSimData(), fevt::Telescope::GetSimData(), utl::Trace< T >::GetSize(), fevt::Pixel::GetStatus(), fevt::PixelSimData::GetThreshold(), fevt::Telescope::HasChannel(), fevt::ChannelSimData::HasFADCTrace(), fevt::PixelSimData::HasPhotonTrace(), fevt::Telescope::HasPixel(), fevt::Pixel::HasSimData(), fevt::Channel::HasSimData(), INFO, fevt::TelescopeSimData::SetNumberOfFltPixels(), fevt::TelescopeSimData::SetNumberOfFltPixelsFromBackground(), fevt::TelescopeSimData::SetNumberOfFltPixelsFromShower(), and fevt::TelescopeSimData::SetNumberOfPixelsWithShowerPhotons().
|
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 |
Init method of the module.
Implements fwk::VModule.
Definition at line 158 of file FdTriggerSimulator.cc.
References cevt::StationConstants::eNoTrigger, ERROR, io::eSuccess, utl::Branch::GetChild(), utl::Branch::GetData(), utl::UTCDateTime::GetTimeStamp(), fwk::CentralConfig::GetTopBranch(), INFO, and WARNING.
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
private |
Definition at line 1855 of file FdTriggerSimulator.cc.
References binsize, data, fevt::ComponentSelector::eDeSelected, fevt::ComponentSelector::eExists, fevt::ComponentSelector::eHasData, ERROR, fevt::FdConstants::eTotal, fdet::Telescope::GetCamera(), fevt::Telescope::GetChannel(), fdet::Telescope::GetChannel(), fevt::Telescope::GetEyeId(), fdet::Camera::GetFADCBinSize(), fevt::ChannelSimData::GetFADCTrace(), fdet::Camera::GetFADCTraceLength(), utl::TimeStamp::GetGPSNanoSecond(), utl::TimeStamp::GetGPSSecond(), fevt::FEvent::GetHeader(), fevt::Header::GetId(), fevt::Telescope::GetId(), fdet::Telescope::GetLastPixelId(), fevt::PixelSimData::GetMean(), fevt::TelescopeTriggerData::GetMultiplicity(), fevt::TelescopeSimData::GetPhotonsStartTime(), fevt::Telescope::GetPixel(), fdet::Channel::GetPixelId(), fevt::PixelSimData::GetRMS(), fevt::Pixel::GetSimData(), fevt::Channel::GetSimData(), fevt::Telescope::GetSimData(), utl::Trace< T >::GetSize(), fdet::Camera::GetSLTTraceLength(), fdet::Camera::GetSLTTriggerBin(), fevt::Pixel::GetStatus(), fevt::PixelSimData::GetThreshold(), fevt::Telescope::GetTriggerData(), fevt::Telescope::HasChannel(), fevt::Telescope::HasPixel(), INFO, fdet::Channel::IsVirtual(), fevt::TelescopeTriggerData::MakeMultiplicity(), fevt::Telescope::MakeTriggerData(), un2::Mean(), ns, fevt::TelescopeTriggerData::SetSLTData(), fevt::SLTData::SetSLTDataWord(), fevt::Telescope::SetStatus(), and FitterUtil::tracelength.
|
private |
|
virtual |
Run method of the module.
Implements fwk::VModule.
Definition at line 268 of file FdTriggerSimulator.cc.
References fwk::LocalCoordinateSystemConstructor< Policy >::Create(), degree, fevt::ComponentSelector::eDeSelected, cevt::StationConstants::eNoTrigger, ERROR, io::eSuccess, fevt::FEvent::EyesBegin(), fevt::FEvent::EyesEnd(), fdet::Telescope::GetAxis(), fdet::FDetector::GetEye(), evt::Event::GetHeader(), fevt::FEvent::GetHeader(), fevt::Header::GetId(), utl::BasicVector< HepVector >::GetPhi(), fdet::Telescope::GetPosition(), fdet::Eye::GetSDTimeOffset(), fdet::Eye::GetTelescope(), utl::BasicVector< HepVector >::GetTheta(), evt::Header::GetTime(), evt::Event::HasFEvent(), INFO, utl::kPi, utl::kSpeedOfLight, and WARNING.
|
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 668 of file FdTriggerSimulator.cc.
References ERROR, fdet::Camera::GetFADCBinSize(), fdet::Camera::GetFADCTraceLength(), fevt::TelescopeSimData::GetNumberOfPhotonBins(), fevt::Telescope::GetSimData(), fdet::Camera::GetSLTTriggerBin(), fdet::FDetector::GetTelescope(), ns, fevt::TelescopeSimData::SetNumberOfReadOutPixels(), and fevt::TelescopeSimData::SetSltTimeShift().
|
private |
Definition at line 623 of file FdTriggerSimulator.cc.
References fdet::Telescope::GetCamera(), fevt::Telescope::GetEyeId(), fdet::Camera::GetFADCTraceLength(), fevt::Telescope::GetId(), fevt::TelescopeSimData::GetNumberOfPhotonBins(), fevt::Telescope::GetSimData(), INFO, and fevt::TelescopeSimData::SetSltTriggerTime().
|
private |
FLT algorithm.
Definition at line 1254 of file FdTriggerSimulator.cc.
References fdet::Channel::GetFLTProlongation(), utl::Trace< T >::GetSize(), fevt::PixelSimData::SetFltDuration(), fevt::PixelSimData::SetFltTime(), fevt::PixelSimData::SetMaxBoxcarsum(), fevt::PixelSimData::SetMeanBoxcarsum(), fevt::PixelSimData::SetRmsBoxcarsum(), and sqrt().
|
private |
SLT algorithm.
Definition at line 1416 of file FdTriggerSimulator.cc.
References RdGeoCeLDFFitter::b, fdet::Telescope::GetChannel(), fdet::Channel::GetFADCBinSize(), fdet::Telescope::GetLastColumn(), ns, and fevt::SLTData::SetRowMask().
|
private |
Definition at line 807 of file FdTriggerSimulator.cc.
References EVENTCLASSIFIER_PARAMETERS_HEAT_2, EVENTCLASSIFIER_PARAMETERS_OLD, EVENTCLASSIFIER_PARAMETERS_STD, utl::UTCDateTime::GetTimeStamp(), fevt::Eye::GetTriggerData(), INFO, fevt::Eye::MakeTriggerData(), fevt::EyeTriggerData::SetT3Accepted(), fevt::EyeTriggerData::SetT3Class(), fevt::EyeTriggerData::SetT3NPixels(), fevt::EyeTriggerData::SetT3SDP(), and fevt::EyeTriggerData::SetT3Time().
|
private |
Method to search patterns in list.
Definition at line 1733 of file FdTriggerSimulator.cc.
References utl::abs(), RdGeoCeLDFFitter::c, FdTriggerSimulatorOG::kSltDiffEven, FdTriggerSimulatorOG::kSltDiffOdd, utl::m, and G4StationSimulatorOG::p.
|
private |
Definition at line 753 of file FdTriggerSimulator.cc.
References fevt::Telescope::GetTriggerData(), INFO, result, fevt::TelescopeTriggerData::SetTLTAccepted(), and fevt::TelescopeTriggerData::SetTLTLabel().
|
private |
Definition at line 132 of file FdTriggerSimulator.h.
|
private |
Definition at line 133 of file FdTriggerSimulator.h.
|
private |
Definition at line 128 of file FdTriggerSimulator.h.
|
private |
Definition at line 137 of file FdTriggerSimulator.h.
|
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 126 of file FdTriggerSimulator.h.
|
private |
Definition at line 125 of file FdTriggerSimulator.h.
|
private |
Definition at line 138 of file FdTriggerSimulator.h.
|
private |
Definition at line 129 of file FdTriggerSimulator.h.
|
private |
Definition at line 141 of file FdTriggerSimulator.h.
|
private |
Definition at line 145 of file FdTriggerSimulator.h.
|
private |
Definition at line 144 of file FdTriggerSimulator.h.
|
private |
Definition at line 127 of file FdTriggerSimulator.h.