Geant4 Cross Reference |
>> 1 // This code implementation is the intellectual property of >> 2 // the GEANT4 collaboration. 1 // 3 // 2 // ******************************************* << 4 // By copying, distributing or modifying the Program (or any work 3 // * License and Disclaimer << 5 // based on the Program) you indicate your acceptance of this statement, 4 // * << 6 // and all its terms. 5 // * The Geant4 software is copyright of th << 6 // * the Geant4 Collaboration. It is provided << 7 // * conditions of the Geant4 Software License << 8 // * LICENSE and available at http://cern.ch/ << 9 // * include a list of copyright holders. << 10 // * << 11 // * Neither the authors of this software syst << 12 // * institutes,nor the agencies providing fin << 13 // * work make any representation or warran << 14 // * regarding this software system or assum << 15 // * use. Please see the license in the file << 16 // * for the full disclaimer and the limitatio << 17 // * << 18 // * This code implementation is the result << 19 // * technical work of the GEANT4 collaboratio << 20 // * By using, copying, modifying or distri << 21 // * any work based on the software) you ag << 22 // * use in resulting scientific publicati << 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* << 25 // << 26 // 7 // >> 8 // $Id: G4gsdvt2.cc,v 1.5 1999/12/05 17:50:13 gcosmo Exp $ >> 9 // GEANT4 tag $Name: geant4-02-00 $ 27 // 10 // 28 // by I.Hrivnacova, V.Berejnoi, 29 Oct 99 11 // by I.Hrivnacova, V.Berejnoi, 29 Oct 99 29 12 30 #include "G3Division.hh" 13 #include "G3Division.hh" 31 #include "G3VolTableEntry.hh" 14 #include "G3VolTableEntry.hh" 32 #include "G3VolTable.hh" 15 #include "G3VolTable.hh" 33 #include "globals.hh" 16 #include "globals.hh" 34 #include "G3toG4.hh" 17 #include "G3toG4.hh" 35 18 36 void G4CreateCloneVTEWithDivision(G4String vna 19 void G4CreateCloneVTEWithDivision(G4String vname, G3VolTableEntry* mvte, 37 G3DivType divType, G4int nofDiv 20 G3DivType divType, G4int nofDivisions, G4int iaxis, G4int nmed, 38 G4double c0, G4double step); 21 G4double c0, G4double step); 39 22 40 void PG4gsdvt2(G4String *tokens) << 23 void PG4gsdvt2(G4String tokens[]) 41 { 24 { 42 // fill the parameter containers 25 // fill the parameter containers 43 G3fillParams(tokens,PTgsdvt2); 26 G3fillParams(tokens,PTgsdvt2); 44 27 45 // interpret the parameters 28 // interpret the parameters 46 G4String vname = Spar[0]; 29 G4String vname = Spar[0]; 47 G4String vmoth = Spar[1]; 30 G4String vmoth = Spar[1]; 48 G4int iaxis = Ipar[0]; 31 G4int iaxis = Ipar[0]; 49 G4int numed = Ipar[1]; 32 G4int numed = Ipar[1]; 50 G4int ndvmx = Ipar[2]; 33 G4int ndvmx = Ipar[2]; 51 G4double Step = Rpar[0]; 34 G4double Step = Rpar[0]; 52 G4double c0 = Rpar[1]; 35 G4double c0 = Rpar[1]; 53 36 54 G4gsdvt2(vname,vmoth,Step,iaxis,c0,numed,ndv 37 G4gsdvt2(vname,vmoth,Step,iaxis,c0,numed,ndvmx); 55 } 38 } 56 39 57 void G4gsdvt2(G4String vname, G4String vmoth, 40 void G4gsdvt2(G4String vname, G4String vmoth, G4double step, G4int iaxis, 58 G4double c0, G4int numed, G4int 41 G4double c0, G4int numed, G4int ndvmx) 59 { 42 { 60 // find mother VTE 43 // find mother VTE 61 G3VolTableEntry* mvte = G3Vol.GetVTE(vmoth); 44 G3VolTableEntry* mvte = G3Vol.GetVTE(vmoth); 62 if (mvte == 0) { 45 if (mvte == 0) { 63 G4String text = "G4gsdvt2:'" + vmoth + "' << 46 G4Exception("G4gsdtn2:'" + vmoth + "' has no VolTableEntry"); 64 G4Exception("G4gsdvt2()", "G3toG40015", Fa << 65 return; << 66 } 47 } 67 else { 48 else { 68 // a new vte clone copy with division is c 49 // a new vte clone copy with division is created 69 // for each mother (clone copy) 50 // for each mother (clone copy) 70 51 71 G4CreateCloneVTEWithDivision(vname, mvte, 52 G4CreateCloneVTEWithDivision(vname, mvte, 72 kDvt2, ndvmx 53 kDvt2, ndvmx, iaxis, numed, c0, step); 73 } 54 } 74 } 55 } 75 56