ATLAS Offline Software
Loading...
Searching...
No Matches
OFC.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
9
10#ifndef LArSamples_OFC_H
11#define LArSamples_OFC_H
12
14#include "TMatrixD.h"
15#include "TVectorD.h"
16#include "TArrayI.h"
17#include <vector>
18
21
22namespace LArSamples {
23
24 class AbsShape;
25 class ShapeErrorData;
26
28
29 public:
30
32 OFC(const AbsShape& shape, const AbsShape& data, int lwb = -1, int upb = -1, const ShapeErrorData* sed = 0, bool withAutoCorr = true);
33
34 OFC(const AbsShape& shape, const AbsShape& data, const CovMatrix& refErr,
35 int lwb = -1, int upb = -1, const ShapeErrorData* sed = 0, bool withAutoCorr = true);
36
37 bool initGValues(const AbsShape& shape, const AbsShape& data, const ShapeErrorData* sed);
38 bool initOFCs(const AbsShape& data, const CovMatrix& refErr, bool useCorrs);
39 bool initRVectors();
40
41 OFC(const OFC& other) :
42 IndexRange(),
43 m_g(other.m_g), m_gp(other.m_gp), m_a(other.m_a), m_b(other.m_b),
44 m_G(other.m_G), m_Gp(other.m_Gp), m_Gpp(other.m_Gpp),
45 m_invGamma(other.m_invGamma) { }
46
47 virtual ~OFC();
48
49 unsigned int nSamples() const { return m_g.GetNoElements(); }
50
51 int lwb() const { return g().GetLwb(); }
52 int upb() const { return g().GetUpb(); }
53
54 double g(unsigned int i) const { return m_g[i]; }
55 double gp(unsigned int i) const { return m_gp[i]; }
56
57 const TVectorD& g() const { return m_g; }
58 const TVectorD& gp() const { return m_gp; }
59
60 double G() const { return m_G; }
61 double Gp() const { return m_Gp; }
62 double Gpp() const { return m_Gpp; }
63
64 double a(unsigned int i) const { return m_a[i]; }
65 double b(unsigned int i) const { return m_b[i]; }
66
67 const TVectorD& a() const { return m_a; }
68 const TVectorD& b() const { return m_b; }
69
70 const TVectorD& r(unsigned int i) const { return m_r[i]; }
71 unsigned int rIdx(unsigned int i) const { return m_rIdx[i]; }
72
73 const TMatrixD& resProj() const { return m_resProj; }
74
75 double A(const AbsShape& data) const;
76 double B(const AbsShape& data) const;
77 double time(const AbsShape& data) const {
78 double den = A(data);
79 return den == 0 ? 0 : B(data)/den;
80 }
81
82 const CovMatrix& invGamma() const { return m_invGamma; }
83 const CovMatrix& Gamma() const { return m_Gamma; }
84
85 double dot(const TVectorD& form, const TVectorD& v) const;
86 TVectorD residual(const TVectorD& v) const;
87
88 private:
89
90 TVectorD m_g, m_gp, m_a, m_b;
91 double m_G = 0.0, m_Gp = 0.0, m_Gpp = 0.0;
93 TMatrixD m_resProj;
94 std::vector<TVectorD> m_r;
95 std::vector<unsigned int> m_rIdx;
96 };
97}
98
99#endif
100
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
storage of the time histories of all the cells
Definition IndexRange.h:19
const CovMatrix & invGamma() const
Definition OFC.h:82
const TVectorD & b() const
Definition OFC.h:68
double m_Gp
Definition OFC.h:91
double Gp() const
Definition OFC.h:61
unsigned int rIdx(unsigned int i) const
Definition OFC.h:71
const TVectorD & a() const
Definition OFC.h:67
double Gpp() const
Definition OFC.h:62
double gp(unsigned int i) const
Definition OFC.h:55
OFC(const OFC &other)
Definition OFC.h:41
double a(unsigned int i) const
Definition OFC.h:64
const TVectorD & gp() const
Definition OFC.h:58
TVectorD m_gp
Definition OFC.h:90
OFC(const AbsShape &shape, const AbsShape &data, int lwb=-1, int upb=-1, const ShapeErrorData *sed=0, bool withAutoCorr=true)
Constructor.
Definition OFC.cxx:21
int upb() const
Definition OFC.h:52
int lwb() const
Definition OFC.h:51
bool initOFCs(const AbsShape &data, const CovMatrix &refErr, bool useCorrs)
Definition OFC.cxx:71
double B(const AbsShape &data) const
Definition OFC.cxx:156
unsigned int nSamples() const
Definition OFC.h:49
double G() const
Definition OFC.h:60
bool initGValues(const AbsShape &shape, const AbsShape &data, const ShapeErrorData *sed)
Definition OFC.cxx:46
const TVectorD & r(unsigned int i) const
Definition OFC.h:70
std::vector< unsigned int > m_rIdx
Definition OFC.h:95
TVectorD m_b
Definition OFC.h:90
const TVectorD & g() const
Definition OFC.h:57
bool initRVectors()
Definition OFC.cxx:131
TVectorD m_g
Definition OFC.h:90
double A(const AbsShape &data) const
Definition OFC.cxx:145
TMatrixD m_resProj
Definition OFC.h:93
const CovMatrix & Gamma() const
Definition OFC.h:83
std::vector< TVectorD > m_r
Definition OFC.h:94
double m_G
Definition OFC.h:91
double g(unsigned int i) const
Definition OFC.h:54
double m_Gpp
Definition OFC.h:91
double time(const AbsShape &data) const
Definition OFC.h:77
double b(unsigned int i) const
Definition OFC.h:65
CovMatrix m_invGamma
Definition OFC.h:92
CovMatrix m_Gamma
Definition OFC.h:92
const TMatrixD & resProj() const
Definition OFC.h:73
TVectorD m_a
Definition OFC.h:90
Liquid Argon class for standalone storage of cell shape information.
Definition dot.py:1
hold the test vectors and ease the comparison