Belle II Software  release-08-01-10
ParticleGunModule.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 <mdst/dataobjects/MCParticleGraph.h>
14 #include <generators/particlegun/ParticleGun.h>
15 
16 #include <string>
17 
18 namespace Belle2 {
31  class ParticleGunModule : public Module {
32  public:
38 
40  virtual ~ParticleGunModule() {}
41 
43  void initialize() override;
44 
46  void event() override;
47 
48  protected:
51 
57  std::string m_momentumDist;
59  std::string m_phiDist;
61  std::string m_thetaDist;
63  std::string m_timeDist;
65  std::string m_vertexDist;
67  std::string m_xVertexDist;
69  std::string m_yVertexDist;
71  std::string m_zVertexDist;
74  };
75 
77 } // end namespace Belle2
78 
Class to build, validate and sort a particle decay chain.
Base class for Modules.
Definition: Module.h:72
The ParticleGun module.
MCParticleGraph m_particleGraph
Particle graph to generate MCParticle list.
std::string m_xVertexDist
String representation of the x vertex distribution.
std::string m_zVertexDist
String representation of the z vertex distribution.
void initialize() override
Initializes the module.
void event() override
Method is called for each event.
std::string m_timeDist
String representation of the time distribution.
virtual ~ParticleGunModule()
Destructor.
ParticleGun::Parameters m_parameters
Parameters of the particle gun.
std::string m_momentumDist
String representation of the momentum distribution.
std::string m_vertexDist
String representation of the vertex distribution.
std::string m_thetaDist
String representation of the polar angle distribution.
ParticleGun::EDistribution convertDistribution(std::string name)
function to convert the strings the uses sets in the parameter list to the internal encoding
std::string m_phiDist
String representation of the azimuth angle distribution.
ParticleGun m_particleGun
Instance of the particle gun.
std::string m_yVertexDist
String representation of the y vertex distribution.
Class to generate tracks in the particle gun and store them in a MCParticle graph.
Definition: ParticleGun.h:26
EDistribution
enum containing all known distributions available for generation of values
Definition: ParticleGun.h:29
Abstract base class for different kinds of events.
Struct to keep all necessary parameters for the particle gun.
Definition: ParticleGun.h:65