3 * @author Christian Holm Christensen <cholm@nbi.dk>
4 * @date Thu Nov 17 12:16:51 2011
6 * @brief Base class for QA rings
8 * @ingroup pwglf_forward_qa_scripts
13 # include "QAStructs.h"
24 * Base class for QA rings. This manages the per-ring entries in the
27 * @ingroup pwglf_forward_qa_scripts
39 QARing(UShort_t d, Char_t r)
57 if (fChi2) { delete fChi2; fChi2 = 0; }
58 if (fC) { delete fC; fC = 0; }
59 if (fDelta) { delete fDelta; fDelta = 0; }
60 if (fXi) { delete fXi; fXi = 0; }
61 if (fSigma) { delete fSigma; fSigma = 0; }
62 if (fFitStatus) { delete fFitStatus; fFitStatus = 0; }
63 if (fMerge) { delete fMerge; fMerge = 0; }
64 if (fDataLoss) { delete fDataLoss; fDataLoss = 0; }
65 if (fOccupancy) { delete fOccupancy; fOccupancy = 0; }
66 if (fCorrelation) { delete fCorrelation; fCorrelation = 0; }
71 * @param tree Tree to read from/write to
72 * @param read If true, read from tree, other wise write
74 * @return true on success
76 Bool_t Init(TTree* tree, bool read=false)
79 fChi2 = RingQuantity::MakeBranch(tree, fD, fR, "chi2");
80 fC = RingQuantity::MakeBranch(tree, fD, fR, "c");
81 fDelta = RingQuantity::MakeBranch(tree, fD, fR, "delta");
82 fXi = RingQuantity::MakeBranch(tree, fD, fR, "xi");
83 fSigma = RingQuantity::MakeBranch(tree, fD, fR, "sigma");
84 fFitStatus = FitStatus::MakeBranch(tree, fD, fR);
85 fMerge = Merge::MakeBranch(tree, fD, fR);
86 fDataLoss = DataLoss::MakeBranch(tree, fD, fR);
87 fOccupancy = RingQuantity::MakeBranch(tree, fD, fR, "occupancy");
88 fCorrelation = Correlation::MakeBranch(tree, fD, fR);
91 fChi2 = RingQuantity::SetBranch(tree, fD, fR, "chi2");
92 fC = RingQuantity::SetBranch(tree, fD, fR, "c");
93 fDelta = RingQuantity::SetBranch(tree, fD, fR, "delta");
94 fXi = RingQuantity::SetBranch(tree, fD, fR, "xi");
95 fSigma = RingQuantity::SetBranch(tree, fD, fR, "sigma");
96 fFitStatus = FitStatus::SetBranch(tree, fD, fR);
97 fMerge = Merge::SetBranch(tree, fD, fR);
98 fDataLoss = DataLoss::SetBranch(tree, fD, fR);
99 fOccupancy = RingQuantity::SetBranch(tree, fD, fR, "occupancy");
100 fCorrelation = Correlation::SetBranch(tree, fD, fR);
103 UShort_t fD; // Detector number
104 Char_t fR; // Ring identifier
105 RingQuantity* fChi2; // ELoss reduced chi-square
106 RingQuantity* fC; // ELoss constant
107 RingQuantity* fDelta; // ELoss most probably value
108 RingQuantity* fXi; // ELoss Landau width
109 RingQuantity* fSigma; // ELoss Gaus width
110 FitStatus* fFitStatus; // ELoss fit status
111 Merge* fMerge; // Merging parameters
112 DataLoss* fDataLoss; // Hit 'loss' summary
113 RingQuantity* fOccupancy; // Mean occupancy
114 Correlation* fCorrelation; // ELoss vs Poisson correlation