ATLAS Offline Software
Loading...
Searching...
No Matches
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
9
10#ifndef LArSamples_ScaledShiftedShape_H
11#define LArSamples_ScaledShiftedShape_H
12
13#include "LArCafJobs/AbsShape.h"
14
15namespace LArSamples {
16
18
19 public:
20
22 ScaledShiftedShape(const AbsShape& base, double scaling = 1, double shift = 0)
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
44 };
45}
46
47#endif
48
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
double time(unsigned int i) const
double value(unsigned int i) const
ScaledShiftedShape(const AbsShape &base, double scaling=1, double shift=0)
Constructor.
double covariance(unsigned int i, unsigned int j) const
const AbsShape & base() const
double error(unsigned int i) const
ScaledShiftedShape(const ScaledShiftedShape &other)
std::string base
Definition hcg.cxx:81