Belle II Software  release-05-02-19
TCType Class Reference

Small class for classifying types of reconstructed track candidates. More...

#include <TCType.h>

Collaboration diagram for TCType:

Public Types

enum  Type {
  UnknownType,
  Unclassified,
  Lost,
  RefOutlier,
  Ghost,
  SmallStump,
  Clone,
  Contaminated,
  Clean,
  Perfect,
  AllTCTypes,
  Reference,
  NTypes
}
 allows classifying TCs
 

Static Public Member Functions

static bool isValidType (TCType::Type type)
 checks if a type given is a valid type for a TCType
 
static bool isValidName (std::string type)
 checks if the name given is a valid name for a TCType
 
static std::string getTypeName (TCType::Type type)
 for given TCType the corresponding string-name will be returned. More...
 
static TCType::Type getTypeEnum (std::string type)
 for given string name of a TCType the corresponding TCType will be returned. More...
 
static bool isReference (TCType::Type aType)
 returns true if given TCType is a reference-Type, false if not
 
static bool isTestTC (TCType::Type aType)
 returns true if given TCType is a testTC-Type, false if not
 
static bool isGoodTestTC (TCType::Type aType)
 returns true if given TCType is a testTC-Type and did successfully reconstruct a track
 

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 More...
 
static std::map< std::string, Types_fromStringToType
 static map allowing translation from a given name stored as a string to its type More...
 

Detailed Description

Small class for classifying types of reconstructed track candidates.

Contains enums and converter from and to strings

Definition at line 35 of file TCType.h.

Member Function Documentation

◆ getTypeEnum()

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

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

For invalid types, UnknownType will be passed

Definition at line 84 of file TCType.h.

89  {
90  return aType == TCType::Reference
91  or aType == TCType::Lost
92  or aType == TCType::RefOutlier;

◆ getTypeName()

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

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

For invalid types, UnknownType will be passed

Definition at line 72 of file TCType.h.

Member Data Documentation

◆ s_fromStringToType

std::map< std::string, Belle2::TCType::Type > s_fromStringToType
staticprotected
Initial value:
= {
{std::string("UnknownType"), Belle2::TCType::UnknownType},
{std::string("Unclassified"), Belle2::TCType::Unclassified},
{std::string("Lost"), Belle2::TCType::Lost},
{std::string("RefOutlier"), Belle2::TCType::RefOutlier},
{std::string("Ghost"), Belle2::TCType::Ghost},
{std::string("SmallStump"), Belle2::TCType::SmallStump},
{std::string("Clone"), Belle2::TCType::Clone},
{std::string("Contaminated"), Belle2::TCType::Contaminated},
{std::string("Clean"), Belle2::TCType::Clean},
{std::string("Perfect"), Belle2::TCType::Perfect},
{std::string("AllTCTypes"), Belle2::TCType::AllTCTypes},
{std::string("Reference"), Belle2::TCType::Reference},
{std::string("NTypes"), Belle2::TCType::NTypes}
}

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

setting static dictionary translating string -> type

Definition at line 125 of file TCType.h.

◆ s_fromTypeToString

std::map< Belle2::TCType::Type, std::string > s_fromTypeToString
staticprotected
Initial value:
= {
{Belle2::TCType::UnknownType, std::string("UnknownType")},
{Belle2::TCType::Unclassified, std::string("Unclassified")},
{Belle2::TCType::Lost, std::string("Lost")},
{Belle2::TCType::RefOutlier, std::string("RefOutlier")},
{Belle2::TCType::Ghost, std::string("Ghost")},
{Belle2::TCType::SmallStump, std::string("SmallStump")},
{Belle2::TCType::Clone, std::string("Clone")},
{Belle2::TCType::Contaminated, std::string("Contaminated")},
{Belle2::TCType::Clean, std::string("Clean")},
{Belle2::TCType::Perfect, std::string("Perfect")},
{Belle2::TCType::AllTCTypes, std::string("AllTCTypes")},
{Belle2::TCType::Reference, std::string("Reference")},
{Belle2::TCType::NTypes, std::string("NTypes")}
}

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

setting static dictionary translating type -> string

Definition at line 122 of file TCType.h.


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