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

Storage element for the eventwise T0 estimation. More...

#include <EventT0.h>

Inheritance diagram for EventT0:
Collaboration diagram for EventT0:

Classes

struct  EventT0Component
 Structure for storing the extracted event t0s together with its detector and its uncertainty. More...
 

Public Member Functions

bool hasEventT0 () const
 Check if a final event t0 is set.
 
double getEventT0 () const
 Return the final event t0, if one is set. Else, return NAN.
 
std::optional< EventT0ComponentgetEventT0Component () const
 Return the final event t0, if one is set. Else, return an empty optional.
 
double getEventT0Uncertainty () const
 Return the final event t0 uncertainty, if one is set. Else, return NAN.
 
void setEventT0 (double eventT0, double eventT0Uncertainty, const Const::DetectorSet &detector, const std::string &algorithm="")
 Replace/set the final double T0 estimation.
 
void setEventT0 (const EventT0Component &eventT0)
 Replace/set the final double T0 estimation.
 
void addTemporaryEventT0 (const EventT0Component &eventT0)
 Add another temporary double T0 estimation.
 
const std::vector< EventT0Component > & getTemporaryEventT0s () const
 Return the list of all temporary event t0 estimations.
 
const std::vector< EventT0ComponentgetTemporaryEventT0s (Const::EDetector detector) const
 Return the list of all temporary event t0 estimations for a specific detector.
 
bool hasTemporaryEventT0 (const Const::DetectorSet &detectorSet=Const::allDetectors) const
 Check if one of the detectors in the given set has a temporary t0 estimation.
 
Const::DetectorSet getTemporaryDetectors () const
 Get the detectors that have determined temporary event T0s.
 
unsigned long getNumberOfTemporaryEventT0s () const
 Return the number of stored event T0s.
 
std::optional< EventT0ComponentgetBestSVDTemporaryEventT0 () const
 Return the best SVD-based EventT0 candidate if it exists.
 
std::optional< EventT0ComponentgetBestCDCTemporaryEventT0 () const
 Return the best CDC-based EventT0 candidate if it exists.
 
std::optional< EventT0ComponentgetBestTOPTemporaryEventT0 () const
 Return the best TOP-based EventT0 candidate if it exists.
 
std::optional< EventT0ComponentgetBestECLTemporaryEventT0 () const
 Return the best ECL-based EventT0 candidate if it exists.
 
bool isEventT0Of (Const::EDetector detector) const
 Is the current EventT0 value based on information of the detector. More...
 
bool isSVDEventT0 () const
 Is m_eventT0 based on SVD information?
 
bool isCDCEventT0 () const
 Is m_eventT0 based on CDC information?
 
bool isTOPEventT0 () const
 Is m_eventT0 based on TOP information?
 
bool isECLEventT0 () const
 Is m_eventT0 based on ECL information?
 
void clearTemporaries ()
 Clear the list of temporary event T0 estimations.
 
void clearEventT0 ()
 Clear the final EventT0, this is neded in case some algorithm has set one for an itertive t0 finding procedure and none was set in the beginning.
 

Private Attributes

std::vector< EventT0Componentm_temporaryEventT0List
 Internal storage of the temporary event t0 list.
 
EventT0Component m_eventT0
 Internal storage for the final event t0.
 
bool m_hasEventT0 = false
 Internal storage of the final eventT0 is set.
 

Detailed Description

Storage element for the eventwise T0 estimation.

It can store a double value with uncertainty together with the detector component.

Additionally, it can store an arbitrary number of temporary event t0 estimations not to be used for the final decision.

Definition at line 29 of file EventT0.h.

Member Function Documentation

◆ isEventT0Of()

bool isEventT0Of ( Const::EDetector  detector) const
inline

Is the current EventT0 value based on information of the detector.

Parameters
detectorThe detector for which one wants to know whether m_eventT0 is based on it
Returns
true if m_eventT0 is based on the detector under question, false otherwise

Definition at line 109 of file EventT0.h.

110  {
111  if (hasTemporaryEventT0(detector)) {
112  return m_eventT0.detectorSet.contains(detector);
113  }
114  return false;
115  }
bool contains(const DetectorSet &set) const
Check whether this set contains another set.
Definition: Const.h:226
EventT0Component m_eventT0
Internal storage for the final event t0.
Definition: EventT0.h:153
bool hasTemporaryEventT0(const Const::DetectorSet &detectorSet=Const::allDetectors) const
Check if one of the detectors in the given set has a temporary t0 estimation.
Definition: EventT0.cc:59
Const::DetectorSet detectorSet
Storage of the detector, who has determined the event T0.
Definition: EventT0.h:52

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