ATLAS Offline Software
OFC.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
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 
19 #include "LArCafJobs/Definitions.h"
21 
22 namespace 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 { return B(data)/A(data); }
78 
79  const CovMatrix& invGamma() const { return m_invGamma; }
80  const CovMatrix& Gamma() const { return m_Gamma; }
81 
82  double dot(const TVectorD& form, const TVectorD& v) const;
83  TVectorD residual(const TVectorD& v) const;
84 
85  private:
86 
87  TVectorD m_g, m_gp, m_a, m_b;
88  double m_G = 0.0, m_Gp = 0.0, m_Gpp = 0.0;
90  TMatrixD m_resProj;
91  std::vector<TVectorD> m_r;
92  std::vector<unsigned int> m_rIdx;
93  };
94 }
95 
96 #endif
97 
LArSamples::OFC::m_gp
TVectorD m_gp
Definition: OFC.h:87
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
LArSamples::OFC::resProj
const TMatrixD & resProj() const
Definition: OFC.h:73
LArSamples::OFC::Gamma
const CovMatrix & Gamma() const
Definition: OFC.h:80
LArSamples::OFC::a
double a(unsigned int i) const
Definition: OFC.h:64
IndexRange.h
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
ClusterSeg::residual
@ residual
Definition: ClusterNtuple.h:20
LArSamples::CovMatrix
TMatrixTSym< double > CovMatrix
Definition: Definitions.h:11
LArSamples::OFC::b
const TVectorD & b() const
Definition: OFC.h:68
LArSamples::OFC::a
const TVectorD & a() const
Definition: OFC.h:67
LArSamples::OFC::gp
double gp(unsigned int i) const
Definition: OFC.h:55
LArSamples::OFC::Gpp
double Gpp() const
Definition: OFC.h:62
LArSamples
Definition: AbsShape.h:24
LArSamples::OFC::Gp
double Gp() const
Definition: OFC.h:61
LArSamples::OFC::m_resProj
TMatrixD m_resProj
Definition: OFC.h:90
LArSamples::OFC::g
double g(unsigned int i) const
Definition: OFC.h:54
LArSamples::OFC::rIdx
unsigned int rIdx(unsigned int i) const
Definition: OFC.h:71
LArSamples::OFC::upb
int upb() const
Definition: OFC.h:52
lumiFormat.i
int i
Definition: lumiFormat.py:92
ShapeErrorData
Liquid Argon class for standalone storage of cell shape information.
LArSamples::OFC::nSamples
unsigned int nSamples() const
Definition: OFC.h:49
LArSamples::OFC::r
const TVectorD & r(unsigned int i) const
Definition: OFC.h:70
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
LArSamples::OFC::G
double G() const
Definition: OFC.h:60
LArSamples::OFC::gp
const TVectorD & gp() const
Definition: OFC.h:58
LArSamples::OFC::g
const TVectorD & g() const
Definition: OFC.h:57
dot.dot
def dot(G, fn, nodesToHighlight=[])
Definition: dot.py:5
Definitions.h
LArSamples::OFC
Definition: OFC.h:27
LArSamples::OFC::lwb
int lwb() const
Definition: OFC.h:51
LArSamples::OFC::m_rIdx
std::vector< unsigned int > m_rIdx
Definition: OFC.h:92
LArSamples::OFC::b
double b(unsigned int i) const
Definition: OFC.h:65
python.PyAthena.v
v
Definition: PyAthena.py:157
LArSamples::OFC::OFC
OFC(const OFC &other)
Definition: OFC.h:41
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
LArSamples::OFC::m_r
std::vector< TVectorD > m_r
Definition: OFC.h:91
LArSamples::AbsShape
Definition: AbsShape.h:28
LArSamples::IndexRange
storage of the time histories of all the cells
Definition: IndexRange.h:19
LArSamples::ShapeErrorData
Definition: ShapeErrorData.h:19
LArSamples::FitterData::sed
const ScaledErrorData * sed
Definition: ShapeFitter.cxx:26
checker_macros.h
Define macros for attributes used to control the static checker.
LArSamples::OFC::time
double time(const AbsShape &data) const
Definition: OFC.h:77
LArSamples::OFC::m_invGamma
CovMatrix m_invGamma
Definition: OFC.h:89
LArSamples::OFC::invGamma
const CovMatrix & invGamma() const
Definition: OFC.h:79