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

Describe your module. In one sentence. More...

#include <MdMuonCounterAG/MdMuonCounter.h>

Inheritance diagram for MdMuonCounterAG::MdMuonCounter:
Inheritance graph
[legend]

Public Types

enum  ResultFlag { eSuccess, eFailure, eBreakLoop, eContinueLoop }
 Flag returned by module methods to the RunController. More...
 
enum  Strategy {
  eGap, eGapRelax, eAmountInWindow, eConsecutive,
  eAmountGlobal
}
 Kind of possible counting criteria to be used. 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 ()
 
 MdMuonCounter ()
 
VModule::ResultFlag Run (evt::Event &e)
 Run: invoked once per event. More...
 
ResultFlag RunWithTiming (evt::Event &event)
 
 ~MdMuonCounter ()
 

Static Public Member Functions

static std::string GetResultFlagByName (const ResultFlag flag)
 

Static Public Attributes

static const char *const kStrategyTags [] = { "Gap", "GapRelax", "AmountInWindow", "Consecutive", "AmountGlobal" }
 Tags for the types of strategy. More...
 

Protected Types

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

Protected Attributes

int fInfoLevel = 0
 

Private Types

typedef std::map< int, double > TModuleDelay
 

Private Member Functions

double ComputeSignalT50 (mevt::Counter &, const utl::Vector &rAxis) const
 Set the median arrival time of muons in a counter combining the signals recorded by all associated modules. More...
 
void DowngradeTrace (utl::TraceB &trace, unsigned int dataReduction=4)
 convert trace from 320Mhz sampling to 80Mhz storing. More...
 
double EstimateNumberOfMuons (const utl::TraceUI &, const size_t segmentation) const
 Calculate the maximum likelihood estimator of the number of muons in this module. More...
 
unsigned int FillChannelRecData (mevt::Channel &ch)
 Fill the data reconstructed for a channel. More...
 
void FillChannelsOn (mevt::Module &m, const std::vector< unsigned int > &, const mdet::Module &) const
 Calculate the number of windows with a signal per time window. More...
 
void FillModuleRecData (mevt::Module &m, const mdet::Module &)
 Fill the data reconstructed for a module. More...
 
double GetMedian (const std::vector< double > v) const
 
std::vector< unsigned int > GetPatternMatchBins (mevt::Module &m)
 Get a vector with the bin numbers of the pattern matches for all channels. More...
 
utl::TimeStamp GetSdTraceStartTime (const evt::Event &, const int counterId) const
 
double GetTimeCorrection (const utl::Vector &dposition, const utl::Vector &axis) const
 
utl::TimeInterval GetTraceOffset (const mevt::Module &m, const int counterId) const
 Get the offset in nanoseconds between the MD trace start time wrt the SD trace start time. More...
 
 REGISTER_MODULE ("MdMuonCounterAG", MdMuonCounter)
 

Private Attributes

bool fConvertTo80Mhz
 Downgrad trace to 80Mhz. More...
 
std::unique_ptr
< VMuonCounterFunctor
fCounter
 Object performing the counting. More...
 
utl::MessageLoggerConfig fLog
 Output messages handler. More...
 
TModuleDelay fModuleDelay
 
unsigned int fNGaps
 maximum number of gaps in a muon pattern (Gap strategy only). More...
 
unsigned int fNMinOnes
 Number of 1s required. More...
 
unsigned int fNOnes
 Number of 1s required. More...
 
double fNOnesPerPatternMatch
 Number of 1s required. More...
 
bool fSetTimeStamps
 Flag to indicate if the MD timestamps are set or not. More...
 
Strategy fStrategy
 Counting stategy to be performed. More...
 
bool fSyncCountingHisto
 Open the counting histogram at the time of the first muon. More...
 
utl::UnitsConfig fUnits
 Units configuration. More...
 
unsigned int fWindowSize
 The number of bins in the inhibition window. More...
 

Detailed Description

Describe your module. In one sentence.

Perform offline trace analysis to estimate the number of muons.

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

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

Definition at line 39 of file MdMuonCounter.h.

Member Typedef Documentation

typedef std::map<int, double> MdMuonCounterAG::MdMuonCounter::TModuleDelay
private

Delay in nanoseconds of the MD trace latch wrt the SD trace latch The key of the map is a unique global identifier for each module calculated as counterId*100+moduleId. Accomodates up to 99 modules per counter...

Definition at line 140 of file MdMuonCounter.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.

Kind of possible counting criteria to be used.

Enumerator
eGap 
eGapRelax 
eAmountInWindow 
eConsecutive 
eAmountGlobal 

Definition at line 43 of file MdMuonCounter.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

MdMuonCounterAG::MdMuonCounter::MdMuonCounter ( )
inline

Definition at line 53 of file MdMuonCounter.h.

MdMuonCounterAG::MdMuonCounter::~MdMuonCounter ( )
inline

Definition at line 54 of file MdMuonCounter.h.

Member Function Documentation

double MdMuonCounterAG::MdMuonCounter::ComputeSignalT50 ( mevt::Counter counter,
const utl::Vector rAxis 
) const
private
void MdMuonCounterAG::MdMuonCounter::DowngradeTrace ( utl::TraceB trace,
unsigned int  dataReduction = 4 
)
private

convert trace from 320Mhz sampling to 80Mhz storing.

double MdMuonCounterAG::MdMuonCounter::EstimateNumberOfMuons ( const utl::TraceUI channelsOn,
const size_t  segmentation 
) const
private

Calculate the maximum likelihood estimator of the number of muons in this module.

Definition at line 536 of file MdMuonCounter.cc.

References utl::Trace< T >::Begin(), and utl::Trace< T >::End().

unsigned int MdMuonCounterAG::MdMuonCounter::FillChannelRecData ( mevt::Channel ch)
private
void MdMuonCounterAG::MdMuonCounter::FillChannelsOn ( mevt::Module m,
const std::vector< unsigned int > &  vPatternMatches,
const mdet::Module mdetModule 
) const
private
void MdMuonCounterAG::MdMuonCounter::FillModuleRecData ( mevt::Module m,
const mdet::Module mdetModule 
)
private
VModule::ResultFlag MdMuonCounterAG::MdMuonCounter::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 324 of file MdMuonCounter.cc.

References io::eSuccess.

double MdMuonCounterAG::MdMuonCounter::GetMedian ( const std::vector< double >  v) const
private

Helper function to compute the median from data stored in a vector Some library could provide this functionality in the future...

Definition at line 660 of file MdMuonCounter.cc.

std::vector< unsigned int > MdMuonCounterAG::MdMuonCounter::GetPatternMatchBins ( mevt::Module m)
private

Get a vector with the bin numbers of the pattern matches for all channels.

Definition at line 453 of file MdMuonCounter.cc.

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

std::string fwk::VModule::GetResultFlagByName ( const ResultFlag  flag)
staticinherited
utl::TimeStamp MdMuonCounterAG::MdMuonCounter::GetSdTraceStartTime ( const evt::Event event,
const int  counterId 
) const
private

Get the trace start time of the SD station associated to a counter Returns NULL if the time cannot be retrieved. This is why a pointer is used as the return value of this method.

Definition at line 582 of file MdMuonCounter.cc.

References sevt::Station::GetTraceStartTime(), sevt::Station::HasGPSData(), evt::Event::HasSEvent(), and WARNING.

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.

double MdMuonCounterAG::MdMuonCounter::GetTimeCorrection ( const utl::Vector dposition,
const utl::Vector axis 
) const
private

Get the correction due to the arrival particle front at different times. The result is provided in nanoseconds. A flat shower plane oriented according to the axis argument is assumed.

Definition at line 686 of file MdMuonCounter.cc.

References utl::kSpeedOfLight, and utl::s.

utl::TimeInterval MdMuonCounterAG::MdMuonCounter::GetTraceOffset ( const mevt::Module m,
const int  counterId 
) const
private
std::string fwk::VModule::GetVersionInfo ( const VersionInfoType  v) const
inherited
VModule::ResultFlag MdMuonCounterAG::MdMuonCounter::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 52 of file MdMuonCounter.cc.

References RdGeoCeLDFFitter::b, utl::ConsecutiveEnumFactory< EnumType, last, tags, NoConversionPolicy, first >::Create(), delay, io::eSuccess, utl::Branch::GetChild(), utl::Branch::GetFirstChild(), fwk::CentralConfig::GetInstance(), fwk::CentralConfig::GetTopBranch(), INFO, 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().

MdMuonCounterAG::MdMuonCounter::REGISTER_MODULE ( "MdMuonCounterAG"  ,
MdMuonCounter   
)
private
VModule::ResultFlag MdMuonCounterAG::MdMuonCounter::Run ( evt::Event event)
virtual
ResultFlag fwk::VModule::RunWithTiming ( evt::Event event)
inlineinherited

Member Data Documentation

bool MdMuonCounterAG::MdMuonCounter::fConvertTo80Mhz
private

Downgrad trace to 80Mhz.

Definition at line 79 of file MdMuonCounter.h.

std::unique_ptr<VMuonCounterFunctor> MdMuonCounterAG::MdMuonCounter::fCounter
private

Object performing the counting.

Definition at line 85 of file MdMuonCounter.h.

int fwk::VModule::fInfoLevel = 0
protectedinherited
utl::MessageLoggerConfig MdMuonCounterAG::MdMuonCounter::fLog
private

Output messages handler.

Definition at line 61 of file MdMuonCounter.h.

TModuleDelay MdMuonCounterAG::MdMuonCounter::fModuleDelay
private

Definition at line 141 of file MdMuonCounter.h.

unsigned int MdMuonCounterAG::MdMuonCounter::fNGaps
private

maximum number of gaps in a muon pattern (Gap strategy only).

Definition at line 70 of file MdMuonCounter.h.

unsigned int MdMuonCounterAG::MdMuonCounter::fNMinOnes
private

Number of 1s required.

Definition at line 76 of file MdMuonCounter.h.

unsigned int MdMuonCounterAG::MdMuonCounter::fNOnes
private

Number of 1s required.

Definition at line 67 of file MdMuonCounter.h.

double MdMuonCounterAG::MdMuonCounter::fNOnesPerPatternMatch
private

Number of 1s required.

Definition at line 73 of file MdMuonCounter.h.

bool MdMuonCounterAG::MdMuonCounter::fSetTimeStamps
private

Flag to indicate if the MD timestamps are set or not.

Definition at line 131 of file MdMuonCounter.h.

Strategy MdMuonCounterAG::MdMuonCounter::fStrategy
private

Counting stategy to be performed.

Definition at line 82 of file MdMuonCounter.h.

bool MdMuonCounterAG::MdMuonCounter::fSyncCountingHisto
private

Open the counting histogram at the time of the first muon.

Definition at line 134 of file MdMuonCounter.h.

utl::UnitsConfig MdMuonCounterAG::MdMuonCounter::fUnits
private

Units configuration.

Definition at line 88 of file MdMuonCounter.h.

unsigned int MdMuonCounterAG::MdMuonCounter::fWindowSize
private

The number of bins in the inhibition window.

Definition at line 64 of file MdMuonCounter.h.

const char *const MdMuonCounterAG::MdMuonCounter::kStrategyTags = { "Gap", "GapRelax", "AmountInWindow", "Consecutive", "AmountGlobal" }
static

Tags for the types of strategy.

Definition at line 51 of file MdMuonCounter.h.


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

, generated on Tue Sep 26 2023.