Import Geant4 11.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2021-12-10 14:46:44 +01:00
committed by Ben Morgan
parent 6399a014b6
commit 80e2389dd8
3932 changed files with 202519 additions and 246221 deletions
@@ -1,6 +1,6 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 3.12...3.20)
cmake_minimum_required(VERSION 3.16...3.21)
project(underground_physics)
#----------------------------------------------------------------------------
+1 -3
View File
@@ -47,8 +47,8 @@
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
#include "G4AnalysisManager.hh"
#include "DMXAnalysisManager.hh"
#include "DMXDetectorConstruction.hh"
#include "DMXPhysicsList.hh"
#include "DMXActionInitializer.hh"
@@ -106,8 +106,6 @@ int main(int argc,char** argv) {
G4AnalysisManager* man = G4AnalysisManager::Instance();
man->Write();
man->CloseFile();
// Complete clean-up
delete G4AnalysisManager::Instance();
if(visManager) delete visManager;
@@ -7,6 +7,26 @@
Category History file
---------------------
29.11.2021 - I. Hrivnacova (DMX-V10-07-10)
Removed obsolete reference to AIDA/Anaphe from README_stt
18.10.2021 - B. Morgan (DMX-V10-07-10)
Use std::string member functions from G4String in place of synonyms
07.10.2021 - I. Hrivnacova (DMX-V10-07-09)
Migration to new G4AnalysisManager.hh header;
define the default output file type (root),
removed DMXAnalysisManager.hh.
30.08.2021 - D.H. Wright (DMX-V10-07-08)
Replaced G4RadioactiveDecayBase with G4RadioactiveDecay in
DMXPhysicsList.cc. Part of name migration and removal of
deprecated G4RadioactiveDecayBase.
19.07.2021 - I. Hrivnacova (DMX-V10-07-07)
Updated for changes in the analysis category:
removed deleting of the analysis manager,
as this is now done by the Geant4 kernel.
24.05.2021 - B. Morgan (DMX=V10-07-06)
- Bump required CMake version range to 3.12...3.20, matching core Geant4
@@ -1,214 +0,0 @@
------------------------------Advanced Example--------------------------------- README FILE
Note: Due to the importation of data files during the initialisation stage of
Geant4, load-time may be in excess of 5 minutes.
UNDERGROUND PHYSICS
An example of a underground dark matter experiment.
Please see the UserRequirements.txt and related web-pages referred to
at the end of that document.
Over-view:
A single liquid xenon cell is simulated within Geant4 and the scintillation
light produced from interactions from various calibration species is recorded
as PhotoMultiplier hits. The output is then written to an ASCII file for
future off-line analysis.
Geometry:
Experimental set-up:
G4double worldWidth = 470.0*cm + 2.*wallThick; // "x"
G4double worldLength = 690.0*cm + 2.*wallThick; // "y"
G4double worldHeight = 280.0*cm + 2.*wallThick; // "z"
A "cavern" of dimensions 5.18m x 7.38m x 3.28m with concrete walls is defined
as the World Volume. A laboratory geometry is incorporated included desks,
cupboards, door and windows. For ease this is included in a separate ".icc"
file which can be removed should the code seem cumbersome. In the centre of
the cavern a steel vacuum vessel containing liquid and gaseous xenon is placed.
The internal construction of the vessel accurately reproduces an existing
prototype Dark Matter detector which allows experimental comparison. The active
detector volume is defined by a series of metal rings, complemented by
a cover mirror and a PMT immersed in the liquid. Two grids and a
thermalising copper shield are also incorporated. The liquid/gas
interface is located 6mm away from the mirror surface. A Am241
calibration source is suspended from one of the grids in the liquid
phase, above the PMT.
XXX================XXX mirror
XXX________________XXX gas phase
XXX XXX
XXX XXX liquid phase
XXX XXX
XXX.......U........XXX grid + calibrator
XXX................XXX grid
XXX| |XXX
| ___------___ |
|| PMT ||
|| ||
Hits Output (file "hits.out"):
An ASCII file containing the following information:
Evt # : event number
Etot, MeV : energy deposited in liquid xenon
LXe hits : number of hits in liquid xenon
LXeTime, ns : time of first hit in liquid xenon
PMT hits : number of hits in PMT (photocathode)
PmtTime, ns : average PMT hit time relative to LXeTime
First hit : first particle to hit liquid xenon
Flags : particles contributing to energy deposition
Seeds : the initial seed values for given hit events
Note:
The time information PmtTime is erroneous when forcing nuclear
decay with the RadioactiveDecay module due to the precision
required to detect nanosecond scintillation times on a global
time of 432 years (in the case of 241Am decay).
Pmt Output (file "pmt.out"):
Photon hit positions within the PMT face (overwritten every event):
"Hit# X, mm Y, mm Z, mm"
To Run:
Either run the macro files interactively or in batch with the command
DMX macro_name.mac.
Macros:
initInter.mac
Initialisation macro for interactive mode.
gamma.mac
Shoots one 60 keV gamma upwards from the calibrator and traces the
scintillation light produced in LXe to the PMT. All tracks are drawn
with custom colours. PMT hits in photocathode are also shown. Event
summary is writen to file "hits.out".
gamma_1000.mac
Similar to above, but 1000 gammas are emmited isotropically from the
source. No hits or tracks are draw, and the verbosity is reduced.
alpha.mac
Shoots one 5.486 MeV alpha particle upwards from the calibrator and
traces the scintillation light to the PMT. All tracks except
optical photons are drawn. Event summary is written to file
"hits.out" and PMT hits to file "pmt.out".
alpha_1000.mac
Similar to above, but 1000 alphas are emmited isotropically from the
source. No tracks are stored, and the verbosity is reduced. Event
summary is written to file "hits.out", PMT hits are not written out.
neutron.mac
Shoots one 2.48 MeV neutron inside the room aimed at the detector.
All tracks except scintillation photons are drawn (custom colours).
Gammas are not killed at the concrete wall. Event summery is written
to file "hits.out".
ambe_spectrum.mac
Produces a spectrum of neutrons according to an approximation of a Am/Be
neutron source. However, this uses the GPS and therefore will only work
after compilation with the DMXENV_GPS_USE environment variable (see below)
sourceAm241.mac
Forces the decay of 241Am nuclei in the calibrator and tracks the
resulting particles (237Np + alpha + gamma from 237Np
de-excitation). All tracks are drawn except scintillation photons.
Event summery is written to file "hits.out".
-> To be added for a future release
sourceAm241_1000.mac
Similar to above but for 1000 events. No tracks are stored.
-> To be added for a future release
Note:
The following environment variables need to be set:
G4RADIOACTIVEDATA : points to Radioactive Decay Data files
G4LEDATA : points to low energy data base
G4LEVELGAMMADATA : points to PhotoEvaporation data
NeutronHPCrossSections : points to neutron data files
In addition if you require to use the full General Particle Source then the
variable DMXENV_GPS_USE can be set. The DMX gun is still included in order to
allow forward compatibility should the GPS change.
ANALYSIS:
The program should produce ROOT-based histogram files. It is possible to
produce the output in XML-compliant format by editing the file
include/DMXAnalysisManager.hh
and by commenting out
#include "g4root.hh"
and uncommenting
#include "g4xml.hh"
SEEDS:
The seeds of event hits are stored in the hit record file. These can be used
to repeat events for visualisation, test crashes/idiosyncracies:
/random/setDirectoryName ./seeds
/random/resetEngineFrom currentEvent.rndm
/random/saveThisEvent
/random/setSavingFlag
The file currentEvent.rndm should contain the two seeds which were outputed in
the scintHit file.
ERRORS:
When running interactively the following error will be shown:
BooleanProcessor::caseIE : unimplemented case
BooleanProcessor::caseIE : unimplemented case
BooleanProcessor::caseIE : unimplemented case
BooleanProcessor::caseIE : unimplemented case
BooleanProcessor::caseIE : unimplemented case
BooleanProcessor::caseIE : unimplemented case
BooleanProcessor: boolean operation failed
BooleanProcessor::caseIE : unimplemented case
BooleanProcessor::caseIE : unimplemented case
BooleanProcessor::caseIE : unimplemented case
BooleanProcessor::caseIE : unimplemented case
BooleanProcessor: boolean operation failed
This is a "feature" of the visualisation of boolean volumes, but does not
affect functionality/performance so can be ignored.
NB:
If using explicit libraries (?) i.e. non-shared then compilation time with
neutrons in physics list is very long (>5 minutes) - check this.............
It is more efficient to use shared libraries that are loaded at run-time with
increased initialisation time (at run-time).
Also if using shared libraries the load time at run-time may be several minutes
- this is partially due to the neutron implementation requires full data sets
for each isotope being specified.
--------------------------------------
If running on Redhat 7.0 or above set G4SYSTEM to Linux-g++, alternatively you
can install backward compatibility to egcs, however, requires
config/sys/Linux-egcs.gmk to be altered so that CXX is set to kgcc
(compared to g++ in original file)
--------------------------------------
Alex Howard, 29/11/01
updated 18/06/02
@@ -1,41 +0,0 @@
*******************************************************************************
*******************************************************************************
Readme File for STT of the Underground_Physics Advanced Example, DMX
*******************************************************************************
*******************************************************************************
STT testing of DMX should contain the following:
gmake
DMX stt.mat
this should produce two output files:
stt.out
stt_pmt.out
These should be compared with
stt_ref.out
stt_pmt_ref.out
The job should take
real 6m0.226s
user 5m25.870s
sys 0m2.410s
on a 850MHz Linux machine.
The memory usage should be around 110Mbytes.
The initialisation time is ~4.5 minutes, requires loading G4EMLOW1.1 and
G4NDL3.5 via setting G4LEDATA and NeutronHPCrossSections environment variables.
Platforms to be tested on:
SUN and LINUX, NOT WINDOWS.
At a future date G4ANALYSIS_USE should be set and the AIDA/Anaphe packages
tested.
Alex Howard
e-mail: alexander.howard@cern.ch
*******************************************************************************
*******************************************************************************
@@ -1,49 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// Author: Alex Howard (alexander.howard@cern.ch)
//
// History:
// -----------
// 16 Jan 2002 Alex Howard Created
// 22 Oct 2009 Luciano Pandola Added TreeFactory, removed ntuple4
// 31 May 2013 Luciano Pandola Migrated to g4analysis
// -------------------------------------------------------------------
#ifndef DMXAnalysisManager_h
#define DMXAnalysisManager_h 1
#include "g4root.hh"
//#include "g4xml.hh"
//#include "g4csv.hh" // can be used only with ntuples
#endif
@@ -52,9 +52,8 @@
// note DMXPmtHit.hh and DMXScintHit.hh are included in DMXEventAction.hh
#include "DMXEventActionMessenger.hh"
#include "DMXAnalysisManager.hh"
#include "G4AnalysisManager.hh"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4HCofThisEvent.hh"
@@ -287,12 +287,12 @@ void DMXParticleSourceMessenger::SetNewValue
fAtomicNumber = StoI(next());
fAtomicMass = StoI(next());
G4String sQ = next();
if (sQ.isNull()) {
if (sQ.empty()) {
fIonCharge = fAtomicNumber;
} else {
fIonCharge = StoI(sQ);
sQ = next();
if (sQ.isNull()) {
if (sQ.empty()) {
fIonExciteEnergy = 0.0;
} else {
fIonExciteEnergy = StoD(sQ) * keV;
@@ -185,7 +185,7 @@
#include "G4HadronicParameters.hh"
#include "G4Decay.hh"
#include "G4RadioactiveDecayBase.hh"
#include "G4RadioactiveDecay.hh"
#include "G4PhysicsListHelper.hh"
#include "G4NuclideTable.hh"
#include "G4NuclearLevelData.hh"
@@ -830,7 +830,7 @@ void DMXPhysicsList::ConstructGeneral() {
}
G4PhysicsListHelper::GetPhysicsListHelper()->
RegisterProcess(new G4RadioactiveDecayBase(), G4GenericIon::GenericIon());
RegisterProcess(new G4RadioactiveDecay(), G4GenericIon::GenericIon());
}
// Cuts /////////////////////////////////////////////////////////////////////
@@ -48,8 +48,7 @@
#include "DMXParticleSource.hh"
#endif
#include "DMXAnalysisManager.hh"
#include "G4AnalysisManager.hh"
#include "G4Event.hh"
#include "Randomize.hh"
@@ -48,11 +48,10 @@
#include "G4Run.hh"
#include "G4ios.hh"
#include "G4AnalysisManager.hh"
#include <fstream>
#include "DMXAnalysisManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
DMXRunAction::DMXRunAction()
@@ -98,6 +97,7 @@ void DMXRunAction::Book()
{
// Get/create analysis manager
G4AnalysisManager* man = G4AnalysisManager::Instance();
man->SetDefaultFileType("root");
// Open an output file
man->OpenFile(savehistFile);
@@ -46,8 +46,8 @@
#include "DMXSteppingActionMessenger.hh"
#include "DMXEventAction.hh"
#include "DMXAnalysisManager.hh"
#include "G4AnalysisManager.hh"
#include "G4RunManager.hh"
#include "G4Track.hh"
#include "G4Step.hh"
File diff suppressed because it is too large Load Diff