ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCafJobs
LArCafJobs
SimpleShape.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
10
11
#ifndef LArSamples_SimpleShape_H
12
#define LArSamples_SimpleShape_H
13
14
#include "
LArCafJobs/AbsShape.h
"
15
#include <vector>
16
#include "
CxxUtils/checker_macros.h
"
17
#include <memory>
18
class
TH1D;
19
class
TGraph;
20
21
namespace
LArSamples
{
22
23
class
ShapeInfo;
24
25
class
ATLAS_NOT_THREAD_SAFE
SimpleShape
:
public
AbsShape
{
26
27
public
:
28
30
SimpleShape
(
const
std::vector<double>&
values
,
const
std::vector<double>& errors,
31
double
timeInterval
= 25,
double
startTime
= 0);
32
33
SimpleShape
(
unsigned
int
nPoints
,
double
timeInterval
= 25,
double
startTime
= 0);
34
35
SimpleShape
(
const
SimpleShape
& other) :
36
AbsShape
(),
37
m_values
(other.
m_values
),
m_errors
(other.
m_errors
),
38
m_timeInterval
(other.
m_timeInterval
),
m_startTime
(other.
m_startTime
) { }
39
40
SimpleShape
(
const
ShapeInfo
& shapeInfo,
double
scale = 1,
double
shift = 0,
bool
samplingTimeOnly =
false
);
41
SimpleShape
(
const
AbsShape
& other,
double
scale = 1,
double
shift = 0);
42
43
virtual
~SimpleShape
() { }
44
45
double
timeInterval
()
const
{
return
m_timeInterval
; }
46
double
startTime
()
const
{
return
m_startTime
; }
47
48
unsigned
int
nPoints
()
const
{
return
m_values
.size(); }
49
double
value
(
unsigned
int
i)
const
{
return
(i <
m_values
.size() ?
m_values
[i] : -1E99); }
50
double
time(
unsigned
int
i)
const
;
51
double
covariance
(
unsigned
int
i,
unsigned
int
j)
const
{
return
(i == j ?
m_errors
[i]*
m_errors
[i] : 0); }
52
53
void
set
(
unsigned
int
i,
double
value
,
double
error
= -1) {
m_values
[i] =
value
;
if
(
error
> 0)
m_errors
[i] =
error
; }
54
void
setError
(
unsigned
int
i,
double
error
) {
m_errors
[i] =
error
; }
55
56
SimpleShape
*
diff
()
const
;
57
58
bool
add
(
unsigned
int
k,
double
value,
double
error
);
59
SimpleShape
*
add
(
const
AbsShape
& other,
double
scale = 1,
double
shift = 0);
60
SimpleShape
* createEmpty()
const
;
61
TH1D*
histogram
(
const
char
* name =
"shape"
,
const
char
* title =
""
,
bool
timeInUnitOfSamples =
false
)
const
;
62
63
static
bool
add
(std::unique_ptr<SimpleShape>& s1,
const
AbsShape
& s2);
64
static
bool
scaleAndShift(std::unique_ptr<SimpleShape>& s1,
double
scale,
double
shift = 0);
65
66
private
:
67
68
std::vector<double>
m_values
,
m_errors
;
69
double
m_timeInterval
{}, m_startTime{};
70
71
SimpleShape
&
operator=
(
const
SimpleShape
&);
72
};
73
}
74
75
#endif
76
AbsShape.h
operator=
ElementLink & operator=(const ElementLink &)=default
diff
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
Definition
Jet.cxx:631
histogram
std::string histogram
Definition
chains.cxx:52
checker_macros.h
Define macros for attributes used to control the static checker.
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::AbsShape
Definition
AbsShape.h:28
LArSamples::AbsShape::values
TVectorD values(int lwb, int upb) const
Definition
AbsShape.cxx:135
LArSamples::AbsShape::AbsShape
AbsShape()
Definition
AbsShape.h:72
LArSamples::ShapeInfo
Definition
ShapeInfo.h:24
LArSamples::SimpleShape
Definition
SimpleShape.h:25
LArSamples::SimpleShape::nPoints
unsigned int nPoints() const
Definition
SimpleShape.h:48
LArSamples::SimpleShape::SimpleShape
SimpleShape(const std::vector< double > &values, const std::vector< double > &errors, double timeInterval=25, double startTime=0)
Constructor.
Definition
SimpleShape.cxx:15
LArSamples::SimpleShape::SimpleShape
SimpleShape(const SimpleShape &other)
Definition
SimpleShape.h:35
LArSamples::SimpleShape::timeInterval
double timeInterval() const
Definition
SimpleShape.h:45
LArSamples::SimpleShape::set
void set(unsigned int i, double value, double error=-1)
Definition
SimpleShape.h:53
LArSamples::SimpleShape::~SimpleShape
virtual ~SimpleShape()
Definition
SimpleShape.h:43
LArSamples::SimpleShape::m_errors
std::vector< double > m_errors
Definition
SimpleShape.h:68
LArSamples::SimpleShape::m_timeInterval
double m_timeInterval
Definition
SimpleShape.h:69
LArSamples::SimpleShape::startTime
double startTime() const
Definition
SimpleShape.h:46
LArSamples::SimpleShape::setError
void setError(unsigned int i, double error)
Definition
SimpleShape.h:54
LArSamples::SimpleShape::covariance
double covariance(unsigned int i, unsigned int j) const
Definition
SimpleShape.h:51
LArSamples::SimpleShape::m_values
std::vector< double > m_values
Definition
SimpleShape.h:68
LArSamples::SimpleShape::value
double value(unsigned int i) const
Definition
SimpleShape.h:49
LArSamples::SimpleShape::m_startTime
double m_startTime
Definition
SimpleShape.h:69
add
bool add(const std::string &hname, TKey *tobj)
Definition
fastadd.cxx:55
LArSamples
Definition
AbsShape.h:24
error
Definition
IImpactPoint3dEstimator.h:72
Generated on
for ATLAS Offline Software by
1.17.0