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

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.
 
QwDataHandlerArrayGetParent () const
 Get the parent container for this child object.
 
- Public Member Functions inherited from MQwCloneable< VQwDataHandler, QwCorrelator >
 ~MQwCloneable () override
 Virtual destructor.
 
VQwDataHandlerClone () 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 VQwDataHandlerCreate (const std::string &name)
 Object creation.
 
static QwCorrelatorCast (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 VQwHardwareChannelRequestExternalPointer (const TString &name) const
 Retrieve a pointer to an external variable by name Requests a direct pointer to a variable from sibling subsystems via the parent container.
 
Bool_t PublishInternalValue (const TString name, const TString desc, const VQwHardwareChannel *element) const
 Publish a variable from this child into the parent container.
 

Protected Attributes

Int_t fBlock
 
bool fDisableHistos
 
std::vector< std::string > fIndependentFull
 
std::vector< EQwHandleTypefIndependentType
 
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.
 
QwSubsystemArrayParityfSubsystemArray
 Single event pointer.
 
QwHelicityPatternfHelicityPattern
 Helicity pattern pointer.
 
std::vector< std::string > fDependentFull
 
std::vector< EQwHandleTypefDependentType
 
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
 
VQwDataHandlerfRunningsum
 

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ QwCorrelator() [1/3]

QwCorrelator::QwCorrelator ( const TString & name)

Constructor with name.

Definition at line 31 of file QwCorrelator.cc.

32: VQwDataHandler(name),
33 fBlock(-1),
34 fDisableHistos(true),
35 fAlphaOutputFileBase("blueR"),
36 fAlphaOutputFileSuff("new.slope.root"),
39 fTree(0),
40 fAliasOutputFileBase("regalias_"),
43 fNameNoSpaces(name),
44 nP(0),nY(0),
46{
47 fNameNoSpaces.ReplaceAll(" ","_");
48 // Set default tree name and descriptions (in VQwDataHandler)
49 fTreeName = "lrb";
50 fTreeComment = "Correlations";
51 // Parsing separator
52 ParseSeparator = "_";
53
54 // Clear all data
56}
std::string fAlphaOutputPath
void ClearEventData() override
std::string fAliasOutputFileBase
std::string fAlphaOutputFileBase
std::string fAliasOutputPath
TString fNameNoSpaces
TFile * fAlphaOutputFile
Int_t fCycleCounter
std::string fAlphaOutputFileSuff
std::string fAliasOutputFileSuff
bool fDisableHistos
std::string ParseSeparator
std::string fTreeComment
std::string fTreeName

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() [2/3]

QwCorrelator::QwCorrelator ( const QwCorrelator & name)

Definition at line 58 of file QwCorrelator.cc.

59: VQwDataHandler(source),
60 fBlock(source.fBlock),
61 fDisableHistos(source.fDisableHistos),
62 fAlphaOutputFileBase(source.fAlphaOutputFileBase),
63 fAlphaOutputFileSuff(source.fAlphaOutputFileSuff),
64 fAlphaOutputPath(source.fAlphaOutputPath),
66 fTree(0),
67 fAliasOutputFileBase(source.fAliasOutputFileBase),
68 fAliasOutputFileSuff(source.fAliasOutputFileSuff),
69 fAliasOutputPath(source.fAliasOutputPath),
70 nP(source.nP),nY(source.nY),
71 fCycleCounter(source.fCycleCounter)
72{
73 QwWarning << "QwCorrelator copy constructor required but untested" << QwLog::endl;
74
75 // Clear all data
77}
#define QwWarning
Predefined log drain for warnings.
Definition QwLog.h:44
static std::ostream & endl(std::ostream &)
End of the line.
Definition QwLog.cc:297

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:

◆ ~QwCorrelator()

QwCorrelator::~QwCorrelator ( )
override

Definition at line 79 of file QwCorrelator.cc.

80{
81 // Close alpha and alias file
84}
void CloseAliasFile()
void CloseAlphaFile()

References CloseAliasFile(), and CloseAlphaFile().

+ Here is the call graph for this function:

◆ QwCorrelator() [3/3]

QwCorrelator::QwCorrelator ( )
private

Member Function Documentation

◆ AccumulateRunningSum()

void QwCorrelator::AccumulateRunningSum ( VQwDataHandler & value,
Int_t count = 0,
Int_t ErrorMask = 0xFFFFFFF )
overridevirtual

Reimplemented from VQwDataHandler.

Definition at line 163 of file QwCorrelator.cc.

164{
165 QwCorrelator* correlator = dynamic_cast<QwCorrelator*>(&value);
166 if (correlator) {
167 linReg += correlator->linReg;
168 } else {
169 QwWarning << "QwCorrelator::AccumulateRunningSum "
170 << "can only accept other QwCorrelator objects."
171 << QwLog::endl;
172 }
173}
QwCorrelator(const TString &name)
Constructor with name.
LinRegBevPeb linReg

References QwLog::endl(), linReg, QwCorrelator(), QwWarning, and VQwDataHandler::VQwDataHandler().

+ Here is the call graph for this function:

◆ CalcCorrelations()

void QwCorrelator::CalcCorrelations ( )

Definition at line 175 of file QwCorrelator.cc.

176{
177 // Check if any channels are active
178 if (nP == 0 || nY == 0) {
179 return;
180 }
181
182 QwMessage << "QwCorrelator::CalcCorrelations(): name=" << GetName() << QwLog::endl;
183
184 // Print entry summary
185 QwVerbose << "QwCorrelator: "
186 << "total entries: " << fTotalCount << ", "
187 << "good entries: " << fGoodCount
188 << QwLog::endl;
189 // and warn if zero
190 if (fTotalCount > 100 && fGoodCount == 0) {
191 QwWarning << "QwCorrelator: "
192 << "< 1% good events, "
193 << fGoodCount << " of " << fTotalCount
194 << QwLog::endl;
195 }
196
197 // Event error flag
198 if (fErrCounts_EF > 0) {
199 QwVerbose << " Entries failed due to error flag: "
201 }
202 // Dependent variable error codes
203 for (size_t i = 0; i < fDependentVar.size(); ++i) {
204 if (fErrCounts_DV.at(i) > 0) {
205 QwVerbose << " Entries failed due to " << fDependentVar.at(i)->GetElementName()
206 << ": " << fErrCounts_DV.at(i) << QwLog::endl;
207 }
208 }
209 // Independent variable error codes
210 for (size_t i = 0; i < fIndependentVar.size(); ++i) {
211 if (fErrCounts_IV.at(i) > 0) {
212 QwVerbose << " Entries failed due to " << fIndependentVar.at(i)->GetElementName()
213 << ": " << fErrCounts_IV.at(i) << QwLog::endl;
214 }
215 }
216
217 if (! linReg.failed()) {
218
219 if (fPrintCorrelations) {
220 linReg.printSummaryP();
221 linReg.printSummaryY();
222 }
223
224 linReg.solve();
225
226 if (fPrintCorrelations) {
227 linReg.printSummaryAlphas();
228 linReg.printSummaryMeansWithUnc();
229 linReg.printSummaryMeansWithUncCorrected();
230 }
231 }
232
233 // Fill tree
234 if (fTree) fTree->Fill();
235 else QwWarning << "No tree" << QwLog::endl;
236
237 // Write alpha and alias file
240}
#define QwVerbose
Predefined log drain for verbose messages.
Definition QwLog.h:54
#define QwMessage
Predefined log drain for regular messages.
Definition QwLog.h:49
void WriteAlphaFile()
static bool fPrintCorrelations
void WriteAliasFile()
std::vector< const VQwHardwareChannel * > fIndependentVar
std::vector< int > fErrCounts_DV
std::vector< int > fErrCounts_IV
TString GetName()
std::vector< const VQwHardwareChannel * > fDependentVar

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:

◆ ClearEventData()

void QwCorrelator::ClearEventData ( )
overridevirtual

Reimplemented from VQwDataHandler.

Definition at line 147 of file QwCorrelator.cc.

148{
149 // Clear error counters
150 fErrCounts_EF = 0;
151 std::fill(fErrCounts_DV.begin(), fErrCounts_DV.end(), 0);
152 std::fill(fErrCounts_IV.begin(), fErrCounts_IV.end(), 0);
153
154 // Clear event counts
155 fTotalCount = 0;
156 fGoodCount = 0;
157 fGoodEvent = -1;
158
159 // Clear regression
160 linReg.clear();
161}
unsigned int fGoodEvent

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:

◆ CloseAliasFile()

void QwCorrelator::CloseAliasFile ( )
protected

Definition at line 688 of file QwCorrelator.cc.

689{
690 // Close alias output file
691 if (fAliasOutputFile.good()) {
692 fAliasOutputFile << "}" << std::endl << std::endl;
693 fAliasOutputFile.close();
694 } else {
695 QwWarning << "QwCorrelator: Unable to close alias output file." << QwLog::endl;
696 }
697}
std::ofstream fAliasOutputFile

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:

◆ CloseAlphaFile()

void QwCorrelator::CloseAlphaFile ( )
protected

Definition at line 679 of file QwCorrelator.cc.

680{
681 // Close slopes output file
682 if (fAlphaOutputFile) {
683 fAlphaOutputFile->Write();
684 fAlphaOutputFile->Close();
685 }
686}

References fAlphaOutputFile.

Referenced by ~QwCorrelator().

+ Here is the caller graph for this function:

◆ ConnectChannels()

Int_t QwCorrelator::ConnectChannels ( QwSubsystemArrayParity & asym,
QwSubsystemArrayParity & diff )
overridevirtual

Connect to Channels (asymmetry/difference only)

Parameters
asymSubsystem array with asymmetries
diffSubsystem array with differences
Returns
0 on success, non-zero on failure

Fill vector of pointers to the relevant data elements

Reimplemented from VQwDataHandler.

Definition at line 290 of file QwCorrelator.cc.

291{
293
294 // Return if correlator is not enabled
295
296 /// Fill vector of pointers to the relevant data elements
297 for (size_t dv = 0; dv < fDependentName.size(); dv++) {
298 // Get the dependent variables
299
300 const VQwHardwareChannel* dv_ptr = 0;
301
302 if (fDependentType.at(dv)==kHandleTypeMps){
303 // Quietly ignore the MPS type when we're connecting the asym & diff
304 continue;
305 }else{
306 dv_ptr = this->RequestExternalPointer(fDependentFull.at(dv));
307 if (dv_ptr==NULL){
308 switch (fDependentType.at(dv)) {
309 case kHandleTypeAsym:
310 dv_ptr = asym.RequestExternalPointer(fDependentName.at(dv));
311 break;
312 case kHandleTypeDiff:
313 dv_ptr = diff.RequestExternalPointer(fDependentName.at(dv));
314 break;
315 default:
316 QwWarning << "QwCorrelator::ConnectChannels(QwSubsystemArrayParity& asym, QwSubsystemArrayParity& diff): "
317 << "Dependent variable, " << fDependentName.at(dv)
318 << ", for asym/diff correlator does not have proper type, type=="
319 << fDependentType.at(dv) << "." << QwLog::endl;
320 break;
321 }
322 }
323 if (dv_ptr == NULL){
324 QwWarning << "QwCombiner::ConnectChannels(QwSubsystemArrayParity& asym, QwSubsystemArrayParity& diff): Dependent variable, "
325 << fDependentName.at(dv)
326 << ", was not found (fullname=="
327 << fDependentFull.at(dv)<< ")." << QwLog::endl;
328 continue;
329 }
330 }
331
332 // pair creation
333 if(dv_ptr != NULL){
334 // fDependentVarType.push_back(fDependentType.at(dv));
335 fDependentVar.push_back(dv_ptr);
336 }
337
338 }
339
340 // Add independent variables
341 for (size_t iv = 0; iv < fIndependentName.size(); iv++) {
342 // Get the independent variables
343 const VQwHardwareChannel* iv_ptr = 0;
344 iv_ptr = this->RequestExternalPointer(fIndependentFull.at(iv));
345 if (iv_ptr==NULL){
346 switch (fIndependentType.at(iv)) {
347 case kHandleTypeAsym:
348 iv_ptr = asym.RequestExternalPointer(fIndependentName.at(iv));
349 break;
350 case kHandleTypeDiff:
351 iv_ptr = diff.RequestExternalPointer(fIndependentName.at(iv));
352 break;
353 default:
354 QwWarning << "Independent variable for correlator has unknown type."
355 << QwLog::endl;
356 break;
357 }
358 }
359 if (iv_ptr) {
360 fIndependentVar.push_back(iv_ptr);
361 } else {
362 QwWarning << "Independent variable " << fIndependentName.at(iv) << " for correlator could not be found."
363 << QwLog::endl;
364 }
365
366 }
367 fIndependentValues.resize(fIndependentVar.size());
368 fDependentValues.resize(fDependentVar.size());
369
370 nP = fIndependentName.size();
371 nY = fDependentName.size();
372
373 linReg.setDims(nP, nY);
374 linReg.init();
375
376 fErrCounts_IV.resize(fIndependentVar.size(),0);
377 fErrCounts_DV.resize(fDependentVar.size(),0);
378
379 return 0;
380}
const VQwHardwareChannel * RequestExternalPointer(const TString &name) const
const VQwHardwareChannel * RequestExternalPointer(const TString &name) const
Retrieve a direct pointer to an external variable Searches for the named variable in external subsyst...
std::vector< std::string > fIndependentName
std::vector< Double_t > fIndependentValues
std::vector< EQwHandleType > fIndependentType
std::vector< std::string > fIndependentFull
const UInt_t * GetEventcutErrorFlagPointer() const
std::vector< std::string > fDependentFull
void SetEventcutErrorFlagPointer(const UInt_t *errorflagptr)
std::vector< Double_t > fDependentValues
std::vector< EQwHandleType > fDependentType
std::vector< std::string > fDependentName

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:

◆ ConstructHistograms()

void QwCorrelator::ConstructHistograms ( TDirectory * folder,
TString & prefix )
overridevirtual

Construct the histograms in a folder with a prefix.

Reimplemented from VQwDataHandler.

Definition at line 471 of file QwCorrelator.cc.

472{
473 // Skip if disabled
474 if (fDisableHistos) return;
475
476 // Check if any channels are active
477 if (nP == 0 || nY == 0) {
478 return;
479 }
480
481 // Go to directory
482 TString name(fName);
483 name.ReplaceAll(" ","_");
484 folder->mkdir(name)->cd();
485
486 //..... 1D, iv
487 fH1iv.resize(nP);
488 for (int i = 0; i < nP; i++) {
489 fH1iv[i] = TH1D(
490 Form("P%d",i),
491 Form("iv P%d=%s, pass=%s ;iv=%s (ppm)",i,fIndependentName[i].c_str(),fName.Data(),fIndependentName[i].c_str()),
492 128,0.,0.);
493 fH1iv[i].GetXaxis()->SetNdivisions(4);
494 }
495
496 //..... 2D, iv correlations
497 Double_t x1 = 0;
498 fH2iv.resize(nP);
499 for (int i = 0; i < nP; i++) {
500 fH2iv[i].resize(nP);
501 for (int j = i+1; j < nP; j++) { // not all are used
502 fH2iv[i][j] = TH2D(
503 Form("P%d_P%d",i,j),
504 Form("iv correlation P%d_P%d, pass=%s ;P%d=%s (ppm);P%d=%s (ppm) ",
505 i,j,fName.Data(),i,fIndependentName[i].c_str(),j,fIndependentName[j].c_str()),
506 64,-x1,x1,
507 64,-x1,x1);
508 fH2iv[i][j].GetXaxis()->SetTitleColor(kBlue);
509 fH2iv[i][j].GetYaxis()->SetTitleColor(kBlue);
510 fH2iv[i][j].GetXaxis()->SetNdivisions(4);
511 fH2iv[i][j].GetYaxis()->SetNdivisions(4);
512 }
513 }
514
515 //..... 1D, dv
516 fH1dv.resize(nY);
517 for (int i = 0; i < nY; i++) {
518 fH1dv[i] = TH1D(
519 Form("Y%d",i),
520 Form("dv Y%d=%s, pass=%s ;dv=%s (ppm)",i,fDependentName[i].c_str(),fName.Data(),fDependentName[i].c_str()),
521 128,0.,0.);
522 fH1dv[i].GetXaxis()->SetNdivisions(4);
523 }
524
525 //..... 2D, dv-iv correlations
526 Double_t y1 = 0;
527 fH2dv.resize(nP);
528 for (int i = 0; i < nP; i++) {
529 fH2dv[i].resize(nY);
530 for (int j = 0; j < nY; j++) {
531 fH2dv[i][j] = TH2D(
532 Form("P%d_Y%d",i,j),
533 Form("iv-dv correlation P%d_Y%d, pass=%s ;P%d=%s (ppm);Y%d=%s (ppm) ",
534 i,j,fName.Data(),i,fIndependentName[i].c_str(),j,fDependentName[j].c_str()),
535 64,-x1,x1,
536 64,-y1,y1);
537 fH2dv[i][j].GetXaxis()->SetTitleColor(kBlue);
538 fH2dv[i][j].GetYaxis()->SetTitleColor(kBlue);
539 fH2dv[i][j].GetXaxis()->SetNdivisions(4);
540 fH2dv[i][j].GetYaxis()->SetNdivisions(4);
541 }
542 }
543
544 // store list of names to be archived
545 fHnames.resize(2);
546 fHnames[0] = TH1D("NamesIV",Form("IV name list nIV=%d",nP),nP,0,1);
547 for (int i = 0; i < nP; i++)
548 fHnames[0].Fill(fIndependentName[i].c_str(),1.*i);
549 fHnames[1] = TH1D("NamesDV",Form("DV name list nIV=%d",nY),nY,0,1);
550 for (int i = 0; i < nY; i++)
551 fHnames[1].Fill(fDependentName[i].c_str(),i*1.);
552}
std::vector< std::vector< TH2D > > fH2iv
std::vector< TH1D > fHnames
std::vector< TH1D > fH1dv
std::vector< std::vector< TH2D > > fH2dv
std::vector< TH1D > fH1iv

References VQwDataHandler::fDependentName, fDisableHistos, fH1dv, fH1iv, fH2dv, fH2iv, fHnames, fIndependentName, VQwDataHandler::fName, nP, and nY.

◆ ConstructTreeBranches()

void QwCorrelator::ConstructTreeBranches ( QwRootFile * treerootfile,
const std::string & treeprefix = "",
const std::string & branchprefix = "" )
overridevirtual

Construct the tree branches.

Reimplemented from VQwDataHandler.

Definition at line 383 of file QwCorrelator.cc.

387{
388 // Check if any channels are active
389 if (nP == 0 || nY == 0) {
390 return;
391 }
392
393 // Check if tree name is specified
394 if (fTreeName == "") {
395 QwWarning << "QwCorrelator: no tree name specified, use 'tree-name = value'" << QwLog::endl;
396 return;
397 }
398
399 // Create alpha and alias files before trying to create the tree
400 OpenAlphaFile(treeprefix);
401 OpenAliasFile(treeprefix);
402
403 // Construct tree name and create new tree
404 const std::string name = treeprefix + fTreeName;
405 treerootfile->NewTree(name, fTreeComment.c_str());
406 fTree = treerootfile->GetTree(name);
407 // Check to make sure the tree was created successfully
408 if (fTree == NULL) return;
409
410 // Set up branches
411 fTree->Branch(TString(branchprefix + "total_count"), &fTotalCount);
412 fTree->Branch(TString(branchprefix + "good_count"), &fGoodCount);
413
414 fTree->Branch(TString(branchprefix + "n"), &(linReg.fGoodEventNumber));
415 fTree->Branch(TString(branchprefix + "ErrorFlag"), &(linReg.fErrorFlag));
416
417 auto bn = [&](const TString& n) {
418 return TString(branchprefix + n);
419 };
420 auto pm = [](TMatrixD& m) {
421 return m.GetMatrixArray();
422 };
423 auto lm = [](TMatrixD& m, const TString& n) {
424 return Form("%s[%d][%d]/D", n.Data(), m.GetNrows(), m.GetNcols());
425 };
426 auto branchm = [&](TTree* tree, TMatrixD& m, const TString& n) {
427 tree->Branch(bn(n),pm(m),lm(m,n));
428 };
429 auto pv = [](TVectorD& v) {
430 return v.GetMatrixArray();
431 };
432 auto lv = [](TVectorD& v, const TString& n) {
433 return Form("%s[%d]/D", n.Data(), v.GetNrows());
434 };
435 auto branchv = [&](TTree* tree, TVectorD& v, const TString& n) {
436 tree->Branch(bn(n),pv(v),lv(v,n));
437 };
438
439 branchm(fTree,linReg.Axy, "A");
440 branchm(fTree,linReg.dAxy, "dA");
441
442 branchm(fTree,linReg.mVPP, "VPP");
443 branchm(fTree,linReg.mVPY, "VPY");
444 branchm(fTree,linReg.mVYP, "VYP");
445 branchm(fTree,linReg.mVYY, "VYY");
446 branchm(fTree,linReg.mVYYp, "VYYp");
447
448 branchm(fTree,linReg.mSPP, "SPP");
449 branchm(fTree,linReg.mSPY, "SPY");
450 branchm(fTree,linReg.mSYP, "SYP");
451 branchm(fTree,linReg.mSYY, "SYY");
452 branchm(fTree,linReg.mSYYp, "SYYp");
453
454 branchm(fTree,linReg.mRPP, "RPP");
455 branchm(fTree,linReg.mRPY, "RPY");
456 branchm(fTree,linReg.mRYP, "RYP");
457 branchm(fTree,linReg.mRYY, "RYY");
458 branchm(fTree,linReg.mRYYp, "RYYp");
459
460 branchv(fTree,linReg.mMP, "MP"); // Parameter mean
461 branchv(fTree,linReg.mMY, "MY"); // Uncorrected mean
462 branchv(fTree,linReg.mMYp, "MYp"); // Corrected mean
463
464 branchv(fTree,linReg.mSP, "dMP"); // Parameter mean error
465 branchv(fTree,linReg.mSY, "dMY"); // Uncorrected mean error
466 branchv(fTree,linReg.mSYp, "dMYp"); // Corrected mean error
467
468}
void NewTree(const std::string &name, const std::string &desc)
Create a new tree with name and description.
Definition QwRootFile.h:912
TTree * GetTree(const std::string &name)
Get the tree with name.
Definition QwRootFile.h:943
void OpenAliasFile(const std::string &prefix)
void OpenAlphaFile(const std::string &prefix)

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:

◆ DefineOptions()

void QwCorrelator::DefineOptions ( QwOptions & options)
static

Definition at line 86 of file QwCorrelator.cc.

87{
88 options.AddOptions()("print-correlations",
89 po::value<bool>(&fPrintCorrelations)->default_bool_value(false),
90 "print correlations after determining them");
91}
po::options_description_easy_init AddOptions(const std::string &blockname="Specialized options")
Add an option to a named block or create new block.
Definition QwOptions.h:170

References QwOptions::AddOptions(), and fPrintCorrelations.

Referenced by DefineOptionsParity().

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

◆ FillHistograms()

void QwCorrelator::FillHistograms ( )
overridevirtual

Fill the histograms.

Reimplemented from VQwDataHandler.

Definition at line 555 of file QwCorrelator.cc.

556{
557 // Skip if disabled
558 if (fDisableHistos) return;
559
560 // Check if any channels are active
561 if (nP == 0 || nY == 0) {
562 return;
563 }
564
565 // Skip if bad event
566 if (fGoodEvent != 0) return;
567
568 // Fill histograms
569 for (size_t i = 0; i < fIndependentValues.size(); i++) {
570 fH1iv[i].Fill(fIndependentValues[i]);
571 for (size_t j = i+1; j < fIndependentValues.size(); j++)
573 }
574 for (size_t j = 0; j < fDependentValues.size(); j++) {
575 fH1dv[j].Fill(fDependentValues[j]);
576 for (size_t i = 0; i < fIndependentValues.size(); i++)
577 fH2dv[i][j].Fill(fIndependentValues[i], fDependentValues[j]);
578 }
579}

References VQwDataHandler::fDependentValues, fDisableHistos, fGoodEvent, fH1dv, fH1iv, fH2dv, fH2iv, fIndependentValues, nP, and nY.

◆ FillTreeBranches()

void QwCorrelator::FillTreeBranches ( QwRootFile * treerootfile)
inlineoverridevirtual

Fill the tree branches.

Reimplemented from VQwDataHandler.

Definition at line 69 of file QwCorrelator.h.

69{ };

◆ FinishDataHandler()

void QwCorrelator::FinishDataHandler ( )
inlineoverridevirtual

Reimplemented from VQwDataHandler.

Definition at line 58 of file QwCorrelator.h.

58 {
60 }
void CalcCorrelations()

References CalcCorrelations().

+ Here is the call graph for this function:

◆ LoadChannelMap()

Int_t QwCorrelator::LoadChannelMap ( const std::string & mapfile)
overridevirtual

Load the channel map

Parameters
mapfileFilename of map file
Returns
Zero when success

Reimplemented from VQwDataHandler.

Definition at line 248 of file QwCorrelator.cc.

249{
250 // Open the file
251 QwParameterFile map(mapfile);
252
253 // Read the sections of dependent variables
254 std::pair<EQwHandleType,std::string> type_name;
255
256 // Add independent variables and sensitivities
257 while (map.ReadNextLine()) {
258 // Throw away comments, whitespace, empty lines
259 map.TrimComment();
260 map.TrimWhitespace();
261 if (map.LineIsEmpty()) continue;
262 // Get first token: label (dv or iv), second token is the name like "asym_blah"
263 string primary_token = map.GetNextToken(" ");
264 string current_token = map.GetNextToken(" ");
265 // Parse current token into independent variable type and name
266 type_name = ParseHandledVariable(current_token);
267
268 if (primary_token == "iv") {
269 fIndependentType.push_back(type_name.first);
270 fIndependentName.push_back(type_name.second);
271 fIndependentFull.push_back(current_token);
272 }
273 else if (primary_token == "dv") {
274 fDependentType.push_back(type_name.first);
275 fDependentName.push_back(type_name.second);
276 fDependentFull.push_back(current_token);
277 }
278 else if (primary_token == "treetype") {
279 QwMessage << "Tree Type read, ignoring." << QwLog::endl;
280 }
281 else {
282 QwError << "LoadChannelMap in QwCorrelator read invalid primary_token " << primary_token << QwLog::endl;
283 }
284 }
285
286 return 0;
287}
#define QwError
Predefined log drain for errors.
Definition QwLog.h:39
std::pair< EQwHandleType, std::string > ParseHandledVariable(const std::string &variable)

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:

◆ OpenAliasFile()

void QwCorrelator::OpenAliasFile ( const std::string & prefix)
protected

Definition at line 661 of file QwCorrelator.cc.

662{
663 // Turn "." into "_" in run_label (no "." allowed in function name, and must
664 // agree with the filename)
665 std::string label(run_label);
666 std::replace(label.begin(), label.end(), '.', '_');
667 // Create old-style regalias script
668 std::string name = prefix + fAliasOutputFileBase + label + fAliasOutputFileSuff;
669 std::string path = fAliasOutputPath + "/";
670 std::string file = path + name + ".C"; // add extension outside of file suffix
671 fAliasOutputFile.open(file, std::ofstream::out);
672 if (fAliasOutputFile.good()) {
673 fAliasOutputFile << Form("void %s(int i = 0) {", name.c_str()) << std::endl;
674 } else {
675 QwWarning << "QwCorrelator: Could not write to alias output file " << QwLog::endl;
676 }
677}

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:

◆ OpenAlphaFile()

void QwCorrelator::OpenAlphaFile ( const std::string & prefix)
protected

Definition at line 647 of file QwCorrelator.cc.

648{
649 // Create old-style blueR ROOT file
650 std::string name = prefix + fAlphaOutputFileBase + run_label.Data() + fAlphaOutputFileSuff;
651 std::string path = fAlphaOutputPath + "/";
652 std::string file = path + name;
653 fAlphaOutputFile = new TFile(TString(file), "RECREATE", "correlation coefficients");
654 if (! fAlphaOutputFile->IsWritable()) {
655 QwError << "QwCorrelator could not create output file " << file << QwLog::endl;
656 delete fAlphaOutputFile;
658 }
659}

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:

◆ ParseConfigFile()

void QwCorrelator::ParseConfigFile ( QwParameterFile & file)
overridevirtual

Parse configuration file for map file, priority, tree settings.

Reimplemented from VQwDataHandler.

Definition at line 97 of file QwCorrelator.cc.

98{
100 file.PopValue("slope-file-base", fAlphaOutputFileBase);
101 file.PopValue("slope-file-suff", fAlphaOutputFileSuff);
102 file.PopValue("slope-path", fAlphaOutputPath);
103 file.PopValue("alias-file-base", fAliasOutputFileBase);
104 file.PopValue("alias-file-suff", fAliasOutputFileSuff);
105 file.PopValue("alias-path", fAliasOutputPath);
106 file.PopValue("disable-histos", fDisableHistos);
107 file.PopValue("block", fBlock);
108 if (fBlock >= 4)
109 QwWarning << "QwCorrelator: expect 0 <= block <= 3 but block = "
110 << fBlock << QwLog::endl;
111}
Bool_t PopValue(const std::string keyname, T &retvalue)
virtual void ParseConfigFile(QwParameterFile &file)

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:

◆ ProcessData()

void QwCorrelator::ProcessData ( )
overridevirtual

Copy dependent variables to output variables (default processing).

Reimplemented from VQwDataHandler.

Definition at line 113 of file QwCorrelator.cc.

114{
115 // Add to total count
116 fTotalCount++;
117
118 // Start as good event
119 fGoodEvent = 0;
120
121 // Event error flag
123 if ( GetEventcutErrorFlag() != 0) fErrCounts_EF++;
124 // Dependent variable error codes
125 for (size_t i = 0; i < fDependentVar.size(); ++i) {
126 fGoodEvent |= fDependentVar.at(i)->GetErrorCode();
127 fDependentValues.at(i) = (fDependentVar[i]->GetValue(fBlock+1));
128 if (fDependentVar.at(i)->GetErrorCode() !=0) (fErrCounts_DV.at(i))++;
129 }
130 // Independent variable error codes
131 for (size_t i = 0; i < fIndependentVar.size(); ++i) {
132 fGoodEvent |= fIndependentVar.at(i)->GetErrorCode();
133 fIndependentValues.at(i) = (fIndependentVar[i]->GetValue(fBlock+1));
134 if (fIndependentVar.at(i)->GetErrorCode() !=0) (fErrCounts_IV.at(i))++;
135 }
136
137 // If good, process event
138 if (fGoodEvent == 0) {
139 fGoodCount++;
140
141 TVectorD P(fIndependentValues.size(), fIndependentValues.data());
142 TVectorD Y(fDependentValues.size(), fDependentValues.data());
143 linReg += std::make_pair(P, Y);
144 }
145}
UInt_t GetEventcutErrorFlag() const

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:

◆ ProcessOptions()

void QwCorrelator::ProcessOptions ( QwOptions & options)

Definition at line 93 of file QwCorrelator.cc.

94{
95}

◆ WriteAliasFile()

void QwCorrelator::WriteAliasFile ( )
protected

Definition at line 699 of file QwCorrelator.cc.

700{
701 // Ensure output file is open
702 if (fAliasOutputFile.bad()) {
703 QwWarning << "QwCorrelator: Could not write to alias output file " << QwLog::endl;
704 return;
705 }
706
707 fAliasOutputFile << " if (i == " << fCycleCounter << ") {" << std::endl;
708 fAliasOutputFile << Form(" TTree* tree = (TTree*) gDirectory->Get(\"mul\");") << std::endl;
709 for (int i = 0; i < nY; i++) {
710 fAliasOutputFile << Form(" tree->SetAlias(\"reg_%s\",",fDependentFull[i].c_str()) << std::endl;
711 fAliasOutputFile << Form(" \"%s",fDependentFull[i].c_str());
712 for (int j = 0; j < nP; j++) {
713 fAliasOutputFile << Form("%+.4e*%s", -linReg.Axy(j,i), fIndependentFull[j].c_str());
714 }
715 fAliasOutputFile << "\");" << std::endl;
716 }
717 fAliasOutputFile << " }" << std::endl;
718
719 // Increment call counter
721}

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:

◆ WriteAlphaFile()

void QwCorrelator::WriteAlphaFile ( )
protected

Definition at line 581 of file QwCorrelator.cc.

582{
583 // Ensure in output file
585
586 // Write objects
587 linReg.Axy.Write("slopes");
588 linReg.dAxy.Write("sigSlopes");
589
590 linReg.mRPP.Write("IV_IV_correlation");
591 linReg.mRPY.Write("IV_DV_correlation");
592 linReg.mRYY.Write("DV_DV_correlation");
593 linReg.mRYYp.Write("DV_DV_correlation_prime");
594
595 linReg.mMP.Write("IV_mean");
596 linReg.mMY.Write("DV_mean");
597 linReg.mMYp.Write("DV_mean_prime");
598
599 // number of events
600 TMatrixD Mstat(1,1);
601 Mstat(0,0)=linReg.getUsedEve();
602 Mstat.Write("MyStat");
603
604 //... IVs
605 TH1D hiv("IVname","names of IVs",nP,-0.5,nP-0.5);
606 for (int i=0;i<nP;i++) hiv.Fill(fIndependentFull[i].c_str(),i);
607 hiv.Write();
608
609 //... DVs
610 TH1D hdv("DVname","names of IVs",nY,-0.5,nY-0.5);
611 for (int i=0;i<nY;i++) hdv.Fill(fDependentFull[i].c_str(),i);
612 hdv.Write();
613
614 // sigmas
615 linReg.mSP.Write("IV_sigma");
616 linReg.mSY.Write("DV_sigma");
617 linReg.mSYp.Write("DV_sigma_prime");
618
619 // raw covariances
620 linReg.mVPP.Write("IV_IV_rawVariance");
621 linReg.mVPY.Write("IV_DV_rawVariance");
622 linReg.mVYY.Write("DV_DV_rawVariance");
623 linReg.mVYYp.Write("DV_DV_rawVariance_prime");
624 TVectorD mVY2(TMatrixDDiag(linReg.mVYY));
625 mVY2.Write("DV_rawVariance");
626 TVectorD mVP2(TMatrixDDiag(linReg.mVPP));
627 mVP2.Write("IV_rawVariance");
628 TVectorD mVY2prime(TMatrixDDiag(linReg.mVYYp));
629 mVY2prime.Write("DV_rawVariance_prime");
630
631 // normalized covariances
632 linReg.mSPP.Write("IV_IV_normVariance");
633 linReg.mSPY.Write("IV_DV_normVariance");
634 linReg.mSYY.Write("DV_DV_normVariance");
635 linReg.mSYYp.Write("DV_DV_normVariance_prime");
636 TVectorD sigY2(TMatrixDDiag(linReg.mSYY));
637 sigY2.Write("DV_normVariance");
638 TVectorD sigX2(TMatrixDDiag(linReg.mSPP));
639 sigX2.Write("IV_normVariance");
640 TVectorD sigY2prime(TMatrixDDiag(linReg.mSYYp));
641 sigY2prime.Write("DV_normVariance_prime");
642
643 linReg.Axy.Write("A_xy");
644 linReg.Ayx.Write("A_yx");
645}

References fAlphaOutputFile, VQwDataHandler::fDependentFull, fIndependentFull, linReg, nP, and nY.

Referenced by CalcCorrelations().

+ Here is the caller graph for this function:

Field Documentation

◆ fAliasOutputFile

std::ofstream QwCorrelator::fAliasOutputFile
protected

Definition at line 107 of file QwCorrelator.h.

Referenced by CloseAliasFile(), OpenAliasFile(), and WriteAliasFile().

◆ fAliasOutputFileBase

std::string QwCorrelator::fAliasOutputFileBase
protected

Definition at line 104 of file QwCorrelator.h.

Referenced by OpenAliasFile(), ParseConfigFile(), QwCorrelator(), and QwCorrelator().

◆ fAliasOutputFileSuff

std::string QwCorrelator::fAliasOutputFileSuff
protected

Definition at line 105 of file QwCorrelator.h.

Referenced by OpenAliasFile(), ParseConfigFile(), QwCorrelator(), and QwCorrelator().

◆ fAliasOutputPath

std::string QwCorrelator::fAliasOutputPath
protected

Definition at line 106 of file QwCorrelator.h.

Referenced by OpenAliasFile(), ParseConfigFile(), QwCorrelator(), and QwCorrelator().

◆ fAlphaOutputFile

TFile* QwCorrelator::fAlphaOutputFile
protected

◆ fAlphaOutputFileBase

std::string QwCorrelator::fAlphaOutputFileBase
protected

Definition at line 94 of file QwCorrelator.h.

Referenced by OpenAlphaFile(), ParseConfigFile(), QwCorrelator(), and QwCorrelator().

◆ fAlphaOutputFileSuff

std::string QwCorrelator::fAlphaOutputFileSuff
protected

Definition at line 95 of file QwCorrelator.h.

Referenced by OpenAlphaFile(), ParseConfigFile(), QwCorrelator(), and QwCorrelator().

◆ fAlphaOutputPath

std::string QwCorrelator::fAlphaOutputPath
protected

Definition at line 96 of file QwCorrelator.h.

Referenced by OpenAlphaFile(), ParseConfigFile(), QwCorrelator(), and QwCorrelator().

◆ fBlock

Int_t QwCorrelator::fBlock
protected

Definition at line 81 of file QwCorrelator.h.

Referenced by ParseConfigFile(), ProcessData(), QwCorrelator(), and QwCorrelator().

◆ fCycleCounter

Int_t QwCorrelator::fCycleCounter
private

Definition at line 135 of file QwCorrelator.h.

Referenced by QwCorrelator(), QwCorrelator(), and WriteAliasFile().

◆ fDisableHistos

bool QwCorrelator::fDisableHistos
protected

◆ fErrCounts_DV

std::vector<int> QwCorrelator::fErrCounts_DV
protected

Definition at line 117 of file QwCorrelator.h.

Referenced by CalcCorrelations(), ClearEventData(), ConnectChannels(), and ProcessData().

◆ fErrCounts_EF

int QwCorrelator::fErrCounts_EF
protected

Definition at line 115 of file QwCorrelator.h.

Referenced by CalcCorrelations(), ClearEventData(), and ProcessData().

◆ fErrCounts_IV

std::vector<int> QwCorrelator::fErrCounts_IV
protected

Definition at line 116 of file QwCorrelator.h.

Referenced by CalcCorrelations(), ClearEventData(), ConnectChannels(), and ProcessData().

◆ fGoodCount

int QwCorrelator::fGoodCount
protected

◆ fGoodEvent

unsigned int QwCorrelator::fGoodEvent
protected

Definition at line 119 of file QwCorrelator.h.

Referenced by ClearEventData(), FillHistograms(), and ProcessData().

◆ fH1dv

std::vector<TH1D> QwCorrelator::fH1dv
private

Definition at line 129 of file QwCorrelator.h.

Referenced by ConstructHistograms(), and FillHistograms().

◆ fH1iv

std::vector<TH1D> QwCorrelator::fH1iv
private

Definition at line 128 of file QwCorrelator.h.

Referenced by ConstructHistograms(), and FillHistograms().

◆ fH2dv

std::vector<std::vector<TH2D> > QwCorrelator::fH2dv
private

Definition at line 131 of file QwCorrelator.h.

Referenced by ConstructHistograms(), and FillHistograms().

◆ fH2iv

std::vector<std::vector<TH2D> > QwCorrelator::fH2iv
private

Definition at line 130 of file QwCorrelator.h.

Referenced by ConstructHistograms(), and FillHistograms().

◆ fHnames

std::vector<TH1D> QwCorrelator::fHnames
private

Definition at line 127 of file QwCorrelator.h.

Referenced by ConstructHistograms().

◆ fIndependentFull

std::vector< std::string > QwCorrelator::fIndependentFull
protected

Definition at line 85 of file QwCorrelator.h.

Referenced by ConnectChannels(), LoadChannelMap(), WriteAliasFile(), and WriteAlphaFile().

◆ fIndependentName

std::vector< std::string > QwCorrelator::fIndependentName
protected

Definition at line 89 of file QwCorrelator.h.

Referenced by ConnectChannels(), ConstructHistograms(), and LoadChannelMap().

◆ fIndependentType

std::vector< EQwHandleType > QwCorrelator::fIndependentType
protected

Definition at line 88 of file QwCorrelator.h.

Referenced by ConnectChannels(), and LoadChannelMap().

◆ fIndependentValues

std::vector< Double_t > QwCorrelator::fIndependentValues
protected

Definition at line 92 of file QwCorrelator.h.

Referenced by ConnectChannels(), FillHistograms(), and ProcessData().

◆ fIndependentVar

std::vector< const VQwHardwareChannel* > QwCorrelator::fIndependentVar
protected

Definition at line 91 of file QwCorrelator.h.

Referenced by CalcCorrelations(), ConnectChannels(), and ProcessData().

◆ fNameNoSpaces

TString QwCorrelator::fNameNoSpaces
private

Definition at line 123 of file QwCorrelator.h.

Referenced by QwCorrelator().

◆ fPrintCorrelations

bool QwCorrelator::fPrintCorrelations = false
staticprivate

Definition at line 42 of file QwCorrelator.h.

Referenced by CalcCorrelations(), DefineOptions(), and REGISTER_DATA_HANDLER_FACTORY().

◆ fTotalCount

int QwCorrelator::fTotalCount
protected

◆ fTree

TTree* QwCorrelator::fTree
protected

◆ linReg

◆ nP

◆ nY


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