Import Geant4 1.1.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3CalcParams.cc,v 1.2 1999/12/05 17:50:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G3CalcParams.cc,v 1.3 1999/12/15 14:49:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// Change: G3CalcParamsFn returns true only in case
|
||||
// the parameters *after* processing this method
|
||||
@@ -114,7 +114,7 @@ G4bool G3CalcParamsFn(G4double *Rpar, G4int npar, G4double *Rparm,
|
||||
if (Rpar[2] < 0) NegPresent = TRUE;
|
||||
}
|
||||
if (Rpar[0] < 0) {
|
||||
if (Rparm != 0) Rpar[0] = min(Rparm[0],Rparm[1]) +
|
||||
if (Rparm != 0) Rpar[0] = G4std::min(Rparm[0],Rparm[1]) +
|
||||
abs(Rparm[0]-Rparm[1])*.5*Rpar[2]/Rparm[3];
|
||||
if (Rpar[0] < 0) NegPresent = TRUE;
|
||||
}
|
||||
@@ -125,12 +125,12 @@ G4bool G3CalcParamsFn(G4double *Rpar, G4int npar, G4double *Rparm,
|
||||
if (Rpar[2]<0) NegPresent = TRUE;
|
||||
}
|
||||
if (Rpar[0] < 0) {
|
||||
if (Rparm != 0) Rpar[0] = min(Rparm[0],Rparm[1]) +
|
||||
if (Rparm != 0) Rpar[0] = G4std::min(Rparm[0],Rparm[1]) +
|
||||
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] = min(Rparm[2],Rparm[3]) +
|
||||
if (Rparm != 0) Rpar[1] = G4std::min(Rparm[2],Rparm[3]) +
|
||||
abs(Rparm[2]-Rparm[3])*.5*Rpar[2]/Rparm[4];
|
||||
if (Rpar[1]<0) NegPresent = TRUE;
|
||||
}
|
||||
@@ -142,16 +142,16 @@ G4bool G3CalcParamsFn(G4double *Rpar, G4int npar, G4double *Rparm,
|
||||
}
|
||||
if (Rpar[0] < 0) {
|
||||
if (Rparm != 0) {
|
||||
G4double xlo = min(Rparm[4],Rparm[8]) +
|
||||
G4double xlo = G4std::min(Rparm[4],Rparm[8]) +
|
||||
abs(Rparm[4]-Rparm[8])*.5*Rpar[2]/Rparm[0];
|
||||
G4double xhi = min(Rparm[5],Rparm[9]) +
|
||||
G4double xhi = G4std::min(Rparm[5],Rparm[9]) +
|
||||
abs(Rparm[5]-Rparm[9])*.5*Rpar[2]/Rparm[0];
|
||||
Rpar[0] = min(xlo,xhi);
|
||||
Rpar[0] = G4std::min(xlo,xhi);
|
||||
}
|
||||
if (Rpar[0] < 0) NegPresent = TRUE;
|
||||
}
|
||||
if (Rpar[1] < 0) {
|
||||
if (Rparm != 0) Rpar[1] = min(Rparm[3],Rparm[7]) +
|
||||
if (Rparm != 0) Rpar[1] = G4std::min(Rparm[3],Rparm[7]) +
|
||||
abs(Rparm[3]-Rparm[7])*.5*Rpar[2]/Rparm[0];
|
||||
if (Rpar[1] < 0) NegPresent = TRUE;
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3DetTable.cc,v 1.7 1999/12/05 17:50:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G3DetTable.cc,v 1.9 2000/03/02 17:54:05 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
#include "globals.hh"
|
||||
#include "G3DetTable.hh"
|
||||
|
||||
typedef G4std::map<G4String, G3DetTableEntry*, less<G4String> >
|
||||
typedef G4std::map<G4String, G3DetTableEntry*, G4std::less<G4String> >
|
||||
::iterator DTDiterator;
|
||||
|
||||
G4String
|
||||
@@ -24,13 +24,13 @@ G3DetTable::G3DetTable(){
|
||||
|
||||
G3DetTable::~G3DetTable(){
|
||||
if (DTD.size() > 0) {
|
||||
// G4cout << "Deleting DTD" << endl;
|
||||
// G4cout << "Deleting DTD" << G4endl;
|
||||
for (DTDiterator i=DTD.begin(); i != DTD.end(); i++) {
|
||||
delete (*i).second;
|
||||
}
|
||||
DTD.clear();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
G4VSensitiveDetector*
|
||||
G3DetTable::GetSD(G4String& set, G4String& det){
|
||||
@@ -70,7 +70,7 @@ G3DetTable::Put(G4String& set, G4String& det, G4int id,
|
||||
// make hash ID
|
||||
G4String ShashID = MakeHash(set, det);
|
||||
G3DetTableEntry* DTE = new G3DetTableEntry(set, det, id, D);
|
||||
G4cout << "Inserted DTE with id " << ShashID << endl;
|
||||
G4cout << "Inserted DTE with id " << ShashID << G4endl;
|
||||
DTD[ShashID] = DTE;
|
||||
}
|
||||
|
||||
@@ -78,12 +78,12 @@ void
|
||||
G3DetTable::PrintAll(){
|
||||
if (DTD.size()>0){
|
||||
G4int count=0;
|
||||
G4cout << "Dump of DTD - " << DTD.size() << " entries:" << endl;
|
||||
G4cout << "Dump of DTD - " << DTD.size() << " entries:" << G4endl;
|
||||
for (DTDiterator i=DTD.begin(); i != DTD.end(); i++) {
|
||||
count++;
|
||||
G3DetTableEntry* DTE = (*i).second;
|
||||
G4cout << "DTD entry " << setw(3) << count << " sensitive detector name: "
|
||||
<< DTE->GetSD()->GetName() << endl;
|
||||
G4cout << "DTD entry " << G4std::setw(3) << count << " sensitive detector name: "
|
||||
<< DTE->GetSD()->GetName() << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3DetTableEntry.cc,v 1.2 1999/12/05 17:50:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G3DetTableEntry.cc,v 1.3 2000/03/02 17:54:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
#include "globals.hh"
|
||||
#include "G3DetTableEntry.hh"
|
||||
@@ -18,7 +18,7 @@ G3DetTableEntry::G3DetTableEntry(G4String& set, G4String& det, G4int id,
|
||||
_det = det;
|
||||
_id = id;
|
||||
_detpt = D;
|
||||
};
|
||||
}
|
||||
|
||||
G3DetTableEntry::~G3DetTableEntry(){;}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3Division.cc,v 1.2 1999/12/05 17:50:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G3Division.cc,v 1.6 2000/03/02 17:54:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, V.Berejnoi 13.10.99
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "G3VolTableEntry.hh"
|
||||
#include "G3toG4MakeSolid.hh"
|
||||
#include "G3Pos.hh"
|
||||
|
||||
#include "G3toG4Debug.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
@@ -109,7 +109,13 @@ G4VPhysicalVolume* G3Division::CreatePVReplica()
|
||||
|
||||
G4PVReplica* pvol
|
||||
= new G4PVReplica(name, lv, mlv, fAxis, fNofDivisions, fWidth, fOffset);
|
||||
|
||||
if (G3toG4Debug() != 0) {
|
||||
G4cout << "Create G4PVReplica name " << name << " logical volume name "
|
||||
<< lv->GetName() << " mother logical volme name "
|
||||
<< mlv->GetName() << " axis " << fAxis << " ndivisions "
|
||||
<< fNofDivisions << " width " << fWidth << " Offset "
|
||||
<< fOffset << G4endl;
|
||||
}
|
||||
return pvol;
|
||||
}
|
||||
|
||||
@@ -141,7 +147,7 @@ void G3Division::SetRangeAndAxis()
|
||||
}
|
||||
else if ( shape == "TRD1" ) {
|
||||
if (fIAxis == 1){
|
||||
fHighRange = max(Rpar[0]*cm, Rpar[1]*cm);
|
||||
fHighRange = G4std::max(Rpar[0]*cm, Rpar[1]*cm);
|
||||
}
|
||||
else if( fIAxis == 2) {
|
||||
fHighRange = Rpar[2]*cm;
|
||||
@@ -153,10 +159,10 @@ void G3Division::SetRangeAndAxis()
|
||||
}
|
||||
else if ( shape == "TRD2" ) {
|
||||
if (fIAxis == 1){
|
||||
fHighRange = max(Rpar[0]*cm, Rpar[1]*cm);
|
||||
fHighRange = G4std::max(Rpar[0]*cm, Rpar[1]*cm);
|
||||
}
|
||||
else if( fIAxis == 2) {
|
||||
fHighRange = max(Rpar[2]*cm, Rpar[3]*cm);
|
||||
fHighRange = G4std::max(Rpar[2]*cm, Rpar[3]*cm);
|
||||
}
|
||||
else if( fIAxis == 3) {
|
||||
fHighRange = Rpar[4]*cm;
|
||||
@@ -204,8 +210,8 @@ void G3Division::SetRangeAndAxis()
|
||||
}
|
||||
else if ( shape == "CONE" ) {
|
||||
if (fIAxis == 1){
|
||||
fHighRange = max(Rpar[2]*cm,Rpar[4]*cm);
|
||||
fLowRange = max(Rpar[1]*cm,Rpar[3]*cm);
|
||||
fHighRange = G4std::max(Rpar[2]*cm,Rpar[4]*cm);
|
||||
fLowRange = G4std::max(Rpar[1]*cm,Rpar[3]*cm);
|
||||
fAxis = kRho;
|
||||
}
|
||||
else if( fIAxis == 2) {
|
||||
@@ -221,8 +227,8 @@ void G3Division::SetRangeAndAxis()
|
||||
}
|
||||
else if ( shape == "CONS" ) {
|
||||
if (fIAxis == 1){
|
||||
fHighRange = max(Rpar[2]*cm,Rpar[4]*cm);
|
||||
fLowRange = max(Rpar[1]*cm,Rpar[3]*cm);
|
||||
fHighRange = G4std::max(Rpar[2]*cm,Rpar[4]*cm);
|
||||
fLowRange = G4std::max(Rpar[1]*cm,Rpar[3]*cm);
|
||||
fAxis = kRho;
|
||||
}
|
||||
else if( fIAxis == 2) {
|
||||
@@ -245,13 +251,13 @@ void G3Division::SetRangeAndAxis()
|
||||
fAxis = kRho;
|
||||
}
|
||||
else if( fIAxis == 2) {
|
||||
fLowRange = min(Rpar[2]*deg,Rpar[3]*deg);
|
||||
fHighRange = max(Rpar[2]*deg,Rpar[3]*deg);
|
||||
fLowRange = G4std::min(Rpar[2]*deg,Rpar[3]*deg);
|
||||
fHighRange = G4std::max(Rpar[2]*deg,Rpar[3]*deg);
|
||||
fAxis = kPhi;
|
||||
}
|
||||
else if( fIAxis == 3) {
|
||||
fLowRange = min(Rpar[4]*deg,Rpar[5]*deg);
|
||||
fHighRange = max(Rpar[4]*deg,Rpar[5]*deg);
|
||||
fLowRange = G4std::min(Rpar[4]*deg,Rpar[5]*deg);
|
||||
fHighRange = G4std::max(Rpar[4]*deg,Rpar[5]*deg);
|
||||
fAxis = kPhi; // ??????
|
||||
}
|
||||
}
|
||||
@@ -285,10 +291,10 @@ void G3Division::SetRangeAndAxis()
|
||||
DzArray[i] = Rpar[i4]*cm;
|
||||
Rmin[i] = Rpar[i5]*cm;
|
||||
Rmax[i] = Rpar[i6]*cm;
|
||||
rangelo[0] = min(rangelo[0], Rmin[i]);
|
||||
rangehi[0] = max(rangehi[0], Rmax[i]);
|
||||
rangelo[2] = min(rangelo[2], DzArray[i]);
|
||||
rangehi[2] = max(rangehi[2], DzArray[i]);
|
||||
rangelo[0] = G4std::min(rangelo[0], Rmin[i]);
|
||||
rangehi[0] = G4std::max(rangehi[0], Rmax[i]);
|
||||
rangelo[2] = G4std::min(rangelo[2], DzArray[i]);
|
||||
rangehi[2] = G4std::max(rangehi[2], DzArray[i]);
|
||||
}
|
||||
for (i=0;i<nz;i++){
|
||||
assert(Rmin[i]>=0 && Rmax[i]>=Rmin[i]);
|
||||
@@ -331,10 +337,10 @@ void G3Division::SetRangeAndAxis()
|
||||
DzArray[i] = Rpar[i4]*cm;
|
||||
Rmin[i] = Rpar[i5]*cm;
|
||||
Rmax[i] = Rpar[i6]*cm;
|
||||
rangelo[0] = min(rangelo[0], Rmin[i]);
|
||||
rangehi[0] = max(rangehi[0], Rmax[i]);
|
||||
rangelo[2] = min(rangelo[2], DzArray[i]);
|
||||
rangehi[2] = max(rangehi[2], DzArray[i]);
|
||||
rangelo[0] = G4std::min(rangelo[0], Rmin[i]);
|
||||
rangehi[0] = G4std::max(rangehi[0], Rmax[i]);
|
||||
rangelo[2] = G4std::min(rangelo[2], DzArray[i]);
|
||||
rangehi[2] = G4std::max(rangehi[2], DzArray[i]);
|
||||
}
|
||||
for (i=0;i<nz;i++){
|
||||
assert(Rmin[i]>=0 && Rmax[i]>=Rmin[i]);
|
||||
@@ -361,8 +367,10 @@ void G3Division::SetRangeAndAxis()
|
||||
}
|
||||
|
||||
// verbose
|
||||
//G4cout << "SetRangeAndAxis: "
|
||||
// << fLowRange << " " << fHighRange << " " << fAxis << endl;
|
||||
if (G3toG4Debug() != 0) {
|
||||
G4cout << "Shape " << shape << " SetRangeAndAxis: "
|
||||
<< fLowRange << " " << fHighRange << " " << fAxis << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
G3VolTableEntry* G3Division::CreateEnvelope(G4String shape, G4double hi,
|
||||
@@ -374,7 +382,7 @@ G3VolTableEntry* G3Division::CreateEnvelope(G4String shape, G4double hi,
|
||||
// G4cout << " G3Division::CreateEnvelope " << "fIAaxis= " << fIAxis
|
||||
// << " hi= " << hi
|
||||
// << " lo= " << lo
|
||||
// << endl;
|
||||
// << G4endl;
|
||||
|
||||
G4double *Rpar = new G4double[npar+2];
|
||||
for (G4int i=0; i<npar; ++i){ Rpar[i] = par[i];}
|
||||
@@ -551,10 +559,10 @@ void G3Division::CreateSolid(G4String shape, G4double par[], G4int npar)
|
||||
|
||||
// verbose
|
||||
// G4cout << "G3Division::CreateSolid volume before: "
|
||||
// << fVTE->GetName() << " " << shape << endl;
|
||||
// << fVTE->GetName() << " " << shape << G4endl;
|
||||
// G4cout << " npar,Rpar: " << npar;
|
||||
// for (G4int ii = 0; ii < npar; ++ii) G4cout << " " << Rpar[ii];
|
||||
// G4cout << endl;
|
||||
// G4cout << G4endl;
|
||||
|
||||
if ( shape == "BOX" ) {
|
||||
if ( fIAxis == 1 ) Rpar[0] = fWidth/2./cm;
|
||||
@@ -603,6 +611,7 @@ void G3Division::CreateSolid(G4String shape, G4double par[], G4int npar)
|
||||
else if ( shape == "TUBS" ) {
|
||||
if ( fIAxis == 1 ) {
|
||||
Rpar[1] = Rpar[0] + fWidth/cm;
|
||||
fOffset = Rpar[0]*cm;
|
||||
}
|
||||
else if ( fIAxis == 2 ) {
|
||||
fOffset = Rpar[3]*deg;
|
||||
@@ -686,10 +695,10 @@ void G3Division::CreateSolid(G4String shape, G4double par[], G4int npar)
|
||||
|
||||
// verbose
|
||||
// G4cout << "G3Division::CreateSolid volume after: "
|
||||
// << fVTE->GetName() << " " << shape << endl;
|
||||
// << fVTE->GetName() << " " << shape << G4endl;
|
||||
// G4cout << " npar,Rpar: " << npar;
|
||||
// for (G4int iii = 0; iii < npar; ++iii) G4cout << " " << Rpar[iii];
|
||||
// G4cout << endl;
|
||||
// G4cout << G4endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3EleTable.cc,v 1.6 1999/12/05 17:50:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G3EleTable.cc,v 1.9 2000/03/02 17:54:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G4strstreambuf.hh"
|
||||
@@ -23,13 +23,13 @@ G3EleTable::G3EleTable() :_MaxEle(109){
|
||||
G3EleTable::~G3EleTable(){
|
||||
delete [] _EleNames;
|
||||
delete [] _Ele;
|
||||
};
|
||||
}
|
||||
|
||||
G4Element*
|
||||
G3EleTable::GetEle(G4double Z){
|
||||
G4double A;
|
||||
char name[20], sym[3];
|
||||
G4int index = Z-1;
|
||||
G4int index = (G4int) Z-1;
|
||||
if (!parse(Z, name, sym, A)) {
|
||||
G4String nm(name);
|
||||
G4String sy(sym);
|
||||
@@ -45,14 +45,14 @@ int
|
||||
G3EleTable::parse(G4double& Z, char* name, char* sym, G4double& A){
|
||||
int rc = 0;
|
||||
if (Z>0 && Z <=_MaxEle){
|
||||
G4int z = Z-1;
|
||||
istrstream in(_EleNames[z]);
|
||||
G4int z = (G4int) Z-1;
|
||||
G4std::istrstream in(_EleNames[z]);
|
||||
in >> name >> sym >> A;
|
||||
} else {
|
||||
rc = -1;
|
||||
}
|
||||
return rc;
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
G3EleTable::LoadUp(){
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3MatTable.cc,v 1.12 1999/12/05 17:50:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3MatTableEntry.cc,v 1.2 1999/12/05 17:50:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3MedTable.cc,v 1.10 1999/12/05 17:50:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3MedTableEntry.cc,v 1.2 1999/12/05 17:50:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3NegVolPars.cc,v 1.5 1999/12/05 17:50:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G3NegVolPars.cc,v 1.6 2000/03/07 10:51:40 stesting Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// modified by I. Hrivnacova, 13.10.99
|
||||
|
||||
@@ -20,7 +20,7 @@ G4bool G3CalcParamsFn(G4double* Rpar, G4int npar, G4double* Rparm,
|
||||
G4String shape, G4String shapem);
|
||||
|
||||
G4bool G3NegVolPars(G4double pars[], G4int *nparpt,
|
||||
G3VolTableEntry* vte, G3VolTableEntry* mvte, char routine[])
|
||||
G3VolTableEntry* vte, G3VolTableEntry* mvte, const char routine[])
|
||||
{
|
||||
G4bool NegPresent = FALSE;
|
||||
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3PartTable.cc,v 1.7 1999/12/05 17:50:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G3PartTable.cc,v 1.9 2000/03/02 17:54:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "g4std/strstream"
|
||||
#include "g4std/iomanip"
|
||||
#include "G3PartTable.hh"
|
||||
|
||||
typedef G4std::map<G4String, G4ParticleDefinition*, less<G4String> >
|
||||
typedef G4std::map<G4String, G4ParticleDefinition*, G4std::less<G4String> >
|
||||
::iterator PTDiterator;
|
||||
|
||||
G3PartTable::G3PartTable(){
|
||||
@@ -21,7 +21,7 @@ G3PartTable::G3PartTable(){
|
||||
|
||||
G3PartTable::~G3PartTable(){
|
||||
if (PTD.size()>0){
|
||||
// G4cout << "Deleting PTD" << endl;
|
||||
// G4cout << "Deleting PTD" << G4endl;
|
||||
for (PTDiterator i=PTD.begin(); i != PTD.end(); i++) {
|
||||
delete (*i).second;
|
||||
}
|
||||
@@ -35,38 +35,38 @@ G3PartTable::Get(G4int partid){
|
||||
HashID(partid, ShashID);
|
||||
PTDiterator i = PTD.find(ShashID);
|
||||
return (*i).second;
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
G3PartTable::Put(G4int partid, G4ParticleDefinition *partpt){
|
||||
G4String ShashID; // static
|
||||
HashID(partid, ShashID);
|
||||
PTD[ShashID]=partpt;
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
G3PartTable::HashID(G4int partid, G4String& theHashID){
|
||||
char s[20];
|
||||
ostrstream ostr(s, sizeof s);
|
||||
ostr << "Part" << partid << ends;
|
||||
G4std::ostrstream ostr(s, sizeof s);
|
||||
ostr << "Part" << partid << G4std::ends;
|
||||
theHashID = s;
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
G3PartTable::HashID(G4int partid, G4String* theHashID){
|
||||
HashID(partid, *theHashID);
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
G3PartTable::PrintAll(){
|
||||
if (PTD.size()>0){
|
||||
G4int count=0;
|
||||
G4cout << "Dump of PTD - " << PTD.size() << " entries: " << endl;
|
||||
G4cout << "Dump of PTD - " << PTD.size() << " entries: " << G4endl;
|
||||
for (PTDiterator i=PTD.begin(); i != PTD.end(); i++) {
|
||||
count++;
|
||||
G4ParticleDefinition* aPTD = (*i).second;
|
||||
G4cout << "PTD entry " << setw(3) << count << " particle name: "
|
||||
<< aPTD->GetParticleName() << endl;
|
||||
G4cout << "PTD entry " << G4std::setw(3) << count << " particle name: "
|
||||
<< aPTD->GetParticleName() << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+14
-12
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3Pos.cc,v 1.5 1999/12/05 17:50:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G3Pos.cc,v 1.7 2000/03/02 17:54:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// modified by I.Hrivnacova, 13.10.99
|
||||
|
||||
@@ -25,36 +25,38 @@ G3Pos::G3Pos(G4String motherName, G4int C, G4ThreeVector* Position, G4int irot,
|
||||
// warning when MANY position is created
|
||||
G4String text = "G3Pos warning: Not supported MANY option has been encountered.\n";
|
||||
text = text + " It may cause overlapping volumes.";
|
||||
G4cerr << text << endl;;
|
||||
G4cerr << text << G4endl;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
G3Pos::~G3Pos(){;};
|
||||
G3Pos::~G3Pos(){;}
|
||||
|
||||
G4bool
|
||||
G3Pos::operator == ( const G3Pos& lv) const {
|
||||
return (this==&lv) ? true : false;
|
||||
};
|
||||
}
|
||||
|
||||
G4String&
|
||||
G3Pos::GetMotherName() {
|
||||
return _MotherName;
|
||||
};
|
||||
}
|
||||
|
||||
G4int
|
||||
G3Pos::GetIrot() {
|
||||
return _Irot;
|
||||
};
|
||||
}
|
||||
|
||||
G4int
|
||||
G3Pos::GetCopy() {
|
||||
return _Copy;
|
||||
};
|
||||
}
|
||||
|
||||
G4ThreeVector*
|
||||
G3Pos::GetPos() {
|
||||
return _Position;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
G4String&
|
||||
G3Pos::GetOnly() {
|
||||
return _Only;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3RotTable.cc,v 1.11 1999/12/05 17:50:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3RotTableEntry.cc,v 1.2 1999/12/05 17:50:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3VolTable.cc,v 1.17 1999/12/05 17:50:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G3VolTable.cc,v 1.19 2000/03/02 17:54:07 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// modified by I.Hrivnacova, 13.10.99
|
||||
|
||||
@@ -15,40 +15,41 @@
|
||||
#include "G3VolTable.hh"
|
||||
#include "G3Pos.hh"
|
||||
|
||||
typedef G4std::map<G4String, G3VolTableEntry*, less<G4String> >
|
||||
typedef G4std::map<G4String, G3VolTableEntry*, G4std::less<G4String> >
|
||||
::iterator VTDiterator;
|
||||
|
||||
G3VolTable::G3VolTable()
|
||||
: G3toG4TopVTE(0), _FirstKey("UnDefined"), _NG3Pos(0){
|
||||
};
|
||||
}
|
||||
|
||||
G3VolTable::~G3VolTable(){
|
||||
if (VTD.size()>0){
|
||||
// G4cout << "Deleting VTD" << endl;
|
||||
// G4cout << "Deleting VTD" << G4endl;
|
||||
for (VTDiterator i=VTD.begin(); i != VTD.end(); i++) {
|
||||
delete (*i).second;
|
||||
}
|
||||
VTD.clear();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
G3VolTableEntry*
|
||||
G3VolTable::GetVTE(const G4String& Vname) {
|
||||
VTDiterator i = VTD.find(Vname);
|
||||
return (*i).second;
|
||||
};
|
||||
if (i == VTD.end()) return 0;
|
||||
else return (*i).second;
|
||||
}
|
||||
|
||||
void
|
||||
G3VolTable::PrintAll(){
|
||||
if (VTD.size()){
|
||||
G4int i=0;
|
||||
G4cout << "Dump of VTD - " << VTD.size() << " entries:" << endl;
|
||||
G4cout << "Dump of VTD - " << VTD.size() << " entries:" << G4endl;
|
||||
VTEStat();
|
||||
for (VTDiterator v=VTD.begin(); v != VTD.end(); v++){
|
||||
G3VolTableEntry* VTE = (*v).second;
|
||||
G4cout << "G3VolTable element " << setw(3) << i++ << " name "
|
||||
G4cout << "G3VolTable element " << G4std::setw(3) << i++ << " name "
|
||||
<< VTE->GetName() << " has " << VTE->GetNoDaughters()
|
||||
<< " daughters" << endl;
|
||||
<< " daughters" << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,7 +68,7 @@ G3VolTable::PutVTE(G3VolTableEntry* aG3VolTableEntry){
|
||||
VTD[HashID] = aG3VolTableEntry;
|
||||
}
|
||||
return GetVTE(aG3VolTableEntry->GetName());
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
G3VolTable::CountG3Pos(){
|
||||
@@ -87,11 +88,24 @@ G3VolTable::SetFirstVTE(){
|
||||
G3VolTableEntry*
|
||||
G3VolTable::GetFirstVTE() {
|
||||
return G3toG4TopVTE;
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
G3VolTable::VTEStat() {
|
||||
G4cout << "Instantiated " << VTD.size() <<
|
||||
" volume table entries \n"
|
||||
<< " " << _NG3Pos << " positions." << endl;
|
||||
<< " " << _NG3Pos << " positions." << G4endl;
|
||||
}
|
||||
|
||||
void
|
||||
G3VolTable::Clear() {
|
||||
if (VTD.size()>0){
|
||||
for (VTDiterator i=VTD.begin(); i != VTD.end(); i++) {
|
||||
delete (*i).second;
|
||||
}
|
||||
VTD.clear();
|
||||
}
|
||||
G3toG4TopVTE = 0;
|
||||
_FirstKey = "UnDefined";
|
||||
_NG3Pos = 0;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3VolTableEntry.cc,v 1.2 1999/12/05 17:50:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G3VolTableEntry.cc,v 1.4 2000/03/02 17:54:07 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// modified by I.Hrivnacova, 13.10.99
|
||||
|
||||
@@ -38,7 +38,7 @@ G3VolTableEntry::~G3VolTableEntry(){
|
||||
inline G4bool
|
||||
G3VolTableEntry::operator == ( const G3VolTableEntry& lv) const {
|
||||
return (this==&lv) ? true : false;
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
G3VolTableEntry::AddG3Pos(G3Pos* aG3Pos){
|
||||
@@ -105,7 +105,7 @@ G3VolTableEntry::FindDaughter(const G4String& Dname){
|
||||
if (GetDaughter(idau)->GetName() == Dname) return GetDaughter(idau);
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
|
||||
G3VolTableEntry*
|
||||
G3VolTableEntry::FindMother(const G4String& Mname){
|
||||
@@ -114,7 +114,7 @@ G3VolTableEntry::FindMother(const G4String& Mname){
|
||||
if (mvte->GetName() == Mname) return mvte;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
|
||||
G3VolTableEntry*
|
||||
G3VolTableEntry::FindClone(const G4String& Cname){
|
||||
@@ -123,29 +123,29 @@ G3VolTableEntry::FindClone(const G4String& Cname){
|
||||
if (cvte->GetName() == Cname) return cvte;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
|
||||
void G3VolTableEntry::PrintSolidInfo() {
|
||||
// only parameters related to solid definition
|
||||
// are printed
|
||||
G4cout << "VTE: " << fVname << " " << this << endl;
|
||||
G4cout << "Solid: " << fSolid << endl;
|
||||
G4cout << "VTE: " << fVname << " " << this << G4endl;
|
||||
G4cout << "Solid: " << fSolid << G4endl;
|
||||
G4cout << "Parameters (npar = " << fNpar << ") fRpar: ";
|
||||
for (G4int i=0; i<fNpar; i++) G4cout << fRpar[i] << " ";
|
||||
G4cout << endl;
|
||||
G4cout << "HasNegPars: " << fHasNegPars << endl;
|
||||
G4cout << "================================= " << endl;
|
||||
G4cout << G4endl;
|
||||
G4cout << "HasNegPars: " << fHasNegPars << G4endl;
|
||||
G4cout << "================================= " << G4endl;
|
||||
}
|
||||
|
||||
void
|
||||
G3VolTableEntry::SetName(G4String name){
|
||||
fVname = name;
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
G3VolTableEntry::SetLV(G4LogicalVolume* lv){
|
||||
fLV = lv;
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
G3VolTableEntry::SetSolid(G4VSolid* solid){
|
||||
@@ -172,32 +172,32 @@ void G3VolTableEntry::SetHasNegPars(G4bool hasNegPars) {
|
||||
G4String
|
||||
G3VolTableEntry::GetName() {
|
||||
return fVname;
|
||||
};
|
||||
}
|
||||
|
||||
G4String
|
||||
G3VolTableEntry::GetShape() {
|
||||
return fShape;
|
||||
};
|
||||
}
|
||||
|
||||
G4int
|
||||
G3VolTableEntry::GetNmed() {
|
||||
return fNmed;
|
||||
};
|
||||
}
|
||||
|
||||
G4int
|
||||
G3VolTableEntry::GetNpar() {
|
||||
return fNpar;
|
||||
};
|
||||
}
|
||||
|
||||
G4double*
|
||||
G3VolTableEntry::GetRpar() {
|
||||
return fRpar;
|
||||
};
|
||||
}
|
||||
|
||||
G4int
|
||||
G3VolTableEntry::NPCopies() {
|
||||
return fG3Pos.entries();
|
||||
};
|
||||
}
|
||||
|
||||
G3Pos*
|
||||
G3VolTableEntry::GetG3PosCopy(G4int copy) {
|
||||
@@ -210,22 +210,22 @@ G3VolTableEntry::GetG3PosCopy(G4int copy) {
|
||||
G4bool
|
||||
G3VolTableEntry::HasNegPars(){
|
||||
return fHasNegPars;
|
||||
};
|
||||
}
|
||||
|
||||
G4VSolid*
|
||||
G3VolTableEntry::GetSolid() {
|
||||
return fSolid;
|
||||
};
|
||||
}
|
||||
|
||||
G4LogicalVolume*
|
||||
G3VolTableEntry::GetLV() {
|
||||
return fLV;
|
||||
};
|
||||
}
|
||||
|
||||
G4int
|
||||
G3VolTableEntry::GetNoDaughters() {
|
||||
return fDaughters.entries();
|
||||
};
|
||||
}
|
||||
|
||||
G4int
|
||||
G3VolTableEntry::GetNoMothers() {
|
||||
@@ -243,7 +243,7 @@ G3VolTableEntry::GetDaughter(G4int i) {
|
||||
return fDaughters[i];
|
||||
else
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
|
||||
G3VolTableEntry*
|
||||
G3VolTableEntry::GetMother(G4int i){
|
||||
@@ -251,7 +251,7 @@ G3VolTableEntry::GetMother(G4int i){
|
||||
return fMothers[i];
|
||||
else
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
|
||||
// to be removed
|
||||
G3VolTableEntry*
|
||||
@@ -260,7 +260,7 @@ G3VolTableEntry::GetMother(){
|
||||
return fMothers[0];
|
||||
else
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
|
||||
G3VolTableEntry*
|
||||
G3VolTableEntry::GetClone(G4int i){
|
||||
@@ -268,7 +268,7 @@ G3VolTableEntry::GetClone(G4int i){
|
||||
return fClones[i];
|
||||
else
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
|
||||
G3VolTableEntry*
|
||||
G3VolTableEntry::GetMasterClone(){
|
||||
@@ -282,4 +282,4 @@ G3VolTableEntry::GetMasterClone(){
|
||||
master = this;
|
||||
|
||||
return master;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3fillParams.cc,v 1.2 1999/12/05 17:50:11 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G3fillParams.cc.archive,v 1.1 1999/12/06 19:19:57 lockman Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// extracted from clparse.cc by I. Hrivnacova, 30.7.99
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3toG4BuildTree.cc,v 1.8 1999/12/05 17:50:11 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G3toG4BuildTree.cc,v 1.11 1999/12/15 14:49:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// modified by I. Hrivnacova, 2.8.99
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "globals.hh"
|
||||
#include "G3toG4Debug.hh"
|
||||
|
||||
void G3toG4BuildTree(G3VolTableEntry* curVTE, G3VolTableEntry* motherVTE)
|
||||
{
|
||||
@@ -60,7 +61,7 @@ void G3toG4BuildTree(G3VolTableEntry* curVTE, G3VolTableEntry* motherVTE)
|
||||
else {
|
||||
mothLV = 0;
|
||||
}
|
||||
|
||||
|
||||
// positions in motherVTE
|
||||
for (G4int i=0; i<curVTE->NPCopies(); i++){
|
||||
|
||||
@@ -76,29 +77,35 @@ void G3toG4BuildTree(G3VolTableEntry* curVTE, G3VolTableEntry* motherVTE)
|
||||
// (in G3 numbering starts from 1 but in G4 from 0)
|
||||
G4int copyNo = theG3Pos->GetCopy() - 1;
|
||||
|
||||
// position it
|
||||
new G4PVPlacement(theMatrix, // rotation matrix
|
||||
*(theG3Pos->GetPos()), // its position
|
||||
curLog, // its LogicalVolume
|
||||
curVTE->GetName(), // PV name
|
||||
mothLV, // Mother LV
|
||||
0, // only
|
||||
copyNo); // copy
|
||||
|
||||
// position it if not top-level volume
|
||||
if (mothLV != 0) {
|
||||
new G4PVPlacement(theMatrix, // rotation matrix
|
||||
*(theG3Pos->GetPos()), // its position
|
||||
curLog, // its LogicalVolume
|
||||
curVTE->GetName(), // PV name
|
||||
mothLV, // Mother LV
|
||||
0, // only
|
||||
copyNo); // copy
|
||||
|
||||
// verbose
|
||||
// G4cout << "PV: " << i << "th copy of " << curVTE->GetName()
|
||||
// << " in " << motherVTE->GetName() << " copyNo: "
|
||||
// << copyNo << " irot: " << irot << " pos: "
|
||||
// << *(theG3Pos->GetPos()) << endl;
|
||||
|
||||
if (G3toG4Debug() != 0)
|
||||
G4cout << "PV: " << i << "th copy of " << curVTE->GetName()
|
||||
<< " in " << motherVTE->GetName() << " copyNo: "
|
||||
<< copyNo << " irot: " << irot << " pos: "
|
||||
<< *(theG3Pos->GetPos()) << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// divisions
|
||||
if (curVTE->GetDivision()) {
|
||||
curVTE->GetDivision()->CreatePVReplica();
|
||||
// verbose
|
||||
// G4cout << "PVReplica: " << curVTE->GetName()
|
||||
// << " in " << motherVTE->GetName() << endl;
|
||||
curVTE->GetDivision()->CreatePVReplica();
|
||||
// verbose
|
||||
if (G3toG4Debug() != 0) {
|
||||
G4cout << "CreatePVReplica: " << curVTE->GetName()
|
||||
<< " in " << motherVTE->GetName() << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3toG4Debug.cc,v 1.1 1999/12/09 01:27:49 lockman Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G3toG4Debug.hh"
|
||||
G4int
|
||||
G3toG4Debug()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3toG4MakeSolid.cc,v 1.3 1999/12/05 17:50:11 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G3toG4MakeSolid.cc,v 1.4 1999/12/15 14:49:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// modified by I.Hrivnacova, V.Berejnoi 27 Sep 99
|
||||
|
||||
@@ -273,7 +273,7 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
|
||||
} else if ( shape == "ELTU" ) {
|
||||
// $$$ not implemented.
|
||||
G4cerr << "ELTU not supported" << endl;
|
||||
G4cerr << "ELTU not supported" << G4endl;
|
||||
|
||||
} else if ( shape == "HYPE" ) {
|
||||
G4double pRmin = Rpar[0]*cm;
|
||||
@@ -287,16 +287,16 @@ G4VSolid* G3toG4MakeSolid(const G4String& vname, const G4String& shape,
|
||||
solid = new G4Hype(vname, pRmin, pRmax, pThet, pThet, pDz);
|
||||
} else {
|
||||
G4cerr << "Negative length parameters not supported for shape "
|
||||
<< shape << endl;
|
||||
<< shape << G4endl;
|
||||
}
|
||||
|
||||
} else if ( shape == "GTRA" ) {
|
||||
// $$$ not implemented.
|
||||
G4cerr << "GTRA not supported" << endl;
|
||||
G4cerr << "GTRA not supported" << G4endl;
|
||||
|
||||
} else if ( shape == "CTUB" ) {
|
||||
// $$$ not implemented.
|
||||
G4cerr << "CTUB not supported" << endl;
|
||||
G4cerr << "CTUB not supported" << G4endl;
|
||||
}
|
||||
return solid;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G3toG4RotationMatrix.cc,v 1.2 1999/12/05 17:50:11 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
#include "G3toG4RotationMatrix.hh"
|
||||
|
||||
|
||||
@@ -1,191 +0,0 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4.cc.omit,v 1.2 1999/12/05 17:50:11 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
#include "G3toG4.hh"
|
||||
|
||||
//G4GeometryManager::G4GeometryManager()
|
||||
//{
|
||||
// ofile << "G4GeometryManager: Open manager\n";
|
||||
//}
|
||||
|
||||
//void G4GeometryManager::CloseGeometry()
|
||||
//{
|
||||
// ofile << "G4GeometryManager::CloseGeometry close geometry\n";
|
||||
//}
|
||||
|
||||
G4VSolid::G4VSolid()
|
||||
{
|
||||
ofile << "G4VSolid: Making solid\n";
|
||||
}
|
||||
|
||||
G4VSolid::G4VSolid(G4String shape, G4double* )
|
||||
{
|
||||
ofile << "G4VSolid: Making solid " << shape << '\n';
|
||||
}
|
||||
|
||||
G4VSolid::G4VSolid(G4String shape, G4double* , G4Angles)
|
||||
{
|
||||
ofile << "G4VSolid: Making solid " << shape << '\n';
|
||||
}
|
||||
|
||||
G4Material::G4Material(G4String name, G4double dens)
|
||||
{
|
||||
ofile << "G4Material: Making material '" << name << "' density " << dens << '\n';
|
||||
}
|
||||
|
||||
void G4Material::add(G4double a, G4double z, G4double fraction)
|
||||
{
|
||||
ofile << " G4Material::add a,z,fraction " << a << " " << z << " " << fraction << '\n';
|
||||
}
|
||||
|
||||
G4UserLimits::G4UserLimits(G4double stepmin, G4double stepmax)
|
||||
{
|
||||
ofile << "G4UserLimits: stepmin " << stepmin << " max " << stepmax << '\n';
|
||||
}
|
||||
|
||||
G4LogicalVolume::G4LogicalVolume(G4String name, G4VSolid*, G4Material*,
|
||||
G4MagneticField*, G4UserLimits*)
|
||||
{
|
||||
myname = name;
|
||||
ofile << "G4LogicalVolume: Creating logical volume " << name << '\n';
|
||||
}
|
||||
|
||||
void G4LogicalVolume::ApplyAttribute(G4String attribute, G4int ival)
|
||||
{
|
||||
ofile << "G4LogicalVolume::ApplyAttribute " << attribute << " to volume " << myname
|
||||
<< ", value " << ival << '\n';
|
||||
}
|
||||
|
||||
G4VPhysicalVolume::G4VPhysicalVolume()
|
||||
{
|
||||
ofile << "G4VPhysicalVolume: Make physical vol\n";
|
||||
}
|
||||
|
||||
G4VPhysicalVolume* G4PVPlacement(G4String name, G4LogicalVolume*,
|
||||
G4VPhysicalVolume* p, G4Transform*,
|
||||
G4int, G4Only)
|
||||
{
|
||||
ofile << "G4PVPLacement: Place phys vol " << name << '\n';
|
||||
return p;
|
||||
}
|
||||
|
||||
G4VPhysicalVolume* G4PVIndex(G4String name, G4LogicalVolume*,
|
||||
G4VPhysicalVolume* p, G4Transform*,
|
||||
G4int, G4Only, G4double*,
|
||||
G4int npars)
|
||||
{
|
||||
ofile << "G4PVIndex: Place index vols " << name << " " << npars << '\n';
|
||||
return p;
|
||||
}
|
||||
|
||||
void G4PVReplicas(G4String name, G4LogicalVolume*, G4VPhysicalVolume*,
|
||||
EAxis, G4int ndiv, G4double range, G4double offset)
|
||||
{
|
||||
ofile << "G4PVReplicas: Place replicas " << name << " " << ndiv << " " << range <<
|
||||
" " << offset << '\n';
|
||||
}
|
||||
|
||||
void G4PVParametrized(G4String name, void* , G4LogicalVolume*,
|
||||
G4VPhysicalVolume*, EAxis, G4int ndiv,
|
||||
G4double range, G4double offset)
|
||||
{
|
||||
ofile << "G4PVParametrized: Place parametrized volumes " << name
|
||||
<< " " << ndiv << " " << range << " " << offset << '\n';
|
||||
}
|
||||
|
||||
G4ProcessManager::G4ProcessManager(G4String name)
|
||||
{
|
||||
ofile << "G4ProcessManager: " << " manager for " << name << '\n';
|
||||
}
|
||||
|
||||
G4Decay::G4Decay()
|
||||
{
|
||||
ofile << "G4Decay: Create decay object\n";
|
||||
}
|
||||
|
||||
void G4Decay::AddMode(G4int mode, G4double br)
|
||||
{
|
||||
ofile << "G4Decay::AddMode: add mode ID " << mode << " BR " << br
|
||||
<< '\n';
|
||||
}
|
||||
|
||||
|
||||
G4ParticleDef::G4ParticleDef(G4String name, G4ProcessManager*,
|
||||
G4double m, G4double q,
|
||||
G4double life)
|
||||
{
|
||||
ofile << "G4ParticleDef: Create particle " << name << " mass " << m <<
|
||||
" chg " << q << " life " << life << '\n';
|
||||
}
|
||||
|
||||
void G4ParticleDef::SetDecay(G4Decay*)
|
||||
{
|
||||
ofile << "G4ParticleDef::SetDecay: Set particle decay\n";
|
||||
}
|
||||
|
||||
G4Box::G4Box(G4String, G4double*)
|
||||
{
|
||||
ofile << " G4Box: make BOX\n";
|
||||
}
|
||||
|
||||
G4Trap::G4Trap(G4String, G4double*, G4Angles)
|
||||
{
|
||||
ofile << " G4Trap: make Trap\n";
|
||||
}
|
||||
|
||||
G4Tubs::G4Tubs(G4String, G4double*, G4Angles)
|
||||
{
|
||||
ofile << " G4Tubs: make Tubs\n";
|
||||
}
|
||||
|
||||
G4Cons::G4Cons(G4String, G4double*, G4Angles)
|
||||
{
|
||||
ofile << " G4Cons: make Cons\n";
|
||||
}
|
||||
|
||||
G4Sphe::G4Sphe(G4String, G4double*, G4Angles)
|
||||
{
|
||||
ofile << " G4Sphe: make Sphe\n";
|
||||
}
|
||||
|
||||
G4Para::G4Para(G4String, G4double*, G4Angles)
|
||||
{
|
||||
ofile << " G4Para: make Para\n";
|
||||
}
|
||||
|
||||
G4Pgon::G4Pgon(G4String, G4double*)
|
||||
{
|
||||
ofile << " G4Pgon: make Pgon\n";
|
||||
}
|
||||
|
||||
G4Pcon::G4Pcon(G4String, G4double*)
|
||||
{
|
||||
ofile << " G4Pcon: make Pcon\n";
|
||||
}
|
||||
|
||||
G4Eltu::G4Eltu(G4String, G4double*)
|
||||
{
|
||||
ofile << " G4Eltu: make Eltu\n";
|
||||
}
|
||||
|
||||
G4Hype::G4Hype(G4String, G4double*, G4Angles)
|
||||
{
|
||||
ofile << " G4Hype: make Hype\n";
|
||||
}
|
||||
|
||||
G4Gtra::G4Gtra(G4String, G4double*, G4Angles)
|
||||
{
|
||||
ofile << " G4Gtra: make Gtra\n";
|
||||
}
|
||||
|
||||
G4Ctub::G4Ctub(G4String, G4double*, G4Angles)
|
||||
{
|
||||
ofile << " G4Ctub: make Ctub\n";
|
||||
}
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BuildGeom.cc,v 1.9 1999/12/05 17:50:11 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4BuildGeom.cc,v 1.12 1999/12/15 14:49:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// modified by I. Hrivnacova, 13.10.99
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "g4std/fstream"
|
||||
#include "globals.hh"
|
||||
#include "G3toG4.hh"
|
||||
#include "G3toG4Debug.hh"
|
||||
#include "G3MatTable.hh"
|
||||
#include "G3MedTable.hh"
|
||||
#include "G3RotTable.hh"
|
||||
@@ -27,7 +28,7 @@
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
|
||||
extern ofstream ofile;
|
||||
extern G4std::ofstream ofile;
|
||||
|
||||
void G3CLRead(G4String &, char *);
|
||||
void checkVol(G4LogicalVolume*, G4int);
|
||||
@@ -39,11 +40,11 @@ G4LogicalVolume* G4BuildGeom(G4String& inFile){
|
||||
G4int irot=0;
|
||||
G4gsrotm(0, 90, 0, 90, 90, 0, 0);
|
||||
|
||||
G4cout << "Instantiated unit rotation matrix irot=" << irot << endl;
|
||||
G4cout << "Instantiated unit rotation matrix irot=" << irot << G4endl;
|
||||
|
||||
// Read the call List and interpret to Generate Geant4 geometry
|
||||
|
||||
G4cout << "Reading the call List file " << inFile << "..." << endl;
|
||||
G4cout << "Reading the call List file " << inFile << "..." << G4endl;
|
||||
|
||||
G3CLRead(inFile, NULL);
|
||||
|
||||
@@ -52,12 +53,13 @@ G4LogicalVolume* G4BuildGeom(G4String& inFile){
|
||||
G3Det.PrintAll();
|
||||
|
||||
G3Vol.PrintAll();
|
||||
G4cout << "Call List file read completed. Build geometry" << endl;
|
||||
|
||||
G4cout << "Call List file read completed. Build geometry" << G4endl;
|
||||
|
||||
// Build the geometry
|
||||
|
||||
G3VolTableEntry* topVTE = G3Vol.GetFirstVTE();
|
||||
G4cout << "G3toG4 top level volume is " << topVTE->GetName() << endl;
|
||||
G4cout << "G3toG4 top level volume is " << topVTE->GetName() << G4endl;
|
||||
|
||||
// modified
|
||||
G3toG4BuildTree(topVTE, 0);
|
||||
@@ -76,14 +78,12 @@ G4LogicalVolume* G4BuildGeom(G4String& inFile){
|
||||
topLV->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
|
||||
G4cout << "Top-level G3toG4 logical volume " << topLV->GetName() << " "
|
||||
<< *(topLV->GetVisAttributes()) << endl;
|
||||
<< *(topLV->GetVisAttributes()) << G4endl;
|
||||
|
||||
// check the geometry here
|
||||
|
||||
G4int debug=0;
|
||||
|
||||
if (debug){
|
||||
G4cout << "scan through G4LogicalVolumeStore:" << endl;
|
||||
if (G3toG4Debug() != 0){
|
||||
G4cout << "scan through G4LogicalVolumeStore:" << G4endl;
|
||||
checkVol();
|
||||
}
|
||||
return topLV;
|
||||
@@ -106,13 +106,13 @@ void checkVol(G4LogicalVolume* _lvol, G4int level)
|
||||
G4int ndau = _lvol -> GetNoDaughters();
|
||||
|
||||
G4cout << "G44LogicalVolume " << _lvol->GetName() << " at level " << level
|
||||
<< " contains " << ndau << " daughters." << endl;
|
||||
<< " contains " << ndau << " daughters." << G4endl;
|
||||
for (int idau=0; idau<ndau; idau++){
|
||||
_pdvol = _lvol-> GetDaughter(idau);
|
||||
_ldvol = _pdvol -> GetLogicalVolume();
|
||||
G4cout << "G4VPhysical volume " << setw(5) << _pdvol -> GetName()
|
||||
<< " (G4LogicalVolume " << setw(5) << _ldvol->GetName() << ")"
|
||||
<< endl;
|
||||
G4cout << "G4VPhysical volume " << G4std::setw(5) << _pdvol -> GetName()
|
||||
<< " (G4LogicalVolume " << G4std::setw(5) << _ldvol->GetName() << ")"
|
||||
<< G4endl;
|
||||
checkVol(_ldvol, level);
|
||||
}
|
||||
return;
|
||||
@@ -122,3 +122,9 @@ void checkVol(G4LogicalVolume* _lvol, G4int level)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ggclos.cc,v 1.5 1999/12/05 17:50:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4ggclos.cc,v 1.6 1999/12/15 14:49:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
#include "G3toG4.hh"
|
||||
#include "G3VolTable.hh"
|
||||
@@ -16,6 +16,6 @@ void PG4ggclos(){
|
||||
}
|
||||
|
||||
void G4ggclos(){
|
||||
G4cout << "G4ggclos: setting top-level VolTableEntry" << endl;
|
||||
G4cout << "G4ggclos: setting top-level VolTableEntry" << G4endl;
|
||||
G3Vol.SetFirstVTE();
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsatt.cc,v 1.6 1999/12/05 17:50:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4gsatt.cc,v 1.8 2000/03/02 17:54:07 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
#include "g4rw/cstring.h"
|
||||
#include "G3toG4.hh"
|
||||
@@ -29,5 +29,5 @@ void G4gsatt(G4String name, G4String attr, G4int ival)
|
||||
{
|
||||
// get logical volume pointer
|
||||
G4LogicalVolume *lvol = G3Vol.GetVTE(name)->GetLV();
|
||||
G4cerr << "G4gsatt not implemented" << endl;
|
||||
};
|
||||
G4cerr << "G4gsatt not implemented" << G4endl;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsdet.cc,v 1.3 1999/12/05 17:50:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G3toG4.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsdeta.cc,v 1.4 1999/12/05 17:50:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// modified by I.Hrivnacova, 6 Oct 99
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsdetd.cc,v 1.4 1999/12/05 17:50:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
#include "G3toG4.hh"
|
||||
#include "G3DetTable.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsdeth.cc,v 1.4 1999/12/05 17:50:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
#include "G3toG4.hh"
|
||||
#include "G3DetTable.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsdetu.cc,v 1.3 1999/12/05 17:50:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
#include "G3toG4.hh"
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsdetv.cc,v 1.5 1999/12/05 17:50:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4gsdetv.cc,v 1.6 1999/12/15 14:49:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "G3toG4.hh"
|
||||
@@ -33,12 +33,12 @@ void PG4gsdetv(G4String tokens[])
|
||||
void G4gsdetv(G4String chset, G4String chdet, G4int idtyp, G4int,
|
||||
G4int){
|
||||
|
||||
G4cout << "G4gsdetv not currently implemented." << endl;
|
||||
G4cout << "G4gsdetv not currently implemented." << G4endl;
|
||||
/*
|
||||
// get lvol for detector chdet
|
||||
G4LogicalVolume *lvol = G3Vol.GetLV(chdet);
|
||||
if (lvol == NULL) {
|
||||
G4cout << "G4gsdetv: Logical volume " << chdet << " not available. Skip." << endl;
|
||||
G4cout << "G4gsdetv: Logical volume " << chdet << " not available. Skip." << G4endl;
|
||||
return;
|
||||
}
|
||||
// Generate a sensitive detector structure
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsdk.cc,v 1.3 1999/12/05 17:50:13 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
#include "G4Decay.hh"
|
||||
#include "G3toG4.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsdvn.cc,v 1.5 1999/12/05 17:50:13 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, V.Berejnoi, 29 Oct 99
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsdvn2.cc,v 1.6 1999/12/05 17:50:13 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, V.Berejnoi, 29 Oct 99
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsdvt.cc,v 1.5 1999/12/05 17:50:13 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, V.Berejnoi, 29 Oct 99
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsdvt2.cc,v 1.5 1999/12/05 17:50:13 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, V.Berejnoi, 29 Oct 99
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsdvx.cc,v 1.3 1999/12/05 17:50:13 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, V.Berejnoi, 27 Sep 99
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsmate.cc,v 1.4 1999/12/05 17:50:13 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4gsmate.cc,v 1.6 1999/12/15 14:49:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#include "G4Isotope.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
//extern int debugOn;
|
||||
|
||||
void PG4gsmate(G4String tokens[])
|
||||
{
|
||||
// fill the parameter containers
|
||||
@@ -79,7 +77,7 @@ G4Element* CreateElement(G4double zeff, G4double aeff, G4String matName)
|
||||
// create new element if it was not found in element table
|
||||
G4Element* element = new G4Element(elName, elSymbol, zeff, aeff);
|
||||
G4cout << "New element: " << element->GetName()
|
||||
<< " for " << matName << " material has been created." << endl;
|
||||
<< " for " << matName << " material has been created." << G4endl;
|
||||
return element;
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsmixt.cc,v 1.6 1999/12/05 17:50:14 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4gsmixt.cc,v 1.7 1999/12/15 14:49:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, 27 Sep 99
|
||||
|
||||
@@ -121,21 +121,21 @@ void G4gsmixt(G4int imate, G4String name, G4double a[], G4double z[],
|
||||
} else {
|
||||
if (nlmat>0) {
|
||||
G4cerr << "G4gsmixt: for mixture '" << name
|
||||
<< "' some |weights|>1 : " << endl;
|
||||
<< "' some |weights|>1 : " << G4endl;
|
||||
for (G4int i=0;i<nlmat; i++) {
|
||||
G4cerr << "Component " << setw(3) << i+1 << " fraction: "
|
||||
<< setw(10) << wmat[i] << endl;
|
||||
G4cerr << "Component " << G4std::setw(3) << i+1 << " fraction: "
|
||||
<< G4std::setw(10) << wmat[i] << G4endl;
|
||||
}
|
||||
} else if (nlmat<0) {
|
||||
G4cerr << "G4gsmixt: for mixture '" << name
|
||||
<< "' some #natoms are non-integer: " << endl;
|
||||
<< "' some #natoms are non-integer: " << G4endl;
|
||||
for (G4int i=0;i<nlmat; i++) {
|
||||
G4cerr << "Component " << setw(3) << i+1 << " #atoms "
|
||||
<< setw(10) << wmat[i] << endl;
|
||||
G4cerr << "Component " << G4std::setw(3) << i+1 << " #atoms "
|
||||
<< G4std::setw(10) << wmat[i] << G4endl;
|
||||
}
|
||||
} else {
|
||||
G4cerr << "G4gsmixt: Number of components for mixture '"
|
||||
<< name << "' (" << nlmat << ") not allowed." << endl;
|
||||
<< name << "' (" << nlmat << ") not allowed." << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gspart.cc,v 1.3 1999/12/05 17:50:14 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G3toG4.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gspos.cc,v 1.11 1999/12/05 17:50:14 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, 13.10.99
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsposp.cc,v 1.11 1999/12/05 17:50:14 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4gsposp.cc,v 1.13 2000/03/07 10:51:40 stesting Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, 13.10.99
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "G4VSolid.hh"
|
||||
|
||||
G4bool G3NegVolPars(G4double pars[], G4int *nparpt,
|
||||
G3VolTableEntry* vte, G3VolTableEntry* mvte, char routine[]);
|
||||
G3VolTableEntry* vte, G3VolTableEntry* mvte, const char routine[]);
|
||||
|
||||
void PG4gsposp(G4String tokens[]){
|
||||
// fill the parameter containers
|
||||
@@ -49,9 +49,9 @@ void G4ProcessDaughters(G3VolTableEntry* vte)
|
||||
// vte daughters
|
||||
{
|
||||
if (vte->HasNegPars()) {
|
||||
G4cerr << " Warning:" << endl;
|
||||
G4cerr << " Warning:" << G4endl;
|
||||
G4cerr << " G4ProcessDaughters: Ignored (vte has negative parameters)."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
else {
|
||||
for (G4int i=0; i<vte->GetNoDaughters(); i++) {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsrotm.cc,v 1.7 1999/12/05 17:50:14 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4gsrotm.cc,v 1.8 1999/12/15 14:49:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
#include "G3toG4.hh"
|
||||
#include "G3RotTable.hh"
|
||||
@@ -59,19 +59,19 @@ void G4gsrotm(G4int irot, G4double theta1, G4double phi1,
|
||||
if (1-abs(check)>tol) {
|
||||
G4cerr << "Coordinate axes forming rotation matrix "
|
||||
<< irot << " are not orthonormal.(" << 1-abs(check) << ")"
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
G4cerr << " theta1=" << theta1;
|
||||
G4cerr << " phi1=" << phi1;
|
||||
G4cerr << " theta2=" << theta2;
|
||||
G4cerr << " phi2=" << phi2;
|
||||
G4cerr << " theta3=" << theta3;
|
||||
G4cerr << " phi3=" << phi3;
|
||||
G4cerr << endl;
|
||||
G4cerr << G4endl;
|
||||
G4Exception("G4gsrotm error");
|
||||
}
|
||||
else if (1+check<=tol) {
|
||||
G4cerr << "G4gsrotm warning: coordinate axes forming rotation "
|
||||
<< "matrix " << irot << " are left-handed" << endl;
|
||||
<< "matrix " << irot << " are left-handed" << G4endl;
|
||||
}
|
||||
|
||||
G3toG4RotationMatrix* rotp = new G3toG4RotationMatrix;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gstmed.cc,v 1.4 1999/12/05 17:50:14 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// The last G4int argument of G4gstmed(..) is used for sending
|
||||
// info whether the Geant3 tracking medium parameters should
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gstpar.cc,v 1.4 1999/12/05 17:50:14 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4gstpar.cc,v 1.5 1999/12/15 14:49:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
#include "G3toG4.hh"
|
||||
#include "G3VolTable.hh"
|
||||
@@ -28,5 +28,5 @@ void G4gstpar(G4int itmed, G4String chpar, G4double parval)
|
||||
{
|
||||
// set special tracking medium parameter. Apply to all logical
|
||||
// volumes making use of the specified tracking medium.
|
||||
G4cerr << "G4gstpar: not implemented." << endl;
|
||||
G4cerr << "G4gstpar: not implemented." << G4endl;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4gsvolu.cc,v 1.6 1999/12/05 17:50:14 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4gsvolu.cc,v 1.7 1999/12/15 14:49:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// by I.Hrivnacova, 13.10.99
|
||||
|
||||
@@ -58,8 +58,8 @@ void G4gsvolu(G4String vname, G4String shape, G4int nmed, G4double* Rpar,
|
||||
/*
|
||||
G4cout << "Creating logical volume " << vname << " shape " << shape
|
||||
<< " nmed " << nmed << " #pars "<< npar << " parameters (cm): ";
|
||||
for (int ipar=0; ipar< npar; ipar++) G4cout << setw(8) << Rpar[ipar];
|
||||
G4cout << endl;
|
||||
for (int ipar=0; ipar< npar; ipar++) G4cout << G4std::setw(8) << Rpar[ipar];
|
||||
G4cout << G4endl;
|
||||
*/
|
||||
if (G3Vol.GetVTE(vname)) {
|
||||
// abort if VTE with given name exists
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: clparse.cc,v 1.8 1999/12/05 17:50:15 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: clparse.cc,v 1.11 2000/03/07 10:51:41 stesting Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// modified by I.Hrivnacova
|
||||
// added G3SensVol
|
||||
@@ -25,13 +25,13 @@
|
||||
#include "G3DetTable.hh"
|
||||
#include "G3SensVolVector.hh"
|
||||
|
||||
ofstream ofile;
|
||||
G4std::ofstream ofile;
|
||||
|
||||
extern "C" {
|
||||
#include <stdlib.h>
|
||||
}
|
||||
|
||||
extern ofstream ofile;
|
||||
extern G4std::ofstream ofile;
|
||||
|
||||
G3VolTable G3Vol;
|
||||
G3MatTable G3Mat; // material G3 ID <-> G4 pointer table
|
||||
@@ -94,13 +94,12 @@ void G3CLRead(G4String & fname, char *select = NULL){
|
||||
|
||||
G4int count = 0;
|
||||
G4int ntokens = 0;
|
||||
ifstream istr(fname);
|
||||
G4bool _debug=false;
|
||||
G4std::ifstream istr(fname);
|
||||
|
||||
while (line.readLine(istr) && ! istr.eof()){
|
||||
count++;
|
||||
ntokens = G3CLTokens(&line,tokens); // tokenize the line
|
||||
for (G4int i=0; i < ntokens; i++) ofile << tokens[i] << endl;
|
||||
for (G4int i=0; i < ntokens; i++) ofile << tokens[i] << G4endl;
|
||||
|
||||
// interpret the line as a Geant call
|
||||
G3CLEval(tokens, select);
|
||||
@@ -155,7 +154,7 @@ void G3CLEval(G4String tokens[], char *select)
|
||||
if (select != NULL && select != "*") if ( strcmp(select,context) ) return;
|
||||
|
||||
// Branch on Geant3 routine name
|
||||
ofile << "Do routine " << routine << " in context " << context << endl;
|
||||
ofile << "Do routine " << routine << " in context " << context << G4endl;
|
||||
|
||||
if ( !strcmp(routine,"GSVOLU") ) {
|
||||
// volcount++;
|
||||
@@ -200,7 +199,7 @@ void G3CLEval(G4String tokens[], char *select)
|
||||
if ( !strcmp(routine,"GGCLOS") ) { PG4ggclos(); return;}
|
||||
}
|
||||
|
||||
void G3fillParams(G4String *tokens, char *ptypes)
|
||||
void G3fillParams(G4String *tokens, const char *ptypes)
|
||||
//
|
||||
// G3fillParams
|
||||
//
|
||||
@@ -259,7 +258,7 @@ void G3fillParams(G4String *tokens, char *ptypes)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ofile << "unidentified ptype '" << ptypes[i] << endl;
|
||||
ofile << "unidentified ptype '" << ptypes[i] << G4endl;
|
||||
};
|
||||
i++;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* and all its terms.
|
||||
*
|
||||
* $Id: g3routines.F,v 1.3 1999/12/05 17:50:15 gcosmo Exp $
|
||||
* GEANT4 tag $Name: geant4-01-00 $
|
||||
* GEANT4 tag $Name: geant4-01-01 $
|
||||
*
|
||||
#define CALL_GEANT
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* and all its terms.
|
||||
*
|
||||
* $Id: g3test.F.main,v 1.2 1999/12/05 17:50:16 gcosmo Exp $
|
||||
* GEANT4 tag $Name: geant4-01-00 $
|
||||
* GEANT4 tag $Name: geant4-01-01 $
|
||||
*
|
||||
*
|
||||
* g3test
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* and all its terms.
|
||||
*
|
||||
* $Id: g3tog4.F,v 1.3 1999/12/05 17:50:16 gcosmo Exp $
|
||||
* GEANT4 tag $Name: geant4-01-00 $
|
||||
* GEANT4 tag $Name: geant4-01-01 $
|
||||
*
|
||||
*
|
||||
* G3toG4
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: g4geom.cc.main,v 1.2 1999/12/05 17:50:17 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// g4geom
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* and all its terms.
|
||||
*
|
||||
* $Id: jshape.F,v 1.2 1999/12/05 17:50:17 gcosmo Exp $
|
||||
* GEANT4 tag $Name: geant4-01-00 $
|
||||
* GEANT4 tag $Name: geant4-01-01 $
|
||||
*
|
||||
*
|
||||
*-- Author : Jouko Vuoskoski, CERN, Jouko.Vuoskoski@cern.ch
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* and all its terms.
|
||||
*
|
||||
* $Id: mztog4.F,v 1.2 1999/12/05 17:50:17 gcosmo Exp $
|
||||
* GEANT4 tag $Name: geant4-01-00 $
|
||||
* GEANT4 tag $Name: geant4-01-01 $
|
||||
*
|
||||
subroutine mztog4
|
||||
************************************************************************
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* and all its terms.
|
||||
*
|
||||
* $Id: rztog4.F,v 1.2 1999/12/05 17:50:17 gcosmo Exp $
|
||||
* GEANT4 tag $Name: geant4-01-00 $
|
||||
* GEANT4 tag $Name: geant4-01-01 $
|
||||
*
|
||||
program rztog4
|
||||
************************************************************************
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* and all its terms.
|
||||
*
|
||||
* $Id: tog4.F,v 1.3 1999/12/05 17:50:17 gcosmo Exp $
|
||||
* GEANT4 tag $Name: geant4-01-00 $
|
||||
* GEANT4 tag $Name: geant4-01-01 $
|
||||
*
|
||||
subroutine tog4
|
||||
************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user