Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G3toG4.hh File Reference
#include "G3toG4Defs.hh"
#include "globals.hh"
#include "G3G4Interface.hh"

Go to the source code of this file.

Macros

#define PTgsvolu   "ssiiR"
 
#define PTgspos   "sisrrris"
 
#define PTgsposp   "sisrrrisiR"
 
#define PTgsatt   "ssi"
 
#define PTgsrotm   "irrrrrr"
 
#define PTgsdvn   "ssii"
 
#define PTgsdvt   "ssriii"
 
#define PTgsdvx   "ssiirrii"
 
#define PTgsdvn2   "ssiiri"
 
#define PTgsdvt2   "ssririi"
 
#define PTgsmate   "isrrrriR"
 
#define PTgsmixt   "isriQ"
 
#define PTgstmed   "isiiirrrrrriR"
 
#define PTgstpar   "isr"
 
#define PTgspart   "isirrriR"
 
#define PTgsdk   "iiRI"
 
#define PTgsdet   "ssiSIiii"
 
#define PTgsdetv   "ssiii"
 
#define PTgsdeta   "sssii"
 
#define PTgsdeth   "ssiSIRR"
 
#define PTgsdetd   "ssiSI"
 
#define PTgsdetu   "ssiR"
 

Functions

void G3fillParams (G4String *tokens, const char *ptypes)
 

Variables

G3G4DLL_API char gSeparator
 
G3G4DLL_API G4int Ipar [1000]
 
G3G4DLL_API G4double Rpar [1000]
 
G3G4DLL_API G4String Spar [1000]
 

Macro Definition Documentation

◆ PTgsatt

#define PTgsatt   "ssi"

Definition at line 54 of file G3toG4.hh.

◆ PTgsdet

#define PTgsdet   "ssiSIiii"

Definition at line 68 of file G3toG4.hh.

◆ PTgsdeta

#define PTgsdeta   "sssii"

Definition at line 70 of file G3toG4.hh.

◆ PTgsdetd

#define PTgsdetd   "ssiSI"

Definition at line 72 of file G3toG4.hh.

◆ PTgsdeth

#define PTgsdeth   "ssiSIRR"

Definition at line 71 of file G3toG4.hh.

◆ PTgsdetu

#define PTgsdetu   "ssiR"

Definition at line 73 of file G3toG4.hh.

◆ PTgsdetv

#define PTgsdetv   "ssiii"

Definition at line 69 of file G3toG4.hh.

◆ PTgsdk

#define PTgsdk   "iiRI"

Definition at line 67 of file G3toG4.hh.

◆ PTgsdvn

#define PTgsdvn   "ssii"

Definition at line 56 of file G3toG4.hh.

◆ PTgsdvn2

#define PTgsdvn2   "ssiiri"

Definition at line 59 of file G3toG4.hh.

◆ PTgsdvt

#define PTgsdvt   "ssriii"

Definition at line 57 of file G3toG4.hh.

◆ PTgsdvt2

#define PTgsdvt2   "ssririi"

Definition at line 60 of file G3toG4.hh.

◆ PTgsdvx

#define PTgsdvx   "ssiirrii"

Definition at line 58 of file G3toG4.hh.

◆ PTgsmate

#define PTgsmate   "isrrrriR"

Definition at line 61 of file G3toG4.hh.

◆ PTgsmixt

#define PTgsmixt   "isriQ"

Definition at line 63 of file G3toG4.hh.

◆ PTgspart

#define PTgspart   "isirrriR"

Definition at line 66 of file G3toG4.hh.

◆ PTgspos

#define PTgspos   "sisrrris"

Definition at line 52 of file G3toG4.hh.

◆ PTgsposp

#define PTgsposp   "sisrrrisiR"

Definition at line 53 of file G3toG4.hh.

◆ PTgsrotm

#define PTgsrotm   "irrrrrr"

Definition at line 55 of file G3toG4.hh.

◆ PTgstmed

#define PTgstmed   "isiiirrrrrriR"

Definition at line 64 of file G3toG4.hh.

◆ PTgstpar

#define PTgstpar   "isr"

Definition at line 65 of file G3toG4.hh.

◆ PTgsvolu

#define PTgsvolu   "ssiiR"

Definition at line 51 of file G3toG4.hh.

Function Documentation

◆ 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}
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4double Rpar[1000]
Definition: clparse.cc:66
G4int narray
Definition: clparse.cc:63
G4String Spar[1000]
Definition: clparse.cc:67
std::ofstream ofile
Definition: clparse.cc:44
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().

Variable Documentation

◆ gSeparator

◆ Ipar

◆ Rpar

◆ Spar