Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.5 2001/02/21 14:00:33 maire Exp $
# $Id: GNUmakefile,v 1.6 2001/11/29 11:28:06 maire Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -25,3 +25,7 @@ else
endif
include $(G4INSTALL)/config/binmake.gmk
visclean:
rm -f g4*.prim g4*.eps g4*.wrl
rm -f .DAWN_*
@@ -1,4 +1,4 @@
$Id: History,v 1.11 2001/03/27 08:34:07 maire Exp $
$Id: History,v 1.15 2001/11/29 11:28:06 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -15,64 +15,82 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
27-03-01 mma (testem1-V03-00-05)
- set cppflag G4NOHIST = true in gnumakefile
29-11-01 mma (testem1-V03-02-02)
- EventAction: DrawTrack "none"
- small change in vis.mac
- suppression of the rndm commands, now managed by G4RunManager:
--> RunAction, EventAction. suppression of RunActionMessenger
31-10-01 mma (testem1-V03-02-01)
- PhysicsListMessenger: commands CutE, CutG, CutP avaiblable in PreInit
- in all macros: set cuts before run/initialize
26-10-01 mma (testem1-V03-02-00)
- mods in TestEm1.cc: the initialisation and vis initialisation are
not done gy default. --> inserted /run/initialize in all macros.
- To get visualisation: > /control/execute vis.mac (new vis commands)
- 80 columns everywhere
19-10-01 Steve O'Neale (examples-V03-02-00)
- Update reference output
27-03-01 mma (testem1-V03-00-05)
- set cppflag G4NOHIST = true in gnumakefile
08-03-01 Hisaya (testem1-V03-00-04)
- adapted ProcessesCount to STL
08-03-01 Hisaya (testem1-V03-00-04)
- adapted ProcessesCount to STL
21-02-01 mma (testem1-V03-00-03)
- hbook histograms restored
21-02-01 mma (testem1-V03-00-03)
- hbook histograms restored
20-02-01 mma (testem1-V03-00-02)
- verbose stepping adapted for STL
- save rndm at begin of event
20-02-01 mma (testem1-V03-00-02)
- verbose stepping adapted for STL
- save rndm at begin of event
07-12-00 mma (testem1-V02-00-03 & testem-noHist)
remove hbook histograms: GNUmakefile,runAction,trackingAction,
steppingAction
07-12-00 mma (testem1-V02-00-03 & testem-noHist)
- remove hbook histograms: GNUmakefile,runAction,trackingAction,steppingAction
06-12-00 mma (testem1-V02-00-02 & testem-withHist)
update of init.mac for new vis commands.
G4UItcsh in the main()
06-12-00 mma (testem1-V02-00-02 & testem-withHist)
- update of init.mac for new vis commands.
- G4UItcsh in the main()
24-11-00 Steve O'Neale (tagset210) (testem1-V02-00-01)
Update test output Change in processes below ~ 5 per cent
eIoni and hIoni min.delta energy(keV) and energy cut table
24-11-00 Steve O'Neale (tagset210) (testem1-V02-00-01)
- Update test output Change in processes below ~ 5 per cent
eIoni and hIoni min.delta energy(keV) and energy cut table
13-11-00 G.Cosmo (testem1-V02-00-00)
Fixed memory leak in Em1RunAction: added call to clearAndDestroy()
in EndOfRunAction() to clean ProcCounter vector.
13-11-00 G.Cosmo (testem1-V02-00-00)
- Fixed memory leak in Em1RunAction: added call to clearAndDestroy()
in EndOfRunAction() to clean ProcCounter vector.
17-06-00 J.Allison (testem1-V01-00-00)
Updated TestEm1.out for geant4-01-01-ref-06.
17-06-00 J.Allison (testem1-V01-00-00)
- Updated TestEm1.out for geant4-01-01-ref-06.
21-01-00 cppflag G4NOHIST to protect hbook histograms.
21-01-00 cppflag G4NOHIST to protect hbook histograms.
11-10-99 moved from: source/processes/electromagnetic/test
to: examples/extended/electromagnetic
11-10-99 moved from: source/processes/electromagnetic/test
to: examples/extended/electromagnetic
09-08-99 Commands for save/read Rndm status
09-08-99 Commands for save/read Rndm status
17-06-99 added histogramming facility
17-06-99 added histogramming facility
10-05-99 user's actions adapted to geant4-00-ref-04
10-05-99 user's actions adapted to geant4-00-ref-04
03-12-98 subdirectory geant3 which contains the geant3 equivalent
example.
03-12-98 subdirectory geant3 which contains the geant3 equivalent
example.
24.11.98 due to new computation of SetCut for electron, the cut in range
for e-/+ has been modified in init.mac and run10.mac (beta03-00)
24.11.98 due to new computation of SetCut for electron, the cut in range
for e-/+ has been modified in init.mac and run10.mac (beta03-00)
27.10.98 interactive command for setting StepFunction: deemax + stmin.
modifs in setxxCut functions (Hisaya).
Count occurence of processes.
Now TestEm1 is equivalent to g3-testem1
Both can be run in batch with reference files:
run1.mac (g4), run1.dat (g3).
27.10.98 interactive command for setting StepFunction: deemax + stmin.
modifs in setxxCut functions (Hisaya).
Count occurence of processes.
Now TestEm1 is equivalent to g3-testem1
Both can be run in batch with reference files:
run1.mac (g4), run1.dat (g3).
19.10.98 Moved in subdirectory electromagnetic/test/TestEm1.
Interactive commands in PhysicsList for setting cuts.
19.10.98 Moved in subdirectory electromagnetic/test/TestEm1.
Interactive commands in PhysicsList for setting cuts.
14.09.98 Created, Michel Maire
14.09.98 Created, Michel Maire
@@ -1,4 +1,4 @@
$Id: README,v 1.3 2001/03/30 12:41:27 gcosmo Exp $
$Id: README,v 1.4 2001/10/26 12:51:21 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -49,9 +49,9 @@ $Id: README,v 1.3 2001/03/30 12:41:27 gcosmo Exp $
4- VISUALIZATION
The Visualization Manager is set in the main().
The initialisation of the drawing is done via the command
/vis~/create_view in the macro init.mac. This macro is
automatically read from the main in case of interactive running mode.
The initialisation of the drawing is done via the commands
/vis/... in the macro vis.mac. To get visualisation:
> /control/execute vis.mac
The detector has a default view which is a longitudinal view of the
box.
@@ -21,11 +21,11 @@
// ********************************************************************
//
//
// $Id: TestEm1.cc,v 1.4.4.1 2001/06/28 19:06:47 gunter Exp $
// GEANT4 tag $Name: $
// $Id: TestEm1.cc,v 1.7 2001/11/29 11:28:06 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#define Em1NoOptimize 1
@@ -51,7 +51,7 @@
#endif
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
int main(int argc,char** argv) {
@@ -82,14 +82,11 @@ int main(int argc,char** argv) {
Em1EventAction* EvtAct;
runManager->SetUserAction(RunAct = new Em1RunAction);
runManager->SetUserAction(EvtAct = new Em1EventAction(RunAct));
runManager->SetUserAction(EvtAct = new Em1EventAction);
runManager->SetUserAction(new Em1TrackingAction(RunAct));
runManager->SetUserAction(new Em1SteppingAction(RunAct,EvtAct));
#endif
//Initialize G4 kernel
runManager->Initialize();
// get the pointer to the User Interface manager
G4UImanager* UI = G4UImanager::GetUIpointer();
@@ -101,7 +98,6 @@ int main(int argc,char** argv) {
#else
session = new G4UIterminal();
#endif
UI->ApplyCommand("/control/execute init.mac");
session->SessionStart();
delete session;
}
@@ -124,4 +120,4 @@ int main(int argc,char** argv) {
return 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,4 +1,4 @@
# $Id: TestEm1.in,v 1.1 2000/01/21 14:58:58 maire Exp $
# $Id: TestEm1.in,v 1.3 2001/10/31 15:49:30 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,13 +7,14 @@
#
/control/verbose 2
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 2.20 mm
/calor/cutE 6.05 mum
/calor/cutE 6.05 mum
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 100 MeV
@@ -1,8 +1,26 @@
**********************************************
Geant4 version $Name: geant4-03-01-ref-01 $
(06-Apr-2001)
Geant4 version $Name: geant4-04-00 $
(14-Dec-2001)
Copyright : Geant4 Collaboration
**********************************************
Visualization Manager instantiating...
Visualization Manager initialising...
Registering graphics systems...
You have successfully chosen to use the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
GAGTree (GAGTree)
G4HepRepFile (HepRepFile)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
#
/calor/cutG 2.20 mm
/calor/cutE 6.05 mum
#
/run/initialize
***** Table : Nb of materials = 9 *****
@@ -45,148 +63,71 @@ phot: Total cross sections from a parametrisation. Good description from 10 KeV
PhysicsTables from 50 keV to 50 MeV in 100 bins.
compt: Total cross sections from a parametrisation. Good description from 10 KeV to (100/Z) GeV.
Scattered gamma energy according Klein-Nishina.
PhysicsTables from 10 keV to 1e+02 GeV in 100 bins.
Scattered gamma energy according Klein-Nishina.
PhysicsTables from 10 keV to 100 GeV in 100 bins.
conv: Total cross sections from a parametrisation. Good description from 1.5 MeV to 100 GeV for all Z.
e+e- energies according Bethe-Heitler
PhysicsTables from 1 MeV to 1e+02 GeV in 100 bins.
PhysicsTables from 1.022 MeV to 100 GeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
eIoni: delta cross sections from Moller+Bhabha. Good description from 1 KeV to 100 GeV.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
eBrem: Total cross sections from a NEW parametrisation based on the EEDL data library.
Good description from 1 KeV to 100 GeV.
log scale extrapolation above 100 GeV
Gamma energy sampled from a parametrised formula.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
annihil: Total cross section from Heilter formula (annihilation into 2 photons).
annihil: Total cross section from Heilter formula(annihilation into 2 photons).
gamma energies sampled according Heitler
PhysicsTables from 10 keV to 10 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
hIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
MuIoni: knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+03 PeV in 150 bins.
MuBrems: theoretical cross section
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1e+03 PeV in 150 bins.
MuPairProd: theoretical cross sections
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1e+03 PeV in 150 bins.
============= The cut Energy ==============================
gamma e-
Cut in range 1 mm 1 mm
Cut in energy
Air 990 eV 990 eV
H2liquid 990 eV 108 keV
Water 2.9 keV 347 keV
liquidArgon 6.18 keV 343 keV
Aluminium 6.89 keV 597 keV
Silicon 6.89 keV 541 keV
Iron 20.8 keV 1.28 MeV
Lead 101 keV 1.38 MeV
Uranium 110 keV 1.92 MeV
===================================================
# $Id: TestEm1.out,v 1.15 2001/04/26 12:33:03 stesting Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
#
# electron 100 MeV; all processes
#
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 2.20 mm
/calor/cutE 6.05 mum
/run/initialize
Em1PhysicsList::SetCuts:CutLength : 1 (mm)
phot: Total cross sections from a parametrisation. Good description from 10 KeV to 50 MeV for all Z
Sandia crossSection below 50 KeV
PhysicsTables from 50 keV to 50 MeV in 100 bins.
compt: Total cross sections from a parametrisation. Good description from 10 KeV to (100/Z) GeV.
Scattered gamma energy according Klein-Nishina.
PhysicsTables from 10 keV to 1e+02 GeV in 100 bins.
conv: Total cross sections from a parametrisation. Good description from 1.5 MeV to 100 GeV for all Z.
e+e- energies according Bethe-Heitler
PhysicsTables from 1 MeV to 1e+02 GeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
eIoni: delta cross sections from Moller+Bhabha. Good description from 1 KeV to 100 GeV.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
eBrem: Total cross sections from a NEW parametrisation based on the EEDL data library.
Good description from 1 KeV to 100 GeV.
log scale extrapolation above 100 GeV
Gamma energy sampled from a parametrised formula.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
annihil: Total cross section from Heilter formula (annihilation into 2 photons).
gamma energies sampled according Heitler
PhysicsTables from 10 keV to 10 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
hIoni: Knock-on electron cross sections .
MuIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
MuIoni: knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+03 PeV in 150 bins.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
MuBrems: theoretical cross section
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1e+03 PeV in 150 bins.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
MuPairProd: theoretical cross sections
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1e+03 PeV in 150 bins.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
============= The cut Energy ==============================
gamma e-
Cut in range 2.2 mm 6.05 mum
Cut in range
Air 2.2 mm 6.05 mum
H2liquid 2.2 mm 6.05 mum
Water 2.2 mm 6.05 mum
liquidArgon 2.2 mm 6.05 mum
Aluminium 2.2 mm 6.05 mum
Silicon 2.2 mm 6.05 mum
Iron 2.2 mm 6.05 mum
Lead 2.2 mm 6.05 mum
Uranium 2.2 mm 6.05 mum
Cut in energy
Air 990 eV 990 eV
H2liquid 990 eV 990 eV
@@ -199,8 +140,9 @@ Cut in energy
Uranium 143 keV 53.4 keV
===================================================
#
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 100 MeV
@@ -212,25 +154,31 @@ Cut in energy
Current couple of seeds = 9876, 54321
----------------------------------------
Start closing geometry.
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 0 kByte
Total CPU time elapsed for geometry optimisation: 0 seconds
Start Run processing.
---> Begin of Event: 0
Run terminated.
Run Summary
Number of events processed : 100
User=53s Real=58s Sys=5.3s
User=16s Real=19s Sys=2.6s
nb tracks/event neutral: 28.25 charged: 664.76
nb steps/event neutral: 148.67 charged: 2195.14
nb tracks/event neutral: 27.29 charged: 692.97
nb steps/event neutral: 145.49 charged: 1331.63
nb of process calls per event:
eIoni eBrem compt phot conv annihil
2168.25 25.46 120.42 26.82 1.43 1.43
1305.51 24.92 118.20 26.09 1.20 1.20
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 1296175024, 1662236208
Current couple of seeds = 640041358, 1353064269
----------------------------------------
Graphics systems deleted.
Visualization Manager deleting...
G4 kernel has come to Quit state.
Deletion of G4 kernel class start.
UserDetectorConstruction deleted.
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1DetectorConstruction.hh,v 1.2.4.1 2001/06/28 19:06:47 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1DetectorConstruction.hh,v 1.4 2001/10/26 12:51:23 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1DetectorConstruction_h
#define Em1DetectorConstruction_h 1
@@ -40,7 +40,7 @@ class G4Material;
class G4UniformMagField;
class Em1DetectorMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1DetectorConstruction : public G4VUserDetectorConstruction
{
@@ -86,7 +86,7 @@ class Em1DetectorConstruction : public G4VUserDetectorConstruction
G4VPhysicalVolume* ConstructVolumes();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1DetectorMessenger.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1DetectorMessenger.hh,v 1.4 2001/10/26 12:51:23 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1DetectorMessenger_h
#define Em1DetectorMessenger_h 1
@@ -41,7 +41,7 @@ class G4UIcmdWithAString;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithoutParameter;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1DetectorMessenger: public G4UImessenger
{
@@ -63,5 +63,7 @@ class Em1DetectorMessenger: public G4UImessenger
G4UIcmdWithoutParameter* UpdateCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1EventAction.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1EventAction.hh,v 1.5 2001/11/29 11:28:07 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1EventAction_h
#define Em1EventAction_h 1
@@ -35,15 +35,14 @@
#include "G4UserEventAction.hh"
#include "globals.hh"
class Em1RunAction;
class Em1EventActionMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1EventAction : public G4UserEventAction
{
public:
Em1EventAction(Em1RunAction*);
Em1EventAction();
~Em1EventAction();
public:
@@ -57,13 +56,14 @@ class Em1EventAction : public G4UserEventAction
private:
Em1RunAction* Em1Run;
G4double TotalEnergyDeposit;
G4String drawFlag;
G4int printModulo;
Em1EventActionMessenger* eventMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1EventActionMessenger.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1EventActionMessenger.hh,v 1.4 2001/10/26 12:51:23 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1EventActionMessenger_h
#define Em1EventActionMessenger_h 1
@@ -39,7 +39,7 @@ class Em1EventAction;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1EventActionMessenger: public G4UImessenger
{
@@ -55,4 +55,6 @@ class Em1EventActionMessenger: public G4UImessenger
G4UIcmdWithAnInteger* PrintCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1PhysicsList.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1PhysicsList.hh,v 1.4 2001/10/26 12:51:23 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1PhysicsList_h
#define Em1PhysicsList_h 1
@@ -38,7 +38,7 @@
class Em1DetectorConstruction;
class Em1PhysicsListMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1PhysicsList: public G4VUserPhysicsList
{
@@ -78,5 +78,7 @@ class Em1PhysicsList: public G4VUserPhysicsList
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1PhysicsListMessenger.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1PhysicsListMessenger.hh,v 1.4 2001/10/26 12:51:23 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1PhysicsListMessenger_h
#define Em1PhysicsListMessenger_h 1
@@ -38,7 +38,7 @@
class Em1PhysicsList;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1PhysicsListMessenger: public G4UImessenger
{
@@ -57,4 +57,6 @@ class Em1PhysicsListMessenger: public G4UImessenger
G4UIcmdWithADoubleAndUnit* eCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1PrimaryGeneratorAction.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1PrimaryGeneratorAction.hh,v 1.4 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1PrimaryGeneratorAction_h
#define Em1PrimaryGeneratorAction_h 1
@@ -38,8 +38,7 @@
class G4ParticleGun;
class G4Event;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
@@ -54,6 +53,8 @@ class Em1PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
G4ParticleGun* particleGun; //pointer a to G4 service class
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1RunAction.hh,v 1.5.2.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1RunAction.hh,v 1.8 2001/11/29 11:28:07 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1RunAction_h
#define Em1RunAction_h 1
@@ -36,10 +36,9 @@
#include "ProcessesCount.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4Run;
class Em1RunActionMessenger;
#ifndef G4NOHIST
class HepTupleManager;
@@ -61,11 +60,7 @@ class Em1RunAction : public G4UserRunAction
void CountSteps0(G4int ns) { NbOfSteps0 += ns;}
void CountSteps1(G4int ns) { NbOfSteps1 += ns;}
void CountProcesses(G4String);
public:
void SetRndmFreq(G4int val) {saveRndm = val;}
G4int GetRndmFreq() {return saveRndm;}
#ifndef G4NOHIST
HepHistogram* GetHisto(G4int id) {return histo[id];}
#endif
@@ -77,16 +72,15 @@ class Em1RunAction : public G4UserRunAction
private:
G4int NbOfTraks0, NbOfTraks1;
G4int NbOfSteps0, NbOfSteps1;
ProcessesCount* ProcCounter;
ProcessesCount* ProcCounter;
Em1RunActionMessenger* runMessenger;
G4int saveRndm;
#ifndef G4NOHIST
HepTupleManager* hbookManager;
HepHistogram* histo[3];
#endif
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1SteppingAction.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1SteppingAction.hh,v 1.4 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1SteppingAction_h
#define Em1SteppingAction_h 1
@@ -37,7 +37,7 @@
class Em1RunAction;
class Em1EventAction;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1SteppingAction : public G4UserSteppingAction
{
@@ -52,4 +52,6 @@ class Em1SteppingAction : public G4UserSteppingAction
Em1EventAction* eventAction;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,22 +21,22 @@
// ********************************************************************
//
//
// $Id: Em1SteppingVerbose.hh,v 1.5.2.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1SteppingVerbose.hh,v 1.7 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// This class manages the verbose outputs in G4SteppingManager.
// It inherits from G4SteppingVerbose.
// It shows how to extract informations during the tracking of a particle.
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1SteppingVerbose_h
#define Em1SteppingVerbose_h 1
#include "G4SteppingVerbose.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1SteppingVerbose : public G4SteppingVerbose {
@@ -50,4 +50,6 @@ public:
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,11 +21,12 @@
// ********************************************************************
//
//
// $Id: Em1TrackingAction.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1TrackingAction.hh,v 1.4 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1TrackingAction_h
#define Em1TrackingAction_h 1
@@ -33,7 +34,7 @@
class Em1RunAction;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1TrackingAction : public G4UserTrackingAction {
@@ -47,4 +48,6 @@ class Em1TrackingAction : public G4UserTrackingAction {
Em1RunAction* runAction;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1VisManager.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1VisManager.hh,v 1.4 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Example Visualization Manager implementing virtual function
// RegisterGraphicsSystems. Exploits C-pre-processor variables
@@ -42,14 +42,14 @@
// G4VisManager* myVisManager = new MyVisManager;
// myVisManager -> RegisterGraphicsSystem (new MyGraphicsSystem);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1VisManager_h
#define Em1VisManager_h 1
#include "G4VisManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1VisManager: public G4VisManager {
@@ -63,4 +63,6 @@ private:
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,16 +21,16 @@
// ********************************************************************
//
//
// $Id: ProcessesCount.hh,v 1.5.2.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: ProcessesCount.hh,v 1.7 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// 08.03.01 Hisaya: adapted for STL
// 26.10.98 mma : first version
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef ProcessesCount_HH
#define ProcessesCount_HH
@@ -38,7 +38,7 @@
#include "globals.hh"
#include "g4std/vector"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class OneProcessCount
{
@@ -56,8 +56,7 @@ private:
G4int Counter; // process counter
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
typedef G4std::vector<OneProcessCount*> ProcessesCount;
@@ -1,36 +0,0 @@
#
# Macro file for the initialization phase of "TestEm1.cc"
#
# Sets some default verbose
# and initializes the graphic.
#
/control/verbose 2
/run/verbose 2
#
####/run/initialize
#
####/process/eLoss/StepFunction 0.183 170 micrometer
####/calor/cutG 2.2 mm
####/calor/cutE 1.4 micrometer #before beta03-00 (17.11.98)
####/calor/cutE 6.05 micrometer #from beta03-00 (17.11.98)
####/run/initialize
####/run/particle/dumpCutValues
#
# Create empty scene ("world" is default)
/vis/scene/create
#
# Create a scene handler for a specific graphics system
# Edit the next line(s) to choose another graphic system
#
#/vis/open DAWNFILE
/vis/open OGLIX
#
# Draw scene
/vis/camera/zoom 1.4
/vis/drawVolume
#
# for drawing the tracks
# if too many tracks cause core dump => storeTrajectory 0
/tracking/storeTrajectory 1
/event/drawTracks all
@@ -1,4 +1,4 @@
# $Id: run00.mac,v 1.1 1999/10/11 13:07:25 maire Exp $
# $Id: run00.mac,v 1.2 2001/10/26 12:51:21 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -10,7 +10,6 @@
/run/initialize
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle geantino
/gun/energy 1 GeV
@@ -1,4 +1,4 @@
# $Id: run01.mac,v 1.1 1999/10/11 13:07:26 maire Exp $
# $Id: run01.mac,v 1.3 2001/10/31 15:36:43 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,22 +7,20 @@
#
/control/verbose 2
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 95 cm
/calor/cutE 95 cm
#
/run/initialize
/run/particle/dumpCutValues
#
/process/inactivate phot
/process/inactivate compt
/process/inactivate conv
/process/inactivate msc
#
/process/eLoss/StepFunction 0.183 170 micrometer
/process/eLoss/fluct 0
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 1 GeV
@@ -1,4 +1,4 @@
# $Id: run02.mac,v 1.1 1999/10/11 13:07:26 maire Exp $
# $Id: run02.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,22 +7,20 @@
#
/control/verbose 2
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 95 cm
/calor/cutE 95 cm
#
/run/initialize
/run/particle/dumpCutValues
#
/process/inactivate phot
/process/inactivate compt
/process/inactivate conv
/process/inactivate msc
#
/process/eLoss/StepFunction 0.183 170 micrometer
/process/eLoss/fluct 1
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 1 GeV
@@ -1,4 +1,4 @@
# $Id: run03.mac,v 1.1 1999/10/11 13:07:26 maire Exp $
# $Id: run03.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,21 +7,19 @@
#
/control/verbose 2
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 95 cm
/calor/cutE 95 cm
#
/run/initialize
/run/particle/dumpCutValues
#
/process/inactivate phot
/process/inactivate compt
/process/inactivate conv
#
/process/eLoss/StepFunction 0.183 170 micrometer
/process/eLoss/fluct 0
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 10 MeV
@@ -1,4 +1,4 @@
# $Id: run04.mac,v 1.2 2000/12/06 13:21:49 maire Exp $
# $Id: run04.mac,v 1.4 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,12 +7,9 @@
#
/control/verbose 2
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 95 cm
#/calor/cutE 6.05 micrometer
/calor/cutE 100. micrometer
#
/run/initialize
#
/process/inactivate phot
@@ -20,8 +17,9 @@
/process/inactivate conv
/process/inactivate msc
#
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 100 MeV
@@ -1,4 +1,4 @@
# $Id: run05.mac,v 1.1 1999/10/11 13:07:27 maire Exp $
# $Id: run05.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,21 +7,19 @@
#
/control/verbose 2
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 2.2 mm
/calor/cutE 95 cm
#
/run/initialize
/run/particle/dumpCutValues
#
/process/inactivate phot
/process/inactivate compt
/process/inactivate conv
/process/inactivate msc
#
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 1 GeV
@@ -1,4 +1,4 @@
# $Id: run06.mac,v 1.1 1999/10/11 13:07:27 maire Exp $
# $Id: run06.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,19 +7,17 @@
#
/control/verbose 2
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 95 cm
/calor/cutE 95 cm
#
/run/initialize
/run/particle/dumpCutValues
#
/process/inactivate conv
/process/inactivate msc
#
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle gamma
/gun/energy 10 MeV
@@ -1,4 +1,4 @@
# $Id: run07.mac,v 1.1 1999/10/11 13:07:27 maire Exp $
# $Id: run07.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,20 +7,18 @@
#
/control/verbose 2
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 95 cm
/calor/cutE 30 mm
#
/run/initialize
/run/particle/dumpCutValues
#
/process/inactivate phot
/process/inactivate compt
/process/inactivate msc
#
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle gamma
/gun/energy 100 MeV
@@ -1,4 +1,4 @@
# $Id: run08.mac,v 1.1 1999/10/11 13:07:28 maire Exp $
# $Id: run08.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,17 +7,14 @@
#
/control/verbose 2
#
/run/initialize
/calor/cutG 2.2 mm
/calor/cutE 6.05 micrometer
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 2.2 mm
####/calor/cutE 1.4 micrometer #before beta03-00 (17.11.98)
/calor/cutE 6.05 micrometer #from beta03-00 (17.11.98)
/run/initialize
/run/particle/dumpCutValues
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 100 MeV
@@ -1,4 +1,4 @@
# $Id: run09.mac,v 1.1 1999/10/11 13:07:28 maire Exp $
# $Id: run09.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,17 +7,14 @@
#
/control/verbose 2
#
/calor/cutG 2.2 mm
/calor/cutE 6.05 micrometer
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 2.2 mm
####/calor/cutE 1.4 micrometer #before beta03-00 (17.11.98)
/calor/cutE 6.05 micrometer #from beta03-00 (17.11.98)
/run/initialize
/run/particle/dumpCutValues
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 1 GeV
@@ -1,4 +1,4 @@
# $Id: run11.mac,v 1.1 1999/10/11 13:07:29 maire Exp $
# $Id: run11.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -9,10 +9,10 @@
#
/calor/cutG 95 cm
/calor/cutE 17 cm
#
/run/initialize
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 1 GeV
@@ -22,13 +22,13 @@
//
//
// $Id: Em1DetectorConstruction.cc,v 1.4.4.1 2001/06/28 19:06:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1DetectorConstruction.cc,v 1.7 2001/11/29 11:28:07 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1DetectorConstruction.hh"
#include "Em1DetectorMessenger.hh"
@@ -49,23 +49,23 @@
#include "G4UnitsTable.hh"
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1DetectorConstruction::Em1DetectorConstruction()
:pBox (NULL), lBox (NULL),
aMaterial(NULL),
magField (NULL)
:pBox (0), lBox (0),
aMaterial(0),
magField (0)
{
// create commands for interactive definition of the detector
detectorMessenger = new Em1DetectorMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1DetectorConstruction::~Em1DetectorConstruction()
{ delete detectorMessenger;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VPhysicalVolume* Em1DetectorConstruction::Construct()
{
@@ -74,7 +74,7 @@ G4VPhysicalVolume* Em1DetectorConstruction::Construct()
return ConstructVolumes();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::DefineMaterials()
{
@@ -148,7 +148,7 @@ G4cout << *(G4Material::GetMaterialTable()) << G4endl;
aMaterial = Al;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VPhysicalVolume* Em1DetectorConstruction::ConstructVolumes()
{
@@ -164,7 +164,7 @@ G4VPhysicalVolume* Em1DetectorConstruction::ConstructVolumes()
G4ThreeVector(), //at (0,0,0)
"Container", //its name
lBox, //its logical volume
NULL, //its mother volume
0, //its mother volume
false, //no boolean operation
0); //copy number
@@ -184,7 +184,7 @@ G4VPhysicalVolume* Em1DetectorConstruction::ConstructVolumes()
return pBox;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::PrintParameters()
{
@@ -192,7 +192,7 @@ void Em1DetectorConstruction::PrintParameters()
<< " of " << aMaterial->GetName() << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::SetMaterial(G4String materialChoice)
{
@@ -204,14 +204,14 @@ void Em1DetectorConstruction::SetMaterial(G4String materialChoice)
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::SetSize(G4double value)
{
BoxSize = value;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::SetMagField(G4double fieldValue)
{
@@ -229,16 +229,16 @@ void Em1DetectorConstruction::SetMagField(G4double fieldValue)
}
else
{
magField = NULL;
magField = 0;
fieldMgr->SetDetectorField(magField);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::UpdateGeometry()
{
G4RunManager::GetRunManager()->DefineWorldVolume(ConstructVolumes());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1DetectorMessenger.cc,v 1.2.4.1 2001/06/28 19:06:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1DetectorMessenger.cc,v 1.4 2001/10/26 12:51:25 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1DetectorMessenger.hh"
@@ -37,7 +37,7 @@
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithoutParameter.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1DetectorMessenger::Em1DetectorMessenger(Em1DetectorConstruction * Em1Det)
:Em1Detector(Em1Det)
@@ -48,21 +48,21 @@ Em1DetectorMessenger::Em1DetectorMessenger(Em1DetectorConstruction * Em1Det)
MaterCmd = new G4UIcmdWithAString("/calor/setMat",this);
MaterCmd->SetGuidance("Select material of the box.");
MaterCmd->SetParameterName("choice",false);
MaterCmd->AvailableForStates(Idle);
MaterCmd->AvailableForStates(PreInit,Idle);
SizeCmd = new G4UIcmdWithADoubleAndUnit("/calor/setSize",this);
SizeCmd->SetGuidance("Set size of the box");
SizeCmd->SetParameterName("Size",false);
SizeCmd->SetRange("Size>0.");
SizeCmd->SetUnitCategory("Length");
SizeCmd->AvailableForStates(Idle);
SizeCmd->AvailableForStates(PreInit,Idle);
MagFieldCmd = new G4UIcmdWithADoubleAndUnit("/calor/setField",this);
MagFieldCmd->SetGuidance("Define magnetic field.");
MagFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
MagFieldCmd->SetParameterName("Bz",false);
MagFieldCmd->SetUnitCategory("Magnetic flux density");
MagFieldCmd->AvailableForStates(Idle);
MagFieldCmd->AvailableForStates(PreInit,Idle);
UpdateCmd = new G4UIcmdWithoutParameter("/calor/update",this);
UpdateCmd->SetGuidance("Update calorimeter geometry.");
@@ -71,7 +71,7 @@ Em1DetectorMessenger::Em1DetectorMessenger(Em1DetectorConstruction * Em1Det)
UpdateCmd->AvailableForStates(Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1DetectorMessenger::~Em1DetectorMessenger()
{
@@ -82,7 +82,7 @@ Em1DetectorMessenger::~Em1DetectorMessenger()
delete Em1detDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
@@ -99,4 +99,4 @@ void Em1DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{ Em1Detector->UpdateGeometry(); }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,17 +21,16 @@
// ********************************************************************
//
//
// $Id: Em1EventAction.cc,v 1.3.2.1 2001/06/28 19:06:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1EventAction.cc,v 1.6 2001/11/29 11:28:07 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1EventAction.hh"
#include "Em1RunAction.hh"
#include "Em1EventActionMessenger.hh"
#include "G4Event.hh"
@@ -41,24 +40,23 @@
#include "G4VVisManager.hh"
#include "G4ios.hh"
#include "G4UnitsTable.hh"
#include "Randomize.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1EventAction::Em1EventAction(Em1RunAction* run)
:Em1Run(run),drawFlag("all"),printModulo(10000),eventMessenger(NULL)
Em1EventAction::Em1EventAction()
:drawFlag("none"),printModulo(10000),eventMessenger(0)
{
eventMessenger = new Em1EventActionMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1EventAction::~Em1EventAction()
{
delete eventMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1EventAction::BeginOfEventAction(const G4Event* evt)
{
@@ -67,19 +65,12 @@ void Em1EventAction::BeginOfEventAction(const G4Event* evt)
//printing survey
if (evtNb%printModulo == 0)
G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
//save rndm status
if (Em1Run->GetRndmFreq() == 2)
{
HepRandom::saveEngineStatus("beginOfEvent.rndm");
if (evtNb%printModulo == 0) HepRandom::showEngineStatus();
}
//additional initializations
TotalEnergyDeposit = 0.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1EventAction::EndOfEventAction(const G4Event* evt)
{
@@ -94,7 +85,8 @@ void Em1EventAction::EndOfEventAction(const G4Event* evt)
G4int n_trajectories = 0;
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
for(G4int i=0; i<n_trajectories; i++)
{ G4Trajectory* trj = (G4Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);
{ G4Trajectory* trj = (G4Trajectory*)
((*(evt->GetTrajectoryContainer()))[i]);
if (drawFlag == "all") trj->DrawTrajectory(50);
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
trj->DrawTrajectory(50);
@@ -102,6 +94,6 @@ void Em1EventAction::EndOfEventAction(const G4Event* evt)
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1EventActionMessenger.cc,v 1.2.4.1 2001/06/28 19:06:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1EventActionMessenger.cc,v 1.4 2001/10/26 12:51:25 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1EventActionMessenger.hh"
@@ -36,7 +36,7 @@
#include "G4UIcmdWithAnInteger.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1EventActionMessenger::Em1EventActionMessenger(Em1EventAction* EvAct)
:eventAction(EvAct)
@@ -56,7 +56,7 @@ Em1EventActionMessenger::Em1EventActionMessenger(Em1EventAction* EvAct)
PrintCmd->AvailableForStates(Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1EventActionMessenger::~Em1EventActionMessenger()
{
@@ -64,9 +64,10 @@ Em1EventActionMessenger::~Em1EventActionMessenger()
delete PrintCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1EventActionMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
void Em1EventActionMessenger::SetNewValue(G4UIcommand* command,
G4String newValue)
{
if(command == DrawCmd)
{eventAction->SetDrawFlag(newValue);}
@@ -76,4 +77,4 @@ void Em1EventActionMessenger::SetNewValue(G4UIcommand * command,G4String newValu
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1PhysicsList.cc,v 1.3.4.1 2001/06/28 19:06:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1PhysicsList.cc,v 1.5 2001/10/26 12:51:25 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1PhysicsList.hh"
@@ -47,7 +47,7 @@
#include "G4UImanager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1PhysicsList::Em1PhysicsList(Em1DetectorConstruction* p)
: G4VUserPhysicsList()
@@ -63,12 +63,12 @@ Em1PhysicsList::Em1PhysicsList(Em1DetectorConstruction* p)
pMes = new Em1PhysicsListMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1PhysicsList::~Em1PhysicsList()
{ delete pMes; }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::ConstructParticle()
{
@@ -83,7 +83,7 @@ void Em1PhysicsList::ConstructParticle()
ConstructBarions();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::ConstructBosons()
{
@@ -97,7 +97,8 @@ void Em1PhysicsList::ConstructBosons()
// optical photon
G4OpticalPhoton::OpticalPhotonDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::ConstructLeptons()
{
@@ -112,7 +113,7 @@ void Em1PhysicsList::ConstructLeptons()
G4NeutrinoMu::NeutrinoMuDefinition();
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::ConstructMesons()
{
@@ -130,7 +131,7 @@ void Em1PhysicsList::ConstructMesons()
G4KaonZeroShort::KaonZeroShortDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::ConstructBarions()
{
@@ -142,7 +143,7 @@ void Em1PhysicsList::ConstructBarions()
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::ConstructProcess()
{
@@ -151,7 +152,7 @@ void Em1PhysicsList::ConstructProcess()
ConstructGeneral();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
@@ -169,7 +170,7 @@ void Em1PhysicsList::ConstructProcess()
#include "G4hIonisation.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::ConstructEM()
{
@@ -216,7 +217,7 @@ void Em1PhysicsList::ConstructEM()
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4Decay.hh"
@@ -236,7 +237,7 @@ void Em1PhysicsList::ConstructGeneral()
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::SetCuts()
{
@@ -261,7 +262,7 @@ void Em1PhysicsList::SetCuts()
if (verboseLevel>0) DumpCutValuesTable();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::SetGammaCut(G4double val)
{
@@ -269,7 +270,7 @@ void Em1PhysicsList::SetGammaCut(G4double val)
cutForGamma = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::SetElectronCut(G4double val)
{
@@ -277,7 +278,7 @@ void Em1PhysicsList::SetElectronCut(G4double val)
cutForElectron = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::SetProtonCut(G4double val)
{
@@ -285,7 +286,7 @@ void Em1PhysicsList::SetProtonCut(G4double val)
cutForProton = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::SetCutsByEnergy(G4double val)
{
@@ -318,7 +319,7 @@ void Em1PhysicsList::SetCutsByEnergy(G4double val)
SetCutValueForOthers(cut);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::GetRange(G4double val)
{
@@ -335,6 +336,6 @@ void Em1PhysicsList::GetRange(G4double val)
G4cout << "range : " << cut / mm << " (mm)" << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1PhysicsListMessenger.cc,v 1.2.4.1 2001/06/28 19:06:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1PhysicsListMessenger.cc,v 1.5 2001/10/31 15:36:45 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1PhysicsListMessenger.hh"
@@ -35,7 +35,7 @@
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1PhysicsListMessenger::Em1PhysicsListMessenger(Em1PhysicsList* EvAct)
:physList(EvAct)
@@ -45,21 +45,21 @@ Em1PhysicsListMessenger::Em1PhysicsListMessenger(Em1PhysicsList* EvAct)
cutGCmd->SetParameterName("range",false);
cutGCmd->SetRange("range>0.");
cutGCmd->SetUnitCategory("Length");
cutGCmd->AvailableForStates(Idle);
cutGCmd->AvailableForStates(PreInit,Idle);
cutECmd = new G4UIcmdWithADoubleAndUnit("/calor/cutE",this);
cutECmd->SetGuidance("Set cut values by RANGE for e- e+.");
cutECmd->SetParameterName("range",false);
cutECmd->SetRange("range>0.");
cutECmd->SetUnitCategory("Length");
cutECmd->AvailableForStates(Idle);
cutECmd->AvailableForStates(PreInit,Idle);
cutPCmd = new G4UIcmdWithADoubleAndUnit("/calor/cutP",this);
cutPCmd->SetGuidance("Set cut values by RANGE for proton and others.");
cutPCmd->SetParameterName("range",false);
cutPCmd->SetRange("range>0.");
cutPCmd->SetUnitCategory("Length");
cutPCmd->AvailableForStates(Idle);
cutPCmd->AvailableForStates(PreInit,Idle);
eCmd = new G4UIcmdWithADoubleAndUnit("/calor/cutEnergy",this);
eCmd->SetGuidance("Set cut values by ENERGY for charged particles.");
@@ -76,7 +76,7 @@ Em1PhysicsListMessenger::Em1PhysicsListMessenger(Em1PhysicsList* EvAct)
rCmd->AvailableForStates(Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1PhysicsListMessenger::~Em1PhysicsListMessenger()
{
@@ -87,9 +87,10 @@ Em1PhysicsListMessenger::~Em1PhysicsListMessenger()
delete eCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsListMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
void Em1PhysicsListMessenger::SetNewValue(G4UIcommand* command,
G4String newValue)
{
if(command == cutGCmd)
{physList->SetGammaCut(cutGCmd->GetNewDoubleValue(newValue));}
@@ -104,4 +105,4 @@ void Em1PhysicsListMessenger::SetNewValue(G4UIcommand * command,G4String newValu
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1PrimaryGeneratorAction.cc,v 1.2.4.1 2001/06/28 19:06:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1PrimaryGeneratorAction.cc,v 1.4 2001/10/26 12:51:25 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1PrimaryGeneratorAction.hh"
@@ -36,7 +36,7 @@
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1PrimaryGeneratorAction::Em1PrimaryGeneratorAction()
{
@@ -53,19 +53,19 @@ Em1PrimaryGeneratorAction::Em1PrimaryGeneratorAction()
particleGun->SetParticlePosition(G4ThreeVector(0.*cm,0.*cm,0.*cm));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1PrimaryGeneratorAction::~Em1PrimaryGeneratorAction()
{
delete particleGun;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
particleGun->GeneratePrimaryVertex(anEvent);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,20 +21,20 @@
// ********************************************************************
//
//
// $Id: Em1RunAction.cc,v 1.10.2.1 2001/06/28 19:06:50 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1RunAction.cc,v 1.13 2001/11/29 11:28:07 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// 08.03.01 Hisaya: adapted for STL
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1RunAction.hh"
#include "Em1RunActionMessenger.hh"
#include "G4Run.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4VVisManager.hh"
#include "G4ios.hh"
@@ -46,26 +46,24 @@
#include "CLHEP/Hist/HBookFile.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1RunAction::Em1RunAction()
: ProcCounter(0), saveRndm (1),
runMessenger(new Em1RunActionMessenger(this))
: ProcCounter(0)
{
#ifndef G4NOHIST
hbookManager = NULL;
hbookManager = 0;
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1RunAction::~Em1RunAction()
{
cleanHisto();
delete runMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1RunAction::bookHisto()
{
@@ -73,13 +71,16 @@ void Em1RunAction::bookHisto()
hbookManager = new HBookFile("testem1.paw", 68);
// booking histograms
histo[0] = hbookManager->histogram("track length (mm) of a charged particle",100,0.,50*cm);
histo[1] = hbookManager->histogram("Nb of steps per track (charged particle)",100,0.,100.);
histo[2] = hbookManager->histogram("step length (mm) charged particle",100,0.,10*mm);
histo[0] = hbookManager->histogram
("track length (mm) of a charged particle",100,0.,50*cm);
histo[1] = hbookManager->histogram
("Nb of steps per track (charged particle)",100,0.,100.);
histo[2] = hbookManager->histogram
("step length (mm) charged particle",100,0.,10*mm);
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1RunAction::cleanHisto()
{
@@ -91,18 +92,16 @@ void Em1RunAction::cleanHisto()
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1RunAction::BeginOfRunAction(const G4Run* aRun)
{
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
// save Rndm status
if (saveRndm > 0)
{ HepRandom::showEngineStatus();
HepRandom::saveEngineStatus("beginOfRun.rndm");
}
G4RunManager::GetRunManager()->SetRandomNumberStore(true);
HepRandom::showEngineStatus();
NbOfTraks0 = 0; NbOfTraks1 = 0; NbOfSteps0 = 0; NbOfSteps1 = 0;
ProcCounter = new ProcessesCount;
@@ -111,13 +110,10 @@ void Em1RunAction::BeginOfRunAction(const G4Run* aRun)
if (aRun->GetRunID() == 0) bookHisto();
if (G4VVisManager::GetConcreteInstance())
{
G4UImanager* UI = G4UImanager::GetUIpointer();
UI->ApplyCommand("/vis/scene/notifyHandlers");
}
G4UImanager::GetUIpointer()->ApplyCommand("/vis/scene/notifyHandlers");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1RunAction::CountProcesses(G4String procName)
{
@@ -130,7 +126,7 @@ void Em1RunAction::CountProcesses(G4String procName)
(*ProcCounter)[i]->Count();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1RunAction::EndOfRunAction(const G4Run* aRun)
{
@@ -143,21 +139,22 @@ void Em1RunAction::EndOfRunAction(const G4Run* aRun)
G4int oldprec = G4cout.precision(2);
G4cout << "\n nb tracks/event"
<< " neutral: " << G4std::setw(7) << NbOfTraks0/dNbOfEvents
<< " charged: " << G4std::setw(7) << NbOfTraks1/dNbOfEvents
<< " neutral: " << G4std::setw(7) << NbOfTraks0/dNbOfEvents
<< " charged: " << G4std::setw(7) << NbOfTraks1/dNbOfEvents
<< "\n nb steps/event"
<< " neutral: " << G4std::setw(7) << NbOfSteps0/dNbOfEvents
<< " charged: " << G4std::setw(7) << NbOfSteps1/dNbOfEvents
<< " neutral: " << G4std::setw(7) << NbOfSteps0/dNbOfEvents
<< " charged: " << G4std::setw(7) << NbOfSteps1/dNbOfEvents
<< G4endl;
//frequency of processes call
G4cout << "\n nb of process calls per event: \n ";
for (G4int i=0; i< ProcCounter->size();i++)
for (size_t i=0; i< ProcCounter->size();i++)
G4cout << G4std::setw(9) << (*ProcCounter)[i]->GetName();
G4cout << "\n ";
for (G4int j=0; j< ProcCounter->size();j++)
G4cout << G4std::setw(9) << ((*ProcCounter)[j]->GetCounter())/dNbOfEvents;
for (size_t j=0; j< ProcCounter->size();j++)
G4cout << G4std::setw(9) << ((*ProcCounter)[j]->GetCounter())
/dNbOfEvents;
G4cout << G4endl;
G4cout.setf(oldform,G4std::ios::floatfield);
@@ -176,11 +173,8 @@ void Em1RunAction::EndOfRunAction(const G4Run* aRun)
if (G4VVisManager::GetConcreteInstance())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
// save Rndm status
if (saveRndm > 0)
{ HepRandom::showEngineStatus();
HepRandom::saveEngineStatus("endOfRun.rndm");
}
// show Rndm status
HepRandom::showEngineStatus();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1SteppingAction.cc,v 1.5.2.1 2001/06/28 19:06:50 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1SteppingAction.cc,v 1.7 2001/10/26 12:51:26 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1SteppingAction.hh"
#include "Em1RunAction.hh"
@@ -39,18 +39,18 @@
#include "CLHEP/Hist/HBookFile.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1SteppingAction::Em1SteppingAction(Em1RunAction* RuAct, Em1EventAction* EvAct)
:runAction(RuAct),eventAction(EvAct)
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1SteppingAction::~Em1SteppingAction()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1SteppingAction::UserSteppingAction(const G4Step* aStep)
{
@@ -68,6 +68,6 @@ void Em1SteppingAction::UserSteppingAction(const G4Step* aStep)
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,28 +21,28 @@
// ********************************************************************
//
//
// $Id: Em1SteppingVerbose.cc,v 1.6.2.1 2001/06/28 19:06:50 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1SteppingVerbose.cc,v 1.8 2001/10/26 12:51:26 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1SteppingVerbose.hh"
#include "G4SteppingManager.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1SteppingVerbose::Em1SteppingVerbose()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1SteppingVerbose::~Em1SteppingVerbose()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1SteppingVerbose::StepInfo()
{
@@ -66,14 +66,14 @@ void Em1SteppingVerbose::StepInfo()
<< G4std::setw(10) << "Process" << G4endl;
}
G4cout << G4std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
G4cout << G4std::setw(5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
// if( fStepStatus != fWorldBoundary){
if( fTrack->GetNextVolume() != 0 ) {
@@ -84,8 +84,8 @@ void Em1SteppingVerbose::StepInfo()
if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != NULL){
G4cout << " "
<< G4std::setw(10) << fStep->GetPostStepPoint()->GetProcessDefinedStep()
->GetProcessName();
<< G4std::setw(10) << fStep->GetPostStepPoint()
->GetProcessDefinedStep()->GetProcessName();
} else {
G4cout << " UserLimit";
}
@@ -107,7 +107,7 @@ void Em1SteppingVerbose::StepInfo()
<< " ---------------"
<< G4endl;
for(G4int lp1=(*fSecondary).size()-tN2ndariesTot;
for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
lp1<(*fSecondary).size(); lp1++){
G4cout << " : "
<< G4std::setw(6)
@@ -134,7 +134,7 @@ void Em1SteppingVerbose::StepInfo()
G4cout.precision(prec);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1SteppingVerbose::TrackingStarted()
{
@@ -154,14 +154,14 @@ G4int prec = G4cout.precision(3);
<< G4std::setw(10) << "Volume" << " "
<< G4std::setw(10) << "Process" << G4endl;
G4cout << G4std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
G4cout << G4std::setw(5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
if(fTrack->GetNextVolume()){
G4cout << G4std::setw(10) << fTrack->GetVolume()->GetName();
@@ -173,4 +173,4 @@ G4int prec = G4cout.precision(3);
G4cout.precision(prec);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,13 +22,13 @@
//
//
// $Id: Em1TrackingAction.cc,v 1.5.2.1 2001/06/28 19:06:50 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1TrackingAction.cc,v 1.7 2001/10/26 12:51:26 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1TrackingAction.hh"
#include "Em1RunAction.hh"
@@ -39,13 +39,13 @@
#include "CLHEP/Hist/HBookFile.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1TrackingAction::Em1TrackingAction(Em1RunAction* RunAct)
:runAction(RunAct)
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
{
@@ -65,4 +65,5 @@ void Em1TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,14 +21,14 @@
// ********************************************************************
//
//
// $Id: Em1VisManager.cc,v 1.2.4.1 2001/06/28 19:06:50 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1VisManager.cc,v 1.6 2001/11/15 13:09:44 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 24th January 1998.
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifdef G4VIS_USE
@@ -36,14 +36,21 @@
// Supported drivers...
// Not needing external packages or libraries...
#include "G4ASCIITree.hh"
#include "G4DAWNFILE.hh"
#include "G4GAGTree.hh"
#include "G4HepRepFile.hh"
#include "G4RayTracer.hh"
#include "G4VRML1File.hh"
#include "G4VRML2File.hh"
// Needing external packages or libraries...
#ifdef G4VIS_USE_DAWN
#include "G4FukuiRenderer.hh"
#endif
#ifdef G4VIS_USE_DAWNFILE
#include "G4DAWNFILE.hh"
#endif
#ifdef G4VIS_USE_OPACS
#include "G4Wo.hh"
#include "G4Xo.hh"
@@ -72,36 +79,34 @@
#include "G4OpenInventorWin32.hh"
#endif
#ifdef G4VIS_USE_RAYX
#include "G4RayX.hh"
#endif
#ifdef G4VIS_USE_VRML
#include "G4VRML1.hh"
// #include "G4VRML2.hh"
#include "G4VRML2.hh"
#endif
#ifdef G4VIS_USE_VRMLFILE
#include "G4VRML1File.hh"
//#include "G4VRML2File.hh"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1VisManager::Em1VisManager () {}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1VisManager::RegisterGraphicsSystems () {
// Graphics Systems not needing external packages or libraries...
RegisterGraphicsSystem (new G4ASCIITree);
RegisterGraphicsSystem (new G4DAWNFILE);
RegisterGraphicsSystem (new G4GAGTree);
RegisterGraphicsSystem (new G4HepRepFile);
RegisterGraphicsSystem (new G4RayTracer);
RegisterGraphicsSystem (new G4VRML1File);
RegisterGraphicsSystem (new G4VRML2File);
// Graphics systems needing external packages or libraries...
#ifdef G4VIS_USE_DAWN
RegisterGraphicsSystem (new G4FukuiRenderer);
#endif
#ifdef G4VIS_USE_DAWNFILE
RegisterGraphicsSystem (new G4DAWNFILE);
#endif
#ifdef G4VIS_USE_OPACS
RegisterGraphicsSystem (new G4Wo);
RegisterGraphicsSystem (new G4Xo);
@@ -130,18 +135,9 @@ void Em1VisManager::RegisterGraphicsSystems () {
RegisterGraphicsSystem (new G4OpenInventorWin32);
#endif
#ifdef G4VIS_USE_RAYX
RegisterGraphicsSystem (new G4RayX);
#endif
#ifdef G4VIS_USE_VRML
RegisterGraphicsSystem (new G4VRML1);
// RegisterGraphicsSystem (new G4VRML2);
#endif
#ifdef G4VIS_USE_VRMLFILE
RegisterGraphicsSystem (new G4VRML1File);
// RegisterGraphicsSystem (new G4VRML2File);
RegisterGraphicsSystem (new G4VRML2);
#endif
if (fVerbose > 0) {
@@ -154,4 +150,4 @@ void Em1VisManager::RegisterGraphicsSystems () {
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,5 +1,5 @@
#
# Macro file for the initialization phase of "exampleN03.cc"
# Macro file for the initialization phase of "TestEm1.cc"
#
# Sets some default verbose
# and initializes the graphic.
@@ -7,20 +7,26 @@
/control/verbose 2
/run/verbose 2
#
/run/initialize
#
# Create empty scene ("world" is default)
/vis/scene/create
#
# Create a scene handler for a specific graphics system
# Edit the next line(s) to choose another graphic system
#
#/vis/open DAWNFILE
/vis/open OGLIX
#
#/vis/open DAWNFILE
#
# Draw scene
/vis/camera/zoom 1.4
/vis/drawVolume
/vis/viewer/zoom 1.4
/vis/viewer/flush
#
# for drawing the tracks
# if too many tracks cause core dump => storeTrajectory 0
/tracking/storeTrajectory 1
/event/drawTracks all
/vis/scene/endOfEventAction accumulate
#
/event/drawTracks
@@ -0,0 +1,27 @@
# $Id: GNUmakefile,v 1.2 2001/11/27 16:58:37 gcosmo Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := TestEm10
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../../../..
endif
.PHONY: all
all: lib bin
include $(G4INSTALL)/config/architecture.gmk
G4NOHIST := true
ifdef G4NOHIST
CPPFLAGS += -DG4NOHIST
else
LDFLAGS += -L/cern/pro/lib
LOADLIBS += -lpacklib $(FCLIBS)
endif
include $(G4INSTALL)/config/binmake.gmk
@@ -0,0 +1,35 @@
$Id: History,v 1.4 2001/11/27 17:01:17 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
TestEm10 History file
---------------------
This file should be used by the G4 example coordinator to briefly
summarize all major modifications introduced in the code and keep
track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
27 Nov. 2001 Gabriele Cosmo (TestEm10-V03-02-01)
- Corrected README.
- Set G4NOHIST as default in GNUmakefile.
- More models in run11.mac (V.Grichine).
21 Nov. 2001 Marc Verderi (TestEm10-V03-02-00)
- Define a new TestEm10.in (and .out) which tests
all XTR models, shooting 10 particles for each run.
Required some modification in the detector construction
and messenger.
- Define a new TestEm10.large_N.in (and .out)
shooting 1000 particles/run.
21 Nov. 2001 Marc Verderi
- Taken for the HEAD and made compliant with
geant4-04-00-cand-01
- clear many warnings
@@ -0,0 +1,132 @@
$Id: README,v 1.3 2001/11/27 16:58:18 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
TestEm10
--------
Test for investigation of ionisation in thin absorbers, transition
and synchrotron radiations.
0- INTRODUCTION
The parameterisations models can be changed simply with:
Idle> /XTRdetector/setModel i (i = 1 to 10)
It is NOT needed (and not recommended) to issue the command
/XTRdetector/update if just the model is changed.
See macro file "TestEm10.in" for an example.
1- GEOMETRY DEFINITION
The "absorber" is a tube made of a given material.
Three parameters define the absorber :
- the material of the absorber,
- the thickness of an absorber,
- the transverse size of the absorber (the input face is a square).
The volume "World" contains the "absorber".
In this test the parameters of the "World" can be changed , too.
In addition a transverse uniform magnetic field can be applied.
The default geometry is constructed in DetectorConstruction class,
but all the parameters can be changed via
the commands defined in the DetectorMessenger class.
2- AN EVENT : THE PRIMARY GENERATOR
The primary kinematic consists of a single particle which hits the
absorber perpendicular to the input face. The type of the particle
and its energy are set in the PrimaryGeneratorAction class, and can
be changed via the G4 build-in commands of ParticleGun class (see
the macros provided with this example).
A RUN is a set of events.
3- DETECTOR RESPONSE
Here we test G4PAIionisation , G4IonisationByLogicalVolume and
transition radiation processes
A HIT is a record, event per event , of all the
informations needed to simulate and analyse the detector response.
In this example a CalorHit is defined as a set of 2 informations:
- the total energy deposit in the absorber,
- the total tracklength of all charged particles in the absorber,
Therefore the absorber is declared
'sensitive detector' (SD), which means they can contribute to the hit.
At the end of a run, from the histogram(s), one can study
different physics quantities such as :
- angle distribution,
- energy deposit,
- transmission/backscattering,
- ...
The test contains 10 built-in histograms, which can be activated by
interactive commands (see the macros runxx.mac for details).
The histogram files can be viewed using PAW e.g with the commands
paw> h/file 1 geant4.plot01 or g4.p11
paw> option stat
paw> h/pl 1
4- PHYSICS DEMO
The particle's type and the physic processes which will be available
in this example are set in PhysicsList class.
The messenger classes introduce interactive commands . Using these
commands the geometry of the detector, the data of the primary
particle, the limits of the histograms , etc. can be changed.
5- HOW TO START ?
- compile and link to generate an executable
% cd TestEm10
% gmake
- execute TestEm10 in 'batch' mode from macro files e.g.
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm10 run11.mac
- execute TestEm10 in 'interactive' mode with visualization e.g.
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm10
....
Idle> type your commands
....
List of the built-in histograms
-------------------------------
1. number of (tracking) steps/event
2. energy deposit distribution in the absorber (in MeV)
3. angle distribution of the primary particle at the exit
of the absorber (deg)
4. distribution of the lateral displacement at exit(mm)
5. kinetic energy of the transmitted primaries (MeV)
6. angle distribution of the backscattered primaries (deg)
7. kinetic energy of the backscattered primary particles (MeV)
8. kinetic energy of the charged secondary particles (MeV)
9. z distribution of the secondary charged vertices (mm)
10. kinetic energy of the photons escaping the absorber (MeV)
Note that, histograms are disabled via the flag G4NOHIST in the GNUmakefile.
Currently, histograms in this example are implemented through the obsolete
CLHEP/Hist package, which is no longer supported. The implementation will
be replaced by direct call to the AIDA abstract interfaces in a near future.
@@ -0,0 +1,133 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: TestEm10.cc,v 1.2 2001/07/11 09:57:18 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// --------------------------------------------------------------
// GEANT 4 - TestEm10
//
// --------------------------------------------------------------
// Comments
//
//
// --------------------------------------------------------------
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4UIterminal.hh"
#include "Randomize.hh"
#ifdef G4VIS_USE
#include "Em10VisManager.hh"
#endif
#include "Em10DetectorConstruction.hh"
#include "Em10PhysicsList.hh"
#include "Em10PrimaryGeneratorAction.hh"
#include "Em10RunAction.hh"
#include "Em10EventAction.hh"
#include "Em10SteppingAction.hh"
#include "Em10SteppingVerbose.hh"
int main(int argc,char** argv)
{
//choose the Random engine
HepRandom::setTheEngine(new RanecuEngine);
//my Verbose output class
G4VSteppingVerbose::SetInstance(new Em10SteppingVerbose);
// Construct the default run manager
G4RunManager * runManager = new G4RunManager;
// set mandatory initialization classes
Em10DetectorConstruction* detector;
detector = new Em10DetectorConstruction;
runManager->SetUserInitialization(detector);
runManager->SetUserInitialization(new Em10PhysicsList(detector));
#ifdef G4VIS_USE
// visualization manager
G4VisManager* visManager = new Em10VisManager;
visManager->Initialize();
#endif
// set user action classes
runManager->SetUserAction(new Em10PrimaryGeneratorAction(detector));
Em10RunAction* runAction = new Em10RunAction;
runManager->SetUserAction(runAction);
Em10EventAction* eventAction = new Em10EventAction(runAction);
runManager->SetUserAction(eventAction);
Em10SteppingAction* steppingAction = new Em10SteppingAction(detector,
eventAction,
runAction);
runManager->SetUserAction(steppingAction);
//Initialize G4 kernel, physics tables ...
runManager->Initialize();
// get the pointer to the User Interface manager
G4UImanager* UI = G4UImanager::GetUIpointer();
if (argc==1) // Define UI terminal for interactive mode
{
G4UIsession * session = new G4UIterminal;
UI->ApplyCommand("/control/execute init.mac");
session->SessionStart();
delete session;
}
else // Batch mode
{
G4String command = "/control/execute ";
G4String fileName = argv[1];
UI->ApplyCommand(command+fileName);
}
// job termination
#ifdef G4VIS_USE
delete visManager;
#endif
delete runManager;
return 0;
}
@@ -0,0 +1,46 @@
#
# Macro file 'TestEm10.in' for testing "TestEm10"
#
#
/run/initialize
/run/particle/dumpCutValues
/gun/particle e-
/gun/energy 9000.0 MeV
# Test G4FoamXrayTRmodel
/XTRdetector/setModel 1
/run/beamOn 1000
# Test G4FoamXTRdEdx
/XTRdetector/setModel 2
/run/beamOn 10
# Test G4GamDistrXrayTRmodel
/XTRdetector/setModel 3
/run/beamOn 10
# Test G4GamDistrXTRdEdx
/XTRdetector/setModel 4
/run/beamOn 10
# Test G4IrregularXrayTRmodel
/XTRdetector/setModel 5
/run/beamOn 10
# Test G4IrregularXTRdEdx
/XTRdetector/setModel 6
/run/beamOn 10
# Test G4PlateIrrGasXrayTRmodel
/XTRdetector/setModel 7
/run/beamOn 10
# Test G4PlateIrrGasXTRdEdx
/XTRdetector/setModel 8
/run/beamOn 10
# Test G4RegularXrayTRmodel
/XTRdetector/setModel 9
/run/beamOn 10
# Test G4RegularXTRdEdx
/XTRdetector/setModel 10
/run/beamOn 10
@@ -0,0 +1,46 @@
#
# Macro file 'TestEm10.large_N.in' for testing "TestEm10"
#
#
/run/initialize
/run/particle/dumpCutValues
/gun/particle e-
/gun/energy 9000.0 MeV
# Test G4FoamXrayTRmodel
/XTRdetector/setModel 1
/run/beamOn 1000
# Test G4FoamXTRdEdx
/XTRdetector/setModel 2
/run/beamOn 1000
# Test G4GamDistrXrayTRmodel
/XTRdetector/setModel 3
/run/beamOn 1000
# Test G4GamDistrXTRdEdx
/XTRdetector/setModel 4
/run/beamOn 1000
# Test G4IrregularXrayTRmodel
/XTRdetector/setModel 5
/run/beamOn 1000
# Test G4IrregularXTRdEdx
/XTRdetector/setModel 6
/run/beamOn 1000
# Test G4PlateIrrGasXrayTRmodel
/XTRdetector/setModel 7
/run/beamOn 1000
# Test G4PlateIrrGasXTRdEdx
/XTRdetector/setModel 8
/run/beamOn 1000
# Test G4RegularXrayTRmodel
/XTRdetector/setModel 9
/run/beamOn 1000
# Test G4RegularXTRdEdx
/XTRdetector/setModel 10
/run/beamOn 1000
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -21,68 +21,77 @@
// ********************************************************************
//
//
// $Id: Em1RunActionMessenger.cc,v 1.3.2.1 2001/06/28 19:06:50 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em10CalorHit.hh,v 1.2 2001/07/11 09:57:19 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "Em1RunActionMessenger.hh"
#include "Em1RunAction.hh"
#ifndef Em10CalorHit_h
#define Em10CalorHit_h 1
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em1RunActionMessenger::Em1RunActionMessenger(Em1RunAction* run)
:Em1Run(run)
{
RndmDir = new G4UIdirectory("/rndm/");
RndmDir->SetGuidance("Rndm status control.");
class Em10CalorHit : public G4VHit
{
public:
Em10CalorHit();
~Em10CalorHit();
Em10CalorHit(const Em10CalorHit&);
const Em10CalorHit& operator=(const Em10CalorHit&);
int operator==(const Em10CalorHit&) const;
inline void* operator new(size_t);
inline void operator delete(void*);
void Print();
public:
RndmSaveCmd = new G4UIcmdWithAnInteger("/rndm/save",this);
RndmSaveCmd->SetGuidance("set frequency to save rndm status on external files.");
RndmSaveCmd->SetGuidance("freq = 0 not saved");
RndmSaveCmd->SetGuidance("freq > 0 saved on: beginOfRun.rndm");
RndmSaveCmd->SetGuidance("freq > 0 saved on: endOfRun.rndm");
RndmSaveCmd->SetGuidance("freq = 2 saved on: beginOfEvent.rndm");
RndmSaveCmd->SetParameterName("frequency",false);
RndmSaveCmd->SetRange("frequency>=0 && frequency<=2");
RndmSaveCmd->AvailableForStates(PreInit,Idle);
RndmReadCmd = new G4UIcmdWithAString("/rndm/read",this);
RndmReadCmd->SetGuidance("get rndm status from an external file.");
RndmReadCmd->SetParameterName("fileName",true);
RndmReadCmd->SetDefaultValue ("beginOfRun.rndm");
RndmReadCmd->AvailableForStates(PreInit,Idle);
void AddAbs(G4double de, G4double dl) {EdepAbs += de; TrackLengthAbs += dl;};
void AddGap(G4double de, G4double dl) {EdepGap += de; TrackLengthGap += dl;};
G4double GetEdepAbs() { return EdepAbs; };
G4double GetTrakAbs() { return TrackLengthAbs; };
G4double GetEdepGap() { return EdepGap; };
G4double GetTrakGap() { return TrackLengthGap; };
private:
G4double EdepAbs, TrackLengthAbs;
G4double EdepGap, TrackLengthGap;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
typedef G4THitsCollection<Em10CalorHit> Em10CalorHitsCollection;
extern G4Allocator<Em10CalorHit> Em10CalorHitAllocator;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void* Em10CalorHit::operator new(size_t)
{
void* aHit;
aHit = (void*) Em10CalorHitAllocator.MallocSingle();
return aHit;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em1RunActionMessenger::~Em1RunActionMessenger()
{
delete RndmSaveCmd; delete RndmReadCmd; delete RndmDir;
inline void Em10CalorHit::operator delete(void* aHit)
{
Em10CalorHitAllocator.FreeSingle((Em10CalorHit*) aHit);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
void Em1RunActionMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
if (command == RndmSaveCmd)
Em1Run->SetRndmFreq(RndmSaveCmd->GetNewIntValue(newValue));
if (command == RndmReadCmd)
{ G4cout << "\n---> rndm status restored from file: " << newValue << G4endl;
HepRandom::restoreEngineStatus(newValue);
HepRandom::showEngineStatus();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10CalorimeterSD.hh,v 1.2 2001/07/11 09:57:19 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10CalorimeterSD_h
#define Em10CalorimeterSD_h 1
#include "G4VSensitiveDetector.hh"
#include "globals.hh"
class Em10DetectorConstruction;
class G4HCofThisEvent;
class G4Step;
#include "Em10CalorHit.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10CalorimeterSD : public G4VSensitiveDetector
{
public:
Em10CalorimeterSD(G4String, Em10DetectorConstruction* );
~Em10CalorimeterSD();
void Initialize(G4HCofThisEvent*);
G4bool ProcessHits(G4Step*,G4TouchableHistory*);
void EndOfEvent(G4HCofThisEvent*);
void clear();
void PrintAll();
private:
Em10CalorHitsCollection* CalCollection;
Em10DetectorConstruction* Detector;
G4int* HitID;
};
#endif
@@ -0,0 +1,199 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10DetectorConstruction.hh,v 1.4 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
#ifndef Em10DetectorConstruction_h
#define Em10DetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
#include "G4ios.hh"
class G4Box;
class G4Tubs;
class G4LogicalVolume;
class G4VPhysicalVolume;
class G4Material;
class G4UniformMagField;
class Em10DetectorMessenger;
class Em10CalorimeterSD;
class G4VXrayTRmodel;
class Em10DetectorConstruction : public G4VUserDetectorConstruction
{
public:
Em10DetectorConstruction();
~Em10DetectorConstruction();
public:
void SetParametrisationModel (G4int i){fModelNumber=i;};
void ParametrisationModel ();
void SetAbsorberMaterial (G4String);
void SetAbsorberThickness(G4double);
void SetAbsorberRadius(G4double);
void SetAbsorberZpos(G4double);
void SetRadiatorMaterial (G4String);
void SetRadiatorThickness(G4double);
void SetGasGapThickness(G4double);
void SetFoilNumber (G4int i){fFoilNumber=i;};
void SetWorldMaterial(G4String);
void SetWorldSizeZ(G4double);
void SetWorldSizeR(G4double);
void SetMagField(G4double);
G4VPhysicalVolume* Construct();
void UpdateGeometry();
public:
void PrintCalorParameters();
G4Material* GetWorldMaterial() {return WorldMaterial;};
G4double GetWorldSizeZ() {return WorldSizeZ;};
G4double GetWorldSizeR() {return WorldSizeR;};
G4double GetAbsorberZpos() {return zAbsorber;};
G4double GetzstartAbs() {return zstartAbs;};
G4double GetzendAbs() {return zendAbs;};
G4Material* GetAbsorberMaterial() {return AbsorberMaterial;};
G4double GetAbsorberThickness() {return AbsorberThickness;};
G4double GetAbsorberRadius() {return AbsorberRadius;};
const G4VPhysicalVolume* GetphysiWorld() {return physiWorld;};
const G4VPhysicalVolume* GetAbsorber() {return physiAbsorber;};
G4LogicalVolume* GetLogicalAbsorber() {return logicAbsorber;};
private:
G4bool worldchanged;
G4Material* AbsorberMaterial;
G4double AbsorberThickness;
G4double AbsorberRadius;
G4Material* fWindowMat ;
G4double fWindowThick ;
G4Material* fElectrodeMat ;
G4double fElectrodeThick ;
G4Material* fGapMat ;
G4double fGapThick ;
G4double zAbsorber ;
G4double zstartAbs , zendAbs ;
G4Material* WorldMaterial;
G4double WorldSizeR;
G4double WorldSizeZ;
G4Box* solidWorld; //pointer to the solid World
G4LogicalVolume* logicWorld; //pointer to the logical World
G4VPhysicalVolume* physiWorld; //pointer to the physical World
// TR radiator volumes and dimensions
G4Box* fSolidRadSlice; // pointer to the solid z-slice
G4LogicalVolume* fLogicRadSlice; // pointer to the logical z-slide
G4VPhysicalVolume* fPhysicRadSlice; // pointer to the physical z-slide
G4Box* fSolidRadRing; // pointer to the solid R-slice
G4LogicalVolume* fLogicRadRing; // pointer to the logical R-slide
G4VPhysicalVolume* fPhysicRadRing; // pointer to the physical R-slide
G4Box* solidRadiator;
G4LogicalVolume* logicRadiator;
G4VPhysicalVolume* physiRadiator;
G4Material* fRadiatorMat; //pointer to the TR radiator material
G4double fRadThickness ;
G4double fGasGap ;
G4int fFoilNumber ;
G4int fModelNumber ; // selection of parametrisation model1-10
G4double fDetThickness ;
G4double fDetLength ;
G4double fDetGap ;
G4double fStartR ;
G4double fStartZ ;
G4int fModuleNumber ; // the number of Rad-Det modules
G4Box* solidAbsorber; //pointer to the solid Absorber
G4LogicalVolume* logicAbsorber; //pointer to the logical Absorber
G4VPhysicalVolume* physiAbsorber; //pointer to the physical Absorber
G4UniformMagField* magField; //pointer to the magnetic field
Em10DetectorMessenger* detectorMessenger; //pointer to the Messenger
Em10CalorimeterSD* calorimeterSD; //pointer to the sensitive detector
G4VXrayTRmodel* fXTRModel ;
private:
void DefineMaterials();
void ComputeCalorParameters();
G4VPhysicalVolume* ConstructCalorimeter();
};
////////////////////////////////////////////////////////////////////////
inline void Em10DetectorConstruction::ComputeCalorParameters()
{
// Compute derived parameters of the calorimeter
if(!worldchanged)
{
// WorldSizeR=2.*AbsorberRadius ;
// WorldSizeZ=2.*AbsorberThickness ;
}
zstartAbs = zAbsorber-0.5*AbsorberThickness;
zendAbs = zAbsorber+0.5*AbsorberThickness;
}
#endif
@@ -0,0 +1,84 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10DetectorMessenger.hh,v 1.3 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10DetectorMessenger_h
#define Em10DetectorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class Em10DetectorConstruction;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithoutParameter;
class Em10DetectorMessenger: public G4UImessenger
{
public:
Em10DetectorMessenger(Em10DetectorConstruction* );
~Em10DetectorMessenger();
void SetNewValue(G4UIcommand*, G4String);
void SetNewValue(G4UIcommand*, G4int);
private:
Em10DetectorConstruction* Em10Detector;
G4UIdirectory* Em10detDir;
G4UIcmdWithAnInteger* ModelCmd;
G4UIcmdWithAnInteger* FoilNumCmd;
G4UIcmdWithAString* AbsMaterCmd;
G4UIcmdWithADoubleAndUnit* AbsThickCmd;
G4UIcmdWithADoubleAndUnit* AbsRadCmd;
G4UIcmdWithAString* RadiatorMaterCmd;
G4UIcmdWithADoubleAndUnit* RadiatorThickCmd;
G4UIcmdWithADoubleAndUnit* GasGapThickCmd;
G4UIcmdWithADoubleAndUnit* AbsZposCmd;
G4UIcmdWithAString* WorldMaterCmd;
G4UIcmdWithADoubleAndUnit* WorldZCmd;
G4UIcmdWithADoubleAndUnit* WorldRCmd;
G4UIcmdWithADoubleAndUnit* MagFieldCmd;
G4UIcmdWithoutParameter* UpdateCmd;
};
#endif
@@ -0,0 +1,83 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10EventAction.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10EventAction_h
#define Em10EventAction_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
class Em10RunAction;
class Em10EventActionMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10EventAction : public G4UserEventAction
{
public:
Em10EventAction(Em10RunAction* Em10RA);
~Em10EventAction();
public:
void BeginOfEventAction(const G4Event*);
void EndOfEventAction(const G4Event*);
G4int GetEventno();
void setEventVerbose(G4int level);
void CountStepsCharged() ;
void CountStepsNeutral() ;
void AddCharged() ;
void AddNeutral() ;
void AddE();
void AddP();
void SetTr();
void SetRef();
void SetDrawFlag(G4String val) {drawFlag = val;};
void SetPrintModulo(G4int val) {printModulo = val;};
private:
G4int calorimeterCollID;
Em10EventActionMessenger* eventMessenger;
Em10RunAction* runaction;
G4int verboselevel;
G4double nstep,nstepCharged,nstepNeutral;
G4double Nch,Nne;
G4double NE,NP;
G4double Transmitted,Reflected ;
G4String drawFlag;
G4int printModulo;
};
#endif
@@ -21,41 +21,40 @@
// ********************************************************************
//
//
// $Id: Em1RunActionMessenger.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em10EventActionMessenger.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em1RunActionMessenger_h
#define Em1RunActionMessenger_h 1
#ifndef Em10EventActionMessenger_h
#define Em10EventActionMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class Em1RunAction;
class G4UIdirectory;
class Em10EventAction;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em1RunActionMessenger: public G4UImessenger
class Em10EventActionMessenger: public G4UImessenger
{
public:
Em1RunActionMessenger(Em1RunAction*);
~Em1RunActionMessenger();
Em10EventActionMessenger(Em10EventAction*);
~Em10EventActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
Em1RunAction* Em1Run;
G4UIdirectory* RndmDir;
G4UIcmdWithAnInteger* RndmSaveCmd;
G4UIcmdWithAString* RndmReadCmd;
Em10EventAction* eventAction;
G4UIcmdWithAnInteger* setVerboseCmd;
G4UIcmdWithAString* DrawCmd;
G4UIcmdWithAnInteger* PrintCmd;
};
#endif
@@ -0,0 +1,402 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// File for definition of materials used in X-ray TR experiments
#ifndef Em10Materials_h
#define Em10Materials_h 1
#include "G4Material.hh"
G4String name, symbol ; //a=mass of a mole;
G4double a, z, density ; //z=mean number of protons;
G4int iz, n, nel ; //iz=number of protons in an isotope;
// n=number of nucleons in an isotope;
G4int ncomponents, natoms;
G4double abundance, fractionmass;
G4double temperature, pressure;
//
// define Elements
//
a = 1.01*g/mole;
G4Element* elH = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
a = 6.94*g/mole;
G4Element* elLi = new G4Element(name="Lithium",symbol="Li" , z= 3., a);
a = 9.01*g/mole;
G4Element* elBe = new G4Element(name="Beryllium",symbol="Be" , z= 4., a);
a = 6.01*g/mole;
G4Element* elC = new G4Element(name="Carbon", symbol="C", z=6., a);
a = 14.01*g/mole;
G4Element* elN = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
a = 16.00*g/mole;
G4Element* elO = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
a = 39.948*g/mole;
G4Element* elAr = new G4Element(name="Argon", symbol="Ar", z=18., a);
a = 131.29*g/mole;
G4Element* elXe = new G4Element(name="Xenon", symbol="Xe", z=54., a);
a = 19.00*g/mole;
G4Element* elF = new G4Element(name="Fluorine", symbol="F", z=9., a);
//
// define simple materials
//
density = 1.848*g/cm3;
a = 9.01*g/mole;
G4Material* Be = new G4Material(name="Beryllium", z=4., a, density);
density = 1.390*g/cm3;
a = 39.95*g/mole;
G4Material* lAr = new G4Material(name="liquidArgon", z=18., a, density);
density = 7.870*g/cm3;
a = 55.85*g/mole;
G4Material* Fe = new G4Material(name="Iron" , z=26., a, density);
density = 8.960*g/cm3;
a = 63.55*g/mole;
G4Material* Cu = new G4Material(name="Copper" , z=29., a, density);
density = 19.32*g/cm3;
a =196.97*g/mole;
G4Material* Au = new G4Material(name="Gold" , z=79., a, density);
density = 11.35*g/cm3;
a = 207.19*g/mole;
G4Material* Pb = new G4Material(name="Lead" , z=82., a, density);
//
// define a material from elements. case 1: chemical molecule
//
density = 1.000*g/cm3;
G4Material* H2O = new G4Material(name="Water", density, ncomponents=2);
H2O->AddElement(elH, natoms=2);
H2O->AddElement(elO, natoms=1);
// Silicon as detector material
density = 2.330*g/cm3;
a = 28.09*g/mole;
G4Material* Si = new G4Material(name="Silicon", z=14., a, density);
/////////////////////////////////////////////////////////////////
//
// Detector windows, electrodes
// Al for electrodes
density = 2.700*g/cm3;
a = 26.98*g/mole;
G4Material* Al = new G4Material(name="Aluminium", z=13., a, density);
////////////////////////////////////////////////////////////////////////////
//
// Materials for popular X-ray TR radiators
//
// TRT_CH2
density = 0.935*g/cm3;
G4Material* TRT_CH2 = new G4Material(name="TRT_CH2",density, nel=2);
TRT_CH2->AddElement(elC,1);
TRT_CH2->AddElement(elH,2);
// Radiator
density = 0.059*g/cm3;
G4Material* Radiator = new G4Material(name="Radiator",density, nel=2);
Radiator->AddElement(elC,1);
Radiator->AddElement(elH,2);
// Carbon Fiber
density = 0.145*g/cm3;
G4Material* CarbonFiber = new G4Material(name="CarbonFiber",density, nel=1);
CarbonFiber->AddElement(elC,1);
// Lithium
density = 0.534*g/cm3;
G4Material* Li = new G4Material(name="Li",density, nel=1);
Li->AddElement(elLi,1);
// Beryllium
density = 1.848*g/cm3;
G4Material* Be = new G4Material(name="Be",density, nel=1);
Be->AddElement(elBe,1);
// Mylar
density = 1.39*g/cm3;
G4Material* Mylar = new G4Material(name="Mylar", density, nel=3);
Mylar->AddElement(elO,2);
Mylar->AddElement(elC,5);
Mylar->AddElement(elH,4);
// Kapton (polyimide) ??? since = Mylar C5H4O2
density = 1.39*g/cm3;
G4Material* Kapton = new G4Material(name="Kapton", density, nel=3);
Kapton->AddElement(elO,2);
Kapton->AddElement(elC,5);
Kapton->AddElement(elH,4);
// Polypropelene
G4Material* CH2 = new G4Material ("Polypropelene" , 0.91*g/cm3, 2);
CH2->AddElement(elH,2);
CH2->AddElement(elC,1);
density = 1.290*mg/cm3; // old air from elements
G4Material* air = new G4Material(name="air" , density, ncomponents=2);
Air->AddElement(elN, fractionmass=0.7);
Air->AddElement(elO, fractionmass=0.3);
density = 1.25053*mg/cm3 ; // STP
a = 14.01*g/mole ; // get atomic weight !!!
// a = 28.016*g/mole;
G4Material* N2 = new G4Material(name="Nitrogen", z= 7.,a,density) ;
density = 1.25053*mg/cm3 ; // STP
G4Material* anotherN2 = new G4Material(name="anotherN2", density,ncomponents=2);
anotherN2->AddElement(elN, 1);
anotherN2->AddElement(elN, 1);
//////////////////////////////////////////////////////////////////////////
//
// Noble gases , STP conditions
// Helium as detector gas, STP
density = 0.178*mg/cm3 ;
a = 4.0026*g/mole ;
G4Material* He = new G4Material(name="He",z=2., a, density );
// Neon as detector gas, STP
density = 0.900*mg/cm3 ;
a = 20.179*g/mole ;
G4Material* Ne = new G4Material(name="Ne",z=10., a, density );
// Argon as detector gas, STP
density = 1.7836*mg/cm3 ; // STP
G4Material* Argon = new G4Material(name="Argon" , density, ncomponents=1);
Argon->AddElement(elAr, 1);
// Krypton as detector gas, STP
density = 3.700*mg/cm3 ;
a = 83.80*g/mole ;
G4Material* Kr = new G4Material(name="Kr",z=36., a, density );
// Xenon as detector gas, STP
density = 5.858*mg/cm3 ;
a = 131.29*g/mole ;
G4Material* Xe = new G4Material(name="Xenon",z=54., a, density );
/////////////////////////////////////////////////////////////////////////////
//
// Hydrocarbones, metane and others
// Metane, STP
density = 0.7174*mg/cm3 ;
G4Material* metane = new G4Material(name="CH4",density,nel=2) ;
metane->AddElement(elC,1) ;
metane->AddElement(elH,4) ;
// Propane, STP
density = 2.005*mg/cm3 ;
G4Material* propane = new G4Material(name="C3H8",density,nel=2) ;
propane->AddElement(elC,3) ;
propane->AddElement(elH,8) ;
// iso-Butane (methylpropane), STP
density = 2.67*mg/cm3 ;
G4Material* isobutane = new G4Material(name="isoC4H10",density,nel=2) ;
isobutane->AddElement(elC,4) ;
isobutane->AddElement(elH,10) ;
///////////////////////////////////////////////////////////////////////////
//
// Molecular gases
// Carbon dioxide
density = 1.977*mg/cm3;
G4Material* CO2 = new G4Material(name="CO2", density, nel=2,
kStateGas,273.15*kelvin,1.*atmosphere);
CO2->AddElement(elC,1);
CO2->AddElement(elO,2);
// Carbon dioxide, STP
density = 1.977*mg/cm3;
G4Material* CarbonDioxide = new G4Material(name="CO2", density, nel=2);
CarbonDioxide->AddElement(elC,1);
CarbonDioxide->AddElement(elO,2);
// Nitrogen, STP
density = 1.25053*mg/cm3 ; // STP
G4Material* Nitrogen = new G4Material(name="N2" , density, ncomponents=1);
Nitrogen->AddElement(elN, 2);
// Oxygen, STP
density = 1.4289*mg/cm3 ; // STP
G4Material* Oxygen = new G4Material(name="O2" , density, ncomponents=1);
Oxygen->AddElement(elO, 2);
// Dry air (average composition), STP
density = 1.2928*mg/cm3 ; // STP
G4Material* Air = new G4Material(name="Air" , density, ncomponents=3);
Air->AddMaterial( Nitrogen, fractionmass = 0.7557 ) ;
Air->AddMaterial( Oxygen, fractionmass = 0.2315 ) ;
Air->AddMaterial( Argon, fractionmass = 0.0128 ) ;
////////////////////////////////////////////////////////////////////////////
//
// MWPC mixtures
// 93% Ar + 7% CH4, STP
density = 1.709*mg/cm3 ;
G4Material* Ar7CH4 = new G4Material(name="Ar7CH4" , density,
ncomponents=2);
Ar7CH4->AddMaterial( Argon, fractionmass = 0.971 ) ;
Ar7CH4->AddMaterial( metane, fractionmass = 0.029 ) ;
// 93% Kr + 7% CH4, STP
density = 3.491*mg/cm3 ;
G4Material* Kr7CH4 = new G4Material(name="Kr7CH4" , density,
ncomponents=2);
Kr7CH4->AddMaterial( Kr, fractionmass = 0.986 ) ;
Kr7CH4->AddMaterial( metane, fractionmass = 0.014 ) ;
// ATLAS TRT gas mixture
G4double TRT_Xe_density = 5.485*mg/cm3;
G4Material* TRT_Xe = new G4Material(name="TRT_Xe", TRT_Xe_density, nel=1,
kStateGas,293.15*kelvin,1.*atmosphere);
TRT_Xe->AddElement(elXe,1);
G4double TRT_CO2_density = 1.842*mg/cm3;
G4Material* TRT_CO2 = new G4Material(name="TRT_CO2", TRT_CO2_density, nel=2,
kStateGas,293.15*kelvin,1.*atmosphere);
TRT_CO2->AddElement(elC,1);
TRT_CO2->AddElement(elO,2);
G4double TRT_CF4_density = 3.9*mg/cm3;
G4Material* TRT_CF4 = new G4Material(name="TRT_CF4", TRT_CF4_density, nel=2,
kStateGas,293.15*kelvin,1.*atmosphere);
TRT_CF4->AddElement(elC,1);
TRT_CF4->AddElement(elF,4);
// ATLAS TRT straw tube gas mixture (20 C, 1 atm)
G4double XeCO2CF4_density = 4.76*mg/cm3;
G4Material* XeCO2CF4 = new G4Material(name="XeCO2CF4", XeCO2CF4_density,
ncomponents=3,
kStateGas,293.15*kelvin,1.*atmosphere);
XeCO2CF4->AddMaterial(TRT_Xe,0.807);
XeCO2CF4->AddMaterial(TRT_CO2,0.039);
XeCO2CF4->AddMaterial(TRT_CF4,0.154);
// 80% Ar + 20% CO2, STP
density = 1.8223*mg/cm3 ;
G4Material* Ar_80CO2_20 = new G4Material(name="ArCO2" , density,
ncomponents=2);
Ar_80CO2_20->AddMaterial( Argon, fractionmass = 0.783 ) ;
Ar_80CO2_20->AddMaterial( CarbonDioxide, fractionmass = 0.217 ) ;
// 80% Xe + 20% CO2, STP
density = 5.0818*mg/cm3 ;
G4Material* Xe20CO2 = new G4Material(name="Xe20CO2" , density, ncomponents=2);
Xe20CO2->AddMaterial( Xe, fractionmass = 0.922 ) ;
Xe20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.078 ) ;
// 80% Kr + 20% CO2, STP
density = 3.601*mg/cm3 ;
G4Material* Kr20CO2 = new G4Material(name="Kr20CO2", density,
ncomponents=2);
Kr20CO2->AddMaterial( Kr, fractionmass = 0.89 ) ;
Kr20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.11 ) ;
// Xe + 55% He + 15% CH4 ; NIM A294 (1990) 465-472; STP
density = 1.963*mg/cm3;
G4Material* Xe55He15CH4 = new G4Material(name="Xe55He15CH4",density,
ncomponents=3);
Xe55He15CH4->AddMaterial(Xe, 0.895);
Xe55He15CH4->AddMaterial(He, 0.050);
Xe55He15CH4->AddMaterial(metane,0.055);
// 90% Xe + 10% CH4, STP ; NIM A248 (1986) 379-388
density = 5.344*mg/cm3 ;
G4Material* Xe10CH4 = new G4Material(name="Xe10CH4" , density,
ncomponents=2);
Xe10CH4->AddMaterial( Xe, fractionmass = 0.987 ) ;
Xe10CH4->AddMaterial( metane, fractionmass = 0.013 ) ;
#endif
//
//
//////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,133 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10PhysicsList.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
#ifndef Em10PhysicsList_h
#define Em10PhysicsList_h 1
#include "G4VUserPhysicsList.hh"
#include "globals.hh"
class G4PhotoElectricEffect;
class G4ComptonScattering;
class G4GammaConversion;
class G4MultipleScattering;
class G4PAIonisation ;
class G4ForwardXrayTR ;
class G4eIonisation;
class G4eBremsstrahlung;
class G4eplusAnnihilation;
class G4MuIonisation;
class G4MuBremsstrahlung;
class G4MuPairProduction;
class G4hIonisation;
class G4hIonisationPlus;
class Em10StepCut;
class Em10DetectorConstruction;
class Em10PhysicsListMessenger;
class Em10PhysicsList: public G4VUserPhysicsList
{
public:
Em10PhysicsList( Em10DetectorConstruction*);
~Em10PhysicsList();
protected:
// Construct particle and physics
void ConstructParticle();
void ConstructProcess();
void SetCuts();
protected:
// these methods Construct particles
void ConstructBosons();
void ConstructLeptons();
void ConstructMesons();
void ConstructBarions();
protected:
// these methods Construct physics processes and register them
void AddParameterisation();
void ConstructGeneral();
void ConstructEM();
public:
void SetGammaCut(G4double);
void SetElectronCut(G4double);
void SetProtonCut(G4double);
void SetCutsByEnergy(G4double);
void GetRange(G4double);
void SetMaxStep(G4double);
public:
G4double MaxChargedStep;
private:
G4PhotoElectricEffect* thePhotoElectricEffect;
G4ComptonScattering* theComptonScattering;
G4GammaConversion* theGammaConversion;
G4MultipleScattering* theeminusMultipleScattering;
G4eIonisation* theeminusIonisation;
G4eBremsstrahlung* theeminusBremsstrahlung;
G4PAIonisation* fPAIonisation ;
G4ForwardXrayTR* fForwardXrayTR ;
G4MultipleScattering* theeplusMultipleScattering;
G4eIonisation* theeplusIonisation;
G4eBremsstrahlung* theeplusBremsstrahlung;
G4eplusAnnihilation* theeplusAnnihilation;
Em10StepCut* theeminusStepCut ;
Em10StepCut* theeplusStepCut ;
G4double cutForGamma;
G4double cutForElectron;
G4double cutForProton;
Em10DetectorConstruction* pDet;
Em10PhysicsListMessenger* physicsListMessenger;
};
#endif
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10PhysicsListMessenger.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10PhysicsListMessenger_h
#define Em10PhysicsListMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class Em10PhysicsList;
class G4UIcmdWithoutParameter;
class G4UIcmdWithADouble;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10PhysicsListMessenger: public G4UImessenger
{
public:
Em10PhysicsListMessenger(Em10PhysicsList*);
~Em10PhysicsListMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
Em10PhysicsList* Em10List;
G4UIcmdWithADoubleAndUnit* setMaxStepCmd;
G4UIcmdWithADoubleAndUnit* cutGCmd;
G4UIcmdWithADoubleAndUnit* cutECmd;
G4UIcmdWithADoubleAndUnit* cutPCmd;
G4UIcmdWithADoubleAndUnit* rCmd;
G4UIcmdWithADoubleAndUnit* eCmd;
};
#endif
@@ -0,0 +1,75 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10PrimaryGeneratorAction.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10PrimaryGeneratorAction_h
#define Em10PrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class G4ParticleGun;
class G4Event;
class Em10DetectorConstruction;
class Em10PrimaryGeneratorMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
Em10PrimaryGeneratorAction(Em10DetectorConstruction*);
~Em10PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event*);
void SetRndmFlag(G4String val) { rndmFlag = val;}
void Setxvertex(G4double x) ;
void Setyvertex(G4double y) ;
void Setzvertex(G4double z) ;
static G4String GetPrimaryName() ;
private:
G4ParticleGun* particleGun; //pointer a to G4 service class
Em10DetectorConstruction* Em10Detector; //pointer to the geometry
Em10PrimaryGeneratorMessenger* gunMessenger; //messenger of this class
G4String rndmFlag; //flag for a random impact point
static G4String thePrimaryParticleName ;
G4double xvertex,yvertex,zvertex;
G4bool vertexdefined ;
};
#endif
@@ -21,41 +21,41 @@
// ********************************************************************
//
//
// $Id: Em4RunActionMessenger.hh,v 1.3.4.1 2001/06/28 19:07:01 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em10PrimaryGeneratorMessenger.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em4RunActionMessenger_h
#define Em4RunActionMessenger_h 1
#ifndef Em10PrimaryGeneratorMessenger_h
#define Em10PrimaryGeneratorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
#include "globals.hh"
class Em4RunAction;
class G4UIdirectory;
class Em10PrimaryGeneratorAction;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em4RunActionMessenger: public G4UImessenger
class Em10PrimaryGeneratorMessenger: public G4UImessenger
{
public:
Em4RunActionMessenger(Em4RunAction*);
~Em4RunActionMessenger();
Em10PrimaryGeneratorMessenger(Em10PrimaryGeneratorAction*);
~Em10PrimaryGeneratorMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
Em4RunAction* Em4Run;
G4UIdirectory* RndmDir;
G4UIcmdWithAnInteger* RndmSaveCmd;
G4UIcmdWithAString* RndmReadCmd;
Em10PrimaryGeneratorAction* Em10Action;
G4UIcmdWithAString* RndmCmd;
G4UIcmdWithADoubleAndUnit* setxvertexCmd;
G4UIcmdWithADoubleAndUnit* setyvertexCmd;
G4UIcmdWithADoubleAndUnit* setzvertexCmd;
};
#endif
@@ -0,0 +1,190 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10RunAction.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10RunAction_h
#define Em10RunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
#include "g4std/iostream"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10RunMessenger;
class G4Run;
#ifndef G4NOHIST
class HepTupleManager;
class HepHistogram;
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10RunAction : public G4UserRunAction
{
public:
Em10RunAction();
~Em10RunAction();
public:
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run*);
void CountEvent();
void CountParticles(G4double,G4double);
void AddEP(G4double,G4double);
void AddEdeps(G4double Eabs);
void AddTrackLength(G4double tlabs);
void AddnStepsCharged(G4double ns);
void AddnStepsNeutral(G4double ns);
void AddTrRef(G4double tr,G4double ref);
void FillEn(G4double En);
void FillTh(G4double Th);
void FillThBack(G4double Th);
void FillR(G4double R);
void FillTt(G4double Tt);
void FillTb(G4double Tt);
void FillTsec(G4double T);
void FillGammaSpectrum(G4double E);
void FillNbOfSteps(G4double nstep);
void Fillvertexz(G4double z);
void SethistName(G4String name) ;
void SetnbinStep(G4int nbin);
void SetSteplow(G4double Slow);
void SetStephigh(G4double Shigh);
void SetnbinEn(G4int nbin);
void SetEnlow(G4double Elow);
void SetEnhigh(G4double Enhigh);
void SetnbinTt(G4int nbin);
void SetTtlow(G4double Ttlow);
void SetTthigh(G4double Tthigh);
void SetnbinTb(G4int nbin);
void SetTblow(G4double Tblow);
void SetTbhigh(G4double Tbhigh);
void SetnbinTsec(G4int nbin);
void SetTseclow(G4double Tlow);
void SetTsechigh(G4double Thigh);
void SetnbinTh(G4int nbin);
void SetThlow(G4double Thlow);
void SetThhigh(G4double Thhigh);
void SetnbinThBack(G4int nbin);
void SetThlowBack(G4double Thlow);
void SetThhighBack(G4double Thhigh);
void SetnbinR(G4int nbin);
void SetRlow(G4double Rlow);
void SetRhigh(G4double Rhigh);
void SetnbinGamma(G4int nbin);
void SetElowGamma(G4double Elow);
void SetEhighGamma(G4double Ehigh);
void Setnbinzvertex(G4int nbin);
void Setzlow(G4double z);
void Setzhigh(G4double z);
void SetRndmFreq(G4int val) {saveRndm = val;}
G4int GetRndmFreq() {return saveRndm;}
private:
void bookHisto();
private:
G4String histName ;
#ifndef G4NOHIST
HepTupleManager* hbookManager;
HepHistogram *histo1, *histo2, *histo3, *histo4, *histo5 ;
HepHistogram *histo6, *histo7, *histo8, *histo9, *histo10;
#endif
G4double EnergySumAbs,EnergySquareSumAbs;
G4double tlSumAbs,tlsquareSumAbs;
G4double nStepSumCharged,nStepSum2Charged ;
G4double nStepSumNeutral,nStepSum2Neutral ;
G4double TotNbofEvents;
G4double SumCharged,Sum2Charged,SumNeutral,Sum2Neutral;
G4double Selectron,Spositron;
G4double Transmitted,Reflected ;
G4double entryStep,underStep,overStep,distStep[200];
G4double Steplow,Stephigh,dStep;
G4int nbinStep;
G4double entryEn,underEn,overEn,distEn[200];
G4double Enlow,Enhigh,dEn;
G4int nbinEn;
G4double entryTt,underTt,overTt,distTt[200];
G4double Ttlow,Tthigh,dTt;
G4int nbinTt;
G4double Ttmean,Tt2mean;
G4double entryTb,underTb,overTb,distTb[200];
G4double Tblow,Tbhigh,dTb;
G4int nbinTb;
G4double Tbmean,Tb2mean;
G4double entryTsec,underTsec,overTsec,distTsec[200];
G4double Tseclow,Tsechigh,dTsec;
G4int nbinTsec;
G4double entryTh,underTh,overTh,distTh[200];
G4double Thlow,Thhigh,dTh;
G4int nbinTh;
G4double entryThback,underThback,overThback,distThback[200];
G4double Thlowback,Thhighback,dThback;
G4int nbinThback;
G4double entryR ,underR ,overR ,distR[200];
G4double Rlow,Rhigh,dR;
G4int nbinR;
G4double Rmean,R2mean;
G4double entryGamma,underGamma,overGamma,distGamma[200];
G4double ElowGamma,EhighGamma,dEGamma;
G4int nbinGamma ;
G4double entryvertexz,undervertexz,oververtexz,distvertexz[200];
G4double zlow,zhigh,dz;
G4int nbinvertexz;
Em10RunMessenger* runMessenger;
G4int saveRndm;
};
#endif
@@ -0,0 +1,115 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10RunMessenger.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10RunMessenger_h
#define Em10RunMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10RunAction;
class G4UIdirectory;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithADouble;
class G4UIcmdWithAString;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10RunMessenger: public G4UImessenger
{
public:
Em10RunMessenger(Em10RunAction* );
~Em10RunMessenger();
void SetNewValue(G4UIcommand* ,G4String );
private:
Em10RunAction* runAction;
G4UIdirectory* plotDir;
G4UIcmdWithAString* sethistNameCmd;
G4UIcmdWithAnInteger* setnbinStepCmd;
G4UIcmdWithADouble* setSteplowCmd;
G4UIcmdWithADouble* setStephighCmd;
G4UIcmdWithAnInteger* setnbinEnCmd;
G4UIcmdWithADoubleAndUnit* setEnlowCmd;
G4UIcmdWithADoubleAndUnit* setEnhighCmd;
G4UIcmdWithAnInteger* setnbinGammaCmd;
G4UIcmdWithADoubleAndUnit* setElowGammaCmd;
G4UIcmdWithADoubleAndUnit* setEhighGammaCmd;
G4UIcmdWithAnInteger* setnbinTtCmd;
G4UIcmdWithADoubleAndUnit* setTtlowCmd;
G4UIcmdWithADoubleAndUnit* setTthighCmd;
G4UIcmdWithAnInteger* setnbinTbCmd;
G4UIcmdWithADoubleAndUnit* setTblowCmd;
G4UIcmdWithADoubleAndUnit* setTbhighCmd;
G4UIcmdWithAnInteger* setnbinTsecCmd;
G4UIcmdWithADoubleAndUnit* setTseclowCmd;
G4UIcmdWithADoubleAndUnit* setTsechighCmd;
G4UIcmdWithAnInteger* setnbinRCmd;
G4UIcmdWithADoubleAndUnit* setRlowCmd;
G4UIcmdWithADoubleAndUnit* setRhighCmd;
G4UIcmdWithAnInteger* setnbinThCmd;
G4UIcmdWithADoubleAndUnit* setThlowCmd;
G4UIcmdWithADoubleAndUnit* setThhighCmd;
G4UIcmdWithAnInteger* setnbinThbackCmd;
G4UIcmdWithADoubleAndUnit* setThlowbackCmd;
G4UIcmdWithADoubleAndUnit* setThhighbackCmd;
G4UIcmdWithAnInteger* setnbinzvertexCmd;
G4UIcmdWithADoubleAndUnit* setzlowCmd;
G4UIcmdWithADoubleAndUnit* setzhighCmd;
G4UIdirectory* RndmDir;
G4UIcmdWithAnInteger* RndmSaveCmd;
G4UIcmdWithAString* RndmReadCmd;
};
#endif
@@ -0,0 +1,125 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10StepCut.hh,v 1.2 2001/07/11 09:57:21 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
#ifndef Em10StepCut_h
#define Em10StepCut_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "G4VDiscreteProcess.hh"
#include "G4Step.hh"
class Em10StepCut : public G4VDiscreteProcess
{
public:
Em10StepCut(const G4String& processName ="UserStepCut" );
Em10StepCut(Em10StepCut &);
~Em10StepCut();
G4double PostStepGetPhysicalInteractionLength(
const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition
);
G4VParticleChange* PostStepDoIt(
const G4Track& ,
const G4Step&
);
void SetMaxStep(G4double);
protected:
// it is not needed here !
G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition
);
private:
// hide assignment operator as private
Em10StepCut & operator=(const Em10StepCut &right);
private:
G4double MaxChargedStep ;
};
// inlined function members implementation
#include "G4Step.hh"
#include "G4Track.hh"
#include "G4UserLimits.hh"
#include "G4VParticleChange.hh"
#include "G4EnergyLossTables.hh"
inline G4double Em10StepCut::PostStepGetPhysicalInteractionLength(
const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition
)
{
// condition is set to "Not Forced"
*condition = NotForced;
G4double ProposedStep = DBL_MAX;
if((MaxChargedStep > 0.) &&
(aTrack.GetVolume() != NULL) &&
(aTrack.GetVolume()->GetName() == "Absorber") &&
(aTrack.GetDynamicParticle()->GetDefinition()->GetPDGCharge() != 0.))
ProposedStep = MaxChargedStep ;
return ProposedStep;
}
inline G4VParticleChange* Em10StepCut::PostStepDoIt(
const G4Track& aTrack,
const G4Step&
)
{
// do nothing
aParticleChange.Initialize(aTrack);
return &aParticleChange;
}
inline G4double Em10StepCut::GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition
)
{
return 0.;
}
#endif
@@ -0,0 +1,68 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10SteppingAction.hh,v 1.2 2001/07/11 09:57:21 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10SteppingAction_h
#define Em10SteppingAction_h 1
#include "G4UserSteppingAction.hh"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4ios.hh"
#include "globals.hh"
class Em10DetectorConstruction;
class Em10RunAction;
class Em10EventAction;
class Em10SteppingMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10SteppingAction : public G4UserSteppingAction
{
public:
Em10SteppingAction(Em10DetectorConstruction*, Em10EventAction*,
Em10RunAction* );
~Em10SteppingAction();
void UserSteppingAction(const G4Step*);
private:
Em10DetectorConstruction* detector;
Em10EventAction* eventaction;
Em10RunAction* runaction;
Em10SteppingMessenger* steppingMessenger;
G4int IDnow,IDold;
G4int evnoold ;
};
#endif
@@ -21,40 +21,43 @@
// ********************************************************************
//
//
// $Id: Em2RunActionMessenger.hh,v 1.3.4.1 2001/06/28 19:06:51 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em10SteppingMessenger.hh,v 1.2 2001/07/11 09:57:21 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em2RunActionMessenger_h
#define Em2RunActionMessenger_h 1
#ifndef Em10SteppingMessenger_h
#define Em10SteppingMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class Em2RunAction;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em2RunActionMessenger: public G4UImessenger
class Em10SteppingAction;
class G4UIdirectory;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10SteppingMessenger: public G4UImessenger
{
public:
Em2RunActionMessenger(Em2RunAction*);
~Em2RunActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
Em10SteppingMessenger(Em10SteppingAction* );
~Em10SteppingMessenger();
void SetNewValue(G4UIcommand* ,G4String );
private:
Em2RunAction* Em2Run;
G4UIdirectory* RndmDir;
G4UIcmdWithAnInteger* RndmSaveCmd;
G4UIcmdWithAString* RndmReadCmd;
Em10SteppingAction* steppingAction;
G4UIdirectory* steppingDir;
};
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10SteppingVerbose.hh,v 1.2 2001/07/11 09:57:21 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//---------------------------------------------------------------
//
// Em10SteppingVerbose.hh
//
// Description:
// This class manages the vervose outputs in G4SteppingManager.
//
//
// Contact:
// Questions and comments to this code should be sent to
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
//
//---------------------------------------------------------------
class Em10SteppingVerbose;
#ifndef Em10SteppingVerbose_h
#define Em10SteppingVerbose_h 1
#include "G4SteppingVerbose.hh"
class Em10SteppingVerbose : public G4SteppingVerbose
{
public:
// Constructor/Destructor
Em10SteppingVerbose();
~Em10SteppingVerbose();
void StepInfo();
void TrackingStarted();
};
#endif
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10VisManager.hh,v 1.2 2001/07/11 09:57:21 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
// Example Visualization Manager implementing virtual function
// RegisterGraphicsSystems. Exploits C-pre-processor variables
// G4VIS_USE_DAWN, etc., which are set by the GNUmakefiles if
// environment variables of the same name are set.
// So all you have to do is set environment variables and compile and
// instantiate this in your main().
// Alternatively, you can implement an empty function here and just
// register the systems you want in your main(), e.g.:
// G4VisManager* myVisManager = new MyVisManager;
// myVisManager -> RegisterGraphicsSystem (new MyGraphicsSystem);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10VisManager_h
#define Em10VisManager_h 1
#include "G4VisManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10VisManager: public G4VisManager
{
public:
Em10VisManager ();
private:
void RegisterGraphicsSystems ();
};
#endif
@@ -0,0 +1,54 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: TRTDetectorConstruction.hh,v 1.2 2001/07/11 09:57:22 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
#ifndef TRTDetectorConstruction_h
#define TRTDetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "Randomize.hh"
class TRTTrackerSD;
class SCTTrackerSD;
class HepJamesRandom;
class TRTDetectorConstruction : public G4VUserDetectorConstruction
{
public:
TRTDetectorConstruction();
~TRTDetectorConstruction();
public:
G4VPhysicalVolume* Construct();
private:
TRTTrackerSD *TRTStrawSD;
SCTTrackerSD *SCTStripSD;
HepJamesRandom theJamesEngine;
};
#endif
@@ -0,0 +1,121 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: TRTMaterials.hh,v 1.2 2001/07/11 09:57:22 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
#ifndef TRT_MATERIALS_HH
#define TRT_MATERIALS_HH
//--------- Material definition ---------
G4double a, iz, z, density;
G4String name, symbol;
G4int nel, nComponents;
a = 14.01*g/mole;
G4Element* elN = new G4Element(name="Nitrogen", symbol="N", iz=7., a);
a = 16.00*g/mole;
G4Element* elO = new G4Element(name="Oxygen", symbol="O", iz=8., a);
a = 12.01*g/mole;
G4Element* elC = new G4Element(name="Carbon", symbol="C", iz=6., a);
a = 1.01*g/mole;
G4Element* elH = new G4Element(name="Hydrogen", symbol="H", iz=1., a);
a = 131.29*g/mole;
G4Element* elXe = new G4Element(name="Xenon", symbol="Xe", iz=54., a);
a = 19.00*g/mole;
G4Element* elF = new G4Element(name="Fluorine", symbol="F", iz=9., a);
density = 1.205*mg/cm3;
G4Material* Air = new G4Material(name="Air", density, nel=2,
kStateGas,293.15*kelvin,1.*atmosphere);
Air->AddElement(elN, .7);
Air->AddElement(elO, .3);
density = 1.39*g/cm3;
G4Material* Kapton = new G4Material(name="Kapton", density, nel=3);
Kapton->AddElement(elO,2);
Kapton->AddElement(elC,5);
Kapton->AddElement(elH,4);
a = 63.55*g/mole;
density = 8.96*g/cm3;
G4Material* Copper = new G4Material(name="Copper", z=29.,a, density);
a = 26.98*g/mole;
density = 2.7*g/cm3;
G4Material* Al = new G4Material(name="Aluminum", z=13., a, density);
a = 28.09*g/mole;
density = 2.33*g/cm3;
G4Material* Si = new G4Material(name="Silicon", z=14., a, density);
density = 1.977*mg/cm3;
G4Material* CO2 = new G4Material(name="CO2", density, nel=2,
kStateGas,273.15*kelvin,1.*atmosphere);
CO2->AddElement(elC,1);
CO2->AddElement(elO,2);
G4double TRT_Xe_density = 5.485*mg/cm3;
G4Material* TRT_Xe = new G4Material(name="TRT_Xe", TRT_Xe_density, nel=1,
kStateGas,293.15*kelvin,1.*atmosphere);
TRT_Xe->AddElement(elXe,1);
G4double TRT_CO2_density = 1.842*mg/cm3;
G4Material* TRT_CO2 = new G4Material(name="TRT_CO2", TRT_CO2_density, nel=2,
kStateGas,293.15*kelvin,1.*atmosphere);
TRT_CO2->AddElement(elC,1);
TRT_CO2->AddElement(elO,2);
G4double TRT_CF4_density = 3.9*mg/cm3;
G4Material* TRT_CF4 = new G4Material(name="TRT_CF4", TRT_CF4_density, nel=2,
kStateGas,293.15*kelvin,1.*atmosphere);
TRT_CF4->AddElement(elC,1);
TRT_CF4->AddElement(elF,4);
G4double XeCO2CF4_density = 4.76*mg/cm3;
G4Material* XeCO2CF4 = new G4Material(name="XeCO2CF4", XeCO2CF4_density,
nComponents=3,
kStateGas,293.15*kelvin,1.*atmosphere);
XeCO2CF4->AddMaterial(TRT_Xe,0.807);
XeCO2CF4->AddMaterial(TRT_CO2,0.039);
XeCO2CF4->AddMaterial(TRT_CF4,0.154);
density = 0.935*g/cm3;
G4Material* TRT_CH2 = new G4Material(name="TRT_CH2",density, nel=2);
TRT_CH2->AddElement(elC,1);
TRT_CH2->AddElement(elH,2);
density = 0.059*g/cm3;
G4Material* Radiator = new G4Material(name="Radiator",density, nel=2);
Radiator->AddElement(elC,1);
Radiator->AddElement(elH,2);
density = 0.145*g/cm3;
G4Material* CarbonFiber = new G4Material(name="CarbonFiber",density, nel=1);
CarbonFiber->AddElement(elC,1);
#endif
@@ -0,0 +1,10 @@
#
# Macro file for the initialization phase of "TestEm10.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
/run/verbose 2
#
#
@@ -0,0 +1,37 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
/run/initialize
#
/calor/setAbsMat Gold
/calor/setAbsThick 9.658e-3 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
# hist file name
/plots/sethistName geant4.plot01
# PLOT: angle distr. of transmitted particles
/plots/setnbinTh 100
/plots/setThlow 0.0 deg
/plots/setThhigh 10.0 deg
#
/calor/cutG 13.0 micrometer
/calor/cutE 1.12 micrometer
/run/initialize
/run/particle/dumpCutValues
#
#
/gun/particle e-
/gun/energy 15.7 MeV
#
/run/beamOn 1000000
#
#
@@ -0,0 +1,39 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
/run/initialize
#
/calor/setAbsMat Gold
/calor/setAbsThick 9.658e-3 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
# hist file name
/plots/sethistName geant4.plot01a
# PLOT: angle distr. of transmitted particles
/plots/setnbinTh 60
/plots/setThlow 0.0 deg
/plots/setThhigh 30.0 deg
#
/calor/cutG 13.0 micrometer
/calor/cutE 1.12 micrometer
/run/initialize
/run/particle/dumpCutValues
#
#
/gun/particle e-
/gun/energy 15.7 MeV
#
/run/beamOn 4186
/tracking/verbose 1
/run/beamOn 1
#
#
@@ -0,0 +1,38 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
/run/initialize
#
/calor/setAbsMat Gold
/calor/setAbsThick 9.658e-3 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
# hist file name
/plots/sethistName geant4.plot01
# PLOT: angle distr. of transmitted particles
/plots/setnbinTh 100
/plots/setThlow 0.0 deg
/plots/setThhigh 10.0 deg
#
/calor/cutG 13.0 micrometer
/calor/cutE 1.12 micrometer
/run/initialize
/run/particle/dumpCutValues
#
#
/gun/particle e-
/gun/energy 15.7 MeV
#
/event/verbose 1
/run/beamOn 100000
#
#
@@ -0,0 +1,37 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
/run/initialize
#
/calor/setAbsMat Gold
/calor/setAbsThick 19.296e-3 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
# hist file name
/plots/sethistName geant4.plot02
# PLOT: angle distr. of transmitted particles
/plots/setnbinTh 100
/plots/setThlow 0.0 deg
/plots/setThhigh 10.0 deg
#
/calor/cutG 13.0 micrometer
/calor/cutE 1.12 micrometer
/run/initialize
/run/particle/dumpCutValues
#
#
/gun/particle e-
/gun/energy 15.7 MeV
#
/run/beamOn 1000000
#
#
@@ -0,0 +1,37 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
/run/initialize
#
/calor/setAbsMat Gold
/calor/setAbsThick 19.296e-3 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
# hist file name
/plots/sethistName geant4.plot02a
# PLOT: angle distr. of transmitted particles
/plots/setnbinTh 60
/plots/setThlow 0.0 deg
/plots/setThhigh 30.0 deg
#
/calor/cutG 13.0 micrometer
/calor/cutE 1.12 micrometer
/run/initialize
/run/particle/dumpCutValues
#
#
/gun/particle e-
/gun/energy 15.7 MeV
#
/run/beamOn 1000000
#
#
@@ -0,0 +1,36 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
/run/initialize
#
/calor/setAbsMat Silicon
/calor/setAbsThick 50.000e-3 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
# hist file name
/plots/sethistName geant4.plot03
# PLOT: angle distr. of transmitted particles
/plots/setnbinTh 60
/plots/setThlow 0.0 deg
/plots/setThhigh 6.0 deg
#
/calor/cutG 2130.0 micrometer
/calor/cutE 7.000 micrometer
/run/initialize
/run/particle/dumpCutValues
#
/gun/particle proton
/gun/energy 6.56 MeV
#
/run/beamOn 100000
#
#
@@ -0,0 +1,36 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
/run/initialize
#
/calor/setAbsMat Silicon
/calor/setAbsThick 92.600e-3 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
# hist file name
/plots/sethistName geant4.plot04
# PLOT: angle distr. of transmitted particles
/plots/setnbinTh 60
/plots/setThlow 0.0 deg
/plots/setThhigh 6.0 deg
#
/calor/cutG 2130.0 micrometer
/calor/cutE 7.000 micrometer
/run/initialize
/run/particle/dumpCutValues
#
/gun/particle proton
/gun/energy 6.56 MeV
#
/run/beamOn 100000
#
#
@@ -0,0 +1,39 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
/run/initialize
#
/calor/setAbsMat Aluminium
/calor/setAbsThick 4.005 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
#
# hist file name
/plots/sethistName geant4.plot05
# PLOT: angle distr. of transmitted particles
/plots/setnbinTh 100
/plots/setThlow 0.0 deg
/plots/setThhigh 0.01 deg
#
/calor/cutG 2250.0 micrometer
/calor/cutE 6.050 micrometer
/run/initialize
/run/particle/dumpCutValues
#
#
/gun/particle proton
# momentum 70 GeV/c ....
/gun/energy 69068. MeV
#
/run/beamOn 100000
#
#
@@ -0,0 +1,95 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
# /run/setdefault
# /run/setintegral
# /run/setcontonly
# /run/setionplus
/run/setdefault
/run/setminDeltaEnergy 1. keV
# /run/setdRoverR 0.001
# /run/setfinalR 0.001 mm
#
# PLOT: nb of steps ....................................................
/plots/setnbinStep 100
/plots/setSteplow 0.
/plots/setStephigh 2000.
# PLOT: sum of tracklength of charged particles .........................
/plots/setnbinTl 0
/plots/setTllow 0.0 mm
/plots/setTlhigh 3.0 mm
# PLOT: energy deposit distribution in absorber............................
/plots/setnbinEn 0
/plots/setEnlow 0.0 MeV
/plots/setEnhigh 1.50 MeV
# PLOT: energy of transmitted particles (with quantum numbers of the primary)
/plots/setnbinTt 0
/plots/setTtlow 0.0 MeV
/plots/setTthigh 1.0 MeV
# PLOT: angle distr. of transmitted particles
/plots/setnbinTh 0
/plots/setThlow 0.0 deg
/plots/setThhigh 90. deg
# PLOT: lateral displacement for transmitted particles at exit
/plots/setnbinR 0
/plots/setRlow 0.0 mm
/plots/setRhigh 2.0 mm
# PLOT: energy of backscattered particles (with quantum numbers of the primary)
/plots/setnbinTb 0
/plots/setTblow 0.0 MeV
/plots/setTbhigh 1.0 MeV
# PLOT: angle distr. of backscattered particles
/plots/setnbinThback 0
/plots/setThlowback 0.0 deg
/plots/setThhighback 90.0 deg
# PLOT: energy spectrum of charged secondaries
/plots/setnbinTsec 0
/plots/setTseclow 0.00 MeV
/plots/setTsechigh 0.50 MeV
# PLOT: z coord. of e+/e- production
/plots/setnbinzvertex 0
/plots/setzlow -0.500 mm
/plots/setzhigh 0.500 mm
# PLOT: energy spectrum of photons escaping the absorber (forward)
/plots/setnbinGamma 0
/plots/setElowGamma 1.0 keV
/plots/setEhighGamma 1000.0 keV
#
/run/initialize
/calor/setAbsMat Aluminium
#
/calor/setAbsThick 20.0 m
/calor/setAbsRad 10.00 m
/calor/update
#
# /event/setsignoise 3.8 keV
# /event/setcutlow 0.0 keV
#
/calor/cutG 2.2 mm
/calor/cutE 6.05 micrometer
/run/initialize
/run/particle/dumpCutValues
#
#
/gun/particle e-
/gun/energy 100. MeV
/gun/xvertex 0.000 mm
/gun/yvertex 0.000 mm
/gun/zvertex -5.000 m
#
/tracking/verbose 0
/stepping/setprintlimit 1000
/event/setverbose 0
/stepping/setverbose 0
/stepping/setnbofevents 0
/stepping/seteventno 99
#
/run/beamOn 10
#
@@ -0,0 +1,71 @@
#
# Macro file 'run11.mac' for the initialization phase of "TestEm10.cc"
#
/control/verbose 2
#
#control/saveHistory
#
/run/verbose 2
#
#/run/initialize
#
# Parameters of MWPC detector: material and its thickness
# Xe55He15CH4, Xe10CH4, Xe20CH4, Xe5CH4, Xe20CO2, Kr20CO2
# Kr7CH4, Ar7CH4, XeArCH4
#
/XTRdetector/setAbsMat Xe20CO2
/XTRdetector/setAbsThick 3.0 mm
/XTRdetector/setWorldZ 4000.0 mm
#
# Parameters of Radiator (default mm)
# TRT_CH2, Radiator, CarbonFiber, Li, Be, Mylar, Kapton ?, CH2
# Air, CO2, He, Ne, Kr, Ar, Xe,
#
/XTRdetector/setRadMat CH2
/XTRdetector/setWorldMat Air
/XTRdetector/setRadThick 0.02 mm
/XTRdetector/setGasGapThick 0.2 mm
/XTRdetector/setFoilNum 200
#
# Selection of XTR parametrisation model: 1-10
# TRmodel/XTRdEdx: Foam 1/2, GamDistr 3/4, Irr 5/6, Plate 7/8, Reg 9/10
#
/XTRdetector/setModel 10
#
# Update geometry after changing its parametrs
#
#/XTRdetector/update
# window: Myalr 51 micron
# PLOT: energy deposit distribution in absorber (g4.11)
#
/plots/sethistName g4.p11
/plots/setnbinEn 40
/plots/setEnlow 0.0 MeV
/plots/setEnhigh 0.02 MeV
#
#
/run/initialize
/run/particle/dumpCutValues
#
# Particle and its energy
#
/gun/particle e-
#
/gun/energy 40000.0 MeV
#
#/tracking/verbose 2
#
/event/printModulo 100
/run/beamOn 1000
#
#
@@ -0,0 +1,36 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
/run/initialize
#
/calor/setAbsMat Silicon
/calor/setAbsThick 105.0e-3 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
# hist file name
/plots/sethistName geant4.plot12
# PLOT: energy deposit distribution in absorber............................
/plots/setnbinEn 55
/plots/setEnlow 0.0 MeV
/plots/setEnhigh 1.1 MeV
#
/calor/cutG 2.13 mm
/calor/cutE 7.00 micrometer
/run/initialize
/run/particle/dumpCutValues
#
/gun/particle e-
/gun/energy 1.00 MeV
#
/run/beamOn 1000000
#
#
@@ -0,0 +1,36 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
/run/initialize
#
/calor/setAbsMat Silicon
/calor/setAbsThick 191.0e-3 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
# hist file name
/plots/sethistName geant4.plot13
# PLOT: energy deposit distribution in absorber............................
/plots/setnbinEn 55
/plots/setEnlow 0.0 MeV
/plots/setEnhigh 1.1 MeV
#
/calor/cutG 2.13 mm
/calor/cutE 7.00 micrometer
/run/initialize
/run/particle/dumpCutValues
#
/gun/particle e-
/gun/energy 1.00 MeV
#
/run/beamOn 1000000
#
#
@@ -0,0 +1,36 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
/run/initialize
#
/calor/setAbsMat Silicon
/calor/setAbsThick 530.0e-3 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
# hist file name
/plots/sethistName geant4.plot14
# PLOT: energy deposit distribution in absorber............................
/plots/setnbinEn 55
/plots/setEnlow 0.0 MeV
/plots/setEnhigh 1.1 MeV
#
/calor/cutG 2.13 mm
/calor/cutE 7.00 micrometer
/run/initialize
/run/particle/dumpCutValues
#
/gun/particle e-
/gun/energy 1.00 MeV
#
/run/beamOn 1000000
#
#
@@ -0,0 +1,36 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
/run/initialize
#
/calor/setAbsMat Silicon
/calor/setAbsThick 1000.0e-3 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
# hist file name
/plots/sethistName geant4.plot15
# PLOT: energy deposit distribution in absorber............................
/plots/setnbinEn 55
/plots/setEnlow 0.0 MeV
/plots/setEnhigh 1.1 MeV
#
/calor/cutG 2.13 mm
/calor/cutE 7.00 micrometer
/run/initialize
/run/particle/dumpCutValues
#
/gun/particle e-
/gun/energy 1.00 MeV
#
/run/beamOn 1000000
#
#
@@ -0,0 +1,36 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
/run/initialize
#
/calor/setAbsMat Silicon
/calor/setAbsThick 3000.0e-3 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
# hist file name
/plots/sethistName geant4.plot16
# PLOT: energy deposit distribution in absorber............................
/plots/setnbinEn 55
/plots/setEnlow 0.0 MeV
/plots/setEnhigh 1.1 MeV
#
/calor/cutG 2.13 mm
/calor/cutE 7.00 micrometer
/run/initialize
/run/particle/dumpCutValues
#
/gun/particle e-
/gun/energy 1.00 MeV
#
/run/beamOn 1000000
#
#
@@ -0,0 +1,93 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
# /run/setdefault
# /run/setintegral
# /run/setcontonly
# /run/setionplus
/run/setdefault
/run/setminDeltaEnergy 1. keV
/run/setdRoverR 0.050
/run/setfinalR 0.001 mm
#
# PLOT: nb of steps ....................................................
/plots/setnbinStep 100
/plots/setSteplow 0.
/plots/setStephigh 100.
# PLOT: sum of tracklength of charged particles .........................
/plots/setnbinTl 50
/plots/setTllow 0.0 mm
/plots/setTlhigh 1.0 mm
# PLOT: energy deposit distribution in absorber............................
/plots/setnbinEn 60
/plots/setEnlow 0.0 MeV
/plots/setEnhigh 1.20 MeV
# PLOT: energy of transmitted particles (with quantum numbers of the primary)
/plots/setnbinTt 50
/plots/setTtlow 0.0 MeV
/plots/setTthigh 1.0 MeV
# PLOT: angle distr. of transmitted particles
/plots/setnbinTh 30
/plots/setThlow 0.0 deg
/plots/setThhigh 90. deg
# PLOT: lateral displacement for transmitted particles at exit
/plots/setnbinR 50
/plots/setRlow 0.0 mm
/plots/setRhigh 0.25 mm
# PLOT: energy of backscattered particles (with quantum numbers of the primary)
/plots/setnbinTb 50
/plots/setTblow 0.0 MeV
/plots/setTbhigh 1.0 MeV
# PLOT: andle distr. of backscattered particles
/plots/setnbinThback 30
/plots/setThlowback 0.0 deg
/plots/setThhighback 90.0 deg
# PLOT: energy spectrum of charged secondaries
/plots/setnbinTsec 100
/plots/setTseclow 0.00 MeV
/plots/setTsechigh 0.50 MeV
# PLOT: z coord. of e+/e- production
/plots/setnbinzvertex 100
/plots/setzlow -0.0500 mm
/plots/setzhigh 0.0500 mm
# PLOT: energy spectrum of photons escaping the absorber (forward)
/plots/setnbinGamma 100
/plots/setElowGamma 1.0 keV
/plots/setEhighGamma 1000.0 keV
#
/run/initialize
/calor/setAbsMat Gold
#
/calor/setAbsThick 0.10 mm
/calor/setAbsRad 10.00 mm
/calor/update
#
# /event/setsignoise 3.8 keV
# /event/setcutlow 0.0 keV
#
/run/particle/setCut 0.0001000 mm
/run/initialize
/run/particle/dumpCutValues
#
/gun/particle e-
/gun/energy 1. MeV
/gun/xvertex 0.000 mm
/gun/yvertex 0.000 mm
/gun/zvertex -0.0500 mm
#
/tracking/verbose 0
/stepping/setprintlimit 1000
/event/setverbose 0
/stepping/setverbose 0
/stepping/setnbofevents 0
/stepping/seteventno 99
#
/run/beamOn 10000
#
@@ -0,0 +1,37 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
# hist file name
/plots/sethistName geant4.plot21
# PLOT: gamma energy at exit
/plots/setnbinGamma 80
/plots/setElowGamma 0.1 MeV
/plots/setEhighGamma 1. GeV
#
/run/initialize
#
/calor/setAbsMat Aluminium
/calor/setAbsThick 5.30 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
/calor/cutG 1.00 mm
/calor/cutE 5.0 micrometer
/run/initialize
/run/particle/dumpCutValues
#
#
/gun/particle e-
/gun/energy 25. GeV
#
/run/beamOn 100000
#
#
@@ -0,0 +1,37 @@
#
# Macro file for the initialization phase of "TestEm5.cc"
#
# It creates the default geometry (simple absorber cylinder )
#
/control/verbose 2
#control/saveHistory
/run/verbose 2
#
# hist file name
/plots/sethistName geant4.plot22
# PLOT: gamma energy at exit
/plots/setnbinGamma 80
/plots/setElowGamma 0.1 MeV
/plots/setEhighGamma 1. GeV
#
/run/initialize
#
/calor/setAbsMat Lead
/calor/setAbsThick 0.15 mm
/calor/setAbsRad 100.0 mm
/calor/update
#
/calor/cutG 1.00 mm
/calor/cutE 5.0 micrometer
/run/initialize
/run/particle/dumpCutValues
#
#
/gun/particle e-
/gun/energy 25. GeV
#
/run/beamOn 1000000
#
#
@@ -0,0 +1,79 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10CalorHit.cc,v 1.2 2001/07/11 09:57:23 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "Em10CalorHit.hh"
G4Allocator<Em10CalorHit> Em10CalorHitAllocator;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em10CalorHit::Em10CalorHit()
{
EdepAbs = 0.; TrackLengthAbs = 0.;
EdepGap = 0.; TrackLengthGap = 0.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em10CalorHit::~Em10CalorHit()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em10CalorHit::Em10CalorHit(const Em10CalorHit& right)
{
EdepAbs = right.EdepAbs; TrackLengthAbs = right.TrackLengthAbs;
EdepGap = right.EdepGap; TrackLengthGap = right.TrackLengthGap;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
const Em10CalorHit& Em10CalorHit::operator=(const Em10CalorHit& right)
{
EdepAbs = right.EdepAbs; TrackLengthAbs = right.TrackLengthAbs;
EdepGap = right.EdepGap; TrackLengthGap = right.TrackLengthGap;
return *this;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
int Em10CalorHit::operator==(const Em10CalorHit& right) const
{
return 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10CalorHit::Print()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,131 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10CalorimeterSD.cc,v 1.2 2001/07/11 09:57:23 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "Em10CalorimeterSD.hh"
#include "Em10CalorHit.hh"
#include "Em10DetectorConstruction.hh"
#include "G4VPhysicalVolume.hh"
#include "G4Step.hh"
#include "G4VTouchable.hh"
#include "G4TouchableHistory.hh"
#include "G4SDManager.hh"
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em10CalorimeterSD::Em10CalorimeterSD(G4String name,
Em10DetectorConstruction* det)
:G4VSensitiveDetector(name),Detector(det)
{
collectionName.insert("CalCollection");
HitID = new G4int[500];
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em10CalorimeterSD::~Em10CalorimeterSD()
{
delete [] HitID;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10CalorimeterSD::Initialize(G4HCofThisEvent*HCE)
{
CalCollection = new Em10CalorHitsCollection
(SensitiveDetectorName,collectionName[0]);
for (G4int j=0;j<1; j++) {HitID[j] = -1;};
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool Em10CalorimeterSD::ProcessHits(G4Step* aStep,G4TouchableHistory* ROhist)
{
G4double edep = aStep->GetTotalEnergyDeposit();
G4double stepl = 0.;
if (aStep->GetTrack()->GetDefinition()->GetPDGCharge() != 0.)
stepl = aStep->GetStepLength();
if ((edep==0.)&&(stepl==0.)) return false;
G4TouchableHistory* theTouchable
= (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable());
G4VPhysicalVolume* physVol = theTouchable->GetVolume();
//theTouchable->MoveUpHistory();
G4int Em10Number = 0 ;
if (HitID[Em10Number]==-1)
{
Em10CalorHit* calHit = new Em10CalorHit();
if (physVol == Detector->GetAbsorber()) calHit->AddAbs(edep,stepl);
HitID[Em10Number] = CalCollection->insert(calHit) - 1;
if (verboseLevel>0)
G4cout << " New Calorimeter Hit on Em10: " << Em10Number << G4endl;
}
else
{
if (physVol == Detector->GetAbsorber())
(*CalCollection)[HitID[Em10Number]]->AddAbs(edep,stepl);
if (verboseLevel>0)
G4cout << " Energy added to Em10: " << Em10Number << G4endl;
}
return true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10CalorimeterSD::EndOfEvent(G4HCofThisEvent* HCE)
{
static G4int HCID = -1;
if(HCID<0)
{ HCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]); }
HCE->AddHitsCollection(HCID,CalCollection);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10CalorimeterSD::clear()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10CalorimeterSD::PrintAll()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,908 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10DetectorConstruction.cc,v 1.7 2001/11/21 18:48:56 mverderi Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
#include "Em10DetectorConstruction.hh"
#include "Em10DetectorMessenger.hh"
#include "Em10CalorimeterSD.hh"
#include "G4VXrayTRmodel.hh"
#include "G4VXrayTRadModel.hh"
#include "G4IrregularXrayTRmodel.hh"
#include "G4FoamXrayTRmodel.hh"
#include "G4RegularXrayTRmodel.hh"
#include "G4GamDistrXrayTRmodel.hh"
#include "G4PlateIrrGasXrayTRmodel.hh"
#include "G4VXTRdEdx.hh"
#include "G4IrregularXTRdEdx.hh"
#include "G4FoamXTRdEdx.hh"
#include "G4RegularXTRdEdx.hh"
#include "G4GamDistrXTRdEdx.hh"
#include "G4PlateIrrGasXTRdEdx.hh"
#include "G4Material.hh"
#include "G4Box.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4UniformMagField.hh"
#include "G4FieldManager.hh"
#include "G4TransportationManager.hh"
#include "G4SDManager.hh"
#include "G4RunManager.hh"
#include "G4FastSimulationManager.hh"
#include "G4ios.hh"
/////////////////////////////////////////////////////////////////////////////
//
//
Em10DetectorConstruction::Em10DetectorConstruction()
:worldchanged(false), AbsorberMaterial(0), fGapMat(0),
WorldMaterial(0), solidWorld(0), logicWorld(0), physiWorld(0),
fSolidRadSlice(0), fLogicRadSlice(0), fPhysicRadSlice(0),
solidRadiator(0), logicRadiator(0), physiRadiator(0),
fRadiatorMat(0),
solidAbsorber(0), logicAbsorber(0), physiAbsorber(0),
magField(0), calorimeterSD(0), fXTRModel(0)
{
// default parameter values of the calorimeter
WorldSizeZ = 80.*cm;
WorldSizeR = 20.*cm;
// Radiator and detector parameters
fRadThickness = 40.0*micrometer ; // 25*micrometer ;
fGasGap = 0.126*mm ; // 1500*micrometer ;
fFoilNumber = 300 ; // 188 ;
AbsorberThickness = 3.0*cm ; // 40.0*mm ;
AbsorberRadius = 10.*cm;
zAbsorber = 36.*cm ;
fWindowThick = 51.0*micrometer ;
fElectrodeThick = 10.0*micrometer ;
fGapThick = 1.0*mm ;
fDetThickness = 40.0*mm ;
fDetLength = 200.0*cm ;
fDetGap = 1.0*mm ;
fStartR = 40.0*cm ;
fStartZ = 50.0*mm ;
fModuleNumber = 1 ;
// create commands for interactive definition of the calorimeter
detectorMessenger = new Em10DetectorMessenger(this);
}
//////////////////////////////////////////////////////////////////////////
//
//
Em10DetectorConstruction::~Em10DetectorConstruction()
{
delete detectorMessenger;
if(fXTRModel) delete fXTRModel;
}
//////////////////////////////////////////////////////////////////////////
//
//
G4VPhysicalVolume* Em10DetectorConstruction::Construct()
{
DefineMaterials();
return ConstructCalorimeter();
}
//////////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorConstruction::DefineMaterials()
{
//This function illustrates the possible ways to define materials
G4String name, symbol ; //a =mass of a mole;
G4double a, z, density ; //z =mean number of protons;
//G4int iz, n, nel ; //iz=number of protons in an isotope;
//n =number of nucleons in an isotope;
G4int nel ;
//G4int ncomponents, natoms;
G4int ncomponents;
//G4double abundance, fractionmass;
G4double fractionmass;
//G4double temperature, pressure;
//
// define Elements
//
a = 1.01*g/mole;
G4Element* elH = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
a = 6.94*g/mole;
G4Element* elLi = new G4Element(name="Lithium",symbol="Li" , z= 3., a);
a = 9.01*g/mole;
G4Element* elBe = new G4Element(name="Berillium",symbol="Be" , z= 4., a);
a = 6.01*g/mole;
G4Element* elC = new G4Element(name="Carbon", symbol="C", z=6., a);
a = 14.01*g/mole;
G4Element* elN = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
a = 16.00*g/mole;
G4Element* elO = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
a = 39.948*g/mole;
G4Element* elAr = new G4Element(name="Argon", symbol="Ar", z=18., a);
a = 131.29*g/mole;
G4Element* elXe = new G4Element(name="Xenon", symbol="Xe", z=54., a);
a = 19.00*g/mole;
G4Element* elF = new G4Element(name="Fluorine", symbol="F", z=9., a);
/////////////////////////////////////////////////////////////////
//
// Detector windows, electrodes
// Al for electrodes
density = 2.700*g/cm3;
a = 26.98*g/mole;
G4Material* Al = new G4Material(name="Aluminium", z=13., a, density);
////////////////////////////////////////////////////////////////////////////
//
// Materials for popular X-ray TR radiators
//
// TRT_CH2
density = 0.935*g/cm3;
G4Material* TRT_CH2 = new G4Material(name="TRT_CH2",density, nel=2);
TRT_CH2->AddElement(elC,1);
TRT_CH2->AddElement(elH,2);
// Radiator
density = 0.059*g/cm3;
G4Material* Radiator = new G4Material(name="Radiator",density, nel=2);
Radiator->AddElement(elC,1);
Radiator->AddElement(elH,2);
// Carbon Fiber
density = 0.145*g/cm3;
G4Material* CarbonFiber = new G4Material(name="CarbonFiber",density, nel=1);
CarbonFiber->AddElement(elC,1);
// Lithium
density = 0.534*g/cm3;
G4Material* Li = new G4Material(name="Li",density, nel=1);
Li->AddElement(elLi,1);
// Beryllium
density = 1.848*g/cm3;
G4Material* Be = new G4Material(name="Be",density, nel=1);
Be->AddElement(elBe,1);
// Mylar
density = 1.39*g/cm3;
G4Material* Mylar = new G4Material(name="Mylar", density, nel=3);
Mylar->AddElement(elO,2);
Mylar->AddElement(elC,5);
Mylar->AddElement(elH,4);
// Kapton (polyimide) ??? since = Mylar C5H4O2
density = 1.39*g/cm3;
G4Material* Kapton = new G4Material(name="Kapton", density, nel=3);
Kapton->AddElement(elO,2);
Kapton->AddElement(elC,5);
Kapton->AddElement(elH,4);
// Polypropelene
G4Material* CH2 = new G4Material ("Polypropelene" , 0.91*g/cm3, 2);
CH2->AddElement(elH,2);
CH2->AddElement(elC,1);
//////////////////////////////////////////////////////////////////////////
//
// Noble gases , STP conditions
// Helium as detector gas, STP
density = 0.178*mg/cm3 ;
a = 4.0026*g/mole ;
G4Material* He = new G4Material(name="He",z=2., a, density );
// Neon as detector gas, STP
density = 0.900*mg/cm3 ;
a = 20.179*g/mole ;
G4Material* Ne = new G4Material(name="Ne",z=10., a, density );
// Argon as detector gas, STP
density = 1.7836*mg/cm3 ; // STP
G4Material* Argon = new G4Material(name="Argon" , density, ncomponents=1);
Argon->AddElement(elAr, 1);
// Krypton as detector gas, STP
density = 3.700*mg/cm3 ;
a = 83.80*g/mole ;
G4Material* Kr = new G4Material(name="Kr",z=36., a, density );
// Xenon as detector gas, STP
density = 5.858*mg/cm3 ;
a = 131.29*g/mole ;
G4Material* Xe = new G4Material(name="Xenon",z=54., a, density );
/////////////////////////////////////////////////////////////////////////////
//
// Hydrocarbones, metane and others
// Metane, STP
density = 0.7174*mg/cm3 ;
G4Material* metane = new G4Material(name="CH4",density,nel=2) ;
metane->AddElement(elC,1) ;
metane->AddElement(elH,4) ;
// Propane, STP
density = 2.005*mg/cm3 ;
G4Material* propane = new G4Material(name="C3H8",density,nel=2) ;
propane->AddElement(elC,3) ;
propane->AddElement(elH,8) ;
// iso-Butane (methylpropane), STP
density = 2.67*mg/cm3 ;
G4Material* isobutane = new G4Material(name="isoC4H10",density,nel=2) ;
isobutane->AddElement(elC,4) ;
isobutane->AddElement(elH,10) ;
///////////////////////////////////////////////////////////////////////////
//
// Molecular gases
// Carbon dioxide
density = 1.977*mg/cm3;
G4Material* CO2 = new G4Material(name="CO2", density, nel=2,
kStateGas,273.15*kelvin,1.*atmosphere);
CO2->AddElement(elC,1);
CO2->AddElement(elO,2);
// Carbon dioxide, STP
density = 1.977*mg/cm3;
G4Material* CarbonDioxide = new G4Material(name="CO2", density, nel=2);
CarbonDioxide->AddElement(elC,1);
CarbonDioxide->AddElement(elO,2);
// Nitrogen, STP
density = 1.25053*mg/cm3 ; // STP
G4Material* Nitrogen = new G4Material(name="N2" , density, ncomponents=1);
Nitrogen->AddElement(elN, 2);
// Oxygen, STP
density = 1.4289*mg/cm3 ; // STP
G4Material* Oxygen = new G4Material(name="O2" , density, ncomponents=1);
Oxygen->AddElement(elO, 2);
/* *****************************
density = 1.25053*mg/cm3 ; // STP
a = 14.01*g/mole ; // get atomic weight !!!
// a = 28.016*g/mole;
G4Material* N2 = new G4Material(name="Nitrogen", z= 7.,a,density) ;
density = 1.25053*mg/cm3 ; // STP
G4Material* anotherN2 = new G4Material(name="anotherN2", density,ncomponents=2);
anotherN2->AddElement(elN, 1);
anotherN2->AddElement(elN, 1);
// air made from oxigen and nitrogen only
density = 1.290*mg/cm3; // old air from elements
G4Material* air = new G4Material(name="air" , density, ncomponents=2);
air->AddElement(elN, fractionmass=0.7);
air->AddElement(elO, fractionmass=0.3);
******************************************** */
// Dry Air (average composition), STP
density = 1.2928*mg/cm3 ; // STP
G4Material* Air = new G4Material(name="Air" , density, ncomponents=3);
Air->AddMaterial( Nitrogen, fractionmass = 0.7557 ) ;
Air->AddMaterial( Oxygen, fractionmass = 0.2315 ) ;
Air->AddMaterial( Argon, fractionmass = 0.0128 ) ;
////////////////////////////////////////////////////////////////////////////
//
// MWPC mixtures
// 80% Xe + 20% CO2, STP
density = 5.0818*mg/cm3 ;
G4Material* Xe20CO2 = new G4Material(name="Xe20CO2" , density, ncomponents=2);
Xe20CO2->AddMaterial( Xe, fractionmass = 0.922 ) ;
Xe20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.078 ) ;
// 80% Kr + 20% CO2, STP
density = 3.601*mg/cm3 ;
G4Material* Kr20CO2 = new G4Material(name="Kr20CO2", density,
ncomponents=2);
Kr20CO2->AddMaterial( Kr, fractionmass = 0.89 ) ;
Kr20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.11 ) ;
// Xe + 55% He + 15% CH4 ; NIM A294 (1990) 465-472; STP
density = 1.963*mg/cm3;
G4Material* Xe55He15CH4 = new G4Material(name="Xe55He15CH4",density,
ncomponents=3);
Xe55He15CH4->AddMaterial(Xe, 0.895);
Xe55He15CH4->AddMaterial(He, 0.050);
Xe55He15CH4->AddMaterial(metane,0.055);
// 90% Xe + 10% CH4, STP ; NIM A248 (1986) 379-388
density = 5.344*mg/cm3 ;
G4Material* Xe10CH4 = new G4Material(name="Xe10CH4" , density,
ncomponents=2);
Xe10CH4->AddMaterial( Xe, fractionmass = 0.987 ) ;
Xe10CH4->AddMaterial( metane, fractionmass = 0.013 ) ;
// 95% Xe + 5% CH4, STP ; NIM A214 (1983) 261-268
density = 5.601*mg/cm3 ;
G4Material* Xe5CH4 = new G4Material(name="Xe5CH4" , density,
ncomponents=2);
Xe5CH4->AddMaterial( Xe, fractionmass = 0.994 ) ;
Xe5CH4->AddMaterial( metane, fractionmass = 0.006 ) ;
// 80% Xe + 20% CH4, STP ; NIM A253 (1987) 235-244
density = 4.83*mg/cm3 ;
G4Material* Xe20CH4 = new G4Material(name="Xe20CH4" , density,
ncomponents=2);
Xe20CH4->AddMaterial( Xe, fractionmass = 0.97 ) ;
Xe20CH4->AddMaterial( metane, fractionmass = 0.03 ) ;
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
// default materials of the calorimeter and TR radiator
fRadiatorMat = Li ; // CH2 Mylar ;
fWindowMat = Mylar ;
fElectrodeMat = Al ;
AbsorberMaterial = Xe10CH4 ;
fGapMat = Xe10CH4 ;
WorldMaterial = He ;
}
/////////////////////////////////////////////////////////////////////////
//
//
G4VPhysicalVolume* Em10DetectorConstruction::ConstructCalorimeter()
{
// G4int i, j ;
G4int j ;
// G4double zModule, zRadiator, rModule, rRadiator ;
G4double zModule, zRadiator ;
// complete the Calor parameters definition and Print
ComputeCalorParameters();
PrintCalorParameters();
// World
if(solidWorld) delete solidWorld ;
if(logicWorld) delete logicWorld ;
if(physiWorld) delete physiWorld ;
solidWorld = new G4Box("World", //its name
WorldSizeR,WorldSizeR,WorldSizeZ/2.) ;//its size
logicWorld = new G4LogicalVolume(solidWorld, //its solid
WorldMaterial, //its material
"World"); //its name
physiWorld = new G4PVPlacement(0, //no rotation
G4ThreeVector(), //at (0,0,0)
"World", //its name
logicWorld, //its logical volume
0, //its mother volume
false, //no boolean operation
0); //copy number
// TR radiator envelope
G4double radThick = fFoilNumber*(fRadThickness + fGasGap) + fDetGap ;
G4double zRad = fStartZ + 0.5*radThick ;
G4cout<<"zRad = "<<zRad/mm<<" mm"<<G4endl ;
radThick *= 1.2 ;
G4cout<<"radThick = "<<radThick/mm<<" mm"<<G4endl ;
G4cout<<"fFoilNumber = "<<fFoilNumber<<G4endl ;
G4cout<<"fRadiatorMat = "<<fRadiatorMat->GetName()<<G4endl ;
G4cout<<"WorldMaterial = "<<WorldMaterial->GetName()<<G4endl ;
if(solidRadiator) delete solidRadiator;
if(logicRadiator) delete logicRadiator;
if(physiRadiator) delete physiRadiator;
solidRadiator = new G4Box("Radiator",1.1*AbsorberRadius ,
1.1*AbsorberRadius,
0.5*radThick ) ;
logicRadiator = new G4LogicalVolume(solidRadiator,
WorldMaterial,
"Radiator");
physiRadiator = new G4PVPlacement(0,
G4ThreeVector(0,0,zRad),
"Radiator", logicRadiator,
physiWorld, false, 0 );
if(fSolidRadSlice) delete fSolidRadSlice;
if(fLogicRadSlice) delete fLogicRadSlice;
if(fPhysicRadSlice) delete fPhysicRadSlice;
fSolidRadSlice = new G4Box("RadSlice",AbsorberRadius,
AbsorberRadius,0.5*fRadThickness ) ;
fLogicRadSlice = new G4LogicalVolume(fSolidRadSlice,fRadiatorMat,
"RadSlice",0,0,0);
zModule = fStartZ + fRadThickness ;
G4cout<<"zModule = "<<zModule/mm<<" mm"<<G4endl ;
for(j=0;j<fFoilNumber;j++)
{
zRadiator = zModule + j*(fRadThickness + fGasGap) ;
G4cout<<zRadiator/mm<<" mm"<<"\t" ;
// G4cout<<"j = "<<j<<"\t" ;
fPhysicRadSlice = new G4PVPlacement(0,G4ThreeVector(0.,0.,zRadiator-zRad),
"RadSlice",fLogicRadSlice,
physiRadiator,false,j);
}
G4cout<<G4endl ;
G4Box* solidWindow = new G4Box("Window",AbsorberRadius,
AbsorberRadius,
fWindowThick/2. );
G4LogicalVolume* logicWindow = new G4LogicalVolume(solidWindow,
fWindowMat, "Window");
G4double zWindow = fStartZ + radThick + fWindowThick/2. + 5.0*mm ;
// G4VPhysicalVolume* physiWindow = new G4PVPlacement(0,
// G4ThreeVector(0.,0.,zWindow),
// "Window",logicWindow,physiWorld,false,0);
G4Box* solidGap = new G4Box("Gap",AbsorberRadius,
AbsorberRadius,
fGapThick/2. ) ;
G4LogicalVolume* logicGap = new G4LogicalVolume(solidGap,fGapMat, "Gap");
G4double zGap = zWindow + fWindowThick/2. + fGapThick/2. + 0.01*mm ;
// G4VPhysicalVolume* physiGap = new G4PVPlacement(0,
// G4ThreeVector(0.,0.,zGap),
// "Gap",logicGap,physiWorld,false,0);
G4Box* solidElectrode = new G4Box("Electrode",AbsorberRadius,
AbsorberRadius,
fElectrodeThick/2. );
G4LogicalVolume* logicElectrode = new G4LogicalVolume(solidElectrode,
fElectrodeMat, "Electrode");
G4double zElectrode = zGap + fGapThick/2. + fElectrodeThick/2. + 0.01*mm;
// G4VPhysicalVolume* physiElectrode = new G4PVPlacement(0,
// G4ThreeVector(0.,0.,zElectrode),
// "Electrode",logicElectrode,
// physiWorld,false,0);
// Absorber
zAbsorber = zElectrode + fElectrodeThick/2. + AbsorberThickness/2. + 0.01*mm;
if (AbsorberThickness > 0.)
{
if(solidAbsorber) delete solidAbsorber ;
if(logicAbsorber) delete logicAbsorber ;
if(physiAbsorber) delete physiAbsorber ;
solidAbsorber = new G4Box("Absorber",AbsorberRadius,
AbsorberRadius,
AbsorberThickness/2. );
logicAbsorber = new G4LogicalVolume(solidAbsorber,
AbsorberMaterial,
"Absorber");
physiAbsorber = new G4PVPlacement(0,
G4ThreeVector(0.,0.,zAbsorber),
"Absorber",
logicAbsorber,
physiWorld,
false,
0);
}
// Sensitive Detectors: Absorber
G4SDManager* SDman = G4SDManager::GetSDMpointer();
if(!calorimeterSD)
{
calorimeterSD = new Em10CalorimeterSD("CalorSD",this);
SDman->AddNewDetector( calorimeterSD );
}
if (logicAbsorber) logicAbsorber->SetSensitiveDetector(calorimeterSD);
// Parameterisation
ParametrisationModel();
// always return physics world
return physiWorld;
}
////////////////////////////////////////////////////////////////////////////
//
// Construct parametrisation model depending on the current value of fModelNumber
void Em10DetectorConstruction::ParametrisationModel()
{
G4cout<<"Em10DetectorConstruction::ParametrisationModel() is called"<<G4endl;
G4cout<<"fModelNumber = "<<fModelNumber<<G4endl;
G4double alphaPlate = 160.0 ;
G4double alphaGas = 160.0 ;
if(fXTRModel) {
// Remove first the model from the envelope:
logicRadiator->GetFastSimulationManager()->RemoveFastSimulationModel(fXTRModel);
// Then delete it:
delete fXTRModel;
}
switch(fModelNumber)
{
case 1:
fXTRModel = new G4FoamXrayTRmodel(logicRadiator,fRadThickness,fGasGap);
break;
case 2:
fXTRModel = new G4FoamXTRdEdx(logicRadiator,fRadThickness,fGasGap);
break;
case 3:
fXTRModel = new G4GamDistrXrayTRmodel(logicRadiator,
fRadThickness,alphaPlate,
fGasGap,alphaGas);
break;
case 4:
fXTRModel = new G4GamDistrXTRdEdx(logicRadiator,
fRadThickness,alphaPlate,
fGasGap,alphaGas);
break;
case 5:
fXTRModel = new G4IrregularXrayTRmodel(logicRadiator,fRadThickness,fGasGap);
break;
case 6:
fXTRModel = new G4IrregularXTRdEdx(logicRadiator,fRadThickness,fGasGap);
break;
case 7:
fXTRModel = new G4PlateIrrGasXrayTRmodel(logicRadiator,
fRadThickness,fGasGap);
break;
case 8:
fXTRModel = new G4PlateIrrGasXTRdEdx(logicRadiator,fRadThickness,fGasGap);
break;
case 9:
fXTRModel = new G4RegularXrayTRmodel(logicRadiator,fRadThickness,fGasGap);
break;
case 10:
fXTRModel = new G4RegularXTRdEdx(logicRadiator,fRadThickness,fGasGap);
break;
default:
fXTRModel = 0;
G4cout<<"Warning: No parametrisation model was defined?"<<G4endl ;
break ;
}
// fXTRModel->GetPlateZmuProduct() ;
// fXTRModel->GetGasZmuProduct() ;
// fXTRModel->GetNumberOfPhotons() ;
return;
}
////////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorConstruction::PrintCalorParameters()
{
G4cout << "\n The WORLD is made of "
<< WorldSizeZ/mm << "mm of " << WorldMaterial->GetName() ;
G4cout << ", the transverse size (R) of the world is " << WorldSizeR/mm << " mm. " << G4endl;
G4cout << " The ABSORBER is made of "
<< AbsorberThickness/mm << "mm of " << AbsorberMaterial->GetName() ;
G4cout << ", the transverse size (R) is " << AbsorberRadius/mm << " mm. " << G4endl;
G4cout << " Z position of the (middle of the) absorber " << zAbsorber/mm << " mm." << G4endl;
G4cout << G4endl;
}
///////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorConstruction::SetAbsorberMaterial(G4String materialChoice)
{
// get the pointer to the material table
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
// search the material by its name
G4Material* pttoMaterial;
for (size_t J=0 ; J<theMaterialTable->size() ; J++)
{
pttoMaterial = (*theMaterialTable)[J];
if(pttoMaterial->GetName() == materialChoice)
{
AbsorberMaterial = pttoMaterial;
logicAbsorber->SetMaterial(pttoMaterial);
// PrintCalorParameters();
}
}
}
///////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorConstruction::SetRadiatorMaterial(G4String materialChoice)
{
// get the pointer to the material table
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
// search the material by its name
G4Material* pttoMaterial;
for (size_t J=0 ; J<theMaterialTable->size() ; J++)
{
pttoMaterial = (*theMaterialTable)[J];
if(pttoMaterial->GetName() == materialChoice)
{
fRadiatorMat = pttoMaterial;
fLogicRadSlice->SetMaterial(pttoMaterial);
// PrintCalorParameters();
}
}
}
////////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorConstruction::SetWorldMaterial(G4String materialChoice)
{
// get the pointer to the material table
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
// search the material by its name
G4Material* pttoMaterial;
for (size_t J=0 ; J<theMaterialTable->size() ; J++)
{
pttoMaterial = (*theMaterialTable)[J];
if(pttoMaterial->GetName() == materialChoice)
{
WorldMaterial = pttoMaterial;
logicWorld->SetMaterial(pttoMaterial);
// PrintCalorParameters();
}
}
}
///////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorConstruction::SetAbsorberThickness(G4double val)
{
// change Absorber thickness and recompute the calorimeter parameters
AbsorberThickness = val;
ComputeCalorParameters();
}
///////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorConstruction::SetRadiatorThickness(G4double val)
{
// change XTR radiator thickness and recompute the calorimeter parameters
fRadThickness = val;
// ComputeCalorParameters();
}
///////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorConstruction::SetGasGapThickness(G4double val)
{
// change XTR gas gap thickness and recompute the calorimeter parameters
fGasGap = val;
// ComputeCalorParameters();
}
/////////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorConstruction::SetAbsorberRadius(G4double val)
{
// change the transverse size and recompute the calorimeter parameters
AbsorberRadius = val;
ComputeCalorParameters();
}
////////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorConstruction::SetWorldSizeZ(G4double val)
{
worldchanged=true;
WorldSizeZ = val;
ComputeCalorParameters();
}
///////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorConstruction::SetWorldSizeR(G4double val)
{
worldchanged=true;
WorldSizeR = val;
ComputeCalorParameters();
}
//////////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorConstruction::SetAbsorberZpos(G4double val)
{
zAbsorber = val;
ComputeCalorParameters();
}
//////////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorConstruction::SetMagField(G4double fieldValue)
{
//apply a global uniform magnetic field along X axis
/* *********************************************************
G4FieldManager* fieldMgr
= G4TransportationManager::GetTransportationManager()->GetFieldManager();
if(magField) delete magField; //delete the existing magn field
if(fieldValue!=0.) // create a new one if non nul
{
magField = new G4UniformMagField(G4ThreeVector(fieldValue,0.,0.));
fieldMgr->SetDetectorField(magField);
fieldMgr->CreateChordFinder(magField);
}
else
{
magField = 0;
fieldMgr->SetDetectorField(magField);
}
*************************************************************** */
}
///////////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorConstruction::UpdateGeometry()
{
G4RunManager::GetRunManager()->DefineWorldVolume(ConstructCalorimeter());
}
//
//
////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,226 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10DetectorMessenger.cc,v 1.5 2001/11/21 18:48:56 mverderi Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
#include "Em10DetectorMessenger.hh"
#include "Em10DetectorConstruction.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithoutParameter.hh"
//////////////////////////////////////////////////////////////////////////////
Em10DetectorMessenger::Em10DetectorMessenger(Em10DetectorConstruction * Em10Det)
:Em10Detector(Em10Det)
{
Em10detDir = new G4UIdirectory("/XTRdetector/");
Em10detDir->SetGuidance("Em10 detector control.");
AbsMaterCmd = new G4UIcmdWithAString("/XTRdetector/setAbsMat",this);
AbsMaterCmd->SetGuidance("Select Material of the Absorber.");
AbsMaterCmd->SetParameterName("choice",true);
AbsMaterCmd->SetDefaultValue("Xe");
AbsMaterCmd->AvailableForStates(Idle);
RadiatorMaterCmd = new G4UIcmdWithAString("/XTRdetector/setRadMat",this);
RadiatorMaterCmd->SetGuidance("Select Material of the XTR radiator.");
RadiatorMaterCmd->SetParameterName("choice",true);
RadiatorMaterCmd->SetDefaultValue("CH2");
RadiatorMaterCmd->AvailableForStates(Idle);
ModelCmd = new G4UIcmdWithAnInteger("/XTRdetector/setModel",this);
ModelCmd->SetGuidance("Select Model for XTR");
ModelCmd->SetParameterName("choice",true);
ModelCmd->SetDefaultValue(0);
// ModelCmd->AvailableForStates(PreInit,Idle);
ModelCmd->AvailableForStates(Idle);
FoilNumCmd = new G4UIcmdWithAnInteger("/XTRdetector/setFoilNum",this);
FoilNumCmd->SetGuidance("Select foil number for XTR");
FoilNumCmd->SetParameterName("choice",true);
FoilNumCmd->SetDefaultValue(0);
FoilNumCmd->AvailableForStates(PreInit,Idle);
WorldMaterCmd = new G4UIcmdWithAString("/XTRdetector/setWorldMat",this);
WorldMaterCmd->SetGuidance("Select Material of the World.");
WorldMaterCmd->SetParameterName("wchoice",true);
WorldMaterCmd->SetDefaultValue("Air");
WorldMaterCmd->AvailableForStates(Idle);
AbsThickCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setAbsThick",this);
AbsThickCmd->SetGuidance("Set Thickness of the Absorber");
AbsThickCmd->SetParameterName("SizeZ",false,false);
AbsThickCmd->SetDefaultUnit("mm");
AbsThickCmd->SetRange("SizeZ>0.");
AbsThickCmd->AvailableForStates(Idle);
RadiatorThickCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setRadThick",this);
RadiatorThickCmd->SetGuidance("Set Thickness of XTR radiator");
RadiatorThickCmd->SetParameterName("SizeZ",false,false);
RadiatorThickCmd->SetDefaultUnit("mm");
RadiatorThickCmd->SetRange("SizeZ>0.");
RadiatorThickCmd->AvailableForStates(Idle);
GasGapThickCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setGasGapThick",this);
GasGapThickCmd->SetGuidance("Set Thickness of XTR gas gaps");
GasGapThickCmd->SetParameterName("SizeZ",false,false);
GasGapThickCmd->SetDefaultUnit("mm");
GasGapThickCmd->SetRange("SizeZ>0.");
GasGapThickCmd->AvailableForStates(Idle);
AbsRadCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setAbsRad",this);
AbsRadCmd->SetGuidance("Set radius of the Absorber");
AbsRadCmd->SetParameterName("SizeR",false,false);
AbsRadCmd->SetDefaultUnit("mm");
AbsRadCmd->SetRange("SizeR>0.");
AbsRadCmd->AvailableForStates(Idle);
AbsZposCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setAbsZpos",this);
AbsZposCmd->SetGuidance("Set Z pos. of the Absorber");
AbsZposCmd->SetParameterName("Zpos",false,false);
AbsZposCmd->SetDefaultUnit("mm");
AbsZposCmd->AvailableForStates(Idle);
WorldZCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setWorldZ",this);
WorldZCmd->SetGuidance("Set Z size of the World");
WorldZCmd->SetParameterName("WSizeZ",false,false);
WorldZCmd->SetDefaultUnit("mm");
WorldZCmd->SetRange("WSizeZ>0.");
WorldZCmd->AvailableForStates(Idle);
WorldRCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setWorldR",this);
WorldRCmd->SetGuidance("Set R size of the World");
WorldRCmd->SetParameterName("WSizeR",false,false);
WorldRCmd->SetDefaultUnit("mm");
WorldRCmd->SetRange("WSizeR>0.");
WorldRCmd->AvailableForStates(Idle);
UpdateCmd = new G4UIcmdWithoutParameter("/XTRdetector/update",this);
UpdateCmd->SetGuidance("Update calorimeter geometry.");
UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
UpdateCmd->SetGuidance("if you changed geometrical value(s).");
UpdateCmd->AvailableForStates(Idle);
MagFieldCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setField",this);
MagFieldCmd->SetGuidance("Define magnetic field.");
MagFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
MagFieldCmd->SetParameterName("Bz",false,false);
MagFieldCmd->SetDefaultUnit("tesla");
MagFieldCmd->AvailableForStates(Idle);
}
///////////////////////////////////////////////////////////////////////////////
Em10DetectorMessenger::~Em10DetectorMessenger()
{
delete AbsMaterCmd;
delete ModelCmd;
delete FoilNumCmd;
delete AbsThickCmd;
delete RadiatorThickCmd;
delete GasGapThickCmd;
delete AbsRadCmd;
delete AbsZposCmd;
delete WorldMaterCmd;
delete RadiatorMaterCmd;
delete WorldZCmd;
delete WorldRCmd;
delete UpdateCmd;
delete MagFieldCmd;
delete Em10detDir;
}
/////////////////////////////////////////////////////////////////////////////
void Em10DetectorMessenger::SetNewValue(G4UIcommand* command,G4int newValue)
{
if( command == ModelCmd )
{
Em10Detector->SetParametrisationModel(newValue);
Em10Detector->Construct();
}
}
////////////////////////////////////////////////////////////////////////////
//
//
void Em10DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
if( command == ModelCmd )
{
Em10Detector->SetParametrisationModel(ModelCmd->GetNewIntValue(newValue));
Em10Detector->ParametrisationModel();
}
if( command == FoilNumCmd )
{
Em10Detector->SetFoilNumber(FoilNumCmd->GetNewIntValue(newValue));
}
if( command == AbsMaterCmd )
{ Em10Detector->SetAbsorberMaterial(newValue);}
if( command == RadiatorMaterCmd )
{ Em10Detector->SetRadiatorMaterial(newValue);}
if( command == WorldMaterCmd )
{ Em10Detector->SetWorldMaterial(newValue);}
if( command == AbsThickCmd )
{ Em10Detector->SetAbsorberThickness(AbsThickCmd->GetNewDoubleValue(newValue));}
if( command == RadiatorThickCmd )
{ Em10Detector->SetRadiatorThickness(RadiatorThickCmd->
GetNewDoubleValue(newValue));}
if( command == GasGapThickCmd )
{ Em10Detector->SetGasGapThickness(GasGapThickCmd->
GetNewDoubleValue(newValue));}
if( command == AbsRadCmd )
{ Em10Detector->SetAbsorberRadius(AbsRadCmd->GetNewDoubleValue(newValue));}
if( command == AbsZposCmd )
{ Em10Detector->SetAbsorberZpos(AbsZposCmd->GetNewDoubleValue(newValue));}
if( command == WorldZCmd )
{ Em10Detector->SetWorldSizeZ(WorldZCmd->GetNewDoubleValue(newValue));}
if( command == WorldRCmd )
{ Em10Detector->SetWorldSizeR(WorldRCmd->GetNewDoubleValue(newValue));}
if( command == UpdateCmd )
{ Em10Detector->UpdateGeometry(); }
if( command == MagFieldCmd )
{ Em10Detector->SetMagField(MagFieldCmd->GetNewDoubleValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,248 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10EventAction.cc,v 1.3 2001/11/21 11:57:14 mverderi Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "Em10EventAction.hh"
#include "Em10RunAction.hh"
#include "Em10CalorHit.hh"
#include "Em10EventActionMessenger.hh"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4HCofThisEvent.hh"
#include "G4VHitsCollection.hh"
#include "G4SDManager.hh"
#include "G4UImanager.hh"
#include "G4TrajectoryContainer.hh"
#include "G4Trajectory.hh"
#include "G4VVisManager.hh"
#include "G4ios.hh"
#include "G4UnitsTable.hh"
#include "Randomize.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em10EventAction::Em10EventAction(Em10RunAction* Em10RA)
:calorimeterCollID(-1),eventMessenger(0),
runaction(Em10RA),verboselevel(0),drawFlag("all"),printModulo(10000)
{
eventMessenger = new Em10EventActionMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em10EventAction::~Em10EventAction()
{
delete eventMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10EventAction::BeginOfEventAction(const G4Event* evt)
{
G4int evtNb = evt->GetEventID();
if (evtNb%printModulo == 0)
G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
if(verboselevel>1)
G4cout << "<<< Event " << evtNb << " started." << G4endl;
if (calorimeterCollID==-1)
{
G4SDManager * SDman = G4SDManager::GetSDMpointer();
calorimeterCollID = SDman->GetCollectionID("CalCollection");
}
nstep = 0. ;
nstepCharged = 0. ;
nstepNeutral = 0. ;
Nch = 0. ;
Nne = 0. ;
NE=0.;
NP=0.;
Transmitted=0.;
Reflected =0.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10EventAction::EndOfEventAction(const G4Event* evt)
{
G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
Em10CalorHitsCollection* CHC = 0;
if (HCE)
CHC = (Em10CalorHitsCollection*)(HCE->GetHC(calorimeterCollID));
if (CHC)
{
int n_hit = CHC->entries();
// if(verboselevel==2)
// G4cout << " " << n_hit
// << " hits are stored in Em10CalorHitsCollection." << G4endl;
G4double totEAbs=0, totLAbs=0;
for (int i=0;i<n_hit;i++)
{ totEAbs += (*CHC)[i]->GetEdepAbs();
totLAbs += (*CHC)[i]->GetTrakAbs();
}
if(verboselevel==2)
G4cout
<< " Absorber: total energy: " << G4std::setw(7) <<
G4BestUnit(totEAbs,"Energy")
<< " total track length: " << G4std::setw(7) <<
G4BestUnit(totLAbs,"Length")
<< G4endl;
// count event, add deposits to the sum ...
runaction->CountEvent() ;
runaction->AddTrackLength(totLAbs) ;
runaction->AddnStepsCharged(nstepCharged) ;
runaction->AddnStepsNeutral(nstepNeutral) ;
if(verboselevel==2)
G4cout << " Ncharged=" << Nch << " , Nneutral=" << Nne << G4endl;
runaction->CountParticles(Nch,Nne);
runaction->AddEP(NE,NP);
runaction->AddTrRef(Transmitted,Reflected) ;
runaction->AddEdeps(totEAbs) ;
runaction->FillEn(totEAbs) ;
nstep=nstepCharged+nstepNeutral ;
runaction->FillNbOfSteps(nstep);
}
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
if(pVVisManager)
{
G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
G4int n_trajectories = 0;
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
for(G4int i=0; i<n_trajectories; i++)
{ G4Trajectory* trj = (G4Trajectory *)((*(evt->GetTrajectoryContainer()))[i]);
if (drawFlag == "all") trj->DrawTrajectory(50);
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
trj->DrawTrajectory(50);
}
}
if(verboselevel>0)
G4cout << "<<< Event " << evt->GetEventID() << " ended." << G4endl;
//save rndm status
if (runaction->GetRndmFreq() == 2)
{
HepRandom::saveEngineStatus("endOfEvent.rndm");
G4int evtNb = evt->GetEventID();
if (evtNb%printModulo == 0)
{
G4cout << "\n---> End of Event: " << evtNb << G4endl;
HepRandom::showEngineStatus();
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4int Em10EventAction::GetEventno()
{
G4int evno = fpEventManager->GetConstCurrentEvent()->GetEventID() ;
return evno ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10EventAction::setEventVerbose(G4int level)
{
verboselevel = level ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10EventAction::CountStepsCharged()
{
nstepCharged += 1. ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10EventAction::CountStepsNeutral()
{
nstepNeutral += 1. ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10EventAction::AddCharged()
{
Nch += 1.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10EventAction::AddNeutral()
{
Nne += 1.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10EventAction::AddE()
{
NE += 1.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10EventAction::AddP()
{
NP += 1.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10EventAction::SetTr()
{
Transmitted = 1.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10EventAction::SetRef()
{
Reflected = 1.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -21,68 +21,68 @@
// ********************************************************************
//
//
// $Id: Em4RunActionMessenger.cc,v 1.4.2.1 2001/06/28 19:07:02 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em10EventActionMessenger.cc,v 1.2 2001/07/11 09:57:24 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "Em4RunActionMessenger.hh"
#include "Em4RunAction.hh"
#include "Em10EventActionMessenger.hh"
#include "G4UIdirectory.hh"
#include "Em10EventAction.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4ios.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "globals.hh"
#include "Randomize.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em4RunActionMessenger::Em4RunActionMessenger(Em4RunAction* run)
:Em4Run(run)
{
RndmDir = new G4UIdirectory("/rndm/");
RndmDir->SetGuidance("Rndm status control.");
RndmSaveCmd = new G4UIcmdWithAnInteger("/rndm/save",this);
RndmSaveCmd->SetGuidance("set frequency to save rndm status on external files.");
RndmSaveCmd->SetGuidance("freq = 0 not saved");
RndmSaveCmd->SetGuidance("freq > 0 saved on: beginOfRun.rndm");
RndmSaveCmd->SetGuidance("freq > 0 saved on: endOfRun.rndm");
RndmSaveCmd->SetGuidance("freq = 2 saved on: beginOfEvent.rndm");
RndmSaveCmd->SetParameterName("frequency",false);
RndmSaveCmd->SetRange("frequency>=0 && frequency<=2");
RndmSaveCmd->AvailableForStates(PreInit,Idle);
RndmReadCmd = new G4UIcmdWithAString("/rndm/read",this);
RndmReadCmd->SetGuidance("get rndm status from an external file.");
RndmReadCmd->SetParameterName("fileName",true);
RndmReadCmd->SetDefaultValue ("beginOfRun.rndm");
RndmReadCmd->AvailableForStates(PreInit,Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em4RunActionMessenger::~Em4RunActionMessenger()
{
delete RndmSaveCmd; delete RndmReadCmd; delete RndmDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em4RunActionMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
Em10EventActionMessenger::Em10EventActionMessenger(Em10EventAction* EvAct)
:eventAction(EvAct)
{
if (command == RndmSaveCmd)
Em4Run->SetRndmFreq(RndmSaveCmd->GetNewIntValue(newValue));
if (command == RndmReadCmd)
{ G4cout << "\n---> rndm status restored from file: " << newValue << G4endl;
HepRandom::restoreEngineStatus(newValue);
HepRandom::showEngineStatus();
}
setVerboseCmd = new G4UIcmdWithAnInteger("/event/setverbose",this);
setVerboseCmd->SetGuidance("Set verbose level ." );
setVerboseCmd->SetParameterName("level",true);
setVerboseCmd->SetDefaultValue(0);
DrawCmd = new G4UIcmdWithAString("/event/drawTracks",this);
DrawCmd->SetGuidance("Draw the tracks in the event");
DrawCmd->SetGuidance(" Choice : none,charged, all");
DrawCmd->SetParameterName("choice",true);
DrawCmd->SetDefaultValue("all");
DrawCmd->SetCandidates("none charged all");
DrawCmd->AvailableForStates(Idle);
PrintCmd = new G4UIcmdWithAnInteger("/event/printModulo",this);
PrintCmd->SetGuidance("Print events modulo n");
PrintCmd->SetParameterName("EventNb",false);
PrintCmd->SetRange("EventNb>0");
PrintCmd->AvailableForStates(Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em10EventActionMessenger::~Em10EventActionMessenger()
{
delete setVerboseCmd;
delete DrawCmd;
delete PrintCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10EventActionMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
{
if(command == setVerboseCmd)
{eventAction->setEventVerbose(setVerboseCmd->GetNewIntValue(newValue));}
if(command == DrawCmd)
{eventAction->SetDrawFlag(newValue);}
if(command == PrintCmd)
{eventAction->SetPrintModulo(PrintCmd->GetNewIntValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,494 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10PhysicsList.cc,v 1.3 2001/11/21 11:57:14 mverderi Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
#include "G4Timer.hh"
#include "Em10PhysicsList.hh"
#include "Em10DetectorConstruction.hh"
#include "Em10PhysicsListMessenger.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4Material.hh"
#include "G4EnergyLossTables.hh"
#include "G4UnitsTable.hh"
#include "G4ios.hh"
#include "g4std/iomanip"
#include "G4FastSimulationManagerProcess.hh"
/////////////////////////////////////////////////////////////
//
//
Em10PhysicsList::Em10PhysicsList(Em10DetectorConstruction* p)
: G4VUserPhysicsList(),
MaxChargedStep(DBL_MAX),
thePhotoElectricEffect(0), theComptonScattering(0),
theGammaConversion(0),
theeminusMultipleScattering(0), theeminusIonisation(0),
theeminusBremsstrahlung(0),
theeplusMultipleScattering(0), theeplusIonisation(0),
theeplusBremsstrahlung(0),
theeplusAnnihilation(0),
theeminusStepCut(0), theeplusStepCut(0)
{
pDet = p;
defaultCutValue = 1.000*mm ;
cutForGamma = defaultCutValue ;
cutForElectron = defaultCutValue ;
cutForProton = defaultCutValue ;
SetVerboseLevel(1);
physicsListMessenger = new Em10PhysicsListMessenger(this);
}
/////////////////////////////////////////////////////////////////////////
//
//
Em10PhysicsList::~Em10PhysicsList()
{
delete physicsListMessenger;
}
///////////////////////////////////////////////////////////////////////////
//
//
void Em10PhysicsList::ConstructParticle()
{
// In this method, static member functions should be called
// for all particles which you want to use.
// This ensures that objects of these particle types will be
// created in the program.
ConstructBosons();
ConstructLeptons();
ConstructMesons();
ConstructBarions();
}
////////////////////////////////////////////////////////////////////////////
//
//
void Em10PhysicsList::ConstructBosons()
{
// gamma
G4Gamma::GammaDefinition();
}
void Em10PhysicsList::ConstructLeptons()
{
// leptons
G4Electron::ElectronDefinition();
G4Positron::PositronDefinition();
G4MuonPlus::MuonPlusDefinition();
G4MuonMinus::MuonMinusDefinition();
G4NeutrinoE::NeutrinoEDefinition();
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
G4NeutrinoMu::NeutrinoMuDefinition();
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
}
void Em10PhysicsList::ConstructMesons()
{
// mesons
G4PionPlus::PionPlusDefinition();
G4PionMinus::PionMinusDefinition();
G4PionZero::PionZeroDefinition();
G4KaonPlus::KaonPlusDefinition();
G4KaonMinus::KaonMinusDefinition();
}
void Em10PhysicsList::ConstructBarions()
{
// barions
G4Proton::ProtonDefinition();
G4AntiProton::AntiProtonDefinition();
}
///////////////////////////////////////////////////////////////////////
//
//
void Em10PhysicsList::ConstructProcess()
{
AddTransportation();
AddParameterisation();
ConstructEM();
ConstructGeneral();
}
/////////////////////////////////////////////////////////////////////////////
//
//
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
#include "G4PAIonisation.hh"
#include "G4ForwardXrayTR.hh"
#include "Em10StepCut.hh"
#include "G4IonisationByLogicalVolume.hh"
void Em10PhysicsList::ConstructEM()
{
theParticleIterator->reset();
while( (*theParticleIterator)() )
{
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma")
{
// Construct processes for gamma
thePhotoElectricEffect = new G4PhotoElectricEffect();
theComptonScattering = new G4ComptonScattering();
theGammaConversion = new G4GammaConversion();
pmanager->AddDiscreteProcess(thePhotoElectricEffect);
pmanager->AddDiscreteProcess(theComptonScattering);
pmanager->AddDiscreteProcess(theGammaConversion);
}
else if (particleName == "e-")
{
// Construct processes for electron
// theeminusMultipleScattering = new G4MultipleScattering();
// theeminusIonisation = new G4eIonisation();
theeminusBremsstrahlung = new G4eBremsstrahlung();
// fPAIonisation = new G4PAIonisation("Xenon") ;
// fForwardXrayTR = new G4ForwardXrayTR("Air","Polypropelene","XrayTR") ;
theeminusStepCut = new Em10StepCut();
// pmanager->AddProcess(theeminusMultipleScattering,-1,1,1);
// pmanager->AddProcess(theeminusIonisation,-1,2,2);
pmanager->AddProcess(new G4IonisationByLogicalVolume(particleName,
pDet->GetLogicalAbsorber(),
"IonisationByLogVol"),-1,1,-1);
pmanager->AddProcess(theeminusBremsstrahlung,-1,-1,-1);
// pmanager->AddProcess(fPAIonisation,-1,2,2);
// pmanager->AddProcess(fForwardXrayTR,-1,-1,2);
pmanager->AddProcess(theeminusStepCut,-1,-1,4);
theeminusStepCut->SetMaxStep(MaxChargedStep) ;
}
else if (particleName == "e+")
{
// Construct processes for positron
// theeplusMultipleScattering = new G4MultipleScattering();
theeplusIonisation = new G4eIonisation();
theeplusBremsstrahlung = new G4eBremsstrahlung();
// theeplusAnnihilation = new G4eplusAnnihilation();
// fPAIonisation = new G4PAIonisation("Xenon") ;
// fForwardXrayTR = new G4ForwardXrayTR("Air","Polypropelene","XrayTR") ;
theeplusStepCut = new Em10StepCut();
// pmanager->AddProcess(theeplusMultipleScattering,-1,1,1);
pmanager->AddProcess(theeplusIonisation,-1,2,2);
pmanager->AddProcess(theeplusBremsstrahlung,-1,-1,3);
// pmanager->AddProcess(theeplusAnnihilation,0,-1,4);
// pmanager->AddProcess(fPAIonisation,-1,2,2);
// pmanager->AddProcess(fForwardXrayTR,-1,-1,2);
pmanager->AddProcess(theeplusStepCut,-1,-1,5);
theeplusStepCut->SetMaxStep(MaxChargedStep) ;
}
else if( particleName == "mu+" ||
particleName == "mu-" )
{
// Construct processes for muon+
// Em10StepCut* muonStepCut = new Em10StepCut();
// G4MuIonisation* themuIonisation = new G4MuIonisation() ;
// pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
// pmanager->AddProcess(themuIonisation,-1,2,2);
// pmanager->AddProcess(new G4MuBremsstrahlung(),-1,-1,3);
// pmanager->AddProcess(new G4MuPairProduction(),-1,-1,4);
// pmanager->AddProcess(new G4PAIonisation("Xenon"),-1,2,2) ;
// pmanager->AddProcess( muonStepCut,-1,-1,3);
// muonStepCut->SetMaxStep(MaxChargedStep) ;
}
else if (
particleName == "proton"
|| particleName == "antiproton"
|| particleName == "pi+"
|| particleName == "pi-"
|| particleName == "kaon+"
|| particleName == "kaon-"
)
{
Em10StepCut* thehadronStepCut = new Em10StepCut();
// G4hIonisation* thehIonisation = new G4hIonisation() ;
// G4MultipleScattering* thehMultipleScattering =
// new G4MultipleScattering() ;
pmanager->AddProcess(new G4IonisationByLogicalVolume(particleName,
pDet->GetLogicalAbsorber(),
"IonisationByLogVolHadr"),-1,2,2);
// pmanager->AddProcess(thehMultipleScattering,-1,1,1);
// pmanager->AddProcess(thehIonisation,-1,2,2);
// pmanager->AddProcess(new G4PAIonisation("Xenon"),-1,2,2) ;
// pmanager->AddProcess(new G4PAIonisation("Argon"),-1,2,2) ;
pmanager->AddProcess( thehadronStepCut,-1,-1,3);
thehadronStepCut->SetMaxStep(MaxChargedStep) ;
// thehadronStepCut->SetMaxStep(10*mm) ;
}
}
}
#include "G4Decay.hh"
void Em10PhysicsList::ConstructGeneral()
{
// Add Decay Process
G4Decay* theDecayProcess = new G4Decay();
theParticleIterator->reset();
while( (*theParticleIterator)() )
{
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (theDecayProcess->IsApplicable(*particle))
{
pmanager ->AddProcess(theDecayProcess);
// set ordering for PostStepDoIt and AtRestDoIt
pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
}
}
}
/////////////////////////////////////////////////////////////////////////////
void Em10PhysicsList::AddParameterisation()
{
G4FastSimulationManagerProcess* theFastSimulationManagerProcess =
new G4FastSimulationManagerProcess() ;
theParticleIterator->reset();
while( (*theParticleIterator)() )
{
G4ParticleDefinition* particle = theParticleIterator->value() ;
G4ProcessManager* pmanager = particle->GetProcessManager() ;
// both postStep and alongStep action are required: because
// of the use of ghost volumes. If no ghost, the postStep is sufficient.
pmanager->AddProcess(theFastSimulationManagerProcess, -1, 1, 1);
}
}
/////////////////////////////////////////////////////////////////////////////
void Em10PhysicsList::SetCuts()
{
G4Timer theTimer ;
theTimer.Start() ;
if (verboseLevel >0)
{
G4cout << "Em10PhysicsList::SetCuts:";
G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
}
// set cut values for gamma at first and for e- second and next for e+,
// because some processes for e+/e- need cut values for gamma
SetCutValue(cutForGamma,"gamma");
SetCutValue(cutForElectron,"e-");
SetCutValue(cutForElectron,"e+");
SetCutValue(defaultCutValue,"mu-");
SetCutValue(defaultCutValue,"mu+");
// set cut values for proton and anti_proton before all other hadrons
// because some processes for hadrons need cut values for proton/anti_proton
SetCutValue(defaultCutValue, "proton");
SetCutValue(defaultCutValue, "anti_proton");
SetCutValueForOthers(defaultCutValue);
if (verboseLevel>1) DumpCutValuesTable();
theTimer.Stop();
G4cout.precision(6);
G4cout << G4endl ;
G4cout << "total time(SetCuts)=" << theTimer.GetUserElapsed() << " s " <<G4endl;
}
///////////////////////////////////////////////////////////////////////////
void Em10PhysicsList::SetGammaCut(G4double val)
{
ResetCuts();
cutForGamma = val;
}
///////////////////////////////////////////////////////////////////////////
void Em10PhysicsList::SetElectronCut(G4double val)
{
ResetCuts();
cutForElectron = val;
}
//////////////////////////////////////////////////////////////////////
void Em10PhysicsList::SetProtonCut(G4double val)
{
ResetCuts();
cutForProton = val;
}
////////////////////////////////////////////////////////////////////////////
void Em10PhysicsList::SetCutsByEnergy(G4double val)
{
G4ParticleTable* theParticleTable = G4ParticleTable::GetParticleTable();
G4Material* currMat = pDet->GetAbsorberMaterial();
// set cut values for gamma at first and for e- second and next for e+,
// because some processes for e+/e- need cut values for gamma
G4ParticleDefinition* part;
G4double cut;
part = theParticleTable->FindParticle("e-");
cut = G4EnergyLossTables::GetRange(part,val,currMat);
SetCutValue(cut, "e-");
part = theParticleTable->FindParticle("e+");
cut = G4EnergyLossTables::GetRange(part,val,currMat);
SetCutValue(cut, "e+");
// set cut values for proton and anti_proton before all other hadrons
// because some processes for hadrons need cut values for proton/anti_proton
part = theParticleTable->FindParticle("proton");
cut = G4EnergyLossTables::GetRange(part,val,currMat);
SetCutValue(cut, "proton");
part = theParticleTable->FindParticle("anti_proton");
cut = G4EnergyLossTables::GetRange(part,val,currMat);
SetCutValue(cut, "anti_proton");
SetCutValueForOthers(cut);
}
//////////////////////////////////////////////////////////////////////////////
void Em10PhysicsList::GetRange(G4double val)
{
G4ParticleTable* theParticleTable = G4ParticleTable::GetParticleTable();
G4Material* currMat = pDet->GetAbsorberMaterial();
G4ParticleDefinition* part;
G4double cut;
part = theParticleTable->FindParticle("e-");
cut = G4EnergyLossTables::GetRange(part,val,currMat);
G4cout << "material : " << currMat->GetName() << G4endl;
G4cout << "particle : " << part->GetParticleName() << G4endl;
G4cout << "energy : " << val / keV << " (keV)" << G4endl;
G4cout << "range : " << cut / mm << " (mm)" << G4endl;
}
////////////////////////////////////////////////////////////////////////////
void Em10PhysicsList::SetMaxStep(G4double step)
{
MaxChargedStep = step ;
G4cout << " MaxChargedStep=" << MaxChargedStep << G4endl;
G4cout << G4endl;
}
@@ -0,0 +1,120 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10PhysicsListMessenger.cc,v 1.2 2001/07/11 09:57:24 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "Em10PhysicsListMessenger.hh"
#include "Em10PhysicsList.hh"
#include "G4UIcmdWithoutParameter.hh"
#include "G4UIcmdWithADouble.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em10PhysicsListMessenger::Em10PhysicsListMessenger(Em10PhysicsList * List)
:Em10List(List)
{
cutGCmd = new G4UIcmdWithADoubleAndUnit("/calor/cutG",this);
cutGCmd->SetGuidance("Set cut values by RANGE for Gamma.");
cutGCmd->SetParameterName("range",true);
cutGCmd->SetDefaultValue(1.);
cutGCmd->SetDefaultUnit("mm");
cutGCmd->AvailableForStates(Idle);
cutECmd = new G4UIcmdWithADoubleAndUnit("/calor/cutE",this);
cutECmd->SetGuidance("Set cut values by RANGE for e- e+.");
cutECmd->SetParameterName("range",true);
cutECmd->SetDefaultValue(1.);
cutECmd->SetDefaultUnit("mm");
cutECmd->AvailableForStates(Idle);
cutPCmd = new G4UIcmdWithADoubleAndUnit("/calor/cutP",this);
cutPCmd->SetGuidance("Set cut values by RANGE for proton and others.");
cutPCmd->SetParameterName("range",true);
cutPCmd->SetDefaultValue(1.);
cutPCmd->SetDefaultUnit("mm");
cutPCmd->AvailableForStates(Idle);
eCmd = new G4UIcmdWithADoubleAndUnit("/calor/cutEnergy",this);
eCmd->SetGuidance("Set cut values by ENERGY for charged particles.");
eCmd->SetParameterName("energy",true);
eCmd->SetDefaultValue(10.);
eCmd->SetDefaultUnit("keV");
eCmd->AvailableForStates(Idle);
rCmd = new G4UIcmdWithADoubleAndUnit("/calor/range",this);
rCmd->SetGuidance("Display the RANGE of Electron for the current material.");
rCmd->SetParameterName("energy",true);
rCmd->SetDefaultValue(10.);
rCmd->SetDefaultUnit("keV");
rCmd->AvailableForStates(Idle);
setMaxStepCmd = new G4UIcmdWithADoubleAndUnit("/step/setMaxStep",this);
setMaxStepCmd->SetGuidance("Set max. step length in the detector");
setMaxStepCmd->SetParameterName("mxStep",true);
setMaxStepCmd->SetDefaultUnit("mm");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em10PhysicsListMessenger::~Em10PhysicsListMessenger()
{
delete setMaxStepCmd;
delete cutGCmd;
delete cutECmd;
delete cutPCmd;
delete rCmd;
delete eCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10PhysicsListMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
if(command == cutGCmd)
{ Em10List->SetGammaCut(cutGCmd->GetNewDoubleValue(newValue));}
if(command == cutECmd)
{ Em10List->SetElectronCut(eCmd->GetNewDoubleValue(newValue));}
if(command == cutPCmd)
{ Em10List->SetProtonCut(eCmd->GetNewDoubleValue(newValue));}
if(command == eCmd)
{ Em10List->SetCutsByEnergy(cutECmd->GetNewDoubleValue(newValue));}
if(command == rCmd)
{ Em10List->GetRange(rCmd->GetNewDoubleValue(newValue));}
if(command == setMaxStepCmd)
{ Em10List->SetMaxStep(setMaxStepCmd->GetNewDoubleValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,152 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em10PrimaryGeneratorAction.cc,v 1.3 2001/11/21 11:57:14 mverderi Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "Em10PrimaryGeneratorAction.hh"
#include "Em10DetectorConstruction.hh"
#include "Em10PrimaryGeneratorMessenger.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "Randomize.hh"
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4String Em10PrimaryGeneratorAction::thePrimaryParticleName="proton" ;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em10PrimaryGeneratorAction::Em10PrimaryGeneratorAction(
Em10DetectorConstruction* Em10DC)
:Em10Detector(Em10DC),rndmFlag("off"),xvertex(0.),yvertex(0.),zvertex(0.),
vertexdefined(false)
{
G4int n_particle = 1;
particleGun = new G4ParticleGun(n_particle);
//create a messenger for this class
gunMessenger = new Em10PrimaryGeneratorMessenger(this);
// default particle kinematic
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
G4String particleName;
G4ParticleDefinition* particle
= particleTable->FindParticle(particleName="proton");
particleGun->SetParticleDefinition(particle);
thePrimaryParticleName = particle->GetParticleName() ;
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
particleGun->SetParticleEnergy(100.*GeV);
zvertex = 0.0 ; // -0.5*(Em10Detector->GetAbsorberThickness());
particleGun->SetParticlePosition(G4ThreeVector(xvertex,yvertex,zvertex));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em10PrimaryGeneratorAction::~Em10PrimaryGeneratorAction()
{
delete particleGun;
delete gunMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em10PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
//this function is called at the begining of event
//
thePrimaryParticleName = particleGun->GetParticleDefinition()->
GetParticleName() ;
G4double x0,y0,z0 ;
if(vertexdefined)
{
x0 = xvertex ;
y0 = yvertex ;
z0 = zvertex ;
}
else
{
x0 = 0. ;
y0 = 0. ;
z0 = 0. ; // -0.5*(Em10Detector->GetWorldSizeZ()) ;
}
/* ****************************************************
G4double r0,phi0 ;
if (rndmFlag == "on")
{
r0 = (Em10Detector->GetAbsorberRadius())*sqrt(G4UniformRand());
phi0 = twopi*G4UniformRand();
x0 = r0*cos(phi0);
y0 = r0*sin(phi0);
}
********************************************* */
particleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
particleGun->GeneratePrimaryVertex(anEvent);
}
///////////////////////////////////////////////////////////////////////
//
//
G4String Em10PrimaryGeneratorAction::GetPrimaryName()
{
return thePrimaryParticleName ;
}
void Em10PrimaryGeneratorAction::Setzvertex(G4double z)
{
vertexdefined = true ;
zvertex = z ;
G4cout << " Z coordinate of the primary vertex = " << zvertex/mm <<
" mm." << G4endl;
}
void Em10PrimaryGeneratorAction::Setxvertex(G4double x)
{
vertexdefined = true ;
xvertex = x ;
G4cout << " X coordinate of the primary vertex = " << xvertex/mm <<
" mm." << G4endl;
}
void Em10PrimaryGeneratorAction::Setyvertex(G4double y)
{
vertexdefined = true ;
yvertex = y ;
G4cout << " Y coordinate of the primary vertex = " << yvertex/mm <<
" mm." << G4endl;
}

Some files were not shown because too many files have changed in this diff Show More