List of all members | Public Member Functions | Private Types
mevt::Counter Class Reference

Counter level event data. More...

#include "mevt/Counter.h"

Public Member Functions

int GetId () const
 The id of the counter. More...
 
bool HasRecData () const
 Counter is flagged has having reconstructed data if at least one of its associated modules has reconstructed data. More...
 
Counter simulation data.
CounterSimDataGetSimData ()
 
const CounterSimDataGetSimData () const
 
void MakeSimData ()
 
bool HasSimData () const
 

Private Types

typedef evt::ComponentGroup
< Module
InternalModuleCollection
 

Members for management of contained modules.

typedef
InternalModuleCollection::ComponentConstIterator 
ModuleConstIterator
 
typedef
InternalModuleCollection::ComponentIterator 
ModuleIterator
 
ModuleGetModule (const int mId)
 
const ModuleGetModule (const int mId) const
 
void MakeModule (const int mId)
 
bool HasModule (const int mId) const
 
int GetNumberOfModules () const
 
ModuleConstIterator ModulesBegin () const
 
ModuleConstIterator ModulesEnd () const
 
ModuleIterator ModulesBegin ()
 
ModuleIterator ModulesEnd ()
 

Methods to check the counter status

class evt::ComponentGroup< Counter >
 Friendship to allow creation. More...
 
template<class T >
void boost::checked_delete (T *) BOOST_NOEXCEPT
 Friendship for destruction. Depends on evt::ComponentGroup innards. More...
 
int fId = -1
 
double fT1 = 0
 
InternalModuleCollection fModules
 
utl::ShadowPtr< CounterSimDatafSimData
 
bool fHasT50 = false
 
utl::TimeStamp fSignalT50
 
double fT50Error = 0
 
double fTimeResidual = 0
 
double fPlaneFrontDelay = 0
 
double fT502SdStart = 0
 
bool IsCandidate () const
 The muon counter status. More...
 
bool IsRejected () const
 Check if the counter is rejected. More...
 
bool IsSilent () const
 Check if the counter is silent. More...
 
bool IsSaturated () const
 Check if the counter is "hardware" saturated (limit imposed by detector segmentation) More...
 
bool IsADCCalibratedLG () const
 Check if the counter ADC LG channel is calibrated. More...
 
bool IsADCCalibratedHG () const
 Check if the counter ADC HG channel is calibrated. More...
 
void SetRejected (const std::string &reason="")
 Set the status of all modules in this counter to rejected. As described for the muon counter status, the counter status will therefore be rejected. More...
 
void SetSilent ()
 Set the status of all modules in this counter to silent. This is used if the associated tank does not have a T1. More...
 
void SetT1 (const double t1)
 
double GetT1 ()
 
double GetNumberOfEstimatedMuons () const
 The number of estimated muons of the counter is calculated as the sum of the estimated muons of the associated modules This function returns -1 if any of the counter modules is saturated. More...
 
double GetNumberOfMuonsErrorHigh () const
 
double GetNumberOfMuonsErrorLow () const
 
double GetMeanMuons () const
 
double GetMeanMuonsErrorHigh () const
 
double GetMeanMuonsErrorLow () const
 
double GetNumberOfEstimatedMuonsLG () const
 The number of estimated muons with the ADC is calculated as the sum of the estimated muons of the associated modules This function returns -1 if any of the counter modules is saturated. More...
 
double GetNumberOfMuonsErrorHighLG () const
 
double GetNumberOfMuonsErrorLowLG () const
 
double GetNumberOfEstimatedMuonsHG () const
 
double GetNumberOfMuonsErrorHighHG () const
 
double GetNumberOfMuonsErrorLowHG () const
 
double GetNumberOfMuonsLowLimit () const
 The lower limit to the number of muons in a counter. More...
 
double GetMeanMuonsLowLimit () const
 
double GetActiveArea () const
 
double GetActiveAreaLG () const
 
double GetActiveAreaHG () const
 
double GetMuonDensity () const
 The density measured by a counter is the calculated as the number of estimated muons over the active area. This function returns -1 if any of the counter modules is saturated. More...
 
double GetMuonDensityErrorHigh () const
 
double GetMuonDensityErrorLow () const
 
double GetMeanMuonDensity () const
 
double GetMeanMuonDensityErrorHigh () const
 
double GetMeanMuonDensityErrorLow () const
 
double GetMuonDensityLG () const
 
double GetMuonDensityErrorHighLG () const
 
double GetMuonDensityErrorLowLG () const
 
double GetMuonDensityHG () const
 
double GetMuonDensityErrorHighHG () const
 
double GetMuonDensityErrorLowHG () const
 
unsigned int GetNumberOfChannelsOn () const
 
bool IsEmpty () const
 Checks if there are muons in the counter. More...
 
double GetLDFResidual () const
 The LDF residual of the counter is calculated as the sum of the estimated muons of the associated modules. Modules with data & unsaturated are included only. More...
 
double GetTimeResidual () const
 Residual of geometry fit. More...
 
void SetTimeResidual (const double residual)
 
double GetPlaneFrontDelay () const
 Delay of the couner wrt to a plane front oriented with the reconstructed shower axis. More...
 
void SetPlaneFrontDelay (const double c)
 
bool HasT50 () const
 The median of the arrival time of muons in GPS sec, ns All modules associated to the counter are considered. More...
 
utl::TimeStamp GetSignalT50 () const
 
void SetSignalT50 (const utl::TimeStamp &time)
 
double GetT50Error () const
 
void SetT50Error (const double e)
 
double GetT502SdStart () const
 Nanoseconds between the MD t50 and the SD signal start time (md t50-sd start) More...
 
void SetT502SdStart (const double c)
 
 Counter (const int cId)
 Constructs the Counter with the given identificator. More...
 
 ~Counter ()
 
size_t CountCandidateModules () const
 Count the number of modules in the counter by status. More...
 
size_t CountSilentModules () const
 
size_t CountRejectedModules () const
 

Detailed Description

Counter level event data.

Author
Rodolfo Federico Gamarra
Date
08 Mar 2009

Definition at line 28 of file MEvent/Counter.h.

Member Typedef Documentation

Definition at line 31 of file MEvent/Counter.h.

Definition at line 38 of file MEvent/Counter.h.

Definition at line 39 of file MEvent/Counter.h.

Constructor & Destructor Documentation

mevt::Counter::Counter ( const int  cId)
inlineprivate

Constructs the Counter with the given identificator.

Definition at line 268 of file MEvent/Counter.h.

mevt::Counter::~Counter ( )
inlineprivate

Definition at line 272 of file MEvent/Counter.h.

Member Function Documentation

size_t mevt::Counter::CountCandidateModules ( ) const
private

Count the number of modules in the counter by status.

Definition at line 38 of file MEvent/Counter.cc.

References evt::ComponentGroup< Component >::Begin(), evt::ComponentGroup< Component >::End(), and fModules.

Referenced by IsCandidate(), IsRejected(), and IsSilent().

size_t mevt::Counter::CountRejectedModules ( ) const
private
size_t mevt::Counter::CountSilentModules ( ) const
private
double mevt::Counter::GetActiveArea ( ) const
double mevt::Counter::GetActiveAreaHG ( ) const
double mevt::Counter::GetActiveAreaLG ( ) const
int mevt::Counter::GetId ( ) const
inline

The id of the counter.

Among the existing classes (sevt, fevt) it seems that the choice is not to couple them with the corresponding det classes. So there's not method in them (evt classes) to retrieve the associated det one. This class and those among its hierarchy stick to that; and so the correponding singleton detector instance will have to be used in each case. Besides the circumlocution for retrieval, having the ids exposed (and that's just not too good by itself) imposes knowledge on the hierarchy structure from the client side, given that the ids aren't unique but only inside the containing parent within the hierarchy.

Definition at line 97 of file MEvent/Counter.h.

References fId.

Referenced by MdLDFFinderAG::Likelihood2::CalculateCandidateLikelihood(), MdLDFFinderAG::Likelihood3::CalculateCandidateLikelihood(), MdLDFFinderAG::Likelihood::CalculateCandidateLikelihood(), MdLDFFinderAG::MdLDFFinder::CalculateChi2(), MdLDFFinderAG::MdLDFFinder::CalculateRho0Seed(), MdLDFFinderAG::VMinMethodFunctor::CalculateSilentLikelihood(), MdMuonCounterAG::MdMuonCounter::ComputeSignalT50(), MdADCCalibrationAG::MdADCCalibration::GetOfflineCalibration(), MdMuonEstimatorAG::MdMuonEstimator::GetSamplingTime(), MdMuonEstimatorAG::MdMuonEstimator::GetTraceLength(), MdEventSelectorAG::MdEventSelector::IsMEventT5(), otoa::MD2ADST::MakeCounter(), otoa::MD2ADST::MakeSimCounter(), MdEventSelectorAG::MdEventSelector::RejectFarSilents(), MdCornerClippingCorrecterAG::MdCornerClippingCorrecter::Run(), MdBiasCorrecterAG::MdBiasCorrecter::Run(), MdADCCalibrationAG::MdADCCalibration::Run(), MdMuonIntegratorAG::MdMuonIntegrator::Run(), MdPileUpCorrecterAG::MdPileUpCorrecter::Run(), MdPatternFinderAG::MdPatternFinder::Run(), MdMuonEstimatorAG::MdMuonEstimator::Run(), MdMuonCounterAG::MdMuonCounter::Run(), and MdLDFFinderAG::MdLDFFinder::SetLdfResiduals().

double mevt::Counter::GetLDFResidual ( ) const

The LDF residual of the counter is calculated as the sum of the estimated muons of the associated modules. Modules with data & unsaturated are included only.

Definition at line 509 of file MEvent/Counter.cc.

References evt::ComponentGroup< Component >::Begin(), evt::ComponentGroup< Component >::End(), and fModules.

Referenced by otoa::MD2ADST::MakeCounter().

double mevt::Counter::GetMeanMuonDensity ( ) const

Definition at line 438 of file MEvent/Counter.cc.

References DEBUGLOG, fId, GetActiveArea(), GetMeanMuons(), IsSaturated(), and WARNING.

Referenced by otoa::MD2ADST::MakeCounter().

double mevt::Counter::GetMeanMuonDensityErrorHigh ( ) const
double mevt::Counter::GetMeanMuonDensityErrorLow ( ) const

Definition at line 475 of file MEvent/Counter.cc.

References fId, GetActiveArea(), GetMeanMuonsErrorLow(), IsSaturated(), and WARNING.

Referenced by otoa::MD2ADST::MakeCounter().

double mevt::Counter::GetMeanMuons ( ) const
double mevt::Counter::GetMeanMuonsErrorHigh ( ) const
double mevt::Counter::GetMeanMuonsErrorLow ( ) const
double mevt::Counter::GetMeanMuonsLowLimit ( ) const
Module& mevt::Counter::GetModule ( const int  mId)
inline
const Module& mevt::Counter::GetModule ( const int  mId) const
inline

Definition at line 43 of file MEvent/Counter.h.

References fModules, and evt::ComponentGroup< Component >::Get().

double mevt::Counter::GetMuonDensity ( ) const

The density measured by a counter is the calculated as the number of estimated muons over the active area. This function returns -1 if any of the counter modules is saturated.

Definition at line 385 of file MEvent/Counter.cc.

References fId, GetActiveArea(), GetNumberOfEstimatedMuons(), IsSaturated(), and WARNING.

Referenced by MdLDFFinderAG::MdLDFFinder::CalculateRho0Seed(), MdEventSelectorAG::MdEventSelector::FindHottestCounterUnsaturated(), and otoa::MD2ADST::MakeCounter().

double mevt::Counter::GetMuonDensityErrorHigh ( ) const
double mevt::Counter::GetMuonDensityErrorHighHG ( ) const
double mevt::Counter::GetMuonDensityErrorHighLG ( ) const
double mevt::Counter::GetMuonDensityErrorLow ( ) const
double mevt::Counter::GetMuonDensityErrorLowHG ( ) const
double mevt::Counter::GetMuonDensityErrorLowLG ( ) const
double mevt::Counter::GetMuonDensityHG ( ) const
double mevt::Counter::GetMuonDensityLG ( ) const

The density measured by a counter ADC is the calculated as the number of estimated muons over the active area. This function returns -1 if any of the counter modules is saturated

Definition at line 600 of file MEvent/Counter.cc.

References fId, GetActiveAreaLG(), GetNumberOfEstimatedMuonsLG(), IsADCCalibratedLG(), and WARNING.

Referenced by otoa::MD2ADST::MakeCounter().

unsigned int mevt::Counter::GetNumberOfChannelsOn ( ) const

The number of windows with a signal of the counter is calculated as the sum of the windows with a signal of the associated modules. Candidate modules with data are included, including saturated ones.

Definition at line 493 of file MEvent/Counter.cc.

References evt::ComponentGroup< Component >::Begin(), evt::ComponentGroup< Component >::End(), and fModules.

Referenced by MdEventSelectorAG::MdEventSelector::FindHottestCounterSaturated(), IsEmpty(), and otoa::MD2ADST::MakeCounter().

double mevt::Counter::GetNumberOfEstimatedMuons ( ) const

The number of estimated muons of the counter is calculated as the sum of the estimated muons of the associated modules This function returns -1 if any of the counter modules is saturated.

Definition at line 167 of file MEvent/Counter.cc.

References evt::ComponentGroup< Component >::Begin(), evt::ComponentGroup< Component >::End(), fId, fModules, and WARNING.

Referenced by GetMuonDensity(), and otoa::MD2ADST::MakeCounter().

double mevt::Counter::GetNumberOfEstimatedMuonsHG ( ) const
double mevt::Counter::GetNumberOfEstimatedMuonsLG ( ) const

The number of estimated muons with the ADC is calculated as the sum of the estimated muons of the associated modules This function returns -1 if any of the counter modules is saturated.

Definition at line 530 of file MEvent/Counter.cc.

References evt::ComponentGroup< Component >::Begin(), evt::ComponentGroup< Component >::End(), fId, fModules, IsADCCalibratedLG(), and WARNING.

Referenced by GetMuonDensityLG(), and otoa::MD2ADST::MakeCounter().

int mevt::Counter::GetNumberOfModules ( ) const
inline

Definition at line 49 of file MEvent/Counter.h.

References fModules, and evt::ComponentGroup< Component >::GetNumberOf().

double mevt::Counter::GetNumberOfMuonsErrorHigh ( ) const
double mevt::Counter::GetNumberOfMuonsErrorHighHG ( ) const
double mevt::Counter::GetNumberOfMuonsErrorHighLG ( ) const
double mevt::Counter::GetNumberOfMuonsErrorLow ( ) const
double mevt::Counter::GetNumberOfMuonsErrorLowHG ( ) const
double mevt::Counter::GetNumberOfMuonsErrorLowLG ( ) const
double mevt::Counter::GetNumberOfMuonsLowLimit ( ) const

The lower limit to the number of muons in a counter.

The low limit of muons provides a valid option to the minimum bound to muons specially useful for saturated counters, where the number of muons and therefore the error bars size are infinite. The limit is calculated as the sum module limits.

Definition at line 241 of file MEvent/Counter.cc.

References evt::ComponentGroup< Component >::Begin(), evt::ComponentGroup< Component >::End(), and fModules.

Referenced by otoa::MD2ADST::MakeCounter().

double mevt::Counter::GetPlaneFrontDelay ( ) const
inline

Delay of the couner wrt to a plane front oriented with the reconstructed shower axis.

Definition at line 244 of file MEvent/Counter.h.

References fPlaneFrontDelay.

Referenced by otoa::MD2ADST::MakeCounter().

utl::TimeStamp mevt::Counter::GetSignalT50 ( ) const
inline

Definition at line 252 of file MEvent/Counter.h.

References fSignalT50.

Referenced by otoa::MD2ADST::MakeCounter().

CounterSimData& mevt::Counter::GetSimData ( )
inline
const CounterSimData& mevt::Counter::GetSimData ( ) const
inline

Definition at line 66 of file MEvent/Counter.h.

References fSimData.

double mevt::Counter::GetT1 ( )
inline

Definition at line 146 of file MEvent/Counter.h.

References fT1.

double mevt::Counter::GetT502SdStart ( ) const
inline

Nanoseconds between the MD t50 and the SD signal start time (md t50-sd start)

Definition at line 259 of file MEvent/Counter.h.

References fT502SdStart.

Referenced by otoa::MD2ADST::MakeCounter().

double mevt::Counter::GetT50Error ( ) const
inline

Definition at line 255 of file MEvent/Counter.h.

References fT50Error.

Referenced by otoa::MD2ADST::MakeCounter().

double mevt::Counter::GetTimeResidual ( ) const
inline

Residual of geometry fit.

Definition at line 240 of file MEvent/Counter.h.

References fTimeResidual.

Referenced by otoa::MD2ADST::MakeCounter().

bool mevt::Counter::HasModule ( const int  mId) const
inline
bool mevt::Counter::HasRecData ( ) const

Counter is flagged has having reconstructed data if at least one of its associated modules has reconstructed data.

Definition at line 22 of file MEvent/Counter.cc.

References evt::ComponentGroup< Component >::Begin(), evt::ComponentGroup< Component >::End(), fModules, and evt::ComponentGroup< Component >::GetNumberOf().

Referenced by otoa::MD2ADST::MakeCounter().

bool mevt::Counter::HasSimData ( ) const
inline
bool mevt::Counter::HasT50 ( ) const
inline

The median of the arrival time of muons in GPS sec, ns All modules associated to the counter are considered.

Definition at line 251 of file MEvent/Counter.h.

References fHasT50.

Referenced by otoa::MD2ADST::MakeCounter().

bool mevt::Counter::IsADCCalibratedHG ( ) const
bool mevt::Counter::IsADCCalibratedLG ( ) const
bool mevt::Counter::IsCandidate ( ) const

The muon counter status.

Setting the status of a counter is a tricky business since it may contain several modules, each in a different state. The possible counter states are candidate, silent or rejected. This is a sort of ordered hierarchy. A counter is:

  • candidate: has at least one candidate module
  • silent: has at least a silent module (and no candidate modules)
  • rejected: has all modules rejected The counter state is not stored in this class but derived from the status of its modules.

Definition at line 80 of file MEvent/Counter.cc.

References CountCandidateModules().

Referenced by IsSaturated(), otoa::MD2ADST::MakeCounter(), and MdMuonCounterAG::MdMuonCounter::Run().

bool mevt::Counter::IsEmpty ( ) const
inline

Checks if there are muons in the counter.

Definition at line 230 of file MEvent/Counter.h.

References GetNumberOfChannelsOn().

Referenced by MdMuonCounterAG::MdMuonCounter::Run().

bool mevt::Counter::IsRejected ( ) const
bool mevt::Counter::IsSaturated ( ) const
bool mevt::Counter::IsSilent ( ) const
void mevt::Counter::MakeModule ( const int  mId)
inline
void mevt::Counter::MakeSimData ( )
ModuleConstIterator mevt::Counter::ModulesBegin ( ) const
inline
ModuleIterator mevt::Counter::ModulesBegin ( )
inline

Definition at line 55 of file MEvent/Counter.h.

References evt::ComponentGroup< Component >::Begin(), and fModules.

ModuleConstIterator mevt::Counter::ModulesEnd ( ) const
inline
ModuleIterator mevt::Counter::ModulesEnd ( )
inline

Definition at line 57 of file MEvent/Counter.h.

References evt::ComponentGroup< Component >::End(), and fModules.

void mevt::Counter::SetPlaneFrontDelay ( const double  c)
inline

Definition at line 245 of file MEvent/Counter.h.

References RdGeoCeLDFFitter::c, and fPlaneFrontDelay.

void mevt::Counter::SetRejected ( const std::string &  reason = "")

Set the status of all modules in this counter to rejected. As described for the muon counter status, the counter status will therefore be rejected.

Definition at line 151 of file MEvent/Counter.cc.

References evt::ComponentGroup< Component >::Begin(), evt::ComponentGroup< Component >::End(), and fModules.

Referenced by MdModuleRejectorAG::MdModuleRejector::Run().

void mevt::Counter::SetSignalT50 ( const utl::TimeStamp time)
inline

Definition at line 253 of file MEvent/Counter.h.

References fHasT50, and fSignalT50.

Referenced by MdMuonCounterAG::MdMuonCounter::Run().

void mevt::Counter::SetSilent ( )

Set the status of all modules in this counter to silent. This is used if the associated tank does not have a T1.

Definition at line 159 of file MEvent/Counter.cc.

References evt::ComponentGroup< Component >::Begin(), evt::ComponentGroup< Component >::End(), and fModules.

void mevt::Counter::SetT1 ( const double  t1)
inline

Definition at line 144 of file MEvent/Counter.h.

References fT1.

void mevt::Counter::SetT502SdStart ( const double  c)
inline

Definition at line 260 of file MEvent/Counter.h.

References RdGeoCeLDFFitter::c, and fT502SdStart.

Referenced by MdMuonCounterAG::MdMuonCounter::Run().

void mevt::Counter::SetT50Error ( const double  e)
inline

Definition at line 256 of file MEvent/Counter.h.

References fT50Error.

void mevt::Counter::SetTimeResidual ( const double  residual)
inline

Definition at line 241 of file MEvent/Counter.h.

References fTimeResidual.

Friends And Related Function Documentation

template<class T >
void boost::checked_delete ( T *  )
friend

Friendship for destruction. Depends on evt::ComponentGroup innards.

friend class evt::ComponentGroup< Counter >
friend

Friendship to allow creation.

Definition at line 275 of file MEvent/Counter.h.

Member Data Documentation

bool mevt::Counter::fHasT50 = false
private

Definition at line 307 of file MEvent/Counter.h.

Referenced by HasT50(), and SetSignalT50().

int mevt::Counter::fId = -1
private
InternalModuleCollection mevt::Counter::fModules
private
double mevt::Counter::fPlaneFrontDelay = 0
private

Definition at line 312 of file MEvent/Counter.h.

Referenced by GetPlaneFrontDelay(), and SetPlaneFrontDelay().

utl::TimeStamp mevt::Counter::fSignalT50
private

Definition at line 308 of file MEvent/Counter.h.

Referenced by GetSignalT50(), and SetSignalT50().

utl::ShadowPtr<CounterSimData> mevt::Counter::fSimData
private

Definition at line 305 of file MEvent/Counter.h.

Referenced by GetSimData(), HasSimData(), and MakeSimData().

double mevt::Counter::fT1 = 0
private

Definition at line 303 of file MEvent/Counter.h.

Referenced by GetT1(), and SetT1().

double mevt::Counter::fT502SdStart = 0
private

Definition at line 313 of file MEvent/Counter.h.

Referenced by GetT502SdStart(), and SetT502SdStart().

double mevt::Counter::fT50Error = 0
private

Definition at line 309 of file MEvent/Counter.h.

Referenced by GetT50Error(), and SetT50Error().

double mevt::Counter::fTimeResidual = 0
private

Definition at line 311 of file MEvent/Counter.h.

Referenced by GetTimeResidual(), and SetTimeResidual().


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

, generated on Tue Sep 26 2023.