G3G4Interface.hh File Reference

#include "globals.hh"

Go to the source code of this file.

Defines

#define G3G4INTERFACE_HH   1

Functions

void G4gsvolu (G4String name, G4String shape, G4int nmed, G4double *par, G4int npar)
void G4gspos (G4String name, G4int num, G4String moth, G4double x, G4double y, G4double z, G4int irot, G4String only)
void G4gsposp (G4String name, G4int num, G4String moth, G4double x, G4double y, G4double z, G4int irot, G4String only, G4double Rpar[], G4int npar)
void G4gsbool (G4String volName, G4String manyVolName)
void G4gsrotm (G4int irot, G4double theta1, G4double phi1, G4double theta2, G4double phi2, G4double theta3, G4double phi3)
void G4gsatt (G4String name, G4String attr, G4int ival)
void G4gsdvn (G4String vname, G4String vmoth, G4int ndiv, G4int iaxis)
void G4gsdvt (G4String name, G4String moth, G4double Step, G4int iaxis, G4int numed, G4int ndvmx)
void G4gsdvx (G4String name, G4String moth, G4int ndiv, G4int iaxis, G4double Step, G4double c0, G4int numed, G4int ndvmx)
void G4gsdvn2 (G4String name, G4String moth, G4int ndiv, G4int iaxis, G4double c0, G4int numed)
void G4gsdvt2 (G4String name, G4String moth, G4double Step, G4int iaxis, G4double c0, G4int numed, G4int ndvmx)
void G4gsmate (G4int imate, G4String name, G4double a, G4double z, G4double dens, G4double radl, G4int nwbf, G4double *ubuf)
void G4gsmixt (G4int imate, G4String name, G4double a[], G4double *z, G4double dens, G4int nlmat, G4double *wmat)
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)
void G4gstpar (G4int itmed, G4String chpar, G4double parval)
void G4gspart (G4int ipart, G4String chnpar, G4int itrtyp, G4double amass, G4double charge, G4double tlife, G4double *ubuf, G4int nwb)
void G4gsdk (G4int ipart, G4double *bratio, G4int *mode)
void G4gsdet (G4String chset, G4String chdet, G4int nv, G4String *chnmsv, G4int *nbitsv, G4int idtyp, G4int nwhi, G4int nwdi)
void G4gsdetv (G4String chset, G4String chdet, G4int idtyp, G4int nwhi, G4int nwdi)
void G4gsdeta (G4String chset, G4String chdet, G4String chali, G4int nwhi, G4int nwdi)
void G4gsdeth (G4String chset, G4String chdet, G4int nh, G4String *chnamh, G4int *nbitsh, G4double *orig, G4double *fact)
void G4gsdetd (G4String chset, G4String chdet, G4int nd, G4String *chnmsd, G4int *nbitsd)
void G4gsdetu (G4String chset, G4String chdet, G4int nupar, G4double *upar)
void G4ggclos ()
G4LogicalVolumeG4BuildGeom (G4String &inFile)


Define Documentation

#define G3G4INTERFACE_HH   1

Definition at line 33 of file G3G4Interface.hh.


Function Documentation

G4LogicalVolume* G4BuildGeom ( G4String inFile  ) 

Definition at line 55 of file G4BuildGeom.cc.

References checkVol(), G3CLRead(), G3Det, G3Part, G3toG4BuildTree(), G3Vol, G4cout, G4endl, G4gsrotm(), G3VolTable::GetFirstVTE(), G3VolTableEntry::GetLV(), G3VolTableEntry::GetName(), G4LogicalVolume::GetName(), G4LogicalVolume::GetVisAttributes(), G4VisAttributes::Invisible, G3PartTable::PrintAll(), G3DetTable::PrintAll(), G3VolTable::PrintAll(), and G4LogicalVolume::SetVisAttributes().

00055                                               {
00056 
00057   G4int irot=0;
00058   G4gsrotm(0, 90, 0, 90, 90, 0, 0);
00059 
00060   G4cout << "Instantiated unit rotation matrix irot=" << irot << G4endl;
00061  
00062   // Read the call List and interpret to Generate Geant4 geometry
00063 
00064   G4cout << "Reading the call List file " << inFile << "..." << G4endl;
00065 
00066   G3CLRead(inFile, 0);
00067 
00068   G3Part.PrintAll();
00069 
00070   G3Det.PrintAll();
00071 
00072   G3Vol.PrintAll();
00073 
00074   G4cout << "Call List file read completed. Build geometry" << G4endl;
00075 
00076   // Build the geometry
00077 
00078   G3VolTableEntry* topVTE = G3Vol.GetFirstVTE();
00079   G4cout << "G3toG4 top level volume is " << topVTE->GetName() << G4endl;
00080 
00081   // modified
00082   G3toG4BuildTree(topVTE, 0);
00083 
00084   // Retrieve the top-level G3toG4 logical mother volume pointer
00085 
00086   G4LogicalVolume* topLV = topVTE->GetLV();
00087 
00088   // position the top logical volume
00089   // (in Geant3 the top volume is not positioned)
00090   // 
00091   new G4PVPlacement(0, G4ThreeVector(), topLV->GetName(), topLV, 0, false, 0);
00092 
00093   // mark as invisible
00094 
00095   topLV->SetVisAttributes(G4VisAttributes::Invisible);
00096     
00097   G4cout << "Top-level G3toG4 logical volume " << topLV->GetName() << " "
00098          << *(topLV->GetVisAttributes()) << G4endl;
00099         
00100         // check the geometry here
00101 
00102   #ifdef G3G4DEBUG
00103     G4cout << "scan through G4LogicalVolumeStore:" << G4endl;
00104     checkVol();
00105   #endif
00106 
00107   return topLV;
00108 }

void G4ggclos (  ) 

Definition at line 36 of file G4ggclos.cc.

References G3Vol, G4cout, G4endl, and G3VolTable::SetFirstVTE().

Referenced by PG4ggclos().

00036                {
00037   G4cout << "G4ggclos: setting top-level VolTableEntry" << G4endl;
00038   G3Vol.SetFirstVTE();
00039 }

void G4gsatt ( G4String  name,
G4String  attr,
G4int  ival 
)

Definition at line 46 of file G4gsatt.cc.

References G4cerr, and G4endl.

Referenced by PG4gsatt().

00047 {
00048     // get logical volume pointer
00049     // G4LogicalVolume *lvol = G3Vol.GetVTE(name)->GetLV();
00050     G4cerr << "G4gsatt not implemented" << G4endl;
00051 }

void G4gsbool ( G4String  volName,
G4String  manyVolName 
)

Definition at line 35 of file G4gsbool.cc.

References G3VolTableEntry::AddOverlap(), FatalException, G3Vol, G4cerr, G4endl, G4Exception(), and G3VolTable::GetVTE().

00036 {
00037   // find VTEs
00038   G3VolTableEntry* vte = G3Vol.GetVTE(volName);
00039   G3VolTableEntry* manyVTE = G3Vol.GetVTE(manyVolName);
00040 
00041   if (vte == 0) {
00042     G4String text = "G4gsbool: '" + volName + "' has no VolTableEntry";
00043     G4Exception("G4gsbool()", "G3toG40012", FatalException, text);
00044     return;
00045   } 
00046   else if (manyVTE == 0) {
00047     // warning
00048     G4cerr << "G4gsbool: '" << manyVolName << "' has no VolTableEntry." 
00049            << G4endl
00050            << "          Specified overlap will be ignored."
00051            << G4endl;
00052     return;        
00053   } 
00054   else { 
00055     manyVTE->AddOverlap(vte);
00056   }   
00057 }

void G4gsdet ( G4String  chset,
G4String  chdet,
G4int  nv,
G4String chnmsv,
G4int nbitsv,
G4int  idtyp,
G4int  nwhi,
G4int  nwdi 
)

Definition at line 51 of file G4gsdet.cc.

References G4gsdetv().

Referenced by PG4gsdet().

00053 { 
00054     G4gsdetv(chset, chdet, idtyp, nwhi, nwdi);
00055 }

void G4gsdeta ( G4String  chset,
G4String  chdet,
G4String  chali,
G4int  nwhi,
G4int  nwdi 
)

Definition at line 53 of file G4gsdeta.cc.

References G3Det, G4gsdetv(), and G3DetTable::GetID().

Referenced by PG4gsdeta().

00055 {
00056     G4int idtyp = G3Det.GetID(chset, chdet);
00057     // just associate another sensitive detector structure with
00058     // the volume chdet
00059     G4gsdetv(chset, chdet, idtyp, nwhi, nwdi);
00060 }

void G4gsdetd ( G4String  chset,
G4String  chdet,
G4int  nd,
G4String chnmsd,
G4int nbitsd 
)

Definition at line 50 of file G4gsdetd.cc.

Referenced by PG4gsdetd().

00051 {
00052     // Get pointer to detector chset
00053     // G4VSensitiveDetector* sdet = G3Det.GetSD(chset, chdet);
00054     // Add hits to sensitive detector
00055     // for (G4int i=0; i<nd; i++) {
00056       // $$$        sdet->AddDigi(chnmsd[i],nbitsd[i]);
00057     // }
00058 }

void G4gsdeth ( G4String  chset,
G4String  chdet,
G4int  nh,
G4String chnamh,
G4int nbitsh,
G4double orig,
G4double fact 
)

Definition at line 52 of file G4gsdeth.cc.

Referenced by PG4gsdeth().

00054 {
00055     // Get pointer to sensitive detector chset
00056     // G4VSensitiveDetector* sdet = G3Det.GetSD(chset, chdet);
00057     // Add hits to sensitive detector
00058     // for (G4int i=0; i<nh; i++) {
00059       // $$$        sdet->AddHit(chnamh[i],nbitsh[i],orig[i],fact[i]);
00060     // }
00061 }

void G4gsdetu ( G4String  chset,
G4String  chdet,
G4int  nupar,
G4double upar 
)

Definition at line 45 of file G4gsdetu.cc.

Referenced by PG4gsdetu().

00046 {
00047     // $$$ nothing right now
00048 }

void G4gsdetv ( G4String  chset,
G4String  chdet,
G4int  idtyp,
G4int  nwhi,
G4int  nwdi 
)

Definition at line 51 of file G4gsdetv.cc.

References G4cout, and G4endl.

Referenced by G4gsdet(), G4gsdeta(), and PG4gsdetv().

00052 {  
00053   G4cout << "G4gsdetv not currently implemented." << G4endl;
00054   /*
00055     // get lvol for detector chdet
00056     G4LogicalVolume *lvol = G3Vol.GetLV(chdet);
00057     if (lvol == 0) {
00058     G4cout << "G4gsdetv: Logical volume " << chdet << " not available. Skip." << G4endl;
00059     return;
00060     }
00061     // Generate a sensitive detector structure
00062     // G4VSensitiveDetector *sdet;
00063     // $$$    G4VSensitiveDetector *sdet = new G4VSensitiveDetector(chset);
00064     // inform the logical volume of its sensitive detector
00065     // lvol->SetSensitiveDetector(sdet);
00066     // $$$ sdet->SetID(idtyp);
00067     // Add the sensitive detector to the table
00068     // G3Det.put(chset,idtyp,sdet);
00069     */
00070 }

void G4gsdk ( G4int  ipart,
G4double bratio,
G4int mode 
)

Definition at line 46 of file G4gsdk.cc.

Referenced by PG4gsdk().

00047 {
00048 /*
00049     // create decay object for the particle
00050     G4Decay *decay = new G4Decay();
00051     // add decay modes
00052     for (G4int i=0; i<6; i++) {
00053         if (mode[i] != 0) {
00054 // $$$            decay->AddMode(mode[i],bratio[i]);
00055         }
00056     }
00057     // associate decay object with particle ipart
00058     G4ParticleDefinition *part = G3Part.Get(ipart);
00059 // $$$    part->SetDecay(decay);
00060 */
00061 }

void G4gsdvn ( G4String  vname,
G4String  vmoth,
G4int  ndiv,
G4int  iaxis 
)

Definition at line 103 of file G4gsdvn.cc.

References FatalException, G3Vol, G4CreateCloneVTEWithDivision(), G4Exception(), G3VolTable::GetVTE(), and kDvn.

Referenced by PG4gsdvn().

00104 {
00105   // find mother VTE
00106   G3VolTableEntry* mvte = G3Vol.GetVTE(vmoth);
00107  
00108   if (mvte == 0) {
00109     G4String text = "G4gsdvn:'" + vmoth + "' has no VolTableEntry";
00110     G4Exception("G4gsdvn()", "G3toG40013", FatalException, text);
00111     return;
00112   }  
00113   else {
00114     // a new vte clone copy with division is created
00115     // for each mother (clone copy)
00116     
00117     G4CreateCloneVTEWithDivision(vname, mvte, kDvn, ndiv, iaxis, 0, 0., 0.); 
00118   }  
00119 }

void G4gsdvn2 ( G4String  name,
G4String  moth,
G4int  ndiv,
G4int  iaxis,
G4double  c0,
G4int  numed 
)

Definition at line 56 of file G4gsdvn2.cc.

Referenced by G4gsdvx(), and PG4gsdvn2().

00058 {
00059   // find mother VTE
00060   G3VolTableEntry* mvte = G3Vol.GetVTE(vmoth);
00061   if (mvte == 0) {
00062     G4String text = "G4gsdvn2:'" + vmoth + "' has no VolTableEntry";
00063     G4Exception("G4gsdvn2()", "G3toG40025", FatalException, text);
00064     return;
00065   }    
00066   else {
00067     // a new vte clone copy with division is created
00068     // for each mother (clone copy)
00069     
00070     G4CreateCloneVTEWithDivision(vname, mvte, 
00071                                   kDvn2, ndiv, iaxis, numed, c0, 0.); 
00072   }  
00073 }

void G4gsdvt ( G4String  name,
G4String  moth,
G4double  Step,
G4int  iaxis,
G4int  numed,
G4int  ndvmx 
)

Definition at line 57 of file G4gsdvt.cc.

References FatalException, G3Vol, G4CreateCloneVTEWithDivision(), G4Exception(), G3VolTable::GetVTE(), and kDvt.

Referenced by PG4gsdvt().

00059 {
00060   // find mother VTE
00061   G3VolTableEntry* mvte = G3Vol.GetVTE(vmoth);
00062   if (mvte == 0) {
00063     G4String text = "G4gsdvt:'" + vmoth + "' has no VolTableEntry";
00064     G4Exception("G4gsdvt()", "G3toG40014", FatalException, text);
00065     return;
00066   }    
00067   else {
00068     // a new vte clone copy with division is created
00069     // for each mother (clone copy)
00070     
00071     G4CreateCloneVTEWithDivision(vname, mvte, 
00072                                   kDvt, ndvmx, iaxis, numed, 0., step); 
00073   }  
00074 }

void G4gsdvt2 ( G4String  name,
G4String  moth,
G4double  Step,
G4int  iaxis,
G4double  c0,
G4int  numed,
G4int  ndvmx 
)

Definition at line 58 of file G4gsdvt2.cc.

Referenced by G4gsdvx(), and PG4gsdvt2().

00060 {
00061   // find mother VTE
00062   G3VolTableEntry* mvte = G3Vol.GetVTE(vmoth);
00063   if (mvte == 0) {
00064     G4String text = "G4gsdvt2:'" + vmoth + "' has no VolTableEntry";
00065     G4Exception("G4gsdvt2()", "G3toG40015", FatalException, text);
00066     return;
00067   }    
00068   else {
00069     // a new vte clone copy with division is created
00070     // for each mother (clone copy)
00071     
00072     G4CreateCloneVTEWithDivision(vname, mvte, 
00073                                   kDvt2, ndvmx, iaxis, numed, c0, step); 
00074   }  
00075 }

void G4gsdvx ( G4String  name,
G4String  moth,
G4int  ndiv,
G4int  iaxis,
G4double  Step,
G4double  c0,
G4int  numed,
G4int  ndvmx 
)

Definition at line 58 of file G4gsdvx.cc.

References G4gsdvn2(), and G4gsdvt2().

Referenced by PG4gsdvx().

00060 {
00061     // pass to gsdvn2 or gsdvt2
00062     if (Step > 0.) {
00063         G4gsdvt2(name,moth,Step,iaxis,c0,numed,ndvmx);
00064     } else if (ndiv > 0) {
00065         G4gsdvn2(name,moth,ndiv,iaxis,c0,numed);
00066     }
00067 }

void G4gsmate ( G4int  imate,
G4String  name,
G4double  a,
G4double  z,
G4double  dens,
G4double  radl,
G4int  nwbf,
G4double ubuf 
)

Definition at line 105 of file G4gsmate.cc.

References G4Material::AddElement(), G4String::both, G3Ele, G3Mat, G4gsmixt(), G3EleTable::GetEle(), kStateGas, CLHEP::detail::n, pascal, G3MatTable::put(), and G4String::strip().

Referenced by PG4gsmate().

00107 {
00108   G4double G3_minimum_density = 1.e-10*g/cm3;
00109 
00110   // add units
00111   G4double z = zin;    
00112   G4double a = ain*g/mole;
00113   G4double dens = densin*g/cm3;
00114 
00115   G4Material* material=0;
00116   
00117   G4String sname = name.strip(G4String::both);
00118   if (sname == "AIR") {
00119     // handle the built in AIR mixture
00120     G4double aa[2], zz[2], wmat[2];
00121     aa[0] = 14.01*g/mole;
00122     aa[1] = 16.00*g/mole;
00123     zz[0] = 7;
00124     zz[1] = 8;
00125     wmat[0] = 0.7;
00126     wmat[1] = 0.3;
00127     // G4double theDensity = 1.2931*mg/cm3;
00128     G4double theDensity = 0.0012931;
00129     G4int n=2;
00130     G4gsmixt(imate, sname, aa, zz, theDensity, n, wmat);
00131   } 
00132   else if ( z<1 || dens < G3_minimum_density ) {
00133     // define vacuum according to definition from N03 example
00134     G4double density     = universe_mean_density;    //from PhysicalConstants.h
00135     G4double pressure    = 3.e-18*pascal;
00136     G4double temperature = 2.73*kelvin;
00137     material = new G4Material(name, z=1., a=1.01*g/mole, density,
00138                     kStateGas,temperature,pressure);
00139   }
00140   else {
00141     //G4Element* element = CreateElement(z, a, name);
00142     G4Element* element = G3Ele.GetEle(z);
00143     material = new G4Material(name, dens, 1);
00144     material->AddElement(element, 1.);    
00145   }  
00146 
00147   // add the material to the List
00148   G3Mat.put(imate, material);
00149 }

void G4gsmixt ( G4int  imate,
G4String  name,
G4double  a[],
G4double z,
G4double  dens,
G4int  nlmat,
G4double wmat 
)

Referenced by G4gsmate(), and PG4gsmixt().

void G4gspart ( G4int  ipart,
G4String  chnpar,
G4int  itrtyp,
G4double  amass,
G4double  charge,
G4double  tlife,
G4double ubuf,
G4int  nwb 
)

Definition at line 51 of file G4gspart.cc.

Referenced by PG4gspart().

00053 {
00054 }

void G4gspos ( G4String  name,
G4int  num,
G4String  moth,
G4double  x,
G4double  y,
G4double  z,
G4int  irot,
G4String  only 
)

Definition at line 65 of file G4gspos.cc.

References G3VolTableEntry::AddG3Pos(), G3VolTableEntry::AddMother(), FatalException, G3Vol, G4CreateCloneVTE(), G4Exception(), G3VolTableEntry::GetClone(), G3VolTableEntry::GetNoClones(), G3VolTableEntry::GetNpar(), G3VolTableEntry::GetRpar(), G3VolTable::GetVTE(), and G3VolTableEntry::HasNegPars().

Referenced by PG4gspos().

00067 {
00068   // find VTEs
00069   G3VolTableEntry* vte = G3Vol.GetVTE(vname);
00070   G3VolTableEntry* mvte = G3Vol.GetVTE(vmoth);
00071 
00072   if (vte == 0) {
00073     G4String text = "G4gspos: '" + vname + "' has no VolTableEntry";
00074     G4Exception("G4gspos()", "G3toG40017", FatalException, text);
00075     return;
00076   } 
00077   else if (mvte == 0) {
00078     G4String text = "G4gspos: '" + vmoth + "' has no VolTableEntry";
00079     G4Exception("G4gspos()", "G3toG40018", FatalException, text);
00080     return;
00081   } 
00082   else { 
00083     if (!vte->HasNegPars()) {
00084       // position vector
00085       G4ThreeVector* offset = new G4ThreeVector(x*cm, y*cm, z*cm);
00086 
00087       // create a G3Pos object and add it to the vte
00088       G3Pos* aG3Pos = new G3Pos(vmoth, num, offset, irot, vonly);              
00089       vte->AddG3Pos(aG3Pos);
00090 
00091       // loop over all mothers
00092       for (G4int i=0; i<mvte->GetNoClones(); i++) {
00093                        // (mvte is retrieved from its "master" name
00094                        //  -> there is no need to call GetMasterClone()
00095         G3VolTableEntry* mvteClone = mvte->GetClone(i);
00096         vte->AddMother(mvteClone);
00097         mvteClone->AddDaughter(vte);
00098       }     
00099     } 
00100     else {
00101       // if vte has neg parameters 
00102       // a new vte clone copy is created for each mother (clone copy)  
00103       // and its parameters are derived from it if possible
00104 
00105       G4CreateCloneVTE(vte, mvte, vte->GetRpar(), vte->GetNpar(), num,
00106                      x, y, z, irot, vonly);
00107     }    
00108   }      
00109 }

void G4gsposp ( G4String  name,
G4int  num,
G4String  moth,
G4double  x,
G4double  y,
G4double  z,
G4int  irot,
G4String  only,
G4double  Rpar[],
G4int  npar 
)

Definition at line 297 of file G4gsposp.cc.

References FatalException, G3Vol, G4CreateCloneVTE(), G4Exception(), and G3VolTable::GetVTE().

Referenced by PG4gsposp().

00300 {
00301   // find VTEs
00302   G3VolTableEntry* vte = G3Vol.GetVTE(vname);
00303   G3VolTableEntry* mvte = G3Vol.GetVTE(vmoth);
00304 
00305   if (vte == 0) {
00306     G4String err_message1 = "G4gsposp: '" + vname + "' has no VolTableEntry";
00307     G4Exception("G4psposp()", "G3toG40021", FatalException, err_message1);
00308     return;
00309   } 
00310   if (mvte == 0) {
00311     G4String err_message2 = "G4gsposp: '" + vmoth + "' has no VolTableEntry";
00312     G4Exception("G4psposp()", "G3toG40022", FatalException, err_message2);
00313     return;
00314   } 
00315   else { 
00316     // a new vte clone copy is created for each mother (clone copy)  
00317     // and its parameters are derived from it if possible
00318     
00319     G4CreateCloneVTE(vte, mvte, pars, npar, num, x, y, z, irot, vonly);
00320   }
00321 }

void G4gsrotm ( G4int  irot,
G4double  theta1,
G4double  phi1,
G4double  theta2,
G4double  phi2,
G4double  theta3,
G4double  phi3 
)

Definition at line 54 of file G4gsrotm.cc.

References FatalException, G3Rot, G4cerr, G4endl, G4Exception(), G4INCL::Math::pi, G3RotTable::Put(), and G3toG4RotationMatrix::SetRotationMatrixByRow().

Referenced by G4BuildGeom(), and PG4gsrotm().

00056 {
00057     G4double degrad = pi/180;
00058     
00059     G4double th1r = theta1*degrad;
00060     G4double th2r = theta2*degrad;
00061     G4double th3r = theta3*degrad;
00062     
00063     G4double phi1r = phi1*degrad;
00064     G4double phi2r = phi2*degrad;
00065     G4double phi3r = phi3*degrad;
00066     
00067         // Construct unit vectors 
00068     
00069     G4ThreeVector x(std::sin(th1r)*std::cos(phi1r), std::sin(th1r)*std::sin(phi1r), std::cos(th1r));
00070     G4ThreeVector y(std::sin(th2r)*std::cos(phi2r), std::sin(th2r)*std::sin(phi2r), std::cos(th2r));
00071     G4ThreeVector z(std::sin(th3r)*std::cos(phi3r), std::sin(th3r)*std::sin(phi3r), std::cos(th3r));
00072 
00073         // check for orthonormality and left-handedness
00074 
00075     G4double check = (x.cross(y))*z;
00076     G4double tol = 1.0e-3;
00077         
00078     if (1-std::abs(check)>tol) {
00079         G4cerr << "Coordinate axes forming rotation matrix "
00080                << irot << " are not orthonormal.(" << 1-std::abs(check) << ")" 
00081          << G4endl;
00082         G4cerr << " theta1=" << theta1;
00083         G4cerr << " phi1=" << phi1;
00084         G4cerr << " theta2=" << theta2;
00085         G4cerr << " phi2=" << phi2;
00086         G4cerr << " theta3=" << theta3;
00087         G4cerr << " phi3=" << phi3;
00088         G4cerr << G4endl;
00089         G4Exception("G4gsrotm()", "G3toG40023", FatalException,
00090                     "Non orthogonal axes!");
00091         return;
00092     }
00093     //else if (1+check<=tol) {
00094     //    G4cerr << "G4gsrotm warning: coordinate axes forming rotation "
00095     //           << "matrix " << irot << " are left-handed" << G4endl;
00096     //}
00097     
00098     G3toG4RotationMatrix* rotp = new G3toG4RotationMatrix;
00099 
00100     rotp->SetRotationMatrixByRow(x, y, z);
00101     
00102         // add it to the List
00103 
00104     G3Rot.Put(irot, rotp);
00105 }

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 at line 68 of file G4gstmed.cc.

References G3Mat, G3Med, G3MatTable::get(), G3MedTable::put(), and G4UserLimits::SetMaxAllowedStep().

Referenced by PG4gstmed().

00072 {
00073     // get the pointer to material nmat
00074     G4Material* material = G3Mat.get(nmat);
00075 
00076     // NB. there is the possibility for redundancy in the mag field
00077     //     and user limits objects. Who cares.
00078     // Generate the mag field object
00079     // $$$ G4MagneticField* field = new G4MagneticField(ifield, fieldm, tmaxfd);
00080     G4MagneticField* field = 0;
00081 
00082     // Generate the user limits object
00083     // !!! only "stemax" has its equivalent in G4
00084 
00085     G4UserLimits* limits = 0;
00086     if (useG3TMLimits) {
00087       limits = new G4UserLimits();
00088       limits->SetMaxAllowedStep(stemax*cm);
00089       // limits->SetG3DefaultCuts();
00090          // this is arranged globally by physics manager
00091     }
00092 
00093     // Store this medium in the G3Med structure
00094     G3Med.put(itmed, material, field, limits, isvol);
00095 }

void G4gstpar ( G4int  itmed,
G4String  chpar,
G4double  parval 
)

Definition at line 45 of file G4gstpar.cc.

References G4cerr, and G4endl.

Referenced by PG4gstpar().

00046 {
00047     // set special tracking medium parameter. Apply to all logical
00048     // volumes making use of the specified tracking medium.
00049   G4cerr << "G4gstpar: not implemented." << G4endl;
00050 }

void G4gsvolu ( G4String  name,
G4String  shape,
G4int  nmed,
G4double par,
G4int  npar 
)

Definition at line 73 of file G4gsvolu.cc.

References FatalException, G3Vol, G4CreateVTE(), G4Exception(), and G3VolTable::GetVTE().

Referenced by PG4gsvolu().

00075 {
00076   /*
00077   G4cout << "Creating logical volume " << vname << " shape " << shape
00078          << " nmed " << nmed << " #pars "<< npar << " parameters (cm): ";
00079   for (int ipar=0; ipar< npar; ipar++) G4cout << std::setw(8) << rpar[ipar];
00080   G4cout << G4endl;
00081   */
00082   if (G3Vol.GetVTE(vname)) {
00083     // abort if VTE with given name exists
00084     G4String text = "G4gsvolu: Attempt to create volume " + vname + " twice.";
00085     G4Exception("G4gsvolu()", "G3toG40024", FatalException, text);
00086     return;
00087   }
00088   else {  
00089     G4CreateVTE(vname, shape, nmed, rpar, npar);
00090   }  
00091 }


Generated on Mon May 27 17:50:37 2013 for Geant4 by  doxygen 1.4.7