Belle II Software  release-08-01-10
FilterID.h
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 
10 #pragma once
11 
12 #include <string>
13 #include <boost/array.hpp>
14 
15 
16 namespace Belle2 {
28  class FilterID {
29  public:
31  enum filterTypes {
32  // 2hit:
40  //2+1hit:
50  //3hit:
55  pT,
62  //3+1hit:
67  //4hit:
72  //Collector FilterIDs
77  // trackletFilters:
86  //TF-steps:
95  // for display: silent kills
101  // tests which are only for debugging and validation processes
113  // other stuff
118  numFilters
120  };
121 
122 
123 
124  // 2hit:
125  const static std::string nameDistance3D;
126  const static std::string nameDistanceXY;
127  const static std::string nameDistanceZ;
128  const static std::string nameSlopeRZ;
129  const static std::string nameNormedDistance3D;
132  //2+1hit:
133  const static std::string nameAnglesHighOccupancy3D;
134  const static std::string nameAnglesHighOccupancyXY;
135  const static std::string nameAnglesHighOccupancyRZ;
136  const static std::string nameDistanceHighOccupancy2IP;
137  const static std::string nameDeltaSlopeHighOccupancyRZ;
138  const static std::string namePTHighOccupancy;
139  const static std::string nameHelixParameterHighOccupancyFit;
142  //3hit:
143  const static std::string nameAngles3D;
144  const static std::string nameAnglesRZ;
145  const static std::string nameAnglesXY;
146  const static std::string nameDeltaSlopeRZ;
147  const static std::string namePT;
148  const static std::string nameDistance2IP;
149  const static std::string nameHelixParameterFit;
150  const static std::string nameDeltaSOverZ;
151  const static std::string nameDeltaSlopeZOverS;
154  //3+1hit:
155  const static std::string nameDeltapTHighOccupancy;
156  const static std::string nameDeltaDistanceHighOccupancy2IP;
159  //4hit:
160  const static std::string nameDeltapT;
161  const static std::string nameDeltaDistance2IP;
164  //Collector FilterIDs
165  const static std::string nameNbFinderLost;
166  const static std::string nameCellularAutomaton;
169  // trackletFilters:
170  const static std::string nameZiggZaggXY;
171  const static std::string nameZiggZaggXYWithSigma;
172  const static std::string nameZiggZaggRZ;
173  const static std::string nameCirclefit;
174  const static std::string nameHelixfit;
175  const static std::string nameSimpleLineFit3D;
178  //TF-steps:
179  const static std::string nameHopfield;
180  const static std::string nameGreedy;
181  const static std::string nameTcDuel;
182  const static std::string nameTcFinderCurr;
183  const static std::string nameCalcQIbyKalman;
184  const static std::string nameOverlapping;
186 
187 
188  // for display: silent kills
189  const static std::string nameSilentTcc;
190  const static std::string nameSilentHitFinder;
191  const static std::string nameSilentSegFinder;
194  // tests which are only for debugging and validation processes
195  const static std::string nameAlwaysTrue2Hit;
196  const static std::string nameAlwaysFalse2Hit;
197  const static std::string nameAlwaysTrue3Hit;
198  const static std::string nameAlwaysFalse3Hit;
199  const static std::string nameAlwaysTrue4Hit;
200  const static std::string nameAlwaysFalse4Hit;
201  const static std::string nameRandom2Hit;
202  const static std::string nameRandom3Hit;
203  const static std::string nameRandom4Hit;
206  // other stuff
207  const static std::string nameOverHighestAllowedLayer;
208  const static std::string nameOutOfSectorRange;
212  const static boost::array<std::string, numFilters>
215  const static boost::array<FilterID::filterTypes, FilterID::numFilters>
219  FilterID() {}
220 
223 
225  static filterTypes getFilterType(const std::string& filterString);
226 
228  static filterTypes getFilterType(int filterInt);
229 
231  static std::string getFilterString(filterTypes filterType) { return getTypeName(filterType); }
232 
234  static std::string getFilterString(int filterType);
235 
237  static std::string getTypeName(filterTypes filterType);
238 
240  static filterTypes getTypeEnum(const std::string& filterString) {return getFilterType(filterString); }
241 
242  protected:
243  }; //end class FilterID
245 } //end namespace Belle2
Class to identify a filter type used by sectorFriends.
Definition: FilterID.h:28
static const std::string nameOverHighestAllowedLayer
string name of OverHighestAllowedLayer Filter
Definition: FilterID.h:207
static filterTypes getTypeEnum(const std::string &filterString)
returns type of given name, needed for compatibility with other modules.
Definition: FilterID.h:240
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
FilterID()
Constructor.
Definition: FilterID.h:219
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
~FilterID()
Destructor.
Definition: FilterID.h:222
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.