Belle II Software  release-06-02-00
EventKinematicsModule.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 <TVector3.h>
12 
13 #include <framework/core/Module.h>
14 
15 #include <analysis/dataobjects/EventKinematics.h>
16 
17 #include <framework/datastore/StoreObjPtr.h>
18 
19 namespace Belle2 {
30  class EventKinematicsModule : public Module {
31 
32  public:
33 
38 
41 
43  virtual void initialize() override;
44 
46  virtual void event() override;
47 
49  virtual void terminate() override;
50 
51 
52  private:
53 
56  bool m_usingMC;
58  std::vector<std::string> m_particleLists;
61  std::vector<TLorentzVector> m_particleMomentumList;
63  std::vector<TLorentzVector> m_particleMomentumListCMS;
65  std::vector<TLorentzVector> m_photonsMomentumList;
67  void getParticleMomentumLists(std::vector<std::string> particleLists);
68 
70  TVector3 getMissingMomentum();
72  TVector3 getMissingMomentumCMS();
74  float getMissingEnergyCMS();
76  float getVisibleEnergyCMS();
78  float getTotalPhotonsEnergy();
79  };
81 }
82 
Module to compute global quantities related to the event kinematics, like total missing energy and ma...
float getMissingEnergyCMS()
Calculate the missing energy in the CMS for this event.
EventKinematicsModule()
Constructor: Sets the description, the properties and the parameters of the module.
float getVisibleEnergyCMS()
Calculate the visible energy in the CMS for this event.
virtual void initialize() override
Define the physical parameters.
void getParticleMomentumLists(std::vector< std::string > particleLists)
Fill the lists of particles' momenta.
std::vector< TLorentzVector > m_particleMomentumListCMS
A vector of the particles' 4-momenta in the CMS.
virtual void event() override
Define event parameters.
TVector3 getMissingMomentum()
Calculate the missing momentum in the lab system for this event.
virtual void terminate() override
finish the execution
float getTotalPhotonsEnergy()
Calculate the energy for the photons in this event.
StoreObjPtr< EventKinematics > m_eventKinematics
event kinematics object pointer
virtual ~EventKinematicsModule()
free memory
TVector3 getMissingMomentumCMS()
Calculate the missing momentum in the CMS for this event.
std::vector< TLorentzVector > m_particleMomentumList
A vector of the particles' 4-momenta in lab.
std::vector< std::string > m_particleLists
Name of the ParticleList.
std::vector< TLorentzVector > m_photonsMomentumList
A vector of the photons' 4-momenta in the lab.
Base class for Modules.
Definition: Module.h:72
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:95
Abstract base class for different kinds of events.