JAPAn
Just Another Parity Analyzer
|
Subsystem for helicity state management and pattern recognition. More...
#include <QwHelicity.h>
Public Member Functions | |
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) |
VQwSubsystem & | operator= (VQwSubsystem *value) override |
Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsystem *value) by VQwSubsystem::operator=(value) | |
VQwSubsystem & | operator+= (VQwSubsystem *value) override |
VQwSubsystem & | operator-= (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 Bool_t | IsGoodHelicity () |
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. | |
![]() | |
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) |
![]() | |
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 |
VQwSubsystem * | GetSibling (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_t > | GetROCIds () const |
![]() | |
void | ShareHistograms (const MQwHistograms *source) |
Share histogram pointers between objects. | |
![]() | |
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. | |
QwSubsystemArray * | GetParent () const |
Get the parent container for this child object. | |
![]() | |
~MQwCloneable () override | |
Virtual destructor. | |
VQwSubsystem * | Clone () const override |
Concrete clone method. | |
const VQwFactory< VQwSubsystem > * | Factory () const override |
Factory getter. | |
![]() | |
virtual | ~VQwCloneable () |
Virtual destructor. | |
std::string | GetClassName () const |
Get demangled name of this class. | |
Static Public Member Functions | |
static void | DefineOptions (QwOptions &options) |
Define options function. | |
![]() | |
static void | DefineOptions () |
Define options function (note: no virtual static functions in C++) | |
![]() | |
static VQwSubsystem * | Create (const std::string &name) |
Object creation. | |
static QwHelicity * | Cast (QwHelicity *type) |
Object dynamic cast. | |
Protected Types | |
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 } |
Protected Member Functions | |
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 () |
virtual UInt_t | GetRandbit (UInt_t &ranseed) |
UInt_t | GetRandbit24 (UInt_t &ranseed) |
UInt_t | GetRandbit30 (UInt_t &ranseed) |
UInt_t | GetRandomSeed (UShort_t *first24randbits) |
virtual Bool_t | CollectRandBits () |
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) |
![]() | |
MQwHistograms () | |
Default constructor. | |
MQwHistograms (const MQwHistograms &source) | |
Copy constructor. | |
virtual | ~MQwHistograms () |
Virtual destructor. | |
MQwHistograms & | operator= (const MQwHistograms &value) |
void | Fill_Pointer (TH1_ptr hist_ptr, Double_t value) |
void | AddHistogram (TH1 *h) |
Register a histogram. | |
![]() | |
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 VQwHardwareChannel * | RequestExternalPointer (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 | |
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< QwWord > | fWord |
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 |
![]() | |
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_t > | fROC_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. | |
![]() | |
std::vector< TH1_ptr > | fHistograms |
Histograms associated with this data element. | |
Static Protected Attributes | |
static const std::vector< UInt_t > | kDefaultHelicityBitPattern {0x69} |
static const Bool_t | kDEBUG =kFALSE |
static const Int_t | kUndefinedHelicity = -9999 |
Private Member Functions | |
QwHelicity () | |
Private default constructor (not implemented, will throw linker error on use) | |
UInt_t | BuildHelicityBitPattern (Int_t patternsize) |
unsigned int | parity (unsigned int v) |
Subsystem for helicity state management and pattern recognition.
Manages helicity information from the polarized electron beam, including helicity state determination, pattern recognition, delayed helicity decoding, and helicity-correlated systematic checks. Supports multiple helicity encoding modes and provides helicity information to other subsystems.
Definition at line 52 of file QwHelicity.h.
|
protected |
Enumerator | |
---|---|
kHelUserbitMode | |
kHelInputRegisterMode | |
kHelLocalyMadeUp | |
kHelInputMollerMode |
Definition at line 184 of file QwHelicity.h.
|
protected |
Enumerator | |
---|---|
kHelSaveMPS | |
kHelSavePattern | |
kHelNoSave |
Definition at line 180 of file QwHelicity.h.
|
protected |
Enumerator | |
---|---|
kDefaultInputReg_HelPlus | |
kDefaultInputReg_HelMinus | |
kDefaultInputReg_PatternSync | |
kDefaultInputReg_FakeMPS |
Definition at line 190 of file QwHelicity.h.
|
private |
Private default constructor (not implemented, will throw linker error on use)
References QwHelicity().
Referenced by AccumulateRunningSum(), CheckPatternNum(), Compare(), MergeCounters(), operator=(), QwFakeHelicity::QwFakeHelicity(), QwHelicity(), and QwHelicity().
QwHelicity::QwHelicity | ( | const TString & | name | ) |
Constructor with name.
Definition at line 47 of file QwHelicity.cc.
References ClearErrorCounters(), fActualPatternPolarity, fDelayedPatternPolarity, fEventNumber, fEventNumberFirst, fEventNumberOld, fGoodHelicity, fGoodPattern, fHelicityActual, fHelicityBitMinus, fHelicityBitPattern, fHelicityBitPlus, fHelicityDecodingMode, fHelicityDelay, fHelicityDelayed, fHelicityReported, fIgnoreHelicity, fInputReg_FakeMPS, fInputReg_HelMinus, fInputReg_HelPlus, fInputReg_PairSync, fInputReg_PatternSync, fMinPatternPhase, fPatternNumber, fPatternNumberFirst, fPatternNumberOld, fPatternPhaseNumber, fPatternPhaseNumberOld, fSuppressMPSErrorMsgs, fUsePredictor, kDefaultHelicityBitPattern, kDefaultInputReg_FakeMPS, kDefaultInputReg_HelMinus, kDefaultInputReg_HelPlus, kDefaultInputReg_PatternSync, kEventTypeHelMinus, kEventTypeHelPlus, kMpsCounter, kPatternCounter, kPatternPhase, kUndefinedHelicity, kUserbit, n_ranbits, VQwSubsystem::VQwSubsystem(), and VQwSubsystemParity::VQwSubsystemParity().
QwHelicity::QwHelicity | ( | const QwHelicity & | source | ) |
Copy constructor.
Definition at line 92 of file QwHelicity.cc.
References ClearErrorCounters(), fActualPatternPolarity, fDelayedPatternPolarity, fEventNumber, fEventNumberFirst, fEventNumberOld, fEventType, fGoodHelicity, fGoodPattern, fHelicityActual, fHelicityBitMinus, fHelicityBitPattern, fHelicityBitPlus, fHelicityDecodingMode, fHelicityDelay, fHelicityDelayed, fHelicityInfoOK, fHelicityReported, fIgnoreHelicity, fInputReg_FakeMPS, fInputReg_HelMinus, fInputReg_HelPlus, fInputReg_PairSync, fInputReg_PatternSync, fMaxPatternPhase, fMinPatternPhase, fNumHelicityErrors, fNumMissedEventBlocks, fNumMissedGates, fNumMultSyncErrors, fPatternNumber, fPatternNumberFirst, fPatternNumberOld, fPatternPhaseNumber, fPatternPhaseNumberOld, fPatternPhaseOffset, fRandBits, fSuppressMPSErrorMsgs, fUsePredictor, fWord, VQwSubsystem::GetName(), iseed_Actual, iseed_Delayed, kEventTypeHelMinus, kEventTypeHelPlus, kMpsCounter, kPatternCounter, kPatternPhase, kUndefinedHelicity, kUserbit, n_ranbits, QwHelicity(), VQwSubsystem::VQwSubsystem(), and VQwSubsystemParity::VQwSubsystemParity().
|
inlineoverride |
|
overridevirtual |
Update the running sums for devices.
Implements VQwSubsystemParity.
Definition at line 2242 of file QwHelicity.cc.
References Compare(), fNumHelicityErrors, fNumMissedEventBlocks, fNumMissedGates, fNumMultSyncErrors, fPatternNumber, MergeCounters(), QwHelicity(), and VQwSubsystem::VQwSubsystem().
|
overridevirtual |
Apply the single event cuts.
Implements VQwSubsystemParity.
Definition at line 425 of file QwHelicity.cc.
|
private |
Definition at line 2271 of file QwHelicity.cc.
References QwLog::endl(), fHelicityBitPattern, kDefaultHelicityBitPattern, QwError, and QwMessage.
Referenced by ProcessOptions().
|
inlineoverridevirtual |
Calculate the average for all good events.
Implements VQwSubsystemParity.
Definition at line 141 of file QwHelicity.h.
|
inlineoverridevirtual |
Report the number of events failed due to HW and event cut failures.
Implements VQwSubsystemParity.
Definition at line 78 of file QwHelicity.h.
References VQwSubsystem::VQwSubsystem().
|
inlineprotected |
Definition at line 175 of file QwHelicity.h.
Referenced by ProcessEventInputRegisterMode().
|
protected |
Definition at line 2198 of file QwHelicity.cc.
References Compare(), QwLog::endl(), fActualPatternPolarity, fErrorFlag, fPatternNumber, kErrorFlag_Helicity, kEventCutMode3, kGlobalCut, QwDebug, QwHelicity(), and VQwSubsystem::VQwSubsystem().
Referenced by operator+=(), and Ratio().
|
inlineprotected |
Definition at line 303 of file QwHelicity.h.
References fNumHelicityErrors, fNumMissedEventBlocks, fNumMissedGates, and fNumMultSyncErrors.
Referenced by QwHelicity(), and QwHelicity().
|
overridevirtual |
Reset data by setting the old event number, pattern number and pattern phase to the values of the previous event.
Clear out helicity variables
Set the new event number and pattern number to -1. If we are not reading these correctly from the data stream, -1 will allow us to identify that.
Implements VQwSubsystem.
Definition at line 374 of file QwHelicity.cc.
References ClearEventData(), fEventNumber, fEventNumberFirst, fEventNumberOld, fHelicityActual, fHelicityBitMinus, fHelicityBitPlus, fHelicityDelayed, fHelicityReported, fPatternNumber, fPatternNumberFirst, fPatternNumberOld, fPatternPhaseNumber, fPatternPhaseNumberOld, fWord, kUndefinedHelicity, and VQwSubsystem::SetDataLoaded().
Referenced by ClearEventData().
|
protectedvirtual |
Reimplemented in QwFakeHelicity.
Definition at line 1874 of file QwHelicity.cc.
References CollectRandBits24(), CollectRandBits30(), and fRandBits.
Referenced by PredictHelicity().
|
protected |
Definition at line 1888 of file QwHelicity.cc.
References QwLog::endl(), fActualPatternPolarity, fDelayedPatternPolarity, fEventNumber, fGoodHelicity, fHelicityActual, fHelicityDelay, fHelicityDelayed, fHelicityReported, fMinPatternPhase, fPatternNumber, fPatternPhaseNumber, fPreviousPatternPolarity, GetRandbit(), GetRandomSeed(), IsContinuous(), iseed_Actual, iseed_Delayed, n_ranbits, QwDebug, QwError, QwMessage, and ResetPredictor().
Referenced by CollectRandBits().
|
protected |
Starting to collect 30 bits/helicity state to get the random seed for the 30 bit helicity predictor. These bits (1/0) are the reported helicity states of the first event of each new pattern or the so called pattern polarity.
If we have finished collecting the bits then ignore the rest of this function and return true. No need to recollect!
If we are still collecting the bits, make sure we collect them from only the events with the minimum pattern phase.
If the events are continuous, start to make the ranseed for the helicity pattern we are getting which is the delayed helicity.
Make sure we are at the beginning of a valid pattern.
If we got the 30th bit,
set the polarity of the current pattern to be equal to the reported helicity,
then use it as the delayed helicity,
if the helicity is delayed by a positive number of patterns then loop the delayed ranseed backward to get the ranseed for the actual helicity
, get the pattern polarity for the actual pattern using that actual ranseed.
If we have a negative delay. Reset the predictor.
If all is well so far, set the actual pattern polarity as the actual helicity.
while collecting the seed, we encounter non continuous events.Discard bit. Reset the predition
Definition at line 1977 of file QwHelicity.cc.
References QwLog::endl(), fActualPatternPolarity, fDelayedPatternPolarity, fEventNumber, fGoodHelicity, fHelicityActual, fHelicityDelay, fHelicityDelayed, fHelicityReported, fMinPatternPhase, fPatternNumber, fPatternPhaseNumber, fPreviousPatternPolarity, GetRandbit(), IsContinuous(), iseed_Actual, iseed_Delayed, n_ranbits, QwDebug, QwError, QwMessage, QwWarning, and ResetPredictor().
Referenced by CollectRandBits().
|
protected |
Definition at line 2257 of file QwHelicity.cc.
References fWord, QwHelicity(), and VQwSubsystem::VQwSubsystem().
Referenced by AccumulateRunningSum(), CheckPatternNum(), MergeCounters(), and operator=().
|
overridevirtual |
Construct the branch and tree vector.
Construct the branches for this subsystem.
tree | Output ROOT tree. |
prefix | Name prefix for all branch names. |
Implements VQwSubsystem.
Definition at line 1382 of file QwHelicity.cc.
References fActualPatternPolarity, fDelayedPatternPolarity, fEventNumber, fHelicityActual, fHelicityDelayed, fHelicityReported, fHistoType, fPatternNumber, fPatternPhaseNumber, fPatternSeed, fPreviousPatternPolarity, fWord, kHelNoSave, kHelSaveMPS, kHelSavePattern, and SetHistoTreeSave().
|
overridevirtual |
Construct the branch and tree vector based on the trim file.
Construct the branches for this subsystem using a trim file.
tree | Output ROOT tree. |
prefix | Name prefix for all branch names. |
trim_file | Trim file describing which branches to construct. |
Implements VQwSubsystem.
Definition at line 1444 of file QwHelicity.cc.
References fActualPatternPolarity, fDelayedPatternPolarity, fEventNumber, fHelicityActual, fHelicityDelayed, fHelicityReported, fHistoType, fPatternNumber, fPatternPhaseNumber, fPatternSeed, fPreviousPatternPolarity, fWord, kHelNoSave, kHelSaveMPS, kHelSavePattern, and SetHistoTreeSave().
|
inlinevirtual |
Construct the branch and tree vector.
Reimplemented from VQwSubsystem.
Definition at line 303 of file VQwSubsystem.h.
|
overridevirtual |
Construct the branch and tree vector.
Construct the branch and fill the provided values vector.
tree | Output ROOT tree to which branches are added. |
prefix | Name prefix for all branch names. |
values | Vector that will be filled by FillTreeVector. |
Implements VQwSubsystem.
Definition at line 1297 of file QwHelicity.cc.
References QwRootTreeBranchVector::back(), fHistoType, fTreeArrayIndex, fWord, kHelNoSave, kHelSaveMPS, kHelSavePattern, QwRootTreeBranchVector::push_back(), SetHistoTreeSave(), and QwRootTreeBranchVector::size().
|
inlinevirtual |
Construct the histograms for this subsystem.
Reimplemented from VQwSubsystem.
Definition at line 270 of file VQwSubsystem.h.
|
inlinevirtual |
Construct the histograms for this subsystem in a folder.
Reimplemented from VQwSubsystem.
Definition at line 275 of file VQwSubsystem.h.
|
overridevirtual |
Construct the histograms for this subsystem in a folder with a prefix.
Implements VQwSubsystem.
Definition at line 1195 of file QwHelicity.cc.
References QwLog::endl(), MQwHistograms::fHistograms, fHistoType, fWord, gQwHists, kHelNoSave, kHelSaveMPS, kHelSavePattern, QwError, and SetHistoTreeSave().
|
inlinevirtual |
Construct the histograms for this subsystem with a prefix.
Reimplemented from VQwSubsystem.
Definition at line 280 of file VQwSubsystem.h.
|
inlineoverridevirtual |
remove one entry from the running sums for devices
Implements VQwSubsystemParity.
Definition at line 139 of file QwHelicity.h.
References VQwSubsystem::VQwSubsystem().
|
static |
Define options function.
Definition at line 171 of file QwHelicity.cc.
References QwOptions::AddOptions().
|
overridevirtual |
Reimplemented from VQwSubsystem.
Definition at line 794 of file QwHelicity.cc.
References QwLog::endl(), VQwSubsystem::fCurrentBank_ID, VQwSubsystem::fCurrentROC_ID, fEventNumber, fHelicityDecodingMode, fHelicityDelayed, fInputReg_HelMinus, fInputReg_HelPlus, fInputReg_PatternSync, fMinPatternPhase, fPatternNumber, fPatternPhaseNumber, fPatternPhaseOffset, kHelInputRegisterMode, kHelUserbitMode, and QwWarning.
|
overridevirtual |
Fill the histograms for this subsystem.
Implements VQwSubsystem.
Definition at line 1246 of file QwHelicity.cc.
References QwLog::endl(), fActualPatternPolarity, fEventNumber, fEventNumberOld, fHelicityActual, MQwHistograms::fHistograms, fHistoType, fPatternNumber, fPatternNumberOld, fPatternPhaseNumber, fWord, kHelNoSave, kHelSaveMPS, kHelSavePattern, and QwDebug.
|
overridevirtual |
Fill the tree vector.
Fill the tree export vector with the current event values.
values | Output vector to be filled. |
Implements VQwSubsystem.
Definition at line 1508 of file QwHelicity.cc.
References fActualPatternPolarity, fDelayedPatternPolarity, fEventNumber, fHelicityActual, fHelicityDelayed, fHelicityReported, fHistoType, fPatternNumber, fPatternPhaseNumber, fPatternSeed, fPreviousPatternPolarity, fTreeArrayIndex, fWord, kHelSaveMPS, kHelSavePattern, and QwRootTreeBranchVector::SetValue().
|
overridevirtual |
Return the error flag to the top level routines related to stability checks and ErrorFlag updates.
Implements VQwSubsystemParity.
Definition at line 463 of file QwHelicity.cc.
References fErrorFlag.
Long_t QwHelicity::GetEventNumber | ( | ) |
Definition at line 1150 of file QwHelicity.cc.
References fEventNumber.
Referenced by QwHelicityPattern::LoadEventData().
Int_t QwHelicity::GetHelicityActual | ( | ) |
Definition at line 1135 of file QwHelicity.cc.
References fHelicityActual.
Referenced by QwHelicityPattern::LoadEventData(), and main().
Int_t QwHelicity::GetHelicityDelayed | ( | ) |
Definition at line 1140 of file QwHelicity.cc.
References fHelicityDelayed.
Referenced by main().
Int_t QwHelicity::GetHelicityReported | ( | ) |
Definition at line 1130 of file QwHelicity.cc.
References fHelicityReported.
|
inline |
Definition at line 119 of file QwHelicity.h.
References fMaxPatternPhase.
|
inline |
Definition at line 122 of file QwHelicity.h.
References fMinPatternPhase.
Referenced by QwHelicityPattern::LoadEventData().
Long_t QwHelicity::GetPatternNumber | ( | ) |
Definition at line 1145 of file QwHelicity.cc.
References fPatternNumber.
Referenced by QwHelicityPattern::LoadEventData().
Int_t QwHelicity::GetPhaseNumber | ( | ) |
Definition at line 1155 of file QwHelicity.cc.
References fPatternPhaseNumber.
Referenced by QwHelicityPattern::LoadEventData().
|
protectedvirtual |
Reimplemented in QwFakeHelicity.
Definition at line 1672 of file QwHelicity.cc.
References fRandBits, GetRandbit24(), and GetRandbit30().
Referenced by CollectRandBits24(), CollectRandBits30(), RunPredictor(), and SetFirstBits().
|
protected |
This is a 24 bit random bit generator according to the "new" algorithm described in "G0 Helicity Digital Controls" by E. Stangland, R. Flood, H. Dong.
The helicity board uses a maximum-length linear feedback shift registers for the generation of a pseudo-random sequence of bits. The length of the register (24 bits or 30 bits) defines the length before a sequence is repeated: 2^n - 1.
For a mathematical introduction to the generation of pseudo-random numbers with maximum-length linear feedback shift registers (LFSR), see the following web references: http://en.wikipedia.org/wiki/Linear_feedback_shift_register http://www.newwaveinstruments.com/resources/articles/m_sequence_linear_feedback_shift_register_lfsr.htm
In particular, the used solutions are to place XNOR taps at the bits 24 stages, 4 taps: (47 sets) [24, 23, 21, 20] 30 stages, 4 taps: (104 sets) [30, 29, 28, 7]
The 24 stage solution we use has been mirrored by transforming [m, A, B, C] into [m, m-C, m-B, m-A]. This goes through the sequence in the opposite direction.
Definition at line 1683 of file QwHelicity.cc.
References QwLog::endl(), and QwError.
Referenced by QwFakeHelicity::GetRandbit(), and GetRandbit().
|
protected |
Definition at line 1740 of file QwHelicity.cc.
References QwLog::endl(), and QwError.
Referenced by GetRandbit().
|
protected |
This the random seed generator used in G0 (L.Jianglai) Here we get the 24 random bits and derive the random seed from that. random seed : b24 b23 b22.....b2 b1 first 24 random bit from this seed: h1 h2 h3 ....h23 h24 we have, b23 = h1, b22 = h2,... b5 = h20, h21^b24 = b4 , h3^b24^b23 = b3 ,h23^b23^b22 = b2, h24^b22^b24 = b1. Thus by using h1,...h24, we can derive the b24,..b1 of the randseed.
assign the values in the h array and into the sead
Definition at line 1761 of file QwHelicity.cc.
References QwLog::endl(), and QwDebug.
Referenced by CollectRandBits24(), and SetFirstBits().
|
inline |
Definition at line 105 of file QwHelicity.h.
References iseed_Actual.
Referenced by main().
|
inline |
Definition at line 106 of file QwHelicity.h.
References iseed_Delayed.
Referenced by main().
|
overridevirtual |
Increment the error counters.
TODO: Implement QwHelicity::IncrementErrorCounters()
Implements VQwSubsystemParity.
Definition at line 431 of file QwHelicity.cc.
|
protected |
Definition at line 261 of file QwHelicity.cc.
References fErrorFlag, IsGoodEventNumber(), IsGoodPatternNumber(), IsGoodPhaseNumber(), kErrorFlag_Helicity, kEventCutMode3, and kGlobalCut.
Referenced by CollectRandBits24(), and CollectRandBits30().
|
protected |
Definition at line 293 of file QwHelicity.cc.
References QwLog::endl(), fEventNumber, fEventNumberOld, Print(), and QwWarning.
Referenced by IsContinuous().
|
virtual |
We are not ignoring the helicity, and the helicities do not match. Check phase number to see if its a new pattern.
Reimplemented in QwFakeHelicity.
Definition at line 340 of file QwHelicity.cc.
References QwLog::endl(), fErrorFlag, fEventNumber, fGoodHelicity, fHelicityActual, fHelicityDelayed, fHelicityReported, fIgnoreHelicity, fMinPatternPhase, fNumHelicityErrors, fPatternPhaseNumber, kErrorFlag_Helicity, kEventCutMode3, kGlobalCut, kUndefinedHelicity, QwError, and ResetPredictor().
Referenced by PredictHelicity().
|
protected |
Definition at line 274 of file QwHelicity.cc.
References QwLog::endl(), fMinPatternPhase, fPatternNumber, fPatternNumberOld, fPatternPhaseNumber, fPatternPhaseNumberOld, and QwWarning.
Referenced by IsContinuous().
|
protected |
Definition at line 309 of file QwHelicity.cc.
References QwLog::endl(), fMaxPatternPhase, fMinPatternPhase, fPatternNumber, fPatternNumberOld, fPatternPhaseNumber, fPatternPhaseNumberOld, Print(), and QwWarning.
Referenced by IsContinuous().
|
inline |
Definition at line 166 of file QwHelicity.h.
References fIgnoreHelicity.
Referenced by QwHelicityPattern::LoadEventData().
|
overridevirtual |
Mandatory map file definition.
Implements VQwSubsystem.
Definition at line 884 of file QwHelicity.cc.
References QwParameterFile::Close(), QwParameterFile::EnableGreediness(), QwLog::endl(), VQwSubsystem::fCurrentBank_ID, VQwSubsystem::fCurrentROC_ID, VQwSubsystem::fDetectorMaps, fHelicityBitPattern, fHelicityDecodingMode, fInputReg_FakeMPS, fInputReg_HelMinus, fInputReg_HelPlus, fInputReg_PairSync, fInputReg_PatternSync, fMaxPatternPhase, QwWord::fModuleType, fPatternPhaseOffset, fRandBits, QwWord::fSubbankIndex, fWord, QwWord::fWordInSubbank, QwWord::fWordName, fWordsPerSubbank, QwWord::fWordType, QwParameterFile::GetParamFileNameContents(), VQwSubsystem::GetSubbankIndex(), QwParameterFile::GetTypedNextToken(), kEventTypeHelMinus, kEventTypeHelPlus, kHelInputMollerMode, kHelInputRegisterMode, kHelLocalyMadeUp, kHelUserbitMode, kInputRegister, kMpsCounter, kPatternCounter, kPatternPhase, kScalerCounter, kUserbit, QwParameterFile::LineIsEmpty(), QwParameterFile::PopValue(), QwDebug, QwError, QwMessage, QwWarning, QwParameterFile::ReadNextLine(), VQwSubsystem::RegisterRocBankMarker(), QwParameterFile::SetCommentChars(), SetHelicityBitPattern(), SetHelicityDelay(), and QwParameterFile::TrimWhitespace().
|
overridevirtual |
Optional event cut file.
Reimplemented from VQwSubsystem.
Definition at line 1086 of file QwHelicity.cc.
|
overridevirtual |
Mandatory parameter file definition.
Implements VQwSubsystem.
Definition at line 419 of file QwHelicity.cc.
|
protected |
|
protected |
Definition at line 2219 of file QwHelicity.cc.
References Compare(), fEventNumber, fWord, QwHelicity(), and VQwSubsystem::VQwSubsystem().
Referenced by AccumulateRunningSum(), operator+=(), and Ratio().
|
overridevirtual |
Implements VQwSubsystemParity.
Definition at line 2184 of file QwHelicity.cc.
References CheckPatternNum(), QwLog::endl(), VQwSubsystem::GetName(), MergeCounters(), QwDebug, and VQwSubsystem::VQwSubsystem().
|
inlineoverridevirtual |
Implements VQwSubsystemParity.
Definition at line 132 of file QwHelicity.h.
References VQwSubsystem::VQwSubsystem().
|
overridevirtual |
Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsystem *value) by VQwSubsystem::operator=(value)
Implements VQwSubsystemParity.
Definition at line 2138 of file QwHelicity.cc.
References Compare(), fActualPatternPolarity, fDelayedPatternPolarity, fErrorFlag, fEventNumber, fEventNumberFirst, fGoodHelicity, fGoodPattern, fHelicityActual, fHelicityBitMinus, fHelicityBitPlus, fHelicityDelayed, fHelicityReported, fIgnoreHelicity, fNumHelicityErrors, fNumMissedEventBlocks, fNumMissedGates, fNumMultSyncErrors, fPatternNumber, fPatternNumberFirst, fPatternPhaseNumber, fPatternSeed, fPreviousPatternPolarity, fWord, VQwSubsystem::operator=(), QwHelicity(), and VQwSubsystem::VQwSubsystem().
|
inlineprivate |
Definition at line 326 of file QwHelicity.h.
void QwHelicity::PredictHelicity | ( | ) |
Routine to predict the true helicity from the delayed helicity. Helicities are usually delayed by 8 events or 2 quartets. This delay can now be set as a cmd line option.
After accumulating 24/30 helicity bits, iseed is up-to-date. If nothing goes wrong, n-ranbits will stay as 24/30 Reset it to zero if something goes wrong.
If not good helicity, start over again by resetting the predictor.
Definition at line 2053 of file QwHelicity.cc.
References CollectRandBits(), IsGoodHelicity(), n_ranbits, ResetPredictor(), and RunPredictor().
Referenced by QwFakeHelicity::ProcessEvent(), and ProcessEvent().
void QwHelicity::Print | ( | ) | const |
Definition at line 862 of file QwHelicity.cc.
References QwLog::endl(), fEventNumber, fEventNumberOld, fHelicityActual, fHelicityDelayed, fHelicityReported, fMaxPatternPhase, fPatternNumber, fPatternNumberOld, fPatternPhaseNumber, fPatternPhaseNumberOld, and QwOut.
Referenced by IsGoodEventNumber(), IsGoodPhaseNumber(), and ProcessEventUserbitMode().
|
overridevirtual |
Implements VQwSubsystemParity.
Definition at line 436 of file QwHelicity.cc.
References QwLog::endl(), fEventNumber, fEventNumberFirst, fNumHelicityErrors, fNumMissedEventBlocks, fNumMissedGates, fNumMultSyncErrors, fPatternNumber, fPatternNumberFirst, and QwMessage.
|
overridevirtual |
Implements VQwSubsystem.
Definition at line 412 of file QwHelicity.cc.
|
inlineoverridevirtual |
TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware version.
Implements VQwSubsystem.
Definition at line 91 of file QwHelicity.h.
References ProcessEvBuffer().
Referenced by ProcessEvBuffer().
|
overridevirtual |
Reimplemented from VQwSubsystem.
Definition at line 1090 of file QwHelicity.cc.
References QwLog::endl(), fEventType, fWord, fWordsPerSubbank, VQwSubsystem::GetEventTypeMask(), VQwSubsystem::GetSubbankIndex(), QwDebug, QwWarning, and VQwSubsystem::SetDataLoaded().
|
overridevirtual |
Implements VQwSubsystem.
Definition at line 736 of file QwHelicity.cc.
References QwLog::endl(), fActualPatternPolarity, fDelayedPatternPolarity, fErrorFlag, fEventNumber, fHelicityActual, fHelicityBitMinus, fHelicityBitPlus, fHelicityDecodingMode, fHelicityDelayed, fHelicityReported, fIgnoreHelicity, fMaxPatternPhase, fMinPatternPhase, fPatternNumber, fPatternPhaseNumber, fPreviousPatternPolarity, fUsePredictor, VQwSubsystem::HasDataLoaded(), kHelInputMollerMode, kHelInputRegisterMode, kHelUserbitMode, PredictHelicity(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), ProcessEventUserbitMode(), and QwError.
void QwHelicity::ProcessEventInputMollerMode | ( | ) |
Definition at line 691 of file QwHelicity.cc.
References QwLog::endl(), fEventNumber, fEventNumberOld, fEventType, fHelicityBitMinus, fHelicityBitPlus, fHelicityReported, fMinPatternPhase, fNumMissedEventBlocks, fNumMissedGates, fPatternNumber, fPatternNumberOld, fPatternPhaseNumber, fPatternPhaseNumberOld, fWord, kEventTypeHelMinus, kEventTypeHelPlus, kMpsCounter, kPatternCounter, and QwError.
Referenced by ProcessEvent().
void QwHelicity::ProcessEventInputRegisterMode | ( | ) |
If we get junk for the mps and pattern information from the run we can enable fake counters for mps, pattern number and pattern phase to get the job done.
In the Input Register Mode, the event number is obtained straight from the wordkMPSCounter.
Extract the reported helicity from the input register for each event.
Definition at line 583 of file QwHelicity.cc.
References CheckIORegisterMask(), QwLog::endl(), fErrorFlag, fEventNumber, fEventNumberOld, fHelicityBitMinus, fHelicityBitPlus, fHelicityReported, fIgnoreHelicity, fInputReg_FakeMPS, fInputReg_HelMinus, fInputReg_HelPlus, fInputReg_PatternSync, fMinPatternPhase, fNumMissedEventBlocks, fNumMissedGates, fNumMultSyncErrors, fPatternNumber, fPatternNumberOld, fPatternPhaseNumber, fPatternPhaseNumberOld, fPatternPhaseOffset, fSuppressMPSErrorMsgs, fWord, kErrorFlag_Helicity, kEventCutMode3, kGlobalCut, kInputRegister, kMpsCounter, kPatternCounter, kPatternPhase, kUndefinedHelicity, and QwError.
Referenced by ProcessEvent().
void QwHelicity::ProcessEventUserbitMode | ( | ) |
Process helicity information from userbit configuration data.
This is a complex function (~80 lines) that extracts helicity information from userbit data for injector tests and special configurations. It handles:
Userbit Decoding:
Event Counting Logic:
Helicity State Management:
Error Recovery:
Pattern Synchronization:
In this version of the code, the helicity is extracted for a userbit configuration. This is not what we plan to have for Qweak but it was done for injector tests and so is useful to have as another option to get helicity information.
Definition at line 506 of file QwHelicity.cc.
References QwLog::endl(), fEventNumber, fEventNumberOld, fHelicityBitMinus, fHelicityBitPlus, fHelicityReported, fMaxPatternPhase, fMinPatternPhase, fPatternNumber, fPatternNumberOld, fPatternPhaseNumber, fPatternPhaseNumberOld, fWord, kScalerCounter, kUserbit, Print(), QwError, and ResetPredictor().
Referenced by ProcessEvent().
|
overridevirtual |
Process the command line options.
Reimplemented from VQwSubsystem.
Definition at line 195 of file QwHelicity.cc.
References BuildHelicityBitPattern(), QwLog::endl(), fHelicityBitPattern, fHelicityDelay, fMaxPatternPhase, fPatternPhaseOffset, fRandBits, fSuppressMPSErrorMsgs, fUsePredictor, QwOptions::GetValue(), QwOptions::HasValue(), kDefaultHelicityBitPattern, QwError, QwMessage, SetHelicityBitPattern(), and SetHelicityDelay().
|
overridevirtual |
Implements VQwSubsystemParity.
Definition at line 2234 of file QwHelicity.cc.
References CheckPatternNum(), MergeCounters(), and VQwSubsystem::VQwSubsystem().
|
protected |
Start a new helicity prediction sequence.
Definition at line 2125 of file QwHelicity.cc.
References QwLog::endl(), fGoodHelicity, fGoodPattern, n_ranbits, and QwWarning.
Referenced by CollectRandBits24(), CollectRandBits30(), IsGoodHelicity(), PredictHelicity(), ProcessEventUserbitMode(), and RunPredictor().
void QwHelicity::RunPredictor | ( | ) |
Update the random seed if the new event is from a different pattern. Check the difference between old pattern number and the new one and to see how many patterns we have missed or skipped. Then loop back to get the correct pattern polarities.
Predict the helicity according to pattern Defined patterns: Pair: +- or -+ Quartet: +–+ or -++- Octet: +–+-++- or -++-+–+ Symmetric octet: +-+–+-+ or -+-++-+- Octo-quad: +–++–++–++–+-++–++–++–++-
Definition at line 1807 of file QwHelicity.cc.
References QwLog::endl(), fActualPatternPolarity, fDelayedPatternPolarity, fEventNumber, fHelicityActual, fHelicityBitPattern, fHelicityDelayed, fHelicityReported, fMaxPatternPhase, fMinPatternPhase, fPatternNumber, fPatternNumberOld, fPatternPhaseNumber, fPreviousPatternPolarity, GetRandbit(), iseed_Actual, iseed_Delayed, QwDebug, QwError, and ResetPredictor().
Referenced by main(), and PredictHelicity().
|
inlineoverridevirtual |
void QwHelicity::SetEventPatternPhase | ( | Int_t | event, |
Int_t | pattern, | ||
Int_t | phase ) |
Definition at line 1160 of file QwHelicity.cc.
References fEventNumber, fPatternNumber, and fPatternPhaseNumber.
Referenced by main().
void QwHelicity::SetFirstBits | ( | UInt_t | nbits, |
UInt_t | firstbits ) |
Definition at line 1167 of file QwHelicity.cc.
References fHelicityDelay, GetRandbit(), GetRandomSeed(), iseed_Actual, and iseed_Delayed.
Referenced by main().
void QwHelicity::SetHelicityBitPattern | ( | TString | hex | ) |
Definition at line 2108 of file QwHelicity.cc.
References QwLog::endl(), fHelicityBitPattern, kDefaultHelicityBitPattern, and QwMessage.
Referenced by LoadChannelMap(), and ProcessOptions().
void QwHelicity::SetHelicityDelay | ( | Int_t | delay | ) |
Sets the number of bits the helicity reported gets delayed with. We predict helicity only if there is a non-zero pattern delay given.
Definition at line 2085 of file QwHelicity.cc.
References QwLog::endl(), fHelicityDelay, fUsePredictor, QwError, and QwWarning.
Referenced by LoadChannelMap(), and ProcessOptions().
|
protected |
Definition at line 1183 of file QwHelicity.cc.
References fHistoType, kHelNoSave, kHelSaveMPS, and kHelSavePattern.
Referenced by ConstructBranch(), ConstructBranch(), ConstructBranchAndVector(), and ConstructHistograms().
|
inlineoverridevirtual |
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
Implements VQwSubsystemParity.
Definition at line 86 of file QwHelicity.h.
References VQwSubsystem::VQwSubsystem().
|
protected |
True polarity of the current pattern.
Definition at line 231 of file QwHelicity.h.
Referenced by CheckPatternNum(), QwFakeHelicity::CollectRandBits(), CollectRandBits24(), CollectRandBits30(), ConstructBranch(), ConstructBranch(), FillHistograms(), FillTreeVector(), operator=(), ProcessEvent(), QwHelicity(), QwHelicity(), and RunPredictor().
|
protected |
Reported polarity of the current pattern.
Definition at line 232 of file QwHelicity.h.
Referenced by QwFakeHelicity::CollectRandBits(), CollectRandBits24(), CollectRandBits30(), ConstructBranch(), ConstructBranch(), FillTreeVector(), operator=(), ProcessEvent(), QwHelicity(), QwHelicity(), and RunPredictor().
|
protected |
Definition at line 316 of file QwHelicity.h.
Referenced by CheckPatternNum(), GetEventcutErrorFlag(), IsContinuous(), IsGoodHelicity(), operator=(), ProcessEvent(), and ProcessEventInputRegisterMode().
|
protected |
Definition at line 227 of file QwHelicity.h.
Referenced by QwFakeHelicity::ClearEventData(), ClearEventData(), CollectRandBits24(), CollectRandBits30(), ConstructBranch(), ConstructBranch(), EncodeEventData(), FillHistograms(), FillTreeVector(), GetEventNumber(), IsGoodEventNumber(), IsGoodHelicity(), MergeCounters(), operator=(), Print(), PrintErrorCounters(), QwFakeHelicity::ProcessEvent(), ProcessEvent(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), ProcessEventUserbitMode(), QwHelicity(), QwHelicity(), RunPredictor(), and SetEventPatternPhase().
|
protected |
Definition at line 300 of file QwHelicity.h.
Referenced by ClearEventData(), operator=(), PrintErrorCounters(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 227 of file QwHelicity.h.
Referenced by QwFakeHelicity::ClearEventData(), ClearEventData(), FillHistograms(), IsGoodEventNumber(), Print(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), ProcessEventUserbitMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 297 of file QwHelicity.h.
Referenced by ProcessEvBuffer(), ProcessEventInputMollerMode(), and QwHelicity().
|
protected |
Definition at line 242 of file QwHelicity.h.
Referenced by QwFakeHelicity::CollectRandBits(), CollectRandBits24(), CollectRandBits30(), QwFakeHelicity::IsGoodHelicity(), IsGoodHelicity(), operator=(), QwHelicity(), QwHelicity(), and ResetPredictor().
|
protected |
Definition at line 243 of file QwHelicity.h.
Referenced by operator=(), QwHelicity(), QwHelicity(), and ResetPredictor().
|
protected |
Definition at line 234 of file QwHelicity.h.
Referenced by QwFakeHelicity::ClearEventData(), ClearEventData(), QwFakeHelicity::CollectRandBits(), CollectRandBits24(), CollectRandBits30(), ConstructBranch(), ConstructBranch(), FillHistograms(), FillTreeVector(), GetHelicityActual(), IsGoodHelicity(), operator=(), Print(), QwFakeHelicity::ProcessEvent(), ProcessEvent(), QwHelicity(), QwHelicity(), and RunPredictor().
|
protected |
Definition at line 241 of file QwHelicity.h.
Referenced by QwFakeHelicity::ClearEventData(), ClearEventData(), operator=(), QwFakeHelicity::ProcessEvent(), ProcessEvent(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), ProcessEventUserbitMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 203 of file QwHelicity.h.
Referenced by BuildHelicityBitPattern(), LoadChannelMap(), ProcessOptions(), QwHelicity(), QwHelicity(), RunPredictor(), and SetHelicityBitPattern().
|
protected |
Definition at line 240 of file QwHelicity.h.
Referenced by QwFakeHelicity::ClearEventData(), ClearEventData(), operator=(), QwFakeHelicity::ProcessEvent(), ProcessEvent(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), ProcessEventUserbitMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 208 of file QwHelicity.h.
Referenced by EncodeEventData(), LoadChannelMap(), ProcessEvent(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 266 of file QwHelicity.h.
Referenced by CollectRandBits24(), CollectRandBits30(), ProcessOptions(), QwHelicity(), QwHelicity(), SetFirstBits(), and SetHelicityDelay().
|
protected |
Definition at line 234 of file QwHelicity.h.
Referenced by ClearEventData(), QwFakeHelicity::CollectRandBits(), CollectRandBits24(), CollectRandBits30(), ConstructBranch(), ConstructBranch(), EncodeEventData(), FillTreeVector(), GetHelicityDelayed(), IsGoodHelicity(), operator=(), Print(), ProcessEvent(), QwHelicity(), QwHelicity(), and RunPredictor().
|
protected |
Definition at line 292 of file QwHelicity.h.
Referenced by QwHelicity().
|
protected |
Definition at line 234 of file QwHelicity.h.
Referenced by ClearEventData(), CollectRandBits24(), CollectRandBits30(), ConstructBranch(), ConstructBranch(), FillTreeVector(), GetHelicityReported(), IsGoodHelicity(), operator=(), Print(), ProcessEvent(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), ProcessEventUserbitMode(), QwHelicity(), QwHelicity(), and RunPredictor().
|
protected |
Definition at line 245 of file QwHelicity.h.
Referenced by ConstructBranch(), ConstructBranch(), ConstructBranchAndVector(), ConstructHistograms(), FillHistograms(), FillTreeVector(), and SetHistoTreeSave().
|
protected |
Definition at line 295 of file QwHelicity.h.
Referenced by IsGoodHelicity(), IsHelicityIgnored(), operator=(), ProcessEvent(), ProcessEventInputRegisterMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 195 of file QwHelicity.h.
Referenced by LoadChannelMap(), ProcessEventInputRegisterMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 197 of file QwHelicity.h.
Referenced by EncodeEventData(), LoadChannelMap(), ProcessEventInputRegisterMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 196 of file QwHelicity.h.
Referenced by EncodeEventData(), LoadChannelMap(), ProcessEventInputRegisterMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 199 of file QwHelicity.h.
Referenced by LoadChannelMap(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 198 of file QwHelicity.h.
Referenced by EncodeEventData(), LoadChannelMap(), ProcessEventInputRegisterMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 269 of file QwHelicity.h.
Referenced by GetMaxPatternPhase(), IsGoodPhaseNumber(), LoadChannelMap(), Print(), QwFakeHelicity::ProcessEvent(), ProcessEvent(), ProcessEventUserbitMode(), ProcessOptions(), QwHelicity(), and RunPredictor().
|
protected |
Definition at line 270 of file QwHelicity.h.
Referenced by CollectRandBits24(), CollectRandBits30(), EncodeEventData(), GetMinPatternPhase(), IsGoodHelicity(), IsGoodPatternNumber(), IsGoodPhaseNumber(), ProcessEvent(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), ProcessEventUserbitMode(), QwHelicity(), QwHelicity(), and RunPredictor().
|
protected |
Definition at line 314 of file QwHelicity.h.
Referenced by AccumulateRunningSum(), ClearErrorCounters(), IsGoodHelicity(), operator=(), PrintErrorCounters(), and QwHelicity().
|
protected |
Definition at line 312 of file QwHelicity.h.
Referenced by AccumulateRunningSum(), ClearErrorCounters(), operator=(), PrintErrorCounters(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), and QwHelicity().
|
protected |
Definition at line 311 of file QwHelicity.h.
Referenced by AccumulateRunningSum(), ClearErrorCounters(), operator=(), PrintErrorCounters(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), and QwHelicity().
|
protected |
Definition at line 313 of file QwHelicity.h.
Referenced by AccumulateRunningSum(), ClearErrorCounters(), operator=(), PrintErrorCounters(), ProcessEventInputRegisterMode(), and QwHelicity().
|
protected |
Definition at line 229 of file QwHelicity.h.
Referenced by AccumulateRunningSum(), CheckPatternNum(), QwFakeHelicity::ClearEventData(), ClearEventData(), CollectRandBits24(), CollectRandBits30(), ConstructBranch(), ConstructBranch(), EncodeEventData(), FillHistograms(), FillTreeVector(), GetPatternNumber(), IsGoodPatternNumber(), IsGoodPhaseNumber(), operator=(), Print(), PrintErrorCounters(), QwFakeHelicity::ProcessEvent(), ProcessEvent(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), ProcessEventUserbitMode(), QwHelicity(), QwHelicity(), RunPredictor(), and SetEventPatternPhase().
|
protected |
Definition at line 301 of file QwHelicity.h.
Referenced by ClearEventData(), operator=(), PrintErrorCounters(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 229 of file QwHelicity.h.
Referenced by QwFakeHelicity::ClearEventData(), ClearEventData(), FillHistograms(), IsGoodPatternNumber(), IsGoodPhaseNumber(), Print(), QwFakeHelicity::ProcessEvent(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), ProcessEventUserbitMode(), QwHelicity(), QwHelicity(), and RunPredictor().
|
protected |
Definition at line 228 of file QwHelicity.h.
Referenced by QwFakeHelicity::ClearEventData(), ClearEventData(), CollectRandBits24(), CollectRandBits30(), ConstructBranch(), ConstructBranch(), EncodeEventData(), FillHistograms(), FillTreeVector(), GetPhaseNumber(), IsGoodHelicity(), IsGoodPatternNumber(), IsGoodPhaseNumber(), operator=(), Print(), QwFakeHelicity::ProcessEvent(), ProcessEvent(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), ProcessEventUserbitMode(), QwHelicity(), QwHelicity(), RunPredictor(), and SetEventPatternPhase().
|
protected |
Definition at line 228 of file QwHelicity.h.
Referenced by QwFakeHelicity::ClearEventData(), ClearEventData(), IsGoodPatternNumber(), IsGoodPhaseNumber(), Print(), QwFakeHelicity::ProcessEvent(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), ProcessEventUserbitMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 293 of file QwHelicity.h.
Referenced by EncodeEventData(), LoadChannelMap(), ProcessEventInputRegisterMode(), ProcessOptions(), and QwHelicity().
|
protected |
Definition at line 230 of file QwHelicity.h.
Referenced by ConstructBranch(), ConstructBranch(), FillTreeVector(), and operator=().
|
protected |
True polarity of the previous pattern.
Definition at line 233 of file QwHelicity.h.
Referenced by CollectRandBits24(), CollectRandBits30(), ConstructBranch(), ConstructBranch(), FillTreeVector(), operator=(), ProcessEvent(), and RunPredictor().
|
protected |
Definition at line 290 of file QwHelicity.h.
Referenced by CollectRandBits(), GetRandbit(), LoadChannelMap(), ProcessOptions(), and QwHelicity().
|
protected |
Flag to disable the printing os missed MPS error messages during online running
Definition at line 320 of file QwHelicity.h.
Referenced by ProcessEventInputRegisterMode(), ProcessOptions(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 260 of file QwHelicity.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
protected |
Definition at line 261 of file QwHelicity.h.
|
protected |
Definition at line 291 of file QwHelicity.h.
Referenced by ProcessEvent(), ProcessOptions(), QwHelicity(), QwHelicity(), and SetHelicityDelay().
|
protected |
Definition at line 205 of file QwHelicity.h.
Referenced by QwFakeHelicity::ClearEventData(), ClearEventData(), Compare(), ConstructBranch(), ConstructBranch(), ConstructBranchAndVector(), ConstructHistograms(), FillHistograms(), FillTreeVector(), LoadChannelMap(), MergeCounters(), operator=(), ProcessEvBuffer(), QwFakeHelicity::ProcessEvent(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), ProcessEventUserbitMode(), and QwHelicity().
|
protected |
Definition at line 206 of file QwHelicity.h.
Referenced by LoadChannelMap(), and ProcessEvBuffer().
|
protected |
Definition at line 263 of file QwHelicity.h.
Referenced by QwFakeHelicity::CollectRandBits(), CollectRandBits24(), CollectRandBits30(), GetRandomSeedActual(), QwHelicity(), RunPredictor(), and SetFirstBits().
|
protected |
Definition at line 264 of file QwHelicity.h.
Referenced by QwFakeHelicity::CollectRandBits(), CollectRandBits24(), CollectRandBits30(), GetRandomSeedDelayed(), QwHelicity(), RunPredictor(), and SetFirstBits().
|
staticprotected |
Definition at line 251 of file QwHelicity.h.
|
staticprotected |
Default helicity bit pattern of 0x69 represents a -++-+–+ octet (event polarity listed in reverse time order), where the LSB of the bit pattern is the first event of the pattern.
Definition at line 43 of file QwHelicity.h.
Referenced by BuildHelicityBitPattern(), ProcessOptions(), QwHelicity(), REGISTER_SUBSYSTEM_FACTORY(), and SetHelicityBitPattern().
|
protected |
Definition at line 225 of file QwHelicity.h.
Referenced by LoadChannelMap(), ProcessEventInputMollerMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 225 of file QwHelicity.h.
Referenced by LoadChannelMap(), ProcessEventInputMollerMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 223 of file QwHelicity.h.
Referenced by LoadChannelMap(), and ProcessEventInputRegisterMode().
|
protected |
Definition at line 223 of file QwHelicity.h.
Referenced by LoadChannelMap(), QwFakeHelicity::ProcessEvent(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 223 of file QwHelicity.h.
Referenced by LoadChannelMap(), QwFakeHelicity::ProcessEvent(), ProcessEventInputMollerMode(), ProcessEventInputRegisterMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 223 of file QwHelicity.h.
Referenced by LoadChannelMap(), QwFakeHelicity::ProcessEvent(), ProcessEventInputRegisterMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 219 of file QwHelicity.h.
Referenced by LoadChannelMap(), and ProcessEventUserbitMode().
|
staticprotected |
Definition at line 256 of file QwHelicity.h.
Referenced by QwFakeHelicity::ClearEventData(), ClearEventData(), IsGoodHelicity(), ProcessEventInputRegisterMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 215 of file QwHelicity.h.
Referenced by LoadChannelMap(), ProcessEventUserbitMode(), QwHelicity(), and QwHelicity().
|
protected |
Definition at line 262 of file QwHelicity.h.
Referenced by CollectRandBits24(), CollectRandBits30(), PredictHelicity(), QwHelicity(), QwHelicity(), and ResetPredictor().