ATLAS Offline Software
AbsShape.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
11 #ifndef LArSamples_AbsShape_H
12 #define LArSamples_AbsShape_H
13 
14 #include "TArrayI.h"
15 #include "TVectorD.h"
16 #include "TMatrixD.h"
18 
19 #include "LArCafJobs/Definitions.h"
20 
21 class TH1D;
22 class TGraphErrors;
23 
24 namespace LArSamples {
25 
26  class SimpleShape;
27 
29 
30  public:
31 
32  virtual ~AbsShape() { }
33 
35  virtual unsigned int nPoints() const = 0;
36  virtual double value(unsigned int i) const = 0;
37  virtual double covariance(unsigned int i, unsigned int j) const = 0;
38  virtual double time(unsigned int i) const = 0;
39 
40  virtual double error(unsigned int i) const;
41  TVectorD values(int lwb, int upb) const;
42 
43  int findTimeInterval(double time) const;
44  int interpolate(double time, double& value, double& error) const;
45  int interpolateDiff(double time, double& diff) const;
46  bool interpolate(const AbsShape& other, TVectorD& values, CovMatrix& errors, int lwb = -1, int upb = -1) const;
47  bool interpolateDiff(const AbsShape& other, TVectorD& diffs, int lwb = -1, int upb = -1) const;
48 
49  // From AbsShape
50  CovMatrix covarianceMatrix(int lwb = -1, int upb = -1,
51  const CovMatrix& refErr = CovMatrix(),
52  bool withCorrs = true) const;
53 
54  CovMatrix invCovarianceMatrix(int lwb = -1, int upb = -1,
55  const CovMatrix& refErr = CovMatrix(),
56  bool withCorrs = true) const;
57 
58  CovMatrix covarianceMatrix(unsigned int nPoints, bool withCorrs = true) const;
59  CovMatrix invCovarianceMatrix(unsigned int nPoints, bool withCorrs = true) const;
60 
62  double maxValue(bool withErrors = false) const;
63  double minValue(bool withErrors = false) const;
64  int maxPosition() const;
65  int minPosition() const;
66 
67  TGraphErrors* graph(bool timeInUnitOfSamples = false) const;
68  SimpleShape* resample(unsigned int nPts) const;
69 
70  protected:
71 
72  AbsShape() { }
73  };
74 }
75 #endif
76 
LArSamples::AbsShape::covariance
virtual double covariance(unsigned int i, unsigned int j) const =0
maxValue
#define maxValue(current, test)
Definition: CompoundLayerMaterialCreator.h:22
LArSamples::AbsShape::AbsShape
AbsShape()
Definition: AbsShape.h:72
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
LArSamples::CovMatrix
TMatrixTSym< double > CovMatrix
Definition: Definitions.h:11
LArSamples::AbsShape::value
virtual double value(unsigned int i) const =0
TH1D
Definition: rootspy.cxx:342
LArSamples::SimpleShape
Definition: SimpleShape.h:25
mc.diff
diff
Definition: mc.SFGenPy8_MuMu_DD.py:14
athena.value
value
Definition: athena.py:122
LArSamples
Definition: AbsShape.h:24
LArSamples::AbsShape::~AbsShape
virtual ~AbsShape()
Definition: AbsShape.h:32
python.Bindings.values
values
Definition: Control/AthenaPython/python/Bindings.py:797
lumiFormat.i
int i
Definition: lumiFormat.py:92
Definitions.h
mergePhysValFiles.errors
list errors
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:43
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
LArSamples::AbsShape
Definition: AbsShape.h:28
CaloClusterCorr::interpolate
float interpolate(const CaloRec::Array< 2 > &a, float x, unsigned int degree, unsigned int ycol=1, const CaloRec::Array< 1 > &regions=CaloRec::Array< 1 >(), int n_points=-1, bool fixZero=false)
Polynomial interpolation in a table.
Definition: interpolate.cxx:75
get_generator_info.error
error
Definition: get_generator_info.py:40
checker_macros.h
Define macros for attributes used to control the static checker.
LArSamples::AbsShape::time
virtual double time(unsigned int i) const =0
error
Definition: IImpactPoint3dEstimator.h:70
minValue
#define minValue(current, test)
Definition: CompoundLayerMaterialCreator.h:21
LArSamples::AbsShape::nPoints
virtual unsigned int nPoints() const =0