Belle II Software light-2406-ragdoll
BackgroundMetaData.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
9#pragma once
10
11#include <framework/pcore/Mergeable.h>
12#include <framework/core/FrameworkExceptions.h>
13
14#include <string>
15#include <string_view>
16
17namespace Belle2 {
27
28 public:
29
33 enum BG_TAG { bg_none = 0,
50 bg_RBB = 17,
51 bg_BHWide = 18,
65 bg_other = 99
66 };
67
71 BELLE2_DEFINE_EXCEPTION(BackgroundMetaDataNotMergeable,
72 "BackgroundMetaData: objects cannot be merged");
73
77 enum EFileType { c_Usual = 0,
78 c_ECL = 1,
79 c_PXD = 2
80 };
81
86 {}
87
92 void setBackgroundType(const std::string& type) {m_backgroundType = type;}
93
99
104 void setRealTime(float time) {m_realTime = time;}
105
110 void setFileType(EFileType type) {m_fileType = type;}
111
116 const std::string& getBackgroundType() const {return m_backgroundType;}
117
123
128 float getRealTime() const {return m_realTime;}
129
135
139 static constexpr std::string_view getDefaultBackgroundOverlayType() { return c_defaultBackgroundOverlayType; }
140
144 virtual void merge(const Mergeable* other) override;
145
149 virtual void clear() override;
150
151
152 private:
153
159 bool canBeMerged(const BackgroundMetaData* other);
160
161 std::string m_backgroundType;
163 float m_realTime = 0;
165 static constexpr std::string_view c_defaultBackgroundOverlayType = "RandomTrigger";
171 };
173}
174
Metadata information about the beam background file.
BG_TAG m_backgroundTag
background tag
void setRealTime(float time)
Sets real time that corresponds to this background sample.
float m_realTime
real time that corresponds to beam background sample
EFileType
Enum for BG file types.
ClassDefOverride(BackgroundMetaData, 4)
Class definition required for creation of ROOT dictionary.
bool canBeMerged(const BackgroundMetaData *other)
Checks if other object can be merged with this object.
BELLE2_DEFINE_EXCEPTION(BackgroundMetaDataNotMergeable, "BackgroundMetaData: objects cannot be merged")
Exception definition.
void setBackgroundTag(BG_TAG tag)
Sets background tag value that corresponds to background type.
float getRealTime() const
Returns real time that corresponds to this background sample.
void setBackgroundType(const std::string &type)
Sets background type.
EFileType getFileType() const
Returns file type.
const std::string & getBackgroundType() const
Returns the type of background.
BG_TAG
Enum for background tags.
@ bg_RBB_HER_far
Radiative Bhabha far HER.
@ bg_BHWide_LER
Wide angle radiative Bhabha LER.
@ bg_Coulomb_dynamic_LER
Coulomb dynamic LER.
@ bg_Coulomb_dynamic_HER
Coulomb dynamic HER.
@ bg_BHWideLargeAngle
Large angle radiative Bhabha.
@ bg_RBB_LER
Radiative Bhabha LER.
@ bg_Brems_base_HER
bremsstrahlung base HER
@ bg_Touschek_HER_far
Touschek far HER.
@ bg_Brems_LER
bremsstrahlung LER
@ bg_InjectionLER
injection background LER
@ bg_Brems_dynamic_HER
bremsstrahlung dynamic HER
@ bg_BHWide_HER
Wide angle radiative Bhabha HER.
@ bg_Coulomb_base_HER
Coulomb base HER.
@ bg_SynchRad_HER
Synchrotron radiation HER.
@ bg_Coulomb_base_LER
Coulomb base LER.
@ bg_Brems_HER
bremsstrahlung HER
@ bg_Brems_dynamic_LER
bremsstrahlung dynamic LER
@ bg_Touschek_LER_far
Touschek far LER.
@ bg_BHWide
Wide angle radiative Bhabha.
@ bg_RBB_HER
Radiative Bhabha HER.
@ bg_SynchRad_LER
Synchrotron radiation LER.
@ bg_InjectionHER
injection background HER
@ bg_RBB_LER_far
Radiative Bhabha far LER.
@ bg_other
Other type of background.
@ bg_Brems_base_LER
bremsstrahlung base LER
@ bg_RBB_gamma
Gammas from radiative Bhabha.
virtual void merge(const Mergeable *other) override
Implementation of abstract class function.
std::string m_backgroundType
beam background type
void setFileType(EFileType type)
Sets file type.
static constexpr std::string_view c_defaultBackgroundOverlayType
default name for background overlay type
BG_TAG getBackgroundTag() const
Returns background tag value.
static constexpr std::string_view getDefaultBackgroundOverlayType()
Returns the default name for background overlay type.
virtual void clear() override
Implementation of abstract class function.
Abstract base class for objects that can be merged.
Definition: Mergeable.h:31
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24