Belle II Software development
BeamBGTypes Class Reference

Class to define BG types and to convert between BG types and tags or v.v. More...

#include <BeamBGTypes.h>

Public Member Functions

 BeamBGTypes ()
 Constructor.
 
BackgroundMetaData::BG_TAG getTag (const std::string &bgType)
 Return BG tag for a given BG type.
 
std::string getType (BackgroundMetaData::BG_TAG bgTag) const
 Return BG type for a given BG tag.
 
std::string getType (unsigned int bgTag) const
 Return BG type for a given number.
 
std::string getBGTypes () const
 Return all defined BG types as a string.
 

Private Attributes

std::map< std::string, BackgroundMetaData::BG_TAGm_tags
 a map of BG tags
 

Detailed Description

Class to define BG types and to convert between BG types and tags or v.v.

Designed primarely for BeamBkgTagSetter and BeamBkgMixer modules Suitable also to convert backgroundTag in SimHit classes to name (BG type)

Definition at line 27 of file BeamBGTypes.h.

Constructor & Destructor Documentation

◆ BeamBGTypes()

BeamBGTypes ( )
inline

Constructor.

Definition at line 33 of file BeamBGTypes.h.

34 {
67 }
@ 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.
std::map< std::string, BackgroundMetaData::BG_TAG > m_tags
a map of BG tags
Definition: BeamBGTypes.h:123

Member Function Documentation

◆ getBGTypes()

std::string getBGTypes ( ) const
inline

Return all defined BG types as a string.

Returns
BG type names separated by comma

Definition at line 111 of file BeamBGTypes.h.

112 {
113 std::string types;
114 for (auto tag : m_tags) {
115 if (tag.first != "other" && tag.second != 0) types += tag.first + ", ";
116 }
117 types += "other";
118 return types;
119 }

◆ getTag()

BackgroundMetaData::BG_TAG getTag ( const std::string &  bgType)
inline

Return BG tag for a given BG type.

Parameters
bgTypeBG type name
Returns
BG tag value

Definition at line 74 of file BeamBGTypes.h.

75 {
76 return m_tags[bgType];
77 }

◆ getType() [1/2]

std::string getType ( BackgroundMetaData::BG_TAG  bgTag) const
inline

Return BG type for a given BG tag.

Parameters
bgTagBG tag value
Returns
BG type name or empty string

Definition at line 84 of file BeamBGTypes.h.

85 {
86 if (bgTag == 0) return "";
87 for (auto tag : m_tags) {
88 if (bgTag == tag.second) return tag.first;
89 }
90 return "";
91 }

◆ getType() [2/2]

std::string getType ( unsigned int  bgTag) const
inline

Return BG type for a given number.

Parameters
bgTagBG tag value
Returns
BG type name or empty string

Definition at line 98 of file BeamBGTypes.h.

99 {
100 if (bgTag == 0) return "";
101 for (auto tag : m_tags) {
102 if (bgTag == tag.second) return tag.first;
103 }
104 return "";
105 }

Member Data Documentation

◆ m_tags

std::map<std::string, BackgroundMetaData::BG_TAG> m_tags
private

a map of BG tags

Definition at line 123 of file BeamBGTypes.h.


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