Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//$Id: .README.txt 94957 2016-01-08 13:27:26Z gcosmo $
|
||||
//$Id: .README.txt 99560 2016-09-27 07:03:29Z gcosmo $
|
||||
|
||||
///\file "B1/.README.txt"
|
||||
///\brief Example B1 README page
|
||||
@@ -83,15 +83,15 @@
|
||||
|
||||
Total dose deposited is computed at B1RunAction::EndOfRunAction(),
|
||||
and printed together with informations about the primary particle.
|
||||
In multi-threading mode the energy accumulated in G4Parameter objects per
|
||||
In multi-threading mode the energy accumulated in G4Accumulable objects per
|
||||
workers is merged to the master in B1RunAction::EndOfRunAction() and the final
|
||||
result is printed on the screen.
|
||||
|
||||
G4Parameter<G4double> type instead of G4double type is used for the B1RunAction
|
||||
G4Accumulable<G4double> type instead of G4double type is used for the B1RunAction
|
||||
data members in order to facilitate merging of the values accumulated on workers
|
||||
to the master. Currently the parameters have to be registered to G4ParametersManager
|
||||
and G4ParametersManager::Merge() has to be called from the users code. This is planned
|
||||
to be further simplified with a closer integration of G4Parameter classes in
|
||||
to the master. Currently the accumulables have to be registered to G4AccumulablesManager
|
||||
and G4AccumulablesManager::Merge() has to be called from the users code. This is planned
|
||||
to be further simplified with a closer integration of G4Accumulable classes in
|
||||
the Geant4 kernel next year.
|
||||
|
||||
An example of creating and computing new units (e.g., dose) is also shown
|
||||
|
||||
@@ -15,6 +15,14 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
26/09/16 I. Hrivnacova (exampleB1-V10-02-01)
|
||||
- Updated for renaming G4Parameter in G4Accumulable
|
||||
|
||||
20/09/16 J. Allison (exampleB1-V10-02-00)
|
||||
- vis.mac: Added this to make "Envelope" transparent blue:
|
||||
# "Envelope" is transparent blue to represent water
|
||||
/vis/geometry/set/colour Envelope 0 0 0 1 .3
|
||||
|
||||
02/11/15 I. Hrivnacova (exampleB1-V10-01-03)
|
||||
- B1Run class replaced with a code based on G4Parameter
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: README 94957 2016-01-08 13:27:26Z gcosmo $
|
||||
$Id: README 99560 2016-09-27 07:03:29Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -81,15 +81,15 @@ $Id: README 94957 2016-01-08 13:27:26Z gcosmo $
|
||||
|
||||
Total dose deposited is computed at B1RunAction::EndOfRunAction(),
|
||||
and printed together with informations about the primary particle.
|
||||
In multi-threading mode the energy accumulated in G4Parameter objects per
|
||||
In multi-threading mode the energy accumulated in G4Accumulable objects per
|
||||
workers is merged to the master in B1RunAction::EndOfRunAction() and the final
|
||||
result is printed on the screen.
|
||||
|
||||
G4Parameter<G4double> type instead of G4double type is used for the B1RunAction
|
||||
data members in order to facilitate merging of the values accumulated on workers
|
||||
to the master. Currently the parameters have to be registered to G4ParametersManager
|
||||
and G4ParametersManager::Merge() has to be called from the users code. This is planned
|
||||
to be further simplified with a closer integration of G4Parameter classes in
|
||||
to the master. Currently the accumulables have to be registered to G4AccumulablesManager
|
||||
and G4AccumulablesManager::Merge() has to be called from the users code. This is planned
|
||||
to be further simplified with a closer integration of G4Accumulable classes in
|
||||
the Geant4 kernel next year.
|
||||
|
||||
An example of creating and computing new units (e.g., dose) is also shown
|
||||
|
||||
+149
-147
@@ -4,7 +4,7 @@
|
||||
############################################
|
||||
|
||||
*************************************************************
|
||||
Geant4 version Name: geant4-10-03-beta-01 (30-June-2016)
|
||||
Geant4 version Name: geant4-10-03 (9-December-2016)
|
||||
Copyright : Geant4 Collaboration
|
||||
Reference : NIM A 506 (2003), 250-303
|
||||
WWW : http://cern.ch/geant4
|
||||
@@ -42,14 +42,14 @@ Registered model factories:
|
||||
drawByCharge
|
||||
drawByOriginVolume
|
||||
drawByParticleID
|
||||
drawByTouchedVolume
|
||||
drawByEncounteredVolume
|
||||
|
||||
Registered filter factories:
|
||||
attributeFilter
|
||||
chargeFilter
|
||||
originVolumeFilter
|
||||
particleFilter
|
||||
touchedVolumeFilter
|
||||
encounteredVolumeFilter
|
||||
|
||||
You have successfully registered the following user vis actions.
|
||||
Run Duration User Vis Actions: none
|
||||
@@ -70,368 +70,370 @@ Type of pre-compound inverse x-section 3
|
||||
Type of de-excitation inverse x-section 3
|
||||
Min excitation energy (keV) 0.1
|
||||
Level density (1/MeV) 0.1
|
||||
Time limit for long lived isomeres (ns) 1e+07
|
||||
Correlated gamma emission flag 0
|
||||
=======================================================================
|
||||
### Adding tracking cuts for neutron TimeCut(ns)= 10000 KinEnergyCut(MeV)= 0
|
||||
|
||||
phot: for gamma SubType= 12 BuildTable= 0
|
||||
LambdaPrime table from 200 keV to 10 TeV in 54 bins
|
||||
LambdaPrime table from 200 keV to 100 TeV in 61 bins
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
PhotoElectric : Emin= 0 eV Emax= 10 TeV AngularGenSauterGavrila FluoActive
|
||||
PhotoElectric : Emin= 0 eV Emax= 100 TeV AngularGenSauterGavrila FluoActive
|
||||
|
||||
compt: for gamma SubType= 13 BuildTable= 1
|
||||
Lambda table from 100 eV to 1 MeV, 7 bins per decade, spline: 1
|
||||
LambdaPrime table from 1 MeV to 10 TeV in 49 bins
|
||||
LambdaPrime table from 1 MeV to 100 TeV in 56 bins
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
Klein-Nishina : Emin= 0 eV Emax= 10 TeV
|
||||
Klein-Nishina : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
conv: for gamma SubType= 14 BuildTable= 1
|
||||
Lambda table from 1.022 MeV to 10 TeV, 20 bins per decade, spline: 1
|
||||
Lambda table from 1.022 MeV to 100 TeV, 18 bins per decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BetheHeitler : Emin= 0 eV Emax= 80 GeV
|
||||
BetheHeitlerLPM : Emin= 80 GeV Emax= 10 TeV
|
||||
BetheHeitlerLPM : Emin= 80 GeV Emax= 100 TeV
|
||||
|
||||
msc: for e- SubType= 10
|
||||
RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
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
|
||||
WentzelVIUni : Emin= 100 MeV Emax= 100 TeV Table with 42 bins Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
eIoni: for e- SubType= 2
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
MollerBhabha : Emin= 0 eV Emax= 10 TeV
|
||||
MollerBhabha : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
eBrem: for e- SubType= 3
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
LPM flag: 1 for E > 1 GeV, HighEnergyThreshold(GeV)= 10000
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eBremSB : Emin= 0 eV Emax= 1 GeV DipBustGen
|
||||
eBremLPM : Emin= 1 GeV Emax= 10 TeV DipBustGen
|
||||
eBremLPM : Emin= 1 GeV Emax= 100 TeV DipBustGen
|
||||
|
||||
CoulombScat: for e-, integral: 1 SubType= 1 BuildTable= 1
|
||||
Lambda table from 100 MeV to 10 TeV, 7 bins per decade, spline: 1
|
||||
Lambda table from 100 MeV to 100 TeV, 7 bins per decade, spline: 1
|
||||
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 10 TeV
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
msc: for e+ SubType= 10
|
||||
RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
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
|
||||
WentzelVIUni : Emin= 100 MeV Emax= 100 TeV Table with 42 bins Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
eIoni: for e+ SubType= 2
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
MollerBhabha : Emin= 0 eV Emax= 10 TeV
|
||||
MollerBhabha : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
eBrem: for e+ SubType= 3
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
LPM flag: 1 for E > 1 GeV, HighEnergyThreshold(GeV)= 10000
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eBremSB : Emin= 0 eV Emax= 1 GeV DipBustGen
|
||||
eBremLPM : Emin= 1 GeV Emax= 10 TeV DipBustGen
|
||||
eBremLPM : Emin= 1 GeV Emax= 100 TeV DipBustGen
|
||||
|
||||
annihil: for e+, integral: 1 SubType= 5 BuildTable= 0
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eplus2gg : Emin= 0 eV Emax= 10 TeV
|
||||
eplus2gg : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
CoulombScat: for e+, integral: 1 SubType= 1 BuildTable= 1
|
||||
Lambda table from 100 MeV to 10 TeV, 7 bins per decade, spline: 1
|
||||
Lambda table from 100 MeV to 100 TeV, 7 bins per decade, spline: 1
|
||||
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 10 TeV
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
msc: for proton SubType= 10
|
||||
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
|
||||
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 84 bins Emin= 100 eV Emax= 100 TeV
|
||||
|
||||
hIoni: for proton SubType= 2
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
Bragg : Emin= 0 eV Emax= 2 MeV
|
||||
BetheBloch : Emin= 2 MeV Emax= 10 TeV
|
||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV
|
||||
|
||||
hBrems: for proton SubType= 3
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hBrem : Emin= 0 eV Emax= 10 TeV
|
||||
hBrem : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
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, 7 bins per decade, spline: 1
|
||||
Sampling table 13x1001 from 7.50618 GeV to 10 TeV
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 10 TeV
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
CoulombScat: for proton, integral: 1 SubType= 1 BuildTable= 1
|
||||
Used Lambda table of anti_proton
|
||||
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
msc: for GenericIon SubType= 10
|
||||
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
UrbanMsc : Emin= 0 eV Emax= 10 TeV
|
||||
UrbanMsc : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
ionIoni: for GenericIon SubType= 2
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.02
|
||||
Stopping Power data for 17 ion/material pairs
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BraggIon : Emin= 0 eV Emax= 2 MeV
|
||||
BetheBloch : Emin= 2 MeV Emax= 10 TeV
|
||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV
|
||||
|
||||
msc: for alpha SubType= 10
|
||||
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
UrbanMsc : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
|
||||
UrbanMsc : Emin= 0 eV Emax= 100 TeV Table with 84 bins Emin= 100 eV Emax= 100 TeV
|
||||
|
||||
ionIoni: for alpha SubType= 2
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.02
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BraggIon : Emin= 0 eV Emax= 7.9452 MeV
|
||||
BetheBloch : Emin= 7.9452 MeV Emax= 10 TeV
|
||||
BetheBloch : Emin= 7.9452 MeV Emax= 100 TeV
|
||||
|
||||
msc: for anti_proton SubType= 10
|
||||
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
|
||||
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 84 bins Emin= 100 eV Emax= 100 TeV
|
||||
|
||||
hIoni: for anti_proton SubType= 2
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
ICRU73QO : Emin= 0 eV Emax= 2 MeV
|
||||
BetheBloch : Emin= 2 MeV Emax= 10 TeV
|
||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV
|
||||
|
||||
hBrems: for anti_proton SubType= 3
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hBrem : Emin= 0 eV Emax= 10 TeV
|
||||
hBrem : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
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, 7 bins per decade, spline: 1
|
||||
Sampling table 13x1001 from 7.50618 GeV to 10 TeV
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 10 TeV
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
CoulombScat: for anti_proton, integral: 1 SubType= 1 BuildTable= 1
|
||||
Lambda table from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
Lambda table from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
msc: for kaon+ SubType= 10
|
||||
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
|
||||
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 84 bins Emin= 100 eV Emax= 100 TeV
|
||||
|
||||
hIoni: for kaon+ SubType= 2
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
Bragg : Emin= 0 eV Emax= 1.05231 MeV
|
||||
BetheBloch : Emin= 1.05231 MeV Emax= 10 TeV
|
||||
BetheBloch : Emin= 1.05231 MeV Emax= 100 TeV
|
||||
|
||||
hBrems: for kaon+ SubType= 3
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hBrem : Emin= 0 eV Emax= 10 TeV
|
||||
hBrem : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
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, 7 bins per decade, spline: 1
|
||||
Sampling table 14x1001 from 3.94942 GeV to 10 TeV
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 10 TeV
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
CoulombScat: for kaon+, integral: 1 SubType= 1 BuildTable= 1
|
||||
Lambda table from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
Lambda table from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
msc: for kaon- SubType= 10
|
||||
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
|
||||
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 84 bins Emin= 100 eV Emax= 100 TeV
|
||||
|
||||
hIoni: for kaon- SubType= 2
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
ICRU73QO : Emin= 0 eV Emax= 1.05231 MeV
|
||||
BetheBloch : Emin= 1.05231 MeV Emax= 10 TeV
|
||||
BetheBloch : Emin= 1.05231 MeV Emax= 100 TeV
|
||||
|
||||
hBrems: for kaon- SubType= 3
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hBrem : Emin= 0 eV Emax= 10 TeV
|
||||
hBrem : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
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, 7 bins per decade, spline: 1
|
||||
Sampling table 14x1001 from 3.94942 GeV to 10 TeV
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 10 TeV
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
CoulombScat: for kaon-, integral: 1 SubType= 1 BuildTable= 1
|
||||
Used Lambda table of kaon+
|
||||
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
msc: for mu+ SubType= 10
|
||||
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
|
||||
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 84 bins Emin= 100 eV Emax= 100 TeV
|
||||
|
||||
muIoni: for mu+ SubType= 2
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
Bragg : Emin= 0 eV Emax= 200 keV
|
||||
BetheBloch : Emin= 200 keV Emax= 1 GeV
|
||||
MuBetheBloch : Emin= 1 GeV Emax= 10 TeV
|
||||
MuBetheBloch : Emin= 1 GeV Emax= 100 TeV
|
||||
|
||||
muBrems: for mu+ SubType= 3
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
MuBrem : Emin= 0 eV Emax= 10 TeV
|
||||
MuBrem : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
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, 7 bins per decade, spline: 1
|
||||
Sampling table 17x1001 from 1 GeV to 10 TeV
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
Sampling table 21x1001 from 1 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
muPairProd : Emin= 0 eV Emax= 10 TeV
|
||||
muPairProd : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
CoulombScat: for mu+, integral: 1 SubType= 1 BuildTable= 1
|
||||
Lambda table from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
Lambda table from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
msc: for mu- SubType= 10
|
||||
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
|
||||
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 84 bins Emin= 100 eV Emax= 100 TeV
|
||||
|
||||
muIoni: for mu- SubType= 2
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
ICRU73QO : Emin= 0 eV Emax= 200 keV
|
||||
BetheBloch : Emin= 200 keV Emax= 1 GeV
|
||||
MuBetheBloch : Emin= 1 GeV Emax= 10 TeV
|
||||
MuBetheBloch : Emin= 1 GeV Emax= 100 TeV
|
||||
|
||||
muBrems: for mu- SubType= 3
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
MuBrem : Emin= 0 eV Emax= 10 TeV
|
||||
MuBrem : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
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, 7 bins per decade, spline: 1
|
||||
Sampling table 17x1001 from 1 GeV to 10 TeV
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
Sampling table 21x1001 from 1 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
muPairProd : Emin= 0 eV Emax= 10 TeV
|
||||
muPairProd : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
CoulombScat: for mu-, integral: 1 SubType= 1 BuildTable= 1
|
||||
Used Lambda table of mu+
|
||||
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
msc: for pi+ SubType= 10
|
||||
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
|
||||
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 84 bins Emin= 100 eV Emax= 100 TeV
|
||||
|
||||
hIoni: for pi+ SubType= 2
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
Bragg : Emin= 0 eV Emax= 297.505 keV
|
||||
BetheBloch : Emin= 297.505 keV Emax= 10 TeV
|
||||
BetheBloch : Emin= 297.505 keV Emax= 100 TeV
|
||||
|
||||
hBrems: for pi+ SubType= 3
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hBrem : Emin= 0 eV Emax= 10 TeV
|
||||
hBrem : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
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, 7 bins per decade, spline: 1
|
||||
Sampling table 16x1001 from 1.11656 GeV to 10 TeV
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 10 TeV
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
CoulombScat: for pi+, integral: 1 SubType= 1 BuildTable= 1
|
||||
Lambda table from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
Lambda table from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
msc: for pi- SubType= 10
|
||||
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
|
||||
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 84 bins Emin= 100 eV Emax= 100 TeV
|
||||
|
||||
hIoni: for pi- SubType= 2
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
ICRU73QO : Emin= 0 eV Emax= 297.505 keV
|
||||
BetheBloch : Emin= 297.505 keV Emax= 10 TeV
|
||||
BetheBloch : Emin= 297.505 keV Emax= 100 TeV
|
||||
|
||||
hBrems: for pi- SubType= 3
|
||||
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
|
||||
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hBrem : Emin= 0 eV Emax= 10 TeV
|
||||
hBrem : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
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, 7 bins per decade, spline: 1
|
||||
Sampling table 16x1001 from 1.11656 GeV to 10 TeV
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
|
||||
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 10 TeV
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
CoulombScat: for pi-, integral: 1 SubType= 1 BuildTable= 1
|
||||
Used Lambda table of pi+
|
||||
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
====================================================================
|
||||
HADRONIC PROCESSES SUMMARY (verbose level 1)
|
||||
@@ -447,7 +449,7 @@ CoulombScat: for pi-, integral: 1 SubType= 1 BuildTable= 1
|
||||
|
||||
Process: neutronInelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 1 GeV ---> 4 GeV
|
||||
Model: BertiniCascade: 1 GeV ---> 5 GeV
|
||||
Model: Binary Cascade: 0 eV ---> 1.5 GeV
|
||||
Cr_sctns: G4NeutronInelasticXS: 0 eV ---> 100 TeV
|
||||
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
|
||||
@@ -634,7 +636,7 @@ CoulombScat: for pi-, integral: 1 SubType= 1 BuildTable= 1
|
||||
|
||||
Process: kaon+Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 4 GeV
|
||||
Model: BertiniCascade: 0 eV ---> 5 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 2.88022e+295 J
|
||||
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
|
||||
|
||||
@@ -647,7 +649,7 @@ CoulombScat: for pi-, integral: 1 SubType= 1 BuildTable= 1
|
||||
|
||||
Process: kaon-Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 4 GeV
|
||||
Model: BertiniCascade: 0 eV ---> 5 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 2.88022e+295 J
|
||||
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
|
||||
|
||||
@@ -662,7 +664,7 @@ CoulombScat: for pi-, integral: 1 SubType= 1 BuildTable= 1
|
||||
|
||||
Process: lambdaInelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 4 GeV
|
||||
Model: BertiniCascade: 0 eV ---> 5 GeV
|
||||
Cr_sctns: ChipsHyperonInelasticXS: 0 eV ---> 100 TeV
|
||||
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
|
||||
|
||||
@@ -693,7 +695,7 @@ CoulombScat: for pi-, integral: 1 SubType= 1 BuildTable= 1
|
||||
|
||||
Process: pi+Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 4 GeV
|
||||
Model: BertiniCascade: 0 eV ---> 5 GeV
|
||||
Cr_sctns: Barashenkov-Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
|
||||
|
||||
@@ -708,7 +710,7 @@ CoulombScat: for pi-, integral: 1 SubType= 1 BuildTable= 1
|
||||
|
||||
Process: pi-Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 4 GeV
|
||||
Model: BertiniCascade: 0 eV ---> 5 GeV
|
||||
Cr_sctns: Barashenkov-Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
|
||||
|
||||
@@ -725,7 +727,7 @@ CoulombScat: for pi-, integral: 1 SubType= 1 BuildTable= 1
|
||||
|
||||
Process: protonInelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 1 GeV ---> 4 GeV
|
||||
Model: BertiniCascade: 1 GeV ---> 5 GeV
|
||||
Model: Binary Cascade: 0 eV ---> 1.5 GeV
|
||||
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
|
||||
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
|
||||
@@ -758,7 +760,7 @@ CoulombScat: for pi-, integral: 1 SubType= 1 BuildTable= 1
|
||||
|
||||
--------------------End of Global Run-----------------------
|
||||
The run consists of 1000 gamma of 6 MeV
|
||||
Cumulated dose per run, in scoring volume : 45.3847 picoGy rms = 3.97502 picoGy
|
||||
Cumulated dose per run, in scoring volume : 44.5231 picoGy rms = 3.95636 picoGy
|
||||
------------------------------------------------------------
|
||||
|
||||
### Run 1 starts.
|
||||
@@ -775,7 +777,7 @@ CoulombScat: for pi-, integral: 1 SubType= 1 BuildTable= 1
|
||||
|
||||
--------------------End of Global Run-----------------------
|
||||
The run consists of 1000 proton of 210 MeV
|
||||
Cumulated dose per run, in scoring volume : 5.09132 nanoGy rms = 145.967 picoGy
|
||||
Cumulated dose per run, in scoring volume : 5.1075 nanoGy rms = 147.637 picoGy
|
||||
------------------------------------------------------------
|
||||
|
||||
Graphics systems deleted.
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B1RunAction.hh 93886 2015-11-03 08:28:26Z gcosmo $
|
||||
// $Id: B1RunAction.hh 99560 2016-09-27 07:03:29Z gcosmo $
|
||||
//
|
||||
/// \file B1RunAction.hh
|
||||
/// \brief Definition of the B1RunAction class
|
||||
@@ -32,7 +32,7 @@
|
||||
#define B1RunAction_h 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "G4Parameter.hh"
|
||||
#include "G4Accumulable.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Run;
|
||||
@@ -56,8 +56,8 @@ class B1RunAction : public G4UserRunAction
|
||||
void AddEdep (G4double edep);
|
||||
|
||||
private:
|
||||
G4Parameter<G4double> fEdep;
|
||||
G4Parameter<G4double> fEdep2;
|
||||
G4Accumulable<G4double> fEdep;
|
||||
G4Accumulable<G4double> fEdep2;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B1RunAction.cc 93886 2015-11-03 08:28:26Z gcosmo $
|
||||
// $Id: B1RunAction.cc 99560 2016-09-27 07:03:29Z gcosmo $
|
||||
//
|
||||
/// \file B1RunAction.cc
|
||||
/// \brief Implementation of the B1RunAction class
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Run.hh"
|
||||
#include "G4ParameterManager.hh"
|
||||
#include "G4AccumulableManager.hh"
|
||||
#include "G4LogicalVolumeStore.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
@@ -45,8 +45,8 @@
|
||||
|
||||
B1RunAction::B1RunAction()
|
||||
: G4UserRunAction(),
|
||||
fEdep("Edep", 0.),
|
||||
fEdep2("Edep2", 0.)
|
||||
fEdep(0.),
|
||||
fEdep2(0.)
|
||||
{
|
||||
// add new units for dose
|
||||
//
|
||||
@@ -60,10 +60,10 @@ B1RunAction::B1RunAction()
|
||||
new G4UnitDefinition("nanogray" , "nanoGy" , "Dose", nanogray);
|
||||
new G4UnitDefinition("picogray" , "picoGy" , "Dose", picogray);
|
||||
|
||||
// Register parameter to the parameter manager
|
||||
G4ParameterManager* parameterManager = G4ParameterManager::Instance();
|
||||
parameterManager->RegisterParameter(fEdep);
|
||||
parameterManager->RegisterParameter(fEdep2);
|
||||
// Register accumulable to the accumulable manager
|
||||
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
|
||||
accumulableManager->RegisterAccumulable(fEdep);
|
||||
accumulableManager->RegisterAccumulable(fEdep2);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -78,9 +78,9 @@ void B1RunAction::BeginOfRunAction(const G4Run*)
|
||||
// inform the runManager to save random number seed
|
||||
G4RunManager::GetRunManager()->SetRandomNumberStore(false);
|
||||
|
||||
// reset parameters to their initial values
|
||||
G4ParameterManager* parameterManager = G4ParameterManager::Instance();
|
||||
parameterManager->Reset();
|
||||
// reset accumulables to their initial values
|
||||
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
|
||||
accumulableManager->Reset();
|
||||
|
||||
}
|
||||
|
||||
@@ -91,9 +91,9 @@ void B1RunAction::EndOfRunAction(const G4Run* run)
|
||||
G4int nofEvents = run->GetNumberOfEvent();
|
||||
if (nofEvents == 0) return;
|
||||
|
||||
// Merge parameters
|
||||
G4ParameterManager* parameterManager = G4ParameterManager::Instance();
|
||||
parameterManager->Merge();
|
||||
// Merge accumulables
|
||||
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
|
||||
accumulableManager->Merge();
|
||||
|
||||
// Compute dose = total energy deposit in a run and its variance
|
||||
//
|
||||
|
||||
@@ -100,8 +100,10 @@
|
||||
/vis/scene/add/text 6 7 10 cm 18 4 4 Shape2
|
||||
#
|
||||
# To get nice view
|
||||
# Make the "World" box invisible
|
||||
/vis/geometry/set/visibility World 0 false
|
||||
/vis/geometry/set/visibility Envelope 0 false
|
||||
# "Envelope" is transparent blue to represent water
|
||||
/vis/geometry/set/colour Envelope 0 0 0 1 .3
|
||||
/vis/viewer/set/style surface
|
||||
/vis/viewer/set/hiddenMarker true
|
||||
/vis/viewer/set/viewpointThetaPhi 120 150
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: CMakeLists.txt 86065 2014-11-07 08:51:15Z gcosmo $
|
||||
# $Id: CMakeLists.txt 100813 2016-11-02 15:09:50Z gcosmo $
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
@@ -46,9 +46,7 @@ target_link_libraries(exampleB2a ${Geant4_LIBRARIES})
|
||||
set(EXAMPLEB2A_SCRIPTS
|
||||
exampleB2a.out
|
||||
exampleB2.in
|
||||
icons.mac
|
||||
gui.mac
|
||||
run.png
|
||||
run1.mac
|
||||
run2.mac
|
||||
init_vis.mac
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,11 +3,6 @@
|
||||
# the menu bar of the G4UIXm, G4UIQt, G4UIWin32 sessions.
|
||||
# It has no effect with G4UIterminal.
|
||||
#
|
||||
#
|
||||
# Add icons of general interest
|
||||
#
|
||||
/control/execute icons.mac
|
||||
#
|
||||
# File menu :
|
||||
/gui/addMenu file File
|
||||
/gui/addButton file Quit exit
|
||||
@@ -43,5 +38,3 @@
|
||||
/gui/addButton viewer "Flush viewer (= refresh + update)" "/vis/viewer/flush"
|
||||
/gui/addButton viewer "Update scene" "/vis/scene/notifyHandlers"
|
||||
#
|
||||
# User defined icon :
|
||||
/gui/addIcon "Run beam on" user_icon "/run/beamOn 1" run.png
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B2aDetectorConstruction.cc 87359 2014-12-01 16:04:27Z gcosmo $
|
||||
// $Id: B2aDetectorConstruction.cc 101658 2016-11-21 09:00:41Z gcosmo $
|
||||
//
|
||||
/// \file B2aDetectorConstruction.cc
|
||||
/// \brief Implementation of the B2aDetectorConstruction class
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include "G4Material.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4SDManager.hh"
|
||||
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
@@ -294,6 +295,7 @@ void B2aDetectorConstruction::ConstructSDandField()
|
||||
G4String trackerChamberSDname = "B2/TrackerChamberSD";
|
||||
B2TrackerSD* aTrackerSD = new B2TrackerSD(trackerChamberSDname,
|
||||
"TrackerHitsCollection");
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(aTrackerSD);
|
||||
// Setting aTrackerSD to all logical volumes with the same name
|
||||
// of "Chamber_LV".
|
||||
SetSensitiveDetector("Chamber_LV", aTrackerSD, true);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: CMakeLists.txt 86065 2014-11-07 08:51:15Z gcosmo $
|
||||
# $Id: CMakeLists.txt 100813 2016-11-02 15:09:50Z gcosmo $
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
@@ -46,9 +46,7 @@ target_link_libraries(exampleB2b ${Geant4_LIBRARIES})
|
||||
set(EXAMPLEB2B_SCRIPTS
|
||||
exampleB2b.out
|
||||
exampleB2.in
|
||||
icons.mac
|
||||
gui.mac
|
||||
run.png
|
||||
init_vis.mac
|
||||
run1.mac
|
||||
run2.mac
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,11 +3,6 @@
|
||||
# the menu bar of the G4UIXm, G4UIQt, G4UIWin32 sessions.
|
||||
# It has no effect with G4UIterminal.
|
||||
#
|
||||
#
|
||||
# Add icons of general interest
|
||||
#
|
||||
/control/execute icons.mac
|
||||
#
|
||||
# File menu :
|
||||
/gui/addMenu file File
|
||||
/gui/addButton file Quit exit
|
||||
@@ -43,5 +38,3 @@
|
||||
/gui/addButton viewer "Flush viewer (= refresh + update)" "/vis/viewer/flush"
|
||||
/gui/addButton viewer "Update scene" "/vis/scene/notifyHandlers"
|
||||
#
|
||||
# User defined icon :
|
||||
/gui/addIcon "Run beam on" user_icon "/run/beamOn 1" run.png
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "G4Material.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4SDManager.hh"
|
||||
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
@@ -283,6 +284,7 @@ void B2bDetectorConstruction::ConstructSDandField()
|
||||
G4String trackerChamberSDname = "B2/TrackerChamberSD";
|
||||
B2TrackerSD* aTrackerSD = new B2TrackerSD(trackerChamberSDname,
|
||||
"TrackerHitsCollection");
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(aTrackerSD);
|
||||
SetSensitiveDetector( fLogicChamber, aTrackerSD );
|
||||
|
||||
// Create global magnetic field messenger.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 87359 2014-12-01 16:04:27Z gcosmo $
|
||||
$Id: History 101658 2016-11-21 09:00:41Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -15,6 +15,12 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
19/11/16 A. Dotti (exampleB2-V10-02-01)
|
||||
- explitic set of SD to manager
|
||||
|
||||
01/11/16 L. Garnier (exampleB2-V10-02-00)
|
||||
- Remove icons.mac. Automatically include since interfaces-V10-02-07
|
||||
|
||||
29/11/14 I. Hrivnacova
|
||||
- Use G4endl instead of \n in G4cout;
|
||||
this makes each new line in the output on threads preceded with
|
||||
|
||||
@@ -3,11 +3,6 @@
|
||||
# the menu bar of the G4UIXm, G4UIQt, G4UIWin32 sessions.
|
||||
# It has no effect with G4UIterminal.
|
||||
#
|
||||
#
|
||||
# Add icons of general interest
|
||||
#
|
||||
/control/execute icons.mac
|
||||
#
|
||||
# File menu :
|
||||
/gui/addMenu file File
|
||||
/gui/addButton file Quit exit
|
||||
@@ -43,5 +38,3 @@
|
||||
/gui/addButton viewer "Flush viewer (= refresh + update)" "/vis/viewer/flush"
|
||||
/gui/addButton viewer "Update scene" "/vis/scene/notifyHandlers"
|
||||
#
|
||||
# User defined icon :
|
||||
/gui/addIcon "Run beam on" user_icon "/run/beamOn 1" run.png
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//$Id: .README.txt 94957 2016-01-08 13:27:26Z gcosmo $
|
||||
//$Id: .README.txt 99559 2016-09-27 07:02:21Z gcosmo $
|
||||
|
||||
///\file "B3/.README.txt"
|
||||
///\brief Example B3 README page
|
||||
@@ -91,15 +91,15 @@
|
||||
|
||||
At the end of event, the values acummulated in B3aEventAction are passed
|
||||
in B3aRunAction and summed over the whole run (see B3aEventAction::EndOfevent()).
|
||||
In multi-threading mode the data accumulated in G4Parameter objects per
|
||||
In multi-threading mode the data accumulated in G4Accumulable objects per
|
||||
workers is merged to the master in B3aRunAction::EndOfRunAction() and the final
|
||||
result is printed on the screen.
|
||||
|
||||
G4Parameter<> type instead of G4double and G4int types is used for the B3aRunAction
|
||||
G4Accumulable<> type instead of G4double and G4int types is used for the B3aRunAction
|
||||
data members in order to facilitate merging of the values accumulated on workers
|
||||
to the master. Currently the parameters have to be registered to G4ParametersManager
|
||||
and G4ParametersManager::Merge() has to be called from the users code. This is planned
|
||||
to be further simplified with a closer integration of G4Parameter classes in
|
||||
to the master. Currently the accumulables have to be registered to G4AccumulablesManager
|
||||
and G4AccumulablesManager::Merge() has to be called from the users code. This is planned
|
||||
to be further simplified with a closer integration of G4Accumulable classes in
|
||||
the Geant4 kernel next year.
|
||||
|
||||
B3b:
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: exampleB3a.cc 94031 2015-11-05 11:54:38Z ihrivnac $
|
||||
// $Id: exampleB3a.cc 100941 2016-11-03 11:14:13Z gcosmo $
|
||||
//
|
||||
/// \file exampleB3.cc
|
||||
/// \brief Main program of the B3 example
|
||||
/// \file exampleB3a.cc
|
||||
/// \brief Main program of the B3a example
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
############################################
|
||||
|
||||
*************************************************************
|
||||
Geant4 version Name: geant4-10-03-beta-01 (30-June-2016)
|
||||
Geant4 version Name: geant4-10-03 (9-December-2016)
|
||||
Copyright : Geant4 Collaboration
|
||||
Reference : NIM A 506 (2003), 250-303
|
||||
WWW : http://cern.ch/geant4
|
||||
@@ -41,14 +41,14 @@ Registered model factories:
|
||||
drawByCharge
|
||||
drawByOriginVolume
|
||||
drawByParticleID
|
||||
drawByTouchedVolume
|
||||
drawByEncounteredVolume
|
||||
|
||||
Registered filter factories:
|
||||
attributeFilter
|
||||
chargeFilter
|
||||
originVolumeFilter
|
||||
particleFilter
|
||||
touchedVolumeFilter
|
||||
encounteredVolumeFilter
|
||||
|
||||
You have successfully registered the following user vis actions.
|
||||
Run Duration User Vis Actions: none
|
||||
@@ -205,16 +205,14 @@ Checking overlaps for volume Patient ... OK!
|
||||
|
||||
|
||||
G4SDManager::AddNewCollection : the collection <crystal/edep> is registered at 1
|
||||
New sensitive detector <crystal> is registered at /
|
||||
G4SDManager::AddNewCollection : the collection <patient/dose> is registered at 2
|
||||
New sensitive detector <patient> is registered at /
|
||||
#
|
||||
/run/beamOn 10000
|
||||
### Run 0 start.
|
||||
|
||||
--------------------End of Global Run-----------------------
|
||||
The run was 10000 events Nb of 'good' e+ annihilations: 1249
|
||||
Total dose in patient : 290.467 picoGy
|
||||
The run was 10000 events Nb of 'good' e+ annihilations: 1242
|
||||
Total dose in patient : 289.201 picoGy
|
||||
------------------------------------------------------------
|
||||
|
||||
Graphics systems deleted.
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3aRunAction.hh 94031 2015-11-05 11:54:38Z ihrivnac $
|
||||
// $Id: B3aRunAction.hh 99559 2016-09-27 07:02:21Z gcosmo $
|
||||
//
|
||||
/// \file B3aRunAction.hh
|
||||
/// \brief Definition of the B3aRunAction class
|
||||
@@ -32,7 +32,7 @@
|
||||
#define B3aRunAction_h 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "G4Parameter.hh"
|
||||
#include "G4Accumulable.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
/// Run action class
|
||||
@@ -50,8 +50,8 @@ class B3aRunAction : public G4UserRunAction
|
||||
void SumDose(G4double dose) { fSumDose += dose; };
|
||||
|
||||
private:
|
||||
G4Parameter<G4int> fGoodEvents;
|
||||
G4Parameter<G4double> fSumDose;
|
||||
G4Accumulable<G4int> fGoodEvents;
|
||||
G4Accumulable<G4double> fSumDose;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3DetectorConstruction.cc 71079 2013-06-10 20:37:11Z ihrivnac $
|
||||
// $Id: B3DetectorConstruction.cc 101905 2016-12-07 11:34:39Z gunter $
|
||||
//
|
||||
/// \file B3DetectorConstruction.cc
|
||||
/// \brief Implementation of the B3DetectorConstruction class
|
||||
@@ -237,8 +237,8 @@ G4VPhysicalVolume* B3DetectorConstruction::Construct()
|
||||
|
||||
// Visualization attributes
|
||||
//
|
||||
logicRing->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
logicDetector->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
logicRing->SetVisAttributes (G4VisAttributes::GetInvisible());
|
||||
logicDetector->SetVisAttributes (G4VisAttributes::GetInvisible());
|
||||
|
||||
// Print materials
|
||||
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
@@ -257,6 +257,7 @@ void B3DetectorConstruction::ConstructSDandField()
|
||||
// declare crystal as a MultiFunctionalDetector scorer
|
||||
//
|
||||
G4MultiFunctionalDetector* cryst = new G4MultiFunctionalDetector("crystal");
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(cryst);
|
||||
G4VPrimitiveScorer* primitiv1 = new G4PSEnergyDeposit("edep");
|
||||
cryst->RegisterPrimitive(primitiv1);
|
||||
SetSensitiveDetector("CrystalLV",cryst);
|
||||
@@ -264,6 +265,7 @@ void B3DetectorConstruction::ConstructSDandField()
|
||||
// declare patient as a MultiFunctionalDetector scorer
|
||||
//
|
||||
G4MultiFunctionalDetector* patient = new G4MultiFunctionalDetector("patient");
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(patient);
|
||||
G4VPrimitiveScorer* primitiv2 = new G4PSDoseDeposit("dose");
|
||||
patient->RegisterPrimitive(primitiv2);
|
||||
SetSensitiveDetector("PatientLV",patient);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3aRunAction.cc 94031 2015-11-05 11:54:38Z ihrivnac $
|
||||
// $Id: B3aRunAction.cc 99559 2016-09-27 07:02:21Z gcosmo $
|
||||
//
|
||||
/// \file B3aRunAction.cc
|
||||
/// \brief Implementation of the B3aRunAction class
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Run.hh"
|
||||
#include "G4ParameterManager.hh"
|
||||
#include "G4AccumulableManager.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
|
||||
B3aRunAction::B3aRunAction()
|
||||
: G4UserRunAction(),
|
||||
fGoodEvents("GoodEvents", 0),
|
||||
fSumDose("SumDose", 0.)
|
||||
fGoodEvents(0),
|
||||
fSumDose(0.)
|
||||
{
|
||||
//add new units for dose
|
||||
//
|
||||
@@ -56,10 +56,10 @@ B3aRunAction::B3aRunAction()
|
||||
new G4UnitDefinition("nanogray" , "nanoGy" , "Dose", nanogray);
|
||||
new G4UnitDefinition("picogray" , "picoGy" , "Dose", picogray);
|
||||
|
||||
// Register parameter to the parameter manager
|
||||
G4ParameterManager* parameterManager = G4ParameterManager::Instance();
|
||||
parameterManager->RegisterParameter(fGoodEvents);
|
||||
parameterManager->RegisterParameter(fSumDose);
|
||||
// Register accumulable to the accumulable manager
|
||||
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
|
||||
accumulableManager->RegisterAccumulable(fGoodEvents);
|
||||
accumulableManager->RegisterAccumulable(fSumDose);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -73,9 +73,9 @@ void B3aRunAction::BeginOfRunAction(const G4Run* run)
|
||||
{
|
||||
G4cout << "### Run " << run->GetRunID() << " start." << G4endl;
|
||||
|
||||
// reset parameters to their initial values
|
||||
G4ParameterManager* parameterManager = G4ParameterManager::Instance();
|
||||
parameterManager->Reset();
|
||||
// reset accumulables to their initial values
|
||||
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
|
||||
accumulableManager->Reset();
|
||||
|
||||
//inform the runManager to save random number seed
|
||||
G4RunManager::GetRunManager()->SetRandomNumberStore(false);
|
||||
@@ -88,9 +88,9 @@ void B3aRunAction::EndOfRunAction(const G4Run* run)
|
||||
G4int nofEvents = run->GetNumberOfEvent();
|
||||
if (nofEvents == 0) return;
|
||||
|
||||
// Merge parameters
|
||||
G4ParameterManager* parameterManager = G4ParameterManager::Instance();
|
||||
parameterManager->Merge();
|
||||
// Merge accumulables
|
||||
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
|
||||
accumulableManager->Merge();
|
||||
|
||||
// Run conditions
|
||||
// note: There is no primary generator action object for "master"
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: exampleB3b.cc 94031 2015-11-05 11:54:38Z ihrivnac $
|
||||
// $Id: exampleB3b.cc 100941 2016-11-03 11:14:13Z gcosmo $
|
||||
//
|
||||
/// \file exampleB3.cc
|
||||
/// \brief Main program of the B3 example
|
||||
/// \file exampleB3b.cc
|
||||
/// \brief Main program of the B3b example
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
############################################
|
||||
|
||||
*************************************************************
|
||||
Geant4 version Name: geant4-10-03-beta-01 (30-June-2016)
|
||||
Geant4 version Name: geant4-10-03 (9-December-2016)
|
||||
Copyright : Geant4 Collaboration
|
||||
Reference : NIM A 506 (2003), 250-303
|
||||
WWW : http://cern.ch/geant4
|
||||
@@ -41,14 +41,14 @@ Registered model factories:
|
||||
drawByCharge
|
||||
drawByOriginVolume
|
||||
drawByParticleID
|
||||
drawByTouchedVolume
|
||||
drawByEncounteredVolume
|
||||
|
||||
Registered filter factories:
|
||||
attributeFilter
|
||||
chargeFilter
|
||||
originVolumeFilter
|
||||
particleFilter
|
||||
touchedVolumeFilter
|
||||
encounteredVolumeFilter
|
||||
|
||||
You have successfully registered the following user vis actions.
|
||||
Run Duration User Vis Actions: none
|
||||
@@ -205,9 +205,7 @@ Checking overlaps for volume Patient ... OK!
|
||||
|
||||
|
||||
G4SDManager::AddNewCollection : the collection <crystal/edep> is registered at 1
|
||||
New sensitive detector <crystal> is registered at /
|
||||
G4SDManager::AddNewCollection : the collection <patient/dose> is registered at 2
|
||||
New sensitive detector <patient> is registered at /
|
||||
#
|
||||
/run/beamOn 10000
|
||||
### Run 0 start.
|
||||
@@ -215,8 +213,8 @@ New sensitive detector <patient> is registered at /
|
||||
---> end of event: 0
|
||||
|
||||
--------------------End of Global Run-----------------------
|
||||
The run was 10000 events Nb of 'good' e+ annihilations: 1249
|
||||
Total dose in patient : 290.467 picoGy
|
||||
The run was 10000 events Nb of 'good' e+ annihilations: 1242
|
||||
Total dose in patient : 289.201 picoGy
|
||||
------------------------------------------------------------
|
||||
|
||||
Graphics systems deleted.
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3DetectorConstruction.cc 71079 2013-06-10 20:37:11Z ihrivnac $
|
||||
// $Id: B3DetectorConstruction.cc 101905 2016-12-07 11:34:39Z gunter $
|
||||
//
|
||||
/// \file B3DetectorConstruction.cc
|
||||
/// \brief Implementation of the B3DetectorConstruction class
|
||||
@@ -237,8 +237,8 @@ G4VPhysicalVolume* B3DetectorConstruction::Construct()
|
||||
|
||||
// Visualization attributes
|
||||
//
|
||||
logicRing->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
logicDetector->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
logicRing->SetVisAttributes (G4VisAttributes::GetInvisible());
|
||||
logicDetector->SetVisAttributes (G4VisAttributes::GetInvisible());
|
||||
|
||||
// Print materials
|
||||
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
@@ -257,6 +257,7 @@ void B3DetectorConstruction::ConstructSDandField()
|
||||
// declare crystal as a MultiFunctionalDetector scorer
|
||||
//
|
||||
G4MultiFunctionalDetector* cryst = new G4MultiFunctionalDetector("crystal");
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(cryst);
|
||||
G4VPrimitiveScorer* primitiv1 = new G4PSEnergyDeposit("edep");
|
||||
cryst->RegisterPrimitive(primitiv1);
|
||||
SetSensitiveDetector("CrystalLV",cryst);
|
||||
@@ -264,6 +265,7 @@ void B3DetectorConstruction::ConstructSDandField()
|
||||
// declare patient as a MultiFunctionalDetector scorer
|
||||
//
|
||||
G4MultiFunctionalDetector* patient = new G4MultiFunctionalDetector("patient");
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(patient);
|
||||
G4VPrimitiveScorer* primitiv2 = new G4PSDoseDeposit("dose");
|
||||
patient->RegisterPrimitive(primitiv2);
|
||||
SetSensitiveDetector("PatientLV",patient);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 97070 2016-05-24 08:49:17Z gcosmo $
|
||||
$Id: History 101659 2016-11-21 09:02:47Z gcosmo $
|
||||
--------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -15,6 +15,16 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
19/11/16 A. Dotti (exampleB3-V10-02-04)
|
||||
- explicit set of SD to manager
|
||||
|
||||
02/11/16 I. Hrivnacova (exampleB3-V10-02-03)
|
||||
- Fixed comments for Doxygen
|
||||
- Removed obsolete B3b/exampleB3.cc
|
||||
|
||||
26/09/16 I. Hrivnacova (exampleB3-V10-02-02)
|
||||
- Updated for renaming G4Parameter in G4Accumulable
|
||||
|
||||
24/05/16 I. Hrivnacova (exampleB3-V10-02-01)
|
||||
- Fixed compiler warning introduced in the previous update
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: README 94957 2016-01-08 13:27:26Z gcosmo $
|
||||
$Id: README 99559 2016-09-27 07:02:21Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -92,15 +92,15 @@ $Id: README 94957 2016-01-08 13:27:26Z gcosmo $
|
||||
|
||||
At the end of event, the values acummulated in B3aEventAction are passed
|
||||
in B3aRunAction and summed over the whole run (see B3aEventAction::EndOfevent()).
|
||||
In multi-threading mode the data accumulated in G4Parameter objects per
|
||||
In multi-threading mode the data accumulated in G4Accumulable objects per
|
||||
workers is merged to the master in B3aRunAction::EndOfRunAction() and the final
|
||||
result is printed on the screen.
|
||||
|
||||
G4Parameter<> type instead of G4double and G4int types is used for the B3aRunAction
|
||||
G4Accumulable<> type instead of G4double and G4int types is used for the B3aRunAction
|
||||
data members in order to facilitate merging of the values accumulated on workers
|
||||
to the master. Currently the parameters have to be registered to G4ParametersManager
|
||||
and G4ParametersManager::Merge() has to be called from the users code. This is planned
|
||||
to be further simplified with a closer integration of G4Parameter classes in
|
||||
to the master. Currently the accumulables have to be registered to G4AccumulablesManager
|
||||
and G4AccumulablesManager::Merge() has to be called from the users code. This is planned
|
||||
to be further simplified with a closer integration of G4Accumulable classes in
|
||||
the Geant4 kernel next year.
|
||||
|
||||
B3b:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: CMakeLists.txt 86065 2014-11-07 08:51:15Z gcosmo $
|
||||
# $Id: CMakeLists.txt 100923 2016-11-03 10:50:34Z gcosmo $
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
@@ -46,9 +46,7 @@ target_link_libraries(exampleB4a ${Geant4_LIBRARIES})
|
||||
set(EXAMPLEB4A_SCRIPTS
|
||||
exampleB4a.out
|
||||
exampleB4.in
|
||||
icons.mac
|
||||
gui.mac
|
||||
run.png
|
||||
init_vis.mac
|
||||
run1.mac
|
||||
run2.mac
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: exampleB4a.cc 94808 2015-12-10 08:22:26Z gcosmo $
|
||||
// $Id: exampleB4a.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file exampleB4a.cc
|
||||
/// \brief Main program of the B4a example
|
||||
@@ -89,7 +89,7 @@ int main(int argc,char** argv)
|
||||
|
||||
// Detect interactive mode (if no macro provided) and define UI session
|
||||
//
|
||||
G4UIExecutive* ui = 0;
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if ( ! macro.size() ) {
|
||||
ui = new G4UIExecutive(argc, argv, session);
|
||||
}
|
||||
@@ -101,35 +101,34 @@ int main(int argc,char** argv)
|
||||
// Construct the default run manager
|
||||
//
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MTRunManager * runManager = new G4MTRunManager;
|
||||
auto runManager = new G4MTRunManager;
|
||||
if ( nThreads > 0 ) {
|
||||
runManager->SetNumberOfThreads(nThreads);
|
||||
}
|
||||
#else
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
auto runManager = new G4RunManager;
|
||||
#endif
|
||||
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
B4DetectorConstruction* detConstruction = new B4DetectorConstruction();
|
||||
auto detConstruction = new B4DetectorConstruction();
|
||||
runManager->SetUserInitialization(detConstruction);
|
||||
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
auto physicsList = new FTFP_BERT;
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
B4aActionInitialization* actionInitialization
|
||||
= new B4aActionInitialization(detConstruction);
|
||||
auto actionInitialization = new B4aActionInitialization(detConstruction);
|
||||
runManager->SetUserInitialization(actionInitialization);
|
||||
|
||||
// Initialize visualization
|
||||
//
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
auto visManager = new G4VisExecutive;
|
||||
// G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
|
||||
// G4VisManager* visManager = new G4VisExecutive("Quiet");
|
||||
visManager->Initialize();
|
||||
|
||||
// Get the pointer to the User Interface manager
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
auto UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
// Process macro or start UI session
|
||||
//
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,10 +3,6 @@
|
||||
# the menu bar of the G4UIXm, G4UIQt, G4UIWin32 sessions.
|
||||
# It has no effect with G4UIterminal.
|
||||
#
|
||||
# Add icons of general interest
|
||||
#
|
||||
/control/execute icons.mac
|
||||
#
|
||||
# File menu :
|
||||
/gui/addMenu file File
|
||||
/gui/addButton file Quit exit
|
||||
@@ -46,5 +42,3 @@
|
||||
# To limit the output flow in the "dump" widget :
|
||||
/run/printProgress 100
|
||||
#
|
||||
# User defined icon :
|
||||
/gui/addIcon "Run beam on" user_icon "/run/beamOn 1" run.png
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4Analysis.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
// $Id: B4Analysis.hh 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4Analysis.hh
|
||||
/// \brief Selection of the analysis technology
|
||||
@@ -32,6 +32,7 @@
|
||||
#define B4Analysis_h 1
|
||||
|
||||
#include "g4root.hh"
|
||||
//#include "g4cvs.hh"
|
||||
//#include "g4xml.hh"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4DetectorConstruction.cc 87359 2014-12-01 16:04:27Z gcosmo $
|
||||
// $Id: B4DetectorConstruction.cc 101905 2016-12-07 11:34:39Z gunter $
|
||||
//
|
||||
/// \file B4DetectorConstruction.cc
|
||||
/// \brief Implementation of the B4DetectorConstruction class
|
||||
@@ -54,14 +54,14 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4ThreadLocal
|
||||
G4GlobalMagFieldMessenger* B4DetectorConstruction::fMagFieldMessenger = 0;
|
||||
G4GlobalMagFieldMessenger* B4DetectorConstruction::fMagFieldMessenger = nullptr;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B4DetectorConstruction::B4DetectorConstruction()
|
||||
: G4VUserDetectorConstruction(),
|
||||
fAbsorberPV(0),
|
||||
fGapPV(0),
|
||||
fAbsorberPV(nullptr),
|
||||
fGapPV(nullptr),
|
||||
fCheckOverlaps(true)
|
||||
{
|
||||
}
|
||||
@@ -88,7 +88,7 @@ G4VPhysicalVolume* B4DetectorConstruction::Construct()
|
||||
void B4DetectorConstruction::DefineMaterials()
|
||||
{
|
||||
// Lead material defined using NIST Manager
|
||||
G4NistManager* nistManager = G4NistManager::Instance();
|
||||
auto nistManager = G4NistManager::Instance();
|
||||
nistManager->FindOrBuildMaterial("G4_Pb");
|
||||
|
||||
// Liquid argon material
|
||||
@@ -116,15 +116,15 @@ G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()
|
||||
G4double gapThickness = 5.*mm;
|
||||
G4double calorSizeXY = 10.*cm;
|
||||
|
||||
G4double layerThickness = absoThickness + gapThickness;
|
||||
G4double calorThickness = nofLayers * layerThickness;
|
||||
G4double worldSizeXY = 1.2 * calorSizeXY;
|
||||
G4double worldSizeZ = 1.2 * calorThickness;
|
||||
auto layerThickness = absoThickness + gapThickness;
|
||||
auto calorThickness = nofLayers * layerThickness;
|
||||
auto worldSizeXY = 1.2 * calorSizeXY;
|
||||
auto worldSizeZ = 1.2 * calorThickness;
|
||||
|
||||
// Get materials
|
||||
G4Material* defaultMaterial = G4Material::GetMaterial("Galactic");
|
||||
G4Material* absorberMaterial = G4Material::GetMaterial("G4_Pb");
|
||||
G4Material* gapMaterial = G4Material::GetMaterial("liquidArgon");
|
||||
auto defaultMaterial = G4Material::GetMaterial("Galactic");
|
||||
auto absorberMaterial = G4Material::GetMaterial("G4_Pb");
|
||||
auto gapMaterial = G4Material::GetMaterial("liquidArgon");
|
||||
|
||||
if ( ! defaultMaterial || ! absorberMaterial || ! gapMaterial ) {
|
||||
G4ExceptionDescription msg;
|
||||
@@ -136,17 +136,17 @@ G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// World
|
||||
//
|
||||
G4VSolid* worldS
|
||||
auto worldS
|
||||
= new G4Box("World", // its name
|
||||
worldSizeXY/2, worldSizeXY/2, worldSizeZ/2); // its size
|
||||
|
||||
G4LogicalVolume* worldLV
|
||||
auto worldLV
|
||||
= new G4LogicalVolume(
|
||||
worldS, // its solid
|
||||
defaultMaterial, // its material
|
||||
"World"); // its name
|
||||
|
||||
G4VPhysicalVolume* worldPV
|
||||
auto worldPV
|
||||
= new G4PVPlacement(
|
||||
0, // no rotation
|
||||
G4ThreeVector(), // at (0,0,0)
|
||||
@@ -160,11 +160,11 @@ G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Calorimeter
|
||||
//
|
||||
G4VSolid* calorimeterS
|
||||
auto calorimeterS
|
||||
= new G4Box("Calorimeter", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, calorThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* calorLV
|
||||
auto calorLV
|
||||
= new G4LogicalVolume(
|
||||
calorimeterS, // its solid
|
||||
defaultMaterial, // its material
|
||||
@@ -183,11 +183,11 @@ G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Layer
|
||||
//
|
||||
G4VSolid* layerS
|
||||
auto layerS
|
||||
= new G4Box("Layer", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, layerThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* layerLV
|
||||
auto layerLV
|
||||
= new G4LogicalVolume(
|
||||
layerS, // its solid
|
||||
defaultMaterial, // its material
|
||||
@@ -204,11 +204,11 @@ G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Absorber
|
||||
//
|
||||
G4VSolid* absorberS
|
||||
auto absorberS
|
||||
= new G4Box("Abso", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, absoThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* absorberLV
|
||||
auto absorberLV
|
||||
= new G4LogicalVolume(
|
||||
absorberS, // its solid
|
||||
absorberMaterial, // its material
|
||||
@@ -228,11 +228,11 @@ G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Gap
|
||||
//
|
||||
G4VSolid* gapS
|
||||
auto gapS
|
||||
= new G4Box("Gap", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, gapThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* gapLV
|
||||
auto gapLV
|
||||
= new G4LogicalVolume(
|
||||
gapS, // its solid
|
||||
gapMaterial, // its material
|
||||
@@ -264,9 +264,9 @@ G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Visualization attributes
|
||||
//
|
||||
worldLV->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
worldLV->SetVisAttributes (G4VisAttributes::GetInvisible());
|
||||
|
||||
G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
auto simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
simpleBoxVisAtt->SetVisibility(true);
|
||||
calorLV->SetVisAttributes(simpleBoxVisAtt);
|
||||
|
||||
@@ -283,7 +283,7 @@ void B4DetectorConstruction::ConstructSDandField()
|
||||
// Create global magnetic field messenger.
|
||||
// Uniform magnetic field is then created automatically if
|
||||
// the field value is not zero.
|
||||
G4ThreeVector fieldValue = G4ThreeVector();
|
||||
G4ThreeVector fieldValue;
|
||||
fMagFieldMessenger = new G4GlobalMagFieldMessenger(fieldValue);
|
||||
fMagFieldMessenger->SetVerboseLevel(1);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4PrimaryGeneratorAction.cc 75215 2013-10-29 16:07:06Z gcosmo $
|
||||
// $Id: B4PrimaryGeneratorAction.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the B4PrimaryGeneratorAction class
|
||||
@@ -45,14 +45,14 @@
|
||||
|
||||
B4PrimaryGeneratorAction::B4PrimaryGeneratorAction()
|
||||
: G4VUserPrimaryGeneratorAction(),
|
||||
fParticleGun(0)
|
||||
fParticleGun(nullptr)
|
||||
{
|
||||
G4int nofParticles = 1;
|
||||
fParticleGun = new G4ParticleGun(nofParticles);
|
||||
|
||||
// default particle kinematic
|
||||
//
|
||||
G4ParticleDefinition* particleDefinition
|
||||
auto particleDefinition
|
||||
= G4ParticleTable::GetParticleTable()->FindParticle("e-");
|
||||
fParticleGun->SetParticleDefinition(particleDefinition);
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
|
||||
@@ -73,20 +73,24 @@ void B4PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
// This function is called at the begining of event
|
||||
|
||||
// In order to avoid dependence of PrimaryGeneratorAction
|
||||
// on DetectorConstruction class we get world volume
|
||||
// on DetectorConstruction class we get world volume
|
||||
// from G4LogicalVolumeStore
|
||||
//
|
||||
G4double worldZHalfLength = 0;
|
||||
G4LogicalVolume* worlLV
|
||||
= G4LogicalVolumeStore::GetInstance()->GetVolume("World");
|
||||
G4Box* worldBox = 0;
|
||||
if ( worlLV) worldBox = dynamic_cast< G4Box*>(worlLV->GetSolid());
|
||||
G4double worldZHalfLength = 0.;
|
||||
auto worldLV = G4LogicalVolumeStore::GetInstance()->GetVolume("World");
|
||||
|
||||
// Check that the world volume has box shape
|
||||
G4Box* worldBox = nullptr;
|
||||
if ( worldLV ) {
|
||||
worldBox = dynamic_cast<G4Box*>(worldLV->GetSolid());
|
||||
}
|
||||
|
||||
if ( worldBox ) {
|
||||
worldZHalfLength = worldBox->GetZHalfLength();
|
||||
}
|
||||
else {
|
||||
G4ExceptionDescription msg;
|
||||
msg << "World volume of box not found." << G4endl;
|
||||
msg << "World volume of box shape not found." << G4endl;
|
||||
msg << "Perhaps you have changed geometry." << G4endl;
|
||||
msg << "The gun will be place in the center.";
|
||||
G4Exception("B4PrimaryGeneratorAction::GeneratePrimaries()",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4RunAction.cc 87359 2014-12-01 16:04:27Z gcosmo $
|
||||
// $Id: B4RunAction.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4RunAction.cc
|
||||
/// \brief Implementation of the B4RunAction class
|
||||
@@ -47,23 +47,24 @@ B4RunAction::B4RunAction()
|
||||
// Create analysis manager
|
||||
// The choice of analysis technology is done via selectin of a namespace
|
||||
// in B4Analysis.hh
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
G4cout << "Using " << analysisManager->GetType() << G4endl;
|
||||
|
||||
// Create directories
|
||||
//analysisManager->SetHistoDirectoryName("histograms");
|
||||
//analysisManager->SetNtupleDirectoryName("ntuple");
|
||||
analysisManager->SetVerboseLevel(1);
|
||||
analysisManager->SetFirstHistoId(1);
|
||||
analysisManager->SetNtupleMerging(true);
|
||||
// Note: merging ntuples is available only with Root output
|
||||
|
||||
// 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);
|
||||
analysisManager->CreateH1("Eabs","Edep in absorber", 100, 0., 800*MeV);
|
||||
analysisManager->CreateH1("Egap","Edep in gap", 100, 0., 100*MeV);
|
||||
analysisManager->CreateH1("Labs","trackL in absorber", 100, 0., 1*m);
|
||||
analysisManager->CreateH1("Lgap","trackL in gap", 100, 0., 50*cm);
|
||||
|
||||
// Creating ntuple
|
||||
//
|
||||
@@ -90,7 +91,7 @@ void B4RunAction::BeginOfRunAction(const G4Run* /*run*/)
|
||||
//G4RunManager::GetRunManager()->SetRandomNumberStore(true);
|
||||
|
||||
// Get analysis manager
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
|
||||
// Open an output file
|
||||
//
|
||||
@@ -104,7 +105,7 @@ void B4RunAction::EndOfRunAction(const G4Run* /*run*/)
|
||||
{
|
||||
// print histogram statistics
|
||||
//
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
if ( analysisManager->GetH1(1) ) {
|
||||
G4cout << G4endl << " ----> print histograms statistic ";
|
||||
if(isMaster) {
|
||||
@@ -115,31 +116,30 @@ void B4RunAction::EndOfRunAction(const G4Run* /*run*/)
|
||||
}
|
||||
|
||||
G4cout << " EAbs : mean = "
|
||||
<< G4BestUnit(analysisManager->GetH1(0)->mean(), "Energy")
|
||||
<< " rms = "
|
||||
<< G4BestUnit(analysisManager->GetH1(0)->rms(), "Energy") << G4endl;
|
||||
|
||||
G4cout << " EGap : 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(2)->mean(), "Length")
|
||||
<< " rms = "
|
||||
<< G4BestUnit(analysisManager->GetH1(2)->rms(), "Length") << G4endl;
|
||||
|
||||
G4cout << " LGap : 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......
|
||||
|
||||
@@ -61,7 +61,7 @@ void B4aActionInitialization::Build() const
|
||||
{
|
||||
SetUserAction(new B4PrimaryGeneratorAction);
|
||||
SetUserAction(new B4RunAction);
|
||||
B4aEventAction* eventAction = new B4aEventAction;
|
||||
auto eventAction = new B4aEventAction;
|
||||
SetUserAction(eventAction);
|
||||
SetUserAction(new B4aSteppingAction(fDetConstruction,eventAction));
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4aEventAction.cc 75604 2013-11-04 13:17:26Z gcosmo $
|
||||
// $Id: B4aEventAction.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4aEventAction.cc
|
||||
/// \brief Implementation of the B4aEventAction class
|
||||
@@ -73,13 +73,13 @@ void B4aEventAction::EndOfEventAction(const G4Event* event)
|
||||
//
|
||||
|
||||
// get analysis manager
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
|
||||
// fill histograms
|
||||
analysisManager->FillH1(1, fEnergyAbs);
|
||||
analysisManager->FillH1(2, fEnergyGap);
|
||||
analysisManager->FillH1(3, fTrackLAbs);
|
||||
analysisManager->FillH1(4, fTrackLGap);
|
||||
analysisManager->FillH1(0, fEnergyAbs);
|
||||
analysisManager->FillH1(1, fEnergyGap);
|
||||
analysisManager->FillH1(2, fTrackLAbs);
|
||||
analysisManager->FillH1(3, fTrackLGap);
|
||||
|
||||
// fill ntuple
|
||||
analysisManager->FillNtupleDColumn(0, fEnergyAbs);
|
||||
@@ -90,8 +90,8 @@ void B4aEventAction::EndOfEventAction(const G4Event* event)
|
||||
|
||||
// Print per event (modulo n)
|
||||
//
|
||||
G4int eventID = event->GetEventID();
|
||||
G4int printModulo = G4RunManager::GetRunManager()->GetPrintProgress();
|
||||
auto eventID = event->GetEventID();
|
||||
auto printModulo = G4RunManager::GetRunManager()->GetPrintProgress();
|
||||
if ( ( printModulo > 0 ) && ( eventID % printModulo == 0 ) ) {
|
||||
G4cout << "---> End of event: " << eventID << G4endl;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4aSteppingAction.cc 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
// $Id: B4aSteppingAction.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4aSteppingAction.cc
|
||||
/// \brief Implementation of the B4aSteppingAction class
|
||||
@@ -43,14 +43,12 @@ B4aSteppingAction::B4aSteppingAction(
|
||||
: G4UserSteppingAction(),
|
||||
fDetConstruction(detectorConstruction),
|
||||
fEventAction(eventAction)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B4aSteppingAction::~B4aSteppingAction()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -59,11 +57,10 @@ void B4aSteppingAction::UserSteppingAction(const G4Step* step)
|
||||
// Collect energy and track length step by step
|
||||
|
||||
// get volume of the current step
|
||||
G4VPhysicalVolume* volume
|
||||
= step->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
|
||||
auto volume = step->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
|
||||
|
||||
// energy deposit
|
||||
G4double edep = step->GetTotalEnergyDeposit();
|
||||
auto edep = step->GetTotalEnergyDeposit();
|
||||
|
||||
// step length
|
||||
G4double stepLength = 0.;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: CMakeLists.txt 86065 2014-11-07 08:51:15Z gcosmo $
|
||||
# $Id: CMakeLists.txt 100923 2016-11-03 10:50:34Z gcosmo $
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
@@ -46,9 +46,7 @@ target_link_libraries(exampleB4b ${Geant4_LIBRARIES})
|
||||
set(EXAMPLEB4B_SCRIPTS
|
||||
exampleB4b.out
|
||||
exampleB4.in
|
||||
icons.mac
|
||||
gui.mac
|
||||
run.png
|
||||
init_vis.mac
|
||||
run1.mac
|
||||
run2.mac
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: exampleB4b.cc 94808 2015-12-10 08:22:26Z gcosmo $
|
||||
// $Id: exampleB4b.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file exampleB4b.cc
|
||||
/// \brief Main program of the B4b example
|
||||
@@ -89,7 +89,7 @@ int main(int argc,char** argv)
|
||||
|
||||
// Detect interactive mode (if no macro provided) and define UI session
|
||||
//
|
||||
G4UIExecutive* ui = 0;
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if ( ! macro.size() ) {
|
||||
ui = new G4UIExecutive(argc, argv, session);
|
||||
}
|
||||
@@ -101,34 +101,33 @@ int main(int argc,char** argv)
|
||||
// Construct the default run manager
|
||||
//
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MTRunManager * runManager = new G4MTRunManager;
|
||||
auto runManager = new G4MTRunManager;
|
||||
if ( nThreads > 0 ) {
|
||||
runManager->SetNumberOfThreads(nThreads);
|
||||
}
|
||||
#else
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
auto runManager = new G4RunManager;
|
||||
#endif
|
||||
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
B4DetectorConstruction* detConstruction = new B4DetectorConstruction();
|
||||
auto detConstruction = new B4DetectorConstruction();
|
||||
runManager->SetUserInitialization(detConstruction);
|
||||
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
auto physicsList = new FTFP_BERT;
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
B4bActionInitialization* actionInitialization
|
||||
= new B4bActionInitialization(detConstruction);
|
||||
auto actionInitialization = new B4bActionInitialization(detConstruction);
|
||||
runManager->SetUserInitialization(actionInitialization);
|
||||
|
||||
// Initialize visualization
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
auto visManager = new G4VisExecutive;
|
||||
// G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
|
||||
// G4VisManager* visManager = new G4VisExecutive("Quiet");
|
||||
visManager->Initialize();
|
||||
|
||||
// Get the pointer to the User Interface manager
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
auto UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
// Process macro or start UI session
|
||||
//
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,10 +3,6 @@
|
||||
# the menu bar of the G4UIXm, G4UIQt, G4UIWin32 sessions.
|
||||
# It has no effect with G4UIterminal.
|
||||
#
|
||||
# Add icons of general interest
|
||||
#
|
||||
/control/execute icons.mac
|
||||
#
|
||||
# File menu :
|
||||
/gui/addMenu file File
|
||||
/gui/addButton file Quit exit
|
||||
@@ -46,5 +42,3 @@
|
||||
# To limit the output flow in the "dump" widget :
|
||||
/run/printProgress 100
|
||||
#
|
||||
# User defined icon :
|
||||
/gui/addIcon "Run beam on" user_icon "/run/beamOn 1" run.png
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4Analysis.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
// $Id: B4Analysis.hh 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4Analysis.hh
|
||||
/// \brief Selection of the analysis technology
|
||||
@@ -32,6 +32,7 @@
|
||||
#define B4Analysis_h 1
|
||||
|
||||
#include "g4root.hh"
|
||||
//#include "g4cvs.hh"
|
||||
//#include "g4xml.hh"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4bRunData.hh 69223 2013-04-23 12:36:10Z gcosmo $
|
||||
// $Id: B4bRunData.hh 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4bRunData.hh
|
||||
/// \brief Definition of the B4bRunData class
|
||||
@@ -34,13 +34,13 @@
|
||||
#include "G4Run.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include <array>
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
enum {
|
||||
kAbs = 0,
|
||||
kGap = 1,
|
||||
kDim = 2
|
||||
};
|
||||
const G4int kAbs = 0;
|
||||
const G4int kGap = 1;
|
||||
const G4int kDim = 2;
|
||||
|
||||
/// Run data class
|
||||
///
|
||||
@@ -72,9 +72,9 @@ public:
|
||||
G4double GetTrackLength(G4int id) const;
|
||||
|
||||
private:
|
||||
G4String fVolumeNames[kDim];
|
||||
G4double fEdep[kDim];
|
||||
G4double fTrackLength[kDim];
|
||||
std::array<G4String, kDim> fVolumeNames;
|
||||
std::array<G4double, kDim> fEdep;
|
||||
std::array<G4double, kDim> fTrackLength;
|
||||
};
|
||||
|
||||
// inline functions
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4DetectorConstruction.cc 87359 2014-12-01 16:04:27Z gcosmo $
|
||||
// $Id: B4DetectorConstruction.cc 101905 2016-12-07 11:34:39Z gunter $
|
||||
//
|
||||
/// \file B4DetectorConstruction.cc
|
||||
/// \brief Implementation of the B4DetectorConstruction class
|
||||
@@ -54,14 +54,14 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4ThreadLocal
|
||||
G4GlobalMagFieldMessenger* B4DetectorConstruction::fMagFieldMessenger = 0;
|
||||
G4GlobalMagFieldMessenger* B4DetectorConstruction::fMagFieldMessenger = nullptr;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B4DetectorConstruction::B4DetectorConstruction()
|
||||
: G4VUserDetectorConstruction(),
|
||||
fAbsorberPV(0),
|
||||
fGapPV(0),
|
||||
fAbsorberPV(nullptr),
|
||||
fGapPV(nullptr),
|
||||
fCheckOverlaps(true)
|
||||
{
|
||||
}
|
||||
@@ -88,7 +88,7 @@ G4VPhysicalVolume* B4DetectorConstruction::Construct()
|
||||
void B4DetectorConstruction::DefineMaterials()
|
||||
{
|
||||
// Lead material defined using NIST Manager
|
||||
G4NistManager* nistManager = G4NistManager::Instance();
|
||||
auto nistManager = G4NistManager::Instance();
|
||||
nistManager->FindOrBuildMaterial("G4_Pb");
|
||||
|
||||
// Liquid argon material
|
||||
@@ -116,15 +116,15 @@ G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()
|
||||
G4double gapThickness = 5.*mm;
|
||||
G4double calorSizeXY = 10.*cm;
|
||||
|
||||
G4double layerThickness = absoThickness + gapThickness;
|
||||
G4double calorThickness = nofLayers * layerThickness;
|
||||
G4double worldSizeXY = 1.2 * calorSizeXY;
|
||||
G4double worldSizeZ = 1.2 * calorThickness;
|
||||
auto layerThickness = absoThickness + gapThickness;
|
||||
auto calorThickness = nofLayers * layerThickness;
|
||||
auto worldSizeXY = 1.2 * calorSizeXY;
|
||||
auto worldSizeZ = 1.2 * calorThickness;
|
||||
|
||||
// Get materials
|
||||
G4Material* defaultMaterial = G4Material::GetMaterial("Galactic");
|
||||
G4Material* absorberMaterial = G4Material::GetMaterial("G4_Pb");
|
||||
G4Material* gapMaterial = G4Material::GetMaterial("liquidArgon");
|
||||
auto defaultMaterial = G4Material::GetMaterial("Galactic");
|
||||
auto absorberMaterial = G4Material::GetMaterial("G4_Pb");
|
||||
auto gapMaterial = G4Material::GetMaterial("liquidArgon");
|
||||
|
||||
if ( ! defaultMaterial || ! absorberMaterial || ! gapMaterial ) {
|
||||
G4ExceptionDescription msg;
|
||||
@@ -136,17 +136,17 @@ G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// World
|
||||
//
|
||||
G4VSolid* worldS
|
||||
auto worldS
|
||||
= new G4Box("World", // its name
|
||||
worldSizeXY/2, worldSizeXY/2, worldSizeZ/2); // its size
|
||||
|
||||
G4LogicalVolume* worldLV
|
||||
auto worldLV
|
||||
= new G4LogicalVolume(
|
||||
worldS, // its solid
|
||||
defaultMaterial, // its material
|
||||
"World"); // its name
|
||||
|
||||
G4VPhysicalVolume* worldPV
|
||||
auto worldPV
|
||||
= new G4PVPlacement(
|
||||
0, // no rotation
|
||||
G4ThreeVector(), // at (0,0,0)
|
||||
@@ -160,11 +160,11 @@ G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Calorimeter
|
||||
//
|
||||
G4VSolid* calorimeterS
|
||||
auto calorimeterS
|
||||
= new G4Box("Calorimeter", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, calorThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* calorLV
|
||||
auto calorLV
|
||||
= new G4LogicalVolume(
|
||||
calorimeterS, // its solid
|
||||
defaultMaterial, // its material
|
||||
@@ -183,11 +183,11 @@ G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Layer
|
||||
//
|
||||
G4VSolid* layerS
|
||||
auto layerS
|
||||
= new G4Box("Layer", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, layerThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* layerLV
|
||||
auto layerLV
|
||||
= new G4LogicalVolume(
|
||||
layerS, // its solid
|
||||
defaultMaterial, // its material
|
||||
@@ -204,11 +204,11 @@ G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Absorber
|
||||
//
|
||||
G4VSolid* absorberS
|
||||
auto absorberS
|
||||
= new G4Box("Abso", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, absoThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* absorberLV
|
||||
auto absorberLV
|
||||
= new G4LogicalVolume(
|
||||
absorberS, // its solid
|
||||
absorberMaterial, // its material
|
||||
@@ -228,11 +228,11 @@ G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Gap
|
||||
//
|
||||
G4VSolid* gapS
|
||||
auto gapS
|
||||
= new G4Box("Gap", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, gapThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* gapLV
|
||||
auto gapLV
|
||||
= new G4LogicalVolume(
|
||||
gapS, // its solid
|
||||
gapMaterial, // its material
|
||||
@@ -264,9 +264,9 @@ G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Visualization attributes
|
||||
//
|
||||
worldLV->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
worldLV->SetVisAttributes (G4VisAttributes::GetInvisible());
|
||||
|
||||
G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
auto simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
simpleBoxVisAtt->SetVisibility(true);
|
||||
calorLV->SetVisAttributes(simpleBoxVisAtt);
|
||||
|
||||
@@ -283,7 +283,7 @@ void B4DetectorConstruction::ConstructSDandField()
|
||||
// Create global magnetic field messenger.
|
||||
// Uniform magnetic field is then created automatically if
|
||||
// the field value is not zero.
|
||||
G4ThreeVector fieldValue = G4ThreeVector();
|
||||
G4ThreeVector fieldValue;
|
||||
fMagFieldMessenger = new G4GlobalMagFieldMessenger(fieldValue);
|
||||
fMagFieldMessenger->SetVerboseLevel(1);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4PrimaryGeneratorAction.cc 75215 2013-10-29 16:07:06Z gcosmo $
|
||||
// $Id: B4PrimaryGeneratorAction.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the B4PrimaryGeneratorAction class
|
||||
@@ -45,14 +45,14 @@
|
||||
|
||||
B4PrimaryGeneratorAction::B4PrimaryGeneratorAction()
|
||||
: G4VUserPrimaryGeneratorAction(),
|
||||
fParticleGun(0)
|
||||
fParticleGun(nullptr)
|
||||
{
|
||||
G4int nofParticles = 1;
|
||||
fParticleGun = new G4ParticleGun(nofParticles);
|
||||
|
||||
// default particle kinematic
|
||||
//
|
||||
G4ParticleDefinition* particleDefinition
|
||||
auto particleDefinition
|
||||
= G4ParticleTable::GetParticleTable()->FindParticle("e-");
|
||||
fParticleGun->SetParticleDefinition(particleDefinition);
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
|
||||
@@ -73,20 +73,24 @@ void B4PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
// This function is called at the begining of event
|
||||
|
||||
// In order to avoid dependence of PrimaryGeneratorAction
|
||||
// on DetectorConstruction class we get world volume
|
||||
// on DetectorConstruction class we get world volume
|
||||
// from G4LogicalVolumeStore
|
||||
//
|
||||
G4double worldZHalfLength = 0;
|
||||
G4LogicalVolume* worlLV
|
||||
= G4LogicalVolumeStore::GetInstance()->GetVolume("World");
|
||||
G4Box* worldBox = 0;
|
||||
if ( worlLV) worldBox = dynamic_cast< G4Box*>(worlLV->GetSolid());
|
||||
G4double worldZHalfLength = 0.;
|
||||
auto worldLV = G4LogicalVolumeStore::GetInstance()->GetVolume("World");
|
||||
|
||||
// Check that the world volume has box shape
|
||||
G4Box* worldBox = nullptr;
|
||||
if ( worldLV ) {
|
||||
worldBox = dynamic_cast<G4Box*>(worldLV->GetSolid());
|
||||
}
|
||||
|
||||
if ( worldBox ) {
|
||||
worldZHalfLength = worldBox->GetZHalfLength();
|
||||
}
|
||||
else {
|
||||
G4ExceptionDescription msg;
|
||||
msg << "World volume of box not found." << G4endl;
|
||||
msg << "World volume of box shape not found." << G4endl;
|
||||
msg << "Perhaps you have changed geometry." << G4endl;
|
||||
msg << "The gun will be place in the center.";
|
||||
G4Exception("B4PrimaryGeneratorAction::GeneratePrimaries()",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4bEventAction.cc 75604 2013-11-04 13:17:26Z gcosmo $
|
||||
// $Id: B4bEventAction.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4bEventAction.cc
|
||||
/// \brief Implementation of the B4bEventAction class
|
||||
@@ -73,7 +73,7 @@ void B4bEventAction::PrintEventStatistics(
|
||||
|
||||
void B4bEventAction::BeginOfEventAction(const G4Event* /*event*/)
|
||||
{
|
||||
B4bRunData* runData
|
||||
auto runData
|
||||
= static_cast<B4bRunData*>(
|
||||
G4RunManager::GetRunManager()->GetNonConstCurrentRun());
|
||||
runData->Reset();
|
||||
@@ -83,15 +83,15 @@ void B4bEventAction::BeginOfEventAction(const G4Event* /*event*/)
|
||||
|
||||
void B4bEventAction::EndOfEventAction(const G4Event* event)
|
||||
{
|
||||
B4bRunData* runData
|
||||
auto runData
|
||||
= static_cast<B4bRunData*>(
|
||||
G4RunManager::GetRunManager()->GetNonConstCurrentRun());
|
||||
runData->FillPerEvent();
|
||||
|
||||
//print per event (modulo n)
|
||||
//
|
||||
G4int eventID = event->GetEventID();
|
||||
G4int printModulo = G4RunManager::GetRunManager()->GetPrintProgress();
|
||||
auto eventID = event->GetEventID();
|
||||
auto printModulo = G4RunManager::GetRunManager()->GetPrintProgress();
|
||||
if ( ( printModulo > 0 ) && ( eventID % printModulo == 0 ) ) {
|
||||
G4cout << "---> End of event: " << eventID << G4endl;
|
||||
|
||||
|
||||
@@ -48,23 +48,24 @@ B4bRunAction::B4bRunAction()
|
||||
// Create analysis manager
|
||||
// The choice of analysis technology is done via selectin of a namespace
|
||||
// in B4Analysis.hh
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
G4cout << "Using " << analysisManager->GetType() << G4endl;
|
||||
|
||||
// Create directories
|
||||
//analysisManager->SetHistoDirectoryName("histograms");
|
||||
//analysisManager->SetNtupleDirectoryName("ntuple");
|
||||
analysisManager->SetVerboseLevel(1);
|
||||
analysisManager->SetFirstHistoId(1);
|
||||
analysisManager->SetNtupleMerging(true);
|
||||
// Note: merging ntuples is available only with Root output
|
||||
|
||||
// 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);
|
||||
analysisManager->CreateH1("Eabs","Edep in absorber", 100, 0., 800*MeV);
|
||||
analysisManager->CreateH1("Egap","Edep in gap", 100, 0., 100*MeV);
|
||||
analysisManager->CreateH1("Labs","trackL in absorber", 100, 0., 1*m);
|
||||
analysisManager->CreateH1("Lgap","trackL in gap", 100, 0., 50*cm);
|
||||
|
||||
// Creating ntuple
|
||||
//
|
||||
@@ -100,7 +101,7 @@ void B4bRunAction::BeginOfRunAction(const G4Run* run)
|
||||
//G4RunManager::GetRunManager()->SetRandomNumberStore(true);
|
||||
|
||||
// Get analysis manager
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
|
||||
// Open an output file
|
||||
//
|
||||
@@ -114,7 +115,7 @@ void B4bRunAction::EndOfRunAction(const G4Run* /*aRun*/)
|
||||
{
|
||||
// print histogram statistics
|
||||
//
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
if ( analysisManager->GetH1(1) ) {
|
||||
G4cout << G4endl << " ----> print histograms statistic ";
|
||||
if(isMaster) {
|
||||
@@ -125,24 +126,24 @@ void B4bRunAction::EndOfRunAction(const G4Run* /*aRun*/)
|
||||
}
|
||||
|
||||
G4cout << " EAbs : mean = "
|
||||
<< G4BestUnit(analysisManager->GetH1(0)->mean(), "Energy")
|
||||
<< " rms = "
|
||||
<< G4BestUnit(analysisManager->GetH1(0)->rms(), "Energy") << G4endl;
|
||||
|
||||
G4cout << " EGap : 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(2)->mean(), "Length")
|
||||
<< " rms = "
|
||||
<< G4BestUnit(analysisManager->GetH1(2)->rms(), "Length") << G4endl;
|
||||
|
||||
G4cout << " LGap : 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
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4bRunData.cc 69223 2013-04-23 12:36:10Z gcosmo $
|
||||
// $Id: B4bRunData.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4bRunData.cc
|
||||
/// \brief Implementation of the B4bRunData class
|
||||
@@ -36,15 +36,16 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B4bRunData::B4bRunData() : G4Run()
|
||||
B4bRunData::B4bRunData()
|
||||
: G4Run(),
|
||||
fVolumeNames{ { "Absorber", "Gap" } }
|
||||
{
|
||||
fVolumeNames[0] = "Absorber";
|
||||
fVolumeNames[1] = "Gap";
|
||||
|
||||
for ( G4int i=0; i<kDim; i++) {
|
||||
fEdep[i] = 0.;
|
||||
fTrackLength[i] = 0.;
|
||||
}
|
||||
for ( auto& edep : fEdep ) {
|
||||
edep = 0.;
|
||||
}
|
||||
for ( auto& trackLength : fTrackLength ) {
|
||||
trackLength = 0.;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -57,20 +58,19 @@ B4bRunData::~B4bRunData()
|
||||
void B4bRunData::FillPerEvent()
|
||||
{
|
||||
// get analysis manager
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
//accumulate statistic
|
||||
//
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
|
||||
for ( G4int i=0; i<kDim; i++) {
|
||||
// fill histograms
|
||||
analysisManager->FillH1(i+1, fEdep[i]);
|
||||
analysisManager->FillH1(kDim+i+1, fTrackLength[i]);
|
||||
|
||||
// fill ntuple
|
||||
analysisManager->FillNtupleDColumn(i, fEdep[i]);
|
||||
analysisManager->FillNtupleDColumn(kDim+i, fTrackLength[i]);
|
||||
// accumulate statistic
|
||||
// in the order od the histograms, ntuple columns declarations
|
||||
G4int counter = 0;
|
||||
for ( auto edep : fEdep ) {
|
||||
analysisManager->FillH1(counter, edep);
|
||||
analysisManager->FillNtupleDColumn(counter++, edep);
|
||||
}
|
||||
for ( auto trackLength : fTrackLength ) {
|
||||
analysisManager->FillH1(counter, trackLength);
|
||||
analysisManager->FillNtupleDColumn(counter++, trackLength);
|
||||
}
|
||||
|
||||
analysisManager->AddNtupleRow();
|
||||
}
|
||||
|
||||
@@ -78,10 +78,12 @@ void B4bRunData::FillPerEvent()
|
||||
|
||||
void B4bRunData::Reset()
|
||||
{
|
||||
for ( G4int i=0; i<kDim; i++) {
|
||||
fEdep[i] = 0.;
|
||||
fTrackLength[i] = 0.;
|
||||
}
|
||||
for ( auto& edep : fEdep ) {
|
||||
edep = 0.;
|
||||
}
|
||||
for ( auto& trackLength : fTrackLength ) {
|
||||
trackLength = 0.;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4bSteppingAction.cc 69223 2013-04-23 12:36:10Z gcosmo $
|
||||
// $Id: B4bSteppingAction.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4bSteppingAction.cc
|
||||
/// \brief Implementation of the B4bSteppingAction class
|
||||
@@ -57,11 +57,10 @@ void B4bSteppingAction::UserSteppingAction(const G4Step* step)
|
||||
// Collect energy and track length step by step
|
||||
|
||||
// get volume of the current step
|
||||
G4VPhysicalVolume* volume
|
||||
= step->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
|
||||
auto volume = step->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
|
||||
|
||||
// energy deposit
|
||||
G4double edep = step->GetTotalEnergyDeposit();
|
||||
auto edep = step->GetTotalEnergyDeposit();
|
||||
|
||||
// step length
|
||||
G4double stepLength = 0.;
|
||||
@@ -69,7 +68,7 @@ void B4bSteppingAction::UserSteppingAction(const G4Step* step)
|
||||
stepLength = step->GetStepLength();
|
||||
}
|
||||
|
||||
B4bRunData* runData = static_cast<B4bRunData*>
|
||||
auto runData = static_cast<B4bRunData*>
|
||||
(G4RunManager::GetRunManager()->GetNonConstCurrentRun());
|
||||
|
||||
if ( volume == fDetConstruction->GetAbsorberPV() ) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: CMakeLists.txt 86065 2014-11-07 08:51:15Z gcosmo $
|
||||
# $Id: CMakeLists.txt 100923 2016-11-03 10:50:34Z gcosmo $
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
@@ -46,9 +46,7 @@ target_link_libraries(exampleB4c ${Geant4_LIBRARIES})
|
||||
set(EXAMPLEB4C_SCRIPTS
|
||||
exampleB4c.out
|
||||
exampleB4.in
|
||||
icons.mac
|
||||
gui.mac
|
||||
run.png
|
||||
init_vis.mac
|
||||
run1.mac
|
||||
run2.mac
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: exampleB4c.cc 94808 2015-12-10 08:22:26Z gcosmo $
|
||||
// $Id: exampleB4c.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file exampleB4c.cc
|
||||
/// \brief Main program of the B4c example
|
||||
@@ -111,24 +111,23 @@ int main(int argc,char** argv)
|
||||
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
B4cDetectorConstruction* detConstruction = new B4cDetectorConstruction();
|
||||
auto detConstruction = new B4cDetectorConstruction();
|
||||
runManager->SetUserInitialization(detConstruction);
|
||||
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
auto physicsList = new FTFP_BERT;
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
B4cActionInitialization* actionInitialization
|
||||
= new B4cActionInitialization();
|
||||
auto actionInitialization = new B4cActionInitialization();
|
||||
runManager->SetUserInitialization(actionInitialization);
|
||||
|
||||
// Initialize visualization
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
auto visManager = new G4VisExecutive;
|
||||
// G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
|
||||
// G4VisManager* visManager = new G4VisExecutive("Quiet");
|
||||
visManager->Initialize();
|
||||
|
||||
// Get the pointer to the User Interface manager
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
auto UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
// Process macro or start UI session
|
||||
//
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,10 +3,6 @@
|
||||
# the menu bar of the G4UIXm, G4UIQt, G4UIWin32 sessions.
|
||||
# It has no effect with G4UIterminal.
|
||||
#
|
||||
# Add icons of general interest
|
||||
#
|
||||
/control/execute icons.mac
|
||||
#
|
||||
# File menu :
|
||||
/gui/addMenu file File
|
||||
/gui/addButton file Quit exit
|
||||
@@ -46,5 +42,3 @@
|
||||
# To limit the output flow in the "dump" widget :
|
||||
/run/printProgress 100
|
||||
#
|
||||
# User defined icon :
|
||||
/gui/addIcon "Run beam on" user_icon "/run/beamOn 1" run.png
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4Analysis.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
// $Id: B4Analysis.hh 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4Analysis.hh
|
||||
/// \brief Selection of the analysis technology
|
||||
@@ -32,6 +32,7 @@
|
||||
#define B4Analysis_h 1
|
||||
|
||||
#include "g4root.hh"
|
||||
//#include "g4cvs.hh"
|
||||
//#include "g4xml.hh"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4cCalorHit.hh 69223 2013-04-23 12:36:10Z gcosmo $
|
||||
// $Id: B4cCalorHit.hh 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4cCalorHit.hh
|
||||
/// \brief Definition of the B4cCalorHit class
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "tls.hh"
|
||||
#include "G4Threading.hh"
|
||||
|
||||
/// Calorimeter hit class
|
||||
///
|
||||
@@ -75,7 +75,7 @@ class B4cCalorHit : public G4VHit
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
typedef G4THitsCollection<B4cCalorHit> B4cCalorHitsCollection;
|
||||
using B4cCalorHitsCollection = G4THitsCollection<B4cCalorHit>;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<B4cCalorHit>* B4cCalorHitAllocator;
|
||||
|
||||
@@ -83,8 +83,9 @@ extern G4ThreadLocal G4Allocator<B4cCalorHit>* B4cCalorHitAllocator;
|
||||
|
||||
inline void* B4cCalorHit::operator new(size_t)
|
||||
{
|
||||
if(!B4cCalorHitAllocator)
|
||||
if (!B4cCalorHitAllocator) {
|
||||
B4cCalorHitAllocator = new G4Allocator<B4cCalorHit>;
|
||||
}
|
||||
void *hit;
|
||||
hit = (void *) B4cCalorHitAllocator->MallocSingle();
|
||||
return hit;
|
||||
@@ -92,8 +93,9 @@ inline void* B4cCalorHit::operator new(size_t)
|
||||
|
||||
inline void B4cCalorHit::operator delete(void *hit)
|
||||
{
|
||||
if(!B4cCalorHitAllocator)
|
||||
if (!B4cCalorHitAllocator) {
|
||||
B4cCalorHitAllocator = new G4Allocator<B4cCalorHit>;
|
||||
}
|
||||
B4cCalorHitAllocator->FreeSingle((B4cCalorHit*) hit);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4cCalorimeterSD.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
// $Id: B4cCalorimeterSD.hh 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4cCalorimeterSD.hh
|
||||
/// \brief Definition of the B4cCalorimeterSD class
|
||||
@@ -63,7 +63,7 @@ class B4cCalorimeterSD : public G4VSensitiveDetector
|
||||
|
||||
private:
|
||||
B4cCalorHitsCollection* fHitsCollection;
|
||||
G4int fNofCells;
|
||||
G4int fNofCells;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4PrimaryGeneratorAction.cc 75215 2013-10-29 16:07:06Z gcosmo $
|
||||
// $Id: B4PrimaryGeneratorAction.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the B4PrimaryGeneratorAction class
|
||||
@@ -45,14 +45,14 @@
|
||||
|
||||
B4PrimaryGeneratorAction::B4PrimaryGeneratorAction()
|
||||
: G4VUserPrimaryGeneratorAction(),
|
||||
fParticleGun(0)
|
||||
fParticleGun(nullptr)
|
||||
{
|
||||
G4int nofParticles = 1;
|
||||
fParticleGun = new G4ParticleGun(nofParticles);
|
||||
|
||||
// default particle kinematic
|
||||
//
|
||||
G4ParticleDefinition* particleDefinition
|
||||
auto particleDefinition
|
||||
= G4ParticleTable::GetParticleTable()->FindParticle("e-");
|
||||
fParticleGun->SetParticleDefinition(particleDefinition);
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
|
||||
@@ -73,20 +73,24 @@ void B4PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
// This function is called at the begining of event
|
||||
|
||||
// In order to avoid dependence of PrimaryGeneratorAction
|
||||
// on DetectorConstruction class we get world volume
|
||||
// on DetectorConstruction class we get world volume
|
||||
// from G4LogicalVolumeStore
|
||||
//
|
||||
G4double worldZHalfLength = 0;
|
||||
G4LogicalVolume* worlLV
|
||||
= G4LogicalVolumeStore::GetInstance()->GetVolume("World");
|
||||
G4Box* worldBox = 0;
|
||||
if ( worlLV) worldBox = dynamic_cast< G4Box*>(worlLV->GetSolid());
|
||||
G4double worldZHalfLength = 0.;
|
||||
auto worldLV = G4LogicalVolumeStore::GetInstance()->GetVolume("World");
|
||||
|
||||
// Check that the world volume has box shape
|
||||
G4Box* worldBox = nullptr;
|
||||
if ( worldLV ) {
|
||||
worldBox = dynamic_cast<G4Box*>(worldLV->GetSolid());
|
||||
}
|
||||
|
||||
if ( worldBox ) {
|
||||
worldZHalfLength = worldBox->GetZHalfLength();
|
||||
}
|
||||
else {
|
||||
G4ExceptionDescription msg;
|
||||
msg << "World volume of box not found." << G4endl;
|
||||
msg << "World volume of box shape not found." << G4endl;
|
||||
msg << "Perhaps you have changed geometry." << G4endl;
|
||||
msg << "The gun will be place in the center.";
|
||||
G4Exception("B4PrimaryGeneratorAction::GeneratePrimaries()",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4RunAction.cc 87359 2014-12-01 16:04:27Z gcosmo $
|
||||
// $Id: B4RunAction.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4RunAction.cc
|
||||
/// \brief Implementation of the B4RunAction class
|
||||
@@ -47,23 +47,24 @@ B4RunAction::B4RunAction()
|
||||
// Create analysis manager
|
||||
// The choice of analysis technology is done via selectin of a namespace
|
||||
// in B4Analysis.hh
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
G4cout << "Using " << analysisManager->GetType() << G4endl;
|
||||
|
||||
// Create directories
|
||||
//analysisManager->SetHistoDirectoryName("histograms");
|
||||
//analysisManager->SetNtupleDirectoryName("ntuple");
|
||||
analysisManager->SetVerboseLevel(1);
|
||||
analysisManager->SetFirstHistoId(1);
|
||||
analysisManager->SetNtupleMerging(true);
|
||||
// Note: merging ntuples is available only with Root output
|
||||
|
||||
// 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);
|
||||
analysisManager->CreateH1("Eabs","Edep in absorber", 100, 0., 800*MeV);
|
||||
analysisManager->CreateH1("Egap","Edep in gap", 100, 0., 100*MeV);
|
||||
analysisManager->CreateH1("Labs","trackL in absorber", 100, 0., 1*m);
|
||||
analysisManager->CreateH1("Lgap","trackL in gap", 100, 0., 50*cm);
|
||||
|
||||
// Creating ntuple
|
||||
//
|
||||
@@ -90,7 +91,7 @@ void B4RunAction::BeginOfRunAction(const G4Run* /*run*/)
|
||||
//G4RunManager::GetRunManager()->SetRandomNumberStore(true);
|
||||
|
||||
// Get analysis manager
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
|
||||
// Open an output file
|
||||
//
|
||||
@@ -104,7 +105,7 @@ void B4RunAction::EndOfRunAction(const G4Run* /*run*/)
|
||||
{
|
||||
// print histogram statistics
|
||||
//
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
if ( analysisManager->GetH1(1) ) {
|
||||
G4cout << G4endl << " ----> print histograms statistic ";
|
||||
if(isMaster) {
|
||||
@@ -115,31 +116,30 @@ void B4RunAction::EndOfRunAction(const G4Run* /*run*/)
|
||||
}
|
||||
|
||||
G4cout << " EAbs : mean = "
|
||||
<< G4BestUnit(analysisManager->GetH1(0)->mean(), "Energy")
|
||||
<< " rms = "
|
||||
<< G4BestUnit(analysisManager->GetH1(0)->rms(), "Energy") << G4endl;
|
||||
|
||||
G4cout << " EGap : 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(2)->mean(), "Length")
|
||||
<< " rms = "
|
||||
<< G4BestUnit(analysisManager->GetH1(2)->rms(), "Length") << G4endl;
|
||||
|
||||
G4cout << " LGap : 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......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4cCalorimeterSD.cc 87359 2014-12-01 16:04:27Z gcosmo $
|
||||
// $Id: B4cCalorimeterSD.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4cCalorimeterSD.cc
|
||||
/// \brief Implementation of the B4cCalorimeterSD class
|
||||
@@ -42,7 +42,7 @@ B4cCalorimeterSD::B4cCalorimeterSD(
|
||||
const G4String& hitsCollectionName,
|
||||
G4int nofCells)
|
||||
: G4VSensitiveDetector(name),
|
||||
fHitsCollection(0),
|
||||
fHitsCollection(nullptr),
|
||||
fNofCells(nofCells)
|
||||
{
|
||||
collectionName.insert(hitsCollectionName);
|
||||
@@ -63,7 +63,7 @@ void B4cCalorimeterSD::Initialize(G4HCofThisEvent* hce)
|
||||
= new B4cCalorHitsCollection(SensitiveDetectorName, collectionName[0]);
|
||||
|
||||
// Add this collection in hce
|
||||
G4int hcID
|
||||
auto hcID
|
||||
= G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
|
||||
hce->AddHitsCollection( hcID, fHitsCollection );
|
||||
|
||||
@@ -80,7 +80,7 @@ G4bool B4cCalorimeterSD::ProcessHits(G4Step* step,
|
||||
G4TouchableHistory*)
|
||||
{
|
||||
// energy deposit
|
||||
G4double edep = step->GetTotalEnergyDeposit();
|
||||
auto edep = step->GetTotalEnergyDeposit();
|
||||
|
||||
// step length
|
||||
G4double stepLength = 0.;
|
||||
@@ -90,14 +90,13 @@ G4bool B4cCalorimeterSD::ProcessHits(G4Step* step,
|
||||
|
||||
if ( edep==0. && stepLength == 0. ) return false;
|
||||
|
||||
G4TouchableHistory* touchable
|
||||
= (G4TouchableHistory*)(step->GetPreStepPoint()->GetTouchable());
|
||||
auto touchable = (step->GetPreStepPoint()->GetTouchable());
|
||||
|
||||
// Get calorimeter cell id
|
||||
G4int layerNumber = touchable->GetReplicaNumber(1);
|
||||
auto layerNumber = touchable->GetReplicaNumber(1);
|
||||
|
||||
// Get hit accounting data for this cell
|
||||
B4cCalorHit* hit = (*fHitsCollection)[layerNumber];
|
||||
auto hit = (*fHitsCollection)[layerNumber];
|
||||
if ( ! hit ) {
|
||||
G4ExceptionDescription msg;
|
||||
msg << "Cannot access hit " << layerNumber;
|
||||
@@ -106,7 +105,7 @@ G4bool B4cCalorimeterSD::ProcessHits(G4Step* step,
|
||||
}
|
||||
|
||||
// Get hit for total accounting
|
||||
B4cCalorHit* hitTotal
|
||||
auto hitTotal
|
||||
= (*fHitsCollection)[fHitsCollection->entries()-1];
|
||||
|
||||
// Add values
|
||||
@@ -121,7 +120,7 @@ G4bool B4cCalorimeterSD::ProcessHits(G4Step* step,
|
||||
void B4cCalorimeterSD::EndOfEvent(G4HCofThisEvent*)
|
||||
{
|
||||
if ( verboseLevel>1 ) {
|
||||
G4int nofHits = fHitsCollection->entries();
|
||||
auto nofHits = fHitsCollection->entries();
|
||||
G4cout
|
||||
<< G4endl
|
||||
<< "-------->Hits Collection: in this event they are " << nofHits
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4cDetectorConstruction.cc 87359 2014-12-01 16:04:27Z gcosmo $
|
||||
// $Id: B4cDetectorConstruction.cc 101905 2016-12-07 11:34:39Z gunter $
|
||||
//
|
||||
/// \file B4cDetectorConstruction.cc
|
||||
/// \brief Implementation of the B4cDetectorConstruction class
|
||||
@@ -84,7 +84,7 @@ G4VPhysicalVolume* B4cDetectorConstruction::Construct()
|
||||
void B4cDetectorConstruction::DefineMaterials()
|
||||
{
|
||||
// Lead material defined using NIST Manager
|
||||
G4NistManager* nistManager = G4NistManager::Instance();
|
||||
auto nistManager = G4NistManager::Instance();
|
||||
nistManager->FindOrBuildMaterial("G4_Pb");
|
||||
|
||||
// Liquid argon material
|
||||
@@ -112,15 +112,15 @@ G4VPhysicalVolume* B4cDetectorConstruction::DefineVolumes()
|
||||
G4double gapThickness = 5.*mm;
|
||||
G4double calorSizeXY = 10.*cm;
|
||||
|
||||
G4double layerThickness = absoThickness + gapThickness;
|
||||
G4double calorThickness = fNofLayers * layerThickness;
|
||||
G4double worldSizeXY = 1.2 * calorSizeXY;
|
||||
G4double worldSizeZ = 1.2 * calorThickness;
|
||||
auto layerThickness = absoThickness + gapThickness;
|
||||
auto calorThickness = fNofLayers * layerThickness;
|
||||
auto worldSizeXY = 1.2 * calorSizeXY;
|
||||
auto worldSizeZ = 1.2 * calorThickness;
|
||||
|
||||
// Get materials
|
||||
G4Material* defaultMaterial = G4Material::GetMaterial("Galactic");
|
||||
G4Material* absorberMaterial = G4Material::GetMaterial("G4_Pb");
|
||||
G4Material* gapMaterial = G4Material::GetMaterial("liquidArgon");
|
||||
auto defaultMaterial = G4Material::GetMaterial("Galactic");
|
||||
auto absorberMaterial = G4Material::GetMaterial("G4_Pb");
|
||||
auto gapMaterial = G4Material::GetMaterial("liquidArgon");
|
||||
|
||||
if ( ! defaultMaterial || ! absorberMaterial || ! gapMaterial ) {
|
||||
G4ExceptionDescription msg;
|
||||
@@ -132,17 +132,17 @@ G4VPhysicalVolume* B4cDetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// World
|
||||
//
|
||||
G4VSolid* worldS
|
||||
auto worldS
|
||||
= new G4Box("World", // its name
|
||||
worldSizeXY/2, worldSizeXY/2, worldSizeZ/2); // its size
|
||||
|
||||
G4LogicalVolume* worldLV
|
||||
auto worldLV
|
||||
= new G4LogicalVolume(
|
||||
worldS, // its solid
|
||||
defaultMaterial, // its material
|
||||
"World"); // its name
|
||||
|
||||
G4VPhysicalVolume* worldPV
|
||||
auto worldPV
|
||||
= new G4PVPlacement(
|
||||
0, // no rotation
|
||||
G4ThreeVector(), // at (0,0,0)
|
||||
@@ -156,11 +156,11 @@ G4VPhysicalVolume* B4cDetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Calorimeter
|
||||
//
|
||||
G4VSolid* calorimeterS
|
||||
auto calorimeterS
|
||||
= new G4Box("Calorimeter", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, calorThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* calorLV
|
||||
auto calorLV
|
||||
= new G4LogicalVolume(
|
||||
calorimeterS, // its solid
|
||||
defaultMaterial, // its material
|
||||
@@ -179,11 +179,11 @@ G4VPhysicalVolume* B4cDetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Layer
|
||||
//
|
||||
G4VSolid* layerS
|
||||
auto layerS
|
||||
= new G4Box("Layer", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, layerThickness/2); //its size
|
||||
|
||||
G4LogicalVolume* layerLV
|
||||
auto layerLV
|
||||
= new G4LogicalVolume(
|
||||
layerS, // its solid
|
||||
defaultMaterial, // its material
|
||||
@@ -200,11 +200,11 @@ G4VPhysicalVolume* B4cDetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Absorber
|
||||
//
|
||||
G4VSolid* absorberS
|
||||
auto absorberS
|
||||
= new G4Box("Abso", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, absoThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* absorberLV
|
||||
auto absorberLV
|
||||
= new G4LogicalVolume(
|
||||
absorberS, // its solid
|
||||
absorberMaterial, // its material
|
||||
@@ -223,11 +223,11 @@ G4VPhysicalVolume* B4cDetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Gap
|
||||
//
|
||||
G4VSolid* gapS
|
||||
auto gapS
|
||||
= new G4Box("Gap", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, gapThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* gapLV
|
||||
auto gapLV
|
||||
= new G4LogicalVolume(
|
||||
gapS, // its solid
|
||||
gapMaterial, // its material
|
||||
@@ -258,9 +258,9 @@ G4VPhysicalVolume* B4cDetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Visualization attributes
|
||||
//
|
||||
worldLV->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
worldLV->SetVisAttributes (G4VisAttributes::GetInvisible());
|
||||
|
||||
G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
auto simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
simpleBoxVisAtt->SetVisibility(true);
|
||||
calorLV->SetVisAttributes(simpleBoxVisAtt);
|
||||
|
||||
@@ -279,12 +279,14 @@ void B4cDetectorConstruction::ConstructSDandField()
|
||||
//
|
||||
// Sensitive detectors
|
||||
//
|
||||
B4cCalorimeterSD* absoSD
|
||||
auto absoSD
|
||||
= new B4cCalorimeterSD("AbsorberSD", "AbsorberHitsCollection", fNofLayers);
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(absoSD);
|
||||
SetSensitiveDetector("AbsoLV",absoSD);
|
||||
|
||||
B4cCalorimeterSD* gapSD
|
||||
auto gapSD
|
||||
= new B4cCalorimeterSD("GapSD", "GapHitsCollection", fNofLayers);
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(gapSD);
|
||||
SetSensitiveDetector("GapLV",gapSD);
|
||||
|
||||
//
|
||||
@@ -293,7 +295,7 @@ void B4cDetectorConstruction::ConstructSDandField()
|
||||
// Create global magnetic field messenger.
|
||||
// Uniform magnetic field is then created automatically if
|
||||
// the field value is not zero.
|
||||
G4ThreeVector fieldValue = G4ThreeVector();
|
||||
G4ThreeVector fieldValue;
|
||||
fMagFieldMessenger = new G4GlobalMagFieldMessenger(fieldValue);
|
||||
fMagFieldMessenger->SetVerboseLevel(1);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4cEventAction.cc 88427 2015-02-19 08:19:38Z gcosmo $
|
||||
// $Id: B4cEventAction.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4cEventAction.cc
|
||||
/// \brief Implementation of the B4cEventAction class
|
||||
@@ -61,7 +61,7 @@ B4cCalorHitsCollection*
|
||||
B4cEventAction::GetHitsCollection(G4int hcID,
|
||||
const G4Event* event) const
|
||||
{
|
||||
B4cCalorHitsCollection* hitsCollection
|
||||
auto hitsCollection
|
||||
= static_cast<B4cCalorHitsCollection*>(
|
||||
event->GetHCofThisEvent()->GetHC(hcID));
|
||||
|
||||
@@ -113,17 +113,17 @@ void B4cEventAction::EndOfEventAction(const G4Event* event)
|
||||
}
|
||||
|
||||
// Get hits collections
|
||||
B4cCalorHitsCollection* absoHC = GetHitsCollection(fAbsHCID, event);
|
||||
B4cCalorHitsCollection* gapHC = GetHitsCollection(fGapHCID, event);
|
||||
auto absoHC = GetHitsCollection(fAbsHCID, event);
|
||||
auto gapHC = GetHitsCollection(fGapHCID, event);
|
||||
|
||||
// Get hit with total values
|
||||
B4cCalorHit* absoHit = (*absoHC)[absoHC->entries()-1];
|
||||
B4cCalorHit* gapHit = (*gapHC)[gapHC->entries()-1];
|
||||
auto absoHit = (*absoHC)[absoHC->entries()-1];
|
||||
auto gapHit = (*gapHC)[gapHC->entries()-1];
|
||||
|
||||
// Print per event (modulo n)
|
||||
//
|
||||
G4int eventID = event->GetEventID();
|
||||
G4int printModulo = G4RunManager::GetRunManager()->GetPrintProgress();
|
||||
auto eventID = event->GetEventID();
|
||||
auto printModulo = G4RunManager::GetRunManager()->GetPrintProgress();
|
||||
if ( ( printModulo > 0 ) && ( eventID % printModulo == 0 ) ) {
|
||||
G4cout << "---> End of event: " << eventID << G4endl;
|
||||
|
||||
@@ -136,13 +136,13 @@ void B4cEventAction::EndOfEventAction(const G4Event* event)
|
||||
//
|
||||
|
||||
// get analysis manager
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
|
||||
// fill histograms
|
||||
analysisManager->FillH1(1, absoHit->GetEdep());
|
||||
analysisManager->FillH1(2, gapHit->GetEdep());
|
||||
analysisManager->FillH1(3, absoHit->GetTrackLength());
|
||||
analysisManager->FillH1(4, gapHit->GetTrackLength());
|
||||
analysisManager->FillH1(0, absoHit->GetEdep());
|
||||
analysisManager->FillH1(1, gapHit->GetEdep());
|
||||
analysisManager->FillH1(2, absoHit->GetTrackLength());
|
||||
analysisManager->FillH1(3, gapHit->GetTrackLength());
|
||||
|
||||
// fill ntuple
|
||||
analysisManager->FillNtupleDColumn(0, absoHit->GetEdep());
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: CMakeLists.txt 86065 2014-11-07 08:51:15Z gcosmo $
|
||||
# $Id: CMakeLists.txt 100923 2016-11-03 10:50:34Z gcosmo $
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
@@ -46,9 +46,7 @@ target_link_libraries(exampleB4d ${Geant4_LIBRARIES})
|
||||
set(EXAMPLEB4D_SCRIPTS
|
||||
exampleB4d.out
|
||||
exampleB4.in
|
||||
icons.mac
|
||||
gui.mac
|
||||
run.png
|
||||
init_vis.mac
|
||||
run1.mac
|
||||
run2.mac
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: exampleB4d.cc 94808 2015-12-10 08:22:26Z gcosmo $
|
||||
// $Id: exampleB4d.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file exampleB4d.cc
|
||||
/// \brief Main program of the B4d example
|
||||
@@ -90,7 +90,7 @@ int main(int argc,char** argv)
|
||||
|
||||
// Detect interactive mode (if no macro provided) and define UI session
|
||||
//
|
||||
G4UIExecutive* ui = 0;
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if ( ! macro.size() ) {
|
||||
ui = new G4UIExecutive(argc, argv, session);
|
||||
}
|
||||
@@ -102,34 +102,33 @@ int main(int argc,char** argv)
|
||||
// Construct the MT run manager
|
||||
//
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MTRunManager * runManager = new G4MTRunManager;
|
||||
auto runManager = new G4MTRunManager;
|
||||
if ( nThreads > 0 ) {
|
||||
runManager->SetNumberOfThreads(nThreads);
|
||||
}
|
||||
#else
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
auto runManager = new G4RunManager;
|
||||
#endif
|
||||
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
B4dDetectorConstruction* detConstruction = new B4dDetectorConstruction();
|
||||
auto detConstruction = new B4dDetectorConstruction();
|
||||
runManager->SetUserInitialization(detConstruction);
|
||||
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
auto physicsList = new FTFP_BERT;
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
B4dActionInitialization* actionInitialization
|
||||
= new B4dActionInitialization();
|
||||
auto actionInitialization = new B4dActionInitialization();
|
||||
runManager->SetUserInitialization(actionInitialization);
|
||||
|
||||
// Initialize visualization
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
auto visManager = new G4VisExecutive;
|
||||
// G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
|
||||
// G4VisManager* visManager = new G4VisExecutive("Quiet");
|
||||
visManager->Initialize();
|
||||
|
||||
// Get the pointer to the User Interface manager
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
auto UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
// Process macro or start UI session
|
||||
//
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,10 +3,6 @@
|
||||
# the menu bar of the G4UIXm, G4UIQt, G4UIWin32 sessions.
|
||||
# It has no effect with G4UIterminal.
|
||||
#
|
||||
# Add icons of general interest
|
||||
#
|
||||
/control/execute icons.mac
|
||||
#
|
||||
# File menu :
|
||||
/gui/addMenu file File
|
||||
/gui/addButton file Quit exit
|
||||
@@ -46,5 +42,3 @@
|
||||
# To limit the output flow in the "dump" widget :
|
||||
/run/printProgress 100
|
||||
#
|
||||
# User defined icon :
|
||||
/gui/addIcon "Run beam on" user_icon "/run/beamOn 1" run.png
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4Analysis.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
// $Id: B4Analysis.hh 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4Analysis.hh
|
||||
/// \brief Selection of the analysis technology
|
||||
@@ -32,6 +32,7 @@
|
||||
#define B4Analysis_h 1
|
||||
|
||||
#include "g4root.hh"
|
||||
//#include "g4cvs.hh"
|
||||
//#include "g4xml.hh"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4PrimaryGeneratorAction.cc 75215 2013-10-29 16:07:06Z gcosmo $
|
||||
// $Id: B4PrimaryGeneratorAction.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the B4PrimaryGeneratorAction class
|
||||
@@ -45,14 +45,14 @@
|
||||
|
||||
B4PrimaryGeneratorAction::B4PrimaryGeneratorAction()
|
||||
: G4VUserPrimaryGeneratorAction(),
|
||||
fParticleGun(0)
|
||||
fParticleGun(nullptr)
|
||||
{
|
||||
G4int nofParticles = 1;
|
||||
fParticleGun = new G4ParticleGun(nofParticles);
|
||||
|
||||
// default particle kinematic
|
||||
//
|
||||
G4ParticleDefinition* particleDefinition
|
||||
auto particleDefinition
|
||||
= G4ParticleTable::GetParticleTable()->FindParticle("e-");
|
||||
fParticleGun->SetParticleDefinition(particleDefinition);
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
|
||||
@@ -73,20 +73,24 @@ void B4PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
// This function is called at the begining of event
|
||||
|
||||
// In order to avoid dependence of PrimaryGeneratorAction
|
||||
// on DetectorConstruction class we get world volume
|
||||
// on DetectorConstruction class we get world volume
|
||||
// from G4LogicalVolumeStore
|
||||
//
|
||||
G4double worldZHalfLength = 0;
|
||||
G4LogicalVolume* worlLV
|
||||
= G4LogicalVolumeStore::GetInstance()->GetVolume("World");
|
||||
G4Box* worldBox = 0;
|
||||
if ( worlLV) worldBox = dynamic_cast< G4Box*>(worlLV->GetSolid());
|
||||
G4double worldZHalfLength = 0.;
|
||||
auto worldLV = G4LogicalVolumeStore::GetInstance()->GetVolume("World");
|
||||
|
||||
// Check that the world volume has box shape
|
||||
G4Box* worldBox = nullptr;
|
||||
if ( worldLV ) {
|
||||
worldBox = dynamic_cast<G4Box*>(worldLV->GetSolid());
|
||||
}
|
||||
|
||||
if ( worldBox ) {
|
||||
worldZHalfLength = worldBox->GetZHalfLength();
|
||||
}
|
||||
else {
|
||||
G4ExceptionDescription msg;
|
||||
msg << "World volume of box not found." << G4endl;
|
||||
msg << "World volume of box shape not found." << G4endl;
|
||||
msg << "Perhaps you have changed geometry." << G4endl;
|
||||
msg << "The gun will be place in the center.";
|
||||
G4Exception("B4PrimaryGeneratorAction::GeneratePrimaries()",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4RunAction.cc 87359 2014-12-01 16:04:27Z gcosmo $
|
||||
// $Id: B4RunAction.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4RunAction.cc
|
||||
/// \brief Implementation of the B4RunAction class
|
||||
@@ -47,23 +47,24 @@ B4RunAction::B4RunAction()
|
||||
// Create analysis manager
|
||||
// The choice of analysis technology is done via selectin of a namespace
|
||||
// in B4Analysis.hh
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
G4cout << "Using " << analysisManager->GetType() << G4endl;
|
||||
|
||||
// Create directories
|
||||
//analysisManager->SetHistoDirectoryName("histograms");
|
||||
//analysisManager->SetNtupleDirectoryName("ntuple");
|
||||
analysisManager->SetVerboseLevel(1);
|
||||
analysisManager->SetFirstHistoId(1);
|
||||
analysisManager->SetNtupleMerging(true);
|
||||
// Note: merging ntuples is available only with Root output
|
||||
|
||||
// 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);
|
||||
analysisManager->CreateH1("Eabs","Edep in absorber", 100, 0., 800*MeV);
|
||||
analysisManager->CreateH1("Egap","Edep in gap", 100, 0., 100*MeV);
|
||||
analysisManager->CreateH1("Labs","trackL in absorber", 100, 0., 1*m);
|
||||
analysisManager->CreateH1("Lgap","trackL in gap", 100, 0., 50*cm);
|
||||
|
||||
// Creating ntuple
|
||||
//
|
||||
@@ -90,7 +91,7 @@ void B4RunAction::BeginOfRunAction(const G4Run* /*run*/)
|
||||
//G4RunManager::GetRunManager()->SetRandomNumberStore(true);
|
||||
|
||||
// Get analysis manager
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
|
||||
// Open an output file
|
||||
//
|
||||
@@ -104,7 +105,7 @@ void B4RunAction::EndOfRunAction(const G4Run* /*run*/)
|
||||
{
|
||||
// print histogram statistics
|
||||
//
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
if ( analysisManager->GetH1(1) ) {
|
||||
G4cout << G4endl << " ----> print histograms statistic ";
|
||||
if(isMaster) {
|
||||
@@ -115,31 +116,30 @@ void B4RunAction::EndOfRunAction(const G4Run* /*run*/)
|
||||
}
|
||||
|
||||
G4cout << " EAbs : mean = "
|
||||
<< G4BestUnit(analysisManager->GetH1(0)->mean(), "Energy")
|
||||
<< " rms = "
|
||||
<< G4BestUnit(analysisManager->GetH1(0)->rms(), "Energy") << G4endl;
|
||||
|
||||
G4cout << " EGap : 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(2)->mean(), "Length")
|
||||
<< " rms = "
|
||||
<< G4BestUnit(analysisManager->GetH1(2)->rms(), "Length") << G4endl;
|
||||
|
||||
G4cout << " LGap : 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......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4dDetectorConstruction.cc 87359 2014-12-01 16:04:27Z gcosmo $
|
||||
// $Id: B4dDetectorConstruction.cc 101905 2016-12-07 11:34:39Z gunter $
|
||||
//
|
||||
/// \file B4dDetectorConstruction.cc
|
||||
/// \brief Implementation of the B4dDetectorConstruction class
|
||||
@@ -88,7 +88,7 @@ G4VPhysicalVolume* B4dDetectorConstruction::Construct()
|
||||
void B4dDetectorConstruction::DefineMaterials()
|
||||
{
|
||||
// Lead material defined using NIST Manager
|
||||
G4NistManager* nistManager = G4NistManager::Instance();
|
||||
auto nistManager = G4NistManager::Instance();
|
||||
nistManager->FindOrBuildMaterial("G4_Pb");
|
||||
|
||||
// Liquid argon material
|
||||
@@ -111,20 +111,20 @@ void B4dDetectorConstruction::DefineMaterials()
|
||||
G4VPhysicalVolume* B4dDetectorConstruction::DefineVolumes()
|
||||
{
|
||||
// Geometry parameters
|
||||
G4int nofLayers = 10;
|
||||
G4double absoThickness = 10.*mm;
|
||||
G4double gapThickness = 5.*mm;
|
||||
G4double calorSizeXY = 10.*cm;
|
||||
G4int nofLayers = 10;
|
||||
G4double absoThickness = 10.*mm;
|
||||
G4double gapThickness = 5.*mm;
|
||||
G4double calorSizeXY = 10.*cm;
|
||||
|
||||
G4double layerThickness = absoThickness + gapThickness;
|
||||
G4double calorThickness = nofLayers * layerThickness;
|
||||
G4double worldSizeXY = 1.2 * calorSizeXY;
|
||||
G4double worldSizeZ = 1.2 * calorThickness;
|
||||
auto layerThickness = absoThickness + gapThickness;
|
||||
auto calorThickness = nofLayers * layerThickness;
|
||||
auto worldSizeXY = 1.2 * calorSizeXY;
|
||||
auto worldSizeZ = 1.2 * calorThickness;
|
||||
|
||||
// Get materials
|
||||
G4Material* defaultMaterial = G4Material::GetMaterial("Galactic");
|
||||
G4Material* absorberMaterial = G4Material::GetMaterial("G4_Pb");
|
||||
G4Material* gapMaterial = G4Material::GetMaterial("liquidArgon");
|
||||
auto defaultMaterial = G4Material::GetMaterial("Galactic");
|
||||
auto absorberMaterial = G4Material::GetMaterial("G4_Pb");
|
||||
auto gapMaterial = G4Material::GetMaterial("liquidArgon");
|
||||
|
||||
if ( ! defaultMaterial || ! absorberMaterial || ! gapMaterial ) {
|
||||
G4ExceptionDescription msg;
|
||||
@@ -136,17 +136,17 @@ G4VPhysicalVolume* B4dDetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// World
|
||||
//
|
||||
G4VSolid* worldS
|
||||
auto worldS
|
||||
= new G4Box("World", // its name
|
||||
worldSizeXY/2, worldSizeXY/2, worldSizeZ/2); // its size
|
||||
|
||||
G4LogicalVolume* worldLV
|
||||
auto worldLV
|
||||
= new G4LogicalVolume(
|
||||
worldS, // its solid
|
||||
defaultMaterial, // its material
|
||||
"World"); // its name
|
||||
|
||||
G4VPhysicalVolume* worldPV
|
||||
auto worldPV
|
||||
= new G4PVPlacement(
|
||||
0, // no rotation
|
||||
G4ThreeVector(), // at (0,0,0)
|
||||
@@ -160,11 +160,11 @@ G4VPhysicalVolume* B4dDetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Calorimeter
|
||||
//
|
||||
G4VSolid* calorimeterS
|
||||
auto calorimeterS
|
||||
= new G4Box("Calorimeter", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, calorThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* calorLV
|
||||
auto calorLV
|
||||
= new G4LogicalVolume(
|
||||
calorimeterS, // its solid
|
||||
defaultMaterial, // its material
|
||||
@@ -183,11 +183,11 @@ G4VPhysicalVolume* B4dDetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Layer
|
||||
//
|
||||
G4VSolid* layerS
|
||||
auto layerS
|
||||
= new G4Box("Layer", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, layerThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* layerLV
|
||||
auto layerLV
|
||||
= new G4LogicalVolume(
|
||||
layerS, // its solid
|
||||
defaultMaterial, // its material
|
||||
@@ -204,11 +204,11 @@ G4VPhysicalVolume* B4dDetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Absorber
|
||||
//
|
||||
G4VSolid* absorberS
|
||||
auto absorberS
|
||||
= new G4Box("Abso", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, absoThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* absorberLV
|
||||
auto absorberLV
|
||||
= new G4LogicalVolume(
|
||||
absorberS, // its solid
|
||||
absorberMaterial, // its material
|
||||
@@ -227,11 +227,11 @@ G4VPhysicalVolume* B4dDetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Gap
|
||||
//
|
||||
G4VSolid* gapS
|
||||
auto gapS
|
||||
= new G4Box("Gap", // its name
|
||||
calorSizeXY/2, calorSizeXY/2, gapThickness/2); // its size
|
||||
|
||||
G4LogicalVolume* gapLV
|
||||
auto gapLV
|
||||
= new G4LogicalVolume(
|
||||
gapS, // its solid
|
||||
gapMaterial, // its material
|
||||
@@ -262,9 +262,9 @@ G4VPhysicalVolume* B4dDetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// Visualization attributes
|
||||
//
|
||||
worldLV->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
worldLV->SetVisAttributes (G4VisAttributes::GetInvisible());
|
||||
|
||||
G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
auto simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
simpleBoxVisAtt->SetVisibility(true);
|
||||
calorLV->SetVisAttributes(simpleBoxVisAtt);
|
||||
|
||||
@@ -285,15 +285,15 @@ void B4dDetectorConstruction::ConstructSDandField()
|
||||
|
||||
// declare Absorber as a MultiFunctionalDetector scorer
|
||||
//
|
||||
G4MultiFunctionalDetector* absDetector
|
||||
= new G4MultiFunctionalDetector("Absorber");
|
||||
auto absDetector = new G4MultiFunctionalDetector("Absorber");
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(absDetector);
|
||||
|
||||
G4VPrimitiveScorer* primitive;
|
||||
primitive = new G4PSEnergyDeposit("Edep");
|
||||
absDetector->RegisterPrimitive(primitive);
|
||||
|
||||
primitive = new G4PSTrackLength("TrackLength");
|
||||
G4SDChargedFilter* charged = new G4SDChargedFilter("chargedFilter");
|
||||
auto charged = new G4SDChargedFilter("chargedFilter");
|
||||
primitive ->SetFilter(charged);
|
||||
absDetector->RegisterPrimitive(primitive);
|
||||
|
||||
@@ -301,8 +301,8 @@ void B4dDetectorConstruction::ConstructSDandField()
|
||||
|
||||
// declare Gap as a MultiFunctionalDetector scorer
|
||||
//
|
||||
G4MultiFunctionalDetector* gapDetector
|
||||
= new G4MultiFunctionalDetector("Gap");
|
||||
auto gapDetector = new G4MultiFunctionalDetector("Gap");
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(gapDetector);
|
||||
|
||||
primitive = new G4PSEnergyDeposit("Edep");
|
||||
gapDetector->RegisterPrimitive(primitive);
|
||||
@@ -319,7 +319,7 @@ void B4dDetectorConstruction::ConstructSDandField()
|
||||
// Create global magnetic field messenger.
|
||||
// Uniform magnetic field is then created automatically if
|
||||
// the field value is not zero.
|
||||
G4ThreeVector fieldValue = G4ThreeVector();
|
||||
G4ThreeVector fieldValue;
|
||||
fMagFieldMessenger = new G4GlobalMagFieldMessenger(fieldValue);
|
||||
fMagFieldMessenger->SetVerboseLevel(1);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4dEventAction.cc 75604 2013-11-04 13:17:26Z gcosmo $
|
||||
// $Id: B4dEventAction.cc 100946 2016-11-03 11:28:08Z gcosmo $
|
||||
//
|
||||
/// \file B4dEventAction.cc
|
||||
/// \brief Implementation of the B4dEventAction class
|
||||
@@ -61,7 +61,7 @@ G4THitsMap<G4double>*
|
||||
B4dEventAction::GetHitsCollection(G4int hcID,
|
||||
const G4Event* event) const
|
||||
{
|
||||
G4THitsMap<G4double>* hitsCollection
|
||||
auto hitsCollection
|
||||
= static_cast<G4THitsMap<G4double>*>(
|
||||
event->GetHCofThisEvent()->GetHC(hcID));
|
||||
|
||||
@@ -79,10 +79,10 @@ B4dEventAction::GetHitsCollection(G4int hcID,
|
||||
|
||||
G4double B4dEventAction::GetSum(G4THitsMap<G4double>* hitsMap) const
|
||||
{
|
||||
G4double sumValue = 0;
|
||||
std::map<G4int, G4double*>::iterator it;
|
||||
for ( it = hitsMap->GetMap()->begin(); it != hitsMap->GetMap()->end(); it++) {
|
||||
sumValue += *(it->second);
|
||||
G4double sumValue = 0.;
|
||||
for ( auto it : *hitsMap->GetMap() ) {
|
||||
// hitsMap->GetMap() returns the map of std::map<G4int, G4double*>
|
||||
sumValue += *(it.second);
|
||||
}
|
||||
return sumValue;
|
||||
}
|
||||
@@ -131,23 +131,23 @@ void B4dEventAction::EndOfEventAction(const G4Event* event)
|
||||
|
||||
// Get sum values from hits collections
|
||||
//
|
||||
G4double absoEdep = GetSum(GetHitsCollection(fAbsoEdepHCID, event));
|
||||
G4double gapEdep = GetSum(GetHitsCollection(fGapEdepHCID, event));
|
||||
auto absoEdep = GetSum(GetHitsCollection(fAbsoEdepHCID, event));
|
||||
auto gapEdep = GetSum(GetHitsCollection(fGapEdepHCID, event));
|
||||
|
||||
G4double absoTrackLength
|
||||
auto absoTrackLength
|
||||
= GetSum(GetHitsCollection(fAbsoTrackLengthHCID, event));
|
||||
G4double gapTrackLength
|
||||
auto gapTrackLength
|
||||
= GetSum(GetHitsCollection(fGapTrackLengthHCID, event));
|
||||
|
||||
// get analysis manager
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
|
||||
// fill histograms
|
||||
//
|
||||
analysisManager->FillH1(1, absoEdep);
|
||||
analysisManager->FillH1(2, gapEdep);
|
||||
analysisManager->FillH1(3, absoTrackLength);
|
||||
analysisManager->FillH1(4, gapTrackLength);
|
||||
analysisManager->FillH1(0, absoEdep);
|
||||
analysisManager->FillH1(1, gapEdep);
|
||||
analysisManager->FillH1(2, absoTrackLength);
|
||||
analysisManager->FillH1(3, gapTrackLength);
|
||||
|
||||
// fill ntuple
|
||||
//
|
||||
@@ -159,8 +159,8 @@ void B4dEventAction::EndOfEventAction(const G4Event* event)
|
||||
|
||||
//print per event (modulo n)
|
||||
//
|
||||
G4int eventID = event->GetEventID();
|
||||
G4int printModulo = G4RunManager::GetRunManager()->GetPrintProgress();
|
||||
auto eventID = event->GetEventID();
|
||||
auto printModulo = G4RunManager::GetRunManager()->GetPrintProgress();
|
||||
if ( ( printModulo > 0 ) && ( eventID % printModulo == 0 ) ) {
|
||||
G4cout << "---> End of event: " << eventID << G4endl;
|
||||
PrintEventStatistics(absoEdep, absoTrackLength, gapEdep, gapTrackLength);
|
||||
|
||||
@@ -15,6 +15,20 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
19/11/16 A. Dotti (exampleB4-V10-02-04)
|
||||
- explicit set of SDs to manager
|
||||
|
||||
03/11/16 I. Hrivnacova (exampleB4-V10-02-03)
|
||||
- Added C++11 features
|
||||
- Removed analysisManager->SetFirstHistoId(1); setting
|
||||
and added meaningful names to histograms
|
||||
|
||||
02/11/16 L.Garnier (exampleB4-V10-02-02)
|
||||
- Remove icons.mac. Automatically include since interfaces-V10-02-07
|
||||
|
||||
10/10/16 I. Hrivnacova (exampleB4-V10-02-01)
|
||||
- Activate merging of ntuples
|
||||
|
||||
09/12/15 I. Hrivnacova (exampleB4-V10-02-00)
|
||||
- Restored the third parameter in G4UIsession construction, which was
|
||||
lost when moving G4UIExecutive at the beginning of main().
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
# the menu bar of the G4UIXm, G4UIQt, G4UIWin32 sessions.
|
||||
# It has no effect with G4UIterminal.
|
||||
#
|
||||
# Add icons of general interest
|
||||
#
|
||||
/control/execute icons.mac
|
||||
#
|
||||
# File menu :
|
||||
/gui/addMenu file File
|
||||
/gui/addButton file Quit exit
|
||||
@@ -46,5 +42,3 @@
|
||||
# To limit the output flow in the "dump" widget :
|
||||
/run/printProgress 100
|
||||
#
|
||||
# User defined icon :
|
||||
/gui/addIcon "Run beam on" user_icon "/run/beamOn 1" run.png
|
||||
|
||||
@@ -209,17 +209,18 @@
|
||||
The histograms and ntuple are saved in the output file in a format
|
||||
according to a technology selected in B5Analysis.hh.
|
||||
|
||||
When running in multi-threading mode, the histograms accumulated on threads are
|
||||
automatically merged in a single output file, while the ntuple is written
|
||||
in files per thread.
|
||||
When running in multi-threading mode, the histograms and ntuple accumulated
|
||||
on threads are automatically merged in a single output file.
|
||||
|
||||
\section B5_s8 BUILD OPTIONS
|
||||
|
||||
This example can be built with excluding use of visualization and/or
|
||||
Geant4 user interface using G4VIS_USE and G4UI_USE compiler options.
|
||||
These options are defined with Geant4 configuration, they are not set
|
||||
when Geant4 libraries were built with G4VIS_NONE or G4UI_NONE option
|
||||
respectively.
|
||||
Geant4 user interface using G4VIS_USE and G4UI_USE compiler options
|
||||
(see exampleB5.cc).
|
||||
These options are defined by default with Geant4 configuration;
|
||||
they can be switched off at compilation time via the CMake options
|
||||
G4VIS_NONE or G4UI_NONE or via the environment variables of the
|
||||
same name if using GNUmake build.
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 96048 2016-03-10 15:34:12Z gcosmo $
|
||||
$Id: History 101159 2016-11-08 08:29:10Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -15,6 +15,23 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
07 November 2016 Laurent Garnier (exampleB5-V10-02-04)
|
||||
- Fix a missing /gui/defaultIcons false
|
||||
|
||||
03 November 2016 Ivana Hrivnacova (exampleB5-V10-02-03)
|
||||
- Added C++11 features
|
||||
- Code improvements
|
||||
|
||||
10 October 2016 Ivana Hrivnacova (exampleB5-V10-02-02)
|
||||
- Activate merging of ntuples
|
||||
|
||||
08 October 2016 Ivana Hrivnacova (exampleB5-V10-02-01)
|
||||
- Fix in gui.mac by Helmut Burkhard:
|
||||
Replace undefined /globalField/setValue by /B5/field/value
|
||||
- Updated B5ActionInitialization (Ivana)
|
||||
Event action is instantiated also on master - needed for ntuple merging
|
||||
(as its deta define the vectors refernced from ntuple)
|
||||
|
||||
10 March 2016 Alberto Ribon (exampleB5-V10-02-00)
|
||||
- Fixed wrong determination of the copy number in replicas
|
||||
(thanks to Anna Zaborowska for reporting the problem).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: README 94486 2015-11-19 08:33:37Z gcosmo $
|
||||
$Id: README 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
@@ -206,9 +206,8 @@ $Id: README 94486 2015-11-19 08:33:37Z gcosmo $
|
||||
The histograms and ntuple are saved in the output file in a format
|
||||
according to a technology selected in B5Analysis.hh.
|
||||
|
||||
When running in multi-threading mode, the histograms accumulated on threads are
|
||||
automatically merged in a single output file, while the ntuple is written
|
||||
in files per thread.
|
||||
When running in multi-threading mode, the histograms and ntuple accumulated
|
||||
on threads are automatically merged in a single output file.
|
||||
|
||||
8- BUILD OPTIONS:
|
||||
|
||||
@@ -216,7 +215,7 @@ $Id: README 94486 2015-11-19 08:33:37Z gcosmo $
|
||||
Geant4 user interface via G4VIS_USE and G4UI_USE compiler options
|
||||
(see exampleB5.cc).
|
||||
These options are defined by default with Geant4 configuration;
|
||||
they can switched off at compilation time via the CMake options
|
||||
they can be switched off at compilation time via the CMake options
|
||||
G4VIS_NONE or G4UI_NONE or via the environment variables of the
|
||||
same name if using GNUmake build.
|
||||
|
||||
|
||||
@@ -65,15 +65,15 @@ int main(int argc,char** argv)
|
||||
// Construct the default run manager
|
||||
//
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MTRunManager* runManager = new G4MTRunManager;
|
||||
auto runManager = new G4MTRunManager;
|
||||
#else
|
||||
G4RunManager* runManager = new G4RunManager;
|
||||
auto runManager = new G4RunManager;
|
||||
#endif
|
||||
|
||||
// Mandatory user initialization classes
|
||||
runManager->SetUserInitialization(new B5DetectorConstruction);
|
||||
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
auto physicsList = new FTFP_BERT;
|
||||
physicsList->RegisterPhysics(new G4StepLimiterPhysics());
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
@@ -82,14 +82,14 @@ int main(int argc,char** argv)
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
// Visualization manager construction
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
auto visManager = new G4VisExecutive;
|
||||
// G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
|
||||
// G4VisManager* visManager = new G4VisExecutive("Quiet");
|
||||
visManager->Initialize();
|
||||
#endif
|
||||
|
||||
// Get the pointer to the User Interface manager
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
auto UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
if ( argc != 1 ) {
|
||||
// execute an argument macro file if exist
|
||||
|
||||
+342
-303
File diff suppressed because it is too large
Load Diff
@@ -33,9 +33,9 @@
|
||||
#
|
||||
# Field menu :
|
||||
/gui/addMenu field Field
|
||||
/gui/addButton field "off" "/globalField/setValue 0 0 0 tesla"
|
||||
/gui/addButton field "0.2 tesla" "/globalField/setValue 0.2 0 0 tesla"
|
||||
/gui/addButton field "2.0 tesla" "/globalField/setValue 2.0 0 0 tesla"
|
||||
/gui/addButton field "off" "/B5/field/value 0 tesla"
|
||||
/gui/addButton field "0.2 tesla" "/B5/field/value 0.2 tesla"
|
||||
/gui/addButton field "2.0 tesla" "/B5/field/value 2.0 tesla"
|
||||
#
|
||||
# Viewer menu :
|
||||
/gui/addMenu viewer Viewer
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
# the icon menu bar of the G4UIQt sessions not yet implemented other UI drivers (geant4-09-05-ref-09)
|
||||
# It has no effect with G4UIterminal.
|
||||
|
||||
# disable default icons
|
||||
/gui/defaultIcons false
|
||||
|
||||
# open/save icons
|
||||
/gui/addIcon "Open macro file" open /control/execute
|
||||
/gui/addIcon "Save viewer state" save /vis/viewer/save
|
||||
|
||||
@@ -33,5 +33,6 @@
|
||||
|
||||
#include "g4root.hh"
|
||||
//#include "g4xml.hh"
|
||||
//#include "g4csv.hh"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5CellParameterisation.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5CellParameterisation.hh 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5CellParameterisation.hh
|
||||
/// \brief Definition of the B5CellParameterisation class
|
||||
@@ -31,24 +31,29 @@
|
||||
#ifndef B5CellParameterisation_H
|
||||
#define B5CellParameterisation_H 1
|
||||
|
||||
#include "B5Constants.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
|
||||
#include <array>
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
|
||||
/// EM Calorimeter cell parameterisation
|
||||
|
||||
class B5CellParameterisation : public G4VPVParameterisation
|
||||
{
|
||||
public:
|
||||
public:
|
||||
B5CellParameterisation();
|
||||
virtual ~B5CellParameterisation();
|
||||
|
||||
virtual void ComputeTransformation(
|
||||
const G4int copyNo,G4VPhysicalVolume *physVol) const;
|
||||
|
||||
private:
|
||||
G4double fXCell[80];
|
||||
G4double fYCell[80];
|
||||
private:
|
||||
std::array<G4double, kNofEmCells> fXCell;
|
||||
std::array<G4double, kNofEmCells> fYCell;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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$
|
||||
//
|
||||
/// \file B5Constants.hh
|
||||
/// \brief Definition of constants.
|
||||
|
||||
#ifndef B5Constants_h
|
||||
#define B5Constants_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
constexpr G4int kNofHodoscopes1 = 15;
|
||||
constexpr G4int kNofHodoscopes2 = 25;
|
||||
constexpr G4int kNofChambers = 5;
|
||||
constexpr G4int kNofEmColumns = 20;
|
||||
constexpr G4int kNofEmRows = 4;
|
||||
constexpr G4int kNofEmCells = kNofEmColumns * kNofEmRows;
|
||||
constexpr G4int kNofHadColumns = 10;
|
||||
constexpr G4int kNofHadRows = 2;
|
||||
constexpr G4int kNofHadCells = kNofHadColumns * kNofHadRows;
|
||||
|
||||
#endif
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5DetectorConstruction.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5DetectorConstruction.hh 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5DetectorConstruction.hh
|
||||
/// \brief Definition of the B5DetectorConstruction class
|
||||
@@ -50,7 +50,7 @@ class G4GenericMessenger;
|
||||
|
||||
class B5DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
public:
|
||||
B5DetectorConstruction();
|
||||
virtual ~B5DetectorConstruction();
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
void ConstructMaterials();
|
||||
|
||||
private:
|
||||
private:
|
||||
void DefineCommands();
|
||||
|
||||
G4GenericMessenger* fMessenger;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5DriftChamberHit.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5DriftChamberHit.hh 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5DriftChamberHit.hh
|
||||
/// \brief Definition of the B5DriftChamberHit class
|
||||
@@ -51,9 +51,9 @@ class G4AttValue;
|
||||
|
||||
class B5DriftChamberHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
public:
|
||||
B5DriftChamberHit();
|
||||
B5DriftChamberHit(G4int z);
|
||||
B5DriftChamberHit(G4int layerID);
|
||||
B5DriftChamberHit(const B5DriftChamberHit &right);
|
||||
virtual ~B5DriftChamberHit();
|
||||
|
||||
@@ -80,27 +80,28 @@ public:
|
||||
void SetWorldPos(G4ThreeVector xyz) { fWorldPos = xyz; }
|
||||
G4ThreeVector GetWorldPos() const { return fWorldPos; }
|
||||
|
||||
private:
|
||||
private:
|
||||
G4int fLayerID;
|
||||
G4double fTime;
|
||||
G4ThreeVector fLocalPos;
|
||||
G4ThreeVector fWorldPos;
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<B5DriftChamberHit> B5DriftChamberHitsCollection;
|
||||
using B5DriftChamberHitsCollection = G4THitsCollection<B5DriftChamberHit>;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<B5DriftChamberHit>* B5DriftChamberHitAllocator;
|
||||
|
||||
inline void* B5DriftChamberHit::operator new(size_t)
|
||||
{
|
||||
if (!B5DriftChamberHitAllocator)
|
||||
B5DriftChamberHitAllocator = new G4Allocator<B5DriftChamberHit>;
|
||||
return (void*)B5DriftChamberHitAllocator->MallocSingle();
|
||||
if (!B5DriftChamberHitAllocator) {
|
||||
B5DriftChamberHitAllocator = new G4Allocator<B5DriftChamberHit>;
|
||||
}
|
||||
return (void*)B5DriftChamberHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void B5DriftChamberHit::operator delete(void* aHit)
|
||||
{
|
||||
B5DriftChamberHitAllocator->FreeSingle((B5DriftChamberHit*) aHit);
|
||||
B5DriftChamberHitAllocator->FreeSingle((B5DriftChamberHit*) aHit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5DriftChamberSD.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5DriftChamberSD.hh 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5DriftChamberSD.hh
|
||||
/// \brief Definition of the B5DriftChamberSD class
|
||||
@@ -43,14 +43,14 @@ class G4TouchableHistory;
|
||||
|
||||
class B5DriftChamberSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
public:
|
||||
B5DriftChamberSD(G4String name);
|
||||
virtual ~B5DriftChamberSD();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*HCE);
|
||||
virtual G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist);
|
||||
|
||||
private:
|
||||
private:
|
||||
B5DriftChamberHitsCollection* fHitsCollection;
|
||||
G4int fHCID;
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5EmCalorimeterHit.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5EmCalorimeterHit.hh 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5EmCalorimeterHit.hh
|
||||
/// \brief Definition of the B5EmCalorimeterHit class
|
||||
@@ -51,9 +51,9 @@ class G4AttValue;
|
||||
|
||||
class B5EmCalorimeterHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
public:
|
||||
B5EmCalorimeterHit();
|
||||
B5EmCalorimeterHit(G4int z);
|
||||
B5EmCalorimeterHit(G4int cellID);
|
||||
B5EmCalorimeterHit(const B5EmCalorimeterHit &right);
|
||||
virtual ~B5EmCalorimeterHit();
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
void SetLogV(G4LogicalVolume* val) { fPLogV = val; }
|
||||
const G4LogicalVolume* GetLogV() const { return fPLogV; }
|
||||
|
||||
private:
|
||||
private:
|
||||
G4int fCellID;
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
@@ -92,20 +92,21 @@ private:
|
||||
const G4LogicalVolume* fPLogV;
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<B5EmCalorimeterHit> B5EmCalorimeterHitsCollection;
|
||||
using B5EmCalorimeterHitsCollection = G4THitsCollection<B5EmCalorimeterHit>;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<B5EmCalorimeterHit>* B5EmCalorimeterHitAllocator;
|
||||
|
||||
inline void* B5EmCalorimeterHit::operator new(size_t)
|
||||
{
|
||||
if (!B5EmCalorimeterHitAllocator)
|
||||
B5EmCalorimeterHitAllocator = new G4Allocator<B5EmCalorimeterHit>;
|
||||
return (void*)B5EmCalorimeterHitAllocator->MallocSingle();
|
||||
if (!B5EmCalorimeterHitAllocator) {
|
||||
B5EmCalorimeterHitAllocator = new G4Allocator<B5EmCalorimeterHit>;
|
||||
}
|
||||
return (void*)B5EmCalorimeterHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void B5EmCalorimeterHit::operator delete(void* aHit)
|
||||
{
|
||||
B5EmCalorimeterHitAllocator->FreeSingle((B5EmCalorimeterHit*) aHit);
|
||||
B5EmCalorimeterHitAllocator->FreeSingle((B5EmCalorimeterHit*) aHit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5EmCalorimeterSD.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5EmCalorimeterSD.hh 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5EmCalorimeterSD.hh
|
||||
/// \brief Definition of the B5EmCalorimeterSD class
|
||||
@@ -42,16 +42,15 @@ class G4TouchableHistory;
|
||||
/// EM calorimeter sensitive detector
|
||||
|
||||
class B5EmCalorimeterSD : public G4VSensitiveDetector
|
||||
{
|
||||
|
||||
public:
|
||||
{
|
||||
public:
|
||||
B5EmCalorimeterSD(G4String name);
|
||||
virtual ~B5EmCalorimeterSD();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*HCE);
|
||||
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
|
||||
private:
|
||||
private:
|
||||
B5EmCalorimeterHitsCollection* fHitsCollection;
|
||||
G4int fHCID;
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5EventAction.hh 94486 2015-11-19 08:33:37Z gcosmo $
|
||||
// $Id: B5EventAction.hh 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5EventAction.hh
|
||||
/// \brief Definition of the B5EventAction class
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
std::vector<G4double>& GetHadCalEdep() { return fEmCalEdep; }
|
||||
|
||||
private:
|
||||
G4int fHHC1ID;
|
||||
G4int fHHC2ID;
|
||||
G4int fDHC1ID;
|
||||
G4int fDHC2ID;
|
||||
G4int fECHCID;
|
||||
G4int fHCHCID;
|
||||
G4int fHodHC1ID;
|
||||
G4int fHodHC2ID;
|
||||
G4int fDriftHC1ID;
|
||||
G4int fDriftHC2ID;
|
||||
G4int fEmCalHCID;
|
||||
G4int fHadCalHCID;
|
||||
std::vector<G4double> fEmCalEdep;
|
||||
std::vector<G4double> fHadCalEdep;
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5HadCalorimeterHit.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5HadCalorimeterHit.hh 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5HadCalorimeterHit.hh
|
||||
/// \brief Definition of the B5HadCalorimeterHit class
|
||||
@@ -51,7 +51,7 @@ class G4AttValue;
|
||||
|
||||
class B5HadCalorimeterHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
public:
|
||||
B5HadCalorimeterHit();
|
||||
B5HadCalorimeterHit(G4int iCol,G4int iRow);
|
||||
B5HadCalorimeterHit(const B5HadCalorimeterHit &right);
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
void SetRot(G4RotationMatrix rmat) { fRot = rmat; }
|
||||
G4RotationMatrix GetRot() const { return fRot; }
|
||||
|
||||
private:
|
||||
private:
|
||||
G4int fColumnID;
|
||||
G4int fRowID;
|
||||
G4double fEdep;
|
||||
@@ -92,20 +92,21 @@ private:
|
||||
G4RotationMatrix fRot;
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<B5HadCalorimeterHit> B5HadCalorimeterHitsCollection;
|
||||
using B5HadCalorimeterHitsCollection = G4THitsCollection<B5HadCalorimeterHit>;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<B5HadCalorimeterHit>* B5HadCalorimeterHitAllocator;
|
||||
|
||||
inline void* B5HadCalorimeterHit::operator new(size_t)
|
||||
{
|
||||
if (!B5HadCalorimeterHitAllocator)
|
||||
B5HadCalorimeterHitAllocator = new G4Allocator<B5HadCalorimeterHit>;
|
||||
return (void*)B5HadCalorimeterHitAllocator->MallocSingle();
|
||||
if (!B5HadCalorimeterHitAllocator) {
|
||||
B5HadCalorimeterHitAllocator = new G4Allocator<B5HadCalorimeterHit>;
|
||||
}
|
||||
return (void*)B5HadCalorimeterHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void B5HadCalorimeterHit::operator delete(void* aHit)
|
||||
{
|
||||
B5HadCalorimeterHitAllocator->FreeSingle((B5HadCalorimeterHit*) aHit);
|
||||
B5HadCalorimeterHitAllocator->FreeSingle((B5HadCalorimeterHit*) aHit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5HadCalorimeterSD.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5HadCalorimeterSD.hh 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5HadCalorimeterSD.hh
|
||||
/// \brief Definition of the B5HadCalorimeterSD class
|
||||
@@ -43,14 +43,14 @@ class G4TouchableHistory;
|
||||
|
||||
class B5HadCalorimeterSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
public:
|
||||
B5HadCalorimeterSD(G4String name);
|
||||
virtual ~B5HadCalorimeterSD();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*HCE);
|
||||
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
|
||||
private:
|
||||
private:
|
||||
B5HadCalorimeterHitsCollection* fHitsCollection;
|
||||
G4int fHCID;
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5HodoscopeHit.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5HodoscopeHit.hh 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5HodoscopeHit.hh
|
||||
/// \brief Definition of the B5HodoscopeHit class
|
||||
@@ -51,7 +51,7 @@ class G4AttValue;
|
||||
|
||||
class B5HodoscopeHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
public:
|
||||
B5HodoscopeHit(G4int i,G4double t);
|
||||
B5HodoscopeHit(const B5HodoscopeHit &right);
|
||||
virtual ~B5HodoscopeHit();
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
void SetLogV(G4LogicalVolume* val) { fPLogV = val; }
|
||||
const G4LogicalVolume* GetLogV() const { return fPLogV; }
|
||||
|
||||
private:
|
||||
private:
|
||||
G4int fId;
|
||||
G4double fTime;
|
||||
G4ThreeVector fPos;
|
||||
@@ -89,20 +89,21 @@ private:
|
||||
const G4LogicalVolume* fPLogV;
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<B5HodoscopeHit> B5HodoscopeHitsCollection;
|
||||
using B5HodoscopeHitsCollection = G4THitsCollection<B5HodoscopeHit>;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<B5HodoscopeHit>* B5HodoscopeHitAllocator;
|
||||
|
||||
inline void* B5HodoscopeHit::operator new(size_t)
|
||||
{
|
||||
if (!B5HodoscopeHitAllocator)
|
||||
B5HodoscopeHitAllocator = new G4Allocator<B5HodoscopeHit>;
|
||||
return (void*)B5HodoscopeHitAllocator->MallocSingle();
|
||||
if (!B5HodoscopeHitAllocator) {
|
||||
B5HodoscopeHitAllocator = new G4Allocator<B5HodoscopeHit>;
|
||||
}
|
||||
return (void*)B5HodoscopeHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void B5HodoscopeHit::operator delete(void*aHit)
|
||||
{
|
||||
B5HodoscopeHitAllocator->FreeSingle((B5HodoscopeHit*) aHit);
|
||||
B5HodoscopeHitAllocator->FreeSingle((B5HodoscopeHit*) aHit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5HodoscopeSD.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5HodoscopeSD.hh 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5HodoscopeSD.hh
|
||||
/// \brief Definition of the B5HodoscopeSD class
|
||||
@@ -42,14 +42,14 @@ class G4TouchableHistory;
|
||||
|
||||
class B5HodoscopeSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
public:
|
||||
B5HodoscopeSD(G4String name);
|
||||
virtual ~B5HodoscopeSD();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*HCE);
|
||||
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
|
||||
private:
|
||||
private:
|
||||
B5HodoscopeHitsCollection* fHitsCollection;
|
||||
G4int fHCID;
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5MagneticField.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5MagneticField.hh 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5MagneticField.hh
|
||||
/// \brief Definition of the B5MagneticField class
|
||||
@@ -40,7 +40,7 @@ class G4GenericMessenger;
|
||||
|
||||
class B5MagneticField : public G4MagneticField
|
||||
{
|
||||
public:
|
||||
public:
|
||||
B5MagneticField();
|
||||
virtual ~B5MagneticField();
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
void SetField(G4double val) { fBy = val; }
|
||||
G4double GetField() const { return fBy; }
|
||||
|
||||
private:
|
||||
private:
|
||||
void DefineCommands();
|
||||
|
||||
G4GenericMessenger* fMessenger;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5PrimaryGeneratorAction.hh 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5PrimaryGeneratorAction.hh 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5PrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the B5PrimaryGeneratorAction class
|
||||
@@ -50,7 +50,7 @@ class G4ParticleDefinition;
|
||||
|
||||
class B5PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
public:
|
||||
B5PrimaryGeneratorAction();
|
||||
virtual ~B5PrimaryGeneratorAction();
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
void SetRandomize(G4bool val) { fRandomizePrimary = val; }
|
||||
G4bool GetRandomize() const { return fRandomizePrimary; }
|
||||
|
||||
private:
|
||||
private:
|
||||
void DefineCommands();
|
||||
|
||||
G4ParticleGun* fParticleGun;
|
||||
|
||||
@@ -48,7 +48,7 @@ B5ActionInitialization::~B5ActionInitialization()
|
||||
|
||||
void B5ActionInitialization::BuildForMaster() const
|
||||
{
|
||||
B5EventAction* eventAction = 0;
|
||||
B5EventAction* eventAction = new B5EventAction;
|
||||
SetUserAction(new B5RunAction(eventAction));
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ void B5ActionInitialization::Build() const
|
||||
{
|
||||
SetUserAction(new B5PrimaryGeneratorAction);
|
||||
|
||||
B5EventAction* eventAction = new B5EventAction;
|
||||
auto eventAction = new B5EventAction;
|
||||
SetUserAction(eventAction);
|
||||
|
||||
SetUserAction(new B5RunAction(eventAction));
|
||||
|
||||
@@ -23,12 +23,13 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5CellParameterisation.cc 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5CellParameterisation.cc 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5CellParameterisation.cc
|
||||
/// \brief Implementation of the B5CellParameterisation class
|
||||
|
||||
#include "B5CellParameterisation.hh"
|
||||
#include "B5Constants.hh"
|
||||
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
@@ -39,13 +40,12 @@
|
||||
B5CellParameterisation::B5CellParameterisation()
|
||||
: G4VPVParameterisation()
|
||||
{
|
||||
for (G4int copyNo=0;copyNo<80;copyNo++)
|
||||
{
|
||||
G4int column = copyNo / 4;
|
||||
G4int row = copyNo % 4;
|
||||
fXCell[copyNo] = (column-9)*15.*cm - 7.5*cm;
|
||||
fYCell[copyNo] = (row-1)*15*cm - 7.5*cm;
|
||||
}
|
||||
for (auto copyNo=0; copyNo<kNofEmCells; copyNo++) {
|
||||
auto column = copyNo / kNofEmRows ;
|
||||
auto row = copyNo % kNofEmRows;
|
||||
fXCell[copyNo] = (column-9)*15.*cm - 7.5*cm;
|
||||
fYCell[copyNo] = (row-1)*15*cm - 7.5*cm;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -55,10 +55,10 @@ B5CellParameterisation::~B5CellParameterisation()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B5CellParameterisation::ComputeTransformation
|
||||
(const G4int copyNo,G4VPhysicalVolume *physVol) const
|
||||
void B5CellParameterisation::ComputeTransformation(
|
||||
const G4int copyNo,G4VPhysicalVolume *physVol) const
|
||||
{
|
||||
physVol->SetTranslation(G4ThreeVector(fXCell[copyNo],fYCell[copyNo],0.));
|
||||
physVol->SetTranslation(G4ThreeVector(fXCell[copyNo],fYCell[copyNo],0.));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5DetectorConstruction.cc 77656 2013-11-27 08:52:57Z gcosmo $
|
||||
// $Id: B5DetectorConstruction.cc 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5DetectorConstruction.cc
|
||||
/// \brief Implementation of the B5DetectorConstruction class
|
||||
@@ -76,422 +76,413 @@ G4ThreadLocal G4FieldManager* B5DetectorConstruction::fFieldMgr = 0;
|
||||
|
||||
B5DetectorConstruction::B5DetectorConstruction()
|
||||
: G4VUserDetectorConstruction(),
|
||||
fMessenger(0),
|
||||
fHodoscope1Logical(0), fHodoscope2Logical(0),
|
||||
fWirePlane1Logical(0), fWirePlane2Logical(0),
|
||||
fCellLogical(0), fHadCalScintiLogical(0),
|
||||
fMagneticLogical(0),
|
||||
fMessenger(nullptr),
|
||||
fHodoscope1Logical(nullptr), fHodoscope2Logical(nullptr),
|
||||
fWirePlane1Logical(nullptr), fWirePlane2Logical(nullptr),
|
||||
fCellLogical(nullptr), fHadCalScintiLogical(nullptr),
|
||||
fMagneticLogical(nullptr),
|
||||
fVisAttributes(),
|
||||
fArmAngle(30.*deg), fArmRotation(0), fSecondArmPhys(0)
|
||||
fArmAngle(30.*deg), fArmRotation(nullptr), fSecondArmPhys(nullptr)
|
||||
|
||||
{
|
||||
fArmRotation = new G4RotationMatrix();
|
||||
fArmRotation->rotateY(fArmAngle);
|
||||
|
||||
// define commands for this class
|
||||
DefineCommands();
|
||||
fArmRotation = new G4RotationMatrix();
|
||||
fArmRotation->rotateY(fArmAngle);
|
||||
|
||||
// define commands for this class
|
||||
DefineCommands();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B5DetectorConstruction::~B5DetectorConstruction()
|
||||
{
|
||||
delete fArmRotation;
|
||||
delete fMessenger;
|
||||
|
||||
for (G4int i=0; i<G4int(fVisAttributes.size()); ++i)
|
||||
{
|
||||
delete fVisAttributes[i];
|
||||
}
|
||||
delete fArmRotation;
|
||||
delete fMessenger;
|
||||
|
||||
for (auto visAttributes: fVisAttributes) {
|
||||
delete visAttributes;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4VPhysicalVolume* B5DetectorConstruction::Construct()
|
||||
{
|
||||
// Construct materials
|
||||
ConstructMaterials();
|
||||
G4Material* air = G4Material::GetMaterial("G4_AIR");
|
||||
//G4Material* argonGas = G4Material::GetMaterial("B5_Ar");
|
||||
G4Material* argonGas = G4Material::GetMaterial("G4_Ar");
|
||||
G4Material* scintillator
|
||||
= G4Material::GetMaterial("G4_PLASTIC_SC_VINYLTOLUENE");
|
||||
G4Material* csI = G4Material::GetMaterial("G4_CESIUM_IODIDE");
|
||||
G4Material* lead = G4Material::GetMaterial("G4_Pb");
|
||||
|
||||
// Option to switch on/off checking of volumes overlaps
|
||||
//
|
||||
G4bool checkOverlaps = true;
|
||||
// Construct materials
|
||||
ConstructMaterials();
|
||||
auto air = G4Material::GetMaterial("G4_AIR");
|
||||
//auto argonGas = G4Material::GetMaterial("B5_Ar");
|
||||
auto argonGas = G4Material::GetMaterial("G4_Ar");
|
||||
auto scintillator = G4Material::GetMaterial("G4_PLASTIC_SC_VINYLTOLUENE");
|
||||
auto csI = G4Material::GetMaterial("G4_CESIUM_IODIDE");
|
||||
auto lead = G4Material::GetMaterial("G4_Pb");
|
||||
|
||||
// Option to switch on/off checking of volumes overlaps
|
||||
//
|
||||
G4bool checkOverlaps = true;
|
||||
|
||||
// geometries --------------------------------------------------------------
|
||||
// experimental hall (world volume)
|
||||
G4VSolid* worldSolid
|
||||
= new G4Box("worldBox",10.*m,3.*m,10.*m);
|
||||
G4LogicalVolume* worldLogical
|
||||
= new G4LogicalVolume(worldSolid,air,"worldLogical");
|
||||
G4VPhysicalVolume* worldPhysical
|
||||
= new G4PVPlacement(0,G4ThreeVector(),worldLogical,"worldPhysical",0,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// Tube with Local Magnetic field
|
||||
|
||||
G4VSolid* magneticSolid
|
||||
= new G4Tubs("magneticTubs",0.,1.*m,1.*m,0.,360.*deg);
|
||||
// geometries --------------------------------------------------------------
|
||||
// experimental hall (world volume)
|
||||
auto worldSolid
|
||||
= new G4Box("worldBox",10.*m,3.*m,10.*m);
|
||||
auto worldLogical
|
||||
= new G4LogicalVolume(worldSolid,air,"worldLogical");
|
||||
auto worldPhysical
|
||||
= new G4PVPlacement(0,G4ThreeVector(),worldLogical,"worldPhysical",0,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// Tube with Local Magnetic field
|
||||
|
||||
auto magneticSolid
|
||||
= new G4Tubs("magneticTubs",0.,1.*m,1.*m,0.,360.*deg);
|
||||
|
||||
fMagneticLogical
|
||||
= new G4LogicalVolume(magneticSolid, air, "magneticLogical");
|
||||
fMagneticLogical
|
||||
= new G4LogicalVolume(magneticSolid, air, "magneticLogical");
|
||||
|
||||
// placement of Tube
|
||||
|
||||
G4RotationMatrix* fieldRot = new G4RotationMatrix();
|
||||
fieldRot->rotateX(90.*deg);
|
||||
new G4PVPlacement(fieldRot,G4ThreeVector(),fMagneticLogical,
|
||||
"magneticPhysical",worldLogical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// set step limit in tube with magnetic field
|
||||
G4UserLimits* userLimits = new G4UserLimits(1*m);
|
||||
fMagneticLogical->SetUserLimits(userLimits);
|
||||
|
||||
// first arm
|
||||
G4VSolid* firstArmSolid
|
||||
= new G4Box("firstArmBox",1.5*m,1.*m,3.*m);
|
||||
G4LogicalVolume* firstArmLogical
|
||||
= new G4LogicalVolume(firstArmSolid,air,"firstArmLogical");
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,-5.*m),firstArmLogical,
|
||||
"firstArmPhysical",worldLogical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// second arm
|
||||
G4VSolid* secondArmSolid
|
||||
= new G4Box("secondArmBox",2.*m,2.*m,3.5*m);
|
||||
G4LogicalVolume* secondArmLogical
|
||||
= new G4LogicalVolume(secondArmSolid,air,"secondArmLogical");
|
||||
G4double x = -5.*m * std::sin(fArmAngle);
|
||||
G4double z = 5.*m * std::cos(fArmAngle);
|
||||
fSecondArmPhys
|
||||
= new G4PVPlacement(fArmRotation,G4ThreeVector(x,0.,z),secondArmLogical,
|
||||
"fSecondArmPhys",worldLogical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// hodoscopes in first arm
|
||||
G4VSolid* hodoscope1Solid
|
||||
= new G4Box("hodoscope1Box",5.*cm,20.*cm,0.5*cm);
|
||||
fHodoscope1Logical
|
||||
= new G4LogicalVolume(hodoscope1Solid,scintillator,"hodoscope1Logical");
|
||||
for (G4int i=0;i<15;i++)
|
||||
{
|
||||
G4double x1 = (i-7)*10.*cm;
|
||||
new G4PVPlacement(0,G4ThreeVector(x1,0.,-1.5*m),fHodoscope1Logical,
|
||||
"hodoscope1Physical",firstArmLogical,
|
||||
false,i,checkOverlaps);
|
||||
}
|
||||
|
||||
// drift chambers in first arm
|
||||
G4VSolid* chamber1Solid
|
||||
= new G4Box("chamber1Box",1.*m,30.*cm,1.*cm);
|
||||
G4LogicalVolume* chamber1Logical
|
||||
= new G4LogicalVolume(chamber1Solid,argonGas,"chamber1Logical");
|
||||
for (G4int i=0;i<5;i++)
|
||||
{
|
||||
G4double z1 = (i-2)*0.5*m;
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,z1),chamber1Logical,
|
||||
"chamber1Physical",firstArmLogical,
|
||||
false,i,checkOverlaps);
|
||||
}
|
||||
|
||||
// "virtual" wire plane
|
||||
G4VSolid* wirePlane1Solid
|
||||
= new G4Box("wirePlane1Box",1.*m,30.*cm,0.1*mm);
|
||||
fWirePlane1Logical
|
||||
= new G4LogicalVolume(wirePlane1Solid,argonGas,"wirePlane1Logical");
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),fWirePlane1Logical,
|
||||
"wirePlane1Physical",chamber1Logical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// hodoscopes in second arm
|
||||
G4VSolid* hodoscope2Solid
|
||||
= new G4Box("hodoscope2Box",5.*cm,20.*cm,0.5*cm);
|
||||
fHodoscope2Logical
|
||||
= new G4LogicalVolume(hodoscope2Solid,scintillator,"hodoscope2Logical");
|
||||
for (G4int i=0;i<25;i++)
|
||||
{
|
||||
G4double x2 = (i-12)*10.*cm;
|
||||
new G4PVPlacement(0,G4ThreeVector(x2,0.,0.),fHodoscope2Logical,
|
||||
"hodoscope2Physical",secondArmLogical,
|
||||
false,i,checkOverlaps);
|
||||
}
|
||||
|
||||
// drift chambers in second arm
|
||||
G4VSolid* chamber2Solid
|
||||
= new G4Box("chamber2Box",1.5*m,30.*cm,1.*cm);
|
||||
G4LogicalVolume* chamber2Logical
|
||||
= new G4LogicalVolume(chamber2Solid,argonGas,"chamber2Logical");
|
||||
for (G4int i=0;i<5;i++)
|
||||
{
|
||||
G4double z2 = (i-2)*0.5*m - 1.5*m;
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,z2),chamber2Logical,
|
||||
"chamber2Physical",secondArmLogical,
|
||||
false,i,checkOverlaps);
|
||||
}
|
||||
|
||||
// "virtual" wire plane
|
||||
G4VSolid* wirePlane2Solid
|
||||
= new G4Box("wirePlane2Box",1.5*m,30.*cm,0.1*mm);
|
||||
fWirePlane2Logical
|
||||
= new G4LogicalVolume(wirePlane2Solid,argonGas,"wirePlane2Logical");
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),fWirePlane2Logical,
|
||||
"wirePlane2Physical",chamber2Logical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// CsI calorimeter
|
||||
G4VSolid* emCalorimeterSolid
|
||||
= new G4Box("EMcalorimeterBox",1.5*m,30.*cm,15.*cm);
|
||||
G4LogicalVolume* emCalorimeterLogical
|
||||
= new G4LogicalVolume(emCalorimeterSolid,csI,"EMcalorimeterLogical");
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,2.*m),emCalorimeterLogical,
|
||||
"EMcalorimeterPhysical",secondArmLogical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// EMcalorimeter cells
|
||||
G4VSolid* cellSolid
|
||||
= new G4Box("cellBox",7.5*cm,7.5*cm,15.*cm);
|
||||
fCellLogical
|
||||
= new G4LogicalVolume(cellSolid,csI,"cellLogical");
|
||||
G4VPVParameterisation* cellParam = new B5CellParameterisation();
|
||||
new G4PVParameterised("cellPhysical",fCellLogical,emCalorimeterLogical,
|
||||
kXAxis,80,cellParam);
|
||||
|
||||
// hadron calorimeter
|
||||
G4VSolid* hadCalorimeterSolid
|
||||
= new G4Box("HadCalorimeterBox",1.5*m,30.*cm,50.*cm);
|
||||
G4LogicalVolume* hadCalorimeterLogical
|
||||
= new G4LogicalVolume(hadCalorimeterSolid,lead,"HadCalorimeterLogical");
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,3.*m),hadCalorimeterLogical,
|
||||
"HadCalorimeterPhysical",secondArmLogical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// hadron calorimeter column
|
||||
G4VSolid* HadCalColumnSolid
|
||||
= new G4Box("HadCalColumnBox",15.*cm,30.*cm,50.*cm);
|
||||
G4LogicalVolume* HadCalColumnLogical
|
||||
= new G4LogicalVolume(HadCalColumnSolid,lead,"HadCalColumnLogical");
|
||||
new G4PVReplica("HadCalColumnPhysical",HadCalColumnLogical,
|
||||
hadCalorimeterLogical,kXAxis,10,30.*cm);
|
||||
|
||||
// hadron calorimeter cell
|
||||
G4VSolid* HadCalCellSolid
|
||||
= new G4Box("HadCalCellBox",15.*cm,15.*cm,50.*cm);
|
||||
G4LogicalVolume* HadCalCellLogical
|
||||
= new G4LogicalVolume(HadCalCellSolid,lead,"HadCalCellLogical");
|
||||
new G4PVReplica("HadCalCellPhysical",HadCalCellLogical,
|
||||
HadCalColumnLogical,kYAxis,2,30.*cm);
|
||||
|
||||
// hadron calorimeter layers
|
||||
G4VSolid* HadCalLayerSolid
|
||||
= new G4Box("HadCalLayerBox",15.*cm,15.*cm,2.5*cm);
|
||||
G4LogicalVolume* HadCalLayerLogical
|
||||
= new G4LogicalVolume(HadCalLayerSolid,lead,"HadCalLayerLogical");
|
||||
new G4PVReplica("HadCalLayerPhysical",HadCalLayerLogical,
|
||||
HadCalCellLogical,kZAxis,20,5.*cm);
|
||||
|
||||
// scintillator plates
|
||||
G4VSolid* HadCalScintiSolid
|
||||
= new G4Box("HadCalScintiBox",15.*cm,15.*cm,0.5*cm);
|
||||
fHadCalScintiLogical
|
||||
= new G4LogicalVolume(HadCalScintiSolid,scintillator,
|
||||
"HadCalScintiLogical");
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,2.*cm),fHadCalScintiLogical,
|
||||
"HadCalScintiPhysical",HadCalLayerLogical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// visualization attributes ------------------------------------------------
|
||||
|
||||
G4VisAttributes* visAttributes = new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
visAttributes->SetVisibility(false);
|
||||
worldLogical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.9,0.9,0.9)); // LightGray
|
||||
fMagneticLogical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
visAttributes->SetVisibility(false);
|
||||
firstArmLogical->SetVisAttributes(visAttributes);
|
||||
secondArmLogical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.8888,0.0,0.0));
|
||||
fHodoscope1Logical->SetVisAttributes(visAttributes);
|
||||
fHodoscope2Logical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.0,1.0,0.0));
|
||||
chamber1Logical->SetVisAttributes(visAttributes);
|
||||
chamber2Logical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.0,0.8888,0.0));
|
||||
visAttributes->SetVisibility(false);
|
||||
fWirePlane1Logical->SetVisAttributes(visAttributes);
|
||||
fWirePlane2Logical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.8888,0.8888,0.0));
|
||||
visAttributes->SetVisibility(false);
|
||||
emCalorimeterLogical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.9,0.9,0.0));
|
||||
fCellLogical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.0, 0.0, 0.9));
|
||||
hadCalorimeterLogical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.0, 0.0, 0.9));
|
||||
visAttributes->SetVisibility(false);
|
||||
HadCalColumnLogical->SetVisAttributes(visAttributes);
|
||||
HadCalCellLogical->SetVisAttributes(visAttributes);
|
||||
HadCalLayerLogical->SetVisAttributes(visAttributes);
|
||||
fHadCalScintiLogical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
// return the world physical volume ----------------------------------------
|
||||
|
||||
return worldPhysical;
|
||||
// placement of Tube
|
||||
|
||||
G4RotationMatrix* fieldRot = new G4RotationMatrix();
|
||||
fieldRot->rotateX(90.*deg);
|
||||
new G4PVPlacement(fieldRot,G4ThreeVector(),fMagneticLogical,
|
||||
"magneticPhysical",worldLogical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// set step limit in tube with magnetic field
|
||||
G4UserLimits* userLimits = new G4UserLimits(1*m);
|
||||
fMagneticLogical->SetUserLimits(userLimits);
|
||||
|
||||
// first arm
|
||||
auto firstArmSolid
|
||||
= new G4Box("firstArmBox",1.5*m,1.*m,3.*m);
|
||||
auto firstArmLogical
|
||||
= new G4LogicalVolume(firstArmSolid,air,"firstArmLogical");
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,-5.*m),firstArmLogical,
|
||||
"firstArmPhysical",worldLogical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// second arm
|
||||
auto secondArmSolid
|
||||
= new G4Box("secondArmBox",2.*m,2.*m,3.5*m);
|
||||
auto secondArmLogical
|
||||
= new G4LogicalVolume(secondArmSolid,air,"secondArmLogical");
|
||||
auto x = -5.*m * std::sin(fArmAngle);
|
||||
auto z = 5.*m * std::cos(fArmAngle);
|
||||
fSecondArmPhys
|
||||
= new G4PVPlacement(fArmRotation,G4ThreeVector(x,0.,z),secondArmLogical,
|
||||
"fSecondArmPhys",worldLogical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// hodoscopes in first arm
|
||||
auto hodoscope1Solid
|
||||
= new G4Box("hodoscope1Box",5.*cm,20.*cm,0.5*cm);
|
||||
fHodoscope1Logical
|
||||
= new G4LogicalVolume(hodoscope1Solid,scintillator,"hodoscope1Logical");
|
||||
|
||||
for (auto i=0;i<kNofHodoscopes1;i++) {
|
||||
G4double x1 = (i-kNofHodoscopes1/2)*10.*cm;
|
||||
new G4PVPlacement(0,G4ThreeVector(x1,0.,-1.5*m),fHodoscope1Logical,
|
||||
"hodoscope1Physical",firstArmLogical,
|
||||
false,i,checkOverlaps);
|
||||
}
|
||||
|
||||
// drift chambers in first arm
|
||||
auto chamber1Solid
|
||||
= new G4Box("chamber1Box",1.*m,30.*cm,1.*cm);
|
||||
auto chamber1Logical
|
||||
= new G4LogicalVolume(chamber1Solid,argonGas,"chamber1Logical");
|
||||
|
||||
for (auto i=0;i<kNofChambers;i++) {
|
||||
G4double z1 = (i-kNofChambers/2)*0.5*m;
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,z1),chamber1Logical,
|
||||
"chamber1Physical",firstArmLogical,
|
||||
false,i,checkOverlaps);
|
||||
}
|
||||
|
||||
// "virtual" wire plane
|
||||
auto wirePlane1Solid
|
||||
= new G4Box("wirePlane1Box",1.*m,30.*cm,0.1*mm);
|
||||
fWirePlane1Logical
|
||||
= new G4LogicalVolume(wirePlane1Solid,argonGas,"wirePlane1Logical");
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),fWirePlane1Logical,
|
||||
"wirePlane1Physical",chamber1Logical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// hodoscopes in second arm
|
||||
auto hodoscope2Solid
|
||||
= new G4Box("hodoscope2Box",5.*cm,20.*cm,0.5*cm);
|
||||
fHodoscope2Logical
|
||||
= new G4LogicalVolume(hodoscope2Solid,scintillator,"hodoscope2Logical");
|
||||
|
||||
for (auto i=0;i<kNofHodoscopes2;i++) {
|
||||
G4double x2 = (i-kNofHodoscopes2/2)*10.*cm;
|
||||
new G4PVPlacement(0,G4ThreeVector(x2,0.,0.),fHodoscope2Logical,
|
||||
"hodoscope2Physical",secondArmLogical,
|
||||
false,i,checkOverlaps);
|
||||
}
|
||||
|
||||
// drift chambers in second arm
|
||||
auto chamber2Solid
|
||||
= new G4Box("chamber2Box",1.5*m,30.*cm,1.*cm);
|
||||
auto chamber2Logical
|
||||
= new G4LogicalVolume(chamber2Solid,argonGas,"chamber2Logical");
|
||||
|
||||
for (auto i=0;i<kNofChambers;i++) {
|
||||
G4double z2 = (i-kNofChambers/2)*0.5*m - 1.5*m;
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,z2),chamber2Logical,
|
||||
"chamber2Physical",secondArmLogical,
|
||||
false,i,checkOverlaps);
|
||||
}
|
||||
|
||||
// "virtual" wire plane
|
||||
auto wirePlane2Solid
|
||||
= new G4Box("wirePlane2Box",1.5*m,30.*cm,0.1*mm);
|
||||
fWirePlane2Logical
|
||||
= new G4LogicalVolume(wirePlane2Solid,argonGas,"wirePlane2Logical");
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),fWirePlane2Logical,
|
||||
"wirePlane2Physical",chamber2Logical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// CsI calorimeter
|
||||
auto emCalorimeterSolid
|
||||
= new G4Box("EMcalorimeterBox",1.5*m,30.*cm,15.*cm);
|
||||
auto emCalorimeterLogical
|
||||
= new G4LogicalVolume(emCalorimeterSolid,csI,"EMcalorimeterLogical");
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,2.*m),emCalorimeterLogical,
|
||||
"EMcalorimeterPhysical",secondArmLogical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// EMcalorimeter cells
|
||||
auto cellSolid
|
||||
= new G4Box("cellBox",7.5*cm,7.5*cm,15.*cm);
|
||||
fCellLogical
|
||||
= new G4LogicalVolume(cellSolid,csI,"cellLogical");
|
||||
G4VPVParameterisation* cellParam = new B5CellParameterisation();
|
||||
new G4PVParameterised("cellPhysical",fCellLogical,emCalorimeterLogical,
|
||||
kXAxis,kNofEmCells,cellParam);
|
||||
|
||||
// hadron calorimeter
|
||||
auto hadCalorimeterSolid
|
||||
= new G4Box("HadCalorimeterBox",1.5*m,30.*cm,50.*cm);
|
||||
auto hadCalorimeterLogical
|
||||
= new G4LogicalVolume(hadCalorimeterSolid,lead,"HadCalorimeterLogical");
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,3.*m),hadCalorimeterLogical,
|
||||
"HadCalorimeterPhysical",secondArmLogical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// hadron calorimeter column
|
||||
auto HadCalColumnSolid
|
||||
= new G4Box("HadCalColumnBox",15.*cm,30.*cm,50.*cm);
|
||||
auto HadCalColumnLogical
|
||||
= new G4LogicalVolume(HadCalColumnSolid,lead,"HadCalColumnLogical");
|
||||
new G4PVReplica("HadCalColumnPhysical",HadCalColumnLogical,
|
||||
hadCalorimeterLogical,kXAxis,kNofHadColumns,30.*cm);
|
||||
|
||||
// hadron calorimeter cell
|
||||
auto HadCalCellSolid
|
||||
= new G4Box("HadCalCellBox",15.*cm,15.*cm,50.*cm);
|
||||
auto HadCalCellLogical
|
||||
= new G4LogicalVolume(HadCalCellSolid,lead,"HadCalCellLogical");
|
||||
new G4PVReplica("HadCalCellPhysical",HadCalCellLogical,
|
||||
HadCalColumnLogical,kYAxis,kNofHadRows,30.*cm);
|
||||
|
||||
// hadron calorimeter layers
|
||||
auto HadCalLayerSolid
|
||||
= new G4Box("HadCalLayerBox",15.*cm,15.*cm,2.5*cm);
|
||||
auto HadCalLayerLogical
|
||||
= new G4LogicalVolume(HadCalLayerSolid,lead,"HadCalLayerLogical");
|
||||
new G4PVReplica("HadCalLayerPhysical",HadCalLayerLogical,
|
||||
HadCalCellLogical,kZAxis,kNofHadCells,5.*cm);
|
||||
|
||||
// scintillator plates
|
||||
auto HadCalScintiSolid
|
||||
= new G4Box("HadCalScintiBox",15.*cm,15.*cm,0.5*cm);
|
||||
fHadCalScintiLogical
|
||||
= new G4LogicalVolume(HadCalScintiSolid,scintillator,
|
||||
"HadCalScintiLogical");
|
||||
new G4PVPlacement(0,G4ThreeVector(0.,0.,2.*cm),fHadCalScintiLogical,
|
||||
"HadCalScintiPhysical",HadCalLayerLogical,
|
||||
false,0,checkOverlaps);
|
||||
|
||||
// visualization attributes ------------------------------------------------
|
||||
|
||||
auto visAttributes = new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
visAttributes->SetVisibility(false);
|
||||
worldLogical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.9,0.9,0.9)); // LightGray
|
||||
fMagneticLogical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
visAttributes->SetVisibility(false);
|
||||
firstArmLogical->SetVisAttributes(visAttributes);
|
||||
secondArmLogical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.8888,0.0,0.0));
|
||||
fHodoscope1Logical->SetVisAttributes(visAttributes);
|
||||
fHodoscope2Logical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.0,1.0,0.0));
|
||||
chamber1Logical->SetVisAttributes(visAttributes);
|
||||
chamber2Logical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.0,0.8888,0.0));
|
||||
visAttributes->SetVisibility(false);
|
||||
fWirePlane1Logical->SetVisAttributes(visAttributes);
|
||||
fWirePlane2Logical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.8888,0.8888,0.0));
|
||||
visAttributes->SetVisibility(false);
|
||||
emCalorimeterLogical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.9,0.9,0.0));
|
||||
fCellLogical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.0, 0.0, 0.9));
|
||||
hadCalorimeterLogical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.0, 0.0, 0.9));
|
||||
visAttributes->SetVisibility(false);
|
||||
HadCalColumnLogical->SetVisAttributes(visAttributes);
|
||||
HadCalCellLogical->SetVisAttributes(visAttributes);
|
||||
HadCalLayerLogical->SetVisAttributes(visAttributes);
|
||||
fHadCalScintiLogical->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
// return the world physical volume ----------------------------------------
|
||||
|
||||
return worldPhysical;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B5DetectorConstruction::ConstructSDandField()
|
||||
{
|
||||
// sensitive detectors -----------------------------------------------------
|
||||
G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
||||
G4String SDname;
|
||||
|
||||
G4VSensitiveDetector* hodoscope1
|
||||
= new B5HodoscopeSD(SDname="/hodoscope1");
|
||||
SDman->AddNewDetector(hodoscope1);
|
||||
fHodoscope1Logical->SetSensitiveDetector(hodoscope1);
|
||||
// sensitive detectors -----------------------------------------------------
|
||||
auto sdManager = G4SDManager::GetSDMpointer();
|
||||
G4String SDname;
|
||||
|
||||
auto hodoscope1 = new B5HodoscopeSD(SDname="/hodoscope1");
|
||||
sdManager->AddNewDetector(hodoscope1);
|
||||
fHodoscope1Logical->SetSensitiveDetector(hodoscope1);
|
||||
|
||||
G4VSensitiveDetector* hodoscope2
|
||||
= new B5HodoscopeSD(SDname="/hodoscope2");
|
||||
SDman->AddNewDetector(hodoscope2);
|
||||
fHodoscope2Logical->SetSensitiveDetector(hodoscope2);
|
||||
|
||||
G4VSensitiveDetector* chamber1
|
||||
= new B5DriftChamberSD(SDname="/chamber1");
|
||||
SDman->AddNewDetector(chamber1);
|
||||
fWirePlane1Logical->SetSensitiveDetector(chamber1);
|
||||
auto hodoscope2 = new B5HodoscopeSD(SDname="/hodoscope2");
|
||||
sdManager->AddNewDetector(hodoscope2);
|
||||
fHodoscope2Logical->SetSensitiveDetector(hodoscope2);
|
||||
|
||||
auto chamber1 = new B5DriftChamberSD(SDname="/chamber1");
|
||||
sdManager->AddNewDetector(chamber1);
|
||||
fWirePlane1Logical->SetSensitiveDetector(chamber1);
|
||||
|
||||
G4VSensitiveDetector* chamber2
|
||||
= new B5DriftChamberSD(SDname="/chamber2");
|
||||
SDman->AddNewDetector(chamber2);
|
||||
fWirePlane2Logical->SetSensitiveDetector(chamber2);
|
||||
|
||||
G4VSensitiveDetector* emCalorimeter
|
||||
= new B5EmCalorimeterSD(SDname="/EMcalorimeter");
|
||||
SDman->AddNewDetector(emCalorimeter);
|
||||
fCellLogical->SetSensitiveDetector(emCalorimeter);
|
||||
|
||||
G4VSensitiveDetector* hadCalorimeter
|
||||
= new B5HadCalorimeterSD(SDname="/HadCalorimeter");
|
||||
SDman->AddNewDetector(hadCalorimeter);
|
||||
fHadCalScintiLogical->SetSensitiveDetector(hadCalorimeter);
|
||||
auto chamber2 = new B5DriftChamberSD(SDname="/chamber2");
|
||||
sdManager->AddNewDetector(chamber2);
|
||||
fWirePlane2Logical->SetSensitiveDetector(chamber2);
|
||||
|
||||
auto emCalorimeter = new B5EmCalorimeterSD(SDname="/EMcalorimeter");
|
||||
sdManager->AddNewDetector(emCalorimeter);
|
||||
fCellLogical->SetSensitiveDetector(emCalorimeter);
|
||||
|
||||
auto hadCalorimeter = new B5HadCalorimeterSD(SDname="/HadCalorimeter");
|
||||
sdManager->AddNewDetector(hadCalorimeter);
|
||||
fHadCalScintiLogical->SetSensitiveDetector(hadCalorimeter);
|
||||
|
||||
// magnetic field ----------------------------------------------------------
|
||||
fMagneticField = new B5MagneticField();
|
||||
fFieldMgr = new G4FieldManager();
|
||||
fFieldMgr->SetDetectorField(fMagneticField);
|
||||
fFieldMgr->CreateChordFinder(fMagneticField);
|
||||
G4bool forceToAllDaughters = true;
|
||||
fMagneticLogical->SetFieldManager(fFieldMgr, forceToAllDaughters);
|
||||
// magnetic field ----------------------------------------------------------
|
||||
fMagneticField = new B5MagneticField();
|
||||
fFieldMgr = new G4FieldManager();
|
||||
fFieldMgr->SetDetectorField(fMagneticField);
|
||||
fFieldMgr->CreateChordFinder(fMagneticField);
|
||||
G4bool forceToAllDaughters = true;
|
||||
fMagneticLogical->SetFieldManager(fFieldMgr, forceToAllDaughters);
|
||||
|
||||
// Register the field and its manager for deleting
|
||||
G4AutoDelete::Register(fMagneticField);
|
||||
G4AutoDelete::Register(fFieldMgr);
|
||||
// Register the field and its manager for deleting
|
||||
G4AutoDelete::Register(fMagneticField);
|
||||
G4AutoDelete::Register(fFieldMgr);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B5DetectorConstruction::ConstructMaterials()
|
||||
{
|
||||
G4NistManager* nistManager = G4NistManager::Instance();
|
||||
auto nistManager = G4NistManager::Instance();
|
||||
|
||||
// Air
|
||||
nistManager->FindOrBuildMaterial("G4_AIR");
|
||||
// Air
|
||||
nistManager->FindOrBuildMaterial("G4_AIR");
|
||||
|
||||
// Argon gas
|
||||
nistManager->FindOrBuildMaterial("G4_Ar");
|
||||
// With a density different from the one defined in NIST
|
||||
// G4double density = 1.782e-03*g/cm3;
|
||||
// nistManager->BuildMaterialWithNewDensity("B5_Ar","G4_Ar",density);
|
||||
// !! cases segmentation fault
|
||||
// Argon gas
|
||||
nistManager->FindOrBuildMaterial("G4_Ar");
|
||||
// With a density different from the one defined in NIST
|
||||
// G4double density = 1.782e-03*g/cm3;
|
||||
// nistManager->BuildMaterialWithNewDensity("B5_Ar","G4_Ar",density);
|
||||
// !! cases segmentation fault
|
||||
|
||||
// Scintillator
|
||||
// (PolyVinylToluene, C_9H_10)
|
||||
nistManager->FindOrBuildMaterial("G4_PLASTIC_SC_VINYLTOLUENE");
|
||||
|
||||
// CsI
|
||||
nistManager->FindOrBuildMaterial("G4_CESIUM_IODIDE");
|
||||
|
||||
// Lead
|
||||
nistManager->FindOrBuildMaterial("G4_Pb");
|
||||
|
||||
// Vacuum "Galactic"
|
||||
// nistManager->FindOrBuildMaterial("G4_Galactic");
|
||||
// Scintillator
|
||||
// (PolyVinylToluene, C_9H_10)
|
||||
nistManager->FindOrBuildMaterial("G4_PLASTIC_SC_VINYLTOLUENE");
|
||||
|
||||
// CsI
|
||||
nistManager->FindOrBuildMaterial("G4_CESIUM_IODIDE");
|
||||
|
||||
// Lead
|
||||
nistManager->FindOrBuildMaterial("G4_Pb");
|
||||
|
||||
// Vacuum "Galactic"
|
||||
// nistManager->FindOrBuildMaterial("G4_Galactic");
|
||||
|
||||
// Vacuum "Air with low density"
|
||||
// G4Material* air = G4Material::GetMaterial("G4_AIR");
|
||||
// G4double density = 1.0e-5*air->GetDensity();
|
||||
// nistManager
|
||||
// ->BuildMaterialWithNewDensity("Air_lowDensity", "G4_AIR", density);
|
||||
// Vacuum "Air with low density"
|
||||
// auto air = G4Material::GetMaterial("G4_AIR");
|
||||
// G4double density = 1.0e-5*air->GetDensity();
|
||||
// nistManager
|
||||
// ->BuildMaterialWithNewDensity("Air_lowDensity", "G4_AIR", density);
|
||||
|
||||
G4cout << G4endl << "The materials defined are : " << G4endl << G4endl;
|
||||
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
G4cout << G4endl << "The materials defined are : " << G4endl << G4endl;
|
||||
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B5DetectorConstruction::SetArmAngle(G4double val)
|
||||
{
|
||||
if (!fSecondArmPhys)
|
||||
{
|
||||
G4cerr << "Detector has not yet been constructed." << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
fArmAngle = val;
|
||||
*fArmRotation = G4RotationMatrix(); // make it unit vector
|
||||
fArmRotation->rotateY(fArmAngle);
|
||||
G4double x = -5.*m * std::sin(fArmAngle);
|
||||
G4double z = 5.*m * std::cos(fArmAngle);
|
||||
fSecondArmPhys->SetTranslation(G4ThreeVector(x,0.,z));
|
||||
|
||||
// tell G4RunManager that we change the geometry
|
||||
G4RunManager::GetRunManager()->GeometryHasBeenModified();
|
||||
if (!fSecondArmPhys) {
|
||||
G4cerr << "Detector has not yet been constructed." << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
fArmAngle = val;
|
||||
*fArmRotation = G4RotationMatrix(); // make it unit vector
|
||||
fArmRotation->rotateY(fArmAngle);
|
||||
auto x = -5.*m * std::sin(fArmAngle);
|
||||
auto z = 5.*m * std::cos(fArmAngle);
|
||||
fSecondArmPhys->SetTranslation(G4ThreeVector(x,0.,z));
|
||||
|
||||
// tell G4RunManager that we change the geometry
|
||||
G4RunManager::GetRunManager()->GeometryHasBeenModified();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B5DetectorConstruction::DefineCommands()
|
||||
{
|
||||
// Define /B5/detector command directory using generic messenger class
|
||||
fMessenger = new G4GenericMessenger(this,
|
||||
"/B5/detector/",
|
||||
"Detector control");
|
||||
// Define /B5/detector command directory using generic messenger class
|
||||
fMessenger = new G4GenericMessenger(this,
|
||||
"/B5/detector/",
|
||||
"Detector control");
|
||||
|
||||
// armAngle command
|
||||
G4GenericMessenger::Command& armAngleCmd
|
||||
= fMessenger->DeclareMethodWithUnit("armAngle","deg",
|
||||
&B5DetectorConstruction::SetArmAngle,
|
||||
"Set rotation angle of the second arm.");
|
||||
armAngleCmd.SetParameterName("angle", true);
|
||||
armAngleCmd.SetRange("angle>=0. && angle<180.");
|
||||
armAngleCmd.SetDefaultValue("30.");
|
||||
// armAngle command
|
||||
auto& armAngleCmd
|
||||
= fMessenger->DeclareMethodWithUnit("armAngle","deg",
|
||||
&B5DetectorConstruction::SetArmAngle,
|
||||
"Set rotation angle of the second arm.");
|
||||
armAngleCmd.SetParameterName("angle", true);
|
||||
armAngleCmd.SetRange("angle>=0. && angle<180.");
|
||||
armAngleCmd.SetDefaultValue("30.");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5DriftChamberHit.cc 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5DriftChamberHit.cc 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5DriftChamberHit.cc
|
||||
/// \brief Implementation of the B5DriftChamberHit class
|
||||
@@ -49,13 +49,15 @@ G4ThreadLocal G4Allocator<B5DriftChamberHit>* B5DriftChamberHitAllocator;
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B5DriftChamberHit::B5DriftChamberHit()
|
||||
: G4VHit(), fLayerID(-1), fTime(0.), fLocalPos(0), fWorldPos(0)
|
||||
: G4VHit(),
|
||||
fLayerID(-1), fTime(0.), fLocalPos(0), fWorldPos(0)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B5DriftChamberHit::B5DriftChamberHit(G4int z)
|
||||
: G4VHit(), fLayerID(z), fTime(0.), fLocalPos(0), fWorldPos(0)
|
||||
B5DriftChamberHit::B5DriftChamberHit(G4int layerID)
|
||||
: G4VHit(),
|
||||
fLayerID(layerID), fTime(0.), fLocalPos(0), fWorldPos(0)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -66,97 +68,96 @@ B5DriftChamberHit::~B5DriftChamberHit()
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B5DriftChamberHit::B5DriftChamberHit(const B5DriftChamberHit &right)
|
||||
: G4VHit() {
|
||||
fLayerID = right.fLayerID;
|
||||
fWorldPos = right.fWorldPos;
|
||||
fLocalPos = right.fLocalPos;
|
||||
fTime = right.fTime;
|
||||
}
|
||||
: G4VHit(),
|
||||
fLayerID(right.fLayerID),
|
||||
fTime(right.fTime),
|
||||
fLocalPos(right.fLocalPos),
|
||||
fWorldPos(right.fWorldPos)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
const B5DriftChamberHit& B5DriftChamberHit::operator=(const B5DriftChamberHit &right)
|
||||
{
|
||||
fLayerID = right.fLayerID;
|
||||
fWorldPos = right.fWorldPos;
|
||||
fLocalPos = right.fLocalPos;
|
||||
fTime = right.fTime;
|
||||
return *this;
|
||||
fLayerID = right.fLayerID;
|
||||
fTime = right.fTime;
|
||||
fLocalPos = right.fLocalPos;
|
||||
fWorldPos = right.fWorldPos;
|
||||
return *this;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
int B5DriftChamberHit::operator==(const B5DriftChamberHit &/*right*/) const
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B5DriftChamberHit::Draw()
|
||||
{
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
if(pVVisManager)
|
||||
{
|
||||
G4Circle circle(fWorldPos);
|
||||
circle.SetScreenSize(2);
|
||||
circle.SetFillStyle(G4Circle::filled);
|
||||
G4Colour colour(1.,1.,0.);
|
||||
G4VisAttributes attribs(colour);
|
||||
circle.SetVisAttributes(attribs);
|
||||
pVVisManager->Draw(circle);
|
||||
}
|
||||
auto visManager = G4VVisManager::GetConcreteInstance();
|
||||
if (! visManager) return;
|
||||
|
||||
G4Circle circle(fWorldPos);
|
||||
circle.SetScreenSize(2);
|
||||
circle.SetFillStyle(G4Circle::filled);
|
||||
G4Colour colour(1.,1.,0.);
|
||||
G4VisAttributes attribs(colour);
|
||||
circle.SetVisAttributes(attribs);
|
||||
visManager->Draw(circle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
const std::map<G4String,G4AttDef>* B5DriftChamberHit::GetAttDefs() const
|
||||
{
|
||||
G4bool isNew;
|
||||
std::map<G4String,G4AttDef>* store
|
||||
= G4AttDefStore::GetInstance("B5DriftChamberHit",isNew);
|
||||
G4bool isNew;
|
||||
auto store = G4AttDefStore::GetInstance("B5DriftChamberHit",isNew);
|
||||
|
||||
if (isNew) {
|
||||
(*store)["HitType"]
|
||||
= G4AttDef("HitType","Hit Type","Physics","","G4String");
|
||||
|
||||
(*store)["ID"]
|
||||
= G4AttDef("ID","ID","Physics","","G4int");
|
||||
|
||||
(*store)["Time"]
|
||||
= G4AttDef("Time","Time","Physics","G4BestUnit","G4double");
|
||||
|
||||
(*store)["Pos"]
|
||||
= G4AttDef("Pos", "Position", "Physics","G4BestUnit","G4ThreeVector");
|
||||
}
|
||||
return store;
|
||||
if (isNew) {
|
||||
(*store)["HitType"]
|
||||
= G4AttDef("HitType","Hit Type","Physics","","G4String");
|
||||
|
||||
(*store)["ID"]
|
||||
= G4AttDef("ID","ID","Physics","","G4int");
|
||||
|
||||
(*store)["Time"]
|
||||
= G4AttDef("Time","Time","Physics","G4BestUnit","G4double");
|
||||
|
||||
(*store)["Pos"]
|
||||
= G4AttDef("Pos", "Position", "Physics","G4BestUnit","G4ThreeVector");
|
||||
}
|
||||
|
||||
return store;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
std::vector<G4AttValue>* B5DriftChamberHit::CreateAttValues() const
|
||||
{
|
||||
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
|
||||
|
||||
values
|
||||
->push_back(G4AttValue("HitType","DriftChamberHit",""));
|
||||
values
|
||||
->push_back(G4AttValue("ID",G4UIcommand::ConvertToString(fLayerID),""));
|
||||
values
|
||||
->push_back(G4AttValue("Time",G4BestUnit(fTime,"Time"),""));
|
||||
values
|
||||
->push_back(G4AttValue("Pos",G4BestUnit(fWorldPos,"Length"),""));
|
||||
|
||||
return values;
|
||||
auto values = new std::vector<G4AttValue>;
|
||||
|
||||
values
|
||||
->push_back(G4AttValue("HitType","DriftChamberHit",""));
|
||||
values
|
||||
->push_back(G4AttValue("ID",G4UIcommand::ConvertToString(fLayerID),""));
|
||||
values
|
||||
->push_back(G4AttValue("Time",G4BestUnit(fTime,"Time"),""));
|
||||
values
|
||||
->push_back(G4AttValue("Pos",G4BestUnit(fWorldPos,"Length"),""));
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B5DriftChamberHit::Print()
|
||||
{
|
||||
G4cout << " Layer[" << fLayerID << "] : time " << fTime/ns
|
||||
<< " (nsec) --- local (x,y) " << fLocalPos.x()
|
||||
<< ", " << fLocalPos.y() << G4endl;
|
||||
G4cout << " Layer[" << fLayerID << "] : time " << fTime/ns
|
||||
<< " (nsec) --- local (x,y) " << fLocalPos.x()
|
||||
<< ", " << fLocalPos.y() << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user