Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
F04PhysicsListMessenger Class Reference

Provide control of the physics list and cut parameters. More...

#include <Doxymodules_field.h>

Inheritance diagram for F04PhysicsListMessenger:
G4UImessenger

Public Member Functions

 F04PhysicsListMessenger (F04PhysicsList *)
 
 ~F04PhysicsListMessenger () override
 
void SetNewValue (G4UIcommand *, G4String) override
 

Private Attributes

F04PhysicsListfPhysicsList = nullptr
 
G4UIdirectoryfDirectory = nullptr
 
G4UIdirectoryfDecayDirectory = nullptr
 
G4UIcmdWithADoubleAndUnitfStepMaxCMD = nullptr
 
G4UIcmdWithoutParameterfPienuCMD = nullptr
 
G4UIcmdWithoutParameterfPimunuCMD = nullptr
 

Detailed Description

Provide control of the physics list and cut parameters.

Definition at line 111 of file Doxymodules_field.h.

Constructor & Destructor Documentation

◆ F04PhysicsListMessenger()

F04PhysicsListMessenger::F04PhysicsListMessenger ( F04PhysicsList pPhys)

Definition at line 52 of file F04PhysicsListMessenger.cc.

53 : fPhysicsList(pPhys)
54{
55 fDirectory = new G4UIdirectory("/exp/phys/");
56 fDirectory->SetGuidance("Control the physics lists");
57
58 fStepMaxCMD = new G4UIcmdWithADoubleAndUnit("/exp/phys/stepMax",this);
59 fStepMaxCMD->SetGuidance("Set max. step length in the detector");
60 fStepMaxCMD->SetParameterName("mxStep",false);
61 fStepMaxCMD->SetUnitCategory("Length");
62 fStepMaxCMD->SetRange("mxStep>0.0");
63 fStepMaxCMD->SetDefaultUnit("mm");
64 fStepMaxCMD->AvailableForStates(G4State_PreInit,G4State_Idle);
65/*
66 fClearPhysicsCMD = new G4UIcmdWithoutParameter("/exp/phys/clearPhysics",
67 this);
68 fClearPhysicsCMD->SetGuidance("Clear the physics list");
69 fClearPhysicsCMD->AvailableForStates(G4State_PreInit,G4State_Idle);
70
71 fRemovePhysicsCMD = new G4UIcmdWithAString("/exp/phys/removePhysics",this);
72 fRemovePhysicsCMD->
73 SetGuidance("Remove a physics process from Physics List");
74 fRemovePhysicsCMD->SetParameterName("PList",false);
75 fRemovePhysicsCMD->AvailableForStates(G4State_PreInit,G4State_Idle);
76*/
77 fDecayDirectory = new G4UIdirectory("/decay/");
78 fDecayDirectory->SetGuidance("Decay chain control commands.");
79
80 fPienuCMD = new G4UIcmdWithoutParameter("/decay/pienu", this);
81 fPienuCMD->SetGuidance("Sets the pi+ to decay into e+, nu");
82
83 fPimunuCMD = new G4UIcmdWithoutParameter("/decay/pimunu", this);
84 fPimunuCMD->SetGuidance("Sets the pi+ to decay into mu+, nu");
85
86}
G4UIcmdWithoutParameter * fPimunuCMD
G4UIcmdWithoutParameter * fPienuCMD
G4UIcmdWithADoubleAndUnit * fStepMaxCMD

◆ ~F04PhysicsListMessenger()

F04PhysicsListMessenger::~F04PhysicsListMessenger ( )
override

Definition at line 90 of file F04PhysicsListMessenger.cc.

91{
92/*
93 delete fClearPhysicsCMD;
94 delete fRemovePhysicsCMD;
95*/
96 delete fPienuCMD;
97 delete fPimunuCMD;
98}

Member Function Documentation

◆ SetNewValue()

void F04PhysicsListMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
override

Definition at line 102 of file F04PhysicsListMessenger.cc.

104{
105 G4ParticleTable* fParticleTable = G4ParticleTable::GetParticleTable();
106
107 if (command == fPienuCMD) {
108 G4ParticleDefinition* fParticleDef = fParticleTable->FindParticle("pi+");
109 G4VDecayChannel* fMode =
110 new G4PhaseSpaceDecayChannel("pi+",0.999983,2,"e+","nu_e");
111 auto fTable = new G4DecayTable();
112 fTable->Insert(fMode);
113 fMode = new G4PionRadiativeDecayChannel("pi+",0.000017);
114 fTable->Insert(fMode);
115 fParticleDef->SetDecayTable(fTable);
116 }
117
118 if (command == fPimunuCMD) {
119 G4ParticleDefinition* fParticleDef = fParticleTable->FindParticle("pi+");
120 G4VDecayChannel* fMode =
121 new G4PhaseSpaceDecayChannel("pi+",1.000,2,"mu+","nu_mu");
122 auto fTable = new G4DecayTable();
123 fTable->Insert(fMode);
124 fParticleDef->SetDecayTable(fTable);
125 }
126
127 else if (command == fStepMaxCMD) {
129 ->GetNewDoubleValue(newValue));
130 }
131/* else if (command == fClearPhysicsCMD) {
132 fPhysicsList->ClearPhysics();
133 }
134 else if (command == fRemovePhysicsCMD) {
135 G4String name = newValue;
136 fPhysicsList->RemoveFromPhysicsList(name);
137 }
138*/
139}
void SetStepMax(G4double)

Member Data Documentation

◆ fPhysicsList

F04PhysicsList* F04PhysicsListMessenger::fPhysicsList = nullptr
private

Definition at line 57 of file F04PhysicsListMessenger.hh.

◆ fDirectory

G4UIdirectory* F04PhysicsListMessenger::fDirectory = nullptr
private

Definition at line 59 of file F04PhysicsListMessenger.hh.

◆ fDecayDirectory

G4UIdirectory* F04PhysicsListMessenger::fDecayDirectory = nullptr
private

Definition at line 60 of file F04PhysicsListMessenger.hh.

◆ fStepMaxCMD

G4UIcmdWithADoubleAndUnit* F04PhysicsListMessenger::fStepMaxCMD = nullptr
private

Definition at line 62 of file F04PhysicsListMessenger.hh.

◆ fPienuCMD

G4UIcmdWithoutParameter* F04PhysicsListMessenger::fPienuCMD = nullptr
private

Definition at line 67 of file F04PhysicsListMessenger.hh.

◆ fPimunuCMD

G4UIcmdWithoutParameter* F04PhysicsListMessenger::fPimunuCMD = nullptr
private

Definition at line 68 of file F04PhysicsListMessenger.hh.


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

Applications | User Support | Publications | Collaboration