Belle II Software development
FilterID.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include "tracking/dataobjects/FilterID.h"
10#include <framework/logging/Logger.h>
11
12#include <algorithm>
13
14using namespace Belle2;
15
16// 2hit:
17const std::string FilterID::nameDistance3D = "distance3D";
18const std::string FilterID::nameDistanceXY = "distanceXY";
19const std::string FilterID::nameDistanceZ = "distanceZ";
20const std::string FilterID::nameSlopeRZ = "slopeRZ";
21const std::string FilterID::nameNormedDistance3D = "normedDistance3D";
22
23
24//2+1hit:
25const std::string FilterID::nameAnglesHighOccupancy3D = "HioCangles3D"; // HioC means high occupancy
26const std::string FilterID::nameAnglesHighOccupancyXY = "HioCanglesXY";
27const std::string FilterID::nameAnglesHighOccupancyRZ = "HioCanglesRZ";
28const std::string FilterID::nameDistanceHighOccupancy2IP = "HioCdistance2IP";
29const std::string FilterID::nameDeltaSlopeHighOccupancyRZ = "HioCdeltaSlopeRZ";
30const std::string FilterID::namePTHighOccupancy = "HioCpT";
31const std::string FilterID::nameHelixParameterHighOccupancyFit = "HioChelixFit";
32
33
34//3hit:
35const std::string FilterID::nameAngles3D = "angles3D";
36const std::string FilterID::nameAnglesRZ = "anglesRZ";
37const std::string FilterID::nameAnglesXY = "anglesXY";
38const std::string FilterID::nameDeltaSlopeRZ = "deltaSlopeRZ";
39const std::string FilterID::namePT = "pT";
40const std::string FilterID::nameDistance2IP = "distance2IP";
41const std::string FilterID::nameHelixParameterFit = "helixParameterFit";
42const std::string FilterID::nameDeltaSOverZ = "deltaSOverZ";
43const std::string FilterID::nameDeltaSlopeZOverS = "deltaSlopeZOverS";
44
45
46//3+1hit:
47const std::string FilterID::nameDeltapTHighOccupancy = "HioCdeltaPt";
48const std::string FilterID::nameDeltaDistanceHighOccupancy2IP = "HioCdeltaDistance2IP";
49
50
51//4hit:
52const std::string FilterID::nameDeltapT = "deltaPt";
53const std::string FilterID::nameDeltaDistance2IP = "deltaDistance2IP";
54
55
56//Collector FilterIDs
57const std::string FilterID::nameNbFinderLost = "NbFinderLost";
58const std::string FilterID::nameCellularAutomaton = "CellularAutomaton";
59
60
61// trackletFilters:
62const std::string FilterID::nameZiggZaggXY = "ZiggZaggXY";
63const std::string FilterID::nameZiggZaggXYWithSigma = "ZiggZaggXYWithSigma";
64const std::string FilterID::nameZiggZaggRZ = "ZiggZaggRZ";
65const std::string FilterID::nameCirclefit = "Circlefit";
66const std::string FilterID::nameHelixfit = "Helixfit";
67const std::string FilterID::nameSimpleLineFit3D = "SimpleLineFit3D";
68
69
70//TF-steps:
71const std::string FilterID::nameHopfield = "Hopfield";
72const std::string FilterID::nameGreedy = "Greedy";
73const std::string FilterID::nameTcDuel = "TcDuel";
74const std::string FilterID::nameTcFinderCurr = "TcFinderCurr";
75const std::string FilterID::nameCalcQIbyKalman = "CalcQIbyKalman";
76const std::string FilterID::nameOverlapping = "Overlapping";
78
79
80// for display: silent kills
81const std::string FilterID::nameSilentTcc = "SilentTcc";
82const std::string FilterID::nameSilentHitFinder = "SilentHitFinder";
83const std::string FilterID::nameSilentSegFinder = "SilentSegFinder";
84
85
86// tests which are only for debugging and validation processes
87const std::string FilterID::nameAlwaysTrue2Hit = "alwaysTrue2Hit";
88const std::string FilterID::nameAlwaysFalse2Hit = "alwaysFalse2Hit";
89const std::string FilterID::nameAlwaysTrue3Hit = "alwaysTrue3Hit";
90const std::string FilterID::nameAlwaysFalse3Hit = "alwaysFalse3Hit";
91const std::string FilterID::nameAlwaysTrue4Hit = "alwaysTrue4Hit";
92const std::string FilterID::nameAlwaysFalse4Hit = "alwaysFalse4Hit";
93const std::string FilterID::nameRandom2Hit = "random2Hit";
94const std::string FilterID::nameRandom3Hit = "random3Hit";
95const std::string FilterID::nameRandom4Hit = "random4Hit";
96
97
98// other stuff
99const std::string FilterID::nameOverHighestAllowedLayer = "overHighestAllowedLayer";
100const std::string FilterID::nameOutOfSectorRange = "outOfSectorRange";
101
102
103
104
105const boost::array<std::string, FilterID::numFilters> FilterID::nameVector = { {
106 // 2hit:
107 nameDistance3D,
108 nameDistanceXY,
109 nameDistanceZ,
110 nameSlopeRZ,
111 nameNormedDistance3D,
112
113
114 //2+1hit:
115 nameAnglesHighOccupancy3D,
116 nameAnglesHighOccupancyXY,
117 nameAnglesHighOccupancyRZ,
118 nameDistanceHighOccupancy2IP,
119 nameDeltaSlopeHighOccupancyRZ,
120 namePTHighOccupancy,
121 nameHelixParameterHighOccupancyFit,
122
123
124 //3hit:
125 nameAngles3D,
126 nameAnglesRZ,
127 nameAnglesXY,
128 nameDeltaSlopeRZ,
129 namePT,
130 nameDistance2IP,
131 nameHelixParameterFit,
132 nameDeltaSOverZ,
133 nameDeltaSlopeZOverS,
134
135
136 //3+1hit:
137 nameDeltapTHighOccupancy,
138 nameDeltaDistanceHighOccupancy2IP,
139
140
141 //4hit:
142 nameDeltapT,
143 nameDeltaDistance2IP,
144
145
146 //Collector FilterIDs
147 nameNbFinderLost,
148 nameCellularAutomaton,
149
150
151 // trackletFilters:
152 nameZiggZaggXY,
153 nameZiggZaggXYWithSigma,
154 nameZiggZaggRZ,
155 nameCirclefit,
156 nameHelixfit,
157 nameSimpleLineFit3D,
158
159
160 //TF-steps:
161 nameHopfield,
162 nameGreedy,
163 nameTcDuel,
164 nameTcFinderCurr,
165 nameCalcQIbyKalman,
166 nameOverlapping,
168
169
170 // for display: silent kills
171 nameSilentTcc,
172 nameSilentHitFinder,
173 nameSilentSegFinder,
174
175
176 // tests which are only for debugging and validation processes
177 nameAlwaysTrue2Hit,
178 nameAlwaysFalse2Hit,
179 nameAlwaysTrue3Hit,
180 nameAlwaysFalse3Hit,
181 nameAlwaysTrue4Hit,
182 nameAlwaysFalse4Hit,
183 nameRandom2Hit,
184 nameRandom3Hit,
185 nameRandom4Hit,
186
187
188 // other stuff
189 nameOverHighestAllowedLayer,
190 nameOutOfSectorRange
191 }
192};
193
194
195const boost::array<FilterID::filterTypes, FilterID::numFilters> FilterID::enumVector = {
196 {
197 // 2hit:
203
204
205 //2+1hit:
213
214
215 //3hit:
225
226
227 //3+1hit:
230
231
232 //4hit:
235
236
237 //Collector FilterIDs
240
241
242 // trackletFilters:
249
250
251 //TF-steps:
259
260
261 // for display: silent kills
265
266
267 // tests which are only for debugging and validation processes
277
278
279 // other stuff
282 }
283};
284
285
286
287FilterID::filterTypes FilterID::getFilterType(const std::string& filterString)
288{
289 // WARNING TODO FIXME: improve that function (by the way, it is not sorted like the entries from above)
290 if (filterString == nameAngles3D)
291 { return angles3D; }
292 else if (filterString == nameAnglesRZ)
293 {return anglesRZ;}
294 else if (filterString == nameAnglesXY)
295 {return anglesXY;}
296 else if (filterString == nameDistance3D)
297 {return distance3D;}
298 else if (filterString == nameDistanceXY)
299 {return distanceXY;}
300 else if (filterString == nameDistanceZ)
301 {return distanceZ;}
302 else if (filterString == nameHelixParameterFit)
303 {return helixParameterFit;}
304 else if (filterString == nameDeltaSOverZ)
305 {return deltaSOverZ;}
306 else if (filterString == nameDeltaSlopeZOverS)
307 {return deltaSlopeZOverS;}
308 else if (filterString == nameSlopeRZ)
309 {return slopeRZ;}
310 else if (filterString == nameDeltaSlopeRZ)
311 {return deltaSlopeRZ;}
312 else if (filterString == namePT)
313 {return pT;}
314 else if (filterString == nameDeltapT)
315 {return deltapT;}
316 else if (filterString == nameNormedDistance3D)
317 {return normedDistance3D;}
318 else if (filterString == nameDistance2IP)
319 {return distance2IP;}
320 else if (filterString == nameDeltaDistance2IP)
321 {return deltaDistance2IP;}
322 else if (filterString == nameAnglesHighOccupancy3D)
323 {return anglesHighOccupancy3D;}
324 else if (filterString == nameAnglesHighOccupancyXY)
325 {return anglesHighOccupancyXY;}
326 else if (filterString == nameAnglesHighOccupancyRZ)
327 {return anglesHighOccupancyRZ;}
328 else if (filterString == nameDistanceHighOccupancy2IP)
330 else if (filterString == nameDeltaSlopeHighOccupancyRZ)
332 else if (filterString == namePTHighOccupancy)
333 {return pTHighOccupancy;}
334 else if (filterString == nameHelixParameterHighOccupancyFit)
336 else if (filterString == nameDeltapTHighOccupancy)
337 {return deltapTHighOccupancy;}
338 else if (filterString == nameDeltaDistanceHighOccupancy2IP)
340 else if (filterString == nameNbFinderLost)
341 {return nbFinderLost;}
342 else if (filterString == nameCellularAutomaton)
343 {return cellularAutomaton;}
344
345 else if (filterString == nameHopfield)
346 {return hopfield;}
347 else if (filterString == nameGreedy)
348 {return greedy;}
349
350 else if (filterString == nameTcDuel)
351 {return tcDuel;}
352 else if (filterString == nameTcFinderCurr)
353 {return tcFinderCurr;}
354
355 else if (filterString == nameZiggZaggXY)
356 {return ziggZaggXY;}
357 else if (filterString == nameZiggZaggXYWithSigma)
358 {return ziggZaggXYWithSigma;}
359 else if (filterString == nameZiggZaggRZ)
360 {return ziggZaggRZ;}
361
362 else if (filterString == nameCalcQIbyKalman)
363 {return calcQIbyKalman;}
364 else if (filterString == nameOverlapping)
365 {return overlapping;}
366 else if (filterString == nameCirclefit)
367 {return circlefit;}
368 else if (filterString == nameHelixfit)
369 {return helixfit;}
370 else if (filterString == nameSimpleLineFit3D)
371 {return simpleLineFit3D;}
372
373 else if (filterString == nameSilentTcc)
374 {return silentTcc;}
375 else if (filterString == nameSilentHitFinder)
376 {return silentHitFinder;}
377 else if (filterString == nameSilentSegFinder)
378 {return silentSegFinder;}
379
380 else if (filterString == nameAlwaysTrue2Hit)
381 {return alwaysTrue2Hit;}
382 else if (filterString == nameAlwaysFalse2Hit)
383 {return alwaysFalse2Hit;}
384 else if (filterString == nameAlwaysTrue3Hit)
385 {return alwaysTrue3Hit;}
386 else if (filterString == nameAlwaysFalse3Hit)
387 {return alwaysFalse3Hit;}
388 else if (filterString == nameAlwaysTrue4Hit)
389 {return alwaysTrue4Hit;}
390 else if (filterString == nameAlwaysFalse4Hit)
391 {return alwaysFalse4Hit;}
392 else if (filterString == nameRandom2Hit)
393 {return random2Hit;}
394 else if (filterString == nameRandom3Hit)
395 {return random3Hit;}
396 else if (filterString == nameRandom4Hit)
397 {return random4Hit;}
398
399 else if (filterString == nameOverHighestAllowedLayer)
401 else if (filterString == nameOutOfSectorRange)
402 {return outOfSectorRange;}
403
404 else {
405 B2WARNING(" FilterID::getFilterType. Input std::string is out of range, please check that...");
406 return numFilters;
407 }
408}
409
410
411
413{
414 if (filterInt >= distance3D && filterInt < numFilters) {
415 return enumVector[filterInt];
416 }
417 B2WARNING(" FilterID::getFilterType. Input int is out of range, please check that...");
418 return numFilters;
419}
420
421
422
423std::string FilterID::getFilterString(int filterType)
424{
425 if (filterType >= distance3D && filterType < numFilters) {
426 return nameVector[filterType];
427 }
428 B2WARNING(" FilterID::getFilterString. Input int is out of range, please check that...");
429 return "";
430}
431
432
435{
437 auto pos = std::find(enumVector.begin(), enumVector.end(), type);
438 if (pos == enumVector.end()) {
439 B2WARNING("FilterID::getTypeName(): given iD " << type <<
440 " is not a valid FilterID, return UnknownType!");
441 return std::string("UnknownType");
442 }
443 return FilterID::nameVector[type];
444}
static const std::string nameOverHighestAllowedLayer
string name of OverHighestAllowedLayer Filter
Definition: FilterID.h:207
static const std::string nameZiggZaggXY
string name ZiggZaggXY filter
Definition: FilterID.h:170
static const std::string nameDeltaSOverZ
string name deltaSOverZ Filter
Definition: FilterID.h:150
static const std::string namePT
string name of filter pT
Definition: FilterID.h:147
static const std::string nameDeltaDistanceHighOccupancy2IP
string name of filter dd2IP high occupancy
Definition: FilterID.h:156
static const std::string nameNormedDistance3D
string name of filter nd3D
Definition: FilterID.h:129
static const std::string nameDeltaSlopeHighOccupancyRZ
string name of filter dslopeRZ high occupancy
Definition: FilterID.h:137
static const std::string nameAlwaysTrue4Hit
string name of a filter which will always say yes
Definition: FilterID.h:199
static const std::string nameHopfield
string name Hopfield filter
Definition: FilterID.h:179
static const std::string nameDistance3D
string name of filter d3D
Definition: FilterID.h:125
static const std::string nameAlwaysFalse2Hit
string name of a filter which will always say no
Definition: FilterID.h:196
static const std::string nameNbFinderLost
string name Nb Finder filter
Definition: FilterID.h:165
static const std::string nameAnglesRZ
string name of filter aRZ
Definition: FilterID.h:144
static const std::string nameSilentTcc
WARNING FIXME TODO some things are missing here (calcQIbyLineFit) and similar stuff.
Definition: FilterID.h:189
static const boost::array< std::string, numFilters > nameVector
array storing all the strings where the enums can be used to access their position
Definition: FilterID.h:213
static const std::string nameCirclefit
string name Circlefit filter
Definition: FilterID.h:173
static const std::string nameOverlapping
string name Overlapping filter
Definition: FilterID.h:184
static const std::string nameDeltaSlopeZOverS
string name deltaSlopeZOverS Filter
Definition: FilterID.h:151
static const std::string nameTcFinderCurr
string name TC Finder Curr filter
Definition: FilterID.h:182
static const std::string nameCalcQIbyKalman
string name CalcQIbyKalman filter
Definition: FilterID.h:183
static const std::string nameSimpleLineFit3D
string name SimpleLineFit3D filter
Definition: FilterID.h:175
static const std::string nameAnglesXY
string name of filter aXY
Definition: FilterID.h:145
static const std::string nameDeltapTHighOccupancy
string name of filter dPt high occupancy
Definition: FilterID.h:155
static const std::string nameDistanceHighOccupancy2IP
string name of filter d2IP high occupancy
Definition: FilterID.h:136
static std::string getTypeName(filterTypes filterType)
returns name of given type, needed for compatibility with other modules
Definition: FilterID.cc:434
static const std::string nameDeltapT
string name of filter dPt
Definition: FilterID.h:160
static const std::string nameRandom2Hit
string name of a filter which will say yes or no by random choice
Definition: FilterID.h:201
static const std::string nameDistance2IP
string name of filter d2IP
Definition: FilterID.h:148
static const std::string nameHelixfit
string name Helix Fit filter
Definition: FilterID.h:174
static const std::string nameAnglesHighOccupancyXY
string name of filter aXY high occupancy
Definition: FilterID.h:134
static const std::string nameAnglesHighOccupancyRZ
string name of filter aRZ high occupancy
Definition: FilterID.h:135
static const std::string nameRandom4Hit
string name of a filter which will say yes or no by random choice
Definition: FilterID.h:203
static const std::string nameAngles3D
string name of filter a3D
Definition: FilterID.h:143
static const std::string nameZiggZaggXYWithSigma
string name ZiggZaggXYWithSigma filter
Definition: FilterID.h:171
static const std::string nameDeltaDistance2IP
string name of filter dd2IP
Definition: FilterID.h:161
static const std::string nameHelixParameterHighOccupancyFit
string name of filter hFit high occupancy
Definition: FilterID.h:139
static const std::string nameZiggZaggRZ
string name ZiggZaggRZ filter
Definition: FilterID.h:172
static const std::string nameAlwaysTrue2Hit
string name of a filter which will always say yes
Definition: FilterID.h:195
static const std::string nameOutOfSectorRange
string name out of sector range filter
Definition: FilterID.h:208
static const std::string nameAnglesHighOccupancy3D
string name of filter a3D high occupancy
Definition: FilterID.h:133
static const std::string nameSlopeRZ
string name of filter slopeRZ
Definition: FilterID.h:128
static const std::string nameDeltaSlopeRZ
string name of filter dslopeRZ
Definition: FilterID.h:146
static const std::string nameDistanceZ
string name of filter dZ
Definition: FilterID.h:127
static const std::string nameSilentHitFinder
string name Silent Kill Hit Finder filter
Definition: FilterID.h:190
static const std::string nameCellularAutomaton
string name CA filter
Definition: FilterID.h:166
static const std::string nameSilentSegFinder
string name Silent Kill Seg Finder filter
Definition: FilterID.h:191
static const std::string nameGreedy
string name Greedy filter
Definition: FilterID.h:180
static filterTypes getFilterType(const std::string &filterString)
converts existing string with name of filter type into suitable enum value.
Definition: FilterID.cc:287
static const std::string nameAlwaysFalse3Hit
string name of a filter which will always say no
Definition: FilterID.h:198
static const std::string nameDistanceXY
string name of filter dXY
Definition: FilterID.h:126
static const std::string nameHelixParameterFit
string name of filter helix Parameter Fit
Definition: FilterID.h:149
static const std::string nameAlwaysTrue3Hit
string name of a filter which will always say yes
Definition: FilterID.h:197
filterTypes
filterTyoes contains enums assigning unique values for each filter type allowing fast filter type rec...
Definition: FilterID.h:31
@ random3Hit
a filter with this ID will say yes or no by random choice
Definition: FilterID.h:109
@ hopfield
Hopfield filter.
Definition: FilterID.h:87
@ silentTcc
Silent Kill TCC filter.
Definition: FilterID.h:96
@ nbFinderLost
Nb Finder filter.
Definition: FilterID.h:73
@ alwaysTrue2Hit
a filter with this ID will always say True
Definition: FilterID.h:102
@ numFilters
knows number of filters existing.
Definition: FilterID.h:118
@ distanceHighOccupancy2IP
string name of filter d2IP high occupancy
Definition: FilterID.h:44
@ alwaysFalse3Hit
a filter with this ID will always say False
Definition: FilterID.h:105
@ deltaDistance2IP
string name of filter dd2IP
Definition: FilterID.h:69
@ distance2IP
string name of filter d2IP
Definition: FilterID.h:56
@ deltaSlopeHighOccupancyRZ
string name of filter dslopeRZ high occupancy
Definition: FilterID.h:45
@ helixfit
Helix Fit filter.
Definition: FilterID.h:82
@ tcDuel
TC Duel filter.
Definition: FilterID.h:89
@ overlapping
overlapping filter
Definition: FilterID.h:92
@ anglesHighOccupancy3D
string name of filter a3D high occupancy
Definition: FilterID.h:41
@ random4Hit
a filter with this ID will say yes or no by random choice
Definition: FilterID.h:110
@ simpleLineFit3D
simpleLineFit3D filter
Definition: FilterID.h:83
@ deltapT
string name of filter dPt
Definition: FilterID.h:68
@ overHighestAllowedLayer
OverHighestAllowedLayer Filter.
Definition: FilterID.h:114
@ cellularAutomaton
CA filter.
Definition: FilterID.h:74
@ distanceXY
string name of filter dXY
Definition: FilterID.h:34
@ anglesXY
string name of filter aXY
Definition: FilterID.h:53
@ tcFinderCurr
TC Finder Curr filter.
Definition: FilterID.h:90
@ silentSegFinder
Silent Kill SefFinder filter.
Definition: FilterID.h:98
@ normedDistance3D
string name of filter nd3D
Definition: FilterID.h:37
@ slopeRZ
string name of filter slopeRZ
Definition: FilterID.h:36
@ circlefit
circlefit filter
Definition: FilterID.h:81
@ silentHitFinder
Silent Kill HitFinder filter.
Definition: FilterID.h:97
@ outOfSectorRange
out of sector range filter
Definition: FilterID.h:115
@ distance3D
string name of filter d3D
Definition: FilterID.h:33
@ ziggZaggRZ
ziggZaggRZ filter
Definition: FilterID.h:80
@ anglesHighOccupancyXY
string name of filter aXY high occupancy
Definition: FilterID.h:42
@ helixParameterFit
string name of filter helix Paramater Fit
Definition: FilterID.h:57
@ alwaysTrue3Hit
a filter with this ID will always say True
Definition: FilterID.h:104
@ alwaysFalse2Hit
a filter with this ID will always say False
Definition: FilterID.h:103
@ deltaSlopeRZ
string name of filter dslopeRZ
Definition: FilterID.h:54
@ ziggZaggXY
ziggZaggXY filter
Definition: FilterID.h:78
@ alwaysFalse4Hit
a filter with this ID will always say False
Definition: FilterID.h:107
@ deltaDistanceHighOccupancy2IP
string name of filter dd2IP high occupancy
Definition: FilterID.h:64
@ helixParameterHighOccupancyFit
string name of filter hFit high occupancy
Definition: FilterID.h:47
@ ziggZaggXYWithSigma
ziggZaggXYWithSigma filter
Definition: FilterID.h:79
@ deltapTHighOccupancy
string name of filter dPt high occupancy
Definition: FilterID.h:63
@ alwaysTrue4Hit
a filter with this ID will always say True
Definition: FilterID.h:106
@ greedy
Greedy filter.
Definition: FilterID.h:88
@ pTHighOccupancy
string name of filter pT high occupancy
Definition: FilterID.h:46
@ random2Hit
a filter with this ID will say yes or no by random choice
Definition: FilterID.h:108
@ angles3D
string name of filter a3D
Definition: FilterID.h:51
@ anglesRZ
string name of filter aRZ
Definition: FilterID.h:52
@ deltaSlopeZOverS
deltaSlopeZOverS Filter
Definition: FilterID.h:59
@ distanceZ
string name of filter dZ
Definition: FilterID.h:35
@ deltaSOverZ
deltaSOverZ Filter
Definition: FilterID.h:58
@ pT
string name of filter pT
Definition: FilterID.h:55
@ calcQIbyKalman
calcQIbyKalman filter
Definition: FilterID.h:91
@ anglesHighOccupancyRZ
string name of filter aRZ high occupancy
Definition: FilterID.h:43
static const std::string nameRandom3Hit
string name of a filter which will say yes or no by random choice
Definition: FilterID.h:202
static const std::string nameAlwaysFalse4Hit
string name of a filter which will always say no
Definition: FilterID.h:200
static std::string getFilterString(filterTypes filterType)
converts existing enum value into suitable string with name of filter type.
Definition: FilterID.h:231
static const boost::array< FilterID::filterTypes, FilterID::numFilters > enumVector
array storing all the enums where ints can be used to access their position (this is needed since enu...
Definition: FilterID.h:216
static const std::string namePTHighOccupancy
string name of filter pT high occupancy
Definition: FilterID.h:138
static const std::string nameTcDuel
string name TC Duel filter
Definition: FilterID.h:181
Abstract base class for different kinds of events.