Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.6 2010-11-05 08:52:34 gcosmo Exp $
# $Id: GNUmakefile 68025 2013-03-13 13:43:46Z gcosmo $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -14,6 +14,14 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
18 November 2013 I. Hrivnacova (exampleP03-V09-06-01)
--------------------------
- Fixed files description (only comment lines modified)
8 November 2013 P. Arce (exampleP03-V09-06-00)
--------------------------
- Porting to MT
17 July 2012 I. Hrivnacova (exampleP03-V09-05-02)
--------------------------
- Restored file descriptions in .hh and moved class description
+263
View File
@@ -0,0 +1,263 @@
############################################
!!! WARNING - FPE detection is activated !!!
############################################
*************************************************************
Geant4 version Name: geant4-10-00-ref-00 (6-December-2013)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
Registering graphics systems...
You have successfully registered the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
OpenGLImmediateX (OGLIX)
OpenGLImmediateXm (OGLI, OGLIXm)
OpenGLStoredX (OGLSX)
OpenGLStoredXm (OGL, OGLS, OGLSXm)
RayTracer (RayTracer)
RayTracerX (RayTracerX)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
Registering model factories...
You have successfully registered the following model factories.
Registered model factories:
generic
drawByCharge
drawByParticleID
drawByOriginVolume
drawByAttribute
Registered filter factories:
chargeFilter
particleFilter
originVolumeFilter
attributeFilter
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none
Some /vis commands (optionally) take a string to specify colour.
Available colours:
black, blue, brown, cyan, gray, green, grey, magenta, red, white, yellow
/geometry/textInput/verbose 0
/run/initialize
userDetector->Construct() start.
world is registered to the default region.
physicsList->Construct() start.
physicsList->CheckParticleList() start.
physicsList->setCut() start.
/vis/open ATree
Issue /vis/viewer/refresh or flush to see effect.
/vis/viewer/set/autoRefresh false
/vis/verbose errors
Visualization verbosity changed to errors (2)
/vis/drawVolume
/vis/scene/add/trajectories smooth
/tracking/storeTrajectory 2
Attributes available for modeling and filtering with
"/vis/modeling/trajectories/create/drawByAttribute" and
"/vis/filtering/trajectories/create/attributeFilter" commands:
G4TrajectoriesModel:
Event ID (EventID): G4int
G4SmoothTrajectory:
Charge (Ch): unit: e+ (G4double)
Track ID (ID): G4int
Initial kinetic energy (IKE): G4BestUnit (G4double)
Initial momentum magnitude (IMag): G4BestUnit (G4double)
Initial momentum (IMom): G4BestUnit (G4ThreeVector)
No. of points (NTP): G4int
PDG Encoding (PDG): G4int
Parent ID (PID): G4int
Particle Name (PN): G4String
G4SmoothTrajectoryPoint:
Auxiliary Point Position (Aux): G4BestUnit (G4ThreeVector)
Step Position (Pos): G4BestUnit (G4ThreeVector)
/vis/scene/notifyHandlers
/vis/modeling/trajectories/create/drawByCharge
/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
/vis/scene/notifyHandlers scene-0
/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
/vis/scene/notifyHandlers scene-0
/vis/scene/endOfEventAction accumulate
/vis/viewer/set/autoRefresh true
/vis/viewer/refresh
G4ASCIITreeSceneHandler::BeginModeling: writing to G4 standard output (G4cout)
# Set verbosity with "/vis/ASCIITree/verbose <verbosity>":
# < 10: - does not print daughters of repeated placements, does not repeat replicas.
# >= 10: prints all physical volumes.
# The level of detail is given by verbosity%10:
# for each volume:
# >= 0: physical volume name.
# >= 1: logical volume name (and names of sensitive detector and readout geometry, if any).
# >= 2: solid name and type.
# >= 3: volume and density.
# >= 5: daughter-subtracted volume and mass.
# and in the summary at the end of printing:
# >= 4: daughter-included mass of top physical volume(s) in scene to depth specified.
# Note: by default, culling is switched off so all volumes are seen.
# Note: the mass calculation takes into account daughters, which can be time consuming. If you want the mass of a particular subtree to a particular depth:
# /vis/open ATree
# /vis/ASCIITree/verbose 14
# /vis/scene/create
# /vis/scene/add/volume <subtree-physical-volume> ! <depth>
# /vis/sceneHandler/attach
# /vis/viewer/flush
# Now printing with verbosity 0
# Format is: PV:n
# Abbreviations: PV = Physical Volume, LV = Logical Volume,
# SD = Sensitive Detector, RO = Read Out Geometry.
"world":0
"my tube":1
"sphere":1
G4ASCIITreeSceneHandler::EndModeling
/vis/verbose warnings
Visualization verbosity changed to warnings (3)
/gun/particle gamma
/gun/energy 10 MeV
/tracking/verbose 0
/run/beamOn 10
Region <DefaultRegionForTheWorld> -- -- appears in <world> world volume
This region is in the mass world.
Root logical volume(s) : world
Pointers : G4VUserRegionInformation[0], G4UserLimits[0], G4FastSimulationManager[0], G4UserSteppingAction[0]
Materials : Air G4_WATER G4_AIR
Production cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Region <DefaultRegionForParallelWorld> -- -- is not associated to any world.
Root logical volume(s) :
Pointers : G4VUserRegionInformation[0], G4UserLimits[0], G4FastSimulationManager[0], G4UserSteppingAction[0]
Materials :
Production cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
========= Table of registered couples ==============================
Index : 0 used in the geometry : Yes
Material : Air
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 1 used in the geometry : Yes
Material : G4_WATER
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 2.94056 keV e- 351.877 keV e+ 342.545 keV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 2 used in the geometry : Yes
Material : G4_AIR
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
====================================================================
Start closing geometry.
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 0 kByte
Total CPU time elapsed for geometry optimisation: 0 seconds
/vis/scene/notifyHandlers scene-0
G4ASCIITreeSceneHandler::BeginModeling: writing to G4 standard output (G4cout)
# Set verbosity with "/vis/ASCIITree/verbose <verbosity>":
# < 10: - does not print daughters of repeated placements, does not repeat replicas.
# >= 10: prints all physical volumes.
# The level of detail is given by verbosity%10:
# for each volume:
# >= 0: physical volume name.
# >= 1: logical volume name (and names of sensitive detector and readout geometry, if any).
# >= 2: solid name and type.
# >= 3: volume and density.
# >= 5: daughter-subtracted volume and mass.
# and in the summary at the end of printing:
# >= 4: daughter-included mass of top physical volume(s) in scene to depth specified.
# Note: by default, culling is switched off so all volumes are seen.
# Note: the mass calculation takes into account daughters, which can be time consuming. If you want the mass of a particular subtree to a particular depth:
# /vis/open ATree
# /vis/ASCIITree/verbose 14
# /vis/scene/create
# /vis/scene/add/volume <subtree-physical-volume> ! <depth>
# /vis/sceneHandler/attach
# /vis/viewer/flush
# Now printing with verbosity 0
# Format is: PV:n
# Abbreviations: PV = Physical Volume, LV = Logical Volume,
# SD = Sensitive Detector, RO = Read Out Geometry.
"world":0
"my tube":1
"sphere":1
G4ASCIITreeSceneHandler::EndModeling
### Run 0 starts.
Run terminated.
Run Summary
Number of events processed : 10
User=0s Real=0s Sys=0s
WARNING: 10 events have been kept for refreshing and/or reviewing.
"/vis/reviewKeptEvents" to review them.
G4ASCIITreeSceneHandler::BeginModeling: writing to G4 standard output (G4cout)
# Set verbosity with "/vis/ASCIITree/verbose <verbosity>":
# < 10: - does not print daughters of repeated placements, does not repeat replicas.
# >= 10: prints all physical volumes.
# The level of detail is given by verbosity%10:
# for each volume:
# >= 0: physical volume name.
# >= 1: logical volume name (and names of sensitive detector and readout geometry, if any).
# >= 2: solid name and type.
# >= 3: volume and density.
# >= 5: daughter-subtracted volume and mass.
# and in the summary at the end of printing:
# >= 4: daughter-included mass of top physical volume(s) in scene to depth specified.
# Note: by default, culling is switched off so all volumes are seen.
# Note: the mass calculation takes into account daughters, which can be time consuming. If you want the mass of a particular subtree to a particular depth:
# /vis/open ATree
# /vis/ASCIITree/verbose 14
# /vis/scene/create
# /vis/scene/add/volume <subtree-physical-volume> ! <depth>
# /vis/sceneHandler/attach
# /vis/viewer/flush
# Now printing with verbosity 0
# Format is: PV:n
# Abbreviations: PV = Physical Volume, LV = Logical Volume,
# SD = Sensitive Detector, RO = Read Out Geometry.
"world":0
"my tube":1
"sphere":1
G4ASCIITreeSceneHandler::EndModeling
Graphics systems deleted.
Visualization Manager deleting...
G4 kernel has come to Quit state.
UserDetectorConstruction deleted.
UserPhysicsList deleted.
UserActionInitialization deleted.
UserRunAction deleted.
UserPrimaryGenerator deleted.
RunManager is deleting RunManagerKernel.
EventManager deleted.
Units table cleared.
================== Deleting memory pools ===================
Number of memory pools allocated: 13 of which, static: 0
Dynamic pools deleted: 13 / Total memory freed: 0.29 Mb
============================================================
G4Allocator objects are deleted.
UImanager deleted.
StateManager deleted.
RunManagerKernel is deleted. Good bye :)
@@ -0,0 +1,52 @@
//
// ********************************************************************
// * 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: ActionInitialization.hh 70266 2013-05-28 12:57:34Z jjacquem $
//
/// \file persistency/P03/include/ExTGActionInitialization.hh
/// \brief Definition of the ActionInitialization class
#ifndef ExTGActionInitialization_h
#define ExTGActionInitialization_h 1
#include "G4VUserActionInitialization.hh"
/// Action initialization class.
///
class ExTGActionInitialization : public G4VUserActionInitialization
{
public:
ExTGActionInitialization();
virtual ~ExTGActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
};
#endif
@@ -26,7 +26,7 @@
/// \file persistency/P03/include/ExTGDetectorConstruction.hh
/// \brief Definition of the ExTGDetectorConstruction class
//
// $Id$
// $Id: ExTGDetectorConstruction.hh 68025 2013-03-13 13:43:46Z gcosmo $
#ifndef ExTGDetectorConstruction_HH
#define ExTGDetectorConstruction_HH
@@ -26,7 +26,7 @@
/// \file persistency/P03/include/ExTGDetectorConstructionWithCpp.hh
/// \brief Definition of the ExTGDetectorConstructionWithCpp class
//
// $Id$
// $Id: ExTGDetectorConstructionWithCpp.hh 68025 2013-03-13 13:43:46Z gcosmo $
#ifndef ExTGDetectorConstructionWithCpp_HH
#define ExTGDetectorConstructionWithCpp_HH
@@ -26,7 +26,7 @@
/// \file persistency/P03/include/ExTGDetectorConstructionWithCuts.hh
/// \brief Definition of the ExTGDetectorConstructionWithCuts class
//
// $Id$
// $Id: ExTGDetectorConstructionWithCuts.hh 68025 2013-03-13 13:43:46Z gcosmo $
#ifndef ExTGDetectorConstructionWithCuts_HH
#define ExTGDetectorConstructionWithCuts_HH
@@ -26,7 +26,7 @@
/// \file persistency/P03/include/ExTGDetectorConstructionWithSD.hh
/// \brief Definition of the ExTGDetectorConstructionWithSD class
//
// $Id$
// $Id: ExTGDetectorConstructionWithSD.hh 76481 2013-11-11 10:49:21Z gcosmo $
#ifndef ExTGDetectorConstructionWithSD_h
#define ExTGDetectorConstructionWithSD_h 1
@@ -46,6 +46,7 @@ class ExTGDetectorConstructionWithSD : public G4VUserDetectorConstruction
~ExTGDetectorConstructionWithSD();
G4VPhysicalVolume* Construct();
void ConstructSDandField();
private:
@@ -23,44 +23,33 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: ExTGPhysicsList.hh 76943 2013-11-19 09:57:34Z gcosmo $
//
/// \file persistency/P03/include/ExTGPhysicsList.hh
/// \brief Definition of the ExTGPhysicsList class
//
// $Id$
#ifndef ExTGPhysicsList_h
#define ExTGPhysicsList_h 1
#include "G4VUserPhysicsList.hh"
#include "G4VModularPhysicsList.hh"
/// Example of physics list
/// Modular physics list
///
/// It includes the folowing physics builders
/// - G4DecayPhysics
/// - G4RadioactiveDecayPhysics
/// - G4EmStandardPhysics
class ExTGPhysicsList : public G4VUserPhysicsList
class ExTGPhysicsList: public G4VModularPhysicsList
{
public:
public:
ExTGPhysicsList();
virtual ~ExTGPhysicsList();
ExTGPhysicsList();
~ExTGPhysicsList();
protected:
// Construct particle and physics
void ConstructParticle();
void ConstructProcess();
void SetCuts();
void ConstructBosons();
void ConstructLeptons();
void ConstructMesons();
void ConstructBaryons();
// Construct physics processes and register them
void ConstructGeneral();
void ConstructEM();
virtual void SetCuts();
};
// ---------------------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -26,7 +26,7 @@
/// \file persistency/P03/include/ExTGPrimaryGeneratorAction.hh
/// \brief Definition of the ExTGPrimaryGeneratorAction class
//
// $Id$
// $Id: ExTGPrimaryGeneratorAction.hh 68025 2013-03-13 13:43:46Z gcosmo $
#ifndef ExTGPrimaryGeneratorAction_h
#define ExTGPrimaryGeneratorAction_h 1
@@ -26,7 +26,7 @@
/// \file persistency/P03/include/ExTGRCDetectorBuilder.hh
/// \brief Definition of the ExTGRCDetectorBuilder class
//
// $Id$
// $Id: ExTGRCDetectorBuilder.hh 68025 2013-03-13 13:43:46Z gcosmo $
#ifndef ExTGRCDetectorBuilder_h
#define ExTGRCDetectorBuilder_h
@@ -26,7 +26,7 @@
/// \file persistency/P03/include/ExTGRCLineProcessor.hh
/// \brief Definition of the ExTGRCLineProcessor class
//
// $Id$
// $Id: ExTGRCLineProcessor.hh 68025 2013-03-13 13:43:46Z gcosmo $
#ifndef ExTGRCLineProcessor_H
#define ExTGRCLineProcessor_H 1
@@ -26,7 +26,7 @@
/// \file persistency/P03/include/ExTGRCRegionCutsMgr.hh
/// \brief Definition of the ExTGRCRegionCutsMgr class
//
// $Id$
// $Id: ExTGRCRegionCutsMgr.hh 68025 2013-03-13 13:43:46Z gcosmo $
#ifndef ExTGRCRegionCutsMgr_h
#define ExTGRCRegionCutsMgr_h
@@ -26,7 +26,7 @@
/// \file persistency/P03/include/ExTGRCRegionData.hh
/// \brief Definition of the ExTGRCRegionData class
//
// $Id$
// $Id: ExTGRCRegionData.hh 68025 2013-03-13 13:43:46Z gcosmo $
#ifndef ExTGRCRegionData_h
#define ExTGRCRegionData_h
@@ -26,7 +26,7 @@
/// \file persistency/P03/include/ExTGRunAction.hh
/// \brief Definition of the ExTGRunAction class
//
// $Id$
// $Id: ExTGRunAction.hh 68025 2013-03-13 13:43:46Z gcosmo $
#ifndef ExTGRunAction_h
#define ExTGRunAction_h 1
@@ -26,7 +26,7 @@
/// \file persistency/P03/include/ExTGTrackerHit.hh
/// \brief Definition of the ExTGTrackerHit class
//
// $Id$
// $Id: ExTGTrackerHit.hh 76481 2013-11-11 10:49:21Z gcosmo $
#ifndef ExTGTrackerHit_h
#define ExTGTrackerHit_h 1
@@ -76,22 +76,22 @@ class ExTGTrackerHit : public G4VHit
typedef G4THitsCollection<ExTGTrackerHit> ExTGTrackerHitsCollection;
extern G4Allocator<ExTGTrackerHit> ExTGTrackerHitAllocator;
extern G4ThreadLocal G4Allocator<ExTGTrackerHit>* ExTGTrackerHitAllocator;
// ---------------------------------------------------------------------------
inline void* ExTGTrackerHit::operator new(size_t)
{
void *aHit;
aHit = (void *) ExTGTrackerHitAllocator.MallocSingle();
return aHit;
if(!ExTGTrackerHitAllocator)
ExTGTrackerHitAllocator = new G4Allocator<ExTGTrackerHit>;
return (void *) ExTGTrackerHitAllocator->MallocSingle();
}
// ---------------------------------------------------------------------------
inline void ExTGTrackerHit::operator delete(void *aHit)
inline void ExTGTrackerHit::operator delete(void *hit)
{
ExTGTrackerHitAllocator.FreeSingle((ExTGTrackerHit*) aHit);
ExTGTrackerHitAllocator->FreeSingle((ExTGTrackerHit*) hit);
}
// ---------------------------------------------------------------------------
@@ -26,7 +26,7 @@
/// \file persistency/P03/include/ExTGTrackerSD.hh
/// \brief Definition of the ExTGTrackerSD class
//
// $Id$
// $Id: ExTGTrackerSD.hh 68025 2013-03-13 13:43:46Z gcosmo $
#ifndef ExTGTrackerSD_h
#define ExTGTrackerSD_h 1
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * 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: ExTGActionInitialization.cc 74184 2013-09-30 14:05:02Z ihrivnac $
//
/// \file persistency/P03/src/ExTGActionInitialization.cc
/// \brief Implementation of the ExTGActionInitialization class
#include "ExTGActionInitialization.hh"
#include "ExTGRunAction.hh"
#include "ExTGPrimaryGeneratorAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExTGActionInitialization::ExTGActionInitialization()
: G4VUserActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExTGActionInitialization::~ExTGActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExTGActionInitialization::BuildForMaster() const
{
SetUserAction(new ExTGRunAction);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExTGActionInitialization::Build() const
{
SetUserAction(new ExTGRunAction);
SetUserAction(new ExTGPrimaryGeneratorAction);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,9 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: ExTGDetectorConstruction.cc 76943 2013-11-19 09:57:34Z gcosmo $
//
/// \file ExTGDetectorConstruction.cc
/// \file persistency/P03/src/ExTGDetectorConstruction.cc
/// \brief Implementation of the ExTGDetectorConstruction class
#include "G4tgbVolumeMgr.hh"
@@ -23,9 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: ExTGDetectorConstructionWithCpp.cc 76943 2013-11-19 09:57:34Z gcosmo $
//
/// \file ExTGDetectorConstructionWithCpp.cc
/// \file persistency/P03/src/ExTGDetectorConstructionWithCpp.cc
/// \brief Implementation of the ExTGDetectorConstructionWithCpp class
#include "G4tgbVolumeMgr.hh"
@@ -23,9 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: ExTGDetectorConstructionWithCuts.cc 76943 2013-11-19 09:57:34Z gcosmo $
//
/// \file ExTGDetectorConstructionWithCuts.cc
/// \file persistency/P03/src/ExTGDetectorConstructionWithCuts.cc
/// \brief Implementation of the ExTGDetectorConstructionWithCuts class
#include "ExTGDetectorConstructionWithCuts.hh"
@@ -24,9 +24,9 @@
// ********************************************************************
//
//
// $Id$
// $Id: ExTGDetectorConstructionWithSD.cc 76943 2013-11-19 09:57:34Z gcosmo $
//
/// \file ExTGDetectorConstructionWithSD.cc
/// \file persistency/P03/src/ExTGDetectorConstructionWithSD.cc
/// \brief Implementation of the ExTGDetectorConstructionWithSD class
@@ -66,27 +66,29 @@ G4VPhysicalVolume* ExTGDetectorConstructionWithSD::Construct()
//------------------------------------------------
G4VPhysicalVolume* physiWorld = volmgr->ReadAndConstructDetector();
return physiWorld;
}
void ExTGDetectorConstructionWithSD::ConstructSDandField()
{
//------------------------------------------------
// Sensitive detectors
//------------------------------------------------
G4SDManager* SDman = G4SDManager::GetSDMpointer();
G4String trackerChamberSDname = "ExTextGeom/TrackerChamberSD";
ExTGTrackerSD* aTrackerSD = new ExTGTrackerSD( trackerChamberSDname );
SDman->AddNewDetector( aTrackerSD );
G4LogicalVolume * logicChamber =
G4tgbVolumeMgr::GetInstance()->FindG4LogVol("Chamber",0);
if(logicChamber)
{
logicChamber->SetSensitiveDetector( aTrackerSD );
SetSensitiveDetector("Chamber", aTrackerSD );
}
else
{
G4Exception("ExTGDetectorConstructionWithSD::Construct()",
"InvalidGeometry", JustWarning,
"Volume does not exists in geometry: Chamber.");
"Volume does not exists in geometry: Chamber");
}
return physiWorld;
}
@@ -23,211 +23,42 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: ExTGPhysicsList.cc 76943 2013-11-19 09:57:34Z gcosmo $
//
// $Id$
//
/// \file ExTGPhysicsList.cc
/// \file persistency/P03/src/ExTGPhysicsList.cc
/// \brief Implementation of the ExTGPhysicsList class
#include "globals.hh"
#include "ExTGPhysicsList.hh"
#include "G4ProcessManager.hh"
#include "G4ParticleTypes.hh"
#include "G4SystemOfUnits.hh"
#include "G4DecayPhysics.hh"
#include "G4RadioactiveDecayPhysics.hh"
#include "G4EmStandardPhysics.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExTGPhysicsList::ExTGPhysicsList(): G4VUserPhysicsList()
{
defaultCutValue = 1.0*cm;
SetVerboseLevel(1);
ExTGPhysicsList::ExTGPhysicsList()
: G4VModularPhysicsList(){
SetVerboseLevel(1);
// Default physics
RegisterPhysics(new G4DecayPhysics());
// Radioactive decay
RegisterPhysics(new G4RadioactiveDecayPhysics());
// EM physics
RegisterPhysics(new G4EmStandardPhysics());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExTGPhysicsList::~ExTGPhysicsList()
{
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExTGPhysicsList::ConstructParticle()
{
// In this method, static member functions should be called
// for all particles which you want to use.
// This ensures that objects of these particle types will be
// created in the program.
ConstructBosons();
ConstructLeptons();
ConstructMesons();
ConstructBaryons();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExTGPhysicsList::ConstructBosons()
{
// pseudo-particles
G4Geantino::GeantinoDefinition();
G4ChargedGeantino::ChargedGeantinoDefinition();
// gamma
G4Gamma::GammaDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExTGPhysicsList::ConstructLeptons()
{
// leptons
// e+/-
G4Electron::ElectronDefinition();
G4Positron::PositronDefinition();
// mu+/-
G4MuonPlus::MuonPlusDefinition();
G4MuonMinus::MuonMinusDefinition();
// nu_e
G4NeutrinoE::NeutrinoEDefinition();
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
// nu_mu
G4NeutrinoMu::NeutrinoMuDefinition();
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExTGPhysicsList::ConstructMesons()
{
// mesons
// light mesons
G4PionPlus::PionPlusDefinition();
G4PionMinus::PionMinusDefinition();
G4PionZero::PionZeroDefinition();
G4Eta::EtaDefinition();
G4EtaPrime::EtaPrimeDefinition();
G4KaonPlus::KaonPlusDefinition();
G4KaonMinus::KaonMinusDefinition();
G4KaonZero::KaonZeroDefinition();
G4AntiKaonZero::AntiKaonZeroDefinition();
G4KaonZeroLong::KaonZeroLongDefinition();
G4KaonZeroShort::KaonZeroShortDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExTGPhysicsList::ConstructBaryons()
{
// barions
G4Proton::ProtonDefinition();
G4AntiProton::AntiProtonDefinition();
G4Neutron::NeutronDefinition();
G4AntiNeutron::AntiNeutronDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExTGPhysicsList::ConstructProcess()
{
AddTransportation();
ConstructEM();
ConstructGeneral();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4eMultipleScattering.hh"
#include "G4MuMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
#include "G4StepLimiter.hh"
#include "G4UserSpecialCuts.hh"
void ExTGPhysicsList::ConstructEM()
{
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
// gamma
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
pmanager->AddDiscreteProcess(new G4ComptonScattering);
pmanager->AddDiscreteProcess(new G4GammaConversion);
} else if (particleName == "e-") {
//electron
pmanager->AddProcess(new G4eMultipleScattering,-1, 1,1);
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
} else if (particleName == "e+") {
//positron
pmanager->AddProcess(new G4eMultipleScattering,-1, 1,1);
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
} else if( particleName == "mu+" ||
particleName == "mu-" ) {
//muon
pmanager->AddProcess(new G4MuMultipleScattering,-1, 1,1);
pmanager->AddProcess(new G4MuIonisation, -1, 2,2);
pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3,3);
pmanager->AddProcess(new G4MuPairProduction, -1, 4,4);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
//all others charged particles except geantino
pmanager->AddProcess(new G4hMultipleScattering,-1, 1,1);
pmanager->AddProcess(new G4hIonisation, -1, 2,2);
//step limit
pmanager->AddProcess(new G4StepLimiter, -1,-1,3);
///pmanager->AddProcess(new G4UserSpecialCuts, -1,-1,4);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4Decay.hh"
void ExTGPhysicsList::ConstructGeneral()
{
// Add Decay Process
G4Decay* theDecayProcess = new G4Decay();
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (theDecayProcess->IsApplicable(*particle)) {
pmanager ->AddProcess(theDecayProcess);
// set ordering for PostStepDoIt and AtRestDoIt
pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExTGPhysicsList::SetCuts()
{
//G4VUserPhysicsList::SetCutsWithDefault method sets
//the default cut value for all particle types
//
SetCutsWithDefault();
if (verboseLevel>0) DumpCutValuesTable();
}
G4VUserPhysicsList::SetCuts();
}
@@ -23,9 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: ExTGPrimaryGeneratorAction.cc 76943 2013-11-19 09:57:34Z gcosmo $
//
/// \file ExTGPrimaryGeneratorAction.cc
/// \file persistency/P03/src/ExTGPrimaryGeneratorAction.cc
/// \brief Implementation of the ExTGPrimaryGeneratorAction class
#include "ExTGPrimaryGeneratorAction.hh"
@@ -23,9 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: ExTGRCDetectorBuilder.cc 76943 2013-11-19 09:57:34Z gcosmo $
//
/// \file ExTGRCDetectorBuilder.cc
/// \file persistency/P03/src/ExTGRCDetectorBuilder.cc
/// \brief Implementation of the ExTGRCDetectorBuilder class
#include "ExTGRCDetectorBuilder.hh"
@@ -23,9 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: ExTGRCLineProcessor.cc 76943 2013-11-19 09:57:34Z gcosmo $
//
/// \file ExTGRCLineProcessor.cc
/// \file persistency/P03/src/ExTGRCLineProcessor.cc
/// \brief Implementation of the ExTGRCLineProcessor class
#include "ExTGRCLineProcessor.hh"
@@ -23,9 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: ExTGRCRegionCutsMgr.cc 76943 2013-11-19 09:57:34Z gcosmo $
//
/// \file ExTGRCRegionCutsMgr.cc
/// \file persistency/P03/src/ExTGRCRegionCutsMgr.cc
/// \brief Implementation of the ExTGRCRegionCutsMgr class
#include "ExTGRCRegionCutsMgr.hh"
@@ -23,9 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: ExTGRCRegionData.cc 76943 2013-11-19 09:57:34Z gcosmo $
//
/// \file ExTGRCRegionData.cc
/// \file persistency/P03/src/ExTGRCRegionData.cc
/// \brief Implementation of the ExTGRCRegionData class
@@ -23,9 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: ExTGRunAction.cc 76943 2013-11-19 09:57:34Z gcosmo $
//
/// \file ExTGRunAction.cc
/// \file persistency/P03/src/ExTGRunAction.cc
/// \brief Implementation of the ExTGRunAction class
#include "ExTGRunAction.hh"
@@ -45,7 +45,7 @@ ExTGRunAction::~ExTGRunAction()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExTGRunAction::BeginOfRunAction(const G4Run* )
{
G4tgbGeometryDumper::GetInstance()->DumpGeometry("geom.txt");
if( IsMaster() ) G4tgbGeometryDumper::GetInstance()->DumpGeometry("geom.txt");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,9 +24,9 @@
// ********************************************************************
//
//
// $Id$
// $Id: ExTGTrackerHit.cc 76943 2013-11-19 09:57:34Z gcosmo $
//
/// \file ExTGTrackerHit.cc
/// \file persistency/P03/src/ExTGTrackerHit.cc
/// \brief Implementation of the ExTGTrackerHit class
#include "ExTGTrackerHit.hh"
@@ -36,7 +36,7 @@
#include "G4Colour.hh"
#include "G4VisAttributes.hh"
G4Allocator<ExTGTrackerHit> ExTGTrackerHitAllocator;
G4ThreadLocal G4Allocator<ExTGTrackerHit>* ExTGTrackerHitAllocator = 0;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExTGTrackerHit::ExTGTrackerHit()
@@ -24,9 +24,9 @@
// ********************************************************************
//
//
// $Id$
// $Id: ExTGTrackerSD.cc 76943 2013-11-19 09:57:34Z gcosmo $
//
/// \file ExTGTrackerSD.cc
/// \file persistency/P03/src/ExTGTrackerSD.cc
/// \brief Implementation of the ExTGTrackerSD class
#include "ExTGTrackerSD.hh"
+19 -5
View File
@@ -23,6 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: textGeom.cc 76481 2013-11-11 10:49:21Z gcosmo $
//
/// \file persistency/P03/textGeom.cc
/// \brief Main program of the persistency/P03 example
//
@@ -34,9 +36,14 @@
#include "ExTGDetectorConstructionWithCuts.hh"
#include "ExTGPhysicsList.hh"
#include "ExTGPrimaryGeneratorAction.hh"
#include "ExTGRunAction.hh"
#include "ExTGActionInitialization.hh"
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
#else
#include "G4RunManager.hh"
#endif
#include "G4UImanager.hh"
#ifdef G4VIS_USE
@@ -53,7 +60,12 @@ int main(int argc,char** argv)
{
// Run manager
//
G4RunManager * runManager = new G4RunManager;
#ifdef G4MULTITHREADED
G4MTRunManager* runManager = new G4MTRunManager;
runManager->SetNumberOfThreads(1);
#else
G4RunManager* runManager = new G4RunManager;
#endif
// User Initialization classes (mandatory)
//
@@ -61,13 +73,15 @@ int main(int argc,char** argv)
//
runManager->SetUserInitialization(new ExTGPhysicsList);
// User Action classes
//
runManager->SetUserAction(new ExTGPrimaryGeneratorAction);
//MT runManager->SetUserAction(new ExTGPrimaryGeneratorAction);
runManager->SetUserInitialization(new ExTGActionInitialization);
// Run action that dumps GEANT4 in-memory geometry to text file
runManager->SetUserAction(new ExTGRunAction);
//MT runManager->SetUserAction(new ExTGRunAction);
// Initialize G4 kernel
//