Belle II Software  release-05-02-19
BestCandidateSelectionModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2014-2019 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Christian Pulvermacher *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/core/Module.h>
14 
15 #include <framework/datastore/StoreObjPtr.h>
16 
17 #include <analysis/dataobjects/ParticleList.h>
18 #include <analysis/VariableManager/Manager.h>
19 #include <analysis/VariableManager/Utility.h>
20 
21 #include <string>
22 
23 namespace Belle2 {
28  class Particle;
29 
40  class BestCandidateSelectionModule : public Module {
41  public:
42 
46  virtual ~BestCandidateSelectionModule() override;
48  virtual void initialize() override;
50  virtual void event() override;
51 
52  private:
53  std::string m_inputListName;
54  std::string m_variableName;
55  std::string m_outputVariableName;
56  bool m_selectLowest;
57  bool m_allowMultiRank;
58  int m_numBest;
59  std::string m_cutParameter;
60  std::unique_ptr<Variable::Cut> m_cut;
65  };
66 
68 } // Belle2 namespace
Belle2::Variable::Manager::Var
A variable returning a floating-point value for a given Particle.
Definition: Manager.h:137
Belle2::BestCandidateSelectionModule::m_selectLowest
bool m_selectLowest
Select the candidate with the lowest value (instead of highest).
Definition: BestCandidateSelectionModule.h:64
Belle2::BestCandidateSelectionModule::event
virtual void event() override
Process an event.
Definition: BestCandidateSelectionModule.cc:101
Belle2::BestCandidateSelectionModule::m_inputList
StoreObjPtr< ParticleList > m_inputList
input particle list
Definition: BestCandidateSelectionModule.h:70
Belle2::BestCandidateSelectionModule::initialize
virtual void initialize() override
Initialize the module (set up datastore)
Definition: BestCandidateSelectionModule.cc:80
Belle2::BestCandidateSelectionModule::m_cutParameter
std::string m_cutParameter
Selection for candidates to be ranked.
Definition: BestCandidateSelectionModule.h:67
Belle2::BestCandidateSelectionModule::m_allowMultiRank
bool m_allowMultiRank
Give the same rank to candidates with the same value.
Definition: BestCandidateSelectionModule.h:65
Belle2::BestCandidateSelectionModule::m_outputVariableName
std::string m_outputVariableName
Name of generated Ranking-Variable, if specified by user.
Definition: BestCandidateSelectionModule.h:63
Belle2::BestCandidateSelectionModule::BestCandidateSelectionModule
BestCandidateSelectionModule()
Constructor.
Definition: BestCandidateSelectionModule.cc:29
Belle2::BestCandidateSelectionModule::m_numBest
int m_numBest
Number of best candidates to keep.
Definition: BestCandidateSelectionModule.h:66
Belle2::BestCandidateSelectionModule::m_variableName
std::string m_variableName
Variable which defines the candidate ranking.
Definition: BestCandidateSelectionModule.h:62
Belle2::BestCandidateSelectionModule::m_cut
std::unique_ptr< Variable::Cut > m_cut
cut object which performs the cuts
Definition: BestCandidateSelectionModule.h:68
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::BestCandidateSelectionModule::m_inputListName
std::string m_inputListName
name of input particle list.
Definition: BestCandidateSelectionModule.h:61
Belle2::BestCandidateSelectionModule::~BestCandidateSelectionModule
virtual ~BestCandidateSelectionModule() override
Destructor.
Belle2::BestCandidateSelectionModule::m_variable
const Variable::Manager::Var * m_variable
Variable which defines the candidate ranking.
Definition: BestCandidateSelectionModule.h:71