7 #include <G4UIdirectory.hh> 8 #include <G4UIcmdWithAString.hh> 9 #include <G4UIcmdWithAnInteger.hh> 10 #include <G4UIcmdWithoutParameter.hh> 11 #include <G4UIcmdWithABool.hh> 12 #include <G4UIcmdWithADoubleAndUnit.hh> 13 #include <G4UIcommand.hh> 18 : fPersistencyManager(persistencyMgr) {
22 fOpenCMD =
new G4UIcmdWithAString(
"/edep/db/open",
this);
23 fOpenCMD->SetGuidance(
"Set the name of the output file and open it.");
24 fOpenCMD->SetParameterName(
"filename",
true);
25 fOpenCMD->SetDefaultValue(
"edepsim-output.root");
26 fOpenCMD->AvailableForStates(G4State_PreInit,G4State_Idle);
28 fCloseCMD =
new G4UIcmdWithoutParameter(
"/edep/db/close",
this);
29 fCloseCMD->SetGuidance(
"Close the output file.");
35 =
new G4UIcmdWithADoubleAndUnit(
"/edep/db/set/gammaThreshold",
this);
37 "Set momentum threshold for writing out gamma-ray trajectories");
42 =
new G4UIcmdWithADoubleAndUnit(
"/edep/db/set/neutronThreshold",
this);
44 "Set momentum threshold for writing out neutron trajectories");
49 =
new G4UIcmdWithADoubleAndUnit(
"/edep/db/set/lengthThreshold",
this);
51 "Set length of track in an SD for writing out particle trajectories");
56 =
new G4UIcmdWithABool(
"/edep/db/set/saveAllPrimTraj",
this);
58 "Control which primaries have saved trajectories.\n" 59 " True: Save all prim. part. trajectories.\n" 60 " False: Save prim. that ultimately deposit energy in SD.");
63 =
new G4UIcmdWithADoubleAndUnit(
"/edep/db/set/trajectoryAccuracy",
this);
65 "Set the minimum accuracy of the trajectory.");
70 =
new G4UIcmdWithADoubleAndUnit(
"/edep/db/set/trajectoryDeposit",
this);
72 "Set the minimum energy deposit for a trajectory point.");
77 =
new G4UIcmdWithAString(
"/edep/db/set/trajectoryBoundary",
this);
79 "Add a Perl RegExp for a phys. vol. boundary where a\n" 80 " trajectory point is saved. The expression is compared to a\n" 81 " string constructed \":particle:charge:volume:\" where particle\n" 82 " is the particle name, charge is \"charged\" or \"neutral\" and\n" 83 " volume is the physical volume name.");
88 =
new G4UIcmdWithoutParameter(
"/edep/db/set/clearBoundaries",
this);
90 "trajectory points.");
152 G4String currentValue;
G4UIcmdWithoutParameter * fClearBoundariesCMD
virtual G4String GetFilename(void) const
Return the output file name.
G4UIcmdWithoutParameter * fCloseCMD
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValues)
virtual void AddTrajectoryBoundary(const G4String &boundary)
virtual void SetTrajectoryPointAccuracy(double acc)
virtual bool GetSaveAllPrimaryTrajectories(void) const
PersistencyMessenger(EDepSim::PersistencyManager *persistencyMgr)
virtual G4double GetNeutronThreshold() const
G4UIcmdWithABool * fSaveAllPrimaryTrajectoriesCMD
virtual double GetTrajectoryPointAccuracy(void) const
G4UIcmdWithADoubleAndUnit * fTrajectoryPointDepositCMD
virtual void SetNeutronThreshold(G4double thresh)
G4UIcmdWithADoubleAndUnit * fNeutronThresholdCMD
virtual double GetTrajectoryPointDeposit(void) const
G4UIcmdWithAString * fTrajectoryBoundaryCMD
EDepSim::PersistencyManager * fPersistencyManager
G4UIdirectory * fPersistencySetDIR
G4UIdirectory * fPersistencyDIR
G4UIcmdWithADoubleAndUnit * fTrajectoryPointAccuracyCMD
virtual G4double GetGammaThreshold() const
virtual G4bool Open(G4String filename)
virtual void ClearTrajectoryBoundaries()
G4UIcmdWithADoubleAndUnit * fLengthThresholdCMD
virtual void SetLengthThreshold(G4double thresh)
virtual void SetGammaThreshold(G4double thresh)
virtual void SetSaveAllPrimaryTrajectories(bool val)
virtual ~PersistencyMessenger()
virtual void SetTrajectoryPointDeposit(double dep)
virtual G4bool Close(void)
Make sure the output file is closed.
G4UIcmdWithAString * fOpenCMD
virtual G4double GetLengthThreshold() const
Get the threshold for length in a sensitive detector.
G4UIcmdWithADoubleAndUnit * fGammaThresholdCMD