ATLAS Offline Software
ScaledShiftedShape.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_ScaledShiftedShape_H
11 #define LArSamples_ScaledShiftedShape_H
12 
13 #include "LArCafJobs/AbsShape.h"
14 
15 namespace LArSamples {
16 
18 
19  public:
20 
22  ScaledShiftedShape(const AbsShape& base, double scaling = 1, double shift = 0)
23  : m_base(&base), m_scaling(scaling), m_shift(shift) { }
24 
26  : AbsShape(), m_base(&other.base()), m_scaling(other.scaling()), m_shift(other.shift()) { }
27 
28  virtual ~ScaledShiftedShape() { }
29 
30  const AbsShape& base() const { return *m_base; }
31  double scaling() const { return m_scaling; }
32  double shift() const { return m_shift; }
33 
34  unsigned int nPoints() const { return base().nPoints(); }
35  double value(unsigned int i) const { return scaling()*base().value(i); }
36  double error(unsigned int i) const { return scaling()*base().error(i); }
37  double time(unsigned int i) const { return base().time(i) + shift(); }
38  double covariance(unsigned int i, unsigned int j) const { return base().covariance(i, j)*scaling()*scaling(); }
39 
40  private:
41 
42  const AbsShape* m_base;
43  double m_scaling, m_shift;
44  };
45 }
46 
47 #endif
48 
base
std::string base
Definition: hcg.cxx:78
LArSamples::ScaledShiftedShape
Definition: ScaledShiftedShape.h:17
AbsShape.h
LArSamples::ScaledShiftedShape::~ScaledShiftedShape
virtual ~ScaledShiftedShape()
Definition: ScaledShiftedShape.h:28
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::ScaledShiftedShape::error
double error(unsigned int i) const
Definition: ScaledShiftedShape.h:36
LArSamples::ScaledShiftedShape::value
double value(unsigned int i) const
Definition: ScaledShiftedShape.h:35
LArSamples
Definition: AbsShape.h:24
LArSamples::ScaledShiftedShape::shift
double shift() const
Definition: ScaledShiftedShape.h:32
LArSamples::ScaledShiftedShape::nPoints
unsigned int nPoints() const
Definition: ScaledShiftedShape.h:34
LArSamples::ScaledShiftedShape::covariance
double covariance(unsigned int i, unsigned int j) const
Definition: ScaledShiftedShape.h:38
LArSamples::ScaledShiftedShape::base
const AbsShape & base() const
Definition: ScaledShiftedShape.h:30
lumiFormat.i
int i
Definition: lumiFormat.py:85
LArSamples::ScaledShiftedShape::m_base
const AbsShape * m_base
Definition: ScaledShiftedShape.h:42
LArSamples::ScaledShiftedShape::scaling
double scaling() const
Definition: ScaledShiftedShape.h:31
LArSamples::ScaledShiftedShape::time
double time(unsigned int i) const
Definition: ScaledShiftedShape.h:37
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
LArSamples::AbsShape
Definition: AbsShape.h:28
LArSamples::ScaledShiftedShape::m_shift
double m_shift
Definition: ScaledShiftedShape.h:43
LArSamples::ScaledShiftedShape::ScaledShiftedShape
ScaledShiftedShape(const ScaledShiftedShape &other)
Definition: ScaledShiftedShape.h:25
LArSamples::ScaledShiftedShape::ScaledShiftedShape
ScaledShiftedShape(const AbsShape &base, double scaling=1, double shift=0)
Constructor
Definition: ScaledShiftedShape.h:22