k4SimGeant4
Loading...
Searching...
No Matches
SimG4SingleParticleGeneratorTool Class Reference

Tool that generates single particles with parameters set via options file. More...

#include "SimG4SingleParticleGeneratorTool.h"

Inheritance diagram for SimG4SingleParticleGeneratorTool:
Collaboration diagram for SimG4SingleParticleGeneratorTool:

Public Member Functions

 SimG4SingleParticleGeneratorTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor.
 
virtual StatusCode initialize () final
 
virtual ~SimG4SingleParticleGeneratorTool ()
 Destructor.
 
virtual G4Event * g4Event () final
 Generates primaries using the parameters set via options file, uses CLHEP:RandFlat random number generator.
 
- Public Member Functions inherited from ISimG4EventProviderTool
 DeclareInterfaceID (ISimG4EventProviderTool, 1, 0)
 

Private Member Functions

StatusCode saveToEdm (const G4PrimaryVertex *, const G4PrimaryParticle *)
 Saves primary vertex and particle to FCC EDM (called if property saveEDM is set to true)
 

Private Attributes

Gaudi::Property< double > m_energyMin {this, "energyMin", 1 * CLHEP::GeV, "Minimum energy of generated particles"}
 Minimum energy of the particles generated, set with energyMin.
 
Gaudi::Property< double > m_energyMax {this, "energyMax", 1 * CLHEP::TeV, "Maximum energy of generated particles"}
 Maximum energy of the particles generated, set with energyMax.
 
Gaudi::Property< double > m_etaMin {this, "etaMin", -5., "Minimum eta of generated particles"}
 Minimum eta of the particles generated, set with etaMin.
 
Gaudi::Property< double > m_etaMax {this, "etaMax", 5, "Maximum eta of generated particles"}
 Maximum eta of the particles generated, set with etaMax.
 
Gaudi::Property< double > m_phiMin {this, "phiMin", 0., "Minimum phi of generated particles"}
 Minimum phi of the particles generated, set with phiMin.
 
Gaudi::Property< double > m_phiMax {this, "phiMax", 2 * M_PI, "Maximum phi of generated particles"}
 Maximum phi of the particles generated, set with phiMax.
 
Gaudi::Property< double > m_vertexX {this, "vertexX", 0}
 x position of the vertex associated with the particles generated, set with vertexX
 
Gaudi::Property< double > m_vertexY {this, "vertexY", 0}
 y position of the vertex associated with the particles generated, set with vertexY
 
Gaudi::Property< double > m_vertexZ {this, "vertexZ", 0}
 z position of the vertex associated with the particles generated, set with vertexZ
 
Gaudi::Property< std::string > m_particleName {this, "particleName", "geantino", "Name of the generated particles"}
 Name of the generated particle, set with particleName.
 
Gaudi::Property< bool > m_saveEdm {this, "saveEdm", false}
 Flag whether to save primary particle to EDM, set with saveEdm.
 
DataHandle< edm4hep::MCParticleCollection > m_genParticlesHandle {"GenParticles", Gaudi::DataHandle::Writer, this}
 Handle for the genparticles to be written.
 

Detailed Description

Tool that generates single particles with parameters set via options file.

Author
Andrea Dell'Acqua, J. Lingemann
Date
2014-10-01

Constructor & Destructor Documentation

◆ SimG4SingleParticleGeneratorTool()

SimG4SingleParticleGeneratorTool::SimG4SingleParticleGeneratorTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Standard constructor.

◆ ~SimG4SingleParticleGeneratorTool()

SimG4SingleParticleGeneratorTool::~SimG4SingleParticleGeneratorTool ( )
virtual

Destructor.

Member Function Documentation

◆ g4Event()

G4Event * SimG4SingleParticleGeneratorTool::g4Event ( )
finalvirtual

Generates primaries using the parameters set via options file, uses CLHEP:RandFlat random number generator.

Returns
G4Event with primaries generated through G4ParticleGun (ownership is transferred to the caller)

Implements ISimG4EventProviderTool.

◆ initialize()

StatusCode SimG4SingleParticleGeneratorTool::initialize ( )
finalvirtual

◆ saveToEdm()

StatusCode SimG4SingleParticleGeneratorTool::saveToEdm ( const G4PrimaryVertex * aVertex,
const G4PrimaryParticle * aParticle )
private

Saves primary vertex and particle to FCC EDM (called if property saveEDM is set to true)

Member Data Documentation

◆ m_energyMax

Gaudi::Property<double> SimG4SingleParticleGeneratorTool::m_energyMax {this, "energyMax", 1 * CLHEP::TeV, "Maximum energy of generated particles"}
private

Maximum energy of the particles generated, set with energyMax.

◆ m_energyMin

Gaudi::Property<double> SimG4SingleParticleGeneratorTool::m_energyMin {this, "energyMin", 1 * CLHEP::GeV, "Minimum energy of generated particles"}
private

Minimum energy of the particles generated, set with energyMin.

◆ m_etaMax

Gaudi::Property<double> SimG4SingleParticleGeneratorTool::m_etaMax {this, "etaMax", 5, "Maximum eta of generated particles"}
private

Maximum eta of the particles generated, set with etaMax.

◆ m_etaMin

Gaudi::Property<double> SimG4SingleParticleGeneratorTool::m_etaMin {this, "etaMin", -5., "Minimum eta of generated particles"}
private

Minimum eta of the particles generated, set with etaMin.

◆ m_genParticlesHandle

DataHandle<edm4hep::MCParticleCollection> SimG4SingleParticleGeneratorTool::m_genParticlesHandle {"GenParticles", Gaudi::DataHandle::Writer, this}
mutableprivate

Handle for the genparticles to be written.

◆ m_particleName

Gaudi::Property<std::string> SimG4SingleParticleGeneratorTool::m_particleName {this, "particleName", "geantino", "Name of the generated particles"}
private

Name of the generated particle, set with particleName.

◆ m_phiMax

Gaudi::Property<double> SimG4SingleParticleGeneratorTool::m_phiMax {this, "phiMax", 2 * M_PI, "Maximum phi of generated particles"}
private

Maximum phi of the particles generated, set with phiMax.

◆ m_phiMin

Gaudi::Property<double> SimG4SingleParticleGeneratorTool::m_phiMin {this, "phiMin", 0., "Minimum phi of generated particles"}
private

Minimum phi of the particles generated, set with phiMin.

◆ m_saveEdm

Gaudi::Property<bool> SimG4SingleParticleGeneratorTool::m_saveEdm {this, "saveEdm", false}
private

Flag whether to save primary particle to EDM, set with saveEdm.

◆ m_vertexX

Gaudi::Property<double> SimG4SingleParticleGeneratorTool::m_vertexX {this, "vertexX", 0}
private

x position of the vertex associated with the particles generated, set with vertexX

◆ m_vertexY

Gaudi::Property<double> SimG4SingleParticleGeneratorTool::m_vertexY {this, "vertexY", 0}
private

y position of the vertex associated with the particles generated, set with vertexY

◆ m_vertexZ

Gaudi::Property<double> SimG4SingleParticleGeneratorTool::m_vertexZ {this, "vertexZ", 0}
private

z position of the vertex associated with the particles generated, set with vertexZ


The documentation for this class was generated from the following files: