ATLAS Offline Software
Loading...
Searching...
No Matches
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
50namespace IDTPM2 {
51
52class TRTPlots : public IPlotBase {
53
54public:
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
67private:
68
72
74
75 struct Histograms {
76
79
82
83 enum TRTPar {
84# define X(x) x,
86# undef X
88 };
89
91 std::vector<std::string> m_parNames = {
92# define X(x) #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
109
114
119
120#else
121
126
127# define X(x) TIDA::Histogram<float> m_##x;
129# undef X
130
131# define X(x) TIDA::Histogram2D<float> m_##x##_vs_pt;
133# undef X
134
135# define X(x) TIDA::Histogram2D<float> m_##x##_vs_eta;
137# undef X
138
139# define X(x) TIDA::Histogram2D<float> m_##x##_vs_phi;
141# undef X
142
143# define X(x) TIDA::Histogram2D<float> m_##x##_vs_d0;
145# undef X
146
147#endif
148
149 };
150
151private:
152
156
159
160};
161
162} // namespace IDTPM2
163
164
165inline 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
#define X(x)
Definition SiHitPlots.h:102
#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
std::ostream & operator<<(std::ostream &s, const IDTPM2::TRTPlots &)
Definition TRTPlots.h:165
const std::string & name() const
generic utilities, just in case
Definition IPlotBase.h:68
IPlotBase(const std::string &name, ToolHandle< GenericMonitoringTool > *m=0)
built from dirName and anaTag
Definition IPlotBase.h:41
Histograms m_test
Definition TRTPlots.h:158
virtual ~TRTPlots()
Definition TRTPlots.h:58
Histograms m_reference
actual class histogram sets - this avoid needlessly duplicating all the histograms with _ref,...
Definition TRTPlots.h:157
void execute(const TrackAnalysisStore &collections) const
this can be over ridden if need be
Definition TRTPlots.cxx:100
void finalize()
Print out final stats on histograms.
Definition TRTPlots.cxx:127
TRTPlots(const std::string &name, ToolHandle< GenericMonitoringTool > *m)
Definition TRTPlots.cxx:15
forward declaration required for function prototype
Definition TrackView.h:43
Search the ancestor history, looking for an ancestor that satifies the predicate ....
Definition AnalysisR4.h:31
oh dear, just the (too many!) histogram variables (we will need these for the test and reference,...
Definition TRTPlots.h:75
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
TIDA::Histogram< float > m_hits_vs_phi[NTRTPars]
Definition TRTPlots.h:117
TIDA::Histogram< float > m_hits_vs_d0[NTRTPars]
Definition TRTPlots.h:118
TIDA::Histogram< float > m_hits_vs_eta[NTRTPars]
Definition TRTPlots.h:116
std::vector< std::string > m_parNames
probably should use an std::array<string,NparNames>
Definition TRTPlots.h:91
const std::string & parName(int i) const
Definition TRTPlots.h:99
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
size_t nParNames() const
Definition TRTPlots.h:97
void fill(const TrackView *t) const
Definition TRTPlots.cxx:55
TIDA::Histogram< float > m_hits[NTRTPars]
actual stored histograms
Definition TRTPlots.h:108