Geant4 11.1.1
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 168 of file clparse.cc.

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

◆ G3CLRead()

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

Definition at line 98 of file clparse.cc.

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

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 132 of file clparse.cc.

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

◆ G3fillParams()

void G3fillParams ( G4String tokens,
const char *  ptypes 
)

Definition at line 216 of file clparse.cc.

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

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 31 of file G4ggclos.cc.

31 {
32 G4ggclos();
33}
void G4ggclos()
Definition: G4ggclos.cc:35

Referenced by G3CLEval().

◆ PG4gsatt()

void PG4gsatt ( G4String tokens)

Definition at line 32 of file G4gsatt.cc.

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

Referenced by G3CLEval().

◆ PG4gsdet()

void PG4gsdet ( G4String tokens)

Definition at line 31 of file G4gsdet.cc.

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

Referenced by G3CLEval().

◆ PG4gsdeta()

void PG4gsdeta ( G4String tokens)

Definition at line 37 of file G4gsdeta.cc.

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

Referenced by G3CLEval().

◆ PG4gsdetd()

void PG4gsdetd ( G4String tokens)

Definition at line 33 of file G4gsdetd.cc.

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

Referenced by G3CLEval().

◆ PG4gsdeth()

void PG4gsdeth ( G4String tokens)

Definition at line 33 of file G4gsdeth.cc.

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

Referenced by G3CLEval().

◆ PG4gsdetu()

void PG4gsdetu ( G4String tokens)

Definition at line 30 of file G4gsdetu.cc.

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

Referenced by G3CLEval().

◆ PG4gsdetv()

void PG4gsdetv ( G4String tokens)

Definition at line 35 of file G4gsdetv.cc.

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

Referenced by G3CLEval().

◆ PG4gsdk()

void PG4gsdk ( G4String tokens)

Definition at line 32 of file G4gsdk.cc.

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

Referenced by G3CLEval().

◆ PG4gsdvn()

void PG4gsdvn ( G4String tokens)

Definition at line 37 of file G4gsdvn.cc.

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

Referenced by G3CLEval().

◆ PG4gsdvn2()

void PG4gsdvn2 ( G4String tokens)

Definition at line 40 of file G4gsdvn2.cc.

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

Referenced by G3CLEval().

◆ PG4gsdvt()

void PG4gsdvt ( G4String tokens)

Definition at line 40 of file G4gsdvt.cc.

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

Referenced by G3CLEval().

◆ PG4gsdvt2()

void PG4gsdvt2 ( G4String tokens)

Definition at line 40 of file G4gsdvt2.cc.

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

Referenced by G3CLEval().

◆ PG4gsdvx()

void PG4gsdvx ( G4String tokens)

Definition at line 39 of file G4gsdvx.cc.

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

Referenced by G3CLEval().

◆ PG4gsmate()

void PG4gsmate ( G4String tokens)

Definition at line 41 of file G4gsmate.cc.

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

Referenced by G3CLEval().

◆ PG4gsmixt()

void PG4gsmixt ( G4String tokens)

Definition at line 42 of file G4gsmixt.cc.

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

Referenced by G3CLEval().

◆ PG4gspart()

void PG4gspart ( G4String tokens)

Definition at line 32 of file G4gspart.cc.

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

Referenced by G3CLEval().

◆ PG4gspos()

void PG4gspos ( G4String tokens)

Definition at line 41 of file G4gspos.cc.

42{
43 // fill the parameter containers
44 G3fillParams(tokens,PTgspos);
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 // all parameters are passed to G4gsxxx methods
53 // in G3 default units
54 //G4double x = Rpar[0]*cm;
55 //G4double y = Rpar[1]*cm;
56 //G4double z = Rpar[2]*cm;
57 G4double x = Rpar[0];
58 G4double y = Rpar[1];
59 G4double z = Rpar[2];
60
61 G4gspos(name, num, moth, x, y, z, irot, only);
62}
#define PTgspos
Definition: G3toG4.hh:52
void G4gspos(G4String vname, G4int num, G4String vmoth, G4double x, G4double y, G4double z, G4int irot, G4String vonly)
Definition: G4gspos.cc:64

Referenced by G3CLEval().

◆ PG4gsposp()

void PG4gsposp ( G4String tokens)

Definition at line 41 of file G4gsposp.cc.

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

Referenced by G3CLEval().

◆ PG4gsrotm()

void PG4gsrotm ( G4String tokens)

Definition at line 34 of file G4gsrotm.cc.

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

Referenced by G3CLEval().

◆ PG4gstmed()

void PG4gstmed ( G4String tokens)

Definition at line 43 of file G4gstmed.cc.

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

Referenced by G3CLEval().

◆ PG4gstpar()

void PG4gstpar ( G4String tokens)

Definition at line 31 of file G4gstpar.cc.

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

Referenced by G3CLEval().

◆ PG4gsvolu()

void PG4gsvolu ( G4String tokens)

Definition at line 36 of file G4gsvolu.cc.

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

Referenced by G3CLEval().

Variable Documentation

◆ G3Det

G3DetTable G3Det

Definition at line 58 of file clparse.cc.

Referenced by G4BuildGeom(), and G4gsdeta().

◆ G3Ele

G3EleTable G3Ele

Definition at line 59 of file clparse.cc.

Referenced by G4gsmate(), and G4gsmixt().

◆ G3Mat

G3MatTable G3Mat

Definition at line 54 of file clparse.cc.

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

◆ G3Med

G3MedTable G3Med

Definition at line 55 of file clparse.cc.

Referenced by G3toG4BuildLVTree(), and G4gstmed().

◆ G3Part

G3PartTable G3Part

Definition at line 57 of file clparse.cc.

Referenced by G4BuildGeom().

◆ G3Rot

G3RotTable G3Rot

Definition at line 56 of file clparse.cc.

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

◆ G3SensVol

G3SensVolVector G3SensVol

Definition at line 60 of file clparse.cc.

Referenced by G3toG4BuildLVTree().

◆ G3Vol

◆ Ipar

◆ narray

G4int narray

Definition at line 63 of file clparse.cc.

Referenced by G3fillParams().

◆ ofile

◆ Rpar

◆ Spar