ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
F02FieldMessenger.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file F02FieldMessenger.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 //
28 //
29 //
30 //
31 //
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34 
35 #include "F02FieldMessenger.hh"
36 
37 #include "F02ElectricFieldSetup.hh"
38 #include "G4UIcmdWithAnInteger.hh"
42 
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44 
46  : G4UImessenger(),
47  fElFieldSetup(fieldSetup),
48  fFieldDir(0),
49  fStepperCmd(0),
50  fElFieldZCmd(0),
51  fElFieldCmd(0),
52  fMinStepCmd(0),
53  fUpdateCmd(0)
54 {
55  fFieldDir = new G4UIdirectory("/field/");
56  fFieldDir->SetGuidance("F02 field tracking control.");
57 
58  fStepperCmd = new G4UIcmdWithAnInteger("/field/setStepperType",this);
59  fStepperCmd->SetGuidance("Select stepper type for electric field");
60  fStepperCmd->SetParameterName("choice",true);
63 
64  fUpdateCmd = new G4UIcmdWithoutParameter("/field/update",this);
65  fUpdateCmd->SetGuidance("Update calorimeter geometry.");
66  fUpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
67  fUpdateCmd->SetGuidance("if you changed geometrical value(s).");
69 
70  fElFieldZCmd = new G4UIcmdWithADoubleAndUnit("/field/setFieldZ",this);
71  fElFieldZCmd->SetGuidance("Define uniform Electric field.");
72  fElFieldZCmd->SetGuidance("Electric field will be in Z direction.");
73  fElFieldZCmd->SetGuidance("Value of Electric field has to be given in volt/m");
74  fElFieldZCmd->SetParameterName("Ez",false,false);
75  fElFieldZCmd->SetDefaultUnit("megavolt/m");
77 
78  fElFieldCmd = new G4UIcmdWith3VectorAndUnit("/field/setField",this);
79  fElFieldCmd->SetGuidance("Define uniform Electric field.");
80  fElFieldCmd->SetGuidance("Value of Electric field has to be given in volt/m");
81  fElFieldCmd->SetParameterName("Ex","Ey","Ez",false,false);
82  fElFieldCmd->SetDefaultUnit("megavolt/m");
84 
85  fMinStepCmd = new G4UIcmdWithADoubleAndUnit("/field/setMinStep",this);
86  fMinStepCmd->SetGuidance("Define minimal step");
87  fMinStepCmd->SetParameterName("min step",false,false);
90 }
91 
92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
93 
95 {
96  delete fStepperCmd;
97  delete fElFieldZCmd;
98  delete fElFieldCmd;
99  delete fMinStepCmd;
100  delete fFieldDir;
101  delete fUpdateCmd;
102 }
103 
104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
105 
107 {
108  if( command == fStepperCmd )
110  if( command == fUpdateCmd )
112  if( command == fElFieldZCmd )
114  if( command == fElFieldCmd )
116  if( command == fMinStepCmd )
118 }
119 
120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......