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

update to geant4.9.3

Location:
trunk/examples/extended/medical
Files:
112 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/extended/medical/DICOM/dicom.cc

    r807 r1230  
    5656#include "DicomPrimaryGeneratorAction.hh"
    5757#include "DicomEventAction.hh"
     58#include "DicomRunAction.hh"
    5859#include "DicomHandler.hh"
    5960
     
    7778  runManager->SetUserInitialization(theGeometry);
    7879  runManager->SetUserAction(new DicomPrimaryGeneratorAction());
    79   //  runManager->SetUserAction(new DicomEventAction);
     80  runManager->SetUserAction(new DicomRunAction);
     81  runManager->SetUserAction(new DicomEventAction);
    8082
    8183  runManager->Initialize();
  • trunk/examples/extended/medical/DICOM/include/DicomDetectorConstruction.hh

    r807 r1230  
    7979  // construct the patient volumes. This method should be implemented for each of the derived classes
    8080
     81  void SetScorer(G4LogicalVolume* voxel_logic);
     82
    8183protected:
    8284  G4Material* air;
  • trunk/examples/extended/medical/DICOM/include/DicomNestedPhantomParameterisation.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 #ifndef RE02NESTEDPARAMETERISATION_HH
    27 #define RE02NESTEDPARAMETERISATION_HH
     26// $Id: DicomNestedPhantomParameterisation.hh,v 1.3 2009/01/27 10:44:58 gcosmo Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
     29// --------------------------------------------------------------------
     30#ifndef DICOMNESTEDPARAMETERISATION_HH
     31#define DICOMNESTEDPARAMETERISATION_HH
     32
     33#include <vector>
    2834
    2935#include "G4Types.hh"
     36#include "G4ThreeVector.hh"
    3037#include "G4VNestedParameterisation.hh"
    31 #include "G4ThreeVector.hh"
    32 #include <vector>
    3338
    3439class G4VPhysicalVolume;
     
    5257class G4Hype;
    5358
    54 class DicomNestedPhantomParameterisation: public G4VNestedParameterisation
     59class DicomNestedPhantomParameterisation : public G4VNestedParameterisation
    5560{
    56   public:  // with description
     61  public:
    5762
    5863    DicomNestedPhantomParameterisation(const G4ThreeVector& voxelSize,
    59                                       std::vector<G4Material*>& mat);
     64                                       std::vector<G4Material*>& mat);
    6065    virtual ~DicomNestedPhantomParameterisation();
    6166
    62     // Methods required in derived classes
    63     // -----------------------------------
    64     virtual G4Material* ComputeMaterial(G4VPhysicalVolume *currentVol,
    65                                         const G4int repNo,
    66                                         const G4VTouchable *parentTouch=0
    67                                         );
    68   // Required method, as it is the reason for this class.
    69   //   Must cope with parentTouch=0 for navigator's SetupHierarchy
     67    G4Material* ComputeMaterial(G4VPhysicalVolume *currentVol,
     68                                const G4int repNo,
     69                                const G4VTouchable *parentTouch );
     70      // Must cope with parentTouch for navigator's SetupHierarchy
    7071
    71     virtual G4int       GetNumberOfMaterials() const;
    72     virtual G4Material* GetMaterial(G4int idx) const;
     72    G4int       GetNumberOfMaterials() const;
     73    G4Material* GetMaterial(G4int idx) const;
    7374      // Needed to define materials for instances of Nested Parameterisation
    74       //   Current convention: each call should return the materials
    75       //   of all instances with the same mother/ancestor volume.
     75      // Current convention: each call should return the materials
     76      // of all instances with the same mother/ancestor volume
     77
    7678    size_t GetMaterialIndex( size_t nx, size_t ny, size_t nz) const;
    7779    size_t GetMaterialIndex( size_t copyNo) const;
    78     void SetMaterialIndices( size_t* matInd ){
    79       fMaterialIndices = matInd; }
     80    void SetMaterialIndices( size_t* matInd ) { fMaterialIndices = matInd; }
    8081    void SetNoVoxel( size_t nx, size_t ny, size_t nz );
    8182
    82     virtual void ComputeTransformation(const G4int no,
    83                                        G4VPhysicalVolume *currentPV) const;
    84 
    85     // Methods optional in derived classes
    86     // -----------------------------------
     83    void ComputeTransformation(const G4int no,
     84                                     G4VPhysicalVolume *currentPV) const;
    8785
    8886    // Additional standard Parameterisation methods,
    89     //   which can be optionally defined, in case solid is used.
     87    // which can be optionally defined, in case solid is used.
    9088
    91     virtual void ComputeDimensions(G4Box &,
    92                                    const G4int,
    93                                    const G4VPhysicalVolume *) const;
     89    void ComputeDimensions(G4Box &, const G4int,
     90                                    const G4VPhysicalVolume *) const;
    9491
    95 private:  // Dummy declarations to get rid of warnings ...
    96   void ComputeDimensions (G4Trd&,const G4int,const G4VPhysicalVolume*)
    97     const {}
    98   void ComputeDimensions (G4Trap&,const G4int,const G4VPhysicalVolume*)
    99     const {}
    100   void ComputeDimensions (G4Cons&,const G4int,const G4VPhysicalVolume*)
    101     const {}
    102   void ComputeDimensions (G4Sphere&,const G4int,const G4VPhysicalVolume*)
    103     const {}
    104   void ComputeDimensions (G4Orb&,const G4int,const G4VPhysicalVolume*)
    105     const {}
    106   void ComputeDimensions (G4Torus&,const G4int,const G4VPhysicalVolume*)
    107     const {}
    108   void ComputeDimensions (G4Para&,const G4int,const G4VPhysicalVolume*)
    109     const {}
    110   void ComputeDimensions (G4Hype&,const G4int,const G4VPhysicalVolume*)
    111     const {}
    112   void ComputeDimensions (G4Tubs&,const G4int,const G4VPhysicalVolume*)
    113     const {}
    114   void ComputeDimensions (G4Polycone&,const G4int,const G4VPhysicalVolume*)
    115     const {}
    116   void ComputeDimensions (G4Polyhedra&,const G4int,const G4VPhysicalVolume*)
    117     const {}
     92  private:  // Dummy declarations to get rid of warnings ...
    11893
    119 private:
    120   G4double fdX,fdY,fdZ;
    121   G4int fnX,fnY,fnZ;
    122  
    123   //
    124   std::vector<G4Material*> fMaterials;
     94    void ComputeDimensions (G4Trd&, const G4int,
     95                            const G4VPhysicalVolume*) const {}
     96    void ComputeDimensions (G4Trap&, const G4int,
     97                            const G4VPhysicalVolume*) const {}
     98    void ComputeDimensions (G4Cons&, const G4int,
     99                            const G4VPhysicalVolume*) const {}
     100    void ComputeDimensions (G4Sphere&, const G4int,
     101                            const G4VPhysicalVolume*) const {}
     102    void ComputeDimensions (G4Orb&, const G4int,
     103                            const G4VPhysicalVolume*) const {}
     104    void ComputeDimensions (G4Torus&, const G4int,
     105                            const G4VPhysicalVolume*) const {}
     106    void ComputeDimensions (G4Para&, const G4int,
     107                            const G4VPhysicalVolume*) const {}
     108    void ComputeDimensions (G4Hype&, const G4int,
     109                            const G4VPhysicalVolume*) const {}
     110    void ComputeDimensions (G4Tubs&, const G4int,
     111                            const G4VPhysicalVolume*) const {}
     112    void ComputeDimensions (G4Polycone&, const G4int,
     113                            const G4VPhysicalVolume*) const {}
     114    void ComputeDimensions (G4Polyhedra&, const G4int,
     115                            const G4VPhysicalVolume*) const {}
    125116
    126   size_t* fMaterialIndices;
    127       // Index in fMaterials that correspond to each voxel.
     117  private:
     118
     119    G4double fdX,fdY,fdZ;
     120    G4int fnX,fnY,fnZ;
     121    std::vector<G4Material*> fMaterials;
     122    size_t* fMaterialIndices; // Index in materials corresponding to each voxel
    128123};
    129124
  • trunk/examples/extended/medical/DICOM/src/DicomDetectorConstruction.cc

    r807 r1230  
    451451}
    452452
     453
     454#include "G4SDManager.hh"
     455#include "G4MultiFunctionalDetector.hh"
     456#include "G4PSDoseDeposit_RegNav.hh"
     457
     458//-------------------------------------------------------------
     459void DicomDetectorConstruction::SetScorer(G4LogicalVolume* voxel_logic)
     460{
     461
     462  G4SDManager* SDman = G4SDManager::GetSDMpointer();
     463  //
     464  // Sensitive Detector Name
     465  G4String concreteSDname = "PatientSD";
     466
     467  //------------------------
     468  // MultiFunctionalDetector
     469  //------------------------
     470  //
     471  // Define MultiFunctionalDetector with name.
     472  G4MultiFunctionalDetector* MFDet = new G4MultiFunctionalDetector(concreteSDname);
     473  SDman->AddNewDetector( MFDet );                 // Register SD to SDManager
     474
     475  voxel_logic->SetSensitiveDetector(MFDet);
     476
     477  G4PSDoseDeposit_RegNav*   scorer = new G4PSDoseDeposit_RegNav("DoseDeposit"); 
     478  MFDet->RegisterPrimitive(scorer);
     479
     480}
     481
  • trunk/examples/extended/medical/DICOM/src/DicomNestedPhantomParameterisation.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 ///////////////////////////////////////////////////////////////////////////////
     26// $Id: DicomNestedPhantomParameterisation.cc,v 1.5 2009/01/27 10:44:58 gcosmo Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
     29// --------------------------------------------------------------------
    2730#include "DicomNestedPhantomParameterisation.hh"
    2831
     
    3437#include "G4Material.hh"
    3538
    36 DicomNestedPhantomParameterisation::DicomNestedPhantomParameterisation(
    37                                                      const G4ThreeVector& voxelSize,
    38                                                      std::vector<G4Material*>& mat):
    39   G4VNestedParameterisation(),fdX(voxelSize.x()),fdY(voxelSize.y()),fdZ(voxelSize.z()),fMaterials(mat)
     39DicomNestedPhantomParameterisation::
     40DicomNestedPhantomParameterisation(const G4ThreeVector& voxelSize,
     41                                         std::vector<G4Material*>& mat):
     42  G4VNestedParameterisation(), fdX(voxelSize.x()),
     43  fdY(voxelSize.y()), fdZ(voxelSize.z()), fMaterials(mat)
    4044{
    4145  // Position of voxels.
    42   // x and y positions are already defined in DetectorConstruction
    43   // by using replicated volume. Here only we need to define is z positions of voxes.
     46  // x and y positions are already defined in DetectorConstruction by using
     47  // replicated volume. Here only we need to define is z positions of voxels.
    4448}
    4549
     
    4852}
    4953
    50 void DicomNestedPhantomParameterisation::SetNoVoxel( size_t nx, size_t ny, size_t nz )
     54void DicomNestedPhantomParameterisation::
     55SetNoVoxel( size_t nx, size_t ny, size_t nz )
    5156{
    5257  fnX = nx;
     
    5863// Material assignment to geometry.
    5964//
    60 G4Material* DicomNestedPhantomParameterisation::ComputeMaterial(G4VPhysicalVolume* ,
    61                                                         const G4int copyNoZ,
    62                                                         const G4VTouchable* parentTouch)
     65G4Material* DicomNestedPhantomParameterisation::
     66ComputeMaterial(G4VPhysicalVolume*, const G4int copyNoZ,
     67                                    const G4VTouchable* parentTouch)
    6368{
    64   if(parentTouch==0) return fMaterials[0]; // protection for initialization and vis at idle state
     69  // protection for initialization and vis at idle state
     70  //
     71  if(parentTouch==0) return fMaterials[0];
     72
    6573  // Copy number of voxels.
    6674  // Copy number of X and Y are obtained from replication number.
     
    7078  G4int iz = copyNoZ;
    7179
    72   G4int copyNo = ix + fnZ*iy + fnX*fnY*iz;
     80  G4int copyNo = ix + fnX*iy + fnX*fnY*iz;
    7381
    7482  size_t matIndex = GetMaterialIndex(copyNo);
    7583
    7684  return fMaterials[ matIndex ];
    77 
    7885}
    7986
     
    8693
    8794//
    88 //  Number of Materials
    89 //  Material scanner is required for preparing physics tables and so on before
    90 //  stating simulation, so that G4 has to know number of materials.
    91 G4int       DicomNestedPhantomParameterisation::GetNumberOfMaterials() const{
     95// Number of Materials
     96// Material scanner is required for preparing physics tables and so on before
     97// starting simulation, so that G4 has to know number of materials.
     98//
     99G4int DicomNestedPhantomParameterisation::GetNumberOfMaterials() const
     100{
    92101  return fMaterials.size();
    93102}
     
    97106//  This is needed for material scanner and realizing geometry.
    98107//
    99 G4Material* DicomNestedPhantomParameterisation::GetMaterial(G4int i) const{
     108G4Material* DicomNestedPhantomParameterisation::GetMaterial(G4int i) const
     109{
    100110  return fMaterials[i];
    101111}
     
    104114// Transformation of voxels.
    105115//
    106 void DicomNestedPhantomParameterisation::ComputeTransformation(const G4int copyNo,
    107                                                   G4VPhysicalVolume* physVol)const{
     116void DicomNestedPhantomParameterisation::
     117ComputeTransformation(const G4int copyNo, G4VPhysicalVolume* physVol) const
     118{
    108119  G4ThreeVector position(0.,0.,(2*copyNo+1)*fdZ - fdZ*fnZ);
    109 
    110120  physVol->SetTranslation(position);
    111121}
     
    114124// Dimensions are always same in this RE02 example.
    115125//
    116 void DicomNestedPhantomParameterisation::ComputeDimensions(G4Box& box,
    117                                                const G4int ,
    118                                                const G4VPhysicalVolume* ) const{
     126void DicomNestedPhantomParameterisation::
     127ComputeDimensions( G4Box& box, const G4int, const G4VPhysicalVolume* ) const
     128{
    119129  box.SetXHalfLength(fdX);
    120130  box.SetYHalfLength(fdY);
  • trunk/examples/extended/medical/DICOM/src/DicomPhysicsList.cc

    r807 r1230  
    5454DicomPhysicsList::DicomPhysicsList():  G4VUserPhysicsList()
    5555{
    56   defaultCutValue = 1.e-3*mm;
    57   cutForGamma     = 1.e-3*mm;
     56  defaultCutValue = 1.*mm;
     57  cutForGamma     = 1.*mm;
    5858  cutForElectron  = defaultCutValue;
    5959  cutForPositron  = defaultCutValue;
  • trunk/examples/extended/medical/DICOM/src/DicomPrimaryGeneratorAction.cc

    r807 r1230  
    6565  G4String particleName;
    6666  G4ParticleDefinition* particle
    67     = particleTable->FindParticle(particleName="gamma");
     67    = particleTable->FindParticle(particleName="e-");
    6868  particleGun->SetParticleDefinition(particle);
    69   G4ThreeVector dir(2.*CLHEP::RandFlat::shoot()-1.,2.*CLHEP::RandFlat::shoot()-1.,2.*CLHEP::RandFlat::shoot()-1);
     69  // put the e- in the x direction of the patient (z in the accelerator axs) to hit patient in the central slice of the phantom
     70  G4ThreeVector dir(0,1,0);
     71  //G4ThreeVector dir(2.*CLHEP::RandFlat::shoot()-1.,2.*CLHEP::RandFlat::shoot()-1.,-CLHEP::RandFlat::shoot());
    7072  dir /= dir.mag();
    7173  particleGun->SetParticleMomentumDirection(dir);       
    7274  particleGun->SetParticleEnergy(5.*MeV);
    73   particleGun->SetParticlePosition(G4ThreeVector(0.,0.,-20.)); // put it close to the patient voxels
     75  //put it at SAD = 1 m on xy plane of central slice
     76  particleGun->SetParticlePosition(G4ThreeVector(0.,-99.9*cm,-27.));
     77  //particleGun->SetParticlePosition(G4ThreeVector(0.,0.,-22.));
    7478  particleGun->GeneratePrimaryVertex(anEvent);
    7579}
  • trunk/examples/extended/medical/DICOM/src/RegularDicomDetectorConstruction.cc

    r807 r1230  
    9595  //----- Set this physical volume as having a regular structure of type 1, so that G4RegularNavigation is used
    9696  patient_phys->SetRegularStructureId(1); // if not set, G4VoxelNavigation will be used instead
     97
     98  SetScorer(voxel_logic);
    9799}
    98100
  • trunk/examples/extended/medical/DICOM/vis.mac

    r850 r1230  
    33#visualisation
    44/vis/scene/create
    5 /vis/open OGLSQT
     5/vis/open OGLIX
     6#/vis/open DAWNFILE
     7/vis/open VRML2FILE
    68/vis/viewer/update
    79/vis/viewer/zoom 5
     
    1012/tracking/verbose 1
    1113/run/beamOn 10
     14/vis/viewer/update
    1215
  • trunk/examples/extended/medical/GammaTherapy/GNUmakefile

    r807 r1230  
    1 # $Id: GNUmakefile,v 1.2 2006/11/16 14:42:20 vnivanch Exp $
     1# $Id: GNUmakefile,v 1.3 2008/06/11 15:17:57 vnivanch Exp $
    22# --------------------------------------------------------------
    33# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
     
    1515all: lib bin
    1616
    17 ifdef G4ANALYSIS_USE
    18   CPPFLAGS += -DG4ANALYSIS_USE
    19 endif
    20 
    2117include $(G4INSTALL)/config/architecture.gmk
    22 
    23 ifdef G4ANALYSIS_USE
    24   CPPFLAGS   += `aida-config --include`
    25   LOADLIBS   += `aida-config --lib`
    26 endif
    2718
    2819include $(G4INSTALL)/config/binmake.gmk
  • trunk/examples/extended/medical/GammaTherapy/include/EventActionMessenger.hh

    r807 r1230  
    2525//
    2626// $Id: EventActionMessenger.hh,v 1.2 2006/06/29 17:25:54 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterBuilder.hh

    r807 r1230  
    2626//
    2727// $Id: G4StepLimiterBuilder.hh,v 1.2 2006/06/29 17:26:25 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterMessenger.hh

    r807 r1230  
    2525//
    2626// $Id: G4StepLimiterMessenger.hh,v 1.2 2006/06/29 17:26:28 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterPerRegion.hh

    r807 r1230  
    2525//
    2626// $Id: G4StepLimiterPerRegion.hh,v 1.4 2007/05/16 16:27:53 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/GammaTherapy/include/ParticlesBuilder.hh

    r807 r1230  
    2626//
    2727// $Id: ParticlesBuilder.hh,v 1.2 2006/06/29 17:26:34 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030
  • trunk/examples/extended/medical/GammaTherapy/include/PhysListEmLivermore.hh

    r807 r1230  
    2626//
    2727// $Id: PhysListEmLivermore.hh,v 1.1 2006/11/16 14:42:20 vnivanch Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/GammaTherapy/include/PhysListEmPenelope.hh

    r807 r1230  
    2626//
    2727// $Id: PhysListEmPenelope.hh,v 1.3 2006/11/16 14:42:20 vnivanch Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/GammaTherapy/include/PhysicsList.hh

    r807 r1230  
    2525//
    2626// $Id: PhysicsList.hh,v 1.6 2006/11/16 14:42:20 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Modified:
  • trunk/examples/extended/medical/GammaTherapy/include/PhysicsListMessenger.hh

    r807 r1230  
    2525//
    2626// $Id: PhysicsListMessenger.hh,v 1.3 2006/06/29 17:26:41 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/GammaTherapy/src/EventActionMessenger.cc

    r807 r1230  
    2525//
    2626// $Id: EventActionMessenger.cc,v 1.2 2006/06/29 17:27:19 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterBuilder.cc

    r807 r1230  
    2626//
    2727// $Id: G4StepLimiterBuilder.cc,v 1.3 2006/06/29 17:27:48 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//---------------------------------------------------------------------------
  • trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterMessenger.cc

    r807 r1230  
    2525//
    2626// $Id: G4StepLimiterMessenger.cc,v 1.2 2006/06/29 17:27:50 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterPerRegion.cc

    r807 r1230  
    2525//
    2626// $Id: G4StepLimiterPerRegion.cc,v 1.4 2007/05/16 16:27:53 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/GammaTherapy/src/ParticlesBuilder.cc

    r807 r1230  
    2626//
    2727// $Id: ParticlesBuilder.cc,v 1.3 2006/06/29 17:27:56 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//---------------------------------------------------------------------------
  • trunk/examples/extended/medical/GammaTherapy/src/PhysListEmLivermore.cc

    r807 r1230  
    2626//
    2727// $Id: PhysListEmLivermore.cc,v 1.1 2006/11/16 14:42:20 vnivanch Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/GammaTherapy/src/PhysListEmPenelope.cc

    r807 r1230  
    2626//
    2727// $Id: PhysListEmPenelope.cc,v 1.3 2006/11/16 14:42:20 vnivanch Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/GammaTherapy/src/PhysicsList.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: PhysicsList.cc,v 1.15 2007/07/04 11:14:33 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: PhysicsList.cc,v 1.16 2008/06/11 15:17:57 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//---------------------------------------------------------------------------
     
    5050#include "G4EmStandardPhysics_option1.hh"
    5151#include "G4EmStandardPhysics_option2.hh"
     52#include "G4EmStandardPhysics_option3.hh"
    5253#include "PhysListEmLivermore.hh"
    5354#include "PhysListEmPenelope.hh"
     
    150151    G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl;
    151152
     153  } else if (name == "emstandard_opt3" && !emBuilderIsRegisted) {
     154    RegisterPhysics(new G4EmStandardPhysics_option3());
     155    emBuilderIsRegisted = true;
     156    G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl;
     157
    152158  } else if (name == "livermore" && !emBuilderIsRegisted) {
    153159    RegisterPhysics(new PhysListEmLivermore());
  • trunk/examples/extended/medical/GammaTherapy/src/PhysicsListMessenger.cc

    r807 r1230  
    2525//
    2626// $Id: PhysicsListMessenger.cc,v 1.3 2006/06/29 17:28:04 gunter Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/GammaTherapy/vis.mac

    r850 r1230  
    3434#
    3535####/vis/open DAWNFILE
    36 /vis/open OGLSQT
     36/vis/open OGLIX
    3737#
    3838# Draw scene
  • trunk/examples/extended/medical/fanoCavity/GNUmakefile

    r807 r1230  
    1 # $Id: GNUmakefile,v 1.1 2007/01/19 17:20:26 maire Exp $
     1# $Id: GNUmakefile,v 1.2 2008/06/11 15:25:38 vnivanch Exp $
    22# --------------------------------------------------------------
    33# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
     
    1717#### G4ANALYSIS_USE := true
    1818
    19 ifdef G4ANALYSIS_USE
    20   CPPFLAGS += -DG4ANALYSIS_USE
    21 endif
    22 
    2319include $(G4INSTALL)/config/architecture.gmk
    24 
    25 ifdef G4ANALYSIS_USE
    26   # for the aida-config command see the README file
    27   CPPFLAGS += `aida-config --include`
    28   LOADLIBS += `aida-config --lib`
    29 endif
    3020
    3121include $(G4INSTALL)/config/binmake.gmk
     
    3424        rm -f g4*.prim g4*.eps g4*.wrl
    3525        rm -f .DAWN_*
    36        
     26
    3727histclean:
    3828        rm ${G4WORKDIR}/tmp/${G4SYSTEM}/${G4TARGET}/HistoManager.o
  • trunk/examples/extended/medical/fanoCavity/fanoCavity.cc

    r807 r1230  
    2525//
    2626// $Id: fanoCavity.cc,v 1.6 2007/10/29 17:09:53 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/DetectorConstruction.hh

    r807 r1230  
    2525//
    2626// $Id: DetectorConstruction.hh,v 1.2 2007/10/08 12:05:02 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/DetectorMessenger.hh

    r807 r1230  
    2525//
    2626// $Id: DetectorMessenger.hh,v 1.2 2007/10/08 12:05:02 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/EventAction.hh

    r807 r1230  
    2525//
    2626// $Id: EventAction.hh,v 1.3 2007/10/29 17:09:53 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/EventActionMessenger.hh

    r807 r1230  
    2525//
    2626// $Id: EventActionMessenger.hh,v 1.1 2007/01/19 17:20:26 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/HistoManager.hh

    r807 r1230  
    2525//
    2626// $Id: HistoManager.hh,v 1.4 2007/11/13 11:31:54 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/HistoMessenger.hh

    r807 r1230  
    2525//
    2626// $Id: HistoMessenger.hh,v 1.2 2007/11/13 11:31:54 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/MyKleinNishinaCompton.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: MyKleinNishinaCompton.hh,v 1.3 2007/05/23 08:40:21 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: MyKleinNishinaCompton.hh,v 1.4 2009/10/25 19:06:26 maire Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     
    3636
    3737class DetectorConstruction;
     38class MyKleinNishinaMessenger;
    3839class G4ParticleChangeForGamma;
    3940
     
    6667protected:
    6768
    68   DetectorConstruction* detector;
    69   G4double              CrossSectionFactor;
     69  DetectorConstruction*    detector;
     70  MyKleinNishinaMessenger* pMessenger;
     71  G4double  CrossSectionFactor;
    7072
    7173};
  • trunk/examples/extended/medical/fanoCavity/include/MyMollerBhabhaModel.hh

    r807 r1230  
    2525//
    2626// $Id: MyMollerBhabhaModel.hh,v 1.1 2007/01/19 17:20:26 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
  • trunk/examples/extended/medical/fanoCavity/include/PhysicsList.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
     26// $Id: PhysicsList.hh,v 1.4 2009/10/25 19:06:26 maire Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2628//
    27 // $Id: PhysicsList.hh,v 1.3 2007/10/02 14:42:51 maire Exp $
    28 // GEANT4 tag $Name:  $
    29 //
    30 //
    31 
    3229//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    3330//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    3633#define PhysicsList_h 1
    3734
    38 #include "G4VUserPhysicsList.hh"
     35#include "G4VModularPhysicsList.hh"
    3936#include "globals.hh"
    4037
     38class G4VPhysicsConstructor;
     39
    4140class DetectorConstruction;
    42 class MyKleinNishinaCompton;
    4341class PhysicsListMessenger;
    4442
    4543//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    4644
    47 class PhysicsList: public G4VUserPhysicsList
     45class PhysicsList: public G4VModularPhysicsList
    4846{
    49   public:
    50     PhysicsList(DetectorConstruction*);
    51   ~PhysicsList();
     47public:
     48  PhysicsList(DetectorConstruction*);
     49  virtual ~PhysicsList();
    5250
    53     // Construct particle and physics
    54     void ConstructParticle();
    55     void ConstructProcess();
    56  
    57     void SetCuts();
     51  void ConstructParticle();
     52       
     53  void AddPhysicsList(const G4String& name);   
     54  void ConstructProcess();   
     55  void AddStepMax();
     56 
     57  void SetCuts();     
    5858   
    59     // these methods Construct physics processes and register them
    60     void ConstructEM();
    61     void AddStepMax();
    62    
    63     void SetComptonCSfactor(G4double);
    64     void SingleCoulombScattering (G4bool);   
    65     void RegisterBrem (G4bool);
    66    
    67   private:
    68     DetectorConstruction*  detector;
    69     MyKleinNishinaCompton* comptonModel;
    70     G4bool                 singleScattering;       
    71     G4bool                 registerBrem;   
    72     PhysicsListMessenger*  pMessenger;   
     59private:
     60
     61  DetectorConstruction* detector;
     62  PhysicsListMessenger* pMessenger;
     63
     64  G4String emName;
     65  G4VPhysicsConstructor*  emPhysicsList;
    7366};
    7467
     
    7770#endif
    7871
    79 
    80 
  • trunk/examples/extended/medical/fanoCavity/include/PhysicsListMessenger.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: PhysicsListMessenger.hh,v 1.2 2007/10/02 14:42:51 maire Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: PhysicsListMessenger.hh,v 1.3 2009/10/25 19:06:26 maire Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    3333#define PhysicsListMessenger_h 1
    3434
     35#include "G4UImessenger.hh"
    3536#include "globals.hh"
    36 #include "G4UImessenger.hh"
    3737
    3838class PhysicsList;
    3939class G4UIdirectory;
    40 class G4UIcmdWithADouble;
    41 class G4UIcmdWithABool;
     40class G4UIcmdWithADoubleAndUnit;
     41class G4UIcmdWithAString;
    4242
    4343//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    4545class PhysicsListMessenger: public G4UImessenger
    4646{
    47   public: 
     47  public:
     48 
    4849    PhysicsListMessenger(PhysicsList* );
    4950   ~PhysicsListMessenger();
     
    5152    void SetNewValue(G4UIcommand*, G4String);
    5253   
    53   private: 
    54     PhysicsList*        pPhysicsList;   
    55     G4UIdirectory*      physDir;       
    56     G4UIcmdWithADouble* csFactor;
    57     G4UIcmdWithABool*   singleScat;     
    58     G4UIcmdWithABool*   brem;   
     54  private:
     55 
     56    PhysicsList*               pPhysicsList;
     57   
     58    G4UIdirectory*             physDir;
     59    G4UIcmdWithAString*        pListCmd;
    5960};
    6061
  • trunk/examples/extended/medical/fanoCavity/include/PrimaryGeneratorAction.hh

    r807 r1230  
    2525//
    2626// $Id: PrimaryGeneratorAction.hh,v 1.1 2007/01/19 17:20:26 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/PrimaryGeneratorMessenger.hh

    r807 r1230  
    2525//
    2626// $Id: PrimaryGeneratorMessenger.hh,v 1.1 2007/01/19 17:20:26 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/ProcessesCount.hh

    r807 r1230  
    2626//
    2727// $Id: ProcessesCount.hh,v 1.1 2007/01/19 17:20:26 maire Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/RunAction.hh

    r807 r1230  
    2525//
    2626// $Id: RunAction.hh,v 1.3 2007/10/29 12:36:26 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/StackingAction.hh

    r807 r1230  
    2525//
    2626// $Id: StackingAction.hh,v 1.1 2007/01/23 13:34:19 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/StackingMessenger.hh

    r807 r1230  
    2525//
    2626// $Id: StackingMessenger.hh,v 1.1 2007/01/23 13:34:19 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/StepMax.hh

    r807 r1230  
    2525//
    2626// $Id: StepMax.hh,v 1.1 2007/01/19 17:20:27 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/StepMaxMessenger.hh

    r807 r1230  
    2525//
    2626// $Id: StepMaxMessenger.hh,v 1.1 2007/01/19 17:20:27 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/SteppingAction.hh

    r807 r1230  
    2525//
    2626// $Id: SteppingAction.hh,v 1.4 2007/10/29 17:09:53 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/SteppingVerbose.hh

    r807 r1230  
    2525//
    2626// $Id: SteppingVerbose.hh,v 1.1 2007/01/19 17:20:27 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/include/TrackingAction.hh

    r807 r1230  
    2525//
    2626// $Id: TrackingAction.hh,v 1.3 2007/10/29 17:09:53 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/run01.mac

    r807 r1230  
    1 # $Id: run01.mac,v 1.5 2007/10/29 17:09:53 maire Exp $
     1# $Id: run01.mac,v 1.7 2009/10/25 19:06:26 maire Exp $
    22#
    33/control/verbose 2
    44/run/verbose 2
     5#
     6/testem/phys/addPhysics  standard_opt3
    57#
    68/run/initialize
     
    911#
    1012/testem/histo/setFileName fanocavity
    11 /testem/histo/setFileType hbook
     13/testem/histo/setFileType root
    1214/testem/histo/setHisto  1 120 -6 +6 mm          #interaction point
    1315/testem/histo/setHisto  2 125  0  1250 keV      #energy spectrum
  • trunk/examples/extended/medical/fanoCavity/src/DetectorConstruction.cc

    r807 r1230  
    2525//
    2626// $Id: DetectorConstruction.cc,v 1.3 2007/10/08 12:05:02 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828
    2929//
  • trunk/examples/extended/medical/fanoCavity/src/DetectorMessenger.cc

    r807 r1230  
    2525//
    2626// $Id: DetectorMessenger.cc,v 1.3 2007/11/05 13:44:18 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/src/EventAction.cc

    r807 r1230  
    2525//
    2626// $Id: EventAction.cc,v 1.4 2007/10/29 17:09:53 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/src/EventActionMessenger.cc

    r807 r1230  
    2525//
    2626// $Id: EventActionMessenger.cc,v 1.1 2007/01/19 17:20:27 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/src/HistoManager.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HistoManager.cc,v 1.5 2007/11/13 11:31:54 maire Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: HistoManager.cc,v 1.7 2008/09/28 16:04:01 maire Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    5454 
    5555  fileName[0] = "fanocavity";
    56   fileType    = "hbook";
    57   fileOption  = "--noErrors uncompress"; 
     56  fileType    = "root";
     57  fileOption  = "--noErrors export=root uncompress"; 
    5858  // histograms
    5959  for (G4int k=0; k<MaxHisto; k++) {
     
    224224 if (ih > MaxHisto) {
    225225    G4cout << "---> warning from HistoManager::RemoveHisto() : histo " << ih
    226            << "does not exist" << G4endl;
     226           << "does not exist  (fac = " << fac << ")" << G4endl;
    227227    return;
    228228  }
  • trunk/examples/extended/medical/fanoCavity/src/HistoMessenger.cc

    r807 r1230  
    2525//
    2626// $Id: HistoMessenger.cc,v 1.2 2007/11/13 11:31:54 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/src/MyKleinNishinaCompton.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: MyKleinNishinaCompton.cc,v 1.5 2007/10/01 15:19:57 maire Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: MyKleinNishinaCompton.cc,v 1.6 2009/10/25 19:06:26 maire Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     
    3131
    3232#include "MyKleinNishinaCompton.hh"
     33#include "MyKleinNishinaMessenger.hh"
    3334#include "DetectorConstruction.hh"
    3435
     
    4849  :G4KleinNishinaCompton(0,nam), detector(det)
    4950{
    50   CrossSectionFactor = 1.;
     51  CrossSectionFactor = 1.;
     52  pMessenger = new MyKleinNishinaMessenger(this);   
    5153}
    5254
     
    5456
    5557MyKleinNishinaCompton::~MyKleinNishinaCompton()
    56 {}
     58
     59  delete pMessenger; 
     60}
    5761
    5862//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
  • trunk/examples/extended/medical/fanoCavity/src/MyMollerBhabhaModel.cc

    r807 r1230  
    2525//
    2626// $Id: MyMollerBhabhaModel.cc,v 1.1 2007/01/19 17:20:27 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/src/PhysicsList.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
     26// $Id: PhysicsList.cc,v 1.18 2009/10/29 16:19:59 maire Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2628//
    27 // $Id: PhysicsList.cc,v 1.9 2007/10/02 14:42:51 maire Exp $
    28 // GEANT4 tag $Name:  $
    29 //
    30 
    3129//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    3230//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    3432#include "PhysicsList.hh"
    3533#include "PhysicsListMessenger.hh"
    36 #include "DetectorConstruction.hh"
     34
     35#include "PhysListEmStandard_option0.hh"
     36#include "PhysListEmStandard_option3.hh"
     37#include "PhysListEmStandard_GS.hh"
     38#include "PhysListEmStandard_SS.hh"
     39
     40#include "StepMax.hh"
    3741
    3842#include "G4ParticleDefinition.hh"
    39 #include "G4ParticleTypes.hh"
    40 #include "G4ParticleTable.hh"
    4143
    4244#include "G4ProcessManager.hh"
    4345#include "G4LossTableManager.hh"
    4446
     47// Bosons
     48#include "G4ChargedGeantino.hh"
     49#include "G4Geantino.hh"
     50#include "G4Gamma.hh"
     51
     52// leptons
     53#include "G4Electron.hh"
     54#include "G4Positron.hh"
     55
     56// Hadrons
     57#include "G4Proton.hh"
     58
     59
    4560//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    4661
    4762PhysicsList::PhysicsList(DetectorConstruction* det)
    48 : G4VUserPhysicsList(), detector(det)
     63: G4VModularPhysicsList(), detector(det)
    4964{
    50   defaultCutValue = 10.*km;
    51   singleScattering = false;
    52   registerBrem = false;
    53   pMessenger = new PhysicsListMessenger(this);
    54   SetVerboseLevel(1);
     65  G4LossTableManager::Instance();
     66  pMessenger = new PhysicsListMessenger(this);
     67   
     68  // EM physics
     69  emName = G4String("standard_opt3");
     70  emPhysicsList = new PhysListEmStandard_option3(emName,detector);
     71     
     72  defaultCutValue = 10*km;
     73
     74  SetVerboseLevel(1); 
    5575 
    56   G4LossTableManager::Instance(); 
     76  G4LossTableManager::Instance();
    5777}
    5878
     
    6080
    6181PhysicsList::~PhysicsList()
    62 { delete pMessenger; }
     82{
     83  delete emPhysicsList;
     84  delete pMessenger; 
     85}
    6386
    6487//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    6689void PhysicsList::ConstructParticle()
    6790{
     91  // pseudo-particles
    6892  G4Geantino::GeantinoDefinition();
     93  G4ChargedGeantino::ChargedGeantinoDefinition();
     94 
     95  // gamma
    6996  G4Gamma::GammaDefinition();
    70 
     97 
     98  // leptons
    7199  G4Electron::ElectronDefinition();
    72100  G4Positron::PositronDefinition();
    73101
    74   G4Proton::ProtonDefinition();
     102  // baryons
     103  G4Proton::ProtonDefinition(); 
    75104}
    76105
     
    80109{
    81110  AddTransportation();
    82   ConstructEM();
     111  emPhysicsList->ConstructProcess();
     112
    83113  AddStepMax();
    84114}
    85115
    86116//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    87 
    88 #include "G4ComptonScattering.hh"
    89 #include "MyKleinNishinaCompton.hh"
    90 #include "G4GammaConversion.hh"
    91 #include "G4PhotoElectricEffect.hh"
    92 
    93 #include "G4MultipleScattering.hh"
    94 #include "G4CoulombScattering.hh"
    95 
    96 #include "G4eIonisation.hh"
    97 #include "MyMollerBhabhaModel.hh"
    98 #include "G4eBremsstrahlung.hh"
    99 #include "G4eplusAnnihilation.hh"
    100 
    101 #include "G4hIonisation.hh"
    102 
    103 #include "G4EmProcessOptions.hh"
    104 #include "G4MscStepLimitType.hh"
    105 
    106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    107 
    108 
    109 void PhysicsList::ConstructEM()
    110 {
    111   theParticleIterator->reset();
    112   while( (*theParticleIterator)() ){
    113     G4ParticleDefinition* particle = theParticleIterator->value();
    114     G4ProcessManager* pmanager = particle->GetProcessManager();
    115     G4String particleName = particle->GetParticleName();
    116     G4int iAlong = 0, iPost = 0;
    117      
    118     if (particleName == "gamma") {
    119    
    120       G4ComptonScattering* compton = new G4ComptonScattering();
    121       compton->SetModel(comptonModel = new MyKleinNishinaCompton(detector));
    122       comptonModel->SetCSFactor(1000.);
    123        
    124       pmanager->AddDiscreteProcess(compton);               
    125       pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
    126       pmanager->AddDiscreteProcess(new G4GammaConversion);
    127      
    128     } else if (particleName == "e-") {
    129 
    130       if (singleScattering)
    131         pmanager->AddProcess(new G4CoulombScattering,  -1, -1,       ++iPost);
    132         else   
    133         pmanager->AddProcess(new G4MultipleScattering, -1, ++iAlong, ++iPost);
    134      
    135       G4eIonisation* eIoni = new G4eIonisation();
    136       eIoni->SetEmModel(new MyMollerBhabhaModel);             
    137       pmanager->AddProcess(eIoni,                      -1, ++iAlong, ++iPost);
    138      
    139       if (registerBrem)
    140         pmanager->AddProcess(new G4eBremsstrahlung,    -1, ++iAlong, ++iPost);     
    141        
    142     } else if (particleName == "e+") {
    143    
    144       if (singleScattering)
    145         pmanager->AddProcess(new G4CoulombScattering,  -1, -1,       ++iPost);
    146         else   
    147         pmanager->AddProcess(new G4MultipleScattering, -1, ++iAlong, ++iPost);
    148      
    149       G4eIonisation* pIoni = new G4eIonisation();
    150       pIoni->SetEmModel(new MyMollerBhabhaModel);                   
    151       pmanager->AddProcess(pIoni,                      -1, ++iAlong, ++iPost);
    152      
    153       if (registerBrem) {
    154         pmanager->AddProcess(new G4eBremsstrahlung,    -1, ++iAlong, ++iPost);
    155         pmanager->AddProcess(new G4eplusAnnihilation,   0, -1,       ++iPost);
    156       }
    157      
    158     } else if (particleName == "proton") {
    159    
    160       if (singleScattering)
    161         pmanager->AddProcess(new G4CoulombScattering,  -1, -1,       ++iPost);
    162         else   
    163         pmanager->AddProcess(new G4MultipleScattering, -1, ++iAlong, ++iPost);
    164        
    165       pmanager->AddProcess(new G4hIonisation,          -1, ++iAlong, ++iPost);
    166     }
    167   }
    168  
    169   // Em options
    170   //
    171   G4EmProcessOptions emOptions;
    172  
    173   //multiple scattering
    174   //
    175   emOptions.SetMscStepLimitation(fUseDistanceToBoundary);
    176   emOptions.SetSkin(2.);
    177  
    178   //physics tables
    179   //
    180   emOptions.SetMinEnergy(100*eV);   
    181   emOptions.SetMaxEnergy(10*GeV); 
    182   emOptions.SetDEDXBinning(800); 
    183   emOptions.SetLambdaBinning(800);
    184  
    185   //energy loss
    186   // 
    187   emOptions.SetStepFunction(0.2, 10*um);
    188   emOptions.SetLinearLossLimit(1.e-6);
    189          
    190   //build CSDA range
    191   //
    192   emOptions.SetBuildCSDARange(true);
    193   emOptions.SetMaxEnergyForCSDARange(10*GeV); 
    194   emOptions.SetDEDXBinningForCSDARange(800);   
    195 }
    196 
    197 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    198 
    199 #include "StepMax.hh"
    200117
    201118void PhysicsList::AddStepMax()
     
    209126      G4ProcessManager* pmanager = particle->GetProcessManager();
    210127
    211       if (stepMaxProcess->IsApplicable(*particle))
     128      if (stepMaxProcess->IsApplicable(*particle) && !particle->IsShortLived())
    212129        {
    213130          pmanager ->AddDiscreteProcess(stepMaxProcess);
    214131        }
     132  }
     133}
     134
     135//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     136
     137void PhysicsList::AddPhysicsList(const G4String& name)
     138{
     139  if (verboseLevel>-1) {
     140    G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
     141  }
     142
     143  if (name == emName) return;
     144
     145  if (name == "standard_opt0") {
     146
     147    emName = name;
     148    delete emPhysicsList;
     149    emPhysicsList = new PhysListEmStandard_option0(name,detector);
     150   
     151  } else if (name == "standard_opt3") {
     152
     153    emName = name;
     154    delete emPhysicsList;
     155    emPhysicsList = new PhysListEmStandard_option3(name,detector);
     156   
     157  } else if (name == "standard_GS") {
     158
     159    emName = name;
     160    delete emPhysicsList;
     161    emPhysicsList = new PhysListEmStandard_GS(name,detector);   
     162   
     163  } else if (name == "standard_SS") {
     164
     165    emName = name;
     166    delete emPhysicsList;
     167    emPhysicsList = new PhysListEmStandard_SS(name,detector);   
     168  } else {
     169
     170    G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
     171           << " is not defined"
     172           << G4endl;
    215173  }
    216174}
     
    232190  SetCutValue(defaultCutValue, "e-");
    233191  SetCutValue(defaultCutValue, "e+");
     192  SetCutValue(defaultCutValue, "proton"); 
    234193}
    235194
    236195//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    237 
    238 void PhysicsList::SetComptonCSfactor(G4double factor)
    239 {
    240   if (comptonModel) comptonModel->SetCSFactor(factor);
    241 }
    242 
    243 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    244 
    245 void PhysicsList::SingleCoulombScattering(G4bool flag)
    246 {
    247   singleScattering = flag;
    248 }
    249 
    250 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    251 
    252 void PhysicsList::RegisterBrem(G4bool flag)
    253 {
    254   registerBrem = flag;
    255 }
    256 
    257 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    258 
    259 
    260 
    261 
  • trunk/examples/extended/medical/fanoCavity/src/PhysicsListMessenger.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: PhysicsListMessenger.cc,v 1.2 2007/10/02 14:42:51 maire Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: PhysicsListMessenger.cc,v 1.3 2009/10/25 19:06:26 maire Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    3333
    3434#include "PhysicsList.hh"
    35 #include "MyKleinNishinaCompton.hh"
    3635#include "G4UIdirectory.hh"
    37 #include "G4UIcmdWithADouble.hh"
    38 #include "G4UIcmdWithABool.hh"
     36#include "G4UIcmdWithADoubleAndUnit.hh"
     37#include "G4UIcmdWithAString.hh"
    3938
    4039//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    4241PhysicsListMessenger::PhysicsListMessenger(PhysicsList* pPhys)
    4342:pPhysicsList(pPhys)
    44 {
     43{ 
    4544  physDir = new G4UIdirectory("/testem/phys/");
    4645  physDir->SetGuidance("physics list commands");
    47  
    48   csFactor = new G4UIcmdWithADouble("/testem/phys/crossSectionFactor",this);
    49   csFactor->SetGuidance("multiply Compton cross section");
    50   csFactor->SetParameterName("factor",false);
    51   csFactor->SetRange("factor>=0");
    52  
    53   singleScat = new G4UIcmdWithABool("/testem/phys/singleScattering",this);
    54   singleScat->SetGuidance("apply single Coulomb scattering process");
    55   singleScat->SetParameterName("flag",true);
    56   singleScat->SetDefaultValue(true);
    57   singleScat->AvailableForStates(G4State_PreInit);
    58        
    59   brem = new G4UIcmdWithABool("/testem/phys/registerBrem",this);
    60   brem->SetGuidance("register Brems in PhysicsList");
    61   brem->SetParameterName("flag",true);
    62   brem->SetDefaultValue(true);
    63   brem->AvailableForStates(G4State_PreInit);   
     46
     47  pListCmd = new G4UIcmdWithAString("/testem/phys/addPhysics",this); 
     48  pListCmd->SetGuidance("Add modula physics list.");
     49  pListCmd->SetParameterName("PList",false);
     50  pListCmd->AvailableForStates(G4State_PreInit);
    6451}
    6552
     
    6855PhysicsListMessenger::~PhysicsListMessenger()
    6956{
    70   delete csFactor;
    71   delete singleScat;
    72   delete brem;
    73   delete physDir;   
     57  delete pListCmd;
     58  delete physDir;
    7459}
    7560
     
    7863void PhysicsListMessenger::SetNewValue(G4UIcommand* command,
    7964                                          G4String newValue)
    80 {
    81   if (command == csFactor)
    82    {pPhysicsList->SetComptonCSfactor(csFactor->GetNewDoubleValue(newValue));}
    83    
    84   if (command == singleScat)
    85    {pPhysicsList->SingleCoulombScattering(singleScat->GetNewBoolValue(newValue));}
    86            
    87   if (command == brem)
    88    {pPhysicsList->RegisterBrem(brem->GetNewBoolValue(newValue));}     
     65{           
     66  if( command == pListCmd )
     67   { pPhysicsList->AddPhysicsList(newValue);}
    8968}
    9069
  • trunk/examples/extended/medical/fanoCavity/src/PrimaryGeneratorAction.cc

    r807 r1230  
    2525//
    2626// $Id: PrimaryGeneratorAction.cc,v 1.1 2007/01/19 17:20:27 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/src/PrimaryGeneratorMessenger.cc

    r807 r1230  
    2525//
    2626// $Id: PrimaryGeneratorMessenger.cc,v 1.1 2007/01/19 17:20:27 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/src/RunAction.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: RunAction.cc,v 1.3 2007/10/29 12:36:26 maire Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: RunAction.cc,v 1.4 2009/01/22 18:34:06 maire Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    325325  //
    326326  G4double ratio = doseOverBeam/massTransfCoef;
    327   G4double error = ratio*(dEoverE + dToverT);
     327  G4double error = ratio*std::sqrt(dEoverE*dEoverE + dToverT*dToverT);
    328328 
    329329  G4cout.precision(5); 
  • trunk/examples/extended/medical/fanoCavity/src/StackingAction.cc

    r807 r1230  
    2525//
    2626// $Id: StackingAction.cc,v 1.2 2007/03/02 11:08:41 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/src/StackingMessenger.cc

    r807 r1230  
    2525//
    2626// $Id: StackingMessenger.cc,v 1.1 2007/01/23 13:34:19 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/src/StepMax.cc

    r807 r1230  
    2525//
    2626// $Id: StepMax.cc,v 1.1 2007/01/19 17:20:27 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/src/StepMaxMessenger.cc

    r807 r1230  
    2525//
    2626// $Id: StepMaxMessenger.cc,v 1.1 2007/01/19 17:20:27 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/src/SteppingAction.cc

    r807 r1230  
    2525//
    2626// $Id: SteppingAction.cc,v 1.4 2007/10/29 17:09:53 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/src/SteppingVerbose.cc

    r807 r1230  
    2525//
    2626// $Id: SteppingVerbose.cc,v 1.1 2007/01/19 17:20:27 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity/src/TrackingAction.cc

    r807 r1230  
    2525//
    2626// $Id: TrackingAction.cc,v 1.4 2007/10/29 17:09:53 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/GNUmakefile

    r807 r1230  
    1 # $Id: GNUmakefile,v 1.1 2007/10/15 16:20:23 maire Exp $
     1# $Id: GNUmakefile,v 1.2 2008/06/11 15:27:31 vnivanch Exp $
    22# --------------------------------------------------------------
    33# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
     
    1717#### G4ANALYSIS_USE := true
    1818
    19 ifdef G4ANALYSIS_USE
    20   CPPFLAGS += -DG4ANALYSIS_USE
    21 endif
    22 
    2319include $(G4INSTALL)/config/architecture.gmk
    24 
    25 ifdef G4ANALYSIS_USE
    26   # for the aida-config command see the README file
    27   CPPFLAGS += `aida-config --include`
    28   LOADLIBS += `aida-config --lib`
    29 endif
    3020
    3121include $(G4INSTALL)/config/binmake.gmk
     
    3424        rm -f g4*.prim g4*.eps g4*.wrl
    3525        rm -f .DAWN_*
    36        
     26
    3727histclean:
    3828        rm ${G4WORKDIR}/tmp/${G4SYSTEM}/${G4TARGET}/HistoManager.o
  • trunk/examples/extended/medical/fanoCavity2/basic.mac

    r807 r1230  
    1 # $Id: basic.mac,v 1.2 2007/11/05 13:19:16 maire Exp $
     1# $Id: basic.mac,v 1.4 2009/10/31 18:05:56 maire Exp $
    22#
    33/control/verbose 2
     
    77/testem/det/wallThickness 5 cm
    88#
     9/testem/phys/addPhysics standard_opt3
     10#
    911/run/initialize
    1012#
     
    1214/process/eLoss/fluct false
    1315#
    14 /gun/energy 10 keV
     16/process/eLoss/StepFunction 0.2 10 um
    1517#
    16 /testem/event/printModulo 500000
     18/gun/energy 1 MeV
    1719#
    18 /run/beamOn 10000000
     20/testem/event/printModulo 50000
     21#
     22/run/beamOn 500000
  • trunk/examples/extended/medical/fanoCavity2/essai.mac

    r807 r1230  
    1 # $Id: essai.mac,v 1.3 2007/11/12 18:19:30 maire Exp $
     1# $Id: essai.mac,v 1.5 2009/10/31 18:05:56 maire Exp $
    22#
    33/control/verbose 2
    44/run/verbose 2
    55#
    6 /testem/det/wallMater Water
    7 /testem/det/wallThickness 5 mm
    8 /testem/det/worldRadius   5 mm
     6/testem/phys/addPhysics standard_opt3
    97#
    108/run/initialize
    119#
    12 /process/inactivate msc
    13 /process/eLoss/fluct false
     10/gun/energy 1 MeV
    1411#
    15 /gun/energy 10 keV
    16 /gun/direction 0 1 0
     12/testem/event/printModulo 100000
    1713#
    18 /testem/event/printModulo 20000
    19 #
    20 #/run/beamOn 200000
     14/run/beamOn 1000000
  • trunk/examples/extended/medical/fanoCavity2/fanoCavity2.cc

    r807 r1230  
    2525//
    2626// $Id: fanoCavity2.cc,v 1.2 2007/10/31 16:16:20 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/include/DetectorConstruction.hh

    r807 r1230  
    2525//
    2626// $Id: DetectorConstruction.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/include/DetectorMessenger.hh

    r807 r1230  
    2525//
    2626// $Id: DetectorMessenger.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/include/EventAction.hh

    r807 r1230  
    2525//
    2626// $Id: EventAction.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/include/EventActionMessenger.hh

    r807 r1230  
    2525//
    2626// $Id: EventActionMessenger.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/include/HistoManager.hh

    r807 r1230  
    2525//
    2626// $Id: HistoManager.hh,v 1.3 2007/11/12 18:19:30 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/include/HistoMessenger.hh

    r807 r1230  
    2525//
    2626// $Id: HistoMessenger.hh,v 1.2 2007/11/12 18:19:30 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/include/MyMollerBhabhaModel.hh

    r807 r1230  
    2525//
    2626// $Id: MyMollerBhabhaModel.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
  • trunk/examples/extended/medical/fanoCavity2/include/PhysicsList.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
     26// $Id: PhysicsList.hh,v 1.2 2009/10/31 18:05:56 maire Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2628//
    27 // $Id: PhysicsList.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
    28 // GEANT4 tag $Name:  $
    29 //
    30 //
    31 
    3229//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    3330//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    3633#define PhysicsList_h 1
    3734
    38 #include "G4VUserPhysicsList.hh"
     35#include "G4VModularPhysicsList.hh"
    3936#include "globals.hh"
     37
     38class G4VPhysicsConstructor;
    4039
    4140class DetectorConstruction;
     
    4443//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    4544
    46 class PhysicsList: public G4VUserPhysicsList
     45class PhysicsList: public G4VModularPhysicsList
    4746{
    48   public:
    49     PhysicsList(DetectorConstruction*);
    50   ~PhysicsList();
     47public:
     48  PhysicsList(DetectorConstruction*);
     49  virtual ~PhysicsList();
    5150
    52     // Construct particle and physics
    53     void ConstructParticle();
    54     void ConstructProcess();
    55  
    56     void SetCuts();
     51  void ConstructParticle();
     52       
     53  void AddPhysicsList(const G4String& name);   
     54  void ConstructProcess();   
     55  void AddStepMax();
     56 
     57  void SetCuts();     
    5758   
    58     // these methods Construct physics processes and register them
    59     void ConstructEM();
    60     void AddStepMax();
    61    
    62     void SingleCoulombScattering (G4bool);   
    63     void RegisterBrem (G4bool);
    64    
    65   private:
    66     DetectorConstruction*  detector;
    67     G4bool                 singleScattering;       
    68     G4bool                 registerBrem;   
    69     PhysicsListMessenger*  pMessenger;   
     59private:
     60
     61  DetectorConstruction* detector;
     62  PhysicsListMessenger* pMessenger;
     63
     64  G4String emName;
     65  G4VPhysicsConstructor*  emPhysicsList;
    7066};
    7167
     
    7470#endif
    7571
    76 
    77 
  • trunk/examples/extended/medical/fanoCavity2/include/PhysicsListMessenger.hh

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: PhysicsListMessenger.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: PhysicsListMessenger.hh,v 1.2 2009/10/31 18:05:56 maire Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    3333#define PhysicsListMessenger_h 1
    3434
     35#include "G4UImessenger.hh"
    3536#include "globals.hh"
    36 #include "G4UImessenger.hh"
    3737
    3838class PhysicsList;
    3939class G4UIdirectory;
    40 class G4UIcmdWithABool;
     40class G4UIcmdWithADoubleAndUnit;
     41class G4UIcmdWithAString;
    4142
    4243//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    4445class PhysicsListMessenger: public G4UImessenger
    4546{
    46   public: 
     47  public:
     48 
    4749    PhysicsListMessenger(PhysicsList* );
    4850   ~PhysicsListMessenger();
     
    5052    void SetNewValue(G4UIcommand*, G4String);
    5153   
    52   private: 
    53     PhysicsList*        pPhysicsList;   
    54     G4UIdirectory*      physDir;       
    55     G4UIcmdWithABool*   singleScat;     
    56     G4UIcmdWithABool*   brem;   
     54  private:
     55 
     56    PhysicsList*               pPhysicsList;
     57   
     58    G4UIdirectory*             physDir;
     59    G4UIcmdWithAString*        pListCmd;
    5760};
    5861
  • trunk/examples/extended/medical/fanoCavity2/include/PrimaryGeneratorAction.hh

    r807 r1230  
    2525//
    2626// $Id: PrimaryGeneratorAction.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/include/ProcessesCount.hh

    r807 r1230  
    2626//
    2727// $Id: ProcessesCount.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/include/RunAction.hh

    r807 r1230  
    2525//
    2626// $Id: RunAction.hh,v 1.2 2007/10/31 16:16:20 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/include/StepMax.hh

    r807 r1230  
    2525//
    2626// $Id: StepMax.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/include/StepMaxMessenger.hh

    r807 r1230  
    2525//
    2626// $Id: StepMaxMessenger.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/include/SteppingAction.hh

    r807 r1230  
    2525//
    2626// $Id: SteppingAction.hh,v 1.2 2007/10/31 16:16:20 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/include/SteppingVerbose.hh

    r807 r1230  
    2525//
    2626// $Id: SteppingVerbose.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/include/TrackingAction.hh

    r807 r1230  
    2525//
    2626// $Id: TrackingAction.hh,v 1.2 2007/10/31 16:16:20 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/run01.mac

    r807 r1230  
    1 # $Id: run01.mac,v 1.2 2007/10/31 16:16:20 maire Exp $
     1# $Id: run01.mac,v 1.3 2009/10/31 18:05:56 maire Exp $
    22#
    33/control/verbose 2
    44/run/verbose 2
     5#
     6/testem/phys/addPhysics standard_opt3
    57#
    68/run/initialize
  • trunk/examples/extended/medical/fanoCavity2/src/DetectorConstruction.cc

    r807 r1230  
    2525//
    2626// $Id: DetectorConstruction.cc,v 1.2 2007/11/05 13:19:16 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828
    2929//
  • trunk/examples/extended/medical/fanoCavity2/src/DetectorMessenger.cc

    r807 r1230  
    2525//
    2626// $Id: DetectorMessenger.cc,v 1.2 2007/11/05 13:19:16 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/src/EventAction.cc

    r807 r1230  
    2525//
    2626// $Id: EventAction.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/src/EventActionMessenger.cc

    r807 r1230  
    2525//
    2626// $Id: EventActionMessenger.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/src/HistoManager.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: HistoManager.cc,v 1.3 2007/11/12 18:19:30 maire Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: HistoManager.cc,v 1.5 2008/09/28 16:15:39 maire Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    5454 
    5555  fileName[0] = "fanocavity2";
    56   fileType    = "hbook";
    57   fileOption  = "--noErrors uncompress"; 
     56  fileType    = "root";
     57  fileOption  = "--noErrors export=root uncompress"; 
    5858  // histograms
    5959  for (G4int k=0; k<MaxHisto; k++) {
     
    224224 if (ih > MaxHisto) {
    225225    G4cout << "---> warning from HistoManager::RemoveHisto() : histo " << ih
    226            << "does not exist" << G4endl;
     226           << "does not exist  (fac = " << fac << ")" << G4endl;
    227227    return;
    228228  }
  • trunk/examples/extended/medical/fanoCavity2/src/HistoMessenger.cc

    r807 r1230  
    2525//
    2626// $Id: HistoMessenger.cc,v 1.2 2007/11/12 18:19:30 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/src/MyMollerBhabhaModel.cc

    r807 r1230  
    2525//
    2626// $Id: MyMollerBhabhaModel.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/src/PhysicsList.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
     26// $Id: PhysicsList.cc,v 1.7 2009/10/31 18:05:01 maire Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2628//
    27 // $Id: PhysicsList.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
    28 // GEANT4 tag $Name:  $
    29 //
    30 
    3129//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    3230//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    3432#include "PhysicsList.hh"
    3533#include "PhysicsListMessenger.hh"
    36 #include "DetectorConstruction.hh"
     34
     35#include "PhysListEmStandard_option0.hh"
     36#include "PhysListEmStandard_option3.hh"
     37#include "PhysListEmStandard_GS.hh"
     38#include "PhysListEmStandard_SS.hh"
     39
     40#include "StepMax.hh"
    3741
    3842#include "G4ParticleDefinition.hh"
    39 #include "G4ParticleTypes.hh"
    40 #include "G4ParticleTable.hh"
    4143
    4244#include "G4ProcessManager.hh"
    4345#include "G4LossTableManager.hh"
    4446
     47// Bosons
     48#include "G4ChargedGeantino.hh"
     49#include "G4Geantino.hh"
     50#include "G4Gamma.hh"
     51
     52// leptons
     53#include "G4Electron.hh"
     54#include "G4Positron.hh"
     55
     56// Hadrons
     57#include "G4Proton.hh"
     58
     59
    4560//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    4661
    4762PhysicsList::PhysicsList(DetectorConstruction* det)
    48 : G4VUserPhysicsList(), detector(det)
     63: G4VModularPhysicsList(), detector(det)
    4964{
    50   defaultCutValue = 10.*km;
    51   singleScattering = false;
    52   registerBrem = false;
    53   pMessenger = new PhysicsListMessenger(this);
    54   SetVerboseLevel(1);
     65  G4LossTableManager::Instance();
     66  pMessenger = new PhysicsListMessenger(this);
     67   
     68  // EM physics
     69  emName = G4String("standard_opt3");
     70  emPhysicsList = new PhysListEmStandard_option3(emName,detector);
     71     
     72  defaultCutValue = 10*km;
     73
     74  SetVerboseLevel(1); 
    5575 
    56   G4LossTableManager::Instance(); 
     76  G4LossTableManager::Instance();
    5777}
    5878
     
    6080
    6181PhysicsList::~PhysicsList()
    62 { delete pMessenger; }
     82{
     83  delete emPhysicsList;
     84  delete pMessenger; 
     85}
    6386
    6487//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    6689void PhysicsList::ConstructParticle()
    6790{
     91  // pseudo-particles
    6892  G4Geantino::GeantinoDefinition();
     93  G4ChargedGeantino::ChargedGeantinoDefinition();
     94 
     95  // gamma
    6996  G4Gamma::GammaDefinition();
    70 
     97 
     98  // leptons
    7199  G4Electron::ElectronDefinition();
    72100  G4Positron::PositronDefinition();
    73101
    74   G4Proton::ProtonDefinition();
     102  // baryons
     103  G4Proton::ProtonDefinition(); 
    75104}
    76105
     
    80109{
    81110  AddTransportation();
    82   ConstructEM();
     111  emPhysicsList->ConstructProcess();
     112
    83113  AddStepMax();
    84114}
    85115
    86116//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    87 
    88 #include "G4ComptonScattering.hh"
    89 #include "G4GammaConversion.hh"
    90 #include "G4PhotoElectricEffect.hh"
    91 
    92 #include "G4MultipleScattering.hh"
    93 #include "G4CoulombScattering.hh"
    94 
    95 #include "G4eIonisation.hh"
    96 #include "MyMollerBhabhaModel.hh"
    97 #include "G4eBremsstrahlung.hh"
    98 #include "G4eplusAnnihilation.hh"
    99 
    100 #include "G4hIonisation.hh"
    101 
    102 #include "G4EmProcessOptions.hh"
    103 #include "G4MscStepLimitType.hh"
    104 
    105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    106 
    107 
    108 void PhysicsList::ConstructEM()
    109 {
    110   theParticleIterator->reset();
    111   while( (*theParticleIterator)() ){
    112     G4ParticleDefinition* particle = theParticleIterator->value();
    113     G4ProcessManager* pmanager = particle->GetProcessManager();
    114     G4String particleName = particle->GetParticleName();
    115     G4int iAlong = 0, iPost = 0;
    116      
    117     if (particleName == "gamma") {
    118                  
    119       pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
    120       pmanager->AddDiscreteProcess(new G4ComptonScattering);         
    121       pmanager->AddDiscreteProcess(new G4GammaConversion);
    122      
    123     } else if (particleName == "e-") {
    124 
    125       if (singleScattering)
    126         pmanager->AddProcess(new G4CoulombScattering,  -1, -1,       ++iPost);
    127         else   
    128         pmanager->AddProcess(new G4MultipleScattering, -1, ++iAlong, ++iPost);
    129      
    130       G4eIonisation* eIoni = new G4eIonisation();
    131       eIoni->SetEmModel(new MyMollerBhabhaModel);             
    132       pmanager->AddProcess(eIoni,                      -1, ++iAlong, ++iPost);
    133      
    134       if (registerBrem)
    135         pmanager->AddProcess(new G4eBremsstrahlung,    -1, ++iAlong, ++iPost);     
    136        
    137     } else if (particleName == "e+") {
    138    
    139       if (singleScattering)
    140         pmanager->AddProcess(new G4CoulombScattering,  -1, -1,       ++iPost);
    141         else   
    142         pmanager->AddProcess(new G4MultipleScattering, -1, ++iAlong, ++iPost);
    143      
    144       G4eIonisation* pIoni = new G4eIonisation();
    145       pIoni->SetEmModel(new MyMollerBhabhaModel);                   
    146       pmanager->AddProcess(pIoni,                      -1, ++iAlong, ++iPost);
    147      
    148       if (registerBrem) {
    149         pmanager->AddProcess(new G4eBremsstrahlung,    -1, ++iAlong, ++iPost);
    150         pmanager->AddProcess(new G4eplusAnnihilation,   0, -1,       ++iPost);
    151       }
    152      
    153     } else if (particleName == "proton") {
    154    
    155       if (singleScattering)
    156         pmanager->AddProcess(new G4CoulombScattering,  -1, -1,       ++iPost);
    157         else   
    158         pmanager->AddProcess(new G4MultipleScattering, -1, ++iAlong, ++iPost);
    159        
    160       pmanager->AddProcess(new G4hIonisation,          -1, ++iAlong, ++iPost);
    161     }
    162   }
    163  
    164   // Em options
    165   //
    166   G4EmProcessOptions emOptions;
    167  
    168   //multiple scattering
    169   //
    170   emOptions.SetMscStepLimitation(fUseDistanceToBoundary);
    171   emOptions.SetSkin(2.);
    172  
    173   //physics tables
    174   //
    175   emOptions.SetMinEnergy(100*eV);   
    176   emOptions.SetMaxEnergy(10*GeV); 
    177   emOptions.SetDEDXBinning(800); 
    178   emOptions.SetLambdaBinning(800);
    179  
    180   //energy loss
    181   // 
    182   emOptions.SetStepFunction(0.2, 10*um);
    183   emOptions.SetLinearLossLimit(1.e-6);
    184          
    185   //build CSDA range
    186   //
    187   emOptions.SetBuildCSDARange(true);
    188   emOptions.SetMaxEnergyForCSDARange(10*GeV); 
    189   emOptions.SetDEDXBinningForCSDARange(800);   
    190 }
    191 
    192 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    193 
    194 #include "StepMax.hh"
    195117
    196118void PhysicsList::AddStepMax()
     
    204126      G4ProcessManager* pmanager = particle->GetProcessManager();
    205127
    206       if (stepMaxProcess->IsApplicable(*particle))
     128      if (stepMaxProcess->IsApplicable(*particle) && !particle->IsShortLived())
    207129        {
    208130          pmanager ->AddDiscreteProcess(stepMaxProcess);
    209131        }
     132  }
     133}
     134
     135//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     136
     137void PhysicsList::AddPhysicsList(const G4String& name)
     138{
     139  if (verboseLevel>-1) {
     140    G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
     141  }
     142
     143  if (name == emName) return;
     144
     145  if (name == "standard_opt0") {
     146
     147    emName = name;
     148    delete emPhysicsList;
     149    emPhysicsList = new PhysListEmStandard_option0(name,detector);
     150   
     151  } else if (name == "standard_opt3") {
     152
     153    emName = name;
     154    delete emPhysicsList;
     155    emPhysicsList = new PhysListEmStandard_option3(name,detector);
     156   
     157  } else if (name == "standard_GS") {
     158
     159    emName = name;
     160    delete emPhysicsList;
     161    emPhysicsList = new PhysListEmStandard_GS(name,detector);   
     162   
     163  } else if (name == "standard_SS") {
     164
     165    emName = name;
     166    delete emPhysicsList;
     167    emPhysicsList = new PhysListEmStandard_SS(name,detector);   
     168  } else {
     169
     170    G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
     171           << " is not defined"
     172           << G4endl;
    210173  }
    211174}
     
    227190  SetCutValue(defaultCutValue, "e-");
    228191  SetCutValue(defaultCutValue, "e+");
     192  SetCutValue(defaultCutValue, "proton"); 
    229193}
    230194
    231195//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    232 
    233 void PhysicsList::SingleCoulombScattering(G4bool flag)
    234 {
    235   singleScattering = flag;
    236 }
    237 
    238 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    239 
    240 void PhysicsList::RegisterBrem(G4bool flag)
    241 {
    242   registerBrem = flag;
    243 }
    244 
    245 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    246 
    247 
    248 
    249 
  • trunk/examples/extended/medical/fanoCavity2/src/PhysicsListMessenger.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: PhysicsListMessenger.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: PhysicsListMessenger.cc,v 1.2 2009/10/31 18:05:01 maire Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    3434#include "PhysicsList.hh"
    3535#include "G4UIdirectory.hh"
    36 #include "G4UIcmdWithABool.hh"
     36#include "G4UIcmdWithADoubleAndUnit.hh"
     37#include "G4UIcmdWithAString.hh"
    3738
    3839//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    4041PhysicsListMessenger::PhysicsListMessenger(PhysicsList* pPhys)
    4142:pPhysicsList(pPhys)
    42 {
     43{ 
    4344  physDir = new G4UIdirectory("/testem/phys/");
    4445  physDir->SetGuidance("physics list commands");
    45  
    46   singleScat = new G4UIcmdWithABool("/testem/phys/singleScattering",this);
    47   singleScat->SetGuidance("apply single Coulomb scattering process");
    48   singleScat->SetParameterName("flag",true);
    49   singleScat->SetDefaultValue(true);
    50   singleScat->AvailableForStates(G4State_PreInit);
    51        
    52   brem = new G4UIcmdWithABool("/testem/phys/registerBrem",this);
    53   brem->SetGuidance("register Brems in PhysicsList");
    54   brem->SetParameterName("flag",true);
    55   brem->SetDefaultValue(true);
    56   brem->AvailableForStates(G4State_PreInit);   
     46
     47  pListCmd = new G4UIcmdWithAString("/testem/phys/addPhysics",this); 
     48  pListCmd->SetGuidance("Add modula physics list.");
     49  pListCmd->SetParameterName("PList",false);
     50  pListCmd->AvailableForStates(G4State_PreInit);
    5751}
    5852
     
    6155PhysicsListMessenger::~PhysicsListMessenger()
    6256{
    63   delete singleScat;
    64   delete brem;
    65   delete physDir;   
     57  delete pListCmd;
     58  delete physDir;
    6659}
    6760
     
    7063void PhysicsListMessenger::SetNewValue(G4UIcommand* command,
    7164                                          G4String newValue)
    72 
    73   if (command == singleScat)
    74    {pPhysicsList->SingleCoulombScattering(singleScat->GetNewBoolValue(newValue));}
    75            
    76   if (command == brem)
    77    {pPhysicsList->RegisterBrem(brem->GetNewBoolValue(newValue));}     
     65{           
     66  if( command == pListCmd )
     67   { pPhysicsList->AddPhysicsList(newValue);}
    7868}
    7969
  • trunk/examples/extended/medical/fanoCavity2/src/PrimaryGeneratorAction.cc

    r807 r1230  
    2525//
    2626// $Id: PrimaryGeneratorAction.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/src/RunAction.cc

    r807 r1230  
    2525//
    2626// $Id: RunAction.cc,v 1.3 2007/11/05 13:19:16 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/src/StepMax.cc

    r807 r1230  
    2525//
    2626// $Id: StepMax.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/src/StepMaxMessenger.cc

    r807 r1230  
    2525//
    2626// $Id: StepMaxMessenger.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/src/SteppingAction.cc

    r807 r1230  
    2525//
    2626// $Id: SteppingAction.cc,v 1.2 2007/10/31 16:16:20 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/src/SteppingVerbose.cc

    r807 r1230  
    2525//
    2626// $Id: SteppingVerbose.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/src/TrackingAction.cc

    r807 r1230  
    2525//
    2626// $Id: TrackingAction.cc,v 1.2 2007/10/31 16:16:20 maire Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/medical/fanoCavity2/stepfunction.mac

    r807 r1230  
    1 # $Id: stepfunction.mac,v 1.1 2007/10/15 16:29:06 maire Exp $
     1# $Id: stepfunction.mac,v 1.2 2009/10/31 18:05:56 maire Exp $
    22#
    33/control/verbose 2
    44/run/verbose 2
     5#
     6/testem/phys/addPhysics standard_opt3
    57#
    68/run/initialize
Note: See TracChangeset for help on using the changeset viewer.