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

Estimates the number of muons using the information of the pattern matches in every channel of every module. More...

#include <MdMuonEstimatorAG/MdMuonEstimator.h>

Inheritance diagram for MdMuonEstimatorAG::MdMuonEstimator:
Inheritance graph
[legend]

Public Types

enum  CountingStrategyType { eOneBin, eNBin, eNBinCentered, eInfiniteWindow }
 Kind of possible counting strategies to be used. More...
 
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

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...
 
VModule::ResultFlag Init ()
 Initialize: invoked at beginning of run (NOT beginning of event) More...
 
void InitTiming ()
 
 MdMuonEstimator ()
 
VModule::ResultFlag Run (evt::Event &event)
 Run: invoked once per event. More...
 
ResultFlag RunWithTiming (evt::Event &event)
 
 ~MdMuonEstimator ()
 

Static Public Member Functions

static std::string GetResultFlagByName (const ResultFlag flag)
 

Static Public Attributes

static const char *const kCountingStrategyTags [] = { "OneBin", "NBin", "NBinCentered", "InfiniteWindow" }
 Tags for the types of strategies. More...
 

Protected Types

enum  InfoLevel { eInfoNone = 0, eInfoFinal = 1, eInfoIntermediate = 2, eInfoDebug = 3 }
 

Protected Attributes

int fInfoLevel = 0
 

Private Member Functions

void EstimateNumberOfMuons (mevt::Module &module, std::vector< std::pair< unsigned int, unsigned int >> vModulePatternMatches) const
 Estimate the number of muons and its error with the chosen strategy. More...
 
void FillChannelsOn (mevt::Module &m, const std::vector< std::pair< unsigned int, unsigned int >> &, const mdet::Module &) const
 Calculate the number of channels with signal per time window. More...
 
std::vector< std::pair
< unsigned int, unsigned int > > 
GetModulePatternMatches (mevt::Module &m) const
 Get a vector with the channel ids and bin numbers of the pattern matches. More...
 
double GetSamplingTime (evt::Event &event) const
 Get the sampling time of any (non-rejected) module of the event. More...
 
unsigned int GetTraceLength (evt::Event &event) const
 Get the trace length of any (non-rejected) module of the event. More...
 
void LoadPatternMatchesInModuleRecData (mevt::Module &m, const std::vector< std::pair< unsigned int, unsigned int >> &, const mdet::Module &) const
 Load the pattern matches of the channels of a module to moduleRecData. More...
 
 REGISTER_MODULE ("MdMuonEstimatorAG", MdMuonEstimator)
 
void SetSegmentationAndArea (mevt::Module &module, const mdet::Module &mdetModule) const
 Set the segmentation (active segments) and (active) area of the reconstructed module. More...
 

Private Attributes

CountingStrategyType fCountingStrategy
 Counting stategy to be performed. More...
 
unsigned int fCountingWindowSize
 The number of bins in the considered windows of the counting strategies. More...
 
std::unique_ptr
< VMuonEstimatorFunctor
fEstimator
 Object performing the estimation. More...
 
utl::MessageLoggerConfig fLog
 Output messages handler. More...
 
unsigned int fNBinWindowSize
 The number of bins in the window of the NBin and NBinCentered strategies (set by user) More...
 
utl::UnitsConfig fUnits
 Units configuration. More...
 

Detailed Description

Estimates the number of muons using the information of the pattern matches in every channel of every module.

Perform offline trace analysis to estimate the number of muons at module level.

Now here a longer description in doxygen. You may use HTML.

Author
Rodolfo Federico Gamarra
Date
08 Sep 2009
Version
Author
Rodolfo Federico Gamarra
Date
08 Sep 2009

Definition at line 39 of file MdMuonEstimator.h.

Member Enumeration Documentation

Kind of possible counting strategies to be used.

Enumerator
eOneBin 
eNBin 
eNBinCentered 
eInfiniteWindow 

Definition at line 43 of file MdMuonEstimator.h.

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

MdMuonEstimatorAG::MdMuonEstimator::MdMuonEstimator ( )
inline

Definition at line 52 of file MdMuonEstimator.h.

MdMuonEstimatorAG::MdMuonEstimator::~MdMuonEstimator ( )
inline

Definition at line 53 of file MdMuonEstimator.h.

Member Function Documentation

void MdMuonEstimatorAG::MdMuonEstimator::EstimateNumberOfMuons ( mevt::Module module,
std::vector< std::pair< unsigned int, unsigned int >>  vModulePatternMatches 
) const
private
void MdMuonEstimatorAG::MdMuonEstimator::FillChannelsOn ( mevt::Module m,
const std::vector< std::pair< unsigned int, unsigned int >> &  vModulePatternMatches,
const mdet::Module mdetModule 
) const
private
VModule::ResultFlag MdMuonEstimatorAG::MdMuonEstimator::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 188 of file MdMuonEstimator.cc.

References io::eSuccess.

std::vector< std::pair< unsigned int, unsigned int > > MdMuonEstimatorAG::MdMuonEstimator::GetModulePatternMatches ( mevt::Module m) const
private

Get a vector with the channel ids and bin numbers of the pattern matches.

Definition at line 279 of file MdMuonEstimator.cc.

References mevt::Module::ChannelsBegin(), and mevt::Module::ChannelsEnd().

std::string fwk::VModule::GetResultFlagByName ( const ResultFlag  flag)
staticinherited
double MdMuonEstimatorAG::MdMuonEstimator::GetSamplingTime ( evt::Event event) const
private
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.

unsigned int MdMuonEstimatorAG::MdMuonEstimator::GetTraceLength ( evt::Event event) const
private
std::string fwk::VModule::GetVersionInfo ( const VersionInfoType  v) const
inherited
VModule::ResultFlag MdMuonEstimatorAG::MdMuonEstimator::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 47 of file MdMuonEstimator.cc.

References utl::ConsecutiveEnumFactory< EnumType, last, tags, NoConversionPolicy, first >::Create(), DEBUGLOG, io::eSuccess, fwk::CentralConfig::GetInstance(), fwk::CentralConfig::GetTopBranch(), utl::LoadConfig(), and utl::ns.

void fwk::VModule::InitTiming ( )
inlineinherited

Definition at line 95 of file VModule.h.

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

void MdMuonEstimatorAG::MdMuonEstimator::LoadPatternMatchesInModuleRecData ( mevt::Module m,
const std::vector< std::pair< unsigned int, unsigned int >> &  vModulePatternMatches,
const mdet::Module mdetModule 
) const
private
MdMuonEstimatorAG::MdMuonEstimator::REGISTER_MODULE ( "MdMuonEstimatorAG"  ,
MdMuonEstimator   
)
private
VModule::ResultFlag MdMuonEstimatorAG::MdMuonEstimator::Run ( evt::Event event)
virtual
ResultFlag fwk::VModule::RunWithTiming ( evt::Event event)
inlineinherited
void MdMuonEstimatorAG::MdMuonEstimator::SetSegmentationAndArea ( mevt::Module module,
const mdet::Module mdetModule 
) const
private

Member Data Documentation

CountingStrategyType MdMuonEstimatorAG::MdMuonEstimator::fCountingStrategy
private

Counting stategy to be performed.

Definition at line 69 of file MdMuonEstimator.h.

unsigned int MdMuonEstimatorAG::MdMuonEstimator::fCountingWindowSize
private

The number of bins in the considered windows of the counting strategies.

Definition at line 63 of file MdMuonEstimator.h.

std::unique_ptr<VMuonEstimatorFunctor> MdMuonEstimatorAG::MdMuonEstimator::fEstimator
private

Object performing the estimation.

Definition at line 72 of file MdMuonEstimator.h.

int fwk::VModule::fInfoLevel = 0
protectedinherited
utl::MessageLoggerConfig MdMuonEstimatorAG::MdMuonEstimator::fLog
private

Output messages handler.

Definition at line 60 of file MdMuonEstimator.h.

unsigned int MdMuonEstimatorAG::MdMuonEstimator::fNBinWindowSize
private

The number of bins in the window of the NBin and NBinCentered strategies (set by user)

Definition at line 66 of file MdMuonEstimator.h.

utl::UnitsConfig MdMuonEstimatorAG::MdMuonEstimator::fUnits
private

Units configuration.

Definition at line 75 of file MdMuonEstimator.h.

const char *const MdMuonEstimatorAG::MdMuonEstimator::kCountingStrategyTags = { "OneBin", "NBin", "NBinCentered", "InfiniteWindow" }
static

Tags for the types of strategies.

Definition at line 50 of file MdMuonEstimator.h.


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

, generated on Tue Sep 26 2023.