Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4HadronicEPTestMessenger.cc
Go to the documentation of this file.
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//
28#include "G4UIdirectory.hh"
30#include "G4UIcmdWithADouble.hh"
33
34
36 :theProcessStore(theStore)
37{
38 // Main directory for control of the e/p test
39 heptstDirectory = new G4UIdirectory("/process/had/heptst/");
40 heptstDirectory->SetGuidance("Controls for the hadronic energy/momentum test");
41
42 // Command to set level of detail reported upon e/p non-conservation
43 reportLvlCmd = new G4UIcmdWithAnInteger("/process/had/heptst/reportLevel",this);
44 reportLvlCmd->SetGuidance("Set level of detail reported upon E/p non-conservation");
45 reportLvlCmd->SetGuidance(" 0 - (default) no reporting ");
46 reportLvlCmd->SetGuidance(" 1 - report only when E/p not conserved ");
47 reportLvlCmd->SetGuidance(" 2 - report regardless of E/p conservation ");
48 reportLvlCmd->SetGuidance(" 3 - report only when E/p not conserved, with names, limits ");
49 reportLvlCmd->SetGuidance(" 4 - report regardless of E/p conservation, with names, limits ");
50 reportLvlCmd->SetParameterName("ReportLevel",true);
51 reportLvlCmd->SetDefaultValue(0);
52 reportLvlCmd->SetRange("ReportLevel >= 0 && ReportLevel < 5");
53
54 // Set the relative energy non-conservation level for the process
55 procRelLvlCmd = new G4UIcmdWithADouble("/process/had/heptst/processRelLevel",this);
56 procRelLvlCmd->SetGuidance("Set relative level of allowed energy non-conservation");
57 procRelLvlCmd->SetParameterName("ProcessRelLevel",true);
58 procRelLvlCmd->SetDefaultValue(-1.0);
59
60 // Set the absolute energy non-conservation level for the process
61 procAbsLvlCmd = new G4UIcmdWithADoubleAndUnit("/process/had/heptst/processAbsLevel",this);
62 procAbsLvlCmd->SetGuidance("Set absolute energy level (with unit) of allowed energy non-conservation");
63 procAbsLvlCmd->SetParameterName("ProcessAbsLevel",true);
64 procAbsLvlCmd->SetDefaultValue(-1.0);
65 procAbsLvlCmd->SetUnitCategory("Energy");
66}
67
68
70{
71 delete heptstDirectory;
72 delete reportLvlCmd;
73 delete procRelLvlCmd;
74 delete procAbsLvlCmd;
75}
76
77
79{
80 if ( command == reportLvlCmd ) {
81 theProcessStore->SetEpReportLevel( reportLvlCmd->GetNewIntValue( newValue ) );
82 } else if ( command == procRelLvlCmd ) {
83 theProcessStore->SetProcessRelLevel( procRelLvlCmd->GetNewDoubleValue( newValue ) );
84 } else if ( command == procAbsLvlCmd ) {
85 theProcessStore->SetProcessAbsLevel( procAbsLvlCmd->GetNewDoubleValue( newValue ) );
86 }
87}
G4HadronicEPTestMessenger(G4HadronicProcessStore *theProcessStore)
void SetNewValue(G4UIcommand *command, G4String newValues)
void SetProcessAbsLevel(G4double absoluteLevel)
void SetProcessRelLevel(G4double relativeLevel)
void SetUnitCategory(const char *unitCategory)
static G4double GetNewDoubleValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4double GetNewDoubleValue(const char *paramString)
void SetDefaultValue(G4double defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetDefaultValue(G4int defVal)
void SetGuidance(const char *aGuidance)
void SetRange(const char *rs)