JAPAn
Just Another Parity Analyzer
Loading...
Searching...
No Matches
QwCorrelatorNew.cc
Go to the documentation of this file.
1#include "QwCorrelatorNew.h"
2
3// System includes
4#include <utility>
5
6// ROOT headers
7#include "TFile.h"
8#include "TH2D.h"
9
10// Qweak headers
11#include "QwOptions.h"
12#include "QwHelicityPattern.h"
13#include "VQwDataElement.h"
14#include "QwVQWK_Channel.h"
15#include "QwParameterFile.h"
16#include "QwRootFile.h"
17
18// Static members
20
22: VQwDataHandler(name),
23 fBlock(-1),
24 fDisableHistos(true),
25 fAlphaOutputFileBase("blueR"),
26 fAlphaOutputFileSuff("new.slope.root"),
29 fTree(0),
30 fAliasOutputFileBase("regalias_"),
33 fNameNoSpaces(name),
34 nP(0),nY(0),
36{
37 fNameNoSpaces.ReplaceAll(" ","_");
38 // Set default tree name and descriptions (in VQwDataHandler)
39 fTreeName = "lrb";
40 fTreeComment = "Correlations";
41 // Parsing separator
42 ParseSeparator = "_";
43
44 // Clear all data
46}
47
49{
50 // Close alpha and alias file
53}
54
56{
57 options.AddOptions()("print-correlations",
58 po::value<bool>(&fPrintCorrelations)->default_bool_value(false),
59 "print correlations after determining them");
60}
61
65
67{
69 file.PopValue("slope-file-base", fAlphaOutputFileBase);
70 file.PopValue("slope-file-suff", fAlphaOutputFileSuff);
71 file.PopValue("slope-path", fAlphaOutputPath);
72 file.PopValue("alias-file-base", fAliasOutputFileBase);
73 file.PopValue("alias-file-suff", fAliasOutputFileSuff);
74 file.PopValue("alias-path", fAliasOutputPath);
75 file.PopValue("disable-histos", fDisableHistos);
76 file.PopValue("block", fBlock);
77 if (fBlock >= 4)
78 QwWarning << "QwCorrelatorNew: expect 0 <= block <= 3 but block = "
79 << fBlock << QwLog::endl;
80}
81
83{
84 // Add to total count
86
87 // Start as good event
88 fGoodEvent = 0;
89
90 // Event error flag
93 // Dependent variable error codes
94 for (size_t i = 0; i < fDependentVar.size(); ++i) {
95 fGoodEvent |= fDependentVar.at(i)->GetErrorCode();
96 fDependentValues.at(i) = (fDependentVar[i]->GetValue(fBlock+1));
97 if (fDependentVar.at(i)->GetErrorCode() !=0) (fErrCounts_DV.at(i))++;
98 }
99 // Independent variable error codes
100 for (size_t i = 0; i < fIndependentVar.size(); ++i) {
101 fGoodEvent |= fIndependentVar.at(i)->GetErrorCode();
102 fIndependentValues.at(i) = (fIndependentVar[i]->GetValue(fBlock+1));
103 if (fIndependentVar.at(i)->GetErrorCode() !=0) (fErrCounts_IV.at(i))++;
104 }
105
106 // If good, process event
107 if (fGoodEvent == 0) {
108 fGoodCount++;
109
110 TVectorD P(fIndependentValues.size(), fIndependentValues.data());
111 TVectorD Y(fDependentValues.size(), fDependentValues.data());
112 operator+= (std::make_pair(P, Y));
113 }
114}
115
117{
118 // Clear error counters
119 fErrCounts_EF = 0;
120 std::fill(fErrCounts_DV.begin(), fErrCounts_DV.end(), 0);
121 std::fill(fErrCounts_IV.begin(), fErrCounts_IV.end(), 0);
122
123 // Clear event counts
124 fTotalCount = 0;
125 fGoodCount = 0;
126 fGoodEvent = -1;
127
128 // Clear regression
129 this->clear();
130}
131
132void QwCorrelatorNew::AccumulateRunningSum(VQwDataHandler &value, Int_t count, Int_t ErrorMask)
133{
134 QwCorrelatorNew* correlator = dynamic_cast<QwCorrelatorNew*>(&value);
135 if (correlator) {
136 operator+=(*correlator);
137 } else {
138 QwWarning << "QwCorrelatorNew::AccumulateRunningSum "
139 << "can only accept other QwCorrelatorNew objects."
140 << QwLog::endl;
141 }
142}
143
145{
146 // Check if any channels are active
147 if (nP == 0 || nY == 0) {
148 return;
149 }
150
151 QwMessage << "QwCorrelatorNew::CalcCorrelations(): name=" << GetName() << QwLog::endl;
152
153 // Print entry summary
154 QwVerbose << "QwCorrelatorNew: "
155 << "total entries: " << fTotalCount << ", "
156 << "good entries: " << fGoodCount
157 << QwLog::endl;
158 // and warn if zero
159 if (fTotalCount > 100 && fGoodCount == 0) {
160 QwWarning << "QwCorrelatorNew: "
161 << "< 1% good events, "
162 << fGoodCount << " of " << fTotalCount
163 << QwLog::endl;
164 }
165
166 // Event error flag
167 if (fErrCounts_EF > 0) {
168 QwVerbose << " Entries failed due to error flag: "
170 }
171 // Dependent variable error codes
172 for (size_t i = 0; i < fDependentVar.size(); ++i) {
173 if (fErrCounts_DV.at(i) > 0) {
174 QwVerbose << " Entries failed due to " << fDependentVar.at(i)->GetElementName()
175 << ": " << fErrCounts_DV.at(i) << QwLog::endl;
176 }
177 }
178 // Independent variable error codes
179 for (size_t i = 0; i < fIndependentVar.size(); ++i) {
180 if (fErrCounts_IV.at(i) > 0) {
181 QwVerbose << " Entries failed due to " << fIndependentVar.at(i)->GetElementName()
182 << ": " << fErrCounts_IV.at(i) << QwLog::endl;
183 }
184 }
185
186 if (! this->failed()) {
187
188 if (fPrintCorrelations) {
189 this->printSummaryP();
190 this->printSummaryY();
191 }
192
193 this->solve();
194
195 if (fPrintCorrelations) {
196 this->printSummaryAlphas();
199 }
200 }
201
202 // Fill tree
203 if (fTree) fTree->Fill();
204 else QwWarning << "No tree" << QwLog::endl;
205
206 // Write alpha and alias file
209}
210
211
212/** Load the channel map
213 *
214 * @param mapfile Filename of map file
215 * @return Zero when success
216 */
217Int_t QwCorrelatorNew::LoadChannelMap(const std::string& mapfile)
218{
219 // Open the file
220 QwParameterFile map(mapfile);
221
222 // Read the sections of dependent variables
223 std::pair<EQwHandleType,std::string> type_name;
224
225 // Add independent variables and sensitivities
226 while (map.ReadNextLine()) {
227 // Throw away comments, whitespace, empty lines
228 map.TrimComment();
229 map.TrimWhitespace();
230 if (map.LineIsEmpty()) continue;
231 // Get first token: label (dv or iv), second token is the name like "asym_blah"
232 string primary_token = map.GetNextToken(" ");
233 string current_token = map.GetNextToken(" ");
234 // Parse current token into independent variable type and name
235 type_name = ParseHandledVariable(current_token);
236
237 if (primary_token == "iv") {
238 fIndependentType.push_back(type_name.first);
239 fIndependentName.push_back(type_name.second);
240 fIndependentFull.push_back(current_token);
241 }
242 else if (primary_token == "dv") {
243 fDependentType.push_back(type_name.first);
244 fDependentName.push_back(type_name.second);
245 fDependentFull.push_back(current_token);
246 }
247 else if (primary_token == "treetype") {
248 QwMessage << "Tree Type read, ignoring." << QwLog::endl;
249 }
250 else {
251 QwError << "LoadChannelMap in QwCorrelatorNew read invalid primary_token " << primary_token << QwLog::endl;
252 }
253 }
254
255 return 0;
256}
257
258
260{
262
263 // Return if correlator is not enabled
264
265 /// Fill vector of pointers to the relevant data elements
266 for (size_t dv = 0; dv < fDependentName.size(); dv++) {
267 // Get the dependent variables
268
269 const VQwHardwareChannel* dv_ptr = 0;
270
271 if (fDependentType.at(dv)==kHandleTypeMps){
272 // Quietly ignore the MPS type when we're connecting the asym & diff
273 continue;
274 }else{
275 dv_ptr = this->RequestExternalPointer(fDependentFull.at(dv));
276 if (dv_ptr==NULL){
277 switch (fDependentType.at(dv)) {
278 case kHandleTypeAsym:
279 dv_ptr = asym.RequestExternalPointer(fDependentName.at(dv));
280 break;
281 case kHandleTypeDiff:
282 dv_ptr = diff.RequestExternalPointer(fDependentName.at(dv));
283 break;
284 default:
285 QwWarning << "QwCorrelatorNew::ConnectChannels(QwSubsystemArrayParity& asym, QwSubsystemArrayParity& diff): "
286 << "Dependent variable, " << fDependentName.at(dv)
287 << ", for asym/diff correlator does not have proper type, type=="
288 << fDependentType.at(dv) << "." << QwLog::endl;
289 break;
290 }
291 }
292 if (dv_ptr == NULL){
293 QwWarning << "QwCombiner::ConnectChannels(QwSubsystemArrayParity& asym, QwSubsystemArrayParity& diff): Dependent variable, "
294 << fDependentName.at(dv)
295 << ", was not found (fullname=="
296 << fDependentFull.at(dv)<< ")." << QwLog::endl;
297 continue;
298 }
299 }
300
301 // pair creation
302 if(dv_ptr != NULL){
303 // fDependentVarType.push_back(fDependentType.at(dv));
304 fDependentVar.push_back(dv_ptr);
305 }
306
307 }
308
309 // Add independent variables
310 for (size_t iv = 0; iv < fIndependentName.size(); iv++) {
311 // Get the independent variables
312 const VQwHardwareChannel* iv_ptr = 0;
313 iv_ptr = this->RequestExternalPointer(fIndependentFull.at(iv));
314 if (iv_ptr==NULL){
315 switch (fIndependentType.at(iv)) {
316 case kHandleTypeAsym:
317 iv_ptr = asym.RequestExternalPointer(fIndependentName.at(iv));
318 break;
319 case kHandleTypeDiff:
320 iv_ptr = diff.RequestExternalPointer(fIndependentName.at(iv));
321 break;
322 default:
323 QwWarning << "Independent variable for correlator has unknown type."
324 << QwLog::endl;
325 break;
326 }
327 }
328 if (iv_ptr) {
329 fIndependentVar.push_back(iv_ptr);
330 } else {
331 QwWarning << "Independent variable " << fIndependentName.at(iv) << " for correlator could not be found."
332 << QwLog::endl;
333 }
334
335 }
336 fIndependentValues.resize(fIndependentVar.size());
337 fDependentValues.resize(fDependentVar.size());
338
339 nP = fIndependentName.size();
340 nY = fDependentName.size();
341
342 this->setDims(nP, nY);
343 this->init();
344
345 fErrCounts_IV.resize(fIndependentVar.size(),0);
346 fErrCounts_DV.resize(fDependentVar.size(),0);
347
348 return 0;
349}
350
351
353 QwRootFile *treerootfile,
354 const std::string& treeprefix,
355 const std::string& branchprefix)
356{
357 // Check if any channels are active
358 if (nP == 0 || nY == 0) {
359 return;
360 }
361
362 // Check if tree name is specified
363 if (fTreeName == "") {
364 QwWarning << "QwCorrelatorNew: no tree name specified, use 'tree-name = value'" << QwLog::endl;
365 return;
366 }
367
368 // Create alpha and alias files before trying to create the tree
369 OpenAlphaFile(treeprefix);
370 OpenAliasFile(treeprefix);
371
372 // Construct tree name and create new tree
373 const std::string name = treeprefix + fTreeName;
374 treerootfile->NewTree(name, fTreeComment.c_str());
375 fTree = treerootfile->GetTree(name);
376 // Check to make sure the tree was created successfully
377 if (fTree == NULL) return;
378
379 // Set up branches
380 fTree->Branch(TString(branchprefix + "total_count"), &fTotalCount);
381 fTree->Branch(TString(branchprefix + "good_count"), &fGoodCount);
382
383 fTree->Branch(TString(branchprefix + "n"), &(this->fGoodEventNumber));
384 fTree->Branch(TString(branchprefix + "ErrorFlag"), &(this->fErrorFlag));
385
386 auto bn = [&](const TString& n) {
387 return TString(branchprefix + n);
388 };
389 auto pm = [](TMatrixD& m) {
390 return m.GetMatrixArray();
391 };
392 auto lm = [](TMatrixD& m, const TString& n) {
393 return Form("%s[%d][%d]/D", n.Data(), m.GetNrows(), m.GetNcols());
394 };
395 auto branchm = [&](TTree* tree, TMatrixD& m, const TString& n) {
396 tree->Branch(bn(n),pm(m),lm(m,n));
397 };
398 auto pv = [](TVectorD& v) {
399 return v.GetMatrixArray();
400 };
401 auto lv = [](TVectorD& v, const TString& n) {
402 return Form("%s[%d]/D", n.Data(), v.GetNrows());
403 };
404 auto branchv = [&](TTree* tree, TVectorD& v, const TString& n) {
405 tree->Branch(bn(n),pv(v),lv(v,n));
406 };
407
408 branchm(fTree,this->Axy, "A");
409 branchm(fTree,this->dAxy, "dA");
410
411 branchm(fTree,this->mVPP, "VPP");
412 branchm(fTree,this->mVPY, "VPY");
413 branchm(fTree,this->mVYP, "VYP");
414 branchm(fTree,this->mVYY, "VYY");
415 branchm(fTree,this->mVYYp, "VYYp");
416
417 branchm(fTree,this->mSPP, "SPP");
418 branchm(fTree,this->mSPY, "SPY");
419 branchm(fTree,this->mSYP, "SYP");
420 branchm(fTree,this->mSYY, "SYY");
421 branchm(fTree,this->mSYYp, "SYYp");
422
423 branchm(fTree,this->mRPP, "RPP");
424 branchm(fTree,this->mRPY, "RPY");
425 branchm(fTree,this->mRYP, "RYP");
426 branchm(fTree,this->mRYY, "RYY");
427 branchm(fTree,this->mRYYp, "RYYp");
428
429 branchv(fTree,this->mMP, "MP"); // Parameter mean
430 branchv(fTree,this->mMY, "MY"); // Uncorrected mean
431 branchv(fTree,this->mMYp, "MYp"); // Corrected mean
432
433 branchv(fTree,this->mSP, "dMP"); // Parameter mean error
434 branchv(fTree,this->mSY, "dMY"); // Uncorrected mean error
435 branchv(fTree,this->mSYp, "dMYp"); // Corrected mean error
436
437}
438
439/// \brief Construct the histograms in a folder with a prefix
440void QwCorrelatorNew::ConstructHistograms(TDirectory *folder, TString &prefix)
441{
442 // Skip if disabled
443 if (fDisableHistos) return;
444
445 // Check if any channels are active
446 if (nP == 0 || nY == 0) {
447 return;
448 }
449
450 // Go to directory
451 TString name(fName);
452 name.ReplaceAll(" ","_");
453 folder->mkdir(name)->cd();
454
455 //..... 1D, iv
456 fH1iv.resize(nP);
457 for (int i = 0; i < nP; i++) {
458 fH1iv[i] = TH1D(
459 Form("P%d",i),
460 Form("iv P%d=%s, pass=%s ;iv=%s (ppm)",i,fIndependentName[i].c_str(),fName.Data(),fIndependentName[i].c_str()),
461 128,0.,0.);
462 fH1iv[i].GetXaxis()->SetNdivisions(4);
463 }
464
465 //..... 2D, iv correlations
466 Double_t x1 = 0;
467 fH2iv.resize(nP);
468 for (int i = 0; i < nP; i++) {
469 fH2iv[i].resize(nP);
470 for (int j = i+1; j < nP; j++) { // not all are used
471 fH2iv[i][j] = TH2D(
472 Form("P%d_P%d",i,j),
473 Form("iv correlation P%d_P%d, pass=%s ;P%d=%s (ppm);P%d=%s (ppm) ",
474 i,j,fName.Data(),i,fIndependentName[i].c_str(),j,fIndependentName[j].c_str()),
475 64,-x1,x1,
476 64,-x1,x1);
477 fH2iv[i][j].GetXaxis()->SetTitleColor(kBlue);
478 fH2iv[i][j].GetYaxis()->SetTitleColor(kBlue);
479 fH2iv[i][j].GetXaxis()->SetNdivisions(4);
480 fH2iv[i][j].GetYaxis()->SetNdivisions(4);
481 }
482 }
483
484 //..... 1D, dv
485 fH1dv.resize(nY);
486 for (int i = 0; i < nY; i++) {
487 fH1dv[i] = TH1D(
488 Form("Y%d",i),
489 Form("dv Y%d=%s, pass=%s ;dv=%s (ppm)",i,fDependentName[i].c_str(),fName.Data(),fDependentName[i].c_str()),
490 128,0.,0.);
491 fH1dv[i].GetXaxis()->SetNdivisions(4);
492 }
493
494 //..... 2D, dv-iv correlations
495 Double_t y1 = 0;
496 fH2dv.resize(nP);
497 for (int i = 0; i < nP; i++) {
498 fH2dv[i].resize(nY);
499 for (int j = 0; j < nY; j++) {
500 fH2dv[i][j] = TH2D(
501 Form("P%d_Y%d",i,j),
502 Form("iv-dv correlation P%d_Y%d, pass=%s ;P%d=%s (ppm);Y%d=%s (ppm) ",
503 i,j,fName.Data(),i,fIndependentName[i].c_str(),j,fDependentName[j].c_str()),
504 64,-x1,x1,
505 64,-y1,y1);
506 fH2dv[i][j].GetXaxis()->SetTitleColor(kBlue);
507 fH2dv[i][j].GetYaxis()->SetTitleColor(kBlue);
508 fH2dv[i][j].GetXaxis()->SetNdivisions(4);
509 fH2dv[i][j].GetYaxis()->SetNdivisions(4);
510 }
511 }
512
513 // store list of names to be archived
514 fHnames.resize(2);
515 fHnames[0] = TH1D("NamesIV",Form("IV name list nIV=%d",nP),nP,0,1);
516 for (int i = 0; i < nP; i++)
517 fHnames[0].Fill(fIndependentName[i].c_str(),1.*i);
518 fHnames[1] = TH1D("NamesDV",Form("DV name list nIV=%d",nY),nY,0,1);
519 for (int i = 0; i < nY; i++)
520 fHnames[1].Fill(fDependentName[i].c_str(),i*1.);
521}
522
523/// \brief Fill the histograms
525{
526 // Skip if disabled
527 if (fDisableHistos) return;
528
529 // Check if any channels are active
530 if (nP == 0 || nY == 0) {
531 return;
532 }
533
534 // Skip if bad event
535 if (fGoodEvent != 0) return;
536
537 // Fill histograms
538 for (size_t i = 0; i < fIndependentValues.size(); i++) {
539 fH1iv[i].Fill(fIndependentValues[i]);
540 for (size_t j = i+1; j < fIndependentValues.size(); j++)
542 }
543 for (size_t j = 0; j < fDependentValues.size(); j++) {
544 fH1dv[j].Fill(fDependentValues[j]);
545 for (size_t i = 0; i < fIndependentValues.size(); i++)
546 fH2dv[i][j].Fill(fIndependentValues[i], fDependentValues[j]);
547 }
548}
549
551{
552 // Ensure in output file
554
555 // Write objects
556 this->Axy.Write("slopes");
557 this->dAxy.Write("sigSlopes");
558
559 this->mRPP.Write("IV_IV_correlation");
560 this->mRPY.Write("IV_DV_correlation");
561 this->mRYY.Write("DV_DV_correlation");
562 this->mRYYp.Write("DV_DV_correlation_prime");
563
564 this->mMP.Write("IV_mean");
565 this->mMY.Write("DV_mean");
566 this->mMYp.Write("DV_mean_prime");
567
568 // number of events
569 TMatrixD Mstat(1,1);
570 Mstat(0,0)=this->getUsedEve();
571 Mstat.Write("MyStat");
572
573 //... IVs
574 TH1D hiv("IVname","names of IVs",nP,-0.5,nP-0.5);
575 for (int i=0;i<nP;i++) hiv.Fill(fIndependentFull[i].c_str(),i);
576 hiv.Write();
577
578 //... DVs
579 TH1D hdv("DVname","names of IVs",nY,-0.5,nY-0.5);
580 for (int i=0;i<nY;i++) hdv.Fill(fDependentFull[i].c_str(),i);
581 hdv.Write();
582
583 // sigmas
584 this->mSP.Write("IV_sigma");
585 this->mSY.Write("DV_sigma");
586 this->mSYp.Write("DV_sigma_prime");
587
588 // raw covariances
589 this->mVPP.Write("IV_IV_rawVariance");
590 this->mVPY.Write("IV_DV_rawVariance");
591 this->mVYY.Write("DV_DV_rawVariance");
592 this->mVYYp.Write("DV_DV_rawVariance_prime");
593 TVectorD mVY2(TMatrixDDiag(this->mVYY));
594 mVY2.Write("DV_rawVariance");
595 TVectorD mVP2(TMatrixDDiag(this->mVPP));
596 mVP2.Write("IV_rawVariance");
597 TVectorD mVY2prime(TMatrixDDiag(this->mVYYp));
598 mVY2prime.Write("DV_rawVariance_prime");
599
600 // normalized covariances
601 this->mSPP.Write("IV_IV_normVariance");
602 this->mSPY.Write("IV_DV_normVariance");
603 this->mSYY.Write("DV_DV_normVariance");
604 this->mSYYp.Write("DV_DV_normVariance_prime");
605 TVectorD sigY2(TMatrixDDiag(this->mSYY));
606 sigY2.Write("DV_normVariance");
607 TVectorD sigX2(TMatrixDDiag(this->mSPP));
608 sigX2.Write("IV_normVariance");
609 TVectorD sigY2prime(TMatrixDDiag(this->mSYYp));
610 sigY2prime.Write("DV_normVariance_prime");
611
612 this->Axy.Write("A_xy");
613 this->Ayx.Write("A_yx");
614}
615
616void QwCorrelatorNew::OpenAlphaFile(const std::string& prefix)
617{
618 // Create old-style blueR ROOT file
619 std::string name = prefix + fAlphaOutputFileBase + run_label.Data() + fAlphaOutputFileSuff;
620 std::string path = fAlphaOutputPath + "/";
621 std::string file = path + name;
622 fAlphaOutputFile = new TFile(TString(file), "RECREATE", "correlation coefficients");
623 if (! fAlphaOutputFile->IsWritable()) {
624 QwError << "QwCorrelatorNew could not create output file " << file << QwLog::endl;
625 delete fAlphaOutputFile;
627 }
628}
629
630void QwCorrelatorNew::OpenAliasFile(const std::string& prefix)
631{
632 // Turn "." into "_" in run_label (no "." allowed in function name, and must
633 // agree with the filename)
634 std::string label(run_label);
635 std::replace(label.begin(), label.end(), '.', '_');
636 // Create old-style regalias script
637 std::string name = prefix + fAliasOutputFileBase + label + fAliasOutputFileSuff;
638 std::string path = fAliasOutputPath + "/";
639 std::string file = path + name + ".C"; // add extension outside of file suffix
640 fAliasOutputFile.open(file, std::ofstream::out);
641 if (fAliasOutputFile.good()) {
642 fAliasOutputFile << Form("void %s(int i = 0) {", name.c_str()) << std::endl;
643 } else {
644 QwWarning << "QwCorrelatorNew: Could not write to alias output file " << QwLog::endl;
645 }
646}
647
649{
650 // Close slopes output file
651 if (fAlphaOutputFile) {
652 fAlphaOutputFile->Write();
653 fAlphaOutputFile->Close();
654 }
655}
656
658{
659 // Close alias output file
660 if (fAliasOutputFile.good()) {
661 fAliasOutputFile << "}" << std::endl << std::endl;
662 fAliasOutputFile.close();
663 } else {
664 QwWarning << "QwCorrelatorNew: Unable to close alias output file." << QwLog::endl;
665 }
666}
667
669{
670 // Ensure output file is open
671 if (fAliasOutputFile.bad()) {
672 QwWarning << "QwCorrelatorNew: Could not write to alias output file " << QwLog::endl;
673 return;
674 }
675
676 fAliasOutputFile << " if (i == " << fCycleCounter << ") {" << std::endl;
677 fAliasOutputFile << Form(" TTree* tree = (TTree*) gDirectory->Get(\"mul\");") << std::endl;
678 for (int i = 0; i < nY; i++) {
679 fAliasOutputFile << Form(" tree->SetAlias(\"reg_%s\",",fDependentFull[i].c_str()) << std::endl;
680 fAliasOutputFile << Form(" \"%s",fDependentFull[i].c_str());
681 for (int j = 0; j < nP; j++) {
682 fAliasOutputFile << Form("%+.4e*%s", -this->Axy(j,i), fIndependentFull[j].c_str());
683 }
684 fAliasOutputFile << "\");" << std::endl;
685 }
686 fAliasOutputFile << " }" << std::endl;
687
688 // Increment call counter
690}
691
692#include <assert.h>
693#include <math.h>
694
695#include "TString.h"
696
697#include "QwLog.h"
698
699//=================================================
700//=================================================
706
707//=================================================
708//=================================================
710: VQwDataHandler(source),
711 fBlock(source.fBlock),
717 fTree(0),
721 nP(source.nP),nY(source.nY),
723 fErrorFlag(-1),
725{
727
728 QwWarning << "QwCorrelatorNew copy constructor required but untested" << QwLog::endl;
729
730 // Clear all data
732}
733
734//=================================================
735//=================================================
737{
738 mMP.ResizeTo(nP);
739 mMY.ResizeTo(nY);
740 mMYp.ResizeTo(nY);
741
742 mVPP.ResizeTo(nP,nP);
743 mVPY.ResizeTo(nP,nY);
744 mVYP.ResizeTo(nY,nP);
745 mVYY.ResizeTo(nY,nY);
746 mVYYp.ResizeTo(nY,nY);
747 mVP.ResizeTo(nP);
748 mVY.ResizeTo(nY);
749 mVYp.ResizeTo(nY);
750
751 mSPP.ResizeTo(mVPP);
752 mSPY.ResizeTo(mVPY);
753 mSYP.ResizeTo(mVYP);
754 mSYY.ResizeTo(mVYY);
755 mSYYp.ResizeTo(mVYYp);
756
757 Axy.ResizeTo(nP,nY);
758 Ayx.ResizeTo(nY,nP);
759 dAxy.ResizeTo(Axy);
760 dAyx.ResizeTo(Ayx);
761
762 mSP.ResizeTo(nP);
763 mSY.ResizeTo(nY);
764 mSYp.ResizeTo(nY);
765
766 mRPP.ResizeTo(mVPP);
767 mRPY.ResizeTo(mVPY);
768 mRYP.ResizeTo(mVYP);
769 mRYY.ResizeTo(mVYY);
770 mRYYp.ResizeTo(mVYYp);
771
773}
774
776{
777 mMP.Zero();
778 mMY.Zero();
779 mMYp.Zero();
780
781 mVPP.Zero();
782 mVPY.Zero();
783 mVYP.Zero();
784 mVYY.Zero();
785 mVYYp.Zero();
786 mVP.Zero();
787 mVY.Zero();
788 mVYp.Zero();
789
790 mSPP.Zero();
791 mSPY.Zero();
792 mSYP.Zero();
793 mSYY.Zero();
794 mSYYp.Zero();
795
796 Axy.Zero();
797 Ayx.Zero();
798 dAxy.Zero();
799 dAyx.Zero();
800
801 mSP.Zero();
802 mSY.Zero();
803 mSYp.Zero();
804
805 mRPP.Zero();
806 mRPY.Zero();
807 mRYP.Zero();
808 mRYY.Zero();
809 mRYYp.Zero();
810
811 fErrorFlag = -1;
813}
814
815//=================================================
816//=================================================
818{
819 QwMessage << "LinReg dims: nP=" << nP << " nY=" << nY << QwLog::endl;
820
821 QwMessage << "MP:"; mMP.Print();
822 QwMessage << "MY:"; mMY.Print();
823 QwMessage << "VPP:"; mVPP.Print();
824 QwMessage << "VPY:"; mVPY.Print();
825 QwMessage << "VYY:"; mVYY.Print();
826 QwMessage << "VYYprime:"; mVYYp.Print();
827}
828
829
830//==========================================================
831//==========================================================
832QwCorrelatorNew& QwCorrelatorNew::operator+=(const std::pair<TVectorD,TVectorD>& rhs)
833{
834 // Get independent and dependent components
835 const TVectorD& P = rhs.first;
836 const TVectorD& Y = rhs.second;
837
838 // Update number of events
840
841 if (fGoodEventNumber <= 1) {
842 // First event, set covariances to zero and means to first value
843 mVPP.Zero();
844 mVPY.Zero();
845 mVYY.Zero();
846 mMP = P;
847 mMY = Y;
848 } else {
849 // Deviations from mean
850 TVectorD delta_y(Y - mMY);
851 TVectorD delta_p(P - mMP);
852
853 // Update covariances
854 Double_t alpha = (fGoodEventNumber - 1.0) / fGoodEventNumber;
855 mVPP.Rank1Update(delta_p, alpha);
856 mVPY.Rank1Update(delta_p, delta_y, alpha);
857 mVYY.Rank1Update(delta_y, alpha);
858
859 // Update means
860 Double_t beta = 1.0 / fGoodEventNumber;
861 mMP += delta_p * beta;
862 mMY += delta_y * beta;
863 }
864
865 return *this;
866}
867
868
869//==========================================================
870//==========================================================
872{
873 // If set X = A + B, then
874 // Cov[X] = Cov[A] + Cov[B]
875 // + (E[x_A] - E[x_B]) * (E[y_A] - E[y_B]) * n_A * n_B / n_X
876 // Ref: E. Schubert, M. Gertz (9 July 2018).
877 // "Numerically stable parallel computation of (co-)variance".
878 // SSDBM '18 Proceedings of the 30th International Conference
879 // on Scientific and Statistical Database Management.
880 // https://doi.org/10.1145/3221269.3223036
881
883 return *this;
884
885 // Deviations from mean
886 TVectorD delta_y(mMY - rhs.mMY);
887 TVectorD delta_p(mMP - rhs.mMP);
888
889 // Update covariances
890 Double_t alpha = fGoodEventNumber * rhs.fGoodEventNumber
892 mVYY += rhs.mVYY;
893 mVYY.Rank1Update(delta_y, alpha);
894 mVPY += rhs.mVPY;
895 mVPY.Rank1Update(delta_p, delta_y, alpha);
896 mVPP += rhs.mVPP;
897 mVPP.Rank1Update(delta_p, alpha);
898
899 // Update means
900 Double_t beta = rhs.fGoodEventNumber / (fGoodEventNumber + rhs.fGoodEventNumber);
901 mMY += delta_y * beta;
902 mMP += delta_p * beta;
903
905
906 return *this;
907}
908
909
910//==========================================================
911//==========================================================
912Int_t QwCorrelatorNew::getMeanP(const int i, Double_t &mean) const
913{
914 mean=-1e50;
915 if(i<0 || i >= nP ) return -1;
916 if( fGoodEventNumber<1) return -3;
917 mean = mMP(i); return 0;
918}
919
920
921//==========================================================
922//==========================================================
923Int_t QwCorrelatorNew::getMeanY(const int i, Double_t &mean) const
924{
925 mean=-1e50;
926 if(i<0 || i >= nY ) return -1;
927 if( fGoodEventNumber<1) return -3;
928 mean = mMY(i); return 0;
929}
930
931
932//==========================================================
933//==========================================================
934Int_t QwCorrelatorNew::getMeanYprime(const int i, Double_t &mean) const
935{
936 mean=-1e50;
937 if(i<0 || i >= nY ) return -1;
938 if( fGoodEventNumber<1) return -3;
939 mean = mMYp(i); return 0;
940}
941
942
943//==========================================================
944//==========================================================
945Int_t QwCorrelatorNew::getSigmaP(const int i, Double_t &sigma) const
946{
947 sigma=-1e50;
948 if(i<0 || i >= nP ) return -1;
949 if( fGoodEventNumber<2) return -3;
950 sigma=sqrt(mVPP(i,i)/(fGoodEventNumber-1.));
951 return 0;
952}
953
954
955//==========================================================
956//==========================================================
957Int_t QwCorrelatorNew::getSigmaY(const int i, Double_t &sigma) const
958{
959 sigma=-1e50;
960 if(i<0 || i >= nY ) return -1;
961 if( fGoodEventNumber<2) return -3;
962 sigma=sqrt(mVYY(i,i)/(fGoodEventNumber-1.));
963 return 0;
964}
965
966//==========================================================
967//==========================================================
968Int_t QwCorrelatorNew::getSigmaYprime(const int i, Double_t &sigma) const
969{
970 sigma=-1e50;
971 if(i<0 || i >= nY ) return -1;
972 if( fGoodEventNumber<2) return -3;
973 sigma=sqrt(mVYYp(i,i)/(fGoodEventNumber-1.));
974 return 0;
975}
976
977//==========================================================
978//==========================================================
979Int_t QwCorrelatorNew::getCovarianceP( int i, int j, Double_t &covar) const
980{
981 covar=-1e50;
982 if( i>j) { int k=i; i=j; j=k; }//swap i & j
983 //... now we need only upper right triangle
984 if(i<0 || i >= nP ) return -11;
985 if( fGoodEventNumber<2) return -14;
986 covar=mVPP(i,j)/(fGoodEventNumber-1.);
987 return 0;
988}
989
990//==========================================================
991//==========================================================
992Int_t QwCorrelatorNew::getCovariancePY( int ip, int iy, Double_t &covar) const
993{
994 covar=-1e50;
995 //... now we need only upper right triangle
996 if(ip<0 || ip >= nP ) return -11;
997 if(iy<0 || iy >= nY ) return -12;
998 if( fGoodEventNumber<2) return -14;
999 covar=mVPY(ip,iy)/(fGoodEventNumber-1.);
1000 return 0;
1001}
1002
1003//==========================================================
1004//==========================================================
1005Int_t QwCorrelatorNew::getCovarianceY( int i, int j, Double_t &covar) const
1006{
1007 covar=-1e50;
1008 if( i>j) { int k=i; i=j; j=k; }//swap i & j
1009 //... now we need only upper right triangle
1010 if(i<0 || i >= nY ) return -11;
1011 if( fGoodEventNumber<2) return -14;
1012 covar=mVYY(i,j)/(fGoodEventNumber-1.);
1013 return 0;
1014}
1015
1016//==========================================================
1017//==========================================================
1019{
1020 QwMessage << Form("\nLinRegBevPeb::printSummaryP seen good eve=%lld",fGoodEventNumber)<<QwLog::endl;
1021
1022 size_t dim=nP;
1023 if(fGoodEventNumber>2) { // print full matrix
1024 QwMessage << Form("\nname: ");
1025 for (size_t i = 1; i <dim; i++) {
1026 QwMessage << Form("P%d%11s",(int)i," ");
1027 }
1028 QwMessage << Form("\n mean sig(distrib) nSig(mean) correlation-matrix ....\n");
1029 for (size_t i = 0; i <dim; i++) {
1030 double meanI,sigI;
1031 if (getMeanP(i,meanI) < 0) QwWarning << "LRB::getMeanP failed" << QwLog::endl;
1032 if (getSigmaP(i,sigI) < 0) QwWarning << "LRB::getSigmaP failed" << QwLog::endl;
1033 double nSig=-1;
1034 double err=sigI/sqrt(fGoodEventNumber);
1035 if(sigI>0.) nSig=meanI/err;
1036
1037 QwMessage << Form("P%d: %+12.4g %12.3g %.1f ",(int)i,meanI,sigI,nSig);
1038 for (size_t j = 1; j <dim; j++) {
1039 if( j<=i) { QwMessage << Form(" %12s","._._._."); continue;}
1040 double sigJ,cov;
1041 if (getSigmaP(j,sigJ) < 0) QwWarning << "LRB::getSigmaP failed" << QwLog::endl;
1042 if (getCovarianceP(i,j,cov) < 0) QwWarning << "LRB::getCovarianceP failed" << QwLog::endl;
1043 double corel=cov / sigI / sigJ;
1044
1045 QwMessage << Form(" %12.3g",corel);
1046 }
1047 QwMessage << Form("\n");
1048 }
1049 }
1050}
1051
1052
1053//==========================================================
1054//==========================================================
1056{
1057 QwMessage << Form("\nLinRegBevPeb::printSummaryY seen good eve=%lld (CSV-format)",fGoodEventNumber)<<QwLog::endl;
1058 QwMessage << Form(" j, mean, sig(mean), nSig(mean), sig(distribution) \n");
1059
1060 for (int i = 0; i <nY; i++) {
1061 double meanI,sigI;
1062 if (getMeanY(i,meanI) < 0) QwWarning << "LRB::getMeanY failed" << QwLog::endl;
1063 if (getSigmaY(i,sigI) < 0) QwWarning << "LRB::getSigmaY failed" << QwLog::endl;
1064 double err = sigI / sqrt(fGoodEventNumber);
1065 double nSigErr = meanI / err;
1066 QwMessage << Form("Y%02d, %+11.4g, %12.4g, %8.1f, %12.4g "" ",i,meanI,err,nSigErr,sigI)<<QwLog::endl;
1067
1068 }
1069}
1070
1071
1072
1073//==========================================================
1074//==========================================================
1076{
1077 QwMessage << Form("\nLinRegBevPeb::printSummaryAlphas seen good eve=%lld",fGoodEventNumber)<<QwLog::endl;
1078 QwMessage << Form("\n j slope sigma mean/sigma\n");
1079 for (int iy = 0; iy <nY; iy++) {
1080 QwMessage << Form("dv=Y%d: ",iy)<<QwLog::endl;
1081 for (int j = 0; j < nP; j++) {
1082 double val=Axy(j,iy);
1083 double err=dAxy(j,iy);
1084 double nSig=val/err;
1085 char x=' ';
1086 if(fabs(nSig)>3.) x='*';
1087 QwMessage << Form(" slope_%d = %11.3g +/-%11.3g (nSig=%.2f) %c\n",j,val, err,nSig,x);
1088 }
1089 }
1090}
1091
1092
1093//==========================================================
1094//==========================================================
1096{
1097 QwMessage << Form("\nLinRegBevPeb::printSummaryYP seen good eve=%lld",fGoodEventNumber)<<QwLog::endl;
1098
1099 if(fGoodEventNumber<2) { QwMessage<<" too few events, skip"<<QwLog::endl; return;}
1100 QwMessage << Form("\n name: ");
1101 for (int i = 0; i <nP; i++) {
1102 QwMessage << Form(" %10sP%d "," ",i);
1103 }
1104 QwMessage << Form("\n j meanY sigY correlation with Ps ....\n");
1105 for (int iy = 0; iy <nY; iy++) {
1106 double meanI,sigI;
1107 if (getMeanY(iy,meanI) < 0) QwWarning << "LRB::getMeanY failed" << QwLog::endl;
1108 if (getSigmaY(iy,sigI) < 0) QwWarning << "LRB::getSigmaY failed" << QwLog::endl;
1109
1110 QwMessage << Form(" %3d %6sY%d: %+12.4g %12.4g ",iy," ",iy,meanI,sigI);
1111 for (int ip = 0; ip <nP; ip++) {
1112 double sigJ,cov;
1113 if (getSigmaP(ip,sigJ) < 0) QwWarning << "LRB::getSigmaP failed" << QwLog::endl;
1114 if (getCovariancePY(ip,iy,cov) < 0) QwWarning << "LRB::getCovariancePY failed" << QwLog::endl;
1115 double corel = cov / sigI / sigJ;
1116 QwMessage << Form(" %12.3g",corel);
1117 }
1118 QwMessage << Form("\n");
1119 }
1120}
1121
1122
1123//==========================================================
1124//==========================================================
1126{
1127 QwMessage << "Uncorrected Y values:" << QwLog::endl;
1128 QwMessage << " mean sig" << QwLog::endl;
1129 for (int i = 0; i < nY; i++){
1130 QwMessage << "Y" << i << ": " << mMY(i) << " +- " << mSY(i) << QwLog::endl;
1131 }
1133}
1134
1135
1136//==========================================================
1137//==========================================================
1139{
1140 QwMessage << "Corrected Y values:" << QwLog::endl;
1141 QwMessage << " mean sig" << QwLog::endl;
1142 for (int i = 0; i < nY; i++){
1143 QwMessage << "Y" << i << ": " << mMYp(i) << " +- " << mSYp(i) << QwLog::endl;
1144 }
1146}
1147
1148
1149//==========================================================
1150//==========================================================
1152{
1153 // off-diagonal raw covariance
1154 mVYP.Transpose(mVPY);
1155
1156 // diagonal variances
1157 mVP = TMatrixDDiag(mVPP); mVP.Sqrt();
1158 mVY = TMatrixDDiag(mVYY); mVY.Sqrt();
1159
1160 // correlation matrices
1161 mRPP = mVPP; mRPP.NormByColumn(mVP); mRPP.NormByRow(mVP);
1162 mRYY = mVYY; mRYY.NormByColumn(mVY); mRYY.NormByRow(mVY);
1163 mRPY = mVPY; mRPY.NormByColumn(mVP); mRPY.NormByRow(mVY);
1164
1165 /// normalized covariances
1166 mSYY = mVYY * (1.0 / (fGoodEventNumber - 1.));
1167 mSPP = mVPP * (1.0 / (fGoodEventNumber - 1.));
1168 mSPY = mVPY * (1.0 / (fGoodEventNumber - 1.));
1169 mSYP.Transpose(mSPY);
1170
1171 // uncertainties on the means
1172 mSP = TMatrixDDiag(mSPP); mSP.Sqrt();
1173 mSY = TMatrixDDiag(mSYY); mSY.Sqrt();
1174
1175 // Warn if correlation matrix determinant close to zero (heuristic)
1176 if (mRPP.Determinant() < std::pow(10,-(2*nP))) {
1177 QwWarning << "LRB: correlation matrix nearly singular, "
1178 << "determinant = " << mRPP.Determinant()
1179 << " (set includes highly correlated variable pairs)"
1180 << QwLog::endl;
1181 if (fGoodEventNumber > 10*nP) {
1182 QwMessage << fGoodEventNumber << " events" << QwLog::endl;
1183 QwMessage << "Covariance matrix: " << QwLog::endl; mVPP.Print();
1184 QwMessage << "Correlation matrix: " << QwLog::endl; mRPP.Print();
1185 }
1186 QwWarning << "LRB: solving failed (this happens when only few events)."
1187 << QwLog::endl;
1188 return;
1189 }
1190 // slopes
1191 TMatrixD invRPP(TMatrixD::kInverted, mRPP);
1192 Axy = TMatrixD(invRPP, TMatrixD::kMult, mRPY);
1193 Axy.NormByColumn(mSP); // divide
1194 Axy.NormByRow(mSY, ""); // mult
1195 Ayx.Transpose(Axy);
1196
1197 // new means
1198 mMYp = mMY - Ayx * mMP;
1199
1200 // new raw covariance
1201 mVYYp = mVYY + Ayx * mVPP * Axy - (Ayx * mVPY + mVYP * Axy);
1202 // new variances
1203 mVYp = TMatrixDDiag(mVYYp); mVYp.Sqrt();
1204
1205 // new normalized covariance
1206 mSYYp = mSYY + Ayx * mSPP * Axy - (Ayx * mSPY + mSYP * Axy);
1207 // uncertainties on the new means
1208 mSYp = TMatrixDDiag(mSYYp); mSYp.Sqrt();
1209
1210 // new correlation matrix
1211 mRYYp = mVYYp; mRYYp.NormByColumn(mVYp); mRYYp.NormByRow(mVYp);
1212
1213 // slope uncertainties
1214 double norm = 1. / (fGoodEventNumber - nP - 1);
1215 dAxy.Zero();
1216 dAxy.Rank1Update(TMatrixDDiag(invRPP), TMatrixDDiag(mRYYp), norm); // diag mRYYp = row of ones
1217 dAxy.Sqrt();
1218 dAxy.NormByColumn(mSP); // divide
1219 dAxy.NormByRow(mSYp, ""); // mult
1220 dAyx.Transpose(dAxy);
1221
1222 fErrorFlag = 0;
1223}
1224
An options class which parses command line, config file and environment.
Decoding and management for VQWK ADC channels (6x32-bit datawords)
ROOT file and tree management wrapper classes.
Definition of the pure virtual base class of all data elements.
Parameter file parsing and management.
A logfile class, based on an identical class in the Hermes analyzer.
#define QwVerbose
Predefined log drain for verbose messages.
Definition QwLog.h:54
#define QwError
Predefined log drain for errors.
Definition QwLog.h:39
#define QwWarning
Predefined log drain for warnings.
Definition QwLog.h:44
#define QwMessage
Predefined log drain for regular messages.
Definition QwLog.h:49
Helicity pattern analysis and management.
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...
static std::ostream & endl(std::ostream &)
End of the line.
Definition QwLog.cc:297
Command-line and configuration file options processor.
Definition QwOptions.h:141
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
Configuration file parser with flexible tokenization and search capabilities.
Bool_t PopValue(const std::string keyname, T &retvalue)
void TrimWhitespace(TString::EStripType head_tail=TString::kBoth)
void TrimComment(const char commentchar)
std::string GetNextToken(const std::string &separatorchars)
Get next token as a string.
A wrapper class for a ROOT file or memory mapped file.
Definition QwRootFile.h:859
void NewTree(const std::string &name, const std::string &desc)
Create a new tree with name and description.
Definition QwRootFile.h:953
TTree * GetTree(const std::string &name)
Get the tree with name.
Definition QwRootFile.h:987
Abstract base for concrete hardware channels implementing dual-operator pattern.
void printSummaryAlphas() const
Int_t fErrorFlag
is information valid
std::vector< TH1D > fH1iv
Int_t getMeanYprime(const int i, Double_t &mean) const
void ConstructHistograms(TDirectory *folder, TString &prefix) override
Construct the histograms in a folder with a prefix.
Int_t getSigmaP(const int i, Double_t &sigma) const
Get mean value of a variable, returns error code.
Long64_t fGoodEventNumber
accumulated so far
QwCorrelatorNew & operator+=(const std::pair< TVectorD, TVectorD > &rhs)
std::vector< Double_t > fIndependentValues
void ParseConfigFile(QwParameterFile &file) override
void ProcessData() override
Int_t getSigmaY(const int i, Double_t &sigma) const
TMatrixD Axy
slopes
Int_t getSigmaYprime(const int i, Double_t &sigma) const
std::vector< TH1D > fHnames
static void DefineOptions(QwOptions &options)
void ConstructTreeBranches(QwRootFile *treerootfile, const std::string &treeprefix="", const std::string &branchprefix="") override
Construct the tree branches.
void printSummaryMeansWithUncCorrected() const
std::ofstream fAliasOutputFile
void OpenAliasFile(const std::string &prefix)
TVectorD mMP
mean values
void FillHistograms() override
Fill the histograms.
double getUsedEve() const
std::vector< TH1D > fH1dv
std::vector< std::vector< TH2D > > fH2iv
void ClearEventData() override
Int_t getMeanP(const int i, Double_t &mean) const
Get mean value of a variable, returns error code.
std::string fAlphaOutputFileBase
Int_t ConnectChannels(QwSubsystemArrayParity &asym, QwSubsystemArrayParity &diff) override
Connect to Channels (asymmetry/difference only)
~QwCorrelatorNew() override
std::vector< int > fErrCounts_DV
Int_t getMeanY(const int i, Double_t &mean) const
TMatrixD mRPY
correlations
void printSummaryP() const
std::string fAliasOutputPath
std::vector< std::string > fIndependentFull
void printSummaryY() const
TMatrixD mSPY
normalized covariances
std::string fAlphaOutputPath
QwCorrelatorNew(const TString &name)
Constructor with name.
std::string fAlphaOutputFileSuff
TVectorD mSP
sigmas
std::vector< int > fErrCounts_IV
std::vector< EQwHandleType > fIndependentType
TMatrixD mVPY
unnormalized covariances
std::vector< const VQwHardwareChannel * > fIndependentVar
std::vector< std::vector< TH2D > > fH2dv
void printSummaryYP() const
TVectorD mVP
variances
void ProcessOptions(QwOptions &options)
std::string fAliasOutputFileSuff
static bool fPrintCorrelations
unsigned int fGoodEvent
Int_t getCovariancePY(int ip, int iy, Double_t &covar) const
std::string fAliasOutputFileBase
void printSummaryMeansWithUnc() const
std::vector< std::string > fIndependentName
Int_t getCovarianceY(int i, int j, Double_t &covar) const
void OpenAlphaFile(const std::string &prefix)
Int_t getCovarianceP(int i, int j, Double_t &covar) const
Get mean value of a variable, returns error code.
void setDims(int a, int b)
Subsystem array container specialized for parity analysis with asymmetry calculations.
const UInt_t * GetEventcutErrorFlagPointer() const
std::vector< std::string > fDependentFull
void AccumulateRunningSum()
void SetEventcutErrorFlagPointer(const UInt_t *errorflagptr)
TString GetName()
std::vector< Double_t > fDependentValues
virtual void ParseConfigFile(QwParameterFile &file)
std::vector< const VQwHardwareChannel * > fDependentVar
UInt_t GetEventcutErrorFlag() const
VQwDataHandler(const TString &name)
std::string ParseSeparator
std::string fTreeComment
std::string fTreeName
std::pair< EQwHandleType, std::string > ParseHandledVariable(const std::string &variable)
std::vector< EQwHandleType > fDependentType
std::vector< std::string > fDependentName