QwAnalysis
|
#include <QwFakeHelicity.h>
Public Member Functions | |
QwFakeHelicity (TString region_tmp) | |
virtual | ~QwFakeHelicity () |
void | ClearEventData () |
Bool_t | IsGoodHelicity () |
void | ProcessEvent () |
![]() | |
QwHelicity (const TString &name) | |
Constructor with name. More... | |
QwHelicity (const QwHelicity &source) | |
Copy constructor. More... | |
virtual | ~QwHelicity () |
Virtual destructor. More... | |
void | ProcessOptions (QwOptions &options) |
Process the command line options. More... | |
Int_t | LoadChannelMap (TString mapfile) |
Mandatory map file definition. More... | |
Int_t | LoadInputParameters (TString pedestalfile) |
Mandatory parameter file definition. More... | |
Int_t | LoadEventCuts (TString filename) |
Load the event cuts file. More... | |
Bool_t | ApplySingleEventCuts () |
Apply the single event cuts. More... | |
void | IncrementErrorCounters () |
Increment the error counters. More... | |
void | PrintErrorCounters () const |
Report the number of events failed due to HW and event cut failures. More... | |
UInt_t | GetEventcutErrorFlag () |
Return the error flag to the top level routines related to stability checks and ErrorFlag updates. More... | |
void | UpdateErrorFlag (const VQwSubsystem *ev_error) |
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 More... | |
Int_t | ProcessConfigurationBuffer (const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words) |
Int_t | ProcessEvBuffer (const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words) |
TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware version. More... | |
Int_t | ProcessEvBuffer (UInt_t ev_type, const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words) |
void | ProcessEventUserbitMode () |
void | ProcessEventInputRegisterMode () |
void | ProcessEventInputMollerMode () |
void | EncodeEventData (std::vector< UInt_t > &buffer) |
UInt_t | GetRandomSeedActual () |
UInt_t | GetRandomSeedDelayed () |
void | PredictHelicity () |
void | RunPredictor () |
void | SetHelicityDelay (Int_t delay) |
void | SetHelicityBitPattern (UInt_t bits) |
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) |
Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsystem *value) by VQwSubsystem::operator=(value) More... | |
VQwSubsystem & | operator+= (VQwSubsystem *value) |
void | Sum (VQwSubsystem *value1, VQwSubsystem *value2) |
VQwSubsystem & | operator-= (VQwSubsystem *value) |
void | Scale (Double_t factor) |
void | Difference (VQwSubsystem *value1, VQwSubsystem *value2) |
void | Ratio (VQwSubsystem *numer, VQwSubsystem *denom) |
void | AccumulateRunningSum (VQwSubsystem *value) |
Update the running sums for devices. More... | |
void | DeaccumulateRunningSum (VQwSubsystem *value) |
remove one entry from the running sums for devices More... | |
void | CalculateRunningAverage () |
Calculate the average for all good events. More... | |
void | ConstructHistograms (TDirectory *folder, TString &prefix) |
Construct the histograms for this subsystem in a folder with a prefix. More... | |
void | FillHistograms () |
Fill the histograms for this subsystem. More... | |
void | ConstructBranchAndVector (TTree *tree, TString &prefix, std::vector< Double_t > &values) |
Construct the branch and tree vector. More... | |
void | ConstructBranch (TTree *tree, TString &prefix) |
Construct the branch and tree vector. More... | |
void | ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &trim_file) |
Construct the branch and tree vector based on the trim file. More... | |
void | FillTreeVector (std::vector< Double_t > &values) const |
Fill the tree vector. More... | |
void | FillDB (QwParityDB *db, TString type) |
Fill the database. More... | |
void | FillErrDB (QwParityDB *db, TString datatype) |
void | Print () const |
Bool_t | IsHelicityIgnored () |
![]() | |
VQwSubsystemParity (const TString &name) | |
Constructor with name. More... | |
VQwSubsystemParity (const VQwSubsystemParity &source) | |
Copy constructor. More... | |
virtual | ~VQwSubsystemParity () |
Default destructor. More... | |
virtual void | FillDB_MPS (QwParityDB *db, TString type) |
Fill the database with MPS-based variables Note that most subsystems don't need to do this. More... | |
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. More... | |
virtual void | Blind (const QwBlinder *blinder) |
Blind the asymmetry of this subsystem. More... | |
virtual void | Blind (const QwBlinder *blinder, const VQwSubsystemParity *subsys) |
Blind the difference of this subsystem. More... | |
virtual void | PrintValue () const |
Print values of all channels. More... | |
virtual void | WritePromptSummary (QwPromptSummary *ps, TString type) |
virtual Bool_t | CheckForEndOfBurst () const |
![]() | |
VQwSubsystem (const TString &name) | |
Constructor with name. More... | |
VQwSubsystem (const VQwSubsystem &orig) | |
Copy constructor by object. More... | |
virtual | ~VQwSubsystem () |
Default destructor. More... | |
TString | GetSubsystemName () const |
Bool_t | HasDataLoaded () const |
void | SetParent (QwSubsystemArray *parent) |
Set the parent of this subsystem to the specified array. More... | |
QwSubsystemArray * | GetParent (const unsigned int parent=0) const |
Get the parent of this subsystem. More... | |
VQwSubsystem * | GetSibling (const std::string &name) const |
Get the sibling with specified name. More... | |
Bool_t | PublishInternalValue (const TString &name, const TString &desc, const VQwHardwareChannel *value) const |
Publish a variable name to the parent subsystem array. More... | |
virtual Bool_t | PublishInternalValues () const |
Publish all variables of the subsystem. More... | |
virtual Bool_t | PublishByRequest (TString device_name) |
Try to publish an internal variable matching the submitted name. More... | |
Bool_t | RequestExternalValue (const TString &name, VQwHardwareChannel *value) const |
Request a named value which is owned by an external subsystem; the request will be handled by the parent subsystem array. More... | |
virtual const VQwHardwareChannel * | ReturnInternalValue (const TString &name) const |
Return a pointer to a varialbe to the parent subsystem array to be delivered to a different subsystem. More... | |
virtual Bool_t | ReturnInternalValue (const TString &name, VQwHardwareChannel *value) const |
Return a named value to the parent subsystem array to be delivered to a different subsystem. More... | |
virtual std::vector< TString > | GetParamFileNameList () |
virtual std::map< TString, TString > | GetDetectorMaps () |
virtual Int_t | LoadDetectorMaps (QwParameterFile &file) |
Parse parameter file to find the map files. More... | |
virtual Int_t | LoadGeometryDefinition (TString mapfile) |
Optional geometry definition. More... | |
virtual Int_t | LoadCrosstalkDefinition (TString mapfile) |
Optional crosstalk definition. More... | |
void | SetEventTypeMask (const UInt_t mask) |
Set event type mask. More... | |
UInt_t | GetEventTypeMask () const |
Get event type mask. More... | |
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. More... | |
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. More... | |
virtual void | AtEndOfEventLoop () |
Perform actions at the end of the event loop. More... | |
virtual void | RandomizeEventData (int helicity=0, double time=0.0) |
virtual void | PrintInfo () const |
Print some information about the subsystem. More... | |
virtual void | PrintDetectorMaps (Bool_t status) const |
virtual void | ConstructHistograms () |
Construct the histograms for this subsystem. More... | |
virtual void | ConstructHistograms (TDirectory *folder) |
Construct the histograms for this subsystem in a folder. More... | |
virtual void | ConstructHistograms (TString &prefix) |
Construct the histograms for this subsystem with a prefix. More... | |
virtual void | ConstructBranchAndVector (TTree *tree, std::vector< Double_t > &values) |
Construct the branch and tree vector. More... | |
virtual void | ConstructTree () |
Construct the tree for this subsystem. More... | |
virtual void | ConstructTree (TDirectory *folder) |
Construct the tree for this subsystem in a folder. More... | |
virtual void | ConstructTree (TString &prefix) |
Construct the tree for this subsystem with a prefix. More... | |
virtual void | ConstructTree (TDirectory *folder, TString &prefix) |
Construct the tree for this subsystem in a folder with a prefix. More... | |
virtual void | FillTree () |
Fill the tree for this subsystem. More... | |
virtual void | DeleteTree () |
Delete the tree for this subsystem. More... | |
![]() | |
void | ShareHistograms (const MQwHistograms *source) |
Share histogram pointers between objects. More... | |
![]() | |
virtual | ~MQwCloneable () |
Virtual destructor. More... | |
virtual VQwSubsystem * | Clone () const |
Concrete clone method. More... | |
const VQwFactory< VQwSubsystem > * | Factory () const |
Factory getter. More... | |
![]() | |
virtual | ~VQwCloneable () |
Virtual destructor. More... | |
std::string | GetClassName () const |
Get demangled name of this class. More... | |
Protected Member Functions | |
Bool_t | CollectRandBits () |
UInt_t | GetRandbit (UInt_t &ranseed) |
![]() | |
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 | UpdatePublishedValue (const TString &name, VQwHardwareChannel *data_channel) |
void | ClearAllBankRegistrations () |
Clear all registration of ROC and Bank IDs for this subsystem. More... | |
virtual Int_t | RegisterROCNumber (const UInt_t roc_id, const UInt_t bank_id=0) |
Tell the object that it will decode data from this ROC and sub-bank. More... | |
Int_t | RegisterSubbank (const UInt_t bank_id) |
Tell the object that it will decode data from this sub-bank in the ROC currently open for registration. More... | |
Int_t | GetSubbankIndex () const |
Int_t | GetSubbankIndex (const UInt_t roc_id, const UInt_t bank_id) const |
void | SetDataLoaded (Bool_t flag) |
Int_t | FindIndex (const std::vector< UInt_t > &myvec, const UInt_t value) const |
Bool_t | Compare (VQwSubsystem *source) |
![]() | |
MQwHistograms () | |
Default constructor. More... | |
MQwHistograms (const MQwHistograms &source) | |
Copy constructor. More... | |
virtual | ~MQwHistograms () |
Virtual destructor. More... | |
virtual MQwHistograms & | operator= (const MQwHistograms &value) |
void | Fill_Pointer (TH1_ptr hist_ptr, Double_t value) |
void | AddHistogram (TH1 *h) |
Register a histogram. More... | |
Protected Attributes | |
Int_t | fMinPatternPhase |
![]() | |
UInt_t | fInputReg_FakeMPS |
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. More... | |
Int_t | fDelayedPatternPolarity |
Reported polarity of the current pattern. More... | |
Int_t | fPreviousPatternPolarity |
True polarity of the previous pattern. More... | |
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 |
Bool_t | fSuppressMPSErrorMsgs |
![]() | |
std::map< TString, VQwHardwareChannel * > | fPublishedInternalValues |
Map of published internal values. More... | |
std::vector< std::vector < TString > > | fPublishList |
List of parameters to be published (loaded at the channel map) More... | |
TString | fSystemName |
Name of this subsystem. More... | |
UInt_t | fEventTypeMask |
Mask of event types. More... | |
Bool_t | fIsDataLoaded |
Has this subsystem gotten data to be processed? More... | |
std::vector< TString > | fDetectorMapsNames |
std::map< TString, TString > | fDetectorMaps |
Int_t | fCurrentROC_ID |
ROC ID that is currently being processed. More... | |
Int_t | fCurrentBank_ID |
Bank ID that is currently being processed. More... | |
std::vector< UInt_t > | fROC_IDs |
Vector of ROC IDs associated with this subsystem. More... | |
std::vector< std::vector < UInt_t > > | fBank_IDs |
Vector of Bank IDs per ROC ID associated with this subsystem. More... | |
std::vector< QwSubsystemArray * > | fArrays |
Vector of pointers to subsystem arrays that contain this subsystem. More... | |
![]() | |
std::vector< TH1_ptr > | fHistograms |
Histograms associated with this data element. More... | |
Additional Inherited Members | |
![]() | |
static void | DefineOptions (QwOptions &options) |
Define options function. More... | |
![]() | |
static void | DefineOptions () |
Define options function (note: no virtual static functions in C++) More... | |
![]() | |
static VQwSubsystem * | Create (const std::string &name) |
Object creation. More... | |
static QwHelicity * | Cast (QwHelicity *type) |
Object dynamic cast. More... | |
![]() | |
enum | HelicityRootSavingType { kHelSaveMPS = 0, kHelSavePattern, kHelNoSave } |
enum | HelicityEncodingType { kHelUserbitMode =0, kHelInputRegisterMode, kHelLocalyMadeUp, kHelInputMollerMode } |
enum | InputRegisterBits { kInputReg_HelPlus = 0x1, kInputReg_HelMinus = 0x2, kInputReg_PatternSync = 0x4 } |
![]() | |
static const UInt_t | kInputReg_FakeMPS = 0x8000 |
Default mask for fake MPS latch bit. More... | |
static const UInt_t | kDefaultHelicityBitPattern = 0x69 |
static const Bool_t | kDEBUG =kFALSE |
static const Int_t | kUndefinedHelicity = -9999 |
The QwFakeHelicity class uses a pregenerated random seed to generate the fake helicity signal that then can be used to perfrom helicity related calculations.
Definition at line 19 of file QwFakeHelicity.h.
|
inline |
Definition at line 21 of file QwFakeHelicity.h.
|
inlinevirtual |
Definition at line 27 of file QwFakeHelicity.h.
|
virtual |
Reimplemented from QwHelicity.
Definition at line 63 of file QwFakeHelicity.cc.
References QwHelicity::fEventNumber, QwHelicity::fEventNumberOld, QwHelicity::fHelicityActual, QwHelicity::fHelicityBitMinus, QwHelicity::fHelicityBitPlus, QwHelicity::fPatternNumber, QwHelicity::fPatternNumberOld, QwHelicity::fPatternPhaseNumber, QwHelicity::fPatternPhaseNumberOld, QwHelicity::fWord, and QwHelicity::kUndefinedHelicity.
|
protectedvirtual |
The value of the radseed was picked up from the studies Buddhini did on the 24 bit helicity generater back in 2008.
Reimplemented from QwHelicity.
Definition at line 86 of file QwFakeHelicity.cc.
References QwHelicity::fActualPatternPolarity, QwHelicity::fDelayedPatternPolarity, QwHelicity::fGoodHelicity, QwHelicity::fHelicityActual, QwHelicity::fHelicityDelayed, GetRandbit(), QwHelicity::iseed_Actual, and QwHelicity::iseed_Delayed.
|
protectedvirtual |
Reimplemented from QwHelicity.
Definition at line 80 of file QwFakeHelicity.cc.
References QwHelicity::GetRandbit24().
Referenced by CollectRandBits().
|
virtual |
Reimplemented from QwHelicity.
Definition at line 16 of file QwFakeHelicity.cc.
References QwHelicity::fGoodHelicity.
|
virtual |
Reimplemented from QwHelicity.
Definition at line 23 of file QwFakeHelicity.cc.
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().
|
protected |
Definition at line 34 of file QwFakeHelicity.h.
Referenced by ProcessEvent().