Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4gstmed.cc File Reference
#include "G4SystemOfUnits.hh"
#include "G4LogicalVolume.hh"
#include "G3toG4.hh"
#include "G3MatTable.hh"
#include "G3MedTable.hh"
#include "G4UserLimits.hh"
#include "G4MagneticField.hh"
#include "G4Material.hh"
Include dependency graph for G4gstmed.cc:

Go to the source code of this file.

Functions

void PG4gstmed (G4String *tokens)
 
void G4gstmed (G4int itmed, G4String, G4int nmat, G4int isvol, G4int, G4double, G4double, G4double stemax, G4double, G4double, G4double, G4double *, G4int useG3TMLimits)
 

Function Documentation

void G4gstmed ( G4int  itmed,
G4String  ,
G4int  nmat,
G4int  isvol,
G4int  ,
G4double  ,
G4double  ,
G4double  stemax,
G4double  ,
G4double  ,
G4double  ,
G4double ,
G4int  useG3TMLimits 
)

Definition at line 68 of file G4gstmed.cc.

72 {
73  // get the pointer to material nmat
74  G4Material* material = G3Mat.get(nmat);
75 
76  // NB. there is the possibility for redundancy in the mag field
77  // and user limits objects. Who cares.
78  // Generate the mag field object
79  // $$$ G4MagneticField* field = new G4MagneticField(ifield, fieldm, tmaxfd);
80  G4MagneticField* field = 0;
81 
82  // Generate the user limits object
83  // !!! only "stemax" has its equivalent in G4
84 
85  G4UserLimits* limits = 0;
86  if (useG3TMLimits) {
87  limits = new G4UserLimits();
88  limits->SetMaxAllowedStep(stemax*cm);
89  // limits->SetG3DefaultCuts();
90  // this is arranged globally by physics manager
91  }
92 
93  // Store this medium in the G3Med structure
94  G3Med.put(itmed, material, field, limits, isvol);
95 }
virtual void SetMaxAllowedStep(G4double ustepMax)
G3G4DLL_API G3MedTable G3Med
Definition: clparse.cc:56
G3G4DLL_API G3MatTable G3Mat
Definition: clparse.cc:55
G4Material * get(G4int id) const
Definition: G3MatTable.cc:44
static constexpr double cm
Definition: G4SIunits.hh:119
void put(G4int id, G4Material *material, G4MagneticField *field, G4UserLimits *limits, G4int isvol)
Definition: G3MedTable.cc:53

Here is the call graph for this function:

Here is the caller graph for this function:

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 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
const XML_Char * name
Definition: expat.h:151
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
#define PTgstmed
Definition: G3toG4.hh:65
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
void G4gstmed(G4int itmed, G4String name, G4int nmat, G4int isvol, G4int ifield, G4double fieldm, G4double tmaxfd, G4double stemax, G4double deemax, G4double epsil, G4double stmin, G4double *par, G4int npar)
Definition: G4gstmed.cc:68
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function: