← Back to team overview

simhadteam team mailing list archive

[Branch ~simhadteam/simulationshadrontherapie/G4LPC] Rev 15: Ajout de la gestion des versions de GEANT4 dans GNUMakefile.

 

------------------------------------------------------------
revno: 15
committer: Daniel Cussol <cussol@xxxxxxxx>
branch nick: G4LPC
timestamp: Mon 2012-07-02 10:46:22 +0200
message:
  Ajout de la gestion des versions de GEANT4 dans GNUMakefile.
modified:
  GNUmakefile
  src/G4LPCDetectorConstruction.cc


--
lp:simulationshadrontherapie/g4lpc
https://code.launchpad.net/~simhadteam/simulationshadrontherapie/G4LPC

Your team Simulateurs pour la Hadronthérapie is subscribed to branch lp:simulationshadrontherapie/g4lpc.
To unsubscribe from this branch go to https://code.launchpad.net/~simhadteam/simulationshadrontherapie/G4LPC/+edit-subscription
=== modified file 'GNUmakefile'
--- GNUmakefile	2012-04-13 14:48:01 +0000
+++ GNUmakefile	2012-07-02 08:46:22 +0000
@@ -6,7 +6,7 @@
 name := G4LPC
 G4TARGET := $(name)
 G4EXLIB := true
-G4VERSION := $(shell ~/private/G4conf/GetGeant4Version)
+G4VERSION := $(shell $(G4WORKDIR)/G4conf/GetGeant4Version)
 
 ifndef G4INSTALL
   G4INSTALL = ../../..
@@ -14,7 +14,7 @@
 
 .PHONY: all
 all: lib bin cpLib
-	echo "Compilation for Geant4 "$(G4VERSION)
+	echo "Compilation for Geant4 $(G4VERSION)"
 
 cpLib: 
 	echo "Copie des libraries dans $(G4WORKDIR)/lib-$(G4VERSION)"

=== modified file 'src/G4LPCDetectorConstruction.cc'
--- src/G4LPCDetectorConstruction.cc	2012-04-05 13:32:08 +0000
+++ src/G4LPCDetectorConstruction.cc	2012-07-02 08:46:22 +0000
@@ -105,10 +105,10 @@
   G4Element* Cl = new G4Element("Chlorine",symbol="Cl", z= 17., a= 35.45*g/mole);
   G4Element* K  = new G4Element("Potassium",symbol="K", z= 19., a= 39.10*g/mole);
   G4Element* Ca = new G4Element("Calcium",symbol="Ca", z= 20., a= 40.08*g/mole);
+  G4Element* Ti = new G4Element("Titane",symbol="Ti"   , z= 22., a= 47.90*g/mole);
   G4Element* Fe = new G4Element("Iron",symbol="Fe"   , z= 26., a= 55.85*g/mole);
   G4Element* Zn = new G4Element("Zinc",symbol="Zn"   , z= 30., a= 65.37*g/mole);
   G4Element* I  = new G4Element("Iodine",symbol="I"   , z= 53., a= 126.90*g/mole);
-  G4Element* Ti = new G4Element("Titane",symbol="I"   , z= 22., a= 47.90*g/mole);
   G4Element* Sn = new G4Element("Tin",symbol="Sn"   , z= 50., a= 118.69*g/mole);
   
   
@@ -162,9 +162,9 @@
 
 // PMMA (C5O2H8)
  G4Material* PMMA = new G4Material("PMMA", density= 1.19*g/cm3, ncomponents=3);
- PMMA->AddElement(H, 8.0538*perCent);
- PMMA->AddElement(C, 59.9848*perCent);
- PMMA->AddElement(O, 31.9614*perCent);
+ PMMA->AddElement(H, fractionmass=8.0538*perCent);
+ PMMA->AddElement(C, fractionmass=59.9848*perCent);
+ PMMA->AddElement(O, fractionmass=31.9614*perCent);
  PMMA->GetIonisation()->SetMeanExcitationEnergy(74.*eV);
  
 /////////////////////////////////////////////////////////////////////////////////
@@ -1715,7 +1715,7 @@
     {
     G4Material *mat=(*matTable)[i];
     out << (*mat) << G4endl;
-    out << "   Nb Atoms/cm^3: " << mat->GetTotNbOfAtomsPerVolume()*cm3 << G4endl;
+    out << "   Nb Atoms/cm^3: " << mat->GetTotNbOfAtomsPerVolume()/cm3 << G4endl;
     out << G4endl;
     }
     
@@ -1725,7 +1725,7 @@
 //     {
 //     G4Material *mat=man->FindOrBuildMaterial(nistNames[i]);
 //     out << (*mat) << G4endl;
-//     out << "   Nb Atoms/cm^3: " << mat->GetTotNbOfAtomsPerVolume()*cm3 << G4endl;
+//     out << "   Nb Atoms/cm^3: " << mat->GetTotNbOfAtomsPerVolume()/cm3 << G4endl;
 //     out << G4endl;
 //     //man->PrintG4Material(nistNames[i]);
 //     }
@@ -1900,11 +1900,11 @@
 if(IndexInRange(i))
  {
  G4Material *m= G4Material::GetMaterial(s);
-//  if(!m)
-//   {
-//   G4NistManager* man = G4NistManager::Instance();
-//   m=man->FindOrBuildMaterial(s,false);
-//   }
+  if(!m)
+   {
+   G4NistManager* man = G4NistManager::Instance();
+   m=man->FindOrBuildMaterial(s,false);
+   }
  if(m)
   {
   SetLayerMaterial(i,m);