Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
clparse.cc File Reference
#include "globals.hh"
#include <fstream>
#include "G4Tokenizer.hh"
#include "G3toG4.hh"
#include "G3EleTable.hh"
#include "G3VolTable.hh"
#include "G3MatTable.hh"
#include "G3MedTable.hh"
#include "G3RotTable.hh"
#include "G3PartTable.hh"
#include "G3DetTable.hh"
#include "G3SensVolVector.hh"
#include <stdlib.h>

Go to the source code of this file.

Functions

char gSeparator ('_')
 
G4int G3CLTokens (G4String *line, G4String *tokens)
 
void G3CLEval (G4String *tokens, char *select)
 
void PG4gsvolu (G4String *tokens)
 
void PG4gspos (G4String *tokens)
 
void PG4gsposp (G4String *tokens)
 
void PG4gsatt (G4String *tokens)
 
void PG4gsrotm (G4String *tokens)
 
void PG4gsdvn (G4String *tokens)
 
void PG4gsdvt (G4String *tokens)
 
void PG4gsdvx (G4String *tokens)
 
void PG4gsdvn2 (G4String *tokens)
 
void PG4gsdvt2 (G4String *tokens)
 
void PG4gsmate (G4String *tokens)
 
void PG4gsmixt (G4String *tokens)
 
void PG4gstmed (G4String *tokens)
 
void PG4gstpar (G4String *tokens)
 
void PG4gspart (G4String *tokens)
 
void PG4gsdk (G4String *tokens)
 
void PG4gsdet (G4String *tokens)
 
void PG4gsdetv (G4String *tokens)
 
void PG4gsdeta (G4String *tokens)
 
void PG4gsdeth (G4String *tokens)
 
void PG4gsdetd (G4String *tokens)
 
void PG4gsdetu (G4String *tokens)
 
void PG4ggclos ()
 
void G3CLRead (G4String &fname, char *select=0)
 
G4int G3CLTokens (G4String *line, G4String tokens[])
 
void G3CLEval (G4String tokens[], char *select)
 
void G3fillParams (G4String *tokens, const char *ptypes)
 

Variables

std::ofstream ofile
 
G3VolTable G3Vol
 
G3MatTable G3Mat
 
G3MedTable G3Med
 
G3RotTable G3Rot
 
G3PartTable G3Part
 
G3DetTable G3Det
 
G3EleTable G3Ele
 
G3SensVolVector G3SensVol
 
G4int narray
 
G4int Ipar [1000]
 
G4double Rpar [1000]
 
G4String Spar [1000]
 

Function Documentation

◆ G3CLEval() [1/2]

void G3CLEval ( G4String tokens,
char *  select 
)

Referenced by G3CLRead().

◆ G3CLEval() [2/2]

void G3CLEval ( G4String  tokens[],
char *  select 
)

Definition at line 171 of file clparse.cc.

172{
173 //
174 // G3CLEval
175 //
176 // Evaluate the token List as a Geant3 call, and execute it as
177 // a Geant4 call.
178
179 const char* context = tokens[0];
180 const char* routine = tokens[1];
181 const char* wcard = "*";
182
183 // If context is selected, return unless context matches
184 //
185 if ((select != 0) && (select != wcard))
186 {
187 if ( strcmp(select,context) ) { return; }
188 }
189
190 // Branch on Geant3 routine name
191 //
192 ofile << "Do routine " << routine << " in context " << context << G4endl;
193
194 if ( !strcmp(routine,"GSVOLU") ) { PG4gsvolu(&tokens[2]); return;}
195 if ( !strcmp(routine,"GSPOS") ) { PG4gspos (&tokens[2]); return;}
196 if ( !strcmp(routine,"GSPOSP") ) { PG4gsposp(&tokens[2]); return;}
197 if ( !strcmp(routine,"GSATT") ) { PG4gsatt (&tokens[2]); return;}
198 if ( !strcmp(routine,"GSROTM") ) { PG4gsrotm(&tokens[2]); return;}
199 if ( !strcmp(routine,"GSDVN") ) { PG4gsdvn (&tokens[2]); return;}
200 if ( !strcmp(routine,"GSDVT") ) { PG4gsdvt (&tokens[2]); return;}
201 if ( !strcmp(routine,"GSDVX") ) { PG4gsdvx (&tokens[2]); return;}
202 if ( !strcmp(routine,"GSDVN2") ) { PG4gsdvn2(&tokens[2]); return;}
203 if ( !strcmp(routine,"GSDVT2") ) { PG4gsdvt2(&tokens[2]); return;}
204 if ( !strcmp(routine,"GSMATE") ) { PG4gsmate(&tokens[2]); return;}
205 if ( !strcmp(routine,"GSMIXT") ) { PG4gsmixt(&tokens[2]); return;}
206 if ( !strcmp(routine,"GSTMED") ) { PG4gstmed(&tokens[2]); return;}
207 if ( !strcmp(routine,"GSTPAR") ) { PG4gstpar(&tokens[2]); return;}
208 if ( !strcmp(routine,"GSPART") ) { PG4gspart(&tokens[2]); return;}
209 if ( !strcmp(routine,"GSDK") ) { PG4gsdk (&tokens[2]); return;}
210 if ( !strcmp(routine,"GSDET") ) { PG4gsdet (&tokens[2]); return;}
211 if ( !strcmp(routine,"GSDETV") ) { PG4gsdetv(&tokens[2]); return;}
212 if ( !strcmp(routine,"GSDETA") ) { PG4gsdeta(&tokens[2]); return;}
213 if ( !strcmp(routine,"GSDETH") ) { PG4gsdeth(&tokens[2]); return;}
214 if ( !strcmp(routine,"GSDETD") ) { PG4gsdetd(&tokens[2]); return;}
215 if ( !strcmp(routine,"GSDETU") ) { PG4gsdetu(&tokens[2]); return;}
216 if ( !strcmp(routine,"GGCLOS") ) { PG4ggclos(); return;}
217}
#define G4endl
Definition: G4ios.hh:52
void PG4gsdk(G4String *tokens)
Definition: G4gsdk.cc:33
void PG4ggclos()
Definition: G4ggclos.cc:32
void PG4gsatt(G4String *tokens)
Definition: G4gsatt.cc:33
void PG4gsdetd(G4String *tokens)
Definition: G4gsdetd.cc:34
void PG4gsvolu(G4String *tokens)
Definition: G4gsvolu.cc:37
void PG4gsdeta(G4String *tokens)
Definition: G4gsdeta.cc:38
void PG4gsrotm(G4String *tokens)
Definition: G4gsrotm.cc:35
void PG4gsdvt2(G4String *tokens)
Definition: G4gsdvt2.cc:41
void PG4gsdeth(G4String *tokens)
Definition: G4gsdeth.cc:34
void PG4gsdvn2(G4String *tokens)
Definition: G4gsdvn2.cc:41
void PG4gsdvx(G4String *tokens)
Definition: G4gsdvx.cc:40
void PG4gsmate(G4String *tokens)
Definition: G4gsmate.cc:42
void PG4gstmed(G4String *tokens)
Definition: G4gstmed.cc:44
void PG4gsposp(G4String *tokens)
Definition: G4gsposp.cc:42
void PG4gsdetu(G4String *tokens)
Definition: G4gsdetu.cc:31
void PG4gsmixt(G4String *tokens)
Definition: G4gsmixt.cc:43
void PG4gspart(G4String *tokens)
Definition: G4gspart.cc:33
void PG4gspos(G4String *tokens)
Definition: G4gspos.cc:42
void PG4gsdvn(G4String *tokens)
Definition: G4gsdvn.cc:38
void PG4gstpar(G4String *tokens)
Definition: G4gstpar.cc:32
void PG4gsdvt(G4String *tokens)
Definition: G4gsdvt.cc:41
std::ofstream ofile
Definition: clparse.cc:45
void PG4gsdetv(G4String *tokens)
Definition: G4gsdetv.cc:36
void PG4gsdet(G4String *tokens)
Definition: G4gsdet.cc:32

◆ G3CLRead()

void G3CLRead ( G4String fname,
char *  select = 0 
)

Definition at line 99 of file clparse.cc.

100{
101 //
102 // G3CLRead
103 // Read the call List file, parse the tokens, and pass the token
104 // List to the Geant4 interpreter
105 //
106 // fname: call List filename
107
108 G4String line;
109 G4String tokens[1000];
110
111 const char* ofname = "clparse.out";
112 ofile.open(ofname);
113 ofile << "Output file open\n";
114
115 G4int count = 0;
116 G4int ntokens = 0;
117 std::ifstream istr(fname);
118
119 while (line.readLine(istr) && ! istr.eof())
120 {
121 count++;
122 ntokens = G3CLTokens(&line,tokens); // tokenize the line
123 for (G4int i=0; i < ntokens; i++)
124 {
125 ofile << tokens[i] << G4endl;
126 }
127
128 // interpret the line as a Geant call
129 //
130 G3CLEval(tokens, select);
131 }
132}
int G4int
Definition: G4Types.hh:66
std::istream & readLine(std::istream &, G4bool skipWhite=true)
void G3CLEval(G4String *tokens, char *select)
G4int G3CLTokens(G4String *line, G4String *tokens)

Referenced by G4BuildGeom().

◆ G3CLTokens() [1/2]

G4int G3CLTokens ( G4String line,
G4String tokens 
)

Referenced by G3CLRead().

◆ G3CLTokens() [2/2]

G4int G3CLTokens ( G4String line,
G4String  tokens[] 
)

Definition at line 135 of file clparse.cc.

136{
137 //
138 // G3CLTokens
139 //
140 // Tokenize line, returning tokens in tokens[]. Items in ".."
141 // are extracted as single tokens, despite embedded spaces.
142
143 G4Tokenizer next(*line);
144
145 // first tokenize using " to identify strings
146 //
147 G4int itok = 0;
148 G4int ntokens = 0;
149 G4String token1, token2;
150 while (!(token1=next("\"")).isNull())
151 {
152 itok++;
153 if (itok%2 == 0 ) // even: inside a string
154 {
155 tokens[ntokens++] = token1;
156 }
157 else // not in a quoted string: finish tokenization
158 {
159 G4Tokenizer lev2(token1);
160 while (!(token2=lev2()).isNull())
161 {
162 tokens[ntokens] = token2;
163 ntokens++;
164 }
165 }
166 }
167 return ntokens;
168}

◆ G3fillParams()

void G3fillParams ( G4String tokens,
const char *  ptypes 
)

Definition at line 219 of file clparse.cc.

220{
221 //
222 // G3fillParams
223 //
224 // Interpret tokens to fill call parameters, based on parameter types ptypes
225
226 // loop over ptypes
227 //
228 G4int i =0, ipt = 0, k = 0;
229 G4int ni =0, nr = 0, nq = 0;
230 while (ptypes[i] != '\0')
231 {
232 switch (ptypes[i])
233 {
234 case 'i':
235 Ipar[ni] = atoi(tokens[ipt].data());
236 narray = Ipar[ni];
237 ni++; ipt++;
238 break;
239 case 'r':
240 Rpar[nr] = atof(tokens[ipt].data());
241 nr++; ipt++;
242 break;
243 case 's':
244 Spar[nq] = tokens[ipt];
245 nq++; ipt++;
246 break;
247 case 'I':
248 for (k=0; k < narray; k++)
249 {
250 Ipar[ni] = atoi(tokens[ipt].data());
251 ni++; ipt++;
252 }
253 break;
254 case 'R':
255 for (k=0; k < narray; k++)
256 {
257 Rpar[nr] = atof(tokens[ipt].data());
258 nr++; ipt++;
259 }
260 break;
261 case 'Q':
262 // special case of reading three successive R arrays
263 // into one (used in gsmixt)
264 //
265 narray = 3 * std::abs(narray);
266 for (k=0; k < narray; k++)
267 {
268 Rpar[nr] = atof(tokens[ipt].data());
269 nr++; ipt++;
270 }
271 break;
272 case 'S':
273 for (k=0; k < narray; k++)
274 {
275 Spar[nq] = tokens[ipt];
276 nq++; ipt++;
277 }
278 break;
279 default:
280 ofile << "unidentified ptype '" << ptypes[i] << G4endl;
281 };
282 i++;
283 }
284}
G4double Rpar[1000]
Definition: clparse.cc:67
G4int narray
Definition: clparse.cc:64
G4String Spar[1000]
Definition: clparse.cc:68
G4int Ipar[1000]
Definition: clparse.cc:66

Referenced by PG4gsatt(), PG4gsdet(), PG4gsdeta(), PG4gsdetd(), PG4gsdeth(), PG4gsdetu(), PG4gsdetv(), PG4gsdk(), PG4gsdvn(), PG4gsdvn2(), PG4gsdvt(), PG4gsdvt2(), PG4gsdvx(), PG4gsmate(), PG4gsmixt(), PG4gspart(), PG4gspos(), PG4gsposp(), PG4gsrotm(), PG4gstmed(), PG4gstpar(), and PG4gsvolu().

◆ gSeparator()

char gSeparator ( '_'  )

◆ PG4ggclos()

void PG4ggclos ( )

Definition at line 32 of file G4ggclos.cc.

32 {
33 G4ggclos();
34}
void G4ggclos()
Definition: G4ggclos.cc:36

Referenced by G3CLEval().

◆ PG4gsatt()

void PG4gsatt ( G4String tokens)

Definition at line 33 of file G4gsatt.cc.

34{
35 // fill the parameter containers
36 G3fillParams(tokens,PTgsatt);
37
38 // interpret the parameters
39 G4String name = Spar[0];
40 G4String attr = Spar[1];
41 G4int ival = Ipar[0];
42
43 G4gsatt(name, attr, ival);
44}
#define PTgsatt
Definition: G3toG4.hh:55
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
void G4gsatt(G4String, G4String, G4int)
Definition: G4gsatt.cc:46

Referenced by G3CLEval().

◆ PG4gsdet()

void PG4gsdet ( G4String tokens)

Definition at line 32 of file G4gsdet.cc.

33{
34 // fill the parameter containers
35 G3fillParams(tokens,PTgsdet);
36
37 // interpret the parameters
38 G4String chset = Spar[0];
39 G4String chdet = Spar[1];
40 G4int nv = Ipar[0];
41 G4String chnmsv[100];
42 for (G4int i=0; i<=nv; i++ ) chnmsv[i] = Spar[2+i].data();
43 G4int *nbits = &Ipar[1];
44 G4int idtyp = Ipar[1+nv];
45 G4int nwhi = Ipar[2+nv];
46 G4int nwdi = Ipar[3+nv];
47
48 G4gsdet(chset,chdet,nv,chnmsv,nbits,idtyp,nwhi,nwdi);
49}
#define PTgsdet
Definition: G3toG4.hh:69
void G4gsdet(G4String chset, G4String chdet, G4int, G4String *, G4int *, G4int idtyp, G4int nwhi, G4int nwdi)
Definition: G4gsdet.cc:51

Referenced by G3CLEval().

◆ PG4gsdeta()

void PG4gsdeta ( G4String tokens)

Definition at line 38 of file G4gsdeta.cc.

39{
40 // fill the parameter containers
41 G3fillParams(tokens,PTgsdeta);
42
43 // interpret the parameters
44 G4String chset = Spar[0];
45 G4String chdet = Spar[1];
46 G4String chali = Spar[2];
47 G4int nwhi = Ipar[0];
48 G4int nwdi = Ipar[1];
49
50 G4gsdeta(chset,chdet,chali,nwhi,nwdi);
51}
#define PTgsdeta
Definition: G3toG4.hh:71
void G4gsdeta(G4String chset, G4String chdet, G4String, G4int nwhi, G4int nwdi)
Definition: G4gsdeta.cc:53

Referenced by G3CLEval().

◆ PG4gsdetd()

void PG4gsdetd ( G4String tokens)

Definition at line 34 of file G4gsdetd.cc.

35{
36 // fill the parameter containers
37 G3fillParams(tokens,PTgsdetd);
38
39 // interpret the parameters
40 G4String chset = Spar[0];
41 G4String chdet = Spar[1];
42 G4int nd = Ipar[0];
43 G4String chnmsd[100];
44 for (G4int i=0; i<=nd; i++ ) chnmsd[i] = Spar[2+i].data();
45 G4int *nbitsd = &Ipar[1];
46
47 G4gsdetd(chset,chdet,nd,chnmsd,nbitsd);
48}
#define PTgsdetd
Definition: G3toG4.hh:73
void G4gsdetd(G4String, G4String, G4int, G4String *, G4int *)
Definition: G4gsdetd.cc:50

Referenced by G3CLEval().

◆ PG4gsdeth()

void PG4gsdeth ( G4String tokens)

Definition at line 34 of file G4gsdeth.cc.

35{
36 // fill the parameter containers
37 G3fillParams(tokens,PTgsdeth);
38
39 // interpret the parameters
40 G4String chset = Spar[0];
41 G4String chdet = Spar[1];
42 G4int nh = Ipar[0];
43 G4String chnamh[100];
44 for (G4int i=0; i<=nh; i++ ) chnamh[i] = Spar[2+i].data();
45 G4int *nbitsh = &Ipar[1];
46 G4double *orig = Rpar;
47 G4double *fact = &Rpar[nh];
48
49 G4gsdeth(chset,chdet,nh,chnamh,nbitsh,orig,fact);
50}
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
#define PTgsdeth
Definition: G3toG4.hh:72
double G4double
Definition: G4Types.hh:64
void G4gsdeth(G4String, G4String, G4int, G4String *, G4int *, G4double *, G4double *)
Definition: G4gsdeth.cc:52

Referenced by G3CLEval().

◆ PG4gsdetu()

void PG4gsdetu ( G4String tokens)

Definition at line 31 of file G4gsdetu.cc.

32{
33 // fill the parameter containers
34 G3fillParams(tokens,PTgsdetu);
35
36 // interpret the parameters
37 G4String chset = Spar[0].data();
38 G4String chdet = Spar[1].data();
39 G4int nupar = Ipar[0];
40 G4double *upar = Rpar;
41
42 G4gsdetu(chset,chdet,nupar,upar);
43}
#define PTgsdetu
Definition: G3toG4.hh:74
void G4gsdetu(G4String, G4String, G4int, G4double *)
Definition: G4gsdetu.cc:45
const char * data() const

Referenced by G3CLEval().

◆ PG4gsdetv()

void PG4gsdetv ( G4String tokens)

Definition at line 36 of file G4gsdetv.cc.

37{
38 // fill the parameter containers
39 G3fillParams(tokens,PTgsdetv);
40
41 // interpret the parameters
42 G4String chset = Spar[0];
43 G4String chdet = Spar[1];
44 G4int idtyp = Ipar[0];
45 G4int nwhi = Ipar[1];
46 G4int nwdi = Ipar[2];
47
48 G4gsdetv(chset,chdet,idtyp,nwhi,nwdi);
49}
#define PTgsdetv
Definition: G3toG4.hh:70
void G4gsdetv(G4String, G4String, G4int, G4int, G4int)
Definition: G4gsdetv.cc:51

Referenced by G3CLEval().

◆ PG4gsdk()

void PG4gsdk ( G4String tokens)

Definition at line 33 of file G4gsdk.cc.

34{
35 // fill the parameter containers
36 G3fillParams(tokens,PTgsdk);
37
38 // interpret the parameters
39 G4int ipart = Ipar[0];
40 G4int *mode = &Ipar[3];
41 G4double *bratio = Rpar;
42
43 G4gsdk(ipart,bratio,mode);
44}
#define PTgsdk
Definition: G3toG4.hh:68
void G4gsdk(G4int, G4double *, G4int *)
Definition: G4gsdk.cc:46

Referenced by G3CLEval().

◆ PG4gsdvn()

void PG4gsdvn ( G4String tokens)

Definition at line 38 of file G4gsdvn.cc.

39{
40 // fill the parameter containers
41 G3fillParams(tokens,PTgsdvn);
42
43 // interpret the parameters
44 G4String vname = Spar[0];
45 G4String vmoth = Spar[1];
46 G4int ndiv = Ipar[0];
47 G4int iaxis = Ipar[1];
48
49 G4gsdvn(vname, vmoth, ndiv, iaxis);
50}
#define PTgsdvn
Definition: G3toG4.hh:57
void G4gsdvn(G4String vname, G4String vmoth, G4int ndiv, G4int iaxis)
Definition: G4gsdvn.cc:103

Referenced by G3CLEval().

◆ PG4gsdvn2()

void PG4gsdvn2 ( G4String tokens)

Definition at line 41 of file G4gsdvn2.cc.

41 {
42 // fill the parameter containers
43 G3fillParams(tokens, PTgsdvn2);
44
45 // interpret the parameters
46 G4String vname = Spar[0];
47 G4String vmoth = Spar[1];
48 G4int ndiv = Ipar[0];
49 G4int iaxis = Ipar[1];
50 G4int numed = Ipar[2];
51 G4double c0 = Rpar[0];
52
53 G4gsdvn2(vname, vmoth, ndiv, iaxis, c0, numed);
54}
#define PTgsdvn2
Definition: G3toG4.hh:60
void G4gsdvn2(G4String vname, G4String vmoth, G4int ndiv, G4int iaxis, G4double c0, G4int numed)
Definition: G4gsdvn2.cc:56

Referenced by G3CLEval().

◆ PG4gsdvt()

void PG4gsdvt ( G4String tokens)

Definition at line 41 of file G4gsdvt.cc.

42{
43 // fill the parameter containers
44 G3fillParams(tokens,PTgsdvt);
45
46 // interpret the parameters
47 G4String vname = Spar[0];
48 G4String vmoth = Spar[1];
49 G4int iaxis = Ipar[0];
50 G4int numed = Ipar[1];
51 G4int ndvmx = Ipar[2];
52 G4double Step = Rpar[0];
53
54 G4gsdvt(vname,vmoth,Step,iaxis,numed,ndvmx);
55}
#define PTgsdvt
Definition: G3toG4.hh:58
void G4gsdvt(G4String vname, G4String vmoth, G4double step, G4int iaxis, G4int numed, G4int ndvmx)
Definition: G4gsdvt.cc:57

Referenced by G3CLEval().

◆ PG4gsdvt2()

void PG4gsdvt2 ( G4String tokens)

Definition at line 41 of file G4gsdvt2.cc.

42{
43 // fill the parameter containers
44 G3fillParams(tokens,PTgsdvt2);
45
46 // interpret the parameters
47 G4String vname = Spar[0];
48 G4String vmoth = Spar[1];
49 G4int iaxis = Ipar[0];
50 G4int numed = Ipar[1];
51 G4int ndvmx = Ipar[2];
52 G4double Step = Rpar[0];
53 G4double c0 = Rpar[1];
54
55 G4gsdvt2(vname,vmoth,Step,iaxis,c0,numed,ndvmx);
56}
#define PTgsdvt2
Definition: G3toG4.hh:61
void G4gsdvt2(G4String vname, G4String vmoth, G4double step, G4int iaxis, G4double c0, G4int numed, G4int ndvmx)
Definition: G4gsdvt2.cc:58

Referenced by G3CLEval().

◆ PG4gsdvx()

void PG4gsdvx ( G4String tokens)

Definition at line 40 of file G4gsdvx.cc.

41{
42 // fill the parameter containers
43 G3fillParams(tokens,PTgsdvx);
44
45 // interpret the parameters
46 G4String name = Spar[0];
47 G4String moth = Spar[1];
48 G4int ndiv = Ipar[0];
49 G4int iaxis = Ipar[1];
50 G4int numed = Ipar[2];
51 G4int ndvmx = Ipar[3];
52 G4double Step = Rpar[0];
53 G4double c0 = Rpar[1];
54
55 G4gsdvx(name,moth,ndiv,iaxis,Step,c0,numed,ndvmx);
56}
#define PTgsdvx
Definition: G3toG4.hh:59
void G4gsdvx(G4String name, G4String moth, G4int ndiv, G4int iaxis, G4double Step, G4double c0, G4int numed, G4int ndvmx)
Definition: G4gsdvx.cc:58

Referenced by G3CLEval().

◆ PG4gsmate()

void PG4gsmate ( G4String tokens)

Definition at line 42 of file G4gsmate.cc.

43{
44 // fill the parameter containers
45 G3fillParams(tokens,PTgsmate);
46 G4String name = Spar[0];
47 G4int imate = Ipar[0];
48 G4int nwbf = Ipar[1];
49 G4double a = Rpar[0];
50 G4double z = Rpar[1];
51 G4double dens = Rpar[2];
52 G4double radl = Rpar[3];
53 // G4double absl = Rpar[4];
54 G4double *ubuf = &Rpar[5];
55
56 G4gsmate(imate, name, a, z, dens, radl, nwbf, ubuf);
57}
#define PTgsmate
Definition: G3toG4.hh:62
void G4gsmate(G4int imate, G4String name, G4double ain, G4double zin, G4double densin, G4double, G4int, G4double *)
Definition: G4gsmate.cc:105

Referenced by G3CLEval().

◆ PG4gsmixt()

void PG4gsmixt ( G4String tokens)

Definition at line 43 of file G4gsmixt.cc.

44{
45 // fill the parameter containers
46 G3fillParams(tokens,PTgsmixt);
47
48 // interpret the parameters
49 G4String name = Spar[0].data();
50 G4int imate = Ipar[0];
51 G4int nlmat = Ipar[1];
52 //G4double dens = Rpar[0]*g/cm3;
53 G4double dens = Rpar[0];
54 G4double *a = Rpar + 1;
55 G4double *z = Rpar + 1+std::abs(nlmat);
56 G4double *wmat = Rpar + 1 + 2*std::abs(nlmat);
57/*
58 for (int i=0; i<std::abs(nlmat); i++){
59 //Rpar[i]=Rpar[i]*g/mole;
60 Rpar[i]=Rpar[i];
61 };
62*/
63 G4gsmixt(imate,name,a,z,dens,nlmat,wmat);
64}
#define PTgsmixt
Definition: G3toG4.hh:64
void G4gsmixt(G4int imate, G4String name, G4double *a, G4double *z, G4double dens, G4int nlmat, G4double *wmat)
Definition: G4gsmixt.cc:73

Referenced by G3CLEval().

◆ PG4gspart()

void PG4gspart ( G4String tokens)

Definition at line 33 of file G4gspart.cc.

34{
35 // fill the parameter containers
36 G3fillParams(tokens,PTgspart);
37
38 // interpret the parameters
39 G4String chnpar = Spar[0];
40 G4int ipart = Ipar[0];
41 G4int itrtyp = Ipar[1];
42 G4int nwb = Ipar[2];
43 G4double amass = Rpar[0];
44 G4double charge = Rpar[1];
45 G4double tlife = Rpar[2];
46 G4double *ubuf = &Rpar[3];
47
48 G4gspart(ipart,chnpar,itrtyp,amass,charge,tlife,ubuf,nwb);
49}
#define PTgspart
Definition: G3toG4.hh:67
void G4gspart(G4int, G4String, G4int, G4double, G4double, G4double, G4double *, G4int)
Definition: G4gspart.cc:51

Referenced by G3CLEval().

◆ PG4gspos()

void PG4gspos ( G4String tokens)

Definition at line 42 of file G4gspos.cc.

43{
44 // fill the parameter containers
45 G3fillParams(tokens,PTgspos);
46
47 // interpret the parameters
48 G4String name = Spar[0];
49 G4String moth = Spar[1];
50 G4String only = Spar[2];
51 G4int num = Ipar[0];
52 G4int irot = Ipar[1];
53 // all parameters are passed to G4gsxxx methods
54 // in G3 default units
55 //G4double x = Rpar[0]*cm;
56 //G4double y = Rpar[1]*cm;
57 //G4double z = Rpar[2]*cm;
58 G4double x = Rpar[0];
59 G4double y = Rpar[1];
60 G4double z = Rpar[2];
61
62 G4gspos(name, num, moth, x, y, z, irot, only);
63}
#define PTgspos
Definition: G3toG4.hh:53
void G4gspos(G4String vname, G4int num, G4String vmoth, G4double x, G4double y, G4double z, G4int irot, G4String vonly)
Definition: G4gspos.cc:65

Referenced by G3CLEval().

◆ PG4gsposp()

void PG4gsposp ( G4String tokens)

Definition at line 42 of file G4gsposp.cc.

42 {
43 // fill the parameter containers
44 G3fillParams(tokens,PTgsposp);
45
46 // interpret the parameters
47 G4String name = Spar[0];
48 G4String moth = Spar[1];
49 G4String only = Spar[2];
50 G4int num = Ipar[0];
51 G4int irot = Ipar[1];
52 G4int npar = Ipar[2];
53 // all parameters are passed to G4gsxxx methods
54 // in G3 default units
55 //G4double x = Rpar[0]*cm;
56 //G4double y = Rpar[1]*cm;
57 //G4double z = Rpar[2]*cm;
58 G4double x = Rpar[0];
59 G4double y = Rpar[1];
60 G4double z = Rpar[2];
61 G4double *pars = &Rpar[3];
62
63 G4gsposp(name, num, moth, x, y, z, irot, only, pars, npar);
64}
#define PTgsposp
Definition: G3toG4.hh:54
void G4gsposp(G4String vname, G4int num, G4String vmoth, G4double x, G4double y, G4double z, G4int irot, G4String vonly, G4double pars[], G4int npar)
Definition: G4gsposp.cc:297

Referenced by G3CLEval().

◆ PG4gsrotm()

void PG4gsrotm ( G4String tokens)

Definition at line 35 of file G4gsrotm.cc.

36{
37 // fill the parameter containers
38 G3fillParams(tokens,PTgsrotm);
39
40 // interpret the parameters
41 G4int irot = Ipar[0];
42
43 // the angles in Geant are in degrees
44 G4double theta1 = Rpar[0];
45 G4double phi1 = Rpar[1];
46 G4double theta2 = Rpar[2];
47 G4double phi2 = Rpar[3];
48 G4double theta3 = Rpar[4];
49 G4double phi3 = Rpar[5];
50
51 G4gsrotm(irot, theta1,phi1, theta2,phi2, theta3,phi3);
52}
#define PTgsrotm
Definition: G3toG4.hh:56
void G4gsrotm(G4int irot, G4double theta1, G4double phi1, G4double theta2, G4double phi2, G4double theta3, G4double phi3)
Definition: G4gsrotm.cc:54

Referenced by G3CLEval().

◆ PG4gstmed()

void PG4gstmed ( G4String tokens)

Definition at line 44 of file G4gstmed.cc.

45{
46 // fill the parameter containers
47 G3fillParams(tokens,PTgstmed);
48
49 // interpret the parameters
50 G4String name = Spar[0];
51 G4int itmed = Ipar[0];
52 G4int nmat = Ipar[1];
53 G4int isvol = Ipar[2];
54 G4int ifield = Ipar[3];
55 G4int nwbuf = Ipar[4];
56 G4double fieldm = Rpar[0];
57 G4double tmaxfd = Rpar[1];
58 G4double stemax = Rpar[2];
59 G4double deemax = Rpar[3];
60 G4double epsil = Rpar[4];
61 G4double stmin = Rpar[5];
62 G4double *ubuf = &Rpar[6];
63
64 G4gstmed(itmed,name,nmat,isvol,ifield,fieldm,tmaxfd,stemax,
65 deemax,epsil,stmin,ubuf,nwbuf);
66}
#define PTgstmed
Definition: G3toG4.hh:65
void G4gstmed(G4int itmed, G4String, G4int nmat, G4int isvol, G4int, G4double, G4double, G4double stemax, G4double, G4double, G4double, G4double *, G4int useG3TMLimits)
Definition: G4gstmed.cc:68

Referenced by G3CLEval().

◆ PG4gstpar()

void PG4gstpar ( G4String tokens)

Definition at line 32 of file G4gstpar.cc.

33{
34 // fill the parameter containers
35 G3fillParams(tokens,PTgstpar);
36
37 // interpret the parameters
38 G4String chpar = Spar[0];
39 G4int itmed = Ipar[0];
40 G4double parval = Rpar[0];
41
42 G4gstpar(itmed,chpar,parval);
43}
#define PTgstpar
Definition: G3toG4.hh:66
void G4gstpar(G4int, G4String, G4double)
Definition: G4gstpar.cc:45

Referenced by G3CLEval().

◆ PG4gsvolu()

void PG4gsvolu ( G4String tokens)

Definition at line 37 of file G4gsvolu.cc.

37 {
38 // fill the parameter containers
39 G3fillParams(tokens,PTgsvolu);
40
41 // interpret the parameters
42 G4String vname = Spar[0];
43 G4String shape = Spar[1];
44 G4int nmed = Ipar[0];
45 G4int npar = Ipar[1];
46 G4double *pars = Rpar;
47
48 G4gsvolu(vname, shape, nmed, pars, npar);
49}
#define PTgsvolu
Definition: G3toG4.hh:52
void G4gsvolu(G4String vname, G4String shape, G4int nmed, G4double *rpar, G4int npar)
Definition: G4gsvolu.cc:73

Referenced by G3CLEval().

Variable Documentation

◆ G3Det

G3DetTable G3Det

Definition at line 59 of file clparse.cc.

Referenced by G4BuildGeom(), and G4gsdeta().

◆ G3Ele

G3EleTable G3Ele

Definition at line 60 of file clparse.cc.

Referenced by G4gsmate(), and G4gsmixt().

◆ G3Mat

G3MatTable G3Mat

Definition at line 55 of file clparse.cc.

Referenced by G4gsmate(), G4gsmixt(), and G4gstmed().

◆ G3Med

G3MedTable G3Med

Definition at line 56 of file clparse.cc.

Referenced by G3toG4BuildLVTree(), and G4gstmed().

◆ G3Part

G3PartTable G3Part

Definition at line 58 of file clparse.cc.

Referenced by G4BuildGeom().

◆ G3Rot

G3RotTable G3Rot

Definition at line 57 of file clparse.cc.

Referenced by G3toG4BuildPVTree(), G4gsrotm(), and GetTransform3D().

◆ G3SensVol

G3SensVolVector G3SensVol

Definition at line 61 of file clparse.cc.

Referenced by G3toG4BuildLVTree().

◆ G3Vol

◆ Ipar

◆ narray

G4int narray

Definition at line 64 of file clparse.cc.

Referenced by G3fillParams().

◆ ofile

◆ Rpar

◆ Spar