|
JAPAn
Just Another Parity Analyzer
|
Mix-in class enabling mock data generation for hardware channels. More...
#include <MQwMockable.h>
Inheritance diagram for MQwMockable:
Collaboration diagram for MQwMockable:Public Member Functions | |
| MQwMockable () | |
| virtual | ~MQwMockable () |
Parity mock data generation | |
| static std::mt19937 | fRandomnessGenerator |
| Internal randomness generator. | |
| static std::normal_distribution< double > | fNormalDistribution |
| Internal normal probability distribution. | |
| static std::function< double()> | fNormalRandomVariable = []() -> double { return MQwMockable::fNormalDistribution(MQwMockable::fRandomnessGenerator); } |
| Internal normal random variable. | |
| bool | fUseExternalRandomVariable |
| Flag to use an externally provided normal random variable. | |
| double | fExternalRandomVariable |
| Externally provided normal random variable. | |
| bool | fCalcMockDataAsDiff |
| Double_t | fMockAsymmetry |
| Helicity asymmetry. | |
| Double_t | fMockGaussianMean |
| Mean of normal distribution. | |
| Double_t | fMockGaussianSigma |
| Sigma of normal distribution. | |
| std::vector< Double_t > | fMockDriftAmplitude |
| Harmonic drift amplitude. | |
| std::vector< Double_t > | fMockDriftFrequency |
| Harmonic drift frequency. | |
| std::vector< Double_t > | fMockDriftPhase |
| Harmonic drift phase. | |
| virtual void | LoadMockDataParameters (QwParameterFile ¶mfile) |
| Load the mock data parameters from the current line in the param file. | |
| void | SetRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency) |
| Set a single set of harmonic drift parameters. | |
| void | AddRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency) |
| Add drift parameters to the internal set. | |
| void | SetRandomEventParameters (Double_t mean, Double_t sigma) |
| Set the normal random event parameters. | |
| void | SetRandomEventAsymmetry (Double_t asymmetry) |
| Set the helicity asymmetry. | |
| Double_t | GetRandomValue () |
| virtual void | RandomizeEventData (int helicity=0, double time=0.0)=0 |
| Internally generate random event data. | |
| virtual void | SmearByResolution (double resolution)=0 |
| virtual void | SetRawEventData ()=0 |
| virtual void | EncodeEventData (std::vector< UInt_t > &buffer)=0 |
| Encode the event data into a CODA buffer. | |
| void | UseExternalRandomVariable () |
| Set the flag to use an externally provided random variable. | |
| void | SetExternalRandomVariable (Double_t random_variable) |
| Set the externally provided random variable. | |
| void | SetMockDataAsDiff () |
Mix-in class enabling mock data generation for hardware channels.
Provides infrastructure for generating simulated data with configurable asymmetries, noise characteristics, and harmonic drifts. Supports both internal random number generation and external random variables. Used by hardware channel classes to enable Monte Carlo studies and testing without real data acquisition hardware.
Definition at line 30 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 40 of file MQwMockable.h.
References fCalcMockDataAsDiff, fMockAsymmetry, fMockDriftAmplitude, fMockDriftFrequency, fMockDriftPhase, fMockGaussianMean, fMockGaussianSigma, and fUseExternalRandomVariable.
Referenced by QwADC18_Channel::QwADC18_Channel(), QwADC18_Channel::QwADC18_Channel(), QwADC18_Channel::QwADC18_Channel(), QwADC18_Channel::QwADC18_Channel(), QwMollerADC_Channel::QwMollerADC_Channel(), QwMollerADC_Channel::QwMollerADC_Channel(), QwMollerADC_Channel::QwMollerADC_Channel(), QwMollerADC_Channel::QwMollerADC_Channel(), QwVQWK_Channel::QwVQWK_Channel(), QwVQWK_Channel::QwVQWK_Channel(), QwVQWK_Channel::QwVQWK_Channel(), QwVQWK_Channel::QwVQWK_Channel(), VQwScaler_Channel::VQwScaler_Channel(), VQwScaler_Channel::VQwScaler_Channel(), VQwScaler_Channel::VQwScaler_Channel(), and VQwScaler_Channel::VQwScaler_Channel().
Here is the caller graph for this function:
|
inlinevirtual |
Definition at line 50 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 66 of file MQwMockable.cc.
References fMockDriftAmplitude, fMockDriftFrequency, and fMockDriftPhase.
Referenced by LoadMockDataParameters().
Here is the caller graph for this function:
|
pure virtual |
Encode the event data into a CODA buffer.
Implemented in QwADC18_Channel, QwMollerADC_Channel, QwScaler_Channel< data_mask, data_shift >, QwScaler_Channel< 0x00ffffff, 0 >, QwVQWK_Channel, and VQwScaler_Channel.
| Double_t MQwMockable::GetRandomValue | ( | ) |
Return a random value generated either from the internal or external Random Variable.
Definition at line 88 of file MQwMockable.cc.
References fExternalRandomVariable, fNormalRandomVariable, and fUseExternalRandomVariable.
Referenced by QwADC18_Channel::RandomizeEventData(), QwMollerADC_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), VQwScaler_Channel::RandomizeEventData(), QwADC18_Channel::SmearByResolution(), QwMollerADC_Channel::SmearByResolution(), QwVQWK_Channel::SmearByResolution(), and VQwScaler_Channel::SmearByResolution().
Here is the caller graph for this function:
|
virtual |
Load the mock data parameters from the current line in the param file.
Reimplemented in QwADC18_Channel, QwMollerADC_Channel, QwVQWK_Channel, and VQwScaler_Channel.
Definition at line 19 of file MQwMockable.cc.
References AddRandomEventDriftParameters(), QwParameterFile::GetLine(), QwParameterFile::GetNextToken(), QwParameterFile::GetTypedNextToken(), Qw::Hz, SetRandomEventAsymmetry(), and SetRandomEventParameters().
Referenced by VQwScaler_Channel::PrintErrorCounterTail().
Here is the call graph for this function:
Here is the caller graph for this function:
|
pure virtual |
Internally generate random event data.
Implemented in QwADC18_Channel, QwMollerADC_Channel, QwVQWK_Channel, and VQwScaler_Channel.
|
inline |
Set the externally provided random variable.
Definition at line 90 of file MQwMockable.h.
References fExternalRandomVariable, and fUseExternalRandomVariable.
|
inline |
| void MQwMockable::SetRandomEventAsymmetry | ( | Double_t | asymmetry | ) |
Set the helicity asymmetry.
Definition at line 82 of file MQwMockable.cc.
References fMockAsymmetry.
Referenced by LoadMockDataParameters().
Here is the caller graph for this function:| void MQwMockable::SetRandomEventDriftParameters | ( | Double_t | amplitude, |
| Double_t | phase, | ||
| Double_t | frequency ) |
Set a single set of harmonic drift parameters.
Definition at line 53 of file MQwMockable.cc.
References fMockDriftAmplitude, fMockDriftFrequency, and fMockDriftPhase.
| void MQwMockable::SetRandomEventParameters | ( | Double_t | mean, |
| Double_t | sigma ) |
Set the normal random event parameters.
Definition at line 75 of file MQwMockable.cc.
References fMockGaussianMean, and fMockGaussianSigma.
Referenced by VQwScaler_Channel::InitializeChannel(), and LoadMockDataParameters().
Here is the caller graph for this function:
|
pure virtual |
Implemented in QwADC18_Channel, QwMollerADC_Channel, QwVQWK_Channel, and VQwScaler_Channel.
|
pure virtual |
Implemented in QwADC18_Channel, QwMollerADC_Channel, QwVQWK_Channel, and VQwScaler_Channel.
|
inline |
Set the flag to use an externally provided random variable.
Definition at line 88 of file MQwMockable.h.
References fUseExternalRandomVariable.
|
protected |
Definition at line 113 of file MQwMockable.h.
Referenced by MQwMockable(), QwMollerADC_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), and SetMockDataAsDiff().
|
protected |
Externally provided normal random variable.
Definition at line 111 of file MQwMockable.h.
Referenced by GetRandomValue(), and SetExternalRandomVariable().
|
protected |
Helicity asymmetry.
Definition at line 116 of file MQwMockable.h.
Referenced by QwADC18_Channel::InitializeChannel(), QwMollerADC_Channel::InitializeChannel(), QwVQWK_Channel::InitializeChannel(), MQwMockable(), QwADC18_Channel::RandomizeEventData(), QwMollerADC_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), VQwScaler_Channel::RandomizeEventData(), and SetRandomEventAsymmetry().
|
protected |
Harmonic drift amplitude.
Definition at line 119 of file MQwMockable.h.
Referenced by AddRandomEventDriftParameters(), QwADC18_Channel::InitializeChannel(), QwMollerADC_Channel::InitializeChannel(), QwVQWK_Channel::InitializeChannel(), QwADC18_Channel::LoadMockDataParameters(), MQwMockable(), QwADC18_Channel::RandomizeEventData(), QwMollerADC_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), VQwScaler_Channel::RandomizeEventData(), SetRandomEventDriftParameters(), and ~MQwMockable().
|
protected |
Harmonic drift frequency.
Definition at line 120 of file MQwMockable.h.
Referenced by AddRandomEventDriftParameters(), QwADC18_Channel::InitializeChannel(), QwMollerADC_Channel::InitializeChannel(), QwVQWK_Channel::InitializeChannel(), QwADC18_Channel::LoadMockDataParameters(), MQwMockable(), QwADC18_Channel::RandomizeEventData(), QwMollerADC_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), VQwScaler_Channel::RandomizeEventData(), SetRandomEventDriftParameters(), and ~MQwMockable().
|
protected |
Harmonic drift phase.
Definition at line 121 of file MQwMockable.h.
Referenced by AddRandomEventDriftParameters(), QwADC18_Channel::InitializeChannel(), QwMollerADC_Channel::InitializeChannel(), QwVQWK_Channel::InitializeChannel(), QwADC18_Channel::LoadMockDataParameters(), MQwMockable(), QwADC18_Channel::RandomizeEventData(), QwMollerADC_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), VQwScaler_Channel::RandomizeEventData(), SetRandomEventDriftParameters(), and ~MQwMockable().
|
protected |
Mean of normal distribution.
Definition at line 117 of file MQwMockable.h.
Referenced by QwADC18_Channel::InitializeChannel(), QwMollerADC_Channel::InitializeChannel(), QwVQWK_Channel::InitializeChannel(), MQwMockable(), QwADC18_Channel::RandomizeEventData(), QwMollerADC_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), VQwScaler_Channel::RandomizeEventData(), and SetRandomEventParameters().
|
protected |
Sigma of normal distribution.
Definition at line 118 of file MQwMockable.h.
Referenced by QwMollerADC_Channel::CopyParameters(), QwADC18_Channel::InitializeChannel(), QwMollerADC_Channel::InitializeChannel(), QwVQWK_Channel::InitializeChannel(), MQwMockable(), QwADC18_Channel::RandomizeEventData(), QwMollerADC_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), VQwScaler_Channel::RandomizeEventData(), and SetRandomEventParameters().
|
staticprotected |
Internal normal probability distribution.
Definition at line 105 of file MQwMockable.h.
|
staticprotected |
Internal normal random variable.
Definition at line 16 of file MQwMockable.h.
Referenced by GetRandomValue().
|
staticprotected |
Internal randomness generator.
Definition at line 103 of file MQwMockable.h.
|
protected |
Flag to use an externally provided normal random variable.
Definition at line 109 of file MQwMockable.h.
Referenced by GetRandomValue(), QwADC18_Channel::InitializeChannel(), QwMollerADC_Channel::InitializeChannel(), QwVQWK_Channel::InitializeChannel(), MQwMockable(), SetExternalRandomVariable(), and UseExternalRandomVariable().