Geant4  10.03
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 98775 2016-08-09 14:30:39Z gcosmo $
27 //
30 //
31 
33 #include "RE05StackingAction.hh"
34 #include "G4UIcmdWithAnInteger.hh"
36 #include "G4ios.hh"
37 
38 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
39 
41 : G4UImessenger(),
42  fMyAction(msa),
43  fMuonCmd(0), fIsoMuonCmd(0), fIsoCmd(0), fRoiCmd(0)
44 {
45  fMuonCmd = new G4UIcmdWithAnInteger("/mydet/reqmuon",this);
46  fMuonCmd->SetGuidance("Number of muon for the trigger.");
47  fMuonCmd->SetParameterName("N",true);
49  fMuonCmd->SetRange("N>=0");
50 
51  fIsoMuonCmd = new G4UIcmdWithAnInteger("/mydet/isomuon",this);
52  fIsoMuonCmd->SetGuidance("Number of isolated muon for the trigger.");
53  fIsoMuonCmd->SetParameterName("N",true);
55  fIsoMuonCmd->SetRange("N>=0");
56 
57  fIsoCmd = new G4UIcmdWithAnInteger("/mydet/isolation",this);
58  fIsoCmd->SetGuidance("Maximum allowed number of hits in tracker");
59  fIsoCmd->SetGuidance(" for an isolated muon track (includes hits by muon)");
60  fIsoCmd->SetParameterName("N",true);
62  fIsoCmd->SetRange("N>=0");
63 
64  fRoiCmd = new G4UIcmdWithADoubleAndUnit("/mydet/RoIangle",this);
65  fRoiCmd->SetGuidance("Define RoI angle");
66  fRoiCmd->SetParameterName("theta",true,true);
67  fRoiCmd->SetDefaultUnit("deg");
68 }
69 
70 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
71 
73 {
74  delete fMuonCmd;
75  delete fIsoMuonCmd;
76  delete fIsoCmd;
77  delete fRoiCmd;
78 }
79 
80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81 
83 {
84  if( command==fMuonCmd )
86  else if( command==fIsoMuonCmd )
88  else if( command==fIsoCmd )
90  else if( command==fRoiCmd )
92 }
93 
94 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
95 
97 {
98  G4String cv;
99 
100  if( command==fMuonCmd )
102  else if( command==fIsoMuonCmd )
104  else if( command==fIsoCmd )
106  else if( command==fRoiCmd )
107  { cv = fRoiCmd->ConvertToString(fMyAction->GetRoIAngle(),"deg"); }
108 
109  return cv;
110 }
111 
112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
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.
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:371
G4UIcmdWithADoubleAndUnit * fRoiCmd
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