ATLAS Offline Software
DigitMonitor.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
9 #include "LArSamplesMon/Data.h"
10 #include "LArSamplesMon/OFC.h"
15 #include "LArCafJobs/SimpleShape.h"
16 #include "LArSamplesMon/Residual.h"
17 #include "LArCafJobs/Geometry.h"
18 
19 #include "TCanvas.h"
20 #include "TF1.h"
21 #include "TH1I.h"
22 #include "TH2D.h"
23 #include "TLatex.h"
24 #include "TMath.h"
25 #include "TPaveText.h"
26 #include "TROOT.h"
27 #include "TVectorD.h"
28 #include <map>
29 #include <utility>
30 
31 #include <vector>
32 
33 #include <iostream>
34 using std::cout;
35 using std::endl;
36 
37 using namespace LArSamples;
38 
39 
40 TH1D* DigitMonitor::energyDist(const TString& name, int nBins, double eMax) const
41 {return dist(&Data::_energy, DataFuncArgs(), name, nBins, 0, eMax, "Energy distribution", "Energy (MeV)"); }
42 
43 TH1D* DigitMonitor::timeDist(const TString& name, int nBins, double tMin, double tMax) const
44 { return dist(&Data::_ofcTime, DataFuncArgs(), name, nBins, tMin, tMax, "Time distribution", "Time (ns)"); }
45 
46 TH1D* DigitMonitor::adcMaxDist(const TString& name, int nBins, double aMin, double aMax) const
47 { return dist(&Data::_adcMax, DataFuncArgs(), name, nBins, aMin, aMax, "ADCMax distribution", "ADCMax (counts)"); }
48 
49 TH1D* DigitMonitor::noiseDist(const TString& name, int nBins, double max) const
50 { return dist(&Data::_noise, DataFuncArgs(), name, nBins, 0, max, "Noise distribution", "Noise (ADC counts)"); }
51 
53 { return partitionMap(&Data::_maxValue, DataFuncArgs(), std::move(name), partition, "Max sample value (ADC counts)", MaxValue); }
54 
56 { return partitionMap(&Data::_minValue, DataFuncArgs(), std::move(name), partition, "Min sample value (ADC counts)", MinValue); }
57 
58 
59 TH1D* DigitMonitor::chi2Dist(const TString& name, int nBins, double max, double kFactor,
60  double fitMax, int lwb, int upb, unsigned int chi2Pars,
61  ShapeErrorType shapeErrorType, unsigned int nDof) const
62 {
63  TH1D* h = new TH1D(name, "#chi^{2} distribution", nBins, 0, max);
64  unsigned int nDofEff = 0, nDofLast = 0;
65  UniformShapeErrorGetter* kFactorGetter = nullptr;
66  CombinedShapeErrorGetter* shapeErrorGetter = nullptr;
67  if (kFactor > 0) {
68  kFactorGetter = new UniformShapeErrorGetter(kFactor);
69  shapeErrorGetter = new CombinedShapeErrorGetter();
70  if (interface().shapeErrorGetter()) shapeErrorGetter->add(*interface().shapeErrorGetter());
71  shapeErrorGetter->add(*kFactorGetter);
72  }
73  for (unsigned int i = 0; i < nChannels(); i++) {
74  if ((i+1) % 10000 == 0) cout << "Processing entry # " << i+1 << endl;
75  const History* history = cellHistory(i);
76  if (!history) continue;
77  if (shapeErrorGetter) history->setShapeErrorGetter(shapeErrorGetter); // Do it at history level so it doesn't "stick" afterwards,,,
78  for (unsigned int j = 0; j < history->nData(); j++) {
79  h->Fill(history->chi2(j, lwb, upb, chi2Pars, shapeErrorType, &nDofEff));
80  if (nDofLast > 0 && nDofLast != nDofEff) cout << "WARNING @ hash = " << i << ", index = " << j << " : nDof varied from " << nDofLast << " to " << nDofEff << endl;
81  nDofLast = nDofEff;
82  }
83  }
84 
85  if (nDof > 0 && nDof != nDofEff) cout << "WARNING : fixing nDof = " << nDof << ", but computer nDofEff = " << nDofEff << endl;
86  h->Draw();
87  if (fitMax < 0) return h;
88  TF1* fChi2 = fitChi2(*h, "chi2", 0, max, nDof, 0, fitMax);
89 
90  TPaveText* p = new TPaveText(0.6, 0.85, 0.85, 0.65, "NDC");
91  p->AddText(Form("k = %.1f%%", kFactor*100));
92  p->AddText(Form("Fit #chi^{2} = %.1f", fChi2->GetChisquare()));
93  p->AddText(Form("Fit nDOF = %.1f", fChi2->GetParameter(1)));
94  p->Draw();
95 
96  if (shapeErrorGetter) {
97  delete kFactorGetter;
98  delete shapeErrorGetter;
99  }
100  return h;
101 }
102 
103 
104 TF1* DigitMonitor::chi2Func(const char* name, double xMin, double xMax)
105 {
106  TF1* fChi2 = new TF1(name, "[0]*TMath::Power(x/2, [1]/2)/x*TMath::Exp(-x/2)/TMath::Gamma([1]/2)", xMin, xMax);
107  fChi2->SetParameter(0, 100);
108  fChi2->SetParameter(1, 3);
109  fChi2->SetParLimits(1, 1, 7);
110  return fChi2;
111 }
112 
113 
114 TF1* DigitMonitor::fitChi2(TH1D& h, const char* name, double xMin, double xMax,
115  double nDof, double fitMin, double fitMax)
116 {
117  if (fitMin == Definitions::none) fitMin = xMin;
118  if (fitMax == Definitions::none) fitMin = xMax;
119 
120  TF1* fChi2 = chi2Func(name, xMin, xMax);
121  fChi2->SetParameter(0, 4*h.GetMaximum());
122  if (nDof > 0) fChi2->FixParameter(1, nDof);
123 
124  h.Fit(fChi2, "", "", fitMin, fitMax);
125  fChi2->SetRange(xMin, xMax);
126  return fChi2;
127 }
128 
129 
130 TH1D* DigitMonitor::bestChi2Dist(const TString& name, int nBins, double max,
131  double refErrMin, double refErrMax, unsigned int refErrNBins,
132  int lwb, int upb, unsigned int chi2Pars, unsigned int nDof) const
133 {
134  TF1* fChi2 = chi2Func("fChi2", 0, max);
135  if (nDof > 0) fChi2->FixParameter(1, nDof);
136 
137  double delta = (refErrMax - refErrMin)/refErrNBins;
138  TH1D* fitResults = new TH1D("fitResults", "", refErrNBins, refErrMin - delta/2, refErrMax - delta/2);
139 
140  for (unsigned int k = 0; k < refErrNBins; k++) {
141  double refErr = refErrMin + delta*k;
142  TH1D* h = new TH1D(name, "#chi^{2} distribution", nBins, 0, max);
143  UniformShapeErrorGetter kFactorGetter(refErr);
144  CombinedShapeErrorGetter shapeErrorGetter;
145  if (interface().shapeErrorGetter()) shapeErrorGetter.add(*interface().shapeErrorGetter());
146  shapeErrorGetter.add(kFactorGetter);
147  for (unsigned int i = 0; i < nChannels(); i++) {
148  const History* history = cellHistory(i);
149  if (!history) continue;
150  history->setShapeErrorGetter(&shapeErrorGetter);
151  for (unsigned int j = 0; j < history->nData(); j++) {
152  h->Fill(history->chi2(j, lwb, upb, chi2Pars));
153  }
154  }
155  h->Fit(fChi2);
156  fitResults->SetBinContent(k+1, fChi2->GetChisquare());
157  delete h;
158  }
159 
160  TF1* fPol2 = new TF1("fPol2", "[0]*(x - [1])*(x - [1]) + [2]", refErrMin, refErrMax);
161 
162  double center = fitResults->GetBinCenter(fitResults->GetMinimumBin());
163  fPol2->SetParameter(0, (fitResults->GetMaximum() - fitResults->GetMinimum())/center/center);
164  fPol2->SetParameter(1, center);
165  fPol2->SetParameter(2, fitResults->GetMinimum());
166 
167  fitResults->Draw();
168  fitResults->Fit(fPol2);
169 
170  TPaveText* p = new TPaveText(0.6, 0.85, 0.85, 0.65, "NDC");
171  p->AddText(Form("Fit k_{best} = %.1f%%", fPol2->GetParameter(1)*100));
172  p->AddText(Form("Fit #delta k_{best} = %.2f%%", 1/TMath::Sqrt(fPol2->GetParameter(0))*100));
173  p->AddText(Form("Fit #chi^{2}_{min} = %.2f", fPol2->GetParameter(2)));
174  p->Draw();
175 
176  return fitResults;
177 }
178 
179 
180 
181 TH1D* DigitMonitor::gainDist(const TString& name) const
182 {
183  TH1D* h = new TH1D(name, "gain distribution", 3, -0.5, 2.5);
184  h->GetXaxis()->SetBinLabel(1, "Low");
185  h->GetXaxis()->SetBinLabel(2, "Medium");
186  h->GetXaxis()->SetBinLabel(3, "High");
187  for (unsigned int i = 0; i < nChannels(); i++) {
188  const History* history = cellHistory(i);
189  if (!history) continue;
190  for (unsigned int j = 0; j < history->nData(); j++) h->Fill(history->data(j)->gain());
191  }
192  return h;
193 }
194 
195 
196 TH1D* DigitMonitor::layerDist(const TString& name) const
197 {
198  TH1D* h = new TH1D(name, "layer distribution", 4, -0.5, 3.5);
199  h->GetXaxis()->SetBinLabel(1, "PS");
200  h->GetXaxis()->SetBinLabel(2, "Strips");
201  h->GetXaxis()->SetBinLabel(3, "Middle");
202  h->GetXaxis()->SetBinLabel(4, "Back");
203  for (unsigned int i = 0; i < nChannels(); i++) {
204  const History* history = cellHistory(i);
205  if (!history) continue;
206  for (unsigned int j = 0; j < history->nData(); j++) h->Fill(history->cellInfo()->layer());
207  }
208  return h;
209 }
210 
211 
212 TH1D* DigitMonitor::residualDist(unsigned int k, const TString& name, int nBins, double rMin, double rMax, bool norm) const
213 {
214  TH1D* h = new TH1D(name, "Residual distribution", nBins, rMin, rMax);
215  h->GetXaxis()->SetTitle(norm ? "Residual/ADCMax (%)" : "Residual (ADC counts)");
216 
217  for (unsigned int i = 0; i < nChannels(); i++) {
218  const History* history = cellHistory(i);
219  if (!history) continue;
220  for (unsigned int j = 0; j < history->nData(); j++)
221  h->Fill(history->data(j)->delta(k)*(norm ? 100/history->data(j)->adcMax() : 1));
222  }
223  return h;
224 }
225 
226 
227 bool DigitMonitor::residualPlots(CaloId calo, unsigned int layer, CaloGain::CaloGain gain, bool xip, bool ring,
228  double lo, double hi, const TString& fileName)
229 {
230  TH1D* h1[5];
231  TH2D* hEtaPhi[5];
232  TString globalTitle = TString(xip ? "Derivative" : "Offset") + " correction";
233  for (unsigned short k = 0; k < 5; k++) {
234  TString title = globalTitle + " for sampling " + Form("%d", k);
235  h1[k] = new TH1D(Form("h%d", k), title, 100, lo, hi);
236  h1[k]->GetXaxis()->SetTitle("correction");
237  hEtaPhi[k] = Geo::etaPhiHist(calo, layer, Form("hEtaPhi%d", k), title);
238  hEtaPhi[k]->SetMinimum(lo);
239  hEtaPhi[k]->SetMaximum(hi);
240  }
241  FilterParams f;
242  f.addCalo(calo);
243  f.addLayer(layer);
244  TH2D* hAll = new TH2D("hAll", globalTitle + " vs. sampling", 5, 0, 5, 100, lo, hi);
245  hAll->GetXaxis()->SetTitle("sampling");
246  hAll->GetYaxis()->SetTitle("correction");
247  for (unsigned int i = 0; i < nChannels(); i++) {
248  if ((i+1) % 10000 == 0) cout << "Cell # " << i+1 << "/" << nChannels() << endl;
249  const History* history = pass(i, f);
250  if (!history || history->nData() == 0) continue;
251  for (unsigned short k = 0; k < 5; k++) {
253  double xi = history->data(0)->xi(k, type, gain, xip);
254  h1[k]->Fill(xi);
255  hEtaPhi[k]->Fill(history->cellInfo()->eta(), history->cellInfo()->phi(), xi);
256  if (Id::matchCalo(calo, HEC) && history->cellInfo()->region() == 1) // For HEC, take care of larger phi size in region 1
257  hEtaPhi[k]->Fill(history->cellInfo()->eta(), history->cellInfo()->phi() - Geo::phiSize(HEC_A, 1, 1), xi);
258  }
259  }
260  for (unsigned int i = 1; i <= 100; i++)
261  for (unsigned short k = 0; k < 5; k++)
262  hAll->SetBinContent(k+1, i, h1[k]->GetBinContent(i));
263  TFile* ff = TFile::Open(fileName + ".root", "RECREATE");
264  for (unsigned short k = 0; k < 5; k++) {
265  h1[k]->Write();
266  hEtaPhi[k]->Write();
267  }
268  hAll->Write();
269  ff->Close();
270  TCanvas* c1 = new TCanvas("c1", Id::str(calo) + " layer " + Form("%d", layer), 1600, 2000);
271  c1->Divide(2,3);
272  for (unsigned short k = 0; k < 5; k++) {
273  c1->cd(k+1);
274  hEtaPhi[k]->Draw("COLZ");
275  }
276  c1->cd(6);
277  hAll->Draw();
278  c1->Print(fileName + ".png");
279  c1->Print(fileName + ".eps");
280  return true;
281 }
282 
283 
285  double lo, double hi, const TString& fileName)
286 {
287  unsigned int nBins = 100;
288  TH1D* h[5][5];
289  TString globalTitle = TString(xip ? "Derivative" : "Offset") + " correction";
290  for (unsigned short l = 0; l < 5; l++)
291  for (unsigned short k = 0; k < 5; k++)
292  h[l][k] = new TH1D(Form("h%d%d", l, k), "", nBins, l < 2 ? -15 : lo, l < 2 ? 15 : hi);
293  FilterParams f;
294  f.addCalo(calo);
295  f.addLayer(layer);
296  TH2D* hAll[5];
297  hAll[0] = new TH2D("h0All", "#xi_{cell}/#delta#xi vs. sampling", 5, 0, 5, nBins, -15, 15);
298  hAll[1] = new TH2D("hDAll", "(#xi_{cell} - #xi_{ring})/#delta#xi vs. sampling", 5, 0, 5, nBins, -15, 15);
299  hAll[2] = new TH2D("hEAll", globalTitle + " per-cell value vs. sampling", 5, 0, 5, nBins, 0, hi);
300  hAll[3] = new TH2D("hRAll", globalTitle + " per-ring value vs. sampling", 5, 0, 5, nBins, lo, hi);
301  hAll[4] = new TH2D("hCAll", globalTitle + " per-cell error vs. sampling", 5, 0, 5, nBins, lo, hi);
302  TH2D* hCor = new TH2D("hCor", globalTitle + " per-ring vs. per-cell values", nBins, lo, hi, nBins, lo, hi);
303  hCor->GetXaxis()->SetTitle("#xi_{cell}");
304  hCor->GetYaxis()->SetTitle("#xi_{ring}");
305  for (unsigned short l = 0; l < 4; l++) {
306  hAll[l]->GetXaxis()->SetTitle("sampling");
307  hAll[l]->GetYaxis()->SetTitle("significance");
308  }
309  for (unsigned int i = 0; i < nChannels(); i++) {
310  if ((i+1) % 10000 == 0) cout << "Cell # " << i+1 << "/" << nChannels() << endl;
311  const History* history = pass(i, f);
312  if (!history || history->nData() == 0) continue;
313  for (unsigned short k = 0; k < 5; k++) {
314  const ShapeErrorData* cellSED = history->shapeErrorData(gain, CellShapeError);
315  const ShapeErrorData* ringSED = history->shapeErrorData(gain, RingShapeError);
316  if (!cellSED || !ringSED) {
317  if (cellSED) delete cellSED;
318  if (ringSED) delete ringSED;
319  continue;
320  }
321  double cellVal = (xip ? cellSED->xi()(k) : cellSED->xip()(k));
322  double ringVal = (xip ? ringSED->xi()(k) : ringSED->xip()(k));
323  double cellErr = TMath::Sqrt(xip ? cellSED->xiErr()(k,k) : cellSED->xipErr()(k,k));
324  delete cellSED;
325  delete ringSED;
326  h[0][k]->Fill(cellVal/cellErr);
327  h[1][k]->Fill((cellVal - ringVal)/cellErr);
328  h[2][k]->Fill(cellVal);
329  h[3][k]->Fill(ringVal);
330  h[4][k]->Fill(cellErr);
331  hCor->Fill(cellVal, ringVal);
332  }
333  }
334  for (unsigned int i = 1; i <= nBins; i++)
335  for (unsigned short l = 0; l < 5; l++)
336  for (unsigned short k = 0; k < 5; k++)
337  hAll[l]->SetBinContent(k+1, i, h[l][k]->GetBinContent(i));
338  TFile* ff = TFile::Open(fileName + ".root", "RECREATE");
339  for (unsigned short l = 0; l < 5; l++) {
340  for (unsigned short k = 0; k < 5; k++)
341  h[l][k]->Write();
342  hAll[l]->Write();
343  }
344  ff->Close();
345  TCanvas* c1 = new TCanvas("c1", Id::str(calo) + " layer " + Form("%d", layer), 1600, 500);
346  c1->Divide(3,1);
347  c1->cd(1); hCor->Draw();
348  TLatex l; l.SetNDC();
349  TString corrStr = Form("Correlation : %.1f%%", 100*hCor->GetCorrelationFactor());
350  l.DrawLatex(0.2, 0.8, corrStr);
351  c1->cd(2); hAll[0]->Draw("COL");
352  c1->cd(3); hAll[1]->Draw("COL");
353  c1->Print(fileName + ".png");
354  c1->Print(fileName + ".eps");
355  return true;
356 }
357 
358 
359 bool DigitMonitor::residualPlotsGainComp(CaloId calo, unsigned int layer, bool ring, bool xip,
360  double lo, double hi, const TString& fileName)
361 {
362  unsigned int nBins = 100;
363  TH1D* h[5][5];
364  TString globalTitle = TString(xip ? "Derivative" : "Offset") + " correction";
365  for (unsigned short l = 0; l < 5; l++)
366  for (unsigned short k = 0; k < 5; k++)
367  h[l][k] = new TH1D(Form("h%d%d", l, k), "", nBins, l < 2 ? -15 : lo, l < 2 ? 15 : hi);
368  FilterParams f;
369  f.addCalo(calo);
370  f.addLayer(layer);
371  TH2D* hAll[5];
372  hAll[0] = new TH2D("h0All", "#xi_{high}/#delta#xi vs. sampling", 5, 0, 5, nBins, -15, 15);
373  hAll[1] = new TH2D("hDAll", "(#xi_{high} - #xi_{low})/#delta#xi vs. sampling", 5, 0, 5, nBins, -15, 15);
374  hAll[2] = new TH2D("hEAll", globalTitle + " higher-gain value vs. sampling", 5, 0, 5, nBins, 0, hi);
375  hAll[3] = new TH2D("hRAll", globalTitle + " lower-gain value vs. sampling", 5, 0, 5, nBins, lo, hi);
376  hAll[4] = new TH2D("hCAll", globalTitle + " higher-gain error vs. sampling", 5, 0, 5, nBins, lo, hi);
377  TH2D* hCor = new TH2D("hCor", globalTitle + " lower-gain vs. higher-gain values", nBins, lo, hi, nBins, lo, hi);
378  hCor->GetXaxis()->SetTitle("#xi_{high}");
379  hCor->GetYaxis()->SetTitle("#xi_{low}");
380  for (unsigned short l = 0; l < 4; l++) {
381  hAll[l]->GetXaxis()->SetTitle("sampling");
382  hAll[l]->GetYaxis()->SetTitle("significance");
383  }
384 
387 
388  for (unsigned int i = 0; i < nChannels(); i++) {
389  if ((i+1) % 10000 == 0) cout << "Cell # " << i+1 << "/" << nChannels() << endl;
390  const History* history = pass(i, f);
391  if (!history || history->nData() == 0) continue;
392  for (unsigned short k = 0; k < 5; k++) {
393  const ShapeErrorData* hgSED = history->shapeErrorData(hiGain, ring ? RingShapeError : CellShapeError);
394  const ShapeErrorData* lgSED = history->shapeErrorData(loGain, ring ? RingShapeError : CellShapeError);
395  if (!hgSED || !lgSED) {
396  if (hgSED) delete hgSED;
397  if (lgSED) delete lgSED;
398  continue;
399  }
400  double hgVal = (xip ? hgSED->xi()(k) : hgSED->xip()(k));
401  double lgVal = (xip ? lgSED->xi()(k) : lgSED->xip()(k));
402  double hgErr = TMath::Sqrt(xip ? hgSED->xiErr()(k,k) : hgSED->xipErr()(k,k));
403  double error = TMath::Sqrt(xip ? hgSED->xiErr()(k,k) + lgSED->xiErr()(k,k) : hgSED->xipErr()(k,k) + lgSED->xipErr()(k,k));
404  delete hgSED;
405  delete lgSED;
406  h[0][k]->Fill(hgVal/hgErr);
407  h[1][k]->Fill((hgVal - lgVal)/error);
408  h[2][k]->Fill(hgVal);
409  h[3][k]->Fill(lgVal);
410  h[4][k]->Fill(hgErr);
411  hCor->Fill(hgVal, lgVal);
412  }
413  }
414  for (unsigned int i = 1; i <= nBins; i++)
415  for (unsigned short l = 0; l < 5; l++)
416  for (unsigned short k = 0; k < 5; k++)
417  hAll[l]->SetBinContent(k+1, i, h[l][k]->GetBinContent(i));
418  TFile* ff = TFile::Open(fileName + ".root", "RECREATE");
419  for (unsigned short l = 0; l < 5; l++) {
420  for (unsigned short k = 0; k < 5; k++)
421  h[l][k]->Write();
422  hAll[l]->Write();
423  }
424  ff->Close();
425  TCanvas* c1 = new TCanvas("c1", Id::str(calo) + " layer " + Form("%d", layer), 1600, 500);
426  c1->Divide(3,1);
427  c1->cd(1); hCor->Draw();
428  TLatex l; l.SetNDC();
429  TString corrStr = Form("Correlation : %.1f%%", 100*hCor->GetCorrelationFactor());
430  l.DrawLatex(0.2, 0.8, corrStr);
431  c1->cd(2); hAll[0]->Draw("COL");
432  c1->cd(3); hAll[1]->Draw("COL");
433  c1->Print(fileName + ".png");
434  c1->Print(fileName + ".eps");
435  return true;
436 }
437 
438 
439 TH1D* DigitMonitor::shapeErrorDist(unsigned int k, const TString& name, int nBins, double rMin, double rMax, double mean) const
440 {
441  TH1D* h = new TH1D(name, "Shape error", nBins, rMin, rMax);
442  h->GetXaxis()->SetTitle("#epsilon^{2}");
443 
444  for (unsigned int i = 0; i < nChannels(); i++) {
445  const History* history = cellHistory(i);
446  if (!history) continue;
447  for (unsigned int j = 0; j < history->nData(); j++) {
448  OFC* ofc = history->ofc(j);
449  double delta = history->data(j)->delta(k) - mean;
450  double adcMax = history->data(j)->adcMax();
451  h->Fill((delta*delta - ofc->Gamma()(k, k))/(adcMax*adcMax));
452  }
453  }
454  cout << sqrt(h->GetMean())*100 << " +/- " << sqrt(h->GetMeanError())*100 << endl;
455  return h;
456 }
457 
458 
459 double DigitMonitor::residualCorr(unsigned int k1, unsigned int k2) const
460 {
461  double sum = 0;
462  int n = 0;
463 
464  for (unsigned int i = 0; i < nChannels(); i++) {
465  const History* history = cellHistory(i);
466  if (!history) continue;
467  for (unsigned int j = 0; j < history->nData(); j++) {
468  double residual1 = history->data(j)->delta(k1);
469  double residual2 = history->data(j)->delta(k2);
470  sum += residual1*residual2;
471  n++;
472  }
473  }
474 
475  return sum/n;
476 }
477 
478 
479 bool DigitMonitor::residualParams(int lwb, int upb, CovMatrix& k, TVectorD& means) const
480 {
481  CovMatrix sum2N(lwb, upb), sumCN(lwb, upb);
482  TVectorD sum(lwb, upb), sumN(lwb, upb);
483  double sumA = 0, n = 0;
484  for (unsigned int i = 0; i < nChannels(); i++) {
485  const History* history = cellHistory(i);
486  if (!history) continue;
487  for (unsigned int j = 0; j < history->nData(); j++) {
488  if (history->data(j)->adcMax() < 0) continue;
489  OFC* ofc = history->ofc(j);
490  if (!ofc || ofc->hasSameRange(lwb, upb)) { cout << "Invalid index bounds!" << endl; return false; }
491  for (int i1 = lwb; i1 <= upb; i1++) {
492  sum(i1) = sum(i1) + history->data(j)->delta(i1);
493  sumN(i1) = sumN(i1) + history->data(j)->delta(i1)/TMath::Power(history->data(j)->adcMax(), 2);
494  for (int i2 = lwb; i2 <= upb; i2++) {
495  sumCN(i1, i2) = sumCN(i1, i2) + ofc->Gamma()(i1, i2)/TMath::Power(history->data(j)->adcMax(), 2);
496  sum2N(i1, i2) = sum2N(i1, i2) + history->data(j)->delta(i1)*history->data(j)->delta(i2)/TMath::Power(history->data(j)->adcMax(),2);
497  }
498  }
499  sumA += 1/TMath::Power(history->data(j)->adcMax(), 2);
500  n++;
501  }
502  }
503 
504  sumA /= n;
505  k.ResizeTo(lwb, upb);
506  means.ResizeTo(lwb, upb);
507 
508  for (int i1 = lwb; i1 <= upb; i1++) {
509  sum(i1) = sum(i1)/n;
510  sumN(i1) = sumN(i1)/n;
511  means(i1) = sum(i1);
512  }
513 
514  for (int i1 = lwb; i1 <= upb; i1++) {
515  for (int i2 = lwb; i2 <= upb; i2++) {
516  sumCN(i1, i2) = sumCN(i1, i2)/n;
517  sum2N(i1, i2) = sum2N(i1, i2)/n;
518  k(i1, i2) = sum2N(i1, i2) - sumN(i1)*sum(i2) - sum(i1)*sumN(i2)
519  + sum(i1)*sum(i2)*sumA - sumCN(i1,i2);
520  k(i1, i2) = (k(i1, i2) >= 0 ? sqrt(k(i1, i2)) : -sqrt(-k(i1, i2)));
521  }
522  }
523  return true;
524 }
525 
526 
527 int DigitMonitor::combine(SimpleShape*& shape, SimpleShape*& ref, const TString& selection, bool timeAligned) const
528 {
529  FilterParams f;
530  if (!f.set(selection)) return 0;
531  int n = 0;
532  shape = ref = nullptr;
533 
534  double maxSum = 0;
535 
536  for (unsigned int i = 0; i < nChannels(); i++) {
537  if ((i+1) % 50000 == 0) cout << "Cell # " << i+1 << "/" << nChannels() << endl;
538  const History* history = pass(i, f);
539  if (!history) continue;
540  for (unsigned int j = 0; j < history->nData(); j++) {
541  if (!f.passEvent(*history->data(j))) continue;
542  maxSum += history->data(j)->maxValue();
543  cout << "Adding pulse (" << n+1 << ") at hash " << i << ", index " << j << ", max = " << maxSum/(n+1) << endl;
544  //cout << i << " " << j << endl;
545  SimpleShape* thisData = new SimpleShape(*history->data(j));
546  SimpleShape* thisRef = history->referenceShape(j);
547  if (timeAligned) {
548  if (!SimpleShape::scaleAndShift(thisData, 1, -history->data(j)->ofcTime())) return -1;
549  if (!SimpleShape::scaleAndShift(thisRef, 1, -history->data(j)->ofcTime())) return -1;
550  }
551  if (!SimpleShape::add(shape, thisData)) return -1;
552  delete thisData;
553  if (!SimpleShape::add(ref, thisRef)) return -1;
554  delete thisRef;
555  n++;
556  }
557  }
558  if (!SimpleShape::scaleAndShift(shape, 1.0/n)) return -1;
559  if (!SimpleShape::scaleAndShift(ref, 1.0/n)) return -1;
560  return n;
561 }
562 
563 Residuals* DigitMonitor::getResiduals(unsigned int hash, CaloGain::CaloGain gain, double absResTrunc, bool adjust, bool zeroTime) const
564 {
565  const History* history = cellHistory(hash);
566  if (!history) return nullptr;
567  if (adjust) history = history->adjust();
568  Residuals* residuals = history->residuals(gain, absResTrunc, false, zeroTime);
569  if (adjust) delete history;
570  return residuals;
571 }
572 
573 
574 bool DigitMonitor::makeResidualCorrections(const TString& outputFile, short resTrunc, short timeTrunc, double absResTrunc,
575  unsigned int minSize, bool weigh, bool adjust, bool zeroTime) const
576 {
577  TreeShapeErrorGetter* shapeError = new TreeShapeErrorGetter(outputFile, true);
578  std::vector< std::vector<ResidualCalculator> > ringCalcs;
579  std::vector<ResidualCalculator> gainRingCalcs(Geo::nPhiRings());
580  for (unsigned int g = 0; g < CaloGain::LARNGAIN; g++) ringCalcs.push_back(gainRingCalcs);
581 
582  cout << "Processing cells" << endl;
583 
584  for (unsigned int i = 0; i < nChannels(); i++) {
585  if ((i+1) % 10000 == 0) cout << "Processing hash = " << (i+1) << endl;
586  for (unsigned int g = 0; g < CaloGain::LARNGAIN; g++) {
587  Residuals* residuals = getResiduals(i, (CaloGain::CaloGain)g, absResTrunc, adjust, zeroTime);
588  if (residuals && (resTrunc > 0 || timeTrunc > 0)) {
589  Residuals* truncated = residuals->truncate(resTrunc, timeTrunc);
590  delete residuals;
591  residuals = truncated;
592  }
593 
594  if (residuals && residuals->size() < minSize) {
595  delete residuals;
596  residuals = nullptr;
597  }
598 
599  ResidualCalculator* resCalc = nullptr;
600  if (residuals) {
601  resCalc = residuals->calculator(weigh);
602  delete residuals;
603  }
604 
605  if (!resCalc) {
607  continue;
608  }
609 
610  cout << i << " : Phi ring " << cellHistory(i)->cellInfo()->globalPhiRing() << " : adding " << resCalc->size() << endl;
611  shapeError->addCell(*resCalc, (CaloGain::CaloGain)g);
612  ringCalcs[g][cellHistory(i)->cellInfo()->globalPhiRing()].append(*resCalc);
613  if (cellHistory(i)->cellInfo()->globalPhiRing() == 1142) cout << ringCalcs[g][cellHistory(i)->cellInfo()->globalPhiRing()].regresser()->mean(0) << endl;
614  delete resCalc;
615  }
616  }
617 
618  cout << "Processing phi-symmetric data" << endl;
619 
620  for (unsigned int g = 0; g < CaloGain::LARNGAIN; g++) {
621  for (short i = 0; i < Geo::nPhiRings(); i++) {
622  if (ringCalcs[g][i].size() > 0)
623  cout << "Saving data for gain " << g << ", phi ring " << i << ", n = " << ringCalcs[g][i].size() << ", range = " << ringCalcs[g][i].rangeStr() << endl;
624  shapeError->addRing(ringCalcs[g][i], (CaloGain::CaloGain)g);
625  }
626  }
627 
628  cout << "Done!" << endl;
629 
630  delete shapeError;
631  return true;
632 }
TreeShapeErrorGetter.h
LArSamples::Geo::phiSize
static double phiSize(CaloId calo, short layer, short region, short iPhi=-1)
Definition: Geometry.cxx:344
LArSamples::MonitorBase::dist
TH1D * dist(const DataFuncSet &func, const DataFuncArgs &args, const TString &name, int nBins, double xMin, double xMax, const TString &title="", const TString &xTitle="", const TString &yTitle="", const FilterParams &f=FilterParams()) const
Definition: LArCalorimeter/LArSamplesMon/src/MonitorBase.cxx:64
LArSamples::Geo::etaPhiHist
static TH2D * etaPhiHist(CaloId calo, short layer, const TString &name, const TString &title)
Definition: Geometry.cxx:549
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
PlotCalibFromCool.norm
norm
Definition: PlotCalibFromCool.py:100
LArSamples::HEC
@ HEC
Definition: CaloId.h:26
WriteBchToCool.adjust
adjust
Definition: WriteBchToCool.py:73
LArSamples::CellInfo::globalPhiRing
short globalPhiRing() const
Definition: CellInfo.cxx:125
mean
void mean(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
Definition: dependence.cxx:254
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
LArSamples::TreeShapeErrorGetter::addCell
int addCell(const ResidualCalculator &calc, CaloGain::CaloGain gain)
Definition: TreeShapeErrorGetter.cxx:128
LArSamples::Id::matchCalo
static bool matchCalo(CaloId id, CaloId idSpec)
Definition: CaloId.cxx:188
max
#define max(a, b)
Definition: cfImp.cxx:41
LArSamples::FilterParams
Definition: FilterParams.h:50
ScaledErrorData.h
SimpleShape.h
LArSamples::Data::delta
double delta(short sample) const
Definition: Data.cxx:424
LArSamples::History::cellInfo
const CellInfo * cellInfo() const
Definition: History.h:61
LArSamples::CovMatrix
TMatrixTSym< double > CovMatrix
Definition: Definitions.h:11
LArSamples::History::referenceShape
SimpleShape * referenceShape(unsigned int k, double adcMax=-1, double time=Definitions::none, bool samplesOnly=false) const
Definition: History.cxx:544
LArSamples::DigitMonitor::residualPlots
bool residualPlots(CaloId calo, unsigned int layer, CaloGain::CaloGain gain=CaloGain::LARHIGHGAIN, bool xip=false, bool ring=false, double lo=-0.05, double hi=0.05, const TString &fileName="residuals")
Definition: DigitMonitor.cxx:227
LArSamples::AbsLArCells::cellHistory
virtual const History * cellHistory(unsigned int i) const
Definition: AbsLArCells.cxx:57
LArSamples::DigitMonitor::bestChi2Dist
TH1D * bestChi2Dist(const TString &name, int nBins, double max, double refErrMin, double refErrMax, unsigned int refErrNBins, int lwb=-1, int upb=-1, unsigned int chi2Pars=DefaultChi2, unsigned int nDof=0) const
Definition: DigitMonitor.cxx:130
LArSamples::Data::adcMax
double adcMax() const
Definition: Data.h:129
Residual.h
LArSamples::History
Definition: History.h:40
LArSamples::MinValue
@ MinValue
Definition: LArCalorimeter/LArSamplesMon/LArSamplesMon/MonitorBase.h:27
extractSporadic.c1
c1
Definition: extractSporadic.py:134
LArSamples::DigitMonitor::minValueMap
TH2D * minValueMap(TString name, PartitionId partition) const
Definition: DigitMonitor.cxx:55
LArSamples::MonitorBase::interface
const Interface & interface() const
Definition: LArCalorimeter/LArSamplesMon/LArSamplesMon/MonitorBase.h:74
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
UniformShapeErrorGetter.h
Geometry.h
LArSamples::SimpleShape
Definition: SimpleShape.h:25
LArSamples::Id::str
static TString str(CaloId id)
Definition: CaloId.cxx:15
LArSamples::History::residuals
Residuals * residuals(CaloGain::CaloGain gain=CaloGain::LARNGAIN, double absResTrunc=-1, bool correct=true, bool zeroTime=false) const
Definition: History.cxx:612
LArSamples::AbsLArCells::cellInfo
virtual const CellInfo * cellInfo(unsigned int i) const
Definition: AbsLArCells.cxx:69
OFC.h
LArSamples::DigitMonitor::combine
int combine(SimpleShape *&shape, SimpleShape *&ref, const TString &selection="", bool timeAligned=true) const
Definition: DigitMonitor.cxx:527
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
DigitMonitor.h
LArSamples
Definition: AbsShape.h:24
LArSamples::DigitMonitor::residualParams
bool residualParams(int lwb, int upb, CovMatrix &k, TVectorD &means) const
Definition: DigitMonitor.cxx:479
LArSamples::Data::ofcTime
double ofcTime() const
Definition: Data.h:116
LArSamples::CellInfo::phi
double phi() const
Definition: CellInfo.h:94
LArSamples::HEC_A
@ HEC_A
Definition: CaloId.h:24
LArSamples::ResidualCalculator::size
unsigned int size() const
Definition: LArCalorimeter/LArSamplesMon/LArSamplesMon/Residual.h:117
LArSamples::ResidualCalculator
Definition: LArCalorimeter/LArSamplesMon/LArSamplesMon/Residual.h:101
LArSamples::History::ofc
OFC * ofc(unsigned int i, int lwb=-1, int upb=-1, double time=Definitions::none, bool useCorrs=true) const
Definition: History.cxx:204
read_hist_ntuple.h1
h1
Definition: read_hist_ntuple.py:21
CaloGain::LARNGAIN
@ LARNGAIN
Definition: CaloGain.h:19
LArSamples::TreeShapeErrorGetter::addRing
int addRing(const ResidualCalculator &calc, CaloGain::CaloGain gain)
Definition: TreeShapeErrorGetter.cxx:138
LArSamples::DigitMonitor::timeDist
TH1D * timeDist(const TString &name, int nBins, double tMin=-25, double tMax=25) const
Definition: DigitMonitor.cxx:43
LArSamples::DigitMonitor::adcMaxDist
TH1D * adcMaxDist(const TString &name, int nBins, double aMin=0, double aMax=4096) const
Definition: DigitMonitor.cxx:46
LArSamples::DigitMonitor::energyDist
TH1D * energyDist(const TString &name, int nBins, double eMax=10000) const
Definition: DigitMonitor.cxx:40
LArSamples::DigitMonitor::residualPlotsRingComp
bool residualPlotsRingComp(CaloId calo, unsigned int layer, CaloGain::CaloGain gain=CaloGain::LARHIGHGAIN, bool xip=false, double lo=-0.05, double hi=0.05, const TString &fileName="residuals")
Definition: DigitMonitor.cxx:284
LArSamples::CombinedShapeErrorGetter::add
void add(const AbsShapeErrorGetter &getter)
Definition: CombinedShapeErrorGetter.h:25
LArSamples::DigitMonitor::getResiduals
Residuals * getResiduals(unsigned int hash, CaloGain::CaloGain gain, double absResTrunc=-1, bool adjust=false, bool zeroTime=false) const
Definition: DigitMonitor.cxx:563
LArSamples::MonitorBase::nChannels
unsigned int nChannels() const
Definition: LArCalorimeter/LArSamplesMon/src/MonitorBase.cxx:45
LArSamples::SimpleShape::add
bool add(unsigned int k, double value, double error)
Definition: SimpleShape.cxx:92
LArSamples::DigitMonitor::noiseDist
TH1D * noiseDist(const TString &name, int nBins, double max) const
Definition: DigitMonitor.cxx:49
LArSamples::ShapeErrorData::xip
const TVectorD & xip() const
Definition: ShapeErrorData.h:41
compareGeometries.outputFile
string outputFile
Definition: compareGeometries.py:25
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
LArSamples::History::data
const Data * data(unsigned int i) const
Definition: History.cxx:88
LArSamples::DigitMonitor::shapeErrorDist
TH1D * shapeErrorDist(unsigned int k, const TString &name, int nBins, double rMin, double rMax, double mean=0) const
Definition: DigitMonitor.cxx:439
LArSamples::DigitMonitor::makeResidualCorrections
bool makeResidualCorrections(const TString &outputFile, short resTrunc=-1, short timeTrunc=-1, double absResTrunc=-1, unsigned int minSize=0, bool weigh=false, bool adjust=false, bool zeroTime=false) const
Definition: DigitMonitor.cxx:574
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
LArSamples::DigitMonitor::gainDist
TH1D * gainDist(const TString &name) const
Definition: DigitMonitor.cxx:181
LArSamples::MaxValue
@ MaxValue
Definition: LArCalorimeter/LArSamplesMon/LArSamplesMon/MonitorBase.h:27
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
lumiFormat.i
int i
Definition: lumiFormat.py:92
D3PDSizeSummary.ff
ff
Definition: D3PDSizeSummary.py:305
h
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
beamspotman.n
n
Definition: beamspotman.py:731
extractSporadic.h
list h
Definition: extractSporadic.py:97
LArSamples::Definitions::none
static const double none
Definition: Definitions.h:17
CombinedShapeErrorGetter.h
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LArSamples::History::setShapeErrorGetter
void setShapeErrorGetter(const AbsShapeErrorGetter *err) const
Definition: History.h:92
LArSamples::DigitMonitor::residualPlotsGainComp
bool residualPlotsGainComp(CaloId calo, unsigned int layer, bool ring=false, bool xip=false, double lo=-0.05, double hi=0.05, const TString &fileName="residuals")
Definition: DigitMonitor.cxx:359
covarianceTool.title
title
Definition: covarianceTool.py:542
LArSamples::ShapeErrorData::xipErr
const CovMatrix & xipErr() const
Definition: ShapeErrorData.h:43
LArSamples::DigitMonitor::residualDist
TH1D * residualDist(unsigned int k, const TString &name, int nBins, double rMin, double rMax, bool norm=false) const
Definition: DigitMonitor.cxx:212
GetAllXsec.kFactor
kFactor
Definition: GetAllXsec.py:95
LArSamples::ShapeErrorType
ShapeErrorType
Definition: Definitions.h:21
LArSamples::DigitMonitor::layerDist
TH1D * layerDist(const TString &name) const
Definition: DigitMonitor.cxx:196
LArSamples::PartitionId
PartitionId
Definition: CaloId.h:29
LArSamples::ShapeErrorData::xiErr
const CovMatrix & xiErr() const
Definition: ShapeErrorData.h:42
LArSamples::History::nData
unsigned int nData() const
Definition: History.h:56
LArSamples::Residuals::calculator
ResidualCalculator * calculator(bool weigh=false) const
Definition: LArCalorimeter/LArSamplesMon/src/Residual.cxx:185
LArSamples::History::chi2
double chi2(int i, int lwb=-1, int upb=-1, int chi2Params=DefaultChi2, ShapeErrorType shapeErrorType=BestShapeError, unsigned int *nDof=0) const
Definition: History.cxx:161
selection
std::string selection
Definition: fbtTestBasics.cxx:73
LArSamples::OFC
Definition: OFC.h:27
LArSamples::Residuals
Definition: LArCalorimeter/LArSamplesMon/LArSamplesMon/Residual.h:72
LArSamples::Data::_ofcTime
double _ofcTime(const DataFuncArgs &) const
Definition: Data.h:197
dumpTgcDigiJitter.nBins
list nBins
Definition: dumpTgcDigiJitter.py:29
LArSamples::AbsLArCells::pass
const History * pass(unsigned int i, const FilterParams &f) const
Definition: AbsLArCells.cxx:97
LArSamples::DigitMonitor::maxValueMap
TH2D * maxValueMap(TString name, PartitionId partition) const
Definition: DigitMonitor.cxx:52
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
LArSamples::AbsShape::maxValue
double maxValue(bool withErrors=false) const
Definition: AbsShape.cxx:30
LArSamples::SimpleShape::scaleAndShift
static bool scaleAndShift(SimpleShape *&s1, double scale, double shift=0)
Definition: SimpleShape.cxx:142
LArSamples::Data::_minValue
double _minValue(const DataFuncArgs &) const
Definition: Data.h:205
LArSamples::Residuals::truncate
Residuals * truncate(double nWidthsRes, double nWidthsTime=-1, unsigned int nMax=0) const
Definition: LArCalorimeter/LArSamplesMon/src/Residual.cxx:143
LArSamples::Data::gain
CaloGain::CaloGain gain() const
Definition: Data.h:90
LArSamples::Data::_maxValue
double _maxValue(const DataFuncArgs &) const
Definition: Data.h:204
LArSamples::Data::_noise
double _noise(const DataFuncArgs &) const
Definition: Data.h:203
LArSamples::DigitMonitor::fitChi2
static TF1 * fitChi2(TH1D &h, const char *name, double xMin, double xMax, double nDof=-1, double fitMin=Definitions::none, double fitMax=Definitions::none)
Definition: DigitMonitor.cxx:114
LArSamples::MonitorBase::partitionMap
TH2D * partitionMap(const DataFuncSet &func, const DataFuncArgs &args, TString name, PartitionId partition, const TString &title="", CombinationType comb=AverageValue, const FilterParams &f=FilterParams()) const
Definition: LArCalorimeter/LArSamplesMon/src/MonitorBase.cxx:108
LArSamples::TreeShapeErrorGetter
Definition: TreeShapeErrorGetter.h:31
CaloGain::LARHIGHGAIN
@ LARHIGHGAIN
Definition: CaloGain.h:18
LArSamples::DigitMonitor::means
TVectorD means(int lwb, int upb)
Definition: DigitMonitor.h:84
LArSamples::CaloId
CaloId
Definition: CaloId.h:21
LArSamples::DigitMonitor::chi2Dist
TH1D * chi2Dist(const TString &name, int nBins, double max, double kFactor=0, double fitMax=-1, int lwb=-1, int upb=-1, unsigned int chi2Pars=DefaultChi2, ShapeErrorType shapeErrorType=BestShapeError, unsigned int nDof=0) const
Definition: DigitMonitor.cxx:59
LArSamples::Data::_energy
double _energy(const DataFuncArgs &) const
Definition: Data.h:196
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
LArSamples::FCAL
@ FCAL
Definition: CaloId.h:26
CaloGain::LARMEDIUMGAIN
@ LARMEDIUMGAIN
Definition: CaloGain.h:18
LArSamples::History::shapeErrorData
const ShapeErrorData * shapeErrorData(CaloGain::CaloGain gain, ShapeErrorType shapeErrorType=BestShapeError, const Residual *res=0) const
Definition: History.cxx:299
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
LArSamples::DigitMonitor::residualCorr
double residualCorr(unsigned int k1, unsigned int k2) const
Definition: DigitMonitor.cxx:459
ref
const boost::regex ref(r_ef)
LArSamples::Residuals::size
unsigned int size() const
Definition: LArCalorimeter/LArSamplesMon/LArSamplesMon/Residual.h:80
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LArSamples::History::adjust
History * adjust() const
Definition: History.cxx:256
StateLessPT_NewConfig.partition
partition
Definition: StateLessPT_NewConfig.py:49
LArSamples::DataFuncArgs
Definition: Data.h:39
LArSamples::CombinedShapeErrorGetter
Definition: CombinedShapeErrorGetter.h:18
LArSamples::CellInfo::region
short region() const
Definition: CellInfo.h:59
LArSamples::Data::xi
double xi(short sample, ShapeErrorType shapeErrorType=BestShapeError, CaloGain::CaloGain g=CaloGain::UNKNOWNGAIN, bool xip=false) const
Definition: Data.cxx:456
LArSamples::CellShapeError
@ CellShapeError
Definition: Definitions.h:21
Data.h
LArSamples::DigitMonitor::chi2Func
static TF1 * chi2Func(const char *name, double xMin, double xMax)
Definition: DigitMonitor.cxx:104
LArSamples::CellInfo::eta
double eta() const
Definition: CellInfo.h:93
LArSamples::ShapeErrorData
Definition: ShapeErrorData.h:19
History.h
CaloGain::LARLOWGAIN
@ LARLOWGAIN
Definition: CaloGain.h:18
LArSamples::ShapeErrorData::xi
const TVectorD & xi() const
Definition: ShapeErrorData.h:40
error
Definition: IImpactPoint3dEstimator.h:70
LArSamples::Geo::nPhiRings
static short nPhiRings()
Definition: Geometry.cxx:84
ReadOfcFromCool.ofc
ofc
Definition: ReadOfcFromCool.py:110
Interface.h
LArSamples::Data::_adcMax
double _adcMax(const DataFuncArgs &) const
Definition: Data.h:201
LArSamples::CellInfo::layer
short layer() const
Definition: CellInfo.h:53
LArSamples::RingShapeError
@ RingShapeError
Definition: Definitions.h:23
fitman.k
k
Definition: fitman.py:528
LArSamples::UniformShapeErrorGetter
Definition: UniformShapeErrorGetter.h:17