Belle II Software development
ParticleWeightingModule.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/core/Module.h>
12#include <analysis/dbobjects/ParticleWeightingLookUpTable.h>
13#include <framework/datastore/StoreArray.h>
14#include <framework/datastore/StoreObjPtr.h>
15#include <framework/database/DBObjPtr.h>
16#include <analysis/dataobjects/Particle.h>
17#include <analysis/dataobjects/ParticleList.h>
18#include <analysis/DecayDescriptor/DecayDescriptor.h>
19#include <string>
20
21namespace Belle2 {
31
32 private:
33 std::string m_tableName;
34 std::string m_inputListName;
36 std::unique_ptr<OptionalDBObjPtr<ParticleWeightingLookUpTable>> m_ParticleWeightingLookUpTable;
38 std::string m_selectedDaughters;
40 bool m_allowToSkip = false;
42 public:
43
48
54 WeightInfo getInfo(const Particle* p);
55
60 virtual void initialize() override;
61
66 virtual void event() override;
67
68 };
69
71} // Belle2 namespace
72
The DecayDescriptor stores information about a decay tree or parts of a decay tree.
Base class for Modules.
Definition: Module.h:72
Module to append weights from the database into the extraInfo of Particles.
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processing by the module.
WeightInfo getInfo(const Particle *p)
Get LookUp information for the particle.
StoreArray< Particle > m_particles
StoreArray of Particles.
std::string m_selectedDaughters
Daughters for which one wants to append weights.
StoreObjPtr< ParticleList > m_inputList
input particle list
DecayDescriptor m_decayDescriptor
Decay Descriptor to be initialized with m_selectedDaughters.
std::unique_ptr< OptionalDBObjPtr< ParticleWeightingLookUpTable > > m_ParticleWeightingLookUpTable
Pointer to the table in DB.
std::string m_tableName
Name of the table.
bool m_allowToSkip
Controls whether the process is skipped when the payload is missing.
std::string m_inputListName
name of input particle list.
Class to store reconstructed particles.
Definition: Particle.h:75
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
std::map< std::string, double > WeightInfo
Weight information: a line from the weight lookup table.
Abstract base class for different kinds of events.