ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCafJobs
LArCafJobs
ShapeInfo.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
10
11
#ifndef LArSamples_ShapeInfo_H
12
#define LArSamples_ShapeInfo_H
13
14
#include <vector>
15
#include "
CxxUtils/checker_macros.h
"
16
17
class
TH1D;
18
class
TGraph;
19
20
namespace
LArSamples
{
21
22
class
SimpleShape;
23
24
class
ATLAS_NOT_THREAD_SAFE
ShapeInfo
final {
25
26
public
:
27
29
ShapeInfo
(
unsigned
char
nSamples
= 5,
unsigned
char
binSize
= 3,
30
unsigned
char
nPhases
= 8,
float
shift
= 0);
31
32
ShapeInfo
(
const
ShapeInfo
& other);
33
34
~ShapeInfo
();
35
37
unsigned
int
nPoints
()
const
{
return
m_values
.size() + 1; }
// add one more point by extrapolation
38
unsigned
char
binSize
()
const
{
return
m_binSize
; }
// in ns. 3 ns for now, may move to 1 ns
39
unsigned
char
nSamples
()
const
{
return
m_nSamples
; }
40
unsigned
char
nPhases
()
const
{
return
m_nPhases
; }
41
unsigned
int
nIntervals
()
const
{
return
nBuckets
/
binSize
(); }
42
float
shift
()
const
{
return
m_shift
+
m_timeShift
; }
43
44
//double timeInterval() const { return (1.0*samplingTime()/nIntervals()); }
45
//double startTime() const { return -shift()*timeInterval(); }
46
48
double
value(
unsigned
int
i)
const
;
49
//double covariance(unsigned int /*i*/, unsigned int /*j*/) const { return 0; }
50
unsigned
char
phase(
unsigned
int
i)
const
;
51
52
void
set
(
unsigned
char
iSample,
unsigned
char
iPhase,
float
value);
53
54
bool
isValid
()
const
;
55
double
footprint
()
const
{
return
sizeof
(*this) +
m_values
.size()*
sizeof
(short); }
56
57
// MIG: TBR
58
//SimpleShape* simpleShape(double scale = 1, double shift = 0) const;
59
//SimpleShape* sampleShape(double scale = 1, double shift = 0) const;
60
//void Draw() const;
61
62
static
constexpr
unsigned
int
nBuckets
= 24;
63
64
static
double
timeShift
() {
return
m_timeShift
; }
65
static
void
setTimeShift
(
double
shift
= 0) {
m_timeShift
=
shift
; }
66
67
private
:
68
69
std::vector<short>
m_values
;
70
unsigned
char
m_nSamples
,
m_binSize
,
m_nPhases
;
71
float
m_shift
;
72
static
double
m_timeShift
;
// specify a global time shift between first sample time and reported ofc time
73
74
ShapeInfo
&
operator=
(
const
ShapeInfo
&);
75
};
76
}
77
78
#endif
79
operator=
ElementLink & operator=(const ElementLink &)=default
isValid
bool isValid() const
Test to see if the link can be dereferenced.
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::ShapeInfo::m_timeShift
static double m_timeShift
Definition
ShapeInfo.h:72
LArSamples::ShapeInfo::m_binSize
unsigned char m_binSize
Definition
ShapeInfo.h:70
LArSamples::ShapeInfo::setTimeShift
static void setTimeShift(double shift=0)
Definition
ShapeInfo.h:65
LArSamples::ShapeInfo::m_nSamples
unsigned char m_nSamples
Definition
ShapeInfo.h:70
LArSamples::ShapeInfo::m_shift
float m_shift
Definition
ShapeInfo.h:71
LArSamples::ShapeInfo::footprint
double footprint() const
Definition
ShapeInfo.h:55
LArSamples::ShapeInfo::nPhases
unsigned char nPhases() const
Definition
ShapeInfo.h:40
LArSamples::ShapeInfo::shift
float shift() const
Definition
ShapeInfo.h:42
LArSamples::ShapeInfo::timeShift
static double timeShift()
Definition
ShapeInfo.h:64
LArSamples::ShapeInfo::binSize
unsigned char binSize() const
Definition
ShapeInfo.h:38
LArSamples::ShapeInfo::nBuckets
static constexpr unsigned int nBuckets
Definition
ShapeInfo.h:62
LArSamples::ShapeInfo::nPoints
unsigned int nPoints() const
Definition
ShapeInfo.h:37
LArSamples::ShapeInfo::m_values
std::vector< short > m_values
Definition
ShapeInfo.h:69
LArSamples::ShapeInfo::ShapeInfo
ShapeInfo(unsigned char nSamples=5, unsigned char binSize=3, unsigned char nPhases=8, float shift=0)
Constructor.
Definition
ShapeInfo.cxx:28
LArSamples::ShapeInfo::nIntervals
unsigned int nIntervals() const
Definition
ShapeInfo.h:41
LArSamples::ShapeInfo::m_nPhases
unsigned char m_nPhases
Definition
ShapeInfo.h:70
LArSamples::ShapeInfo::nSamples
unsigned char nSamples() const
Definition
ShapeInfo.h:39
set
STL class.
LArSamples
Definition
AbsShape.h:24
Generated on
for ATLAS Offline Software by
1.17.0