Belle II Software  release-05-02-19
ParticleListManipulatorModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Anze Zupanc *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <analysis/VariableManager/Manager.h>
14 #include <analysis/VariableManager/Utility.h>
15 #include <analysis/DecayDescriptor/DecayDescriptor.h>
16 
17 #include <framework/core/Module.h>
18 
19 #include <string>
20 #include <memory>
21 
22 namespace Belle2 {
28  // forward declaration
29  class Particle;
30 
39  class ParticleListManipulatorModule : public Module {
40 
41  public:
42 
47 
52  virtual void initialize() override;
53 
57  virtual void event() override;
58 
59  private:
60 
61  int m_pdgCode;
63  std::vector<std::string> m_inputListNames;
64  std::string m_outputListName;
67  std::string m_outputAntiListName;
70  std::string m_cutParameter;
71  std::unique_ptr<Variable::Cut> m_cut;
73  std::string m_variableName;
74  bool m_preferLowest;
77  bool m_writeOut;
84  std::vector<std::vector<int>> m_particlesInTheList;
85 
86 
96  void fillUniqueIdentifier(const Particle* p, std::vector<int>& idSequence);
97 
102  bool isUnique(const std::vector<int>& idSequence);
103 
104  };
105 
107 } // Belle2 namespace
108 
Belle2::ParticleListManipulatorModule::m_inputListNames
std::vector< std::string > m_inputListNames
input ParticleList names
Definition: ParticleListManipulatorModule.h:71
Belle2::ParticleListManipulatorModule::m_pdgCode
int m_pdgCode
PDG code of the particles.
Definition: ParticleListManipulatorModule.h:69
Belle2::Variable::Manager::Var
A variable returning a floating-point value for a given Particle.
Definition: Manager.h:137
Belle2::ParticleListManipulatorModule::m_outputAntiListName
std::string m_outputAntiListName
output anti-particle list name
Definition: ParticleListManipulatorModule.h:75
Belle2::ParticleListManipulatorModule::m_particlesInTheList
std::vector< std::vector< int > > m_particlesInTheList
This vector holds unique identifiers (vector of ints) of all particles that are already included in t...
Definition: ParticleListManipulatorModule.h:92
Belle2::ParticleListManipulatorModule::event
virtual void event() override
Event processor.
Definition: ParticleListManipulatorModule.cc:122
Belle2::ParticleListManipulatorModule::m_isSelfConjugatedParticle
bool m_isSelfConjugatedParticle
flag that indicates whether an anti-particle does not exist and therefore the output anti-ParticleLis...
Definition: ParticleListManipulatorModule.h:76
Belle2::ParticleListManipulatorModule::initialize
virtual void initialize() override
Initialize the Module.
Definition: ParticleListManipulatorModule.cc:78
Belle2::ParticleListManipulatorModule::m_variableName
std::string m_variableName
Variable which defines the best duplicate.
Definition: ParticleListManipulatorModule.h:81
Belle2::ParticleListManipulatorModule::m_decaydescriptor
DecayDescriptor m_decaydescriptor
Decay descriptor of the particle being selected.
Definition: ParticleListManipulatorModule.h:73
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ParticleListManipulatorModule::m_outputListName
std::string m_outputListName
output ParticleList name
Definition: ParticleListManipulatorModule.h:72
Belle2::ParticleListManipulatorModule::m_cutParameter
std::string m_cutParameter
selection criteria
Definition: ParticleListManipulatorModule.h:78
Belle2::ParticleListManipulatorModule::m_writeOut
bool m_writeOut
toggle Particle List btw.
Definition: ParticleListManipulatorModule.h:85
Belle2::ParticleListManipulatorModule::m_variable
const Variable::Manager::Var * m_variable
Variable which defines the best duplicate selection.
Definition: ParticleListManipulatorModule.h:83
Belle2::Particle
Class to store reconstructed particles.
Definition: Particle.h:77
Belle2::ParticleListManipulatorModule::ParticleListManipulatorModule
ParticleListManipulatorModule()
Constructor.
Definition: ParticleListManipulatorModule.cc:49
Belle2::ParticleListManipulatorModule::fillUniqueIdentifier
void fillUniqueIdentifier(const Particle *p, std::vector< int > &idSequence)
Fills unique identifier for the input particle.
Definition: ParticleListManipulatorModule.cc:203
Belle2::DecayDescriptor
The DecayDescriptor stores information about a decay tree or parts of a decay tree.
Definition: DecayDescriptor.h:43
Belle2::ParticleListManipulatorModule::isUnique
bool isUnique(const std::vector< int > &idSequence)
Compares input idSequence to all sequences already included in the list.
Definition: ParticleListManipulatorModule.cc:222
Belle2::ParticleListManipulatorModule::m_preferLowest
bool m_preferLowest
Select the duplicate with the lowest value (instead of highest).
Definition: ParticleListManipulatorModule.h:82
Belle2::ParticleListManipulatorModule::m_cut
std::unique_ptr< Variable::Cut > m_cut
cut object which performs the cuts
Definition: ParticleListManipulatorModule.h:79