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

Messenger for the example fast simulation model. More...

#include <Doxymodules_parameterisations.h>

Inheritance diagram for Par03EMShowerMessenger:
G4UImessenger

Public Member Functions

 Par03EMShowerMessenger (Par03EMShowerModel *aModel)
 
 ~Par03EMShowerMessenger ()
 
virtual void SetNewValue (G4UIcommand *aCommand, G4String aNewValues) final
 Invokes appropriate methods based on the typed command.
 
virtual G4String GetCurrentValue (G4UIcommand *aCommand) final
 Retrieves the current settings.
 

Private Attributes

Par03EMShowerModelfModel
 Model to setup.
 
G4UIdirectoryfDirectory
 Command to set the up a directory for model settings /Par03/fastSim.
 
G4UIcmdWithoutParameterfPrintCmd
 Command printing current settings.
 
G4UIcmdWithADoubleAndUnitfSigmaCmd
 Command to set the sigma parameter of the Gaussian distribution describing the transverse profile.
 
G4UIcmdWithADoublefAlphaCmd
 Command to set the alpha parameter of the Gamma distribution describing the longitudinal profile.
 
G4UIcmdWithADoublefBetaCmd
 Command to set the beta parameter of the Gamma distribution describing the longitudinal profile.
 
G4UIcmdWithAnIntegerfNbOfHitsCmd
 Command to set the number of (same energy) deposits to be created by fast simulation.
 
G4UIcmdWithADoublefLongMaxDepthCmd
 Command to set the maximum shower depth.
 

Detailed Description

Messenger for the example fast simulation model.

Allows to set the parameters of the Par03EMShowerModel: parameters of the distributions used in the parametrisation, number of created (same) energy deposits, as well as the maximum depth of an EM shower.

Definition at line 62 of file Doxymodules_parameterisations.h.

Constructor & Destructor Documentation

◆ Par03EMShowerMessenger()

Par03EMShowerMessenger::Par03EMShowerMessenger ( Par03EMShowerModel aModel)

Definition at line 35 of file Par03EMShowerMessenger.cc.

36 : fModel(aModel)
37{
38 fDirectory = new G4UIdirectory("/Par03/fastSim/");
39 fDirectory->SetGuidance(
40 "Set mesh parameters for the example fast sim model.");
41
42 fPrintCmd = new G4UIcmdWithoutParameter("/Par03/fastSim/print", this);
43 fPrintCmd->SetGuidance("Print current settings.");
44
46 "/Par03/fastSim/transverseProfile/sigma", this);
47 fSigmaCmd->SetGuidance("Set sigma parameter of 2D Gaussian distribution.");
48 fSigmaCmd->SetParameterName("Sigma", false);
49 fSigmaCmd->SetUnitCategory("Length");
50
51 fAlphaCmd =
52 new G4UIcmdWithADouble("/Par03/fastSim/longitudinalProfile/alpha", this);
53 fAlphaCmd->SetGuidance("Set alpha parameter of Gamma distribution.");
54 fAlphaCmd->SetParameterName("Alpha", false);
55
56 fBetaCmd =
57 new G4UIcmdWithADouble("/Par03/fastSim/longitudinalProfile/beta", this);
58 fBetaCmd->SetGuidance("Set beta parameter of Gamma distribution.");
59 fBetaCmd->SetParameterName("Beta", false);
60
61 fNbOfHitsCmd = new G4UIcmdWithAnInteger("/Par03/fastSim/numberOfHits", this);
62 fNbOfHitsCmd->SetGuidance(
63 "Set number of (same energy) energy deposits created in fast simulation. "
64 "Those deposits will be scored in the detector according to the readout of "
65 "the sensitive detector.");
66 fNbOfHitsCmd->SetParameterName("Number", false);
67
69 new G4UIcmdWithADouble("/Par03/fastSim/longitudinalProfile/maxDepth", this);
70 fLongMaxDepthCmd->SetGuidance(
71 "Set maximum shower depth used in parametrisation.");
72 fLongMaxDepthCmd->SetGuidance("Expressed in units of radiation length.");
73 fLongMaxDepthCmd->SetParameterName("Depth", false);
74}
G4UIcmdWithADouble * fAlphaCmd
Command to set the alpha parameter of the Gamma distribution describing the longitudinal profile.
G4UIcmdWithADouble * fBetaCmd
Command to set the beta parameter of the Gamma distribution describing the longitudinal profile.
G4UIcmdWithADouble * fLongMaxDepthCmd
Command to set the maximum shower depth.
Par03EMShowerModel * fModel
Model to setup.
G4UIcmdWithoutParameter * fPrintCmd
Command printing current settings.
G4UIdirectory * fDirectory
Command to set the up a directory for model settings /Par03/fastSim.
G4UIcmdWithADoubleAndUnit * fSigmaCmd
Command to set the sigma parameter of the Gaussian distribution describing the transverse profile.
G4UIcmdWithAnInteger * fNbOfHitsCmd
Command to set the number of (same energy) deposits to be created by fast simulation.

◆ ~Par03EMShowerMessenger()

Par03EMShowerMessenger::~Par03EMShowerMessenger ( )

Definition at line 78 of file Par03EMShowerMessenger.cc.

79{
80 delete fPrintCmd;
81 delete fSigmaCmd;
82 delete fAlphaCmd;
83 delete fBetaCmd;
84 delete fNbOfHitsCmd;
85 delete fLongMaxDepthCmd;
86 delete fDirectory;
87}

Member Function Documentation

◆ SetNewValue()

void Par03EMShowerMessenger::SetNewValue ( G4UIcommand aCommand,
G4String  aNewValues 
)
finalvirtual

Invokes appropriate methods based on the typed command.

Definition at line 91 of file Par03EMShowerMessenger.cc.

93{
94 if(aCommand == fPrintCmd)
95 {
96 fModel->Print();
97 }
98 else if(aCommand == fSigmaCmd)
99 {
100 fModel->SetSigma(fSigmaCmd->GetNewDoubleValue(aNewValues));
101 }
102 else if(aCommand == fAlphaCmd)
103 {
104 fModel->SetAlpha(fAlphaCmd->GetNewDoubleValue(aNewValues));
105 }
106 else if(aCommand == fBetaCmd)
107 {
108 fModel->SetBeta(fBetaCmd->GetNewDoubleValue(aNewValues));
109 }
110 else if(aCommand == fNbOfHitsCmd)
111 {
112 fModel->SetNbOfHits(fNbOfHitsCmd->GetNewIntValue(aNewValues));
113 }
114 else if(aCommand == fLongMaxDepthCmd)
115 {
116 fModel->SetLongMaxDepth(fLongMaxDepthCmd->GetNewDoubleValue(aNewValues));
117 }
118}
void SetNbOfHits(const G4int aNumber)
Set number of (same energy) hits created in the parametrisation.
void Print() const
Print current settings.
void SetLongMaxDepth(const G4double aDepth)
Set maximum depth of shower created in fast simulation.
void SetSigma(const G4double aSigma)
Set standard deviation of a Gaussian distribution that describes the transverse shower profile.
void SetBeta(const G4double aBeta)
Set beta parameter of a Gamma distribution that describes the longitudinal shower profile.
void SetAlpha(const G4double aAlpha)
Set alpha parameter of a Gamma distribution that describes the longitudinal shower profile.

◆ GetCurrentValue()

G4String Par03EMShowerMessenger::GetCurrentValue ( G4UIcommand aCommand)
finalvirtual

Retrieves the current settings.

Definition at line 122 of file Par03EMShowerMessenger.cc.

123{
124 G4String cv;
125
126 if(aCommand == fSigmaCmd)
127 {
128 cv = fSigmaCmd->ConvertToString(fModel->GetSigma());
129 }
130 else if(aCommand == fAlphaCmd)
131 {
132 cv = fAlphaCmd->ConvertToString(fModel->GetAlpha());
133 }
134 else if(aCommand == fBetaCmd)
135 {
136 cv = fBetaCmd->ConvertToString(fModel->GetBeta());
137 }
138 else if(aCommand == fNbOfHitsCmd)
139 {
140 cv = fNbOfHitsCmd->ConvertToString(fModel->GetNbOfHits());
141 }
142 else if(aCommand == fLongMaxDepthCmd)
143 {
144 cv = fLongMaxDepthCmd->ConvertToString(fModel->GetLongMaxDepth());
145 }
146 return cv;
147}
G4double GetBeta() const
Get beta parameter of a Gamma distribution that describes the longitudinal shower profile.
G4double GetAlpha() const
Get alpha parameter of a Gamma distribution that describes the longitudinal shower profile.
G4int GetNbOfHits() const
Get number of (same energy) hits created in the parametrisation.s.
G4double GetLongMaxDepth() const
Get maximum depth of shower created in fast simulation.
G4double GetSigma() const
Get standard deviation of a Gaussian distribution that describes the transverse shower profile.

Member Data Documentation

◆ fModel

Par03EMShowerModel* Par03EMShowerMessenger::fModel
private

Model to setup.

Definition at line 62 of file Par03EMShowerMessenger.hh.

◆ fDirectory

G4UIdirectory* Par03EMShowerMessenger::fDirectory
private

Command to set the up a directory for model settings /Par03/fastSim.

Definition at line 64 of file Par03EMShowerMessenger.hh.

◆ fPrintCmd

G4UIcmdWithoutParameter* Par03EMShowerMessenger::fPrintCmd
private

Command printing current settings.

Definition at line 66 of file Par03EMShowerMessenger.hh.

◆ fSigmaCmd

G4UIcmdWithADoubleAndUnit* Par03EMShowerMessenger::fSigmaCmd
private

Command to set the sigma parameter of the Gaussian distribution describing the transverse profile.

Definition at line 69 of file Par03EMShowerMessenger.hh.

◆ fAlphaCmd

G4UIcmdWithADouble* Par03EMShowerMessenger::fAlphaCmd
private

Command to set the alpha parameter of the Gamma distribution describing the longitudinal profile.

Definition at line 72 of file Par03EMShowerMessenger.hh.

◆ fBetaCmd

G4UIcmdWithADouble* Par03EMShowerMessenger::fBetaCmd
private

Command to set the beta parameter of the Gamma distribution describing the longitudinal profile.

Definition at line 75 of file Par03EMShowerMessenger.hh.

◆ fNbOfHitsCmd

G4UIcmdWithAnInteger* Par03EMShowerMessenger::fNbOfHitsCmd
private

Command to set the number of (same energy) deposits to be created by fast simulation.

Definition at line 78 of file Par03EMShowerMessenger.hh.

◆ fLongMaxDepthCmd

G4UIcmdWithADouble* Par03EMShowerMessenger::fLongMaxDepthCmd
private

Command to set the maximum shower depth.

Definition at line 80 of file Par03EMShowerMessenger.hh.


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

Applications | User Support | Publications | Collaboration