Belle II Software light-2406-ragdoll
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 {
36
37 public:
38
43
45 virtual void initialize() override;
46
48 virtual void event() override;
49
50
51 private:
52 //Data members:
53 typedef std::map<unsigned int, bool> intAndBoolMap;
54 typedef std::map<unsigned int, unsigned int> intAndIntMap;
56 std::string m_inputListName;
59 std::vector<std::string> m_maskNamesForUpdating;
60 std::string m_selection;
61 std::shared_ptr<Variable::Cut> m_cut;
62 bool m_discard;
65 // Methods:
72 void updateMasksWithParticles(const StoreObjPtr<RestOfEvent>& roe, std::vector<const Particle*>& particlesToUpdate,
79 void updateMasksWithV0(const StoreObjPtr<RestOfEvent>& roe, const std::vector<const Particle*>& particlesToUpdate);
80 };
82}
83
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.
Definition: ClusterUtils.h:24