ATLAS Offline Software
Loading...
Searching...
No Matches
DigitMonitor.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
9
10#ifndef LArSamples_DigitMonitor_H
11#define LArSamples_DigitMonitor_H
12
13#include "TString.h"//value set as default
14
16#include "LArSamplesMon/Chi2Calc.h" //value set as default
17#include "LArCafJobs/CaloId.h" //enum
18#include "CaloIdentifier/CaloGain.h" //value set as default
19
20class TF1;
21class TH1D;
22class TH2D;
23
24namespace LArSamples {
25 class SimpleShape;
26 class Residuals;
27
29 {
30
31 public:
32
35
36 TH1D* chi2Dist(const TString& name, int nBins, double max, double kFactor = 0, double fitMax = -1,
37 int lwb = -1, int upb = -1, unsigned int chi2Pars = DefaultChi2, ShapeErrorType shapeErrorType = BestShapeError,
38 unsigned int nDof = 0) const;
39
40 static TF1* chi2Func(const char* name, double xMin, double xMax);
41 static TF1* fitChi2(TH1D& h, const char* name, double xMin, double xMax, double nDof = -1,
42 double fitMin = Definitions::none, double fitMax = Definitions::none);
43
44 TH1D* bestChi2Dist(const TString& name, int nBins, double max,
45 double refErrMin, double refErrMax, unsigned int refErrNBins,
46 int lwb = -1, int upb = -1, unsigned int chi2Pars = DefaultChi2,
47 unsigned int nDof = 0) const;
48
49 TH1D* gainDist(const TString& name) const;
50 TH1D* layerDist(const TString& name) const;
51
52 TH1D* energyDist(const TString& name, int nBins, double eMax = 10000) const;
53 TH1D* timeDist(const TString& name, int nBins, double tMin = -25, double tMax = 25) const;
54 TH1D* adcMaxDist(const TString& name, int nBins, double aMin = 0, double aMax = 4096) const;
55 TH1D* noiseDist(const TString& name, int nBins, double max) const;
56
57 TH2D* maxValueMap(TString name, PartitionId partition) const;
58 TH2D* minValueMap(TString name, PartitionId partition) const;
59
60 TH1D* residualDist(unsigned int k, const TString& name, int nBins, double rMin, double rMax, bool norm = false) const;
61
62 bool residualPlots(CaloId calo, unsigned int layer, CaloGain::CaloGain gain = CaloGain::LARHIGHGAIN, bool xip = false, bool ring = false,
63 double lo = -0.05, double hi = 0.05, const TString& fileName = "residuals");
64 bool residualPlotsRingComp(CaloId calo, unsigned int layer, CaloGain::CaloGain gain = CaloGain::LARHIGHGAIN, bool xip = false,
65 double lo = -0.05, double hi = 0.05, const TString& fileName = "residuals");
66 bool residualPlotsGainComp(CaloId calo, unsigned int layer, bool ring = false, bool xip = false,
67 double lo = -0.05, double hi = 0.05, const TString& fileName = "residuals");
68
69 TH1D* shapeErrorDist(unsigned int k, const TString& name, int nBins, double rMin, double rMax, double mean = 0) const;
70 double residualCorr(unsigned int k1, unsigned int k2) const;
71
72 bool makeResidualCorrections(const TString& outputFile, short resTrunc = -1, short timeTrunc = -1,
73 double absResTrunc = -1, unsigned int minSize = 0,
74 bool weigh = false, bool adjust = false, bool zeroTime = false) const;
75 Residuals* getResiduals(unsigned int hash, CaloGain::CaloGain gain, double absResTrunc = -1, bool adjust = false, bool zeroTime = false) const;
76
77 bool residualParams(int lwb, int upb, CovMatrix& k, TVectorD& means) const;
78 CovMatrix kMatrix(int lwb, int upb) { CovMatrix k; TVectorD means; residualParams(lwb, upb, k, means); return k; }
79 TVectorD means(int lwb, int upb) { CovMatrix k; TVectorD means; residualParams(lwb, upb, k, means); return means; }
80
81 int combine(SimpleShape*& shape, SimpleShape*& ref, const TString& selection = "", bool timeAligned = true) const;
82 };
83}
84
85#endif
const boost::regex ref(r_ef)
#define max(a, b)
Definition cfImp.cxx:41
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Header file for AthHistogramAlgorithm.
CovMatrix kMatrix(int lwb, int upb)
bool residualParams(int lwb, int upb, CovMatrix &k, TVectorD &means) const
DigitMonitor(const Interface &interface)
Constructor.
TVectorD means(int lwb, int upb)
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="")
const std::string selection
@ LARHIGHGAIN
Definition CaloGain.h:18
@ DefaultChi2
Definition Chi2Calc.h:24