Belle II Software development
RestOfEventUpdaterModule.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#include <framework/core/Module.h>
11
12#include <analysis/VariableManager/Utility.h>
13#include <analysis/dataobjects/RestOfEvent.h>
14#include <analysis/dataobjects/Particle.h>
15
16#include <analysis/dataobjects/ParticleList.h>
17#include <framework/datastore/StoreObjPtr.h>
18
19#include <string>
20#include <vector>
21#include <map>
22
23namespace Belle2 {
33
34 public:
35
40
42 virtual void initialize() override;
43
45 virtual void event() override;
46
47
48 private:
49 //Data members:
50 typedef std::map<unsigned int, bool> intAndBoolMap;
51 typedef std::map<unsigned int, unsigned int> intAndIntMap;
53 std::string m_inputListName;
56 std::vector<std::string> m_maskNamesForUpdating;
57 std::string m_selection;
58 std::shared_ptr<Variable::Cut> m_cut;
59 bool m_discard;
62 // Methods:
69 void updateMasksWithParticles(const StoreObjPtr<RestOfEvent>& roe, std::vector<const Particle*>& particlesToUpdate,
76 void updateMasksWithV0(const StoreObjPtr<RestOfEvent>& roe, const std::vector<const Particle*>& particlesToUpdate);
77 };
79}
80
Base class for Modules.
Definition: Module.h:72
EParticleSourceObject
particle source enumerators
Definition: Particle.h:82
Updates an existing mask (map of boolean values) for tracks or eclClusters in RestOfEvent with an ava...
std::string m_selection
Cut string which will be used for updating masks.
virtual void initialize() override
Overridden initialize method.
virtual void event() override
Overridden event method.
std::shared_ptr< Variable::Cut > m_cut
Cut object which performs the cuts.
std::vector< std::string > m_maskNamesForUpdating
Container for all mask names which will be updated.
std::map< unsigned int, unsigned int > intAndIntMap
Type definition helper for a map of integer and integer.
StoreObjPtr< ParticleList > m_inputList
ParticleList which contains information that will be used for updating.
void updateMasksWithParticles(const StoreObjPtr< RestOfEvent > &roe, std::vector< const Particle * > &particlesToUpdate, Particle::EParticleSourceObject listType)
Update ROE masks by excluding or keeping particles.
std::map< unsigned int, bool > intAndBoolMap
Type definition helper for a map of integer and boolean.
void updateMasksWithV0(const StoreObjPtr< RestOfEvent > &roe, const std::vector< const Particle * > &particlesToUpdate)
Update ROE masks with provided composite particle collection.
RestOfEventUpdaterModule()
Constructor: Sets the description, the properties and the parameters of the module.
std::string m_inputListName
Name of the ParticleList which contains information that will be used for updating.
bool m_discard
Update the ROE mask by passing or discarding particles in the provided particle list.
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.