Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
parallel/TopC/ParN04/src/ExN04StackingActionMessenger.cc
이 파일의 문서화 페이지로 가기
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: ExN04StackingActionMessenger.cc 66587 2012-12-21 11:06:44Z ihrivnac $
27 //
30 //
31 
32 #include "ExN04StackingActionMessenger.hh"
33 #include "ExN04StackingAction.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 SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4int defVal)
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
static G4double GetNewDoubleValue(const char *paramString)
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:374
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetDefaultUnit(const char *defUnit)