Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
ClusteringAlgoMessenger.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 // This example is provided by the Geant4-DNA collaboration
27 // Any report or published results obtained using the Geant4-DNA software
28 // shall cite the following Geant4-DNA collaboration publication:
29 // Med. Phys. 37 (2010) 4692-4708
30 // The Geant4-DNA web site is available at http://geant4-dna.org
31 //
32 // $Id$
33 //
36 
38 
39 #include "ClusteringAlgo.hh"
40 
41 #include "G4UIcmdWithAnInteger.hh"
42 #include "G4UIcmdWithADouble.hh"
44 #include "G4UIdirectory.hh"
45 
46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
47 
49 :G4UImessenger(),fpClusteringAlgo(pClustAlgo)
50 {
51  fpAppliDir = new G4UIdirectory("/clustering/");
52  fpAppliDir->SetGuidance("commands specific to this example");
53 
54  fpMinPtsCmd = new G4UIcmdWithAnInteger("/clustering/algo/setMinPts",this);
55  fpMinPtsCmd->SetGuidance("Minimal number of points to create a cluster");
56  fpMinPtsCmd->SetParameterName("MinPts",false);
57  fpMinPtsCmd->SetRange("MinPts>0");
59 
60  fpProbCmd = new G4UIcmdWithADouble("/clustering/algo/setSelectionProb",this);
61  fpProbCmd->SetGuidance("Probability to select potential "
62  "damage according to the geometry");
63  fpProbCmd->SetParameterName("Prob",false);
64  fpProbCmd->SetRange("Prob>0");
66 
67  fpEpsCmd = new G4UIcmdWithADoubleAndUnit("/clustering/algo/setEps",this);
68  fpEpsCmd->SetGuidance("Maximal distance between points to create a cluster");
69  fpEpsCmd->SetParameterName("Eps",false);
70  fpEpsCmd->SetRange("Eps>0");
72 
73  fpEminCmd = new G4UIcmdWithADoubleAndUnit("/clustering/algo/setEmin",this);
74  fpEminCmd->SetGuidance("Energy to have a probability "
75  "to create a strand break = 0");
76  fpEminCmd->SetParameterName("Emin",false);
77  fpEminCmd->SetRange("Emin>=0");
79 
80  fpEmaxCmd = new G4UIcmdWithADoubleAndUnit("/clustering/algo/setEmax",this);
81  fpEmaxCmd->SetGuidance("Energy to have a probability "
82  "to create a strand break = 1");
83  fpEmaxCmd->SetParameterName("Emax",false);
84  fpEmaxCmd->SetRange("Emax>=0");
86 }
87 
88 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
89 
91 {
92  delete fpMinPtsCmd;
93  delete fpProbCmd;
94  delete fpEpsCmd;
95  delete fpEminCmd;
96  delete fpEmaxCmd;
97  delete fpAppliDir;
98 }
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
101 
103  G4String pNewValue)
104 {
105  if(pCommand == fpMinPtsCmd)
106  {
108  }
109  if(pCommand == fpProbCmd)
110  {
112  }
113  if(pCommand == fpEpsCmd)
114  {
116  }
117  if(pCommand == fpEminCmd)
118  {
120  }
121  if(pCommand == fpEmaxCmd)
122  {
124  }
125 }
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetEMaxDamage(G4double val)
Definition of the ClusteringAlgoMessenger class.
void SetEps(G4double val)
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
static G4double GetNewDoubleValue(const char *paramString)
G4UIcmdWithADoubleAndUnit * fpEmaxCmd
Definition of the ClustreringAlgo class.
static G4double GetNewDoubleValue(const char *paramString)
void SetSPointsProb(G4double val)
G4UIcmdWithADoubleAndUnit * fpEminCmd
virtual void SetNewValue(G4UIcommand *, G4String)
G4UIcmdWithAnInteger * fpMinPtsCmd
void SetMinPts(G4int val)
void SetEMinDamage(G4double val)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
G4UIcmdWithADoubleAndUnit * fpEpsCmd
ClusteringAlgoMessenger(ClusteringAlgo *)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:242
G4UIcmdWithADouble * fpProbCmd