QwAnalysis
|
#include <MQwMockable.h>
Public Member Functions | |
MQwMockable () | |
virtual | ~MQwMockable () |
Parity mock data generation | |
static boost::mt19937 | fRandomnessGenerator |
Internal randomness generator. More... | |
static boost::normal_distribution < double > | fNormalDistribution |
Internal normal probability distribution. More... | |
static boost::variate_generator < boost::mt19937, boost::normal_distribution < double > > | fNormalRandomVariable |
Internal normal random variable. More... | |
bool | fUseExternalRandomVariable |
Flag to use an externally provided normal random variable. More... | |
double | fExternalRandomVariable |
Externally provided normal random variable. More... | |
Double_t | fMockAsymmetry |
Helicity asymmetry. More... | |
Double_t | fMockGaussianMean |
Mean of normal distribution. More... | |
Double_t | fMockGaussianSigma |
Sigma of normal distribution. More... | |
std::vector< Double_t > | fMockDriftAmplitude |
Harmonic drift amplitude. More... | |
std::vector< Double_t > | fMockDriftFrequency |
Harmonic drift frequency. More... | |
std::vector< Double_t > | fMockDriftPhase |
Harmonic drift phase. More... | |
void | SetRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency) |
Set a single set of harmonic drift parameters. More... | |
void | AddRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency) |
Add drift parameters to the internal set. More... | |
void | SetRandomEventParameters (Double_t mean, Double_t sigma) |
Set the normal random event parameters. More... | |
void | SetRandomEventAsymmetry (Double_t asymmetry) |
Set the helicity asymmetry. More... | |
Double_t | GetRandomValue () |
virtual void | RandomizeEventData (int helicity=0, double time=0.0)=0 |
Internally generate random event data. More... | |
virtual void | EncodeEventData (std::vector< UInt_t > &buffer)=0 |
Encode the event data into a CODA buffer. More... | |
void | UseExternalRandomVariable () |
Set the flag to use an externally provided random variable. More... | |
void | SetExternalRandomVariable (Double_t random_variable) |
Set the externally provided random variable. More... | |
Definition at line 19 of file MQwMockable.h.
|
inline |
Class: MQwMockable Mix-in class to enable mock-data generation for a data element. Only the data element classes which actually contain raw data (such as QwVQWK_Channel, QwScaler_Channel, etc.) should inherit from this class.
Definition at line 29 of file MQwMockable.h.
References fMockDriftAmplitude, fMockDriftFrequency, and fMockDriftPhase.
|
inlinevirtual |
Definition at line 38 of file MQwMockable.h.
References fMockDriftAmplitude, fMockDriftFrequency, and fMockDriftPhase.
void MQwMockable::AddRandomEventDriftParameters | ( | Double_t | amplitude, |
Double_t | phase, | ||
Double_t | frequency | ||
) |
Add drift parameters to the internal set.
Definition at line 32 of file MQwMockable.cc.
References fMockDriftAmplitude, fMockDriftFrequency, and fMockDriftPhase.
Referenced by QwIntegrationPMT::AddRandomEventDriftParameters().
|
pure virtual |
Encode the event data into a CODA buffer.
Implemented in QwScaler_Channel< data_mask, data_shift >, QwScaler_Channel< 0x00ffffff, 0 >, QwVQWK_Channel, QwSIS3320_Channel, and VQwScaler_Channel.
Double_t MQwMockable::GetRandomValue | ( | ) |
Return a random value generated either from the internal or external Random Variable.
Definition at line 54 of file MQwMockable.cc.
References fExternalRandomVariable, fNormalRandomVariable, and fUseExternalRandomVariable.
Referenced by VQwScaler_Channel::RandomizeEventData(), and QwVQWK_Channel::RandomizeEventData().
|
pure virtual |
Internally generate random event data.
Implemented in QwVQWK_Channel, QwSIS3320_Channel, and VQwScaler_Channel.
|
inline |
Set the externally provided random variable.
Definition at line 69 of file MQwMockable.h.
References fExternalRandomVariable, and fUseExternalRandomVariable.
Referenced by QwIntegrationPMT::SetExternalRandomVariable().
void MQwMockable::SetRandomEventAsymmetry | ( | Double_t | asymmetry | ) |
Set the helicity asymmetry.
Definition at line 48 of file MQwMockable.cc.
References fMockAsymmetry.
Referenced by QwIntegrationPMT::SetRandomEventAsymmetry().
void MQwMockable::SetRandomEventDriftParameters | ( | Double_t | amplitude, |
Double_t | phase, | ||
Double_t | frequency | ||
) |
Set a single set of harmonic drift parameters.
Definition at line 19 of file MQwMockable.cc.
References fMockDriftAmplitude, fMockDriftFrequency, and fMockDriftPhase.
Referenced by QwIntegrationPMT::SetRandomEventDriftParameters().
void MQwMockable::SetRandomEventParameters | ( | Double_t | mean, |
Double_t | sigma | ||
) |
Set the normal random event parameters.
Definition at line 41 of file MQwMockable.cc.
References fMockGaussianMean, and fMockGaussianSigma.
Referenced by VQwScaler_Channel::InitializeChannel(), QwIntegrationPMT::SetRandomEventParameters(), QwQPD::SetRandomEventParameters(), and QwLinearDiodeArray::SetRandomEventParameters().
|
inline |
Set the flag to use an externally provided random variable.
Definition at line 67 of file MQwMockable.h.
References fUseExternalRandomVariable.
Referenced by QwIntegrationPMT::UseExternalRandomVariable().
|
protected |
Externally provided normal random variable.
Definition at line 88 of file MQwMockable.h.
Referenced by GetRandomValue(), and SetExternalRandomVariable().
|
protected |
Helicity asymmetry.
Definition at line 91 of file MQwMockable.h.
Referenced by QwVQWK_Channel::InitializeChannel(), QwSIS3320_Channel::InitializeChannel(), VQwScaler_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), and SetRandomEventAsymmetry().
|
protected |
Harmonic drift amplitude.
Definition at line 94 of file MQwMockable.h.
Referenced by AddRandomEventDriftParameters(), QwVQWK_Channel::InitializeChannel(), MQwMockable(), VQwScaler_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), SetRandomEventDriftParameters(), and ~MQwMockable().
|
protected |
Harmonic drift frequency.
Definition at line 95 of file MQwMockable.h.
Referenced by AddRandomEventDriftParameters(), QwVQWK_Channel::InitializeChannel(), MQwMockable(), VQwScaler_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), SetRandomEventDriftParameters(), and ~MQwMockable().
|
protected |
Harmonic drift phase.
Definition at line 96 of file MQwMockable.h.
Referenced by AddRandomEventDriftParameters(), QwVQWK_Channel::InitializeChannel(), MQwMockable(), VQwScaler_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), SetRandomEventDriftParameters(), and ~MQwMockable().
|
protected |
Mean of normal distribution.
Definition at line 92 of file MQwMockable.h.
Referenced by QwVQWK_Channel::InitializeChannel(), QwSIS3320_Channel::InitializeChannel(), VQwScaler_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), and SetRandomEventParameters().
|
protected |
Sigma of normal distribution.
Definition at line 93 of file MQwMockable.h.
Referenced by QwVQWK_Channel::InitializeChannel(), QwSIS3320_Channel::InitializeChannel(), VQwScaler_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), and SetRandomEventParameters().
|
staticprotected |
Internal normal probability distribution.
Definition at line 81 of file MQwMockable.h.
|
staticprotected |
Internal normal random variable.
Definition at line 84 of file MQwMockable.h.
Referenced by GetRandomValue().
|
staticprotected |
Internal randomness generator.
Definition at line 79 of file MQwMockable.h.
|
protected |
Flag to use an externally provided normal random variable.
Definition at line 86 of file MQwMockable.h.
Referenced by GetRandomValue(), QwVQWK_Channel::InitializeChannel(), SetExternalRandomVariable(), and UseExternalRandomVariable().