Belle II Software  release-08-01-10
AnalyzingAlgorithmFactory.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 #pragma once
9 
10 // fw:
11 #include <framework/logging/Logger.h>
12 
13 // tracking:
14 #include<tracking/trackFindingVXD/analyzingTools/AlgoritmType.h>
15 #include <tracking/trackFindingVXD/analyzingTools/algorithms/AnalyzingAlgorithmBase.h>
16 #include <tracking/trackFindingVXD/analyzingTools/algorithms/AnalyzingAlgorithmResiduals.h>
17 #include <tracking/trackFindingVXD/analyzingTools/algorithms/AnalyzingAlgorithmValues.h>
18 #include <tracking/trackFindingVXD/analyzingTools/algorithms/AnalyzingAlgorithmClusterBased.h>
19 
20 
21 
22 namespace Belle2 {
33  template <class DataType, class TCInfoType, class VectorType>
35  {
39 
42 
45 
48 
51 
54 
57 
60 
63 
66 
69 
72 
73 
77 
80 
83 
86 
89 
92 
95 
98 
101 
104 
107 
108  if (!AlgoritmType::isValueDoubleType(algorithmID)
109  and !AlgoritmType::isResidualDoubleType(algorithmID)
110  and (AlgoritmType::isHitValueVecDoubleType(algorithmID)
111  or AlgoritmType::isHitValueIntType(algorithmID))) {
112  B2WARNING(" AnalyzingAlgorithmFactoryDouble: given algorithmID " << AlgoritmType::getTypeName(algorithmID) <<
113  " is no algorithm of double type but of another (valid) category. Please use the correct factory for your purpose. Returning non-functioning base-class instead!");
114  } else {
115  B2ERROR(" AnalyzingAlgorithmFactoryDouble: given algorithmID " << AlgoritmType::getTypeName(algorithmID) <<
116  " is not known, returning non-functioning base-class instead!");
117  }
118 
120  }
121 
122 
123 
128  template <class DataType, class TCInfoType, class VectorType>
130  {
134 
137 
140 
143 
146 
147  if (!AlgoritmType::isHitValueIntType(algorithmID)
148  and (AlgoritmType::isValueDoubleType(algorithmID)
149  or AlgoritmType::isResidualDoubleType(algorithmID)
150  or AlgoritmType::isHitValueVecDoubleType(algorithmID))) {
151  B2WARNING(" AnalyzingAlgorithmInt: given algorithmID " << AlgoritmType::getTypeName(algorithmID) <<
152  " is no algorithm of int type but of another (valid) category. Please use the correct factory for your purpose. Returning non-functioning base-class instead!");
153  } else {
154  B2ERROR(" AnalyzingAlgorithmInt: given algorithmID " << AlgoritmType::getTypeName(algorithmID) <<
155  " is not known, returning non-functioning base-class instead!");
156  }
157 
159  }
160 
161 
162 
167  template <class DataType, class TCInfoType, class VectorType>
169  {
173 
176 
179 
182 
185 
186 
187  if (!AlgoritmType::isHitValueVecDoubleType(algorithmID)
188  and (AlgoritmType::isValueDoubleType(algorithmID)
189  or AlgoritmType::isResidualDoubleType(algorithmID)
190  or AlgoritmType::isHitValueIntType(algorithmID))) {
191  B2WARNING(" AnalyzingAlgorithmVecDouble: given algorithmID " << AlgoritmType::getTypeName(algorithmID) <<
192  " is no algorithm of vector<double> type but of another (valid) category. Please use the correct factory for your purpose. Returning non-functioning base-class instead!");
193  } else {
194  B2ERROR(" AnalyzingAlgorithmVecDouble: given algorithmID " << AlgoritmType::getTypeName(algorithmID) <<
195  " is not known, returning non-functioning base-class instead!");
196  }
197 
199  }
200 
202 }
static bool isHitValueIntType(AlgoritmType::Type aType)
returns true if given AlgoritmType is a an algorithm which calculates a value in int based on hits of...
Definition: AlgoritmType.h:118
Type
allows classifying Analyzing algorithms
Definition: AlgoritmType.h:29
static bool isValueDoubleType(AlgoritmType::Type aType)
returns true if given AlgoritmType is a an algorithm which calculates a value in double for each TC p...
Definition: AlgoritmType.h:110
static bool isResidualDoubleType(AlgoritmType::Type aType)
returns true if given AlgoritmType is a an algorithm which calculates a residual in double for each T...
Definition: AlgoritmType.h:114
static bool isHitValueVecDoubleType(AlgoritmType::Type aType)
returns true if given AlgoritmType is a an algorithm which calculates a value in vector< double> base...
Definition: AlgoritmType.h:122
static std::string getTypeName(AlgoritmType::Type type)
for given AlgoritmType the corresponding string-name will be returned.
Definition: AlgoritmType.h:86
Base class for storing an algorithm determining the data one wants to have.
Class for storing an algorithm to find out how many u-type-clusters the testTC lost compared to the r...
Class for storing an algorithm to find out the energy deposit of u-type-clusters the testTC lost comp...
Class for storing an algorithm to find out how many v-type-clusters the testTC lost compared to the r...
Class for storing an algorithm to find out the energy deposit of v-type-clusters the testTC lost comp...
Class for storing an algorithm determining the residual (ref-test) of momentum in its angle (directio...
Class for storing an algorithm determining the residual (ref-test) of momentum in phi (in degrees)
Class for storing an algorithm determining the residual (ref-test) of pT in angle (transverse directi...
Class for storing an algorithm determining the residual (ref-test) of momentum in pT.
Class for storing an algorithm determining the residual (ref-test) of momentum in theta (in degrees)
INFO This file contains all the algorithms calculating residuals of something.
Class for storing an algorithm determining the residual (ref-test) of momentum in Y.
Class for storing an algorithm determining the residual (ref-test) of momentum in Z.
Class for storing an algorithm determining the residual (ref-test) of momentum in |p|.
Class for storing an algorithm determining the residual (ref-test) of the seed position in XY (=r)
Class for storing an algorithm determining the residual (ref-test) of the seed position in 3D.
Class for storing an algorithm to find out how many u-type-clusters the given TC had.
Class for storing an algorithm to find out the energy deposit of u-type-clusters the given TC had.
Class for storing an algorithm to find out how many v-type-clusters the given TC had.
Class for storing an algorithm to find out the energy deposit of v-type-clusters the given TC had.
Class for storing an algorithm determining the distance seedHit to IP in XY (=r)
Class for storing an algorithm determining the distance seedHit to IP in XY (=r)
Class for storing an algorithm determining the the distance seedHit to IP in 3D.
Class for storing an algorithm determining the momentum in phi (in degrees)
Class for storing an algorithm determining the momentum in pT.
Class for storing an algorithm determining the momentum in theta (in degrees)
INFO This file contains all the algorithms calculating a certain value of something.
Class for storing an algorithm determining the momentum in Y.
Class for storing an algorithm determining the momentum in Z.
Class for storing an algorithm determining the momentum in |p|.
Class for storing an algorithm determining the quality indicator of the TC.
AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > * AnalyzingAlgorithmFactoryDouble(AlgoritmType::Type algorithmID)
the analyzingAlgorithm factory for algorithms returning one double for each TC passed:
AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > * AnalyzingAlgorithmFactoryVecDouble(AlgoritmType::Type algorithmID)
the analyzingAlgorithm factory for algorithms returning one vector< double> for each TC passed:
AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > * AnalyzingAlgorithmFactoryInt(AlgoritmType::Type algorithmID)
the analyzingAlgorithm factory for algorithms returning one int for each TC passed:
Abstract base class for different kinds of events.