Changeset 1230 for trunk/examples/advanced/human_phantom/src
- Timestamp:
- Jan 8, 2010, 3:02:48 PM (16 years ago)
- Location:
- trunk/examples/advanced/human_phantom/src
- Files:
-
- 8 edited
-
G4HumanPhantomHit.cc (modified) (1 diff)
-
G4MIRDHead.cc (modified) (1 diff)
-
G4MIRDHeart.cc (modified) (1 diff)
-
G4MIRDLiver.cc (modified) (3 diffs)
-
G4MIRDSpleen.cc (modified) (1 diff)
-
G4MIRDTestes.cc (modified) (3 diffs)
-
G4ORNLFemaleBodyFactory.cc (modified) (3 diffs)
-
G4ORNLMaleBodyFactory.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/advanced/human_phantom/src/G4HumanPhantomHit.cc
r807 r1230 26 26 // 27 27 // $Id: G4HumanPhantomHit.cc,v 1.11 2007/05/15 14:45:35 guatelli Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 -
trunk/examples/advanced/human_phantom/src/G4MIRDHead.cc
r807 r1230 33 33 // 34 34 #include "G4MIRDHead.hh" 35 //#include "G4Processor/GDMLProcessor.h"36 35 #include "globals.hh" 37 36 #include "G4HumanPhantomMaterial.hh" -
trunk/examples/advanced/human_phantom/src/G4MIRDHeart.cc
r807 r1230 136 136 return physHeart; 137 137 */ 138 return 0; 138 139 } -
trunk/examples/advanced/human_phantom/src/G4MIRDLiver.cc
r807 r1230 48 48 #include "G4Box.hh" 49 49 #include <cmath> 50 50 51 G4MIRDLiver::G4MIRDLiver() 51 52 { … … 54 55 G4MIRDLiver::~G4MIRDLiver() 55 56 { 56 57 57 } 58 58 59 59 G4VPhysicalVolume* G4MIRDLiver::Construct(const G4String&,G4VPhysicalVolume*, 60 const G4String&, G4bool, G4bool)60 const G4String&, G4bool, G4bool) 61 61 { 62 62 G4cout << "MIRD Liver is not available yet !!!" << G4endl; … … 145 145 146 146 // return physLiver; 147 return 0; 147 148 } -
trunk/examples/advanced/human_phantom/src/G4MIRDSpleen.cc
r807 r1230 34 34 #include "G4MIRDSpleen.hh" 35 35 36 #include "G4Processor/GDMLProcessor.h"37 36 #include "globals.hh" 38 37 #include "G4SDManager.hh" -
trunk/examples/advanced/human_phantom/src/G4MIRDTestes.cc
r807 r1230 34 34 #include "G4MIRDTestes.hh" 35 35 36 #include "G4Processor/GDMLProcessor.h"37 36 #include "globals.hh" 38 37 #include "G4SDManager.hh" … … 45 44 G4MIRDTestes::~G4MIRDTestes() 46 45 { 47 sxp.Finalize();48 46 } 49 47 … … 51 49 { 52 50 // Initialize GDML Processor 53 sxp.Initialize(); 54 config.SetURI( "gdmlData/"+sex+"/MIRDTestes.gdml" ); 55 config.SetSetupName( "Default" ); 56 sxp.Configure( &config ); 51 parser.Read( "gdmlData/"+sex+"/MIRDTestes.gdml" ); 57 52 58 // Run GDML Processor 59 sxp.Run(); 60 53 G4LogicalVolume* logicTestes = parser.GetVolume("TestesVolume"); 61 54 62 G4 LogicalVolume* logicTestes = (G4LogicalVolume *)GDMLProcessor::GetInstance()->GetLogicalVolume("TestesVolume");63 64 G4 ThreeVector position = (G4ThreeVector)*GDMLProcessor::GetInstance()->GetPosition("TestesPos");65 G4RotationMatrix* rm = (G4RotationMatrix*)GDMLProcessor::GetInstance()->GetRotation("TestesRot");55 G4ThreeVector position = parser.GetPosition("TestesPos"); 56 G4ThreeVector rot = parser.GetRotation("TestesRot"); 57 G4RotationMatrix* rm = new G4RotationMatrix(); 58 rm->rotateX(rot.x()); rm->rotateY(rot.y()); rm->rotateZ(rot.z()); 66 59 67 60 // Define rotation and position here! -
trunk/examples/advanced/human_phantom/src/G4ORNLFemaleBodyFactory.cc
r807 r1230 35 35 #include "G4ORNLFemaleBodyFactory.hh" 36 36 #include "G4PhysicalVolumeStore.hh" 37 #include "G4 Processor/GDMLProcessor.h"37 #include "G4GDMLParser.hh" 38 38 #include "globals.hh" 39 39 #include "G4SDManager.hh" 40 40 #include "G4VisAttributes.hh" 41 41 #include "G4HumanPhantomColour.hh" 42 42 43 G4ORNLFemaleBodyFactory::G4ORNLFemaleBodyFactory() 43 44 { 44 45 45 } 46 46 47 47 G4ORNLFemaleBodyFactory::~G4ORNLFemaleBodyFactory() 48 48 { 49 //sxp.Finalize();50 49 } 51 50 … … 55 54 { 56 55 G4cout<< "ORNLBodyFactory: "<< "gdmlData/Female/ORNL"<< gdmlFile <<".gdml" << G4endl; 57 SAXProcessor sxp; 58 ProcessingConfigurator config; 59 // Initialize GDML Processor 60 sxp.Initialize(); 61 G4String name = "gdmlData/Female/ORNL"+ gdmlFile + ".gdml"; 62 config.SetURI(name); 63 G4cout << "config.SetURI(name);" << G4endl; 64 config.SetSetupName( "Default" ); 65 G4cout << "config.SetSetUpName;" << G4endl; 66 sxp.Configure( &config ); 67 G4cout << "sxp.Configure( &config );" << G4endl; 68 // Run GDML Processor 69 sxp.Run(); 70 G4cout << "sxp.Run();" << G4endl; 56 57 G4GDMLParser parser; 58 G4String filename = "gdmlData/Female/ORNL"+ gdmlFile + ".gdml"; 59 parser.Read(filename); 71 60 72 61 G4String logicalVolumeName = gdmlFile + "Volume"; 73 G4LogicalVolume* logicOrgan = (G4LogicalVolume *)GDMLProcessor::GetInstance()->GetLogicalVolume(logicalVolumeName); 62 G4LogicalVolume* logicOrgan = parser.GetVolume(logicalVolumeName); 63 G4ThreeVector position = parser.GetPosition("OrganPos"); 64 G4ThreeVector rot = parser.GetRotation("OrganRot"); 65 G4RotationMatrix* rm = new G4RotationMatrix(); 66 rm->rotateX(rot.x()); rm->rotateY(rot.y()); rm->rotateZ(rot.z()); 74 67 75 G4ThreeVector position = (G4ThreeVector)*GDMLProcessor::GetInstance()->GetPosition("OrganPos"); 76 G4RotationMatrix* rm = (G4RotationMatrix*)GDMLProcessor::GetInstance()->GetRotation("OrganRot"); 77 78 G4PhysicalVolumeStore::DeRegister((G4VPhysicalVolume*)GDMLProcessor::GetInstance()->GetWorldVolume()); 68 G4PhysicalVolumeStore::DeRegister(parser.GetWorldVolume()); 79 69 80 70 // sxp.Finalize(); … … 111 101 logicOrgan->SetVisAttributes(organVisAtt); 112 102 } 113 G4cout << "Organ created !!!!!! from " << name <<G4endl; 114 sxp.Finalize(); 103 G4cout << "Organ created !!!!!! from " << filename <<G4endl; 115 104 116 105 return physOrgan; -
trunk/examples/advanced/human_phantom/src/G4ORNLMaleBodyFactory.cc
r807 r1230 35 35 #include "G4ORNLMaleBodyFactory.hh" 36 36 #include "G4PhysicalVolumeStore.hh" 37 #include "G4 Processor/GDMLProcessor.h"37 #include "G4GDMLParser.hh" 38 38 #include "globals.hh" 39 39 #include "G4SDManager.hh" 40 40 #include "G4VisAttributes.hh" 41 41 #include "G4HumanPhantomColour.hh" 42 #include "Saxana/SAXProcessor.h" 43 #include "Saxana/ProcessingConfigurator.h" 42 44 43 G4ORNLMaleBodyFactory::G4ORNLMaleBodyFactory() 45 44 { … … 55 54 { 56 55 57 G4cout<< "ORNLBodyFactory: "<< "gdmlData/Male/ORNL"<< gdmlFile <<".gdml" << G4endl; 58 SAXProcessor sxp; 59 ProcessingConfigurator config; 60 // Initialize GDML Processor 61 sxp.Initialize(); 62 G4String name = "gdmlData/Male/ORNL"+ gdmlFile + ".gdml"; 63 config.SetURI(name); 64 G4cout << "config.SetURI(name);" << G4endl; 65 config.SetSetupName( "Default" ); 66 G4cout << "config.SetSetUpName;" << G4endl; 67 sxp.Configure( &config ); 68 G4cout << "sxp.Configure( &config );" << G4endl; 69 // Run GDML Processor 70 sxp.Run(); 71 G4cout << "sxp.Run();" << G4endl; 56 G4cout<< "ORNLBodyFactory: "<< "gdmlData/Male/ORNL"<< gdmlFile <<".gdml" << G4endl; 57 G4GDMLParser parser; 58 G4String filename = "gdmlData/Male/ORNL"+ gdmlFile + ".gdml"; 59 parser.Read(filename); 60 61 G4String logicalVolumeName = gdmlFile + "Volume"; 62 G4LogicalVolume* logicOrgan = parser.GetVolume(logicalVolumeName); 63 G4ThreeVector position = parser.GetPosition("OrganPos"); 64 G4ThreeVector rot = parser.GetRotation("OrganRot"); 65 G4RotationMatrix* rm = new G4RotationMatrix(); 66 rm->rotateX(rot.x()); rm->rotateY(rot.y()); rm->rotateZ(rot.z()); 67 68 G4PhysicalVolumeStore::DeRegister(parser.GetWorldVolume()); 72 69 73 G4String logicalVolumeName = gdmlFile + "Volume";74 G4LogicalVolume* logicOrgan = (G4LogicalVolume *)GDMLProcessor::GetInstance()->GetLogicalVolume(logicalVolumeName);75 76 G4ThreeVector position = (G4ThreeVector)*GDMLProcessor::GetInstance()->GetPosition("OrganPos");77 G4RotationMatrix* rm = (G4RotationMatrix*)GDMLProcessor::GetInstance()->GetRotation("OrganRot");78 79 G4PhysicalVolumeStore::DeRegister((G4VPhysicalVolume*)GDMLProcessor::GetInstance()->GetWorldVolume());80 81 // sxp.Finalize();82 70 // Define rotation and position here! 83 71 G4VPhysicalVolume* physOrgan = new G4PVPlacement(rm,position, … … 102 90 logicOrgan->SetVisAttributes(organVisAtt); 103 91 104 G4cout << "Organ created !!!!!! from " << name <<G4endl; 105 sxp.Finalize(); 92 G4cout << "Organ created !!!!!! from " << filename <<G4endl; 106 93 107 94 return physOrgan; 108 95 } 109 110
Note:
See TracChangeset
for help on using the changeset viewer.
