Belle II Software development
AlgoritmType Class Reference

Small class for classifying types of analyzing algorithms. More...

#include <AlgoritmType.h>

Public Types

enum  Type {
  UnknownType ,
  AnalyzingAlgorithmBase ,
  AnalyzingAlgorithmValuePX ,
  AnalyzingAlgorithmValuePY ,
  AnalyzingAlgorithmValuePZ ,
  AnalyzingAlgorithmValuePT ,
  AnalyzingAlgorithmValueP ,
  AnalyzingAlgorithmValuePTheta ,
  AnalyzingAlgorithmValuePPhi ,
  AnalyzingAlgorithmValueDistSeed2IP ,
  AnalyzingAlgorithmValueDistSeed2IPZ ,
  AnalyzingAlgorithmValueDistSeed2IPXY ,
  AnalyzingAlgorithmValueQI ,
  AnalyzingAlgorithmResidualPX ,
  AnalyzingAlgorithmResidualPY ,
  AnalyzingAlgorithmResidualPZ ,
  AnalyzingAlgorithmResidualPT ,
  AnalyzingAlgorithmResidualP ,
  AnalyzingAlgorithmResidualPTheta ,
  AnalyzingAlgorithmResidualPPhi ,
  AnalyzingAlgorithmResidualPAngle ,
  AnalyzingAlgorithmResidualPTAngle ,
  AnalyzingAlgorithmResidualPosition ,
  AnalyzingAlgorithmResidualPositionXY ,
  AnalyzingAlgorithmLostUClusters ,
  AnalyzingAlgorithmLostVClusters ,
  AnalyzingAlgorithmTotalUClusters ,
  AnalyzingAlgorithmTotalVClusters ,
  AnalyzingAlgorithmLostUEDep ,
  AnalyzingAlgorithmLostVEDep ,
  AnalyzingAlgorithmTotalUEDep ,
  AnalyzingAlgorithmTotalVEDep ,
  NTypes
}
 allows classifying Analyzing algorithms More...
 

Static Public Member Functions

static bool isValidType (AlgoritmType::Type type)
 checks if a type given is a valid type for an AlgoritmType
 
static bool isValidName (std::string type)
 checks if the name given is a valid name for an AlgoritmType
 
static std::string getTypeName (AlgoritmType::Type type)
 for given AlgoritmType the corresponding string-name will be returned.
 
static AlgoritmType::Type getTypeEnum (std::string type)
 for given string name of a AlgoritmType the corresponding AlgoritmType will be returned.
 
static bool isValueDoubleType (AlgoritmType::Type aType)
 returns true if given AlgoritmType is a an algorithm which calculates a value in double for each TC passed, false if not
 
static bool isResidualDoubleType (AlgoritmType::Type aType)
 returns true if given AlgoritmType is a an algorithm which calculates a residual in double for each TC passed, false if not
 
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 each TC passed, false if not
 
static bool isHitValueVecDoubleType (AlgoritmType::Type aType)
 returns true if given AlgoritmType is a an algorithm which calculates a value in vector< double> based on hits of each TC passed, false if not
 

Static Protected Attributes

static std::map< Type, std::string > s_fromTypeToString
 static map allowing translation from a given type to its name stored as a string
 
static std::map< std::string, Types_fromStringToType
 static map allowing translation from a given name stored as a string to its type
 

Detailed Description

Small class for classifying types of analyzing algorithms.

Contains enums and converter from and to strings

Definition at line 25 of file AlgoritmType.h.

Member Enumeration Documentation

◆ Type

enum Type

allows classifying Analyzing algorithms

Enumerator
AnalyzingAlgorithmBase 

base type, template for all the other analyzing algorithms, contains essential functions for all algorithms:

AnalyzingAlgorithmValuePX 

value type, stores double. defined in ..tracking/trackFindingVXD/analyzingTools/algorithms/AnalyzingAlgorithmValues.h:

AnalyzingAlgorithmResidualPX 

residual type, stores double. defined in ..tracking/trackFindingVXD/analyzingTools/algorithms/AnalyzingAlgorithmResiduals.h:

AnalyzingAlgorithmLostUClusters 

value type hit (with access to clusters via relations), stores int. defined in ..tracking/trackFindingVXD/analyzingTools/algorithms/AnalyzingAlgorithmClusterBased.h:

AnalyzingAlgorithmLostUEDep 

value type hit (with access to clusters via relations), stores vector< double >. defined in ..tracking/trackFindingVXD/analyzingTools/algorithms/AnalyzingAlgorithmClusterBased.h:

Definition at line 29 of file AlgoritmType.h.

29 {
30 UnknownType, // defines unknown types
35 AnalyzingAlgorithmValuePY,
36 AnalyzingAlgorithmValuePZ,
37 AnalyzingAlgorithmValuePT,
38 AnalyzingAlgorithmValueP,
39 AnalyzingAlgorithmValuePTheta,
40 AnalyzingAlgorithmValuePPhi,
41 AnalyzingAlgorithmValueDistSeed2IP,
42 AnalyzingAlgorithmValueDistSeed2IPZ,
43 AnalyzingAlgorithmValueDistSeed2IPXY,
44 AnalyzingAlgorithmValueQI,
47 AnalyzingAlgorithmResidualPY,
48 AnalyzingAlgorithmResidualPZ,
49 AnalyzingAlgorithmResidualPT,
50 AnalyzingAlgorithmResidualP,
51 AnalyzingAlgorithmResidualPTheta,
52 AnalyzingAlgorithmResidualPPhi,
53 AnalyzingAlgorithmResidualPAngle,
54 AnalyzingAlgorithmResidualPTAngle,
55 AnalyzingAlgorithmResidualPosition,
56 AnalyzingAlgorithmResidualPositionXY,
59 AnalyzingAlgorithmLostVClusters,
60 AnalyzingAlgorithmTotalUClusters,
61 AnalyzingAlgorithmTotalVClusters,
64 AnalyzingAlgorithmLostVEDep,
65 AnalyzingAlgorithmTotalUEDep,
66 AnalyzingAlgorithmTotalVEDep,
67 NTypes // number of analyzingAlgorithmTypes available
68 };
@ AnalyzingAlgorithmResidualPX
residual type, stores double. defined in ..tracking/trackFindingVXD/analyzingTools/algorithms/Analyzi...
Definition: AlgoritmType.h:46
@ AnalyzingAlgorithmBase
base type, template for all the other analyzing algorithms, contains essential functions for all algo...
Definition: AlgoritmType.h:32
@ AnalyzingAlgorithmLostUEDep
value type hit (with access to clusters via relations), stores vector< double >. defined in ....
Definition: AlgoritmType.h:63
@ AnalyzingAlgorithmLostUClusters
value type hit (with access to clusters via relations), stores int. defined in ..tracking/trackFindin...
Definition: AlgoritmType.h:58
@ AnalyzingAlgorithmValuePX
value type, stores double. defined in ..tracking/trackFindingVXD/analyzingTools/algorithms/AnalyzingA...
Definition: AlgoritmType.h:34

Member Function Documentation

◆ getTypeEnum()

static AlgoritmType::Type getTypeEnum ( std::string  type)
inlinestatic

for given string name of a AlgoritmType the corresponding AlgoritmType will be returned.

For invalid types, UnknownType will be passed

Definition at line 98 of file AlgoritmType.h.

99 {
100 auto pos = AlgoritmType::s_fromStringToType.find(type);
101 if (pos == AlgoritmType::s_fromStringToType.end()) {
102 B2ERROR("AlgoritmType::getTypeName(): given iD " << type << " is not a valid AlgoritmType, return AlgoritmType::UnknownType!");
103 return AlgoritmType::s_fromStringToType[std::string("UnknownType")];
104 }
105 return pos->second;
106 }
static std::map< std::string, Type > s_fromStringToType
static map allowing translation from a given name stored as a string to its type
Definition: AlgoritmType.h:130

◆ getTypeName()

static std::string getTypeName ( AlgoritmType::Type  type)
inlinestatic

for given AlgoritmType the corresponding string-name will be returned.

For invalid types, UnknownType will be passed

Definition at line 86 of file AlgoritmType.h.

87 {
88 auto pos = AlgoritmType::s_fromTypeToString.find(type);
89 if (pos == AlgoritmType::s_fromTypeToString.end()) {
90 B2ERROR("AlgoritmType::getTypeName(): given iD " << type << " is not a valid AlgoritmType, return AlgoritmType::UnknownType!");
91 return AlgoritmType::s_fromTypeToString[UnknownType];
92 }
93 return pos->second;
94 }
static std::map< Type, std::string > s_fromTypeToString
static map allowing translation from a given type to its name stored as a string
Definition: AlgoritmType.h:127

◆ isHitValueIntType()

static bool isHitValueIntType ( AlgoritmType::Type  aType)
inlinestatic

returns true if given AlgoritmType is a an algorithm which calculates a value in int based on hits of each TC passed, false if not

Definition at line 118 of file AlgoritmType.h.

119 { return aType > AlgoritmType::AnalyzingAlgorithmResidualPositionXY and aType < AlgoritmType::AnalyzingAlgorithmLostUEDep; }

◆ isHitValueVecDoubleType()

static bool isHitValueVecDoubleType ( AlgoritmType::Type  aType)
inlinestatic

returns true if given AlgoritmType is a an algorithm which calculates a value in vector< double> based on hits of each TC passed, false if not

Definition at line 122 of file AlgoritmType.h.

123 { return aType > AlgoritmType::AnalyzingAlgorithmTotalVClusters and aType < AlgoritmType::NTypes; }

◆ isResidualDoubleType()

static bool isResidualDoubleType ( AlgoritmType::Type  aType)
inlinestatic

returns true if given AlgoritmType is a an algorithm which calculates a residual in double for each TC passed, false if not

Definition at line 114 of file AlgoritmType.h.

115 { return aType < AlgoritmType::AnalyzingAlgorithmLostUClusters and aType > AlgoritmType::AnalyzingAlgorithmValueQI; }

◆ isValidName()

static bool isValidName ( std::string  type)
inlinestatic

checks if the name given is a valid name for an AlgoritmType

Definition at line 79 of file AlgoritmType.h.

80 {
81 return ((AlgoritmType::s_fromStringToType.find(type) == AlgoritmType::s_fromStringToType.end()) ? false : true);
82 }

◆ isValidType()

static bool isValidType ( AlgoritmType::Type  type)
inlinestatic

checks if a type given is a valid type for an AlgoritmType

Definition at line 72 of file AlgoritmType.h.

73 {
74 return ((AlgoritmType::s_fromTypeToString.find(type) == AlgoritmType::s_fromTypeToString.end()) ? false : true);
75 }

◆ isValueDoubleType()

static bool isValueDoubleType ( AlgoritmType::Type  aType)
inlinestatic

returns true if given AlgoritmType is a an algorithm which calculates a value in double for each TC passed, false if not

Definition at line 110 of file AlgoritmType.h.

111 { return aType < AlgoritmType::AnalyzingAlgorithmResidualPX and aType > AlgoritmType::AnalyzingAlgorithmBase; }

Member Data Documentation

◆ s_fromStringToType

std::map< std::string, Belle2::AlgoritmType::Type > s_fromStringToType
staticprotected

static map allowing translation from a given name stored as a string to its type

setting static dictionary translating string -> type

Definition at line 130 of file AlgoritmType.h.

◆ s_fromTypeToString

std::map< Belle2::AlgoritmType::Type, std::string > s_fromTypeToString
staticprotected

static map allowing translation from a given type to its name stored as a string

setting static dictionary translating type -> string

Definition at line 127 of file AlgoritmType.h.


The documentation for this class was generated from the following files: