Belle II Software development
|
This class stores the information about what background was mixed or overlayed. More...
#include <BackgroundInfo.h>
Classes | |
struct | BackgroundDescr |
Structure for background description. More... | |
Public Types | |
enum | EMethod { c_Unknown = 0 , c_Mixing = 1 , c_Overlay = 2 } |
enum for methods used to add BG More... | |
Public Member Functions | |
BELLE2_DEFINE_EXCEPTION (BackgroundInfoNotMergeable, "BackgroundInfo: objects cannot be merged") | |
Exception definition. | |
BackgroundInfo () | |
Default constructor. | |
~BackgroundInfo () | |
Destructor. | |
void | setMethod (EMethod method) |
Set method that is used to add BG. | |
unsigned | appendBackgroundDescr (const BackgroundDescr &bgDescr) |
Append background description of a sample. | |
void | setComponents (const std::vector< std::string > &components) |
Set components included. | |
void | setMinTime (double minTime) |
Set lower edge of the narrow time window. | |
void | setMaxTime (double maxTime) |
Set upper edge of the narrow time window. | |
void | setMinTimeECL (double minTimeECL) |
Set lower edge of ECL time window. | |
void | setMaxTimeECL (double maxTimeECL) |
Set upper edge of ECL time window. | |
void | setMinTimePXD (double minTimePXD) |
Set lower edge of PXD time window. | |
void | setMaxTimePXD (double maxTimePXD) |
Set upper edge of PXD time window. | |
void | setWrapAround (bool wrapAround) |
Set wrap-around flag. | |
void | setMaxEdepECL (double maxEdepECL) |
Set maximal alowed energy deposited in ECL to use BG events. | |
void | setExtensionName (const std::string &name) |
Set name that is added to default branch names of background collections Used primarily to pass this name from BGOverlayInput to BGOverlayExecutor module. | |
void | incrementReusedCounter (unsigned index) |
Increments sample reused counter. | |
EMethod | getMethod () const |
Returns method enum used to add BG. | |
const std::vector< BackgroundDescr > & | getBackgrounds () const |
Returns background descriptions. | |
const std::vector< std::string > & | getComponents () const |
Returns included components. | |
double | getMinTime () const |
Returns lower edge of the narrow time window. | |
double | getMaxTime () const |
Returns upper edge of the narrow time window. | |
double | getMinTimeECL () const |
Returns lower edge of ECL time window. | |
double | getMaxTimeECL () const |
Returns upper edge of ECL time window. | |
double | getMinTimePXD () const |
Returns lower edge of PXD time window. | |
double | getMaxTimePXD () const |
Returns upper edge of PXD time window. | |
bool | getWrapAround () const |
Returns wrap-around flag. | |
double | getMaxEdepECL () const |
Returns maximal alowed energy deposited in ECL to use BG events. | |
const std::string & | getExtensionName () const |
Returns name added to default branch names of background collections Used primarily to pass this name from BGOverlayInput to BGOverlayExecutor module. | |
virtual void | merge (const Mergeable *other) override |
Implementation of abstract class function. | |
virtual void | clear () override |
Implementation of abstract class function. | |
void | print () const |
Print the info. | |
virtual void | removeSideEffects () |
An ugly little method that is called before event() for input and worker processes. | |
virtual Long64_t | Merge (TCollection *hlist) |
Allow merging using TFileMerger if saved directly to a file. | |
virtual void | Reset () |
Root-like Reset function for "template compatibility" with ROOT objects. | |
virtual void | SetDirectory (TDirectory *) |
Root-like SetDirectory function for "template compatibility" with ROOT objects. | |
Private Member Functions | |
bool | canBeMerged (const BackgroundInfo *other) |
Checks if other object can be merged with this object. | |
void | printForMixing () const |
Print info when BG mixing is used. | |
void | printForOverlay () const |
Print info when BG overlay is used. | |
ClassDefOverride (BackgroundInfo, 5) | |
Class definition. | |
ClassDef (Mergeable, 0) | |
Abstract base class for objects that can be merged. | |
Private Attributes | |
EMethod | m_method = c_Unknown |
method | |
std::vector< BackgroundDescr > | m_backgrounds |
background descriptions | |
std::vector< std::string > | m_components |
detector components included | |
double | m_minTime = 0 |
minimal time shift of background event | |
double | m_maxTime = 0 |
maximal time shift of background event | |
double | m_minTimeECL = 0 |
minimal time shift of background event for ECL | |
double | m_maxTimeECL = 0 |
maximal time shift of background event for ECL | |
double | m_minTimePXD = 0 |
minimal time shift of background event for PXD | |
double | m_maxTimePXD = 0 |
maximal time shift of background event for PXD | |
bool | m_wrapAround = false |
wrap around events in the tail after maxTime | |
double | m_maxEdepECL = 0 |
maximal allowed deposited energy in ECL | |
std::string | m_extensionName |
name added to default branch names of background | |
This class stores the information about what background was mixed or overlayed.
Definition at line 26 of file BackgroundInfo.h.
enum EMethod |
enum for methods used to add BG
Enumerator | |
---|---|
c_Unknown | unknown |
c_Mixing | BG mixing. |
c_Overlay | BG overlay. |
Definition at line 39 of file BackgroundInfo.h.
|
inline |
|
inline |
|
inline |
Append background description of a sample.
bgDescr | description |
Definition at line 82 of file BackgroundInfo.h.
|
private |
Checks if other object can be merged with this object.
other | object to be merged with this object |
Definition at line 18 of file BackgroundInfo.cc.
|
overridevirtual |
Implementation of abstract class function.
Implements Mergeable.
Definition at line 130 of file BackgroundInfo.cc.
|
inline |
Returns background descriptions.
Definition at line 171 of file BackgroundInfo.h.
|
inline |
Returns included components.
Definition at line 177 of file BackgroundInfo.h.
|
inline |
Returns name added to default branch names of background collections Used primarily to pass this name from BGOverlayInput to BGOverlayExecutor module.
Definition at line 232 of file BackgroundInfo.h.
|
inline |
Returns maximal alowed energy deposited in ECL to use BG events.
Definition at line 225 of file BackgroundInfo.h.
|
inline |
Returns upper edge of the narrow time window.
Definition at line 189 of file BackgroundInfo.h.
|
inline |
Returns upper edge of ECL time window.
Definition at line 201 of file BackgroundInfo.h.
|
inline |
Returns upper edge of PXD time window.
Definition at line 213 of file BackgroundInfo.h.
|
inline |
|
inline |
Returns lower edge of the narrow time window.
Definition at line 183 of file BackgroundInfo.h.
|
inline |
Returns lower edge of ECL time window.
Definition at line 195 of file BackgroundInfo.h.
|
inline |
Returns lower edge of PXD time window.
Definition at line 207 of file BackgroundInfo.h.
|
inline |
|
inline |
Increments sample reused counter.
index | element index in std::vector |
Definition at line 156 of file BackgroundInfo.h.
|
overridevirtual |
Implementation of abstract class function.
Implements Mergeable.
Definition at line 94 of file BackgroundInfo.cc.
|
virtualinherited |
Allow merging using TFileMerger if saved directly to a file.
Definition at line 14 of file Mergeable.cc.
void print | ( | ) | const |
Print the info.
Definition at line 140 of file BackgroundInfo.cc.
|
private |
Print info when BG mixing is used.
Definition at line 158 of file BackgroundInfo.cc.
|
private |
Print info when BG overlay is used.
Definition at line 201 of file BackgroundInfo.cc.
|
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.
|
inlinevirtualinherited |
Root-like Reset function for "template compatibility" with ROOT objects.
Alias for clear().
Definition at line 66 of file Mergeable.h.
|
inline |
Set components included.
components | vector of component names |
Definition at line 92 of file BackgroundInfo.h.
|
inlinevirtualinherited |
Root-like SetDirectory function for "template compatibility" with ROOT objects.
Does nothing.
Definition at line 68 of file Mergeable.h.
|
inline |
Set name that is added to default branch names of background collections Used primarily to pass this name from BGOverlayInput to BGOverlayExecutor module.
name | extension name |
Definition at line 150 of file BackgroundInfo.h.
|
inline |
Set maximal alowed energy deposited in ECL to use BG events.
maxEdepECL | energy cut [GeV] |
Definition at line 143 of file BackgroundInfo.h.
|
inline |
Set upper edge of the narrow time window.
maxTime | upper edge |
Definition at line 107 of file BackgroundInfo.h.
|
inline |
Set upper edge of ECL time window.
maxTimeECL | upper edge |
Definition at line 119 of file BackgroundInfo.h.
|
inline |
Set upper edge of PXD time window.
maxTimePXD | upper edge |
Definition at line 131 of file BackgroundInfo.h.
|
inline |
Set method that is used to add BG.
method | enum for method |
Definition at line 75 of file BackgroundInfo.h.
|
inline |
Set lower edge of the narrow time window.
minTime | lower edge |
Definition at line 101 of file BackgroundInfo.h.
|
inline |
Set lower edge of ECL time window.
minTimeECL | lower edge |
Definition at line 113 of file BackgroundInfo.h.
|
inline |
Set lower edge of PXD time window.
minTimePXD | lower edge |
Definition at line 125 of file BackgroundInfo.h.
|
inline |
Set wrap-around flag.
wrapAround | flag |
Definition at line 137 of file BackgroundInfo.h.
|
private |
background descriptions
Definition at line 269 of file BackgroundInfo.h.
|
private |
detector components included
Definition at line 270 of file BackgroundInfo.h.
|
private |
name added to default branch names of background
Definition at line 279 of file BackgroundInfo.h.
|
private |
maximal allowed deposited energy in ECL
Definition at line 278 of file BackgroundInfo.h.
|
private |
maximal time shift of background event
Definition at line 272 of file BackgroundInfo.h.
|
private |
maximal time shift of background event for ECL
Definition at line 274 of file BackgroundInfo.h.
|
private |
maximal time shift of background event for PXD
Definition at line 276 of file BackgroundInfo.h.
method
Definition at line 268 of file BackgroundInfo.h.
|
private |
minimal time shift of background event
Definition at line 271 of file BackgroundInfo.h.
|
private |
minimal time shift of background event for ECL
Definition at line 273 of file BackgroundInfo.h.
|
private |
minimal time shift of background event for PXD
Definition at line 275 of file BackgroundInfo.h.
|
private |
wrap around events in the tail after maxTime
Definition at line 277 of file BackgroundInfo.h.