List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | Private Member Functions | Private Attributes
MdEventSelectorAG::MdEventSelector Class Reference

#include <MdEventSelector.h>

Inheritance diagram for MdEventSelectorAG::MdEventSelector:
Inheritance graph
[legend]

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::StopwatchGetStopwatch ()
 
const utl::StopwatchGetStopwatch () 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::CounterFindHottestCounter (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::CounterFindHottestCounterSaturated (const mevt::MEvent &me) const
 
const mevt::CounterFindHottestCounterUnsaturated (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::MDetectortheMDetector = nullptr
 

Detailed Description

Definition at line 30 of file MdEventSelector.h.

Member Enumeration Documentation

enum fwk::VModule::InfoLevel
protectedinherited
Enumerator
eInfoNone 
eInfoFinal 
eInfoIntermediate 
eInfoDebug 

Definition at line 125 of file VModule.h.

enum fwk::VModule::ResultFlag
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.

Definition at line 60 of file VModule.h.

Different types of version info that can be retrieved from GetVersionInfo.

Enumerator
eFilename 
eRevisionNumber 
eDate 
eTime 
eLastEditor 

Definition at line 110 of file VModule.h.

Constructor & Destructor Documentation

MdEventSelectorAG::MdEventSelector::MdEventSelector ( )

Definition at line 25 of file MdEventSelector.cc.

MdEventSelectorAG::MdEventSelector::~MdEventSelector ( )
virtual

Definition at line 29 of file MdEventSelector.cc.

Member Function Documentation

const mevt::Counter * MdEventSelectorAG::MdEventSelector::FindHottestCounter ( const mevt::MEvent me) const
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().

const mevt::Counter * MdEventSelectorAG::MdEventSelector::FindHottestCounterSaturated ( const mevt::MEvent me) const
private
const mevt::Counter * MdEventSelectorAG::MdEventSelector::FindHottestCounterUnsaturated ( const mevt::MEvent me) const
private
VModule::ResultFlag MdEventSelectorAG::MdEventSelector::Finish ( )
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.

std::string fwk::VModule::GetResultFlagByName ( const ResultFlag  flag)
staticinherited
utl::Stopwatch& fwk::VModule::GetStopwatch ( )
inlineinherited

Definition at line 106 of file VModule.h.

References fwk::VModule::fStopwatch.

const utl::Stopwatch& fwk::VModule::GetStopwatch ( ) const
inlineinherited

Definition at line 107 of file VModule.h.

References fwk::VModule::fStopwatch.

std::string fwk::VModule::GetVersionInfo ( const VersionInfoType  v) const
inherited
bool MdEventSelectorAG::MdEventSelector::HasEnoughDetectors ( const mevt::MEvent me) const
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().

VModule::ResultFlag MdEventSelectorAG::MdEventSelector::Init ( )
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().

void fwk::VModule::InitTiming ( )
inlineinherited

Definition at line 95 of file VModule.h.

References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().

bool MdEventSelectorAG::MdEventSelector::IsHighTheta ( const evt::Event e) const
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().

bool MdEventSelectorAG::MdEventSelector::IsMEventT5 ( const mevt::MEvent me) const
private
bool MdEventSelectorAG::MdEventSelector::IsTimeOutlier ( const double  md2sdTimeInterval,
const double  distance 
) const
private

Definition at line 372 of file MdEventSelector.cc.

MdEventSelectorAG::MdEventSelector::REGISTER_MODULE ( "MdEventSelectorAG"  ,
MdEventSelector   
)
private
void MdEventSelectorAG::MdEventSelector::RejectCloseSimDetectors ( mevt::MEvent me) const
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().

void MdEventSelectorAG::MdEventSelector::RejectDenseDetectors ( mevt::MEvent me) const
private
void MdEventSelectorAG::MdEventSelector::RejectFarSilents ( mevt::MEvent me) const
private
void MdEventSelectorAG::MdEventSelector::RejectTimeOutliers ( mevt::MEvent me,
const sevt::SEvent se 
) const
private
VModule::ResultFlag MdEventSelectorAG::MdEventSelector::Run ( evt::Event event)
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.

ResultFlag fwk::VModule::RunWithTiming ( evt::Event event)
inlineinherited
void MdEventSelectorAG::MdEventSelector::SetT5 ( evt::Event e,
const bool  t5 
) const
private

Member Data Documentation

double MdEventSelectorAG::MdEventSelector::fFirstCrownMaxDistance = 0
private

Definition at line 63 of file MdEventSelector.h.

double MdEventSelectorAG::MdEventSelector::fFirstCrownMinDistance = 0
private

Definition at line 62 of file MdEventSelector.h.

int fwk::VModule::fInfoLevel = 0
protectedinherited
double MdEventSelectorAG::MdEventSelector::fMaxTheta = 0
private

Definition at line 46 of file MdEventSelector.h.

unsigned int MdEventSelectorAG::MdEventSelector::fMinNumberOfCounters = 0
private

Definition at line 43 of file MdEventSelector.h.

bool MdEventSelectorAG::MdEventSelector::fRejectDenseStations = false
private

Definition at line 52 of file MdEventSelector.h.

bool MdEventSelectorAG::MdEventSelector::fRejectNonT5Events = false
private

Definition at line 48 of file MdEventSelector.h.

bool MdEventSelectorAG::MdEventSelector::fRejectSaturatedEvents = false
private

Definition at line 51 of file MdEventSelector.h.

bool MdEventSelectorAG::MdEventSelector::fRejectTimeOutlierCounters = false
private

Definition at line 55 of file MdEventSelector.h.

bool MdEventSelectorAG::MdEventSelector::fSelectEventByTheta = false
private

Definition at line 45 of file MdEventSelector.h.

double MdEventSelectorAG::MdEventSelector::fSilentRange = 0
private

Definition at line 44 of file MdEventSelector.h.

int MdEventSelectorAG::MdEventSelector::fT5NumberOfActiveStations = 0
private

Definition at line 49 of file MdEventSelector.h.

double MdEventSelectorAG::MdEventSelector::fTimeOutlierConstant = 0
private

Definition at line 58 of file MdEventSelector.h.

double MdEventSelectorAG::MdEventSelector::fTimeOutlierDistance = 0
private

Definition at line 57 of file MdEventSelector.h.

int MdEventSelectorAG::MdEventSelector::fTimeOutlierMuons = 0
private

Definition at line 56 of file MdEventSelector.h.

double MdEventSelectorAG::MdEventSelector::fTimeOutlierSlope = 0
private

Definition at line 59 of file MdEventSelector.h.

const mdet::MDetector* MdEventSelectorAG::MdEventSelector::theMDetector = nullptr
private

Definition at line 41 of file MdEventSelector.h.


The documentation for this class was generated from the following files:

, generated on Tue Sep 26 2023.