Belle II Software  release-05-02-19
ParticleWeightingLookUpCreatorModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Ilya Komarov *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/core/Module.h>
14 #include <analysis/dbobjects/ParticleWeightingLookUpTable.h>
15 #include <string>
16 
17 namespace Belle2 {
29  typedef std::tuple<double, double> BinLimitsTuple;
30  typedef std::map<std::string, BinLimitsTuple> NDBinTuple;
31  typedef std::tuple<WeightInfo, NDBinTuple> noIdEntry;
32  typedef std::tuple<noIdEntry, double> specificIDEntry;
33  typedef std::vector<noIdEntry> listOfNoIdEntries;
34  typedef std::vector<specificIDEntry> listOfSpecificIDEntries;
40 
44  std::string m_tableName;
45  int m_experimentLow;
46  int m_experimentHigh;
47  int m_runLow;
48  int m_runHigh;
54  NDBin NDBinTupleToNDBin(const NDBinTuple& bin_tuple);
55 
56  public:
57 
62 
67  virtual void initialize() override;
68 
70  virtual void terminate() override;
71 
72  private:
74  };
75 
77 } // Belle2 namespace
Belle2::WeightInfo
std::map< std::string, double > WeightInfo
Weight information: a line from the weight lookup table.
Definition: ParticleWeightingLookUpTable.h:31
Belle2::ParticleWeightingBinLimits
Just pair of numbers - min and max values of bin border.
Definition: ParticleWeightingBinLimits.h:31
Belle2::BinLimitsTuple
std::tuple< double, double > BinLimitsTuple
Currently, std::pair can not be retrieved from python list We will get ParticleWeightingLookUpTable e...
Definition: ParticleWeightingLookUpCreatorModule.h:37
Belle2::ParticleWeightingLookUpCreatorModule::m_experimentLow
int m_experimentLow
Lowest valid experiment #.
Definition: ParticleWeightingLookUpCreatorModule.h:53
Belle2::ParticleWeightingLookUpCreatorModule::m_runLow
int m_runLow
Lowest valid run #.
Definition: ParticleWeightingLookUpCreatorModule.h:55
Belle2::ParticleWeightingLookUpCreatorModule::m_experimentHigh
int m_experimentHigh
Highest valid experiment #.
Definition: ParticleWeightingLookUpCreatorModule.h:54
Belle2::ParticleWeightingLookUpCreatorModule::initialize
virtual void initialize() override
Initialize the Module.
Definition: ParticleWeightingLookUpCreatorModule.cc:70
Belle2::ParticleWeightingLookUpCreatorModule::m_tableIDSpec
listOfSpecificIDEntries m_tableIDSpec
List of entries for table to be created from with specified ID.
Definition: ParticleWeightingLookUpCreatorModule.h:50
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::ParticleWeightingLookUpCreatorModule::m_outOfRangeWeight
WeightInfo m_outOfRangeWeight
Weight info for out-of-range bin.
Definition: ParticleWeightingLookUpCreatorModule.h:51
Belle2::ParticleWeightingLookUpCreatorModule::m_tableName
std::string m_tableName
Name of the table.
Definition: ParticleWeightingLookUpCreatorModule.h:52
Belle2::ParticleWeightingLookUpCreatorModule::lims
ParticleWeightingBinLimits * lims
object holding bin limits
Definition: ParticleWeightingLookUpCreatorModule.h:81
Belle2::ParticleWeightingLookUpCreatorModule
Module that creates LookUpTable and upload it to the DB.
Definition: ParticleWeightingLookUpCreatorModule.h:47
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ParticleWeightingLookUpCreatorModule::terminate
virtual void terminate() override
Clean up anything created in initialize().
Definition: ParticleWeightingLookUpCreatorModule.cc:108
Belle2::specificIDEntry
std::tuple< noIdEntry, double > specificIDEntry
the specific ID
Definition: ParticleWeightingLookUpCreatorModule.h:40
Belle2::NDBin
std::map< std::string, ParticleWeightingBinLimits * > NDBin
N-dim bin: pairs of bin limits with name of the axis variable.
Definition: ParticleWeightingKeyMap.h:42
Belle2::ParticleWeightingLookUpCreatorModule::ParticleWeightingLookUpCreatorModule
ParticleWeightingLookUpCreatorModule()
Constructor.
Definition: ParticleWeightingLookUpCreatorModule.cc:38
Belle2::NDBinTuple
std::map< std::string, BinLimitsTuple > NDBinTuple
the NDimensional tuple of bin limits
Definition: ParticleWeightingLookUpCreatorModule.h:38
Belle2::listOfNoIdEntries
std::vector< noIdEntry > listOfNoIdEntries
List of entries for table to be created from without specified ID.
Definition: ParticleWeightingLookUpCreatorModule.h:41
Belle2::listOfSpecificIDEntries
std::vector< specificIDEntry > listOfSpecificIDEntries
List of entries for table to be created from with specified ID.
Definition: ParticleWeightingLookUpCreatorModule.h:42
Belle2::ParticleWeightingLookUpCreatorModule::m_tableIDNotSpec
listOfNoIdEntries m_tableIDNotSpec
List of entries for table to be created from without specified ID.
Definition: ParticleWeightingLookUpCreatorModule.h:49
Belle2::noIdEntry
std::tuple< WeightInfo, NDBinTuple > noIdEntry
the ID
Definition: ParticleWeightingLookUpCreatorModule.h:39
Belle2::ParticleWeightingLookUpCreatorModule::NDBinTupleToNDBin
NDBin NDBinTupleToNDBin(const NDBinTuple &bin_tuple)
Currently, std::pair can not be retrieved from python list We will get ParticleWeightingLookUpTable e...
Definition: ParticleWeightingLookUpCreatorModule.cc:57
Belle2::ParticleWeightingLookUpCreatorModule::m_runHigh
int m_runHigh
Highest valid run #.
Definition: ParticleWeightingLookUpCreatorModule.h:56