List of all members | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Friends
mdet::PMT Class Reference

Multiple-pixel photo-multiplier tube. More...

#include "mdet/PMT.h"

Inheritance diagram for mdet::PMT:
Inheritance graph
[legend]

Public Types

typedef std::vector< double > CrossTalkContainer
 Typedef for mdet::Pixel crosstalk container. More...
 
typedef
boost::indirect_iterator
< NeighborsContainer::const_iterator > 
NeighborConstIterator
 Convenience typedef for iteration over neighbors. More...
 
typedef std::vector< const
Pixel * > 
NeighborsContainer
 Typedef for mdet::Pixel neighbor container. More...
 
typedef PixelGroup::ConstIterator PixelConstIterator
 Convenience typedef for const iterator over the contained mdet::Pixel instances. More...
 

Public Member Functions

 AddIdMessage (o)
 
const PixelComputePulseDestination (const Pixel &src) const
 Computes a destination pixel according to crosstalk effect. More...
 
int GetId () const
 The id of this component. More...
 
const VManager::IndexMap & GetIdsMap () const
 The id identifying this component within its detector hierarhy. More...
 
const ModuleGetModule () const
 The module to which this PMT belongs. More...
 
bool IsNeighbor (const Pixel &src, const Pixel &dst) const
 Tells whether dst is one of the neighbors of src. More...
 
NeighborConstIterator NeighborsBegin (const Pixel &p) const
 Begin iterator over neighbors of the given pixel. More...
 
NeighborConstIterator NeighborsEnd (const Pixel &p) const
 End iterator over neighbors of the given pixel. More...
 
PixelConstIterator PixelsBegin () const
 Begin iterator over the contained pixels. More...
 
PixelConstIterator PixelsEnd () const
 End iterator over the contained pixels. More...
 
return o str ()
 

Public Attributes

std::string const
 Returns the message that identifies this component. More...
 
const DetectorUserData< C > & const
 Retrieve the user custom data. More...
 

Static Public Attributes

static const double kCentralPixelSelfTalk = 100
 Assumed value for central pixel self-talk. More...
 
static const char *const kComponentId = MHierarchyInfo::kComponentsIds[5]
 
static const char *const kComponentName = MHierarchyInfo::kComponentsNames[5]
 
static const unsigned int kNumNeighborsCorner = 3
 Number of neighbors for a pixel on the corner of the PMT's cathode. The assumed layout for the neighbors' coefficientes is as follows: More...
 
static const unsigned int kNumNeighborsInside = 8
 Number of neighbors for a pixel inside (ie in the middle) the PMT's cathode. More...
 
static const unsigned int kNumNeighborsSide = 5
 Number of neighbors for a pixel on the side of the PMT's cathode. More...
 

Protected Member Functions

template<typename T , template< typename > class P>
T & GetData (P< T > &d, const std::string &p) const
 Common utility function for configuration. More...
 
template<typename T >
T & GetData (T &d, const std::string &p) const
 Common utility function for configuration. More...
 
void Register (utl::VValidated &v)
 Register the field so as to allow handling it. More...
 
s<< " ]";}DetectorComponent(int
i, const VManager::IndexMap
&parentMap):fId(i), fIdsMap(parentMap){Init();}DetectorComponent(const
int i):fId(i){Init();}virtual
~DetectorComponent(){}virtual
void Update(const bool
invalidateData, const bool){for(FieldsContainer::iterator
i=fFields.begin(), e=fFields.end();i!=e;++i)(*i) -> 
SetValid (false)
 

Protected Attributes

template<typename T1 , typename T2 , template< typename, typename > class P>
T1 & const
 Doubly-templated variation of common utility. More...
 
template<typename T >
T & const
 Specialization for utl::Validated. More...
 
void const
 Message that identifies the component. More...
 
s<< "id="<< GetId()<< " [";for(It
i=GetIdsMap().begin(), e=GetIdsMap().end();i!=e;++i)
s<< " "<< i-> first<< "="<< i-> 
second
 

Private Types

typedef MComponentGroup< PMT,
Pixel, det::ParentCreator >
::Type 
PixelGroup
 Type for the set of associated mdet::Pixel. More...
 
typedef PixelGroup::Iterator PixelIterator
 Non-const private alias. More...
 

Private Member Functions

PixelGroup::SizeType GetCols () const
 Retrieves the number of columns. More...
 
double GetCrossTalk (const Pixel &src, const Pixel &dst) const
 Returns the cross-talk coefficient for dst seen as a neighbor of src. More...
 
double GetCrossTalkNormalizationFactor (const mdet::Pixel &pix) const
 Helper method to manage the conversion factor for cross-talk. More...
 
double GetCrossTalkProportion (const Pixel &src, const Pixel &dst) const
 The cross-talk proportion coefficient for dst seen as a neighbor of \ src. More...
 
const PixelGroupGetPixels () const
 Accesses the group of pixels. More...
 
PixelGroup::SizeType GetRows () const
 Retrieves the number of rows. More...
 
void InitPixels ()
 Initilization and validations related to pixels. More...
 
template<class Predicate >
NeighborsContainer::const_iterator IsNeighbor (const Pixel &src, const Pixel &dst, const Predicate &p) const
 Neighbor finding helper function. More...
 
 PMT (int pId, const det::VManager::IndexMap &parentMap, const Module &parent)
 Constructs the tube. More...
 
void Update (bool invalidateData, bool invalidateComponents)
 Perform update in this component and forward to subcomponents. More...
 
 ~PMT ()
 Destructor (!). More...
 

Private Attributes

int fFirstIdPMT
 Minimum id among PMT's ids. More...
 
const ModulefModule
 
PixelGroup fPixels
 

Friends

class Module
 Friendship to allow construction. Also allows access to fPixels (through GetPixels) in function GetPixelFor (handles component linkage). More...
 
class utl::ShadowPtr< PMT >
 Frienship to allow destruction. More...
 

Detailed Description

Multiple-pixel photo-multiplier tube.

This class representes the multi-pixel photo-multiplier tubes used whithin each module. It groups its pixels and manages the relationships between them as being part of the PMT (for example, the cross-talk matrix).

The PMT is allowed to be only square; in the real case the PMTs are likely to be 64x64 sized. The generalization to rectangular PMT (that's NxM sizes) is straightforward since the square dependant logic is buried in to the functions that calculate the size of the PMT, in fact in only of them; but would need another parameter to specify how to distribute the pixels among rows and column (for example, column width).

The pixels id's are asumed to be consecutive, row-by-row starting from the upper-left corner and ending on the lower-right (fact that's actually checked on construction). With this the neighboring relations are constructed; for example (if existing) the right side neighbor is + 1 id. The neighbor relationship is based on first-neighbor scope and allowed in the diagonal direction: there are 8 neighbors.

Author
Rodolfo Federico Gamarra
Date
08 Mar 2009

Definition at line 49 of file MDetector/PMT.h.

Member Typedef Documentation

typedef std::vector<double> mdet::PMT::CrossTalkContainer

Typedef for mdet::Pixel crosstalk container.

See Also
NeighborsContainer

Definition at line 159 of file MDetector/PMT.h.

typedef boost::indirect_iterator<NeighborsContainer::const_iterator> mdet::PMT::NeighborConstIterator

Convenience typedef for iteration over neighbors.

This typedef should be the same than PixelConstIterator but anothe type is needed cause of the different implementations for iteration in each case. Another possibility would have been to provide a conversion from one of the backing iterator over the other or try to use the same kind of iterator in each case. Seems better to have different types.

See Also
NeighborsBegin
NeighborsEnd

Definition at line 175 of file MDetector/PMT.h.

typedef std::vector<const Pixel*> mdet::PMT::NeighborsContainer

Typedef for mdet::Pixel neighbor container.

This declaration is for use in mdet::Pixel, is not useful for client code. It could be made private and friendship given to mdet::Pixel.

Definition at line 153 of file MDetector/PMT.h.

typedef PixelGroup::ConstIterator mdet::PMT::PixelConstIterator

Convenience typedef for const iterator over the contained mdet::Pixel instances.

Definition at line 145 of file MDetector/PMT.h.

Type for the set of associated mdet::Pixel.

Definition at line 56 of file MDetector/PMT.h.

typedef PixelGroup::Iterator mdet::PMT::PixelIterator
private

Non-const private alias.

Definition at line 60 of file MDetector/PMT.h.

Constructor & Destructor Documentation

mdet::PMT::PMT ( int  pId,
const det::VManager::IndexMap parentMap,
const Module parent 
)
private

Constructs the tube.

Parameters
pIdThe identifier to be used.
parentMapThe identifiers of the parent within the hierarchy.
parentThe parent mdet::Module.

A reference to the parent is kept in this class and part of the construction is delegated to the first super-class.

This method is kept private creation of these objects is not meant to be performed by client code. See the related friendship declaration.

See Also
mdet::MDectectorComponent::Type

Definition at line 153 of file MDetector/PMT.cc.

References fPixels, det::DetectorComponent< C, ManagerProvider >::GetIdsMap(), and InitPixels().

mdet::PMT::~PMT ( )
inlineprivate

Destructor (!).

Definition at line 296 of file MDetector/PMT.h.

Member Function Documentation

template<class C , class ManagerProvider >
det::DetectorComponent< C, ManagerProvider >::AddIdMessage ( )
inherited
const Pixel & mdet::PMT::ComputePulseDestination ( const Pixel src) const

Computes a destination pixel according to crosstalk effect.

Randomizes according crosstalk configuration and then chooses a neighbor or source pixel itself. This method gives sense to the bare crosstalk coeficients, and is the best choice to be used by the clients of this class, tough the access to the raw coefficients is granted.

See Also
GetCrossTalkProportion
GetCrossTalk

Definition at line 331 of file MDetector/PMT.cc.

References fwk::RandomEngineRegistry::eDetector, GetCrossTalkProportion(), utl::RandomEngine::GetEngine(), NeighborsBegin(), and NeighborsEnd().

Referenced by MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::OptoElectronics(), MdCounterSimulatorAG::MdCounterSimulator::RunFromMEventScintillatorSimulated(), and MdCounterSimulatorAG::MdCounterSimulator::SimulatePulses().

PMT::PixelGroup::SizeType mdet::PMT::GetCols ( ) const
private

Retrieves the number of columns.

Definition at line 137 of file MDetector/PMT.cc.

References fPixels, and GetRows().

Referenced by GetCrossTalk(), and InitPixels().

double mdet::PMT::GetCrossTalk ( const Pixel src,
const Pixel dst 
) const
private

Returns the cross-talk coefficient for dst seen as a neighbor of src.

Returns the cross-talk coefficient for cross-talk started from Pixel src towards Pixel dst, that's the (mean) number of pulses went to dst when the number arrived to src equals one hundred. Note that is not a percentage. Note that the cross-talk matrix is defined for every pair of pixels within the PMT (may be zero in some cases).

Note that, in the most general case, the cross-talk may depend in components that are external to the PMT, like the (numerical aperture of the) optical fibers that take the light to each of the PMT's pixels. Despite that, it seems proper to define this cross-talk matrix at the PMT level. If, further on, it seems that that components of the cross-talk (that is, the ones depending on components that are external to the PMT) are better placed somewhere else, this GetCrosstalk may be kept here to mean the coeffients depending exclusively on the PMT (having the proper changes in the configuration).

See Also
kCentralPixelSelfTalk
GetCrossTalkProportion

Definition at line 393 of file MDetector/PMT.cc.

References det::DetectorComponent< C, ManagerProvider >::AddIdMessage(), FATAL, fFirstIdPMT, mdet::Pixel::fNeighbors, GetCols(), det::DetectorComponent< C, ManagerProvider >::GetId(), mdet::Pixel::GetNeighborsCrossTalkCorner(), mdet::Pixel::GetNeighborsCrossTalkInside(), mdet::Pixel::GetNeighborsCrossTalkSide(), IsNeighbor(), kCentralPixelSelfTalk, kNumNeighborsCorner, kNumNeighborsInside, kNumNeighborsSide, and mod().

Referenced by GetCrossTalkProportion().

double mdet::PMT::GetCrossTalkNormalizationFactor ( const mdet::Pixel pix) const
private
double mdet::PMT::GetCrossTalkProportion ( const Pixel src,
const Pixel dst 
) const
private

The cross-talk proportion coefficient for dst seen as a neighbor of \ src.

This coefficient is a number between (inclusively) 0 and 1, indicating the proportion of pulses that belonging initially to pixel src end in pixel dst, which may (likely) be equal to src.

See Also
GetCrossTalk

Definition at line 385 of file MDetector/PMT.cc.

References GetCrossTalk(), and GetCrossTalkNormalizationFactor().

Referenced by ComputePulseDestination().

template<class C , class ManagerProvider >
template<typename T , template< typename > class P>
T& det::DetectorComponent< C, ManagerProvider >::GetData ( P< T > &  d,
const std::string &  p 
) const
inlineprotectedinherited

Common utility function for configuration.

Retrieves data from the provided (via this class' template parameter) Manager instance and goes on with initialization.

Parameters
dAn object of type P<T> wrapping the real of type T.
pProperty name. The template class P must provide:
  • A bool-like interface (operator ! and a conversion (possibly implicit to bool) to query initialization.
  • An T& operator*() to retrieve the actual data.
  • P& operator=(T* const ptr) for proper initialization.
  • As of the wrapped class T, it must be default constructible.

This is fullfilled by, for instance, utl::ShadowPtr as P and built-in types for T.

Definition at line 191 of file DetectorComponent.h.

References det::DetectorComponent< C, ManagerProvider >::d, and G4StationSimulatorOG::p.

Referenced by mdet::Channel::GetAbsoluteError(), mdet::BackEndSiPM::GetADCOffset(), mdet::BackEndSiPM::GetADCPar1(), mdet::BackEndSiPM::GetADCPar2(), mdet::BackEndSiPM::GetADCPar3(), mdet::BackEndSiPM::GetADCPar4(), mdet::BackEndSiPM::GetADCPar5(), mdet::BackEndSiPM::GetADCPar6(), mdet::BackEndSiPM::GetADCSaturationDown(), mdet::BackEndSiPM::GetADCSaturationUp(), mdet::Module::GetAreaKind(), mdet::Counter::GetAssociatedTankId(), mdet::Fiber::GetAttenuationAmplitudeA(), mdet::Fiber::GetAttenuationAmplitudeASiPM(), mdet::Fiber::GetAttenuationAmplitudeB(), mdet::Fiber::GetAttenuationAmplitudeBSiPM(), mdet::Fiber::GetAttenuationLengthA(), mdet::Fiber::GetAttenuationLengthASiPM(), mdet::Fiber::GetAttenuationLengthB(), mdet::Fiber::GetAttenuationLengthBSiPM(), mdet::Fiber::GetAttenuationReference(), mdet::Fiber::GetAttenuationReferenceEnergy(), mdet::Fiber::GetAttenuationReferenceThickness(), mdet::Module::GetBackgroundMuonsFlux(), mdet::FrontEndSiPM::GetBaseLineFluctuationHG(), mdet::FrontEndSiPM::GetBaseLineFluctuationLG(), mdet::Channel::GetDCGain(), mdet::Fiber::GetDecayTime(), mdet::Scintillator::GetDecayTime(), mdet::FrontEndSiPM::GetDelayBinaryADCMean(), mdet::FrontEndSiPM::GetDelayBinaryADCSigma(), mdet::FrontEndSiPM::GetDigitalBackGroundProbability(), mdet::FrontEndSiPM::GetDigitalBackGroundWidthMean(), mdet::FrontEndSiPM::GetDigitalBackGroundWidthStdDev(), mdet::ChannelSiPM::GetDiscriminatorGain(), mdet::ChannelSiPM::GetDiscriminatorHiLevel(), mdet::Channel::GetDiscriminatorHiLevel(), mdet::ChannelSiPM::GetDiscriminatorLowLevel(), mdet::Channel::GetDiscriminatorLowLevel(), mdet::ChannelSiPM::GetDiscriminatorThreshold(), mdet::ChannelSiPM::GetDiscriminatorTransitionTime(), mdet::Scintillator::GetEpsilon(), mdet::FrontEnd::GetFalseRangeHiThreshold(), mdet::FrontEndSiPM::GetFalseRangeHiThreshold(), mdet::ChannelSiPM::GetFastShaperGain(), mdet::ChannelSiPM::GetFastShaperTime(), mdet::Channel::GetFeedbackResistance(), mdet::BackEndSiPM::GetFirstAdderOffset(), mdet::BackEndSiPM::GetFirstAdderPar1(), mdet::BackEndSiPM::GetFirstAdderPar2(), mdet::BackEndSiPM::GetFirstAdderPar3(), mdet::BackEndSiPM::GetFirstAdderPar4(), mdet::BackEndSiPM::GetFirstAdderPar5(), mdet::BackEndSiPM::GetFirstAdderSaturationDown(), mdet::BackEndSiPM::GetFirstAdderSaturationUp(), mdet::Scintillator::GetHeight(), mdet::Channel::GetHighCutoffFrequency(), mdet::BackEndSiPM::GetHighGainAmplifierAdjustmentFactor(), mdet::BackEndSiPM::GetHighGainAmplifierOffset(), mdet::BackEndSiPM::GetHighGainAmplifierPar1(), mdet::BackEndSiPM::GetHighGainAmplifierPar2(), mdet::BackEndSiPM::GetHighGainAmplifierPar3(), mdet::BackEndSiPM::GetHighGainAmplifierPar4(), mdet::BackEndSiPM::GetHighGainAmplifierPar5(), mdet::BackEndSiPM::GetHighGainAmplifierPar6(), mdet::BackEndSiPM::GetHighGainAmplifierPar7(), mdet::BackEndSiPM::GetHighGainAmplifierPar8(), mdet::BackEndSiPM::GetHighGainAmplifierPar9(), mdet::BackEndSiPM::GetHighGainAmplifierSaturationDown(), mdet::BackEndSiPM::GetHighGainAmplifierSaturationUp(), mdet::Channel::GetInitialIntervalLength(), mdet::Channel::GetInvertingInputResistance(), mdet::Channel::GetIterationsNumber(), mdet::Scintillator::GetLength(), mdet::Scintillator::GetLocalSoilDensity(), mdet::Channel::GetLowCutoffFrequency(), mdet::BackEndSiPM::GetLowGainAmplifierAdjustmentFactor(), mdet::BackEndSiPM::GetLowGainAmplifierOffset(), mdet::BackEndSiPM::GetLowGainAmplifierPar1(), mdet::BackEndSiPM::GetLowGainAmplifierPar2(), mdet::BackEndSiPM::GetLowGainAmplifierPar3(), mdet::BackEndSiPM::GetLowGainAmplifierPar4(), mdet::BackEndSiPM::GetLowGainAmplifierPar5(), mdet::BackEndSiPM::GetLowGainAmplifierPar6(), mdet::BackEndSiPM::GetLowGainAmplifierPar7(), mdet::BackEndSiPM::GetLowGainAmplifierPar8(), mdet::BackEndSiPM::GetLowGainAmplifierPar9(), mdet::BackEndSiPM::GetLowGainAmplifierSaturationDown(), mdet::BackEndSiPM::GetLowGainAmplifierSaturationUp(), mdet::Channel::GetMaxNumberOfErrors(), mdet::FrontEnd::GetMeanSampleRatePeriod(), mdet::FrontEndSiPM::GetMeanSampleRatePeriod(), mdet::BackEndSiPM::GetNumberOfChannelsToGroup(), mdet::Fiber::GetNumericalAperture(), mdet::Fiber::GetOnManifoldLength(), mdet::Module::GetPhotoDetector(), mdet::FrontEndSiPM::GetPostT1BufferLength(), mdet::FrontEnd::GetPostT1BufferLength(), mdet::ChannelSiPM::GetPreAmplifierGain(), mdet::ChannelSiPM::GetPreAmplifierTime(), mdet::FrontEndSiPM::GetPreT1BufferLength(), mdet::FrontEnd::GetPreT1BufferLength(), mdet::SiPM::GetPulseAmplitude1Mean(), mdet::SiPM::GetPulseAmplitude1StdDev(), mdet::SiPM::GetPulseAmplitude2Mean(), mdet::SiPM::GetPulseAmplitude2StdDev(), mdet::SiPM::GetPulseAmplitude3Mean(), mdet::SiPM::GetPulseAmplitude3StdDev(), mdet::Pixel::GetPulseAmplitudeMean(), mdet::Pixel::GetPulseAmplitudeStdDev(), mdet::Pixel::GetPulseChargeMean(), mdet::Pixel::GetPulseChargeStdDev(), mdet::Pixel::GetPulseParametersCorrelation(), mdet::Pixel::GetPulseParametrization(), mdet::SiPM::GetPulseRelevantWidth(), mdet::Pixel::GetPulseRelevantWidth(), mdet::Pixel::GetPulseStdDevMean(), mdet::Pixel::GetPulseStdDevStdDev(), mdet::SiPM::GetPulseTime1Mean(), mdet::SiPM::GetPulseTime1StdDev(), mdet::SiPM::GetPulseTime2Mean(), mdet::SiPM::GetPulseTime2StdDev(), mdet::SiPM::GetPulseTime3Mean(), mdet::SiPM::GetPulseTime3StdDev(), mdet::SiPM::GetPulseTime4Mean(), mdet::SiPM::GetPulseTime4StdDev(), mdet::Fiber::GetRadius(), mdet::Fiber::GetRefractionIndex(), mdet::Channel::GetResponseTime(), mdet::FrontEnd::GetSampleRatePeriodJitter(), mdet::FrontEndSiPM::GetSampleTimeADC(), mdet::BackEndSiPM::GetSecondAdderOffset(), mdet::BackEndSiPM::GetSecondAdderPar1(), mdet::BackEndSiPM::GetSecondAdderPar2(), mdet::BackEndSiPM::GetSecondAdderPar3(), mdet::BackEndSiPM::GetSecondAdderPar4(), mdet::BackEndSiPM::GetSecondAdderPar5(), mdet::BackEndSiPM::GetSecondAdderSaturationDown(), mdet::BackEndSiPM::GetSecondAdderSaturationUp(), mdet::Channel::GetSignalShiftMean(), mdet::Channel::GetSignalShiftStdDev(), mdet::BackEndSiPM::GetSimplifiedGainHG(), mdet::BackEndSiPM::GetSimplifiedGainLG(), mdet::BackEndSiPM::GetSimplifiedTime(), mdet::Channel::GetSlewRate(), mdet::FrontEndSiPM::GetStepADC(), mdet::Channel::GetThreshold(), mdet::FrontEnd::GetTrueRangeLowThreshold(), mdet::FrontEndSiPM::GetTrueRangeLowThreshold(), and mdet::Scintillator::GetWidth().

template<class C , class ManagerProvider >
template<typename T >
T& det::DetectorComponent< C, ManagerProvider >::GetData ( T &  d,
const std::string &  p 
) const
inlineprotectedinherited

Common utility function for configuration.

Overload without wrapping parameter: directly gets the datum as parameter. Typically invoked with T equal to a primitive type (int, double, so on).

Definition at line 232 of file DetectorComponent.h.

template<class C , class ManagerProvider >
int det::DetectorComponent< C, ManagerProvider >::GetId ( ) const
inlineinherited

The id of this component.

Definition at line 105 of file DetectorComponent.h.

References det::DetectorComponent< C, ManagerProvider >::fId.

Referenced by G4StationSimulatorOG::G4StationConstruction::AssembleUMD(), MuonCounterViewerAG::ScintBuilder::Box(), MdLDFFinderAG::Likelihood2::CalculateCandidateLikelihood(), MdLDFFinderAG::Likelihood3::CalculateCandidateLikelihood(), MdLDFFinderAG::Likelihood::CalculateCandidateLikelihood(), MdLDFFinderAG::MdLDFFinder::CalculateChi2(), MdLDFFinderAG::MdLDFFinder::FillModulesShowerPlaneDistances(), EdepSimulatorAG::PrimaryGenerator::GeneratePrimaries(), GetCrossTalk(), det::DetectorComponent< C, ManagerProvider >::Init(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::OptoElectronics(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::PlotChannel(), MdCounterSimulatorAG::MdCounterSimulator::PlotChannel(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::PlotIntegrator(), MdCounterSimulatorAG::MdCounterSimulator::PlotIntegrator(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ProcessPulses(), MdCounterSimulatorAG::MdCounterSimulator::ProcessPulses(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ProcessPulsesIntegrator(), MdCounterSimulatorAG::MdCounterSimulator::ProcessPulsesIntegrator(), MdEventSelectorAG::MdEventSelector::RejectTimeOutliers(), EdepSimulatorAG::EdepSimulator::Run(), MuonCounterViewerAG::MuonCounterViewer::Run(), MdCounterSimulatorAG::MdCounterSimulator::RunFromMEventScintillatorSimulated(), MdLDFFinderAG::MdLDFFinder::SetLdfResiduals(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::SimulateElectronics(), MdCounterSimulatorAG::MdCounterSimulator::SimulateElectronics(), and MdCounterSimulatorAG::MdCounterSimulator::SimulatePulses().

template<class C , class ManagerProvider >
const VManager::IndexMap& det::DetectorComponent< C, ManagerProvider >::GetIdsMap ( ) const
inlineinherited
const Module & mdet::PMT::GetModule ( ) const

The module to which this PMT belongs.

Definition at line 146 of file MDetector/PMT.cc.

References fModule.

const PixelGroup& mdet::PMT::GetPixels ( ) const
inlineprivate

Accesses the group of pixels.

Definition at line 300 of file MDetector/PMT.h.

References fPixels.

PMT::PixelGroup::SizeType mdet::PMT::GetRows ( ) const
private

Retrieves the number of rows.

Definition at line 117 of file MDetector/PMT.cc.

References det::DetectorComponent< C, ManagerProvider >::AddIdMessage(), ERROR, fPixels, and sqrt().

Referenced by GetCols(), and InitPixels().

void mdet::PMT::InitPixels ( )
private
bool mdet::PMT::IsNeighbor ( const Pixel src,
const Pixel dst 
) const

Tells whether dst is one of the neighbors of src.

Tells if both Pixel are neighbors within the PMT. It's a simmetrical, non-reflexive relationship.

Definition at line 312 of file MDetector/PMT.cc.

References mdet::Pixel::fNeighbors.

Referenced by GetCrossTalk().

template<class Predicate >
NeighborsContainer::const_iterator mdet::PMT::IsNeighbor ( const Pixel src,
const Pixel dst,
const Predicate &  p 
) const
private

Neighbor finding helper function.

Definition at line 322 of file MDetector/PMT.cc.

References mdet::Pixel::fNeighbors, and G4StationSimulatorOG::p.

NeighborConstIterator mdet::PMT::NeighborsBegin ( const Pixel p) const

Begin iterator over neighbors of the given pixel.

Definition at line 296 of file MDetector/PMT.cc.

References mdet::Pixel::fNeighbors.

Referenced by ComputePulseDestination().

NeighborConstIterator mdet::PMT::NeighborsEnd ( const Pixel p) const

End iterator over neighbors of the given pixel.

Definition at line 304 of file MDetector/PMT.cc.

References mdet::Pixel::fNeighbors.

Referenced by ComputePulseDestination().

PixelConstIterator mdet::PMT::PixelsBegin ( ) const
inline

Begin iterator over the contained pixels.

Definition at line 184 of file MDetector/PMT.h.

References fPixels.

Referenced by InitPixels(), and MDetectorTest::testComponentAssignment().

PixelConstIterator mdet::PMT::PixelsEnd ( ) const
inline

End iterator over the contained pixels.

Definition at line 190 of file MDetector/PMT.h.

References fPixels.

Referenced by InitPixels(), and MDetectorTest::testComponentAssignment().

template<class C , class ManagerProvider >
void det::DetectorComponent< C, ManagerProvider >::Register ( utl::VValidated v)
inlineprotectedinherited
template<class C , class ManagerProvider >
s<< " ]"; } DetectorComponent(int i, const VManager::IndexMap& parentMap) : fId(i), fIdsMap(parentMap) { Init(); } DetectorComponent(const int i) : fId(i) { Init(); } virtual ~DetectorComponent() { } virtual void Update(const bool invalidateData, const bool ) { for (FieldsContainer::iterator i = fFields.begin(), e = fFields.end(); i != e; ++i) (*i)-> det::DetectorComponent< C, ManagerProvider >::SetValid ( false  )
protectedinherited
template<class C , class ManagerProvider >
return o det::DetectorComponent< C, ManagerProvider >::str ( )
inherited
void mdet::PMT::Update ( bool  invalidateData,
bool  invalidateComponents 
)
private

Perform update in this component and forward to subcomponents.

Definition at line 526 of file MDetector/PMT.cc.

References fPixels, det::DetectorComponent< C, ManagerProvider >::GetIdsMap(), InitPixels(), and Update().

Friends And Related Function Documentation

friend class Module
friend

Friendship to allow construction. Also allows access to fPixels (through GetPixels) in function GetPixelFor (handles component linkage).

Definition at line 321 of file MDetector/PMT.h.

friend class utl::ShadowPtr< PMT >
friend

Frienship to allow destruction.

This comes from the fact that the PMT is kept (in mdet::Module) within one of these.

Definition at line 328 of file MDetector/PMT.h.

Member Data Documentation

template<class C , class ManagerProvider >
T & det::DetectorComponent< T >::const
inherited
Initial value:
{
std::ostringstream o

Returns the message that identifies this component.

To make unambiguous the call in the wrapped version.

This method is just a convenience informative method, not meant to be used for control-flow logic (please do not parse this!).

See Also
AddIdMessage(std::ostringstream& s) const.

In the wrapped version, when wrapped type is itself a wrapping template, the compiler has a hard time to decide what to do. So this function was created with the logic formerly contained in the non-wrapped version.

Related to this, see http://www.gotw.ca/publications/mill17.htm.

Definition at line 125 of file DetectorComponent.h.

template<class C , class ManagerProvider >
const DetectorUserData<C>& det::DetectorComponent< C, ManagerProvider >::const
inherited
Initial value:
{
if (!fUserData) {
std::string dataMngr;
GetDataNoWrap(dataMngr, "userData");
DetectorUserData<C>* const t = new DetectorUserData<C>();
DetectorUserData<C>::Load(t, dataMngr);
fUserData = t;
}
return *fUserData

Retrieve the user custom data.

Definition at line 137 of file DetectorComponent.h.

template<class C , class ManagerProvider >
template<typename T1 , typename T2 , template< typename, typename > class P>
T1& det::DetectorComponent< C, ManagerProvider >::const
protectedinherited
Initial value:
{
return GetDataUnwrap<T1>(d, p)

Doubly-templated variation of common utility.

Needed to be added in response to the addition of a 2nd policy parameter to utl::ShadowPtr.

Definition at line 203 of file DetectorComponent.h.

template<class C , class ManagerProvider >
template<typename T >
T& det::DetectorComponent< C, ManagerProvider >::const
protectedinherited
Initial value:
{
if (! d.IsValid()) {
GetDataNoWrap(d.Get(), p);
d.SetValid();
}
return d.Get()

Specialization for utl::Validated.

To make unambiguous the call in the wrapped version.

In the wrapped version, when wrapped type is itself a wrapping template, the compiler has a hard time to decide what to do. So this function was created with the logic formerly contained in the non-wrapped version.

Related to this, see http://www.gotw.ca/publications/mill17.htm.

Definition at line 216 of file DetectorComponent.h.

template<class C , class ManagerProvider >
void det::DetectorComponent< C, ManagerProvider >::const
protectedinherited
Initial value:
{
typedef det::VManager::IndexMap::const_iterator It

Message that identifies the component.

Streams-out a (human-readeable) message identifying the component in the hierarchy. It's meant to be used only in messages sent to the user as a way to identify the component that isssues the message (be it an information, warning or error one).

Maybe it'd have been more idiomatic to overload operator<< but I feel that it would be misleading to "stream out" a DetectorComponent.

Definition at line 250 of file DetectorComponent.h.

int mdet::PMT::fFirstIdPMT
private

Minimum id among PMT's ids.

Definition at line 336 of file MDetector/PMT.h.

Referenced by GetCrossTalk(), and InitPixels().

const Module& mdet::PMT::fModule
private

Definition at line 332 of file MDetector/PMT.h.

Referenced by GetModule().

PixelGroup mdet::PMT::fPixels
private

Definition at line 330 of file MDetector/PMT.h.

Referenced by GetCols(), GetPixels(), GetRows(), InitPixels(), PixelsBegin(), PixelsEnd(), PMT(), and Update().

const double mdet::PMT::kCentralPixelSelfTalk = 100
static

Assumed value for central pixel self-talk.

The general usage for cross-talk matrices is express the to-neighbors talk as the number of pusles in there when in the central pixel one hundred pulse detections were made.

Definition at line 70 of file MDetector/PMT.h.

Referenced by GetCrossTalk(), and GetCrossTalkNormalizationFactor().

const char *const mdet::PMT::kComponentId = MHierarchyInfo::kComponentsIds[5]
static

Definition at line 179 of file MDetector/PMT.h.

const char *const mdet::PMT::kComponentName = MHierarchyInfo::kComponentsNames[5]
static

Definition at line 177 of file MDetector/PMT.h.

const unsigned int mdet::PMT::kNumNeighborsCorner = 3
static

Number of neighbors for a pixel on the corner of the PMT's cathode. The assumed layout for the neighbors' coefficientes is as follows:

  • Upper-left side pixel: X 0 2 1
  • Upper-right side pixel: 0 X 1 2
  • Lower-left side pixel: 2 1 X 0
  • Lower-right side pixel: 1 2 0 X

This supposed arrangement allows (if desired) to configure a single cross-talk matrix for several pixels disregarding the actual position of a single pixel (ie in which side a given pixel is on). For instance, the cross-talk coefficient for the pixel diagonally next to the X one is always the #1.

Definition at line 140 of file MDetector/PMT.h.

Referenced by GetCrossTalk(), GetCrossTalkNormalizationFactor(), and InitPixels().

const unsigned int mdet::PMT::kNumNeighborsInside = 8
static

Number of neighbors for a pixel inside (ie in the middle) the PMT's cathode.

The assumed layout for the neighbors is as follows:

1 2 3 4 X 5 6 7 8

where X is the pixel whose neighbors are represented. The numbers are the position within the linearized representation of the cross-talk matrix of pixel X.

Definition at line 85 of file MDetector/PMT.h.

Referenced by GetCrossTalk(), GetCrossTalkNormalizationFactor(), and InitPixels().

const unsigned int mdet::PMT::kNumNeighborsSide = 5
static

Number of neighbors for a pixel on the side of the PMT's cathode.

The assumed layout for the neighbors is as follows:

  • Left side central pixel: 0 1 X 2 4 3
  • Right side central pixel: 1 0 2 X 3 4
  • Top side central pixel; 0 X 4 1 2 3
  • Bottom side central pixel: 1 2 3 0 X 4
See Also
kNumNeighborsCorner

Definition at line 112 of file MDetector/PMT.h.

Referenced by GetCrossTalk(), GetCrossTalkNormalizationFactor(), and InitPixels().

template<class C , class ManagerProvider >
s<< "id=" << GetId() << " ["; for (It i = GetIdsMap().begin(), e = GetIdsMap().end(); i != e; ++i) s << " " << i-> first<< "=" << i-> det::DetectorComponent< C, ManagerProvider >::second
protectedinherited

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

, generated on Tue Sep 26 2023.