Belle II Software light-2406-ragdoll
ParticleListManipulatorModule.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 <analysis/VariableManager/Manager.h>
12#include <analysis/VariableManager/Utility.h>
13#include <analysis/DecayDescriptor/DecayDescriptor.h>
14
15// dataobjects
16#include <analysis/dataobjects/Particle.h>
17#include <analysis/dataobjects/ParticleList.h>
18
19#include <framework/core/Module.h>
20#include <framework/datastore/StoreArray.h>
21#include <framework/datastore/StoreObjPtr.h>
22
23#include <string>
24#include <memory>
25
26namespace Belle2 {
32 // forward declaration
33 class Particle;
34
44
45 public:
46
51
56 virtual void initialize() override;
57
61 virtual void event() override;
62
63 private:
64
71 std::vector<std::string> m_inputListNames;
72 std::string m_outputListName;
78 std::string m_cutParameter;
79 std::unique_ptr<Variable::Cut> m_cut;
81 std::string m_variableName;
89 bool m_exceptionForV0B2BII = false;
96 std::vector<std::vector<int>> m_particlesInTheList;
97
98
108 void fillUniqueIdentifier(const Particle* p, std::vector<int>& idSequence, bool ignoreMotherFlavor);
109
114 bool isUnique(const std::vector<int>& idSequence);
115
116 };
117
119} // Belle2 namespace
120
The DecayDescriptor stores information about a decay tree or parts of a decay tree.
Base class for Modules.
Definition: Module.h:72
Module for copying Particles (actually their indices) from two or more ParticleLists(s) to another Pa...
bool m_isSelfConjugatedParticle
flag that indicates whether an anti-particle does not exist and therefore the output anti-ParticleLis...
bool m_preferLowest
Select the duplicate with the lowest value (instead of highest).
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
std::string m_variableName
Variable which defines the best duplicate.
std::vector< std::string > m_inputListNames
input ParticleList names
StoreArray< Particle > m_particles
StoreArray of Particles.
std::vector< std::vector< int > > m_particlesInTheList
This vector holds unique identifiers (vector of ints) of all particles that are already included in t...
std::unique_ptr< Variable::Cut > m_cut
cut object which performs the cuts
bool m_ignoreMotherFlavor
flag whether flavor of mother particle should be ignored
bool isUnique(const std::vector< int > &idSequence)
Compares input idSequence to all sequences already included in the list.
const Variable::Manager::Var * m_variable
Variable which defines the best duplicate selection.
void fillUniqueIdentifier(const Particle *p, std::vector< int > &idSequence, bool ignoreMotherFlavor)
Fills unique identifier for the input particle.
DecayDescriptor m_decaydescriptor
Decay descriptor of the particle being selected.
bool m_exceptionForV0B2BII
true if the output List is V0 and input is K_S0:mdst, Lambda0:mdst, or gamma:v0mdst
StoreObjPtr< ParticleList > m_particleList
output particle list
std::string m_outputAntiListName
output anti-particle list name
StoreObjPtr< ParticleList > m_antiParticleList
output anti-particle list
std::string m_outputListName
output ParticleList name
Class to store reconstructed particles.
Definition: Particle.h:75
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:96
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24
A variable returning a floating-point value for a given Particle.
Definition: Manager.h:146