#include <MdEventSelector.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 () |
MdEventSelector () | |
fwk::VModule::ResultFlag | Run (evt::Event &event) |
Run: invoked once per event. More... | |
ResultFlag | RunWithTiming (evt::Event &event) |
virtual | ~MdEventSelector () |
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 | |
const mevt::Counter * | FindHottestCounter (const mevt::MEvent &me) const |
Find the hottest counter Two different algorithms are used to find the hottest counter depending if the event is saturated or not. If the event is saturated the saturated counter with more windows on is chosen as the hottest one. If the event is unsaturated the unsaturated counter with higher density is selected instead. More... | |
const mevt::Counter * | FindHottestCounterSaturated (const mevt::MEvent &me) const |
const mevt::Counter * | FindHottestCounterUnsaturated (const mevt::MEvent &me) const |
bool | HasEnoughDetectors (const mevt::MEvent &me) const |
Checks if the number of detector is enough to reconstruct the event Counts detectors with at least one muon. Saturated counters are used! More... | |
bool | IsHighTheta (const evt::Event &e) const |
Check if the zenith angle reconstructed by the Sd is higher than the fMAxTheta set in the configuration file. More... | |
bool | IsMEventT5 (const mevt::MEvent &me) const |
bool | IsTimeOutlier (const double md2sdTimeInterval, const double distance) const |
REGISTER_MODULE ("MdEventSelectorAG", MdEventSelector) | |
void | RejectCloseSimDetectors (mevt::MEvent &me) const |
Reject all modules of a detector if it is classified as inside a minimal distance in the simulations. Only applies to simulations! More... | |
void | RejectDenseDetectors (mevt::MEvent &me) const |
void | RejectFarSilents (mevt::MEvent &me) const |
void | RejectTimeOutliers (mevt::MEvent &me, const sevt::SEvent &se) const |
void | SetT5 (evt::Event &e, const bool t5) const |
Private Attributes | |
double | fFirstCrownMaxDistance = 0 |
double | fFirstCrownMinDistance = 0 |
double | fMaxTheta = 0 |
unsigned int | fMinNumberOfCounters = 0 |
bool | fRejectDenseStations = false |
bool | fRejectNonT5Events = false |
bool | fRejectSaturatedEvents = false |
bool | fRejectTimeOutlierCounters = false |
bool | fSelectEventByTheta = false |
double | fSilentRange = 0 |
int | fT5NumberOfActiveStations = 0 |
double | fTimeOutlierConstant = 0 |
double | fTimeOutlierDistance = 0 |
int | fTimeOutlierMuons = 0 |
double | fTimeOutlierSlope = 0 |
const mdet::MDetector * | theMDetector = nullptr |
Definition at line 30 of file MdEventSelector.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 |
MdEventSelectorAG::MdEventSelector::MdEventSelector | ( | ) |
Definition at line 25 of file MdEventSelector.cc.
|
virtual |
Definition at line 29 of file MdEventSelector.cc.
|
private |
Find the hottest counter Two different algorithms are used to find the hottest counter depending if the event is saturated or not. If the event is saturated the saturated counter with more windows on is chosen as the hottest one. If the event is unsaturated the unsaturated counter with higher density is selected instead.
Definition at line 199 of file MdEventSelector.cc.
References mevt::MEvent::IsSaturated().
|
private |
Definition at line 241 of file MdEventSelector.cc.
References mevt::MEvent::CountersBegin(), mevt::MEvent::CountersEnd(), and mevt::Counter::GetNumberOfChannelsOn().
|
private |
Definition at line 207 of file MdEventSelector.cc.
References mevt::MEvent::CountersBegin(), mevt::MEvent::CountersEnd(), and mevt::Counter::GetMuonDensity().
|
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 126 of file MdEventSelector.cc.
References io::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().
|
private |
Checks if the number of detector is enough to reconstruct the event Counts detectors with at least one muon. Saturated counters are used!
Definition at line 149 of file MdEventSelector.cc.
References mevt::MEvent::CountersBegin(), mevt::MEvent::CountersEnd(), and mevt::MEvent::GetNumberOfCandidateCounters().
|
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 34 of file MdEventSelector.cc.
References io::eSuccess, fwk::CentralConfig::GetInstance(), fwk::CentralConfig::GetTopBranch(), and utl::LoadConfig().
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
private |
Check if the zenith angle reconstructed by the Sd is higher than the fMAxTheta set in the configuration file.
Definition at line 275 of file MdEventSelector.cc.
References fwk::LocalCoordinateSystemConstructor< Policy >::Create(), utl::deg, ERROR, evt::ShowerSRecData::GetAxis(), evt::ShowerSRecData::GetCorePosition(), utl::BasicVector< HepVector >::GetTheta(), and evt::Event::HasRecShower().
|
private |
Definition at line 384 of file MdEventSelector.cc.
References mevt::MEvent::CountersBegin(), mevt::MEvent::CountersEnd(), mevt::Counter::GetId(), utl::Vector::GetMag(), and INFO.
|
private |
Definition at line 372 of file MdEventSelector.cc.
|
private |
|
private |
Reject all modules of a detector if it is classified as inside a minimal distance in the simulations. Only applies to simulations!
Definition at line 297 of file MdEventSelector.cc.
References mevt::MEvent::CountersBegin(), mevt::MEvent::CountersEnd(), and mevt::MEvent::GetNumberOfCandidateCounters().
|
private |
Definition at line 311 of file MdEventSelector.cc.
References mevt::MEvent::CountersBegin(), mevt::MEvent::CountersEnd(), mevt::MEvent::GetNumberOfCandidateCounters(), and mdet::Counter::IsDense().
|
private |
Definition at line 170 of file MdEventSelector.cc.
References mevt::MEvent::CountersBegin(), mevt::MEvent::CountersEnd(), mevt::Counter::GetId(), utl::Vector::GetMag(), and mevt::MEvent::GetNumberOfCandidateCounters().
|
private |
Definition at line 326 of file MdEventSelector.cc.
References mevt::MEvent::CountersBegin(), mevt::MEvent::CountersEnd(), mdet::Counter::GetAssociatedTankId(), det::DetectorComponent< C, ManagerProvider >::GetId(), mevt::MEvent::GetNumberOfCandidateCounters(), sevt::Station::GetRecData(), sevt::StationRecData::GetSignalStartTime(), sevt::StationRecData::GetSPDistance(), sevt::SEvent::GetStation(), sevt::Station::HasRecData(), sevt::SEvent::HasStation(), and INFO.
|
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 65 of file MdEventSelector.cc.
References utl::deg, io::eSuccess, sevt::SEvent::GetHeader(), sevt::Header::GetId(), evt::Event::HasMEvent(), INFO, mevt::MEvent::IsSaturated(), 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 133 of file MdEventSelector.cc.
References evt::ShowerRecData::GetMRecShower(), evt::ShowerRecData::HasMRecShower(), evt::Event::HasRecShower(), evt::ShowerRecData::MakeMRecShower(), evt::Event::MakeRecShower(), and evt::ShowerMRecData::SetT5Trigger().
|
private |
Definition at line 63 of file MdEventSelector.h.
|
private |
Definition at line 62 of file MdEventSelector.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 46 of file MdEventSelector.h.
|
private |
Definition at line 43 of file MdEventSelector.h.
|
private |
Definition at line 52 of file MdEventSelector.h.
|
private |
Definition at line 48 of file MdEventSelector.h.
|
private |
Definition at line 51 of file MdEventSelector.h.
|
private |
Definition at line 55 of file MdEventSelector.h.
|
private |
Definition at line 45 of file MdEventSelector.h.
|
private |
Definition at line 44 of file MdEventSelector.h.
|
private |
Definition at line 49 of file MdEventSelector.h.
|
private |
Definition at line 58 of file MdEventSelector.h.
|
private |
Definition at line 57 of file MdEventSelector.h.
|
private |
Definition at line 56 of file MdEventSelector.h.
|
private |
Definition at line 59 of file MdEventSelector.h.
|
private |
Definition at line 41 of file MdEventSelector.h.