Ignore:
Timestamp:
Jan 8, 2010, 3:02:48 PM (16 years ago)
Author:
garnier
Message:

update to geant4.9.3

Location:
trunk/examples/advanced/human_phantom/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/advanced/human_phantom/src/G4HumanPhantomHit.cc

    r807 r1230  
    2626//
    2727// $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 $
    2929//
    3030
  • trunk/examples/advanced/human_phantom/src/G4MIRDHead.cc

    r807 r1230  
    3333//
    3434#include "G4MIRDHead.hh"
    35 //#include "G4Processor/GDMLProcessor.h"
    3635#include "globals.hh"
    3736#include "G4HumanPhantomMaterial.hh"
  • trunk/examples/advanced/human_phantom/src/G4MIRDHeart.cc

    r807 r1230  
    136136  return physHeart;
    137137  */
     138  return 0;
    138139}
  • trunk/examples/advanced/human_phantom/src/G4MIRDLiver.cc

    r807 r1230  
    4848#include "G4Box.hh"
    4949#include <cmath>
     50
    5051G4MIRDLiver::G4MIRDLiver()
    5152{
     
    5455G4MIRDLiver::~G4MIRDLiver()
    5556{
    56 
    5757}
    5858
    5959G4VPhysicalVolume* G4MIRDLiver::Construct(const G4String&,G4VPhysicalVolume*,
    60                                     const G4String&, G4bool, G4bool)
     60                                          const G4String&, G4bool, G4bool)
    6161{
    6262  G4cout << "MIRD Liver is not available yet !!!" << G4endl;
     
    145145
    146146// return physLiver;
     147  return 0;
    147148}
  • trunk/examples/advanced/human_phantom/src/G4MIRDSpleen.cc

    r807 r1230  
    3434#include "G4MIRDSpleen.hh"
    3535
    36 #include "G4Processor/GDMLProcessor.h"
    3736#include "globals.hh"
    3837#include "G4SDManager.hh"
  • trunk/examples/advanced/human_phantom/src/G4MIRDTestes.cc

    r807 r1230  
    3434#include "G4MIRDTestes.hh"
    3535
    36 #include "G4Processor/GDMLProcessor.h"
    3736#include "globals.hh"
    3837#include "G4SDManager.hh"
     
    4544G4MIRDTestes::~G4MIRDTestes()
    4645{
    47   sxp.Finalize();
    4846}
    4947
     
    5149{
    5250  // 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" );
    5752
    58   // Run GDML Processor
    59   sxp.Run();
    60  
     53  G4LogicalVolume* logicTestes = parser.GetVolume("TestesVolume");
    6154
    62   G4LogicalVolume* logicTestes = (G4LogicalVolume *)GDMLProcessor::GetInstance()->GetLogicalVolume("TestesVolume");
    63 
    64   G4ThreeVector 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());
    6659 
    6760  // Define rotation and position here!
  • trunk/examples/advanced/human_phantom/src/G4ORNLFemaleBodyFactory.cc

    r807 r1230  
    3535#include "G4ORNLFemaleBodyFactory.hh"
    3636#include "G4PhysicalVolumeStore.hh"
    37 #include "G4Processor/GDMLProcessor.h"
     37#include "G4GDMLParser.hh"
    3838#include "globals.hh"
    3939#include "G4SDManager.hh"
    4040#include "G4VisAttributes.hh"
    4141#include "G4HumanPhantomColour.hh"
     42
    4243G4ORNLFemaleBodyFactory::G4ORNLFemaleBodyFactory()
    4344{
    44 
    4545}
    4646
    4747G4ORNLFemaleBodyFactory::~G4ORNLFemaleBodyFactory()
    4848{
    49   //sxp.Finalize();
    5049}
    5150
     
    5554{
    5655  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);
    7160 
    7261  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());
    7467
    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());
    7969 
    8070  //   sxp.Finalize();
     
    111101  logicOrgan->SetVisAttributes(organVisAtt);
    112102  }
    113   G4cout << "Organ created !!!!!!  from " << name <<G4endl;
    114   sxp.Finalize();
     103  G4cout << "Organ created !!!!!!  from " << filename <<G4endl;
    115104
    116105  return physOrgan;
  • trunk/examples/advanced/human_phantom/src/G4ORNLMaleBodyFactory.cc

    r807 r1230  
    3535#include "G4ORNLMaleBodyFactory.hh"
    3636#include "G4PhysicalVolumeStore.hh"
    37 #include "G4Processor/GDMLProcessor.h"
     37#include "G4GDMLParser.hh"
    3838#include "globals.hh"
    3939#include "G4SDManager.hh"
    4040#include "G4VisAttributes.hh"
    4141#include "G4HumanPhantomColour.hh"
    42 #include "Saxana/SAXProcessor.h"
    43 #include "Saxana/ProcessingConfigurator.h"
     42
    4443G4ORNLMaleBodyFactory::G4ORNLMaleBodyFactory()
    4544{
     
    5554{
    5655
    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());
    7269 
    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();
    8270  // Define rotation and position here!
    8371  G4VPhysicalVolume* physOrgan = new G4PVPlacement(rm,position,
     
    10290  logicOrgan->SetVisAttributes(organVisAtt);
    10391
    104   G4cout << "Organ created !!!!!!  from " << name <<G4endl;
    105   sxp.Finalize();
     92  G4cout << "Organ created !!!!!!  from " << filename <<G4endl;
    10693
    10794  return physOrgan;
    10895}
    109 
    110 
Note: See TracChangeset for help on using the changeset viewer.