Import Geant4 9.6.0 source tree
This commit is contained in:
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3DetTable.cc,v 1.12 2006-06-29 18:12:48 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
#include "globals.hh"
|
||||
#include "G3DetTable.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3DetTableEntry.cc,v 1.5 2006-06-29 18:12:51 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
#include "globals.hh"
|
||||
#include "G3DetTableEntry.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3Division.cc,v 1.17 2006-06-29 18:12:53 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, V.Berejnoi 13.10.99
|
||||
|
||||
@@ -34,6 +33,7 @@
|
||||
#include "G3toG4MakeSolid.hh"
|
||||
#include "G4Para.hh"
|
||||
#include "G3Pos.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
|
||||
@@ -24,15 +24,18 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3EleTable.cc,v 1.16 2006-06-29 18:12:55 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include <sstream>
|
||||
#include "G4ios.hh"
|
||||
|
||||
#include "G3EleTable.hh"
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
G3EleTable::G3EleTable() :_MaxEle(109){
|
||||
_EleNames = new char*[_MaxEle];
|
||||
// create an array of pointers to elements
|
||||
@@ -51,11 +54,11 @@ G3EleTable::GetEle(G4double Z){
|
||||
char name[20], sym[3];
|
||||
G4int index = (G4int) Z-1;
|
||||
if (!parse(Z, name, sym, A)) {
|
||||
G4String nm(name);
|
||||
G4String na(name);
|
||||
G4String sy(sym);
|
||||
if (_Ele[index] == 0) {
|
||||
// add an element to the element table here
|
||||
_Ele[index] = new G4Element(nm, sy, Z, A*g/mole);
|
||||
_Ele[index] = new G4Element(na, sy, Z, A*g/mole);
|
||||
}
|
||||
}
|
||||
return _Ele[index];
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3MatTable.cc,v 1.16 2006-06-29 18:12:57 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3MatTableEntry.cc,v 1.4 2006-06-29 18:13:00 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
@@ -46,9 +45,9 @@ G3MatTableEntry::G3MatTableEntry(const G3MatTableEntry& right)
|
||||
G3MatTableEntry::~G3MatTableEntry()
|
||||
{}
|
||||
|
||||
const G3MatTableEntry&
|
||||
G3MatTableEntry::operator=(const G3MatTableEntry& right)
|
||||
{
|
||||
G3MatTableEntry& G3MatTableEntry::operator=(const G3MatTableEntry& right)
|
||||
{
|
||||
if (&right == this) { return *this; }
|
||||
fID = right.GetID();
|
||||
fMaterial = right.GetMaterial();
|
||||
return *this;
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3MedTable.cc,v 1.15 2006-06-29 18:13:03 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3MedTableEntry.cc,v 1.4 2006-06-29 18:13:06 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
@@ -55,9 +54,9 @@ G3MedTableEntry::G3MedTableEntry(const G3MedTableEntry& right)
|
||||
G3MedTableEntry::~G3MedTableEntry()
|
||||
{}
|
||||
|
||||
const G3MedTableEntry&
|
||||
G3MedTableEntry::operator=(const G3MedTableEntry& right)
|
||||
G3MedTableEntry& G3MedTableEntry::operator=(const G3MedTableEntry& right)
|
||||
{
|
||||
if (&right == this) { return *this; }
|
||||
fID = right.GetID();
|
||||
fMaterial = right.GetMaterial();
|
||||
fField = right.GetField();
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3NegVolPars.cc,v 1.13 2006-06-29 18:13:08 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// modified by I. Hrivnacova, 13.10.99
|
||||
|
||||
@@ -35,7 +34,7 @@
|
||||
#include "G3toG4.hh"
|
||||
#include <cmath>
|
||||
|
||||
G4bool G3CalcParamsFn(G4double *Rpar, G4int npar, G4double *Rparm,
|
||||
G4bool G3CalcParamsFn(G4double *rpar, G4int npar, G4double *rparm,
|
||||
G4String shape, G4String shapem)
|
||||
// Returns true only in case the parameters *after* processing
|
||||
// this method remain negative.
|
||||
@@ -48,75 +47,75 @@ G4bool G3CalcParamsFn(G4double *Rpar, G4int npar, G4double *Rparm,
|
||||
if (shape == "BOX" || shape == "TRD1" || shape == "TRD2" ||
|
||||
shape == "ELTU") {
|
||||
for (G4int i=0;i<npar;i++) {
|
||||
if (Rpar[i] < 0) {
|
||||
if (Rparm != 0) Rpar[i] = Rparm[i];
|
||||
if (Rpar[i] < 0) NegPresent = TRUE;
|
||||
if (rpar[i] < 0) {
|
||||
if (rparm != 0) rpar[i] = rparm[i];
|
||||
if (rpar[i] < 0) NegPresent = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (shape == "TRAP") {
|
||||
for (G4int i=0;i<11;i++) {
|
||||
if (i != 1 && i != 2 && i != 6 && i != 10) {
|
||||
if (Rpar[i]<0) {
|
||||
if (Rparm != 0) Rpar[i] = Rparm[i];
|
||||
if (Rpar[i] < 0) NegPresent = TRUE;
|
||||
if (rpar[i]<0) {
|
||||
if (rparm != 0) rpar[i] = rparm[i];
|
||||
if (rpar[i] < 0) NegPresent = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (shape == "TUBE" || shape == "TUBS" || shape == "PARA") {
|
||||
for (G4int i=0;i<3;i++) {
|
||||
if (Rpar[i] < 0) {
|
||||
if (Rparm != 0) Rpar[i] = Rparm[i];
|
||||
if (Rpar[i] < 0) NegPresent = TRUE;
|
||||
if (rpar[i] < 0) {
|
||||
if (rparm != 0) rpar[i] = rparm[i];
|
||||
if (rpar[i] < 0) NegPresent = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (shape == "CONE" || shape == "CONS") {
|
||||
for (G4int i=0;i<5;i++) {
|
||||
if (Rpar[i] < 0) {
|
||||
if (Rparm != 0) Rpar[i] = Rparm[i];
|
||||
if (Rpar[i] < 0) NegPresent = TRUE;
|
||||
if (rpar[i] < 0) {
|
||||
if (rparm != 0) rpar[i] = rparm[i];
|
||||
if (rpar[i] < 0) NegPresent = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (shape == "SPHE") {
|
||||
for (G4int i=0;i<2;i++) {
|
||||
if (Rpar[i] < 0) {
|
||||
if (Rparm != 0) Rpar[i] = Rparm[i];
|
||||
if (Rpar[i] < 0) NegPresent = TRUE;
|
||||
if (rpar[i] < 0) {
|
||||
if (rparm != 0) rpar[i] = rparm[i];
|
||||
if (rpar[i] < 0) NegPresent = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (shape == "PGON") {
|
||||
G4int nz = int(Rpar[3]);
|
||||
G4int nz = G4int(rpar[3]);
|
||||
G4int ipl;
|
||||
for (G4int i=0;i<nz;i++) {
|
||||
ipl = 5 + i*3;
|
||||
if (Rpar[ipl] < 0) {
|
||||
if (Rparm != 0) Rpar[ipl] = Rparm[ipl];
|
||||
if (Rpar[ipl] < 0) NegPresent = TRUE;
|
||||
if (rpar[ipl] < 0) {
|
||||
if (rparm != 0) rpar[ipl] = rparm[ipl];
|
||||
if (rpar[ipl] < 0) NegPresent = TRUE;
|
||||
}
|
||||
if (Rpar[ipl+1] < 0) {
|
||||
if (Rparm != 0) Rpar[ipl] = Rparm[ipl];
|
||||
if (Rpar[ipl] < 0) NegPresent = TRUE;
|
||||
if (rpar[ipl+1] < 0) {
|
||||
if (rparm != 0) rpar[ipl] = rparm[ipl];
|
||||
if (rpar[ipl] < 0) NegPresent = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (shape == "PCON") {
|
||||
G4int nz = int(Rpar[2]);
|
||||
G4int nz = G4int(rpar[2]);
|
||||
G4int ipl;
|
||||
for (G4int i=0;i<nz;i++) {
|
||||
ipl = 4 + i*3;
|
||||
if (Rpar[ipl] < 0) {
|
||||
if (Rparm != 0) Rpar[ipl] = Rparm[ipl];
|
||||
if (Rpar[ipl] < 0) NegPresent = TRUE;
|
||||
if (rpar[ipl] < 0) {
|
||||
if (rparm != 0) rpar[ipl] = rparm[ipl];
|
||||
if (rpar[ipl] < 0) NegPresent = TRUE;
|
||||
}
|
||||
if (Rpar[ipl+1] < 0) {
|
||||
if (rpar[ipl+1] < 0) {
|
||||
// TO DO
|
||||
// check - folowing argument might be ipl+1
|
||||
if (Rparm != 0) Rpar[ipl] = Rparm[ipl];
|
||||
if (Rpar[ipl] < 0) NegPresent = TRUE;
|
||||
if (rparm != 0) rpar[ipl] = rparm[ipl];
|
||||
if (rpar[ipl] < 0) NegPresent = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -124,55 +123,55 @@ G4bool G3CalcParamsFn(G4double *Rpar, G4int npar, G4double *Rparm,
|
||||
|
||||
if (shape == "BOX") {
|
||||
if (shapem == "TRD1") {
|
||||
if (Rpar[1] < 0) {
|
||||
if (Rparm != 0) Rpar[1] = Rparm[2];
|
||||
if (Rpar[1] < 0) NegPresent = TRUE;
|
||||
if (rpar[1] < 0) {
|
||||
if (rparm != 0) rpar[1] = rparm[2];
|
||||
if (rpar[1] < 0) NegPresent = TRUE;
|
||||
}
|
||||
if (Rpar[2] < 0) {
|
||||
if (Rparm != 0) Rpar[2] = Rparm[3];
|
||||
if (Rpar[2] < 0) NegPresent = TRUE;
|
||||
if (rpar[2] < 0) {
|
||||
if (rparm != 0) rpar[2] = rparm[3];
|
||||
if (rpar[2] < 0) NegPresent = TRUE;
|
||||
}
|
||||
if (Rpar[0] < 0) {
|
||||
if (Rparm != 0) Rpar[0] = std::min(Rparm[0],Rparm[1]) +
|
||||
std::abs(Rparm[0]-Rparm[1])*.5*Rpar[2]/Rparm[3];
|
||||
if (Rpar[0] < 0) NegPresent = TRUE;
|
||||
if (rpar[0] < 0) {
|
||||
if (rparm != 0) rpar[0] = std::min(rparm[0],rparm[1]) +
|
||||
std::abs(rparm[0]-rparm[1])*.5*rpar[2]/rparm[3];
|
||||
if (rpar[0] < 0) NegPresent = TRUE;
|
||||
}
|
||||
}
|
||||
if (shapem == "TRD2") {
|
||||
if (Rpar[2] < 0) {
|
||||
if (Rparm != 0) Rpar[2] = Rparm[4];
|
||||
if (Rpar[2]<0) NegPresent = TRUE;
|
||||
if (rpar[2] < 0) {
|
||||
if (rparm != 0) rpar[2] = rparm[4];
|
||||
if (rpar[2]<0) NegPresent = TRUE;
|
||||
}
|
||||
if (Rpar[0] < 0) {
|
||||
if (Rparm != 0) Rpar[0] = std::min(Rparm[0],Rparm[1]) +
|
||||
std::abs(Rparm[0]-Rparm[1])*.5*Rpar[2]/Rparm[4];
|
||||
if (Rpar[0]<0) NegPresent = TRUE;
|
||||
if (rpar[0] < 0) {
|
||||
if (rparm != 0) rpar[0] = std::min(rparm[0],rparm[1]) +
|
||||
std::abs(rparm[0]-rparm[1])*.5*rpar[2]/rparm[4];
|
||||
if (rpar[0]<0) NegPresent = TRUE;
|
||||
}
|
||||
if (Rpar[1] < 0) {
|
||||
if (Rparm != 0) Rpar[1] = std::min(Rparm[2],Rparm[3]) +
|
||||
std::abs(Rparm[2]-Rparm[3])*.5*Rpar[2]/Rparm[4];
|
||||
if (Rpar[1]<0) NegPresent = TRUE;
|
||||
if (rpar[1] < 0) {
|
||||
if (rparm != 0) rpar[1] = std::min(rparm[2],rparm[3]) +
|
||||
std::abs(rparm[2]-rparm[3])*.5*rpar[2]/rparm[4];
|
||||
if (rpar[1]<0) NegPresent = TRUE;
|
||||
}
|
||||
}
|
||||
if (shapem == "TRAP") {
|
||||
if (Rpar[2] < 0) {
|
||||
if (Rparm != 0) Rpar[2] = Rparm[0];
|
||||
if (Rpar[2] < 0) NegPresent = TRUE;
|
||||
if (rpar[2] < 0) {
|
||||
if (rparm != 0) rpar[2] = rparm[0];
|
||||
if (rpar[2] < 0) NegPresent = TRUE;
|
||||
}
|
||||
if (Rpar[0] < 0) {
|
||||
if (Rparm != 0) {
|
||||
G4double xlo = std::min(Rparm[4],Rparm[8]) +
|
||||
std::abs(Rparm[4]-Rparm[8])*.5*Rpar[2]/Rparm[0];
|
||||
G4double xhi = std::min(Rparm[5],Rparm[9]) +
|
||||
std::abs(Rparm[5]-Rparm[9])*.5*Rpar[2]/Rparm[0];
|
||||
Rpar[0] = std::min(xlo,xhi);
|
||||
if (rpar[0] < 0) {
|
||||
if (rparm != 0) {
|
||||
G4double xlo = std::min(rparm[4],rparm[8]) +
|
||||
std::abs(rparm[4]-rparm[8])*.5*rpar[2]/rparm[0];
|
||||
G4double xhi = std::min(rparm[5],rparm[9]) +
|
||||
std::abs(rparm[5]-rparm[9])*.5*rpar[2]/rparm[0];
|
||||
rpar[0] = std::min(xlo,xhi);
|
||||
}
|
||||
if (Rpar[0] < 0) NegPresent = TRUE;
|
||||
if (rpar[0] < 0) NegPresent = TRUE;
|
||||
}
|
||||
if (Rpar[1] < 0) {
|
||||
if (Rparm != 0) Rpar[1] = std::min(Rparm[3],Rparm[7]) +
|
||||
std::abs(Rparm[3]-Rparm[7])*.5*Rpar[2]/Rparm[0];
|
||||
if (Rpar[1] < 0) NegPresent = TRUE;
|
||||
if (rpar[1] < 0) {
|
||||
if (rparm != 0) rpar[1] = std::min(rparm[3],rparm[7]) +
|
||||
std::abs(rparm[3]-rparm[7])*.5*rpar[2]/rparm[0];
|
||||
if (rpar[1] < 0) NegPresent = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -189,12 +188,12 @@ G4bool G3NegVolPars(G4double pars[], G4int *nparpt,
|
||||
|
||||
// the volume
|
||||
G4String shape = vte->GetShape();
|
||||
G4double* Rpar = vte->GetRpar();
|
||||
G4double* rpar = vte->GetRpar();
|
||||
G4int npar = vte->GetNpar();
|
||||
if (npar ==0) {
|
||||
// no solid parameters are defined in vte
|
||||
npar = *nparpt;
|
||||
Rpar = pars;
|
||||
rpar = pars;
|
||||
}
|
||||
else {
|
||||
// solid parameters are already defined in vte
|
||||
@@ -205,16 +204,16 @@ G4bool G3NegVolPars(G4double pars[], G4int *nparpt,
|
||||
|
||||
// mother
|
||||
G4String shapem = mvte->GetShape();
|
||||
G4double* Rparm = mvte->GetRpar();
|
||||
G4double* rparm = mvte->GetRpar();
|
||||
|
||||
if (strcmp(routine,"GSPOS") == 0 || strcmp(routine,"GSVOLU") == 0) {
|
||||
NegPresent = G3CalcParamsFn(Rpar,npar,Rparm,shape,shapem);
|
||||
NegPresent = G3CalcParamsFn(rpar,npar,rparm,shape,shapem);
|
||||
}
|
||||
if (strcmp(routine,"GSDVN") == 0) {
|
||||
// just set the flag. The parametrization function figures out
|
||||
// what to do.
|
||||
for (G4int i=0;i<npar;i++) {
|
||||
if (Rpar[i] < 0) {
|
||||
if (rpar[i] < 0) {
|
||||
NegPresent = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3PartTable.cc,v 1.14 2006-06-29 18:13:10 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "G4Types.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3Pos.cc,v 1.9 2006-06-29 18:13:12 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// modified by I.Hrivnacova, 13.10.99
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3RotTable.cc,v 1.16 2006-06-29 18:13:15 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3RotTableEntry.cc,v 1.4 2006-06-29 18:13:17 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
@@ -46,9 +45,9 @@ G3RotTableEntry::G3RotTableEntry(const G3RotTableEntry& right)
|
||||
G3RotTableEntry::~G3RotTableEntry()
|
||||
{}
|
||||
|
||||
const G3RotTableEntry&
|
||||
G3RotTableEntry::operator=(const G3RotTableEntry& right)
|
||||
G3RotTableEntry& G3RotTableEntry::operator=(const G3RotTableEntry& right)
|
||||
{
|
||||
if (&right == this) { return *this; }
|
||||
fID = right.GetID();
|
||||
fMatrix = right.GetMatrix();
|
||||
return *this;
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3VolTable.cc,v 1.22 2006-06-29 18:13:20 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// modified by I.Hrivnacova, 13.10.99
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3VolTableEntry.cc,v 1.12 2006-06-29 18:13:22 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// modified by I.Hrivnacova, 13.10.99
|
||||
|
||||
@@ -194,13 +193,13 @@ void G3VolTableEntry::SetNmed(G4int nmed) {
|
||||
fNmed = nmed;
|
||||
}
|
||||
|
||||
void G3VolTableEntry::SetNRpar(G4int npar, G4double* Rpar) {
|
||||
void G3VolTableEntry::SetNRpar(G4int npar, G4double* rpar) {
|
||||
if (npar != fNpar) {
|
||||
fNpar = npar;
|
||||
delete [] fRpar;
|
||||
fRpar = new G4double[fNpar];
|
||||
}
|
||||
for (G4int i=0; i<fNpar; i++) fRpar[i] = Rpar[i];
|
||||
for (G4int i=0; i<fNpar; i++) fRpar[i] = rpar[i];
|
||||
}
|
||||
|
||||
void G3VolTableEntry::SetHasNegPars(G4bool hasNegPars) {
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3fillParams.cc.archive,v 1.2 2003-06-16 16:50:54 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// extracted from clparse.cc by I. Hrivnacova, 30.7.99
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3toG4BuildTree.cc,v 1.20 2006-06-29 18:13:24 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// modified by I. Hrivnacova, 2.8.99
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3toG4MANY.cc,v 1.2 2006-06-29 18:13:26 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// By I. Hrivnacova, 22.10.01
|
||||
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3toG4MakeSolid.cc,v 1.10 2006-06-29 18:13:29 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// modified by I.Hrivnacova, V.Berejnoi 27 Sep 99
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4Trd.hh"
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "G3toG4MakeSolid.hh"
|
||||
|
||||
G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
const G4double* Rpar, const G4int npar,
|
||||
const G4double* rpar, const G4int npar,
|
||||
G4bool& NegVolPars, G4bool& Deferred,
|
||||
G4bool* OKAxis){
|
||||
|
||||
@@ -64,9 +64,9 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
};
|
||||
|
||||
if ( shape == "BOX" ) {
|
||||
G4double pX = Rpar[0]*cm;
|
||||
G4double pY = Rpar[1]*cm;
|
||||
G4double pZ = Rpar[2]*cm;
|
||||
G4double pX = rpar[0]*cm;
|
||||
G4double pY = rpar[1]*cm;
|
||||
G4double pZ = rpar[2]*cm;
|
||||
|
||||
OKAxis[0]=OKAxis[1]=OKAxis[2]=true;
|
||||
|
||||
@@ -77,11 +77,11 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
}
|
||||
|
||||
} else if ( shape == "TRD1" ) {
|
||||
G4double pdx1 = Rpar[0]*cm;
|
||||
G4double pdx2 = Rpar[1]*cm;
|
||||
G4double pdy1 = Rpar[2]*cm;
|
||||
G4double pdx1 = rpar[0]*cm;
|
||||
G4double pdx2 = rpar[1]*cm;
|
||||
G4double pdy1 = rpar[2]*cm;
|
||||
G4double pdy2 = pdy1;
|
||||
G4double pdz = Rpar[3]*cm;
|
||||
G4double pdz = rpar[3]*cm;
|
||||
|
||||
OKAxis[1]=OKAxis[2]=true;
|
||||
|
||||
@@ -92,11 +92,11 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
}
|
||||
|
||||
} else if ( shape == "TRD2" ) {
|
||||
G4double pdx1 = Rpar[0]*cm;
|
||||
G4double pdx2 = Rpar[1]*cm;
|
||||
G4double pdy1 = Rpar[2]*cm;
|
||||
G4double pdy2 = Rpar[3]*cm;
|
||||
G4double pdz = Rpar[4]*cm;
|
||||
G4double pdx1 = rpar[0]*cm;
|
||||
G4double pdx2 = rpar[1]*cm;
|
||||
G4double pdy1 = rpar[2]*cm;
|
||||
G4double pdy2 = rpar[3]*cm;
|
||||
G4double pdz = rpar[4]*cm;
|
||||
|
||||
OKAxis[2]=true;
|
||||
|
||||
@@ -107,17 +107,17 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
}
|
||||
|
||||
} else if ( shape == "TRAP" ) {
|
||||
G4double pDz = Rpar[0]*cm;
|
||||
G4double pTheta = Rpar[1]*deg;
|
||||
G4double pPhi = Rpar[2]*deg;
|
||||
G4double pDy1 = Rpar[3]*cm;
|
||||
G4double pDx1 = Rpar[4]*cm;
|
||||
G4double pDx2 = Rpar[5]*cm;
|
||||
G4double pAlp1 = Rpar[6]*deg;
|
||||
G4double pDy2 = Rpar[7]*cm;
|
||||
G4double pDx3 = Rpar[8]*cm;
|
||||
G4double pDx4 = Rpar[9]*cm;
|
||||
G4double pAlp2 = Rpar[10]*deg;
|
||||
G4double pDz = rpar[0]*cm;
|
||||
G4double pTheta = rpar[1]*deg;
|
||||
G4double pPhi = rpar[2]*deg;
|
||||
G4double pDy1 = rpar[3]*cm;
|
||||
G4double pDx1 = rpar[4]*cm;
|
||||
G4double pDx2 = rpar[5]*cm;
|
||||
G4double pAlp1 = rpar[6]*deg;
|
||||
G4double pDy2 = rpar[7]*cm;
|
||||
G4double pDx3 = rpar[8]*cm;
|
||||
G4double pDx4 = rpar[9]*cm;
|
||||
G4double pAlp2 = rpar[10]*deg;
|
||||
|
||||
OKAxis[2]=true;
|
||||
|
||||
@@ -139,9 +139,9 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
}
|
||||
|
||||
} else if ( shape == "TUBE" ) {
|
||||
G4double pRMin = Rpar[0]*cm;
|
||||
G4double pRMax = Rpar[1]*cm;
|
||||
G4double pDz = Rpar[2]*cm;
|
||||
G4double pRMin = rpar[0]*cm;
|
||||
G4double pRMax = rpar[1]*cm;
|
||||
G4double pDz = rpar[2]*cm;
|
||||
G4double pSPhi = 0.*deg;
|
||||
G4double pDPhi = 360.*deg;
|
||||
|
||||
@@ -154,12 +154,12 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
}
|
||||
|
||||
} else if ( shape == "TUBS" ) {
|
||||
G4double pRMin = Rpar[0]*cm;
|
||||
G4double pRMax = Rpar[1]*cm;
|
||||
G4double pDz = Rpar[2]*cm;
|
||||
G4double pSPhi = Rpar[3]*deg;
|
||||
G4double pDPhi = Rpar[4]*deg - pSPhi;
|
||||
if ( Rpar[4]*deg <= pSPhi ) pDPhi = pDPhi + 360.*deg;
|
||||
G4double pRMin = rpar[0]*cm;
|
||||
G4double pRMax = rpar[1]*cm;
|
||||
G4double pDz = rpar[2]*cm;
|
||||
G4double pSPhi = rpar[3]*deg;
|
||||
G4double pDPhi = rpar[4]*deg - pSPhi;
|
||||
if ( rpar[4]*deg <= pSPhi ) pDPhi = pDPhi + 360.*deg;
|
||||
|
||||
OKAxis[0]=OKAxis[1]=OKAxis[2]=true;
|
||||
|
||||
@@ -170,11 +170,11 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
}
|
||||
|
||||
} else if ( shape == "CONE" ) {
|
||||
G4double pDz = Rpar[0]*cm;
|
||||
G4double pRmin1 = Rpar[1]*cm;
|
||||
G4double pRmax1 = Rpar[2]*cm;
|
||||
G4double pRmin2 = Rpar[3]*cm;
|
||||
G4double pRmax2 = Rpar[4]*cm;
|
||||
G4double pDz = rpar[0]*cm;
|
||||
G4double pRmin1 = rpar[1]*cm;
|
||||
G4double pRmax1 = rpar[2]*cm;
|
||||
G4double pRmin2 = rpar[3]*cm;
|
||||
G4double pRmax2 = rpar[4]*cm;
|
||||
G4double pSPhi = 0.*deg;
|
||||
G4double pDPhi = 360.*deg;
|
||||
|
||||
@@ -188,14 +188,14 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
}
|
||||
|
||||
} else if ( shape == "CONS" ) {
|
||||
G4double pDz = Rpar[0]*cm;
|
||||
G4double pRmin1 = Rpar[1]*cm;
|
||||
G4double pRmax1 = Rpar[2]*cm;
|
||||
G4double pRmin2 = Rpar[3]*cm;
|
||||
G4double pRmax2 = Rpar[4]*cm;
|
||||
G4double pSPhi = Rpar[5]*deg;
|
||||
G4double pDPhi = Rpar[6]*deg - pSPhi;
|
||||
if ( Rpar[6]*deg <= pSPhi ) pDPhi = pDPhi + 360.*deg;
|
||||
G4double pDz = rpar[0]*cm;
|
||||
G4double pRmin1 = rpar[1]*cm;
|
||||
G4double pRmax1 = rpar[2]*cm;
|
||||
G4double pRmin2 = rpar[3]*cm;
|
||||
G4double pRmax2 = rpar[4]*cm;
|
||||
G4double pSPhi = rpar[5]*deg;
|
||||
G4double pDPhi = rpar[6]*deg - pSPhi;
|
||||
if ( rpar[6]*deg <= pSPhi ) pDPhi = pDPhi + 360.*deg;
|
||||
|
||||
OKAxis[0]=OKAxis[1]=OKAxis[2]=true;
|
||||
|
||||
@@ -207,13 +207,13 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
}
|
||||
|
||||
} else if ( shape == "SPHE" ) {
|
||||
G4double pRmin = Rpar[0]*cm;
|
||||
G4double pRmax = Rpar[1]*cm;
|
||||
G4double pThe1 = Rpar[2]*deg;
|
||||
G4double pThe2 = Rpar[3]*deg;
|
||||
G4double pRmin = rpar[0]*cm;
|
||||
G4double pRmax = rpar[1]*cm;
|
||||
G4double pThe1 = rpar[2]*deg;
|
||||
G4double pThe2 = rpar[3]*deg;
|
||||
G4double pDThe = pThe2 - pThe1;
|
||||
G4double pPhi1 = Rpar[4]*deg;
|
||||
G4double pPhi2 = Rpar[5]*deg;
|
||||
G4double pPhi1 = rpar[4]*deg;
|
||||
G4double pPhi2 = rpar[5]*deg;
|
||||
G4double pDPhi = pPhi2 - pPhi1;
|
||||
|
||||
NegVolPars = pRmin<0 || pRmax<0;
|
||||
@@ -223,12 +223,12 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
}
|
||||
|
||||
} else if ( shape == "PARA" ) {
|
||||
G4double pDx = Rpar[0]*cm;
|
||||
G4double pDy = Rpar[1]*cm;
|
||||
G4double pDz = Rpar[2]*cm;
|
||||
G4double pAlph = Rpar[3]*deg;
|
||||
G4double pThet = Rpar[4]*deg;
|
||||
G4double pPhi = Rpar[5]*deg;
|
||||
G4double pDx = rpar[0]*cm;
|
||||
G4double pDy = rpar[1]*cm;
|
||||
G4double pDz = rpar[2]*cm;
|
||||
G4double pAlph = rpar[3]*deg;
|
||||
G4double pThet = rpar[4]*deg;
|
||||
G4double pPhi = rpar[5]*deg;
|
||||
|
||||
OKAxis[0]=OKAxis[1]=OKAxis[2]=true;
|
||||
|
||||
@@ -240,10 +240,10 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
|
||||
} else if ( shape == "PGON" ) {
|
||||
G4int i;
|
||||
G4int npdv = G4int(Rpar[2]);
|
||||
G4int nz = G4int(Rpar[3]);
|
||||
G4double pPhi1 = Rpar[0]*deg;
|
||||
G4double dPhi = Rpar[1]*deg;
|
||||
G4int npdv = G4int(rpar[2]);
|
||||
G4int nz = G4int(rpar[3]);
|
||||
G4double pPhi1 = rpar[0]*deg;
|
||||
G4double dPhi = rpar[1]*deg;
|
||||
G4double *DzArray = new G4double[nz];
|
||||
G4double *Rmax = new G4double[nz];
|
||||
G4double *Rmin = new G4double[nz];
|
||||
@@ -256,9 +256,9 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
G4int i4=3*i+4;
|
||||
G4int i5=i4+1;
|
||||
G4int i6=i4+2;
|
||||
DzArray[i] = Rpar[i4]*cm;
|
||||
Rmin[i] = Rpar[i5]*cm;
|
||||
Rmax[i] = Rpar[i6]*cm;
|
||||
DzArray[i] = rpar[i4]*cm;
|
||||
Rmin[i] = rpar[i5]*cm;
|
||||
Rmax[i] = rpar[i6]*cm;
|
||||
}
|
||||
solid = new G4Polyhedra(vname, pPhi1, dPhi, npdv, nz, DzArray, Rmin, Rmax);
|
||||
delete [] DzArray;
|
||||
@@ -267,9 +267,9 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
|
||||
} else if ( shape == "PCON" ) {
|
||||
G4int i;
|
||||
G4double pPhi1 = Rpar[0]*deg;
|
||||
G4double dPhi = Rpar[1]*deg;
|
||||
G4int nz = G4int(Rpar[2]);
|
||||
G4double pPhi1 = rpar[0]*deg;
|
||||
G4double dPhi = rpar[1]*deg;
|
||||
G4int nz = G4int(rpar[2]);
|
||||
G4double *DzArray = new G4double[nz];
|
||||
G4double *Rmax = new G4double[nz];
|
||||
G4double *Rmin = new G4double[nz];
|
||||
@@ -282,9 +282,9 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
G4int i4=3*i+3;
|
||||
G4int i5=i4+1;
|
||||
G4int i6=i4+2;
|
||||
DzArray[i] = Rpar[i4]*cm;
|
||||
Rmin[i] = Rpar[i5]*cm;
|
||||
Rmax[i] = Rpar[i6]*cm;
|
||||
DzArray[i] = rpar[i4]*cm;
|
||||
Rmin[i] = rpar[i5]*cm;
|
||||
Rmax[i] = rpar[i6]*cm;
|
||||
}
|
||||
solid = new G4Polycone(vname, pPhi1, dPhi, nz, DzArray, Rmin, Rmax);
|
||||
delete [] DzArray;
|
||||
@@ -292,9 +292,9 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
delete [] Rmax;
|
||||
|
||||
} else if ( shape == "ELTU" ) {
|
||||
G4double dX = Rpar[0]*cm;
|
||||
G4double dY = Rpar[1]*cm;
|
||||
G4double dZ = Rpar[2]*cm;
|
||||
G4double dX = rpar[0]*cm;
|
||||
G4double dY = rpar[1]*cm;
|
||||
G4double dZ = rpar[2]*cm;
|
||||
|
||||
OKAxis[0]=OKAxis[1]=OKAxis[2]=true;
|
||||
|
||||
@@ -305,10 +305,10 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
}
|
||||
|
||||
} else if ( shape == "HYPE" ) {
|
||||
G4double pRmin = Rpar[0]*cm;
|
||||
G4double pRmax = Rpar[1]*cm;
|
||||
G4double pDz = Rpar[2]*cm;
|
||||
G4double pThet = Rpar[3]*deg;
|
||||
G4double pRmin = rpar[0]*cm;
|
||||
G4double pRmax = rpar[1]*cm;
|
||||
G4double pDz = rpar[2]*cm;
|
||||
G4double pThet = rpar[3]*deg;
|
||||
|
||||
NegVolPars = pRmin<0 || pRmax<0 || pDz<0;
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G3toG4RotationMatrix.cc,v 1.4 2006-06-29 18:13:31 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
|
||||
#include "G3toG4RotationMatrix.hh"
|
||||
|
||||
@@ -48,40 +47,40 @@ G3toG4RotationMatrix::~G3toG4RotationMatrix()
|
||||
}
|
||||
|
||||
void
|
||||
G3toG4RotationMatrix::SetRotationMatrixByCol(const G4ThreeVector& col1,
|
||||
const G4ThreeVector& col2,
|
||||
const G4ThreeVector& col3)
|
||||
G3toG4RotationMatrix::SetRotationMatrixByCol(const G4ThreeVector& cl1,
|
||||
const G4ThreeVector& cl2,
|
||||
const G4ThreeVector& cl3)
|
||||
{
|
||||
rxx = col1.x();
|
||||
ryx = col1.y();
|
||||
rzx = col1.z();
|
||||
rxx = cl1.x();
|
||||
ryx = cl1.y();
|
||||
rzx = cl1.z();
|
||||
|
||||
rxy = col2.x();
|
||||
ryy = col2.y();
|
||||
rzy = col2.z();
|
||||
rxy = cl2.x();
|
||||
ryy = cl2.y();
|
||||
rzy = cl2.z();
|
||||
|
||||
rxz = col3.x();
|
||||
ryz = col3.y();
|
||||
rzz = col3.z();
|
||||
rxz = cl3.x();
|
||||
ryz = cl3.y();
|
||||
rzz = cl3.z();
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
G3toG4RotationMatrix::SetRotationMatrixByRow(const G4ThreeVector& row1,
|
||||
const G4ThreeVector& row2,
|
||||
const G4ThreeVector& row3)
|
||||
G3toG4RotationMatrix::SetRotationMatrixByRow(const G4ThreeVector& rw1,
|
||||
const G4ThreeVector& rw2,
|
||||
const G4ThreeVector& rw3)
|
||||
{
|
||||
rxx = row1.x();
|
||||
rxy = row1.y();
|
||||
rxz = row1.z();
|
||||
rxx = rw1.x();
|
||||
rxy = rw1.y();
|
||||
rxz = rw1.z();
|
||||
|
||||
ryx = row2.x();
|
||||
ryy = row2.y();
|
||||
ryz = row2.z();
|
||||
ryx = rw2.x();
|
||||
ryy = rw2.y();
|
||||
ryz = rw2.z();
|
||||
|
||||
rzx = row3.x();
|
||||
rzy = row3.y();
|
||||
rzz = row3.z();
|
||||
rzx = rw3.x();
|
||||
rzy = rw3.y();
|
||||
rzz = rw3.z();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4BuildGeom.cc,v 1.17 2006-06-29 18:13:34 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// modified by I. Hrivnacova, 13.10.99
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ggclos.cc,v 1.8 2006-06-29 18:13:37 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
|
||||
#include "G3toG4.hh"
|
||||
#include "G3VolTable.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsatt.cc,v 1.13 2006-06-29 18:13:39 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G3toG4.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsbool.cc,v 1.2 2006-06-29 18:13:41 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, 13.10.01
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsdet.cc,v 1.5 2006-06-29 18:13:43 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G3toG4.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsdeta.cc,v 1.6 2006-06-29 18:13:45 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// modified by I.Hrivnacova, 6 Oct 99
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsdetd.cc,v 1.8 2006-06-29 18:13:47 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
|
||||
#include "G3toG4.hh"
|
||||
#include "G3DetTable.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsdeth.cc,v 1.8 2006-06-29 18:13:49 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
|
||||
#include "G3toG4.hh"
|
||||
#include "G3DetTable.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsdetu.cc,v 1.6 2006-06-29 18:13:51 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
|
||||
#include "G3toG4.hh"
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsdetv.cc,v 1.10 2006-06-29 18:13:53 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "G3toG4.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsdk.cc,v 1.7 2006-06-29 18:13:55 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
|
||||
#include "G4Decay.hh"
|
||||
#include "G3toG4.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsdvn.cc,v 1.10 2006-06-29 18:13:57 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, V.Berejnoi, 29 Oct 99
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsdvn2.cc,v 1.8 2006-06-29 18:14:00 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, V.Berejnoi, 29 Oct 99
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsdvt.cc,v 1.7 2006-06-29 18:14:03 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, V.Berejnoi, 29 Oct 99
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsdvt2.cc,v 1.7 2006-06-29 18:14:05 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, V.Berejnoi, 29 Oct 99
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsdvx.cc,v 1.5 2006-06-29 18:14:08 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, V.Berejnoi, 27 Sep 99
|
||||
|
||||
|
||||
@@ -24,13 +24,14 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsmate.cc,v 1.12 2006-06-29 18:14:10 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G3toG4.hh"
|
||||
#include "G3MatTable.hh"
|
||||
#include "G3EleTable.hh"
|
||||
@@ -116,17 +117,17 @@ void G4gsmate(G4int imate, G4String name, G4double ain, G4double zin,
|
||||
G4String sname = name.strip(G4String::both);
|
||||
if (sname == "AIR") {
|
||||
// handle the built in AIR mixture
|
||||
G4double a[2], z[2], wmat[2];
|
||||
a[0] = 14.01*g/mole;
|
||||
a[1] = 16.00*g/mole;
|
||||
z[0] = 7;
|
||||
z[1] = 8;
|
||||
G4double aa[2], zz[2], wmat[2];
|
||||
aa[0] = 14.01*g/mole;
|
||||
aa[1] = 16.00*g/mole;
|
||||
zz[0] = 7;
|
||||
zz[1] = 8;
|
||||
wmat[0] = 0.7;
|
||||
wmat[1] = 0.3;
|
||||
// G4double theDensity = 1.2931*mg/cm3;
|
||||
G4double theDensity = 0.0012931;
|
||||
int n=2;
|
||||
G4gsmixt(imate, sname, a, z, theDensity, n, wmat);
|
||||
G4int n=2;
|
||||
G4gsmixt(imate, sname, aa, zz, theDensity, n, wmat);
|
||||
}
|
||||
else if ( z<1 || dens < G3_minimum_density ) {
|
||||
// define vacuum according to definition from N03 example
|
||||
|
||||
@@ -24,14 +24,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsmixt.cc,v 1.13 2006-06-29 18:14:37 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
#include <iomanip>
|
||||
#include <iomanip>
|
||||
|
||||
#include "globals.hh"
|
||||
#include <iomanip>
|
||||
#include <iomanip>
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G3toG4.hh"
|
||||
#include "G3EleTable.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gspart.cc,v 1.7 2006-06-29 18:14:40 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G3toG4.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gspos.cc,v 1.13 2006-06-29 18:14:42 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, 13.10.99
|
||||
|
||||
@@ -34,6 +33,7 @@
|
||||
#include "G3toG4.hh"
|
||||
#include "G3Pos.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
void G4CreateCloneVTE(G3VolTableEntry* vte, G3VolTableEntry* mvte,
|
||||
G4double pars[], G4int npar, G4int num,
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsposp.cc,v 1.16 2006-06-29 18:14:44 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, 13.10.99
|
||||
|
||||
@@ -34,6 +33,7 @@
|
||||
#include "G3VolTable.hh"
|
||||
#include "G3toG4MakeSolid.hh"
|
||||
#include "G3Division.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4VSolid.hh"
|
||||
|
||||
G4bool G3NegVolPars(G4double pars[], G4int *nparpt,
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsrotm.cc,v 1.12 2006-06-29 18:14:55 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
#include "G3toG4.hh"
|
||||
#include "G3RotTable.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G3toG4RotationMatrix.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
void PG4gsrotm(G4String *tokens)
|
||||
{
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gstmed.cc,v 1.7 2006-06-29 18:15:02 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// The last G4int argument of G4gstmed(..) is used for sending
|
||||
// info whether the Geant3 tracking medium parameters should
|
||||
@@ -33,6 +32,7 @@
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G3toG4.hh"
|
||||
#include "G3MatTable.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gstpar.cc,v 1.8 2006-06-29 18:15:04 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
#include "G3toG4.hh"
|
||||
#include "G3VolTable.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4gsvolu.cc,v 1.10 2006-06-29 18:15:06 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// by I.Hrivnacova, 13.10.99
|
||||
|
||||
@@ -50,14 +49,14 @@ void PG4gsvolu(G4String *tokens) {
|
||||
}
|
||||
|
||||
G3VolTableEntry* G4CreateVTE(G4String vname, G4String shape, G4int nmed,
|
||||
G4double Rpar[], G4int npar)
|
||||
G4double rpar[], G4int npar)
|
||||
{
|
||||
// create the solid
|
||||
G4bool hasNegPars;
|
||||
G4bool deferred;
|
||||
G4bool okAxis[3];
|
||||
G4VSolid* solid
|
||||
= G3toG4MakeSolid(vname, shape, Rpar, npar, hasNegPars, deferred, okAxis);
|
||||
= G3toG4MakeSolid(vname, shape, rpar, npar, hasNegPars, deferred, okAxis);
|
||||
|
||||
// if solid has been deferred
|
||||
// VTE is created with hasNegPars = true
|
||||
@@ -65,19 +64,19 @@ G3VolTableEntry* G4CreateVTE(G4String vname, G4String shape, G4int nmed,
|
||||
|
||||
// create VTE
|
||||
G3VolTableEntry* vte
|
||||
= new G3VolTableEntry(vname, shape, Rpar, npar, nmed, solid, hasNegPars);
|
||||
= new G3VolTableEntry(vname, shape, rpar, npar, nmed, solid, hasNegPars);
|
||||
G3Vol.PutVTE(vte);
|
||||
|
||||
return vte;
|
||||
}
|
||||
|
||||
void G4gsvolu(G4String vname, G4String shape, G4int nmed, G4double* Rpar,
|
||||
void G4gsvolu(G4String vname, G4String shape, G4int nmed, G4double* rpar,
|
||||
G4int npar)
|
||||
{
|
||||
/*
|
||||
G4cout << "Creating logical volume " << vname << " shape " << shape
|
||||
<< " nmed " << nmed << " #pars "<< npar << " parameters (cm): ";
|
||||
for (int ipar=0; ipar< npar; ipar++) G4cout << std::setw(8) << Rpar[ipar];
|
||||
for (int ipar=0; ipar< npar; ipar++) G4cout << std::setw(8) << rpar[ipar];
|
||||
G4cout << G4endl;
|
||||
*/
|
||||
if (G3Vol.GetVTE(vname)) {
|
||||
@@ -87,6 +86,6 @@ void G4gsvolu(G4String vname, G4String shape, G4int nmed, G4double* Rpar,
|
||||
return;
|
||||
}
|
||||
else {
|
||||
G4CreateVTE(vname, shape, nmed, Rpar, npar);
|
||||
G4CreateVTE(vname, shape, nmed, rpar, npar);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: clparse.cc,v 1.19 2008-11-17 08:33:57 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// modified by I.Hrivnacova
|
||||
// added G3SensVol
|
||||
@@ -227,7 +226,7 @@ void G3fillParams(G4String *tokens, const char *ptypes)
|
||||
// loop over ptypes
|
||||
//
|
||||
G4int i =0, ipt = 0, k = 0;
|
||||
G4int ni =0, nr = 0, ns = 0;
|
||||
G4int ni =0, nr = 0, nq = 0;
|
||||
while (ptypes[i] != '\0')
|
||||
{
|
||||
switch (ptypes[i])
|
||||
@@ -242,8 +241,8 @@ void G3fillParams(G4String *tokens, const char *ptypes)
|
||||
nr++; ipt++;
|
||||
break;
|
||||
case 's':
|
||||
Spar[ns] = tokens[ipt];
|
||||
ns++; ipt++;
|
||||
Spar[nq] = tokens[ipt];
|
||||
nq++; ipt++;
|
||||
break;
|
||||
case 'I':
|
||||
for (k=0; k < narray; k++)
|
||||
@@ -273,8 +272,8 @@ void G3fillParams(G4String *tokens, const char *ptypes)
|
||||
case 'S':
|
||||
for (k=0; k < narray; k++)
|
||||
{
|
||||
Spar[ns] = tokens[ipt];
|
||||
ns++; ipt++;
|
||||
Spar[nq] = tokens[ipt];
|
||||
nq++; ipt++;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: g4geom.cc.main,v 1.2 1999-12-05 17:50:17 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// g4geom
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user