Import Geant4 10.3.1 source tree

This commit is contained in:
Gabriele Cosmo
2017-02-28 16:18:37 +01:00
parent 4597adb7c4
commit 3a5407696b
563 changed files with 0 additions and 95641 deletions
@@ -1,65 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm17/include/EventAction.hh
/// \brief Definition of the EventAction class
//
// $Id: EventAction.hh 67268 2013-02-13 11:38:40Z ihrivnac $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef EventAction_h
#define EventAction_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
class EventActionMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class EventAction : public G4UserEventAction
{
public:
EventAction();
~EventAction();
public:
virtual void BeginOfEventAction(const G4Event*);
virtual void EndOfEventAction(const G4Event*);
void SetPrintModulo(G4int val) {fPrintModulo = val;};
private:
G4int fPrintModulo;
EventActionMessenger* fEventMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -1,63 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm17/include/EventActionMessenger.hh
/// \brief Definition of the EventActionMessenger class
//
// $Id: EventActionMessenger.hh 67268 2013-02-13 11:38:40Z ihrivnac $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef EventActionMessenger_h
#define EventActionMessenger_h 1
#include "G4UImessenger.hh"
#include "globals.hh"
class EventAction;
class G4UIdirectory;
class G4UIcmdWithAnInteger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class EventActionMessenger: public G4UImessenger
{
public:
EventActionMessenger(EventAction*);
~EventActionMessenger();
virtual void SetNewValue(G4UIcommand*, G4String);
private:
EventAction* fEventAction;
G4UIdirectory* fEventDir;
G4UIcmdWithAnInteger* fPrintCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -1,74 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm17/src/EventAction.cc
/// \brief Implementation of the EventAction class
//
// $Id: EventAction.cc 67268 2013-02-13 11:38:40Z ihrivnac $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "EventAction.hh"
#include "EventActionMessenger.hh"
#include "G4Event.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventAction::EventAction()
:G4UserEventAction(),fPrintModulo(10000),fEventMessenger(0)
{
fEventMessenger = new EventActionMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventAction::~EventAction()
{
delete fEventMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void EventAction::BeginOfEventAction(const G4Event* evt)
{
G4int evtNb = evt->GetEventID();
//printing survey
if (evtNb%fPrintModulo == 0)
G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void EventAction::EndOfEventAction(const G4Event*)
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,74 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm17/src/EventActionMessenger.cc
/// \brief Implementation of the EventActionMessenger class
//
// $Id: EventActionMessenger.cc 67268 2013-02-13 11:38:40Z ihrivnac $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "EventActionMessenger.hh"
#include "EventAction.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAnInteger.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventActionMessenger::EventActionMessenger(EventAction* EvAct)
:G4UImessenger(),fEventAction(EvAct),
fEventDir(0),
fPrintCmd(0)
{
fEventDir = new G4UIdirectory("/testem/event/");
fEventDir ->SetGuidance("physics list");
fPrintCmd = new G4UIcmdWithAnInteger("/testem/event/printModulo",this);
fPrintCmd->SetGuidance("Print events modulo n");
fPrintCmd->SetParameterName("EventNb",false);
fPrintCmd->SetRange("EventNb>0");
fPrintCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventActionMessenger::~EventActionMessenger()
{
delete fPrintCmd;
delete fEventDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void EventActionMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
{
if (command == fPrintCmd)
{fEventAction->SetPrintModulo(fPrintCmd->GetNewIntValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,24 +0,0 @@
testem4/src is the geant3 equivalent of TestEm4
% cd geant3
% gmakeB to make an executable (Batch version)
% gmakeT to make an executable (inTeractive version)
To execute:
% cd geant3
% $G4SYSTEM/testem4.xb (for batch) or testem4.xt (for interactive)
The program will ask:
G3 > gives the filename of the data cards to be read:
run01.dat (runNN.dat is the equivalent of the G4 runNN.mac)
testem4 produces 1 histo saved as testem4.paw if ISWIT(2)=1
Content of this histo:
1 : energy deposit in C6F6
@@ -1,32 +0,0 @@
#
# @(#) Script to build a Batch geant executable
#
set name=testem4
set extnam=" "
if ($G4SYSTEM == AIX-AFS) set extnam=-qextname
#
mkdir $G4SYSTEM
cd $G4SYSTEM
#
# fortran compilation
#
hepf77 $extnam -c -g -Dbatch -I/cern/pro/include -I../include ../src/*.F
#
# Link
#
echo 'linking geant3+cernlib libraries ...'
#
hepf77 $extnam -g -o $name.xb *.o \
`cernlib geant321 pawlib graflib packlib mathlib kernlib`
#
#
chmod +x $name.xb
#
# cleanup
#
rm *.o
echo 'done'
exit
@@ -1,31 +0,0 @@
#
# @(#) Script to build an inTeractive geant executable
#
set name=testem4
set extnam=" "
if ($G4SYSTEM == AIX-AFS) set extnam=-qextname
#
mkdir $G4SYSTEM
cd $G4SYSTEM
#
# fortran compilation
#
hepf77 $extnam -c -g -I/cern/pro/include -I../include ../src/*.F
#
# Link
#
echo 'linking geant3+cernlib libraries...'
#
hepf77 $extnam -g -o $name.xt *.o \
`cernlib geant321 pawlib graflib packlib mathlib kernlib`
#
#
chmod +x $name.xt
#
# cleanup
#
rm *.o
echo 'done'
exit
@@ -1,2 +0,0 @@
COMMON/CELOSS/ ETOT
@@ -1,10 +0,0 @@
LIST
TRIG 100000
KINE 1 (Itype) 0.009(Ekine)
DEBUG 1 5 10000
SWIT 0 (draw) 1 (save)
CUTS 10.e-6 (cutgam) 10.e-6 (cutele) 3*10.e-3 (cutneu/had/muo)
2*10.e-6 (bcute/m) 2*428.e-6 (dcute/m)
LOSS 1
ABAN 0
TIME 2= 1.
@@ -1,34 +0,0 @@
SUBROUTINE GUKINE
*
* Generates Kinematics for primary track
*
* Data card Kine : Itype Ekine
*
#include "geant321/gconst.inc"
#include "geant321/gcflag.inc"
#include "geant321/gckine.inc"
*
DIMENSION VERTEX(3),PLAB(3)
DIMENSION RNDM(2)
*
DATA VERTEX/3*0./
*
*
CALL GSVERT(VERTEX,0,0,0,0,NVERT)
*
CALL GRNDM(RNDM,2)
cosTheta = 2*RNDM(1) - 1.
sinTheta = sqrt(1. - cosTheta**2)
Phi = TWOPI*RNDM(2)
*
PLAB(1) = PKINE(1)*sinTheta*COS(Phi)
PLAB(2) = PKINE(1)*sinTheta*SIN(Phi)
PLAB(3) = PKINE(1)*cosTheta
*
CALL GSKINE(PLAB,IKINE,NVERT,0,0,NT)
*
* *** Kinematics debug
IF (IEVENT.EQ.1.OR.IDEBUG.NE.0) CALL GPRINT('KINE',0)
*
END
@@ -1,27 +0,0 @@
SUBROUTINE GUOUT
*
* User routine called at the end of each event
*
#include "geant321/gcflag.inc"
#include "celoss.inc"
*
* *** drawing
*
#ifndef batch
IF (ISWIT(1).NE.0) THEN
CALL GDHEAD (110110,'TestEm4',0.)
CALL GDSHOW (3)
CALL GDXYZ (0)
END IF
#endif
*
* energy deposited
*
EMEV = 1000.*ETOT
CALL HFILL(1,EMEV,0.,1.)
IF (ISWIT(1).NE.0) PRINT 750,EMEV
*
750 FORMAT(1X,'Energy deposit: ',F6.3,' MeV')
*
END
@@ -1,24 +0,0 @@
SUBROUTINE GUSTEP
*
* User routine called at the end of each tracking step
*
#include "geant321/gcflag.inc"
#include "geant321/gckine.inc"
#include "geant321/gcking.inc"
#include "geant321/gctrak.inc"
#include "celoss.inc"
*
*
* *** Debug event and store tracks for drawing
IF (IDEBUG.NE.0) CALL GPCXYZ
IF ((ISWIT(1).EQ.1).AND.(CHARGE.NE.0.)) CALL GSXYZ
IF (ISWIT(1).EQ.2) CALL GSXYZ
*
* *** Something generated ?
IF(NGKINE.GT.0) CALL GSKING(0)
*
* *** Energy deposited
IF(DESTEP.GT.0.) ETOT = ETOT + DESTEP
*
END
@@ -1,13 +0,0 @@
SUBROUTINE GUTREV
*
* User routine to control tracking of one event
* Called by GRUN
*
#include "celoss.inc"
*
ETOT = 0.
*
CALL GTREVE
*
END
@@ -1,58 +0,0 @@
#ifdef batch
PROGRAM main
*
*
PARAMETER (NGBANK=100000, NHBOOK=10000)
COMMON/GCBANK/Q(NGBANK)
COMMON/PAWC /H(NHBOOK)
*
CALL GZEBRA( NGBANK)
CALL HLIMIT(-NHBOOK)
*
* *** initialize HIGZ
CALL HPLINT(0)
*
* *** GEANT initialisation
CALL UGINIT
*
* *** Start events processing
CALL GRUN
*
* *** End of RUN
CALL UGLAST
*
STOP
END
#else
PROGRAM main
*
* GEANT main program. To link with the MOTIF user interface
* the routine GPAWPP(NWGEAN,NWPAW) should be called, whereas
* the routine GPAW(NWGEAN,NWPAW) gives access to the basic
* graphics version.
*
PARAMETER (NWGEAN=3000000, NWPAW=1000000)
COMMON/GCBANK/GEANT(NWGEAN)
COMMON/PAWC /PAW (NWPAW)
*
*
CALL GPAW (NWGEAN,NWPAW)
*
END
*
SUBROUTINE qnext
END
*
SUBROUTINE czopen
END
*
SUBROUTINE cztcp
END
*
SUBROUTINE czclos
END
*
SUBROUTINE czputa
END
#endif
@@ -1,57 +0,0 @@
SUBROUTINE UGEOM
*
* *** Define user geometry set up
*
*
DIMENSION PAR(3)
DIMENSION AC6F6(2),ZC6F6(2),WC6F6(2)
*
* *** C6F6 compound parameters
DATA AC6F6/12.02, 19.01/
DATA ZC6F6/ 6. , 9. /
DATA WC6F6/ 6. , 6. /
*
CALL GSMIXT(1,'C6F6',AC6F6,ZC6F6,1.61,-2,WC6F6)
*
*
* *** Defines USER tracking media parameters
IMAT = 1
FIELDM = 0.0
IFIELD = 0
TMAXFD = 10.0
STEMAX = 1000.
DEEMAX = 0.20
EPSIL = 0.001
STMIN = 0.010
*
CALL GSTMED( 1,'C6F6',IMAT, 0 ,IFIELD,FIELDM,TMAXFD,
* STEMAX,DEEMAX,EPSIL,STMIN, 0 , 0 )
*
*
* *** Geometry
PAR(1) = 0.
PAR(2) = 5.
PAR(3) = 5.
CALL GSVOLU('C6F6','TUBE',1,PAR,3,IVOL)
*
* *** Close geometry banks. (obligatory system routine)
CALL GGCLOS
*
*
* *** dessin
CALL GSATT ('*','SEEN',1)
*
DO IX = 1,3
CALL GDOPEN (IX)
SCALE = 1.75
PAXIS = 0.
SAXIS = 1.
CALL GDRAWC ('C6F6',IX,0.,10.,9.5,SCALE,SCALE)
CALL GDAXIS (PAXIS,PAXIS,PAXIS,SAXIS)
CALL GDSCAL (10. , 0.3)
CALL GDCLOS
END DO
*
END
@@ -1,38 +0,0 @@
SUBROUTINE UGINIT
*
* To initialise GEANT/USER program and read data cards
*
CHARACTER*20 filnam
*
* *** Define the GEANT parameters
CALL GINIT
* *** read data cards
PRINT *, 'G3 > gives the filename of the data cards to be read:'
READ (*,'(A)') filnam
IF (filnam.EQ.' ') filnam = 'run01.dat'
OPEN (unit=5,file=filnam,status='unknown',form='formatted')
* *** read data cards
CALL GFFGO
*
CALL GZINIT
CALL GPART
*
CALL GDINIT
*
* *** Geometry and materials description
CALL UGEOM
*
* *** Energy loss and cross-sections initialisations
CALL GPHYSI
*
CALL GPRINT('MATE',0)
CALL GPRINT('TMED',0)
CALL GPRINT('VOLU',0)
*
* *** Define user histograms
CALL UHINIT
*
END
@@ -1,21 +0,0 @@
SUBROUTINE UGLAST
*
* Termination routine to print histograms and statistics
*
#include "geant321/gcflag.inc"
*
*
CALL GLAST
*
* *** print selected histo
*
* *** close HIGZ
CALL HPLEND
*
* *** Save selected histograms
IF (ISWIT(2).EQ.1) THEN
CALL HRPUT(0,'testem4.paw','N')
ENDIF
*
END
@@ -1,11 +0,0 @@
SUBROUTINE UHINIT
*
* To book the user's histograms
*
CALL HBOOK1(1,'total energy deposit in C6F6 (MeV)'
*,100, 0., 10., 0.)
CALL HIDOPT(0,'STAT')
*
END
@@ -1,12 +0,0 @@
macro plotHisto.kumac
*
h/file 1 testem4.hbook
*
h/list
*
opt stat
opt logy
*
h/pl 1
*
return
@@ -1,68 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm7/include/PhysListEmStandardSS.hh
/// \brief Definition of the PhysListEmStandardSS class
//
// $Id: PhysListEmStandardSS.hh 66241 2012-12-13 18:34:42Z gunter $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PhysListEmStandardSS_h
#define PhysListEmStandardSS_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class PhysListEmStandardSS : public G4VPhysicsConstructor
{
public:
PhysListEmStandardSS(const G4String& name = "standardSS");
~PhysListEmStandardSS();
public:
// This method is dummy for physics
virtual void ConstructParticle() {};
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -1,237 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm7/src/PhysListEmStandardSS.cc
/// \brief Implementation of the PhysListEmStandardSS class
//
// $Id: PhysListEmStandardSS.cc 68585 2013-04-01 23:35:07Z adotti $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysListEmStandardSS.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4LossTableManager.hh"
#include "G4EmProcessOptions.hh"
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4RayleighScattering.hh"
#include "G4PEEffectFluoModel.hh"
#include "G4KleinNishinaModel.hh"
#include "G4LowEPComptonModel.hh"
#include "G4PenelopeGammaConversionModel.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4eMultipleScattering.hh"
#include "G4MuMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
#include "G4CoulombScattering.hh"
#include "G4eCoulombScatteringModel.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4Generator2BS.hh"
#include "G4SeltzerBergerModel.hh"
#include "G4PenelopeIonisationModel.hh"
#include "G4UniversalFluctuation.hh"
#include "G4eplusAnnihilation.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
#include "G4IonParametrisedLossModel.hh"
#include "G4PhysicsListHelper.hh"
#include "G4BuilderType.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEmStandardSS::PhysListEmStandardSS(const G4String& name)
: G4VPhysicsConstructor(name)
{
G4LossTableManager::Instance();
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEmStandardSS::~PhysListEmStandardSS()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysListEmStandardSS::ConstructProcess()
{
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
// muon & hadron bremsstrahlung and pair production
G4MuBremsstrahlung* mub = new G4MuBremsstrahlung();
G4MuPairProduction* mup = new G4MuPairProduction();
aParticleIterator->reset();
while( (*aParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
// Compton scattering
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel(),1);
G4VEmModel* theLowEPComptonModel = new G4LowEPComptonModel();
theLowEPComptonModel->SetHighEnergyLimit(20*MeV);
cs->AddEmModel(0, theLowEPComptonModel);
ph->RegisterProcess(cs, particle);
// Photoelectric
G4PhotoElectricEffect* pe = new G4PhotoElectricEffect();
G4VEmModel* theLivermorePEModel = new G4LivermorePhotoElectricModel();
theLivermorePEModel->SetHighEnergyLimit(10*GeV);
pe->SetEmModel(theLivermorePEModel,1);
ph->RegisterProcess(pe, particle);
// Gamma conversion
G4GammaConversion* gc = new G4GammaConversion();
G4VEmModel* thePenelopeGCModel = new G4PenelopeGammaConversionModel();
thePenelopeGCModel->SetHighEnergyLimit(1*GeV);
gc->SetEmModel(thePenelopeGCModel,1);
ph->RegisterProcess(gc, particle);
// Rayleigh scattering
ph->RegisterProcess(new G4RayleighScattering(), particle);
} else if (particleName == "e-") {
// ionisation
G4eIonisation* eIoni = new G4eIonisation();
eIoni->SetStepFunction(0.2, 100*um);
G4VEmModel* theIoniPenelope = new G4PenelopeIonisationModel();
theIoniPenelope->SetHighEnergyLimit(0.1*MeV);
eIoni->AddEmModel(0, theIoniPenelope, new G4UniversalFluctuation());
// bremsstrahlung
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
ph->RegisterProcess(eIoni, particle);
ph->RegisterProcess(eBrem, particle);
ph->RegisterProcess(new G4CoulombScattering(), particle);
} else if (particleName == "e+") {
// ionisation
G4eIonisation* eIoni = new G4eIonisation();
eIoni->SetStepFunction(0.2, 100*um);
G4VEmModel* theIoniPenelope = new G4PenelopeIonisationModel();
theIoniPenelope->SetHighEnergyLimit(0.1*MeV);
eIoni->AddEmModel(0, theIoniPenelope, new G4UniversalFluctuation());
// bremsstrahlung
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
ph->RegisterProcess(eIoni, particle);
ph->RegisterProcess(eBrem, particle);
ph->RegisterProcess(new G4CoulombScattering(), particle);
// annihilation at rest and in flight
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
} else if (particleName == "mu+" ||
particleName == "mu-" ) {
G4MuIonisation* muIoni = new G4MuIonisation();
muIoni->SetStepFunction(0.2, 50*um);
ph->RegisterProcess(muIoni, particle);
ph->RegisterProcess(mub, particle);
ph->RegisterProcess(mup, particle);
ph->RegisterProcess(new G4CoulombScattering(), particle);
} else if (particleName == "alpha" || particleName == "He3") {
G4ionIonisation* ionIoni = new G4ionIonisation();
ionIoni->SetStepFunction(0.1, 10*um);
ph->RegisterProcess(ionIoni, particle);
G4CoulombScattering* cs = new G4CoulombScattering();
cs->SetBuildTableFlag(false);
ph->RegisterProcess(cs, particle);
} else if (particleName == "GenericIon" ) {
G4ionIonisation* ionIoni = new G4ionIonisation();
ionIoni->SetEmModel(new G4IonParametrisedLossModel());
ionIoni->SetStepFunction(0.1, 1*um);
ph->RegisterProcess(ionIoni, particle);
G4CoulombScattering* cs = new G4CoulombScattering();
cs->SetBuildTableFlag(false);
ph->RegisterProcess(cs, particle);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
//all others charged particles except geantino
ph->RegisterProcess(new G4hIonisation(), particle);
G4CoulombScattering* cs = new G4CoulombScattering();
cs->SetBuildTableFlag(false);
ph->RegisterProcess(cs, particle);
}
}
// Em options
//
// Main options and setting parameters are shown here.
// Several of them have default values.
//
G4EmProcessOptions emOptions;
//physics tables
//
emOptions.SetMinEnergy(10*eV);
emOptions.SetMaxEnergy(10*TeV);
emOptions.SetDEDXBinning(12*20);
emOptions.SetLambdaBinning(12*20);
// scattering
emOptions.SetPolarAngleLimit(0.0);
// Deexcitation
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
de->SetFluo(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......