ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArSamplesMon
LArSamplesMon
History.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
9
10
#ifndef LArSamples_History_H
11
#define LArSamples_History_H
12
13
#include "
LArCafJobs/Definitions.h
"
14
#include "
LArCafJobs/CellInfo.h
"
//member
15
#include "
LArSamplesMon/Chi2Calc.h
"
//for defaulted value
16
#include "
LArCafJobs/EventData.h
"
//implemented method
17
#include "TVectorD.h"
//typedef
18
#include <vector>
19
#include <memory>
20
21
class
TString;
22
23
namespace
LArSamples
{
24
25
class
Interface
;
26
class
Data
;
27
class
Averager
;
28
class
GraphShape
;
29
class
AbsShapeErrorGetter
;
30
class
ShapeErrorData
;
31
class
ScaledErrorData
;
32
class
Residual
;
33
class
Residuals
;
34
class
HistoryContainer
;
35
36
class
ATLAS_NOT_THREAD_SAFE
History
{
37
38
public
:
39
41
History
(
const
HistoryContainer
& container,
42
std::vector<std::unique_ptr<const EventData> >&&
eventData
,
unsigned
int
hash
,
43
const
AbsShapeErrorGetter
*
shapeErrorGetter
= 0);
44
45
History
(std::vector<std::unique_ptr<const Data> >&&
data
,
46
const
CellInfo
& info,
47
std::vector<std::unique_ptr<const EventData> >&&
eventData
,
48
unsigned
int
hash
,
const
AbsShapeErrorGetter
*
shapeErrorGetter
= 0);
49
50
virtual
~History
();
51
52
std::unique_ptr<HistoryContainer>
dissolve
();
53
54
unsigned
int
nData
()
const
{
return
m_data
.size(); }
55
const
Data
* data(
unsigned
int
i)
const
;
56
const
Data
* data_for_event(
int
event,
int
run
= -1)
const
;
57
const
Data
* data_for_event(
const
EventData
& eventData)
const
;
58
59
const
CellInfo
*
cellInfo
()
const
{
return
&
m_cellInfo
; }
60
61
const
std::vector<std::unique_ptr<const EventData> >&
eventData
()
const
{
return
m_eventData
; }
62
63
bool
sum(std::unique_ptr<SimpleShape>& sum,
64
std::unique_ptr<SimpleShape>&
reference
)
const
;
65
bool
allShape(std::unique_ptr<GraphShape>& allData,
66
std::unique_ptr<SimpleShape>& allRef)
const
;
67
double
allChi2(
Chi2Params
pars)
const
;
68
69
// helpers
70
double
chi2
(
int
i,
int
lwb = -1,
int
upb = -1,
int
chi2Params =
DefaultChi2
,
ShapeErrorType
shapeErrorType =
BestShapeError
,
unsigned
int
* nDof = 0)
const
;
71
double
chi2_k(
int
i,
double
k,
int
lwb = -1,
int
upb = -1,
int
chi2Params =
DefaultChi2
)
const
;
72
double
maxChi2(
int
lwb = -1,
int
upb = -1,
int
chi2Params =
DefaultChi2
)
const
;
73
74
std::unique_ptr<OFC> ofc(
unsigned
int
i,
int
lwb = -1,
int
upb = -1,
double
time =
Definitions::none
,
bool
useCorrs =
true
)
const
;
75
std::unique_ptr<History> refit(
Chi2Params
pars =
DefaultChi2
)
const
;
76
std::unique_ptr<History> adjust()
const
;
77
std::unique_ptr<History> filter(
const
TString& cuts)
const
;
78
79
bool
refVal(
unsigned
int
i,
unsigned
int
sample,
double
& val,
double
& err)
const
;
80
bool
delta(
unsigned
int
i,
unsigned
int
sample,
double
& del)
const
;
81
TVectorD deltas(
unsigned
int
i,
int
lwb = -1,
int
upb = -1,
bool
correct =
true
)
const
;
82
bool
isValid
()
const
;
83
84
TString
description
(
unsigned
int
verbosity = 1)
const
;
85
86
std::unique_ptr<SimpleShape> referenceShape(
unsigned
int
k,
double
adcMax = -1,
double
time =
Definitions::none
,
87
bool
samplesOnly =
false
)
const
;
88
89
std::unique_ptr<SimpleShape> deltaShape(
unsigned
int
k,
int
lwb = -1,
int
upb = -1)
const
;
90
91
unsigned
int
hash
()
const
{
return
m_hash
; }
92
//cppcheck-suppress danglingLifetime
93
void
setShapeErrorGetter
(
const
AbsShapeErrorGetter
* err)
const
{
m_shapeErrorGetter
= err; }
94
const
AbsShapeErrorGetter
*
shapeErrorGetter
()
const
{
return
m_shapeErrorGetter
; }
95
std::unique_ptr<const ShapeErrorData> shapeErrorData(
CaloGain::CaloGain
gain,
ShapeErrorType
shapeErrorType =
BestShapeError
,
const
Residual
*
res
= 0)
const
;
96
std::unique_ptr<const ScaledErrorData> scaledErrorData(
unsigned
int
i,
double
adcMax = -1,
double
time =
Definitions::none
,
ShapeErrorType
shapeErrorType =
BestShapeError
)
const
;
97
98
bool
residualOffset(
unsigned
int
i,
short
sample,
double
& offset,
double
adcMax = -1,
double
time =
Definitions::none
)
const
;
99
bool
residualError(
unsigned
int
i,
short
sample1,
short
sample2,
double
& offset,
double
adcMax = -1,
double
time =
Definitions::none
)
const
;
100
101
bool
drawWithReference(
int
i,
const
TString& atlasTitle =
""
)
const
;
102
bool
drawSumWithReference()
const
;
103
bool
drawAllWithReference(
bool
refit =
false
)
const
;
104
bool
drawResiduals(
int
k = -1,
bool
errors =
true
,
bool
rescale =
true
)
const
;
105
106
std::unique_ptr<Averager> calculatePedestal(
int
i)
const
;
107
std::unique_ptr<Residual> residual(
unsigned
int
k,
bool
correct =
true
,
bool
zeroTime =
false
)
const
;
108
std::unique_ptr<Residuals> residuals(
CaloGain::CaloGain
gain =
CaloGain::LARNGAIN
,
double
absResTrunc = -1,
bool
correct =
true
,
bool
zeroTime =
false
)
const
;
109
110
double
upstreamEnergy(
unsigned
int
k)
const
;
111
double
chi2Anomaly(
double
chi2Cut,
unsigned
int
nDof = 3)
const
;
112
113
void
setInterface
(
const
Interface
* interface)
const
{
m_interface
= interface; }
114
115
private
:
116
117
std::vector<std::unique_ptr<const Data> >
m_data
;
118
CellInfo
m_cellInfo
;
119
std::vector<std::unique_ptr<const EventData> >
m_eventData
;
120
unsigned
int
m_hash
;
121
mutable
const
AbsShapeErrorGetter
*
m_shapeErrorGetter
;
122
mutable
const
Interface
*
m_interface
=
nullptr
;
123
};
124
}
125
#endif
isValid
bool isValid() const
Test to see if the link can be dereferenced.
CellInfo.h
Chi2Calc.h
EventData.h
res
std::pair< std::vector< unsigned int >, bool > res
Definition
JetGroupProductTest.cxx:11
Definitions.h
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::AbsShapeErrorGetter
Definition
AbsShapeErrorGetter.h:24
LArSamples::Averager
storage of the time histories of all the cells
Definition
Averager.h:23
LArSamples::CellInfo
Definition
CellInfo.h:31
LArSamples::Data
Definition
Data.h:73
LArSamples::EventData
Definition
EventData.h:29
LArSamples::GraphShape
Definition
GraphShape.h:32
LArSamples::HistoryContainer
Definition
HistoryContainer.h:29
LArSamples::History::m_eventData
std::vector< std::unique_ptr< const EventData > > m_eventData
Definition
History.h:119
LArSamples::History::dissolve
std::unique_ptr< HistoryContainer > dissolve()
Definition
History.cxx:76
LArSamples::History::m_cellInfo
CellInfo m_cellInfo
Definition
History.h:118
LArSamples::History::History
History(const HistoryContainer &container, std::vector< std::unique_ptr< const EventData > > &&eventData, unsigned int hash, const AbsShapeErrorGetter *shapeErrorGetter=0)
Constructor.
LArSamples::History::shapeErrorGetter
const AbsShapeErrorGetter * shapeErrorGetter() const
Definition
History.h:94
LArSamples::History::m_hash
unsigned int m_hash
Definition
History.h:120
LArSamples::History::m_interface
const Interface * m_interface
Definition
History.h:122
LArSamples::History::cellInfo
const CellInfo * cellInfo() const
Definition
History.h:59
LArSamples::History::m_shapeErrorGetter
const AbsShapeErrorGetter * m_shapeErrorGetter
Definition
History.h:121
LArSamples::History::data
const Data * data(unsigned int i) const
Definition
History.cxx:88
LArSamples::History::setShapeErrorGetter
void setShapeErrorGetter(const AbsShapeErrorGetter *err) const
Definition
History.h:93
LArSamples::History::nData
unsigned int nData() const
Definition
History.h:54
LArSamples::History::m_data
std::vector< std::unique_ptr< const Data > > m_data
Definition
History.h:117
LArSamples::History::hash
unsigned int hash() const
Definition
History.h:91
LArSamples::History::setInterface
void setInterface(const Interface *interface) const
Definition
History.h:113
LArSamples::History::eventData
const std::vector< std::unique_ptr< const EventData > > & eventData() const
Definition
History.h:61
LArSamples::Interface
Definition
Interface.h:37
LArSamples::Residual
storage of a pulse shape residual set
Definition
LArCalorimeter/LArSamplesMon/LArSamplesMon/Residual.h:29
LArSamples::Residuals
Definition
LArCalorimeter/LArSamplesMon/LArSamplesMon/Residual.h:72
LArSamples::ScaledErrorData
Definition
ScaledErrorData.h:17
LArSamples::ShapeErrorData
Definition
ShapeErrorData.h:19
reference
Definition
hcg.cxx:440
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition
comparitor.cxx:525
description
std::string description
glabal timer - how long have I taken so far?
Definition
hcg.cxx:93
CaloGain::CaloGain
CaloGain
Definition
CaloGain.h:11
CaloGain::LARNGAIN
@ LARNGAIN
Definition
CaloGain.h:19
LArSamples
Definition
AbsShape.h:24
LArSamples::ShapeErrorType
ShapeErrorType
Definition
LArCalorimeter/LArCafJobs/LArCafJobs/Definitions.h:22
LArSamples::BestShapeError
@ BestShapeError
Definition
LArCalorimeter/LArCafJobs/LArCafJobs/Definitions.h:26
LArSamples::Chi2Params
Chi2Params
Definition
Chi2Calc.h:24
LArSamples::DefaultChi2
@ DefaultChi2
Definition
Chi2Calc.h:24
LArSamples::Definitions::none
static const double none
Definition
LArCalorimeter/LArCafJobs/LArCafJobs/Definitions.h:18
run
int run(int argc, char *argv[])
Definition
ttree2hdf5.cxx:28
Generated on
for ATLAS Offline Software by
1.17.0