10 #include "montecarlo/scoring/GGSIntHitSDMessenger.h"
17 G4String dir(
"/GGS/scoring/");
18 dir.append(_intHitSD->GetName()).append(
"/");
19 _cmdDir =
new G4UIdirectory(dir);
21 _setTimeBinCmd =
new G4UIcmdWithADoubleAndUnit(G4String(dir).append(
"setTimeBin"),
this);
22 _setTimeBinCmd->SetGuidance(
"Set a time bin. Default unit: ns");
23 _setTimeBinCmd->SetUnitCategory(
"Time");
24 _setTimeBinCmd->SetDefaultUnit(
"ns");
25 _setTimeBinCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
27 _setPosHitStorage =
new G4UIcmdWithABool(G4String(dir).append(
"storePositionHits"),
this);
28 _setPosHitStorage->SetGuidance(
"Enables the storage of position hits");
29 _setPosHitStorage->SetParameterName(G4String(dir).append(
".storePositionHits"),
true);
30 _setPosHitStorage->SetDefaultValue(
true);
31 _setPosHitStorage->AvailableForStates(G4State_PreInit, G4State_Idle);
33 _setPartHitStorage =
new G4UIcmdWithABool(G4String(dir).append(
"storeParticleHits"),
this);
34 _setPartHitStorage->SetGuidance(
"Enables the storage of particle hits");
35 _setPartHitStorage->SetParameterName(G4String(dir).append(
".storeParticleHits"),
true);
36 _setPartHitStorage->SetDefaultValue(
true);
37 _setPartHitStorage->AvailableForStates(G4State_PreInit, G4State_Idle);
39 _setTouchableIDComputer =
new G4UIcmdWithAString(G4String(dir).append(
"setTouchableIDComputer"),
this);
40 _setTouchableIDComputer->SetGuidance(
"Sets the class that will compute the touchable IDs");
41 _setTouchableIDComputer->AvailableForStates(G4State_PreInit, G4State_Idle);
48 delete _setTimeBinCmd;
49 delete _setPosHitStorage;
50 delete _setPartHitStorage;
58 if (command == _setTimeBinCmd) {
59 _intHitSD->
SetTimeBin(_setTimeBinCmd->GetNewDoubleValue(newValue));
62 if (command == _setPosHitStorage) {
66 if (command == _setPartHitStorage) {
70 if (command == _setTouchableIDComputer) {
Sensitive detector class for integrated hits.
GGSIntHitSDMessenger(GGSIntHitSD *intHitSD)
Constructor.
void SetTimeBin(G4double time)
Time bins setter.
void SetPosHitsStorage(bool store)
Turn on or off the storage (i.e. persistence) of position hits.
void SetPartHitsStorage(bool store)
Turn on or off the storage (i.e. persistency) of particle hits.
~GGSIntHitSDMessenger()
Destructor.
void SetNewValue(G4UIcommand *command, G4String newValue)
Concrete implementation of the SetNewValue methd of base class.
void SetTouchableIDComputer(const std::string &tidcClassName)
Sets the touchable ID computer class.