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

Metadata information about the beam background file. More...

#include <BackgroundMetaData.h>

Inheritance diagram for BackgroundMetaData:
Collaboration diagram for BackgroundMetaData:

Public Types

enum  BG_TAG {
  bg_none = 0 ,
  bg_Coulomb_LER = 1 ,
  bg_Coulomb_HER = 2 ,
  bg_RBB_LER = 3 ,
  bg_RBB_HER = 4 ,
  bg_Touschek_LER = 5 ,
  bg_Touschek_HER = 6 ,
  bg_twoPhoton = 7 ,
  bg_RBB_gamma = 8 ,
  bg_RBB_LER_far = 9 ,
  bg_RBB_HER_far = 10 ,
  bg_Touschek_LER_far = 11 ,
  bg_Touschek_HER_far = 12 ,
  bg_SynchRad_LER = 13 ,
  bg_SynchRad_HER = 14 ,
  bg_BHWide_LER = 15 ,
  bg_BHWide_HER = 16 ,
  bg_RBB = 17 ,
  bg_BHWide = 18 ,
  bg_BHWideLargeAngle = 19 ,
  bg_InjectionLER = 21 ,
  bg_InjectionHER = 22 ,
  bg_Brems_LER = 23 ,
  bg_Brems_HER = 24 ,
  bg_Brems_base_LER = 25 ,
  bg_Brems_dynamic_LER = 26 ,
  bg_Brems_base_HER = 27 ,
  bg_Brems_dynamic_HER = 28 ,
  bg_Coulomb_base_LER = 29 ,
  bg_Coulomb_dynamic_LER = 30 ,
  bg_Coulomb_base_HER = 31 ,
  bg_Coulomb_dynamic_HER = 32 ,
  bg_other = 99
}
 Enum for background tags. More...
 
enum  EFileType {
  c_Usual = 0 ,
  c_ECL = 1 ,
  c_PXD = 2
}
 Enum for BG file types. More...
 

Public Member Functions

 BELLE2_DEFINE_EXCEPTION (BackgroundMetaDataNotMergeable, "BackgroundMetaData: objects cannot be merged")
 Exception definition.
 
 BackgroundMetaData ()
 Constructor.
 
void setBackgroundType (const std::string &type)
 Sets background type. More...
 
void setBackgroundTag (BG_TAG tag)
 Sets background tag value that corresponds to background type. More...
 
void setRealTime (float time)
 Sets real time that corresponds to this background sample. More...
 
void setFileType (EFileType type)
 Sets file type. More...
 
const std::string & getBackgroundType () const
 Returns the type of background. More...
 
BG_TAG getBackgroundTag () const
 Returns background tag value. More...
 
float getRealTime () const
 Returns real time that corresponds to this background sample. More...
 
EFileType getFileType () const
 Returns file type. More...
 
virtual void merge (const Mergeable *other) override
 Implementation of abstract class function.
 
virtual void clear () override
 Implementation of abstract class function.
 
virtual void removeSideEffects ()
 An ugly little method that is called before event() for input and worker processes. More...
 
virtual Long64_t Merge (TCollection *hlist)
 Allow merging using TFileMerger if saved directly to a file. More...
 
virtual void Reset ()
 Root-like Reset function for "template compatibility" with ROOT objects. More...
 
virtual void SetDirectory (TDirectory *)
 Root-like SetDirectory function for "template compatibility" with ROOT objects. More...
 

Private Member Functions

bool canBeMerged (const BackgroundMetaData *other)
 Checks if other object can be merged with this object. More...
 
 ClassDefOverride (BackgroundMetaData, 4)
 Class definition required for creation of ROOT dictionary.
 
 ClassDef (Mergeable, 0)
 Abstract base class for objects that can be merged.
 

Private Attributes

std::string m_backgroundType
 beam background type
 
BG_TAG m_backgroundTag = bg_other
 background tag
 
float m_realTime = 0
 real time that corresponds to beam background sample
 
EFileType m_fileType = c_Usual
 file type
 

Detailed Description

Metadata information about the beam background file.

Definition at line 24 of file BackgroundMetaData.h.

Member Enumeration Documentation

◆ BG_TAG

enum BG_TAG

Enum for background tags.

Enumerator
bg_none 

No background.

bg_Coulomb_LER 

Coulomb LER.

bg_Coulomb_HER 

Coulomb HER.

bg_RBB_LER 

Radiative Bhabha LER.

bg_RBB_HER 

Radiative Bhabha HER.

bg_Touschek_LER 

Touschek LER.

bg_Touschek_HER 

Touschek HER.

bg_twoPhoton 

2-photon

bg_RBB_gamma 

Gammas from radiative Bhabha.

bg_RBB_LER_far 

Radiative Bhabha far LER.

bg_RBB_HER_far 

Radiative Bhabha far HER.

bg_Touschek_LER_far 

Touschek far LER.

bg_Touschek_HER_far 

Touschek far HER.

bg_SynchRad_LER 

Synchrotron radiation LER.

bg_SynchRad_HER 

Synchrotron radiation HER.

bg_BHWide_LER 

Wide angle radiative Bhabha LER.

bg_BHWide_HER 

Wide angle radiative Bhabha HER.

bg_RBB 

Radiative Bhabha.

bg_BHWide 

Wide angle radiative Bhabha.

bg_BHWideLargeAngle 

Large angle radiative Bhabha.

bg_InjectionLER 

injection background LER

bg_InjectionHER 

injection background HER

bg_Brems_LER 

bremsstrahlung LER

bg_Brems_HER 

bremsstrahlung HER

bg_Brems_base_LER 

bremsstrahlung base LER

bg_Brems_dynamic_LER 

bremsstrahlung dynamic LER

bg_Brems_base_HER 

bremsstrahlung base HER

bg_Brems_dynamic_HER 

bremsstrahlung dynamic HER

bg_Coulomb_base_LER 

Coulomb base LER.

bg_Coulomb_dynamic_LER 

Coulomb dynamic LER.

bg_Coulomb_base_HER 

Coulomb base HER.

bg_Coulomb_dynamic_HER 

Coulomb dynamic HER.

bg_other 

Other type of background.

Definition at line 31 of file BackgroundMetaData.h.

31  { bg_none = 0,
32  bg_Coulomb_LER = 1,
33  bg_Coulomb_HER = 2,
34  bg_RBB_LER = 3,
35  bg_RBB_HER = 4,
36  bg_Touschek_LER = 5,
37  bg_Touschek_HER = 6,
38  bg_twoPhoton = 7,
39  bg_RBB_gamma = 8,
40  bg_RBB_LER_far = 9,
41  bg_RBB_HER_far = 10,
42  bg_Touschek_LER_far = 11,
43  bg_Touschek_HER_far = 12,
44  bg_SynchRad_LER = 13,
45  bg_SynchRad_HER = 14,
46  bg_BHWide_LER = 15,
47  bg_BHWide_HER = 16,
48  bg_RBB = 17,
49  bg_BHWide = 18,
50  bg_BHWideLargeAngle = 19,
51  bg_InjectionLER = 21,
52  bg_InjectionHER = 22,
53  bg_Brems_LER = 23,
54  bg_Brems_HER = 24,
55  bg_Brems_base_LER = 25,
57  bg_Brems_base_HER = 27,
59  bg_Coulomb_base_LER = 29,
61  bg_Coulomb_base_HER = 31,
63  bg_other = 99
64  };
@ 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.

◆ EFileType

enum EFileType

Enum for BG file types.

Enumerator
c_Usual 

usual BG file

c_ECL 

additional for ECL

c_PXD 

additional for PXD

Definition at line 75 of file BackgroundMetaData.h.

Member Function Documentation

◆ canBeMerged()

bool canBeMerged ( const BackgroundMetaData other)
private

Checks if other object can be merged with this object.

Parameters
otherobject to be merged with this object
Returns
true, if can be merged

Definition at line 16 of file BackgroundMetaData.cc.

17 {
18 
19  if (otherObj->getBackgroundType() != m_backgroundType) {
20  B2ERROR("BackgroundMetaData: objects cannot be merged (different backgroundType)");
21  return false;
22  }
23 
24  if (otherObj->getBackgroundTag() != m_backgroundTag) {
25  B2ERROR("BackgroundMetaData: objects cannot be merged (different backgroundTag)");
26  return false;
27  }
28 
29  if (otherObj->getFileType() != m_fileType) {
30  B2ERROR("BackgroundMetaData: objects cannot be merged (different fileType)");
31  return false;
32  }
33 
34  return true;
35 }
BG_TAG m_backgroundTag
background tag
std::string m_backgroundType
beam background type

◆ getBackgroundTag()

BG_TAG getBackgroundTag ( ) const
inline

Returns background tag value.

Returns
tag value

Definition at line 120 of file BackgroundMetaData.h.

◆ getBackgroundType()

const std::string& getBackgroundType ( ) const
inline

Returns the type of background.

Returns
background type

Definition at line 114 of file BackgroundMetaData.h.

◆ getFileType()

EFileType getFileType ( ) const
inline

Returns file type.

Returns
file type

Definition at line 132 of file BackgroundMetaData.h.

◆ getRealTime()

float getRealTime ( ) const
inline

Returns real time that corresponds to this background sample.

Returns
real time

Definition at line 126 of file BackgroundMetaData.h.

◆ Merge()

Long64_t Merge ( TCollection *  hlist)
virtualinherited

Allow merging using TFileMerger if saved directly to a file.

Note
dictionaries containing your Mergeable class need to be loaded, so 'hadd' will not work currently.

Definition at line 14 of file Mergeable.cc.

◆ removeSideEffects()

virtual void removeSideEffects ( )
inlinevirtualinherited

An ugly little method that is called before event() for input and worker processes.

Main use case is to detach any attached TFile from this object. In the output process, it can stay attached (and grow as much as it likes).

Reimplemented in RootMergeable< T >.

Definition at line 58 of file Mergeable.h.

◆ Reset()

virtual void Reset ( )
inlinevirtualinherited

Root-like Reset function for "template compatibility" with ROOT objects.

Alias for clear().

Definition at line 66 of file Mergeable.h.

◆ setBackgroundTag()

void setBackgroundTag ( BG_TAG  tag)
inline

Sets background tag value that corresponds to background type.

Parameters
taga tag value

Definition at line 96 of file BackgroundMetaData.h.

◆ setBackgroundType()

void setBackgroundType ( const std::string &  type)
inline

Sets background type.

Parameters
typebackground type

Definition at line 90 of file BackgroundMetaData.h.

◆ SetDirectory()

virtual void SetDirectory ( TDirectory *  )
inlinevirtualinherited

Root-like SetDirectory function for "template compatibility" with ROOT objects.

Does nothing.

Definition at line 68 of file Mergeable.h.

◆ setFileType()

void setFileType ( EFileType  type)
inline

Sets file type.

Parameters
typefile type

Definition at line 108 of file BackgroundMetaData.h.

◆ setRealTime()

void setRealTime ( float  time)
inline

Sets real time that corresponds to this background sample.

Parameters
timereal time

Definition at line 102 of file BackgroundMetaData.h.


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