ATLAS Offline Software
Loading...
Searching...
No Matches
Chi2Calc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
9
10#ifndef LArSamples_Chi2Calc_H
11#define LArSamples_Chi2Calc_H
12
14#include "TArrayI.h"
15#include "TVectorD.h"
16#include "LArCafJobs/AbsShape.h"
18
19namespace LArSamples {
20
21 class OFC;
22 class ScaledErrorData;
23
24 enum Chi2Params { DefaultChi2 = 0, NoCorrs = 1, BasicChi2 = 2, OFCChi2 = 4 };
25
27
28 public:
29
31 Chi2Calc(int pars = 0)
32 : m_pars(pars), m_lwb(-1), m_upb(-1) { }
33
34 virtual ~Chi2Calc() { }
35
36 TVectorD deltas(const AbsShape& data, const AbsShape& reference, CovMatrix& errors, const ScaledErrorData* shapeError = 0,
37 int lwb = -1, int upb = -1, bool noDataError = false);
38
39 double chi2(const AbsShape& data, const AbsShape& reference, const ScaledErrorData* shapeError = 0,
40 int lwb = -1, int upb = -1);
41
42 // From AbsShape
43 double scalarProduct(const TVectorD& values1, const TVectorD& values2, const CovMatrix& invCovMat) const;
44
45 int lwb() const { return m_lwb; }
46 int upb() const { return m_upb; }
47 unsigned int nDof() const { return upb() - lwb() + 1; }
48
49 bool bestRescale(const AbsShape& data, const AbsShape& reference, double& k, double& chi2, double deltaT = 0,
50 const ScaledErrorData* sed = 0, unsigned int minNDof = 0) const;
51
52 private:
53
54 bool useCorrs() const { return !(m_pars & NoCorrs); }
55
56 int m_pars;
57
59 };
60}
61#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Chi2Calc(int pars=0)
Constructor (takes ownership of LArCellInfo object)
Definition Chi2Calc.h:31
int upb() const
Definition Chi2Calc.h:46
int lwb() const
Definition Chi2Calc.h:45
bool useCorrs() const
Definition Chi2Calc.h:54
virtual ~Chi2Calc()
Definition Chi2Calc.h:34
unsigned int nDof() const
Definition Chi2Calc.h:47
storage of the time histories of all the cells
Definition IndexRange.h:19
Liquid Argon class for standalone storage of cell shape information.
double chi2(TH1 *h0, TH1 *h1)
@ DefaultChi2
Definition Chi2Calc.h:24