Belle II Software  release-08-01-10
AutomatonCell Class Reference

Cell used by the cellular automata. More...

#include <AutomatonCell.h>

Public Types

enum  ECellFlag : unsigned int {
  c_Assigned = 1 ,
  c_Start = 2 ,
  c_PriorityPath = 4 ,
  c_Cycle = 8 ,
  c_Masked = 16 ,
  c_Taken = 32 ,
  c_Background = 64 ,
  c_Priority = 128 ,
  c_Reverse = 256 ,
  c_Alias = 512 ,
  c_BadADCOrTOT = 1024
}
 Type for the status flags of cells in the cellular automata.
 
using ECellFlags = ECellFlag
 Type for an ored combination of the status flags of cells in the cellular automata.
 

Public Member Functions

 AutomatonCell ()
 Default constructor for ROOT compatibility. Cell weight defaults to 0.
 
 AutomatonCell (const Weight &cellWeight)
 Constructor with a certain cell weight.
 
 AutomatonCell (const Weight &cellWeight, const ECellFlags &initialFlags)
 Constructor with a certain cell weight and initial flags to be set.
 
Weight getCellState () const
 Getter for the cell state.
 
void setCellState (Weight state)
 Setter for the cell state.
 
Weight getCellWeight () const
 Getter for the cell weight. More...
 
void setCellWeight (Weight weight)
 Setter for the cell weight.
 
void setAssignedFlag (bool setTo=true)
 Sets the already assigned marker flag to the given value. Default value true.
 
void unsetAssignedFlag ()
 Resets the already assigned marker flag to false.
 
bool hasAssignedFlag () const
 Gets the current state of the already assigned marker flag.
 
void setStartFlag (bool setTo=true)
 Sets the start marker flag to the given value. Default value true.
 
void unsetStartFlag ()
 Resets the start marker flag to false.
 
bool hasStartFlag () const
 Gets the current state of the start marker flag.
 
void setPriorityPathFlag (bool setTo=true)
 Sets the priority path marker flag to the given value. Default value true.
 
void unsetPriorityPathFlag ()
 Resets the priority path marker flag to false.
 
bool hasPriorityPathFlag () const
 Gets the current state of the priority path marker flag.
 
void setCycleFlag (bool setTo=true)
 Sets the cycle marker flag to the given value. Default value true.
 
void unsetCycleFlag ()
 Resets the cycle marker flag to false.
 
bool hasCycleFlag () const
 Gets the current state of the cycle marker flag.
 
void unsetTemporaryFlags ()
 Resets the assigned, start and cycle marker flag.
 
void setMaskedFlag (bool setTo=true)
 Sets the masked flag to the given value. Default value true.
 
void unsetMaskedFlag ()
 Resets the masked flag to false.
 
bool hasMaskedFlag () const
 Gets the current state of the masked marker flag.
 
void setTakenFlag (bool setTo=true)
 Sets the taken flag to the given value. Default value true.
 
void unsetTakenFlag ()
 Resets the taken flag to false.
 
bool hasTakenFlag () const
 Gets the current state of the taken marker flag. More...
 
void setBackgroundFlag (bool setTo=true)
 Sets the background flag to the given value. Default value true.
 
void unsetBackgroundFlag ()
 Resets the background flag to false.
 
bool hasBackgroundFlag () const
 Gets the current state of the do not use flag marker flag.
 
void setBadADCOrTOTFlag (bool setTo=true)
 Sets the bad ADC or TOT flag to the given value. More...
 
void unsetBadADCOrTOTFlag ()
 Resets the bad ADC or TOT flag to false.
 
bool hasBadADCOrTOTFlag () const
 Gets the current state of the bad ADC or TOT flag.
 
void setPriorityFlag (bool setTo=true)
 Sets the priority flag to the given value. Default value true.
 
void unsetPriorityFlag ()
 Resets the priority flag to false.
 
bool hasPriorityFlag () const
 Gets the current state of the do not use flag marker flag.
 
void setReverseFlag (bool setTo=true)
 Sets the reverse flag to the given value. Default value true.
 
void unsetReverseFlag ()
 Resets the reverse flag to false.
 
bool hasReverseFlag () const
 Gets the current state of the do not use flag marker flag.
 
void setAliasFlag (bool setTo=true)
 Sets the alias flag to the given value. Default value true.
 
void unsetAliasFlag ()
 Resets the alias flag to false.
 
bool hasAliasFlag () const
 Gets the current state of the do not use flag marker flag.
 
template<ECellFlags cellFlag>
void setFlags (bool setTo)
 Setting accessing the flag by tag.
 
const ECellFlagsgetFlags () const
 Getter for the ored combination of the cell flags to mark some status of the cell. More...
 
void setFlags (ECellFlags flags)
 Setter for the cell flags.
 
void clearFlags (ECellFlags flags=c_AllFlags)
 Clear all flags.
 
bool hasAnyFlags (ECellFlags flags) const
 Checks if a cell has any of a sum of given flags.
 

Static Public Attributes

static const ECellFlags c_AllFlags
 Constant summing all possible cell flags. More...
 
static const ECellFlags c_TemporaryFlags
 Flage that are reset at the start of each run of the cellular automaton. More...
 

Private Attributes

Weight m_weight = 1
 Storage for the cell weight.
 
ECellFlags m_flags = ECellFlag(0)
 Storage for the cell status flags.
 
Weight m_state = 0
 Storage for the cell state set by the cellular automata.
 

Detailed Description

Cell used by the cellular automata.

This class represents a cell in the cellular automata algorithm the local tracking is build on. Different to the ordinary cellular automaton algorihms this class stores the state not as a interger number but
as a float value. This enables to have fractional measures of quality attached to the cell if say one new item
is not worth a full point, but a probability measure which is additiv. The points that can be gained by picking
this cell are stored in the cell weight property. Moreover the class defines status flags to be set and/or read by
the cellular automaton.

Definition at line 29 of file AutomatonCell.h.

Member Function Documentation

◆ getCellWeight()

Weight getCellWeight ( ) const
inline

Getter for the cell weight.

The cell might carry more than one unit of information to be added to the path.
The weight discribes an additiv constant to be gained when picking up this cell.
For instance segments may provide their number of hits as weight.
Or they could have a reduced number of hits deminshed by the quality of a fit to the segment.
For on the other side wire hits this should be one.

Definition at line 116 of file AutomatonCell.h.

117  {
118  return m_weight;
119  }
Weight m_weight
Storage for the cell weight.

◆ getFlags()

const ECellFlags& getFlags ( ) const
inline

Getter for the ored combination of the cell flags to mark some status of the cell.

Give the ored combination of all cell flags, therefore providing a bit pattern.
Use rather hasAnyFlags() to retrieve stats even for single state values.

Definition at line 352 of file AutomatonCell.h.

◆ hasTakenFlag()

bool hasTakenFlag ( ) const
inline

Gets the current state of the taken marker flag.

Taken means that the hit has been either assigned to a track or has been classified as background should therefore be not used for any track fitting

Definition at line 239 of file AutomatonCell.h.

◆ setBadADCOrTOTFlag()

void setBadADCOrTOTFlag ( bool  setTo = true)
inline

Sets the bad ADC or TOT flag to the given value.

Default value true. The CDCWireHit with bad ADC or TOT should not be used in pattern recognition, but may be added to the track after the track finding if it is very close to the found track.

Definition at line 265 of file AutomatonCell.h.

Member Data Documentation

◆ c_AllFlags

const ECellFlags c_AllFlags
static
Initial value:
= ECellFlags(ECellFlag::c_Assigned +
ECellFlag::c_Start +
ECellFlag::c_PriorityPath +
ECellFlag::c_Cycle +
ECellFlag::c_Masked +
ECellFlag::c_Taken +
ECellFlag::c_Background +
ECellFlag::c_Reverse +
ECellFlag::c_Alias +
ECellFlag::c_BadADCOrTOT)
ECellFlag ECellFlags
Type for an ored combination of the status flags of cells in the cellular automata.
Definition: AutomatonCell.h:50

Constant summing all possible cell flags.

Definition at line 53 of file AutomatonCell.h.

◆ c_TemporaryFlags

const ECellFlags c_TemporaryFlags
static
Initial value:
= ECellFlags(ECellFlag::c_Assigned +
ECellFlag::c_Start +
ECellFlag::c_PriorityPath +
ECellFlag::c_Cycle)

Flage that are reset at the start of each run of the cellular automaton.

Definition at line 65 of file AutomatonCell.h.


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