Belle II Software development
PrimaryGeneratorAction.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 <mdst/dataobjects/MCParticleGraph.h>
12
13#include <G4VUserPrimaryGeneratorAction.hh>
14#include <string>
15
16class G4Event;
17
18namespace Belle2 {
23
24 namespace Simulation {
25
27
33 class PrimaryGeneratorAction: public G4VUserPrimaryGeneratorAction {
34
35 public:
36
41 PrimaryGeneratorAction(const std::string& mcCollectionName, MCParticleGraph& mcParticleGraph);
42
45
51 void GeneratePrimaries(G4Event* event);
52
53
54 protected:
55
57 };
58
59 } //end of Simulation namespace
60
62} //end of Belle2 namespace
Class to build, validate and sort a particle decay chain.
This class creates Geant4 primary particles from MCParticle list The generator assumes that each part...
virtual ~PrimaryGeneratorAction()
The destructor of the PrimaryGeneratorAction.
PrimaryGeneratorAction(const std::string &mcCollectionName, MCParticleGraph &mcParticleGraph)
The constructor of the PrimaryGeneratorAction.
void GeneratePrimaries(G4Event *event)
This method is called for each event by Geant4 and creates the primary particles by invoking the gene...
MCParticleGenerator * m_mcParticleGenerator
The instance of the MCParticle generator.
Abstract base class for different kinds of events.