JAPAn
Just Another Parity Analyzer
Loading...
Searching...
No Matches
QwFakeHelicity Class Reference

Helicity source that generates a reproducible sequence from seeds. More...

#include <QwFakeHelicity.h>

+ Inheritance diagram for QwFakeHelicity:
+ Collaboration diagram for QwFakeHelicity:

Public Member Functions

 QwFakeHelicity (TString region_tmp)
 
 ~QwFakeHelicity () override
 
void ClearEventData () override
 
Bool_t IsGoodHelicity () override
 
void ProcessEvent () override
 
Bool_t CheckForBurpFail (const VQwSubsystem *subsys) override
 Report the number of events failed due to HW and event cut failures.
 
- Public Member Functions inherited from QwHelicity
 QwHelicity (const TString &name)
 Constructor with name.
 
 QwHelicity (const QwHelicity &source)
 Copy constructor.
 
 ~QwHelicity () override
 Virtual destructor.
 
void ProcessOptions (QwOptions &options) override
 Process the command line options.
 
Int_t LoadChannelMap (TString mapfile) override
 Mandatory map file definition.
 
Int_t LoadInputParameters (TString pedestalfile) override
 Mandatory parameter file definition.
 
Int_t LoadEventCuts (TString filename) override
 Optional event cut file.
 
Bool_t ApplySingleEventCuts () override
 Apply the single event cuts.
 
Bool_t CheckForBurpFail (const VQwSubsystem *ev_error) override
 Report the number of events failed due to HW and event cut failures.
 
void IncrementErrorCounters () override
 Increment the error counters.
 
void PrintErrorCounters () const override
 
UInt_t GetEventcutErrorFlag () override
 Return the error flag to the top level routines related to stability checks and ErrorFlag updates.
 
void UpdateErrorFlag (const VQwSubsystem *ev_error) override
 update the error flag in the subsystem level from the top level routines related to stability checks. This will uniquely update the errorflag at each channel based on the error flag in the corresponding channel in the ev_error subsystem
 
Int_t ProcessConfigurationBuffer (const ROCID_t roc_id, const BankID_t bank_id, UInt_t *buffer, UInt_t num_words) override
 
Int_t ProcessEvBuffer (const ROCID_t roc_id, const BankID_t bank_id, UInt_t *buffer, UInt_t num_words) override
 TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware version.
 
Int_t ProcessEvBuffer (UInt_t ev_type, const ROCID_t roc_id, const BankID_t bank_id, UInt_t *buffer, UInt_t num_words) override
 
void ProcessEventUserbitMode ()
 Process helicity information from userbit configuration data.
 
void ProcessEventInputRegisterMode ()
 
void ProcessEventInputMollerMode ()
 
void EncodeEventData (std::vector< UInt_t > &buffer) override
 
void ClearEventData () override
 
void ProcessEvent () override
 
UInt_t GetRandomSeedActual ()
 
UInt_t GetRandomSeedDelayed ()
 
void PredictHelicity ()
 
void RunPredictor ()
 
void SetHelicityDelay (Int_t delay)
 
void SetHelicityBitPattern (TString hex)
 
Int_t GetHelicityReported ()
 
Int_t GetHelicityActual ()
 
Int_t GetHelicityDelayed ()
 
Long_t GetEventNumber ()
 
Long_t GetPatternNumber ()
 
Int_t GetPhaseNumber ()
 
Int_t GetMaxPatternPhase ()
 
Int_t GetMinPatternPhase ()
 
void SetFirstBits (UInt_t nbits, UInt_t firstbits)
 
void SetEventPatternPhase (Int_t event, Int_t pattern, Int_t phase)
 
VQwSubsystemoperator= (VQwSubsystem *value) override
 Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsystem *value) by VQwSubsystem::operator=(value)
 
VQwSubsystemoperator+= (VQwSubsystem *value) override
 
VQwSubsystemoperator-= (VQwSubsystem *value) override
 
void Scale (Double_t factor) override
 
void Ratio (VQwSubsystem *numer, VQwSubsystem *denom) override
 
void AccumulateRunningSum (VQwSubsystem *value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override
 Update the running sums for devices.
 
void DeaccumulateRunningSum (VQwSubsystem *value, Int_t ErrorMask=0xFFFFFFF) override
 remove one entry from the running sums for devices
 
void CalculateRunningAverage () override
 Calculate the average for all good events.
 
void ConstructHistograms (TDirectory *folder, TString &prefix) override
 Construct the histograms for this subsystem in a folder with a prefix.
 
void FillHistograms () override
 Fill the histograms for this subsystem.
 
void ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values) override
 Construct the branch and tree vector.
 
void ConstructBranch (TTree *tree, TString &prefix) override
 Construct the branch and tree vector.
 
void ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &trim_file) override
 Construct the branch and tree vector based on the trim file.
 
void FillTreeVector (QwRootTreeBranchVector &values) const override
 Fill the tree vector.
 
void Print () const
 
Bool_t IsHelicityIgnored ()
 
virtual void ConstructHistograms ()
 Construct the histograms for this subsystem.
 
virtual void ConstructHistograms (TDirectory *folder)
 Construct the histograms for this subsystem in a folder.
 
virtual void ConstructHistograms (TString &prefix)
 Construct the histograms for this subsystem with a prefix.
 
virtual void ConstructBranchAndVector (TTree *tree, QwRootTreeBranchVector &values)
 Construct the branch and tree vector.
 
- Public Member Functions inherited from VQwSubsystemParity
 VQwSubsystemParity (const TString &name)
 Constructor with name.
 
 VQwSubsystemParity (const VQwSubsystemParity &source)
 Copy constructor.
 
 ~VQwSubsystemParity () override
 Default destructor.
 
virtual void FillDB_MPS (QwParityDB *, TString)
 Fill the database with MPS-based variables Note that most subsystems don't need to do this.
 
virtual void FillDB (QwParityDB *, TString)
 Fill the database.
 
virtual void FillErrDB (QwParityDB *, TString)
 
virtual void Sum (VQwSubsystem *value1, VQwSubsystem *value2)
 
virtual void Difference (VQwSubsystem *value1, VQwSubsystem *value2)
 
Int_t LoadEventCuts (TString filename) override
 Load the event cuts file.
 
virtual void LoadEventCuts_Init ()
 
virtual void LoadEventCuts_Line (QwParameterFile &, TString &, Int_t &)
 
virtual void LoadEventCuts_Fin (Int_t &)
 
virtual UInt_t UpdateErrorFlag ()
 Uses the error flags of contained data elements to update Returns the error flag to the top level routines related to stability checks and ErrorFlag updates.
 
virtual void Blind (const QwBlinder *)
 Blind the asymmetry of this subsystem.
 
virtual void Blind (const QwBlinder *, const VQwSubsystemParity *)
 Blind the difference of this subsystem.
 
virtual void PrintValue () const
 Print values of all channels.
 
virtual void WritePromptSummary (QwPromptSummary *, TString)
 
virtual Bool_t CheckForEndOfBurst () const
 
virtual void LoadMockDataParameters (TString)
 
- Public Member Functions inherited from VQwSubsystem
 VQwSubsystem (const TString &name)
 Constructor with name.
 
 VQwSubsystem (const VQwSubsystem &orig)
 Copy constructor by object.
 
 ~VQwSubsystem () override
 Default destructor.
 
TString GetName () const
 
Bool_t HasDataLoaded () const
 
VQwSubsystemGetSibling (const std::string &name) const
 Get the sibling with specified name.
 
virtual std::vector< TString > GetParamFileNameList ()
 
virtual std::map< TString, TString > GetDetectorMaps ()
 
Bool_t PublishByRequest (TString) override
 Try to publish an internal variable matching the submitted name.
 
Bool_t PublishInternalValues () const override
 Publish all variables of the subsystem.
 
virtual Int_t LoadDetectorMaps (QwParameterFile &file)
 Parse parameter file to find the map files.
 
virtual Int_t LoadGeometryDefinition (TString)
 Optional geometry definition.
 
virtual Int_t LoadCrosstalkDefinition (TString)
 Optional crosstalk definition.
 
void SetEventTypeMask (const UInt_t mask)
 Set event type mask.
 
UInt_t GetEventTypeMask () const
 Get event type mask.
 
virtual void ExchangeProcessedData ()
 Request processed data from other subsystems for internal use in the second event processing stage. Not all derived classes will require data from other subsystems.
 
virtual void ProcessEvent_2 ()
 Process the event data again, including data from other subsystems. Not all derived classes will require a second stage of event data processing.
 
virtual void AtEndOfEventLoop ()
 Perform actions at the end of the event loop.
 
virtual void RandomizeEventData (int=0, double=0.0)
 
virtual void ConstructObjects ()
 Construct the objects for this subsystem.
 
virtual void ConstructObjects (TDirectory *folder)
 Construct the objects for this subsystem in a folder.
 
virtual void ConstructObjects (TString &prefix)
 Construct the objects for this subsystem with a prefix.
 
virtual void ConstructObjects (TDirectory *, TString &)
 Construct the objects for this subsystem in a folder with a prefix.
 
virtual void ConstructTree ()
 Construct the tree for this subsystem.
 
virtual void ConstructTree (TDirectory *folder)
 Construct the tree for this subsystem in a folder.
 
virtual void ConstructTree (TString &prefix)
 Construct the tree for this subsystem with a prefix.
 
virtual void ConstructTree (TDirectory *, TString &)
 Construct the tree for this subsystem in a folder with a prefix.
 
virtual void FillTree ()
 Fill the tree for this subsystem.
 
virtual void DeleteTree ()
 Delete the tree for this subsystem.
 
virtual void PrintInfo () const
 Print some information about the subsystem.
 
virtual void PrintDetectorMaps (Bool_t status) const
 
void GetMarkerWordList (const ROCID_t roc_id, const BankID_t bank_id, std::vector< UInt_t > &marker) const
 
std::vector< ROCID_tGetROCIds () const
 
- Public Member Functions inherited from MQwHistograms
void ShareHistograms (const MQwHistograms *source)
 Share histogram pointers between objects.
 
- Public Member Functions inherited from MQwPublishable_child< QwSubsystemArray, VQwSubsystem >
 MQwPublishable_child ()
 Default constructor Initializes the child object and sets up self-reference for publishing.
 
 MQwPublishable_child (const MQwPublishable_child &source)
 Copy constructor.
 
virtual ~MQwPublishable_child ()
 Virtual destructor.
 
void SetParent (QwSubsystemArray *parent)
 Set the parent container for this child object.
 
QwSubsystemArrayGetParent () const
 Get the parent container for this child object.
 
- Public Member Functions inherited from MQwCloneable< VQwSubsystem, QwHelicity >
 ~MQwCloneable () override
 Virtual destructor.
 
VQwSubsystemClone () const override
 Concrete clone method.
 
const VQwFactory< VQwSubsystem > * Factory () const override
 Factory getter.
 
- Public Member Functions inherited from VQwCloneable< VQwSubsystem >
virtual ~VQwCloneable ()
 Virtual destructor.
 
std::string GetClassName () const
 Get demangled name of this class.
 

Protected Member Functions

Bool_t CollectRandBits () override
 
UInt_t GetRandbit (UInt_t &ranseed) override
 
- Protected Member Functions inherited from QwHelicity
void CheckPatternNum (VQwSubsystem *value)
 
void MergeCounters (VQwSubsystem *value)
 
Bool_t CheckIORegisterMask (const UInt_t &ioregister, const UInt_t &mask) const
 
void SetHistoTreeSave (const TString &prefix)
 
Bool_t IsGoodPatternNumber ()
 
Bool_t IsGoodEventNumber ()
 
Bool_t MatchActualHelicity (Int_t actual)
 
Bool_t IsGoodPhaseNumber ()
 
Bool_t IsContinuous ()
 
UInt_t GetRandbit24 (UInt_t &ranseed)
 
UInt_t GetRandbit30 (UInt_t &ranseed)
 
UInt_t GetRandomSeed (UShort_t *first24randbits)
 
Bool_t CollectRandBits24 ()
 
Bool_t CollectRandBits30 ()
 
void ResetPredictor ()
 
Bool_t Compare (VQwSubsystem *source)
 
void ClearErrorCounters ()
 
void ClearAllBankRegistrations ()
 Clear all registration of ROC and Bank IDs for this subsystem.
 
virtual Int_t RegisterROCNumber (const ROCID_t roc_id, const BankID_t bank_id=0)
 Tell the object that it will decode data from this ROC and sub-bank.
 
Int_t RegisterSubbank (const BankID_t bank_id)
 Tell the object that it will decode data from this sub-bank in the ROC currently open for registration.
 
Int_t RegisterMarkerWord (const UInt_t markerword)
 
void RegisterRocBankMarker (QwParameterFile &mapstr)
 
Int_t GetSubbankIndex () const
 
Int_t GetSubbankIndex (const ROCID_t roc_id, const BankID_t bank_id) const
 
void SetDataLoaded (Bool_t flag)
 
template<class T>
Int_t FindIndex (const std::vector< T > &myvec, const T value) const
 
Bool_t Compare (VQwSubsystem *source)
 
- Protected Member Functions inherited from MQwHistograms
 MQwHistograms ()
 Default constructor.
 
 MQwHistograms (const MQwHistograms &source)
 Copy constructor.
 
virtual ~MQwHistograms ()
 Virtual destructor.
 
MQwHistogramsoperator= (const MQwHistograms &value)
 
void Fill_Pointer (TH1_ptr hist_ptr, Double_t value)
 
void AddHistogram (TH1 *h)
 Register a histogram.
 
- Protected Member Functions inherited from MQwPublishable_child< QwSubsystemArray, VQwSubsystem >
Bool_t RequestExternalValue (const TString &name, VQwHardwareChannel *value) const
 Retrieve the variable name from other subsystem arrays Get the value corresponding to some variable name from a different data array.
 
const VQwHardwareChannelRequestExternalPointer (const TString &name) const
 Retrieve a pointer to an external variable by name Requests a direct pointer to a variable from sibling subsystems via the parent container.
 
Bool_t PublishInternalValue (const TString name, const TString desc, const VQwHardwareChannel *element) const
 Publish a variable from this child into the parent container.
 

Protected Attributes

Int_t fMinPatternPhase
 
- Protected Attributes inherited from QwHelicity
UInt_t fInputReg_FakeMPS
 
UInt_t fInputReg_HelPlus
 
UInt_t fInputReg_HelMinus
 
UInt_t fInputReg_PatternSync
 
UInt_t fInputReg_PairSync
 
std::vector< UInt_t > fHelicityBitPattern
 
std::vector< QwWordfWord
 
std::vector< std::pair< Int_t, Int_t > > fWordsPerSubbank
 
Int_t fHelicityDecodingMode
 
Int_t kUserbit
 
Int_t kScalerCounter
 
Int_t kInputRegister
 
Int_t kPatternCounter
 
Int_t kMpsCounter
 
Int_t kPatternPhase
 
UInt_t kEventTypeHelPlus
 
UInt_t kEventTypeHelMinus
 
Int_t fEventNumberOld
 
Int_t fEventNumber
 
Int_t fPatternPhaseNumberOld
 
Int_t fPatternPhaseNumber
 
Int_t fPatternNumberOld
 
Int_t fPatternNumber
 
Int_t fPatternSeed
 
Int_t fActualPatternPolarity
 True polarity of the current pattern.
 
Int_t fDelayedPatternPolarity
 Reported polarity of the current pattern.
 
Int_t fPreviousPatternPolarity
 True polarity of the previous pattern.
 
Int_t fHelicityReported
 
Int_t fHelicityActual
 
Int_t fHelicityDelayed
 
Bool_t fHelicityBitPlus
 
Bool_t fHelicityBitMinus
 
Bool_t fGoodHelicity
 
Bool_t fGoodPattern
 
Int_t fHistoType
 
size_t fTreeArrayIndex
 
size_t fTreeArrayNumEntries
 
UInt_t n_ranbits
 
UInt_t iseed_Actual
 
UInt_t iseed_Delayed
 
Int_t fHelicityDelay
 
Int_t fMaxPatternPhase
 
Int_t fMinPatternPhase
 
Int_t fRandBits
 
Bool_t fUsePredictor
 
Bool_t fHelicityInfoOK
 
Int_t fPatternPhaseOffset
 
Bool_t fIgnoreHelicity
 
UInt_t fEventType
 
Int_t fEventNumberFirst
 
Int_t fPatternNumberFirst
 
Int_t fNumMissedGates
 
Int_t fNumMissedEventBlocks
 
Int_t fNumMultSyncErrors
 
Int_t fNumHelicityErrors
 
UInt_t fErrorFlag
 
Bool_t fSuppressMPSErrorMsgs
 
- Protected Attributes inherited from VQwSubsystem
std::vector< std::vector< TString > > fPublishList
 
TString fSystemName
 Name of this subsystem.
 
UInt_t fEventTypeMask
 Mask of event types.
 
Bool_t fIsDataLoaded
 Has this subsystem gotten data to be processed?
 
std::vector< TString > fDetectorMapsNames
 Names of loaded detector map files.
 
std::map< TString, TString > fDetectorMaps
 Map of file name to full path or content.
 
ROCID_t fCurrentROC_ID
 ROC ID that is currently being processed.
 
BankID_t fCurrentBank_ID
 Bank ID (and Marker word) that is currently being processed;.
 
std::vector< ROCID_tfROC_IDs
 Vector of ROC IDs associated with this subsystem.
 
std::vector< std::vector< BankID_t > > fBank_IDs
 Vector of Bank IDs per ROC ID associated with this subsystem.
 
std::vector< std::vector< std::vector< UInt_t > > > fMarkerWords
 Vector of marker words per ROC & subbank associated with this subsystem.
 
- Protected Attributes inherited from MQwHistograms
std::vector< TH1_ptrfHistograms
 Histograms associated with this data element.
 

Additional Inherited Members

- Static Public Member Functions inherited from QwHelicity
static void DefineOptions (QwOptions &options)
 Define options function.
 
- Static Public Member Functions inherited from VQwSubsystem
static void DefineOptions ()
 Define options function (note: no virtual static functions in C++)
 
- Static Public Member Functions inherited from MQwCloneable< VQwSubsystem, QwHelicity >
static VQwSubsystemCreate (const std::string &name)
 Object creation.
 
static QwHelicityCast (QwHelicity *type)
 Object dynamic cast.
 
- Protected Types inherited from QwHelicity
enum  HelicityRootSavingType { kHelSaveMPS = 0 , kHelSavePattern , kHelNoSave }
 
enum  HelicityEncodingType { kHelUserbitMode =0 , kHelInputRegisterMode , kHelLocalyMadeUp , kHelInputMollerMode }
 
enum  InputRegisterBits { kDefaultInputReg_HelPlus = 0x1 , kDefaultInputReg_HelMinus = 0x2 , kDefaultInputReg_PatternSync = 0x4 , kDefaultInputReg_FakeMPS = 0x8000 }
 
- Static Protected Attributes inherited from QwHelicity
static const std::vector< UInt_t > kDefaultHelicityBitPattern {0x69}
 
static const Bool_t kDEBUG =kFALSE
 
static const Int_t kUndefinedHelicity = -9999
 

Detailed Description

Helicity source that generates a reproducible sequence from seeds.

The QwFakeHelicity class uses a pregenerated random seed to generate the fake helicity signal that then can be used to perform helicity related calculations.

Used for testing and simulations when real helicity decoding is not available. Inherits the helicity interface and overrides event handling.

Definition at line 25 of file QwFakeHelicity.h.

Constructor & Destructor Documentation

◆ QwFakeHelicity()

QwFakeHelicity::QwFakeHelicity ( TString region_tmp)
inline

Definition at line 27 of file QwFakeHelicity.h.

27 :VQwSubsystem(region_tmp),QwHelicity(region_tmp),fMinPatternPhase(1)
28
29 {
30 // using the constructor of the base class
31 };
QwHelicity()
Private default constructor (not implemented, will throw linker error on use)

References fMinPatternPhase, QwHelicity::QwHelicity(), and VQwSubsystem::VQwSubsystem().

+ Here is the call graph for this function:

◆ ~QwFakeHelicity()

QwFakeHelicity::~QwFakeHelicity ( )
inlineoverride

Definition at line 33 of file QwFakeHelicity.h.

33{ };

Member Function Documentation

◆ CheckForBurpFail()

Bool_t QwFakeHelicity::CheckForBurpFail ( const VQwSubsystem * subsys)
inlineoverridevirtual

Report the number of events failed due to HW and event cut failures.

Implements VQwSubsystemParity.

Definition at line 39 of file QwFakeHelicity.h.

39 {
40 return kFALSE;
41 };

References VQwSubsystem::VQwSubsystem().

+ Here is the call graph for this function:

◆ ClearEventData()

void QwFakeHelicity::ClearEventData ( )
overridevirtual

Implements VQwSubsystem.

Definition at line 63 of file QwFakeHelicity.cc.

64 {
65 for (size_t i=0;i<fWord.size();i++)
67
68 //reset data
72
73 //clear data
75 fHelicityBitPlus = kFALSE;
76 fHelicityBitMinus = kFALSE;
77 return;
78 }
void ClearEventData() override
Int_t fPatternNumberOld
Definition QwHelicity.h:229
Int_t fPatternNumber
Definition QwHelicity.h:229
Int_t fPatternPhaseNumberOld
Definition QwHelicity.h:228
Int_t fPatternPhaseNumber
Definition QwHelicity.h:228
std::vector< QwWord > fWord
Definition QwHelicity.h:205
static const Int_t kUndefinedHelicity
Definition QwHelicity.h:256
Bool_t fHelicityBitPlus
Definition QwHelicity.h:240
Bool_t fHelicityBitMinus
Definition QwHelicity.h:241
Int_t fEventNumberOld
Definition QwHelicity.h:227
Int_t fHelicityActual
Definition QwHelicity.h:234
Int_t fEventNumber
Definition QwHelicity.h:227

References ClearEventData(), QwHelicity::fEventNumber, QwHelicity::fEventNumberOld, QwHelicity::fHelicityActual, QwHelicity::fHelicityBitMinus, QwHelicity::fHelicityBitPlus, QwHelicity::fPatternNumber, QwHelicity::fPatternNumberOld, QwHelicity::fPatternPhaseNumber, QwHelicity::fPatternPhaseNumberOld, QwHelicity::fWord, and QwHelicity::kUndefinedHelicity.

Referenced by ClearEventData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CollectRandBits()

Bool_t QwFakeHelicity::CollectRandBits ( )
overrideprotectedvirtual

The value of the radseed was picked up from the studies Buddhini did on the 24 bit helicity generator back in 2008.

Reimplemented from QwHelicity.

Definition at line 86 of file QwFakeHelicity.cc.

87 {
88 static Bool_t firsttimethrough = kTRUE;
89
90 Bool_t ldebug = kFALSE;
91 UInt_t ranseed = 0x2535D5&0xFFFFFF; //put a mask.
92
93 /**The value of the radseed was picked up from the studies
94 Buddhini did on the 24 bit helicity generator back in 2008.
95 */
96 // A modification to set the random seeds that are usually generated by the first 24 patterns.
97 if(! firsttimethrough){
98 return kTRUE;
99 } else{
100 firsttimethrough = kFALSE;
101 fGoodHelicity = kFALSE; //reset before prediction begins
102 iseed_Delayed = ranseed;
103 // Go 24 patterns back to get the reported helicity at this event
104 for(UInt_t i=0;i<24;i++)
107
109 for(Int_t i=0; i<8; i++)
112 }
113
114 if(ldebug) std::cout<<"QwFakeHelicity::CollectRandBits24 => Done collecting ...\n";
115 return kTRUE;
116
117}
UInt_t GetRandbit(UInt_t &ranseed) override
Int_t fDelayedPatternPolarity
Reported polarity of the current pattern.
Definition QwHelicity.h:232
Int_t fHelicityDelayed
Definition QwHelicity.h:234
UInt_t iseed_Actual
Definition QwHelicity.h:263
UInt_t iseed_Delayed
Definition QwHelicity.h:264
Bool_t fGoodHelicity
Definition QwHelicity.h:242
Int_t fActualPatternPolarity
True polarity of the current pattern.
Definition QwHelicity.h:231

References QwHelicity::fActualPatternPolarity, QwHelicity::fDelayedPatternPolarity, QwHelicity::fGoodHelicity, QwHelicity::fHelicityActual, QwHelicity::fHelicityDelayed, GetRandbit(), QwHelicity::iseed_Actual, and QwHelicity::iseed_Delayed.

+ Here is the call graph for this function:

◆ GetRandbit()

UInt_t QwFakeHelicity::GetRandbit ( UInt_t & ranseed)
overrideprotectedvirtual

Reimplemented from QwHelicity.

Definition at line 80 of file QwFakeHelicity.cc.

80 {
81 Bool_t status = false;
82 status = GetRandbit24(ranseed);
83 return status;
84 }
UInt_t GetRandbit24(UInt_t &ranseed)

References QwHelicity::GetRandbit24().

Referenced by CollectRandBits().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsGoodHelicity()

Bool_t QwFakeHelicity::IsGoodHelicity ( )
overridevirtual

Reimplemented from QwHelicity.

Definition at line 16 of file QwFakeHelicity.cc.

17{
18 fGoodHelicity = kTRUE;
19 return fGoodHelicity;
20
21}

References QwHelicity::fGoodHelicity.

◆ ProcessEvent()

void QwFakeHelicity::ProcessEvent ( )
overridevirtual

Implements VQwSubsystem.

Definition at line 23 of file QwFakeHelicity.cc.

24{
25
26 Bool_t fake_the_counters=kFALSE;
27
28 // First get the information from the Input Register. Even though there are no helicity
29 // information we can still get the MPS, Pattern SYNC and Pattern phase.
30
32 // When we don't have the pattern information in the input register, fake them.
33 if(fake_the_counters){
34 if (fEventNumber == 1){ // first pattern
37 }
38 else if (fPatternPhaseNumber == fMaxPatternPhase){ // end of a pattern
41 }
42 else {
45 }
46 }
47
48 // When we do have the pattern information in the inputregister, use thm.
49 if( !fake_the_counters ){
52 }
53
54
56 fHelicityBitPlus=kTRUE;
57 fHelicityBitMinus=kFALSE;
59
60 return;
61}
Int_t kPatternCounter
Definition QwHelicity.h:223
Int_t kMpsCounter
Definition QwHelicity.h:223
Int_t fMaxPatternPhase
Definition QwHelicity.h:269
Int_t kPatternPhase
Definition QwHelicity.h:223
void PredictHelicity()

References QwHelicity::fEventNumber, QwHelicity::fHelicityActual, QwHelicity::fHelicityBitMinus, QwHelicity::fHelicityBitPlus, QwHelicity::fMaxPatternPhase, fMinPatternPhase, QwHelicity::fPatternNumber, QwHelicity::fPatternNumberOld, QwHelicity::fPatternPhaseNumber, QwHelicity::fPatternPhaseNumberOld, QwHelicity::fWord, QwHelicity::kMpsCounter, QwHelicity::kPatternCounter, QwHelicity::kPatternPhase, and QwHelicity::PredictHelicity().

+ Here is the call graph for this function:

Field Documentation

◆ fMinPatternPhase

Int_t QwFakeHelicity::fMinPatternPhase
protected

Definition at line 44 of file QwFakeHelicity.h.

Referenced by ProcessEvent(), and QwFakeHelicity().


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