Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
+2
View File
@@ -1,3 +1,5 @@
# $Id: CMakeLists.txt 68058 2013-03-13 14:47:43Z gcosmo $
#----------------------------------------------------------------------------
# Setup the project
#
+33 -17
View File
@@ -23,18 +23,22 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: exampleB4d.cc 75215 2013-10-29 16:07:06Z gcosmo $
//
/// \file exampleB4d.cc
/// \brief Main program of the B4d example
#include "B4dDetectorConstruction.hh"
#include "B4PrimaryGeneratorAction.hh"
#include "B4RunAction.hh"
#include "B4dEventAction.hh"
#include "B4dActionInitialization.hh"
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
#else
#include "G4RunManager.hh"
#endif
#include "G4UImanager.hh"
#include "G4UIcommand.hh"
#include "FTFP_BERT.hh"
#include "Randomize.hh"
@@ -52,7 +56,9 @@
namespace {
void PrintUsage() {
G4cerr << " Usage: " << G4endl;
G4cerr << " exampleB4d [-m macro ] [-u UIsession]" << G4endl;
G4cerr << " exampleB4d [-m macro ] [-u UIsession] [-t nThreads]" << G4endl;
G4cerr << " note: -t option is available only for multi-threaded mode."
<< G4endl;
}
}
@@ -62,16 +68,24 @@ int main(int argc,char** argv)
{
// Evaluate arguments
//
if ( argc > 5 ) {
if ( argc > 7 ) {
PrintUsage();
return 1;
}
G4String macro;
G4String session;
#ifdef G4MULTITHREADED
G4int nThreads = 0;
#endif
for ( G4int i=1; i<argc; i=i+2 ) {
if ( G4String(argv[i]) == "-m" ) macro = argv[i+1];
else if ( G4String(argv[i]) == "-u" ) session = argv[i+1];
#ifdef G4MULTITHREADED
else if ( G4String(argv[i]) == "-t" ) {
nThreads = G4UIcommand::ConvertToInt(argv[i+1]);
}
#endif
else {
PrintUsage();
return 1;
@@ -80,11 +94,18 @@ int main(int argc,char** argv)
// Choose the Random engine
//
CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine);
G4Random::setTheEngine(new CLHEP::RanecuEngine);
// Construct the default run manager
// Construct the MT run manager
//
#ifdef G4MULTITHREADED
G4MTRunManager * runManager = new G4MTRunManager;
if ( nThreads > 0 ) {
runManager->SetNumberOfThreads(nThreads);
}
#else
G4RunManager * runManager = new G4RunManager;
#endif
// Set mandatory initialization classes
//
@@ -93,16 +114,11 @@ int main(int argc,char** argv)
G4VModularPhysicsList* physicsList = new FTFP_BERT;
runManager->SetUserInitialization(physicsList);
B4dActionInitialization* actionInitialization
= new B4dActionInitialization();
runManager->SetUserInitialization(actionInitialization);
// Set user action classes
//
runManager
->SetUserAction(new B4PrimaryGeneratorAction());
//
runManager->SetUserAction(new B4RunAction());
//
runManager->SetUserAction(new B4dEventAction());
// Initialize G4 kernel
//
runManager->Initialize();
+235 -195
View File
@@ -4,7 +4,7 @@
############################################
*************************************************************
Geant4 version Name: geant4-09-06-ref-00 (30-November-2012)
Geant4 version Name: geant4-10-00-ref-00 (6-December-2013)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
@@ -12,10 +12,13 @@
<<< Geant4 Physics List simulation engine: FTFP_BERT 2.0
Using Root
***** Table : Nb of materials = 3 *****
Material: G4_Pb density: 11.350 g/cm3 RadL: 5.613 mm Nucl.Int.Length: 18.261 cm Imean: 823.000 eV
Material: G4_Pb density: 11.350 g/cm3 RadL: 5.613 mm Nucl.Int.Length: 18.247 cm
Imean: 823.000 eV
---> Element: Pb (Pb) Z = 82.0 N = 207.2 A = 207.22 g/mole
---> Isotope: Pb204 Z = 82 N = 204 A = 203.97 g/mole abundance: 1.40 %
---> Isotope: Pb206 Z = 82 N = 206 A = 205.97 g/mole abundance: 24.10 %
@@ -24,7 +27,9 @@
ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: liquidArgon density: 1.390 g/cm3 RadL: 14.065 cm Nucl.Int.Length: 86.006 cm Imean: 188.000 eV
Material: liquidArgon density: 1.390 g/cm3 RadL: 14.065 cm Nucl.Int.Length: 86.078 cm
Imean: 188.000 eV
---> Element: liquidArgon ( ) Z = 18.0 N = 40.0 A = 39.95 g/mole
---> Isotope: 36 Z = 18 N = 36 A = 35.97 g/mole abundance: 0.34 %
---> Isotope: 38 Z = 18 N = 38 A = 37.96 g/mole abundance: 0.06 %
@@ -32,7 +37,9 @@
ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: Galactic density: 0.000 kg/m3 RadL: 204727512.315 pc Nucl.Int.Length: 114561548.020 pc Imean: 19.200 eV temperature: 2.73 K pressure: 0.00 atm
Material: Galactic density: 0.000 kg/m3 RadL: 204727512.315 pc Nucl.Int.Length: 113804112.837 pc
Imean: 19.200 eV temperature: 2.73 K pressure: 0.00 atm
---> Element: Galactic ( ) Z = 1.0 N = 1.0 A = 1.01 g/mole
---> Isotope: 1 Z = 1 N = 1 A = 1.01 g/mole abundance: 99.99 %
---> Isotope: 2 Z = 1 N = 2 A = 2.01 g/mole abundance: 0.01 %
@@ -47,6 +54,12 @@ Checking overlaps for volume Gap ... OK!
------------------------------------------------------------
---> The calorimeter is 10 layers of: [ 10mm of G4_Pb + 5mm of liquidArgon ]
------------------------------------------------------------
G4SDManager::AddNewCollection : the collection <Absorber/Edep> is registered at 1
G4SDManager::AddNewCollection : the collection <Absorber/TrackLength> is registered at 2
New sensitive detector <Absorber> is registored at /
G4SDManager::AddNewCollection : the collection <Gap/Edep> is registered at 3
G4SDManager::AddNewCollection : the collection <Gap/TrackLength> is registered at 4
New sensitive detector <Gap> is registored at /
### Adding tracking cuts for neutron TimeCut(ns)= 10000 KinEnergyCut(MeV)= 0
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
@@ -58,12 +71,10 @@ Current available graphics systems are:
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
OpenGLImmediateQt (OGLI, OGLIQt)
OpenGLImmediateX (OGLIX)
OpenGLImmediateXm (OGLIXm, OGLI_FALLBACK, OGLIQt_FALLBACK)
OpenGLStoredQt (OGL, OGLS, OGLSQt)
OpenGLImmediateXm (OGLI, OGLIXm)
OpenGLStoredX (OGLSX)
OpenGLStoredXm (OGLSXm, OGL_FALLBACK, OGLS_FALLBACK, OGLSQt_FALLBACK)
OpenGLStoredXm (OGL, OGLS, OGLSXm)
RayTracer (RayTracer)
RayTracerX (RayTracerX)
VRML1FILE (VRML1FILE)
@@ -116,7 +127,7 @@ conv: for gamma SubType= 14
msc: for e- SubType= 10
RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
UrbanMsc : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 10 TeV Table with 35 bins Emin= 100 MeV Emax= 10 TeV
eIoni: for e- SubType= 2
@@ -143,7 +154,7 @@ CoulombScat: for e- SubType= 1
msc: for e+ SubType= 10
RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
UrbanMsc : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 10 TeV Table with 35 bins Emin= 100 MeV Emax= 10 TeV
eIoni: for e+ SubType= 2
@@ -193,13 +204,14 @@ hBrems: for proton SubType= 3
hPairProd: for proton SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 13x1001 from 7.50618 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
msc: for GenericIon SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 10 TeV
UrbanMsc : Emin= 0 eV Emax= 10 TeV
ionIoni: for GenericIon SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -213,7 +225,7 @@ ionIoni: for GenericIon SubType= 2
msc: for alpha SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
UrbanMsc : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
ionIoni: for alpha SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -245,6 +257,7 @@ hBrems: for anti_proton SubType= 3
hPairProd: for anti_proton SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 13x1001 from 7.50618 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -270,6 +283,7 @@ hBrems: for kaon+ SubType= 3
hPairProd: for kaon+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 14x1001 from 3.94942 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -295,6 +309,7 @@ hBrems: for kaon- SubType= 3
hPairProd: for kaon- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 14x1001 from 3.94942 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -321,6 +336,7 @@ muBrems: for mu+ SubType= 3
muPairProd: for mu+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 17x1001 from 1 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 10 TeV
@@ -353,6 +369,7 @@ muBrems: for mu- SubType= 3
muPairProd: for mu- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 17x1001 from 1 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 10 TeV
@@ -384,6 +401,7 @@ hBrems: for pi+ SubType= 3
hPairProd: for pi+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 16x1001 from 1.11656 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -409,215 +427,221 @@ hBrems: for pi- SubType= 3
hPairProd: for pi- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 16x1001 from 1.11656 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
============================================================================================
HADRONIC PROCESSES SUMMARY (verbose level 1)
Hadronic Processes for <GenericIon>
-----------------------------------
ionInelastic Models: Binary Light Ion Cascade: Emin(GeV)= 0 Emax(GeV)= 4
FTFP: Emin(GeV)= 2 Emax(GeV)= 100000
====================================================================
HADRONIC PROCESSES SUMMARY (verbose level 1)
ionInelastic Crs sctns: Glauber-Gribov nucleus nucleus: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for GenericIon
Process: ionInelastic
Model: Binary Light Ion Cascade: 0 eV ---> 4 GeV
Model: FTFP: 2 GeV ---> 100 TeV
Cr_sctns: Glauber-Gribov nucleus nucleus: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Hadronic Processes for <anti_neutron>
-----------------------------------
hadElastic Models: hElasticLHEP: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for anti_neutron
hadElastic Crs sctns: GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
AntiNeutronInelastic Models: FTFP: Emin(GeV)= 0 Emax(GeV)= 100000
Process: anti_neutronInelastic
Model: FTFP: 0 eV ---> 100 TeV
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
AntiNeutronInelastic Crs sctns: AntiAGlauber: Emin(GeV)= 0 Emax(GeV)= 1.79769e+305
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for anti_proton
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100.1 MeV
Model: AntiAElastic: 100 MeV ---> 100 TeV
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Hadronic Processes for <anti_proton>
-----------------------------------
hadElastic Models: hElasticLHEP: Emin(GeV)= 0 Emax(GeV)= 0.1
AntiAElastic: Emin(GeV)= 0.1 Emax(GeV)= 100000
Process: anti_protonInelastic
Model: FTFP: 0 eV ---> 100 TeV
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
hadElastic Crs sctns: AntiAGlauber: Emin(GeV)= 0 Emax(GeV)= 1.79769e+305
GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: hFritiofCaptureAtRest
AntiProtonInelastic Models: FTFP: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for e+
AntiProtonInelastic Crs sctns: AntiAGlauber: Emin(GeV)= 0 Emax(GeV)= 1.79769e+305
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: positronNuclear
Model: G4ElectroVDNuclearModel: 0 eV ---> 1 PeV
Cr_sctns: ElectroNuclearXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
hFritiofCaptureAtRest
---------------------------------------------------
Hadronic Processes for e-
Hadronic Processes for <e+>
-----------------------------------
PositronNuclear Models: G4ElectroVDNuclearModel: Emin(GeV)= 0 Emax(GeV)= 1e+06
Process: electronNuclear
Model: G4ElectroVDNuclearModel: 0 eV ---> 1 PeV
Cr_sctns: ElectroNuclearXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
PositronNuclear Crs sctns: ElectroNuclearXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for gamma
Process: photonNuclear
Model: BertiniCascade: 0 eV ---> 3.5 GeV
Model: TheoFSGenerator: 3 GeV ---> 100 TeV
Cr_sctns: PhotoNuclearXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Hadronic Processes for <e->
-----------------------------------
ElectroNuclear Models: G4ElectroVDNuclearModel: Emin(GeV)= 0 Emax(GeV)= 1e+06
---------------------------------------------------
Hadronic Processes for kaon+
ElectroNuclear Crs sctns: ElectroNuclearXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: kaon+Inelastic
Model: FTFP: 4 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 5 GeV
Cr_sctns: ChipsKaonPlusInelasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Hadronic Processes for <gamma>
-----------------------------------
PhotonInelastic Models: BertiniCascade: Emin(GeV)= 0 Emax(GeV)= 3.5
TheoFSGenerator: Emin(GeV)= 3 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for kaon-
PhotonInelastic Crs sctns: PhotoNuclearXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: kaon-Inelastic
Model: FTFP: 4 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 5 GeV
Cr_sctns: ChipsKaonMinusInelasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Hadronic Processes for <kaon+>
-----------------------------------
hadElastic Models: hElasticLHEP: Emin(GeV)= 0 Emax(GeV)= 100000
Process: hBertiniCaptureAtRest
hadElastic Crs sctns: GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for lambda
KaonPlusInelastic Models: FTFP: Emin(GeV)= 4 Emax(GeV)= 100000
BertiniCascade: Emin(GeV)= 0 Emax(GeV)= 5
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
KaonPlusInelastic Crs sctns: ChipsKaonPlusInelasticXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: lambdaInelastic
Model: BertiniCascade: 0 eV ---> 6 GeV
Model: FTFP: 2 GeV ---> 100 TeV
Cr_sctns: ChipsHyperonInelasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for mu-
Hadronic Processes for <kaon->
-----------------------------------
hadElastic Models: hElasticLHEP: Emin(GeV)= 0 Emax(GeV)= 100000
Process: muMinusCaptureAtRest
hadElastic Crs sctns: GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for neutron
KaonMinusInelastic Models: FTFP: Emin(GeV)= 4 Emax(GeV)= 100000
BertiniCascade: Emin(GeV)= 0 Emax(GeV)= 5
Process: hadElastic
Model: hElasticCHIPS: 0 eV ---> 100 TeV
Cr_sctns: ChipsNeutronElasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
KaonMinusInelastic Crs sctns: ChipsKaonMinusInelasticXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: neutronInelastic
Model: FTFP: 4 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 5 GeV
Cr_sctns: G4NeutronInelasticXS: 0 eV ---> 100 TeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
hBertiniCaptureAtRest
Process: nCapture
Model: nRadCapture: 0 eV ---> 100 TeV
Cr_sctns: G4NeutronCaptureXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaCaptureXS: 0 eV ---> 100 TeV
Hadronic Processes for <lambda>
-----------------------------------
hadElastic Models: hElasticLHEP: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for pi+
hadElastic Crs sctns: GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 1.0001 GeV
Model: hElasticGlauber: 1 GeV ---> 100 TeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
LambdaInelastic Models: BertiniCascade: Emin(GeV)= 0 Emax(GeV)= 6
FTFP: Emin(GeV)= 2 Emax(GeV)= 100000
LambdaInelastic Crs sctns: ChipsHyperonInelasticXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Hadronic Processes for <mu->
muMinusCaptureAtRest
Hadronic Processes for <neutron>
-----------------------------------
hadElastic Models: hElasticCHIPS: Emin(GeV)= 0 Emax(GeV)= 100000
hadElastic Crs sctns: ChipsNeutronElasticXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
NeutronInelastic Models: FTFP: Emin(GeV)= 4 Emax(GeV)= 100000
BertiniCascade: Emin(GeV)= 0 Emax(GeV)= 5
NeutronInelastic Crs sctns: Barashenkov-Glauber: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
nCapture Models: G4LCapture: Emin(GeV)= 0 Emax(GeV)= 20000
nCapture Crs sctns: GheishaCaptureXS: Emin(GeV)= 0 Emax(GeV)= 100000
nFission Models: G4LFission: Emin(GeV)= 0 Emax(GeV)= 20000
nFission Crs sctns: GheishaFissionXS: Emin(GeV)= 0 Emax(GeV)= 100000
Hadronic Processes for <pi+>
-----------------------------------
hadElastic Models: hElasticLHEP: Emin(GeV)= 0 Emax(GeV)= 1
hElasticGlauber: Emin(GeV)= 1 Emax(GeV)= 100000
hadElastic Crs sctns: Barashenkov-Glauber: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
PionPlusInelastic Models: FTFP: Emin(GeV)= 4 Emax(GeV)= 100000
BertiniCascade: Emin(GeV)= 0 Emax(GeV)= 5
PionPlusInelastic Crs sctns: G4CrossSectionPairGG: Emin(GeV)= 0 Emax(GeV)= 100000
Process: pi+Inelastic
Model: FTFP: 4 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 5 GeV
Cr_sctns: G4CrossSectionPairGG: 0 eV ---> 100 TeV
G4CrossSectionPairGG: G4PiNuclearCrossSection cross sections
below 91 GeV, Glauber-Gribov above
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for pi-
Hadronic Processes for <pi->
-----------------------------------
hadElastic Models: hElasticLHEP: Emin(GeV)= 0 Emax(GeV)= 1
hElasticGlauber: Emin(GeV)= 1 Emax(GeV)= 100000
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 1.0001 GeV
Model: hElasticGlauber: 1 GeV ---> 100 TeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
hadElastic Crs sctns: Barashenkov-Glauber: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
PionMinusInelastic Models: FTFP: Emin(GeV)= 4 Emax(GeV)= 100000
BertiniCascade: Emin(GeV)= 0 Emax(GeV)= 5
PionMinusInelastic Crs sctns: G4CrossSectionPairGG: Emin(GeV)= 0 Emax(GeV)= 100000
Process: pi-Inelastic
Model: FTFP: 4 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 5 GeV
Cr_sctns: G4CrossSectionPairGG: 0 eV ---> 100 TeV
G4CrossSectionPairGG: G4PiNuclearCrossSection cross sections
below 91 GeV, Glauber-Gribov above
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
hBertiniCaptureAtRest
Process: hBertiniCaptureAtRest
Hadronic Processes for <proton>
-----------------------------------
hadElastic Models: hElasticCHIPS: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for proton
hadElastic Crs sctns: ChipsProtonElasticXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: hadElastic
Model: hElasticCHIPS: 0 eV ---> 100 TeV
Cr_sctns: ChipsProtonElasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
ProtonInelastic Models: FTFP: Emin(GeV)= 4 Emax(GeV)= 100000
BertiniCascade: Emin(GeV)= 0 Emax(GeV)= 5
Process: protonInelastic
Model: FTFP: 4 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 5 GeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
ProtonInelastic Crs sctns: Barashenkov-Glauber: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
============================================================================================
### Run 0 start.
Using Root analysis manager
---> Begin of event: 0
================================================================
### Run 0 starts.
... open Root analysis file : B4.root - done
--> Event 0 starts.
---> End of event: 0
Absorber: total energy: 288.831 MeV total track length: 20.4665 cm
Gap: total energy: 8.19232 MeV total track length: 3.81315 cm
Absorber: total energy: 283.263 MeV total track length: 19.743 cm
Gap: total energy: 10.6009 MeV total track length: 5.29096 cm
----> print histograms statistic
----> print histograms statistic for the entire run
EAbs : mean = 288.831 MeV rms = 0 eV
EGap : mean = 8.19232 MeV rms = 0 eV
LAbs : mean = 20.4665 cm rms = 0 fm
LGap : mean = 3.81315 cm rms = 0 fm
EAbs : mean = 283.263 MeV rms = 0 eV
EGap : mean = 10.6009 MeV rms = 0 eV
LAbs : mean = 19.743 cm rms = 0 fm
LGap : mean = 5.29096 cm rms = 0 fm
... write Root file : B4.root - done
Transportation, msc, hIoni, ionIoni
hBrems, hPairProd, eIoni, eBrem
annihil, CoulombScat, phot, compt
conv, muIoni, muBrems, muPairProd
PhotonInelastic, ElectroNuclear, PositronNuclear, Decay
hadElastic, NeutronInelastic, nCapture, nFission
ProtonInelastic, PionPlusInelastic, PionMinusInelastic, KaonPlusInelastic
KaonMinusInelastic, KaonZeroLInelastic, KaonZeroSInelastic, LambdaInelastic
AntiLambdaInelastic,SigmaMinusInelastic,AntiSigmaMinusInelastic, SigmaPlusInelastic
AntiSigmaPlusInelastic, XiMinusInelastic,AntiXiMinusInelastic, XiZeroInelastic
AntiXiZeroInelastic,OmegaMinusInelastic,AntiOmegaMinusInelastic,AntiProtonInelastic
AntiNeutronInelastic,AntiDeuteronInelastic,AntiTritonInelasticProcess,AntiHe3InelasticProcess
AntiAlphaInelasticProcess,hFritiofCaptureAtRest,hBertiniCaptureAtRest,muMinusCaptureAtRest
dInelastic, tInelastic, He3Inelastic, alphaInelastic
ionInelastic, nKiller
photonNuclear, electronNuclear, positronNuclear, Decay
hadElastic, neutronInelastic, nCapture, protonInelastic
pi+Inelastic, pi-Inelastic, kaon+Inelastic, kaon-Inelastic
kaon0LInelastic, kaon0SInelastic, lambdaInelastic,anti-lambdaInelastic
sigma-Inelastic,anti_sigma-Inelastic, sigma+Inelastic,anti_sigma+Inelastic
xi-Inelastic, anti_xi-Inelastic, xi0Inelastic, anti_xi0Inelastic
omega-Inelastic,anti_omega-Inelastic,anti_protonInelastic,anti_neutronInelastic
anti_deuteronInelastic,anti_tritonInelastic, anti_He3Inelastic,anti_alphaInelastic
hFritiofCaptureAtRest,hBertiniCaptureAtRest,muMinusCaptureAtRest, dInelastic
tInelastic, He3Inelastic, alphaInelastic, ionInelastic
nKiller
phot: for gamma SubType= 12
LambdaPrime table from 200 keV to 10 TeV in 54 bins
@@ -639,7 +663,7 @@ conv: for gamma SubType= 14
msc: for e- SubType= 10
RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
UrbanMsc : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 10 TeV Table with 35 bins Emin= 100 MeV Emax= 10 TeV
eIoni: for e- SubType= 2
@@ -666,7 +690,7 @@ CoulombScat: for e- SubType= 1
msc: for e+ SubType= 10
RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
UrbanMsc : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 10 TeV Table with 35 bins Emin= 100 MeV Emax= 10 TeV
eIoni: for e+ SubType= 2
@@ -716,13 +740,14 @@ hBrems: for proton SubType= 3
hPairProd: for proton SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 13x1001 from 7.50618 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
msc: for GenericIon SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 10 TeV
UrbanMsc : Emin= 0 eV Emax= 10 TeV
ionIoni: for GenericIon SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -736,7 +761,7 @@ ionIoni: for GenericIon SubType= 2
msc: for alpha SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
UrbanMsc : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
ionIoni: for alpha SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -768,6 +793,7 @@ hBrems: for anti_proton SubType= 3
hPairProd: for anti_proton SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 13x1001 from 7.50618 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -793,6 +819,7 @@ hBrems: for kaon+ SubType= 3
hPairProd: for kaon+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 14x1001 from 3.94942 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -818,6 +845,7 @@ hBrems: for kaon- SubType= 3
hPairProd: for kaon- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 14x1001 from 3.94942 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -844,6 +872,7 @@ muBrems: for mu+ SubType= 3
muPairProd: for mu+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 17x1001 from 1 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 10 TeV
@@ -876,6 +905,7 @@ muBrems: for mu- SubType= 3
muPairProd: for mu- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 17x1001 from 1 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 10 TeV
@@ -907,6 +937,7 @@ hBrems: for pi+ SubType= 3
hPairProd: for pi+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 16x1001 from 1.11656 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -932,22 +963,23 @@ hBrems: for pi- SubType= 3
hPairProd: for pi- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 16x1001 from 1.11656 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
### Run 1 start.
Using Root analysis manager
---> Begin of event: 0
### Run 1 starts.
... open Root analysis file : B4.root - done
--> Event 0 starts.
---> End of event: 0
Absorber: total energy: 282.08 MeV total track length: 20.1981 cm
Gap: total energy: 16.6294 MeV total track length: 8.51564 cm
Absorber: total energy: 282.146 MeV total track length: 20.3465 cm
Gap: total energy: 18.8759 MeV total track length: 9.43449 cm
----> print histograms statistic
----> print histograms statistic for the entire run
EAbs : mean = 282.08 MeV rms = 0 eV
EGap : mean = 16.6294 MeV rms = 0 eV
LAbs : mean = 20.1981 cm rms = 0 fm
LGap : mean = 8.51564 cm rms = 0 fm
EAbs : mean = 282.146 MeV rms = 0 eV
EGap : mean = 18.8759 MeV rms = 0 eV
LAbs : mean = 20.3465 cm rms = 0 fm
LGap : mean = 9.43449 cm rms = 0 fm
... write Root file : B4.root - done
phot: for gamma SubType= 12
LambdaPrime table from 200 keV to 10 TeV in 54 bins
@@ -969,7 +1001,7 @@ conv: for gamma SubType= 14
msc: for e- SubType= 10
RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
UrbanMsc : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 10 TeV Table with 35 bins Emin= 100 MeV Emax= 10 TeV
eIoni: for e- SubType= 2
@@ -996,7 +1028,7 @@ CoulombScat: for e- SubType= 1
msc: for e+ SubType= 10
RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
UrbanMsc : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 10 TeV Table with 35 bins Emin= 100 MeV Emax= 10 TeV
eIoni: for e+ SubType= 2
@@ -1046,13 +1078,14 @@ hBrems: for proton SubType= 3
hPairProd: for proton SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 13x1001 from 7.50618 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
msc: for GenericIon SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 10 TeV
UrbanMsc : Emin= 0 eV Emax= 10 TeV
ionIoni: for GenericIon SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -1066,7 +1099,7 @@ ionIoni: for GenericIon SubType= 2
msc: for alpha SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
UrbanMsc : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
ionIoni: for alpha SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -1098,6 +1131,7 @@ hBrems: for anti_proton SubType= 3
hPairProd: for anti_proton SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 13x1001 from 7.50618 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -1123,6 +1157,7 @@ hBrems: for kaon+ SubType= 3
hPairProd: for kaon+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 14x1001 from 3.94942 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -1148,6 +1183,7 @@ hBrems: for kaon- SubType= 3
hPairProd: for kaon- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 14x1001 from 3.94942 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -1174,6 +1210,7 @@ muBrems: for mu+ SubType= 3
muPairProd: for mu+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 17x1001 from 1 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 10 TeV
@@ -1206,6 +1243,7 @@ muBrems: for mu- SubType= 3
muPairProd: for mu- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 17x1001 from 1 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 10 TeV
@@ -1237,6 +1275,7 @@ hBrems: for pi+ SubType= 3
hPairProd: for pi+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 16x1001 from 1.11656 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -1262,21 +1301,22 @@ hBrems: for pi- SubType= 3
hPairProd: for pi- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 16x1001 from 1.11656 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
### Run 2 start.
Using Root analysis manager
---> Begin of event: 0
### Run 2 starts.
... open Root analysis file : B4.root - done
--> Event 0 starts.
---> End of event: 0
Absorber: total energy: 462.772 MeV total track length: 33.1144 cm
Gap: total energy: 21.7635 MeV total track length: 11.0673 cm
Absorber: total energy: 468.273 MeV total track length: 33.5299 cm
Gap: total energy: 16.8004 MeV total track length: 8.15542 cm
----> print histograms statistic
----> print histograms statistic for the entire run
EAbs : mean = 462.772 MeV rms = 0 eV
EGap : mean = 21.7635 MeV rms = 0 eV
LAbs : mean = 33.1144 cm rms = 0 fm
LGap : mean = 11.0673 cm rms = 0 fm
EAbs : mean = 468.273 MeV rms = 0 eV
EGap : mean = 16.8004 MeV rms = 0 eV
LAbs : mean = 33.5299 cm rms = 0 fm
LGap : mean = 8.15542 cm rms = 0 fm
... write Root file : B4.root - done
Graphics systems deleted.
Visualization Manager deleting...
+2 -3
View File
@@ -15,7 +15,6 @@
/gui/addMenu run Run
/gui/addButton run "beamOn 1" "/run/beamOn 1"
/gui/addButton run run1 "/control/execute run1.mac"
/gui/addButton run run2 "/control/execute run2.mac"
#
# Gun menu :
/gui/addMenu gun Gun
@@ -38,14 +37,14 @@
# Viewer menu :
/gui/addMenu viewer Viewer
/gui/addButton viewer "Set style surface" "/vis/viewer/set/style surface"
/gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wire"
/gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wireframe"
/gui/addButton viewer "Refresh viewer" "/vis/viewer/refresh"
/gui/addButton viewer "Update viewer (interaction or end-of-file)" "/vis/viewer/update"
/gui/addButton viewer "Flush viewer (= refresh + update)" "/vis/viewer/flush"
/gui/addButton viewer "Update scene" "/vis/scene/notifyHandlers"
#
# To limit the output flow in the "dump" widget :
/B4/event/setPrintModulo 100
/run/printProgress 100
#
# User defined icon :
/gui/addIcon "Run beam on" user_icon "/run/beamOn 1" run.png
+1 -1
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B4Analysis.hh 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B4Analysis.hh
/// \brief Selection of the analysis technology
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
//
// $Id: B4PrimaryGeneratorAction.hh 69223 2013-04-23 12:36:10Z gcosmo $
//
/// \file B4PrimaryGeneratorAction.hh
/// \brief Definition of the B4PrimaryGeneratorAction class
+1 -1
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B4RunAction.hh 74265 2013-10-02 14:41:20Z gcosmo $
//
/// \file B4RunAction.hh
/// \brief Definition of the B4RunAction class
@@ -0,0 +1,51 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B4dActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B4dActionInitialization.hh
/// \brief Definition of the B4dActionInitialization class
#ifndef B4dActionInitialization_h
#define B4dActionInitialization_h 1
#include "G4VUserActionInitialization.hh"
/// Action initialization class.
///
class B4dActionInitialization : public G4VUserActionInitialization
{
public:
B4dActionInitialization();
virtual ~B4dActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
};
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B4dDetectorConstruction.hh 75215 2013-10-29 16:07:06Z gcosmo $
//
/// \file B4dDetectorConstruction.hh
/// \brief Definition of the B4dDetectorConstruction class
@@ -34,10 +34,8 @@
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
class G4Box;
class G4VPhysicalVolume;
class G4UniformMagField;
class G4GenericMessenger;
class G4GlobalMagFieldMessenger;
/// Detector construction class to define materials and geometry.
/// The calorimeter is a box made of a given number of layers. A layer consists
@@ -50,15 +48,10 @@ class G4GenericMessenger;
/// - the number of layers,
/// - the transverse size of the calorimeter (the input face is a square).
///
/// In DefineVolumes(), sensitive detectors of G4MultiFunctionalDetector type
/// with primitive scorers are created and associated with the Absorber
/// and Gap volumes.
///
/// In addition a transverse uniform magnetic field is defined in
/// SetMagField() method which can be activated
/// via a command defined using G4GenericMessenger class:
/// - /B4/det/setMagField value unit
/// In ConstructSDandField() sensitive detectors of G4MultiFunctionalDetector
/// type with primitive scorers are created and associated with the Absorber
/// and Gap volumes. In addition a transverse uniform magnetic field is defined
/// via G4GlobalMagFieldMessenger class.
class B4dDetectorConstruction : public G4VUserDetectorConstruction
{
@@ -68,10 +61,7 @@ class B4dDetectorConstruction : public G4VUserDetectorConstruction
public:
virtual G4VPhysicalVolume* Construct();
// set methods
//
void SetMagField(G4double fieldValue);
virtual void ConstructSDandField();
private:
// methods
@@ -81,8 +71,8 @@ class B4dDetectorConstruction : public G4VUserDetectorConstruction
// data members
//
G4GenericMessenger* fMessenger; // messenger
G4UniformMagField* fMagField; // magnetic field
static G4ThreadLocal G4GlobalMagFieldMessenger* fMagFieldMessenger;
// magnetic field messenger
G4bool fCheckOverlaps; // option to activate checking of volumes overlaps
};
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B4dEventAction.hh 75215 2013-10-29 16:07:06Z gcosmo $
//
/// \file B4dEventAction.hh
/// \brief Definition of the B4dEventAction class
@@ -36,18 +36,11 @@
#include "G4THitsMap.hh"
#include "globals.hh"
class G4GenericMessenger;
/// Event action class
///
/// In EndOfEventAction(), it prints the accumulated quantities of the energy
/// deposit and track lengths of charged particles in Absober and Gap layers
/// stored in the hits collections.
///
/// The data member fPrintModulo defines the frequency of printing
/// the accumulated quantities. Its value can be changed via a command
/// defined using G4GenericMessenger class:
/// - /B4/event/setPrintModulo value
class B4dEventAction : public G4UserEventAction
{
@@ -57,28 +50,21 @@ public:
virtual void BeginOfEventAction(const G4Event* event);
virtual void EndOfEventAction(const G4Event* event);
// set methods
void SetPrintModulo(G4int value);
private:
// methods
G4THitsMap<G4double>* GetHitsCollection(const G4String& hcName,
G4THitsMap<G4double>* GetHitsCollection(G4int hcID,
const G4Event* event) const;
G4double GetSum(G4THitsMap<G4double>* hitsMap) const;
void PrintEventStatistics(G4double absoEdep, G4double absoTrackLength,
G4double gapEdep, G4double gapTrackLength) const;
// data members
G4GenericMessenger* fMessenger;
G4int fPrintModulo;
G4int fAbsoEdepHCID;
G4int fGapEdepHCID;
G4int fAbsoTrackLengthHCID;
G4int fGapTrackLengthHCID;
};
// inline functions
inline void B4dEventAction::SetPrintModulo(G4int value) {
fPrintModulo = value;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+1 -1
View File
@@ -1,4 +1,4 @@
# Macro file for the initialization phase of "exampleN03.cc"
# Macro file for the initialization phase of example B4
# when running in interactive mode without visualization
#
# Set some default verbose
+1 -1
View File
@@ -1,4 +1,4 @@
# Macro file for the initialization phase of "exampleN03.cc"
# Macro file for the initialization phase of example B4
# when running in interactive mode with visualization
#
# Sets some default verbose
+2 -2
View File
@@ -21,12 +21,12 @@
# 20 events
#
/tracking/verbose 0
/B4/event/setPrintModulo 5
/run/printProgress 5
/run/beamOn 20
#
# Magnetic field
#
/B4/det/setMagField 0.2 tesla
/globalField/setValue 0.2 0 0 tesla
/run/beamOn 3
#
# Activate/inactivate physics processes
+1 -1
View File
@@ -7,6 +7,6 @@
# electron 50 MeV in direction (0.,0.,1.)
# 1000 events
#
/B4/event/setPrintModulo 100
/run/printProgress 100
/run/beamOn 1000
@@ -23,10 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
//
/// \file B4dPrimaryGeneratorAction.cc
/// \brief Implementation of the B4dPrimaryGeneratorAction class
// $Id: B4PrimaryGeneratorAction.cc 75215 2013-10-29 16:07:06Z gcosmo $
//
/// \file B4PrimaryGeneratorAction.cc
/// \brief Implementation of the B4PrimaryGeneratorAction class
#include "B4PrimaryGeneratorAction.hh"
@@ -85,9 +85,12 @@ void B4PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
worldZHalfLength = worldBox->GetZHalfLength();
}
else {
G4cerr << "World volume of box not found." << G4endl;
G4cerr << "Perhaps you have changed geometry." << G4endl;
G4cerr << "The gun will be place in the center." << G4endl;
G4ExceptionDescription msg;
msg << "World volume of box not found." << G4endl;
msg << "Perhaps you have changed geometry." << G4endl;
msg << "The gun will be place in the center.";
G4Exception("B4PrimaryGeneratorAction::GeneratePrimaries()",
"MyCode0002", JustWarning, msg);
}
// Set gun position
+70 -64
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B4RunAction.cc 75215 2013-10-29 16:07:06Z gcosmo $
//
/// \file B4RunAction.cc
/// \brief Implementation of the B4RunAction class
@@ -41,50 +41,30 @@
B4RunAction::B4RunAction()
: G4UserRunAction()
{
}
// set printing event number per each event
G4RunManager::GetRunManager()->SetPrintProgress(1);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B4RunAction::~B4RunAction()
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B4RunAction::BeginOfRunAction(const G4Run* run)
{
G4cout << "### Run " << run->GetRunID() << " start." << G4endl;
//inform the runManager to save random number seed
//G4RunManager::GetRunManager()->SetRandomNumberStore(true);
// Book histograms, ntuple
//
// Create analysis manager
// The choice of analysis technology is done via selectin of a namespace
// in B4Analysis.hh
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
G4cout << "Using " << analysisManager->GetType()
<< " analysis manager" << G4endl;
G4cout << "Using " << analysisManager->GetType() << G4endl;
// Create directories
//analysisManager->SetHistoDirectoryName("histograms");
//analysisManager->SetNtupleDirectoryName("ntuple");
// Open an output file
//
G4String fileName = "B4";
analysisManager->OpenFile(fileName);
analysisManager->SetVerboseLevel(1);
analysisManager->SetFirstHistoId(1);
// Creating histograms
// Book histograms, ntuple
//
// Creating histograms
analysisManager->CreateH1("1","Edep in absorber", 100, 0., 800*MeV);
analysisManager->CreateH1("2","Edep in gap", 100, 0., 100*MeV);
analysisManager->CreateH1("3","trackL in absorber", 100, 0., 1*m);
analysisManager->CreateH1("4","trackL in gap", 100, 0., 50*cm);
// Creating ntuple
//
analysisManager->CreateNtuple("B4", "Edep and TrackL");
@@ -97,43 +77,69 @@ void B4RunAction::BeginOfRunAction(const G4Run* run)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B4RunAction::EndOfRunAction(const G4Run* aRun)
B4RunAction::~B4RunAction()
{
G4int nofEvents = aRun->GetNumberOfEvent();
if ( nofEvents == 0 ) return;
// print histogram statistics
//
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
if ( analysisManager->GetH1(1) ) {
G4cout << "\n ----> print histograms statistic \n" << G4endl;
G4cout
<< " EAbs : mean = " << G4BestUnit(analysisManager->GetH1(1)->mean(), "Energy")
<< " rms = " << G4BestUnit(analysisManager->GetH1(1)->rms(), "Energy")
<< G4endl;
G4cout
<< " EGap : mean = " << G4BestUnit(analysisManager->GetH1(2)->mean(), "Energy")
<< " rms = " << G4BestUnit(analysisManager->GetH1(2)->rms(), "Energy")
<< G4endl;
G4cout
<< " LAbs : mean = " << G4BestUnit(analysisManager->GetH1(3)->mean(), "Length")
<< " rms = " << G4BestUnit(analysisManager->GetH1(3)->rms(), "Length")
<< G4endl;
G4cout
<< " LGap : mean = " << G4BestUnit(analysisManager->GetH1(4)->mean(), "Length")
<< " rms = " << G4BestUnit(analysisManager->GetH1(4)->rms(), "Length")
<< G4endl;
}
// save histograms
//
analysisManager->Write();
analysisManager->CloseFile();
// complete cleanup
//
delete G4AnalysisManager::Instance();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B4RunAction::BeginOfRunAction(const G4Run* /*run*/)
{
//inform the runManager to save random number seed
//G4RunManager::GetRunManager()->SetRandomNumberStore(true);
// Get analysis manager
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
// Open an output file
//
G4String fileName = "B4";
analysisManager->OpenFile(fileName);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B4RunAction::EndOfRunAction(const G4Run* /*run*/)
{
// print histogram statistics
//
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
if ( analysisManager->GetH1(1) ) {
G4cout << "\n ----> print histograms statistic ";
if(isMaster) {
G4cout << "for the entire run \n" << G4endl;
}
else {
G4cout << "for the local thread \n" << G4endl;
}
G4cout << " EAbs : mean = "
<< G4BestUnit(analysisManager->GetH1(1)->mean(), "Energy")
<< " rms = "
<< G4BestUnit(analysisManager->GetH1(1)->rms(), "Energy") << G4endl;
G4cout << " EGap : mean = "
<< G4BestUnit(analysisManager->GetH1(2)->mean(), "Energy")
<< " rms = "
<< G4BestUnit(analysisManager->GetH1(2)->rms(), "Energy") << G4endl;
G4cout << " LAbs : mean = "
<< G4BestUnit(analysisManager->GetH1(3)->mean(), "Length")
<< " rms = "
<< G4BestUnit(analysisManager->GetH1(3)->rms(), "Length") << G4endl;
G4cout << " LGap : mean = "
<< G4BestUnit(analysisManager->GetH1(4)->mean(), "Length")
<< " rms = "
<< G4BestUnit(analysisManager->GetH1(4)->rms(), "Length") << G4endl;
}
// save histograms & ntuple
//
analysisManager->Write();
analysisManager->CloseFile();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B4dActionInitialization.cc 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B4dActionInitialization.cc
/// \brief Implementation of the B4dActionInitialization class
#include "B4dActionInitialization.hh"
#include "B4PrimaryGeneratorAction.hh"
#include "B4RunAction.hh"
#include "B4dEventAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B4dActionInitialization::B4dActionInitialization()
: G4VUserActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B4dActionInitialization::~B4dActionInitialization()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B4dActionInitialization::BuildForMaster() const
{
SetUserAction(new B4RunAction);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B4dActionInitialization::Build() const
{
SetUserAction(new B4PrimaryGeneratorAction);
SetUserAction(new B4RunAction);
SetUserAction(new B4dEventAction);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B4dDetectorConstruction.cc 77601 2013-11-26 17:08:44Z gcosmo $
//
/// \file B4dDetectorConstruction.cc
/// \brief Implementation of the B4dDetectorConstruction class
@@ -37,7 +37,8 @@
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4PVReplica.hh"
#include "G4UniformMagField.hh"
#include "G4GlobalMagFieldMessenger.hh"
#include "G4AutoDelete.hh"
#include "G4SDManager.hh"
#include "G4SDChargedFilter.hh"
@@ -49,41 +50,26 @@
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "G4FieldManager.hh"
#include "G4TransportationManager.hh"
#include "G4GenericMessenger.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include <stdio.h>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4ThreadLocal
G4GlobalMagFieldMessenger* B4dDetectorConstruction::fMagFieldMessenger = 0;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B4dDetectorConstruction::B4dDetectorConstruction()
: G4VUserDetectorConstruction(),
fMessenger(0),
fMagField(0),
fCheckOverlaps(true)
{
// Define /B4/det commands using generic messenger class
fMessenger
= new G4GenericMessenger(this, "/B4/det/", "Detector construction control");
// Define /B4/det/setMagField command
G4GenericMessenger::Command& setMagFieldCmd
= fMessenger->DeclareMethod("setMagField",
&B4dDetectorConstruction::SetMagField,
"Define magnetic field value (in X direction");
setMagFieldCmd.SetUnitCategory("Magnetic flux density");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B4dDetectorConstruction::~B4dDetectorConstruction()
{
delete fMagField;
delete fMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -95,7 +81,6 @@ G4VPhysicalVolume* B4dDetectorConstruction::Construct()
// Define volumes
return DefineVolumes();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -104,8 +89,7 @@ void B4dDetectorConstruction::DefineMaterials()
{
// Lead material defined using NIST Manager
G4NistManager* nistManager = G4NistManager::Instance();
G4bool fromIsotopes = false;
nistManager->FindOrBuildMaterial("G4_Pb", fromIsotopes);
nistManager->FindOrBuildMaterial("G4_Pb");
// Liquid argon material
G4double a; // mass of a mole;
@@ -143,9 +127,10 @@ G4VPhysicalVolume* B4dDetectorConstruction::DefineVolumes()
G4Material* gapMaterial = G4Material::GetMaterial("liquidArgon");
if ( ! defaultMaterial || ! absorberMaterial || ! gapMaterial ) {
G4cerr << "Cannot retrieve materials already defined. " << G4endl;
G4cerr << "Exiting application " << G4endl;
exit(1);
G4ExceptionDescription msg;
msg << "Cannot retrieve materials already defined.";
G4Exception("B4DetectorConstruction::DefineVolumes()",
"MyCode0001", FatalException, msg);
}
//
@@ -227,7 +212,7 @@ G4VPhysicalVolume* B4dDetectorConstruction::DefineVolumes()
= new G4LogicalVolume(
absorberS, // its solid
absorberMaterial, // its material
"Abso"); // its name
"AbsoLV"); // its name
new G4PVPlacement(
0, // no rotation
@@ -250,7 +235,7 @@ G4VPhysicalVolume* B4dDetectorConstruction::DefineVolumes()
= new G4LogicalVolume(
gapS, // its solid
gapMaterial, // its material
"Gap"); // its name
"GapLV"); // its name
new G4PVPlacement(
0, // no rotation
@@ -272,43 +257,6 @@ G4VPhysicalVolume* B4dDetectorConstruction::DefineVolumes()
<< gapThickness/mm << "mm of " << gapMaterial->GetName() << " ] "
<< "\n------------------------------------------------------------\n";
//
// Scorers
//
// declare Absorber as a MultiFunctionalDetector scorer
//
G4MultiFunctionalDetector* absDetector
= new G4MultiFunctionalDetector("Absorber");
G4VPrimitiveScorer* primitive;
G4SDChargedFilter* charged = new G4SDChargedFilter("chargedFilter");
primitive = new G4PSEnergyDeposit("Edep");
absDetector->RegisterPrimitive(primitive);
primitive = new G4PSTrackLength("TrackLength");
primitive ->SetFilter(charged);
absDetector->RegisterPrimitive(primitive);
G4SDManager::GetSDMpointer()->AddNewDetector(absDetector);
absorberLV->SetSensitiveDetector(absDetector);
// declare Gap as a MultiFunctionalDetector scorer
//
G4MultiFunctionalDetector* gapDetector
= new G4MultiFunctionalDetector("Gap");
primitive = new G4PSEnergyDeposit("Edep");
gapDetector->RegisterPrimitive(primitive);
primitive = new G4PSTrackLength("TrackLength");
primitive ->SetFilter(charged);
gapDetector->RegisterPrimitive(primitive);
G4SDManager::GetSDMpointer()->AddNewDetector(gapDetector);
gapLV->SetSensitiveDetector(gapDetector);
//
// Visualization attributes
//
@@ -326,25 +274,55 @@ G4VPhysicalVolume* B4dDetectorConstruction::DefineVolumes()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B4dDetectorConstruction::SetMagField(G4double fieldValue)
void B4dDetectorConstruction::ConstructSDandField()
{
// Apply a global uniform magnetic field along X axis
G4FieldManager* fieldManager
= G4TransportationManager::GetTransportationManager()->GetFieldManager();
G4SDManager::GetSDMpointer()->SetVerboseLevel(1);
//
// Scorers
//
// Delete the existing magnetic field
if ( fMagField ) delete fMagField;
// declare Absorber as a MultiFunctionalDetector scorer
//
G4MultiFunctionalDetector* absDetector
= new G4MultiFunctionalDetector("Absorber");
if ( fieldValue != 0. ) {
// create a new one if not null
fMagField
= new G4UniformMagField(G4ThreeVector(fieldValue, 0., 0.));
fieldManager->SetDetectorField(fMagField);
fieldManager->CreateChordFinder(fMagField);
}
else {
fMagField = 0;
fieldManager->SetDetectorField(fMagField);
}
G4VPrimitiveScorer* primitive;
primitive = new G4PSEnergyDeposit("Edep");
absDetector->RegisterPrimitive(primitive);
primitive = new G4PSTrackLength("TrackLength");
G4SDChargedFilter* charged = new G4SDChargedFilter("chargedFilter");
primitive ->SetFilter(charged);
absDetector->RegisterPrimitive(primitive);
SetSensitiveDetector("AbsoLV",absDetector);
// declare Gap as a MultiFunctionalDetector scorer
//
G4MultiFunctionalDetector* gapDetector
= new G4MultiFunctionalDetector("Gap");
primitive = new G4PSEnergyDeposit("Edep");
gapDetector->RegisterPrimitive(primitive);
primitive = new G4PSTrackLength("TrackLength");
primitive ->SetFilter(charged);
gapDetector->RegisterPrimitive(primitive);
SetSensitiveDetector("GapLV",gapDetector);
//
// Magnetic field
//
// Create global magnetic field messenger.
// Uniform magnetic field is then created automatically if
// the field value is not zero.
G4ThreeVector fieldValue = G4ThreeVector();
fMagFieldMessenger = new G4GlobalMagFieldMessenger(fieldValue);
fMagFieldMessenger->SetVerboseLevel(1);
// Register the field messenger for deleting
G4AutoDelete::Register(fMagFieldMessenger);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+35 -43
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B4dEventAction.cc 75604 2013-11-04 13:17:26Z gcosmo $
//
/// \file B4dEventAction.cc
/// \brief Implementation of the B4dEventAction class
@@ -35,7 +35,6 @@
#include "G4Event.hh"
#include "G4SDManager.hh"
#include "G4HCofThisEvent.hh"
#include "G4GenericMessenger.hh"
#include "G4UnitsTable.hh"
#include "Randomize.hh"
@@ -45,47 +44,39 @@
B4dEventAction::B4dEventAction()
: G4UserEventAction(),
fMessenger(0),
fPrintModulo(1)
{
// Define /B4/event commands using generic messenger class
fMessenger = new G4GenericMessenger(this, "/B4/event/", "Event control");
// Define /B4/event/setPrintModulo command
G4GenericMessenger::Command& setPrintModulo
= fMessenger->DeclareProperty("setPrintModulo",
fPrintModulo,
"Print events modulo n");
setPrintModulo.SetRange("value>0");
}
fAbsoEdepHCID(-1),
fGapEdepHCID(-1),
fAbsoTrackLengthHCID(-1),
fGapTrackLengthHCID(-1)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B4dEventAction::~B4dEventAction()
{
delete fMessenger;
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4THitsMap<G4double>*
B4dEventAction::GetHitsCollection(const G4String& hcName,
B4dEventAction::GetHitsCollection(G4int hcID,
const G4Event* event) const
{
G4int hcID
= G4SDManager::GetSDMpointer()->GetCollectionID(hcName);
G4THitsMap<G4double>* hitsCollection
= static_cast<G4THitsMap<G4double>*>(
event->GetHCofThisEvent()->GetHC(hcID));
if ( ! hitsCollection ) {
G4cerr << "Cannot access hitsCollection " << hcName << G4endl;
exit(1);
G4ExceptionDescription msg;
msg << "Cannot access hitsCollection ID " << hcID;
G4Exception("B4dEventAction::GetHitsCollection()",
"MyCode0003", FatalException, msg);
}
return hitsCollection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double B4dEventAction::GetSum(G4THitsMap<G4double>* hitsMap) const
{
G4double sumValue = 0;
@@ -119,33 +110,34 @@ void B4dEventAction::PrintEventStatistics(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B4dEventAction::BeginOfEventAction(const G4Event* event)
{
G4int eventID = event->GetEventID();
if ( eventID % fPrintModulo == 0 ) {
G4cout << "\n---> Begin of event: " << eventID << G4endl;
//CLHEP::HepRandom::showEngineStatus();
}
}
void B4dEventAction::BeginOfEventAction(const G4Event* /*event*/)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B4dEventAction::EndOfEventAction(const G4Event* event)
{
// Get sum value from hits collections
// Get hist collections IDs
if ( fAbsoEdepHCID == -1 ) {
fAbsoEdepHCID
= G4SDManager::GetSDMpointer()->GetCollectionID("Absorber/Edep");
fGapEdepHCID
= G4SDManager::GetSDMpointer()->GetCollectionID("Gap/Edep");
fAbsoTrackLengthHCID
= G4SDManager::GetSDMpointer()->GetCollectionID("Absorber/TrackLength");
fGapTrackLengthHCID
= G4SDManager::GetSDMpointer()->GetCollectionID("Gap/TrackLength");
}
// Get sum values from hits collections
//
G4double absoEdep
= GetSum(GetHitsCollection("Absorber/Edep", event));
G4double gapEdep
= GetSum(GetHitsCollection("Gap/Edep", event));
G4double absoEdep = GetSum(GetHitsCollection(fAbsoEdepHCID, event));
G4double gapEdep = GetSum(GetHitsCollection(fGapEdepHCID, event));
G4double absoTrackLength
= GetSum(GetHitsCollection("Absorber/TrackLength", event));
= GetSum(GetHitsCollection(fAbsoTrackLengthHCID, event));
G4double gapTrackLength
= GetSum(GetHitsCollection("Gap/TrackLength", event));
= GetSum(GetHitsCollection(fGapTrackLengthHCID, event));
// get analysis manager
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
@@ -168,9 +160,9 @@ void B4dEventAction::EndOfEventAction(const G4Event* event)
//print per event (modulo n)
//
G4int eventID = event->GetEventID();
if ( eventID % fPrintModulo == 0) {
G4int printModulo = G4RunManager::GetRunManager()->GetPrintProgress();
if ( ( printModulo > 0 ) && ( eventID % printModulo == 0 ) ) {
G4cout << "---> End of event: " << eventID << G4endl;
PrintEventStatistics(absoEdep, absoTrackLength, gapEdep, gapTrackLength);
}
}