Belle II Software  release-06-00-14
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 <string>
19 
20 namespace Belle2 {
33 
34  private:
35  std::string m_tableName;
36  std::string m_inputListName;
38  std::unique_ptr<DBObjPtr<ParticleWeightingLookUpTable>> m_ParticleWeightingLookUpTable;
41  public:
42 
47 
53  WeightInfo getInfo(const Particle* p);
54 
59  virtual void initialize() override;
60 
65  virtual void event() override;
66 
67  };
68 
70 } // Belle2 namespace
71 
Base class for Modules.
Definition: Module.h:72
Module to apply weights from the database to particles and store added info in ExtraInfo.
StoreArray< Particle > m_particles
StoreArray of Particles.
std::unique_ptr< DBObjPtr< ParticleWeightingLookUpTable > > m_ParticleWeightingLookUpTable
Pointer to the table in DB.
StoreObjPtr< ParticleList > m_inputList
input particle list
std::string m_tableName
Name of the table.
std::string m_inputListName
name of input particle list.
Class to store reconstructed particles.
Definition: Particle.h:74
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:95
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.
std::map< std::string, double > WeightInfo
Weight information: a line from the weight lookup table.
Abstract base class for different kinds of events.