Belle II Software  release-05-02-19
RestOfEventUpdaterModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2013 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Matic Lubej, Sviatoslav Bilokin *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 #include <framework/core/Module.h>
13 
14 #include <analysis/VariableManager/Utility.h>
15 #include <analysis/dataobjects/RestOfEvent.h>
16 #include <analysis/dataobjects/Particle.h>
17 
18 #include <analysis/dataobjects/ParticleList.h>
19 #include <framework/datastore/StoreObjPtr.h>
20 
21 #include <string>
22 #include <vector>
23 #include <map>
24 
25 namespace Belle2 {
37  class RestOfEventUpdaterModule : public Module {
38 
39  public:
40 
45 
47  virtual void initialize() override;
48 
50  virtual void event() override;
51 
52 
53  private:
54  //Data members:
55  typedef std::map<unsigned int, bool> intAndBoolMap;
56  typedef std::map<unsigned int, unsigned int> intAndIntMap;
58  std::string m_inputListName;
61  std::vector<std::string> m_maskNamesForUpdating;
62  std::string m_selection;
63  std::shared_ptr<Variable::Cut> m_cut;
64  bool m_discard;
67  // Methods:
74  void updateMasksWithParticles(const StoreObjPtr<RestOfEvent>& roe, std::vector<const Particle*>& particlesToUpdate,
81  void updateMasksWithV0(const StoreObjPtr<RestOfEvent>& roe, std::vector<const Particle*>& particlesToUpdate);
82  };
84 }
85 
Belle2::RestOfEventUpdaterModule::m_maskNamesForUpdating
std::vector< std::string > m_maskNamesForUpdating
Container for all mask names which will be updated.
Definition: RestOfEventUpdaterModule.h:69
Belle2::RestOfEventUpdaterModule::m_selection
std::string m_selection
Cut string which will be used for updating masks.
Definition: RestOfEventUpdaterModule.h:70
Belle2::RestOfEventUpdaterModule::m_inputList
StoreObjPtr< ParticleList > m_inputList
ParticleList which contains information that will be used for updating.
Definition: RestOfEventUpdaterModule.h:67
Belle2::RestOfEventUpdaterModule::event
virtual void event() override
Overriden event method.
Definition: RestOfEventUpdaterModule.cc:64
Belle2::RestOfEventUpdaterModule::updateMasksWithParticles
void updateMasksWithParticles(const StoreObjPtr< RestOfEvent > &roe, std::vector< const Particle * > &particlesToUpdate, Particle::EParticleSourceObject listType)
Update ROE masks by excluding or keeping particles.
Definition: RestOfEventUpdaterModule.cc:133
Belle2::RestOfEventUpdaterModule::RestOfEventUpdaterModule
RestOfEventUpdaterModule()
Constructor: Sets the description, the properties and the parameters of the module.
Definition: RestOfEventUpdaterModule.cc:37
Belle2::RestOfEventUpdaterModule::initialize
virtual void initialize() override
Overriden initialize method.
Definition: RestOfEventUpdaterModule.cc:54
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::RestOfEventUpdaterModule::m_cut
std::shared_ptr< Variable::Cut > m_cut
Cut object which performs the cuts.
Definition: RestOfEventUpdaterModule.h:71
Belle2::Particle::EParticleSourceObject
EParticleSourceObject
particle source enumerators
Definition: Particle.h:84
Belle2::RestOfEventUpdaterModule::intAndBoolMap
std::map< unsigned int, bool > intAndBoolMap
Type definition helper for a map of integer and boolean.
Definition: RestOfEventUpdaterModule.h:63
Belle2::RestOfEventUpdaterModule::intAndIntMap
std::map< unsigned int, unsigned int > intAndIntMap
Type definition helper for a map of integer and integer.
Definition: RestOfEventUpdaterModule.h:64
Belle2::RestOfEventUpdaterModule::m_discard
bool m_discard
Update the ROE mask by passing or discarding particles in the provided particle list.
Definition: RestOfEventUpdaterModule.h:72
Belle2::RestOfEventUpdaterModule::updateMasksWithV0
void updateMasksWithV0(const StoreObjPtr< RestOfEvent > &roe, std::vector< const Particle * > &particlesToUpdate)
Update ROE masks with provided composite particle collection.
Definition: RestOfEventUpdaterModule.cc:113
Belle2::RestOfEventUpdaterModule::m_inputListName
std::string m_inputListName
Name of the ParticleList which contains information that will be used for updating.
Definition: RestOfEventUpdaterModule.h:66