Geant4 VMC Version 6.7
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
TG4PrimaryGeneratorMessenger.cxx
Go to the documentation of this file.
1//------------------------------------------------
2// The Geant4 Virtual Monte Carlo package
3// Copyright (C) 2007 - 2019 Ivana Hrivnacova
4// All rights reserved.
5//
6// For the licensing terms see geant4_vmc/LICENSE.
7// Contact: root-vmc@cern.ch
8//-------------------------------------------------
9
14
17
18#include <G4UIcmdWithABool.hh>
19#include <G4UIcmdWithAString.hh>
20#include <G4UIcmdWithAnInteger.hh>
21#include <G4UIdirectory.hh>
22
23//_____________________________________________________________________________
26 : G4UImessenger(),
28 fDirectory(0),
30{
32
33 fDirectory = new G4UIdirectory("/mcPrimaryGenerator/");
34 fDirectory->SetGuidance("TGeant4 primary generator action commands.");
35
37 new G4UIcmdWithABool("/mcPrimaryGenerator/skipUnknownParticles", this);
38 fSkipUnknownParticlesCmd->SetGuidance(
39 "Switch on|off applying range cuts for gamma");
40 fSkipUnknownParticlesCmd->SetParameterName("ApplyForGamma", false);
41 fSkipUnknownParticlesCmd->AvailableForStates(G4State_PreInit, G4State_Init);
42}
43
44//_____________________________________________________________________________
52
53//
54// public methods
55//
56
57//_____________________________________________________________________________
59 G4UIcommand* command, G4String newValue)
60{
62
63 if (command == fSkipUnknownParticlesCmd) {
64 fPrimaryGeneratorAction->SetSkipUnknownParticles(
65 fSkipUnknownParticlesCmd->GetNewBoolValue(newValue));
66 }
67}
Definition of the TG4PrimaryGeneratorAction class.
Definition of the TG4PrimaryGeneratorMessenger class.
Primary generator action defined via TVirtualMCStack and TVirtualMCApplication.
G4UIcmdWithABool * fSkipUnknownParticlesCmd
command: /mcPrimaryGenerator/skipUnknownParticles
TG4PrimaryGeneratorAction * fPrimaryGeneratorAction
associated class
virtual void SetNewValue(G4UIcommand *command, G4String string)
G4UIdirectory * fDirectory
command directory
TG4PrimaryGeneratorMessenger()
Not implemented.