ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4FastSimulationMessenger.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4FastSimulationMessenger.cc
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 //
28 
30 #include "G4UIdirectory.hh"
31 #include "G4UIcmdWithAString.hh"
33 
34 #include "G4ios.hh"
35 
38  : fGlobalFastSimulationManager(theGFSM)
39 {
40  fFSDirectory = new G4UIdirectory("/param/");
41  fFSDirectory->SetGuidance("Fast Simulation print/control commands.");
42 
44  new G4UIcmdWithoutParameter("/param/showSetup", this);
45  fShowSetupCmd->SetGuidance("Show fast simulation setup:");
46  fShowSetupCmd->SetGuidance(" - for each world region:");
47  fShowSetupCmd->SetGuidance(" 1) fast simulation manager process attached;");
48  fShowSetupCmd->SetGuidance(" - and to which particles the process is attached to;");
49  fShowSetupCmd->SetGuidance(" 2) region hierarchy;");
50  fShowSetupCmd->SetGuidance(" - with for each the fast simulation models attached;");
52 
54  new G4UIcmdWithAString("/param/listEnvelopes", this);
55  fListEnvelopesCmd->SetParameterName("ParticleName",true);
57  fListEnvelopesCmd->SetGuidance("List all the envelope names for a given Particle");
58  fListEnvelopesCmd->SetGuidance("(or for all particles if without parameters).");
60 
62  new G4UIcmdWithAString("/param/listModels", this);
63  fListModelsCmd->SetParameterName("EnvelopeName",true);
65  fListModelsCmd->SetGuidance("List all the Model names for a given Envelope");
66  fListModelsCmd->SetGuidance("(or for all envelopes if without parameters).");
68 
70  new G4UIcmdWithAString("/param/listIsApplicable", this);
71  fListIsApplicableCmd->SetParameterName("ModelName",true);
73  fListIsApplicableCmd->SetGuidance("List all the Particle names a given Model is applicable");
74  fListIsApplicableCmd->SetGuidance("(or for all Models if without parameters).");
75 
77  new G4UIcmdWithAString("/param/ActivateModel", this);
78  fActivateModel->SetParameterName("ModelName",false);
79  fActivateModel->SetGuidance("Activate a given Model.");
80 
82  new G4UIcmdWithAString("/param/InActivateModel", this);
83  fInActivateModel->SetParameterName("ModelName",false);
84  fInActivateModel->SetGuidance("InActivate a given Model.");
85 }
86 
88 {
89  delete fShowSetupCmd;
90  fShowSetupCmd = 0;
91  delete fListIsApplicableCmd;
93  delete fActivateModel;
94  fActivateModel = 0;
95  delete fInActivateModel;
96  fInActivateModel = 0;
97  delete fListModelsCmd;
98  fListModelsCmd = 0;
99  delete fListEnvelopesCmd;
100  fListEnvelopesCmd = 0;
101  delete fFSDirectory;
102  fFSDirectory = 0;
103 }
104 
106 {
107  if (command == fShowSetupCmd)
109  if( command == fListEnvelopesCmd)
110  {
111  if(newValue == "all")
113  else
115  ListEnvelopes(G4ParticleTable::GetParticleTable()->
116  FindParticle(newValue));
117  }
118  if( command == fListModelsCmd)
120  if( command == fListIsApplicableCmd)
122  if( command == fActivateModel)
124  if( command == fInActivateModel)
126 }