ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigMonitoring
TrigIDR4Monitoring
src
TRTPlots.h
Go to the documentation of this file.
1
/* emacs: this is -*- c++ -*- */
22
23
24
#ifndef IDTPM2_TRTPLOTS_H
25
#define IDTPM2_TRTPLOTS_H
26
27
#include "
IPlotBase.h
"
28
35
36
37
38
#define TRT_PARAMS(X) \
39
X(NTRTHits) \
40
X(NTRTHitsXe) \
41
X(NTRTHitsAr) \
42
X(NTRTHighThresholdHits) \
43
X(NTRTHighThresholdHitsXe) \
44
X(NTRTHighThresholdHitsAr) \
45
\
46
X(NTRTOutliers) \
47
X(NTRTHighThresholdOutliers)
48
49
50
namespace
IDTPM2
{
51
52
class
TRTPlots
:
public
IPlotBase
{
53
54
public
:
55
56
TRTPlots
(
const
std::string&
name
, ToolHandle<GenericMonitoringTool>* m );
57
58
virtual
~TRTPlots
() { }
59
60
void
initialize
();
61
62
void
execute
(
const
TrackAnalysisStore
& collections )
const
;
63
65
void
finalize
();
66
67
private
:
68
72
74
75
struct
Histograms
{
76
79
82
83
enum
TRTPar
{
84
# define X(x) x,
85
TRT_PARAMS
(
X
)
86
# undef X
87
NTRTPars
88
};
89
91
std::vector<std::string>
m_parNames
= {
92
# define X(x) #x,
93
TRT_PARAMS
(
X
)
94
# undef X
95
};
96
97
size_t
nParNames
()
const
{
return
m_parNames
.size(); }
98
99
const
std::string&
parName
(
int
i)
const
{
return
m_parNames
.at(i); }
100
101
void
initialize
(
TRTPlots
* p,
const
std::string& s=
""
);
102
103
void
fill
(
const
TrackView
* t )
const
;
104
105
#if 1
107
108
TIDA::Histogram<float>
m_hits
[
NTRTPars
];
109
114
115
TIDA::Histogram<float>
m_hits_vs_pt
[
NTRTPars
];
116
TIDA::Histogram<float>
m_hits_vs_eta
[
NTRTPars
];
117
TIDA::Histogram<float>
m_hits_vs_phi
[
NTRTPars
];
118
TIDA::Histogram<float>
m_hits_vs_d0
[
NTRTPars
];
119
120
#else
121
126
127
# define X(x) TIDA::Histogram<float> m_##x;
128
TRT_PARAMS
(
X
)
129
# undef X
130
131
# define X(x) TIDA::Histogram2D<float> m_##x##_vs_pt;
132
TRT_PARAMS
(
X
)
133
# undef X
134
135
# define X(x) TIDA::Histogram2D<float> m_##x##_vs_eta;
136
TRT_PARAMS
(
X
)
137
# undef X
138
139
# define X(x) TIDA::Histogram2D<float> m_##x##_vs_phi;
140
TRT_PARAMS
(
X
)
141
# undef X
142
143
# define X(x) TIDA::Histogram2D<float> m_##x##_vs_d0;
144
TRT_PARAMS
(
X
)
145
# undef X
146
147
#endif
148
149
};
150
151
private
:
152
156
157
Histograms
m_reference
;
158
Histograms
m_test
;
159
160
};
161
162
}
// namespace IDTPM2
163
164
165
inline
std::ostream&
operator<<
( std::ostream& s,
const
IDTPM2::TRTPlots
& ) {
166
return
s;
167
}
168
169
170
#endif
// IDTPM2_TRTPLOTS_H
171
172
173
174
175
176
177
178
179
180
IPlotBase.h
X
#define X(x)
Definition
SiHitPlots.h:102
TRT_PARAMS
#define TRT_PARAMS(X)
all these enums for all the histograms are really nasty and the names for them, and making sure they ...
Definition
TRTPlots.h:38
operator<<
std::ostream & operator<<(std::ostream &s, const IDTPM2::TRTPlots &)
Definition
TRTPlots.h:165
IDTPM2::IPlotBase::name
const std::string & name() const
generic utilities, just in case
Definition
IPlotBase.h:68
IDTPM2::IPlotBase::IPlotBase
IPlotBase(const std::string &name, ToolHandle< GenericMonitoringTool > *m=0)
built from dirName and anaTag
Definition
IPlotBase.h:41
IDTPM2::TRTPlots
Definition
TRTPlots.h:52
IDTPM2::TRTPlots::m_test
Histograms m_test
Definition
TRTPlots.h:158
IDTPM2::TRTPlots::~TRTPlots
virtual ~TRTPlots()
Definition
TRTPlots.h:58
IDTPM2::TRTPlots::m_reference
Histograms m_reference
actual class histogram sets - this avoid needlessly duplicating all the histograms with _ref,...
Definition
TRTPlots.h:157
IDTPM2::TRTPlots::execute
void execute(const TrackAnalysisStore &collections) const
this can be over ridden if need be
Definition
TRTPlots.cxx:100
IDTPM2::TRTPlots::finalize
void finalize()
Print out final stats on histograms.
Definition
TRTPlots.cxx:127
IDTPM2::TRTPlots::initialize
void initialize()
Definition
TRTPlots.cxx:24
IDTPM2::TRTPlots::TRTPlots
TRTPlots(const std::string &name, ToolHandle< GenericMonitoringTool > *m)
Definition
TRTPlots.cxx:15
IDTPM2::TrackAnalysisStore
Definition
TrackAnalysisStore.h:78
TIDA::Histogram
Definition
TIDAHistogram.h:56
TrackView
forward declaration required for function prototype
Definition
TrackView.h:43
IDTPM2
Search the ancestor history, looking for an ancestor that satifies the predicate ....
Definition
AnalysisR4.h:31
IDTPM2::TRTPlots::Histograms
oh dear, just the (too many!) histogram variables (we will need these for the test and reference,...
Definition
TRTPlots.h:75
IDTPM2::TRTPlots::Histograms::TRTPar
TRTPar
ugly, but it gets the jobs done - this is the price you pay for have SO MANY STUPIDLY LONG NAMED PARA...
Definition
TRTPlots.h:83
IDTPM2::TRTPlots::Histograms::NTRTPars
@ NTRTPars
Definition
TRTPlots.h:87
IDTPM2::TRTPlots::Histograms::m_hits_vs_phi
TIDA::Histogram< float > m_hits_vs_phi[NTRTPars]
Definition
TRTPlots.h:117
IDTPM2::TRTPlots::Histograms::m_hits_vs_d0
TIDA::Histogram< float > m_hits_vs_d0[NTRTPars]
Definition
TRTPlots.h:118
IDTPM2::TRTPlots::Histograms::m_hits_vs_eta
TIDA::Histogram< float > m_hits_vs_eta[NTRTPars]
Definition
TRTPlots.h:116
IDTPM2::TRTPlots::Histograms::m_parNames
std::vector< std::string > m_parNames
probably should use an std::array<string,NparNames>
Definition
TRTPlots.h:91
IDTPM2::TRTPlots::Histograms::parName
const std::string & parName(int i) const
Definition
TRTPlots.h:99
IDTPM2::TRTPlots::Histograms::m_hits_vs_pt
TIDA::Histogram< float > m_hits_vs_pt[NTRTPars]
for these "2D" histograms, could use yet another enum, and some parname vector, but prefer to keep it...
Definition
TRTPlots.h:115
IDTPM2::TRTPlots::Histograms::nParNames
size_t nParNames() const
Definition
TRTPlots.h:97
IDTPM2::TRTPlots::Histograms::fill
void fill(const TrackView *t) const
Definition
TRTPlots.cxx:55
IDTPM2::TRTPlots::Histograms::m_hits
TIDA::Histogram< float > m_hits[NTRTPars]
actual stored histograms
Definition
TRTPlots.h:108
Generated on
for ATLAS Offline Software by
1.17.0