1 #ifndef _MdMuonEstimatorAG_MdMuonEstimator_h_
2 #define _MdMuonEstimatorAG_MdMuonEstimator_h_
4 #include <utl/config.h>
6 #include <fwk/VModule.h>
7 #include <mevt/MEvent.h>
8 #include <mevt/Counter.h>
9 #include <mdet/MDetector.h>
10 #include <evt/ShowerRecData.h>
12 #include <utl/Trace-fwd.h>
13 #include <utl/MessageLoggerConfig.h>
14 #include <utl/UnitsConfig.h>
20 #include <boost/utility.hpp>
23 namespace MdMuonEstimatorAG {
26 class VMuonEstimatorFunctor;
54 VModule::ResultFlag
Init();
56 VModule::ResultFlag
Finish();
unsigned int fNBinWindowSize
The number of bins in the window of the NBin and NBinCentered strategies (set by user) ...
unsigned int fCountingWindowSize
The number of bins in the considered windows of the counting strategies.
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.
VModule::ResultFlag Finish()
Finish: invoked at end of the run (NOT end of the event)
VModule::ResultFlag Init()
Initialize: invoked at beginning of run (NOT beginning of event)
Helper class for configuration of units: value and name.
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.
unsigned int GetTraceLength(evt::Event &event) const
Get the trace length of any (non-rejected) module of the event.
utl::UnitsConfig fUnits
Units configuration.
VModule::ResultFlag Run(evt::Event &event)
Run: invoked once per event.
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.
double GetSamplingTime(evt::Event &event) const
Get the sampling time of any (non-rejected) module of the event.
Wraps a message to logger (received as parameter or created here), its access and configuration...
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.
utl::MessageLoggerConfig fLog
Output messages handler.
static const char *const kCountingStrategyTags[]
Tags for the types of strategies.
CountingStrategyType
Kind of possible counting strategies to be used.
Estimates the number of muons using the information of the pattern matches in every channel of every ...
CountingStrategyType fCountingStrategy
Counting stategy to be performed.
std::unique_ptr< VMuonEstimatorFunctor > fEstimator
Object performing the estimation.
void SetSegmentationAndArea(mevt::Module &module, const mdet::Module &mdetModule) const
Set the segmentation (active segments) and (active) area of the reconstructed module.
REGISTER_MODULE("MdMuonEstimatorAG", MdMuonEstimator)