Module that re-implements top down selection algorithm by Olivier Deligny based on gap 2003-003. More...
#include <TopDownSelector.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) |
TopDownSelector () | |
virtual | ~TopDownSelector () |
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 | |
enum | TimeCorrectionType { eNone = 0, eAltitude = 1, eCurved = 2, eAltitudeCurved = 3 } |
Private Member Functions | |
double | CorrectTimeAltitude (int) |
double | CorrectTimeAltitudeCurv (int) |
bool | EstimateCore () |
double | EstimatedAzimuth (const std::string &s) |
double | EstimatedZenith (const std::string &s) |
void | InitializeEvent () |
bool | IsAligned () |
bool | IsGoodSpaceConfig () |
bool | IsGoodTimeConfig (TimeCorrectionType correctionType) |
bool | PatternRecovering () |
bool | Recover3Stations () |
REGISTER_MODULE ("TopDownSelector", TopDownSelector) | |
void | RemoveDoublets () |
void | RemoveEA () |
void | RemoveIsolatedStations () |
void | RemoveRandomStations () |
bool | Select () |
bool | TryRemovingStations (int) |
Private Attributes | |
utl::Vector | fAxis |
utl::Vector | fBarycenter |
double | fBaryTime |
std::vector< unsigned int > | fIndexes |
bool | fIsLastTimingIteration |
unsigned int | fNMaxRemovedStations |
unsigned int | fNMinStations |
bool | fRejectNonT4Events |
std::vector< double > | fResiduals |
sevt::SEvent * | fSEvent |
std::vector< StationPairStatus > | fStations |
double | fT0 |
double | fTCore |
double | fU |
double | fV |
int | fVerbose |
double | fXCore |
double | fYCore |
double | fZCore |
double | kAna3RatMin |
double | kAreaMax |
double | kAreaMin |
double | kBaryPower |
double | kCurv0 |
double | kDistMax |
double | kIsoDist1 |
double | kIsoDist2 |
double | kIsoTime1 |
double | kIsoTime2 |
double | kTolRes |
double | kTolResM |
Module that re-implements top down selection algorithm by Olivier Deligny based on gap 2003-003.
I'm assuming all rejection of stations based on DAQ errors, bad altitude, external triggers are handled by the framework already. Sub threshold, 3-fold events and lightning rejection are missing as well, these should be added soon.
There is a bit more detail in the reference manual.Definition at line 69 of file TopDownSelector.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. |
Enumerator | |
---|---|
eNone | |
eAltitude | |
eCurved | |
eAltitudeCurved |
Definition at line 106 of file TopDownSelector.h.
|
inherited |
TopDownSelector::TopDownSelector | ( | ) |
Definition at line 34 of file TopDownSelector.cc.
|
inlinevirtual |
Definition at line 73 of file TopDownSelector.h.
|
private |
Definition at line 414 of file TopDownSelector.cc.
References fStations, fU, fV, fZCore, is(), utl::kSpeedOfLight, max, and sqrt().
Referenced by IsGoodTimeConfig().
|
private |
Definition at line 424 of file TopDownSelector.cc.
References fStations, fU, fV, fZCore, is(), kCurv0, utl::kSpeedOfLight, max, std::pow(), and sqrt().
Referenced by IsGoodTimeConfig().
|
private |
Definition at line 360 of file TopDownSelector.cc.
References fBarycenter, fBaryTime, fSEvent, fStations, fTCore, fVerbose, fXCore, fYCore, fZCore, sdet::Station::GetPosition(), sevt::Station::GetRecData(), sevt::StationRecData::GetSignalStartTime(), sdet::SDetector::GetStation(), sevt::EventTrigger::GetTime(), sevt::StationRecData::GetTotalSignal(), sevt::SEvent::GetTrigger(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), utl::BasicVector< HepVector >::GetZ(), is(), and kBaryPower.
Referenced by PatternRecovering(), and Recover3Stations().
|
private |
Definition at line 668 of file TopDownSelector.cc.
|
private |
|
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 111 of file TopDownSelector.cc.
References fwk::VModule::eSuccess, and INFO.
|
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 50 of file TopDownSelector.cc.
References fwk::VModule::eSuccess, fNMaxRemovedStations, fNMinStations, fRejectNonT4Events, fVerbose, utl::Branch::GetChild(), utl::Branch::GetData(), utl::Branch::GetTopBranch(), INFO, kAna3RatMin, kAreaMax, kAreaMin, kBaryPower, kCurv0, kDistMax, kIsoDist1, kIsoDist2, kIsoTime1, kIsoTime2, kTolRes, and kTolResM.
|
private |
Definition at line 193 of file TopDownSelector.cc.
References TopDownSelectorNS::StationPairStatus::candidate, sevt::SEvent::CandidateStationsBegin(), sevt::SEvent::CandidateStationsEnd(), TopDownSelectorNS::StationPairStatus::detector, TopDownSelectorNS::StationPairStatus::event, fSEvent, fStations, sdet::SDetector::GetStation(), RemoveDoublets(), RemoveEA(), RemoveIsolatedStations(), and sevt::SEvent::SortStations().
Referenced by Select().
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
private |
Definition at line 602 of file TopDownSelector.cc.
References fStations, is(), ns, and sqrt().
Referenced by PatternRecovering().
|
private |
Definition at line 566 of file TopDownSelector.cc.
References fStations, fU, fV, fVerbose, fXCore, fYCore, ns, and std::pow().
Referenced by PatternRecovering().
|
private |
Definition at line 440 of file TopDownSelector.cc.
References bFirstIteration, CorrectTimeAltitude(), CorrectTimeAltitudeCurv(), eAltitude, eAltitudeCurved, eNone, fBaryTime, fIsLastTimingIteration, fResiduals, fSEvent, fStations, fT0, fU, fV, fVerbose, fXCore, fYCore, sevt::EventTrigger::GetTime(), sevt::SEvent::GetTrigger(), INFO, is(), utl::kSpeedOfLight, kTolRes, kTolResM, max, ns, and sqrt().
Referenced by PatternRecovering(), and Recover3Stations().
|
private |
Definition at line 307 of file TopDownSelector.cc.
References eAltitude, eNone, EstimateCore(), fIsLastTimingIteration, fNMinStations, fStations, is(), IsAligned(), IsGoodSpaceConfig(), IsGoodTimeConfig(), ns, and Recover3Stations().
Referenced by Select(), and TryRemovingStations().
|
private |
Definition at line 677 of file TopDownSelector.cc.
References eAltitude, EstimateCore(), fIsLastTimingIteration, fStations, fU, fV, sdet::Station::GetPosition(), sdet::SDetector::GetStation(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), IsGoodTimeConfig(), kAreaMax, kAreaMin, kDistMax, utl::kSpeedOfLight, max, ns, and std::pow().
Referenced by PatternRecovering().
|
private |
|
private |
Definition at line 229 of file TopDownSelector.cc.
References sevt::SEvent::CandidateStationsBegin(), sevt::SEvent::CandidateStationsEnd(), sevt::StationConstants::eOffGrid, fSEvent, sdet::SDetector::GetStation(), and sdet::Station::IsInGrid().
Referenced by InitializeEvent().
|
private |
Definition at line 214 of file TopDownSelector.cc.
References sevt::SEvent::CandidateStationsBegin(), sevt::SEvent::CandidateStationsEnd(), sevt::StationConstants::eEngineeringArray, and fSEvent.
Referenced by InitializeEvent().
|
private |
Definition at line 244 of file TopDownSelector.cc.
References sevt::SEvent::CandidateStationsBegin(), sevt::SEvent::CandidateStationsEnd(), sevt::StationConstants::eLonely, fSEvent, sdet::Station::GetPosition(), sdet::SDetector::GetStation(), kIsoDist1, kIsoDist2, kIsoTime1, and kIsoTime2.
Referenced by InitializeEvent().
|
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 79 of file TopDownSelector.cc.
References fwk::VModule::eContinueLoop, fwk::VModule::eSuccess, fRejectNonT4Events, fSEvent, evt::Event::GetRecShower(), sevt::SEvent::GetTrigger(), evt::Event::HasRecShower(), evt::Event::HasSEvent(), evt::ShowerRecData::HasSRecShower(), INFO, sevt::EventTrigger::IsFD(), evt::Event::MakeRecShower(), evt::ShowerRecData::MakeSRecShower(), Select(), and evt::ShowerSRecData::SetT4Trigger().
|
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 123 of file TopDownSelector.cc.
References bFirstIteration, sevt::StationConstants::eOutOfTime, EstimatedZenith(), fIndexes, fNMaxRemovedStations, fNMinStations, fStations, fVerbose, InitializeEvent(), ns, PatternRecovering(), and TryRemovingStations().
Referenced by Run().
|
private |
Definition at line 337 of file TopDownSelector.cc.
References fIndexes, fStations, is(), and PatternRecovering().
Referenced by Select().
|
private |
Definition at line 82 of file TopDownSelector.h.
|
private |
Definition at line 81 of file TopDownSelector.h.
Referenced by EstimateCore().
|
private |
Definition at line 80 of file TopDownSelector.h.
Referenced by EstimateCore(), and IsGoodTimeConfig().
|
private |
Definition at line 128 of file TopDownSelector.h.
Referenced by Select(), and TryRemovingStations().
|
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 130 of file TopDownSelector.h.
Referenced by IsGoodTimeConfig(), PatternRecovering(), and Recover3Stations().
|
private |
Definition at line 129 of file TopDownSelector.h.
|
private |
Definition at line 129 of file TopDownSelector.h.
Referenced by Init(), PatternRecovering(), and Select().
|
private |
Definition at line 92 of file TopDownSelector.h.
|
private |
Definition at line 87 of file TopDownSelector.h.
Referenced by IsGoodTimeConfig().
|
private |
Definition at line 83 of file TopDownSelector.h.
Referenced by EstimateCore(), InitializeEvent(), IsGoodTimeConfig(), RemoveDoublets(), RemoveEA(), RemoveIsolatedStations(), and Run().
|
private |
Definition at line 88 of file TopDownSelector.h.
Referenced by CorrectTimeAltitude(), CorrectTimeAltitudeCurv(), EstimateCore(), InitializeEvent(), IsAligned(), IsGoodSpaceConfig(), IsGoodTimeConfig(), PatternRecovering(), Recover3Stations(), Select(), and TryRemovingStations().
|
private |
Definition at line 126 of file TopDownSelector.h.
Referenced by IsGoodTimeConfig().
|
private |
Definition at line 127 of file TopDownSelector.h.
Referenced by EstimateCore().
|
private |
Definition at line 126 of file TopDownSelector.h.
Referenced by CorrectTimeAltitude(), CorrectTimeAltitudeCurv(), EstimatedAzimuth(), EstimatedZenith(), IsGoodSpaceConfig(), IsGoodTimeConfig(), and Recover3Stations().
|
private |
Definition at line 126 of file TopDownSelector.h.
Referenced by CorrectTimeAltitude(), CorrectTimeAltitudeCurv(), EstimatedAzimuth(), EstimatedZenith(), IsGoodSpaceConfig(), IsGoodTimeConfig(), and Recover3Stations().
|
private |
Definition at line 91 of file TopDownSelector.h.
Referenced by EstimateCore(), Init(), IsGoodSpaceConfig(), IsGoodTimeConfig(), and Select().
|
private |
Definition at line 127 of file TopDownSelector.h.
Referenced by EstimateCore(), IsGoodSpaceConfig(), and IsGoodTimeConfig().
|
private |
Definition at line 127 of file TopDownSelector.h.
Referenced by EstimateCore(), IsGoodSpaceConfig(), and IsGoodTimeConfig().
|
private |
Definition at line 127 of file TopDownSelector.h.
Referenced by CorrectTimeAltitude(), CorrectTimeAltitudeCurv(), and EstimateCore().
|
private |
Definition at line 101 of file TopDownSelector.h.
Referenced by Init().
|
private |
Definition at line 100 of file TopDownSelector.h.
Referenced by Init(), and Recover3Stations().
|
private |
Definition at line 99 of file TopDownSelector.h.
Referenced by Init(), and Recover3Stations().
|
private |
Definition at line 93 of file TopDownSelector.h.
Referenced by EstimateCore(), and Init().
|
private |
Definition at line 98 of file TopDownSelector.h.
Referenced by CorrectTimeAltitudeCurv(), and Init().
|
private |
Definition at line 102 of file TopDownSelector.h.
Referenced by Init(), and Recover3Stations().
|
private |
Definition at line 96 of file TopDownSelector.h.
Referenced by Init(), and RemoveIsolatedStations().
|
private |
Definition at line 97 of file TopDownSelector.h.
Referenced by Init(), and RemoveIsolatedStations().
|
private |
Definition at line 103 of file TopDownSelector.h.
Referenced by Init(), and RemoveIsolatedStations().
|
private |
Definition at line 104 of file TopDownSelector.h.
Referenced by Init(), and RemoveIsolatedStations().
|
private |
Definition at line 94 of file TopDownSelector.h.
Referenced by Init(), and IsGoodTimeConfig().
|
private |
Definition at line 95 of file TopDownSelector.h.
Referenced by Init(), and IsGoodTimeConfig().