Belle II Software development
ParticleWeightingLookUpCreatorModule.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 <string>
14
15namespace Belle2 {
27 typedef std::tuple<double, double> BinLimitsTuple;
28 typedef std::map<std::string, BinLimitsTuple> NDBinTuple;
29 typedef std::tuple<WeightInfo, NDBinTuple> noIdEntry;
30 typedef std::tuple<noIdEntry, double> specificIDEntry;
31 typedef std::vector<noIdEntry> listOfNoIdEntries;
32 typedef std::vector<specificIDEntry> listOfSpecificIDEntries;
38
42 std::string m_tableName;
52 NDBin NDBinTupleToNDBin(const NDBinTuple& bin_tuple);
53
54 public:
55
60
65 virtual void initialize() override;
66
68 virtual void terminate() override;
69
70 private:
72 };
73
75} // Belle2 namespace
Base class for Modules.
Definition: Module.h:72
Just pair of numbers - min and max values of bin border.
Module that creates LookUpTable and upload it to the DB.
listOfNoIdEntries m_tableIDNotSpec
List of entries for table to be created from without specified ID.
virtual void initialize() override
Initialize the Module.
NDBin NDBinTupleToNDBin(const NDBinTuple &bin_tuple)
Currently, std::pair can not be retrieved from python list We will get ParticleWeightingLookUpTable e...
virtual void terminate() override
Clean up anything created in initialize().
ParticleWeightingBinLimits * lims
object holding bin limits
listOfSpecificIDEntries m_tableIDSpec
List of entries for table to be created from with specified ID.
WeightInfo m_outOfRangeWeight
Weight info for out-of-range bin.
std::tuple< double, double > BinLimitsTuple
Currently, std::pair can not be retrieved from python list We will get ParticleWeightingLookUpTable e...
std::tuple< WeightInfo, NDBinTuple > noIdEntry
the ID
std::vector< specificIDEntry > listOfSpecificIDEntries
List of entries for table to be created from with specified ID.
std::map< std::string, BinLimitsTuple > NDBinTuple
the NDimensional tuple of bin limits
std::tuple< noIdEntry, double > specificIDEntry
the specific ID
std::vector< noIdEntry > listOfNoIdEntries
List of entries for table to be created from without specified ID.
std::map< std::string, ParticleWeightingBinLimits * > NDBin
N-dim bin: pairs of bin limits with name of the axis variable.
std::map< std::string, double > WeightInfo
Weight information: a line from the weight lookup table.
Abstract base class for different kinds of events.