|
JAPAn
Just Another Parity Analyzer
|
Data handler computing correlations and linear-regression coefficients. More...
#include <QwCorrelator.h>
Inheritance diagram for QwCorrelator:
Collaboration diagram for QwCorrelator:Public Member Functions | |
| QwCorrelator (const TString &name) | |
| Constructor with name. | |
| QwCorrelator (const QwCorrelator &name) | |
| ~QwCorrelator () override | |
| void | ProcessOptions (QwOptions &options) |
| void | ParseConfigFile (QwParameterFile &file) override |
| Int_t | LoadChannelMap (const std::string &mapfile) override |
| Int_t | ConnectChannels (QwSubsystemArrayParity &asym, QwSubsystemArrayParity &diff) override |
| Connect to Channels (asymmetry/difference only) | |
| void | ProcessData () override |
| void | FinishDataHandler () override |
| void | CalcCorrelations () |
| void | ConstructTreeBranches (QwRootFile *treerootfile, const std::string &treeprefix="", const std::string &branchprefix="") override |
| Construct the tree branches. | |
| void | FillTreeBranches (QwRootFile *treerootfile) override |
| Fill the tree branches. | |
| void | ConstructHistograms (TDirectory *folder, TString &prefix) override |
| Construct the histograms in a folder with a prefix. | |
| void | FillHistograms () override |
| Fill the histograms. | |
| void | ClearEventData () override |
| void | AccumulateRunningSum (VQwDataHandler &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override |
Public Member Functions inherited from VQwDataHandler | |
| VQwDataHandler (const TString &name) | |
| VQwDataHandler (const VQwDataHandler &source) | |
| void | SetPointer (QwHelicityPattern *ptr) |
| void | SetPointer (QwSubsystemArrayParity *ptr) |
| virtual Int_t | ConnectChannels (QwSubsystemArrayParity &, QwSubsystemArrayParity &asym, QwSubsystemArrayParity &diff) |
| virtual Int_t | ConnectChannels (QwSubsystemArrayParity &) |
| Int_t | ConnectChannels (QwHelicityPattern &helicitypattern) |
| virtual void | UpdateBurstCounter (Short_t burstcounter) |
| ~VQwDataHandler () override | |
| TString | GetName () |
| void | InitRunningSum () |
| void | AccumulateRunningSum () |
| void | CalculateRunningAverage () |
| void | PrintValue () const |
| void | WritePromptSummary (QwPromptSummary *ps, TString type) |
| virtual void | ConstructNTupleFields (QwRootFile *treerootfile, const std::string &treeprefix="", const std::string &branchprefix="") |
| RNTuple methods. | |
| virtual void | FillNTupleFields (QwRootFile *treerootfile) |
| void | FillTreeVector (QwRootTreeBranchVector &values) const |
| void | ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values) |
| void | SetRunLabel (TString x) |
| Int_t | LoadChannelMap () |
| Bool_t | PublishInternalValues () const override |
| Publish all variables of the subsystem. | |
| Bool_t | PublishByRequest (TString device_name) override |
| Try to publish an internal variable matching the submitted name. | |
Public Member Functions inherited from MQwPublishable_child< QwDataHandlerArray, VQwDataHandler > | |
| 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 (QwDataHandlerArray *parent) |
| Set the parent container for this child object. | |
| QwDataHandlerArray * | GetParent () const |
| Get the parent container for this child object. | |
Public Member Functions inherited from MQwCloneable< VQwDataHandler, QwCorrelator > | |
| ~MQwCloneable () override | |
| Virtual destructor. | |
| VQwDataHandler * | Clone () const override |
| Concrete clone method. | |
| const VQwFactory< VQwDataHandler > * | Factory () const override |
| Factory getter. | |
Public Member Functions inherited from VQwCloneable< VQwDataHandler > | |
| virtual | ~VQwCloneable () |
| Virtual destructor. | |
| std::string | GetClassName () const |
| Get demangled name of this class. | |
Static Public Member Functions | |
| static void | DefineOptions (QwOptions &options) |
Static Public Member Functions inherited from MQwCloneable< VQwDataHandler, QwCorrelator > | |
| static VQwDataHandler * | Create (const std::string &name) |
| Object creation. | |
| static QwCorrelator * | Cast (QwCorrelator *type) |
| Object dynamic cast. | |
Protected Member Functions | |
| void | OpenAlphaFile (const std::string &prefix) |
| void | WriteAlphaFile () |
| void | CloseAlphaFile () |
| void | OpenAliasFile (const std::string &prefix) |
| void | WriteAliasFile () |
| void | CloseAliasFile () |
Protected Member Functions inherited from VQwDataHandler | |
| VQwDataHandler () | |
| void | SetEventcutErrorFlagPointer (const UInt_t *errorflagptr) |
| UInt_t | GetEventcutErrorFlag () const |
| std::pair< EQwHandleType, std::string > | ParseHandledVariable (const std::string &variable) |
| void | CalcOneOutput (const VQwHardwareChannel *dv, VQwHardwareChannel *output, std::vector< const VQwHardwareChannel * > &ivs, std::vector< Double_t > &sens) |
Protected Member Functions inherited from MQwPublishable_child< QwDataHandlerArray, VQwDataHandler > | |
| 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 | |
| Int_t | fBlock |
| bool | fDisableHistos |
| std::vector< std::string > | fIndependentFull |
| std::vector< EQwHandleType > | fIndependentType |
| std::vector< std::string > | fIndependentName |
| std::vector< const VQwHardwareChannel * > | fIndependentVar |
| std::vector< Double_t > | fIndependentValues |
| std::string | fAlphaOutputFileBase |
| std::string | fAlphaOutputFileSuff |
| std::string | fAlphaOutputPath |
| TFile * | fAlphaOutputFile |
| TTree * | fTree |
| std::string | fAliasOutputFileBase |
| std::string | fAliasOutputFileSuff |
| std::string | fAliasOutputPath |
| std::ofstream | fAliasOutputFile |
| int | fTotalCount |
| int | fGoodCount |
| int | fErrCounts_EF |
| std::vector< int > | fErrCounts_IV |
| std::vector< int > | fErrCounts_DV |
| unsigned int | fGoodEvent |
Protected Attributes inherited from VQwDataHandler | |
| Int_t | fPriority |
| Short_t | fBurstCounter |
| When a datahandler array is processed, handlers with lower priority will be processed before handlers with higher priority. | |
| TString | fName |
| std::string | fMapFile |
| std::string | fTreeName |
| std::string | fTreeComment |
| std::string | fPrefix |
| TString | run_label |
| const UInt_t * | fErrorFlagPtr |
| Error flag pointer. | |
| QwSubsystemArrayParity * | fSubsystemArray |
| Single event pointer. | |
| QwHelicityPattern * | fHelicityPattern |
| Helicity pattern pointer. | |
| std::vector< std::string > | fDependentFull |
| std::vector< EQwHandleType > | fDependentType |
| std::vector< std::string > | fDependentName |
| std::vector< const VQwHardwareChannel * > | fDependentVar |
| std::vector< Double_t > | fDependentValues |
| std::vector< VQwHardwareChannel * > | fOutputVar |
| std::vector< Double_t > | fOutputValues |
| std::vector< std::vector< TString > > | fPublishList |
| std::string | ParseSeparator |
| Bool_t | fKeepRunningSum |
| Bool_t | fRunningsumFillsTree |
| VQwDataHandler * | fRunningsum |
Private Member Functions | |
| QwCorrelator () | |
Private Attributes | |
| TString | fNameNoSpaces |
| int | nP |
| int | nY |
| std::vector< TH1D > | fHnames |
| std::vector< TH1D > | fH1iv |
| std::vector< TH1D > | fH1dv |
| std::vector< std::vector< TH2D > > | fH2iv |
| std::vector< std::vector< TH2D > > | fH2dv |
| LinRegBevPeb | linReg |
| Int_t | fCycleCounter |
Static Private Attributes | |
| static bool | fPrintCorrelations = false |
Additional Inherited Members | |
Public Types inherited from VQwDataHandler | |
| enum | EQwHandleType { kHandleTypeUnknown =0 , kHandleTypeMps , kHandleTypeAsym , kHandleTypeDiff , kHandleTypeYield } |
| typedef std::vector< VQwHardwareChannel * >::iterator | Iterator_HdwChan |
| typedef std::vector< VQwHardwareChannel * >::const_iterator | ConstIterator_HdwChan |
Data handler computing correlations and linear-regression coefficients.
Uses Bevington/Pebay algorithms to estimate correlations between independent and dependent variables selected from subsystem arrays. Produces summary histograms and optional output trees/files for further analysis.
Definition at line 33 of file QwCorrelator.h.
| QwCorrelator::QwCorrelator | ( | const TString & | name | ) |
Constructor with name.
Definition at line 28 of file QwCorrelator.cc.
References ClearEventData(), fAliasOutputFileBase, fAliasOutputFileSuff, fAliasOutputPath, fAlphaOutputFile, fAlphaOutputFileBase, fAlphaOutputFileSuff, fAlphaOutputPath, fBlock, fCycleCounter, fDisableHistos, fNameNoSpaces, fTree, VQwDataHandler::fTreeComment, VQwDataHandler::fTreeName, nP, nY, VQwDataHandler::ParseSeparator, and VQwDataHandler::VQwDataHandler().
Referenced by AccumulateRunningSum(), and QwCorrelator().
Here is the call graph for this function:
Here is the caller graph for this function:| QwCorrelator::QwCorrelator | ( | const QwCorrelator & | name | ) |
Definition at line 55 of file QwCorrelator.cc.
References ClearEventData(), QwLog::endl(), fAliasOutputFileBase, fAliasOutputFileSuff, fAliasOutputPath, fAlphaOutputFile, fAlphaOutputFileBase, fAlphaOutputFileSuff, fAlphaOutputPath, fBlock, fCycleCounter, fDisableHistos, fTree, nP, nY, QwCorrelator(), QwWarning, and VQwDataHandler::VQwDataHandler().
Here is the call graph for this function:
|
override |
Definition at line 76 of file QwCorrelator.cc.
References CloseAliasFile(), and CloseAlphaFile().
Here is the call graph for this function:
|
private |
|
overridevirtual |
Reimplemented from VQwDataHandler.
Definition at line 160 of file QwCorrelator.cc.
References QwLog::endl(), linReg, QwCorrelator(), QwWarning, and VQwDataHandler::VQwDataHandler().
Here is the call graph for this function:| void QwCorrelator::CalcCorrelations | ( | ) |
Definition at line 172 of file QwCorrelator.cc.
References QwLog::endl(), VQwDataHandler::fDependentVar, fErrCounts_DV, fErrCounts_EF, fErrCounts_IV, fGoodCount, fIndependentVar, fPrintCorrelations, fTotalCount, fTree, VQwDataHandler::GetName(), linReg, nP, nY, QwMessage, QwVerbose, QwWarning, WriteAliasFile(), and WriteAlphaFile().
Referenced by FinishDataHandler().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Reimplemented from VQwDataHandler.
Definition at line 144 of file QwCorrelator.cc.
References fErrCounts_DV, fErrCounts_EF, fErrCounts_IV, fGoodCount, fGoodEvent, fTotalCount, and linReg.
Referenced by QwCorrelator(), and QwCorrelator().
Here is the caller graph for this function:
|
protected |
Definition at line 688 of file QwCorrelator.cc.
References QwLog::endl(), fAliasOutputFile, and QwWarning.
Referenced by ~QwCorrelator().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 676 of file QwCorrelator.cc.
References fAlphaOutputFile.
Referenced by ~QwCorrelator().
Here is the caller graph for this function:
|
overridevirtual |
Connect to Channels (asymmetry/difference only)
| asym | Subsystem array with asymmetries |
| diff | Subsystem array with differences |
Fill vector of pointers to the relevant data elements
Reimplemented from VQwDataHandler.
Definition at line 287 of file QwCorrelator.cc.
References QwLog::endl(), VQwDataHandler::fDependentFull, VQwDataHandler::fDependentName, VQwDataHandler::fDependentType, VQwDataHandler::fDependentValues, VQwDataHandler::fDependentVar, fErrCounts_DV, fErrCounts_IV, fIndependentFull, fIndependentName, fIndependentType, fIndependentValues, fIndependentVar, QwSubsystemArrayParity::GetEventcutErrorFlagPointer(), VQwDataHandler::kHandleTypeAsym, VQwDataHandler::kHandleTypeDiff, VQwDataHandler::kHandleTypeMps, linReg, nP, nY, QwWarning, MQwPublishable< U, T >::RequestExternalPointer(), MQwPublishable_child< QwDataHandlerArray, VQwDataHandler >::RequestExternalPointer(), and VQwDataHandler::SetEventcutErrorFlagPointer().
Here is the call graph for this function:
|
overridevirtual |
Construct the histograms in a folder with a prefix.
Reimplemented from VQwDataHandler.
Definition at line 468 of file QwCorrelator.cc.
References VQwDataHandler::fDependentName, fDisableHistos, fH1dv, fH1iv, fH2dv, fH2iv, fHnames, fIndependentName, VQwDataHandler::fName, nP, and nY.
|
overridevirtual |
Construct the tree branches.
Reimplemented from VQwDataHandler.
Definition at line 380 of file QwCorrelator.cc.
References QwLog::endl(), fGoodCount, fTotalCount, fTree, VQwDataHandler::fTreeComment, VQwDataHandler::fTreeName, QwRootFile::GetTree(), linReg, QwRootFile::NewTree(), nP, nY, OpenAliasFile(), OpenAlphaFile(), and QwWarning.
Here is the call graph for this function:
|
static |
Definition at line 83 of file QwCorrelator.cc.
References QwOptions::AddOptions(), and fPrintCorrelations.
Referenced by DefineOptionsParity().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Fill the histograms.
Reimplemented from VQwDataHandler.
Definition at line 552 of file QwCorrelator.cc.
References VQwDataHandler::fDependentValues, fDisableHistos, fGoodEvent, fH1dv, fH1iv, fH2dv, fH2iv, fIndependentValues, nP, and nY.
|
inlineoverridevirtual |
Fill the tree branches.
Reimplemented from VQwDataHandler.
Definition at line 69 of file QwCorrelator.h.
|
inlineoverridevirtual |
Reimplemented from VQwDataHandler.
Definition at line 58 of file QwCorrelator.h.
References CalcCorrelations().
Here is the call graph for this function:
|
overridevirtual |
Load the channel map
| mapfile | Filename of map file |
Reimplemented from VQwDataHandler.
Definition at line 245 of file QwCorrelator.cc.
References QwLog::endl(), VQwDataHandler::fDependentFull, VQwDataHandler::fDependentName, VQwDataHandler::fDependentType, fIndependentFull, fIndependentName, fIndependentType, QwParameterFile::GetNextToken(), QwParameterFile::LineIsEmpty(), VQwDataHandler::ParseHandledVariable(), QwError, QwMessage, QwParameterFile::ReadNextLine(), QwParameterFile::TrimComment(), and QwParameterFile::TrimWhitespace().
Here is the call graph for this function:
|
protected |
Definition at line 658 of file QwCorrelator.cc.
References QwLog::endl(), fAliasOutputFile, fAliasOutputFileBase, fAliasOutputFileSuff, fAliasOutputPath, QwWarning, and VQwDataHandler::run_label.
Referenced by ConstructTreeBranches().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 644 of file QwCorrelator.cc.
References QwLog::endl(), fAlphaOutputFile, fAlphaOutputFileBase, fAlphaOutputFileSuff, fAlphaOutputPath, QwError, and VQwDataHandler::run_label.
Referenced by ConstructTreeBranches().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Parse configuration file for map file, priority, tree settings.
Reimplemented from VQwDataHandler.
Definition at line 94 of file QwCorrelator.cc.
References QwLog::endl(), fAliasOutputFileBase, fAliasOutputFileSuff, fAliasOutputPath, fAlphaOutputFileBase, fAlphaOutputFileSuff, fAlphaOutputPath, fBlock, fDisableHistos, VQwDataHandler::ParseConfigFile(), QwParameterFile::PopValue(), and QwWarning.
Here is the call graph for this function:
|
overridevirtual |
Copy dependent variables to output variables (default processing).
Reimplemented from VQwDataHandler.
Definition at line 110 of file QwCorrelator.cc.
References fBlock, VQwDataHandler::fDependentValues, VQwDataHandler::fDependentVar, fErrCounts_DV, fErrCounts_EF, fErrCounts_IV, fGoodCount, fGoodEvent, fIndependentValues, fIndependentVar, fTotalCount, VQwDataHandler::GetEventcutErrorFlag(), and linReg.
Here is the call graph for this function:| void QwCorrelator::ProcessOptions | ( | QwOptions & | options | ) |
Definition at line 90 of file QwCorrelator.cc.
|
protected |
Definition at line 699 of file QwCorrelator.cc.
References QwLog::endl(), fAliasOutputFile, fCycleCounter, VQwDataHandler::fDependentFull, fIndependentFull, linReg, nP, nY, and QwWarning.
Referenced by CalcCorrelations().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 578 of file QwCorrelator.cc.
References fAlphaOutputFile, VQwDataHandler::fDependentFull, fIndependentFull, linReg, nP, and nY.
Referenced by CalcCorrelations().
Here is the caller graph for this function:
|
protected |
Definition at line 107 of file QwCorrelator.h.
Referenced by CloseAliasFile(), OpenAliasFile(), and WriteAliasFile().
|
protected |
Definition at line 104 of file QwCorrelator.h.
Referenced by OpenAliasFile(), ParseConfigFile(), QwCorrelator(), and QwCorrelator().
|
protected |
Definition at line 105 of file QwCorrelator.h.
Referenced by OpenAliasFile(), ParseConfigFile(), QwCorrelator(), and QwCorrelator().
|
protected |
Definition at line 106 of file QwCorrelator.h.
Referenced by OpenAliasFile(), ParseConfigFile(), QwCorrelator(), and QwCorrelator().
|
protected |
Definition at line 97 of file QwCorrelator.h.
Referenced by CloseAlphaFile(), OpenAlphaFile(), QwCorrelator(), QwCorrelator(), and WriteAlphaFile().
|
protected |
Definition at line 94 of file QwCorrelator.h.
Referenced by OpenAlphaFile(), ParseConfigFile(), QwCorrelator(), and QwCorrelator().
|
protected |
Definition at line 95 of file QwCorrelator.h.
Referenced by OpenAlphaFile(), ParseConfigFile(), QwCorrelator(), and QwCorrelator().
|
protected |
Definition at line 96 of file QwCorrelator.h.
Referenced by OpenAlphaFile(), ParseConfigFile(), QwCorrelator(), and QwCorrelator().
|
protected |
Definition at line 81 of file QwCorrelator.h.
Referenced by ParseConfigFile(), ProcessData(), QwCorrelator(), and QwCorrelator().
|
private |
Definition at line 135 of file QwCorrelator.h.
Referenced by QwCorrelator(), QwCorrelator(), and WriteAliasFile().
|
protected |
Definition at line 83 of file QwCorrelator.h.
Referenced by ConstructHistograms(), FillHistograms(), ParseConfigFile(), QwCorrelator(), and QwCorrelator().
|
protected |
Definition at line 117 of file QwCorrelator.h.
Referenced by CalcCorrelations(), ClearEventData(), ConnectChannels(), and ProcessData().
|
protected |
Definition at line 115 of file QwCorrelator.h.
Referenced by CalcCorrelations(), ClearEventData(), and ProcessData().
|
protected |
Definition at line 116 of file QwCorrelator.h.
Referenced by CalcCorrelations(), ClearEventData(), ConnectChannels(), and ProcessData().
|
protected |
Definition at line 113 of file QwCorrelator.h.
Referenced by CalcCorrelations(), ClearEventData(), ConstructTreeBranches(), and ProcessData().
|
protected |
Definition at line 119 of file QwCorrelator.h.
Referenced by ClearEventData(), FillHistograms(), and ProcessData().
|
private |
Definition at line 129 of file QwCorrelator.h.
Referenced by ConstructHistograms(), and FillHistograms().
|
private |
Definition at line 128 of file QwCorrelator.h.
Referenced by ConstructHistograms(), and FillHistograms().
|
private |
Definition at line 131 of file QwCorrelator.h.
Referenced by ConstructHistograms(), and FillHistograms().
|
private |
Definition at line 130 of file QwCorrelator.h.
Referenced by ConstructHistograms(), and FillHistograms().
|
private |
Definition at line 127 of file QwCorrelator.h.
Referenced by ConstructHistograms().
|
protected |
Definition at line 85 of file QwCorrelator.h.
Referenced by ConnectChannels(), LoadChannelMap(), WriteAliasFile(), and WriteAlphaFile().
|
protected |
Definition at line 89 of file QwCorrelator.h.
Referenced by ConnectChannels(), ConstructHistograms(), and LoadChannelMap().
|
protected |
Definition at line 88 of file QwCorrelator.h.
Referenced by ConnectChannels(), and LoadChannelMap().
|
protected |
Definition at line 92 of file QwCorrelator.h.
Referenced by ConnectChannels(), FillHistograms(), and ProcessData().
|
protected |
Definition at line 91 of file QwCorrelator.h.
Referenced by CalcCorrelations(), ConnectChannels(), and ProcessData().
|
private |
Definition at line 123 of file QwCorrelator.h.
Referenced by QwCorrelator().
|
staticprivate |
Definition at line 42 of file QwCorrelator.h.
Referenced by CalcCorrelations(), and DefineOptions().
|
protected |
Definition at line 112 of file QwCorrelator.h.
Referenced by CalcCorrelations(), ClearEventData(), ConstructTreeBranches(), and ProcessData().
|
protected |
Definition at line 102 of file QwCorrelator.h.
Referenced by CalcCorrelations(), ConstructTreeBranches(), QwCorrelator(), and QwCorrelator().
|
private |
Definition at line 133 of file QwCorrelator.h.
Referenced by AccumulateRunningSum(), CalcCorrelations(), ClearEventData(), ConnectChannels(), ConstructTreeBranches(), ProcessData(), WriteAliasFile(), and WriteAlphaFile().
|
private |
Definition at line 124 of file QwCorrelator.h.
Referenced by CalcCorrelations(), ConnectChannels(), ConstructHistograms(), ConstructTreeBranches(), FillHistograms(), QwCorrelator(), QwCorrelator(), WriteAliasFile(), and WriteAlphaFile().
|
private |
Definition at line 124 of file QwCorrelator.h.
Referenced by CalcCorrelations(), ConnectChannels(), ConstructHistograms(), ConstructTreeBranches(), FillHistograms(), QwCorrelator(), QwCorrelator(), WriteAliasFile(), and WriteAlphaFile().