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

update to geant4.9.3

Location:
trunk/examples/advanced
Files:
58 added
417 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/advanced/GNUmakefile

    r1187 r1230  
    1 # $Id: GNUmakefile,v 1.6 2008/06/23 09:26:07 gcosmo Exp $
     1# $Id: GNUmakefile,v 1.7 2009/11/20 16:17:52 gcosmo Exp $
    22# --------------------------------------------------------------
    33# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
     
    1111
    1212SUBDIRS =  gammaray_telescope underground_physics xray_fluorescence xray_telescope
    13 SUBDIRS += brachytherapy cosmicray_charging hadrontherapy
    14 SUBDIRS += medical_linac purging_magnet radioprotection human_phantom
     13SUBDIRS += brachytherapy hadrontherapy medical_linac
     14SUBDIRS += purging_magnet radioprotection human_phantom
    1515SUBDIRS += air_shower microbeam microdosimetry nanobeam
    16 SUBDIRS += Tiara Rich composite_calorimeter lAr_calorimeter
     16SUBDIRS += Rich composite_calorimeter lAr_calorimeter
    1717
    1818.PHONY : all clean clean_libs
  • trunk/examples/advanced/README

    r1187 r1230  
    1 $Id: README,v 1.3 2009/11/18 15:34:16 cirrone Exp $
     1$Id: README,v 1.2 2001/10/23 15:09:27 gcosmo Exp $
    22-------------------------------------------------------------------
    33
     
    1515in each example for the details.
    1616These application are made part of the official GEANT4 distribution, however
    17 their maintenance and updates is under responsibility of the authors.
     17their maintenance and updates is under responsibility of the authors. These
     18applications are not subject to regular system testing.
    1819
  • trunk/examples/advanced/Rich/GNUmakefile

    r807 r1230  
    1 # $Id: GNUmakefile,v 1.1 2003/05/26 13:02:50 pmendez Exp $
     1# $Id: GNUmakefile,v 1.2 2009/03/06 09:39:58 gbarrand Exp $
    22# --------------------------------------------------------------
    33# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
     
    1919include $(G4INSTALL)/config/architecture.gmk
    2020
    21 ifdef G4ANALYSIS_USE
    22   CPPFLAGS += `aida-config --include`
    23   LDFLAGS += `aida-config --lib`
    24 endif
    2521#
    2622.PHONY: all
  • trunk/examples/advanced/Rich/History

    r807 r1230  
    11-------------------------------------------------------------------
    2 $Id: History,v 1.11 2007/09/30 23:00:40 gum Exp $
     2$Id: History,v 1.16 2009/11/12 13:09:56 ribon Exp $
    33-------------------------------------------------------------------
    44
     
    99                      Category History file
    1010                      ---------------------
     11
     1212.11.2009 - A.Ribon (Rich-V09-02-01)
     13             Added the possibility to use QGSP_BIC_EMY as
     14             Physics List. However, by default, the example's
     15             Physics List is used.
     16
     1708.04.2009 - G.A.P.Cirrone; Tag: Rich-V09-02-00
     18             Tag for the next release
     19
     2006.03.2009 - Guy Barrand (in agreement with G.Cosmo)
     21             GNUmakefile : remove the G4ANALYSIS_USE logic found in this file
     22             since it is handled already in the config/analysis.gmk.
     23             This avoids a duplication in the compilation and link commands
     24             of the aida-config options.
     25
     2623.11.2008 - G.A.P.Cirrone; Tag: Rich-V09-01-01
     27             Fixed compilation errors on the file RichTbEventAction
     28
     2914.06.2008 - G.A.P.Cirrone (Rich-V09-01-00)
     30             Fixed compilation errors and removed warnigs
    1131
    123230.09.2007 - P.Gumplinger (Rich-V09-00-00)
  • trunk/examples/advanced/Rich/RichTbSim.cc

    r807 r1230  
    4444#include "G4UImanager.hh"
    4545#include "G4UIterminal.hh"
     46#include "QGSP_BIC_EMY.hh"
     47
    4648#ifdef G4UI_USE_XM
    4749#include "G4UIXm.hh"
    4850#endif
     51
    4952#include "Randomize.hh"
     53
    5054#ifdef G4VIS_USE
    5155#include "G4VisExecutive.hh"
     
    7781   runManager->SetUserInitialization(RichTbDet);
    7882   
    79    RichTbPhysicsList* RichTbPhy
    80      =new RichTbPhysicsList(rConfig);
    81 
    82    runManager-> SetUserInitialization(RichTbPhy);
    83 
     83   //***LOOKHERE*** : Choose the Physics List
     84   RichTbPhysicsList* RichTbPhy =new RichTbPhysicsList(rConfig);
     85   runManager->SetUserInitialization(RichTbPhy);        // Use example's Physics List
     86   //runManager->SetUserInitialization(new QGSP_BIC_EMY); // Use QGSP_BIC_EMY
    8487   
    8588
    8689// UserAction classes - optional
    8790
     91 #ifdef G4VIS_USE
    8892  G4VisManager* visManager = new G4VisExecutive();
    8993  visManager->SetVerboseLevel(0);
     
    9397   G4cout<<" PVVisManager "<<pVVisManager<<G4endl;
    9498   G4cout<<"VisManager "<<visManager<<G4endl;
     99#endif
    95100
    96101   runManager->SetUserAction(new RichTbRunAction);
     
    101106   runManager->SetUserAction( PrimaryGenAction );
    102107
    103    RichTbEventAction* eventAction=
    104      new RichTbEventAction(rConfig,visManager,
    105                            rIOData);
     108 #ifdef G4VIS_USE
     109   RichTbEventAction* eventAction=new RichTbEventAction(rConfig,visManager,rIOData);
     110#endif
     111
     112 #ifndef G4VIS_USE
     113   RichTbEventAction* eventAction=new RichTbEventAction(rConfig,0,rIOData);
     114#endif
    106115
    107116   runManager->SetUserAction(eventAction);
     
    146155#ifdef G4VIS_USE
    147156  delete visManager;
     157  G4cout << "\nVisManager deleted..\n" <<G4endl;
    148158#endif
    149 
    150   G4cout << "\nVisManager deleted..\n" <<G4endl;
    151159
    152160   delete runManager;
  • trunk/examples/advanced/Rich/include/RichTbGeometryParameters.hh

    r807 r1230  
    373373static const G4int NumberOfHpds=4;
    374374static const G4double HpdPosRad=146.5*mm;
    375 static const G4double HpdZfromEnd=HpdMasterHalfZ-VesselPosZ+1.0*mm;;
     375static const G4double HpdZfromEnd=HpdMasterHalfZ-VesselPosZ+1.0*mm;
    376376
    377377static const  G4double HpdMasterPosX[NumberOfHpds]=
  • trunk/examples/advanced/air_shower/GNUmakefile

    r807 r1230  
    2323endif
    2424
    25 ifdef G4ANALYSIS_USE
    26   CPPFLAGS += `aida-config --include`
    27   LDFLAGS += `aida-config --lib`
    28 endif
    29 
    3025
    3126.PHONY: all
  • trunk/examples/advanced/air_shower/UltraMacro.mac

    r807 r1230  
    22/run/verbose 2
    33/event/verbose    0
    4 /tracking/verbose 0
     4/tracking/verbose 1
    55/run/initialize
    6 /gps/particle opticalphoton
     6/gps/particle mu-
    77/gps/direction 0.0 0.0 -1.0
    88/gps/pos/centre  0.0 0.0 100. cm
     
    1010/gps/pos/shape  Circle
    1111/gps/pos/radius 25.0 cm
    12 /gps/energy 3.0 eV
     12/gps/energy 300.0 MeV
    1313
    1414/mysetrun/SetRunID 9999
    15 /run/beamOn 100
    16 exit
     15/run/beamOn 1
  • trunk/examples/advanced/air_shower/Visualisation.mac

    r1187 r1230  
    1313#
    1414#/vis/open OGLIX
    15 /vis/open RayTracerX
    16 #/vis/open ATree
    17 #/vis/open OIX
     15#/vis/open RayTracer
    1816#/vis/open OGLSX
    19 #/vis/open DAWNFILE
     17/vis/open DAWNFILE
    2018#/vis/open HepRepFile
    2119#/vis/open VRML2FILE
     
    3533/vis/scene/endOfEventAction accumulate
    3634#/vis/drawVolume
     35/gps/particle opticalphoton
     36/gps/energy 2.0 eV     
     37/mysetrun/SetRunID 9999
     38/run/beamOn 100
    3739
    38 
    39 /mysetrun/SetRunID 9999
    40 /run/beamOn 50
    41 
  • trunk/examples/advanced/air_shower/include/UltraAnalysisManager.hh

    r807 r1230  
    5858  class IAnalysisFactory;
    5959  class ITreeFactory;
    60 };
     60}
    6161#endif
    6262
  • trunk/examples/advanced/air_shower/include/UltraDetectorConstruction.hh

    r807 r1230  
    6060class UltraDetectorConstruction : public G4VUserDetectorConstruction
    6161{
     62 
    6263  public:
    6364    UltraDetectorConstruction();
     
    6667  public:
    6768    G4VPhysicalVolume* Construct();
     69
     70    inline G4double GetLambdaMin() const {return lambda_min;}
     71    inline G4double GetLambdaMax() const {return lambda_max;}
    6872
    6973  private:
     
    8286    UltraPMTSD*   PMTSD  ;          //pointer to the photomultiplier sensitive detector
    8387    G4SDManager*  SDmanager ;       // Sensitive Detector Manager
    84 
     88   
     89    G4double lambda_min ;
     90    G4double lambda_max ;
    8591};
    8692
  • trunk/examples/advanced/air_shower/src/UltraDetectorConstruction.cc

    r807 r1230  
    7676 // Sensitive Detector Manager
    7777 SDmanager = G4SDManager::GetSDMpointer();
     78
     79// Define wavelength limits for materials definition
     80 lambda_min = 200*nm ;
     81 lambda_max = 700*nm ;
     82
    7883}
    7984
     
    225230/////////////////////////////////////////////
    226231
    227   const G4int NUMENTRIES = 32;
     232  const G4int NUMENTRIES = 2;
    228233
    229234  // Energy bins
    230   G4double X_RINDEX[NUMENTRIES] =
    231             { 2.034E-9*GeV, 2.068E-9*GeV, 2.103E-9*GeV, 2.139E-9*GeV,
    232               2.177E-9*GeV, 2.216E-9*GeV, 2.256E-9*GeV, 2.298E-9*GeV,
    233               2.341E-9*GeV, 2.386E-9*GeV, 2.433E-9*GeV, 2.481E-9*GeV,
    234               2.532E-9*GeV, 2.585E-9*GeV, 2.640E-9*GeV, 2.697E-9*GeV,
    235               2.757E-9*GeV, 2.820E-9*GeV, 2.885E-9*GeV, 2.954E-9*GeV,
    236               3.026E-9*GeV, 3.102E-9*GeV, 3.181E-9*GeV, 3.265E-9*GeV,
    237               3.353E-9*GeV, 3.446E-9*GeV, 3.545E-9*GeV, 3.649E-9*GeV,
    238               3.760E-9*GeV, 3.877E-9*GeV, 4.002E-9*GeV, 4.136E-9*GeV } ;
     235  G4double X_RINDEX[NUMENTRIES] = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
    239236
    240237
    241238  // Air
    242   G4double RINDEX_AIR[NUMENTRIES] =
    243             { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
    244               1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
    245               1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
    246               1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
    247               1.00, 1.00, 1.00, 1.00 } ;
     239  G4double RINDEX_AIR[NUMENTRIES] = {1.00, 1.00} ;
    248240
    249241// Air refractive index at 20 oC and 1 atm (from PDG)
     
    265257
    266258  const G4int N_RINDEX_QUARTZ = 2 ;
    267   G4double X_RINDEX_QUARTZ[N_RINDEX_QUARTZ] = {0.0*eV, 10.0*eV};
     259  G4double X_RINDEX_QUARTZ[N_RINDEX_QUARTZ] = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
    268260  G4double RINDEX_QUARTZ[N_RINDEX_QUARTZ] = {1.54, 1.54};
    269261
     
    280272// Refractive index
    281273
    282   const G4int    N_RINDEX_ACRYLIC = 3 ;
    283   G4double X_RINDEX_ACRYLIC[N_RINDEX_ACRYLIC] = {320.0, 400.0, 500.0};  // Wavelength in nanometers
    284   G4double RINDEX_ACRYLIC[N_RINDEX_ACRYLIC] = {1.526, 1.507, 1.497};
    285 
    286     // Convert from nm to GeV
    287 
    288      for(G4int i=0;i<N_RINDEX_ACRYLIC; i++){
    289       X_RINDEX_ACRYLIC[i] = ((1239.84/X_RINDEX_ACRYLIC[i])*1E-9)*GeV;
    290       }
     274  const G4int NENTRIES = 11 ;
     275  G4double LAMBDA_ACRYLIC[NENTRIES] ;
     276
     277
     278  G4double RINDEX_ACRYLIC[NENTRIES] ;
     279  G4double ENERGY_ACRYLIC[NENTRIES] ;
     280
     281// Parameterization for refractive index of High Grade PMMA
     282
     283  G4double bParam[4] = {1760.7010,-1.3687,2.4388e-3,-1.5178e-6} ;
     284 
     285  for(G4int i=0;i<NENTRIES; i++){
     286 
     287    LAMBDA_ACRYLIC[i] = lambda_min + i*(lambda_max-lambda_min)/float(NENTRIES-1) ;
     288    RINDEX_ACRYLIC[i] = 0.0 ;
     289
     290    for (G4int jj=0 ; jj<4 ; jj++)
     291    {
     292      RINDEX_ACRYLIC[i] +=  (bParam[jj]/1000.0)*std::pow(LAMBDA_ACRYLIC[i]/nm,jj) ;
     293    }
     294
     295    ENERGY_ACRYLIC[i] =   h_Planck*c_light/LAMBDA_ACRYLIC[i] ;  // Convert from wavelength to energy ;
     296//  G4cout << ENERGY_ACRYLIC[i]/eV << " " << LAMBDA_ACRYLIC[i]/nm << " " << RINDEX_ACRYLIC[i] << G4endl ;
     297
     298  }
    291299
    292300  G4MaterialPropertiesTable *MPT_Acrylic = new G4MaterialPropertiesTable();
    293   MPT_Acrylic->AddProperty("RINDEX", X_RINDEX_ACRYLIC, RINDEX_ACRYLIC, N_RINDEX_ACRYLIC);
     301  MPT_Acrylic->AddProperty("RINDEX", ENERGY_ACRYLIC, RINDEX_ACRYLIC, NENTRIES);
     302
     303
     304// Absorption
     305  const G4int NENT = 25 ;
     306  G4double LAMBDAABS[NENT] =
     307  {
     308    100.0,
     309    246.528671, 260.605103, 263.853516, 266.019104, 268.726105,   
     310    271.433136, 273.598724, 276.305725, 279.554138, 300.127380,   
     311    320.159241, 340.191101, 360.764343, 381.337585, 399.745239,   
     312    421.401276, 440.891724, 460.382172, 480.414001, 500.987274,   
     313    520.477722, 540.509583, 559.458618,
     314    700.0   
     315  } ;
     316
     317  G4double ABS[NENT] =   // Transmission (in %) of  3mm thick PMMA
     318  {
     319    0.0000000,
     320    0.0000000,  5.295952,  9.657321, 19.937695, 29.283491,
     321    39.252335, 48.598133, 58.255451, 65.109039, 79.439247,
     322    85.669785, 89.719627, 91.277260, 91.588783, 91.900307,
     323    91.588783, 91.277260, 91.277260, 91.588783, 91.588783,
     324    91.900307, 91.900307, 91.588783,
     325    91.5
     326  } ;
     327
     328
     329  MPT_Acrylic->AddProperty("ABSLENGTH", new G4MaterialPropertyVector()) ;
     330  for(G4int i=0;i<NENT; i++){
     331    G4double energy    = h_Planck*c_light/(LAMBDAABS[i]*nm) ;
     332    G4double abslength ;
     333
     334    if (ABS[i] <= 0.0) {
     335      abslength = 1.0/kInfinity ;
     336    }
     337    else {
     338      abslength = -3.0*mm/(std::log(ABS[i]/100.0)) ;
     339    }
     340
     341    MPT_Acrylic->AddEntry("ABSLENGTH", energy, abslength);
     342
     343  }
     344
    294345  Acrylic->SetMaterialPropertiesTable(MPT_Acrylic);
    295 
     346 
    296347
    297348//////////////////////////////////////////////////////////////////
     
    344395
    345396const G4int NUM = 2;
    346 G4double XX[NUM] = { 0.1E-9*GeV, 10.0E-9*GeV };
     397G4double XX[NUM] = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
    347398G4double ICEREFLECTIVITY[NUM]      = { 0.95, 0.95 };
    348399
     
    403454
    404455 const G4int NUM = 2;
    405 G4double XX[NUM] = { 0.1E-9*GeV, 10.0E-9*GeV };
     456G4double XX[NUM] = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
    406457G4double ICEREFLECTIVITY[NUM]      = { 0.95, 0.95 };
    407458
     
    566617
    567618const G4int NUM = 2;
    568 G4double XX[NUM] = { 2.030E-9*GeV, 4.144E-9*GeV };
     619G4double XX[NUM] = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
    569620G4double BLACKPAINTREFLECTIVITY[NUM]      = { 0.05, 0.05 };
    570621//G4double WHITEPAINTREFLECTIVITY[NUM]      = { 0.99, 0.99 };
  • trunk/examples/advanced/air_shower/src/UltraPhysicsList.cc

    r807 r1230  
    164164#include "G4PhotoElectricEffect.hh"
    165165
    166 #include "G4MultipleScattering.hh"
     166#include "G4eMultipleScattering.hh"
     167#include "G4MuMultipleScattering.hh"
     168#include "G4hMultipleScattering.hh"
    167169
    168170#include "G4eIonisation.hh"
     
    196198    //electron
    197199      // Construct processes for electron
    198       pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
     200      pmanager->AddProcess(new G4eMultipleScattering(),-1,1,1);
    199201      pmanager->AddProcess(new G4eIonisation(),-1,2,2);
    200202      pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
     
    203205    //positron
    204206      // Construct processes for positron
    205       pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
     207      pmanager->AddProcess(new G4eMultipleScattering(),-1,1,1);
    206208      pmanager->AddProcess(new G4eIonisation(),-1,2,2);
    207209      pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
     
    212214    //muon
    213215     // Construct processes for muon
    214      pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
     216     pmanager->AddProcess(new G4MuMultipleScattering(),-1,1,1);
    215217     pmanager->AddProcess(new G4MuIonisation(),-1,2,2);
    216218     pmanager->AddProcess(new G4MuBremsstrahlung(),-1,-1,3);
     
    221223          (particle->GetParticleName() != "chargedgeantino")) {
    222224     // all others charged particles except geantino
    223        pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
     225       pmanager->AddProcess(new G4hMultipleScattering(),-1,1,1);
    224226       pmanager->AddProcess(new G4hIonisation(),-1,2,2);
    225227     }
     
    240242  // this Cerenkov Process
    241243  G4Cerenkov*   theCerenkovProcess = new G4Cerenkov("Cerenkov");
    242   // this is Scintillation process
    243   G4Scintillation* theScintillationProcess = new G4Scintillation("Scintillation");
    244244  // this absorption process inside optical media
    245245  G4OpAbsorption* theAbsorptionProcess = new G4OpAbsorption();
     
    251251  // Chose level 0 (no verbose)
    252252  theCerenkovProcess           -> SetVerboseLevel(0);
    253   theScintillationProcess      -> SetVerboseLevel(0);
    254253  theAbsorptionProcess         -> SetVerboseLevel(0);
    255254  theRayleighScatteringProcess -> SetVerboseLevel(0);
     
    262261  theCerenkovProcess->SetTrackSecondariesFirst(true);
    263262
    264   theScintillationProcess->SetTrackSecondariesFirst(true);
    265   theScintillationProcess->SetScintillationYieldFactor(1.);
    266   theScintillationProcess->SetScintillationExcitationRatio(0.0);
    267 
    268263  // Boundary model (UNIFIED OR GLISUR (OLD GEANT3)) For now only GEANT3
    269264  G4OpticalSurfaceModel themodel = unified;
     
    277272
    278273    if (theCerenkovProcess->IsApplicable(*particle)) {
    279       //      pmanager->AddProcess(theCerenkovProcess);
    280       //      pmanager->SetProcessOrdering(theCerenkovProcess,idxPostStep);
     274      pmanager->AddProcess(theCerenkovProcess);
     275      pmanager->SetProcessOrdering(theCerenkovProcess,idxPostStep);
    281276    }
    282277
    283     if (theScintillationProcess->IsApplicable(*particle)) {
    284       pmanager->AddProcess(theScintillationProcess);
    285       pmanager->SetProcessOrderingToLast(theScintillationProcess, idxAtRest);
    286       pmanager->SetProcessOrderingToLast(theScintillationProcess, idxPostStep);
    287     }
    288278
    289279    if (particleName == "opticalphoton") {
  • trunk/examples/advanced/air_shower/src/UltraPrimaryGeneratorAction.cc

    r807 r1230  
    4343//
    4444#include "UltraPrimaryGeneratorAction.hh"
     45#include "UltraDetectorConstruction.hh"
    4546
     47#include "G4RunManager.hh"
    4648#include "G4Event.hh"
    4749#include "G4GeneralParticleSource.hh"
     
    129131    G4cout << particleGun->GetCurrentSource()->GetPosDist()->GetPosDisType()    << G4endl ;
    130132
     133
     134// Check if optical photon wavelength is within limits set for material optical properties tables.
     135
     136   
     137
     138
    131139}
    132140  particleGun->GeneratePrimaryVertex(anEvent);
     141
     142    if (particleGun->GetParticleDefinition()->GetParticleName() == "opticalphoton"){
     143     
     144        const UltraDetectorConstruction * detector = 
     145        dynamic_cast<const UltraDetectorConstruction *>((G4RunManager::GetRunManager())->GetUserDetectorConstruction()) ;
     146
     147        G4double lambda_min = detector->GetLambdaMin() ;
     148        G4double lambda_max = detector->GetLambdaMax() ;
     149
     150        G4double energy = particleGun->GetParticleEnergy() ;
     151
     152        if (h_Planck*c_light/energy > lambda_max || h_Planck*c_light/energy < lambda_min){
     153               G4cerr << "Error ! Optical photon energy (" << energy/eV << " eV) out of limits set by material optical properties tables. \n"
     154              << "Please check that photon wavelength is within the following interval: ["
     155              << lambda_min/nm << ","
     156              << lambda_max/nm << "] nm"
     157              << ", i.e., ["
     158              << h_Planck*c_light/lambda_max/eV << ","
     159              << h_Planck*c_light/lambda_min/eV << "] eV"
     160              << G4endl ;
     161       
     162             G4Exception("") ;
     163        }
     164 }
     165
    133166}
    134167
  • trunk/examples/advanced/brachytherapy/Brachy.cc

    r807 r1230  
    2626//
    2727// $Id: Brachy.cc
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// --------------------------------------------------------------
  • trunk/examples/advanced/brachytherapy/GNUmakefile

    r807 r1230  
    11# --------------------------------------------------------------
    2 # $Id: GNUmakefile,v 1.12 2003/05/26 12:36:25 guatelli Exp $
     2# $Id: GNUmakefile,v 1.13 2008/06/15 18:05:59 cirrone Exp $
    33# --------------------------------------------------------------
    44# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
     
    1919include $(G4INSTALL)/config/binmake.gmk
    2020
    21 ifdef G4ANALYSIS_USE 
    22  CPPFLAGS += `aida-config --include`
    23  LDFLAGS  += `aida-config --lib`
    24  LOADLIBS += `aida-config --lib`
    25 endif
    2621
    2722
  • trunk/examples/advanced/brachytherapy/IridiumSourceMacro.mac

    r807 r1230  
    33/run/verbose 0
    44/event/verbose 0
    5 /run/beamOn  20000
     5/run/beamOn  10000
    66
    77
  • trunk/examples/advanced/brachytherapy/LeipzigSourceMacro.mac

    r807 r1230  
    33/event/verbose 0
    44/source/switch Leipzig
    5 /run/beamOn  20000
     5/run/beamOn  10000
  • trunk/examples/advanced/brachytherapy/include/BrachyAnalysisManager.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: BrachyAnalysisManager.hh,v 1.13 2007/06/21 14:58:39 gunter Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: BrachyAnalysisManager.hh,v 1.14 2008/06/05 13:45:39 cirrone Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828
    2929// Code review: MG Pia, 14/05/2207
     
    6363
    6464  void book();
    65   void FillNtupleWithEnergy(G4double,G4double,G4double,G4float);
     65  void FillNtupleWithEnergy(G4double,G4double,G4double,G4double);
    6666  void FillHistogramWithEnergy(G4double,G4double,G4double);
    6767  void PrimaryParticleEnergySpectrum(G4double);
  • trunk/examples/advanced/brachytherapy/include/BrachyDetectorConstruction.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyDetectorConstruction.hh,v 1.17 2006/06/29 15:47:11 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// 
    3030//    ****************************************
  • trunk/examples/advanced/brachytherapy/include/BrachyDetectorConstructionI.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyDetectorConstructionI.hh,v 1.5 2006/06/29 15:47:13 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//    ****************************************
  • trunk/examples/advanced/brachytherapy/include/BrachyDetectorConstructionIr.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyDetectorConstructionIr.hh,v 1.5 2006/06/29 15:47:16 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//    ****************************************
  • trunk/examples/advanced/brachytherapy/include/BrachyDetectorConstructionLeipzig.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyDetectorConstructionLeipzig.hh,v 1.5 2006/06/29 15:47:19 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/advanced/brachytherapy/include/BrachyDetectorMessenger.hh

    r807 r1230  
    3232//
    3333// $Id: BrachyDetectorMessenger.hh,v 1.7 2006/06/29 15:47:22 gunter Exp $
    34 // GEANT4 tag $Name: $
     34// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3535//
    3636//
  • trunk/examples/advanced/brachytherapy/include/BrachyEventAction.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyEventAction.hh,v 1.15 2006/06/29 15:47:28 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// Code developed by:
  • trunk/examples/advanced/brachytherapy/include/BrachyFactory.hh

    r807 r1230  
    2727//
    2828// $Id: BrachyFactory.hh,v 1.6 2006/06/29 15:47:30 gunter Exp $
    29 // GEANT4 tag $Name: $
     29// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3030//
    3131//    **********************************
  • trunk/examples/advanced/brachytherapy/include/BrachyFactoryI.hh

    r807 r1230  
    3636//
    3737// $Id: BrachyFactoryI.hh,v 1.7 2006/06/29 15:47:33 gunter Exp $
    38 // GEANT4 tag $Name: $
     38// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3939//
    4040//
  • trunk/examples/advanced/brachytherapy/include/BrachyFactoryIr.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyFactoryIr.hh,v 1.6 2006/06/29 15:47:36 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//    **********************************
  • trunk/examples/advanced/brachytherapy/include/BrachyFactoryLeipzig.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyFactoryLeipzig.hh,v 1.6 2006/06/29 15:47:39 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//    **********************************
  • trunk/examples/advanced/brachytherapy/include/BrachyMaterial.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyMaterial.hh,v 1.7 2006/06/29 15:47:42 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//    **********************************
  • trunk/examples/advanced/brachytherapy/include/BrachyPhantomROGeometry.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyPhantomROGeometry.hh,v 1.7 2006/06/29 15:47:45 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//    ************************************
  • trunk/examples/advanced/brachytherapy/include/BrachyPhantomSD.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyPhantomSD.hh,v 1.10 2006/06/29 15:47:48 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//    ********************************
  • trunk/examples/advanced/brachytherapy/include/BrachyPhysicsList.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyPhysicsList.hh,v 1.9 2006/11/15 10:02:17 guatelli Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// Code review: MGP, 5 November 2006 (still to be completed)
  • trunk/examples/advanced/brachytherapy/include/BrachyPrimaryGeneratorAction.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyPrimaryGeneratorAction.hh,v 1.12 2006/06/29 15:47:54 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//    ********************************************
  • trunk/examples/advanced/brachytherapy/include/BrachyPrimaryGeneratorActionI.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyPrimaryGeneratorActionI.hh,v 1.6 2006/06/29 15:47:57 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/advanced/brachytherapy/include/BrachyPrimaryGeneratorActionIr.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyPrimaryGeneratorActionIr.hh,v 1.7 2006/06/29 15:47:59 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//    *************************************************
  • trunk/examples/advanced/brachytherapy/include/BrachyPrimaryGeneratorMessenger.hh

    r807 r1230  
    3232//
    3333// $Id: BrachyPrimaryGeneratorMessenger.hh,v 1.2 2006/06/29 15:48:02 gunter Exp $
    34 // GEANT4 tag $Name: $
     34// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3535//
    3636//
  • trunk/examples/advanced/brachytherapy/include/BrachyRunAction.hh

    r807 r1230  
    2626//
    2727// $Id: BrachyRunAction.hh,v 1.11 2006/06/29 15:48:04 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/advanced/brachytherapy/src/BrachyAnalysisManager.cc

    r807 r1230  
    3333//    *******************************
    3434//
    35 // $Id: BrachyAnalysisManager.cc,v 1.19 2007/05/14 09:57:55 pia Exp $
    36 // GEANT4 tag $Name: $
     35// $Id: BrachyAnalysisManager.cc,v 1.22 2009/11/12 10:32:59 pandola Exp $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
     38#ifdef G4ANALYSIS_USE
     39
    3840#include <stdlib.h>
    3941#include <fstream>
     
    4244#include "G4ios.hh"
    4345
    44 #ifdef G4ANALYSIS_USE
     46
    4547#include "AIDA/IHistogram1D.h"
    4648#include "AIDA/IHistogram2D.h"
     
    5254#include "AIDA/ITree.h"
    5355#include "AIDA/ITuple.h"
    54 #endif
     56
    5557
    5658BrachyAnalysisManager* BrachyAnalysisManager::instance = 0;
    5759
    58 BrachyAnalysisManager::BrachyAnalysisManager()
     60BrachyAnalysisManager::BrachyAnalysisManager() :
     61aFact(0), theTree(0), histFact(0), tupFact(0), h1(0),
     62  h2(0), h3(0), ntuple(0)
     63
    5964{
    60 
    61 #ifdef G4ANALYSIS_USE
    62   aFact = 0;
    63   theTree(0);
    64   histFact = 0;
    65   tupFact = 0;
    66   h1 = 0;
    67   h2 = 0;
    68   ntuple = 0;
    69 
     65 
    7066  // Instantiate the factories
    7167  // The factories manage the analysis objects
     
    7571 
    7672  // Definition of the output file
    77   G4String fileName = "brachytherapy.hbk";
    78   theTree = treeFact -> create(fileName,"hbook",false, true);
     73  G4String fileName = "brachytherapy.root";
     74  theTree = treeFact -> create(fileName,"ROOT",false, true);
    7975
    8076  delete treeFact;
    81 #endif
    8277}
    8378
    8479BrachyAnalysisManager::~BrachyAnalysisManager()
    8580{
    86 
    87 #ifdef G4ANALYSIS_USE
    8881  delete tupFact;
    8982  tupFact = 0;
     
    9790  delete aFact;
    9891  aFact = 0;
    99 #endif
    10092}
    10193
     
    108100void BrachyAnalysisManager::book()
    109101{
    110 #ifdef G4ANALYSIS_USE
    111102  // Instantiate the histogram and ntuple factories
    112103  histFact = aFact -> createHistogramFactory( *theTree );
     
    129120
    130121  //defining the ntuple columns' name
    131   std::string columnNames = "float energy; float x; float y; float z";
     122  std::string columnNames = "double energy, x , y , z ";
    132123  std::string options = "";
    133124 
     
    136127  // check for non-zero ...
    137128  if (ntuple) G4cout<<"The Ntuple is non-zero"<<G4endl;
    138 #endif
    139129}
    140130 
     
    142132                                                 G4double yy,
    143133                                                 G4double zz,
    144                                                  G4float en)
     134                                                 G4double en)
    145135{
    146 #ifdef G4ANALYSIS_USE
    147136  if (ntuple == 0)
    148137   {
     
    164153
    165154  ntuple->addRow();
    166 #endif
    167155}
    168156
     
    171159                                                    G4double energyDeposit)
    172160{
    173 #ifdef G4ANALYSIS_USE
    174161  // 2DHistogram: energy deposit in a voxel which center is fixed in position (x,z) 
    175162  h1 -> fill(x,z,energyDeposit);
    176 #endif
    177163}
    178164
    179165void BrachyAnalysisManager::PrimaryParticleEnergySpectrum(G4double primaryParticleEnergy)
    180166{
    181 #ifdef G4ANALYSIS_USE
    182167 // 1DHistogram: energy spectrum of primary particles 
    183168  h2 -> fill(primaryParticleEnergy);
    184 #endif
    185169  return;
    186170}
     
    188172void BrachyAnalysisManager::DoseDistribution(G4double x,G4double energy)
    189173{
    190 #ifdef G4ANALYSIS_USE
    191174  // 1DHistogram: energy spectrum of primary particles 
    192175  h3 -> fill(x, energy);
    193 #endif
    194176}
    195177
    196178void BrachyAnalysisManager::finish()
    197179
    198 #ifdef G4ANALYSIS_USE
     180
    199181 // write all histograms to file ...
    200182  theTree -> commit();
     
    202184  // close (will again commit) ...
    203185  theTree -> close();
     186}
    204187#endif
    205 }
    206188
    207189
     
    215197
    216198
    217 
  • trunk/examples/advanced/brachytherapy/src/BrachyDetectorConstruction.cc

    r807 r1230  
    3939//
    4040// $Id: BrachyDetectorConstruction.cc,v 1.29 2006/06/29 15:48:09 gunter Exp $
    41 // GEANT4 tag $Name: $
     41// GEANT4 tag $Name: geant4-09-03-cand-01 $
    4242//
    4343#include "G4CSGSolid.hh"
  • trunk/examples/advanced/brachytherapy/src/BrachyDetectorConstructionI.cc

    r807 r1230  
    3838//
    3939// $Id: BrachyDetectorConstructionI.cc,v 1.9 2006/06/29 15:48:11 gunter Exp $
    40 // GEANT4 tag $Name: $
     40// GEANT4 tag $Name: geant4-09-03-cand-01 $
    4141//
    4242#include "globals.hh"
  • trunk/examples/advanced/brachytherapy/src/BrachyDetectorConstructionIr.cc

    r807 r1230  
    3939//
    4040// $Id: BrachyDetectorConstructionIr.cc,v 1.10 2006/06/29 15:48:13 gunter Exp $
    41 // GEANT4 tag $Name: $
     41// GEANT4 tag $Name: geant4-09-03-cand-01 $
    4242//
    4343#include "globals.hh"
  • trunk/examples/advanced/brachytherapy/src/BrachyDetectorConstructionLeipzig.cc

    r807 r1230  
    4040//
    4141// $Id: BrachyDetectorConstructionLeipzig.cc,v 1.10 2006/06/29 15:48:16 gunter Exp $
    42 // GEANT4 tag $Name: $
     42// GEANT4 tag $Name: geant4-09-03-cand-01 $
    4343//
    4444
  • trunk/examples/advanced/brachytherapy/src/BrachyDetectorMessenger.cc

    r807 r1230  
    3636//
    3737// $Id: BrachyDetectorMessenger.cc,v 1.12 2006/06/29 15:48:18 gunter Exp $
    38 // GEANT4 tag $Name: $
     38// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3939//
    4040//
  • trunk/examples/advanced/brachytherapy/src/BrachyEventAction.cc

    r807 r1230  
    3434//
    3535// $Id: BrachyEventAction.cc,v 1.21 2006/06/29 15:48:21 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838#include "BrachyEventAction.hh"
  • trunk/examples/advanced/brachytherapy/src/BrachyFactory.cc

    r807 r1230  
    3636//
    3737// $Id: BrachyFactory.cc,v 1.7 2006/06/29 15:48:23 gunter Exp $
    38 // GEANT4 tag $Name: $
     38// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3939//
    4040// Factory of brachytherapic sources
  • trunk/examples/advanced/brachytherapy/src/BrachyFactoryI.cc

    r807 r1230  
    3434//
    3535// $Id: BrachyFactoryI.cc,v 1.6 2006/06/29 15:48:26 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838#include "BrachyFactoryI.hh"
  • trunk/examples/advanced/brachytherapy/src/BrachyFactoryIr.cc

    r807 r1230  
    3434//
    3535// $Id: BrachyFactoryIr.cc,v 1.6 2006/06/29 15:48:29 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838#include "globals.hh"
  • trunk/examples/advanced/brachytherapy/src/BrachyFactoryLeipzig.cc

    r807 r1230  
    3434//
    3535// $Id: BrachyFactoryLeipzig.cc,v 1.6 2006/06/29 15:48:31 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/brachytherapy/src/BrachyMaterial.cc

    r807 r1230  
    3434//
    3535// $Id: BrachyMaterial.cc,v 1.7 2006/06/29 15:48:33 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/brachytherapy/src/BrachyPhantomROGeometry.cc

    r807 r1230  
    3535//
    3636// $Id: BrachyPhantomROGeometry.cc,v 1.11 2006/06/29 15:48:36 gunter Exp $
    37 // GEANT4 tag $Name: $
     37// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3838//
    3939#include "BrachyPhantomROGeometry.hh"
  • trunk/examples/advanced/brachytherapy/src/BrachyPhantomSD.cc

    r807 r1230  
    3434//    ********************************
    3535//
    36 // $Id: BrachyPhantomSD.cc,v 1.13 2006/06/29 15:48:39 gunter Exp $
    37 // GEANT4 tag $Name: $
     36// $Id: BrachyPhantomSD.cc,v 1.14 2009/02/23 17:34:26 gunter Exp $
     37// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3838//
    3939#include "BrachyPhantomSD.hh"
     40#ifdef G4ANALYSIS_USE
    4041#include "BrachyAnalysisManager.hh"
     42#endif
    4143#include "BrachyDetectorConstruction.hh"
    4244#include "G4Track.hh"
  • trunk/examples/advanced/brachytherapy/src/BrachyPhysicsList.cc

    r807 r1230  
    3636//    **********************************
    3737//
    38 // $Id: BrachyPhysicsList.cc,v 1.13 2006/11/15 10:02:17 guatelli Exp $
    39 // GEANT4 tag $Name: $
     38// $Id: BrachyPhysicsList.cc,v 1.14 2009/11/12 02:50:51 cirrone Exp $
     39// GEANT4 tag $Name: geant4-09-03-cand-01 $
    4040//
    4141#include "BrachyPhysicsList.hh"
     
    4747#include "G4UnitsTable.hh"
    4848#include "G4ios.hh"             
    49 
    5049#include "G4MultipleScattering.hh"
    5150// gamma
    52 #include "G4LowEnergyRayleigh.hh"
    53 #include "G4LowEnergyPhotoElectric.hh"
    54 #include "G4LowEnergyCompton.hh" 
    55 #include "G4LowEnergyGammaConversion.hh"
     51#include "G4PhotoElectricEffect.hh"
     52#include "G4LivermorePhotoElectricModel.hh"
     53
     54#include "G4ComptonScattering.hh"
     55#include "G4LivermoreComptonModel.hh"
     56
     57#include "G4GammaConversion.hh"
     58#include "G4LivermoreGammaConversionModel.hh"
     59
     60#include "G4RayleighScattering.hh"
     61#include "G4LivermoreRayleighModel.hh"
     62
    5663// e-
    57 #include "G4LowEnergyIonisation.hh"
    58 #include "G4LowEnergyBremsstrahlung.hh"
     64#include "G4eMultipleScattering.hh"
     65#include "G4eIonisation.hh"
     66#include "G4LivermoreIonisationModel.hh"
     67#include "G4eBremsstrahlung.hh"
     68#include "G4LivermoreBremsstrahlungModel.hh"
     69
    5970// e+
    6071#include "G4eIonisation.hh"
     
    8091  ConstructBosons();
    8192  ConstructLeptons();
     93
    8294}
    8395
     
    114126   
    115127    if (particleName == "gamma") {
     128     
    116129      // Photon     
    117       pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh);
    118       pmanager->AddDiscreteProcess(new G4LowEnergyPhotoElectric);
    119       pmanager->AddDiscreteProcess(new G4LowEnergyCompton);
    120       pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion);
     130      G4RayleighScattering* theRayleigh = new G4RayleighScattering();
     131      theRayleigh->SetModel(new G4LivermoreRayleighModel());  //not strictly necessary
     132      pmanager->AddDiscreteProcess(theRayleigh);
     133
     134      G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
     135      thePhotoElectricEffect->SetModel(new G4LivermorePhotoElectricModel());
     136      pmanager->AddDiscreteProcess(thePhotoElectricEffect);
     137       
     138      G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
     139      theComptonScattering->SetModel(new G4LivermoreComptonModel());
     140      pmanager->AddDiscreteProcess(theComptonScattering);
     141       
     142      G4GammaConversion* theGammaConversion = new G4GammaConversion();
     143      theGammaConversion->SetModel(new G4LivermoreGammaConversionModel());
     144      pmanager->AddDiscreteProcess(theGammaConversion);
    121145     
    122146    } else if (particleName == "e-") {
    123147      // Electron
    124       G4LowEnergyIonisation*     loweIon  = new G4LowEnergyIonisation("LowEnergyIoni");
    125 
    126       G4LowEnergyBremsstrahlung* loweBrem = new G4LowEnergyBremsstrahlung("LowEnBrem");
    127       // Select the Bremsstrahlung angular distribution model (Tsai/2BN/2BS)
    128       loweBrem->SetAngularGenerator("tsai");
    129    
    130       pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
    131       pmanager->AddProcess(loweIon,     -1, 2,2);
    132       pmanager->AddProcess(loweBrem,    -1,-1,3);     
     148     
     149      G4eMultipleScattering* msc = new G4eMultipleScattering();
     150      msc->SetStepLimitType(fUseDistanceToBoundary);
     151      pmanager->AddProcess(msc,-1, 1, 1);
     152
     153      // Ionisation
     154      G4eIonisation* eIonisation = new G4eIonisation();
     155      eIonisation->SetEmModel(new G4LivermoreIonisationModel());
     156      eIonisation->SetStepFunction(0.2, 100*um); //improved precision in tracking 
     157      pmanager->AddProcess(eIonisation,-1, 2, 2);
     158       
     159      // Bremsstrahlung
     160      G4eBremsstrahlung* eBremsstrahlung = new G4eBremsstrahlung();
     161      eBremsstrahlung->SetEmModel(new G4LivermoreBremsstrahlungModel());
     162      pmanager->AddProcess(eBremsstrahlung, -1,-3, 3);
    133163     
    134164    } else if (particleName == "e+") {
    135165      // Positron     
    136       pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
    137       pmanager->AddProcess(new G4eIonisation,        -1, 2,2);
    138       pmanager->AddProcess(new G4eBremsstrahlung,    -1,-1,3);
    139       pmanager->AddProcess(new G4eplusAnnihilation,   0,-1,4);     
     166      G4eMultipleScattering* msc = new G4eMultipleScattering();
     167      msc->SetStepLimitType(fUseDistanceToBoundary);
     168      pmanager->AddProcess(msc,-1, 1, 1);
     169       
     170      // Ionisation
     171      G4eIonisation* eIonisation = new G4eIonisation();
     172      eIonisation->SetStepFunction(0.2, 100*um); //     
     173      pmanager->AddProcess(eIonisation,                 -1, 2, 2);
     174
     175      //Bremsstrahlung (use default, no low-energy available)
     176      pmanager->AddProcess(new G4eBremsstrahlung(), -1,-1, 3);
     177
     178      //Annihilation
     179      pmanager->AddProcess(new G4eplusAnnihilation(),0,-1, 4);     
    140180     
    141181    }
  • trunk/examples/advanced/brachytherapy/src/BrachyPrimaryGeneratorAction.cc

    r807 r1230  
    3838//    ********************************************
    3939//
    40 // $Id: BrachyPrimaryGeneratorAction.cc,v 1.18 2006/06/29 15:48:45 gunter Exp $
    41 // GEANT4 tag $Name: $
     40// $Id: BrachyPrimaryGeneratorAction.cc,v 1.19 2009/02/23 17:34:26 gunter Exp $
     41// GEANT4 tag $Name: geant4-09-03-cand-01 $
    4242//
    4343#include "globals.hh"
    4444#include "BrachyPrimaryGeneratorAction.hh"
     45#ifdef G4ANALYSIS_USE
    4546#include "BrachyAnalysisManager.hh"
     47#endif
    4648#include "G4ParticleTable.hh"
    4749#include "Randomize.hh" 
  • trunk/examples/advanced/brachytherapy/src/BrachyPrimaryGeneratorActionI.cc

    r807 r1230  
    3939//
    4040// $Id: BrachyPrimaryGeneratorActionI.cc,v 1.10 2006/06/29 15:48:48 gunter Exp $
    41 // GEANT4 tag $Name: $
     41// GEANT4 tag $Name: geant4-09-03-cand-01 $
    4242//
    4343#include "BrachyPrimaryGeneratorActionI.hh"
  • trunk/examples/advanced/brachytherapy/src/BrachyPrimaryGeneratorActionIr.cc

    r807 r1230  
    3939//
    4040// $Id: BrachyPrimaryGeneratorActionIr.cc,v 1.11 2006/06/29 15:48:51 gunter Exp $
    41 // GEANT4 tag $Name: $
     41// GEANT4 tag $Name: geant4-09-03-cand-01 $
    4242//
    4343#include "BrachyPrimaryGeneratorActionIr.hh"
  • trunk/examples/advanced/brachytherapy/src/BrachyPrimaryGeneratorMessenger.cc

    r807 r1230  
    3636//
    3737// $Id: BrachyPrimaryGeneratorMessenger.cc,v 1.3 2006/06/29 15:48:54 gunter Exp $
    38 // GEANT4 tag $Name: $
     38// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3939//
    4040//
  • trunk/examples/advanced/brachytherapy/src/BrachyRunAction.cc

    r807 r1230  
    4040//
    4141// $Id: BrachyRunAction.cc,v 1.18 2006/06/29 15:48:57 gunter Exp $
    42 // GEANT4 tag $Name: $
     42// GEANT4 tag $Name: geant4-09-03-cand-01 $
    4343//
    4444
  • trunk/examples/advanced/composite_calorimeter/CompositeCalorimeter.cc

    r807 r1230  
    3737#include "QGSP.hh"
    3838#include "QGSC.hh"
     39#include "QGSP_BIC_EMY.hh"
    3940
    4041#include "G4RunManager.hh"
     
    6162
    6263  //***LOOKHERE*** CHOOSE THE PHYSICS LIST.
    63   // runManager->SetUserInitialization(new LHEP);     // LHEP     
    64   runManager->SetUserInitialization(new QGSP);     // QGSP   
    65   // runManager->SetUserInitialization(new QGSC);     // QGSC
     64  // runManager->SetUserInitialization(new LHEP);          // LHEP     
     65  // runManager->SetUserInitialization(new QGSP);          // QGSP
     66  // runManager->SetUserInitialization(new QGSC);          // QGSC
     67  runManager->SetUserInitialization(new QGSP_BIC_EMY);  // QGSP_BIC_EMY
    6668  //***endLOOKHERE***
    6769
  • trunk/examples/advanced/composite_calorimeter/GNUmakefile

    r807 r1230  
    1 # $Id: GNUmakefile,v 1.10 2006/11/14 14:39:51 ribon Exp $
     1# $Id: GNUmakefile,v 1.11 2008/06/15 18:13:06 cirrone Exp $
    22# --------------------------------------------------------------
    33# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
     
    2020include $(G4INSTALL)/config/binmake.gmk
    2121
    22 ifdef G4ANALYSIS_USE 
    23   CPPFLAGS += `aida-config --include`
    24   LDFLAGS  += `aida-config --lib`
    25   LOADLIBS += `aida-config --lib`
    26 endif
    2722
     23
  • trunk/examples/advanced/composite_calorimeter/src/CCalEndOfEventAction.cc

    r807 r1230  
    214214  }
    215215
     216  delete[] edep;
     217
     218#ifdef G4ANALYSIS_USE
    216219  G4ThreeVector pos = primaryGenerator->GetParticlePosition();
    217220  float ener = primaryGenerator->GetParticleEnergy()/GeV;
     
    219222  float y    = pos.y()/mm;
    220223  float z    = pos.z()/mm;
    221   delete[] edep;
    222 
    223 #ifdef G4ANALYSIS_USE
     224
    224225  CCalAnalysis* analysis = CCalAnalysis::getInstance();
    225226  analysis->InsertEnergy(fullE);
  • trunk/examples/advanced/composite_calorimeter/src/CCalRunAction.cc

    r807 r1230  
    6262void CCalRunAction::EndOfRunAction(const G4Run* aRun) {
    6363
    64   G4cout << "Executing CCalRunAction" << G4endl;
     64  G4cout << "### Run " << aRun->GetRunID() << " end." << G4endl;
    6565
    6666  // A.R. Added for visualization of events.
  • trunk/examples/advanced/gammaray_telescope/GammaRayTel.cc

    r807 r1230  
    2525//
    2626//
    27 // $Id: GammaRayTel.cc,v 1.16 2006/06/29 15:54:48 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: GammaRayTel.cc,v 1.17 2009/11/18 15:54:55 flongo Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    8787  //runManager->SetUserInitialization(new QGSP_BIC);
    8888
    89  
    9089
    9190  // Set mandatory user action classes
  • trunk/examples/advanced/gammaray_telescope/emlowe.mac

    r807 r1230  
    1 /process/activate   LowEnRayleigh   gamma
    2 /process/activate   LowEnPhotoElec  gamma
    3 /process/activate   LowEnCompton    gamma
    4 /process/activate   LowEnConversion gamma
    5 
    6 /process/inactivate phot            gamma
    7 /process/inactivate compt           gamma
    8 /process/inactivate conv            gamma
    9 
    10 /process/activate   LowEnergyIoni   
    11 /process/activate   LowEnBrem       
    12 
    13 /process/inactivate eIoni           
    14 /process/inactivate eBrem           
    15 
    16 /process/list
     1/physics/addPhysics LowE EM
  • trunk/examples/advanced/gammaray_telescope/emstd.mac

    r807 r1230  
    1 /process/inactivate LowEnRayleigh   gamma
    2 /process/inactivate LowEnPhotoElec  gamma
    3 /process/inactivate LowEnCompton    gamma
    4 /process/inactivate LowEnConversion gamma
     1/physics/addPhysics Standard EM
    52
    6 /process/activate   phot            gamma
    7 /process/activate   compt           gamma
    8 /process/activate   conv            gamma
    9 
    10 /process/inactivate LowEnergyIoni   
    11 /process/inactivate LowEnBrem       
    12 
    13 /process/activate   eIoni           
    14 /process/activate   eBrem           
    15 
    16 /process/list
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelAnalysis.hh

    r807 r1230  
    2727//
    2828// $Id: GammaRayTelAnalysis.hh,v 1.18 2006/06/29 15:54:51 gunter Exp $
    29 // GEANT4 tag $Name: $
     29// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3030// ------------------------------------------------------------
    3131//      GEANT 4 class header file
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelAnalysisMessenger.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelAnalysisMessenger.hh,v 1.4 2006/06/29 15:54:54 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// ------------------------------------------------------------
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelAnticoincidenceHit.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelAnticoincidenceHit.hh,v 1.3 2006/06/29 15:54:57 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class header file
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelAnticoincidenceSD.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelAnticoincidenceSD.hh,v 1.5 2006/06/29 15:55:00 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class header file
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelCalorimeterHit.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelCalorimeterHit.hh,v 1.3 2006/06/29 15:55:03 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class header file
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelCalorimeterSD.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelCalorimeterSD.hh,v 1.5 2006/06/29 15:55:06 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class header file
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelDetectorConstruction.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelDetectorConstruction.hh,v 1.10 2006/06/29 15:55:09 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class header file
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelDetectorMessenger.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelDetectorMessenger.hh,v 1.4 2006/06/29 15:55:12 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// ------------------------------------------------------------
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelDigi.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelDigi.hh,v 1.3 2006/06/29 15:55:15 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class header file
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelDigitizer.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelDigitizer.hh,v 1.4 2006/06/29 15:55:18 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class header file
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelDigitizerMessenger.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelDigitizerMessenger.hh,v 1.2 2006/06/29 15:55:21 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelDummySD.hh

    r807 r1230  
    2727//
    2828// $Id: GammaRayTelDummySD.hh,v 1.6 2006/06/29 15:55:24 gunter Exp $
    29 // GEANT4 tag $Name: $
     29// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3030// ------------------------------------------------------------
    3131//      GEANT 4 class header file
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelEventAction.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelEventAction.hh,v 1.10 2006/06/29 15:55:29 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class header file
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelGeneralPhysics.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelGeneralPhysics.hh,v 1.2 2006/06/29 15:55:32 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelHadronPhysics.hh

    r807 r1230  
    2525//
    2626// $Id: GammaRayTelHadronPhysics.hh,v 1.4 2006/06/29 15:55:35 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// ------------------------------------------------------------
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelIonPhysics.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelIonPhysics.hh,v 1.2 2006/06/29 15:55:38 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelMuonPhysics.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelMuonPhysics.hh,v 1.2 2006/06/29 15:55:41 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelPhysicsList.hh

    r807 r1230  
    3030#include "globals.hh"
    3131
     32class GammaRayTelPhysicsListMessenger;
     33
    3234class GammaRayTelPhysicsList: public G4VModularPhysicsList
    3335{
     
    3941  // SetCuts()
    4042  virtual void SetCuts();
     43  void SetRegionCut(G4double);
     44  void AddPhysicsList(const G4String& name);
     45  // void ConstructProcess();
    4146
     47 
     48private:
     49
     50  G4String                             emName;
     51  G4VPhysicsConstructor*               emPhysicsList;
     52  GammaRayTelPhysicsListMessenger* pMessenger;
    4253
    4354};
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelPrimaryGeneratorAction.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelPrimaryGeneratorAction.hh,v 1.8 2006/06/29 15:55:49 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// ------------------------------------------------------------
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelPrimaryGeneratorMessenger.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelPrimaryGeneratorMessenger.hh,v 1.5 2006/06/29 15:55:52 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelRunAction.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelRunAction.hh,v 1.6 2006/06/29 15:55:55 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class header file
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelTrackerHit.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelTrackerHit.hh,v 1.3 2006/06/29 15:55:58 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class header file
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelTrackerROGeometry.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelTrackerROGeometry.hh,v 1.5 2006/06/29 15:56:01 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class header file
  • trunk/examples/advanced/gammaray_telescope/include/GammaRayTelTrackerSD.hh

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelTrackerSD.hh,v 1.5 2006/06/29 15:56:04 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class header file
  • trunk/examples/advanced/gammaray_telescope/macro1.mac

    r807 r1230  
    1414/run/verbose 1
    1515/gun/sourceGen true
     16/control/execute emstd.mac
     17
    1618/run/initialize
    1719
    18 /control/execute emstd.mac
    19 
    20 /gun/particle gamma
    21 /gun/energy 1 GeV
     20/particle/select gamma 
    2221/gun/vertexRadius 25. cm
    2322/gun/sourceType 2
  • trunk/examples/advanced/gammaray_telescope/macro2.mac

    r807 r1230  
    1414/run/verbose 2
    1515/gun/sourceGen true
    16 /run/initialize
     16
    1717
    1818/control/execute emlowe.mac
     19
     20/run/initialize
    1921
    2022/gun/particle mu-
  • trunk/examples/advanced/gammaray_telescope/macro3.mac

    r807 r1230  
    1414/run/verbose 1
    1515/gun/sourceGen true
     16/control/execute emstd.mac
    1617/run/initialize
    17 
    18 /control/execute emstd.mac
    19 
    2018/gun/particle gamma
    2119/gun/energy 1 GeV
  • trunk/examples/advanced/gammaray_telescope/macro4.mac

    r807 r1230  
    22/tracking/storeTrajectory 1
    33/gun/sourceGen false
     4/control/execute emlowe.mac
    45/run/initialize
    56/gps/particle e-
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelAnalysis.cc

    r807 r1230  
    2727//
    2828// $Id: GammaRayTelAnalysis.cc,v 1.21 2006/06/29 15:56:07 gunter Exp $
    29 // GEANT4 tag $Name: $
     29// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3030// ------------------------------------------------------------
    3131//      GEANT 4 class implementation file
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelAnalysisMessenger.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelAnalysisMessenger.cc,v 1.9 2006/06/29 15:56:10 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// ------------------------------------------------------------
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelAnticoincidenceHit.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelAnticoincidenceHit.cc,v 1.4 2006/06/29 15:56:12 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class implementation file
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelAnticoincidenceSD.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelAnticoincidenceSD.cc,v 1.6 2006/06/29 15:56:15 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class implementation file
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelCalorimeterHit.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelCalorimeterHit.cc,v 1.4 2006/06/29 15:56:17 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class implementation file
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelCalorimeterSD.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelCalorimeterSD.cc,v 1.7 2006/06/29 15:56:19 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class implementation file
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelDetectorConstruction.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelDetectorConstruction.cc,v 1.15 2006/06/29 15:56:22 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class implementation file
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelDetectorMessenger.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelDetectorMessenger.cc,v 1.8 2006/06/29 15:56:25 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// ------------------------------------------------------------
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelDigi.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelDigi.cc,v 1.5 2006/06/29 15:56:28 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class implementation file
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelDigitizer.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelDigitizer.cc,v 1.6 2006/06/29 15:56:31 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class implementation file
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelDigitizerMessenger.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelDigitizerMessenger.cc,v 1.5 2006/06/29 15:56:34 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class implementation file
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelEventAction.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelEventAction.cc,v 1.19 2006/06/29 15:56:39 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class implementation file
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelHadronPhysics.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelHadronPhysics.cc,v 1.4 2006/06/29 15:56:45 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelIonPhysics.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelIonPhysics.cc,v 1.4 2006/06/29 15:56:48 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelMuonPhysics.cc

    r807 r1230  
    2525//
    2626//
    27 // $Id: GammaRayTelMuonPhysics.cc,v 1.4 2006/06/29 15:56:50 gunter Exp $
    28 // GEANT4 tag $Name:  $
    29 //
     27// $Id: GammaRayTelMuonPhysics.cc,v 1.8 2008/11/24 15:10:47 cirrone Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3029//
    3130
     
    3433#include "globals.hh"
    3534#include "G4ios.hh"
     35#include "G4MuonPlus.hh"
     36#include "G4TauPlus.hh"
     37#include "G4TauMinus.hh"
    3638#include <iomanip>   
     39
     40
     41#include "G4ParticleTypes.hh"
    3742
    3843
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelPhysicsList.cc

    r807 r1230  
    2525//
    2626//
    27 // $Id: GammaRayTelPhysicsList.cc,v 1.7 2006/06/29 15:56:55 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: GammaRayTelPhysicsList.cc,v 1.8 2009/11/18 15:59:05 flongo Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    4444#include "G4ios.hh"
    4545#include <iomanip>   
     46
    4647#include "GammaRayTelParticles.hh"
    4748#include "GammaRayTelGeneralPhysics.hh"
    48 #include "GammaRayTelEMPhysics.hh"
     49#include "GammaRayTelEMstdPhysics.hh"
     50#include "GammaRayTelEMlowePhysics.hh"
    4951#include "GammaRayTelMuonPhysics.hh"
    5052#include "GammaRayTelHadronPhysics.hh"
    5153#include "GammaRayTelIonPhysics.hh"
    5254
     55#include "G4PhysListFactory.hh"
     56#include "G4VPhysicsConstructor.hh"
     57#include "G4EmProcessOptions.hh"
     58
     59
     60#include "GammaRayTelPhysicsListMessenger.hh"
     61
    5362GammaRayTelPhysicsList::GammaRayTelPhysicsList():  G4VModularPhysicsList()
    5463{
     
    5766  SetVerboseLevel(1);
    5867
     68  pMessenger = new GammaRayTelPhysicsListMessenger(this);
     69
     70  // Particles
     71
     72 
    5973  RegisterPhysics( new GammaRayTelParticles("particles") );
    6074
     75  G4cout << "PARTICLES DONE" << G4endl;
     76
     77  // EM physics
     78
     79  emPhysicsList = new GammaRayTelEMstdPhysics;
     80  emName = G4String("Standard EM");
     81
     82
    6183  // General Physics
     84
    6285  RegisterPhysics( new GammaRayTelGeneralPhysics("general") );
    6386
    64   // EM Physics
    65   RegisterPhysics( new GammaRayTelEMPhysics("electromagnetic"));
     87  G4cout << "GENERAL DONE" << G4endl;
     88
    6689
    6790  // Muon Physics
     91
    6892  RegisterPhysics(  new GammaRayTelMuonPhysics("muon"));
     93
     94
     95  G4cout << "MUON DONE" << G4endl;
    6996
    7097   // Hadron Physics
    7198  RegisterPhysics(  new GammaRayTelHadronPhysics("hadron"));
    7299
     100  G4cout << "HADRONS DONE" << G4endl;
     101
    73102  // Ion Physics
    74103  RegisterPhysics( new GammaRayTelIonPhysics("ion"));
    75104
    76105
     106  G4cout << "IONS DONE" << G4endl;
     107
    77108}
    78109
    79110GammaRayTelPhysicsList::~GammaRayTelPhysicsList()
    80111{
     112  delete pMessenger;
     113  delete emPhysicsList;
    81114}
    82115
     
    94127  // These values are used as the default production thresholds
    95128  // for the world volume.
     129
     130  G4cout << "CUT STD" << G4endl;
     131
    96132  SetCutsWithDefault();
    97133
    98  
     134
     135}
     136
     137void GammaRayTelPhysicsList::SetRegionCut(G4double cutvalue)
     138{
     139
     140 SetCutsWithDefault();
     141
     142  if (verboseLevel >0){
     143    G4cout << "GammaRayTelPhysicsList::SetCuts: default cut length : "
     144         << G4BestUnit(defaultCutValue,"Length") << G4endl;
     145  }
     146 
     147  G4cout << "CUTS NEW" << G4endl;
     148 
    99149  // Production thresholds for detector regions
    100150
    101151  G4String regName[] = {"Calorimeter","Tracker"};
    102   G4double cutValue[] = {1*mm, 0.1*mm};
     152  //  G4double cutValue[] = {1*mm, 0.1*mm};
     153  G4double cutValue[] = {cutvalue, cutvalue/10.};
     154
     155
    103156 
    104157  for(G4int i=0;i<2;i++)
     
    109162    reg->SetProductionCuts(cuts);
    110163  }
    111 }
    112 
    113 
    114 
    115 
     164
     165}
     166
     167
     168/////////////////////////////////////////////////////////////////////////////
     169
     170void GammaRayTelPhysicsList::AddPhysicsList(const G4String& name)
     171{
     172
     173  if (verboseLevel>1) {
     174    G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
     175  }
     176
     177  if (name == "Standard EM") {
     178
     179    emName = name;
     180    delete emPhysicsList;
     181    emPhysicsList = new GammaRayTelEMstdPhysics();
     182    G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: EM Standard" << G4endl;
     183   
     184  } else if (name == "LowE EM") {
     185    emName = name;
     186    delete emPhysicsList;
     187    emPhysicsList = new GammaRayTelEMlowePhysics();;
     188     G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: EM LowE" << G4endl;
     189  }
     190  else {
     191    G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
     192           << " is not defined"
     193           << G4endl;
     194  }
     195
     196
     197  G4cout << "REGISTRATION DONE " << G4endl;
     198
     199    RegisterPhysics(emPhysicsList);
     200
     201}
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelPrimaryGeneratorAction.cc

    r807 r1230  
    2525//
    2626//
    27 // $Id: GammaRayTelPrimaryGeneratorAction.cc,v 1.10 2006/06/29 15:56:58 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: GammaRayTelPrimaryGeneratorAction.cc,v 1.11 2007/11/09 16:33:34 flongo Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class implementation file
     
    6969  G4int n_particle = 1;
    7070
    71   if (sourceGun)
    72     {
    73       particleGun  = new G4ParticleGun(n_particle);     
     71  particleGun  = new G4ParticleGun(n_particle);     
    7472      // default particle kinematic
    75      
    76       G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
    77       G4String particleName;
    78       G4ParticleDefinition* particle
    79         = particleTable->FindParticle(particleName="e-");
    80       particleGun->SetParticleDefinition(particle);
    81       particleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,-1.));
    82       particleGun->SetParticleEnergy(30.*MeV);
    83       G4double position = 0.5*(GammaRayTelDetector->GetWorldSizeZ());
    84       particleGun->SetParticlePosition(G4ThreeVector(0.*cm,0.*cm,position));
    85     }
    86   else
    87     {
    88       particleSource = new G4GeneralParticleSource();
    89     }
    9073 
     74  G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
     75  G4String particleName;
     76  G4ParticleDefinition* particle
     77    = particleTable->FindParticle(particleName="e-");
     78  particleGun->SetParticleDefinition(particle);
     79  particleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,-1.));
     80  particleGun->SetParticleEnergy(30.*MeV);
     81  G4double position = 0.5*(GammaRayTelDetector->GetWorldSizeZ());
     82  particleGun->SetParticlePosition(G4ThreeVector(0.*cm,0.*cm,position));
     83  particleSource = new G4GeneralParticleSource();
     84   
    9185}
    9286
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelPrimaryGeneratorMessenger.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelPrimaryGeneratorMessenger.cc,v 1.8 2006/06/29 15:57:01 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class implementation file
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelRunAction.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelRunAction.cc,v 1.11 2006/06/29 15:57:04 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class implementation file
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelTrackerHit.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelTrackerHit.cc,v 1.4 2006/06/29 15:57:07 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929// ------------------------------------------------------------
    3030//      GEANT 4 class implementation file
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelTrackerROGeometry.cc

    r807 r1230  
    2626//
    2727// $Id: GammaRayTelTrackerROGeometry.cc,v 1.6 2006/06/29 15:57:10 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/advanced/gammaray_telescope/src/GammaRayTelTrackerSD.cc

    r807 r1230  
    2525//
    2626//
    27 // $Id: GammaRayTelTrackerSD.cc,v 1.9 2006/06/29 15:57:13 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
    2927// ------------------------------------------------------------
    3028//      GEANT 4 class implementation file
     
    9795G4bool GammaRayTelTrackerSD::ProcessHits(G4Step* aStep,G4TouchableHistory* ROhist)
    9896{
    99 
     97   
    10098  G4double edep = aStep->GetTotalEnergyDeposit();
    10199  if ((edep/keV == 0.)) return false;     
     
    103101  G4int StripTotal = Detector->GetNbOfTKRStrips();
    104102  G4int TileTotal  = Detector->GetNbOfTKRTiles(); 
    105  
     103
    106104  // This TouchableHistory is used to obtain the physical volume
    107105  // of the hit
     
    123121  G4VPhysicalVolume* strip = 0;
    124122  strip = ROhist->GetVolume();
    125   G4String StripName = strip->GetName();
    126   StripNumber= strip->GetCopyNo(); 
    127 
    128   ROhist->MoveUpHistory();
    129   G4VPhysicalVolume* tile = ROhist->GetVolume();
     123
     124  //  if (strip){
     125    G4String StripName = strip->GetName();
     126    StripNumber= strip->GetCopyNo(); 
     127    //  }
     128  //  ROhist->MoveUpHistory();
     129  G4VPhysicalVolume* tile = ROhist->GetVolume(1);
    130130  G4int TileNumber = tile->GetCopyNo(); 
    131131  G4String TileName = tile->GetName();   
  • trunk/examples/advanced/hadrontherapy/GNUmakefile

    r807 r1230  
    1 # $Id: GNUmakefile,v 1.5 2004/11/30 09:06:18 guatelli Exp $
     1# $Id: GNUmakefile,v 1.12 2009/08/13 20:48:04 kaitanie Exp $
    22# --------------------------------------------------------------
    33# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
     
    1515all: lib bin
    1616
     17include $(G4INSTALL)/config/architecture.gmk
     18
     19ifdef G4ANALYSIS_USE
     20CPPFLAGS += -DANALYSIS_USE
     21endif
     22ifndef G4ANALYSIS_USE      # If we don't have AIDA
     23ifdef G4ANALYSIS_USE_ROOT   # And we have ROOT
     24CPPFLAGS += -DANALYSIS_USE -DG4ANALYSIS_USE_ROOT
     25CPPFLAGS += $(shell root-config --cflags)
     26LDFLAGS  += $(shell root-config --glibs)
     27endif
     28endif
     29
    1730include $(G4INSTALL)/config/binmake.gmk
    1831
    19 ifdef G4ANALYSIS_USE 
    20  CPPFLAGS += `aida-config --include`
    21  LDFLAGS  += `aida-config --lib`
    22  LOADLIBS += `aida-config --lib`
     32ifdef G4ANALYSIS_USE
    2333endif
  • trunk/examples/advanced/hadrontherapy/Hadrontherapy.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: Hadrontherapy.cc Main of the Hadrontherapy example; Version 4.0 May 2005
     26// Hadrontherapy.cc
     27//
     28// Main of the Hadrontherapy example;
     29// Released with the Geant4 9.3 version (December 2009)
     30//
     31// Last modified: G.A.P.Cirrone
     32//
     33// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
     34//
    2735// ----------------------------------------------------------------------------
    2836//                 GEANT 4 - Hadrontherapy example
     
    3038// Code developed by:
    3139//
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
     40// G.A.P. Cirrone(a)°, G.Cuttone(a), F.Di Rosa(a), E.Mazzaglia(a), F.Romano(a)
    3341//
     42// Contributor authors:
     43// P.Kaitaniemi(d), A.Heikkinen(d), Gillis Danielsen (d)
     44//
     45// Past authors:
     46// M.G.Pia(b), S.Guatelli(c), G.Russo(a), M.Russo(a), A.Lechner(e)
     47//
    3448// (a) Laboratori Nazionali del Sud
    3549//     of the INFN, Catania, Italy
    36 // (b) INFN Section of Genova, Genova, Italy
     50//
     51// (b) INFN Section of Genova, Italy
    3752//
    38 // * cirrone@lns.infn.it
     53// (c) University of Wallongong, Australia
     54//
     55// (d) Helsinki Institute of Physics, Helsinki, Finland
     56//
     57// (e) CERN, (CH)
     58//
     59//  *Corresponding author, email to cirrone@lns.infn.it
    3960// ----------------------------------------------------------------------------
     61
    4062#include "G4RunManager.hh"
    4163#include "G4UImanager.hh"
    4264#include "G4UIterminal.hh"
    4365#include "G4UItcsh.hh"
    44 #ifdef G4UI_USE_XM
    45 #include "G4UIXm.hh"
    46 #endif
    47 #ifdef G4VIS_USE
    48 #include "G4VisExecutive.hh"
    49 #endif
    5066#include "HadrontherapyEventAction.hh"
    51 #include "HadrontherapyDetectorConstruction.hh"
    5267#include "HadrontherapyPhysicsList.hh"
    53 #include "HadrontherapyPhantomSD.hh"
     68#include "HadrontherapyDetectorSD.hh"
    5469#include "HadrontherapyPrimaryGeneratorAction.hh"
    5570#include "HadrontherapyRunAction.hh"
     
    6176#include "globals.hh"
    6277#include "HadrontherapySteppingAction.hh"
    63 #ifdef  G4ANALYSIS_USE
    6478#include "HadrontherapyAnalysisManager.hh"
    65 #endif
    66 
     79#include "HadrontherapyGeometryController.hh"
     80#include "HadrontherapyGeometryMessenger.hh"
     81#include "HadrontherapyInteractionParameters.hh"
     82#include "G4ScoringManager.hh"
     83#include "IAEAScoreWriter.hh"
     84
     85#if defined(G4UI_USE_TCSH)
     86#include "G4UIterminal.hh"
     87#include "G4UItcsh.hh"
     88#endif
     89
     90#ifdef G4UI_USE_XM
     91#include "G4UIXm.hh"
     92#endif
     93
     94#ifdef G4VIS_USE
     95#include "G4VisExecutive.hh"
     96#endif
     97
     98#ifdef G4UI_USE_QT
     99#include "G4UIQt.hh"
     100#include "G4Qt.hh"
     101#endif
     102
     103//////////////////////////////////////////////////////////////////////////////////////////////
    67104int main(int argc ,char ** argv)
    68105{
    69 
    70106  // Set the Random engine
    71 
    72107  CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine());
    73108
    74109  G4RunManager* runManager = new G4RunManager;
    75110
    76   // Initialize the geometry
    77   runManager -> SetUserInitialization(new HadrontherapyDetectorConstruction());
    78  
     111  //Initialize possible analysis needs, needs to come early in order to pick up metadata
     112#ifdef ANALYSIS_USE
     113  HadrontherapyAnalysisManager* analysis = HadrontherapyAnalysisManager::getInstance();
     114  analysis -> book();
     115#endif
     116  // Geometry controller is responsible for instantiating the
     117  // geometries. All geometry specific setup tasks are now in class
     118  // HadrontherapyGeometryController.
     119  HadrontherapyGeometryController *geometryController = new HadrontherapyGeometryController();
     120
     121  // Connect the geometry controller to the G4 user interface
     122  HadrontherapyGeometryMessenger *geometryMessenger = new HadrontherapyGeometryMessenger(geometryController);
     123
     124  G4ScoringManager *scoringManager = G4ScoringManager::GetScoringManager();
     125  scoringManager->SetVerboseLevel(1);
     126  scoringManager->SetScoreWriter(new IAEAScoreWriter());
     127
     128  // Initialize the default Hadrontherapy geometry
     129  geometryController->SetGeometry("default");
     130
     131  // Initialize command based scoring
     132  G4ScoringManager::GetScoringManager();
     133
    79134  // Initialize the physics
    80135  runManager -> SetUserInitialization(new HadrontherapyPhysicsList());
     136
     137  // Initialize the primary particles
     138  HadrontherapyPrimaryGeneratorAction *pPrimaryGenerator = new HadrontherapyPrimaryGeneratorAction();
     139  runManager -> SetUserAction(pPrimaryGenerator);
    81140 
    82   // Initialize the primary particles 
    83   runManager -> SetUserAction(new HadrontherapyPrimaryGeneratorAction());
    84 
    85   // Initialize matrix
    86   HadrontherapyMatrix* matrix = new HadrontherapyMatrix();
    87   matrix -> Initialize();
    88 
    89141  // Optional UserActions: run, event, stepping
    90142  HadrontherapyRunAction* pRunAction = new HadrontherapyRunAction();
    91143  runManager -> SetUserAction(pRunAction);
    92144
    93   HadrontherapyEventAction* pEventAction = new HadrontherapyEventAction(matrix);
     145  HadrontherapyEventAction* pEventAction = new HadrontherapyEventAction();
    94146  runManager -> SetUserAction(pEventAction);
    95 
    96147
    97148  HadrontherapySteppingAction* steppingAction = new HadrontherapySteppingAction(pRunAction);
    98149  runManager -> SetUserAction(steppingAction);   
    99150
    100 
    101 #ifdef G4ANALYSIS_USE
    102   HadrontherapyAnalysisManager* analysis =
    103     HadrontherapyAnalysisManager::getInstance();
    104   analysis -> book();
    105 #endif
    106  
     151  // Interaction data: stopping powers
     152  HadrontherapyInteractionParameters* pInteraction = new HadrontherapyInteractionParameters();
     153
    107154#ifdef G4VIS_USE
    108155  // Visualization manager
    109156  G4VisManager* visManager = new G4VisExecutive;
    110157  visManager -> Initialize();
    111 #endif
     158#endif
     159
     160G4UImanager* UI = G4UImanager::GetUIpointer();     
    112161 
     162 if (argc!=1)   // batch mode
     163   {
     164     G4String command = "/control/execute ";
     165     G4String fileName = argv[1];
     166     UI->ApplyCommand(command+fileName);   
     167   }
     168 
     169 else  // interactive mode : define visualization UI terminal
     170   {
     171     G4UIsession* session = 0;
     172     
     173     // If the enviroment variable for the TCSH terminal is active, it is used and the
     174     // defaultMacro.mac file is executed
     175#if defined(G4UI_USE_TCSH)
     176     session = new G4UIterminal(new G4UItcsh);     
     177     UI->ApplyCommand("/control/execute defaultMacro.mac"); 
     178
     179     // Alternatively (if G4UI_USE_TCSH is not defined)  the program search for the
     180     // G$UI_USE_QT variable. It starts a graphical user interface based on the QT libraries
     181     // In the following case the GUI.mac file is also executed
     182     //
     183#elif defined(G4UI_USE_QT)
     184     session = new G4UIQt(argc,argv);
     185     UI->ApplyCommand("/control/execute macro/GUI.mac");     
     186     
     187     // As final option, the simpler user interface terminal is opened
     188#else
     189    session = new G4UIterminal();
     190    UI->ApplyCommand("/control/execute defaultMacro.mac");
     191#endif
     192    session->SessionStart();
     193    delete session;
     194   }
     195    HadrontherapyMatrix* matrix = HadrontherapyMatrix::getInstance();
     196    if (matrix) matrix -> TotalEnergyDeposit();
     197 
     198#ifdef ANALYSIS_USE
     199 analysis -> finish();
     200#endif
     201
     202 // Job termination
     203#ifdef G4VIS_USE
     204 delete visManager;
     205#endif
    113206 
    114   G4UIsession* session = 0;
    115   if (argc == 1)   // Define UI session for interactive mode.
    116     {
    117       session = new G4UIterminal();
    118     }
    119 
    120   // Get the pointer to the User Interface manager
    121   G4UImanager* UI = G4UImanager::GetUIpointer(); 
    122   if (session)   // Define UI session for interactive mode.
    123     {
    124       G4cout<<" UI session starts ..."<< G4endl;
    125       UI -> ApplyCommand("/control/execute defaultMacro.mac");   
    126       session -> SessionStart();
    127       delete session;
    128     }
    129   else           // Batch mode
    130     {
    131       G4String command = "/control/execute ";
    132       G4String fileName = argv[1];
    133       UI -> ApplyCommand(command + fileName);
    134     } 
    135 
    136   matrix -> TotalEnergyDeposit();
    137 
    138 #ifdef G4ANALYSIS_USE
    139   analysis -> finish();
    140 #endif
    141  
    142   // Job termination
    143 #ifdef G4VIS_USE
    144   delete visManager;
    145 #endif
    146 
     207  delete geometryMessenger;
     208  delete geometryController;
     209  delete pInteraction;
    147210  delete runManager;
    148 
    149211  return 0;
    150212}
  • trunk/examples/advanced/hadrontherapy/History

    r807 r1230  
    1 -----------------------------------------------------------
    2 $Id: History, v 1.6 2004/02/27  G.A.P. Cirrone
    3 -----------------------------------------------------------
    4 
    5      ====================================================
    6                      Geant4 - Hadrontherapy
    7      ====================================================
    8 
    9                       Category History file
     1 -------------------------------------------------------------------------------
     2History File, 2004/02/27 G.A.P. Cirrone, Created
     3cirrone@lns.infn.it
     4http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
     5-------------------------------------------------------------------------------
     6
     7         ====================================================
     8             History file of the Hadrontherapy application
     9         ====================================================
     10
     1125.11.2009 S.E.Mazzaglia & F.Romano; Tag:Hadrontherapy-V09-02-40
     12           - Corrected a bug in HadrontherapyDetectorConstruction class
     13           - Added G4RadiactiveDecayPhysics class to the Physics List.
     14
     1522.11.2009 S.E.Mazzaglia; Tag: Hadrontherapy-V09-02-39
     16           - Correction in the initialization of the passiveProtonBeamLine class.
     17
     1820.11.2009 P.Kaitaniemi; Tag: hadrontherapy-V09-02-38
     19           - Fixes and updates to the analysis scripts in RootScripts/iaeaBenchmark
     20           - Updated RootScripts/README
     21
     2219.11.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-37
     23           - Minor revisions;
     24
     2518.11.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-36
     26           - Correction for a missing function in the HadrontherapyPhysicsListMessenger.cc class file
     27
     2818.11.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-35
     29           - Updated the README file and general code revision for the
     30             Geant4 9.3 release
     31
     3217.11.2009 S.E.Mazzaglia; Tag: hadrontherapy-V09-02-34
     33           - Added some functionalities in order to change, via messengers, the geometry, the voxelization
     34             of the detector, and the disposition in the space of the detector/phantom.
     35           - Added the possibility to calculate the stopping powers for ions too.
     36           - Modified the HadrontherapyDetectorROGeometry class constructor.
     37           - Various additions and fixes to the matrix class.
     38
     3910.11.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-33
     40           - Added the possibility to make a graphical user interface (GUI) using the QT libraries.
     41             To start a GUI the correct enviroment variables must be configured (see the Geant4 installation
     42             manual) and a QT version must be installed 
     43
     4405.10.2009 P.Kaitaniemi; Tag: hadrontherapy-V09-02-32
     45           - Fixed a compilation error with GCC 4.4
     46
     4728.09.2009 S.E.Mazzaglia; Tag: hadrontherapy-V09-02-31
     48           - Now the HadrontherapyDetectorConstruction class implements only phantom and detector [RO]geometry.
     49             World volume and the rest of the geometry is inside another class whose messenger allows
     50             modification by users with the same old syntax
     51           - Removed HadrontherapyInteractionParameters from the HadrontherapyGeometryController class
     52                         
     5320.09.2009 P.Kaitaniemi; Tag: hadrontherapy-V09-02-30
     54           - Added ability to use command based scoring
     55           - IAEA geometry: produce Bragg peak using command based scoring
     56           - Various additions and fixes to the IAEA ROOT scripts
     57           - Additional data extracted from E. Haettner's thesis
     58
     5920.09.2009 P.Kaitaniemi; Tag: hadrontherapy-V09-02-29
     60           - Moved HadrontherapyInteractionParameters initialization to the HadrontherapyGeometryController class
     61
     6211.09.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-28
     63           - Added messengers to control the event number and to draw only particular tracks.
     64             The new command are accessible via the command /event/drawTracks and /event/PrintEventNumber 
     65
     6608.09.2009 S.E.Mazzaglia; Tag: hadrontherapy-V09-02-27
     67           - Added a method to retrieve stopping power values for protons, alphas and electrons.
     68             This method is implemented in the new class HadrontherapyInteractionParameters
     69
     7013.08.2009 P.Kaitaniemi; Tag: hadrontherapy-V09-02-26
     71           - Fixed compilation errors when AIDA analysis is used
     72
     7303.08.2009 P.Kaitaniemi; Tag: hadrontherapy-V09-02-25
     74           - Added ability to select the geometry using G4 macro commands
     75           - Improved plotting scripts and improved normalization for the
     76             fragment energy distribution
     77
     7827.07.2009 P.Kaitaniemi; Tag: hadrontherapy-V09-02-24
     79           - IAEA geometry: added ability to remove the phantom by setting its thickness to zero
     80           - Collect simulation metadata: number of events, distance of the detector (IAEA geometry),
     81             depth of the phantom (IAEA geometry), beam energy, energy error
     82           - Added ability to produce angular distribution plots
     83
     8417.07.2009 P.Kaitaniemi; Tag: hadrontherapy-V09-02-23
     85           - Tuned geometry of the E. Haettner experimet (IAEADetectorConstruction)
     86           - Adopted G4ANALYSIS_USE_ROOT flag to activate ROOT analysis
     87           - Improved plotting scripts
     88
     8913.07.2009 P.Kaitaniemi; Tag: hadrontherapy-V09-02-22
     90           - Added the first version of the IAEA benchmark geometry based on
     91              E. Haettner's thesis
     92           - Collect fragment energy distributions
     93           - Added fragment energy distribution data
     94           - ROOT script preparing an IAEA benchmark figure with data
     95
     9608.07.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-21
     97           - Removed the README file in ASCII format
     98
     9927.06.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-20
     100           - Eliminated not necessary dependences in the SteppingAction class
     101           - Added folders containing experimental data (its name is 'experimentalData') and
     102             ROOT scripts ('RootScripts') where Root scripts are stored to
     103             perform a fast comparison with experimental data.
     104             A folder where simulation results are stored is also created. Its
     105             name is 'simulationResults'.
     106
     10727.06.2009 P. Kaitaniemi; Tag hadrontherapy-V09-02-19
     108           - Added ability to change the name of the output file between runs
     109
     11026.06.2009 P. Kaitaniemi; Tag hadrontherapy-V09-02-18
     111           - Fixed a bug in the physics list. Local ion-ion hadronic physics was not loaded due
     112             to an uninitialized variable (locIonIonInelasticIsRegistered)
     113           - Ability to use /analysis/setAnalysisFile <filename> to set the name of the output file
     114           - Added Doxygen documentation tags to the source code and Doxyfile for
     115             documentation settings
     116           - Support for direct use of ROOT for analysis in addition to the default AIDA one
     117           - Local INCL/ABLA physics list for deuterons, tritons and alphas
     118
     11926.06.2009 G.A.P.Cirrone; Tag hadrontherapy-V09-02-17
     120           - Corrected the definition of total inelastic cross section for light ions in the
     121             LocalIonIonInelasticPhysic.cc file
     122
     12326.06.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-16
     124           - Momentarely removed the class for LET calculation
     125             for a conflict with the general structure of Hadrontherapy
     126
     12710.06.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-15
     128           - Corrected a bug in the detector construction
     129
     13005.06.2009 G.A.P.Cirrone and S.Mazzaglia; Tag: hadrontherapy-V09-02-14
     131           - Added a preliminary version of classes for LET calculation.
     132
     13330.05.2009 G.A.P.Cirrone; Tag hadrontherapy-V09-02-13
     134           - README_Hadrontherapy.pdf file updated and improved
     135
     13629.05.2009 G.A.P.Cirrone; Tag hadrontherapy-V09-02-12
     137           - Implemented the new Low energy models (Livermore and Penelope)
     138             now migrated to the new interface (common to the Standard models)
     139             Livermore and Penelope models can be implemented:
     140             Activating the buit-in physics lists (G4EmLivermorePhysics and G4EmPenelopePhysics)
     141             Activation can be done via macro commands in the usual way
     142
     14319.05.2009 F.Romano; Tag hadrontherapy-V09-02-11
     144           - Corrected the stepMax value in each macro in order to avoid
     145             a wrong dose deposition in the first slice.
     146           - Modified and revised the README and macro files.
     147
     14815.05.2009 G.A.P.Cirrone; Tag hadrontherapy-V09-02-10
     149           - Corrected a but in the call of a physic list
     150           - Corrected a bug in the proton_therapy.mac file
     151
     15214.05.2009 G.A.P.Cirrone; Tag hadrontherapy-V09-02-09
     153           - Definitively added the StepMax class to change the max step lenght
     154
     15514.05.2009  G.A.P.Cirrone; Tag: hadrontherapy-V09-02-08
     156           - README file improved.
     157
     15814.05.2009  G.A.P.Cirrone; Tag: hadrontherapy-V09-02-07
     159           - Physic implementation completely changed. Now Hadrontherapy can be launched
     160             with physics lists, packages and built-in physic models;
     161             In the README we give some suggestion in the physic models to use.
     162             All models can be activated via macro command.
     163           - Improved HadrontherapyModulator.cc file;
     164
     16529.03.2009  G.A.P.Cirrone; Tag: hadrontehrapy-V09-02-06
     166           - Extended limits of Binary Cascade in HIProtonNeutronBinary.cc
     167           - Corrected and improved "default" macro file.
     168           - Improved HadrontherapyDetectorConstruction.cc file;
     169           - Comments on HIProtonneutronPrecompound.cc file;
     170           - Improved physicsHadronicPrecompound.mac file;
     171
     17218.03.2009  G.A.P.Cirrone; Tag: hadrontherapy-V09-02-05
     173           - Corrected macro file for the use of the QGSP_BIC package
     174
     17518.03.2009: G.A.P.Cirrone; Tag: hadrontherapy-V09-02-04
     176           - Added commands to Detector Messenger to give the possibility to choose beetween
     177             different beam lines
     178           - Added comments to HadrontherapyMatrix;
     179           _ Improved code and added comments to HIProtonNeutronPrecompound and
     180             HIProtonNeutronBinary;
     181           - Corrected macro file using the Precompound inelastic model;
     182           - Removed the class file HadrontherapyMaterial and improved all the geometry files
     183
     18405.03.2009: G.A.P.Cirrone; Tag: hadrontherapy-V09-02-03
     185           - Updated README
     186
     18702.03.2009: G.A.P.Cirrone; Tag: hadrontherapy-V09-02-02
     188           - Changed name of HadrontherapyBeamLine file to PassiveProtonBeamLine
     189
     19002.03.2009: G.A.P.Cirrone; Tag:  hadrontherapy-V09-02-01
     191           - Added generation of ASCII file with dose deposited in the phantom voxels
     192
     19322.02.2009: G.Folger; Tag: hadrontherapy-V09-02-00
     194           - Fix a compilation warning on used ionShenCrossSection in
     195             HIIonLEP.cc
     196
     19720.11.2008: G.A.P.Cirrone and M.Russo; Tag: hadrontherapy-V09-01-11
     198           - Fixed path of macro files
     199
     20020.11.2008: G.A.P.Cirrone; Tag: hadrontherapy-V09-01-10
     201           - Updated the History file
     202           - Corrected cross sections definitions for ions
     203           - Revised the definition and use of the electromagnetic options
     204             for the use with the Standard models
     205             
     20620.11.2008: G.A.P.Cirrone and M.Russo; Tag: hadrontherapy-V09-01-09
     207           - Updated readme and improved the comments.
     208
     20920.11.2008: G.A.P.Cirrone and M.Russo; Tag: hadrontherapy-V09-01-08
     210           - Add new approach for the choice of the physic models.
     211             Now packaged physic lists can be used alternatively
     212             to the the physic models implemented in the class files
     213             EM, HE and HI.
     214           - Improved the electromagnetic models for the generic ions
     215
     21622.09.2008 G.A.P.Cirrone; Tag: hadrontherapy-V09-01-07
     217           - Corrected the G4eBremsstrahlung() process in the file
     218             EMElectronStandard.cc;
     219           - Updated the head of the History file;
     220
     22117.09.2008 A.Lechner; Tag: hadrontherapy-V09-01-06
     222           - Corrections in the Low Energy Electromagnetic physic lists.
     223
     22415.06.2008 G.A.P.Cirrone; Tag: hadrontherapy-V09-01-05
     225           - Removed AIDA call from GNUmakefile
     226
     22719.05.2008 G.A.P.Cirrone tag hadrontherapy-V09-01-04
     228           - Added in the beam line the MOPI detector. MOPI is a microstrip
     229             detector that, in the real case, is able to check during
     230             the treatment, the beam simmetry of the therapy beam.
     231             Its physical structure is here exactly simulated so that
     232             the its contribute to the energy loss can be take into account;
     233             A detailed description if the detector can be found in
     234             NIM A 572 (2007) 1094-1101 and its references.
     235           - Corrected the position of the Phantom and Detector;
     236           - Added variables to the HadrontherapyBeamLine.cc file;
     237           - Added comments to the HadrontherapyBeamLine.cc file
     238             to improve the clearness.
     239           - Updated the README file.
     240           - Changed the default dimensions of histogram bins
     241             (from 200 um to 100 um).
     242
     24309.03.2008 G.A.P.Cirrone tag hadrontherapy-V09-01-03
     244           - Completed the update of the new beam line
     245
     24609.03.2008 G.A.P.Cirrone tag hadrontherapy-V09-01-02
     247           - Added comments to the PhysicsList class;
     248           - Eliminated not used production cuts in PhysicsList;
     249           - Added NIST definition materials in Material class;
     250           - Code review of the DetectorConstruction class;
     251           - Changed name of the volume where the energy deposited is collected
     252             from "phantom" to "detector". "Detector" is a more appropiate
     253             name.
     254           - Changed name of the volume where the detector is inserted from
     255             "patient" to the more appropriate "Water Phantom";
     256
     25703.03.2008 G.A.P.Cirrone tag hadrontherapy-V09-01-01
     258           - Added the generation of .root file;
     259           - Removed a segmentation due to an uncorect pointer
     260             in the EMHadronIonStandard class;
     261           - Added options for an accurate use of Standard electromagnetic models
     262             in the EMHadronIonStandard, EMElectronStandard,
     263             EMPositronStandard, EMPhotonStandard  and EMMuonStandard classes;
     264           - Added a macro file (physicsElectromagneticStandard.mac)
     265             for the use of Hadrontherapy with the Standard Electromagnetic models;
     266           - Corrected in the defaultMacro.mac, a wrong command for the
     267             activation of the Standard Electromagnetic models;
     268         
     26929.02.2007 G.A.P.Cirrone tag hadrontherapy-V09-01-00
     270           - Updated README
    10271
    1127216.11.2007 Anton Lechner tag hadrontherapy-V09-00-00
     
    31292
    3229307.05.2007 G.A.P. Cirrone (hadrontherapy-V08-02-02)
    33          - Geometry upgrade(hadrontherapyBeamLine class) according to the experimental CATANA
    34             proton therapy beam line;
     294         - Geometry upgrade(hadrontherapyBeamLine class) according
     295           to the experimental CATANA proton therapy beam line;
    35296
    3629723.04.2007 S. Guatelli (hadrontherapy-V08-02-01)
  • trunk/examples/advanced/hadrontherapy/defaultMacro.mac

    r807 r1230  
    1 #----------------------------------------------------------------------------
    2 # DEFAULT MACRO FOR THE 
    3 # HADRONTHERAPY EXAMPLE
     1# G.A.P.Cirrone
    42#
     3# Default macro file. It is called if no argument is provided at run
     4#
     5# i.e. simply typing $G4WORKDIR/bin/Linux-++/Hadrontherapy <no argument here!>
    56#
    6 # THIS MACRO SIMPLY PERMIT TO  RUN A SIMULATION
    7 # WITHOUT THE VISUALISATION 
     7# This macro can be used for a proton beam in water. Both electrmagnetic and
     8# hadronic models are swiched on
     9
     10#########################
     11# Set of the verboses
    812#
    9 # THE RANGE SHIFTER MATERIAL AND THICKNESS CAN BE SPECIFIED
    10 #
    11 # NOTE THAT THE MODULATOR MATERIAL IS POLTMETHYLMETHACRILATE
    12 # (PMMA) FOR DEFAULT. IF ONE WANT CARRY OUT A SIMULATION WITHOUT
    13 # THE MODULATOR HE/SHE MUST SET "Air" the <<ModMater>> in the
    14 # <<GetMater>> function of the HadrontherapyModulator.cc class
    15 #
    16 # USERS SHOULD GIVE A LOOK TO THE HELP OF THE IDLE TO KNOW
    17 # THE ACTIVATED MESSSENGERS FOR THE GEOMETRY
    18 #
    19 # ADDITIONAL INFORMATIONS ON THE MESSENGER AVAILABLE CAN BE FOUND
    20 # INSIDE THE HADRONTHERAPY DOCUMENTATION (http://www.ge.infn.it/geant4/examples/).
    21 #
    22 # ANYWAY SEND ME AN E-MAIL FOR ANY QUESTION: cirrone@lns.infn.it.   
    23 # -------------------------------------------------------------------------------- 
    24 
    25 
    2613/control/verbose 1
    2714/tracking/verbose 0
    28 /run/verbose 0
     15/run/verbose 1
    2916/event/verbose 0
    3017
    31 # SETTING FOR THE PHYSICS MODELS
    32 /physics/addPhysics Decay
    33 /physics/addPhysics EM-Photon-EPDL
    34 /physics/addPhysics EM-Electron-EEDL
    35 /physics/addPhysics EM-Positron-Standard
    36 /physics/addPhysics EM-HadronIon-LowE
    37 /physics/addPhysics EM-Muon-Standard
    38 /physics/addPhysics HadronicEl-HadronIon-LElastic
    39 /physics/addPhysics HadronicInel-ProtonNeutron-LEP
    40 /physics/addPhysics HadronicInel-Ion-LEP
    41 /physics/addPhysics HadronicInel-Pion-LEP
    42 /physics/addPhysics HadronicAtRest-MuonMinus-Capture
     18##########################
     19# Set of the physic models
     20#
     21/physic/addPhysics emstandard_opt3                     # Electromagnetic model
     22/physic/addPhysics elastic                             # Hadronic elastic model
     23/physic/addPhysics binary                              # Hadronic inelastic model
     24/physic/addPhysics local_ion_ion_inelastic             # Hadronic inelastic model for ions (local physic list)
    4325
    44 # FIX THE FOLLOWIG PARAMETERS
    45 # TO SET THE RANGE SHIFTER
    46 #/beamLine/RangeShifter/thickness 4 cm
    47 #/beamLine/RangeShifter/RSMat Water
    48 #/tracking/verbose 1
    49 # SET OF THE VISUALISATION CHARACTERISTICS
     26##########################
     27# Initialisation procedure
     28#
     29/run/initialize
     30
     31##########################
     32# Visualisation
     33#
    5034/vis/scene/create
     35#/vis/open OGLIQt # only if QT library are installed
    5136/vis/open OGLIX
    5237/vis/viewer/flush
     38/vis/viewer/set/viewpointThetaPhi 30 140 deg
     39/vis/viewer/zoom 1
     40/vis/viewer/pan -10  0 cm
    5341/tracking/storeTrajectory 1
    54 /vis/scene/endOfEventAction accumulate
     42#/vis/scene/endOfEventAction accumulate
     43/vis/scene/endOfEventAction accumulate -1
    5544/vis/viewer/update
    56 /run/beamOn 100
    5745
     46##########################
     47# Set here the cut and the step max for the tracking.
     48# Suggested values of cut and step:
     49#
     50/physic/setCuts 0.01 mm
     51/Step/waterPhantomStepMax 0.01 mm
    5852
     53#########################
     54# Set the primary particle type,
     55# energy and position along the X direction
     56#
     57/gun/particle proton
     58/beam/energy/meanEnergy 62 MeV
     59/beam/energy/sigmaEnergy 400 keV
     60/beam/position/Xposition -2700 mm
    5961
     62#########################
     63# Display the event number
     64# during the run
     65#
     66/event/printEventNumber 10
    6067
    61 
    62 
    63 
    64 
    65 
    66 
    67 
     68#########################
     69# Start of the run
     70#
     71/run/beamOn 10
  • trunk/examples/advanced/hadrontherapy/include/Decay.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyDetectorMessenger.hh; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the INFN, Catania, Italy
    36 // (b) INFN Section of Genova, Genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// $Id: HadrontherapyDetectorMessenger.hh;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    4028
    4129// ==============================
  • trunk/examples/advanced/hadrontherapy/include/HadrontherapyAnalysisManager.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // ----------------------------------------------------------------------------
    27 // $Id: HadrontherapyAnalysisManager.hh; May 2005
    28 // ----------------------------------------------------------------------------
    29 //                 GEANT 4 - Hadrontherapy example
    30 // ----------------------------------------------------------------------------
    31 // Code developed by:
    32 //
    33 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    34 //
    35 // (a) Laboratori Nazionali del Sud
    36 //     of the INFN, Catania, Italy
    37 // (b) INFN Section of Genova, Genova, Italy
    38 //
    39 // * cirrone@lns.infn.it
    40 // ----------------------------------------------------------------------------
    41 
    42 #ifdef G4ANALYSIS_USE
     26// HadrontherapyAnalysisManager.hh; May 2005
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
     28
    4329#ifndef HADRONTHERAPYANALYSISMANAGER_HH
    4430#define HADRONTHERAPYANALYSISMANAGER_HH 1
    4531
    4632#include "globals.hh"
    47 # include <AIDA/AIDA.h>
     33
     34#ifdef ANALYSIS_USE ///< If we use analysis
     35
     36#ifdef G4ANALYSIS_USE ///< If analysis is done via AIDA
     37#include <AIDA/AIDA.h>
    4838
    4939namespace AIDA{
    50   class ITree; 
     40  class ITree;
    5141  class IAnalysisFactory;
    5242  class ITreeFactory;
    5343}
    54 
     44#endif
     45
     46#ifdef G4ANALYSIS_USE_ROOT ///< If analysis is done directly with ROOT
     47#include "TROOT.h"
     48#include "TFile.h"
     49#include "TNtuple.h"
     50#include "TH1F.h"
     51#endif
     52
     53/**
     54 * Messenger class for analysis-settings for HadronTherapyAnalysisManager
     55 */
     56class HadrontherapyAnalysisFileMessenger;
     57
     58/**
     59 * A class for connecting the simulation to an analysis package.
     60 */
    5561class HadrontherapyAnalysisManager
    5662{
    5763private:
     64        /**
     65         * Analysis manager is a singleton object (there is only one instance).
     66         * The pointer to this object is available through the use of the method getInstance();
     67         *
     68         * @see getInstance
     69         */
    5870  HadrontherapyAnalysisManager();
    59 
     71 
    6072public:
    6173  ~HadrontherapyAnalysisManager();
     74
     75  /**
     76   * Get the pointer to the analysis manager.
     77   */
     78  static HadrontherapyAnalysisManager* getInstance();
     79
     80  /**
     81  * Book the histograms and ntuples in an AIDA or ROOT file.
     82  */
     83  void book();
     84  /**
     85   * Set name for the analysis file .root (used by macro)
     86   */
     87  void SetAnalysisFileName(G4String);
    6288 
    63   static HadrontherapyAnalysisManager* getInstance();
    64  
    65   void book();
    66   // Book the histograms and ntuples in a .hbk file
    67  
    68   void FillEnergyDeposit(G4int voxelXId, G4int voxelYId, G4int voxelZId,
     89  /**
     90  * Fill the ntuple with the energy deposit in the phantom
     91  */
     92  void FillEnergyDeposit(G4int voxelXId, G4int voxelYId, G4int voxelZId,
    6993                         G4double energyDeposit);
    70   // Fill the ntuple with the energy deposit in the phantom
    71 
    72   void BraggPeak(G4int, G4double);
    73   // Fill 1D histogram with the Bragg peak in the phantom
     94
     95  void BraggPeak(G4int, G4double); ///< Fill 1D histogram with the Bragg peak in the phantom
    7496
    7597  void SecondaryProtonEnergyDeposit(G4int slice, G4double energy);
    76   // Fill 1D histogram with the energy deposit of secondary protons
     98  ///< Fill 1D histogram with the energy deposit of secondary protons
    7799
    78100   void SecondaryNeutronEnergyDeposit(G4int slice, G4double energy);
    79   // Fill 1D histogram with the energy deposit of secondary neutrons
     101  ///< Fill 1D histogram with the energy deposit of secondary neutrons
    80102
    81103  void SecondaryAlphaEnergyDeposit(G4int slice, G4double energy);
    82   // Fill 1D histogram with the energy deposit of secondary alpha particles
     104  ///< Fill 1D histogram with the energy deposit of secondary alpha particles
    83105
    84106  void SecondaryGammaEnergyDeposit(G4int slice, G4double energy);
    85   // Fill 1D histogram with the energy deposit of secondary gamma
     107  ///< Fill 1D histogram with the energy deposit of secondary gamma
    86108
    87109  void SecondaryElectronEnergyDeposit(G4int slice, G4double energy);
    88   // Fill 1D histogram with the energy deposit of secondary electrons
     110  ///< Fill 1D histogram with the energy deposit of secondary electrons
    89111
    90112  void SecondaryTritonEnergyDeposit(G4int slice, G4double energy);
    91   // Fill 1D histogram with the energy deposit of secondary tritons
     113  ///< Fill 1D histogram with the energy deposit of secondary tritons
    92114
    93115  void SecondaryDeuteronEnergyDeposit(G4int slice, G4double energy);
    94   // Fill 1D histogram with the energy deposit of secondary deuterons
     116  ///< Fill 1D histogram with the energy deposit of secondary deuterons
    95117
    96118  void SecondaryPionEnergyDeposit(G4int slice, G4double energy);
    97   // Fill 1D histogram with the energy deposit of secondary pions
     119  ///< Fill 1D histogram with the energy deposit of secondary pions
    98120
    99121  void electronEnergyDistribution(G4double secondaryParticleKineticEnergy);
    100   // Energy distribution of secondary electrons originated in the phantom
     122  ///< Energy distribution of secondary electrons originated in the phantom
    101123
    102124  void gammaEnergyDistribution(G4double secondaryParticleKineticEnergy);
    103   // Energy distribution of secondary gamma originated in the phantom
     125  ///< Energy distribution of secondary gamma originated in the phantom
    104126
    105127  void deuteronEnergyDistribution(G4double secondaryParticleKineticEnergy);
    106   // Energy distribution of secondary deuterons originated in the phantom
     128  ///< Energy distribution of secondary deuterons originated in the phantom
    107129
    108130  void tritonEnergyDistribution(G4double secondaryParticleKineticEnergy);
    109   // Energy distribution of secondary tritons originated in the phantom
     131  ///< Energy distribution of secondary tritons originated in the phantom
    110132
    111133  void alphaEnergyDistribution(G4double secondaryParticleKineticEnergy);
    112   // Energy distribution of secondary alpha originated in the phantom
     134  ///< Energy distribution of secondary alpha originated in the phantom
     135
     136  void heliumEnergy(G4double secondaryParticleKineticEnergy);
     137  ///< Energy distribution of the helium (He3 and alpha) particles after the phantom
     138
     139  void hydrogenEnergy(G4double secondaryParticleKineticEnergy);
     140  ///< Energy distribution of the hydrogen (proton, d, t) particles after the phantom
     141
     142  void fillFragmentTuple(G4int A, G4double Z, G4double energy, G4double posX, G4double posY, G4double posZ);
     143  ///< Energy ntuple
    113144
    114145  void genericIonInformation(G4int, G4double, G4int, G4double);
    115  
     146
     147  void ThintargetBeamDisp(G4double,G4double);
     148
     149  void startNewEvent();
     150  ///< Tell the analysis manager that a new event is starting
     151
     152  void setGeometryMetaData(G4double, G4double, G4double);
     153  ///< from the detector construction information about the geometry can be written as metadata
     154
     155  void setBeamMetaData(G4double, G4double);
     156  ///< metadata about the beam can be written this way
     157
    116158  void finish();
    117   // Close the .hbk file with the histograms and the ntuples
     159  ///< Close the .hbk file with the histograms and the ntuples
     160
     161void flush();
     162
     163#ifdef G4ANALYSIS_USE_ROOT
     164private:
     165  TH1F *createHistogram1D(const TString name, const TString title, int bins, double xmin, double xmax) {
     166    TH1F *histo = new TH1F(name, title, bins, xmin, xmax);
     167    histo->SetLineWidth(2);
     168    return histo;
     169  }
     170#endif
    118171
    119172private:
    120173  static HadrontherapyAnalysisManager* instance;
     174  HadrontherapyAnalysisFileMessenger* fMess;
     175  G4String analysisFileName;
     176#ifdef G4ANALYSIS_USE
    121177  AIDA::IAnalysisFactory* aFact;
    122   AIDA::ITree* theTree; 
     178  AIDA::ITree* theTree;
    123179  AIDA::IHistogramFactory *histFact;
    124180  AIDA::ITupleFactory *tupFact;
     
    129185  AIDA::IHistogram1D *h5;
    130186  AIDA::IHistogram1D *h6;
    131   AIDA::IHistogram1D *h7; 
    132   AIDA::IHistogram1D *h8; 
     187  AIDA::IHistogram1D *h7;
     188  AIDA::IHistogram1D *h8;
    133189  AIDA::IHistogram1D *h9;
    134190  AIDA::IHistogram1D *h10;
    135191  AIDA::IHistogram1D *h11;
    136   AIDA::IHistogram1D *h12; 
    137   AIDA::IHistogram1D *h13; 
     192  AIDA::IHistogram1D *h12;
     193  AIDA::IHistogram1D *h13;
    138194  AIDA::IHistogram1D *h14;
     195  AIDA::IHistogram1D *h15;
     196  AIDA::IHistogram1D *h16;
    139197  AIDA::ITuple *ntuple;
    140198  AIDA::ITuple *ionTuple;
     199  AIDA::ITuple *fragmentTuple;
     200#endif
     201#ifdef G4ANALYSIS_USE_ROOT
     202  TFile *theTFile;
     203  TH1F *histo1;
     204  TH1F *histo2;
     205  TH1F *histo3;
     206  TH1F *histo4;
     207  TH1F *histo5;
     208  TH1F *histo6;
     209  TH1F *histo7;
     210  TH1F *histo8;
     211  TH1F *histo9;
     212  TH1F *histo10;
     213  TH1F *histo11;
     214  TH1F *histo12;
     215  TH1F *histo13;
     216  TH1F *histo14;
     217  TH1F *histo15;
     218  TH1F *histo16;
     219 
     220  TNtuple *theROOTNtuple;
     221  TNtuple *theROOTIonTuple;
     222  TNtuple *fragmentNtuple; // fragments
     223  TNtuple *metaData;
     224#endif
     225  G4long eventCounter;      // Simulation metadata
     226  G4double detectorDistance;
     227  G4double phantomDepth;
     228  G4double beamEnergy;
     229  G4double energyError;
     230  G4double phantomCenterDistance;
    141231};
    142232#endif
    143 #endif
    144 
     233
     234#endif
     235
  • trunk/examples/advanced/hadrontherapy/include/HadrontherapyDetectorConstruction.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyDetectorConstruction.hh; Version 4.0 May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the INFN, Catania, Italy
    36 // (b) INFN Section of Genova, Genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// HadrontherapyDetectorConstruction.hh;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy//
    4028
    4129#ifndef HadrontherapyDetectorConstruction_H
    4230#define HadrontherapyDetectorConstruction_H 1
    4331
     32#include "G4Box.hh"
    4433#include "globals.hh"
    45 #include "G4VUserDetectorConstruction.hh"
     34#include "G4VisAttributes.hh"
     35#include "G4LogicalVolume.hh"
     36#include "G4UnitsTable.hh"
    4637
    4738class G4VPhysicalVolume;
    4839class G4LogicalVolume;
    49 class HadrontherapyPhantomROGeometry;
    50 class HadrontherapyBeamLine;
     40class HadrontherapyDetectorROGeometry;
    5141class HadrontherapyDetectorMessenger;
    52 class HadrontherapyModulator;
    53 class HadrontherapyPhantomSD;
    54 class HadrontherapyMaterial;
     42class HadrontherapyDetectorSD;
     43class HadrontherapyMatrix;
    5544
    56 class HadrontherapyDetectorConstruction : public G4VUserDetectorConstruction
     45class HadrontherapyDetectorConstruction
    5746{
    5847public:
    5948
    60   HadrontherapyDetectorConstruction();
     49  HadrontherapyDetectorConstruction(G4VPhysicalVolume*);
    6150
    6251  ~HadrontherapyDetectorConstruction();
    6352
    64   G4VPhysicalVolume* Construct(); 
    6553
    6654private:
    6755
    68   void ConstructBeamLine();
    69   // This method allows to define the beam line geometry in the
    70   // experimental set-up
     56  void ConstructPhantom();
     57  void ConstructDetector();
     58  void ConstructSensitiveDetector(G4ThreeVector position_respect_to_WORLD);
     59 
     60public:
     61// Get detector position relative to WORLD
     62inline G4ThreeVector GetDetectorToWorldPosition()
     63  {
     64    return phantomPosition + detectorPosition;
     65  }
     66/////////////////////////////////////////////////////////////////////////////
     67// Get displacement between phantom and detector by detector position, phantom and detector sizes
     68inline G4ThreeVector GetDetectorToPhantomPosition()
     69{
     70    return G4ThreeVector(phantomSizeX - detectorSizeX + detectorPosition.getX(),
     71                         phantomSizeY - detectorSizeY + detectorPosition.getY(),
     72                         phantomSizeZ - detectorSizeZ + detectorPosition.getZ()
     73                          );
     74}
    7175
    72  void ConstructPhantom();
    73  // This method allows to define the phantom geometry in the
    74  // experimental set-up
    75  
    76  void ConstructSensitiveDetector();
    77   // The sensitive detector is associated to the phantom volume
     76/////////////////////////////////////////////////////////////////////////////
     77// Calculate (and set) detector position by displacement, phantom and detector sizes
     78inline void SetDetectorPosition()
     79  {
     80          // Adjust detector position
     81          detectorPosition.setX(detectorToPhantomPosition.getX() - phantomSizeX + detectorSizeX);
     82          detectorPosition.setY(detectorToPhantomPosition.getY() - phantomSizeY + detectorSizeY);
     83          detectorPosition.setZ(detectorToPhantomPosition.getZ() - phantomSizeZ + detectorSizeZ);
     84     
     85      if (detectorPhysicalVolume) detectorPhysicalVolume -> SetTranslation(detectorPosition);
     86  }
     87/////////////////////////////////////////////////////////////////////////////
     88// Check whether detector is inside phantom
     89inline bool IsInside(G4double detectorHalfX,
     90                     G4double detectorHalfY,
     91                     G4double detectorHalfZ,
     92                     G4double phantomHalfX,
     93                     G4double phantomHalfY,
     94                     G4double phantomHalfZ,
     95                     G4ThreeVector detectorToPhantomPosition)
     96{
     97// Dimensions check... X Y and Z
     98// Firstly check what dimension we are modifying
     99        if (detectorHalfX > 0. && phantomHalfX > 0. && detectorToPhantomPosition.getX() >=0.)
     100        {
     101            if (detectorHalfX > phantomHalfX)
     102                 {
     103                    G4cout << "Error: Detector X dimension must be smaller or equal to the corrispondent of the phantom" << G4endl;
     104                    return false;
     105                 }
     106            if ( 2*(phantomHalfX - detectorHalfX) < detectorToPhantomPosition.getX())
     107                 {
     108                    G4cout << "Error: X dimension doesn't fit with detector to phantom relative position" << G4endl;
     109                    return false;
     110                 }
     111        }
    78112
    79 public:
     113        if (detectorHalfY > 0. && phantomHalfY > 0.&& detectorToPhantomPosition.getY() >=0.)
     114        {
     115            if (detectorHalfY > phantomHalfY)
     116                 {
     117                    G4cout << "Error: Detector Y dimension must be smaller or equal to the corrispondent of the phantom" << G4endl;
     118                    return false;
     119                 }
     120            if ( 2*(phantomHalfY - detectorHalfY) < detectorToPhantomPosition.getY())
     121             {
     122                   G4cout << "Error: Y dimension doesn't fit with detector to phantom relative position" << G4endl;
     123                   return false;
     124             }
     125        }                       
    80126
    81   void SetModulatorAngle(G4double angle);
    82   // This method allows moving the modulator through UI commands
     127        if (detectorHalfZ > 0. && phantomHalfZ > 0.&& detectorToPhantomPosition.getZ() >=0.)
     128        {
     129            if (detectorHalfZ > phantomHalfZ)
     130                 {
     131                    G4cout << "Error: Detector Z dimension must be smaller or equal to the corrispondent of the phantom" << G4endl;
     132                    return false;
     133                 }
     134            if ( 2*(phantomHalfZ - detectorHalfZ) < detectorToPhantomPosition.getZ())
     135             {
     136                   G4cout << "Error: Z dimension doesn't fit with detector to phantom relative position" << G4endl;
     137                   return false;
     138             }
     139        }
     140/*
     141    G4cout << "Displacement between Phantom and Detector is: ";
     142    G4cout << "DX= "<< G4BestUnit(detectorToPhantomPosition.getX(),"Length") <<
     143              "DY= "<< G4BestUnit(detectorToPhantomPosition.getY(),"Length") <<
     144              "DZ= "<< G4BestUnit(detectorToPhantomPosition.getZ(),"Length") << G4endl;
     145*/
     146        return true;
     147}
     148/////////////////////////////////////////////////////////////////////////////
    83149
    84   void SetRangeShifterXPosition(G4double translation);
    85   // This method allows to move the Range Shifter along
    86   // the X axis through UI commands
     150  G4bool SetNumberOfVoxelBySize(G4double sizeX, G4double sizeY, G4double sizeZ);
     151  G4bool SetDetectorSize(G4double sizeX, G4double sizeY, G4double sizeZ);
     152  G4bool SetPhantomSize(G4double sizeX, G4double sizeY, G4double sizeZ);
     153  G4bool SetPhantomPosition(G4ThreeVector);
     154  G4bool SetDetectorToPhantomPosition(G4ThreeVector DetectorToPhantomPosition);
     155  G4LogicalVolume* GetDetectorLogicalVolume(){ return detectorLogicalVolume;}
    87156
    88   void SetRangeShifterXSize(G4double halfSize);
    89   // This method allows to change the size of the range shifter along
    90   // the X axis through UI command.
    91157
    92   void SetFirstScatteringFoilSize(G4double halfSize);
    93   // This method allows to change the size of the first scattering foil
    94   // along the X axis through UI command.
     158private:
    95159
    96   void SetSecondScatteringFoilSize (G4double halfSize);
    97   // This method allows to change the size of the second scattering foil
    98   // along the X axis through UI command.
     160  HadrontherapyDetectorMessenger* detectorMessenger;
    99161
    100   void SetOuterRadiusStopper (G4double value);
    101   // This method allows to change the size of the outer radius of the stopper
    102   // through UI command.
     162  G4VisAttributes* skyBlue;
     163  G4VisAttributes* red;
    103164
    104   void SetInnerRadiusFinalCollimator (G4double value);
    105   // This method allows to change the size of the inner radius of the
    106   // final collimator through UI command.
     165  G4VPhysicalVolume* motherPhys;
    107166
    108   void SetRSMaterial(G4String material);
    109   // This method allows to change the material
    110   // of the range shifter through UI command.
     167  HadrontherapyDetectorSD*         detectorSD; // Pointer to sensitive detector
     168  HadrontherapyDetectorROGeometry* detectorROGeometry; // Pointer to ROGeometry
     169  HadrontherapyMatrix*             matrix;
    111170
    112   G4double ComputeVoxelSize() {return phantomSizeX/numberOfVoxelsAlongX;};
    113   // Returns the size of the voxel along the X axis
    114  
    115 private:
     171  G4VPhysicalVolume* phantomPhysicalVolume;
     172  G4LogicalVolume*   phantomLogicalVolume;
     173  G4LogicalVolume*   detectorLogicalVolume;
     174  G4VPhysicalVolume* detectorPhysicalVolume;
    116175 
    117   HadrontherapyPhantomSD* phantomSD; // Pointer to sensitive detector
    118 
    119   HadrontherapyPhantomROGeometry* phantomROGeometry; // Pointer to ROGeometry
    120 
    121   HadrontherapyBeamLine* beamLine; // Pointer to the beam line
    122                                    // geometry component
    123 
    124   HadrontherapyModulator* modulator; // Pointer to the modulator
    125                                      // geometry component
    126 
    127   G4VPhysicalVolume* physicalTreatmentRoom;
    128   G4VPhysicalVolume* patientPhysicalVolume;
    129   G4LogicalVolume* phantomLogicalVolume;
    130   G4VPhysicalVolume* phantomPhysicalVolume;
    131  
    132   HadrontherapyDetectorMessenger* detectorMessenger;
    133   HadrontherapyMaterial* material;
    134 
    135176  G4double phantomSizeX;
    136177  G4double phantomSizeY;
    137178  G4double phantomSizeZ;
    138    
     179
     180  G4double detectorSizeX;
     181  G4double detectorSizeY;
     182  G4double detectorSizeZ;
     183
     184  G4ThreeVector phantomPosition, detectorPosition, detectorToPhantomPosition; //  phantom center, detector center, detector to phantom relative position
     185
     186  G4double sizeOfVoxelAlongX;
     187  G4double sizeOfVoxelAlongY;
     188  G4double sizeOfVoxelAlongZ;
     189
    139190  G4int numberOfVoxelsAlongX;
    140191  G4int numberOfVoxelsAlongY;
    141192  G4int numberOfVoxelsAlongZ; 
     193
     194  G4Box* phantom;
     195  G4Box* detector;
     196
    142197};
    143198#endif
  • trunk/examples/advanced/hadrontherapy/include/HadrontherapyDetectorMessenger.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyDetectorMessenger.hh; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the INFN, Catania, Italy
    36 // (b) INFN Section of Genova, Genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// HadrontherapyDetectorMessenger.hh;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy//
     28
    4029#ifndef HadrontherapyDetectorMessenger_h
    4130#define HadrontherapyDetectorMessenger_h 1
     
    4837class G4UIcmdWithADoubleAndUnit;
    4938class G4UIcmdWithAString;
     39class G4UIcmdWith3VectorAndUnit;
    5040
    5141class HadrontherapyDetectorMessenger: public G4UImessenger
     
    5545  ~HadrontherapyDetectorMessenger();
    5646   
    57     void SetNewValue(G4UIcommand*, G4String);
     47  void SetNewValue(G4UIcommand*, G4String);
    5848   
    5949private:
    6050
    61   // Pointer to the detector component
     51  // Pointer to the phantom/detector
    6252  HadrontherapyDetectorConstruction* hadrontherapyDetector;
    63  
    64   G4UIdirectory* modulatorDir; // Control of the modulator
    65   G4UIdirectory* beamLineDir;  // Control of the beam line
    66  
    67   G4UIdirectory* rangeShifterDir;
    68   // Control of the range shifter component of the beam line
    6953
    70   G4UIdirectory* firstScatteringFoilDir;
    71   // Control of the first scattering foil component of the beam line
    72  
    73   G4UIdirectory* secondScatteringFoilDir;
    74   // Control of the first scattering foil component of the beam line
    75  
    76   G4UIdirectory* rangeStopperDir;
    77   // Control of the range stopper component of the beam line
    78  
    79   G4UIdirectory* finalCollimatorDir;
    80   // Control of the final collimator component of the beam line
    81  
    82   G4UIcmdWithADoubleAndUnit* modulatorAngleCmd;
    83   // UI command to rotate the modulator wheel
     54  G4UIdirectory *changeThePhantomDir,  *changeTheDetectorDir;
    8455
    85   G4UIcmdWithAString*   rangeShifterMatCmd;
    86   // UI command to set the material of the rangeShifter component of
    87   // the beam line
    88 
    89   G4UIcmdWithADoubleAndUnit* rangeShifterXSizeCmd;
    90   // UI command to set half of the X size of the rangeShifter component of
    91   // the beam line
    92 
    93   G4UIcmdWithADoubleAndUnit* rangeShifterXPositionCmd;
    94   // UI command to change the X position of the rangeShifter component of
    95   // the beam line
    96 
    97   G4UIcmdWithADoubleAndUnit* firstScatteringFoilXSizeCmd;
    98   // UI command to set half X size of the first scattering foil of
    99   // the beam line
    100 
    101   G4UIcmdWithADoubleAndUnit* secondScatteringFoilXSizeCmd;
    102   // UI command to set half X size of the second scattering foil
    103   // the beam line
    104 
    105   G4UIcmdWithADoubleAndUnit* outerRadiusStopperCmd;
    106   // UI command to set the outer radius of the range stopper component of
    107   // the beam line
    108 
    109   G4UIcmdWithADoubleAndUnit* innerRadiusFinalCollimatorCmd;
    110   // UI command to set the inner radius of the final collimator component of
    111   // the beam line
     56  G4UIcmdWith3VectorAndUnit *changeThePhantomSizeCmd,
     57                            *changeThePhantomPositionCmd,
     58                            *changeTheDetectorSizeCmd,
     59                            *changeTheDetectorToPhantomPositionCmd,
     60                            *changeTheDetectorVoxelCmd;
    11261};
    11362#endif
  • trunk/examples/advanced/hadrontherapy/include/HadrontherapyDummySD.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // ----------------------------------------------------------------------------
    27 //                 GEANT 4 - Hadrontherapy example
    28 // ----------------------------------------------------------------------------
    29 // Code developed by:
    30 //
    31 // G.A.P. Cirrone(a)*, G. Candiano, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    32 //
    33 // (a) Laboratori Nazionali del Sud
    34 //     of the National Institute for Nuclear Physics, Catania, Italy
    35 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    36 //
    37 // * cirrone@lns.infn.it
    38 // --------------------------------------------------------------
     26// HadrontherapyDummySD.hh
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    3928
    4029#ifndef HadrontherapyDummySD_h
  • trunk/examples/advanced/hadrontherapy/include/HadrontherapyEventAction.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyEventAction.hh; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, G. Candiano, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // --------------------------------------------------------------
     26// HadrontherapyEventAction.hh;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    4028
    4129#ifndef HadrontherapyEventAction_h
     
    4634
    4735class HadrontherapyMatrix;
     36class HadrontherapyEventActionMessenger;
    4837
    4938class HadrontherapyEventAction : public G4UserEventAction
    5039{
    5140public:
    52   HadrontherapyEventAction(HadrontherapyMatrix*);
     41  HadrontherapyEventAction();
    5342  ~HadrontherapyEventAction();
    5443
     
    5645  void BeginOfEventAction(const G4Event*);
    5746  void EndOfEventAction(const G4Event*);
    58    
     47
     48  void SetPrintModulo(G4int val)
     49  {
     50    printModulo = val;
     51  };
     52
     53  void SetDrawFlag(G4String val)
     54  {
     55    drawFlag = val;
     56  };
     57
    5958private:
    6059  G4String drawFlag; //Visualisation flag
    6160  G4int hitsCollectionID;
    6261  HadrontherapyMatrix *matrix;
     62  G4int printModulo; 
     63  HadrontherapyEventActionMessenger* pointerEventMessenger;
    6364};
    6465
  • trunk/examples/advanced/hadrontherapy/include/HadrontherapyMatrix.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyMatrix.hh; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// HadrontherapyMatrix.hh;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    4028
    4129#ifndef HadrontherapyMatrix_H
     
    4331
    4432#include "globals.hh"
     33#include <vector>
    4534
    4635// The information: energy deposit and position in the phantom
     
    4938class HadrontherapyMatrix
    5039{
     40private:
     41  HadrontherapyMatrix(G4int voxelX, G4int voxelY, G4int voxelZ); //<--- this is supposed to be a singleton
     42
    5143public:
    52   HadrontherapyMatrix();
     44
    5345  ~HadrontherapyMatrix();
     46// Get object instance only
     47  static HadrontherapyMatrix* getInstance();
     48// Make & Get instance
     49  static HadrontherapyMatrix* getInstance(G4int nX, G4int nY, G4int nZ);
     50 
     51  void flush();
    5452 
    5553  void Initialize();
    5654  // All the elements of the matrix are initialised to zero
    57  
     55  
    5856  void Fill(G4int i, G4int j, G4int k, G4double energyDeposit);
    5957  // The matrix is filled with the energy deposit
     
    6462  // Store the information of the matrix in a ntuple and in
    6563  // a 1D Histogram
     64 
     65  inline G4int Index(G4int i, G4int j, G4int k){ return (i * numberVoxelY + j) * numberVoxelZ + k; }
     66  // Get a unique index from a three dimensional voxel information
    6667
    6768private:
     69
     70  static HadrontherapyMatrix* instance;
    6871  G4int numberVoxelX;
    6972  G4int numberVoxelY;
  • trunk/examples/advanced/hadrontherapy/include/HadrontherapyParticles.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyParticles.hh; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// HadrontherapyParticles.hh;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    4028
    4129#ifndef HADRONTHERAPYPARTICLES_HH
  • trunk/examples/advanced/hadrontherapy/include/HadrontherapyPhysicsList.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyPhysicsList.hh,v 1.0
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
    40 #ifndef HADRONTHERAPYPHYSICSLIST_H
    41 #define HADRONTHERAPYPHYSICSLIST_H 1
     26// HadrontherapyPhysicsList.hh
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
     28
     29#ifndef HadrontherapyPhysicsList_h
     30#define HadrontherapyPhysicsList_h 1
    4231
    4332#include "G4VModularPhysicsList.hh"
     33#include "G4EmConfigurator.hh"
    4434#include "globals.hh"
    4535
     36class G4VPhysicsConstructor;
     37class HadrontherapyStepMax;
    4638class HadrontherapyPhysicsListMessenger;
    4739
     
    4941{
    5042public:
     43
    5144  HadrontherapyPhysicsList();
    5245  virtual ~HadrontherapyPhysicsList();
    5346
    54   virtual void SetCuts();
    55   void AddPhysicsList(const G4String& name); 
    56  
     47  void ConstructParticle();
     48
     49  void SetCuts();
     50  void SetCutForGamma(G4double);
     51  void SetCutForElectron(G4double);
     52  void SetCutForPositron(G4double);
     53
     54  void AddPhysicsList(const G4String& name);
     55  void ConstructProcess();
     56
     57  void AddStepMax();
     58  HadrontherapyStepMax* GetStepMaxProcess() {return stepMaxProcess;};
     59  void AddPackage(const G4String& name);
     60
    5761private:
    58   G4bool decayIsRegistered;
    59   G4bool emElectronIsRegistered;
    60   G4bool emPositronIsRegistered;
    61   G4bool emPhotonIsRegistered;
    62   G4bool emIonIsRegistered;
    63   G4bool emMuonIsRegistered;
    64   G4bool hadrElasticHadronIonIsRegistered;
    65   G4bool hadrInelasticPionIsRegistered;
    66   G4bool hadrInelasticIonIsRegistered;
    67   G4bool hadrInelasticProtonNeutronIsRegistered;
    68   G4bool hadrAtRestMuonIsRegistered;
    6962
    70   HadrontherapyPhysicsListMessenger* messenger;
     63  G4EmConfigurator em_config;
     64
     65  G4double cutForGamma;
     66  G4double cutForElectron;
     67  G4double cutForPositron;
     68
     69  G4bool helIsRegisted;
     70  G4bool bicIsRegisted;
     71  G4bool biciIsRegisted;
     72  G4bool locIonIonInelasticIsRegistered;
     73  G4bool radioactiveDecayIsRegisted;
     74
     75  G4String                             emName;
     76  G4VPhysicsConstructor*               emPhysicsList;
     77  G4VPhysicsConstructor*               decPhysicsList;
     78  std::vector<G4VPhysicsConstructor*>  hadronPhys;
     79
     80  HadrontherapyStepMax* stepMaxProcess;
     81
     82  HadrontherapyPhysicsListMessenger* pMessenger;
    7183};
    7284
    7385#endif
    74 
    75 
    76 
  • trunk/examples/advanced/hadrontherapy/include/HadrontherapyPhysicsListMessenger.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyPhisicsListMessenger.hh; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// HadrontherapyPhysicsListsMessenger.hh
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    4028
    41 #ifndef HADRONTHERAPYPHYSICSLISTMESSENGER_HH
    42 #define HADRONTHERAPYPHYSICSLISTMESSENGER_HH 1
     29#ifndef HadrontherapyPhysicsListMessenger_h
     30#define HadrontherapyPhysicsListMessenger_h 1
    4331
    4432#include "globals.hh"
     
    4735class HadrontherapyPhysicsList;
    4836class G4UIdirectory;
    49 class G4UIcmdWithoutParameter;
    50 class G4UIcmdWithADouble;
    5137class G4UIcmdWithADoubleAndUnit;
    52 class G4UIcmdWithABool;
    5338class G4UIcmdWithAString;
    5439
    55 class HadrontherapyPhysicsListMessenger: public G4UImessenger {
     40//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    5641
    57 public:
     42class HadrontherapyPhysicsListMessenger: public G4UImessenger
     43{
     44  public:
    5845 
    59   HadrontherapyPhysicsListMessenger(HadrontherapyPhysicsList* physList);
     46    HadrontherapyPhysicsListMessenger(HadrontherapyPhysicsList* );
     47   ~HadrontherapyPhysicsListMessenger();
     48   
     49    void SetNewValue(G4UIcommand*, G4String);
     50   
     51  private:
    6052 
    61   ~HadrontherapyPhysicsListMessenger();
    62  
    63   void SetNewValue(G4UIcommand*, G4String);
    64  
    65 private:
    66  
    67   HadrontherapyPhysicsList* physicsList;   
    68   G4UIdirectory* listDir;
    69   G4UIcmdWithAString* physicsListCmd;
     53  HadrontherapyPhysicsList* pPhysicsList;
     54   
     55  G4UIdirectory*             physDir;       
     56  G4UIcmdWithADoubleAndUnit* gammaCutCmd;
     57  G4UIcmdWithADoubleAndUnit* electCutCmd;
     58  G4UIcmdWithADoubleAndUnit* protoCutCmd;   
     59  G4UIcmdWithADoubleAndUnit* allCutCmd;    
     60  G4UIcmdWithAString*        pListCmd;
     61  G4UIcmdWithAString* packageListCmd;   
    7062};
     63
     64//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    7165
    7266#endif
    7367
    74 
    75 
    76 
    77 
    78 
    79 
    80 
  • trunk/examples/advanced/hadrontherapy/include/HadrontherapyPrimaryGeneratorAction.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyPrimaryGeneratorAction.hh; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// HadrontherapyPrimaryGeneratorAction.hh; May 2005
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    4028
    4129#ifndef HadrontherapyPrimaryGeneratorAction_h
     
    6856  void SetsigmaMomentumY(G4double);
    6957  void SetsigmaMomentumZ(G4double);
     58  G4double GetmeanKineticEnergy(void);
    7059   
    7160private:
  • trunk/examples/advanced/hadrontherapy/include/HadrontherapyPrimaryGeneratorMessenger.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyPrimaryGeneratorMessenger.hh; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// HadrontherapyPrimaryGeneratorMessenger.hh;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    4028
    4129#ifndef HadrontherapyPrimaryGeneratorMessenger_h
  • trunk/examples/advanced/hadrontherapy/include/HadrontherapyRunAction.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyRunAction.hh,v 3.0, September 2004;
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the INFN, Catania, Italy
    36 // (b) INFN Section of Genova, Genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// HadrontherapyRunAction.hh
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    4028
    4129#ifndef HadrontherapyRunAction_h
     
    5139class HadrontherapyRunMessenger;
    5240class HadrontherapyFactory;
    53 class HadrontherapyFactoryIr;
    54 class HadrontherapyFactoryI;
    55 
    56 
    5741
    5842class HadrontherapyRunAction : public G4UserRunAction
  • trunk/examples/advanced/hadrontherapy/include/HadrontherapySteppingAction.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyProtonSteppingAction.hh; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the INFN, Catania, Italy
    36 // (b) INFN Section of Genova, Genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// HadrontherapyProtonSteppingAction.hh;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    4028
    4129#ifndef HadrontherapySteppingAction_h
  • trunk/examples/advanced/hadrontherapy/src/HadrontherapyAnalysisManager.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyAnalisysManager.cc;  May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the INFN, Catania, Italy
    36 // (b) INFN Section of Genova, Genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
    40 
    41 #ifdef  G4ANALYSIS_USE
     26// $Id: HadrontherapyAnalisysManager.cc;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
     28
    4229#include "HadrontherapyAnalysisManager.hh"
    43 
     30#include "HadrontherapyMatrix.hh"
     31#include "HadrontherapyAnalysisFileMessenger.hh"
     32#include <time.h>
     33#ifdef ANALYSIS_USE
    4434HadrontherapyAnalysisManager* HadrontherapyAnalysisManager::instance = 0;
    4535
    46 HadrontherapyAnalysisManager::HadrontherapyAnalysisManager() :
    47   aFact(0), theTree(0), histFact(0), tupFact(0), h1(0), h2(0), h3(0),
    48   h4(0), h5(0), h6(0), h7(0), h8(0), h9(0), h10(0), h11(0), h12(0), h13(0), h14(0), ntuple(0),
    49   ionTuple(0)
    50 
    51 }
    52 
    53 HadrontherapyAnalysisManager::~HadrontherapyAnalysisManager()
    54 {
     36#ifdef G4ANALYSIS_USE_ROOT
     37#undef G4ANALYSIS_USE
     38#endif
     39
     40/////////////////////////////////////////////////////////////////////////////
     41
     42#ifdef G4ANALYSIS_USE
     43HadrontherapyAnalysisManager::HadrontherapyAnalysisManager() :
     44  analysisFileName("DoseDistribution.root"), aFact(0), theTree(0), histFact(0), tupFact(0), h1(0), h2(0), h3(0),
     45  h4(0), h5(0), h6(0), h7(0), h8(0), h9(0), h10(0), h11(0), h12(0), h13(0), h14(0), h15(0), h16(0), ntuple(0),
     46  ionTuple(0),
     47  fragmentTuple(0),
     48  eventCounter(0)
     49{
     50        fMess = new HadrontherapyAnalysisFileMessenger(this);
     51}
     52#endif
     53#ifdef G4ANALYSIS_USE_ROOT
     54HadrontherapyAnalysisManager::HadrontherapyAnalysisManager() :
     55  analysisFileName("DoseDistribution.root"),theTFile(0), histo1(0), histo2(0), histo3(0),
     56  histo4(0), histo5(0), histo6(0), histo7(0), histo8(0), histo9(0), histo10(0), histo11(0), histo12(0), histo13(0), histo14(0), histo15(0), histo16(0),
     57  theROOTNtuple(0),
     58  theROOTIonTuple(0),
     59  fragmentNtuple(0),
     60  metaData(0),
     61  eventCounter(0)
     62{
     63  fMess = new HadrontherapyAnalysisFileMessenger(this);
     64}
     65#endif
     66/////////////////////////////////////////////////////////////////////////////
     67HadrontherapyAnalysisManager::~HadrontherapyAnalysisManager()
     68{
     69delete(fMess); //kill the messenger
     70#ifdef G4ANALYSIS_USE
     71  delete fragmentTuple;
     72  fragmentTuple = 0;
     73
    5574  delete ionTuple;
    5675  ionTuple = 0;
    57  
     76
    5877  delete ntuple;
    5978  ntuple = 0;
    6079
     80  delete h16;
     81  h16 = 0;
     82
     83  delete h15;
     84  h15 = 0;
     85
    6186  delete h14;
    6287  h14 = 0;
     
    100125  delete h1;
    101126  h1 = 0;
    102  
     127
    103128  delete tupFact;
    104129  tupFact = 0;
     
    112137  delete aFact;
    113138  aFact = 0;
    114 }
    115 
     139#endif
     140#ifdef G4ANALYSIS_USE_ROOT
     141  delete metaData;
     142  metaData = 0;
     143
     144  delete fragmentNtuple;
     145  fragmentNtuple = 0;
     146
     147  delete theROOTIonTuple;
     148  theROOTIonTuple = 0;
     149
     150  delete theROOTNtuple;
     151  theROOTNtuple = 0;
     152 
     153  delete histo16;
     154  histo14 = 0;
     155
     156  delete histo15;
     157  histo14 = 0;
     158
     159  delete histo14;
     160  histo14 = 0;
     161
     162  delete histo13;
     163  histo13 = 0;
     164
     165  delete histo12;
     166  histo12 = 0;
     167
     168  delete histo11;
     169  histo11 = 0;
     170
     171  delete histo10;
     172  histo10 = 0;
     173
     174  delete histo9;
     175  histo9 = 0;
     176
     177  delete histo8;
     178  histo8 = 0;
     179
     180  delete histo7;
     181  histo7 = 0;
     182
     183  delete histo6;
     184  histo6 = 0;
     185
     186  delete histo5;
     187  histo5 = 0;
     188
     189  delete histo4;
     190  histo4 = 0;
     191
     192  delete histo3;
     193  histo3 = 0;
     194
     195  delete histo2;
     196  histo2 = 0;
     197
     198  delete histo1;
     199  histo1 = 0;
     200#endif
     201}
     202/////////////////////////////////////////////////////////////////////////////
    116203HadrontherapyAnalysisManager* HadrontherapyAnalysisManager::getInstance()
    117204{
     
    120207}
    121208
    122 void HadrontherapyAnalysisManager::book()
    123 {
     209/////////////////////////////////////////////////////////////////////////////
     210void HadrontherapyAnalysisManager::SetAnalysisFileName(G4String aFileName)
     211{
     212  this->analysisFileName = aFileName;
     213}
     214
     215/////////////////////////////////////////////////////////////////////////////
     216void HadrontherapyAnalysisManager::book()
     217{
     218#ifdef G4ANALYSIS_USE
    124219  // Build up  the  analysis factory
    125220  aFact = AIDA_createAnalysisFactory();
    126221  AIDA::ITreeFactory* treeFact = aFact -> createTreeFactory();
    127222
    128   // Create the .hbk file
    129   G4String fileName = "hadrontherapy.hbk";
     223  // Create the .hbk or the .root file
     224  G4String fileName = "DoseDistribution.hbk";
     225
     226  std::string opts = "export=root";
     227
    130228  theTree = treeFact -> create(fileName,"hbook",false,true);
     229  theTree = treeFact -> create(analysisFileName,"ROOT",false,true,opts);
     230
     231  // Factories are not "managed" by an AIDA analysis system.
     232  // They must be deleted by the AIDA user code.
    131233  delete treeFact;
    132234
     
    136238
    137239  // Create the histograms with the enrgy deposit along the X axis
    138   h1 = histFact -> createHistogram1D("10","slice, energy", 200, 0., 200. );
    139 
    140   h2 = histFact -> createHistogram1D("20","Secondary protons - slice, energy", 200, 0., 200. );
    141  
    142   h3 = histFact -> createHistogram1D("30","Secondary neutrons - slice, energy", 200, 0., 200. );
    143 
    144   h4 = histFact -> createHistogram1D("40","Secondary alpha - slice, energy", 200, 0., 200. );
    145 
    146   h5 = histFact -> createHistogram1D("50","Secondary gamma - slice, energy", 200, 0., 200. );
    147 
    148   h6 = histFact -> createHistogram1D("60","Secondary electron - slice, energy", 200, 0., 200. );
    149 
    150   h7 = histFact -> createHistogram1D("70","Secondary triton - slice, energy", 200, 0., 200. );
    151 
    152   h8 = histFact -> createHistogram1D("80","Secondary deuteron - slice, energy", 200, 0., 200. );
    153 
    154   h9 = histFact -> createHistogram1D("90","Secondary pion - slice, energy", 200, 0., 200. );
    155  
     240  h1 = histFact -> createHistogram1D("10","slice, energy", 400, 0., 400. );
     241
     242  h2 = histFact -> createHistogram1D("20","Secondary protons - slice, energy", 400, 0., 400. );
     243
     244  h3 = histFact -> createHistogram1D("30","Secondary neutrons - slice, energy", 400, 0., 400. );
     245
     246  h4 = histFact -> createHistogram1D("40","Secondary alpha - slice, energy", 400, 0., 400. );
     247
     248  h5 = histFact -> createHistogram1D("50","Secondary gamma - slice, energy", 400, 0., 400. );
     249
     250  h6 = histFact -> createHistogram1D("60","Secondary electron - slice, energy", 400, 0., 400. );
     251
     252  h7 = histFact -> createHistogram1D("70","Secondary triton - slice, energy", 400, 0., 400. );
     253
     254  h8 = histFact -> createHistogram1D("80","Secondary deuteron - slice, energy", 400, 0., 400. );
     255
     256  h9 = histFact -> createHistogram1D("90","Secondary pion - slice, energy", 400, 0., 400. );
     257
    156258  h10 = histFact -> createHistogram1D("100","Energy distribution of secondary electrons", 70, 0., 70. );
    157  
     259
    158260  h11 = histFact -> createHistogram1D("110","Energy distribution of secondary photons", 70, 0., 70. );
    159261
    160262  h12 = histFact -> createHistogram1D("120","Energy distribution of secondary deuterons", 70, 0., 70. );
    161  
     263
    162264  h13 = histFact -> createHistogram1D("130","Energy distribution of secondary tritons", 70, 0., 70. );
    163265
    164266  h14 = histFact -> createHistogram1D("140","Energy distribution of secondary alpha particles", 70, 0., 70. );
     267
     268  h15 = histFact -> createHistogram1D("150","Energy distribution of helium fragments after the phantom", 70, 0., 500.);
     269
     270  h16 = histFact -> createHistogram1D("160","Energy distribution of hydrogen fragments after the phantom", 70, 0., 500.);
    165271
    166272  // Create the ntuple
     
    173279  G4String options2 = "";
    174280  if (tupFact) ionTuple = tupFact -> create("2","2", columnNames2, options2);
    175 }
    176 
    177 void HadrontherapyAnalysisManager::FillEnergyDeposit(G4int i,
    178                                                      G4int j,
     281
     282  // Create the fragment ntuple
     283  G4String columnNames3 = "int a; double z; double energy; double posX; double posY; double posZ;";
     284  G4String options3 = "";
     285  if (tupFact) fragmentTuple = tupFact -> create("3","3", columnNames3, options3);
     286#endif
     287#ifdef G4ANALYSIS_USE_ROOT
     288  // Use ROOT
     289  theTFile = new TFile(analysisFileName, "RECREATE");
     290
     291  // Create the histograms with the energy deposit along the X axis
     292  histo1 = createHistogram1D("braggPeak","slice, energy", 400, 0., 27.9); //<different waterthicknesses are accoutned for in ROOT-analysis stage
     293  histo2 = createHistogram1D("h20","Secondary protons - slice, energy", 400, 0., 400.);
     294  histo3 = createHistogram1D("h30","Secondary neutrons - slice, energy", 400, 0., 400.);
     295  histo4 = createHistogram1D("h40","Secondary alpha - slice, energy", 400, 0., 400.);
     296  histo5 = createHistogram1D("h50","Secondary gamma - slice, energy", 400, 0., 400.);
     297  histo6 = createHistogram1D("h60","Secondary electron - slice, energy", 400, 0., 400.);
     298  histo7 = createHistogram1D("h70","Secondary triton - slice, energy", 400, 0., 400.);
     299  histo8 = createHistogram1D("h80","Secondary deuteron - slice, energy", 400, 0., 400.);
     300  histo9 = createHistogram1D("h90","Secondary pion - slice, energy", 400, 0., 400.);
     301  histo10 = createHistogram1D("h100","Energy distribution of secondary electrons", 70, 0., 70.);
     302  histo11 = createHistogram1D("h110","Energy distribution of secondary photons", 70, 0., 70.);
     303  histo12 = createHistogram1D("h120","Energy distribution of secondary deuterons", 70, 0., 70.);
     304  histo13 = createHistogram1D("h130","Energy distribution of secondary tritons", 70, 0., 70.);
     305  histo14 = createHistogram1D("h140","Energy distribution of secondary alpha particles", 70, 0., 70.);
     306  histo15 = createHistogram1D("heliumEnergyAfterPhantom","Energy distribution of secondary helium fragments after the phantom",
     307                           70, 0., 500.);
     308  histo16 = createHistogram1D("hydrogenEnergyAfterPhantom","Energy distribution of secondary helium fragments after the phantom",
     309                           70, 0., 500.);
     310
     311  theROOTNtuple = new TNtuple("theROOTNtuple", "Energy deposit by slice", "i:j:k:energy");
     312  theROOTIonTuple = new TNtuple("theROOTIonTuple", "Generic ion information", "a:z:occupancy:energy");
     313  fragmentNtuple = new TNtuple("fragmentNtuple", "Fragments", "A:Z:energy:posX:posY:posZ");
     314  metaData = new TNtuple("metaData", "Metadata", "events:detectorDistance:waterThickness:beamEnergy:energyError:phantomCenterDistance");
     315#endif
     316}
     317
     318/////////////////////////////////////////////////////////////////////////////
     319void HadrontherapyAnalysisManager::FillEnergyDeposit(G4int i,
     320                                                     G4int j,
    179321                                                     G4int k,
    180322                                                     G4double energy)
    181323{
     324#ifdef G4ANALYSIS_USE
    182325 if (ntuple)     {
    183326       G4int iSlice = ntuple -> findColumn("i");
     
    185328       G4int kSlice = ntuple -> findColumn("k");
    186329       G4int iEnergy = ntuple -> findColumn("energy");
    187      
     330
    188331       ntuple -> fill(iSlice,i);
    189        ntuple -> fill(jSlice,j); 
     332       ntuple -> fill(jSlice,j);
    190333       ntuple -> fill(kSlice,k);
    191334       ntuple -> fill(iEnergy, energy);     }
    192335
    193   ntuple -> addRow();
    194 }
    195 
     336  ntuple -> addRow();
     337#endif
     338#ifdef G4ANALYSIS_USE_ROOT
     339  if (theROOTNtuple) {
     340    theROOTNtuple->Fill(i, j, k, energy);
     341  }
     342#endif
     343}
     344
     345/////////////////////////////////////////////////////////////////////////////
    196346void HadrontherapyAnalysisManager::BraggPeak(G4int slice, G4double energy)
    197347{
     348#ifdef G4ANALYSIS_USE
    198349  h1 -> fill(slice,energy);
    199 }
    200 
     350#endif
     351#ifdef G4ANALYSIS_USE_ROOT
     352  histo1->SetBinContent(slice, energy); //This uses setbincontent instead of fill to get labels correct
     353#endif
     354}
     355
     356/////////////////////////////////////////////////////////////////////////////
    201357void HadrontherapyAnalysisManager::SecondaryProtonEnergyDeposit(G4int slice, G4double energy)
    202358{
     359#ifdef G4ANALYSIS_USE
    203360  h2 -> fill(slice,energy);
    204 }
    205 
     361#endif
     362#ifdef G4ANALYSIS_USE_ROOT
     363  histo2->Fill(slice, energy);
     364#endif
     365}
     366
     367/////////////////////////////////////////////////////////////////////////////
    206368void HadrontherapyAnalysisManager::SecondaryNeutronEnergyDeposit(G4int slice, G4double energy)
    207369{
     370#ifdef G4ANALYSIS_USE
    208371  h3 -> fill(slice,energy);
    209 }
    210 
     372#endif
     373#ifdef G4ANALYSIS_USE_ROOT
     374  histo3->Fill(slice, energy);
     375#endif
     376}
     377
     378/////////////////////////////////////////////////////////////////////////////
    211379void HadrontherapyAnalysisManager::SecondaryAlphaEnergyDeposit(G4int slice, G4double energy)
    212380{
     381#ifdef G4ANALYSIS_USE
    213382  h4 -> fill(slice,energy);
    214 }
    215 
     383#endif
     384#ifdef G4ANALYSIS_USE_ROOT
     385  histo4->Fill(slice, energy);
     386#endif
     387}
     388
     389/////////////////////////////////////////////////////////////////////////////
    216390void HadrontherapyAnalysisManager::SecondaryGammaEnergyDeposit(G4int slice, G4double energy)
    217391{
     392#ifdef G4ANALYSIS_USE
    218393  h5 -> fill(slice,energy);
    219 }
    220 
     394#endif
     395#ifdef G4ANALYSIS_USE_ROOT
     396  histo5->Fill(slice, energy);
     397#endif
     398}
     399
     400/////////////////////////////////////////////////////////////////////////////
    221401void HadrontherapyAnalysisManager::SecondaryElectronEnergyDeposit(G4int slice, G4double energy)
    222402{
     403#ifdef G4ANALYSIS_USE
    223404  h6 -> fill(slice,energy);
    224 }
    225 
     405#endif
     406#ifdef G4ANALYSIS_USE_ROOT
     407  histo6->Fill(slice, energy);
     408#endif
     409}
     410
     411/////////////////////////////////////////////////////////////////////////////
    226412void HadrontherapyAnalysisManager::SecondaryTritonEnergyDeposit(G4int slice, G4double energy)
    227413{
     414#ifdef G4ANALYSIS_USE
    228415  h7 -> fill(slice,energy);
    229 }
    230 
     416#endif
     417#ifdef G4ANALYSIS_USE_ROOT
     418  histo7->Fill(slice, energy);
     419#endif
     420}
     421
     422/////////////////////////////////////////////////////////////////////////////
    231423void HadrontherapyAnalysisManager::SecondaryDeuteronEnergyDeposit(G4int slice, G4double energy)
    232424{
     425#ifdef G4ANALYSIS_USE
    233426  h8 -> fill(slice,energy);
    234 }
    235 
     427#endif
     428#ifdef G4ANALYSIS_USE_ROOT
     429  histo8->Fill(slice, energy);
     430#endif
     431}
     432
     433/////////////////////////////////////////////////////////////////////////////
    236434void HadrontherapyAnalysisManager::SecondaryPionEnergyDeposit(G4int slice, G4double energy)
    237435{
     436#ifdef G4ANALYSIS_USE
    238437  h9 -> fill(slice,energy);
    239 }
    240 
     438#endif
     439#ifdef G4ANALYSIS_USE_ROOT
     440  histo9->Fill(slice, energy);
     441#endif
     442}
     443
     444/////////////////////////////////////////////////////////////////////////////
    241445void HadrontherapyAnalysisManager::electronEnergyDistribution(G4double energy)
    242446{
     447#ifdef G4ANALYSIS_USE
    243448  h10 -> fill(energy);
    244 }
    245 
     449#endif
     450#ifdef G4ANALYSIS_USE_ROOT
     451  histo10->Fill(energy);
     452#endif
     453}
     454
     455/////////////////////////////////////////////////////////////////////////////
    246456void HadrontherapyAnalysisManager::gammaEnergyDistribution(G4double energy)
    247457{
     458#ifdef G4ANALYSIS_USE
    248459  h11 -> fill(energy);
    249 }
    250 
     460#endif
     461#ifdef G4ANALYSIS_USE_ROOT
     462  histo11->Fill(energy);
     463#endif
     464}
     465
     466/////////////////////////////////////////////////////////////////////////////
    251467void HadrontherapyAnalysisManager::deuteronEnergyDistribution(G4double energy)
    252468{
     469#ifdef G4ANALYSIS_USE
    253470  h12 -> fill(energy);
    254 }
    255 
     471#endif
     472#ifdef G4ANALYSIS_USE_ROOT
     473  histo12->Fill(energy);
     474#endif
     475}
     476
     477/////////////////////////////////////////////////////////////////////////////
    256478void HadrontherapyAnalysisManager::tritonEnergyDistribution(G4double energy)
    257479{
     480#ifdef G4ANALYSIS_USE
    258481  h13 -> fill(energy);
    259 }
    260 
     482#endif
     483#ifdef G4ANALYSIS_USE_ROOT
     484  histo13->Fill(energy);
     485#endif
     486}
     487
     488/////////////////////////////////////////////////////////////////////////////
    261489void HadrontherapyAnalysisManager::alphaEnergyDistribution(G4double energy)
    262490{
     491#ifdef G4ANALYSIS_USE
    263492  h14 -> fill(energy);
    264 }
    265 
    266 void HadrontherapyAnalysisManager::genericIonInformation(G4int a,
    267                                                          G4double z,
     493#endif
     494#ifdef G4ANALYSIS_USE_ROOT
     495  histo14->Fill(energy);
     496#endif
     497}
     498/////////////////////////////////////////////////////////////////////////////
     499void HadrontherapyAnalysisManager::heliumEnergy(G4double secondaryParticleKineticEnergy)
     500{
     501#ifdef G4ANALYSIS_USE
     502  h15->fill(secondaryParticleKineticEnergy);
     503#endif
     504#ifdef G4ANALYSIS_USE_ROOT
     505  histo15->Fill(secondaryParticleKineticEnergy);
     506#endif
     507}
     508
     509/////////////////////////////////////////////////////////////////////////////
     510void HadrontherapyAnalysisManager::hydrogenEnergy(G4double secondaryParticleKineticEnergy)
     511{
     512#ifdef G4ANALYSIS_USE
     513  h16->fill(secondaryParticleKineticEnergy);
     514#endif
     515#ifdef G4ANALYSIS_USE_ROOT
     516  histo16->Fill(secondaryParticleKineticEnergy);
     517#endif
     518}
     519
     520
     521
     522void HadrontherapyAnalysisManager::fillFragmentTuple(G4int A, G4double Z, G4double energy, G4double posX, G4double posY, G4double posZ)
     523{
     524#ifdef G4ANALYSIS_USE
     525  if (fragmentTuple)    {
     526       G4int aIndex = fragmentTuple -> findColumn("a");
     527       G4int zIndex = fragmentTuple -> findColumn("z");
     528       G4int energyIndex = fragmentTuple -> findColumn("energy");
     529       G4int posXIndex = fragmentTuple -> findColumn("posX");
     530       G4int posYIndex = fragmentTuple -> findColumn("posY");
     531       G4int posZIndex = fragmentTuple -> findColumn("posZ");
     532
     533       fragmentTuple -> fill(aIndex,A);
     534       fragmentTuple -> fill(zIndex,Z);
     535       fragmentTuple -> fill(energyIndex, energy);
     536       fragmentTuple -> fill(posXIndex, posX);
     537       fragmentTuple -> fill(posYIndex, posY);
     538       fragmentTuple -> fill(posZIndex, posZ);
     539       fragmentTuple -> addRow();
     540  }
     541#endif
     542#ifdef G4ANALYSIS_USE_ROOT
     543  //G4cout <<" A = " << A << "  Z = " << Z << " energy = " << energy << G4endl;
     544  fragmentNtuple->Fill(A, Z, energy, posX, posY, posZ);
     545#endif
     546}
     547
     548/////////////////////////////////////////////////////////////////////////////
     549void HadrontherapyAnalysisManager::genericIonInformation(G4int a,
     550                                                         G4double z,
    268551                                                         G4int electronOccupancy,
    269                                                          G4double energy)
    270 {
     552                                                         G4double energy)
     553{
     554#ifdef G4ANALYSIS_USE
    271555  if (ionTuple)    {
    272556       G4int aIndex = ionTuple -> findColumn("a");
    273557       G4int zIndex = ionTuple -> findColumn("z");
    274        G4int electronIndex = ionTuple -> findColumn("occupancy"); 
     558       G4int electronIndex = ionTuple -> findColumn("occupancy");
    275559       G4int energyIndex = ionTuple -> findColumn("energy");
    276      
     560
    277561       ionTuple -> fill(aIndex,a);
    278       ionTuple -> fill(zIndex,z); 
    279       ionTuple -> fill(electronIndex, electronOccupancy); 
     562      ionTuple -> fill(zIndex,z);
     563      ionTuple -> fill(electronIndex, electronOccupancy);
    280564       ionTuple -> fill(energyIndex, energy);
    281565     }
    282    ionTuple -> addRow();
    283 }
    284 
    285 void HadrontherapyAnalysisManager::finish()
    286 
     566   ionTuple -> addRow();
     567#endif
     568#ifdef G4ANALYSIS_USE_ROOT
     569   if (theROOTIonTuple) {
     570     theROOTIonTuple->Fill(a, z, electronOccupancy, energy);
     571   }
     572#endif
     573}
     574
     575/////////////////////////////////////////////////////////////////////////////
     576void HadrontherapyAnalysisManager::startNewEvent()
     577{
     578  eventCounter++;
     579}
     580/////////////////////////////////////////////////////////////////////////////
     581void HadrontherapyAnalysisManager::setGeometryMetaData(G4double endDetectorPosition, G4double waterThickness, G4double phantomCenter)
     582{
     583  this->detectorDistance = endDetectorPosition;
     584  this->phantomDepth = waterThickness;
     585  this->phantomCenterDistance = phantomCenter;
     586}
     587void HadrontherapyAnalysisManager::setBeamMetaData(G4double meanKineticEnergy,G4double sigmaEnergy)
     588{
     589  this->beamEnergy = meanKineticEnergy;
     590  this->energyError = sigmaEnergy;
     591}
     592/////////////////////////////////////////////////////////////////////////////
     593void HadrontherapyAnalysisManager::flush()
     594{
     595  HadrontherapyMatrix* matrix = HadrontherapyMatrix::getInstance();
     596
     597  matrix->TotalEnergyDeposit();
     598#ifdef G4ANALYSIS_USE
     599  theTree -> commit();
     600  theTree ->close();
     601#endif
     602#ifdef G4ANALYSIS_USE_ROOT
     603  metaData->Fill((Float_t) eventCounter,(Float_t) detectorDistance, (Float_t) phantomDepth, (Float_t) beamEnergy,(Float_t) energyError, (Float_t) phantomCenterDistance);
     604  metaData->Write();
     605  theROOTNtuple->Write();
     606  theROOTIonTuple->Write();
     607  fragmentNtuple->Write();
     608  theTFile->Write();
     609  //  theTFile->Clear();
     610  theTFile->Close();
     611#endif
     612  eventCounter = 0;
     613  matrix->flush();
     614}
     615/////////////////////////////////////////////////////////////////////////////
     616void HadrontherapyAnalysisManager::finish()
     617{
     618#ifdef G4ANALYSIS_USE
    287619  // Write all histograms to file
    288620  theTree -> commit();
    289  
    290621  // Close (will again commit)
    291622  theTree ->close();
    292 }
    293 #endif
    294 
    295 
    296 
    297 
    298 
    299 
    300 
    301 
    302 
    303 
    304 
     623#endif
     624#ifdef G4ANALYSIS_USE_ROOT
     625  metaData->Fill((Float_t) eventCounter,(Float_t) detectorDistance, (Float_t) phantomDepth, (Float_t) beamEnergy,(Float_t) energyError, (Float_t) phantomCenterDistance);
     626  metaData->Write();
     627  theROOTNtuple->Write();
     628  theROOTIonTuple->Write();
     629  fragmentNtuple->Write();
     630  theTFile->Write();
     631  theTFile->Close();
     632#endif
     633  eventCounter = 0;
     634}
     635
     636#endif
     637
     638
     639
     640
     641
     642
     643
     644
     645
  • trunk/examples/advanced/hadrontherapy/src/HadrontherapyDetectorConstruction.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyDetectorConstruction.cc; Version 4.0 May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
     26// HadrontherapyDetectorConstruction.cc
    3127//
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the INFN, Catania, Italy
    36 // (b) INFN Section of Genova, Genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     28// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    4029
    4130#include "G4SDManager.hh"
     
    5039#include "G4Colour.hh"
    5140#include "G4UserLimits.hh"
     41#include "G4UnitsTable.hh"
    5242#include "G4VisAttributes.hh"
    53 #include "HadrontherapyPhantomROGeometry.hh"
     43#include "G4NistManager.hh"
     44#include "HadrontherapyDetectorROGeometry.hh"
    5445#include "HadrontherapyDetectorMessenger.hh"
    55 #include "HadrontherapyPhantomSD.hh"
     46#include "HadrontherapyDetectorSD.hh"
    5647#include "HadrontherapyDetectorConstruction.hh"
    57 #include "HadrontherapyMaterial.hh"
    58 #include "HadrontherapyBeamLine.hh"
    59 #include "HadrontherapyModulator.hh"
    60 
    61 HadrontherapyDetectorConstruction::HadrontherapyDetectorConstruction()
    62   : phantomSD(0), phantomROGeometry(0), beamLine(0), modulator(0),
    63     physicalTreatmentRoom(0),
    64     patientPhysicalVolume(0),
    65     phantomLogicalVolume(0),
    66     phantomPhysicalVolume(0)
    67 {
    68   // Messenger to change parameters of the geometry
     48#include "HadrontherapyMatrix.hh"
     49
     50/////////////////////////////////////////////////////////////////////////////
     51HadrontherapyDetectorConstruction::HadrontherapyDetectorConstruction(G4VPhysicalVolume* physicalTreatmentRoom)
     52  : motherPhys(physicalTreatmentRoom),
     53    detectorSD(0), detectorROGeometry(0), matrix(0),
     54    phantomPhysicalVolume(0),
     55    detectorLogicalVolume(0), detectorPhysicalVolume(0),
     56    phantomSizeX(20.*cm), phantomSizeY(20.*cm), phantomSizeZ(20.*cm), // Default half dimensions
     57    detectorSizeX(2.*cm), detectorSizeY(2.*cm), detectorSizeZ(2.*cm),
     58    phantomPosition(20.*cm, 0.*cm, 0.*cm),
     59    detectorToPhantomPosition(0.*cm,18.*cm,18.*cm)// Default displacement of the detector respect to the phantom
     60{
     61  // NOTE! that the HadrontherapyDetectorConstruction class
     62  // does NOT inherit from G4VUserDetectorConstruction G4 class
     63  // So the Construct() mandatory virtual method is inside another geometric class
     64  // (like the passiveProtonBeamLIne, ...)
     65
     66  // Messenger to change parameters of the phantom/detector geometry
    6967  detectorMessenger = new HadrontherapyDetectorMessenger(this);
    7068
    71   material = new HadrontherapyMaterial();
    72 
    73   // Phantom sizes
    74   phantomSizeX = 20.*mm;
    75   phantomSizeY = 20.*mm;
    76   phantomSizeZ = 20.*mm;
    77 
    78   // Number of the phantom voxels 
    79   numberOfVoxelsAlongX = 200;
    80   numberOfVoxelsAlongY = 200;
    81   numberOfVoxelsAlongZ = 200;
    82 }
    83 
     69  // Default detector voxels size
     70  // 200 slabs along the beam direction (X)
     71  sizeOfVoxelAlongX = 200 *um; 
     72  sizeOfVoxelAlongY = 2 * detectorSizeY;
     73  sizeOfVoxelAlongZ = 2 * detectorSizeZ;
     74
     75  // Calculate (and eventually set) detector position by displacement, phantom size and detector size
     76  SetDetectorPosition();
     77
     78  // Build phantom and associated detector
     79  ConstructPhantom();
     80  ConstructDetector();
     81  // Set number of the detector voxels along X Y and Z directions. 
     82  // This will construct also the sensitive detector, the ROGeometry
     83  // and the matrix where the energy deposited is collected!
     84  SetNumberOfVoxelBySize(sizeOfVoxelAlongX, sizeOfVoxelAlongY, sizeOfVoxelAlongZ);
     85}
     86
     87/////////////////////////////////////////////////////////////////////////////
    8488HadrontherapyDetectorConstruction::~HadrontherapyDetectorConstruction()
    8589{
    86   delete material;
    87   if (phantomROGeometry) delete phantomROGeometry; 
    88   delete detectorMessenger;
    89 }
    90 
    91 G4VPhysicalVolume* HadrontherapyDetectorConstruction::Construct()
     90    delete detectorROGeometry;// This should be safe in C++ even if the argument is a NULL pointer 
     91    delete matrix; 
     92    delete detectorMessenger;
     93}
     94
     95void HadrontherapyDetectorConstruction::ConstructPhantom()
     96{
     97  //----------------------------------------
     98  // Phantom:
     99  // A box used to approximate tissues
     100  //----------------------------------------
     101
     102    G4bool isotopes =  false;
     103    G4Material* waterNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_WATER", isotopes);
     104    phantom = new G4Box("Phantom",phantomSizeX, phantomSizeY, phantomSizeZ);
     105    phantomLogicalVolume = new G4LogicalVolume(phantom,
     106                                             waterNist,
     107                                             "phantomLog", 0, 0, 0);
     108 
     109    phantomPhysicalVolume = new G4PVPlacement(0,
     110                                            phantomPosition,
     111                                            "phantomPhys",
     112                                            phantomLogicalVolume,
     113                                            motherPhys,
     114                                            false,
     115                                            0);
     116
     117// Visualisation attributes of the phantom
     118    red = new G4VisAttributes(G4Colour(255/255., 0/255. ,0/255.));
     119    red -> SetVisibility(true);
     120    red -> SetForceSolid(true);
     121//red -> SetForceWireframe(true);
     122    phantomLogicalVolume -> SetVisAttributes(red);
     123}
     124
     125/////////////////////////////////////////////////////////////////////////////
     126void HadrontherapyDetectorConstruction::ConstructDetector()
     127{
     128  //-----------
     129  // Detector
     130  //-----------
     131    G4bool isotopes =  false;
     132    G4Material* waterNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_WATER", isotopes);
     133    detector = new G4Box("Detector",detectorSizeX,detectorSizeY,detectorSizeZ);
     134    detectorLogicalVolume = new G4LogicalVolume(detector,
     135                                                waterNist,
     136                                                "DetectorLog",
     137                                                0,0,0);
     138// Detector is attached by default to the phantom face directly exposed to the beam
     139    detectorPhysicalVolume = new G4PVPlacement(0,
     140                                             detectorPosition, // Setted by displacement
     141                                            "DetectorPhys",
     142                                             detectorLogicalVolume,
     143                                             phantomPhysicalVolume,
     144                                             false,0);
     145 
     146// Visualisation attributes of the detector
     147    skyBlue = new G4VisAttributes( G4Colour(135/255. , 206/255. ,  235/255. ));
     148    skyBlue -> SetVisibility(true);
     149    skyBlue -> SetForceSolid(true);
     150//skyBlue -> SetForceWireframe(true);
     151    detectorLogicalVolume -> SetVisAttributes(skyBlue);
     152 
     153}
     154/////////////////////////////////////////////////////////////////////////////
     155void  HadrontherapyDetectorConstruction::ConstructSensitiveDetector(G4ThreeVector detectorToWorldPosition)
    92156
    93   // Define the materials of the experimental set-up
    94   material -> DefineMaterials();
    95  
    96   // Define the geometry components
    97   ConstructBeamLine();
    98   ConstructPhantom();
    99  
    100   // Set the sensitive detector where the energy deposit is collected
    101   ConstructSensitiveDetector();
     157    // Install new Sensitive Detector and ROGeometry
     158    delete detectorROGeometry; // this should be safe in C++ also if we have a NULL pointer
     159
     160    // Sensitive Detector and ReadOut geometry definition
     161    G4SDManager* sensitiveDetectorManager = G4SDManager::GetSDMpointer();
     162
     163    G4String sensitiveDetectorName = "Detector";
     164    if (!detectorSD)
     165        {
     166            // The sensitive detector is instantiated
     167            detectorSD = new HadrontherapyDetectorSD(sensitiveDetectorName);
     168        }
     169    // The Read Out Geometry is instantiated
     170    G4String ROGeometryName = "DetectorROGeometry";
     171    detectorROGeometry = new HadrontherapyDetectorROGeometry(ROGeometryName,
     172                                                            detectorToWorldPosition,
     173                                                            detectorSizeX,
     174                                                            detectorSizeY,
     175                                                            detectorSizeZ,
     176                                                            numberOfVoxelsAlongX,
     177                                                            numberOfVoxelsAlongY,
     178                                                            numberOfVoxelsAlongZ);
     179
     180    G4cout << "Instantiating new Read Out Geometry \"" << ROGeometryName << "\""<< G4endl;
     181    // This will invoke Build() HadrontherapyDetectorROGeometry virtual method
     182    detectorROGeometry -> BuildROGeometry();
     183    // Attach ROGeometry to SDetector
     184    detectorSD -> SetROgeometry(detectorROGeometry);
     185    //sensitiveDetectorManager -> Activate(sensitiveDetectorName, true);
     186    if (!sensitiveDetectorManager -> FindSensitiveDetector(sensitiveDetectorName, false))
     187        {
     188            G4cout << "Registering new DetectorSD \"" << sensitiveDetectorName << "\""<< G4endl;
     189            // Register user SD
     190            sensitiveDetectorManager -> AddNewDetector(detectorSD);
     191            // Attach SD to detector logical volume
     192            detectorLogicalVolume -> SetSensitiveDetector(detectorSD);
     193        }
     194}
     195
     196/////////////////
     197// MESSENGERS //
     198////////////////
     199G4bool HadrontherapyDetectorConstruction::SetNumberOfVoxelBySize(G4double sizeX, G4double sizeY, G4double sizeZ)
     200{
     201    // Only change positive dimensions
     202    // XXX numberOfVoxels must be an integer, warn the user
     203
     204    if (sizeX > 0)
     205    {
     206        if (sizeX > 2*detectorSizeX)
     207        {
     208            G4cout << "WARNING: Voxel X size must be smaller or equal than that of detector X" << G4endl;
     209            return false;
     210        }
     211        // Round to the nearest integer
     212        numberOfVoxelsAlongX = lrint(2 * detectorSizeX / sizeX);
     213        sizeOfVoxelAlongX = (2 * detectorSizeX / numberOfVoxelsAlongX );
     214        if(sizeOfVoxelAlongX!=sizeX) G4cout << "Rounding " <<
     215                                                G4BestUnit(sizeX, "Length") << " to " <<
     216                                                G4BestUnit(sizeOfVoxelAlongX, "Length") << G4endl;
     217    }
     218
     219    if (sizeY > 0)
     220    {
     221        if (sizeY > 2*detectorSizeY)
     222        {
     223            G4cout << "WARNING: Voxel Y size must be smaller or equal than that of detector Y" << G4endl;
     224            return false;
     225        }
     226        numberOfVoxelsAlongY = lrint(2 * detectorSizeY / sizeY);
     227        sizeOfVoxelAlongY = (2 * detectorSizeY / numberOfVoxelsAlongY );
     228        if(sizeOfVoxelAlongY!=sizeY) G4cout << "Rounding " <<
     229                                                G4BestUnit(sizeY, "Length") << " to " <<
     230                                                G4BestUnit(sizeOfVoxelAlongY, "Length") << G4endl;
     231    }
     232    if (sizeZ > 0)
     233    {
     234        if (sizeZ > 2*detectorSizeZ)
     235        {
     236            G4cout << "WARNING: Voxel Z size must be smaller or equal than that of detector Z" << G4endl;
     237            return false;
     238        }
     239        numberOfVoxelsAlongZ = lrint(2 * detectorSizeZ / sizeZ);
     240        sizeOfVoxelAlongZ = (2 * detectorSizeZ / numberOfVoxelsAlongZ );
     241        if(sizeOfVoxelAlongZ!=sizeZ) G4cout << "Rounding " <<
     242                                                G4BestUnit(sizeZ, "Length") << " to " <<
     243                                                G4BestUnit(sizeOfVoxelAlongZ, "Length") << G4endl;
     244    }
     245
     246    G4cout << "The (X, Y, Z) sizes of the Voxels are: (" <<
     247                G4BestUnit(sizeOfVoxelAlongX, "Length")  << ", " <<
     248                G4BestUnit(sizeOfVoxelAlongY, "Length")  << ", " <<
     249                G4BestUnit(sizeOfVoxelAlongZ, "Length") << ')' << G4endl;
     250
     251    G4cout << "The number of Voxels along (X,Y,Z) is: (" <<
     252                numberOfVoxelsAlongX  << ", " <<
     253                numberOfVoxelsAlongY  << ", "  <<
     254                numberOfVoxelsAlongZ  << ')' << G4endl;
     255
     256    //  This will clear the existing matrix (together with data inside it)!
     257    matrix = HadrontherapyMatrix::getInstance(numberOfVoxelsAlongX,
     258                                              numberOfVoxelsAlongY,
     259                                              numberOfVoxelsAlongZ);
     260
     261    // Here construct the Sensitive Detector and Read Out Geometry
     262    ConstructSensitiveDetector(GetDetectorToWorldPosition());
     263    G4RunManager::GetRunManager() -> GeometryHasBeenModified();
     264    return true;
     265}
     266/////////////////////////////////////////////////////////////////////////////
     267G4bool HadrontherapyDetectorConstruction::SetDetectorSize(G4double sizeX, G4double sizeY, G4double sizeZ)
     268{
     269// Check that the detector stay inside the phantom
     270        if (sizeX > 0 && sizeX < sizeOfVoxelAlongX) {G4cout << "WARNING: Detector X size must be bigger than that of Voxel X" << G4endl; return false;}
     271        if (sizeY > 0 && sizeY < sizeOfVoxelAlongY) {G4cout << "WARNING: Detector Y size must be bigger than that of Voxel Y" << G4endl; return false;}
     272        if (sizeZ > 0 && sizeZ < sizeOfVoxelAlongZ) {G4cout << "WARNING: Detector Z size must be bigger than that of Voxel Z" << G4endl; return false;}
     273
     274        if (!IsInside(sizeX/2,
     275                      sizeY/2,
     276                      sizeZ/2,
     277                      phantomSizeX,
     278                      phantomSizeY,
     279                      phantomSizeZ,
     280                      detectorToPhantomPosition))
     281        {return false;}
     282// Negative or null values mean don't change it!
     283    if (sizeX > 0) {
     284                        detectorSizeX = sizeX/2;
     285                        detector -> SetXHalfLength(detectorSizeX);
     286                   }
     287
     288    if (sizeY > 0) {
     289                        detectorSizeY = sizeY/2;
     290                        detector -> SetYHalfLength(detectorSizeY);
     291                   }
     292
     293    if (sizeZ > 0) {
     294                        detectorSizeZ = sizeZ/2;
     295                        detector -> SetZHalfLength(detectorSizeZ);
     296                    }
     297
     298
     299    G4cout << "The (X, Y, Z) dimensions of the detector are : (" <<
     300                  G4BestUnit( detector -> GetXHalfLength()*2., "Length") << ", " <<
     301                  G4BestUnit( detector -> GetYHalfLength()*2., "Length") << ", " <<
     302                  G4BestUnit( detector -> GetZHalfLength()*2., "Length") << ')' << G4endl;
     303// Adjust detector position
     304    SetDetectorPosition();
     305// Adjust voxels number accordingly to new detector geometry
     306// Matrix will be re-instantiated!
     307// Voxels and ROGeometry must follow the detector!
     308    SetNumberOfVoxelBySize(sizeOfVoxelAlongX, sizeOfVoxelAlongY, sizeOfVoxelAlongZ);
     309    G4RunManager::GetRunManager() -> GeometryHasBeenModified();
     310    return true;
     311}
     312
     313/////////////////////////////////////////////////////////////////////////////
     314G4bool HadrontherapyDetectorConstruction::SetPhantomSize(G4double sizeX, G4double sizeY, G4double sizeZ)
     315{
     316
     317        if (!IsInside(detectorSizeX,
     318                                  detectorSizeY,
     319                                  detectorSizeZ,
     320                                  sizeX/2,//method parameters
     321                                  sizeY/2,
     322                                  sizeZ/2,
     323                                  detectorToPhantomPosition
     324                                  ))
     325        return false;
     326
     327// Only change positive dimensions
     328    if (sizeX > 0) {
     329                     phantomSizeX = sizeX/2;
     330                     phantom -> SetXHalfLength(phantomSizeX);
     331                   }
     332    if (sizeY > 0) {
     333                     phantomSizeY = sizeY/2;
     334                     phantom -> SetYHalfLength(phantomSizeY);
     335                   }
     336
     337    if (sizeZ > 0) {
     338                     phantomSizeZ = sizeZ/2;
     339                     phantom -> SetZHalfLength(phantomSizeZ);
     340                   }
    102341 
    103   return physicalTreatmentRoom;
    104 }
    105 
    106 void HadrontherapyDetectorConstruction::ConstructBeamLine()
    107 {
    108   G4Material* air = material -> GetMat("Air") ;
    109   G4Material* water = material -> GetMat("Water");
    110 
    111   // ---------------------
    112   // Treatment room - World volume
    113   //---------------------
    114 
    115   // Treatment room sizes
    116   const G4double worldX = 400.0 *cm;
    117   const G4double worldY = 400.0 *cm;
    118   const G4double worldZ = 400.0 *cm;
    119 
    120   G4Box* treatmentRoom = new G4Box("TreatmentRoom",worldX,worldY,worldZ);
    121 
    122   G4LogicalVolume* logicTreatmentRoom = new G4LogicalVolume(treatmentRoom,
    123                                                             air,
    124                                                             "logicTreatmentRoom",
    125                                                             0,0,0);
    126 
    127 
    128 
    129   physicalTreatmentRoom = new G4PVPlacement(0,
    130                                             G4ThreeVector(),
    131                                             "physicalTreatmentRoom",
    132                                             logicTreatmentRoom,
    133                                             0,false,0);
    134 
    135   G4double maxStepTreatmentRoom = 0.1 *mm;
    136   logicTreatmentRoom -> SetUserLimits(new G4UserLimits(maxStepTreatmentRoom));
    137 
    138   // The treatment room is invisible in the Visualisation
    139   logicTreatmentRoom -> SetVisAttributes (G4VisAttributes::Invisible);
    140  
    141   beamLine = new HadrontherapyBeamLine(physicalTreatmentRoom);
    142   beamLine -> HadrontherapyBeamLineSupport();
    143   beamLine -> HadrontherapyBeamScatteringFoils();
    144   beamLine -> HadrontherapyBeamCollimators();
    145   beamLine -> HadrontherapyBeamMonitoring();
    146   beamLine -> HadrontherapyBeamNozzle();
    147   beamLine -> HadrontherapyBeamFinalCollimator();
    148 
    149   modulator = new HadrontherapyModulator();
    150   modulator -> BuildModulator(physicalTreatmentRoom);
    151 
    152   // Patient - Mother volume of the phantom
    153   G4Box* patient = new G4Box("patient",20 *cm, 20 *cm, 20 *cm);
    154 
    155   G4LogicalVolume* patientLogicalVolume = new G4LogicalVolume(patient,
    156                                                               water,
    157                                                               "patientLog", 0, 0, 0);
    158 
    159   patientPhysicalVolume = new G4PVPlacement(0,G4ThreeVector(0., 0., 0.),
    160                                             "patientPhys",
    161                                             patientLogicalVolume,
    162                                             physicalTreatmentRoom,
    163                                             false,0);
    164  
    165   // Visualisation attributes of the patient
    166   G4VisAttributes * redWire = new G4VisAttributes(G4Colour(1. ,0. ,0.));
    167   redWire -> SetVisibility(true);
    168   redWire -> SetForceWireframe(true);
    169   patientLogicalVolume -> SetVisAttributes(redWire);
    170 }
    171 
    172 void HadrontherapyDetectorConstruction::ConstructPhantom()
    173 {
    174   G4Colour  lightBlue   (0.0, 0.0, .75);
    175 
    176   G4Material* water = material -> GetMat("Water");
    177 
    178   //ComputeVoxelSize();
    179 
    180   //----------------------
    181   // Water phantom 
    182   //----------------------
    183   G4Box* phantom = new G4Box("Phantom",phantomSizeX,phantomSizeY,phantomSizeZ);
    184 
    185   phantomLogicalVolume = new G4LogicalVolume(phantom,
    186                                              water,
    187                                              "PhantomLog",
    188                                              0,0,0);
    189 
    190   // Fixing the max step allowed in the phantom
    191   G4double maxStep = 0.01 *mm;
    192   phantomLogicalVolume -> SetUserLimits(new G4UserLimits(maxStep));
    193 
    194   G4double phantomXtranslation = -180.*mm;
    195   phantomPhysicalVolume = new G4PVPlacement(0,
    196                                             G4ThreeVector(phantomXtranslation, 0.0 *mm, 0.0 *mm),
    197                                             "PhantomPhys",
    198                                             phantomLogicalVolume,
    199                                             patientPhysicalVolume,
    200                                             false,0);
    201  
    202   // Visualisation attributes of the phantom
    203   G4VisAttributes* simpleBoxVisAttributes = new G4VisAttributes(lightBlue);
    204   simpleBoxVisAttributes -> SetVisibility(true);
    205   simpleBoxVisAttributes -> SetForceSolid(true);
    206   phantomLogicalVolume -> SetVisAttributes(simpleBoxVisAttributes);
    207 
    208   // **************
    209   // Cut per Region
    210   // **************
    211  
    212   // A smaller cut is fixed in the phantom to calculate the energy deposit with the
    213   // required accuracy
    214   G4Region* aRegion = new G4Region("PhantomLog");
    215   phantomLogicalVolume -> SetRegion(aRegion);
    216   aRegion -> AddRootLogicalVolume(phantomLogicalVolume);
    217 }
    218 
    219 void  HadrontherapyDetectorConstruction::ConstructSensitiveDetector()
    220 
    221   // Sensitive Detector and ReadOut geometry definition
    222   G4SDManager* sensitiveDetectorManager = G4SDManager::GetSDMpointer();
    223 
    224   G4String sensitiveDetectorName = "Phantom";
    225 
    226   if(!phantomSD)
    227     {
    228       // The sensitive detector is instantiated
    229       phantomSD = new HadrontherapyPhantomSD(sensitiveDetectorName);
    230      
    231       // The Read Out Geometry is instantiated
    232       G4String ROGeometryName = "PhantomROGeometry";
    233       phantomROGeometry = new HadrontherapyPhantomROGeometry(ROGeometryName,
    234                                                              phantomSizeX,
    235                                                              phantomSizeY,
    236                                                              phantomSizeZ,
    237                                                              numberOfVoxelsAlongX,
    238                                                              numberOfVoxelsAlongY,
    239                                                              numberOfVoxelsAlongZ);
    240       phantomROGeometry -> BuildROGeometry();
    241       phantomSD -> SetROgeometry(phantomROGeometry);
    242       sensitiveDetectorManager -> AddNewDetector(phantomSD);
    243       phantomLogicalVolume -> SetSensitiveDetector(phantomSD);
    244     }
    245 }
    246 
    247 void HadrontherapyDetectorConstruction::SetModulatorAngle(G4double value)
    248 
    249   modulator -> SetModulatorAngle(value);
    250   G4RunManager::GetRunManager() -> GeometryHasBeenModified();
    251 }
    252 
    253 void HadrontherapyDetectorConstruction::SetRangeShifterXPosition(G4double value)
    254 {
    255   beamLine -> SetRangeShifterXPosition(value);
    256   G4RunManager::GetRunManager() -> GeometryHasBeenModified();
    257 }
    258 
    259 void HadrontherapyDetectorConstruction::SetRangeShifterXSize(G4double value)
    260 {
    261   beamLine -> SetRangeShifterXSize(value);
    262   G4RunManager::GetRunManager() -> GeometryHasBeenModified();
    263 }
    264 
    265 void HadrontherapyDetectorConstruction::SetFirstScatteringFoilSize(G4double value)
    266 {
    267   beamLine -> SetFirstScatteringFoilXSize(value); 
    268   G4RunManager::GetRunManager() -> GeometryHasBeenModified();
    269 }
    270 
    271 void HadrontherapyDetectorConstruction::SetSecondScatteringFoilSize(G4double value)
    272 {
    273   beamLine -> SetSecondScatteringFoilXSize(value);
    274   G4RunManager::GetRunManager() -> GeometryHasBeenModified();
    275 }
    276 
    277 void HadrontherapyDetectorConstruction::SetOuterRadiusStopper(G4double value)
    278 {
    279   beamLine -> SetOuterRadiusStopper(value);
    280   G4RunManager::GetRunManager() -> GeometryHasBeenModified();
    281 }
    282 
    283 void HadrontherapyDetectorConstruction::SetInnerRadiusFinalCollimator(G4double value)
    284 {
    285   beamLine -> SetInnerRadiusFinalCollimator(value);
    286   G4RunManager::GetRunManager() -> GeometryHasBeenModified();
    287 }
    288 
    289 void HadrontherapyDetectorConstruction::SetRSMaterial(G4String materialChoice)
    290 {
    291   beamLine -> SetRSMaterial(materialChoice);
    292 }
    293 
    294 
    295 
     342
     343    G4cout << "The (X, Y, Z) dimensions of the phantom are : (" <<
     344                  G4BestUnit( phantom -> GetXHalfLength()*2., "Length") << ", " <<
     345                  G4BestUnit( phantom -> GetYHalfLength()*2., "Length") << ", " <<
     346                  G4BestUnit( phantom -> GetZHalfLength()*2., "Length") << ')' << G4endl;
     347//G4cout << '\n' << "Coordinate volume: " << phantomPhysicalVolume -> GetTranslation() << G4endl;
     348// Adjust detector position inside phantom
     349    SetDetectorPosition();
     350
     351    ConstructSensitiveDetector(GetDetectorToWorldPosition());
     352    G4RunManager::GetRunManager() -> GeometryHasBeenModified();
     353    return true;
     354}
     355/////////////////////////////////////////////////////////////////////////////
     356G4bool HadrontherapyDetectorConstruction::SetPhantomPosition(G4ThreeVector displacement)
     357{
     358// Set Phantom position respect to the World
     359// TODO check for overlap!
     360    phantomPosition = displacement;
     361    if (phantomPhysicalVolume)
     362        {
     363            phantomPhysicalVolume -> SetTranslation(phantomPosition);
     364            G4cout << "Displacement between Phantom and World is: ";
     365            G4cout << "DX= "<< G4BestUnit(phantomPosition.getX(),"Length") << ", " <<
     366                      "DY= "<< G4BestUnit(phantomPosition.getY(),"Length") << ", " <<
     367                      "DZ= "<< G4BestUnit(phantomPosition.getZ(),"Length") << G4endl;
     368
     369// Redraw ROGeometry!
     370            ConstructSensitiveDetector(GetDetectorToWorldPosition());
     371            G4RunManager::GetRunManager() -> GeometryHasBeenModified();
     372        }
     373    return true;
     374}
     375
     376/////////////////////////////////////////////////////////////////////////////
     377G4bool HadrontherapyDetectorConstruction::SetDetectorToPhantomPosition(G4ThreeVector displacement)
     378{
     379// Ignore negative values
     380    if (displacement[0] < 0.) displacement[0] = detectorToPhantomPosition[0];
     381    if (displacement[1] < 0.) displacement[1] = detectorToPhantomPosition[1];
     382    if (displacement[2] < 0.) displacement[2] = detectorToPhantomPosition[2];
     383
     384    if (!IsInside(detectorSizeX,
     385                  detectorSizeY,
     386                  detectorSizeZ,
     387                  phantomSizeX,
     388                  phantomSizeY,
     389                  phantomSizeZ,
     390                  displacement // method parameter!
     391                  ))
     392    {return false;}
     393    detectorToPhantomPosition = displacement;
     394
     395// Adjust detector position inside phantom
     396    SetDetectorPosition();
     397
     398    ConstructSensitiveDetector(GetDetectorToWorldPosition());
     399    G4RunManager::GetRunManager() -> GeometryHasBeenModified();
     400    return true;
     401}
  • trunk/examples/advanced/hadrontherapy/src/HadrontherapyDetectorMessenger.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyDetectorMessenger.cc; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the INFN, Catania, Italy
    36 // (b) INFN Section of Genova, Genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// $Id: HadrontherapyDetectorMessenger.cc;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
     28
     29
    4030#include "HadrontherapyDetectorMessenger.hh"
    4131#include "HadrontherapyDetectorConstruction.hh"
     
    4333#include "G4UIcmdWithADoubleAndUnit.hh"
    4434#include "G4UIcmdWithAString.hh"
     35#include "G4UIcmdWith3VectorAndUnit.hh"
    4536
    46 HadrontherapyDetectorMessenger::HadrontherapyDetectorMessenger(
    47                                                                HadrontherapyDetectorConstruction* detector)
     37/////////////////////////////////////////////////////////////////////////////
     38HadrontherapyDetectorMessenger::HadrontherapyDetectorMessenger(HadrontherapyDetectorConstruction* detector)
    4839  :hadrontherapyDetector(detector)
    49 {
    50   modulatorDir = new G4UIdirectory("/modulator/");
    51   modulatorDir -> SetGuidance("Command to rotate the modulator wheel");
    52  
    53   beamLineDir = new G4UIdirectory("/beamLine/");
    54   beamLineDir -> SetGuidance("set specification of range shifter"); 
     40{
     41    // Change Phantom size
     42    changeThePhantomDir = new G4UIdirectory("/changePhantom/");
     43    changeThePhantomDir -> SetGuidance("Command to change the Phantom Size/position");
     44    changeThePhantomSizeCmd = new G4UIcmdWith3VectorAndUnit("/changePhantom/size", this);
     45    changeThePhantomSizeCmd -> SetGuidance("Insert sizes X Y and Z"
     46                                           "\n   0 or negative values mean <<Don't change it!>>");
     47    changeThePhantomSizeCmd -> SetParameterName("PhantomSizeAlongX",
     48                                                "PhantomSizeAlongY",
     49                                                "PhantomSizeAlongZ", false);
     50    changeThePhantomSizeCmd -> SetDefaultUnit("mm");
     51    changeThePhantomSizeCmd -> SetUnitCandidates("um mm cm");
     52    changeThePhantomSizeCmd -> AvailableForStates(G4State_Idle);
    5553
    56   rangeShifterDir = new G4UIdirectory("/beamLine/RangeShifter/");
    57   rangeShifterDir -> SetGuidance("set specification of range shifter"); 
    5854
    59   firstScatteringFoilDir = new G4UIdirectory("/beamLine/ScatteringFoil1/");
    60   firstScatteringFoilDir -> SetGuidance("set specification of first scattering foil"); 
    61  
    62   secondScatteringFoilDir = new G4UIdirectory("/beamLine/ScatteringFoil2/");
    63   secondScatteringFoilDir -> SetGuidance("set specification of second scattering foil"); 
    64  
    65   rangeStopperDir = new G4UIdirectory("/beamLine/Stopper/");
    66   rangeStopperDir -> SetGuidance("set specification of stopper"); 
     55    // Change Phantom position
     56    changeThePhantomPositionCmd = new G4UIcmdWith3VectorAndUnit("/changePhantom/position", this);
     57    changeThePhantomPositionCmd -> SetGuidance("Insert X Y and Z dimensions for the position of the center of the Phantom"
     58                                                " respect to that of the \"World\"");
     59    changeThePhantomPositionCmd -> SetParameterName("PositionAlongX",
     60                                                    "PositionAlongY",
     61                                                    "PositionAlongZ", false);
     62    changeThePhantomPositionCmd -> SetDefaultUnit("mm");
     63    changeThePhantomPositionCmd -> SetUnitCandidates("mm cm m");
     64    changeThePhantomPositionCmd -> AvailableForStates(G4State_Idle);
    6765
    68   finalCollimatorDir = new G4UIdirectory("/beamLine/FinalCollimator/");
    69   finalCollimatorDir -> SetGuidance("set specification of final collimator"); 
    7066
    71   modulatorAngleCmd = new G4UIcmdWithADoubleAndUnit("/modulator/angle",this);
    72   modulatorAngleCmd -> SetGuidance("Set Modulator Angle");
    73   modulatorAngleCmd -> SetParameterName("Size",false);
    74   modulatorAngleCmd -> SetRange("Size>=0.");
    75   modulatorAngleCmd -> SetUnitCategory("Angle"); 
    76   modulatorAngleCmd -> AvailableForStates(G4State_Idle);
    77  
    78   rangeShifterMatCmd = new G4UIcmdWithAString("/beamLine/RangeShifter/RSMat",this);
    79   rangeShifterMatCmd -> SetGuidance("Set material of range shifter");
    80   rangeShifterMatCmd -> SetParameterName("choice",false);
    81   rangeShifterMatCmd -> AvailableForStates(G4State_Idle);
    82  
    83   rangeShifterXSizeCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/RangeShifter/thickness",this);
    84   rangeShifterXSizeCmd -> SetGuidance("Set half of the thickness of range shifter along X axis");
    85   rangeShifterXSizeCmd -> SetParameterName("Size",false);
    86   rangeShifterXSizeCmd -> SetDefaultUnit("mm"); 
    87   rangeShifterXSizeCmd -> SetUnitCandidates("mm cm m"); 
    88   rangeShifterXSizeCmd -> AvailableForStates(G4State_Idle);
    89  
    90   rangeShifterXPositionCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/RangeShifter/position",this);
    91   rangeShifterXPositionCmd -> SetGuidance("Set position of range shifter");
    92   rangeShifterXPositionCmd -> SetParameterName("Size",false);
    93   rangeShifterXPositionCmd -> SetDefaultUnit("mm"); 
    94   rangeShifterXPositionCmd -> SetUnitCandidates("mm cm m"); 
    95   rangeShifterXPositionCmd -> AvailableForStates(G4State_Idle);
    96  
    97   firstScatteringFoilXSizeCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/ScatteringFoil1/thickness",this);
    98   firstScatteringFoilXSizeCmd -> SetGuidance("Set hlaf thickness of first scattering foil");
    99   firstScatteringFoilXSizeCmd -> SetParameterName("Size",false);
    100   firstScatteringFoilXSizeCmd -> SetDefaultUnit("mm"); 
    101   firstScatteringFoilXSizeCmd -> SetUnitCandidates("mm cm m"); 
    102   firstScatteringFoilXSizeCmd -> AvailableForStates(G4State_Idle);
    103  
    104   secondScatteringFoilXSizeCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/ScatteringFoil2/thickness",this);
    105   secondScatteringFoilXSizeCmd -> SetGuidance("Set half thickness of second scattering foil");
    106   secondScatteringFoilXSizeCmd -> SetParameterName("Size",false);
    107   secondScatteringFoilXSizeCmd -> SetDefaultUnit("mm"); 
    108   secondScatteringFoilXSizeCmd -> SetUnitCandidates("mm cm m"); 
    109   secondScatteringFoilXSizeCmd -> AvailableForStates(G4State_Idle);
    110  
    111   outerRadiusStopperCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/Stopper/outRadius",this);
    112   outerRadiusStopperCmd -> SetGuidance("Set size of outer radius");
    113   outerRadiusStopperCmd -> SetParameterName("Size",false);
    114   outerRadiusStopperCmd -> SetDefaultUnit("mm"); 
    115   outerRadiusStopperCmd -> SetUnitCandidates("mm cm m"); 
    116   outerRadiusStopperCmd -> AvailableForStates(G4State_Idle);
    117  
    118   innerRadiusFinalCollimatorCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/FinalCollimator/halfInnerRad",this);
    119   innerRadiusFinalCollimatorCmd -> SetGuidance("Set size of inner radius ( max 21.5 mm)");
    120   innerRadiusFinalCollimatorCmd -> SetParameterName("Size",false);
    121   innerRadiusFinalCollimatorCmd -> SetDefaultUnit("mm"); 
    122   innerRadiusFinalCollimatorCmd -> SetUnitCandidates("mm cm m"); 
    123   innerRadiusFinalCollimatorCmd -> AvailableForStates(G4State_Idle);
     67    //  Change detector size
     68    changeTheDetectorDir = new G4UIdirectory("/changeDetector/");
     69    changeTheDetectorDir -> SetGuidance("Command to change the Detector's Size/position/Voxels");
     70   
     71    changeTheDetectorSizeCmd = new G4UIcmdWith3VectorAndUnit("/changeDetector/size",this);
     72    changeTheDetectorSizeCmd -> SetGuidance("Insert sizes for X Y and Z dimensions of the Detector"
     73                                            "\n   0 or negative values mean <<Don't change it>>");
     74    changeTheDetectorSizeCmd -> SetParameterName("DetectorSizeAlongX", "DetectorSizeAlongY", "DetectorSizeAlongZ", false);
     75    changeTheDetectorSizeCmd -> SetDefaultUnit("mm");
     76    changeTheDetectorSizeCmd -> SetUnitCandidates("um mm cm");
     77    changeTheDetectorSizeCmd -> AvailableForStates(G4State_Idle);
     78
     79    //  Change the detector to phantom displacement
     80    changeTheDetectorToPhantomPositionCmd = new G4UIcmdWith3VectorAndUnit("/changeDetector/displacement",this);
     81    changeTheDetectorToPhantomPositionCmd -> SetGuidance("Insert X Y and Z displacements between Detector and Phantom"
     82                                                         "\nNegative values mean <<Don't change it!>>");
     83    changeTheDetectorToPhantomPositionCmd -> SetParameterName("DisplacementAlongX",
     84                                                              "DisplacementAlongY",
     85                                                              "DisplacementAlongZ", false);
     86    changeTheDetectorToPhantomPositionCmd -> SetDefaultUnit("mm");
     87    changeTheDetectorToPhantomPositionCmd -> SetUnitCandidates("um mm cm");
     88    changeTheDetectorToPhantomPositionCmd -> AvailableForStates(G4State_Idle);
     89   
     90    // Change voxels by its size
     91    changeTheDetectorVoxelCmd = new G4UIcmdWith3VectorAndUnit("/changeDetector/voxelSize",this);
     92    changeTheDetectorVoxelCmd -> SetGuidance("Insert Voxel sizes for X Y and Z dimensions"
     93                                             "\n   0 or negative values mean <<Don't change it!>>");
     94    changeTheDetectorVoxelCmd -> SetParameterName("VoxelSizeAlongX", "VoxelSizeAlongY", "VoxelSizeAlongZ", false);
     95    changeTheDetectorVoxelCmd -> SetDefaultUnit("mm");
     96    changeTheDetectorVoxelCmd -> SetUnitCandidates("um mm cm");
     97    changeTheDetectorVoxelCmd -> AvailableForStates(G4State_Idle);
     98   }
     99
     100/////////////////////////////////////////////////////////////////////////////
     101HadrontherapyDetectorMessenger::~HadrontherapyDetectorMessenger()
     102{
     103    delete changeThePhantomDir;
     104    delete changeThePhantomSizeCmd;
     105    delete changeThePhantomPositionCmd;
     106    delete changeTheDetectorDir;
     107    delete changeTheDetectorSizeCmd;
     108    delete changeTheDetectorToPhantomPositionCmd;
     109    delete changeTheDetectorVoxelCmd;
    124110}
    125111
    126 HadrontherapyDetectorMessenger::~HadrontherapyDetectorMessenger()
    127 {
    128   delete innerRadiusFinalCollimatorCmd; 
    129   delete outerRadiusStopperCmd; 
    130   delete secondScatteringFoilXSizeCmd;
    131   delete firstScatteringFoilXSizeCmd;
    132   delete rangeShifterXPositionCmd;
    133   delete rangeShifterXSizeCmd;
    134   delete rangeShifterMatCmd;
    135   delete modulatorAngleCmd;
    136   delete finalCollimatorDir;
    137   delete rangeStopperDir;
    138   delete secondScatteringFoilDir;
    139   delete firstScatteringFoilDir;
    140   delete rangeShifterDir; 
    141   delete beamLineDir;
    142   delete modulatorDir;   
     112/////////////////////////////////////////////////////////////////////////////
     113void HadrontherapyDetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
     114{
     115       
     116  if( command == changeThePhantomSizeCmd)
     117    {
     118        G4ThreeVector size = changeThePhantomSizeCmd -> GetNew3VectorValue(newValue);
     119        hadrontherapyDetector -> SetPhantomSize(size.getX(),size.getY(),size.getZ());
     120    }
     121  else if (command == changeThePhantomPositionCmd )
     122  {
     123         G4ThreeVector size = changeThePhantomPositionCmd -> GetNew3VectorValue(newValue);
     124         hadrontherapyDetector -> SetPhantomPosition(size);
     125  }
     126  else if (command == changeTheDetectorSizeCmd)
     127  {
     128        G4ThreeVector size = changeTheDetectorSizeCmd  -> GetNew3VectorValue(newValue);
     129        hadrontherapyDetector -> SetDetectorSize(size.getX(),size.getY(),size.getZ());
     130  }
     131  else if (command == changeTheDetectorToPhantomPositionCmd)
     132  {
     133        G4ThreeVector size = changeTheDetectorToPhantomPositionCmd-> GetNew3VectorValue(newValue);
     134        hadrontherapyDetector -> SetDetectorToPhantomPosition(size);
     135  }
     136  else if (command == changeTheDetectorVoxelCmd)
     137  {
     138        G4ThreeVector size = changeTheDetectorVoxelCmd  -> GetNew3VectorValue(newValue);
     139        hadrontherapyDetector -> SetNumberOfVoxelBySize(size.getX(),size.getY(),size.getZ());
     140  }
    143141}
    144 
    145 void HadrontherapyDetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
    146 {
    147   if( command == modulatorAngleCmd )
    148     { hadrontherapyDetector -> SetModulatorAngle
    149            (modulatorAngleCmd -> GetNewDoubleValue(newValue));}
    150 
    151   if( command == rangeShifterMatCmd )
    152     { hadrontherapyDetector -> SetRSMaterial(newValue);}
    153 
    154   if( command == rangeShifterXSizeCmd )
    155     { hadrontherapyDetector -> SetRangeShifterXSize
    156             (rangeShifterXSizeCmd -> GetNewDoubleValue(newValue));}
    157 
    158   if( command == rangeShifterXPositionCmd )
    159     { hadrontherapyDetector -> SetRangeShifterXPosition
    160                   (rangeShifterXPositionCmd -> GetNewDoubleValue(newValue));}
    161 
    162   if( command == firstScatteringFoilXSizeCmd )
    163     { hadrontherapyDetector -> SetFirstScatteringFoilSize
    164                   (firstScatteringFoilXSizeCmd -> GetNewDoubleValue(newValue));}
    165 
    166   if( command == secondScatteringFoilXSizeCmd )
    167     { hadrontherapyDetector -> SetSecondScatteringFoilSize
    168                   (secondScatteringFoilXSizeCmd -> GetNewDoubleValue(newValue));}
    169 
    170   if( command == outerRadiusStopperCmd )
    171     { hadrontherapyDetector -> SetOuterRadiusStopper(
    172                     outerRadiusStopperCmd -> GetNewDoubleValue(newValue));}
    173 
    174   if( command == innerRadiusFinalCollimatorCmd )
    175     { hadrontherapyDetector -> SetInnerRadiusFinalCollimator
    176                   (innerRadiusFinalCollimatorCmd -> GetNewDoubleValue(newValue));}
    177 }
    178 
  • trunk/examples/advanced/hadrontherapy/src/HadrontherapyEventAction.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyEventAction.cc; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, G. Candiano, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // --------------------------------------------------------------
     26// $Id: HadrontherapyEventAction.cc;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
     28
    4029#include "G4Event.hh"
    4130#include "G4EventManager.hh"
     
    4837#include "G4VVisManager.hh"
    4938#include "HadrontherapyEventAction.hh"
    50 #include "HadrontherapyPhantomHit.hh"
    51 #include "HadrontherapyPhantomSD.hh"
     39#include "HadrontherapyDetectorHit.hh"
     40#include "HadrontherapyDetectorSD.hh"
    5241#include "HadrontherapyDetectorConstruction.hh"
    5342#include "HadrontherapyMatrix.hh"
     43#include "HadrontherapyEventActionMessenger.hh"
    5444
    55 HadrontherapyEventAction::HadrontherapyEventAction(HadrontherapyMatrix* matrixPointer) :
    56   drawFlag("all" )
     45/////////////////////////////////////////////////////////////////////////////
     46HadrontherapyEventAction::HadrontherapyEventAction() :
     47  drawFlag("all" ),printModulo(1000), pointerEventMessenger(0)
    5748{
    5849  hitsCollectionID = -1;
    59   matrix = matrixPointer;
     50  pointerEventMessenger = new HadrontherapyEventActionMessenger(this);
    6051}
    6152
     53/////////////////////////////////////////////////////////////////////////////
    6254HadrontherapyEventAction::~HadrontherapyEventAction()
    6355{
     56 delete pointerEventMessenger;
    6457}
    6558
    66 void HadrontherapyEventAction::BeginOfEventAction(const G4Event* )
    67 {
    68  G4SDManager* pSDManager = G4SDManager::GetSDMpointer();
    69  if(hitsCollectionID == -1)
    70         hitsCollectionID = pSDManager -> GetCollectionID("HadrontherapyPhantomHitsCollection");
     59/////////////////////////////////////////////////////////////////////////////
     60void HadrontherapyEventAction::BeginOfEventAction(const G4Event* evt)
     61{
     62  G4int evtNb = evt->GetEventID();
     63 
     64  //printing survey
     65  if (evtNb%printModulo == 0)
     66    G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
     67   
     68  G4SDManager* pSDManager = G4SDManager::GetSDMpointer();
     69  if(hitsCollectionID == -1)
     70    hitsCollectionID = pSDManager -> GetCollectionID("HadrontherapyDetectorHitsCollection");
    7171}
    7272
     73/////////////////////////////////////////////////////////////////////////////
    7374void HadrontherapyEventAction::EndOfEventAction(const G4Event* evt)
    7475
    7576  if(hitsCollectionID < 0)
    76     return;
    77 
     77  return;
    7878  G4HCofThisEvent* HCE = evt -> GetHCofThisEvent();
    79   HadrontherapyPhantomHitsCollection* CHC = NULL;
    8079 
    8180  if(HCE)
    82     CHC = (HadrontherapyPhantomHitsCollection*)(HCE -> GetHC(hitsCollectionID));
    83  
    84   if(CHC)
    85     {
    86       if(matrix)
    87         {
    88           // Fill the matrix with the information: voxel and associated energy deposit
    89           // in the phantom at the end of the event
     81  {
     82    HadrontherapyDetectorHitsCollection* CHC = (HadrontherapyDetectorHitsCollection*)(HCE -> GetHC(hitsCollectionID));
     83    if(CHC)
     84     {
     85           matrix = HadrontherapyMatrix::getInstance(); 
     86       if(matrix)
     87          {
     88              // Fill the matrix with the information: voxel and associated energy deposit
     89          // in the detector at the end of the event
    9090
    9191          G4int HitCount = CHC -> entries();
     
    9898              matrix -> Fill(i, j, k, energyDeposit/MeV);             
    9999            }
    100         }
     100          }
    101101    }
    102 
     102  }
    103103  // Extract the trajectories and draw them in the visualisation
    104104
  • trunk/examples/advanced/hadrontherapy/src/HadrontherapyMatrix.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyPhantomSD.cc; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// $Id: HadrontherapyMatrix.cc;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy//
    4028
    4129#include "HadrontherapyMatrix.hh"
     
    4432#include <fstream>
    4533
    46 HadrontherapyMatrix::HadrontherapyMatrix()
     34HadrontherapyMatrix* HadrontherapyMatrix::instance = NULL;
     35// Static method that only return a pointer to the matrix object
     36HadrontherapyMatrix* HadrontherapyMatrix::getInstance()
     37{
     38  return instance;
     39}
     40// This STATIC method delete (!) the old matrix and rewrite a new object returning a pointer to it
     41HadrontherapyMatrix* HadrontherapyMatrix::getInstance(G4int voxelX, G4int voxelY, G4int voxelZ) 
     42{
     43    if (instance) delete instance;
     44    instance = new HadrontherapyMatrix(voxelX, voxelY, voxelZ);
     45    instance -> Initialize();   
     46    return instance;
     47}
     48
     49HadrontherapyMatrix::HadrontherapyMatrix(G4int voxelX, G4int voxelY, G4int voxelZ):
     50    matrix(0)
    4751
    48   // Number of the voxels of the phantom
    49   numberVoxelX = 200;
    50   numberVoxelY = 200;
    51   numberVoxelZ = 200;
    52  
    53   // Create the matrix
     52// Number of the voxels of the phantom
     53// For Y = Z = 1 the phantom is divided in slices (and not in voxels)
     54// orthogonal to the beam axis
     55  numberVoxelX = voxelX;
     56  numberVoxelY = voxelY;
     57  numberVoxelZ = voxelZ;
     58  // Create the dose matrix
    5459  matrix = new G4double[numberVoxelX*numberVoxelY*numberVoxelZ];
     60  if (matrix) G4cout << "Matrix: Memory space to store physical dose into " << 
     61                        numberVoxelX*numberVoxelY*numberVoxelZ <<
     62                        " voxels has been allocated " << G4endl;
     63  else G4Exception("Can't allocate memory to store physical dose!");
    5564}
    5665
    5766HadrontherapyMatrix::~HadrontherapyMatrix()
    5867{
    59   delete[] matrix;
     68    delete[] matrix;
     69}
     70
     71void HadrontherapyMatrix::flush()
     72{
     73        if(matrix)
     74        for(int i=0; i<numberVoxelX*numberVoxelY*numberVoxelZ; i++)
     75        {
     76          matrix[i] = 0;
     77        }
    6078}
    6179void HadrontherapyMatrix::Initialize()
    6280{
    63   // Initialise the elemnts of the matrix to zero
    64 
     81// Initialise the elements of the matrix to zero
    6582  for(G4int i = 0; i < numberVoxelX; i++)
    6683    {
    6784      for(G4int j = 0; j < numberVoxelY; j++)
    68         {
    69           for(G4int k = 0; k < numberVoxelZ; k++)
     85           {
     86              for(G4int k = 0; k < numberVoxelZ; k++)
    7087
    71             matrix[(i*numberVoxelY+j)*numberVoxelZ+k] = 0.;
    72         }
     88              matrix[Index(i,j,k)] = 0.;
     89           }
    7390    }
    7491}
     
    7895{
    7996  if (matrix)
    80     matrix[(i*numberVoxelY+j)*numberVoxelZ+k] += energyDeposit;
     97    matrix[Index(i,j,k)] += energyDeposit;
    8198 
    82   // Store the energy deposit in the matrix elemnt corresponding
    83   // to the phantom voxel 
     99  // Store the energy deposit in the matrix element corresponding
     100  // to the phantom voxel  i, j, k
    84101}
    85102
     
    95112  if (matrix)
    96113    { 
    97         for(G4int l = 0; l < numberVoxelZ; l++)
    98           {
    99             k = l;
    100            
    101             for(G4int m = 0; m < numberVoxelY; m++)
    102               {
    103                 j = m * numberVoxelZ + k;
     114      std::ofstream ofs;       
     115      ofs.open("DoseDistribution.out");
     116     
     117      for(G4int l = 0; l < numberVoxelZ; l++)
     118        {
     119          k = l;
     120         
     121          for(G4int m = 0; m < numberVoxelY; m++)
     122            {
     123              j = m * numberVoxelZ + k;
    104124               
    105125                for(G4int n = 0; n <  numberVoxelX; n++)
     
    108128                    if(matrix[i] != 0)
    109129                      {
    110                                        
    111 #ifdef G4ANALYSIS_USE   
     130                        ofs << n << '\t' << m << '\t' <<
     131                          k << '\t' << matrix[i] << G4endl;
     132                       
     133#ifdef ANALYSIS_USE
    112134                        HadrontherapyAnalysisManager* analysis =
    113                           HadrontherapyAnalysisManager::getInstance();
     135                        HadrontherapyAnalysisManager::getInstance();
    114136                        analysis -> FillEnergyDeposit(n, m, k, matrix[i]);
    115137                        analysis -> BraggPeak(n, matrix[i]);
    116138#endif
    117139                      }
    118                   }       
     140}       
    119141              }
    120142          }
  • trunk/examples/advanced/hadrontherapy/src/HadrontherapyModulator.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyModulator.cc; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// $Id: HadrontherapyModulator.cc;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    4028
    4129#include "G4Material.hh"
     
    5139#include "G4VisAttributes.hh"
    5240#include "G4Colour.hh"
    53 #include "HadrontherapyMaterial.hh"
    5441#include "HadrontherapyModulator.hh"
    55 #include "HadrontherapyMaterial.hh"
    5642#include "G4Transform3D.hh"
    5743#include "G4ios.hh"
    5844#include <fstream>
    5945#include "G4RunManager.hh"
     46#include "G4NistManager.hh"
    6047
    6148HadrontherapyModulator::HadrontherapyModulator():physiMotherMod(0),
     
    141128  rm -> rotateY(phi);
    142129}
    143 
     130/////////////////////////////////////////////////////////////////////////////
    144131HadrontherapyModulator::~HadrontherapyModulator()
    145132{
    146133  delete rm;
    147134}
    148 
     135/////////////////////////////////////////////////////////////////////////////
    149136void HadrontherapyModulator::BuildModulator(G4VPhysicalVolume* motherVolume)
    150137{
    151 
    152 
    153   //Materials used for the modulator wheel
    154   HadrontherapyMaterial* material = new HadrontherapyMaterial();
    155 
    156   G4Material* Mod0Mater = material -> GetMat("Air");
    157   G4Material* ModMater = material -> GetMat("Air");
    158   delete material;
    159 
     138  G4bool isotopes = false;
     139  G4Material* airNist =  G4NistManager::Instance()->FindOrBuildMaterial("G4_AIR", isotopes);
     140
     141  G4Material* Mod0Mater = airNist;
     142  G4Material* ModMater = airNist;
     143 
    160144  G4double innerRadiusOfTheTube = 2.5 *cm;
    161145  G4double outerRadiusOfTheTube = 9.5 *cm;
     
    163147
    164148  // Mother of the modulator wheel 
    165 
    166   G4ThreeVector positionMotherMod = G4ThreeVector(-2260.50 *mm, 30 *mm, 50 *mm);
     149  G4ThreeVector positionMotherMod = G4ThreeVector(-1960.50 *mm, 30 *mm, 50 *mm);
    167150 
    168151  G4Box* solidMotherMod = new G4Box("MotherMod", 12 *cm, 12 *cm, 12 *cm);
    169152 
    170153  G4LogicalVolume * logicMotherMod = new G4LogicalVolume(solidMotherMod, Mod0Mater,"MotherMod",0,0,0);
    171 
    172  
    173154
    174155  physiMotherMod = new G4PVPlacement(rm,positionMotherMod,  "MotherMod",
     
    200181  logicMod0 = new G4LogicalVolume(solidMod0, Mod0Mater, "Mod0",0,0,0);
    201182 
    202  
    203183  physiMod0 = new G4PVPlacement(G4Transform3D(rm2, positionMod0),
    204184                                logicMod0,   
     
    212192  // First modulator sclice
    213193  //----------------------------------------------------------
    214  
    215194 
    216195  G4double startAngleOfTheTube1 = 54.267*deg;
  • trunk/examples/advanced/hadrontherapy/src/HadrontherapyParticles.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyParticles.cc; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// $Id: HadrontherapyParticles.cc;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
     28
    4029#include "HadrontherapyParticles.hh"
    4130#include "G4ParticleDefinition.hh"
  • trunk/examples/advanced/hadrontherapy/src/HadrontherapyPhysicsList.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyPhysicsList.cc,v 1.0
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
    40 
    41 #include "globals.hh"
    42 #include "G4ProcessManager.hh"
    43 #include "G4Region.hh"
    44 #include "G4RegionStore.hh"
    45 #include "G4ParticleDefinition.hh"
    46 #include "G4ParticleTypes.hh"
    47 #include "G4ParticleTable.hh"
     26// HadrontherapyPhysicsList.cc
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
     28
     29// This class provides all the physic models that can be activated inside Hadrontherapy;
     30// Each model can be setted via macro commands;
     31// Inside Hadrontherapy the models can be activate with three different complementar methods:
     32//
     33// 1. Use of the *Packages*.
     34//    Packages (that are contained inside the
     35//    Geant4 distribution at $G4INSTALL/source/physics_lists/lists) provide a full set
     36//    of models (both electromagnetic and hadronic).
     37//    The User can use this method simply add the line /physic/addPackage <nameOfPackage>
     38//    in his/her macro file. No other action is required.
     39//    For Hadrontherapy applications we suggest the use of the QGSP_BIC package
     40//    for proton beams. The same can be used
     41//    also for ligth ion beam.
     42//    Example of use of package can be found in the packageQGSP_BIC.mac file.
     43//
     44// 2. Use of the *Physic Lists*.
     45//    Physic lists are also already ready to use inside the Geant4 distribution
     46//    ($G4INSTALL/source/physics_lists/builders). To use them the simple
     47//    /physic/addPhysics <nameOfPhysicList> command must be used in the macro.
     48//    In Hadrontherapy we provide physics list to activate Electromagnetic,
     49//    Hadronic elastic and Hadronic inelastic models.
     50//
     51//    For Hadrontherapy we suggest the use of:
     52//
     53//    /physic/addPhysic/emstandard_option3 (electromagnetic model)
     54//    /physic/addPhysic/QElastic (hadronic elastic model)
     55//    /physic/addPhysic/binary (hadronic inelastic models for proton and neutrons)
     56//    /physic/addPhysic/binary_ion (hadronic inelastic models for ions)
     57//
     58//    Example of the use of physics lists can be found in the macro files included in the
     59//    'macro' folder .
     60//
     61// 3. Use of a *local* physics. In this case the models are implemented in local files
     62//    contained in the Hadrontherapy folder. The use of local physic is recommended
     63//    to more expert Users.
     64//    We provide as local, only the LocalStandardICRU73EmPhysic.cc (an Elecromagnetic
     65//    implementation containing the new ICRU73 data table for ions stopping powers)
     66//    and the LocalIonIonInelasticPhysic.cc (physic list to use for the ion-ion interaction
     67//    case)
     68//    The *local* physics can be activated with the same /physic/addPhysic <nameOfPhysic> command;
     69//
     70//    While Packages approch must be used exclusively, Physics List and Local physics can
     71//    be activated, if necessary, contemporaneously in the same simulation run.
     72//
     73//    AT MOMENT, IF ACCURATE RESULTS ARE NEDED, WE STRONGLY RECOMMEND THE USE OF THE MACROS:
     74//    proton_therapy.mac: use of the built-in Geant4 physics list for proton beams)
     75//    ion_therapy.mac   : use of mixed combination of native Geant4 physic lists
     76//                        and local physic for ion-ion enelastic processes)
     77
    4878#include "HadrontherapyPhysicsList.hh"
    4979#include "HadrontherapyPhysicsListMessenger.hh"
    50 #include "HadrontherapyParticles.hh"
    51 #include "Decay.hh"
    52 #include "EMPhotonStandard.hh"
    53 #include "EMPhotonEPDL.hh"
    54 #include "EMPhotonPenelope.hh"
    55 #include "EMElectronStandard.hh"
    56 #include "EMElectronEEDL.hh"
    57 #include "EMElectronPenelope.hh"
    58 #include "EMPositronStandard.hh"
    59 #include "EMPositronPenelope.hh"
    60 #include "EMMuonStandard.hh"
    61 #include "EMHadronIonLowEICRU49.hh"
    62 #include "EMHadronIonLowEZiegler1977.hh"
    63 #include "EMHadronIonLowEZiegler1985.hh"
    64 #include "EMHadronIonStandard.hh"
    65 #include "HIProtonNeutronPrecompound.hh"
    66 #include "HIProtonNeutronBertini.hh"
    67 #include "HIProtonNeutronBinary.hh"
    68 #include "HIProtonNeutronLEP.hh"
    69 #include "HIProtonNeutronPrecompoundGEM.hh"
    70 #include "HIProtonNeutronPrecompoundFermi.hh"
    71 #include "HIProtonNeutronPrecompoundGEMFermi.hh"
    72 #include "HIPionBertini.hh"
    73 #include "HIPionLEP.hh"
    74 #include "HIIonLEP.hh"
    75 #include "HEHadronIonLElastic.hh"
    76 #include "HEHadronIonBertiniElastic.hh"
    77 #include "HEHadronIonQElastic.hh"
    78 #include "HEHadronIonUElastic.hh"
    79 #include "HRMuonMinusCapture.hh"
    80 
    81 
    82 HadrontherapyPhysicsList::HadrontherapyPhysicsList(): G4VModularPhysicsList(),
    83                                                       decayIsRegistered(false),
    84                                                       emElectronIsRegistered(false),
    85                                                       emPositronIsRegistered(false),
    86                                                       emPhotonIsRegistered(false),
    87                                                       emIonIsRegistered(false),
    88                                                       emMuonIsRegistered(false),
    89                                                       hadrElasticHadronIonIsRegistered(false),
    90                                                       hadrInelasticPionIsRegistered(false),
    91                                                       hadrInelasticIonIsRegistered(false),
    92                                                       hadrInelasticProtonNeutronIsRegistered(false),
    93                                                       hadrAtRestMuonIsRegistered(false)
    94 {
    95   // The secondary production threshold is set to 10. mm
    96   // for all the particles in all the experimental set-up
    97   // The phantom is defined as a Geant4 Region. Here the cut is fixed to 0.001 mm
    98   defaultCutValue = 0.01 * mm;
    99 
    100   // Messenger: it is possible to activate physics processes and models interactively
    101   messenger = new HadrontherapyPhysicsListMessenger(this);
     80#include "HadrontherapyStepMax.hh"
     81#include "G4PhysListFactory.hh"
     82#include "G4VPhysicsConstructor.hh"
     83
     84// Local physic directly implemented in the Hadronthrapy directory
     85#include "LocalIonIonInelasticPhysic.hh"             // Physic dedicated to the ion-ion inelastic processes
     86#include "LocalINCLIonIonInelasticPhysic.hh"         // Physic dedicated to the ion-ion inelastic processes using INCL/ABLA
     87
     88// Physic lists (contained inside the Geant4 distribution)
     89#include "G4EmStandardPhysics_option3.hh"
     90#include "G4EmLivermorePhysics.hh"
     91#include "G4EmPenelopePhysics.hh"
     92#include "G4DecayPhysics.hh"
     93#include "G4HadronElasticPhysics.hh"
     94#include "G4HadronDElasticPhysics.hh"
     95#include "G4HadronHElasticPhysics.hh"
     96#include "G4HadronQElasticPhysics.hh"
     97#include "G4HadronInelasticQBBC.hh"
     98#include "G4IonBinaryCascadePhysics.hh"
     99#include "G4Decay.hh"
     100
     101#include "G4LossTableManager.hh"
     102#include "G4UnitsTable.hh"
     103#include "G4ProcessManager.hh"
     104
     105#include "G4IonFluctuations.hh"
     106#include "G4IonParametrisedLossModel.hh"
     107#include "G4EmProcessOptions.hh"
     108
     109#include "G4RadioactiveDecayPhysics.hh"
     110
     111/////////////////////////////////////////////////////////////////////////////
     112HadrontherapyPhysicsList::HadrontherapyPhysicsList() : G4VModularPhysicsList()
     113{
     114  G4LossTableManager::Instance();
     115  defaultCutValue = 1.*mm;
     116  cutForGamma     = defaultCutValue;
     117  cutForElectron  = defaultCutValue;
     118  cutForPositron  = defaultCutValue;
     119
     120  helIsRegisted  = false;
     121  bicIsRegisted  = false;
     122  biciIsRegisted = false;
     123  locIonIonInelasticIsRegistered = false;
     124  radioactiveDecayIsRegisted = false;
     125
     126  stepMaxProcess  = 0;
     127
     128  pMessenger = new HadrontherapyPhysicsListMessenger(this);
    102129
    103130  SetVerboseLevel(1);
    104131
    105   // Register all the particles involved in the experimental set-up
    106   RegisterPhysics( new HadrontherapyParticles("particles") );
    107 }
    108 
     132  // EM physics
     133  emPhysicsList = new G4EmStandardPhysics_option3(1);
     134  emName = G4String("emstandard_opt3");
     135
     136  // Deacy physics and all particles
     137  decPhysicsList = new G4DecayPhysics();
     138}
     139
     140/////////////////////////////////////////////////////////////////////////////
    109141HadrontherapyPhysicsList::~HadrontherapyPhysicsList()
    110 {
    111   delete messenger;
    112 }
    113 
     142{
     143  delete pMessenger;
     144  delete emPhysicsList;
     145  delete decPhysicsList;
     146  for(size_t i=0; i<hadronPhys.size(); i++) {delete hadronPhys[i];}
     147}
     148
     149/////////////////////////////////////////////////////////////////////////////
     150void HadrontherapyPhysicsList::AddPackage(const G4String& name)
     151{
     152  G4PhysListFactory factory;
     153  G4VModularPhysicsList* phys =factory.GetReferencePhysList(name);
     154  G4int i=0;
     155  const G4VPhysicsConstructor* elem= phys->GetPhysics(i);
     156  G4VPhysicsConstructor* tmp = const_cast<G4VPhysicsConstructor*> (elem);
     157  while (elem !=0)
     158        {
     159          RegisterPhysics(tmp);
     160          elem= phys->GetPhysics(++i) ;
     161          tmp = const_cast<G4VPhysicsConstructor*> (elem);
     162        }
     163}
     164
     165/////////////////////////////////////////////////////////////////////////////
     166void HadrontherapyPhysicsList::ConstructParticle()
     167{
     168  decPhysicsList->ConstructParticle();
     169}
     170
     171/////////////////////////////////////////////////////////////////////////////
     172void HadrontherapyPhysicsList::ConstructProcess()
     173{
     174  // transportation
     175  //
     176  AddTransportation();
     177
     178  // electromagnetic physics list
     179  //
     180  emPhysicsList->ConstructProcess();
     181  em_config.AddModels();
     182
     183  // decay physics list
     184  //
     185  decPhysicsList->ConstructProcess();
     186
     187  // hadronic physics lists
     188  for(size_t i=0; i<hadronPhys.size(); i++) {
     189    hadronPhys[i]->ConstructProcess();
     190  }
     191
     192  // step limitation (as a full process)
     193  //
     194  AddStepMax();
     195}
     196
     197/////////////////////////////////////////////////////////////////////////////
    114198void HadrontherapyPhysicsList::AddPhysicsList(const G4String& name)
    115199{
    116   G4cout << "Adding PhysicsList component " << name << G4endl;
    117  
    118 
    119   // ****************
    120   // *** A. DECAY ***
    121   // ****************
    122 
    123 
    124   if (name == "Decay")
    125     {
    126       if (decayIsRegistered)
    127         {
    128           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    129                  << " cannot be registered ---- decay List already existing"
    130                  << G4endl;
    131         }
    132       else
    133         {
    134           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    135                  << " is registered" << G4endl;
    136           RegisterPhysics( new Decay(name) );
    137           decayIsRegistered = true;
    138         }
    139     }
    140 
    141 
    142   // ***************************************
    143   // *** B. ELECTROMAGNETIC INTERACTIONS ***
    144   // ***************************************
    145 
    146 
    147   // ***************
    148   // *** Photons ***
    149   // ***************
    150  
    151   // *** Option I: Standard
    152 
    153   if (name == "EM-Photon-Standard")
    154     {
    155       if (emPhotonIsRegistered)
    156         {
    157           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    158                  << " cannot be registered ---- photon List already existing"
    159                  << G4endl;
    160         }
    161       else
    162         {
    163           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    164                  << " is registered" << G4endl;
    165           RegisterPhysics( new EMPhotonStandard(name) );
    166           emPhotonIsRegistered = true;
    167         }
    168     }
    169 
    170 
    171   // *** Option II: Low Energy based on the Livermore libraries
    172 
    173   if (name == "EM-Photon-EPDL")
    174     {
    175       if (emPhotonIsRegistered)
    176         {
    177           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    178                  << " cannot be registered ---- photon List already existing"
    179                  << G4endl;
    180         }
    181       else
    182         {
    183           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    184                  << " is registered" << G4endl;
    185           RegisterPhysics( new EMPhotonEPDL(name) );
    186           emPhotonIsRegistered = true;
    187         }
    188     }
    189 
    190 
    191   // *** Option III: Low Energy Penelope
    192 
    193   if (name == "EM-Photon-Penelope")
    194     {
    195       if (emPhotonIsRegistered)
    196         {
    197           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    198                  << " cannot be registered ---- photon List already existing"
    199                  << G4endl;
    200         }
    201       else
    202         {
    203           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    204                  << " is registered" << G4endl;
    205           RegisterPhysics( new EMPhotonPenelope(name) );
    206           emPhotonIsRegistered = true;
    207         }
    208     }
    209 
    210 
    211   // *****************
    212   // *** Electrons ***
    213   // *****************
    214  
    215   // *** Option I: Standard
    216 
    217   if (name == "EM-Electron-Standard")
    218     {
    219       if (emElectronIsRegistered)
    220         {
    221           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    222                  << " cannot be registered ---- electron List already existing"
    223                  << G4endl;
    224         }
    225       else
    226         {
    227           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    228                  << " is registered" << G4endl;
    229           RegisterPhysics( new EMElectronStandard(name) );       
    230           emElectronIsRegistered = true;
    231         }
    232     }
    233 
    234 
    235   // *** Option II: Low Energy based on the Livermore libraries
    236 
    237   if (name == "EM-Electron-EEDL")
    238     {
    239       if (emElectronIsRegistered)
    240         {
    241           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    242                  << " cannot be registered ---- electron List already existing"                 
    243                  << G4endl;
    244         }
    245       else
    246         {
    247           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    248                  << " is registered" << G4endl;
    249           RegisterPhysics( new EMElectronEEDL(name) );
    250           emElectronIsRegistered = true;
    251         }
    252     }
    253 
    254 
    255   // *** Option III: Low Energy Penelope
    256 
    257   if (name == "EM-Electron-Penelope")
    258     {
    259       if (emElectronIsRegistered)
    260         {
    261           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    262                  << " cannot be registered ---- electron List already existing"                 
    263                  << G4endl;
    264         }
    265       else
    266         {
    267           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    268                  << " is registered" << G4endl;
    269           RegisterPhysics( new EMElectronPenelope(name) );
    270           emElectronIsRegistered = true;
    271         }
    272     }
    273 
    274 
    275   // *****************
    276   // *** Positrons ***
    277   // *****************
    278 
    279   // *** Option I: Standard
    280   if (name == "EM-Positron-Standard")
    281     {
    282       if (emPositronIsRegistered)
    283         {
    284           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    285                  << " cannot be registered ---- positron List already existing"                 
    286                  << G4endl;
    287         }
    288       else
    289         {
    290           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    291                  << " is registered" << G4endl;
    292           RegisterPhysics( new EMPositronStandard(name) );
    293           emPositronIsRegistered = true;
    294         }
    295     }
    296 
    297 
    298   // *** Option II: Low Energy Penelope
    299 
    300   if (name == "EM-Positron-Penelope")
    301     {
    302       if (emPositronIsRegistered)
    303         {
    304           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    305                  << " cannot be registered ---- positron List already existing"   
    306                  << G4endl;
    307         }
    308       else
    309         {
    310           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    311                  << " is registered" << G4endl;
    312           RegisterPhysics( new EMPositronPenelope(name) );
    313           emPositronIsRegistered = true;
    314         }
    315     }
    316  
    317 
    318   // ************************
    319   // *** Hadrons and Ions ***
    320   // ************************
    321 
    322   // *** Option I: Low Energy with ICRU49 stopping power parametrisation
    323  
    324   if (name == "EM-HadronIon-LowE")
    325     {
    326       if (emIonIsRegistered)
    327         {
    328           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    329                  << " cannot be registered ---- proton List already existing"
    330                  << G4endl;
    331         }
    332       else
    333         {
    334           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    335                  << " is registered" << G4endl;
    336           RegisterPhysics( new EMHadronIonLowEICRU49(name) );
    337           emIonIsRegistered = true;
    338         }
    339     }
    340 
    341 
    342   // *** Option II: Low Energy with Ziegler 1977 stopping power parametrisation
    343 
    344   if (name == "EM-HadronIon-LowEZiegler1977")
    345     {
    346       if (emIonIsRegistered)
    347         {
    348           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    349                  << " cannot be registered ---- proton List already existing"
    350                  << G4endl;
    351         }
    352       else
    353         {
    354           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    355                  << " is registered" << G4endl;
    356           RegisterPhysics( new EMHadronIonLowEZiegler1977(name) );
    357           emIonIsRegistered = true;
    358         }
    359     }
    360 
    361 
    362   // *** Option III: Low Energy with Ziegler 1985 stopping power parametrisation
    363 
    364   if (name == "EM-HadronIon-LowEZiegler1985")
    365     {
    366       if (emIonIsRegistered)
    367         {
    368           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    369                  << " cannot be registered ---- proton List already existing"
    370                  << G4endl;
    371         }
    372       else
    373         {
    374           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    375                  << " is registered" << G4endl;
    376           RegisterPhysics( new EMHadronIonLowEZiegler1985(name) );
    377           emIonIsRegistered = true;
    378         }
    379     }
    380 
    381 
    382   // *** Option IV: Standard
    383 
    384   if (name == "EM-HadronIon-Standard")
    385     {
    386       if (emIonIsRegistered)
    387         {
    388           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    389                  << " cannot be registered ---- ion List already existing"
    390                  << G4endl;
    391         }
    392       else
    393         {
    394           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    395                  << " is registered" << G4endl;
    396           RegisterPhysics( new EMHadronIonStandard(name) );
    397           emIonIsRegistered = true;
    398         }
    399     }
    400 
    401 
    402   // *************
    403   // *** Muons ***
    404   // *************
    405 
    406   // *** Option I: Standard
    407 
    408   if (name == "EM-Muon-Standard")
    409     {
    410       if (emMuonIsRegistered)
    411         {
    412           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    413                  << " cannot be registered ---- decay List already existing"
    414                  << G4endl;
    415         }
    416       else
    417         {
    418           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    419                  << " is registered" << G4endl;
    420           RegisterPhysics( new EMMuonStandard(name) );
    421           emMuonIsRegistered = true;
    422         }
    423     }
    424 
    425 
    426   // ********************************
    427   // *** C. HADRONIC INTERACTIONS ***
    428   // ********************************
    429 
    430 
    431   // ******************************
    432   // *** C.1. ELASTIC PROCESSES ***
    433   // ******************************
    434 
    435 
    436   // ************************
    437   // *** Hadrons and Ions ***
    438   // ************************
    439 
    440   // *** Option I: GHEISHA like LEP model
    441 
    442   if (name == "HadronicEl-HadronIon-LElastic")
    443     {
    444       if (hadrElasticHadronIonIsRegistered)
    445         {
    446           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    447                  << " cannot be registered ---- hadronic Elastic Scattering List already existing"
    448                  << G4endl;
    449         }
    450       else
    451         {
    452           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    453                  << " is registered" << G4endl;
    454           RegisterPhysics( new HEHadronIonLElastic(name) );
    455           hadrElasticHadronIonIsRegistered = true;
    456         }
    457     }
    458  
    459 
    460   // *** Option II: Bertini model
    461 
    462   if (name == "HadronicEl-HadronIon-Bert")
    463     {
    464       if (hadrElasticHadronIonIsRegistered)
    465         {
    466           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    467                  << " cannot be registered ---- hadronic Elastic Scattering List already existing"
    468                  << G4endl;
    469         }
    470       else
    471         {
    472           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    473                  << " is registered" << G4endl;
    474           RegisterPhysics( new HEHadronIonBertiniElastic(name) );
    475           hadrElasticHadronIonIsRegistered = true;
    476         }
    477     }
    478 
    479 
    480   // *** Option III: Process G4QElastic
    481 
    482   if (name == "HadronicEl-HadronIon-QElastic")
    483     {
    484       if (hadrElasticHadronIonIsRegistered)
    485         {
    486           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    487                  << " cannot be registered ---- hadronic Elastic Scattering List already existing"
    488                  << G4endl;
    489         }
    490       else
    491         {
    492           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    493                  << " is registered" << G4endl;
    494           RegisterPhysics( new HEHadronIonQElastic(name) );
    495           hadrElasticHadronIonIsRegistered = true;
    496         }
    497     }
    498 
    499 
    500   // *** Option III: Process G4UHadronElasticProcess
    501 
    502   if (name == "HadronicEl-HadronIon-UElastic")
    503     {
    504      if (hadrElasticHadronIonIsRegistered)
    505         {
    506           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    507                  << " cannot be registered ---- hadronic Elastic Scattering List already existing"
    508                  << G4endl;
    509         }
    510      else
    511         {
    512           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    513                  << " is registered" << G4endl;
    514           RegisterPhysics( new HEHadronIonUElastic(name) );
    515           hadrElasticHadronIonIsRegistered = true;
    516         }
    517     }
    518    
    519    
    520   // ********************************
    521   // *** C.2. INELASTIC PROCESSES ***
    522   // ********************************
    523 
    524 
    525   // *************
    526   // *** Pions ***
    527   // *************
    528 
    529   // *** Option I: Bertini model
    530 
    531   if (name == "HadronicInel-Pion-Bertini")
    532     {
    533       if (hadrInelasticPionIsRegistered)
    534         {
    535           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    536                  << " cannot be registered ---- decay List already existing"
    537                  << G4endl;
    538         }
    539       else
    540         {
    541           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    542                  << " is registered" << G4endl;
    543           RegisterPhysics( new HIPionBertini(name) );
    544           hadrInelasticPionIsRegistered = true;
    545         }
    546     }
    547 
    548 
    549   // *** Option II: GHEISHA like LEP model
    550 
    551   if (name == "HadronicInel-Pion-LEP")
    552     {
    553       if (hadrInelasticPionIsRegistered)
    554         {
    555           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    556                  << " cannot be registered ---- decay List already existing"
    557                  << G4endl;
    558         }
    559       else
    560         {
    561           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    562                  << " is registered" << G4endl;
    563           RegisterPhysics( new HIPionLEP(name) );
    564           hadrInelasticPionIsRegistered = true;
    565         }
    566     }
    567 
    568 
    569   // ************
    570   // *** Ions ***
    571   // ************
    572 
    573   // *** Option I: GHEISHA like LEP model
    574 
    575   if (name == "HadronicInel-Ion-LEP")
    576     {
    577       if (hadrInelasticIonIsRegistered)
    578         {
    579           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    580                  << " cannot be registered ---- decay List already existing"
    581                  << G4endl;
    582         }
    583       else
    584         {
    585           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    586                  << " is registered" << G4endl;
    587           RegisterPhysics( new HIIonLEP(name) );
    588           hadrInelasticIonIsRegistered = true;
    589         }
    590     }
    591 
    592 
    593   // *************************
    594   // *** Protons, Neutrons ***
    595   // *************************
    596 
    597   // *** Option I: GHEISHA like LEP model
    598 
    599   if (name == "HadronicInel-ProtonNeutron-LEP")
    600     {
    601       if (hadrInelasticProtonNeutronIsRegistered)
    602         {
    603           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    604                  << " cannot be registered ---- decay List already existing"
    605                  << G4endl;
    606         }
    607       else
    608         {
    609           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    610                  << " is registered" << G4endl;
    611           RegisterPhysics( new HIProtonNeutronLEP(name) );
    612           hadrInelasticProtonNeutronIsRegistered = true;
    613         }
    614     }
    615 
    616 
    617   // *** Option II: Bertini Cascade Model
    618 
    619   if (name == "HadronicInel-ProtonNeutron-Bert")
    620     {
    621       if (hadrInelasticProtonNeutronIsRegistered)
    622         {
    623           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    624                  << " cannot be registered ---- decay List already existing"
    625                  << G4endl;
    626         }
    627       else
    628         {
    629           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    630                  << " is registered" << G4endl;
    631           RegisterPhysics( new HIProtonNeutronBertini(name) );
    632           hadrInelasticProtonNeutronIsRegistered = true;
    633         }
    634     }
    635 
    636 
    637   // *** Option III: Binary Cascade Model
    638 
    639   if (name == "HadronicInel-ProtonNeutron-Bin")
    640     {
    641       if (hadrInelasticProtonNeutronIsRegistered)
    642         {
    643           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    644                  << " cannot be registered ---- decay List already existing"
    645                  << G4endl;
    646         }
    647       else
    648         {
    649           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    650                  << " is registered" << G4endl;
    651           RegisterPhysics( new HIProtonNeutronBinary(name) );
    652           hadrInelasticProtonNeutronIsRegistered = true;
    653         }
    654     }
    655 
    656 
    657   // *** Option IV: Precompound Model combined with Default Evaporation
    658 
    659   if (name == "HadronicInel-ProtonNeutron-Prec")
    660     {
    661       if (hadrInelasticProtonNeutronIsRegistered)
    662         {
    663           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    664                  << " cannot be registered ---- decay List already existing"
    665                  << G4endl;
    666         }
    667       else
    668         {
    669           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    670                  << " is registered" << G4endl;
    671           RegisterPhysics( new HIProtonNeutronPrecompound(name) );
    672           hadrInelasticProtonNeutronIsRegistered = true;
    673         }
    674     }
    675 
    676 
    677   // *** Option V: Precompound Model combined with GEM Evaporation
    678 
    679   if (name == "HadronicInel-ProtonNeutron-PrecGEM")
    680     {
    681       if (hadrInelasticProtonNeutronIsRegistered)
    682         {
    683           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    684                  << " cannot be registered ---- decay List already existing"
    685                  << G4endl;
    686         }
    687       else
    688         {
    689           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    690                  << " is registered" << G4endl;
    691           RegisterPhysics( new HIProtonNeutronPrecompoundGEM(name) );
    692           hadrInelasticProtonNeutronIsRegistered = true;
    693         }
    694     }
    695 
    696 
    697   // *** Option VI: Precompound Model combined with default Evaporation
    698   //                and Fermi Break-up model
    699 
    700   if (name == "HadronicInel-ProtonNeutron-PrecFermi")
    701     {
    702       if (hadrInelasticProtonNeutronIsRegistered)
    703         {
    704           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    705                  << " cannot be registered ---- decay List already existing"
    706                  << G4endl;
    707         }
    708       else
    709         {
    710           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    711                  << " is registered" << G4endl;
    712           RegisterPhysics( new HIProtonNeutronPrecompoundFermi(name) );
    713           hadrInelasticProtonNeutronIsRegistered = true;
    714         }
    715     }
    716 
    717 
    718   // *** Option VII: Precompound Model combined with GEM Evaporation
    719   //                 and Fermi Break-up model
    720 
    721   if (name == "HadronicInel-ProtonNeutron-PrecGEMFermi")
    722     {
    723       if (hadrInelasticProtonNeutronIsRegistered)
    724         {
    725           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    726                  << " cannot be registered ---- decay List already existing"
    727                  << G4endl;
    728         }
    729       else
    730         {
    731           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    732                  << " is registered" << G4endl;
    733           RegisterPhysics( new HIProtonNeutronPrecompoundGEMFermi(name) );
    734           hadrInelasticProtonNeutronIsRegistered = true;
    735         }
    736     }   
    737 
    738 
    739   // ******************************
    740   // *** C.3. AT-REST PROCESSES ***
    741   // ******************************
    742 
    743 
    744   // **************
    745   // *** Muons- ***
    746   // **************
    747 
    748   // *** Option I: Muon Minus Capture at Rest
    749 
    750   if (name == "HadronicAtRest-MuonMinus-Capture")
    751     {
    752       if (hadrAtRestMuonIsRegistered)
    753         {
    754           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name 
    755                  << " cannot be registered ---- decay List already existing"
    756                  << G4endl;
    757         }
    758       else
    759         {
    760           G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
    761                  << " is registered" << G4endl;
    762           RegisterPhysics( new HRMuonMinusCapture(name) );
    763           hadrAtRestMuonIsRegistered = true;
    764         }
    765     }
    766 
    767 }
    768 
     200
     201  if (verboseLevel>1) {
     202    G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
     203  }
     204  if (name == emName) return;
     205
     206  /////////////////////////////////////////////////////////////////////////////
     207  //   ELECTROMAGNETIC MODELS
     208  /////////////////////////////////////////////////////////////////////////////
     209
     210  if (name == "standard_opt3") {
     211    emName = name;
     212    delete emPhysicsList;
     213    emPhysicsList = new G4EmStandardPhysics_option3();
     214    G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmStandardPhysics_option3" << G4endl;
     215
     216  } else if (name == "LowE_Livermore") {
     217    emName = name;
     218    delete emPhysicsList;
     219    emPhysicsList = new G4EmLivermorePhysics();
     220    G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmLivermorePhysics" << G4endl;
     221
     222  } else if (name == "LowE_Penelope") {
     223    emName = name;
     224    delete emPhysicsList;
     225    emPhysicsList = new G4EmPenelopePhysics();
     226    G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmLivermorePhysics" << G4endl;
     227
     228    /////////////////////////////////////////////////////////////////////////////
     229    //   HADRONIC MODELS
     230    /////////////////////////////////////////////////////////////////////////////
     231  } else if (name == "elastic" && !helIsRegisted) {
     232    G4cout << "THE FOLLOWING HADRONIC ELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4HadronElasticPhysics()" << G4endl;
     233    hadronPhys.push_back( new G4HadronElasticPhysics());
     234    helIsRegisted = true;
     235
     236  } else if (name == "DElastic" && !helIsRegisted) {
     237    hadronPhys.push_back( new G4HadronDElasticPhysics());
     238    helIsRegisted = true;
     239
     240  } else if (name == "HElastic" && !helIsRegisted) {
     241    hadronPhys.push_back( new G4HadronHElasticPhysics());
     242    helIsRegisted = true;
     243
     244  } else if (name == "QElastic" && !helIsRegisted) {
     245    hadronPhys.push_back( new G4HadronQElasticPhysics());
     246    helIsRegisted = true;
     247
     248  } else if (name == "binary" && !bicIsRegisted) {
     249    hadronPhys.push_back(new G4HadronInelasticQBBC());
     250    bicIsRegisted = true;
     251    G4cout << "THE FOLLOWING HADRONIC INELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4HadronInelasticQBBC()" << G4endl;
     252
     253  } else if (name == "binary_ion" && !biciIsRegisted) {
     254    hadronPhys.push_back(new G4IonBinaryCascadePhysics());
     255    biciIsRegisted = true;
     256
     257  } else if (name == "local_ion_ion_inelastic" && !locIonIonInelasticIsRegistered) {
     258    hadronPhys.push_back(new LocalIonIonInelasticPhysic());
     259    locIonIonInelasticIsRegistered = true;
     260
     261  } else if (name == "local_incl_ion_ion_inelastic" && !locIonIonInelasticIsRegistered) {
     262    hadronPhys.push_back(new LocalINCLIonIonInelasticPhysic());
     263    locIonIonInelasticIsRegistered = true;
     264
     265  } else if (name == "radioactive_decay" && !radioactiveDecayIsRegisted ) {
     266    hadronPhys.push_back(new G4RadioactiveDecayPhysics());
     267    radioactiveDecayIsRegisted = true;
     268
     269  } else {
     270
     271    G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
     272           << " is not defined"
     273           << G4endl;
     274  }
     275}
     276
     277/////////////////////////////////////////////////////////////////////////////
     278void HadrontherapyPhysicsList::AddStepMax()
     279{
     280  // Step limitation seen as a process
     281  stepMaxProcess = new HadrontherapyStepMax();
     282
     283  theParticleIterator->reset();
     284  while ((*theParticleIterator)()){
     285    G4ParticleDefinition* particle = theParticleIterator->value();
     286    G4ProcessManager* pmanager = particle->GetProcessManager();
     287
     288    if (stepMaxProcess->IsApplicable(*particle) && pmanager)
     289      {
     290        pmanager ->AddDiscreteProcess(stepMaxProcess);
     291      }
     292  }
     293}
     294
     295/////////////////////////////////////////////////////////////////////////////
    769296void HadrontherapyPhysicsList::SetCuts()
    770 
    771   // Set the threshold of production equal to the defaultCutValue
    772   // in the experimental set-up
    773   G4VUserPhysicsList::SetCutsWithDefault();
    774      
    775   G4double lowlimit=250*eV;
    776   G4ProductionCutsTable::GetProductionCutsTable() ->SetEnergyRange(lowlimit, 100.*GeV);
    777   // Definition of a smaller threshold of production in the phantom region
    778   // where high accuracy is required in the energy deposit calculation
    779 
    780   G4String regionName = "PhantomLog";
    781   G4Region* region = G4RegionStore::GetInstance()->GetRegion(regionName);
    782   G4ProductionCuts* cuts = new G4ProductionCuts ;
    783   G4double regionCut = 0.01*mm;
    784   cuts -> SetProductionCut(regionCut,G4ProductionCuts::GetIndex("gamma"));
    785   cuts -> SetProductionCut(regionCut,G4ProductionCuts::GetIndex("e-"));
    786   cuts -> SetProductionCut(regionCut,G4ProductionCuts::GetIndex("e+"));
    787   cuts -> SetProductionCut(regionCut,G4ProductionCuts::GetIndex("proton"));
    788   cuts -> SetProductionCut(regionCut,G4ProductionCuts::GetIndex("genericIons"));
    789   region -> SetProductionCuts(cuts);
     297{
     298
     299  if (verboseLevel >0){
     300    G4cout << "PhysicsList::SetCuts:";
     301    G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
     302  }
     303
     304  // set cut values for gamma at first and for e- second and next for e+,
     305  // because some processes for e+/e- need cut values for gamma
     306  SetCutValue(cutForGamma, "gamma");
     307  SetCutValue(cutForElectron, "e-");
     308  SetCutValue(cutForPositron, "e+");
    790309
    791310  if (verboseLevel>0) DumpCutValuesTable();
    792311}
    793312
    794 
     313/////////////////////////////////////////////////////////////////////////////
     314void HadrontherapyPhysicsList::SetCutForGamma(G4double cut)
     315{
     316  cutForGamma = cut;
     317  SetParticleCuts(cutForGamma, G4Gamma::Gamma());
     318}
     319
     320/////////////////////////////////////////////////////////////////////////////
     321void HadrontherapyPhysicsList::SetCutForElectron(G4double cut)
     322{
     323  cutForElectron = cut;
     324  SetParticleCuts(cutForElectron, G4Electron::Electron());
     325}
     326
     327/////////////////////////////////////////////////////////////////////////////
     328void HadrontherapyPhysicsList::SetCutForPositron(G4double cut)
     329{
     330  cutForPositron = cut;
     331  SetParticleCuts(cutForPositron, G4Positron::Positron());
     332}
  • trunk/examples/advanced/hadrontherapy/src/HadrontherapyPhysicsListMessenger.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyPhisicsListMessenger.cc; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// HadrontherapyPhysicsListMessenger.cc
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
     28
    4029#include "HadrontherapyPhysicsListMessenger.hh"
     30
    4131#include "HadrontherapyPhysicsList.hh"
    4232#include "G4UIdirectory.hh"
    43 #include "G4UIcmdWithoutParameter.hh"
    44 #include "G4UIcmdWithADouble.hh"
    4533#include "G4UIcmdWithADoubleAndUnit.hh"
    46 #include "G4UIcmdWithABool.hh"
    4734#include "G4UIcmdWithAString.hh"
    4835
    49 HadrontherapyPhysicsListMessenger::HadrontherapyPhysicsListMessenger(HadrontherapyPhysicsList * physList)
    50 :physicsList(physList)
    51 
    52  listDir = new G4UIdirectory("/physics/");
    53   // Building modular PhysicsList
     36/////////////////////////////////////////////////////////////////////////////
     37HadrontherapyPhysicsListMessenger::HadrontherapyPhysicsListMessenger(HadrontherapyPhysicsList* pPhys)
     38:pPhysicsList(pPhys)
     39{
     40  physDir = new G4UIdirectory("/physic/");
     41  physDir->SetGuidance("Commands to activate physics models and set cuts");
     42   
     43  gammaCutCmd = new G4UIcmdWithADoubleAndUnit("/physic/setGCut",this); 
     44  gammaCutCmd->SetGuidance("Set gamma cut.");
     45  gammaCutCmd->SetParameterName("Gcut",false);
     46  gammaCutCmd->SetUnitCategory("Length");
     47  gammaCutCmd->SetRange("Gcut>0.0");
     48  gammaCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
    5449
    55  physicsListCmd = new G4UIcmdWithAString("/physics/addPhysics",this); 
    56  physicsListCmd->SetGuidance("Add chunks of PhysicsList.");
    57  physicsListCmd->SetParameterName("physList",false);
    58  physicsListCmd->AvailableForStates(G4State_PreInit);
     50  electCutCmd = new G4UIcmdWithADoubleAndUnit("/physic/setECut",this); 
     51  electCutCmd->SetGuidance("Set electron cut.");
     52  electCutCmd->SetParameterName("Ecut",false);
     53  electCutCmd->SetUnitCategory("Length");
     54  electCutCmd->SetRange("Ecut>0.0");
     55  electCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
     56 
     57  protoCutCmd = new G4UIcmdWithADoubleAndUnit("/physic/setPCut",this); 
     58  protoCutCmd->SetGuidance("Set positron cut.");
     59  protoCutCmd->SetParameterName("Pcut",false);
     60  protoCutCmd->SetUnitCategory("Length");
     61  protoCutCmd->SetRange("Pcut>0.0");
     62  protoCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle); 
     63
     64  allCutCmd = new G4UIcmdWithADoubleAndUnit("/physic/setCuts",this); 
     65  allCutCmd->SetGuidance("Set cut for all.");
     66  allCutCmd->SetParameterName("cut",false);
     67  allCutCmd->SetUnitCategory("Length");
     68  allCutCmd->SetRange("cut>0.0");
     69  allCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle); 
     70
     71  pListCmd = new G4UIcmdWithAString("/physic/addPhysics",this); 
     72  pListCmd->SetGuidance("Add physics list.");
     73  pListCmd->SetParameterName("PList",false);
     74  pListCmd->AvailableForStates(G4State_PreInit); 
     75
     76  packageListCmd = new G4UIcmdWithAString("/physic/addPackage",this);
     77  packageListCmd->SetGuidance("Add physics package.");
     78  packageListCmd->SetParameterName("package",false);
     79  packageListCmd->AvailableForStates(G4State_PreInit);
    5980}
    6081
     82/////////////////////////////////////////////////////////////////////////////
    6183HadrontherapyPhysicsListMessenger::~HadrontherapyPhysicsListMessenger()
    6284{
    63   delete physicsListCmd;
    64   delete listDir;
     85  delete gammaCutCmd;
     86  delete electCutCmd;
     87  delete protoCutCmd;
     88  delete allCutCmd;
     89  delete pListCmd;
     90  delete physDir;   
     91  delete packageListCmd;
    6592}
    6693
    67 void HadrontherapyPhysicsListMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
    68 {
    69  if (command == physicsListCmd)
    70     { physicsList->AddPhysicsList(newValue);}
    71 }
     94/////////////////////////////////////////////////////////////////////////////
     95void HadrontherapyPhysicsListMessenger::SetNewValue(G4UIcommand* command,
     96                                          G4String newValue)
     97{       
     98  if( command == gammaCutCmd )
     99   { pPhysicsList->SetCutForGamma(gammaCutCmd->GetNewDoubleValue(newValue));}
     100     
     101  if( command == electCutCmd )
     102   { pPhysicsList->SetCutForElectron(electCutCmd->GetNewDoubleValue(newValue));}
     103     
     104  if( command == protoCutCmd )
     105   { pPhysicsList->SetCutForPositron(protoCutCmd->GetNewDoubleValue(newValue));}
     106
     107  if( command == allCutCmd )
     108    {
     109      G4double cut = allCutCmd->GetNewDoubleValue(newValue);
     110      pPhysicsList->SetCutForGamma(cut);
     111      pPhysicsList->SetCutForElectron(cut);
     112      pPhysicsList->SetCutForPositron(cut);
     113    }
     114
     115  if( command == pListCmd )
     116   { pPhysicsList->AddPhysicsList(newValue);}
    72117
    73118
     119  if( command == packageListCmd )
     120   { pPhysicsList->AddPackage(newValue);}
    74121
    75122
    76 
    77 
     123}
  • trunk/examples/advanced/hadrontherapy/src/HadrontherapyPrimaryGeneratorAction.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyPositronPrimaryGeneratorAction.cc; May 2005
     26// HadrontherapyPrimarygeneratorAction.cc;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    2728// ----------------------------------------------------------------------------
    2829//                 GEANT 4 - Hadrontherapy example
     
    3031// Code developed by:
    3132//
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
     33// G.A.P. Cirrone(a)*, F.Romano(a)
    3334//
    3435// (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
     36//     of the INFN, Catania, Italy
    3737//
    3838// * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     39//
     40// ------------------------------------------------------------------------------
     41
    4042#include "HadrontherapyPrimaryGeneratorAction.hh"
    4143#include "HadrontherapyPrimaryGeneratorMessenger.hh"
     
    4547#include "G4ParticleDefinition.hh"
    4648#include "Randomize.hh"
     49#include "HadrontherapyAnalysisManager.hh"
    4750
    4851HadrontherapyPrimaryGeneratorAction::HadrontherapyPrimaryGeneratorAction()
     
    7578
    7679  // Define the energy of primary particles:
    77   // gaussian distribution with mean energy = 64.55 *MeV
    78   // and sigma = 300.0 *keV
    79   G4double defaultMeanKineticEnergy = 63.50 *MeV;
     80  // gaussian distribution with mean energy = 62.0 *MeV
     81  // and sigma = 400.0 *keV
     82  G4double defaultMeanKineticEnergy = 62.0 *MeV;
    8083  meanKineticEnergy = defaultMeanKineticEnergy;
    8184
    82   G4double defaultsigmaEnergy = 300.0 *keV;
     85  G4double defaultsigmaEnergy = 400.0 *keV;
    8386  sigmaEnergy = defaultsigmaEnergy;
     87 
     88#ifdef ANALYSIS_USE
     89  // Write these values into the analysis if needed. Have to be written separately on change.
     90  HadrontherapyAnalysisManager::getInstance()->setBeamMetaData(meanKineticEnergy, sigmaEnergy);
     91#endif
    8492
    8593  // Define the parameters of the initial position:
    8694  // the y, z coordinates have a gaussian distribution
    87   G4double defaultX0 = -3248.59 *mm; 
     95 
     96  G4double defaultX0 = -2700.0 *mm;
    8897  X0 = defaultX0;
    8998
     
    111120void HadrontherapyPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
    112121{
     122#ifdef ANALYSIS_USE
     123  // Increment the event counter
     124  HadrontherapyAnalysisManager::getInstance()->startNewEvent();
     125#endif
     126
    113127  // ****************************************
    114128  // Set the beam angular apread
     
    162176
    163177void HadrontherapyPrimaryGeneratorAction::SetmeanKineticEnergy (G4double val ) 
    164 { meanKineticEnergy = val;}
     178{
     179        meanKineticEnergy = val;
     180#ifdef ANALYSIS_USE
     181  // Update the beam-data in the analysis manager
     182  HadrontherapyAnalysisManager::getInstance()->setBeamMetaData(meanKineticEnergy, sigmaEnergy);
     183#endif
     184
     185}
    165186
    166187void HadrontherapyPrimaryGeneratorAction::SetsigmaEnergy (G4double val ) 
    167 { sigmaEnergy = val;}
     188{
     189        sigmaEnergy = val;
     190#ifdef ANALYSIS_USE
     191  // Update the sigmaenergy in the metadata.
     192  HadrontherapyAnalysisManager::getInstance()->setBeamMetaData(meanKineticEnergy, sigmaEnergy);
     193#endif
     194}
    168195
    169196void HadrontherapyPrimaryGeneratorAction::SetXposition (G4double val ) 
     
    187214void HadrontherapyPrimaryGeneratorAction::SetsigmaMomentumZ (G4double val ) 
    188215{ sigmaMomentumZ = val;}
     216
     217G4double HadrontherapyPrimaryGeneratorAction::GetmeanKineticEnergy(void)
     218{ return meanKineticEnergy;}
  • trunk/examples/advanced/hadrontherapy/src/HadrontherapyPrimaryGeneratorMessenger.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyPrimaryGeneratorMessenger.cc; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the National Institute for Nuclear Physics, Catania, Italy
    36 // (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// HadrontherapyPrimaryGeneratorMessenger.cc;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    4028
    4129#include "HadrontherapyPrimaryGeneratorMessenger.hh"
  • trunk/examples/advanced/hadrontherapy/src/HadrontherapyRunAction.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyRunAction.cc,v 3.0, September 2004;
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the INFN, Catania, Italy
    36 // (b) INFN Section of Genova, Genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// $Id: HadrontherapyRunAction.cc
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    4028
    4129#include "HadrontherapyRunAction.hh"
  • trunk/examples/advanced/hadrontherapy/src/HadrontherapySteppingAction.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HadrontherapyProtonSteppingAction.cc; May 2005
    27 // ----------------------------------------------------------------------------
    28 //                 GEANT 4 - Hadrontherapy example
    29 // ----------------------------------------------------------------------------
    30 // Code developed by:
    31 //
    32 // G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
    33 //
    34 // (a) Laboratori Nazionali del Sud
    35 //     of the INFN, Catania, Italy
    36 // (b) INFN Section of Genova, Genova, Italy
    37 //
    38 // * cirrone@lns.infn.it
    39 // ----------------------------------------------------------------------------
     26// HadrontherapyProtonSteppingAction.cc;
     27// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
    4028
    4129#include "G4SteppingManager.hh"
     
    5240#include "G4ParticleTypes.hh"
    5341
    54 #ifdef G4ANALYSIS_USE   
    5542#include "HadrontherapyAnalysisManager.hh"
    56 #endif
    5743
    5844#include "HadrontherapyRunAction.hh"
    5945
    60 HadrontherapySteppingAction::HadrontherapySteppingAction( HadrontherapyRunAction* run)
     46/////////////////////////////////////////////////////////////////////////////
     47HadrontherapySteppingAction::HadrontherapySteppingAction( HadrontherapyRunAction *run)
    6148{
    6249  runAction = run;
    6350}
    6451
     52/////////////////////////////////////////////////////////////////////////////
    6553HadrontherapySteppingAction::~HadrontherapySteppingAction()
    6654{
    6755}
    6856
     57/////////////////////////////////////////////////////////////////////////////
    6958void HadrontherapySteppingAction::UserSteppingAction(const G4Step* aStep)
    7059{
     60    if( aStep->GetTrack()->GetVolume()->GetName() == "NewDetectorPhys"){
     61#ifdef ANALYSIS_USE
     62      G4ParticleDefinition *def = aStep->GetTrack()->GetDefinition();
     63      G4double secondaryParticleKineticEnergy =  aStep->GetTrack()->GetKineticEnergy();     
     64      G4String particleType = def->GetParticleType(); // particle type = nucleus for d, t, He3, alpha, and heavier nuclei
     65      G4String particleName = def->GetParticleName(); // e.g. for alpha: the name = "alpha" and type = "nucleus"
     66      if(particleType == "nucleus") {
     67        G4int A = def->GetBaryonNumber();
     68        G4double Z = def->GetPDGCharge();
     69        G4double posX = aStep->GetTrack()->GetPosition().x() / cm;
     70        G4double posY = aStep->GetTrack()->GetPosition().y() / cm;
     71        G4double posZ = aStep->GetTrack()->GetPosition().z() / cm;
     72        G4double energy = secondaryParticleKineticEnergy / A / MeV;
     73
     74        HadrontherapyAnalysisManager* analysisMgr =  HadrontherapyAnalysisManager::getInstance();   
     75        analysisMgr->fillFragmentTuple(A, Z, energy, posX, posY, posZ);
     76      } else if(particleName == "proton") {   // proton (hydrogen-1) is a special case
     77        G4double posX = aStep->GetTrack()->GetPosition().x() / cm ;
     78        G4double posY = aStep->GetTrack()->GetPosition().y() / cm ;
     79        G4double posZ = aStep->GetTrack()->GetPosition().z() / cm ;
     80        G4double energy = secondaryParticleKineticEnergy * MeV;    // Hydrogen-1: A = 1, Z = 1
     81        HadrontherapyAnalysisManager::getInstance()->fillFragmentTuple(1, 1.0, energy, posX, posY, posZ);
     82      }
     83
     84      G4String secondaryParticleName =  def -> GetParticleName(); 
     85      //G4cout <<"Particle: " << secondaryParticleName << G4endl;
     86      //G4cout <<"Energy: " << secondaryParticleKineticEnergy << G4endl;
     87        HadrontherapyAnalysisManager* analysis =  HadrontherapyAnalysisManager::getInstance();   
     88        //There is a bunch of stuff recorded with the energy 0, something should perhaps be done about this.
     89        if(secondaryParticleName == "proton") {
     90          analysis->hydrogenEnergy(secondaryParticleKineticEnergy / MeV);
     91        }
     92        if(secondaryParticleName == "deuteron") {
     93          analysis->hydrogenEnergy((secondaryParticleKineticEnergy/2) / MeV);
     94        }
     95        if(secondaryParticleName == "triton") {
     96          analysis->hydrogenEnergy((secondaryParticleKineticEnergy/3) / MeV);
     97        }
     98        if(secondaryParticleName == "alpha") {
     99          analysis->heliumEnergy((secondaryParticleKineticEnergy/4) / MeV);
     100        }
     101        if(secondaryParticleName == "He3"){
     102          analysis->heliumEnergy((secondaryParticleKineticEnergy/3) / MeV);             
     103        }
     104#endif
     105
     106        aStep->GetTrack()->SetTrackStatus(fKillTrackAndSecondaries);
     107    }
     108
    71109  // Electromagnetic and hadronic processes of primary particles in the phantom
    72  
    73  if ((aStep -> GetTrack() -> GetTrackID() == 1) &&
     110  //setting phantomPhys correctly will break something here fixme
     111  if ((aStep -> GetTrack() -> GetTrackID() == 1) &&
    74112    (aStep -> GetTrack() -> GetVolume() -> GetName() == "PhantomPhys") &&
    75113    (aStep -> GetPostStepPoint() -> GetProcessDefinedStep() != NULL))
     
    96134 // Retrieve information about the secondaries originated in the phantom
    97135
    98 #ifdef G4ANALYSIS_USE   
    99   G4SteppingManager*  steppingManager = fpSteppingManager;
    100   G4Track* theTrack = aStep -> GetTrack();
    101 
     136 G4SteppingManager*  steppingManager = fpSteppingManager;
     137 
    102138  // check if it is alive
    103   if(theTrack-> GetTrackStatus() == fAlive) { return; }
     139  //if(theTrack-> GetTrackStatus() == fAlive) { return; }
    104140
    105141  // Retrieve the secondary particles
     
    110146      G4String volumeName = (*fSecondary)[lp1] -> GetVolume() -> GetName();
    111147 
    112       if (volumeName == "PhantomPhys")
     148      if (volumeName == "phantomPhys")
    113149        {
     150#ifdef ANALYSIS_USE   
    114151          G4String secondaryParticleName =  (*fSecondary)[lp1]->GetDefinition() -> GetParticleName(); 
    115152          G4double secondaryParticleKineticEnergy =  (*fSecondary)[lp1] -> GetKineticEnergy();     
    116    
     153
    117154          HadrontherapyAnalysisManager* analysis =  HadrontherapyAnalysisManager::getInstance();   
    118155       
     
    137174              G4int a = (*fSecondary)[lp1]-> GetDynamicParticle() -> GetDefinition() -> GetBaryonNumber();
    138175              G4int electronOccupancy = (*fSecondary)[lp1] ->  GetDynamicParticle() -> GetTotalOccupancy();
    139               // If a generic ion is originated in the phantom, its baryonic number, PDG charge,
     176             
     177              // If a generic ion is originated in the detector, its baryonic number, PDG charge,
    140178              // total number of electrons in the orbitals are stored in a ntuple
    141               analysis -> genericIonInformation(a, z, electronOccupancy, secondaryParticleKineticEnergy/MeV);                   
     179              analysis -> genericIonInformation(a, z, electronOccupancy, secondaryParticleKineticEnergy/MeV);
    142180            }
     181#endif
    143182        }
    144183    }
    145 #endif
    146184}
    147185
  • trunk/examples/advanced/human_phantom/GNUmakefile

    r807 r1230  
    99G4EXLIB := true
    1010
    11 ifndef SCRAM_ARCH
    12    SCRAM_ARCH := slc3_ia32_gcc323
    13 endif
    14 
    1511ifndef G4INSTALL
    1612  G4INSTALL = ../../..
    17 endif
    18 
    19 ifndef GDML_BASE
    20 #  GDML_BASE := /afs/cern.ch/sw/lcg/app/releases/GDML/pro
    21    GDML_BASE := /local/GDML_2_8_0
    22 endif
    23 
    24 CPPFLAGS    += \
    25                -I$(GDML_BASE)/include \
    26                -I$(XERCESCROOT)/include
    27 
    28 ifdef G4ANALYSIS_USE 
    29 CPPFLAGS    += \
    30                  `aida-config --include`
    31 endif
    32 
    33 EXTRALIBS   += \
    34                -L$(GDML_BASE)/$(SCRAM_ARCH)/lib \
    35                -lG4Processor \
    36                -lG4Subscribers \
    37                -lG4Processor \
    38                -lG4Evaluator\
    39                -lG4Writer \
    40                -L$(GDML_BASE)/$(SCRAM_ARCH)/lib \
    41                -lSaxana \
    42                -lProcesses \
    43                -lWriter \
    44                -L$(XERCESCROOT)/lib -lxerces-c
    45            
    46 ifdef G4ANALYSIS_USE 
    47 EXTRALIBS    += \
    48                  `aida-config --lib`
    4913endif
    5014
  • trunk/examples/advanced/human_phantom/History

    r807 r1230  
    1 $Id: History,v 1.19 2007/06/06 19:11:20 pia Exp $
     1$Id: History,v 1.25 2009/04/06 06:24:37 cirrone Exp $
    22-------------------------------------------------------------------
    33
     
    1919     ----------------------------------------------------------
    2020
    21 06.06.2007 MGP human_phantom-V08-03-00
    22            Minor documentation fix
     21April 6, 2009, G.A.P.Cirrone, tag: human_phantom-V09-02-02
     22- GNUmakefile updated
     23
     24February 20, 2009, G. Cosmo tag: human_phantom-V09-02-01
     25- Corrected URL for standard location of schema in all GDML files.
     26- Use "OrganPos" and "OrganRot" as names for organ's transformations in
     27  ORNL files, as implied by code.
     28- Fixed 'solids' tag in ORNLLeftLegBone.gdml files for male and female.
     29
     30February 19, 2009, G. Cosmo tag: human_phantom-V09-02-00
     31- Migrated GDML read setup to use embedded GDML reader as in Geant4 9.2.
     32- Fixed compilation warnings.
     33- Updated README.
     34
     35June 6, 2007, M.G. Pia tag: human_phantom-V08-03-00
     36- Minor documentation fix
    2337
    2438May 15, 2007, S. Guatelli tag: human_phantom-V08-02-02
  • trunk/examples/advanced/human_phantom/README

    r807 r1230  
    1 qYY$Id: README,v 1.13 2007/06/06 19:11:20 pia Exp $
     1$Id: README,v 1.14 2009/02/19 14:05:06 gcosmo Exp $
    22-------------------------------------------------------------------
    33
     
    3232with the design in a forthcoming publication, and subject to a design
    3333and code review.
    34 
    35 NOTE: At the moment this advanced example is executed correctly with geantino
    36 particles as primary particles; it is not executed correctly with other primary particle types.
    37 This is due to an internal Geant4 bug concerning ellipsoids.
    38 For details look at the Geant4 Bug Report #914. This problem is taken under
    39 care by the Geant4 Collaboration.
    4034 
    4135-----> Geometry
     
    4741
    4842The organs of the MIRD phantom are implemented in hard-code; the organs of
    49 the ORNL phantom are handled through GDML (Geometry Description Markup Language, www.cern.ch/gdml). The materials of the MIRD model are defined in the
     43the ORNL phantom are handled through GDML (Geometry Description Markup Language,
     44www.cern.ch/gdml). The materials of the MIRD model are defined in the
    5045class G4HumanPhantomMaterial. The materials of the ORNL model are defined in
    5146the GDML files.
     
    116111-----> Setup
    117112
    118 Example enviroment with the compiler gcc-3.2.3, on the Linux platform                             
    119 
    120113A standard Geant4 example GNUmakefile is provided.                     
    121114
     
    124117set G4ANALYSIS_USE equal to 1 to activate the analysis
    125118
    126 - Install the GDML package with Geant4 extensions and Xerces
    127 .
    128   See: http://cern.ch/gdml.
    129 
    130 - Set the environment variable GDML_BASE to point to the area where
    131   GDML is installed.
    132  
    133 - Set the environment variable XERCESCROOT to point to the area where
    134   Xerces is installed.
    135 
    136 - Add to the LD_LIBRARY_PATH the $XERCESCROOT/lib
     119- Requires the GDML module to be installed with Geant4:
     120.
     121  Set G4LIB_BUILD_GDML to 1
     122  Set XERCESCROOT variable defining the path to the Xercec-C library
     123  See also: http://cern.ch/gdml.
    137124
    138125- IMPORTANT!!!! Customize the '*.gdml' schema file in the directories
    139 gdmlData/Female and gdmlData/Male, specifying in the top line the
     126  gdmlData/Female and gdmlData/Male, specifying in the top line the
    140127  right path where to retrieve the main GDML schema file.
    141128
    142 - Analysis set-up:  AIDA 3.2.1, PI 1.3.3                           
     129- Analysis set-up:  AIDA 3.2.1, and iAIDA                           
    143130                    Users can download the analysis tools from: 
    144131                    http://aida.freehep.org/
    145                     http://www.cern.ch/PI     
     132                    http://iaida.dynalias.net/
    146133
    147134- Compile and link to generate an executable:
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDArmBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDBrain.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDBreast.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDHead.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <position name="HeadRelativePos" unit="cm" x="0" y="0" z="8.15" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDHeart.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDKidney.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDLegBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDLegs.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDLiver.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDLowerLargeIntestine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDLung.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDMiddleLowerSpine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDOvary.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDPancreas.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDPelvis.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDSkull.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDSpleen.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDStomach.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDThyroid.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDTrunk.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDUpperLargeIntestine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDUpperSpine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDUrinaryBladder.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/MIRDUterus.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLArmBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML"
    3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    43 <define>
    54  <constant name="PI" value="1.*pi" />
     
    87
    98  <position name="ArmBoneRelativePos" unit="cm" x="31.74" y="0.0" z="0" />
    10   <position name="ArmBonePos" unit="cm" x="-15.87" y="0.0" z="0.0" />
    11   <rotation name="ArmBoneRot" unit="degree" x="0" y="0" z="0" />
     9  <position name="OrganPos" unit="cm" x="-15.87" y="0.0" z="0.0" />
     10  <rotation name="OrganRot" unit="degree" x="0" y="0" z="0" />
    1211 </define>
    1312
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLBrain.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLHead.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <position name="HeadRelativePos" unit="cm" x="0" y="0" z="10.025" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLHeart.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
     
    77
    88  <position name="HeartRelativePos" unit="cm" x="0.0" y="0.0" z="0.0" />
    9   <position name="HeartPos" unit="cm" x="0.0" y="-3.0" z="15.32" />
    10   <rotation name="HeartRot" unit="degree" x="0" y="25" z="0" />
     9  <position name="OrganPos" unit="cm" x="0.0" y="-3.0" z="15.32" />
     10  <rotation name="OrganRot" unit="degree" x="0" y="25" z="0" />
    1111 </define>
    1212
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLLeftArmBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML"
    3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    43 <define>
    54  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLLeftBreast.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLLeftKidney.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLLeftLeg.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLLeftLegBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
     
    111111 <solids>
    112112  <eltube aunit="cm" lunit="cm" name="OneLegBone" dx="2.0" dy="1.0" dz="39.00" />
     113 </solids>
    113114  <structure>
    114115  <volume name="LeftLegBoneVolume" >
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLLeftLung.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLLeftOvary.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLLegBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
     
    66  <constant name="HALFPI" value="0.5*pi"/>
    77  <position name="LegBoneRelativePos" unit="cm" x="14.0" y="0.0" z="0" />
    8   <position name="LegBonePos" unit="cm" x="0.0" y="0.0" z="0.0" />
    9   <rotation name="LegBoneRot" unit="degree" x="0" y="0" z="0" />
     8  <position name="OrganPos" unit="cm" x="0.0" y="0.0" z="0.0" />
     9  <rotation name="OrganRot" unit="degree" x="0" y="0" z="0" />
    1010 </define>
    1111
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLLiver.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
     
    77  <position name="LiverRelativePos" unit="cm" x="10.0" y="0.0" z="0.0" />
    88  <rotation name="LiverRelativeRot" unit="degree" x="0" y="32" z="40.9" />
    9   <position name="LiverPos" unit="cm" x="0.0" y="0.0" z="0.0" />
    10   <rotation name="LiverRot" unit="degree" x="0" y="0" z="0" />
     9  <position name="OrganPos" unit="cm" x="0.0" y="0.0" z="0.0" />
     10  <rotation name="OrganRot" unit="degree" x="0" y="0" z="0" />
    1111 </define>
    1212
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLLowerLargeIntestine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLMiddleLowerSpine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLPancreas.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLPelvis.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLRightArmBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML"
    3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    43 <define>
    54  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLRightBreast.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLRightKidney.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLRightLeg.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLRightLegBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLRightLung.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLRightOvary.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLSkull.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLSpleen.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLStomach.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLThyroid.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
     
    1010  <rotation name="FirstSubtrThyroidRelativeRot" unit="degree" x="50" y="0" z="0" />
    1111  <rotation name="SecondSubtrThyroidRelativeRot" unit="degree" x="-50" y="0" z="0" />
    12   <position name="ThyroidPos" unit="cm" x="0.0" y="-3.91" z="-4.05" />
    13   <rotation name="ThyroidRot" unit="degree" x="0" y="0" z="180" />
     12  <position name="OrganPos" unit="cm" x="0.0" y="-3.91" z="-4.05" />
     13  <rotation name="OrganRot" unit="degree" x="0" y="0" z="180" />
    1414 </define>
    1515
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLTrunk.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLUpperLargeIntestine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLUpperSpine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLUrinaryBladder.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Female/ORNLUterus.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
    55  <constant name="TWOPI" value="2.*pi"/>
    66  <constant name="HALFPI" value="0.5*pi"/>
    7   <position name="UterusPos" unit="cm" x="0" y="1.96" z="-18.93" />
    8   <rotation name="UterusRot" unit="degree" x="90" y="0" z="0" />
     7  <position name="OrganPos" unit="cm" x="0" y="1.96" z="-18.93" />
     8  <rotation name="OrganRot" unit="degree" x="90" y="0" z="0" />
    99 </define>
    1010
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDArmBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDBrain.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDHead.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <position name="HeadRelativePos" unit="cm" x="0" y="0" z="8.15" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDHeart.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDKidney.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDLegBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDLegs.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDLiver.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDLowerLargeIntestine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDLung.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDMiddleLowerSpine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDPancreas.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDPelvis.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDSkull.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDSpleen.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDStomach.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDThyroid.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDTrunk.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDUpperLargeIntestine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDUpperSpine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/MIRDUrinaryBladder.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/local/GDML_2_8_0/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLArmBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    22<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML"
    3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     3xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    44 <define>
    55  <constant name="PI" value="1.*pi" />
     
    88
    99  <position name="ArmBoneRelativePos" unit="cm" x="31.74" y="0.0" z="0" />
    10   <position name="ArmBonePos" unit="cm" x="-15.87" y="0.0" z="0.0" />
    11   <rotation name="ArmBoneRot" unit="degree" x="0" y="0" z="0" />
     10  <position name="OrganPos" unit="cm" x="-15.87" y="0.0" z="0.0" />
     11  <rotation name="OrganRot" unit="degree" x="0" y="0" z="0" />
    1212 </define>
    1313
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLBrain.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLHead.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <position name="HeadRelativePos" unit="cm" x="0" y="0" z="10.025" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLHeart.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
     
    77
    88  <position name="HeartRelativePos" unit="cm" x="0.0" y="0.0" z="0.0" />
    9   <position name="HeartPos" unit="cm" x="0.0" y="-3.0" z="15.32" />
    10   <rotation name="HeartRot" unit="degree" x="0" y="25" z="0" />
     9  <position name="OrganPos" unit="cm" x="0.0" y="-3.0" z="15.32" />
     10  <rotation name="OrganRot" unit="degree" x="0" y="25" z="0" />
    1111 </define>
    1212
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLKidney.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
     
    77  <position name="KidneyRelativePos" unit="cm" x="10.36" y="0.0" z="0.0" />
    88  <position name="SubtrKidneyRelativePos" unit="cm" x="5.18" y="0.0" z="0.0" />
    9   <position name="KidneyPos" unit="cm" x="-5.18" y="5.88" z="-2.25" />
    10   <rotation name="KidneyRot" unit="degree" x="0" y="0" z="0" />
     9  <position name="OrganPos" unit="cm" x="-5.18" y="5.88" z="-2.25" />
     10  <rotation name="OrganRot" unit="degree" x="0" y="0" z="0" />
    1111 </define>
    1212
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLLeftArmBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    22<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML"
    3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     3xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    44 <define>
    55  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLLeftKidney.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLLeftLeg.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLLeftLegBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
     
    111111 <solids>
    112112  <eltube aunit="cm" lunit="cm" name="OneLegBone" dx="2.0" dy="1.0" dz="39.00" />
     113 </solids>
     114
    113115  <structure>
    114116  <volume name="LeftLegBoneVolume" >
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLLeftLung.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLLegBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
     
    66  <constant name="HALFPI" value="0.5*pi"/>
    77  <position name="LegBoneRelativePos" unit="cm" x="14.0" y="0.0" z="0" />
    8   <position name="LegBonePos" unit="cm" x="0.0" y="0.0" z="0.0" />
    9   <rotation name="LegBoneRot" unit="degree" x="0" y="0" z="0" />
     8  <position name="OrganPos" unit="cm" x="0.0" y="0.0" z="0.0" />
     9  <rotation name="OrganRot" unit="degree" x="0" y="0" z="0" />
    1010 </define>
    1111
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLLegs.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
     
    66  <constant name="HALFPI" value="0.5*pi"/>
    77  <position name="LegsRelativePos" unit="cm" x="14.0" y="0.0" z="0.0" />
    8   <position name="LegsPos" unit="cm" x="-7.01" y="-39.1" z="0" />
    9   <rotation name="LegsRot" unit="degree" x="90" y="0" z="0" />
     8  <position name="OrganPos" unit="cm" x="-7.01" y="-39.1" z="0" />
     9  <rotation name="OrganRot" unit="degree" x="90" y="0" z="0" />
    1010 </define>
    1111
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLLiver.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
     
    77  <position name="LiverRelativePos" unit="cm" x="10.0" y="0.0" z="0.0" />
    88  <rotation name="LiverRelativeRot" unit="degree" x="0" y="32" z="40.9" />
    9   <position name="LiverPos" unit="cm" x="0.0" y="0.0" z="0.0" />
    10   <rotation name="LiverRot" unit="degree" x="0" y="0" z="0" />
     9  <position name="OrganPos" unit="cm" x="0.0" y="0.0" z="0.0" />
     10  <rotation name="OrganRot" unit="degree" x="0" y="0" z="0" />
    1111 </define>
    1212
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLLowerLargeIntestine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLLung.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
     
    88  <position name="SubtrLungRelativePos" unit="cm" x="7.50" y="-4.0" z="0.0" />
    99  <rotation name="SubtrLungRelativeRot" unit="degree" x="0" y="0" z="0" />
    10   <position name="LungPos" unit="cm" x="-7.33" y="0.0" z="7.66" />
    11   <rotation name="LungRot" unit="degree" x="0" y="0" z="0" />
     10  <position name="OrganPos" unit="cm" x="-7.33" y="0.0" z="7.66" />
     11  <rotation name="OrganRot" unit="degree" x="0" y="0" z="0" />
    1212 </define>
    1313
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLMiddleLowerSpine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLPancreas.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLPelvis.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLRightArmBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    22<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML"
    3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     3xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    44 <define>
    55  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLRightKidney.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLRightLeg.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLRightLegBone.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLRightLung.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLSkull.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLSpleen.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLStomach.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLThyroid.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
     
    1010  <rotation name="FirstSubtrThyroidRelativeRot" unit="degree" x="50" y="0" z="0" />
    1111  <rotation name="SecondSubtrThyroidRelativeRot" unit="degree" x="-50" y="0" z="0" />
    12   <position name="ThyroidPos" unit="cm" x="0.0" y="-3.91" z="-4.05" />
    13   <rotation name="ThyroidRot" unit="degree" x="0" y="0" z="180" />
     12  <position name="OrganPos" unit="cm" x="0.0" y="-3.91" z="-4.05" />
     13  <rotation name="OrganRot" unit="degree" x="0" y="0" z="180" />
    1414 </define>
    1515
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLTrunk.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLUpperLargeIntestine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLUpperSpine.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/gdmlData/Male/ORNLUrinaryBladder.gdml

    r807 r1230  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/users/guatelli/GDML/src/GDMLSchema/gdml.xsd" >
     2<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >
    33 <define>
    44  <constant name="PI" value="1.*pi" />
  • trunk/examples/advanced/human_phantom/include/G4HumanPhantomHit.hh

    r807 r1230  
    2626//
    2727// $Id: G4HumanPhantomHit.hh,v 1.10 2007/05/15 14:46:54 guatelli Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030
  • trunk/examples/advanced/human_phantom/include/G4MIRDBrain.hh

    r807 r1230  
    3737#include "G4VPhysicalVolume.hh"
    3838#include "G4VOrgan.hh"
    39 //#include "Saxana/SAXProcessor.h"
    40 ///#include "Saxana/ProcessingConfigurator.h"
    4139
    4240class G4VPhysicalVolume;
     
    5149  G4VPhysicalVolume* Construct(const G4String&,G4VPhysicalVolume*,
    5250                                    const G4String&, G4bool, G4bool);
    53  
    54 private:
    55   //AXProcessor sxp;
    56   //ProcessingConfigurator config;
    5751};
    5852#endif
  • trunk/examples/advanced/human_phantom/include/G4MIRDHead.hh

    r807 r1230  
    3737#include "G4VPhysicalVolume.hh"
    3838#include "G4VOrgan.hh"
    39 //##include "Saxana/SAXProcessor.h"
    40 //#include "Saxana/ProcessingConfigurator.h"
    4139
    4240class G4VPhysicalVolume;
     
    5149  ~G4MIRDHead();
    5250  G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*, const G4String&,
    53                                     G4bool, G4bool);
    54  
     51                                    G4bool, G4bool);
    5552private:
    56   //  SAXProcessor sxp;
    57   //  ProcessingConfigurator config;
    58     G4HumanPhantomMaterial* material;
     53
     54  G4HumanPhantomMaterial* material;
    5955};
    6056#endif
  • trunk/examples/advanced/human_phantom/include/G4MIRDPancreas.hh

    r807 r1230  
    3737#include "G4VPhysicalVolume.hh"
    3838#include "G4VOrgan.hh"
    39 //#include "Saxana/SAXProcessor.h"
    40 //#include "Saxana/ProcessingConfigurator.h"
    4139
    4240class G4VPhysicalVolume;
     
    4947  G4MIRDPancreas();
    5048  ~G4MIRDPancreas();
    51   G4VPhysicalVolume* Construct(const G4String&,G4VPhysicalVolume*,
    52                                     const G4String&, G4bool, G4bool);
    53  
    54 private:
    55   //    SAXProcessor sxp;
    56   //   ProcessingConfigurator config;
    57 
     49  G4VPhysicalVolume* Construct(const G4String&, G4VPhysicalVolume*,
     50                               const G4String&, G4bool, G4bool);
    5851};
    5952#endif
  • trunk/examples/advanced/human_phantom/include/G4MIRDTestes.hh

    r807 r1230  
    3737#include "G4VPhysicalVolume.hh"
    3838
    39 #include "Saxana/SAXProcessor.h"
    40 #include "Saxana/ProcessingConfigurator.h"
     39#include "G4GDMLParser.hh"
    4140
    4241class G4VPhysicalVolume;
     
    5251 
    5352private:
    54     SAXProcessor sxp;
    55     ProcessingConfigurator config;
     53
     54  G4GDMLParser parser;
    5655
    5756};
  • trunk/examples/advanced/human_phantom/include/G4ORNLFemaleBodyFactory.hh

    r807 r1230  
    3838#include "G4VPhysicalVolume.hh"
    3939
    40 #include "Saxana/SAXProcessor.h"
    41 #include "Saxana/ProcessingConfigurator.h"
    42 
    4340class G4VBodyFactory;
    4441class G4ORNLFemaleBodyFactory: public G4VBodyFactory
  • 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 
  • trunk/examples/advanced/lAr_calorimeter/GNUmakefile

    r807 r1230  
    1 # $Id: GNUmakefile,v 1.8 2006/11/14 14:49:19 ribon Exp $
     1# $Id: GNUmakefile,v 1.11 2009/11/12 12:43:14 ribon Exp $
    22# --------------------------------------------------------------
    33# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
     
    1414include $(G4INSTALL)/config/architecture.gmk
    1515
    16 #G4ANALYSIS_USE:= true
     16.PHONY: all
    1717
    18 ifdef G4ANALYSIS_USE
    19   CPPFLAGS += `aida-config --include`
    20   LDFLAGS += `aida-config --lib`
    21 endif
    22 
    23 
    24 .PHONY: all
    2518all: lib bin
    2619
  • trunk/examples/advanced/lAr_calorimeter/History

    r807 r1230  
    1 -------------------------------------------------------------------
    2 $Id: History,v 1.15 2006/11/14 14:49:19 ribon Exp $
     1Hi-------------------------------------------------------------------
     2$Id: History,v 1.19 2009/11/12 12:43:14 ribon Exp $
    33-------------------------------------------------------------------
    44
     
    99                      Category History file
    1010                      ---------------------
     11
     1212.11.2009 - A.Ribon (lAr_calorimeter-V09-02-01)
     13             Fixed mistake in GNUmakefile, and use QGSP_BIC_EMY
     14             as default Physics List (so that it tests the
     15             low-energy electromagnetic).
     16
     1706.04.2009 - G.A.P.Cirrone (lAr_calorimeter-V09-02-00)
     18             GNUmakefile updated
     19
     2012.06.2008 - G.A.P.Cirrone (lAr_calorimeter-V09-01-00)
     21             Fixed a compilation error in the Analysis manager
    1122
    122314.11.2006 - A.Ribon (lAr_calorimeter-V08-01-01)
  • trunk/examples/advanced/lAr_calorimeter/README

    r807 r1230  
    6161 ----------
    6262
    63  You can select between 3 Physics Lists: QGSP (default), LHEP, QGSC.
     63 You can select between 4 Physics Lists: QGSP, LHEP, QGSC, QGSP_BIC_EMY.
     64 The last one is set as default, so that you can test the low-energy
     65 electromagnetic.
    6466 The selection is done simply by comment/uncomment a line in the main
    6567 lArCal.cc  (look for the keyword  ***LOOKHERE***).
  • trunk/examples/advanced/lAr_calorimeter/include/FCALAnalysisManager.hh

    r807 r1230  
    5454class ITupleFactory;
    5555class ITuple;
    56 };
     56}
    5757#endif
    5858//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
  • trunk/examples/advanced/lAr_calorimeter/include/FCALCalorHit.hh

    r807 r1230  
    2525//
    2626// $Id: FCALCalorHit.hh,v 1.6 2006/06/29 16:01:10 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/include/FCALEMModuleSD.hh

    r807 r1230  
    2525//
    2626// $Id: FCALEMModuleSD.hh,v 1.8 2006/06/29 16:01:18 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/include/FCALHadModuleSD.hh

    r807 r1230  
    2525//
    2626// $Id: FCALHadModuleSD.hh,v 1.8 2006/06/29 16:01:44 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/include/FCALPrimaryGeneratorAction.hh

    r807 r1230  
    2525//
    2626// $Id: FCALPrimaryGeneratorAction.hh,v 1.6 2006/06/29 16:02:12 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/include/FCALRunAction.hh

    r807 r1230  
    2525//
    2626// $Id: FCALRunAction.hh,v 1.10 2006/06/29 16:02:14 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/include/FCALSteppingAction.hh

    r807 r1230  
    2525//
    2626// $Id: FCALSteppingAction.hh,v 1.7 2006/06/29 16:02:17 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/include/FCALSteppingVerbose.hh

    r807 r1230  
    2525//
    2626// $Id: FCALSteppingVerbose.hh,v 1.6 2006/06/29 16:02:20 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// 
  • trunk/examples/advanced/lAr_calorimeter/include/FCALTBEventAction.hh

    r807 r1230  
    2525//
    2626// $Id: FCALTBEventAction.hh,v 1.11 2006/06/29 16:02:23 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/include/FCALTestbeamSetupSD.hh

    r807 r1230  
    2525//
    2626// $Id: FCALTestbeamSetupSD.hh,v 1.7 2006/06/29 16:02:32 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/lArCal.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: lArCal.cc,v 1.11 2006/06/29 16:01:01 gunter Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: lArCal.cc,v 1.12 2009/11/12 12:43:14 ribon Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
     
    5858#include "QGSP.hh"
    5959#include "QGSC.hh"
     60#include "QGSP_BIC_EMY.hh"
    6061
    6162
    6263#ifdef G4ANALYSIS_USE
    63 
    6464
    6565#include "FCALRunAction.hh"
     
    8787  //***LOOKHERE*** CHOOSE THE PHYSICS LIST.
    8888  // runManager->SetUserInitialization(new LHEP);     // LHEP     
    89   runManager->SetUserInitialization(new QGSP);     // QGSP   
     89  // runManager->SetUserInitialization(new QGSP);     // QGSP   
    9090  // runManager->SetUserInitialization(new QGSC);     // QGSC
     91  runManager->SetUserInitialization(new QGSP_BIC_EMY);     // QGSP_BIC_EMY   
    9192  //***endLOOKHERE***
    9293 
  • trunk/examples/advanced/lAr_calorimeter/src/FCALCalorHit.cc

    r807 r1230  
    2525//
    2626// $Id: FCALCalorHit.cc,v 1.6 2006/06/29 16:02:51 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/src/FCALEMModuleSD.cc

    r807 r1230  
    2525//
    2626// $Id: FCALEMModuleSD.cc,v 1.12 2006/07/21 11:45:53 ribon Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/src/FCALHadModuleSD.cc

    r807 r1230  
    2525//
    2626// $Id: FCALHadModuleSD.cc,v 1.10 2006/07/21 11:45:53 ribon Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/src/FCALPrimaryGeneratorAction.cc

    r807 r1230  
    2525//
    2626// $Id: FCALPrimaryGeneratorAction.cc,v 1.9 2006/07/21 08:19:33 gcosmo Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/src/FCALRunAction.cc

    r807 r1230  
    2525//
    2626// $Id: FCALRunAction.cc,v 1.7 2006/06/29 16:03:13 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/src/FCALSteppingAction.cc

    r807 r1230  
    2525//
    2626// $Id: FCALSteppingAction.cc,v 1.7 2006/06/29 16:03:15 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/src/FCALSteppingVerbose.cc

    r807 r1230  
    2525//
    2626// $Id: FCALSteppingVerbose.cc,v 1.7 2006/06/29 16:03:17 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/src/FCALTBEventAction.cc

    r807 r1230  
    2525//
    2626// $Id: FCALTBEventAction.cc,v 1.13 2006/06/29 16:03:19 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/lAr_calorimeter/src/FCALTestbeamSetupSD.cc

    r807 r1230  
    2525//
    2626// $Id: FCALTestbeamSetupSD.cc,v 1.11 2006/06/29 16:03:25 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/examples/advanced/medical_linac/GNUmakefile

    r807 r1230  
    1 # --------------------------------------------------------------
    2 # $Id: GNUmakefile,v 1.2 2005/07/03 23:27:36 mpiergen Exp $
     1# $Id: GNUmakefile,v 1.7 2009/11/17 12:55:01 cirrone Exp $
    32# --------------------------------------------------------------
    43# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
    54# --------------------------------------------------------------
    65
    7 name := MedLinac
    8 
     6name := ml2
    97G4TARGET := $(name)
    108G4EXLIB := true
     
    1614.PHONY: all
    1715all: lib bin
     16
    1817include $(G4INSTALL)/config/binmake.gmk
    19 
    20 
    21 ifdef G4ANALYSIS_USE 
    22  CPPFLAGS += `aida-config --include`
    23  LDFLAGS  += `aida-config --lib`
    24  LOADLIBS += `aida-config --lib`
    25 endif
    26 
    27 ifdef G4STORE_DATA
    28   CPPFLAGS += -DG4STORE_DATA
    29 endif
    30 
  • trunk/examples/advanced/medical_linac/History

    r807 r1230  
    1 $Id: History,v 1.19 2007/07/06 21:39:05 mpiergen Exp $
     1$Id: History,v 1.27 2009/11/19 09:54:39 cirrone Exp $
    22-------------------------------------------------------------------
    33
     
    1111to briefly summarize all major modifications introduced in the code
    1212and keep track of all category-tags.
    13 It DOES NOT substitute the  CVS log-message one should put at every
    14 committal in the CVS repository !
    1513
    1614     ----------------------------------------------------------
    1715     * Reverse chronological order (last date on top), please *
    1816     ----------------------------------------------------------
     1719.11.2009   C. Andenna, B. Caccia, G.A.P.Cirrone tag medical_linac-V09-02-05
     18             History corrected, changed the local environmental variables name               
     19
     2018.11.2009   C. Andenna, B. Caccia, G.A.P.Cirrone tag medical_linac-V09-02-04
     21             updated of the include and src files, written the README_MedLinac2.txt.
     22
     2317.11.2009   C. Andenna, B. Caccia, G.A.P.Cirrone tag medical_linac-V09-02-03
     24             first realise of the new version of the medical linac
     25
     2618.09.2009   G.A.P.Cirrone, tag medical_linac-V09-02-02
     27           - Corrected a crash in the MedLinacHead.cc file class.
     28           - Update of the physics models: deleted the old and not
     29             more supported Lowenergy electromagnetic models and
     30             added the possibility to activate the physics lists and the
     31             Reference physics lists (or packages) directly
     32             via macro command;
     33           - Added the possibility to set cuts and max allowed step lenghts
     34             via macro commands
     35
     3615.09.2009   G.A.P.Cirrone, tag medical_linac-V09-02-01
     37             GNUmakefile corrected
     38
     3906.04.2009   G.A.P.Cirrone, tag medical_linac-V09-02-00
     40             GNUmakefile updated
     41
    194206.07.2007   Michela Piergentili, tag medical_linac-V08-03-02
    2043             bug 880 fixed in Detector Construction
  • trunk/examples/advanced/medical_linac/vis.mac

    r807 r1230  
    1 /PhysicsList/cut 0.2 mm
    2 /control/verbose 2
    3 /control/saveHistory
    4 /run/verbose 2
    5 /run/initialize
    6 
    71/vis/scene/create
    82/vis/open OGLIX
    9 #/vis/drawVolume
    10 /vis/viewer/update
    11 /vis/viewer/set/viewpointThetaPhi 70 20 deg
     3
     4/vis/drawVolume
     5
     6#/vis/scene/add/volume
     7
     8/vis/viewer/set/viewpointThetaPhi 45 45 deg
    129/vis/viewer/zoom 1
     10/vis/viewer/flush
     11/vis/scene/add/trajectories
     12/vis/scene/endOfEventAction accumulate 100
    1313
    14 /vis/viewer/flush
    15 #
    16 # draw scene/
    17 #
    18 #
    19 # for drawing the tracks
     14/run/beamOn 100
    2015
    21 /run/initialize
     16# acceleratorBox
     17# targetA
     18# targetB
     19# BeWTubePV
     20# ionizationChamberTubeW1PV
     21# ionizationChamberTubeP1PV
     22# ionizationChamberTubeW2PV
     23# ionizationChamberTubeP2PV
     24# ionizationChamberTubeW3PV
     25# ionizationChamberTubeP3PV
     26# FFL1A_1PV
     27# FFL2_1PV
     28# MirrorTubePV
     29# UpperCollimator
     30# CylMinusCone
     31# leafA0
     32# leafA1
     33# leafA2
     34# leafA3
     35# leafA4
     36# leafA5
     37# leafA6
     38# leafA7
     39# leafA8
     40# leafA9
     41# leafB0
     42# leafB1
     43# leafB2
     44# leafB3
     45# leafB4
     46# leafB5
     47# leafB6
     48# leafB7
     49# leafB8
     50# leafB9
     51# Jaws1XPV
     52# Jaws2XPV
     53# Jaws1YPV
     54# Jaws2YPV
     55# killerPlaneKPV
    2256
    23 /tracking/storeTrajectory 1
    24 /vis/scene/endOfEventAction accumulate
     57# phmWorldPV
     58# BoxInsidePV
     59# boxPMMAPV
     60# OutMinusInBoxPV
    2561
    26 /Phantom/dimension 15. cm
    27 /Phantom/Nvoxels 150
    28 /Phantom/maxStep 0.2 mm
    29 
    30 /PhantomSD/dimension 15. cm
    31 /PhantomSD/Nvoxels 150
    32 
    33 #    Multi Leaf
    34 
    35 /MLC/leaf_selection  a1
    36 /MLC/position 0. cm
    37 /MLC/leaf_selection  a2
    38 /MLC/position 0. cm
    39 /MLC/leaf_selection  a3
    40 /MLC/position 0. cm
    41 /MLC/leaf_selection  a4
    42 /MLC/position 0. cm
    43 /MLC/leaf_selection  a5
    44 /MLC/position 0. cm
    45 /MLC/leaf_selection  a6
    46 /MLC/position 0. cm
    47 /MLC/leaf_selection  a7
    48 /MLC/position 0. cm
    49 /MLC/leaf_selection  a8
    50 /MLC/position 0. cm
    51 /MLC/leaf_selection  a9
    52 /MLC/position 0. cm
    53 /MLC/leaf_selection  a10
    54 /MLC/position 0. cm
    55 /MLC/leaf_selection  a11
    56 /MLC/position 0. cm
    57 /MLC/leaf_selection  a12
    58 /MLC/position 0. cm
    59 /MLC/leaf_selection  a13
    60 /MLC/position 0. cm
    61 /MLC/leaf_selection  a14
    62 /MLC/position 0. cm
    63 /MLC/leaf_selection  a15
    64 /MLC/position 0. cm
    65 /MLC/leaf_selection  a16
    66 /MLC/position 0. cm
    67 /MLC/leaf_selection  a17
    68 /MLC/position 2.4 cm
    69 /MLC/leaf_selection  a18
    70 /MLC/position 2.7 cm
    71 /MLC/leaf_selection  a19
    72 /MLC/position 3.5 cm
    73 /MLC/leaf_selection  a20
    74 /MLC/position 4.0 cm
    75 /MLC/leaf_selection  a21
    76 /MLC/position 4.6 cm
    77 /MLC/leaf_selection  a22
    78 /MLC/position 5.0 cm
    79 /MLC/leaf_selection  a23
    80 /MLC/position 5.8 cm
    81 /MLC/leaf_selection  a24
    82 /MLC/position 6.0 cm
    83 /MLC/leaf_selection  a25
    84 /MLC/position 5.6 cm
    85 /MLC/leaf_selection  a26
    86 /MLC/position 0. cm
    87 /MLC/leaf_selection  a27
    88 /MLC/position 0. cm
    89 /MLC/leaf_selection  a28
    90 /MLC/position 0. cm
    91 /MLC/leaf_selection  a29
    92 /MLC/position 0. cm
    93 /MLC/leaf_selection  a30
    94 /MLC/position 0. cm
    95 /MLC/leaf_selection  a31
    96 /MLC/position 0. cm
    97 /MLC/leaf_selection  a32
    98 /MLC/position 0. cm
    99 /MLC/leaf_selection  a33
    100 /MLC/position 0. cm
    101 /MLC/leaf_selection  a34
    102 /MLC/position 0. cm
    103 /MLC/leaf_selection  a35
    104 /MLC/position 0. cm
    105 /MLC/leaf_selection  a36
    106 /MLC/position 0. cm
    107 /MLC/leaf_selection  a37
    108 /MLC/position 0. cm
    109 /MLC/leaf_selection  a38
    110 /MLC/position 0. cm
    111 /MLC/leaf_selection  a39
    112 /MLC/position 0. cm
    113 /MLC/leaf_selection  a40
    114 /MLC/position 0. cm
    115 
    116 
    117 /MLC/leaf_selection  b1
    118 /MLC/position 0. cm
    119 /MLC/leaf_selection  b2
    120 /MLC/position 0. cm
    121 /MLC/leaf_selection  b3
    122 /MLC/position 0. cm
    123 /MLC/leaf_selection  b4
    124 /MLC/position 0. cm
    125 /MLC/leaf_selection  b5
    126 /MLC/position 0. cm
    127 /MLC/leaf_selection  b6
    128 /MLC/position 0. cm
    129 /MLC/leaf_selection  b7
    130 /MLC/position 0. cm
    131 /MLC/leaf_selection  b8
    132 /MLC/position 0. cm
    133 /MLC/leaf_selection  b9
    134 /MLC/position 0. cm
    135 /MLC/leaf_selection  b10
    136 /MLC/position 0. cm
    137 /MLC/leaf_selection  b11
    138 /MLC/position 0. cm
    139 /MLC/leaf_selection  b12
    140 /MLC/position 0. cm
    141 /MLC/leaf_selection  b13
    142 /MLC/position 0. cm
    143 /MLC/leaf_selection  b14
    144 /MLC/position 0. cm
    145 /MLC/leaf_selection  b15
    146 /MLC/position 0. cm
    147 /MLC/leaf_selection  b16
    148 /MLC/position 0. cm
    149 /MLC/leaf_selection  b17
    150 /MLC/position 2.3 cm
    151 /MLC/leaf_selection  b18
    152 /MLC/position 2.8 cm
    153 /MLC/leaf_selection  b19
    154 /MLC/position 3.5 cm
    155 /MLC/leaf_selection  b20
    156 /MLC/position 4.4 cm
    157 /MLC/leaf_selection  b21
    158 /MLC/position 4.7 cm
    159 /MLC/leaf_selection  b22
    160 /MLC/position 5.4 cm
    161 /MLC/leaf_selection  b23
    162 /MLC/position 5.7 cm
    163 /MLC/leaf_selection  b24
    164 /MLC/position 5.8 cm
    165 /MLC/leaf_selection  b25
    166 /MLC/position 5.4 cm
    167 /MLC/leaf_selection  b26
    168 /MLC/position 0. cm
    169 /MLC/leaf_selection  b27
    170 /MLC/position 0. cm
    171 /MLC/leaf_selection  b28
    172 /MLC/position 0. cm
    173 /MLC/leaf_selection  b29
    174 /MLC/position 0. cm
    175 /MLC/leaf_selection  b30
    176 /MLC/position 0. cm
    177 /MLC/leaf_selection  b31
    178 /MLC/position 0. cm
    179 /MLC/leaf_selection  b32
    180 /MLC/position 0. cm
    181 /MLC/leaf_selection  b33
    182 /MLC/position 0. cm
    183 /MLC/leaf_selection  b34
    184 /MLC/position 0. cm
    185 /MLC/leaf_selection  b35
    186 /MLC/position 0. cm
    187 /MLC/leaf_selection  b36
    188 /MLC/position 0. cm
    189 /MLC/leaf_selection  b37
    190 /MLC/position 0. cm
    191 /MLC/leaf_selection  b38
    192 /MLC/position 0. cm
    193 /MLC/leaf_selection  b39
    194 /MLC/position 0. cm
    195 /MLC/leaf_selection  b40
    196 /MLC/position 0. cm
    197 
    198 /Jaws/X1/DistanceFromAxis -4.2 cm
    199 /Jaws/X2/DistanceFromAxis 5.2 cm
    200 /Jaws/Y1/DistanceFromAxis -6.6 cm
    201 /Jaws/Y2/DistanceFromAxis 6.8 cm
    202 
    203 /Jaws/update
    204 
    205 /energy 6.0 MeV
    206 /sourceType 0.127 MeV
    207 /vis/viewer/update
    208 /run/beamOn 10
    209 
    210 
  • trunk/examples/advanced/microbeam/History

    r807 r1230  
    11-------------------------------------------------------------------
    2 $Id: History,v 1.16 2007/08/28 09:48:40 gcosmo Exp $
     2$Id: History,v 1.21 2009/04/30 10:23:57 sincerti Exp $
    33-------------------------------------------------------------------
    44
     
    99                       Package History file
    1010                       --------------------
     11
     1230 April 2009 - S. Incerti - tag microbeam-V09-02-01
     13- Updated Physics list to migrated Livermore processes
     14- Corrected plot.C
     15- Corrected switching field value
     16
     1726 February 2009 - G.Folger  - tag microbeam-V09-02-00
     18- Correct  MicrobeamEMField.cc to use logical &&, not bit & in if().
     19 
     2023 October 2008 - tag microbeam-V09-01-03
     21- Corrected typos in zero field region in MicrobeamEMField.cc
     22
     2320 August 2008 - tag microbeam-V09-01-02
     24- Modified process ordering of G4eBremsstrahlung and G4StepLimiter in MicrobeamPhysicstList.cc
     25
     2616 June 2008 - tag microbeam-V09-01-01
     27- Added units in MicrobeamPhantomconfiguration.cc and
     28  MicrobeamSteppingAction.cc
    1129
    123028 August 2007 - tag microbeam-V09-00-03 - G. Cosmo
  • trunk/examples/advanced/microbeam/microbeam.out

    r807 r1230  
     1
     2        ############################################
     3        !!! WARNING - FPE detection is activated !!!
     4        ############################################
    15
    26*************************************************************
    3  Geant4 version Name: global-V09-00-03    (9-May-2008)
     7 Geant4 version Name: geant4-09-03-ref-00    (18-December-2009)
    48                      Copyright : Geant4 Collaboration
    59                      Reference : NIM A 506 (2003), 250-303
     
    2024  VRML1FILE (VRML1FILE)
    2125  VRML2FILE (VRML2FILE)
     26  gMocrenFile (gMocrenFile)
    2227  OpenGLImmediateX (OGLIX)
    2328  OpenGLStoredX (OGLSX)
     
    4348***** Table : Nb of materials = 16 *****
    4449
    45  Material:   Vacuum     density:  0.000 mg/cm3  RadL: 204727576.737 pc   Imean:  21.800 eV   temperature: 273.15 K  pressure:   1.00 atm
     50 Material:   Vacuum     density:  0.000 kg/m3   RadL: 204727512.315 pc   Nucl.Int.Length: 113804112.800 pc   Imean:  21.800 eV   temperature: 273.15 K  pressure:   1.00 atm
    4651   --->  Element: Vacuum ( )   Z =  1.0   N =   1.0   A =   1.01 g/mole  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
    4752
    48  Material:      H2O     density:  1.000 g/cm3   RadL:  36.092 cm   Imean:  70.893 eV
     53 Material:      H2O     density:  1.000 g/cm3   RadL:  36.092 cm   Nucl.Int.Length:  75.416 cm   Imean:  70.893 eV
    4954   --->  Element: Hydrogen (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole  ElmMassFraction:  11.21 %  ElmAbundance  66.67 %
    5055   --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  88.79 %  ElmAbundance  33.33 %
    5156
    52  Material:      Air     density:  1.290 mg/cm3  RadL: 285.161 m    Imean:  85.684 eV   temperature: 293.16 K  pressure:   1.00 atm
     57 Material:      Air     density:  1.290 mg/cm3  RadL: 285.161 m    Nucl.Int.Length: 662.680 m    Imean:  85.684 eV   temperature: 293.16 K  pressure:   1.00 atm
    5358   --->  Element: Nitrogen (N)   Z =  7.0   N =  14.0   A =  14.01 g/mole  ElmMassFraction:  70.00 %  ElmAbundance  72.71 %
    5459   --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  30.00 %  ElmAbundance  27.29 %
    5560
    56  Material:    LPAir     density:  0.000 mg/cm3  RadL: 56273252.573 km   Imean:  87.308 eV   temperature: 293.16 K  pressure:   1.00 atm
     61 Material:    LPAir     density:  0.000 kg/m3   RadL: 56273234.858 km   Nucl.Int.Length: 135377105.890 km   Imean:  87.308 eV   temperature: 293.16 K  pressure:   1.00 atm
    5762   --->  Element: Nitrogen (N)   Z =  7.0   N =  14.0   A =  14.01 g/mole  ElmMassFraction:  71.50 %  ElmAbundance  75.57 %
    5863   --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  25.00 %  ElmAbundance  23.14 %
    5964   --->  Element: Argon (Ar)   Z = 18.0   N =  39.9   A =  39.95 g/mole  ElmMassFraction:   3.50 %  ElmAbundance   1.30 %
    6065
    61  Material:       Pl     density: 21.400 g/cm3   RadL:   3.058 mm   Imean: 787.800 eV
     66 Material:       Pl     density: 21.400 g/cm3   RadL:   3.058 mm   Nucl.Int.Length:   9.486 cm   Imean: 787.800 eV
    6267   --->  Element: Pl ( )   Z = 78.0   N = 195.1   A = 195.09 g/mole  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
    6368
    64  Material:   Butane     density:  0.026 mg/cm3  RadL:  17.729 km   Imean:  53.612 eV   temperature: 293.16 K  pressure:   0.01 atm
     69 Material:   Butane     density:  0.026 kg/m3   RadL:  17.729 km   Nucl.Int.Length:  25.686 km   Imean:  53.612 eV   temperature: 293.16 K  pressure:   0.01 atm
    6570   --->  Element: Carbon (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole  ElmMassFraction:  82.63 %  ElmAbundance  28.57 %
    6671   --->  Element: Hydrogen (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole  ElmMassFraction:  17.37 %  ElmAbundance  71.43 %
    6772
    68  Material: Polyprop     density: 900.000 mg/cm3  RadL:  49.764 cm   Imean:  56.713 eV
     73 Material: Polyprop     density: 900.000 mg/cm3  RadL:  49.764 cm   Nucl.Int.Length:  75.179 cm   Imean:  56.713 eV
    6974   --->  Element: Carbon (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole  ElmMassFraction:  85.60 %  ElmAbundance  33.33 %
    7075   --->  Element: Hydrogen (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole  ElmMassFraction:  14.40 %  ElmAbundance  66.67 %
    7176
    72  Material:    Si3N4     density:  3.440 g/cm3   RadL:   7.644 cm   Imean: 128.542 eV
     77 Material:    Si3N4     density:  3.440 g/cm3   RadL:   7.644 cm   Nucl.Int.Length:  28.008 cm   Imean: 128.542 eV
    7378   --->  Element: Silicon (Si)   Z = 14.0   N =  28.1   A =  28.09 g/mole  ElmMassFraction:  60.06 %  ElmAbundance  42.86 %
    7479   --->  Element: Nitrogen (N)   Z =  7.0   N =  14.0   A =  14.01 g/mole  ElmMassFraction:  39.94 %  ElmAbundance  57.14 %
    7580
    76  Material:     SiO2     density:  2.500 g/cm3   RadL:  10.819 cm   Imean: 126.007 eV
     81 Material:     SiO2     density:  2.500 g/cm3   RadL:  10.819 cm   Nucl.Int.Length:  38.343 cm   Imean: 126.007 eV
    7782   --->  Element: Silicon (Si)   Z = 14.0   N =  28.1   A =  28.09 g/mole  ElmMassFraction:  46.74 %  ElmAbundance  33.33 %
    7883   --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  53.26 %  ElmAbundance  66.67 %
    7984
    80  Material:   Laiton     density:  8.500 g/cm3   RadL:   1.487 cm   Imean: 325.993 eV
     85 Material:   Laiton     density:  8.500 g/cm3   RadL:   1.487 cm   Nucl.Int.Length:  16.512 cm   Imean: 325.993 eV
    8186   --->  Element: Cuivre (Cu)   Z = 29.0   N =  63.5   A =  63.55 g/mole  ElmMassFraction:  49.28 %  ElmAbundance  50.00 %
    8287   --->  Element: Zinc (Zn)   Z = 30.0   N =  65.4   A =  65.41 g/mole  ElmMassFraction:  50.72 %  ElmAbundance  50.00 %
    8388
    84  Material: Cytoplasm1     density:  1.000 g/cm3   RadL:  48.413 cm   Imean:  31.293 eV
     89 Material: Cytoplasm1     density:  1.000 g/cm3   RadL:  48.413 cm   Nucl.Int.Length:  46.131 cm   Imean:  31.293 eV
    8590   --->  Element: Hydrogen (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole  ElmMassFraction:  59.60 %  ElmAbundance  95.53 %
    8691   --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  24.24 %  ElmAbundance   2.45 %
     
    8994   --->  Element: Phosphorus (P)   Z = 15.0   N =  31.0   A =  30.97 g/mole  ElmMassFraction:   1.01 %  ElmAbundance   0.05 %
    9095
    91  Material: Cytoplasm2     density: 10.000 g/cm3   RadL:   3.619 cm   Imean:  71.338 eV
     96 Material: Cytoplasm2     density: 10.000 g/cm3   RadL:   3.619 cm   Nucl.Int.Length:   7.563 cm   Imean:  71.338 eV
    9297   --->  Element: Hydrogen (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole  ElmMassFraction:  10.64 %  ElmAbundance  64.80 %
    9398   --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  74.50 %  ElmAbundance  28.64 %
     
    96101   --->  Element: Phosphorus (P)   Z = 15.0   N =  31.0   A =  30.97 g/mole  ElmMassFraction:   2.61 %  ElmAbundance   0.52 %
    97102
    98  Material: Cytoplasm3     density:  1.000 g/cm3   RadL:  48.413 cm   Imean:  31.293 eV
     103 Material: Cytoplasm3     density:  1.000 g/cm3   RadL:  48.413 cm   Nucl.Int.Length:  46.131 cm   Imean:  31.293 eV
    99104   --->  Element: Hydrogen (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole  ElmMassFraction:  59.60 %  ElmAbundance  95.53 %
    100105   --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  24.24 %  ElmAbundance   2.45 %
     
    103108   --->  Element: Phosphorus (P)   Z = 15.0   N =  31.0   A =  30.97 g/mole  ElmMassFraction:   1.01 %  ElmAbundance   0.05 %
    104109
    105  Material: Nucleus1     density:  1.000 g/cm3   RadL:  36.185 cm   Imean:  71.338 eV
     110 Material: Nucleus1     density:  1.000 g/cm3   RadL:  36.185 cm   Nucl.Int.Length:  75.626 cm   Imean:  71.338 eV
    106111   --->  Element: Hydrogen (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole  ElmMassFraction:  10.64 %  ElmAbundance  64.80 %
    107112   --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  74.50 %  ElmAbundance  28.64 %
     
    110115   --->  Element: Phosphorus (P)   Z = 15.0   N =  31.0   A =  30.97 g/mole  ElmMassFraction:   2.61 %  ElmAbundance   0.52 %
    111116
    112  Material: Nucleus2     density:  1.100 g/cm3   RadL:  32.896 cm   Imean:  71.338 eV
     117 Material: Nucleus2     density:  1.100 g/cm3   RadL:  32.896 cm   Nucl.Int.Length:  68.751 cm   Imean:  71.338 eV
    113118   --->  Element: Hydrogen (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole  ElmMassFraction:  10.64 %  ElmAbundance  64.80 %
    114119   --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  74.50 %  ElmAbundance  28.64 %
     
    117122   --->  Element: Phosphorus (P)   Z = 15.0   N =  31.0   A =  30.97 g/mole  ElmMassFraction:   2.61 %  ElmAbundance   0.52 %
    118123
    119  Material: Nucleus3     density:  1.000 g/cm3   RadL:  36.185 cm   Imean:  71.338 eV
     124 Material: Nucleus3     density:  1.000 g/cm3   RadL:  36.185 cm   Nucl.Int.Length:  75.626 cm   Imean:  71.338 eV
    120125   --->  Element: Hydrogen (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole  ElmMassFraction:  10.64 %  ElmAbundance  64.80 %
    121126   --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  74.50 %  ElmAbundance  28.64 %
     
    127132 ==========> The phantom contains 53480 voxels
    128133
    129 Thank you for using G4BinaryCascade.
    130134MicrobeamPhysicsList::SetCuts:CutLength : 10 nm
    131135
    132 msc:  Model variant of multiple scattering for e-
    133       Lambda tables from 100 eV  to 100 TeV in 120 bins.
    134       LateralDisplacementFlag=  1   Skin= 0
    135       Boundary/stepping algorithm is active with RangeFactor= 0.02  Step limit type 1
    136 G4AugerData for Element no. 6 are loaded
    137 G4AugerData for Element no. 7 are loaded
    138 G4AugerData for Element no. 8 are loaded
    139 G4AugerData for Element no. 14 are loaded
    140 G4AugerData for Element no. 15 are loaded
    141 G4AugerData for Element no. 18 are loaded
    142 G4AugerData for Element no. 29 are loaded
    143 G4AugerData for Element no. 30 are loaded
    144 G4AugerData for Element no. 78 are loaded
    145 AugerTransitionTable complete
    146 
    147 IONI:  Total cross sections from EEDL database.
    148       Gamma energy sampled from a parametrised formula.
    149       Implementation of the continuous dE/dx part.
    150       At present it can be used for electrons in the energy range [250eV,100GeV].
    151       The process must work with G4LowEnergyBremsstrahlung.
    152 
    153 LowEnBrem:  Total cross sections from EEDL database.
    154       Gamma energy sampled from a parameterised formula.
    155       Implementation of the continuous dE/dx part.
    156       At present it can be used for electrons in the energy range [250eV,100GeV].
    157       The process must work with G4LowEnergyIonisation.
    158 
    159 eIoni:   tables are built for  e+
    160       dE/dx and range tables from 100 eV  to 100 TeV in 120 bins.
    161       Lambda tables from threshold to 100 TeV in 120 bins.
    162       Delta cross sections and sampling from MollerBhabha model
    163       Good description from 1 KeV to 100 GeV.
    164       Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1
    165 
    166 eBrem:   tables are built for  e+
    167       dE/dx and range tables from 100 eV  to 100 TeV in 120 bins.
    168       Lambda tables from threshold to 100 TeV in 120 bins.
    169       Total cross sections and sampling from StandBrem model (based on the EEDL data library)
    170       Good description from 1 KeV to 100 GeV, log scale extrapolation above 100 GeV. LPM flag 1
    171 
    172 annihil:       Sampling according eplus2gg model
    173       tables are built for  e+
    174       Lambda tables from 100 eV  to 100 TeV in 120 bins.
    175 
    176 msc:  Model variant of multiple scattering for proton
    177       Lambda tables from 100 eV  to 100 TeV in 120 bins.
    178       LateralDisplacementFlag=  1   Skin= 0
    179       Boundary/stepping algorithm is active with RangeFactor= 0.2  Step limit type 0
    180 
    181 hLowEIoni:    Knock-on electron cross sections .
    182         Good description above the mean excitation energy.
    183         Delta ray energy sampled from  differential Xsection.
    184         PhysicsTables from 10 eV  to 0.1 TeV  in 360 bins.
    185         Electronic stopping power model is  ICRU_R49He
    186         from 1 keV  to 2.5 MeV .
    187 
    188         Parametrisation model for antiprotons is  ICRU_R49p
    189         from 25 keV  to 2 MeV .
    190         Parametrization of the Barkas effect is switched on.
    191         Nuclear stopping power model is ICRU_R49
    192 
    193 msc:  Model variant of multiple scattering for GenericIon
    194       LateralDisplacementFlag=  0   Skin= 0
    195       Boundary/stepping algorithm is active with RangeFactor= 0.2  Step limit type 1
    196 
    197 hLowEIoni:    Knock-on electron cross sections .
    198         Good description above the mean excitation energy.
    199         Delta ray energy sampled from  differential Xsection.
    200         PhysicsTables from 10 eV  to 0.1 TeV  in 360 bins.
    201         Electronic stopping power model is  ICRU_R49p
    202         from 1 keV  to 2 MeV .
    203 
    204         Parametrisation model for antiprotons is  ICRU_R49He
    205         from 25 keV  to 2 MeV .
    206         Parametrization of the Barkas effect is switched on.
    207         Nuclear stopping power model is ICRU_R49
    208 
    209 msc:  Model variant of multiple scattering for pi-
    210       Lambda tables from 100 eV  to 100 TeV in 120 bins.
    211       LateralDisplacementFlag=  1   Skin= 0
    212       Boundary/stepping algorithm is active with RangeFactor= 0.2  Step limit type 0
     136phot:   for  gamma    SubType= 12
     137      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
     138 LivermorePhElectric :     Emin=          0 eV         Emax=   100 GeV
     139       PhotoElectric :     Emin=        100 GeV        Emax=   10 TeV
     140
     141compt:   for  gamma    SubType= 13
     142      Lambda tables from 100 eV  to 10 TeV in 77 bins, spline: 1
     143      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
     144    LivermoreCompton :     Emin=          0 eV         Emax=   100 GeV
     145       Klein-Nishina :     Emin=        100 GeV        Emax=   10 TeV
     146
     147conv:   for  gamma    SubType= 14
     148      Lambda tables from 1.022 MeV to 10 TeV in 77 bins, spline: 1
     149      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
     150 LivermoreConversion :     Emin=          0 eV         Emax=   100 GeV
     151       Bethe-Heitler :     Emin=        100 GeV        Emax=   10 TeV
     152
     153Rayl:   for  gamma    SubType= 11
     154      Lambda tables from 100 eV  to 10 TeV in 200 bins, spline: 1
     155      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
     156   LivermoreRayleigh :     Emin=          0 eV         Emax=   100 GeV
     157
     158msc:   for e-    SubType= 10
     159      Lambda tables from 100 eV  to 10 TeV in 77 bins, spline: 1
     160      RangeFactor= 0.04, step limit type: 2, lateralDisplacement: 1, skin= 3, geomFactor= 2.5
     161      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
     162          UrbanMsc92 :     Emin=          0 eV         Emax=   10 TeV
     163
     164eIoni:   for  e-    SubType= 2
     165      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
     166      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
     167      finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
     168      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
     169       LowEnergyIoni :     Emin=          0 eV         Emax=   100 GeV
     170        MollerBhabha :     Emin=        100 GeV        Emax=   10 TeV
     171
     172eBrem:   for  e-    SubType= 3
     173      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
     174      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
     175      LPM flag: 1 for E > 1 GeV
     176      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
     177           LowEnBrem :     Emin=          0 eV         Emax=   100 GeV
     178            eBremRel :     Emin=        100 GeV        Emax=   10 TeV
     179
     180eIoni:   for  e+    SubType= 2
     181      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
     182      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
     183      finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
     184      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
     185        MollerBhabha :     Emin=          0 eV         Emax=   10 TeV
     186
     187eBrem:   for  e+    SubType= 3
     188      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
     189      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
     190      LPM flag: 1 for E > 1 GeV
     191      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
     192               eBrem :     Emin=          0 eV         Emax=   1 GeV
     193            eBremRel :     Emin=          1 GeV        Emax=   10 TeV
     194
     195annihil:   for  e+    SubType= 5
     196      Lambda tables from 100 eV  to 10 TeV in 77 bins, spline: 1
     197      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
     198            eplus2gg :     Emin=          0 eV         Emax=   10 TeV
     199
     200msc:   for GenericIon    SubType= 10
     201      RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0, skin= 3, geomFactor= 2.5
     202      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
     203          UrbanMsc90 :     Emin=          0 eV         Emax=   10 TeV
     204
     205ionIoni:   for  GenericIon    SubType= 2
     206      dE/dx and range tables from 100 eV  to 10 TeV in 77 bins
     207      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
     208      finalRange(mm)= 0.02, dRoverRange= 0.1, integral: 1, fluct: 1, linLossLimit= 0.02
     209      Stopping Power data for 17 ion/material pairs, nuclearStopping: 1
     210      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
     211         ParamICRU73 :     Emin=          0 eV         Emax=   10 TeV
     212============================================================================================
     213             HADRONIC PROCESSES SUMMARY (verbose level 1)
     214============================================================================================
    213215
    214216========= Table of registered couples ==============================
     
    216218Index : 0     used in the geometry : Yes     recalculation needed : No
    217219 Material : Vacuum
    218  Range cuts        :  gamma 10 nm     e- 10 nm     e+ 10 nm
    219  Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV
     220 Range cuts        :  gamma  10 nm     e-  10 nm     e+  10 nm  proton 0 fm
     221 Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV
    220222 Region(s) which use this couple :
    221223    DefaultRegionForTheWorld
     
    223225Index : 1     used in the geometry : Yes     recalculation needed : No
    224226 Material : Pl
    225  Range cuts        :  gamma 10 nm     e- 10 nm     e+ 10 nm
    226  Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV
     227 Range cuts        :  gamma  10 nm     e-  10 nm     e+  10 nm  proton 0 fm
     228 Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV
    227229 Region(s) which use this couple :
    228230    DefaultRegionForTheWorld
     
    230232Index : 2     used in the geometry : Yes     recalculation needed : No
    231233 Material : Butane
    232  Range cuts        :  gamma 10 nm     e- 10 nm     e+ 10 nm
    233  Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV
     234 Range cuts        :  gamma  10 nm     e-  10 nm     e+  10 nm  proton 0 fm
     235 Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV
    234236 Region(s) which use this couple :
    235237    DefaultRegionForTheWorld
     
    237239Index : 3     used in the geometry : Yes     recalculation needed : No
    238240 Material : Laiton
    239  Range cuts        :  gamma 10 nm     e- 10 nm     e+ 10 nm
    240  Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV
     241 Range cuts        :  gamma  10 nm     e-  10 nm     e+  10 nm  proton 0 fm
     242 Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV
    241243 Region(s) which use this couple :
    242244    DefaultRegionForTheWorld
     
    244246Index : 4     used in the geometry : Yes     recalculation needed : No
    245247 Material : Si3N4
    246  Range cuts        :  gamma 10 nm     e- 10 nm     e+ 10 nm
    247  Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV
     248 Range cuts        :  gamma  10 nm     e-  10 nm     e+  10 nm  proton 0 fm
     249 Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV
    248250 Region(s) which use this couple :
    249251    DefaultRegionForTheWorld
     
    251253Index : 5     used in the geometry : Yes     recalculation needed : No
    252254 Material : Air
    253  Range cuts        :  gamma 10 nm     e- 10 nm     e+ 10 nm
    254  Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV
     255 Range cuts        :  gamma  10 nm     e-  10 nm     e+  10 nm  proton 0 fm
     256 Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV
    255257 Region(s) which use this couple :
    256258    DefaultRegionForTheWorld
     
    258260Index : 6     used in the geometry : Yes     recalculation needed : No
    259261 Material : Polyprop
    260  Range cuts        :  gamma 10 nm     e- 10 nm     e+ 10 nm
    261  Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV
     262 Range cuts        :  gamma  10 nm     e-  10 nm     e+  10 nm  proton 0 fm
     263 Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV
    262264 Region(s) which use this couple :
    263265    DefaultRegionForTheWorld
     
    265267Index : 7     used in the geometry : Yes     recalculation needed : No
    266268 Material : H2O
    267  Range cuts        :  gamma 10 nm     e- 10 nm     e+ 10 nm
    268  Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV
     269 Range cuts        :  gamma  10 nm     e-  10 nm     e+  10 nm  proton 0 fm
     270 Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV
    269271 Region(s) which use this couple :
    270272    DefaultRegionForTheWorld
     
    272274Index : 8     used in the geometry : Yes     recalculation needed : No
    273275 Material : Cytoplasm1
    274  Range cuts        :  gamma 10 nm     e- 10 nm     e+ 10 nm
    275  Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV
     276 Range cuts        :  gamma  10 nm     e-  10 nm     e+  10 nm  proton 0 fm
     277 Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV
    276278 Region(s) which use this couple :
    277279    DefaultRegionForTheWorld
     
    279281Index : 9     used in the geometry : Yes     recalculation needed : No
    280282 Material : Nucleus1
    281  Range cuts        :  gamma 10 nm     e- 10 nm     e+ 10 nm
    282  Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV
     283 Range cuts        :  gamma  10 nm     e-  10 nm     e+  10 nm  proton 0 fm
     284 Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV
    283285 Region(s) which use this couple :
    284286    DefaultRegionForTheWorld
     
    286288Index : 10     used in the geometry : Yes     recalculation needed : No
    287289 Material : Nucleus2
    288  Range cuts        :  gamma 10 nm     e- 10 nm     e+ 10 nm
    289  Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV
     290 Range cuts        :  gamma  10 nm     e-  10 nm     e+  10 nm  proton 0 fm
     291 Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV
    290292 Region(s) which use this couple :
    291293    DefaultRegionForTheWorld
     
    293295Index : 11     used in the geometry : Yes     recalculation needed : No
    294296 Material : Cytoplasm2
    295  Range cuts        :  gamma 10 nm     e- 10 nm     e+ 10 nm
    296  Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV
     297 Range cuts        :  gamma  10 nm     e-  10 nm     e+  10 nm  proton 0 fm
     298 Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV
    297299 Region(s) which use this couple :
    298300    DefaultRegionForTheWorld
     
    300302Index : 12     used in the geometry : Yes     recalculation needed : No
    301303 Material : SiO2
    302  Range cuts        :  gamma 10 nm     e- 10 nm     e+ 10 nm
    303  Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV
     304 Range cuts        :  gamma  10 nm     e-  10 nm     e+  10 nm  proton 0 fm
     305 Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV
    304306 Region(s) which use this couple :
    305307    DefaultRegionForTheWorld
     
    321323-> Event # 2 generated
    322324   ===> The incident alpha particle has reached the targeted cell :
    323    -----> total absorbed dose within Nucleus   is (Gy) = 0.40389574
    324    -----> total absorbed dose within Cytoplasm is (Gy) = 0.04089877
     325   -----> total absorbed dose within Nucleus   is (Gy) = 0.35642141103745
     326   -----> total absorbed dose within Cytoplasm is (Gy) = 0.06113151460886
    325327
    326328-> Event # 3 generated
     329   ===> Sorry, the incident alpha particle has missed the targeted cell !
     330
     331-> Event # 4 generated
     332   ===> Sorry, the incident alpha particle has missed the targeted cell !
     333
     334-> Event # 5 generated
     335   ===> Sorry, the incident alpha particle has missed the targeted cell !
     336
     337-> Event # 6 generated
    327338   ===> The incident alpha particle has reached the targeted cell :
    328    -----> total absorbed dose within Nucleus   is (Gy) = 0.30514622
    329    -----> total absorbed dose within Cytoplasm is (Gy) = 0.090157568
    330 
    331 -> Event # 4 generated
    332    ===> Sorry, the incident alpha particle has missed the targeted cell !
    333 
    334 -> Event # 5 generated
    335    ===> Sorry, the incident alpha particle has missed the targeted cell !
    336 
    337 -> Event # 6 generated
    338    ===> Sorry, the incident alpha particle has missed the targeted cell !
     339   -----> total absorbed dose within Nucleus   is (Gy) = 0.37929552793503
     340   -----> total absorbed dose within Cytoplasm is (Gy) = 0.073292337357998
    339341
    340342-> Event # 7 generated
    341343   ===> The incident alpha particle has reached the targeted cell :
    342    -----> total absorbed dose within Nucleus   is (Gy) = 0.37321898
    343    -----> total absorbed dose within Cytoplasm is (Gy) = 0.070893854
     344   -----> total absorbed dose within Nucleus   is (Gy) = 0.44333383440971
     345   -----> total absorbed dose within Cytoplasm is (Gy) = 0.088046304881573
    344346
    345347-> Event # 8 generated
    346    ===> Sorry, the incident alpha particle has missed the targeted cell !
     348   ===> The incident alpha particle has reached the targeted cell :
     349   -----> total absorbed dose within Nucleus   is (Gy) = 0.31207606196404
     350   -----> total absorbed dose within Cytoplasm is (Gy) = 0.077978290617466
    347351
    348352-> Event # 9 generated
     
    353357
    354358ERROR: G4VisCommandsViewerUpdate::SetNewValue: no current viewer.
    355 -> Total number of particles detected by the gas detector : 3
    356 
    357 Graphics systems deleted.
     359-> Total number of particles detected by the gas detector : 4
     360
     361Idle> Graphics systems deleted.
    358362Visualization Manager deleting...
     363
  • trunk/examples/advanced/microbeam/plot.C

    r807 r1230  
    11// -------------------------------------------------------------------
    2 // $Id: plot.C,v 1.4 2006/06/01 22:25:19 sincerti Exp $
     2// $Id: plot.C,v 1.5 2009/04/30 10:23:57 sincerti Exp $
    33// -------------------------------------------------------------------
    44//
     
    117117        h2->SetFillColor(4);
    118118        h2->SetLineColor(4);
     119        h2->Fit("gaus");
    119120        gaus->SetLineColor(6);
    120121        h2->Fit("gaus");
  • trunk/examples/advanced/microbeam/src/MicrobeamEMField.cc

    r807 r1230  
    2525//
    2626// -------------------------------------------------------------------
    27 // $Id: MicrobeamEMField.cc,v 1.6 2007/07/06 06:52:54 sincerti Exp $
     27// $Id: MicrobeamEMField.cc,v 1.9 2009/04/30 10:23:57 sincerti Exp $
    2828// -------------------------------------------------------------------
    2929
     
    5858// ***********************
    5959 
    60    // MAGNETIC FIELD VALUE FOR 3 MeV ALPHAS
    61   G4double switchingField = 0.0589768635 * tesla ;
     60  // MAGNETIC FIELD VALUE FOR 3 MeV ALPHAS
     61  //  G4double switchingField = 0.0589768635 * tesla ;
     62  G4double switchingField =   0.0590201 * tesla ;
    6263 
    6364  // BEAM START
     
    181182  G4double xoprime, zoprime;
    182183 
    183 if (z>=-1400*mm & z <-200*mm)
     184if (z>=-1400*mm && z <-200*mm)
    184185{
    185186  Bx=0; By=0; Bz=0;
     
    523524
    524525if (
    525 (Bfield[0]==0. &
    526 Bfield[1]==0. &
    527 Bfield[2]==0. &
    528 Bfield[4]==0. &
    529 Bfield[5]==0. &
    530 Bfield[6]==0. )
    531 )
     526     (Bfield[0]==0. &&
     527      Bfield[1]==0. &&
     528      Bfield[2]==0. &&
     529      Bfield[3]==0. &&
     530      Bfield[4]==0. &&
     531      Bfield[5]==0. )
     532   )
    532533{
    533534
  • trunk/examples/advanced/microbeam/src/MicrobeamPhantomConfiguration.cc

    r807 r1230  
    2525//
    2626// -------------------------------------------------------------------
    27 // $Id: MicrobeamPhantomConfiguration.cc,v 1.5 2006/06/29 16:05:31 gunter Exp $
     27// $Id: MicrobeamPhantomConfiguration.cc,v 1.6 2008/06/16 07:46:11 sincerti Exp $
    2828// -------------------------------------------------------------------
    2929
     
    8787    if (mat==2) // NUCLEUS
    8888        {
    89           if (den==1) density = denNucl1;
    90           if (den==2) density = denNucl2;
    91           if (den==3) density = denNucl3;
     89          if (den==1) density = denNucl1*(g/cm3);
     90          if (den==2) density = denNucl2*(g/cm3);
     91          if (den==3) density = denNucl3*(g/cm3);
    9292          nucleusMass   = nucleusMass   + density * dx * dy * dz ;
    9393        }
     
    9595    if (mat==1) // CYTOPLASM
    9696        {
    97           if (den==1) density = denCyto1;
    98           if (den==2) density = denCyto2;
    99           if (den==3) density = denCyto3;
     97          if (den==1) density = denCyto1*(g/cm3);
     98          if (den==2) density = denCyto2*(g/cm3);
     99          if (den==3) density = denCyto3*(g/cm3);
    100100          cytoplasmMass = cytoplasmMass + density * dx * dy * dz ;
    101101        }
     
    106106
    107107  fclose(fMap);
    108  
    109   nucleusMass   = nucleusMass * 1e-6 ;
    110   cytoplasmMass = cytoplasmMass * 1e-6 ;
    111  
     108
    112109  return 0;
    113110}
  • trunk/examples/advanced/microbeam/src/MicrobeamPhysicsList.cc

    r807 r1230  
    2525//
    2626// -------------------------------------------------------------------
    27 // $Id: MicrobeamPhysicsList.cc,v 1.6 2006/11/23 12:24:20 sincerti Exp $
     27// $Id: MicrobeamPhysicsList.cc,v 1.8 2009/04/30 10:23:57 sincerti Exp $
    2828// -------------------------------------------------------------------
    2929
     
    107107}
    108108
    109 #include "G4MultipleScattering.hh"
     109// *** Processes and models
     110
     111// gamma
     112
     113#include "G4PhotoElectricEffect.hh"
     114#include "G4LivermorePhotoElectricModel.hh"
     115
     116#include "G4ComptonScattering.hh"
     117#include "G4LivermoreComptonModel.hh"
     118
     119#include "G4GammaConversion.hh"
     120#include "G4LivermoreGammaConversionModel.hh"
     121
     122#include "G4RayleighScattering.hh"
     123#include "G4LivermoreRayleighModel.hh"
     124
     125// e-
     126
     127#include "G4eMultipleScattering.hh"
     128#include "G4UniversalFluctuation.hh"
     129
    110130#include "G4eIonisation.hh"
     131#include "G4LivermoreIonisationModel.hh"
     132
    111133#include "G4eBremsstrahlung.hh"
     134#include "G4LivermoreBremsstrahlungModel.hh"
     135
     136// e+
     137
    112138#include "G4eplusAnnihilation.hh"
     139
     140// mu
    113141
    114142#include "G4MuIonisation.hh"
     
    116144#include "G4MuPairProduction.hh"
    117145
    118 #include "G4LowEnergyPhotoElectric.hh"
    119 #include "G4LowEnergyCompton.hh"
    120 #include "G4LowEnergyGammaConversion.hh"
    121 #include "G4LowEnergyRayleigh.hh"
    122 
    123 #include "G4LowEnergyIonisation.hh"
    124 #include "G4LowEnergyBremsstrahlung.hh"
    125 
    126 #include "G4hLowEnergyIonisation.hh"
     146// hadrons
     147
    127148#include "G4hMultipleScattering.hh"
     149#include "G4MscStepLimitType.hh"
     150
     151#include "G4hBremsstrahlung.hh"
     152#include "G4hPairProduction.hh"
     153
     154#include "G4hIonisation.hh"
     155#include "G4ionIonisation.hh"
     156#include "G4IonParametrisedLossModel.hh"
     157
     158//
     159
     160#include "G4LossTableManager.hh"
     161#include "G4EmProcessOptions.hh"
    128162
    129163
     
    143177
    144178
    145       pmanager->AddDiscreteProcess(new G4LowEnergyCompton);     
    146 
    147       G4LowEnergyPhotoElectric * LePeprocess = new G4LowEnergyPhotoElectric();
    148       LePeprocess->ActivateAuger(true);
    149       LePeprocess->SetCutForLowEnSecPhotons(0.250 * keV);
    150       LePeprocess->SetCutForLowEnSecElectrons(0.250 * keV);
    151       pmanager->AddDiscreteProcess(LePeprocess);
    152      
    153       pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion());
    154      
    155       pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh());
    156      
    157       pmanager->AddProcess(new G4StepLimiter(), -1, -1, 3);
    158 
     179      G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
     180      G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel = new G4LivermorePhotoElectricModel();
     181      thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
     182      pmanager->AddDiscreteProcess(thePhotoElectricEffect);
     183
     184      G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
     185      G4LivermoreComptonModel* theLivermoreComptonModel = new G4LivermoreComptonModel();
     186      theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
     187      pmanager->AddDiscreteProcess(theComptonScattering);
     188
     189      G4GammaConversion* theGammaConversion = new G4GammaConversion();
     190      G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel = new G4LivermoreGammaConversionModel();
     191      theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
     192      pmanager->AddDiscreteProcess(theGammaConversion);
     193
     194      G4RayleighScattering* theRayleigh = new G4RayleighScattering();
     195      G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
     196      theRayleigh->AddEmModel(0, theRayleighModel);
     197      pmanager->AddDiscreteProcess(theRayleigh);
     198     
     199      pmanager->AddProcess(new G4StepLimiter(), -1, -1, 5);
    159200     
    160201    } else if (particleName == "e-") {
    161202     
    162       pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
    163      
    164       G4LowEnergyIonisation * LeIoprocess = new G4LowEnergyIonisation("IONI");
    165       LeIoprocess->ActivateAuger(true);
    166       LeIoprocess->SetCutForLowEnSecPhotons(0.1*keV);
    167       LeIoprocess->SetCutForLowEnSecElectrons(0.1*keV);
    168       pmanager->AddProcess(LeIoprocess, -1,  2, 2);
    169 
    170       G4LowEnergyBremsstrahlung * LeBrprocess = new G4LowEnergyBremsstrahlung();
    171       pmanager->AddProcess(LeBrprocess, -1, -1, 3);
     203      G4eMultipleScattering* msc = new G4eMultipleScattering();
     204      msc->SetStepLimitType(fUseDistanceToBoundary);
     205      pmanager->AddProcess(msc,                   -1, 1, 1);
     206     
     207      // Ionisation
     208      G4eIonisation* eIoni = new G4eIonisation();
     209      eIoni->AddEmModel(0, new G4LivermoreIonisationModel(), new G4UniversalFluctuation() );
     210      eIoni->SetStepFunction(0.2, 100*um); //     
     211      pmanager->AddProcess(eIoni,                 -1, 2, 2);
     212     
     213      // Bremsstrahlung
     214      G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
     215      eBrem->AddEmModel(0, new G4LivermoreBremsstrahlungModel());
     216      pmanager->AddProcess(eBrem,                 -1,-3, 3);
     217
     218      pmanager->AddProcess(new G4StepLimiter(), -1, -1, 4);
     219     
     220    } else if (particleName == "e+") {
     221
     222      // Identical to G4EmStandardPhysics_option3
     223   
     224      G4eMultipleScattering* msc = new G4eMultipleScattering();
     225      msc->SetStepLimitType(fUseDistanceToBoundary);
     226      pmanager->AddProcess(msc,                   -1, 1, 1);
     227
     228      G4eIonisation* eIoni = new G4eIonisation();
     229      eIoni->SetStepFunction(0.2, 100*um);     
     230      pmanager->AddProcess(eIoni,                 -1, 2, 2);
     231     
     232      pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3);
     233     
     234      pmanager->AddProcess(new G4eplusAnnihilation,0,-1, 4);
     235     
     236      pmanager->AddProcess(new G4StepLimiter(), -1, -1, 5);
     237
     238    } else if (particleName == "GenericIon") {
     239
     240      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
     241
     242      G4ionIonisation* ionIoni = new G4ionIonisation();
     243      ionIoni->SetEmModel(new G4IonParametrisedLossModel());
     244      ionIoni->SetStepFunction(0.1, 20*um);
     245      pmanager->AddProcess(ionIoni,                   -1, 2, 2);
     246
    172247      pmanager->AddProcess(new G4StepLimiter(), -1, -1, 3);
    173      
    174     } else if (particleName == "e+") {
    175 
    176       pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
    177      
    178       pmanager->AddProcess(new G4eIonisation,      -1, 2,2);
    179      
    180       pmanager->AddProcess(new G4eBremsstrahlung,   -1,-1,3);
    181      
    182       pmanager->AddProcess(new G4eplusAnnihilation,  0,-1,4);
    183      
     248
     249    } else if (particleName == "alpha" ||
     250               particleName == "He3" ) {
     251
     252      // Identical to G4EmStandardPhysics_option3
     253     
     254      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
     255
     256      G4ionIonisation* ionIoni = new G4ionIonisation();
     257      ionIoni->SetStepFunction(0.1, 20*um);
     258      pmanager->AddProcess(ionIoni,                   -1, 2, 2);
     259
    184260      pmanager->AddProcess(new G4StepLimiter(), -1, -1, 3);
    185 
    186     } else if( particleName == "mu+" ||
    187                particleName == "mu-"    ) {
    188 
    189     } else if ((!particle->IsShortLived()) &&
    190                (particle->GetPDGCharge() != 0.0) &&
    191                (particle->GetParticleName() != "chargedgeantino")) {
    192      
    193       //pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
    194       pmanager->AddProcess(new G4hMultipleScattering(),-1,1,1);
    195      
    196       G4hLowEnergyIonisation* hLowEnergyIonisation = new G4hLowEnergyIonisation();
    197       pmanager->AddProcess(hLowEnergyIonisation,-1,2,2);
    198 
    199       hLowEnergyIonisation->SetElectronicStoppingPowerModel(particle,"ICRU_R49He");
    200       hLowEnergyIonisation->SetNuclearStoppingOn();
    201       hLowEnergyIonisation->SetNuclearStoppingPowerModel("ICRU_R49");
    202       hLowEnergyIonisation->SetFluorescence(true);
    203       hLowEnergyIonisation->ActivateAugerElectronProduction(true);
    204 
    205       pmanager->AddProcess(new G4StepLimiter(), -1, -1, 3);
    206 
    207261    }
    208262
    209 //end
     263   //
    210264
    211265  }
  • trunk/examples/advanced/microbeam/src/MicrobeamSteppingAction.cc

    r807 r1230  
    2525//
    2626// -------------------------------------------------------------------
    27 // $Id: MicrobeamSteppingAction.cc,v 1.8 2007/08/22 13:58:33 sincerti Exp $
     27// $Id: MicrobeamSteppingAction.cc,v 1.9 2008/06/16 07:46:11 sincerti Exp $
    2828// -------------------------------------------------------------------
    2929
     
    158158
    159159        {
    160          G4double dose = (e_SI*(aStep->GetTotalEnergyDeposit()/eV))/(Run->GetMassNucleus());
     160         G4double dose = (aStep->GetTotalEnergyDeposit()/joule)/(Run->GetMassNucleus()/kg);
    161161         Run->AddDoseN(dose);
    162162
     
    170170
    171171        {
    172          G4double dose = (e_SI*(aStep->GetTotalEnergyDeposit()/eV))/(Run->GetMassCytoplasm());
     172         G4double dose = (aStep->GetTotalEnergyDeposit()/joule)/(Run->GetMassCytoplasm()/kg);
    173173         Run->AddDoseC(dose);
    174174
  • trunk/examples/advanced/purging_magnet/GNUmakefile

    r807 r1230  
    11# --------------------------------------------------------------
    2 # $Id: GNUmakefile,v 1.1 2003/12/09 14:12:53 sussi Exp $
     2# $Id: GNUmakefile,v 1.2 2009/03/06 09:28:28 gbarrand Exp $
    33# --------------------------------------------------------------
    44# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
     
    1919include $(G4INSTALL)/config/binmake.gmk
    2020
    21 ifdef G4ANALYSIS_USE
    22  CPPFLAGS += `aida-config --include`
    23  LDFLAGS  += `aida-config --lib`
    24  LOADLIBS += `aida-config --lib`
    25 endif
    26 
  • trunk/examples/advanced/purging_magnet/History

    r807 r1230  
    11-------------------------------------------------------------------
    2 $Id: History,v 1.8 2005/12/07 14:35:12 guatelli Exp $
     2$Id: History,v 1.10 2009/04/08 10:23:31 cirrone Exp $
    33-------------------------------------------------------------------
    44
     
    99                      Category History file
    1010                      ---------------------
     1106.04.2009 G.A.P.Cirrone (purtag-V09-02-00)
     12- GNUmakefile updated
     13
    111407.12.2005  Susanna Guatelli  (purtag-V07-01-00)
    1215- The example compiles with CLHEP 2.0.2.2
  • trunk/examples/advanced/purging_magnet/PurgMag.cc

    r807 r1230  
    3434//
    3535// $Id: PurgMag.cc,v 1.5 2006/06/29 16:05:47 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838// Comments: Main program for the Purgin Magnet example.
  • trunk/examples/advanced/purging_magnet/include/PurgMagAnalysisManager.hh

    r807 r1230  
    3333//    ************************************
    3434//
    35 // $Id: PurgMagAnalysisManager.hh,v 1.3 2006/06/29 16:05:49 gunter Exp $
    36 // GEANT4 tag $Name: $
     35// $Id: PurgMagAnalysisManager.hh,v 1.4 2009/04/08 10:23:31 cirrone Exp $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
     
    5656  class ITuple;
    5757  class ITreeFactory;
    58 };
     58}
    5959
    6060//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
  • trunk/examples/advanced/purging_magnet/include/PurgMagDetectorConstruction.hh

    r807 r1230  
    3434//
    3535// $Id: PurgMagDetectorConstruction.hh,v 1.3 2006/06/29 16:05:51 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/purging_magnet/include/PurgMagEventAction.hh

    r807 r1230  
    3434//
    3535// $Id: PurgMagEventAction.hh,v 1.3 2006/06/29 16:05:53 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/purging_magnet/include/PurgMagPhysicsList.hh

    r807 r1230  
    3535//
    3636// $Id: PurgMagPhysicsList.hh,v 1.4 2006/06/29 16:05:55 gunter Exp $
    37 // GEANT4 tag $Name: $
     37// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3838//
    3939//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
  • trunk/examples/advanced/purging_magnet/include/PurgMagPrimaryGeneratorAction.hh

    r807 r1230  
    3535//
    3636// $Id: PurgMagPrimaryGeneratorAction.hh,v 1.3 2006/06/29 16:05:57 gunter Exp $
    37 // GEANT4 tag $Name: $
     37// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3838//
    3939
  • trunk/examples/advanced/purging_magnet/include/PurgMagRunAction.hh

    r807 r1230  
    3434//
    3535// $Id: PurgMagRunAction.hh,v 1.3 2006/06/29 16:05:59 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/purging_magnet/include/PurgMagSteppingAction.hh

    r807 r1230  
    3434//
    3535// $Id: PurgMagSteppingAction.hh,v 1.3 2006/06/29 16:06:01 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
  • trunk/examples/advanced/purging_magnet/include/PurgMagSteppingVerbose.hh

    r807 r1230  
    3535//
    3636// $Id: PurgMagSteppingVerbose.hh,v 1.3 2006/06/29 16:06:03 gunter Exp $
    37 // GEANT4 tag $Name: $
     37// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3838//
    3939
  • trunk/examples/advanced/purging_magnet/include/PurgMagTabulatedField3D.hh

    r807 r1230  
    3434//
    3535// $Id: PurgMagTabulatedField3D.hh,v 1.3 2006/06/29 16:06:05 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/purging_magnet/include/PurgMagTrackingAction.hh

    r807 r1230  
    3434//
    3535// $Id: PurgMagTrackingAction.hh,v 1.3 2006/06/29 16:06:07 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/purging_magnet/src/PurgMagAnalysisManager.cc

    r807 r1230  
    3434//
    3535// $Id: PurgMagAnalysisManager.cc,v 1.3 2006/06/29 16:06:09 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838#ifdef  G4ANALYSIS_USE
  • trunk/examples/advanced/purging_magnet/src/PurgMagDetectorConstruction.cc

    r807 r1230  
    3434//
    3535// $Id: PurgMagDetectorConstruction.cc,v 1.4 2006/06/29 16:06:11 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838#include "PurgMagDetectorConstruction.hh"
  • trunk/examples/advanced/purging_magnet/src/PurgMagEventAction.cc

    r807 r1230  
    3434//
    3535// $Id: PurgMagEventAction.cc,v 1.4 2006/06/29 16:06:13 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/purging_magnet/src/PurgMagPhysicsList.cc

    r807 r1230  
    3535//
    3636// $Id: PurgMagPhysicsList.cc,v 1.5 2006/06/29 16:06:15 gunter Exp $
    37 // GEANT4 tag $Name: $
     37// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3838//
    3939//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
  • trunk/examples/advanced/purging_magnet/src/PurgMagPrimaryGeneratorAction.cc

    r807 r1230  
    3434//
    3535// $Id: PurgMagPrimaryGeneratorAction.cc,v 1.3 2006/06/29 16:06:17 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/purging_magnet/src/PurgMagRunAction.cc

    r807 r1230  
    3434//
    3535// $Id: PurgMagRunAction.cc,v 1.4 2006/06/29 16:06:19 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/purging_magnet/src/PurgMagSteppingAction.cc

    r807 r1230  
    3434//
    3535// $Id: PurgMagSteppingAction.cc,v 1.5 2006/06/29 16:06:21 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/purging_magnet/src/PurgMagSteppingVerbose.cc

    r807 r1230  
    3434//
    3535// $Id: PurgMagSteppingVerbose.cc,v 1.3 2006/06/29 16:06:23 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/purging_magnet/src/PurgMagTabulatedField3D.cc

    r807 r1230  
    3434//
    3535// $Id: PurgMagTabulatedField3D.cc,v 1.4 2006/06/29 16:06:25 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/purging_magnet/src/PurgMagTrackingAction.cc

    r807 r1230  
    3434//
    3535// $Id: PurgMagTrackingAction.cc,v 1.3 2006/06/29 16:06:27 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/radioprotection/GNUmakefile

    r807 r1230  
    1 # $Id: GNUmakefile,v 1.5 2004/01/30 12:11:20 guatelli Exp $
     1# $Id: GNUmakefile,v 1.6 2009/03/06 09:38:55 gbarrand Exp $
    22# --------------------------------------------------------------
    33# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
     
    1616
    1717include $(G4INSTALL)/config/binmake.gmk
    18 ifdef G4ANALYSIS_USE 
    19  CPPFLAGS += `aida-config --include`
    20  LDFLAGS  += `aida-config --lib`
    21  LOADLIBS += `aida-config --lib`
    22 endif
    2318
    24 
  • trunk/examples/advanced/radioprotection/History

    r807 r1230  
    11-------------------------------------------------------------------
    2 $Id: History,v 1.20 2007/06/06 19:15:06 pia Exp $
     2$Id: History,v 1.24 2009/11/15 23:23:24 cirrone Exp $
    33-------------------------------------------------------------------
    44
     
    1010                      ---------------------
    1111
     1216.11.2009 S. Guatelli, tag radioprotection-V09-02-04
     13           analysis output format is changed to xml     
     14
     1512.11.2009 S. Guatelli, tag radioprotection-V09-02-01
     16           Physics List updated
     17
     1808.04.2009 G.A.P.Cirrone, tag radioprotection-V09-02-00
     19           GNUmakefile updated
     20
     216 March 2009 Guy Barrand (in agreement with G.Cosmo)
     22- GNUmakefile : remove the G4ANALYSIS_USE logic found in this file
     23  since it is handled already in the config/analysis.gmk.
     24  This avoids a duplication in the compilation and link commands
     25  of the aida-config options.
     26
    122706.06.2007 MGP tag radioprotection-V08-03-00
    13                Minor documentation update
     28           Minor documentation update
    1429
    153015th November 2006 Susanna Guatelli (radioprotection-V08-01-00)
  • trunk/examples/advanced/radioprotection/include/RemSimAnalysisManager.hh

    r807 r1230  
    3030//    **********************************
    3131//
    32 // $Id: RemSimAnalysisManager.hh,v 1.11 2006/06/29 16:22:04 gunter Exp $
     32// $Id: RemSimAnalysisManager.hh,v 1.12 2009/04/08 13:25:37 cirrone Exp $
    3333//
    3434// Author: Susanna Guatelli (guatelli@ge.infn.it)
     
    5353  class ITuple;
    5454  class ITreeFactory;
    55 };
     55}
    5656
    5757class RemSimAnalysisMessenger;
  • trunk/examples/advanced/radioprotection/include/RemSimDecay.hh

    r807 r1230  
    3232//
    3333// $Id: RemSimDecay.hh,v 1.3 2006/06/29 16:22:08 gunter Exp $
    34 // GEANT4 tag $Name: $
     34// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3535//
    3636// Author:Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimDecorator.hh

    r807 r1230  
    3232//
    3333// $Id: RemSimDecorator.hh,v 1.10 2006/06/29 16:22:10 gunter Exp $
    34 // GEANT4 tag $Name: $
     34// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3535//
    3636// Author:Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimDetectorConstruction.hh

    r807 r1230  
    3131//
    3232// $Id: RemSimDetectorConstruction.hh,v 1.13 2006/06/29 16:22:12 gunter Exp $
    33 // GEANT4 tag $Name: $
     33// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3434//
    3535// Author:Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimDetectorMessenger.hh

    r807 r1230  
    3232//
    3333// $Id: RemSimDetectorMessenger.hh,v 1.9 2006/06/29 16:22:37 gunter Exp $
    34 // GEANT4 tag $Name: $
     34// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3535//
    3636//
  • trunk/examples/advanced/radioprotection/include/RemSimElectronEEDL.hh

    r807 r1230  
    2626//
    2727// $Id: RemSimElectronEEDL.hh,v 1.4 2006/06/29 16:22:41 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// Author: Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimEventAction.hh

    r807 r1230  
    3232//
    3333// $Id: RemSimEventAction.hh,v 1.5 2006/06/29 16:22:43 gunter Exp $
    34 // GEANT4 tag $Name: $
     34// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3535//
    3636// Author : Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimHadronicBertini.hh

    r807 r1230  
    3131//
    3232// $Id: RemSimHadronicBertini.hh,v 1.5 2006/11/15 18:39:30 guatelli Exp $
    33 // GEANT4 tag $Name: $
     33// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3434//
    3535// Author : Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimHadronicBinary.hh

    r807 r1230  
    3131//
    3232// $Id: RemSimHadronicBinary.hh,v 1.5 2006/11/15 18:39:30 guatelli Exp $
    33 // GEANT4 tag $Name: $
     33// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3434//
    3535// Author : Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimIonICRU.hh

    r807 r1230  
    2525//
    2626// $Id: RemSimIonICRU.hh,v 1.5 2006/06/29 16:22:49 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Author: Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimMaterial.hh

    r807 r1230  
    2626//
    2727// $Id: RemSimMaterial.hh,v 1.6 2006/06/29 16:22:51 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//    **********************************
  • trunk/examples/advanced/radioprotection/include/RemSimMoonHabitat.hh

    r807 r1230  
    3232//
    3333// $Id: RemSimMoonHabitat.hh,v 1.6 2006/06/29 16:22:53 gunter Exp $
    34 // GEANT4 tag $Name: $
     34// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3535//
    3636// Author:Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimMuonStandard.hh

    r807 r1230  
    2525//
    2626// $Id: RemSimMuonStandard.hh,v 1.3 2006/06/29 16:22:55 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Author:Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimPhotonEPDL.hh

    r807 r1230  
    2626//
    2727// $Id: RemSimPhotonEPDL.hh,v 1.4 2006/06/29 16:22:59 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// Author:Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimPhysicsList.hh

    r807 r1230  
    2525//
    2626// $Id: RemSimPhysicsList.hh,v 1.6 2006/06/29 16:23:01 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Author: Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimPhysicsListMessenger.hh

    r807 r1230  
    2525//
    2626// $Id: RemSimPhysicsListMessenger.hh,v 1.4 2006/06/29 16:23:03 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Author: Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimPositronStandard.hh

    r807 r1230  
    2626//
    2727// $Id: RemSimPositronStandard.hh,v 1.4 2006/06/29 16:23:05 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// Author: Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimPrimaryGeneratorAction.hh

    r807 r1230  
    2525//
    2626//
    27 // $Id: RemSimPrimaryGeneratorAction.hh,v 1.14 2006/06/29 16:23:07 gunter Exp $// GEANT4 tag $Name: $
     27// $Id: RemSimPrimaryGeneratorAction.hh,v 1.14 2006/06/29 16:23:07 gunter Exp $// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Author: Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimPrimaryGeneratorMessenger.hh

    r807 r1230  
    3232//
    3333// $Id: RemSimPrimaryGeneratorMessenger.hh,v 1.10 2006/06/29 16:23:09 gunter Exp $
    34 // GEANT4 tag $Name: $
     34// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3535//
    3636//Code developed by:  S.Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimROGeometry.hh

    r807 r1230  
    2626//
    2727// $Id: RemSimROGeometry.hh,v 1.6 2006/06/29 16:23:11 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//    ************************************
  • trunk/examples/advanced/radioprotection/include/RemSimRoofDecorator.hh

    r807 r1230  
    3434//
    3535// $Id: RemSimRoofDecorator.hh,v 1.6 2006/06/29 16:23:13 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/radioprotection/include/RemSimRunAction.hh

    r807 r1230  
    2626//
    2727// $Id: RemSimRunAction.hh,v 1.10 2006/06/29 16:23:15 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// Code developed by: S.Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimSensitiveDetector.hh

    r807 r1230  
    2525//
    2626// $Id: RemSimSensitiveDetector.hh,v 1.5 2006/06/29 16:23:17 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Code developed by: S.Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimShelterSPEDecorator.hh

    r807 r1230  
    2525//
    2626// $Id: RemSimShelterSPEDecorator.hh,v 1.5 2006/06/29 16:23:19 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Code developed by: S.Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimShieldingDecorator.hh

    r807 r1230  
    2525//
    2626// $Id: RemSimShieldingDecorator.hh,v 1.7 2006/06/29 16:23:21 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Code developed by: S.Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimSteppingAction.hh

    r807 r1230  
    2626//
    2727// $Id: RemSimSteppingAction.hh,v 1.4 2006/06/29 16:23:23 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// Author: Susanna Guatelli (guatelli@ge.infn.it)
  • trunk/examples/advanced/radioprotection/include/RemSimSteppingActionMessenger.hh

    r807 r1230  
    2626//
    2727// $Id: RemSimSteppingActionMessenger.hh,v 1.3 2006/06/29 16:23:25 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// Author: Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimVGeometryComponent.hh

    r807 r1230  
    2525//
    2626// $Id: RemSimVGeometryComponent.hh,v 1.8 2006/06/29 16:23:27 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Code developed by: S.Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/include/RemSimVehicle1.hh

    r807 r1230  
    2525//
    2626// $Id: RemSimVehicle1.hh,v 1.8 2006/06/29 16:23:29 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Code developed by: S.Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/remsim.cc

    r807 r1230  
    2626//
    2727// $Id: remsim.cc,v 1.14 2006/07/24 09:53:27 guatelli Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929
    3030#include "G4RunManager.hh"
  • trunk/examples/advanced/radioprotection/src/RemSimAnalysisManager.cc

    r807 r1230  
    3030//    *******************************
    3131//
    32 // $Id: RemSimAnalysisManager.cc,v 1.12 2006/06/29 16:23:31 gunter Exp $
     32// $Id: RemSimAnalysisManager.cc,v 1.13 2009/11/15 23:23:24 cirrone Exp $
    3333//
    3434// Author:Susanna Guatelli, guatelli@ge.infn.it
     
    6161{
    6262  aFact = AIDA_createAnalysisFactory();
    63   fileFormat = "hbook";
     63  fileFormat = "xml";
    6464}
    6565
     
    125125   
    126126
    127   theTree = treeFact -> create("remsim.hbk", "hbook", false, true);
    128   G4cout << "The format of the output file is hbook" << G4endl;
     127  theTree = treeFact -> create("remsim.xml", "xml",false, true,"uncompressed");
     128
     129  G4cout << "The format of the output file is xml" << G4endl;
    129130
    130131  histogramFactory = aFact -> createHistogramFactory(*theTree);
  • trunk/examples/advanced/radioprotection/src/RemSimDecay.cc

    r807 r1230  
    3232//
    3333// $Id: RemSimDecay.cc,v 1.5 2006/06/29 16:23:35 gunter Exp $
    34 // GEANT4 tag $Name: $
     34// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3535//
    3636// Author:Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/src/RemSimDecorator.cc

    r807 r1230  
    3232//
    3333// $Id: RemSimDecorator.cc,v 1.6 2006/06/29 16:23:37 gunter Exp $
    34 // GEANT4 tag $Name: $
     34// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3535//
    3636// Author:Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/src/RemSimDetectorConstruction.cc

    r807 r1230  
    3232//
    3333// $Id: RemSimDetectorConstruction.cc,v 1.17 2006/06/29 16:23:39 gunter Exp $
    34 // GEANT4 tag $Name: $
     34// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3535//
    3636// Author:Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/src/RemSimDetectorMessenger.cc

    r807 r1230  
    3636//
    3737// $Id: RemSimDetectorMessenger.cc,v 1.13 2006/06/29 16:23:41 gunter Exp $
    38 // GEANT4 tag $Name: $
     38// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3939//
    4040//
  • trunk/examples/advanced/radioprotection/src/RemSimElectronEEDL.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: RemSimElectronEEDL.cc,v 1.6 2006/06/29 16:23:43 gunter Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: RemSimElectronEEDL.cc,v 1.7 2009/11/12 05:12:18 cirrone Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Author: Susanna Guatelli, guatelloi@ge.infn.it
     
    3232#include "G4ProcessManager.hh"
    3333#include "G4ParticleDefinition.hh"
    34 #include "G4MultipleScattering.hh"
    35 #include "G4LowEnergyIonisation.hh"
    36 #include "G4LowEnergyBremsstrahlung.hh"
     34// e-
     35#include "G4eMultipleScattering.hh"
     36#include "G4eIonisation.hh"
     37#include "G4LivermoreIonisationModel.hh"
     38#include "G4eBremsstrahlung.hh"
     39#include "G4LivermoreBremsstrahlungModel.hh"
    3740#include "G4StepLimiter.hh"
    3841
     
    5255    {
    5356      G4ParticleDefinition* particle = theParticleIterator -> value();
    54       G4ProcessManager* manager = particle -> GetProcessManager();
     57      G4ProcessManager* pmanager = particle -> GetProcessManager();
    5558      G4String particleName = particle -> GetParticleName();
    5659     
    5760      if (particleName == "e-")
    5861        {
    59           manager -> AddProcess(new G4MultipleScattering,     -1, 1,1);
    60           manager -> AddProcess(new G4LowEnergyIonisation,    -1, 2,2);
    61           manager -> AddProcess(new G4LowEnergyBremsstrahlung,-1,-1,3);
    62           manager -> AddProcess(new G4StepLimiter(),-1,-1,3);
     62          G4eMultipleScattering* msc = new G4eMultipleScattering();
     63          msc->SetStepLimitType(fUseDistanceToBoundary);
     64          pmanager->AddProcess(msc,-1, 1, 1);
     65
     66          // Ionisation
     67          G4eIonisation* eIonisation = new G4eIonisation();
     68          eIonisation->SetEmModel(new G4LivermoreIonisationModel());
     69          eIonisation->SetStepFunction(0.2, 100*um); //improved precision in tracking 
     70          pmanager->AddProcess(eIonisation,-1, 2, 2);
     71       
     72          // Bremsstrahlung
     73          G4eBremsstrahlung* eBremsstrahlung = new G4eBremsstrahlung();
     74          eBremsstrahlung->SetEmModel(new G4LivermoreBremsstrahlungModel());
     75          pmanager->AddProcess(eBremsstrahlung, -1,-3, 3);
     76
     77          // Step Limiter
     78          pmanager -> AddProcess(new G4StepLimiter(),  -1,-1,3);
    6379        }   
    6480    }
  • trunk/examples/advanced/radioprotection/src/RemSimEventAction.cc

    r807 r1230  
    3232//
    3333// $Id: RemSimEventAction.cc,v 1.9 2006/06/29 16:23:45 gunter Exp $
    34 // GEANT4 tag $Name: $
     34// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3535//
    3636// Author : Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/src/RemSimHadronicBertini.cc

    r807 r1230  
    3030//    **************************************
    3131//
    32 // $Id: RemSimHadronicBertini.cc,v 1.5 2006/11/15 18:39:30 guatelli Exp $
    33 // GEANT4 tag $Name: $
     32// $Id: RemSimHadronicBertini.cc,v 1.6 2009/11/12 05:12:18 cirrone Exp $
     33// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3434//
    3535// Author : Susanna Guatelli, guatelli@ge.infn.it
     
    261261  // Energy limit of the binary ion model
    262262  G4double binaryIonLowLimit = 80. * MeV;
    263   G4double binaryIonHighLimit = 40. * GeV;
     263  G4double binaryIonHighLimit = 400. * GeV;
    264264  binaryIonModel->SetMinEnergy(binaryIonLowLimit);
    265265  binaryIonModel->SetMaxEnergy(binaryIonHighLimit);
  • trunk/examples/advanced/radioprotection/src/RemSimHadronicBinary.cc

    r807 r1230  
    3030//    **************************************
    3131//
    32 // $Id: RemSimHadronicBinary.cc,v 1.7 2006/11/15 18:39:30 guatelli Exp $
    33 // GEANT4 tag $Name: $
     32// $Id: RemSimHadronicBinary.cc,v 1.8 2009/11/12 05:12:18 cirrone Exp $
     33// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3434//
    3535// Author : Susanna Guatelli, guatelli@ge.infn.it
     
    257257  // Energy limit of the binary ion model
    258258  G4double binaryIonLowLimit = 80. * MeV;
    259   G4double binaryIonHighLimit = 40. * GeV;
     259  G4double binaryIonHighLimit = 400. * GeV;
    260260  binaryIonModel->SetMinEnergy(binaryIonLowLimit);
    261261  binaryIonModel->SetMaxEnergy(binaryIonHighLimit);
  • trunk/examples/advanced/radioprotection/src/RemSimIonICRU.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: RemSimIonICRU.cc,v 1.10 2006/06/29 16:23:51 gunter Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: RemSimIonICRU.cc,v 1.11 2009/11/12 05:12:18 cirrone Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Author: Susanna Guatelli, guatelli@ge.infn.it
     
    3232#include "G4ProcessManager.hh"
    3333#include "G4ParticleDefinition.hh"
    34 #include "G4MultipleScattering.hh"
    35 #include "G4hLowEnergyIonisation.hh"
     34#include "G4hMultipleScattering.hh"
    3635#include "G4hIonisation.hh"
    37 #include "G4hLowEnergyLoss.hh"
     36#include "G4ionIonisation.hh"
    3837#include "G4StepLimiter.hh"
     38#include "G4IonParametrisedLossModel.hh"
    3939
    4040RemSimIonICRU::RemSimIonICRU(const G4String& name): G4VPhysicsConstructor(name)
     
    5555      G4double charge = particle -> GetPDGCharge();
    5656
    57       if (particleName  == "proton" || particleName == "GenericIon"
    58           || particleName == "alpha" )
     57      if (particleName  == "proton"
     58          || particleName == "pi+"
     59          || particleName == "pi-")
    5960        {
    60           G4hLowEnergyIonisation* ionisation = new G4hLowEnergyIonisation();
    61           G4VProcess*  multipleScattering = new G4MultipleScattering();
    62           manager -> AddProcess(multipleScattering, -1,1,1);   
    63           manager -> AddProcess(ionisation, -1,2,2);
     61          manager -> AddProcess(new G4hMultipleScattering, -1,1,1);   
     62
     63          G4hIonisation* ionisation = new G4hIonisation();
     64          ionisation -> SetStepFunction(0.2, 50*um);
     65          manager -> AddProcess(ionisation, -1,2,2);
     66          manager -> AddProcess(new G4StepLimiter(),-1,-1,3);
     67        }
     68
     69      else if(particleName == "alpha"      ||
     70              particleName == "deuteron"   ||
     71              particleName == "triton"     ||
     72              particleName == "He3")
     73        {
     74          //multiple scattering
     75          manager->AddProcess(new G4hMultipleScattering,-1,1,1);
     76       
     77          //ionisation
     78          G4ionIonisation* ionIoni = new G4ionIonisation();
     79          ionIoni->SetStepFunction(0.1, 20*um);
     80          manager->AddProcess(ionIoni,-1, 2, 2);
     81          manager -> AddProcess(new G4StepLimiter(),-1,-1,3);
     82        }
     83
     84      else if (particleName == "GenericIon")
     85        {
     86          // OBJECT may be dynamically created as either a GenericIon or nucleus
     87          // G4Nucleus exists and therefore has particle type nucleus
     88          // genericIon:
     89       
     90          //multiple scattering
     91          manager->AddProcess(new G4hMultipleScattering,-1,1,1);
     92
     93          //ionisation
     94          G4ionIonisation* ionIoni = new G4ionIonisation();
     95          ionIoni->SetEmModel(new G4IonParametrisedLossModel());
     96          ionIoni->SetStepFunction(0.1, 20*um);
     97          manager->AddProcess(ionIoni,-1, 2, 2);
    6498          manager -> AddProcess(new G4StepLimiter(),-1,-1,3);
    6599        }
    66100      else{     
    67101        if (( charge != 0. ) && particleName != "e+" && particleName != "mu+" &&
    68             particleName != "e-" && particleName != "mu-") 
     102            particleName != "e-" && particleName != "mu-")
    69103          {
    70104            if((!particle -> IsShortLived()) &&
    71105               (particle -> GetParticleName() != "chargedgeantino"))
    72106              {
    73                 G4hLowEnergyIonisation* ionisation = new G4hLowEnergyIonisation();
    74                 G4VProcess*  multipleScattering = new G4MultipleScattering();
     107                G4hIonisation* ionisation = new G4hIonisation();
     108                G4VProcess*  multipleScattering = new G4hMultipleScattering();
    75109                manager -> AddProcess(multipleScattering, -1,1,1);   
    76110                manager -> AddProcess(ionisation, -1,2,2);
     
    78112              }
    79113          }
    80       }}
     114      }
     115    }
    81116}
    82117
  • trunk/examples/advanced/radioprotection/src/RemSimMaterial.cc

    r807 r1230  
    3434//
    3535// $Id: RemSimMaterial.cc,v 1.7 2006/06/29 16:23:53 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838
  • trunk/examples/advanced/radioprotection/src/RemSimMoonHabitat.cc

    r807 r1230  
    3232//
    3333// $Id: RemSimMoonHabitat.cc,v 1.7 2006/06/29 16:23:55 gunter Exp $
    34 // GEANT4 tag $Name: $
     34// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3535//
    3636// Author:Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/src/RemSimMuonStandard.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: RemSimMuonStandard.cc,v 1.6 2006/06/29 16:23:57 gunter Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: RemSimMuonStandard.cc,v 1.7 2009/11/12 05:12:18 cirrone Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Author:Susanna Guatelli, guatelli@ge.infn.it
     
    3434//muon:
    3535#include "G4hIonisation.hh"
    36 #include "G4MultipleScattering.hh"
     36#include "G4MuMultipleScattering.hh"
    3737#include "G4MuIonisation.hh"
    3838#include "G4MuBremsstrahlung.hh"
     
    6161      if(( particleName == "mu+")|| (particleName == "mu-" ))
    6262        {//muon
    63           G4VProcess* aMultipleScattering = new G4MultipleScattering();
     63          G4VProcess* aMultipleScattering = new G4MuMultipleScattering();
    6464          G4VProcess* aBremsstrahlung     = new G4MuBremsstrahlung();
    6565          G4VProcess* aPairProduction     = new G4MuPairProduction();
  • trunk/examples/advanced/radioprotection/src/RemSimPhotonEPDL.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: RemSimPhotonEPDL.cc,v 1.7 2006/06/29 16:24:01 gunter Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: RemSimPhotonEPDL.cc,v 1.8 2009/11/12 05:12:18 cirrone Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Author:Susanna Guatelli, guatelli@ge.infn.it
     
    3434#include "G4Gamma.hh"
    3535#include "G4ParticleDefinition.hh"
    36 #include "G4LowEnergyCompton.hh"
    37 #include "G4LowEnergyGammaConversion.hh"
    38 #include "G4LowEnergyPhotoElectric.hh"
    39 #include "G4LowEnergyRayleigh.hh"
     36
     37#include "G4PhotoElectricEffect.hh"
     38#include "G4LivermorePhotoElectricModel.hh"
     39
     40#include "G4ComptonScattering.hh"
     41#include "G4LivermoreComptonModel.hh"
     42
     43#include "G4GammaConversion.hh"
     44#include "G4LivermoreGammaConversionModel.hh"
     45
     46#include "G4RayleighScattering.hh"
     47#include "G4LivermoreRayleighModel.hh"
     48
    4049#include "G4StepLimiter.hh"
    4150
     
    5665    {
    5766      G4ParticleDefinition* particle = theParticleIterator -> value();
    58       G4ProcessManager* manager = particle -> GetProcessManager();
     67      G4ProcessManager* pmanager = particle -> GetProcessManager();
    5968      G4String particleName = particle -> GetParticleName();
    6069     
    6170      if (particleName == "gamma")
    6271        {
    63           manager -> AddDiscreteProcess(new G4LowEnergyPhotoElectric);
    64           manager -> AddDiscreteProcess(new G4LowEnergyCompton);
    65           manager -> AddDiscreteProcess(new G4LowEnergyGammaConversion);
    66           manager -> AddDiscreteProcess(new G4LowEnergyRayleigh);
    67           manager -> AddProcess(new G4StepLimiter(),-1,-1,3);
     72          // Photon     
     73      G4RayleighScattering* theRayleigh = new G4RayleighScattering();
     74      theRayleigh->SetModel(new G4LivermoreRayleighModel());  //not strictly necessary
     75      pmanager->AddDiscreteProcess(theRayleigh);
     76
     77      G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
     78      thePhotoElectricEffect->SetModel(new G4LivermorePhotoElectricModel());
     79      pmanager->AddDiscreteProcess(thePhotoElectricEffect);
     80       
     81      G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
     82      theComptonScattering->SetModel(new G4LivermoreComptonModel());
     83      pmanager->AddDiscreteProcess(theComptonScattering);
     84       
     85      G4GammaConversion* theGammaConversion = new G4GammaConversion();
     86      theGammaConversion->SetModel(new G4LivermoreGammaConversionModel());
     87      pmanager->AddDiscreteProcess(theGammaConversion); 
     88     
     89      pmanager->AddProcess(new G4StepLimiter(),  -1,-1,3);
    6890        }   
    6991    }
  • trunk/examples/advanced/radioprotection/src/RemSimPhysicsList.cc

    r807 r1230  
    2525//
    2626// $Id: RemSimPhysicsList.cc,v 1.10 2006/06/29 16:24:03 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Author: Susanna Guatelli
  • trunk/examples/advanced/radioprotection/src/RemSimPhysicsListMessenger.cc

    r807 r1230  
    2525//
    2626// $Id: RemSimPhysicsListMessenger.cc,v 1.4 2006/06/29 16:24:05 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Author: Susanna Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/src/RemSimPositronStandard.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: RemSimPositronStandard.cc,v 1.6 2006/06/29 16:24:07 gunter Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: RemSimPositronStandard.cc,v 1.8 2009/11/12 05:29:47 cirrone Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Author: Susanna Guatelli, guatelli@ge.infn.it
     
    3232#include "G4Gamma.hh"
    3333#include "G4ParticleDefinition.hh"
    34 #include "G4MultipleScattering.hh"
     34#include "G4eMultipleScattering.hh"
    3535#include "G4eIonisation.hh"
    3636#include "G4eBremsstrahlung.hh"
     
    5858      if (particleName == "e+")
    5959        {
    60           manager -> AddProcess(new G4MultipleScattering, -1, 1,1);
    61           manager -> AddProcess(new G4eIonisation,        -1, 2,2);
    62           manager -> AddProcess(new G4eBremsstrahlung,    -1,-1,3);
    63           manager -> AddProcess(new G4eplusAnnihilation,   0,-1,4);
    64           manager -> AddProcess(new G4StepLimiter(),  -1,-1,3);
    65         }   
     60            // Positron     
     61      G4eMultipleScattering* msc = new G4eMultipleScattering();
     62      msc->SetStepLimitType(fUseDistanceToBoundary);
     63      manager->AddProcess(msc,-1, 1, 1);
     64       
     65      // Ionisation
     66      G4eIonisation* eIonisation = new G4eIonisation();
     67      eIonisation->SetStepFunction(0.2, 100*um); //     
     68      manager->AddProcess(eIonisation,                 -1, 2, 2);
     69
     70      //Bremsstrahlung (use default, no low-energy available)
     71      manager->AddProcess(new G4eBremsstrahlung(), -1,-1, 3);
     72
     73      //Annihilation
     74      manager->AddProcess(new G4eplusAnnihilation(),0,-1, 4);   
     75
     76      manager -> AddProcess(new G4StepLimiter(),  -1,-1,3);
     77        }
    6678    }
    6779}
  • trunk/examples/advanced/radioprotection/src/RemSimPrimaryGeneratorMessenger.cc

    r807 r1230  
    3535//
    3636// $Id: RemSimPrimaryGeneratorMessenger.cc,v 1.11 2006/06/29 16:24:11 gunter Exp $
    37 // GEANT4 tag $Name: $
     37// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3838//
    3939//
  • trunk/examples/advanced/radioprotection/src/RemSimROGeometry.cc

    r807 r1230  
    3434//
    3535// $Id: RemSimROGeometry.cc,v 1.6 2006/06/29 16:24:13 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838#include "RemSimROGeometry.hh"
  • trunk/examples/advanced/radioprotection/src/RemSimRoofDecorator.cc

    r807 r1230  
    3434//
    3535// $Id: RemSimRoofDecorator.cc,v 1.7 2006/06/29 16:24:15 gunter Exp $
    36 // GEANT4 tag $Name: $
     36// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3737//
    3838#include "RemSimVGeometryComponent.hh"
  • trunk/examples/advanced/radioprotection/src/RemSimRunAction.cc

    r807 r1230  
    3333// Code developed by: S.Guatelli, guatelli@ge.infn.it
    3434// $Id: RemSimRunAction.cc,v 1.14 2006/06/29 16:24:17 gunter Exp $
    35 // GEANT4 tag $Name: $
     35// GEANT4 tag $Name: geant4-09-03-cand-01 $
    3636//
    3737
  • trunk/examples/advanced/radioprotection/src/RemSimSensitiveDetector.cc

    r807 r1230  
    2626//
    2727// $Id: RemSimSensitiveDetector.cc,v 1.15 2006/06/29 16:24:19 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// Code developed by: S.Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/src/RemSimShelterSPEDecorator.cc

    r807 r1230  
    2525//
    2626// $Id: RemSimShelterSPEDecorator.cc,v 1.3 2006/06/29 16:24:21 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Code developed by: S.Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/src/RemSimShieldingDecorator.cc

    r807 r1230  
    2525//
    2626// $Id: RemSimShieldingDecorator.cc,v 1.6 2006/06/29 16:24:23 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Code developed by: S.Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/src/RemSimSteppingAction.cc

    r807 r1230  
    2626//
    2727// $Id: RemSimSteppingAction.cc,v 1.10 2006/06/29 16:24:25 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/advanced/radioprotection/src/RemSimSteppingActionMessenger.cc

    r807 r1230  
    2525//
    2626//
    27 //$Id: RemSimSteppingActionMessenger.cc,v 1.5 2006/06/29 16:24:27 gunter Exp $// GEANT4 tag $Name: $
     27//$Id: RemSimSteppingActionMessenger.cc,v 1.5 2006/06/29 16:24:27 gunter Exp $// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Code developed by: S.Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/src/RemSimVGeometryComponent.cc

    r807 r1230  
    2525//
    2626// $Id: RemSimVGeometryComponent.cc,v 1.4 2006/06/29 16:24:29 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Code developed by: S.Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/radioprotection/src/RemSimVehicle1.cc

    r807 r1230  
    2525//
    2626// $Id: RemSimVehicle1.cc,v 1.9 2006/06/29 16:24:31 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Code developed by: S.Guatelli, guatelli@ge.infn.it
  • trunk/examples/advanced/underground_physics/GNUmakefile

    r807 r1230  
    1 # $Id: GNUmakefile,v 1.8 2002/11/08 13:58:28 ahoward Exp $
     1# $Id: GNUmakefile,v 1.9 2008/06/15 22:39:27 cirrone Exp $
    22# --------------------------------------------------------------
    33# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
     
    2323include $(G4INSTALL)/config/architecture.gmk
    2424
    25 ifdef G4ANALYSIS_USE
    26   CPPFLAGS += `aida-config --include`
    27   LDFLAGS += `aida-config --lib`
    28 endif
    2925
    3026.PHONY: all
  • trunk/examples/advanced/underground_physics/History

    r807 r1230  
    11-------------------------------------------------------------------
    2 $Id: History,v 1.15.2.1 2008/04/23 08:15:56 gcosmo Exp $
     2$Id: History,v 1.17 2008/06/15 22:39:27 cirrone Exp $
    33-------------------------------------------------------------------
    44
     
    99                      Category History file
    1010                      ---------------------
    11 
    12 23.04.2008 - G. Cosmo (DMX-V09-00-03)
    13              Tag for release 9.1.p02.
     1116.06.2008 - G.A.P.Cirrone (DMX-V09-01-01)
     12             Removed AIDA command from GNUmakefile
    1413
    151404.04.2008 - A. Howard (DMX-V09-01-00)
  • trunk/examples/advanced/underground_physics/include/DMXMinEkineCuts.hh

    r807 r1230  
    2626//
    2727// $Id: DMXMinEkineCuts.hh,v 1.4 2006/06/29 16:25:47 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/advanced/underground_physics/src/DMXMinEkineCuts.cc

    r807 r1230  
    2626//
    2727// $Id: DMXMinEkineCuts.cc,v 1.6 2006/06/29 16:26:39 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/advanced/underground_physics/src/DMXPhysicsList.cc

    r807 r1230  
    489489#include "G4LETritonInelastic.hh"
    490490#include "G4LEAlphaInelastic.hh"
    491 
     491#include "G4HadronCaptureProcess.hh"
    492492// High-energy Models: >20 GeV
    493493#include "G4HEPionPlusInelastic.hh"
  • trunk/examples/advanced/xray_fluorescence/GNUmakefile

    r807 r1230  
    1 # $Id: GNUmakefile,v 1.19 2005/12/09 22:15:52 mantero Exp $
     1# $Id: GNUmakefile,v 1.21 2009/03/06 09:45:38 gbarrand Exp $
    22# --------------------------------------------------------------
    33# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
     
    1717include $(G4INSTALL)/config/architecture.gmk
    1818
    19 #G4ANALYSIS_USE := 1
    20 
    21 ifdef G4ANALYSIS_USE
    22  CPPFLAGS += `aida-config --include`
    23  LDFLAGS  += `aida-config --lib`
    24 endif
    25 
    2619include $(G4INSTALL)/config/binmake.gmk
    2720
  • trunk/examples/advanced/xray_fluorescence/History

    r807 r1230  
    1 # $Id: History,v 1.6 2005/11/15 15:57:47 gcosmo Exp $
     1# $Id: History,v 1.9 2009/11/10 16:35:02 mantero Exp $
    22# -------------------------------------------------------------------
    3 # GEANT4 tag $Name: $
     3# GEANT4 tag $Name: geant4-09-03 $
    44# -------------------------------------------------------------------
    55
     
    1919     * Reverse chronological order (last date on top), please *
    2020     ----------------------------------------------------------
     21
     2210-11-2009 Alf, Tag: XrayFluo-V09-02-01
     23- Physics List  migrated to new Lowenergy physics processes design
     24- XrayFluoDataSet  migrated in order to meet new modification of G4VEMDataSet
     25
     2610-04-2009 G.A.P.Cirrone, Tag: XrayFluo-V09-02-00
     27- Tag for release after the GNUmakefile update
     28
     296-03-2009 Guy Barrand (in agreement with G.Cosmo)
     30- GNUmakefile : remove the G4ANALYSIS_USE logic found in this file
     31  since it is handled already in the config/analysis.gmk.
     32  This avoids a duplication in the compilation and link commands
     33  of the aida-config options.
    2134
    223515-11-2004 Gabriele Cosmo: XrayFluo-V07-01-00
  • trunk/examples/advanced/xray_fluorescence/XrayFluo.cc

    r807 r1230  
    3838
    3939#include "XrayFluoSimulation.hh"
    40 ;
     40
    4141int main(int argc, char* argv[]){
    4242
  • trunk/examples/advanced/xray_fluorescence/include/XrayFluoDataSet.hh

    r807 r1230  
    3333// -----------
    3434//  28 Nov 2001  Elena Guardincerri   Created
    35 //
     35//  2001 - 2009  Alfonso Mantero      Mantained
    3636// -------------------------------------------------------------------
    3737
     
    7474  virtual size_t NumberOfComponents() const { return 0; }
    7575
     76  virtual void SetEnergiesData(G4DataVector*, G4DataVector*, int
     77    = 0) {}
     78
     79  virtual G4bool SaveData(const G4String&) const {return true;}
     80
     81  virtual G4double RandomSelect(int = 0) const {return 0;}
    7682
    7783  void PrintData() const;
     
    7985  const G4DataVector& GetEnergies(G4int) const { return *energies; }
    8086  const G4DataVector& GetData(G4int) const { return *data; }
     87 
     88  virtual const G4DataVector& GetLogEnergies(G4int ) const { return *energies; }
     89  virtual const G4DataVector& GetLogData(G4int ) const { return *data; }
     90  //  void SetEnergiesData(G4DataVector* x, G4DataVector* data, G4int component=0) {;}
     91 
     92  virtual void SetLogEnergiesData(G4DataVector* ,
     93                                  G4DataVector* ,
     94                                  G4DataVector* ,
     95                                  G4DataVector* ,
     96                                  G4int ) {;}
     97
     98  virtual G4bool LoadNonLogData(const G4String& ) {return false;}
     99
     100//  G4bool SaveData(const G4String& fileName) const {return 0;}
     101
     102
    81103
    82104private:
    83105
    84   void LoadData(const G4String& dataFile);
     106  G4bool LoadData(const G4String& dataFile);
     107
    85108  G4int z;
    86109  G4int FindBinLocation(G4double energy) const;
     
    97120
    98121};
     122
     123
    99124 
    100125#endif
  • trunk/examples/advanced/xray_fluorescence/include/XrayFluoDetectorConstruction.hh

    r807 r1230  
    4848#include "globals.hh"
    4949#include "G4RotationMatrix.hh"
     50#include "G4Navigator.hh"
    5051
    5152#include "XrayFluoGeometry.hh"
     
    143144 
    144145private:
    145  
     146
     147  G4Navigator* aNavigator; 
     148
    146149  XrayFluoDetectorConstruction();
    147150
     
    226229  G4Material* GetDia1Material()  {return Dia1Material;};
    227230  G4Material* GetDia3Material()  {return Dia3Material;};
     231 
     232  // GetSampleIlluminatedFacecoord();
     233  // GetSampleShadowedFaceCoord();
     234  // GetSampleXplusFaceCoord();
     235  // GetSampleXminusFaceCoord();
     236  // GetSampleYplusFaceCoord();
     237  // GetSampleYminusFaceCoord();
     238
     239  G4Navigator* GetGeometryNavigator() {return aNavigator;};
    228240 
    229241private:
  • trunk/examples/advanced/xray_fluorescence/include/XrayFluoNistMaterials.hh

    r807 r1230  
    6666  G4NistManager*     nistMan;
    6767
     68  G4Material*        copper;
     69  G4Material*        SiLi;
    6870  G4Material*        dolorite;
    6971  G4Material*        HPGe;
    7072  G4Material*        mars1;
     73  G4Material*        hawaiianWD;
     74  G4Material*        hawaiianRF;
    7175  G4Material*        anorthosite;
    7276  G4Material*        basalt;
     77  G4Material*        gabbro;
     78  G4Material*        gabbroWD;
     79  G4Material*        gabbroRF;
    7380  G4Material*        Air;
    7481  G4Material*        Sci;
     
    7683  G4Material*        madaBasalt;
    7784  G4Material*        icelandicBasalt;
     85  G4Material*        icelandicWD;
     86  G4Material*        icelandicRF;
    7887  G4Material*        GaAs;
    7988  G4Material*        galactic;
  • trunk/examples/advanced/xray_fluorescence/include/XrayFluoPhysicsList.hh

    r807 r1230  
    4545//#include "XrayFluoMercuryConstruction.hh"
    4646
    47 class XrayFluoPhysicsListMessenger;
     47/*
    4848class G4LowEnergyIonisation;
    4949class G4LowEnergyPhotoElectric;
    5050class G4LowEnergyBremsstrahlung;
    5151class G4eIonisation;
     52*/
     53
     54class XrayFluoPhysicsListMessenger;
    5255class XrayFluoDetectorConstruction;
    5356class XrayFluoPlaneDetectorConstruction;
     
    104107private:
    105108
    106   G4LowEnergyIonisation*  LeIoprocess;
    107   G4LowEnergyPhotoElectric* LePeprocess;
    108   G4LowEnergyBremsstrahlung* LeBrprocess;
     109//  G4LowEnergyIonisation*  LeIoprocess;
     110//  G4LowEnergyPhotoElectric* LePeprocess;
     111//  G4LowEnergyBremsstrahlung* LeBrprocess;
    109112  // G4eIonisation* eIoProcess; // modified
    110113  XrayFluoPhysicsListMessenger* physicsListMessenger;
  • trunk/examples/advanced/xray_fluorescence/include/XrayFluoPrimaryGeneratorAction.hh

    r807 r1230  
    9393  //messenger of this class
    9494  XrayFluoPrimaryGeneratorMessenger* gunMessenger;
     95
    9596  XrayFluoRunAction*  runManager;
    9697 
  • trunk/examples/advanced/xray_fluorescence/initInter.mac

    r807 r1230  
    1111# create empty scene
    1212#
    13 /vis/scene/create
     13#/vis/scene/create
    1414#
    1515# Create a scene handler for a specific graphics system
     
    1717#
    1818
    19 /vis/open OGLIX
     19#/vis/open OGLIX
     20#/vis/open VRML2FILE
    2021
    2122#
     
    2324#
    2425#
    25 /vis/viewer/flush
     26#/vis/viewer/flush
    2627
    2728
     
    2930# (if too many tracks cause core dump => storeTrajectory 0)
    3031
    31 /tracking/storeTrajectory 1
    32 /vis/viewer/set/viewpointThetaPhi  60 30
     32#/tracking/storeTrajectory 1
     33#/vis/viewer/set/viewpointThetaPhi  60 30
    3334
    3435# this is not to redraw every single event
    3536
    36 /vis/scene/endOfEventAction accumulate
     37#/vis/scene/endOfEventAction accumulate
    3738
    3839
  • trunk/examples/advanced/xray_fluorescence/src/XrayFluoAnalysisManager.cc

    r807 r1230  
    3232// History:
    3333// -----------
     34// 20 Jul 2007 A.Mantero, code cleaning and update. Replaced histos with tuple
    3435// 11 Jul 2003 A.Mantero, code cleaning / Plotter-XML addiction
    3536//    Sep 2002 A.Mantero, AIDA3.0 Migration
     
    4647#include "XrayFluoAnalysisManager.hh"
    4748#include "G4Step.hh"
     49#include "XrayFluoDetectorConstruction.hh"
     50#include "G4VPhysicalVolume.hh"
    4851
    4952XrayFluoAnalysisManager* XrayFluoAnalysisManager::instance = 0;
     
    5356XrayFluoAnalysisManager::XrayFluoAnalysisManager()
    5457  :outputFileName("xrayfluo"), visPlotter(false), phaseSpaceFlag(false), physicFlag (false), persistencyType("xml"),
    55    deletePersistencyFile(true), gunParticleEnergies(0), gunParticleTypes(0), analysisFactory(0), tree(0),histogramFactory(0), plotter(0)
     58   deletePersistencyFile(true), gunParticleEnergies(0), gunParticleTypes(0), analysisFactory(0), tree(0), treeDet(0), histogramFactory(0), plotter(0)
    5659{
    5760  //creating the messenger
     
    197200    // Book tuple
    198201    std::vector<std::string> columnNames;
    199     columnNames.push_back("Particle");
    200     columnNames.push_back("Energies");
     202    columnNames.push_back("particle");
     203    columnNames.push_back("energies");
    201204    columnNames.push_back("momentumTheta");
    202205    columnNames.push_back("momentumPhi");
    203     columnNames.push_back("Processes");
     206    columnNames.push_back("processes");
     207    columnNames.push_back("material");
     208    columnNames.push_back("origin");
     209    columnNames.push_back("depth");
    204210
    205211    std::vector<std::string> columnTypes;
     
    209215    columnTypes.push_back("double");
    210216    columnTypes.push_back("int"); // useful for hbk
    211 
     217    columnTypes.push_back("int"); // useful for hbk
     218    columnTypes.push_back("int");
     219    columnTypes.push_back("double");
    212220
    213221    tupleFluo = tupleFactory->create("10", "Total Tuple", columnNames, columnTypes, "");
     
    262270  gunParticleTypes = new std::vector<G4String>;
    263271
     272  // dal punto di vista della programmazione e' un po' una porcata.....
     273
    264274  AIDA::ITreeFactory* treeDataFactory = analysisFactory->createTreeFactory();
    265   AIDA::ITree* treeData = treeDataFactory->create(fileName,persistencyType,true,false); // input file
     275  AIDA::ITree* treeData = treeDataFactory->create(fileName,persistencyType,false, false); // input file
    266276  AIDA::IManagedObject* mo = treeData->find("10");
     277  assert(mo);
     278  G4cout <<"mo Name:" << mo->name()<< G4endl;
    267279  AIDA::ITuple* tupleData = dynamic_cast<AIDA::ITuple*>(mo);
     280
     281  //AIDA::ITuple* tupleData = (AIDA::ITuple*) treeData->find("10");
     282
     283  assert(tupleData);
     284  // da riscrivere un pochino melgio. Del resto serve per pochissmo, poi non serve piu'
     285
     286
    268287  tupleData->start();
     288  G4int processesIndex = tupleData->findColumn("processes");
     289  G4int energyIndex = tupleData->findColumn("energies");
     290  G4int particleIndex = tupleData->findColumn("particle");
    269291
    270292  while (tupleData->next()) {
    271     if (raileighFlag ^ (!raileighFlag && (tupleData->getInt(4)) ) ) {
    272       gunParticleEnergies->push_back(tupleData->getDouble(1));
    273       if (tupleData->getInt(0) == 1 ) gunParticleTypes->push_back("gamma");
    274       if (tupleData->getInt(0) == 0 ) gunParticleTypes->push_back("e-");
     293    if (raileighFlag ^ (!raileighFlag && (tupleData->getInt(processesIndex) == 1 ||
     294                                          tupleData->getInt(processesIndex) == 2)) )  {
     295      gunParticleEnergies->push_back(tupleData->getDouble(energyIndex)*MeV);
     296      if (tupleData->getInt(particleIndex) == 1 ) gunParticleTypes->push_back("gamma");
     297      if (tupleData->getInt(particleIndex) == 0 ) gunParticleTypes->push_back("e-");
    275298    }
    276299
     
    344367  if(plotter) {
    345368    if (phaseSpaceFlag){
     369
     370
     371      // altra porcata di programmazione e cmq mi serve un istogramma. Da rivedere il tutto.
    346372      // Plotting the spectrum of Gamma exiting the sample - cloud1
    347373      AIDA::ICloud1D& cloud = *cloud_1;
     
    349375                                              " Particle == std::string(\"gamma\") ");
    350376      AIDA::IEvaluator* evaluatorEnergy = tupleFactory->createEvaluator("Energies");
     377
     378      // di nuovo, del resto serve solo per un attimo.. da correggere cmq.
     379
    351380      filterGamma->initialize(*tupleFluo);
    352381      evaluatorEnergy->initialize(*tupleFluo);
     
    396425    G4ThreeVector momentum=0;
    397426    G4double particleEnergy=0;
    398    
    399     // Select volume from wich the step starts
     427    G4String sampleMaterial="";
     428    G4double particleDepth=0;
     429    G4int isBornInTheSample=0;
     430    XrayFluoDetectorConstruction* detector = XrayFluoDetectorConstruction::GetInstance();   
     431
     432    // Select volume from which the step starts
    400433    if(aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()=="Sample"){
    401       // Select volume in wich the step ends
    402       if (physicFlag ^ (!physicFlag && (aStep->GetTrack()->GetNextVolume()->GetName() == "World" ))) {
     434      G4ThreeVector creationPos = aStep->GetTrack()->GetVertexPosition();
     435      // qua serve ancora una selezione: deve essere interno al sample
     436      //codice "a mano" per controllare il volume di orgine della traccia
     437      /*
     438      G4Double sampleXplus  = detector->GetSampleXplusFaceCoord();
     439      G4Double sampleXminus = detector->GetSampleXminusFaceCoord();
     440      G4Double sampleYplus  = detector->GetSampleYplusFaceCoord();
     441      G4Double sampleYminus = detector->GetSampleYminusFaceCoord();
     442      G4Double sampleZplus  = detector->GetSampleYplusFaceCoord();
     443      G4Double sampleZminus = detector->GetSampleYminusFaceCoord();
     444
     445      G4bool ZsampleCheck = (creationPos.z()<=sampleZminus) && (creationPos.z() >= sampleZplus);
     446      G4bool XsampleCheck = (creationPos.x()<=sampleZminus) && (creationPos.x() >= sampleXplus);
     447      G4bool YsampleCheck = (creationPos.y()<=sampleZminus) && (creationPos.y() >= sampleYplus);
     448      */
     449      G4VPhysicalVolume* creationPosVolume = detector->GetGeometryNavigator()->LocateGlobalPointAndSetup(creationPos);
     450
     451      // if physicflag is on, I record all the data of all the particle born in the sample.
     452      // If it is off (but phase space production is on) I record data
     453      // only for particles creted inside the sample and exiting it. 
     454      if (physicFlag ^ (!physicFlag &&
     455                        (aStep->GetPostStepPoint()->GetStepStatus() == fGeomBoundary)
     456                        //ZsampleCheck && XsampleCheck && YsampleCheck)) {
     457                        ) ) {
    403458        //
    404459        //
     
    410465        momentum = aStep->GetTrack()->GetDynamicParticle()->GetMomentum();
    411466        particleEnergy = aStep->GetPreStepPoint()->GetKineticEnergy();
     467        if (creationPosVolume->GetName() == "Sample" ) {
     468          isBornInTheSample = 1;
     469          particleDepth = creationPosVolume->GetLogicalVolume()->GetSolid()->DistanceToOut(creationPos, G4ThreeVector(0,0,-1));
     470        }
     471        else {
     472          particleDepth = -1;
     473        }
     474        // metodo per ottenere la profondita' "a mano"
     475        //      particleDepth = std::abs(creationPos.z() - detector->GetSampleIlluminatedFaceCoord());
     476
    412477        G4int parent;
    413478        if(aStep->GetTrack()->GetCreatorProcess()){
    414479          parentProcess = aStep->GetTrack()->GetCreatorProcess()->GetProcessName();
    415           parent = 1;
     480          parent = 5;
     481          // hack for HBK
     482          if (parentProcess == "") parent = 0;
     483          if (parentProcess == "IONI") parent = 1;
     484          if (parentProcess == "LowEnPhotoElec") parent = 2;
     485          if (parentProcess == "Transportation") parent = 3;// should never happen
     486          if (parentProcess == "initStep") parent = 4;// should never happen
    416487        }       
    417488        else {
    418           parentProcess = "Not Known";
    419           parent = 0;
     489          parentProcess = "Not Known -- (primary generator + Rayleigh)";
     490          parent = 5;
    420491        }
     492        G4int sampleMat=0;
     493        if(aStep->GetTrack()){
     494          sampleMaterial = aStep->GetTrack()->GetMaterial()->GetName();
     495          if (sampleMaterial == ("Dolorite" || "Anorthosite" || "Mars1" || "IceBasalt" || "HPGe")) sampleMat=1;
     496            }
    421497        // filling tuple
    422498       
    423499        //      G4cout<< particleType << G4endl;
    424         G4int part = 2 ;
     500        G4int part = -1 ;
    425501        if (particleType == "gamma") part =1;
    426502        if (particleType == "e-") part = 0;
    427        
     503        if (particleType == "proton") part = 2;
     504       
     505
    428506        tupleFluo->fill(0,part);
    429507        tupleFluo->fill(1,particleEnergy);
    430508        tupleFluo->fill(2,momentum.theta());
    431509        tupleFluo->fill(3,momentum.phi());
    432         tupleFluo->fill(4,parent); //hacked to be useful for hbk
     510        tupleFluo->fill(4,parent); //hacked to be used with hbk
     511        tupleFluo->fill(5,sampleMat); //hacked to be used with hbk
     512        tupleFluo->fill(6,isBornInTheSample);
     513        tupleFluo->fill(7,particleDepth);
    433514       
    434515        tupleFluo->addRow();
     
    678759   
    679760   
    680     AIDA::IFilter* filterAngle = tupleFactory->createFilter("(momentumPhi   >= (220. * (3.1415926/180.) )) &&
    681                                                              (momentumPhi   <= (230. * (3.1415926/180.) )) &&
    682                                                              (momentumTheta >= (130. * (3.1415926/180.) )) &&
    683                                                              (momentumTheta <= (140. * (3.1415926/180.) )) " );
     761    AIDA::IFilter* filterAngle = tupleFactory->createFilter(
     762
     763"(momentumPhi   >= (220. * (3.1415926/180.) )) && (momentumPhi   <= (230. * (3.1415926/180.) )) && (momentumTheta >= (130. * (3.1415926/180.) )) && (momentumTheta <= (140. * (3.1415926/180.) ))" );
    684764   
    685765   
     
    743823
    744824#endif
    745 
    746 
    747 
    748 
    749 
    750 
    751 
    752 
  • trunk/examples/advanced/xray_fluorescence/src/XrayFluoDataSet.cc

    r807 r1230  
    131131
    132132
    133 void XrayFluoDataSet::LoadData(const G4String& fileName)
    134 {
     133G4bool XrayFluoDataSet::LoadData(const G4String& fileName) {
     134
    135135  // Build the complete string identifying the file with the data set
    136136 
     
    199199 
    200200  file.close();
     201  return true;
    201202}
    202203void XrayFluoDataSet::PrintData() const
     
    217218
    218219
    219 
    220 
    221 
    222 
    223 
    224 
    225 
    226 
    227 
    228 
    229 
    230 
  • trunk/examples/advanced/xray_fluorescence/src/XrayFluoDetectorConstruction.cc

    r807 r1230  
    5959
    6060
    61 #include "G4Region.hh"
    62 #include "G4RegionStore.hh"
     61//#include "G4Region.hh"
     62//#include "G4RegionStore.hh"
    6363
    6464//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     
    6666
    6767XrayFluoDetectorConstruction::XrayFluoDetectorConstruction()
    68   : detectorType(0),sampleGranularity(false), phaseSpaceFlag(false),
     68  : aNavigator(0), detectorType(0),sampleGranularity(false), phaseSpaceFlag(false),
    6969    DeviceSizeX(0), DeviceSizeY(0),DeviceThickness(0),
    7070    solidWorld(0),logicWorld(0),physiWorld(0),
     
    8383{
    8484  materials = XrayFluoNistMaterials::GetInstance();
     85
     86  aNavigator = new G4Navigator();
    8587 
    8688  DefineDefaultMaterials();
     
    8991  NbOfPixelColumns  =  1; // should be 1
    9092  NbOfPixels        =  NbOfPixelRows*NbOfPixelColumns;
    91   PixelSizeXY       =  std::sqrt(40.) * mm; // should be std::sqrt(40) * mm
     93  PixelSizeXY       =  7 * cm;// should be std::sqrt(40) * mm
    9294  PixelThickness = 3.5 * mm; //should be 3.5 mm
    9395
     
    9597  G4cout << "PixelSizeXY(cm): "<< PixelSizeXY/cm << G4endl;
    9698
    97   ContactSizeXY     = std::sqrt(40.) * mm; //std::sqrt(40) * mm; //should be the same as PixelSizeXY
     99  ContactSizeXY     = PixelSizeXY; //std::sqrt(40) * mm; //should be the same as PixelSizeXY
    98100  SampleThickness = 4 * mm;
    99101  SampleSizeXY = 3. * cm;
     
    132134  ComputeApparateParameters();
    133135
    134   G4String regName = "SampleRegion";
    135   sampleRegion = new G4Region(regName); 
     136  // G4String regName = "SampleRegion";
     137  //sampleRegion = new G4Region(regName); 
    136138
    137139  if (!phaseSpaceFlag) SetDetectorType(defaultDetectorType);
     
    205207  //define materials of the apparate
    206208
    207   sampleMaterial = materials->GetMaterial("Mars1");
     209  sampleMaterial = materials->GetMaterial("Dolorite");
    208210  Dia1Material = materials->GetMaterial("G4_Pb");
    209211  Dia3Material = materials->GetMaterial("Galactic");
    210   pixelMaterial = materials->GetMaterial("G4_Si");
    211   OhmicPosMaterial = materials->GetMaterial("G4_Cu");
     212  pixelMaterial = materials->GetMaterial("SiLi");
     213  //pixelMaterial = materials->GetMaterial(detectorType->GetDetectorMaterial());
     214  OhmicPosMaterial = materials->GetMaterial("Cu");
    212215  OhmicNegMaterial = materials->GetMaterial("G4_Pb");
    213216  defaultMaterial = materials->GetMaterial("Galactic");
     
    246249  //ComputeApparateParameters();
    247250 
    248   //world
     251  //world and associated navigator
    249252 
    250253  solidWorld = new G4Box("World",                               //its name
     
    261264                                 false,                 //no boolean operation
    262265                                 0);                    //copy number
     266
     267  aNavigator->SetWorldVolume(physiWorld);
     268
    263269 
    264270  //HPGeDetector
     
    378384          PixelCopyNb += PixelCopyNb;
    379385          G4cout << "PixelCopyNb: " << PixelCopyNb << G4endl;
    380       }
     386        }
    381387     
    382388      }
     
    611617  // cut per region
    612618 
    613   logicSample->SetRegion(sampleRegion);
    614   sampleRegion->AddRootLogicalVolume(logicSample);
     619  //logicSample->SetRegion(sampleRegion);
     620  //sampleRegion->AddRootLogicalVolume(logicSample);
    615621 
    616622
     
    758764
    759765
    760     G4cout << "Material Change in Progress" << newMaterial << G4endl;
     766    G4cout << "Material Change in Progress " << newMaterial << G4endl;
    761767    sampleMaterial = materials->GetMaterial(newMaterial);
    762768    logicSample->SetMaterial(sampleMaterial);
  • trunk/examples/advanced/xray_fluorescence/src/XrayFluoDetectorMessenger.cc

    r807 r1230  
    6060
    6161  sampleCmd = new G4UIcmdWithAString("/apparate/sampleMaterial",this);
    62   sampleCmd->SetGuidance("select a diferent material for the sample: materials can be: Dolorite, Anorthosite, Mars1, IceBasalt, HPGe OR choosen from Nist database (see /material/nist/listMaterials for details");
     62  sampleCmd->SetGuidance("select a diferent material for the sample: materials can be: Dolorite, Anorthosite, Mars1, HawaiianWD, HawaiianRF, IceBasalt, IcelandicWD, IcelandicRF, Gabbro, GabbroWD, GabbroRF, HPGe OR choosen from Nist database (see /material/nist/listMaterials for details");
    6363  sampleCmd->SetParameterName("material",true);
    6464  sampleCmd->SetDefaultValue("mars1");
  • trunk/examples/advanced/xray_fluorescence/src/XrayFluoEventAction.cc

    r807 r1230  
    254254    return   EdepDetect;
    255255   
    256 };
    257 
    258 
     256}
     257
     258
  • trunk/examples/advanced/xray_fluorescence/src/XrayFluoNistMaterials.cc

    r807 r1230  
    4343XrayFluoNistMaterials::~XrayFluoNistMaterials()
    4444{
    45   delete    dolorite;
    46   delete    HPGe;
    47   delete    mars1;
    48   delete    galactic;
    49   delete    madaBasalt;
    50   delete    icelandicBasalt;
    51   delete    GaAs;
     45  delete    dolorite;       
     46  delete    HPGe;           
     47  delete    SiLi;           
     48  delete    mars1;           
     49  delete    anorthosite;     
     50  delete    basalt;         
     51  delete    gabbro;
     52  delete    gabbroWD;
     53  delete    gabbroRF;
     54  delete    Air;             
     55  delete    Sci;             
     56  delete    Vacuum;         
     57  delete    madaBasalt;     
     58  delete    icelandicBasalt;
     59  delete    icelandicWD;
     60  delete    icelandicRF;
     61  delete    GaAs;           
     62  delete    galactic;       
     63  delete    copper;
     64  delete    hawaiianRF;
     65  delete    hawaiianWD;         
     66
     67
     68
    5269}
    5370XrayFluoNistMaterials* XrayFluoNistMaterials::instance = 0;
     
    165182
    166183
    167   ///////////////////////
    168   // Iceland    Basalt //
    169   ///////////////////////
     184  ///////////////////////////////////////////
     185  // Iceland    Basalt 0029.PP.0035 sample //
     186  ///////////////////////////////////////////
    170187
    171188  elements.push_back("Si");  fractionMass.push_back(0.2313);
     
    337354  mars1->AddMaterial(mars1Main, 0.9955036837);
    338355
     356  /////////////////////////////////
     357  //  Hawaiian -- WD coposition  //
     358  /////////////////////////////////
     359
     360  density = 3*g/cm3;
     361
     362  elements.push_back("Fe");    fractionMass.push_back(1.1819860E-01); 
     363  elements.push_back("Ti");    fractionMass.push_back(2.2781000E-02);
     364  elements.push_back("Ca");    fractionMass.push_back(4.5026100E-02);
     365  elements.push_back("Si");    fractionMass.push_back(2.0518860E-01); 
     366  elements.push_back("Al");    fractionMass.push_back(1.3285430E-01); 
     367  elements.push_back("Mg");    fractionMass.push_back(2.4120000E-03);
     368  elements.push_back("Na");    fractionMass.push_back(2.2257000E-02);
     369  elements.push_back("K");     fractionMass.push_back(4.9812000E-03);
     370  elements.push_back("O");     fractionMass.push_back(4.4630120E-01);
     371
     372  hawaiianWD = nistMan->ConstructNewMaterial("HawaiianWD", elements, fractionMass, density);
     373
     374  elements.clear();
     375  fractionMass.clear();
     376
     377  //////////////////////////////////
     378  //  Hawaiian -- RF composition  //
     379  //////////////////////////////////
     380
     381  density = 3*g/cm3;
     382
     383
     384  elements.push_back("Fe");    fractionMass.push_back(1.1120460E-01); 
     385  elements.push_back("Ti");    fractionMass.push_back(2.1582000E-02);
     386  elements.push_back("Ca");    fractionMass.push_back(4.3596700E-02);
     387  elements.push_back("Si");    fractionMass.push_back(2.1313440E-01); 
     388  elements.push_back("Al");    fractionMass.push_back(1.0374280E-01); 
     389  elements.push_back("Mg");    fractionMass.push_back(1.9296000E-02);
     390  elements.push_back("Na");    fractionMass.push_back(2.8192200E-02);
     391  elements.push_back("K");     fractionMass.push_back(5.8114000E-03);
     392  elements.push_back("P");     fractionMass.push_back(4.8004000E-03);
     393  elements.push_back("Mn");    fractionMass.push_back(2.3235000E-03);
     394  elements.push_back("O");     fractionMass.push_back(4.4531600E-01);
     395
     396  hawaiianRF = nistMan->ConstructNewMaterial("HawaiianRF", elements, fractionMass, density);
     397
     398  elements.clear();
     399  fractionMass.clear();
     400
     401  //////////////////////////////////
     402  //  Icelandic -- WD composition  //
     403  //////////////////////////////////
     404
     405  density = 3*g/cm3;
     406
     407
     408  elements.push_back("Si");    fractionMass.push_back(2.2949340E-01);   
     409  elements.push_back("Ti");    fractionMass.push_back(1.1990000E-02);
     410  elements.push_back("Al");    fractionMass.push_back(7.0396900E-02); 
     411  elements.push_back("Fe");    fractionMass.push_back(1.1330280E-01); 
     412  elements.push_back("Mg");    fractionMass.push_back(3.4974000E-02);
     413  elements.push_back("Ca");    fractionMass.push_back(7.5758200E-02);
     414  elements.push_back("Na");    fractionMass.push_back(1.8547500E-02); 
     415  elements.push_back("K");     fractionMass.push_back(3.3208000E-03);
     416  elements.push_back("O");     fractionMass.push_back(4.4121640E-01);
     417 
     418  icelandicWD = nistMan->ConstructNewMaterial("IcelandicWD", elements, fractionMass, density);
     419 
     420  elements.clear();
     421  fractionMass.clear();
     422
     423
     424  //////////////////////////////////
     425  //  Icelandic -- RF composition  //
     426  //////////////////////////////////
     427
     428  density = 3*g/cm3;
     429
     430
     431  elements.push_back("Si");    fractionMass.push_back(2.4304800E-01);   
     432  elements.push_back("Ti");    fractionMass.push_back(1.3788500E-02);
     433  elements.push_back("Al");    fractionMass.push_back(6.5103900E-02); 
     434  elements.push_back("Fe");    fractionMass.push_back(1.1819860E-01); 
     435  elements.push_back("Mn");    fractionMass.push_back(2.3235000E-03);
     436  elements.push_back("Mg");    fractionMass.push_back(2.3517000E-02);
     437  elements.push_back("Ca");    fractionMass.push_back(8.2190500E-02);
     438  elements.push_back("K");     fractionMass.push_back(3.3208000E-03);
     439  elements.push_back("P");     fractionMass.push_back(1.3092000E-03);
     440  elements.push_back("O");     fractionMass.push_back(4.4620000E-01);
     441 
     442  icelandicRF = nistMan->ConstructNewMaterial("IcelandicRF", elements, fractionMass, density);
     443 
     444  elements.clear();
     445  fractionMass.clear();
     446
     447  //////////////////////////////////
     448  //  Gabbro -- WD composition  //
     449  //////////////////////////////////
     450
     451  density = 3*g/cm3;
     452
     453  elements.push_back("Si");    fractionMass.push_back(1.8696000E-01);   
     454  elements.push_back("Ti");    fractionMass.push_back(2.3380500E-02);
     455  elements.push_back("Al");    fractionMass.push_back(4.6049100E-02); 
     456  elements.push_back("Fe");    fractionMass.push_back(1.2239500E-01); 
     457  elements.push_back("Mg");    fractionMass.push_back(8.3817000E-02);
     458  elements.push_back("Ca");    fractionMass.push_back(1.0720500E-01);
     459  elements.push_back("Na");    fractionMass.push_back(5.9352000E-03); 
     460  elements.push_back("K");     fractionMass.push_back(1.6604000E-03);
     461  elements.push_back("O");     fractionMass.push_back(4.2259780E-01);
     462 
     463  gabbroWD = nistMan->ConstructNewMaterial("GabbroWD", elements, fractionMass, density);
     464 
     465  elements.clear();
     466  fractionMass.clear();
     467
     468  //////////////////////////////////
     469  //  Gabbro -- RF composition  //
     470  //////////////////////////////////
     471
     472  density = 3*g/cm3;
     473
     474
     475  elements.push_back("Si");    fractionMass.push_back(1.6826400E-01);   
     476  elements.push_back("Ti");    fractionMass.push_back(2.2781000E-02);
     477  elements.push_back("Al");    fractionMass.push_back(5.8223000E-02); 
     478  elements.push_back("Fe");    fractionMass.push_back(1.2729080E-01); 
     479  elements.push_back("Mn");    fractionMass.push_back(1.5490000E-03);
     480  elements.push_back("Mg");    fractionMass.push_back(8.3817000E-02);
     481  elements.push_back("Ca");    fractionMass.push_back(1.1721080E-01);
     482  elements.push_back("Na");    fractionMass.push_back(0.0000000E+00); 
     483  elements.push_back("K");     fractionMass.push_back(1.6604000E-03);
     484  elements.push_back("P");     fractionMass.push_back(1.7456000E-03);
     485  elements.push_back("O");     fractionMass.push_back(4.1845840E-01);
     486 
     487  gabbroRF = nistMan->ConstructNewMaterial("GabbroRF", elements, fractionMass, density);
     488 
     489  elements.clear();
     490  fractionMass.clear();
     491
     492
    339493  ///////////////////////
    340494  //     Anorthosite   //
     
    371525  fractionMass.clear();
    372526
     527  ////////////////////////////////////////
     528  //     Gabbro       0059.PP.0048      //
     529  ////////////////////////////////////////
     530
     531
     532  density = 3.0*g/cm3;
     533
     534  elements.push_back("Si");    fractionMass.push_back(1.8284688E-01); 
     535  elements.push_back("Ti");    fractionMass.push_back(2.2601150E-02); 
     536  elements.push_back("Al");    fractionMass.push_back(4.4831710E-02); 
     537  elements.push_back("Fe");    fractionMass.push_back(1.2578402E-01); 
     538  elements.push_back("Mn");    fractionMass.push_back(1.3166500E-03); 
     539  elements.push_back("Mg");    fractionMass.push_back(8.1706500E-02); 
     540  elements.push_back("Ca");    fractionMass.push_back(1.0506090E-01); 
     541  elements.push_back("Na");    fractionMass.push_back(5.4900600E-03); 
     542  elements.push_back("K");     fractionMass.push_back(1.4943600E-03); 
     543  elements.push_back("P");     fractionMass.push_back(3.4912000E-04); 
     544  elements.push_back("O");     fractionMass.push_back(4.0651865E-01);
     545
     546  gabbro = nistMan->ConstructNewMaterial("Gabbro", elements, fractionMass, density);
     547
     548  elements.clear();
     549  fractionMass.clear();
     550
    373551  //define gallium arsenide
    374552
     
    382560  natoms.clear();
    383561
    384 
     562  /*
    385563  // define germanium
    386564 
     
    388566 
    389567  elements.push_back("Ge");     natoms.push_back(1);
    390   HPGe = nistMan->ConstructNewMaterial("HPGe",elements, natoms, density);
    391 
    392   elements.clear();
    393   natoms.clear();
    394  
     568
     569  G4cout << elements[1] <<", "<<natoms[1] <<", " << elements.size() << ", " << natoms.size() << G4endl;
     570 
     571
     572  HPGe = nistMan->ConstructNewMaterial("High Purity Germanium",elements, natoms, density);
     573
     574  elements.clear();
     575  natoms.clear();
     576  */
    395577  //define scintillator
    396578
     
    411593  Vacuum = new G4Material("Galactic", 1., 1.01*g/mole, density,
    412594                                       kStateGas,temperature,pressure);
     595
     596  elements.clear();
     597  natoms.clear();
    413598
    414599  //define basalt
     
    422607  elements.push_back("Mg");     fractionMass.push_back(0.0590);   
    423608  elements.push_back("O");      fractionMass.push_back(0.4430);
    424 
    425 
    426609 
    427610  basalt = nistMan->ConstructNewMaterial("Basalt", elements, fractionMass, density);
    428611
     612  elements.clear();
     613  fractionMass.clear();
     614
     615 
     616  // define silicon
     617
     618  density = 2330*kg/m3;
     619
     620  // workaround for a problem in nistMan: it doesn't like material with a single element.
     621
     622  elements.push_back("Si");       natoms.push_back(1);
     623  elements.push_back("Si");       natoms.push_back(1);
     624 
     625  SiLi = nistMan->ConstructNewMaterial("SiLi",elements, natoms, density);
     626
     627  elements.clear();
     628  natoms.clear();
     629 
     630
     631  // define copper
     632
     633  density = 8920*kg/m3;
     634
     635  // workaround for a problem in nistMan: it doesn't like material with a single element.
     636  elements.push_back("Cu");       natoms.push_back(1);
     637  elements.push_back("Cu");       natoms.push_back(1);
     638
     639  copper = nistMan->ConstructNewMaterial("Cu",elements, natoms, density);
     640
     641  elements.clear();
     642  natoms.clear();
     643
    429644  G4cout << *(G4Material::GetMaterialTable()) << G4endl;
    430645}
  • trunk/examples/advanced/xray_fluorescence/src/XrayFluoPhysicsList.cc

    r807 r1230  
    3636// -------------------------------------------------------------------
    3737
     38#include "G4ParticleDefinition.hh"
     39#include "G4ParticleTypes.hh"
     40#include "G4ProcessManager.hh"
    3841#include "XrayFluoPhysicsList.hh"
    3942#include "XrayFluoPhysicsListMessenger.hh"
     
    4346
    4447/////////////////////////////////////////
    45 //#include "G4LeptonConstructor.hh"
    46 //#include "G4BosonConstructor.hh"
     48#include "G4LeptonConstructor.hh"
     49#include "G4BosonConstructor.hh"
    4750//#include "G4MesonConstructor.hh"
     51#include "G4IonConstructor.hh"
    4852#include "G4BaryonConstructor.hh"
    4953/////////////////////////////////////////
    5054
    51 
     55/*
    5256#include "G4ParticleDefinition.hh"
    5357#include "G4ParticleWithCuts.hh"
     
    5660#include "G4ParticleTable.hh"
    5761#include "G4ios.hh"
    58 
    59 #include "G4Region.hh"
    60 #include "G4RegionStore.hh"
     62*/
     63
     64//#include "G4Region.hh"
     65//#include "G4RegionStore.hh"
    6166
    6267
     
    6974  pDet = p;
    7075
    71   //  SetGELowLimit(250*eV);
     76  SetGELowLimit(250*eV);
    7277
    7378  defaultCutValue = 10e-6*mm;
     
    7984  physicsListMessenger = new XrayFluoPhysicsListMessenger(this);
    8085
     86  /*
    8187  G4String regName = "SampleRegion";
    8288  G4double cutValue = 0.000001 * mm; 
     
    8692  cuts->SetProductionCut(cutValue);
    8793  reg->SetProductionCuts(cuts);
    88 
     94  */
    8995
    9096
     
    178184{
    179185//  Ions
    180   G4Alpha::AlphaDefinition();
     186  G4IonConstructor ions;
     187  ions.ConstructParticle();
     188  //  G4Alpha::AlphaDefinition();
    181189}
    182190
     
    189197//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    190198
     199
     200#include "G4PhotoElectricEffect.hh"
     201#include "G4LivermorePhotoElectricModel.hh"
     202
     203#include "G4ComptonScattering.hh"
     204#include "G4LivermoreComptonModel.hh"
     205
     206#include "G4GammaConversion.hh"
     207#include "G4LivermoreGammaConversionModel.hh"
     208
     209#include "G4RayleighScattering.hh"
     210#include "G4LivermoreRayleighModel.hh"
     211/*
    191212#include "G4LowEnergyCompton.hh"
    192213#include "G4LowEnergyGammaConversion.hh"
    193214#include "G4LowEnergyPhotoElectric.hh"
    194215#include "G4LowEnergyRayleigh.hh"
    195 
    196 // e+
     216*/
     217
     218// e+-
     219/*
    197220#include "G4MultipleScattering.hh"
    198221#include "G4eIonisation.hh"
    199222#include "G4eBremsstrahlung.hh"
    200 #include "G4eplusAnnihilation.hh"
     223
    201224
    202225#include "G4LowEnergyIonisation.hh"
    203226#include "G4LowEnergyBremsstrahlung.hh"
     227*/
     228
     229#include "G4eMultipleScattering.hh"
     230#include "G4UniversalFluctuation.hh"
     231
     232#include "G4eIonisation.hh"
     233#include "G4LivermoreIonisationModel.hh"
     234
     235#include "G4eBremsstrahlung.hh"
     236#include "G4LivermoreBremsstrahlungModel.hh"
     237
     238#include "G4eplusAnnihilation.hh"
     239
    204240#include "G4hLowEnergyIonisation.hh"
     241#include "G4hMultipleScattering.hh"
     242
     243// options
     244
     245#include "G4LossTableManager.hh"
     246#include "G4EmProcessOptions.hh"
    205247
    206248//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     
    217259
    218260      // gamma         
     261      /*
    219262      pmanager->AddDiscreteProcess(new G4LowEnergyCompton);
    220263     
    221264      LePeprocess = new G4LowEnergyPhotoElectric();
    222265
    223       LePeprocess->ActivateAuger(true);
    224       LePeprocess->SetCutForLowEnSecPhotons(0.250 * keV);
    225       LePeprocess->SetCutForLowEnSecElectrons(0.250 * keV);
    226266
    227267      pmanager->AddDiscreteProcess(LePeprocess);
     
    229269      pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh("Rayleigh"));
    230270     
     271      */
     272
     273      G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
     274      G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel = new G4LivermorePhotoElectricModel();
     275
     276      theLivermorePhotoElectricModel->ActivateAuger(true);
     277      theLivermorePhotoElectricModel->SetCutForLowEnSecPhotons(0.010 * keV);
     278      theLivermorePhotoElectricModel->SetCutForLowEnSecElectrons(0.010 * keV);
     279
     280      thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
     281      pmanager->AddDiscreteProcess(thePhotoElectricEffect);
     282
     283
     284      G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
     285      G4LivermoreComptonModel* theLivermoreComptonModel = new G4LivermoreComptonModel();
     286      theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
     287      pmanager->AddDiscreteProcess(theComptonScattering);
     288
     289      G4GammaConversion* theGammaConversion = new G4GammaConversion();
     290      G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel = new G4LivermoreGammaConversionModel();
     291      theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
     292      pmanager->AddDiscreteProcess(theGammaConversion);
     293
     294      G4RayleighScattering* theRayleigh = new G4RayleighScattering();
     295      G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
     296      theRayleigh->AddEmModel(0, theRayleighModel);
     297      pmanager->AddDiscreteProcess(theRayleigh);
     298
     299
     300
    231301    } else if (particleName == "e-") {
    232302      //electron
    233       pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
    234      
     303      /*   
     304      pmanager->AddProcess(new G4MultipleScattering(),-1, 1,1);
     305
    235306      LeIoprocess = new G4LowEnergyIonisation("IONI");
    236307      LeIoprocess->ActivateAuger(true);
    237308      //eIoProcess = new G4eIonisation("stdIONI");
    238       LeIoprocess->SetCutForLowEnSecPhotons(0.1*keV);
    239       LeIoprocess->SetCutForLowEnSecElectrons(0.1*keV);
     309      LeIoprocess->SetCutForLowEnSecPhotons(0.01*keV);
     310      LeIoprocess->SetCutForLowEnSecElectrons(0.01*keV);
    240311      pmanager->AddProcess(LeIoprocess, -1,  2, 2);
    241312
    242313      LeBrprocess = new G4LowEnergyBremsstrahlung();
    243314      pmanager->AddProcess(LeBrprocess, -1, -1, 3);
     315      */     
     316     
     317      G4eMultipleScattering* msc = new G4eMultipleScattering();
     318      pmanager->AddProcess(msc,                   -1, 1, 1);
    244319     
     320      // Ionisation
     321      G4eIonisation* eIoni = new G4eIonisation();
     322      G4LivermoreIonisationModel* ioniModel = new G4LivermoreIonisationModel();
     323      eIoni->AddEmModel(0, ioniModel, new G4UniversalFluctuation() );
     324
     325      //      ioniModel->SetCutForLowEnSecPhotons(0.01*keV);
     326      //      ioniModel->SetCutForLowEnSecElectrons(0.01*keV);
     327
     328      eIoni->SetStepFunction(0.2, 100*um); //     
     329      pmanager->AddProcess(eIoni,                 -1, 2, 2);
     330     
     331      // Bremsstrahlung
     332      G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
     333      eBrem->AddEmModel(0, new G4LivermoreBremsstrahlungModel());
     334      pmanager->AddProcess(eBrem,                 -1,-3, 3);
     335
     336
     337
     338
    245339      } else if (particleName == "e+") {
    246340      //positron
    247       pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
    248       pmanager->AddProcess(new G4eIonisation,      -1, 2,2);
    249       pmanager->AddProcess(new G4eBremsstrahlung,   -1,-1,3);
    250       pmanager->AddProcess(new G4eplusAnnihilation,  0,-1,4);
     341      pmanager->AddProcess(new G4eMultipleScattering(),-1, 1,1);
     342      pmanager->AddProcess(new G4eIonisation(),      -1, 2,2);
     343      pmanager->AddProcess(new G4eBremsstrahlung(),   -1,-1,3);
     344      pmanager->AddProcess(new G4eplusAnnihilation(),  0,-1,4);
    251345     
    252346    } 
    253347    else if (particleName == "proton") {
    254348      //proton
    255       G4hLowEnergyIonisation* hIoni = new G4hLowEnergyIonisation;
     349      G4hLowEnergyIonisation* hIoni = new G4hLowEnergyIonisation();
    256350      hIoni->SetFluorescence(true);
    257       pmanager->AddProcess(new G4MultipleScattering,-1,1,1);
     351      pmanager->AddProcess(new G4hMultipleScattering(),-1,1,1);
    258352      pmanager->AddProcess(hIoni,-1, 2,2);
    259353    }
     
    261355      {
    262356       
    263         pmanager->AddProcess(new G4MultipleScattering,-1,1,1);
     357        pmanager->AddProcess(new G4hMultipleScattering(),-1,1,1);
    264358        G4hLowEnergyIonisation* iIon = new G4hLowEnergyIonisation() ;
    265359        pmanager->AddProcess(iIon,-1,2,2);
     
    332426void XrayFluoPhysicsList::SetCuts(){
    333427
    334    SetCutValue(cutForGamma,"gamma");
    335    SetCutValue(cutForElectron,"e-");
    336    SetCutValue(cutForElectron,"e+");
    337    SetCutValue(cutForProton, "proton");
    338    //SetCutValueForOthers(cutForProton);
    339    if (verboseLevel>0) DumpCutValuesTable();
     428  G4double lowlimit=20*eV;
     429  G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(lowlimit, 100.*GeV);
     430  SetCutValue(cutForGamma,"gamma");
     431  SetCutValue(cutForElectron,"e-");
     432  SetCutValue(cutForElectron,"e+");
     433  SetCutValue(cutForProton, "proton");
     434  //SetCutValueForOthers(cutForProton);
     435  if (verboseLevel>0) DumpCutValuesTable();
    340436}
    341437
     
    343439
    344440void XrayFluoPhysicsList::SetLowEnSecPhotCut(G4double cut){
    345  
    346   G4cout<<"Low energy secondary photons cut is now set to: "<<cut/MeV<<" (MeV)"<<G4endl;
    347   G4cout<<"for processes LowEnergyBremsstrahlung, LowEnergyPhotoElectric, LowEnergyIonisation"<<G4endl;
    348   LeBrprocess->SetCutForLowEnSecPhotons(cut);
    349   LePeprocess->SetCutForLowEnSecPhotons(cut);
    350   LeIoprocess->SetCutForLowEnSecPhotons(cut);
     441
     442  cut=0;
     443 
     444//  G4cout<<"Low energy secondary photons cut is now set to: "<<cut/MeV<<" (MeV)"<<G4endl;
     445//  G4cout<<"for processes LowEnergyBremsstrahlung, LowEnergyPhotoElectric, LowEnergyIonisation"<<G4endl;
     446//  LeBrprocess->SetCutForLowEnSecPhotons(cut);
     447//  LePeprocess->SetCutForLowEnSecPhotons(cut);
     448//  LeIoprocess->SetCutForLowEnSecPhotons(cut);
    351449}
    352450
    353451void XrayFluoPhysicsList::SetLowEnSecElecCut(G4double cut){
    354452 
    355   G4cout<<"Low energy secondary electrons cut is now set to: "<<cut/MeV<<" (MeV)"<<G4endl;
    356  
    357   G4cout<<"for processes LowEnergyIonisation"<<G4endl;
    358  
    359   LeIoprocess->SetCutForLowEnSecElectrons(cut);
     453  cut = 0;
     454//  G4cout<<"Low energy secondary electrons cut is now set to: "<<cut/MeV<<" (MeV)"<<G4endl;
     455// 
     456//  G4cout<<"for processes LowEnergyIonisation"<<G4endl;
     457// 
     458//  LeIoprocess->SetCutForLowEnSecElectrons(cut);
    360459}
    361460//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     
    397496  SetCutValue(cut, "proton");
    398497 
    399 //   part = theXrayFluoParticleTable->FindParticle("gamma");
    400 //   cut = G4EnergyLossTables::GetRange(part,val,currMat);
    401 //   SetCutValue(cut, "gamma");
    402 
    403 }
    404 
    405 
    406 
    407 
    408 
    409 
    410 
    411 
    412 
    413 
    414 
    415 
    416 
    417 
    418 
    419 
    420 
    421 
    422 
    423 
    424 
    425 
    426 
    427 
     498  part = theXrayFluoParticleTable->FindParticle("gamma");
     499  cut = G4EnergyLossTables::GetRange(part,val,currMat);
     500  SetCutValue(cut, "gamma");
     501
     502}
     503
     504
     505
     506
     507
     508
     509
     510
     511
     512
     513
     514
     515
     516
     517
     518
     519
     520
     521
     522
     523
     524
     525
     526
  • trunk/examples/advanced/xray_fluorescence/src/XrayFluoPrimaryGeneratorAction.cc

    r807 r1230  
    101101  particleTypes = analysis->GetEmittedParticleTypes();
    102102  detectorPosition = XrayFluoDetector->GetDetectorPosition();
    103   detectorPosition.setR(detectorPosition.r()-(5.*cm)); // 5 cm dietro
     103  detectorPosition.setR(detectorPosition.r()-(5.*cm)); // 5 cm before the detector, so in front of it.
    104104#endif
    105105
     
    233233    }
    234234
     235  // using prevoiously genereated emissions from sample.....
    235236
    236237  if (phaseSpaceGunFlag){
     
    254255
    255256    particleGun->SetParticleEnergy(energy);
    256 
    257 
    258 
    259257    particleGun->SetParticleDefinition(particle);
     258
     259
    260260  }
    261261
  • trunk/examples/advanced/xray_fluorescence/src/XrayFluoRunAction.cc

    r807 r1230  
    6363 
    6464 
    65   ReadData(MeV,"mercury_flx_solmin");
     65  ReadData(keV,"spec10");
    6666  //ReadResponse("SILIresponse");
    6767 
    6868  G4double minGamma = 0.*keV;
    6969  G4double maxGamma = 10. *keV;
    70   G4int nBinsGamma = 5;
     70  G4int nBinsGamma = 6;
    7171 
    7272
    7373  dataGammaSet = normalization.Normalize(minGamma, maxGamma, nBinsGamma,
    74                                   "FlatSpectrum");
     74                                  "M_flare");
    7575 
    7676
  • trunk/examples/advanced/xray_fluorescence/src/XrayFluoSiLiDetectorType.cc

    r807 r1230  
    4848
    4949XrayFluoSiLiDetectorType::XrayFluoSiLiDetectorType():
    50   detectorMaterial("Silicon"),efficiencySet(0)
     50  detectorMaterial("SiLi"),efficiencySet(0)
    5151{
    5252  LoadResponseData("SILIresponse");
  • trunk/examples/advanced/xray_telescope/GNUmakefile

    r807 r1230  
    11# --------------------------------------------------------------
    2 # $Id: GNUmakefile,v 1.7 2002/11/14 15:56:14 santin Exp $
     2# $Id: GNUmakefile,v 1.8 2008/06/15 22:53:06 cirrone Exp $
    33# --------------------------------------------------------------
    44# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
     
    2121endif
    2222
    23 ifdef G4ANALYSIS_USE
    24   CPPFLAGS += `aida-config --include`
    25   LDFLAGS += `aida-config --lib`
    26 endif
    2723
    2824.PHONY: all
  • trunk/examples/advanced/xray_telescope/History

    r807 r1230  
    1 $Id: History,v 1.22 2005/12/07 14:58:09 guatelli Exp $
     1$Id: History,v 1.24 2009/11/20 18:18:14 santin Exp $
    22-------------------------------------------------------------------
    33
     
    1717     * Reverse chronological order (last date on top), please *
    1818     ----------------------------------------------------------
     19
     2020.11.2009 - G.Santin, tag xraytel-V09-02-00
     21             Updated and simplified physics list
     22
     2316.06.2008 - G.A.P.Cirrone, tag xraytel-V09-01-00
     24             Removed AIDA from GNUmakefiles
     25
    192607.12.2005 - S. Guatelli, tag xraytel-V07-01-03
    20              warninw deleted; it concerned stream.
     27             warning deleted; it concerned stream.
    2128
    222930.11.2005 - G.Santin, tag xraytel-V07-01-02
  • trunk/examples/advanced/xray_telescope/README

    r807 r1230  
    1 $Id: README,v 1.13 2005/11/30 19:58:30 santin Exp $
     1$Id: README,v 1.14 2009/11/20 18:08:53 santin Exp $
    22-------------------------------------------------------------------
    33
     
    55               Geant4 - X-Ray Telescope Example
    66     =========================================================
    7 
    8 
    9 NEW: May 2004: Migration to AIDA 3.2.1 - see below
    107
    118
     
    2724in Geant4:
    2825
    29  - the simulation can be run from GAG or the command prompt
    30 
    3126 - macros are provided to display the geometry and particle tracks with
    3227   OpenGL, DAWN Postscript or VRML visualisation
     
    4237
    4338
    44 1. Setting up the environment variables for GAG, Visualisation and
    45    Analysis options (example based on Linux at CERN)
    46 
    47 #set up GAG
    48 setenv G4UI_BUILD_GAG_SESSION       1
    49 setenv G4UI_USE_GAG                 1
    50 
    51 #set up VRMLview
    52 setenv G4VIS_USE_VRML               1
    53 setenv G4VRMLFILE_MAX_FILE_NUM     100
    54 setenv G4VRMLFILE_VIEWER        vrmlview    #if installed
    55 setenv G4VIS_USE_VRML               1
    56 setenv PATH ${PATH}:"/afs/cern.ch/sw/contrib/VRML/bin/Linux"  # example at CERN
    57 
    58 #set up OpenGL
    59 setenv G4VIS_BUILD_OPENGLX_DRIVER   1
    60 setenv G4VIS_USE_OPENGLX            1
    61 
    62 #set up DAWN
    63 setenv G4VIS_BUILD_DAWN_DRIVER      1
    64 setenv G4VIS_USE_DAWN               1
    65 
    6639NOTE: The geometry is refreshed on the viewer at the beginning of each run,
    6740      but the tracks are plotted only in case an interesting event occurs.
    6841      This is the case only for about 1 every 10**4 events.
    6942
    70 
    71 
    72 Sources
    73 -------
    74 
    75 GAG can be found in:
    76 
    77 geant4/environments/MOMO
    78 
    79 DAWN can be obtained from:
    80 
    81 http://geant4.kek.jp/~tanaka/
    82 
    83 VRMLview for Linux can be obtained from:
    84 
    85 http://www.sim.no
    8643
    8744
     
    11976
    12077The physics processes are in XrayTelPhysicsList.cc
    121 The main process in this example is MultipleScattering of the protons
    122 on the mirror surfaces.
     78The main process in this example is G4hMultipleScattering for scattering of the protons
     79off the mirror surfaces.
    12380
    12481
     
    145102  LDFLAGS += `aida-config --lib`
    146103
    147 For more information about AIDA and PI please look at:
     104For more information about AIDA please look at:
    148105http://aida.freehep.org/
    149 http://www.cern.ch/PI
    150106
    151 Presently, the tools
    152 - PI (http://cern.ch/pi)
     107Presently, tools
    153108- OpenScientist (http://openscientist.lal.in2p3.fr/)
    154109- JAS (http://jas.freehep.org/jas3/)
     110- iAIDA (http://iaida.dynalias.net/Intro.html)
    155111provide an implementation of AIDA 3.2.1
    156112
  • trunk/examples/advanced/xray_telescope/include/XrayTelAnalysis.hh

    r807 r1230  
    2626//
    2727// $Id: XrayTelAnalysis.hh,v 1.10 2006/06/29 16:29:39 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// Author: A. Pfeiffer (Andreas.Pfeiffer@cern.ch)
  • trunk/examples/advanced/xray_telescope/src/XrayTelAnalysis.cc

    r807 r1230  
    2626//
    2727// $Id: XrayTelAnalysis.cc,v 1.12 2006/06/29 16:30:00 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030// Author:  A. Pfeiffer (Andreas.Pfeiffer@cern.ch)
Note: See TracChangeset for help on using the changeset viewer.