Import Geant4 9.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:46:55 +02:00
parent 89a9605df1
commit b1eb5424d2
10957 changed files with 888481 additions and 160139 deletions
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4HCofThisEvent.hh,v 1.3 2006/06/29 17:35:30 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4HCofThisEvent.hh,v 1.3 2006-06-29 17:35:30 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
#ifndef G4HCofThisEvent_h
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4THitsCollection.hh,v 1.3 2006/06/29 17:35:35 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4THitsCollection.hh,v 1.3 2006-06-29 17:35:35 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
#ifndef G4THitsCollection_h
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VHitsCollection.hh,v 1.3 2006/06/29 17:35:37 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VHitsCollection.hh,v 1.3 2006-06-29 17:35:37 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
#ifndef G4VHitsCollection_h
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.4 2010/01/11 16:57:10 gcosmo Exp $
# $Id: GNUmakefile,v 1.4 2010-01-11 16:57:10 gcosmo Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -15,9 +15,6 @@ endif
.PHONY: all
all: had_list lib bin
had_list:
@echo "This example uses the QGSP 'educated guess physics list'"
all: lib bin
include $(G4INSTALL)/config/binmake.gmk
+11 -6
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.16 2010/11/07 11:34:05 allison Exp $
$Id: History,v 1.16 2010-11-07 11:34:05 allison Exp $
-------------------------------------------------------------------
=========================================================
@@ -15,15 +15,20 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
November 7th, 2010 - J.Allison ParN04-V09-03-02
April 13th, 2010 G.Cosmo - ParN04-V09-04-00
------------------------
- Synchronised with current version of novice example N04.
November 7th, 2010 J.Allison - ParN04-V09-03-02
----------------------------
- Introduced G4UIExecutive.
June 5th, 2010 - J.Perl ParN04-V09-03-01
-------------------------
June 5th, 2010 J.Perl - ParN04-V09-03-01
---------------------
- Updated vis usage
June 4th, 2010 V.Ivant - ParN04-V09-03-00
---------------------
June 4th, 2010 V.Ivantchenko - ParN04-V09-03-00
----------------------------
- Substituted QGSP by QGSP_BERT
Nov 17th, 2006 M.Asai - ParN04-V08-01-02
@@ -1,4 +1,4 @@
# $Id: ParGNUmakefile,v 1.7 2007/05/25 17:25:51 cooperma Exp $
# $Id: ParGNUmakefile,v 1.7 2007-05-25 17:25:51 cooperma Exp $
# --------------------------------------------------------------
#This file should be included in GNUmakefile of local directory.
+2 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: ParN04.cc,v 1.8 2010/11/07 11:34:05 allison Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: ParN04.cc,v 1.8 2010-11-07 11:34:05 allison Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// --------------------------------------------------------------
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: ParTopC.icc,v 1.2 2006/06/29 17:35:18 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: ParTopC.icc,v 1.2 2006-06-29 17:35:18 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// --------------------------------------------------------------------
// Parallel Library for Geant4
@@ -1,4 +1,4 @@
$Id: BUG.userStackingAction,v 1.1 2002/03/05 15:22:07 gcosmo Exp $
$Id: BUG.userStackingAction,v 1.1 2002-03-05 15:22:07 gcosmo Exp $
-------------------------------------------------------------------
When Geant4 4.0 sees empty event, it still calls userStackingAction.
@@ -1,4 +1,4 @@
$Id: README,v 1.1 2002/03/05 15:22:08 gcosmo Exp $
$Id: README,v 1.1 2002-03-05 15:22:08 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -52,7 +52,7 @@ class ExN04CalorimeterHit : public G4VHit
~ExN04CalorimeterHit();
ExN04CalorimeterHit(const ExN04CalorimeterHit &right);
const ExN04CalorimeterHit& operator=(const ExN04CalorimeterHit &right);
int operator==(const ExN04CalorimeterHit &right) const;
G4int operator==(const ExN04CalorimeterHit &right) const;
inline void *operator new(size_t);
inline void operator delete(void *aHit);
@@ -28,6 +28,8 @@
#include "G4VReadOutGeometry.hh"
class G4Material;
class ExN04CalorimeterROGeometry : public G4VReadOutGeometry
{
public:
@@ -37,6 +39,7 @@ public:
private:
G4VPhysicalVolume* Build();
G4Material* dummyMat;
#include "ExN04DetectorParameterDef.hh"
@@ -32,6 +32,7 @@
class G4VPhysicalVolume;
class G4Material;
class G4Element;
class ExN04DetectorConstruction : public G4VUserDetectorConstruction
{
@@ -53,6 +54,10 @@ class ExN04DetectorConstruction : public G4VUserDetectorConstruction
G4Material* Scinti;
G4Material* Lead;
G4Element* H;
G4Element* C;
G4Element* N;
G4Element* O;
};
#endif
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: ExN04EMPhysics.hh,v 1.2 2006/06/29 17:36:01 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: ExN04EMPhysics.hh,v 1.2 2006-06-29 17:36:01 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// ------------------------------------------------------------
@@ -45,7 +45,7 @@ class ExN04MuonHit : public G4VHit
~ExN04MuonHit();
ExN04MuonHit(const ExN04MuonHit &right);
const ExN04MuonHit& operator=(const ExN04MuonHit &right);
int operator==(const ExN04MuonHit &right) const;
G4int operator==(const ExN04MuonHit &right) const;
inline void *operator new(size_t);
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: ExN04RunAction.hh,v 1.3 2006/07/05 13:07:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: ExN04RunAction.hh,v 1.3 2006-07-05 13:07:55 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: ExN04SteppingVerbose.hh,v 1.2 2006/06/29 17:36:36 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: ExN04SteppingVerbose.hh,v 1.2 2006-06-29 17:36:36 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// This class manages the verbose outputs in G4SteppingManager.
// It inherits from G4SteppingVerbose.
@@ -25,16 +25,6 @@
//
//
// --------------------------------------------------------------
// GEANT 4 - Underground Dark Matter Detector Advanced Example
//
// For information related to this code contact: Alex Howard
// e-mail: a.s.howard@ic.ac.uk
// --------------------------------------------------------------
// Comments
//
//
// TrackerHit header
// --------------------------------------------------------------
#ifndef ExN04TrackerHit_h
#define ExN04TrackerHit_h 1
@@ -60,7 +50,7 @@ class ExN04TrackerHit : public G4VHit
ExN04TrackerHit(const ExN04TrackerHit &right);
const ExN04TrackerHit& operator=(const ExN04TrackerHit &right);
int operator==(const ExN04TrackerHit &right) const;
G4int operator==(const ExN04TrackerHit &right) const;
inline void* operator new(size_t);
inline void operator delete(void* aHit);
@@ -80,13 +70,12 @@ class ExN04TrackerHit : public G4VHit
public:
inline void SetEdep(G4double de) {edep=de;};
inline void SetPos(G4ThreeVector xyz) {pos=xyz;};
inline G4double GetEdep() const {return edep;};
inline G4ThreeVector GetPos() const {return pos;};
inline void SetEdep(G4double de) {edep=de;}
inline void SetPos(G4ThreeVector xyz) {pos=xyz;}
inline G4double GetEdep() const {return edep;}
inline G4ThreeVector GetPos() const {return pos;}
};
//MSH_END
@@ -94,24 +83,18 @@ class ExN04TrackerHit : public G4VHit
// vector collection of one type of hits
typedef G4THitsCollection<ExN04TrackerHit> ExN04TrackerHitsCollection;
extern G4Allocator<ExN04TrackerHit> ExN04TrackerHitAllocator;
inline void* ExN04TrackerHit::operator new(size_t) {
inline void* ExN04TrackerHit::operator new(size_t)
{
void* aHit;
aHit = (void*) ExN04TrackerHitAllocator.MallocSingle();
return aHit;
}
inline void ExN04TrackerHit::operator delete(void* aHit) {
inline void ExN04TrackerHit::operator delete(void* aHit)
{
ExN04TrackerHitAllocator.FreeSingle((ExN04TrackerHit*) aHit);
}
#endif
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: ParRunManager.hh,v 1.4 2006/06/29 17:36:47 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: ParRunManager.hh,v 1.4 2006-06-29 17:36:47 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// --------------------------------------------------------------------
// Parallel Library for Geant4
@@ -35,7 +35,7 @@
#include "G4Tubs.hh"
#include "G4ThreeVector.hh"
#include "G4Material.hh"
#include "G4VisAttributes.hh"
ExN04CalorimeterROGeometry::ExN04CalorimeterROGeometry()
: G4VReadOutGeometry()
@@ -45,13 +45,14 @@ ExN04CalorimeterROGeometry::ExN04CalorimeterROGeometry()
ExN04CalorimeterROGeometry::ExN04CalorimeterROGeometry(G4String aString)
: G4VReadOutGeometry(aString)
: G4VReadOutGeometry(aString), dummyMat(0)
{
#include "ExN04DetectorParameterDef.icc"
}
ExN04CalorimeterROGeometry::~ExN04CalorimeterROGeometry()
{
delete dummyMat;
}
G4VPhysicalVolume* ExN04CalorimeterROGeometry::Build()
@@ -59,12 +60,13 @@ G4VPhysicalVolume* ExN04CalorimeterROGeometry::Build()
// A dummy material is used to fill the volumes of the readout geometry.
// ( It will be allowed to set a NULL pointer in volumes of such virtual
// division in future, since this material is irrelevant for tracking.)
G4Material* dummyMat = new G4Material(name="dummyMat", 1., 1.*g/mole, 1.*g/cm3);
dummyMat = new G4Material(name="dummyMat", 1., 1.*g/mole, 1.*g/cm3);
//Builds the ReadOut World:
G4Box *ROWorldBox = new G4Box("ROWorldBox", expHall_x, expHall_y, expHall_z);
G4LogicalVolume *ROWorldLog = new G4LogicalVolume(ROWorldBox, dummyMat,
"ROWorldLogical", 0, 0, 0);
ROWorldLog->SetVisAttributes(G4VisAttributes::Invisible);
G4PVPlacement *ROWorldPhys = new G4PVPlacement(0,G4ThreeVector(),
"ROWorldPhysical",
ROWorldLog,
@@ -60,7 +60,18 @@ ExN04DetectorConstruction::ExN04DetectorConstruction()
}
ExN04DetectorConstruction::~ExN04DetectorConstruction()
{;}
{
delete Scinti;
delete Silicon;
delete Ar;
delete Lead;
delete Air;
delete O;
delete N;
delete C;
delete H;
}
void ExN04DetectorConstruction::DefineMaterials()
{
@@ -71,10 +82,10 @@ void ExN04DetectorConstruction::DefineMaterials()
G4double a, z, density;
G4int nel;
G4Element* H = new G4Element("Hydrogen", "H", z=1., a= 1.01*g/mole);
G4Element* C = new G4Element("Carbon", "C", z=6., a= 12.01*g/mole);
G4Element* N = new G4Element("Nitrogen", "N", z=7., a= 14.01*g/mole);
G4Element* O = new G4Element("Oxygen", "O", z=8., a= 16.00*g/mole);
H = new G4Element("Hydrogen", "H", z=1., a= 1.01*g/mole);
C = new G4Element("Carbon", "C", z=6., a= 12.01*g/mole);
N = new G4Element("Nitrogen", "N", z=7., a= 14.01*g/mole);
O = new G4Element("Oxygen", "O", z=8., a= 16.00*g/mole);
Air = new G4Material("Air", density= 1.29*mg/cm3, nel=2);
Air->AddElement(N, 70.*perCent);
@@ -125,10 +136,7 @@ G4VPhysicalVolume* ExN04DetectorConstruction::Construct()
G4VPhysicalVolume * experimentalHall_phys
= new G4PVPlacement(0,G4ThreeVector(),experimentalHall_log,"expHall_P",
0,false,0);
G4VisAttributes* experimentalHallVisAtt
= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
experimentalHallVisAtt->SetForceWireframe(true);
experimentalHall_log->SetVisAttributes(experimentalHallVisAtt);
experimentalHall_log->SetVisAttributes(G4VisAttributes::GetInvisible());
//------------------------------ tracker
G4VSolid * tracker_tubs
@@ -141,7 +149,6 @@ G4VPhysicalVolume* ExN04DetectorConstruction::Construct()
experimentalHall_log,false,0);
G4VisAttributes* tracker_logVisAtt
= new G4VisAttributes(G4Colour(1.0,0.0,1.0));
tracker_logVisAtt->SetForceWireframe(true);
tracker_log->SetVisAttributes(tracker_logVisAtt);
//------------------------------ tracker layers
@@ -193,7 +200,6 @@ G4VPhysicalVolume* ExN04DetectorConstruction::Construct()
kXAxis, nocaloLayers, calorimeterParam);
G4VisAttributes* caloLayer_logVisAtt
= new G4VisAttributes(G4Colour(0.7,1.0,0.0));
caloLayer_logVisAtt->SetForceWireframe(true);
caloLayer_log->SetVisAttributes(caloLayer_logVisAtt);
//------------------------------ muon counters
@@ -239,6 +245,7 @@ G4VPhysicalVolume* ExN04DetectorConstruction::Construct()
G4String ROgeometryName = "CalorimeterROGeom";
G4VReadOutGeometry* calRO = new ExN04CalorimeterROGeometry(ROgeometryName);
calRO->BuildROGeometry();
calRO->SetName(ROgeometryName);
calorimeterSD->SetROgeometry(calRO);
SDman->AddNewDetector(calorimeterSD);
calorimeter_log->SetSensitiveDetector(calorimeterSD);
@@ -34,6 +34,9 @@
#include "G4EventManager.hh"
#include "G4HCofThisEvent.hh"
#include "G4VHitsCollection.hh"
#include "G4TrajectoryContainer.hh"
#include "G4Trajectory.hh"
#include "G4VVisManager.hh"
#include "G4SDManager.hh"
#include "G4UImanager.hh"
#include "G4ios.hh"
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: ExN04RunAction.cc,v 1.3 2006/07/05 13:07:56 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: ExN04RunAction.cc,v 1.3 2006-07-05 13:07:56 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: ExN04SteppingVerbose.cc,v 1.2 2006/06/29 17:37:37 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: ExN04SteppingVerbose.cc,v 1.2 2006-06-29 17:37:37 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+4 -4
View File
@@ -1,4 +1,4 @@
surface# Use this open statement to create an OpenGL view:
# Use this open statement to create an OpenGL view:
/vis/open OGL 600x600-0+0
#
# Use this open statement to create a .prim file suitable for
@@ -22,10 +22,10 @@ surface# Use this open statement to create an OpenGL view:
/vis/drawVolume
#
# Specify view angle:
#/vis/viewer/set/viewpointThetaPhi 90. 0.
/vis/viewer/set/viewpointThetaPhi 90. 180.
#
# Specify zoom value:
#/vis/viewer/zoom 2.
/vis/viewer/zoom 1.4
#
# Specify style (surface or wireframe):
#/vis/viewer/set/style wireframe
@@ -58,7 +58,7 @@ surface# Use this open statement to create an OpenGL view:
#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
#
# To superimpose all of the events from a given run:
#/vis/scene/endOfEventAction accumulate
/vis/scene/endOfEventAction accumulate
#
# Re-establish auto refreshing and verbosity:
/vis/viewer/set/autoRefresh true