Geant4  10.00.p01
RE05StackingActionMessenger.cc
Go to the documentation of this file.
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 //
26 // $Id: RE05StackingActionMessenger.cc 66526 2012-12-19 13:41:33Z ihrivnac $
27 //
30 //
31 
33 #include "RE05StackingAction.hh"
34 #include "G4UIcmdWithAnInteger.hh"
36 #include "G4ios.hh"
37 
39 :myAction(msa)
40 {
41  muonCmd = new G4UIcmdWithAnInteger("/mydet/reqmuon",this);
42  muonCmd->SetGuidance("Number of muon for the trigger.");
43  muonCmd->SetParameterName("N",true);
45  muonCmd->SetRange("N>=0");
46 
47  isomuonCmd = new G4UIcmdWithAnInteger("/mydet/isomuon",this);
48  isomuonCmd->SetGuidance("Number of isolated muon for the trigger.");
49  isomuonCmd->SetParameterName("N",true);
51  isomuonCmd->SetRange("N>=0");
52 
53  isoCmd = new G4UIcmdWithAnInteger("/mydet/isolation",this);
54  isoCmd->SetGuidance("Maximum allowed number of hits in tracker");
55  isoCmd->SetGuidance(" for an isolated muon track (includes hits by muon)");
56  isoCmd->SetParameterName("N",true);
58  isoCmd->SetRange("N>=0");
59 
60  roiCmd = new G4UIcmdWithADoubleAndUnit("/mydet/RoIangle",this);
61  roiCmd->SetGuidance("Define RoI angle");
62  roiCmd->SetParameterName("theta",true,true);
63  roiCmd->SetDefaultUnit("deg");
64 }
65 
67 {
68  delete muonCmd;
69  delete isomuonCmd;
70  delete isoCmd;
71  delete roiCmd;
72 }
73 
75 {
76  if( command==muonCmd )
78  else if( command==isomuonCmd )
80  else if( command==isoCmd )
82  else if( command==roiCmd )
84 }
85 
87 {
88  G4String cv;
89 
90  if( command==muonCmd )
92  else if( command==isomuonCmd )
94  else if( command==isoCmd )
96  else if( command==roiCmd )
97  { cv = roiCmd->ConvertToString(myAction->GetRoIAngle(),"deg"); }
98 
99  return cv;
100 }
101 
void SetNRequestMuon(G4int val)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
Definition of the RE05StackingActionMessenger class.
G4UIcmdWithADoubleAndUnit * roiCmd
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:357
static G4double GetNewDoubleValue(const char *paramString)
G4int GetNRequestIsoMuon() const
void SetRoIAngle(G4double val)
Definition of the RE05StackingAction class.
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetNIsolation(G4int val)
G4int GetNRequestMuon() const
virtual G4String GetCurrentValue(G4UIcommand *command)
G4double GetRoIAngle() const
void SetDefaultUnit(const char *defUnit)
void SetDefaultValue(G4int defVal)
virtual void SetNewValue(G4UIcommand *command, G4String newValues)
void SetNRequestIsoMuon(G4int val)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
RE05StackingActionMessenger(RE05StackingAction *msa)
G4int GetNIsolation() const