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#ifndef PRIMARYGENERATORACTION_H_
10#define PRIMARYGENERATORACTION_H_
11
12#include <mdst/dataobjects/MCParticleGraph.h>
13
14#include <G4VUserPrimaryGeneratorAction.hh>
15#include <string>
16
17class G4Event;
18
19namespace Belle2 {
25 namespace Simulation {
26
27 class MCParticleGenerator;
28
34 class PrimaryGeneratorAction: public G4VUserPrimaryGeneratorAction {
35
36 public:
37
42 PrimaryGeneratorAction(const std::string& mcCollectionName, MCParticleGraph& mcParticleGraph);
43
46
52 void GeneratePrimaries(G4Event* event);
53
54
55 protected:
56
58 };
59
60 } //end of Simulation namespace
61
63} //end of Belle2 namespace
64
65
66#endif /* PRIMARYGENERATORACTION_H_ */
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...
The PrimaryGeneratorAction class inherits from G4VuserPrimaryGeneratorAction and specifies how a prim...
virtual ~PrimaryGeneratorAction()
The destructor 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.