Belle II Software  release-08-01-10
RemoveParticlesNotInLists.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 
13 #include <framework/datastore/StoreArray.h>
14 
15 #include <analysis/dataobjects/Particle.h>
16 
17 #include <analysis/utility/ParticleSubset.h>
18 
19 #include <string>
20 #include <vector>
21 
22 namespace Belle2 {
32 
33  public:
34 
39 
44  virtual void initialize() override;
45 
47  virtual void event() override;
48 
53  virtual void terminate() override;
54 
55 
56  private:
58  std::vector<std::string> m_particleLists;
60  unsigned long m_nRemoved;
61  unsigned long m_nTotal;
63  };
64 
66 } // Belle2 namespace
Base class for Modules.
Definition: Module.h:72
Specialised SelectSubset<Particle> that also fixes daughter indices and all ParticleLists.
Removes all Particles that are not in a given list of ParticleLists (or daughters of those).
virtual void initialize() override
Initialize the Module.
virtual void event() override
process event
StoreArray< Particle > m_particles
StoreArray of Particles.
virtual void terminate() override
Terminate the Module.
unsigned long m_nTotal
number of particles before removal.
ParticleSubset m_subset
reduces the Particles array.
std::vector< std::string > m_particleLists
keep Particles and daughters in these lists.
unsigned long m_nRemoved
number of particles removed.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.