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

#include <Doxymodules_optical.h>

Inheritance diagram for OpNovicePrimaryGeneratorMessenger:
G4UImessenger

Public Member Functions

 OpNovicePrimaryGeneratorMessenger (OpNovicePrimaryGeneratorAction *)
 
 ~OpNovicePrimaryGeneratorMessenger () override
 
void SetNewValue (G4UIcommand *, G4String) override
 

Private Attributes

OpNovicePrimaryGeneratorActionfOpNoviceAction = nullptr
 
G4UIdirectoryfGunDir = nullptr
 
G4UIcmdWithADoubleAndUnitfPolarCmd = nullptr
 

Detailed Description

Definition at line 23 of file Doxymodules_optical.h.

Constructor & Destructor Documentation

◆ OpNovicePrimaryGeneratorMessenger()

OpNovicePrimaryGeneratorMessenger::OpNovicePrimaryGeneratorMessenger ( OpNovicePrimaryGeneratorAction OpNoviceGun)

Definition at line 42 of file OpNovicePrimaryGeneratorMessenger.cc.

45 , fOpNoviceAction(OpNoviceGun)
46{
47 fGunDir = new G4UIdirectory("/OpNovice/gun/");
48 fGunDir->SetGuidance("PrimaryGenerator control");
49
50 fPolarCmd =
51 new G4UIcmdWithADoubleAndUnit("/OpNovice/gun/optPhotonPolar", this);
52 fPolarCmd->SetGuidance("Set linear polarization");
53 fPolarCmd->SetGuidance(" angle w.r.t. (k,n) plane");
54 fPolarCmd->SetParameterName("angle", true);
55 fPolarCmd->SetUnitCategory("Angle");
56 fPolarCmd->SetDefaultValue(-360.0);
57 fPolarCmd->SetDefaultUnit("deg");
58 fPolarCmd->AvailableForStates(G4State_Idle);
59}

◆ ~OpNovicePrimaryGeneratorMessenger()

OpNovicePrimaryGeneratorMessenger::~OpNovicePrimaryGeneratorMessenger ( )
override

Definition at line 63 of file OpNovicePrimaryGeneratorMessenger.cc.

64{
65 delete fPolarCmd;
66 delete fGunDir;
67}

Member Function Documentation

◆ SetNewValue()

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

Definition at line 71 of file OpNovicePrimaryGeneratorMessenger.cc.

73{
74 if(command == fPolarCmd)
75 {
76 G4double angle = fPolarCmd->GetNewDoubleValue(newValue);
77 if(angle == -360.0 * deg)
78 {
80 }
81 else
82 {
84 }
85 }
86}

Member Data Documentation

◆ fOpNoviceAction

OpNovicePrimaryGeneratorAction* OpNovicePrimaryGeneratorMessenger::fOpNoviceAction = nullptr
private

Definition at line 56 of file OpNovicePrimaryGeneratorMessenger.hh.

◆ fGunDir

G4UIdirectory* OpNovicePrimaryGeneratorMessenger::fGunDir = nullptr
private

Definition at line 57 of file OpNovicePrimaryGeneratorMessenger.hh.

◆ fPolarCmd

G4UIcmdWithADoubleAndUnit* OpNovicePrimaryGeneratorMessenger::fPolarCmd = nullptr
private

Definition at line 58 of file OpNovicePrimaryGeneratorMessenger.hh.


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

Applications | User Support | Publications | Collaboration