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
+24 -5
View File
@@ -2,14 +2,33 @@
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
add_subdirectory(P01)
add_subdirectory(P02)
add_subdirectory(P03)
find_package(Geant4)
include(${Geant4_USE_FILE})
#----------------------------------------------------------------------------
# gdml examles require Geant4 build with gdml
# P01, P02 examples require ROOT, GCCXML, BUILD_SHARED_LIBS
#
find_package(ROOT QUIET)
if(ROOT_FOUND AND GCCXML AND Geant4_shared_FOUND)
#if(ROOT_FOUND AND GCCXML)
add_subdirectory(P01)
add_subdirectory(P02)
else()
if(NOT ROOT_FOUND)
message(STATUS "G4 Examples: ROOT package not found. ")
endif()
if(NOT GCCXML)
message(STATUS "G4 Examples: GCCXML not found.")
endif()
if(NOT Geant4_shared_FOUND)
message(STATUS "G4 Examples: Shared Libraires not available.")
endif()
message(STATUS "P01, P02 disabled")
endif()
#----------------------------------------------------------------------------
# gdml examples require Geant4 build with gdml
#
find_package(Geant4)
if(Geant4_gdml_FOUND)
add_subdirectory(gdml)
else()
+8 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.12 2008-08-27 10:39:40 gcosmo Exp $
$Id: History 70248 2013-05-27 15:43:20Z gcosmo $
--------------------------------------------------
=========================================================
@@ -16,6 +16,13 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
May 27th, 2013 I. Hrivnacova (exPersistency-V09-06-01)
- Fixed handling required packages/options in CMake files
February 15th, 2013 I. Hrivnacova (exPersistency-V09-06-00)
- Applied coding guidelines in gdml (virtual keyword, data members
initialization)
November 17th, 2012 I. Hrivnacova (exPersistency-V09-05-08)
- Fixed .README files for artefacts from Markdown support
- Removed/updated obsolete instructions (how to compile & link)
@@ -23,22 +23,20 @@ include(${Geant4_USE_FILE})
#----------------------------------------------------------------------------
# Find ROOT (required package)
#
find_package(ROOT QUIET)
if(NOT ROOT_FOUND)
message(STATUS "G4 Examples: ROOT package not found. --> P01 example disabled")
return()
endif()
find_package(ROOT REQUIRED)
#----------------------------------------------------------------------------
# P01 requires GCCXML
#
if(NOT GCCXML)
message(STATUS "G4 Examples: GCCXML not found. --> P01 example disabled")
return()
message(FATAL_ERROR "P01 requires GCCXML")
endif()
#----------------------------------------------------------------------------
# P01 requires shared libraries
#
if(BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS )
message(STATUS "G4 Examples: Building only Static Libraires. --> P01 example disabled")
return()
if(NOT Geant4_shared_FOUND)
message(FATAL_ERROR "P01 must use shared libraries")
endif()
#----------------------------------------------------------------------------
@@ -53,7 +51,7 @@ file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
#----------------------------------------------------------------------------
# Generate dictionaries, add ROOT libraries properties
#
REFLEX_GENERATE_DICTIONARY(ExP01Classes include/ExP01Classes.hh SELECTION xml/selection.xml)
REFLEX_GENERATE_DICTIONARY(ExP01Classes include/ExP01Classes.hh SELECTION xml/selection.xml) # OPTIONS --gccxmlopt="--gccxml-compiler g++")
add_library(ExP01ClassesDict SHARED ${sources} ExP01Classes.cpp)
set(libsuffix .so)
set(ROOT_LIBRARY_PROPERTIES ${ROOT_LIBRARY_PROPERTIES} SUFFIX ${libsuffix})
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.4 2010-12-01 14:18:27 witoldp Exp $
# $Id: GNUmakefile 68025 2013-03-13 13:43:46Z gcosmo $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
+18 -2
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.4 2010-12-03 14:42:14 gcosmo Exp $
$Id: History 73396 2013-08-27 09:29:21Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,7 +14,23 @@ track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Nvember 14th, 2012 P. Mato (exampleP01-V09-05-08)
August 27th, 2013 G. Cosmo (exampleP01-V09-06-03)
- Added G4Ellipsoid among solids enabled for parameterisation.
June 17th, 2013 I. Hrivnacova (exampleP01-V09-06-02)
- Applied coding guidelines (data members names, intialization, separators)
June 14th, 2013 W. Pokorski (exampleP01-V09-06-01)
- changing the names of the members according to coding convention
June 10th, 2013 W. Pokorski (exampleP01-V09-06-00)
- changes to comply to coding rules
May 27th, 2013 I. Hrivnacova
- Fixed handling required packages/options in CMake files
November 14th, 2012 P. Mato (exampleP01-V09-05-08)
- Fixed compilation warning
October 11th, 2012 A. Dotti (exampleP01-V09-05-07)
@@ -27,7 +27,7 @@
/// \brief Main program of the persistency/P01 example
//
//
// $Id$
// $Id: exampleP01.cc 68025 2013-03-13 13:43:46Z gcosmo $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Definition of the ExP01ChamberParameterisation class
//
//
// $Id$
// $Id: ExP01ChamberParameterisation.hh 73396 2013-08-27 09:29:21Z gcosmo $
//
//
// A parameterisation that describes a series of boxes along Z
@@ -52,6 +52,7 @@ class G4Trap;
class G4Cons;
class G4Orb;
class G4Sphere;
class G4Ellipsoid;
class G4Torus;
class G4Para;
class G4Hype;
@@ -73,8 +74,7 @@ class ExP01ChamberParameterisation : public G4VPVParameterisation
G4double widthChamber,
G4double lengthInitial,
G4double lengthFinal );
virtual
~ExP01ChamberParameterisation();
void ComputeTransformation (const G4int copyNo,
@@ -90,12 +90,14 @@ class ExP01ChamberParameterisation : public G4VPVParameterisation
void ComputeDimensions (G4Cons&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Sphere&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Orb&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Ellipsoid&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Torus&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Para&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Hype&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Tubs&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Polycone&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Polyhedra&,const G4int,const G4VPhysicalVolume*) const {}
private:
G4int fNoChambers;
@@ -26,6 +26,8 @@
/// \file persistency/P01/include/ExP01Classes.hh
/// \brief Declaration of the classes for generating dictionaries
//
// $Id: ExP01Classes.hh 68025 2013-03-13 13:43:46Z gcosmo $
//
#include "ExP01TrackerHit.hh"
std::vector<ExP01TrackerHit*> a;
@@ -27,7 +27,7 @@
/// \brief Definition of the ExP01DetectorConstruction class
//
//
// $Id$
// $Id: ExP01DetectorConstruction.hh 71397 2013-06-14 15:05:31Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -58,10 +58,10 @@ class ExP01DetectorConstruction : public G4VUserDetectorConstruction
public:
G4VPhysicalVolume* Construct();
virtual G4VPhysicalVolume* Construct();
const
G4VPhysicalVolume* GetTracker() {return physiTracker;};
G4VPhysicalVolume* GetTracker() {return fPhysiTracker;};
G4double GetTrackerFullLength() {return fTrackerLength;};
G4double GetTargetFullLength() {return fTargetLength;};
G4double GetWorldFullLength() {return fWorldLength;};
@@ -72,34 +72,34 @@ class ExP01DetectorConstruction : public G4VUserDetectorConstruction
private:
G4Box* solidWorld; // pointer to the solid envelope
G4LogicalVolume* logicWorld; // pointer to the logical envelope
G4VPhysicalVolume* physiWorld; // pointer to the physical envelope
G4Box* fSolidWorld; // pointer to the solid envelope
G4LogicalVolume* fLogicWorld; // pointer to the logical envelope
G4VPhysicalVolume* fPhysiWorld; // pointer to the physical envelope
G4Box* solidTarget; // pointer to the solid Target
G4LogicalVolume* logicTarget; // pointer to the logical Target
G4VPhysicalVolume* physiTarget; // pointer to the physical Target
G4Box* fSolidTarget; // pointer to the solid Target
G4LogicalVolume* fLogicTarget; // pointer to the logical Target
G4VPhysicalVolume* fPhysiTarget; // pointer to the physical Target
G4Box* solidTracker; // pointer to the solid Tracker
G4LogicalVolume* logicTracker; // pointer to the logical Tracker
G4VPhysicalVolume* physiTracker; // pointer to the physical Tracker
G4Box* fSolidTracker; // pointer to the solid Tracker
G4LogicalVolume* fLogicTracker; // pointer to the logical Tracker
G4VPhysicalVolume* fPhysiTracker; // pointer to the physical Tracker
G4Box* solidChamber; // pointer to the solid Chamber
G4LogicalVolume* logicChamber; // pointer to the logical Chamber
G4VPhysicalVolume* physiChamber; // pointer to the physical Chamber
G4Box* fSolidChamber; // pointer to the solid Chamber
G4LogicalVolume* fLogicChamber; // pointer to the logical Chamber
G4VPhysicalVolume* fPhysiChamber; // pointer to the physical Chamber
G4Material* TargetMater; // pointer to the target material
G4Material* ChamberMater; // pointer to the chamber material
ExP01MagneticField* fpMagField; // pointer to the magnetic field
G4Material* fTargetMater; // pointer to the target material
G4Material* fChamberMater; // pointer to the chamber material
ExP01MagneticField* fPMagField; // pointer to the magnetic field
ExP01DetectorMessenger* detectorMessenger; // pointer to the Messenger
ExP01DetectorMessenger* fDetectorMessenger; // pointer to the Messenger
G4double fWorldLength; // Full length of the world volume
G4double fTargetLength; // Full length of Target
G4double fTrackerLength; // Full length of Tracker
G4int NbOfChambers; // Nb of chambers in the tracker region
G4double ChamberWidth; // width of the chambers
G4double ChamberSpacing; // distance between chambers
G4int fNbOfChambers; // Nb of chambers in the tracker region
G4double fChamberWidth; // width of the chambers
G4double fChamberSpacing; // distance between chambers
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Definition of the ExP01DetectorMessenger class
//
//
// $Id$
// $Id: ExP01DetectorMessenger.hh 71791 2013-06-24 14:08:28Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -53,16 +53,16 @@ class ExP01DetectorMessenger: public G4UImessenger
ExP01DetectorMessenger(ExP01DetectorConstruction*);
~ExP01DetectorMessenger();
void SetNewValue(G4UIcommand*, G4String);
virtual void SetNewValue(G4UIcommand*, G4String);
private:
ExP01DetectorConstruction* myDetector;
ExP01DetectorConstruction* fDetector;
G4UIdirectory* N02Dir;
G4UIdirectory* detDir;
G4UIcmdWithAString* TargMatCmd;
G4UIcmdWithAString* ChamMatCmd;
G4UIcmdWithADoubleAndUnit* FieldCmd;
G4UIdirectory* fN02Dir;
G4UIdirectory* fDetDir;
G4UIcmdWithAString* fTargMatCmd;
G4UIcmdWithAString* fChamMatCmd;
G4UIcmdWithADoubleAndUnit* fFieldCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Definition of the ExP01EventAction class
//
//
// $Id$
// $Id: ExP01EventAction.hh 71111 2013-06-11 10:51:02Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -50,8 +50,8 @@ class ExP01EventAction : public G4UserEventAction
~ExP01EventAction();
public:
void BeginOfEventAction(const G4Event*);
void EndOfEventAction(const G4Event*);
virtual void BeginOfEventAction(const G4Event*);
virtual void EndOfEventAction(const G4Event*);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Definition of the ExP01MagneticField class
//
//
// $Id$
// $Id: ExP01MagneticField.hh 68025 2013-03-13 13:43:46Z gcosmo $
//
//
// A class for control of the Magnetic Field of the detector.
@@ -27,7 +27,7 @@
/// \brief Definition of the ExP01PhysicsList class
//
//
// $Id$
// $Id: ExP01PhysicsList.hh 71111 2013-06-11 10:51:02Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -50,10 +50,10 @@ class ExP01PhysicsList: public G4VUserPhysicsList
protected:
// Construct particle and physics
void ConstructParticle();
void ConstructProcess();
virtual void ConstructParticle();
virtual void ConstructProcess();
void SetCuts();
virtual void SetCuts();
protected:
@@ -27,7 +27,7 @@
/// \brief Definition of the ExP01PrimaryGeneratorAction class
//
//
// $Id$
// $Id: ExP01PrimaryGeneratorAction.hh 71397 2013-06-14 15:05:31Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -52,11 +52,11 @@ class ExP01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
~ExP01PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event*);
virtual void GeneratePrimaries(G4Event*);
private:
G4ParticleGun* particleGun;
ExP01DetectorConstruction* myDetector;
G4ParticleGun* fParticleGun;
ExP01DetectorConstruction* fMyDetector;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Definition of the ExP01RunAction class
//
//
// $Id$
// $Id: ExP01RunAction.hh 71111 2013-06-11 10:51:02Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -51,8 +51,8 @@ class ExP01RunAction : public G4UserRunAction
~ExP01RunAction();
public:
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run*);
virtual void BeginOfRunAction(const G4Run*);
virtual void EndOfRunAction(const G4Run*);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Definition of the ExP01SteppingAction class
//
//
// $Id$
// $Id: ExP01SteppingAction.hh 71111 2013-06-11 10:51:02Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -47,7 +47,7 @@ class ExP01SteppingAction : public G4UserSteppingAction
ExP01SteppingAction();
~ExP01SteppingAction(){};
void UserSteppingAction(const G4Step*);
virtual void UserSteppingAction(const G4Step*);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Definition of the ExP01SteppingVerbose class
//
//
// $Id$
// $Id: ExP01SteppingVerbose.hh 71791 2013-06-24 14:08:28Z gcosmo $
//
// This class manages the verbose outputs in G4SteppingManager.
// It inherits from G4SteppingVerbose.
@@ -54,8 +54,8 @@ class ExP01SteppingVerbose : public G4SteppingVerbose
ExP01SteppingVerbose();
~ExP01SteppingVerbose();
void StepInfo();
void TrackingStarted();
virtual void StepInfo();
virtual void TrackingStarted();
};
@@ -27,7 +27,7 @@
/// \brief Definition of the ExP01TrackerHit class
//
//
// $Id$
// $Id: ExP01TrackerHit.hh 71397 2013-06-14 15:05:31Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -57,27 +57,27 @@ class ExP01TrackerHit : public G4VHit
inline void* operator new(size_t);
inline void operator delete(void*);
void Draw();
void Print();
virtual void Draw();
virtual void Print();
public:
void SetTrackID (G4int track) { trackID = track; };
void SetChamberNb(G4int chamb) { chamberNb = chamb; };
void SetEdep (G4double de) { edep = de; };
void SetPos (G4ThreeVector xyz){ pos = xyz; };
void SetTrackID (G4int track) { fTrackID = track; };
void SetChamberNb(G4int chamb) { fChamberNb = chamb; };
void SetEdep (G4double de) { fEdep = de; };
void SetPos (G4ThreeVector xyz){ fPos = xyz; };
G4int GetTrackID() { return trackID; };
G4int GetChamberNb() { return chamberNb; };
G4double GetEdep() { return edep; };
G4ThreeVector GetPos(){ return pos; };
G4int GetTrackID() { return fTrackID; };
G4int GetChamberNb() { return fChamberNb; };
G4double GetEdep() { return fEdep; };
G4ThreeVector GetPos(){ return fPos; };
private:
G4int trackID;
G4int chamberNb;
G4double edep;
G4ThreeVector pos;
G4int fTrackID;
G4int fChamberNb;
G4double fEdep;
G4ThreeVector fPos;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Definition of the ExP01TrackerSD class
//
//
// $Id$
// $Id: ExP01TrackerSD.hh 71111 2013-06-11 10:51:02Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -51,9 +51,9 @@ class ExP01TrackerSD : public G4VSensitiveDetector
ExP01TrackerSD(G4String);
~ExP01TrackerSD();
void Initialize(G4HCofThisEvent*);
G4bool ProcessHits(G4Step*, G4TouchableHistory*);
void EndOfEvent(G4HCofThisEvent*);
virtual void Initialize(G4HCofThisEvent*);
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
virtual void EndOfEvent(G4HCofThisEvent*);
private:
ExP01TrackerHitsCollection* fTrackerCollection;
@@ -26,7 +26,7 @@
/// \file persistency/P01/include/RootIO.hh
/// \brief Definition of the RootIO class
//
// $Id$
// $Id: RootIO.hh 71791 2013-06-24 14:08:28Z gcosmo $
#ifndef INCLUDE_ROOTIO_HH
#define INCLUDE_ROOTIO_HH 1
@@ -60,8 +60,8 @@ protected:
private:
TFile* fo;
int Nevents;
TFile* fFile;
int fNevents;
};
#endif // INCLUDE_ROOTIO_HH
@@ -23,6 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: readHits.cc 68025 2013-03-13 13:43:46Z gcosmo $
//
/// \file persistency/P01/readHits.cc
/// \brief Main program of the persistency/P01 example
//
@@ -27,7 +27,7 @@
/// \brief Implementation of the ExP01ChamberParameterisation class
//
//
// $Id$
// $Id: ExP01ChamberParameterisation.cc 71791 2013-06-24 14:08:28Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -47,6 +47,7 @@ ExP01ChamberParameterisation::ExP01ChamberParameterisation(
G4double widthChamber,
G4double lengthInitial,
G4double lengthFinal )
: G4VPVParameterisation()
{
fNoChambers = NoChambers;
fStartZ = startZ;
@@ -54,6 +55,7 @@ ExP01ChamberParameterisation::ExP01ChamberParameterisation(
fSpacing = spacingZ;
fHalfLengthFirst = 0.5 * lengthInitial;
// fHalfLengthLast = lengthFinal;
fHalfLengthIncr = 0;
if( NoChambers > 0 ){
fHalfLengthIncr = 0.5 * (lengthFinal-lengthInitial)/NoChambers;
if (spacingZ < widthChamber) {
@@ -27,7 +27,7 @@
/// \brief Implementation of the ExP01DetectorConstruction class
//
//
// $Id$
// $Id: ExP01DetectorConstruction.cc 71791 2013-06-24 14:08:28Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -56,24 +56,25 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP01DetectorConstruction::ExP01DetectorConstruction()
:solidWorld(0), logicWorld(0), physiWorld(0),
solidTarget(0), logicTarget(0), physiTarget(0),
solidTracker(0),logicTracker(0),physiTracker(0),
solidChamber(0),logicChamber(0),physiChamber(0),
TargetMater(0), ChamberMater(0),fpMagField(0),
fWorldLength(0.), fTargetLength(0.), fTrackerLength(0.),
NbOfChambers(0) , ChamberWidth(0.), ChamberSpacing(0.)
:G4VUserDetectorConstruction(),
fSolidWorld(0), fLogicWorld(0), fPhysiWorld(0),
fSolidTarget(0), fLogicTarget(0), fPhysiTarget(0),
fSolidTracker(0), fLogicTracker(0), fPhysiTracker(0),
fSolidChamber(0), fLogicChamber(0), fPhysiChamber(0),
fTargetMater(0), fChamberMater(0), fPMagField(0), fDetectorMessenger(0),
fWorldLength(0.), fTargetLength(0.), fTrackerLength(0.),
fNbOfChambers(0), fChamberWidth(0.), fChamberSpacing(0.)
{
fpMagField = new ExP01MagneticField();
detectorMessenger = new ExP01DetectorMessenger(this);
fPMagField = new ExP01MagneticField();
fDetectorMessenger = new ExP01DetectorMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP01DetectorConstruction::~ExP01DetectorConstruction()
{
delete fpMagField;
delete detectorMessenger;
delete fPMagField;
delete fDetectorMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -101,7 +102,7 @@ G4VPhysicalVolume* ExP01DetectorConstruction::Construct()
//Xenon gas
G4Material* Xenon =
new G4Material("XenonGas", z=54., a=131.29*g/mole, density= 5.458*mg/cm3,
kStateGas, temperature= 293.15*kelvin, pressure= 1*atmosphere);
kStateGas, temperature= 293.15*kelvin, pressure= 1*atmosphere);
// Print all the materials defined.
//
@@ -110,15 +111,15 @@ G4VPhysicalVolume* ExP01DetectorConstruction::Construct()
//--------- Sizes of the principal geometrical components (solids) ---------
NbOfChambers = 5;
ChamberWidth = 20*cm;
ChamberSpacing = 80*cm;
fNbOfChambers = 5;
fChamberWidth = 20*cm;
fChamberSpacing = 80*cm;
fTrackerLength = (NbOfChambers+1)*ChamberSpacing; // Full length of Tracker
fTrackerLength = (fNbOfChambers+1)*fChamberSpacing; // Full length of Tracker
fTargetLength = 5.0 * cm; // Full length of Target
TargetMater = Pb;
ChamberMater = Xenon;
fTargetMater = Pb;
fChamberMater = Xenon;
fWorldLength= 1.2 *(fTargetLength+fTrackerLength);
@@ -133,14 +134,14 @@ G4VPhysicalVolume* ExP01DetectorConstruction::Construct()
G4double HalfWorldLength = 0.5*fWorldLength;
solidWorld= new G4Box("world",HalfWorldLength,HalfWorldLength,HalfWorldLength);
logicWorld= new G4LogicalVolume( solidWorld, Air, "World", 0, 0, 0);
fSolidWorld= new G4Box("world",HalfWorldLength,HalfWorldLength,HalfWorldLength);
fLogicWorld= new G4LogicalVolume( fSolidWorld, Air, "World", 0, 0, 0);
// Must place the World Physical volume unrotated at (0,0,0).
//
physiWorld = new G4PVPlacement(0, // no rotation
fPhysiWorld = new G4PVPlacement(0, // no rotation
G4ThreeVector(), // at (0,0,0)
logicWorld, // its logical volume
fLogicWorld, // its logical volume
"World", // its name
0, // its mother volume
false, // no boolean operations
@@ -152,18 +153,18 @@ G4VPhysicalVolume* ExP01DetectorConstruction::Construct()
G4ThreeVector positionTarget = G4ThreeVector(0,0,-(targetSize+trackerSize));
solidTarget = new G4Box("target",targetSize,targetSize,targetSize);
logicTarget = new G4LogicalVolume(solidTarget,TargetMater,"Target",0,0,0);
physiTarget = new G4PVPlacement(0, // no rotation
fSolidTarget = new G4Box("target",targetSize,targetSize,targetSize);
fLogicTarget = new G4LogicalVolume(fSolidTarget,fTargetMater,"Target",0,0,0);
fPhysiTarget = new G4PVPlacement(0, // no rotation
positionTarget, // at (x,y,z)
logicTarget, // its logical volume
fLogicTarget, // its logical volume
"Target", // its name
logicWorld, // its mother volume
fLogicWorld, // its mother volume
false, // no boolean operations
0); // copy number
G4cout << "Target is " << fTargetLength/cm << " cm of "
<< TargetMater->GetName() << G4endl;
<< fTargetMater->GetName() << G4endl;
//------------------------------
// Tracker
@@ -171,13 +172,13 @@ G4VPhysicalVolume* ExP01DetectorConstruction::Construct()
G4ThreeVector positionTracker = G4ThreeVector(0,0,0);
solidTracker = new G4Box("tracker",trackerSize,trackerSize,trackerSize);
logicTracker = new G4LogicalVolume(solidTracker , Air, "Tracker",0,0,0);
physiTracker = new G4PVPlacement(0, // no rotation
fSolidTracker = new G4Box("tracker",trackerSize,trackerSize,trackerSize);
fLogicTracker = new G4LogicalVolume(fSolidTracker , Air, "Tracker",0,0,0);
fPhysiTracker = new G4PVPlacement(0, // no rotation
positionTracker, // at (x,y,z)
logicTracker, // its logical volume
fLogicTracker, // its logical volume
"Tracker", // its name
logicWorld, // its mother volume
fLogicWorld, // its mother volume
false, // no boolean operations
0); // copy number
@@ -188,35 +189,35 @@ G4VPhysicalVolume* ExP01DetectorConstruction::Construct()
// An example of Parameterised volumes
// dummy values for G4Box -- modified by parameterised volume
solidChamber = new G4Box("chamber", 100*cm, 100*cm, 10*cm);
logicChamber = new G4LogicalVolume(solidChamber,ChamberMater,"Chamber",0,0,0);
fSolidChamber = new G4Box("chamber", 100*cm, 100*cm, 10*cm);
fLogicChamber = new G4LogicalVolume(fSolidChamber, fChamberMater,"Chamber",0,0,0);
G4double firstPosition = -trackerSize + 0.5*ChamberWidth;
G4double firstPosition = -trackerSize + 0.5*fChamberWidth;
G4double firstLength = fTrackerLength/10;
G4double lastLength = fTrackerLength;
G4VPVParameterisation* chamberParam = new ExP01ChamberParameterisation(
NbOfChambers, // NoChambers
fNbOfChambers, // NoChambers
firstPosition, // Z of center of first
ChamberSpacing, // Z spacing of centers
ChamberWidth, // Width Chamber
fChamberSpacing, // Z spacing of centers
fChamberWidth, // Width Chamber
firstLength, // lengthInitial
lastLength); // lengthFinal
// dummy value : kZAxis -- modified by parameterised volume
//
physiChamber = new G4PVParameterised(
fPhysiChamber = new G4PVParameterised(
"Chamber", // their name
logicChamber, // their logical volume
logicTracker, // Mother logical volume
fLogicChamber, // their logical volume
fLogicTracker, // Mother logical volume
kZAxis, // Are placed along this axis
NbOfChambers, // Number of chambers
fNbOfChambers, // Number of chambers
chamberParam); // The parametrisation
G4cout << "There are " << NbOfChambers << " chambers in the tracker region. "
<< "The chambers are " << ChamberWidth/mm << " mm of "
<< ChamberMater->GetName() << "\n The distance between chamber is "
<< ChamberSpacing/cm << " cm" << G4endl;
G4cout << "There are " << fNbOfChambers << " chambers in the tracker region. "
<< "The chambers are " << fChamberWidth/mm << " mm of "
<< fChamberMater->GetName() << "\n The distance between chamber is "
<< fChamberSpacing/cm << " cm" << G4endl;
//------------------------------------------------
// Sensitive detectors
@@ -227,17 +228,17 @@ G4VPhysicalVolume* ExP01DetectorConstruction::Construct()
G4String trackerChamberSDname = "ExP01/TrackerChamberSD";
ExP01TrackerSD* aTrackerSD = new ExP01TrackerSD( trackerChamberSDname );
SDman->AddNewDetector( aTrackerSD );
logicChamber->SetSensitiveDetector( aTrackerSD );
fLogicChamber->SetSensitiveDetector( aTrackerSD );
//--------- Visualization attributes -------------------------------
G4VisAttributes* BoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
logicWorld ->SetVisAttributes(BoxVisAtt);
logicTarget ->SetVisAttributes(BoxVisAtt);
logicTracker->SetVisAttributes(BoxVisAtt);
fLogicWorld ->SetVisAttributes(BoxVisAtt);
fLogicTarget ->SetVisAttributes(BoxVisAtt);
fLogicTracker->SetVisAttributes(BoxVisAtt);
G4VisAttributes* ChamberVisAtt = new G4VisAttributes(G4Colour(1.0,1.0,0.0));
logicChamber->SetVisAttributes(ChamberVisAtt);
fLogicChamber->SetVisAttributes(ChamberVisAtt);
//--------- example of User Limits -------------------------------
@@ -247,8 +248,8 @@ G4VPhysicalVolume* ExP01DetectorConstruction::Construct()
// Sets a max Step length in the tracker region, with G4StepLimiter
//
G4double maxStep = 0.5*ChamberWidth;
logicTracker->SetUserLimits(new G4UserLimits(maxStep));
G4double maxStep = 0.5*fChamberWidth;
fLogicTracker->SetUserLimits(new G4UserLimits(maxStep));
// Set additional contraints on the track, with G4UserSpecialCuts
//
@@ -256,7 +257,7 @@ G4VPhysicalVolume* ExP01DetectorConstruction::Construct()
// logicTracker->SetUserLimits(new G4UserLimits(maxStep,maxLength,maxTime,
// minEkin));
return physiWorld;
return fPhysiWorld;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -266,8 +267,8 @@ void ExP01DetectorConstruction::setTargetMaterial(G4String materialName)
// search the material by its name
G4Material* pttoMaterial = G4Material::GetMaterial(materialName);
if (pttoMaterial)
{TargetMater = pttoMaterial;
logicTarget->SetMaterial(pttoMaterial);
{fTargetMater = pttoMaterial;
fLogicTarget->SetMaterial(pttoMaterial);
G4cout << "\n----> The target is " << fTargetLength/cm << " cm of "
<< materialName << G4endl;
}
@@ -280,9 +281,9 @@ void ExP01DetectorConstruction::setChamberMaterial(G4String materialName)
// search the material by its name
G4Material* pttoMaterial = G4Material::GetMaterial(materialName);
if (pttoMaterial)
{ChamberMater = pttoMaterial;
logicChamber->SetMaterial(pttoMaterial);
G4cout << "\n----> The chambers are " << ChamberWidth/cm << " cm of "
{fChamberMater = pttoMaterial;
fLogicChamber->SetMaterial(pttoMaterial);
G4cout << "\n----> The chambers are " << fChamberWidth/cm << " cm of "
<< materialName << G4endl;
}
}
@@ -291,7 +292,7 @@ void ExP01DetectorConstruction::setChamberMaterial(G4String materialName)
void ExP01DetectorConstruction::SetMagField(G4double fieldValue)
{
fpMagField->SetFieldValue(fieldValue);
fPMagField->SetFieldValue(fieldValue);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Implementation of the ExP01DetectorMessenger class
//
//
// $Id$
// $Id: ExP01DetectorMessenger.cc 71791 2013-06-24 14:08:28Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -43,55 +43,61 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP01DetectorMessenger::ExP01DetectorMessenger(ExP01DetectorConstruction* myDet)
:myDetector(myDet)
: G4UImessenger(),
fDetector(myDet),
fN02Dir(0),
fDetDir(0),
fTargMatCmd(0),
fChamMatCmd(0),
fFieldCmd(0)
{
N02Dir = new G4UIdirectory("/P01/");
N02Dir->SetGuidance("UI commands specific to this example.");
fN02Dir = new G4UIdirectory("/P01/");
fN02Dir->SetGuidance("UI commands specific to this example.");
detDir = new G4UIdirectory("/P01/det/");
detDir->SetGuidance("detector control.");
fDetDir = new G4UIdirectory("/P01/det/");
fDetDir->SetGuidance("detector control.");
TargMatCmd = new G4UIcmdWithAString("/P01/det/setTargetMate",this);
TargMatCmd->SetGuidance("Select Material of the Target.");
TargMatCmd->SetParameterName("choice",false);
TargMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fTargMatCmd = new G4UIcmdWithAString("/P01/det/setTargetMate",this);
fTargMatCmd->SetGuidance("Select Material of the Target.");
fTargMatCmd->SetParameterName("choice",false);
fTargMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
ChamMatCmd = new G4UIcmdWithAString("/P01/det/setChamberMate",this);
ChamMatCmd->SetGuidance("Select Material of the Target.");
ChamMatCmd->SetParameterName("choice",false);
ChamMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fChamMatCmd = new G4UIcmdWithAString("/P01/det/setChamberMate",this);
fChamMatCmd->SetGuidance("Select Material of the Target.");
fChamMatCmd->SetParameterName("choice",false);
fChamMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
FieldCmd = new G4UIcmdWithADoubleAndUnit("/P01/det/setField",this);
FieldCmd->SetGuidance("Define magnetic field.");
FieldCmd->SetGuidance("Magnetic field will be in X direction.");
FieldCmd->SetParameterName("Bx",false);
FieldCmd->SetUnitCategory("Magnetic flux density");
FieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fFieldCmd = new G4UIcmdWithADoubleAndUnit("/P01/det/setField",this);
fFieldCmd->SetGuidance("Define magnetic field.");
fFieldCmd->SetGuidance("Magnetic field will be in X direction.");
fFieldCmd->SetParameterName("Bx",false);
fFieldCmd->SetUnitCategory("Magnetic flux density");
fFieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP01DetectorMessenger::~ExP01DetectorMessenger()
{
delete TargMatCmd;
delete ChamMatCmd;
delete FieldCmd;
delete detDir;
delete N02Dir;
delete fTargMatCmd;
delete fChamMatCmd;
delete fFieldCmd;
delete fDetDir;
delete fN02Dir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExP01DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
if( command == TargMatCmd )
{ myDetector->setTargetMaterial(newValue);}
if( command == fTargMatCmd )
{ fDetector->setTargetMaterial(newValue);}
if( command == ChamMatCmd )
{ myDetector->setChamberMaterial(newValue);}
if( command == fChamMatCmd )
{ fDetector->setChamberMaterial(newValue);}
if( command == FieldCmd )
{ myDetector->SetMagField(FieldCmd->GetNewDoubleValue(newValue));}
if( command == fFieldCmd )
{ fDetector->SetMagField(fFieldCmd->GetNewDoubleValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Implementation of the ExP01EventAction class
//
//
// $Id$
// $Id: ExP01EventAction.cc 71791 2013-06-24 14:08:28Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -43,6 +43,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP01EventAction::ExP01EventAction()
: G4UserEventAction()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Implementation of the ExP01MagneticField class
//
//
// $Id$
// $Id: ExP01MagneticField.cc 68025 2013-03-13 13:43:46Z gcosmo $
//
// User Field class implementation.
//
@@ -26,6 +26,8 @@
/// \file persistency/P01/src/ExP01PhysicsList.cc
/// \brief Implementation of the ExP01PhysicsList class
//
// $Id: ExP01PhysicsList.cc 68025 2013-03-13 13:43:46Z gcosmo $
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Implementation of the ExP01PrimaryGeneratorAction class
//
//
// $Id$
// $Id: ExP01PrimaryGeneratorAction.cc 71791 2013-06-24 14:08:28Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -46,36 +46,37 @@
ExP01PrimaryGeneratorAction::ExP01PrimaryGeneratorAction(
ExP01DetectorConstruction* myDC)
:myDetector(myDC)
:G4VUserPrimaryGeneratorAction(),
fParticleGun(0), fMyDetector(myDC)
{
G4int n_particle = 1;
particleGun = new G4ParticleGun(n_particle);
fParticleGun = new G4ParticleGun(n_particle);
// default particle
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
G4ParticleDefinition* particle = particleTable->FindParticle("proton");
particleGun->SetParticleDefinition(particle);
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
particleGun->SetParticleEnergy(3.0*GeV);
fParticleGun->SetParticleDefinition(particle);
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
fParticleGun->SetParticleEnergy(3.0*GeV);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP01PrimaryGeneratorAction::~ExP01PrimaryGeneratorAction()
{
delete particleGun;
delete fParticleGun;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExP01PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
G4double position = -0.5*(myDetector->GetWorldFullLength());
particleGun->SetParticlePosition(G4ThreeVector(0.*cm,0.*cm,position));
G4double position = -0.5*(fMyDetector->GetWorldFullLength());
fParticleGun->SetParticlePosition(G4ThreeVector(0.*cm,0.*cm,position));
particleGun->GeneratePrimaryVertex(anEvent);
fParticleGun->GeneratePrimaryVertex(anEvent);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Implementation of the ExP01RunAction class
//
//
// $Id$
// $Id: ExP01RunAction.cc 71791 2013-06-24 14:08:28Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -39,6 +39,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP01RunAction::ExP01RunAction()
: G4UserRunAction()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Implementation of the ExP01SteppingAction class
//
//
// $Id$
// $Id: ExP01SteppingAction.cc 71791 2013-06-24 14:08:28Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -38,6 +38,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP01SteppingAction::ExP01SteppingAction()
: G4UserSteppingAction()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Implementation of the ExP01SteppingVerbose class
//
//
// $Id$
// $Id: ExP01SteppingVerbose.cc 71791 2013-06-24 14:08:28Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -40,6 +40,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP01SteppingVerbose::ExP01SteppingVerbose()
: G4SteppingVerbose()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Implementation of the ExP01TrackerHit class
//
//
// $Id$
// $Id: ExP01TrackerHit.cc 71791 2013-06-24 14:08:28Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -43,7 +43,8 @@ G4Allocator<ExP01TrackerHit> ExP01TrackerHitAllocator;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP01TrackerHit::ExP01TrackerHit() {}
ExP01TrackerHit::ExP01TrackerHit()
: G4VHit(), fTrackID(0), fChamberNb(0), fEdep(0), fPos(0,0,0) {}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -54,20 +55,20 @@ ExP01TrackerHit::~ExP01TrackerHit() {}
ExP01TrackerHit::ExP01TrackerHit(const ExP01TrackerHit& right)
: G4VHit()
{
trackID = right.trackID;
chamberNb = right.chamberNb;
edep = right.edep;
pos = right.pos;
fTrackID = right.fTrackID;
fChamberNb = right.fChamberNb;
fEdep = right.fEdep;
fPos = right.fPos;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
const ExP01TrackerHit& ExP01TrackerHit::operator=(const ExP01TrackerHit& right)
{
trackID = right.trackID;
chamberNb = right.chamberNb;
edep = right.edep;
pos = right.pos;
fTrackID = right.fTrackID;
fChamberNb = right.fChamberNb;
fEdep = right.fEdep;
fPos = right.fPos;
return *this;
}
@@ -85,7 +86,7 @@ void ExP01TrackerHit::Draw()
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
if(pVVisManager)
{
G4Circle circle(pos);
G4Circle circle(fPos);
circle.SetScreenSize(2.);
circle.SetFillStyle(G4Circle::filled);
G4Colour colour(1.,0.,0.);
@@ -99,9 +100,9 @@ void ExP01TrackerHit::Draw()
void ExP01TrackerHit::Print()
{
G4cout << " trackID: " << trackID << " chamberNb: " << chamberNb
<< " energy deposit[MeV]: " << edep
<< " position[mm]: " << pos << G4endl;
G4cout << " trackID: " << fTrackID << " chamberNb: " << fChamberNb
<< " energy deposit[MeV]: " << fEdep
<< " position[mm]: " << fPos << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Implementation of the ExP01TrackerSD class
//
//
// $Id$
// $Id: ExP01TrackerSD.cc 71111 2013-06-11 10:51:02Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -44,11 +44,12 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP01TrackerSD::ExP01TrackerSD(G4String name)
:G4VSensitiveDetector(name)
:G4VSensitiveDetector(name), fTrackerCollection(0), fHCID(0)
{
G4String HCname = name + "_HC";
collectionName.insert(HCname);
G4cout << collectionName.size() << " CalorimeterSD name: " << name << " collection Name: " << HCname << G4endl;
G4cout << collectionName.size() << " CalorimeterSD name: " << name << " collection Name: "
<< HCname << G4endl;
fHCID = -1;
}
@@ -66,7 +67,8 @@ void ExP01TrackerSD::Initialize(G4HCofThisEvent* HCE)
fTrackerCollection = new ExP01TrackerHitsCollection
(SensitiveDetectorName,collectionName[0]);
if (fHCID < 0) {
G4cout << "CalorimeterSD::Initialize: " << SensitiveDetectorName << " " << collectionName[0] << G4endl;
G4cout << "CalorimeterSD::Initialize: " << SensitiveDetectorName << " "
<< collectionName[0] << G4endl;
fHCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
}
@@ -26,6 +26,11 @@
/// \file persistency/P01/src/RootIO.cc
/// \brief Implementation of the RootIO class
//
// $Id: RootIO.cc 71791 2013-06-24 14:08:28Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include <sstream>
#include "RootIO.hh"
@@ -37,9 +42,13 @@
#include "G4Event.hh"
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
static RootIO* instance = 0;
RootIO::RootIO():Nevents(0)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RootIO::RootIO():fNevents(0)
{
// initialize ROOT
TSystem ts;
@@ -49,12 +58,16 @@ RootIO::RootIO():Nevents(0)
ROOT::Cintex::Cintex::Enable();
//gDebug = 1;
fo = new TFile("hits.root","RECREATE");
fFile = new TFile("hits.root","RECREATE");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RootIO::~RootIO()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RootIO* RootIO::GetInstance()
{
if (instance == 0 )
@@ -64,23 +77,29 @@ RootIO* RootIO::GetInstance()
return instance;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RootIO::Write(std::vector<ExP01TrackerHit*>* hcont)
{
Nevents++;
fNevents++;
std::ostringstream os;
os << Nevents;
os << fNevents;
std::string stevt = "Event_" + os.str();
const char* chevt = stevt.c_str();
std::cout << "writing " << stevt << std::endl;
fo->WriteObject(hcont, chevt);
fFile->WriteObject(hcont, chevt);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RootIO::Close()
{
fo->Close();
fFile->Close();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,21 +23,20 @@ include(${Geant4_USE_FILE})
#----------------------------------------------------------------------------
# Find ROOT (required package)
#
find_package(ROOT QUIET)
if(NOT ROOT_FOUND)
message(STATUS "G4 Examples: ROOT package not found. --> P02 example disabled")
return()
endif()
if(NOT GCCXML)
message(STATUS "G4 Examples: GCCXML not found. --> P02 example disabled")
return()
endif()
find_package(ROOT REQUIRED)
#----------------------------------------------------------------------------
# P02 requires shared libraries
# P01 requires GCCXML
#
if(BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS )
message(STATUS "G4 Examples: Building only Static Libraires. --> P02 example disabled")
return()
if(NOT GCCXML)
message(FATAL_ERROR "P02 requires GCCXML")
endif()
#----------------------------------------------------------------------------
# P01 requires shared libraries
#
if(NOT Geant4_shared_FOUND)
message(FATAL_ERROR "P02 must use shared libraries")
endif()
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.2 2010-01-11 17:03:09 gcosmo Exp $
# $Id: GNUmakefile 68025 2013-03-13 13:43:46Z gcosmo $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
+14
View File
@@ -13,6 +13,20 @@ track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
June 20th, 2013 W. Pokorski (exampleP02-V09-06-02)
- corrected a missing coma in ExP02DetectorConstruction.cc
June 18th, 2013 I. Hrivnacova (exampleP02-V09-06-01)
- Applied coding guidelines (long lines, data members initialization)
- Code clean-up (removed redundant public/protected keyword, indention)
June 18th, 2013 W. Pokorski (exampleP02-V09-06-00)
- changes for coding conventions
May 27th, 2013 I. Hrivnacova
- Fixed handling required packages/options in CMake files
October 11th, 2012 A. Dotti (exampleP02-V09-05-00)
- Adding protection in case GCCXML is not available, disabling the example
@@ -27,7 +27,7 @@
/// \brief Main program of the persistency/P02 example
//
//
// $Id$
// $Id: exampleP02.cc 68025 2013-03-13 13:43:46Z gcosmo $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,6 +26,8 @@
/// \file persistency/P02/include/ExP02Classes.hh
/// \brief Declaration of the classes for generating dictionaries
//
// $Id: ExP02Classes.hh 71569 2013-06-18 10:13:24Z gcosmo $
//
#include "ExP02GeoTree.hh"
//
#include "ExP02DetectorConstruction.hh"
@@ -72,10 +74,10 @@
#include "G4VUserRegionInformation.hh"
#include "G4UserLimits.hh"
//
std::vector<CLHEP::Hep3Vector> a;
std::vector<G4VCSGface*> b;
std::vector<G4PolyconeSideRZ> c;
std::vector<G4PolyPhiFaceEdge> d;
std::vector<G4PolyPhiFaceVertex> e;
std::vector<CLHEP::Hep3Vector> g4a;
std::vector<G4VCSGface*> g4b;
std::vector<G4PolyconeSideRZ> g4c;
std::vector<G4PolyPhiFaceEdge> g4d;
std::vector<G4PolyPhiFaceVertex> g4e;
//
#undef __G4String
@@ -26,6 +26,8 @@
/// \file persistency/P02/include/ExP02DetConstrReader.hh
/// \brief Definition of the ExP02DetConstrReader class
//
// $Id: ExP02DetConstrReader.hh 71727 2013-06-21 07:55:45Z gcosmo $
//
//
#ifndef ExP02DetConstrReader_h
#define ExP02DetConstrReader_h 1
@@ -46,9 +48,7 @@ class ExP02DetConstrReader : public G4VUserDetectorConstruction
ExP02DetConstrReader();
~ExP02DetConstrReader();
public:
G4VPhysicalVolume* Construct();
virtual G4VPhysicalVolume* Construct();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,6 +26,8 @@
/// \file persistency/P02/include/ExP02DetectorConstruction.hh
/// \brief Definition of the ExP02DetectorConstruction class
//
// $Id: ExP02DetectorConstruction.hh 71569 2013-06-18 10:13:24Z gcosmo $
//
#ifndef ExP02DetectorConstruction_H
#define ExP02DetectorConstruction_H 1
@@ -44,7 +46,7 @@ class ExP02DetectorConstruction : public G4VUserDetectorConstruction
ExP02DetectorConstruction();
~ExP02DetectorConstruction();
G4VPhysicalVolume* Construct();
virtual G4VPhysicalVolume* Construct();
private:
@@ -26,7 +26,8 @@
/// \file persistency/P02/include/ExP02GeoTree.hh
/// \brief Definition of the ExP02GeoTree class
//
// $Id$
// $Id: ExP02GeoTree.hh 71727 2013-06-21 07:55:45Z gcosmo $
#ifndef INCLUDE_EXP02GEOTREE_H
#define INCLUDE_EXP02GEOTREE_H 1
@@ -44,7 +45,8 @@ class ExP02GeoTree {
public:
ExP02GeoTree( );
ExP02GeoTree(G4VPhysicalVolume* vol, const G4ElementTable* et, const G4MaterialTable* mt);
ExP02GeoTree(G4VPhysicalVolume* vol, const G4ElementTable* et,
const G4MaterialTable* mt);
virtual ~ExP02GeoTree( );
@@ -26,8 +26,7 @@
/// \file persistency/P02/include/ExP02PhysicsList.hh
/// \brief Definition of the ExP02PhysicsList class
//
//
// $Id$
// $Id: ExP02PhysicsList.hh 71727 2013-06-21 07:55:45Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -50,21 +49,18 @@ class ExP02PhysicsList: public G4VUserPhysicsList
protected:
// Construct particle and physics
void ConstructParticle();
void ConstructProcess();
virtual void ConstructParticle();
virtual void ConstructProcess();
void SetCuts();
virtual void SetCuts();
protected:
// these methods Construct particles
void ConstructBosons();
void ConstructLeptons();
void ConstructMesons();
void ConstructBaryons();
protected:
// these methods Construct physics processes and register them
// these methods Construct physics processes and register them
void ConstructGeneral();
void ConstructEM();
};
@@ -26,8 +26,7 @@
/// \file persistency/P02/include/ExP02PrimaryGeneratorAction.hh
/// \brief Definition of the ExP02PrimaryGeneratorAction class
//
//
// $Id$
// $Id: ExP02PrimaryGeneratorAction.hh 71727 2013-06-21 07:55:45Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -51,12 +50,10 @@ class ExP02PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
ExP02PrimaryGeneratorAction();
~ExP02PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event*);
virtual void GeneratePrimaries(G4Event*);
private:
G4ParticleGun* fParticleGun;
ExP02DetectorConstruction* fMyDetector;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,6 +26,8 @@
/// \file persistency/P02/src/ExP02DetConstrReader.cc
/// \brief Implementation of the ExP02DetConstrReader class
//
// $Id: ExP02DetConstrReader.cc 71727 2013-06-21 07:55:45Z gcosmo $
//
//ROOT
#include "TROOT.h"
#include "TFile.h"
@@ -43,6 +45,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP02DetConstrReader::ExP02DetConstrReader()
: G4VUserDetectorConstruction()
{
// initialize ROOT
TSystem ts;
@@ -26,6 +26,8 @@
/// \file persistency/P02/src/ExP02DetectorConstruction.cc
/// \brief Implementation of the ExP02DetectorConstruction class
//
// $Id: ExP02DetectorConstruction.cc 71727 2013-06-21 07:55:45Z gcosmo $
//
//
#include "ExP02DetectorConstruction.hh"
@@ -49,7 +51,8 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP02DetectorConstruction::ExP02DetectorConstruction()
: fExperimentalHall_log(0), fTracker_log(0),
: G4VUserDetectorConstruction(),
fExperimentalHall_log(0), fTracker_log(0),
fCalorimeterBlock_log(0), fCalorimeterLayer_log(0),
fExperimentalHall_phys(0), fCalorimeterLayer_phys(0),
fCalorimeterBlock_phys(0), fTracker_phys(0)
@@ -26,7 +26,7 @@
/// \file persistency/P02/src/ExP02GeoTree.cc
/// \brief Implementation of the ExP02GeoTree class
//
// $Id$
// $Id: ExP02GeoTree.cc 71727 2013-06-21 07:55:45Z gcosmo $
// Include files
// local
@@ -41,7 +41,8 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP02GeoTree::ExP02GeoTree( ): fTopV(0)
ExP02GeoTree::ExP02GeoTree( )
: fTopV(0), fEltab(0), fMattab(0)
{
fEltab = G4Element::GetElementTable();
fMattab = G4Material::GetMaterialTable();
@@ -49,8 +50,9 @@ ExP02GeoTree::ExP02GeoTree( ): fTopV(0)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP02GeoTree::ExP02GeoTree(G4VPhysicalVolume* vol, const G4ElementTable* et, const G4MaterialTable* mt):
fTopV(vol), fEltab(et), fMattab(mt)
ExP02GeoTree::ExP02GeoTree(G4VPhysicalVolume* vol, const G4ElementTable* et,
const G4MaterialTable* mt)
: fTopV(vol), fEltab(et), fMattab(mt)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,8 +26,7 @@
/// \file persistency/P02/src/ExP02PhysicsList.cc
/// \brief Implementation of the ExP02PhysicsList class
//
//
// $Id$
// $Id: ExP02PhysicsList.cc 71727 2013-06-21 07:55:45Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -44,7 +43,7 @@
ExP02PhysicsList::ExP02PhysicsList(): G4VUserPhysicsList()
{
defaultCutValue = 1.0*cm;
SetVerboseLevel(1);
SetVerboseLevel(1);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,6 +26,8 @@
/// \file persistency/P02/src/ExP02PrimaryGeneratorAction.cc
/// \brief Implementation of the ExP02PrimaryGeneratorAction class
//
// $Id: ExP02PrimaryGeneratorAction.cc 71727 2013-06-21 07:55:45Z gcosmo $
//
#include "ExP02PrimaryGeneratorAction.hh"
#include "G4Event.hh"
@@ -38,6 +40,9 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExP02PrimaryGeneratorAction::ExP02PrimaryGeneratorAction()
: G4VUserPrimaryGeneratorAction(),
fParticleGun(0)
{
G4int n_particle = 1;
fParticleGun = new G4ParticleGun(n_particle);
@@ -26,6 +26,7 @@
<field name="fMassFractionVector" comment="[fNumberOfElements]" />
<field name="fAtomsVector" comment="[fNumberOfElements]" />
<field name="VecNbOfAtomsPerVolume" comment="[fNumberOfElements]" />
<field name="fSandiaTable" transient="true"/>
</class>
<class name="G4IonisParamElm">
@@ -38,9 +39,11 @@
<field name="fShellCorrectionVector" transient="true"/>
</class>
<!--
<class name="G4SandiaTable">
<field name="fPhotoAbsorptionCof" transient="true"/>
</class>
-->
<class name="G4MaterialPropertyVector"/>
<class name="G4MaterialPropertiesTable"/>
@@ -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
//
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.3 2009-05-11 13:03:17 gcosmo Exp $
# $Id: GNUmakefile 68025 2013-03-13 13:43:46Z gcosmo $
# --------------------------------------------------------------
# GNUmakefile for examples module.
# --------------------------------------------------------------
@@ -1,4 +1,4 @@
$Id: History,v 1.20 2010-11-17 10:55:23 gcosmo Exp $
$Id: History 77529 2013-11-25 13:11:09Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -16,6 +16,11 @@ committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
November 22nd, 2013 Tatiana Nikitina G01-V09-06-00
- Added test case for 'genericPolycone' and 'genericPolyhedra'.
Requires update to GDML schema 3.1.0 to avoid validation errors.
October 19th, 2012 Ben Morgan
- Simplify CMake syntax to find Geant4 with gdml support
@@ -1,4 +1,4 @@
$Id: README,v 1.4 2009-05-11 13:03:17 gcosmo Exp $
$Id: README 68025 2013-03-13 13:43:46Z gcosmo $
-------------------------------------------------------------------
=========================================================
+29 -24
View File
@@ -1,13 +1,13 @@
Usage: load_gdml <intput_gdml_file:mandatory> <output_gdml_file:optional>
G4GDML: Reading '/build/cdash/G4/release/09-06-cand-00_branch/examples/extended/persistency/gdml/G01/solids.gdml'...
G4GDML: Reading '/ec/G4-builds/release/slc6-gcc47-RelWithDebInfo/09-06-ref-11_branch/examples/extended/persistency/gdml/G01/solids.gdml'...
G4GDML: Reading definitions...
G4GDML: Reading materials...
G4GDML: Reading solids...
G4GDML: Reading structure...
G4GDML: Reading setup...
G4GDML: Reading '/build/cdash/G4/release/09-06-cand-00_branch/examples/extended/persistency/gdml/G01/solids.gdml' done!
G4GDML: Reading '/ec/G4-builds/release/slc6-gcc47-RelWithDebInfo/09-06-ref-11_branch/examples/extended/persistency/gdml/G01/solids.gdml' done!
Stripping off GDML names of materials, solids and volumes ...
############################################
@@ -15,7 +15,7 @@ Stripping off GDML names of materials, solids and volumes ...
############################################
*************************************************************
Geant4 version Name: geant4-09-06-ref-00 (30-November-2012)
Geant4 version Name: geant4-10-00-ref-00 (6-December-2013)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
@@ -47,14 +47,14 @@ Region <DefaultRegionForParallelWorld> -- -- is not associated to any world.
========= Table of registered couples ==============================
Index : 0 used in the geometry : Yes recalculation needed : No
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 -1 MeV e- -1 MeV e+ -1 MeV proton -1 MeV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 1 used in the geometry : Yes recalculation needed : No
Index : 1 used in the geometry : Yes
Material : Water
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma -1 MeV e- -1 MeV e+ -1 MeV proton -1 MeV
@@ -77,8 +77,8 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Voxelisation: top memory users:
Percent Memory Heads Nodes Pointers Total CPU Volume
------- -------- ------ ------ -------- ---------- ----------
100.00 3k 11 39 118 0.00 World
Start Run processing.
100.00 3k 12 44 132 0.00 World
### Run 0 starts.
*********************************************************************************************************
* G4Track Information: Particle = geantino, Track ID = 1, Parent ID = 0
@@ -429,14 +429,14 @@ Region <DefaultRegionForParallelWorld> -- -- is not associated to any world.
========= Table of registered couples ==============================
Index : 0 used in the geometry : Yes recalculation needed : No
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 -1 MeV e- -1 MeV e+ -1 MeV proton -1 MeV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 1 used in the geometry : Yes recalculation needed : No
Index : 1 used in the geometry : Yes
Material : Water
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma -1 MeV e- -1 MeV e+ -1 MeV proton -1 MeV
@@ -445,7 +445,7 @@ Index : 1 used in the geometry : Yes recalculation needed : No
====================================================================
Start Run processing.
### Run 1 starts.
*********************************************************************************************************
* G4Track Information: Particle = geantino, Track ID = 1, Parent ID = 0
@@ -777,7 +777,7 @@ Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolu
Run terminated.
Run Summary
Number of events processed : 20
User=0s Real=0.01s Sys=0s
User=0.01s Real=0.02s Sys=0s
/tracking/verbose 0
/gun/direction 0.3 0.2 1
/run/beamOn 20
@@ -797,14 +797,14 @@ Region <DefaultRegionForParallelWorld> -- -- is not associated to any world.
========= Table of registered couples ==============================
Index : 0 used in the geometry : Yes recalculation needed : No
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 -1 MeV e- -1 MeV e+ -1 MeV proton -1 MeV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 1 used in the geometry : Yes recalculation needed : No
Index : 1 used in the geometry : Yes
Material : Water
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma -1 MeV e- -1 MeV e+ -1 MeV proton -1 MeV
@@ -813,11 +813,11 @@ Index : 1 used in the geometry : Yes recalculation needed : No
====================================================================
Start Run processing.
### Run 2 starts.
Run terminated.
Run Summary
Number of events processed : 20
User=0.01s Real=0s Sys=0s
User=0s Real=0s Sys=0s
/gun/direction 0.3 -0.2 1
/run/beamOn 20
@@ -836,14 +836,14 @@ Region <DefaultRegionForParallelWorld> -- -- is not associated to any world.
========= Table of registered couples ==============================
Index : 0 used in the geometry : Yes recalculation needed : No
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 -1 MeV e- -1 MeV e+ -1 MeV proton -1 MeV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 1 used in the geometry : Yes recalculation needed : No
Index : 1 used in the geometry : Yes
Material : Water
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma -1 MeV e- -1 MeV e+ -1 MeV proton -1 MeV
@@ -852,7 +852,7 @@ Index : 1 used in the geometry : Yes recalculation needed : No
====================================================================
Start Run processing.
### Run 3 starts.
Run terminated.
Run Summary
Number of events processed : 20
@@ -875,14 +875,14 @@ Region <DefaultRegionForParallelWorld> -- -- is not associated to any world.
========= Table of registered couples ==============================
Index : 0 used in the geometry : Yes recalculation needed : No
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 -1 MeV e- -1 MeV e+ -1 MeV proton -1 MeV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 1 used in the geometry : Yes recalculation needed : No
Index : 1 used in the geometry : Yes
Material : Water
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma -1 MeV e- -1 MeV e+ -1 MeV proton -1 MeV
@@ -891,7 +891,7 @@ Index : 1 used in the geometry : Yes recalculation needed : No
====================================================================
Start Run processing.
### Run 4 starts.
Run terminated.
Run Summary
Number of events processed : 20
@@ -900,9 +900,14 @@ G4 kernel has come to Quit state.
UserDetectorConstruction deleted.
UserPhysicsList deleted.
UserPrimaryGenerator deleted.
RunManager is deleting RunManagerKernel.
EventManager deleted.
UImanager deleted.
Units table cleared.
================== Deleting memory pools ===================
Number of memory pools allocated: 9 of which, static: 0
Dynamic pools deleted: 9 / Total memory freed: 0.0096 Mb
============================================================
G4Allocator objects are deleted.
UImanager deleted.
StateManager deleted.
RunManagerKernel is deleted.
RunManager is deleted.
RunManagerKernel is deleted. Good bye :)
@@ -27,7 +27,7 @@
/// \brief Definition of the G01DetectorConstruction class
//
//
// $Id$
// $Id: G01DetectorConstruction.hh 68025 2013-03-13 13:43:46Z gcosmo $
//
//
@@ -47,7 +47,7 @@ class G01DetectorConstruction : public G4VUserDetectorConstruction
fWorld = setWorld;
}
G4VPhysicalVolume *Construct()
virtual G4VPhysicalVolume *Construct()
{
return fWorld;
}
@@ -27,7 +27,7 @@
/// \brief Definition of the G01PhysicsList class
//
//
// $Id$
// $Id: G01PhysicsList.hh 68025 2013-03-13 13:43:46Z gcosmo $
//
//
@@ -48,9 +48,9 @@ class G01PhysicsList : public G4VUserPhysicsList
protected:
void ConstructParticle();
void ConstructProcess();
void SetCuts();
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual void SetCuts();
};
#endif
@@ -28,7 +28,6 @@
//
//
// $Id: PrimaryGeneratorAction.hh,v 1.2 2008-11-10 15:39:34 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
@@ -51,7 +50,7 @@ class G01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
G01PrimaryGeneratorAction();
~G01PrimaryGeneratorAction();
void GeneratePrimaries(G4Event* anEvent);
virtual void GeneratePrimaries(G4Event* anEvent);
private:
@@ -27,7 +27,7 @@
/// \brief Main program of the persistency/gdml/G01 example
//
//
// $Id$
// $Id: load_gdml.cc 68025 2013-03-13 13:43:46Z gcosmo $
//
//
// --------------------------------------------------------------
@@ -17,6 +17,7 @@
<position name="pos21" x="-125" y=" 125"/>
<position name="pos31" x=" 125" y=" 125"/>
<position name="pos41" x=" 250" y=" 125"/>
<position name="pos412" x=" 250" y=" 225"/>
<position name="pos51" x=" 550" y=" 125"/>
<position name="pos61" x=" 550" y="-125"/>
<position name="pos71" x=" 550" y=" 0"/>
@@ -27,6 +28,7 @@
<position name="pos301" x=" 750" y=" 125"/>
<position name="pos401" x=" 750" y="-125"/>
<position name="pos501" x="-750" y="-125"/>
<position name="pos502" x="-750" y="-225"/>
<position name="pos601" x="-750" y=" 125"/>
<position name="pos701" x="-750" y=" 0"/>
<position name="pos801" x="950" y=" 125"/>
@@ -110,6 +112,12 @@
<zplane z="100.0" rmin="10.0" rmax="30.0"/>
</polycone>
<genericPolycone aunit="degree" name="testgenpoly" deltaphi="360.0" startphi="0.0">
<rzpoint r="0.0" z="10.0" />
<rzpoint r="5.0" z="20.0" />
<rzpoint r="0.0" z="30.0" />
</genericPolycone>
<tessellated aunit="degree" lunit="mm" name="testtessel">
<triangular vertex1="v0" vertex2="v1" vertex3="v2"/>
<triangular vertex1="v1" vertex2="v3" vertex3="v2"/>
@@ -125,6 +133,11 @@
<zplane z="10.0" rmin="1.0" rmax="5.0"/>
<zplane z="100.0" rmin="10.0" rmax="30.0"/>
</polyhedra>
<genericPolyhedra aunit="degree" deltaphi="90." lunit="mm" name="testgenph" numsides="3" startphi="0." >
<rzpoint r="0.0" z="10.0" />
<rzpoint r="5.0" z="20.0" />
<rzpoint r="0.0" z="30.0" />
</genericPolyhedra>
<hype name="testhype" rmin="10.0" rmax="30.0" inst="10.0" outst="20.0" z="50.0"/>
@@ -186,6 +199,11 @@
<solidref ref="testpoly"/>
</volume>
<volume name="vol412">
<materialref ref="Water"/>
<solidref ref="testgenpoly"/>
</volume>
<volume name="vol51">
<materialref ref="Water"/>
<solidref ref="testellipsoid"/>
@@ -231,6 +249,10 @@
<materialref ref="Water"/>
<solidref ref="testph"/>
</volume>
<volume name="vol502">
<materialref ref="Water"/>
<solidref ref="testgenph"/>
</volume>
<volume name="vol601">
<materialref ref="Water"/>
<solidref ref="testhype"/>
@@ -308,6 +330,12 @@
<positionref ref="pos41"/>
<rotationref ref="identity"/>
</physvol>
<physvol>
<volumeref ref="vol412"/>
<positionref ref="pos412"/>
<rotationref ref="identity"/>
</physvol>
<physvol>
<volumeref ref="vol51"/>
@@ -364,6 +392,12 @@
<volumeref ref="vol501"/>
<positionref ref="pos501"/>
<rotationref ref="identity"/>
</physvol>
<physvol>
<volumeref ref="vol502"/>
<positionref ref="pos502"/>
<rotationref ref="identity"/>
</physvol>
<physvol>
@@ -27,7 +27,7 @@
/// \brief Implementation of the G01PhysicsList class
//
//
// $Id$
// $Id: G01PhysicsList.cc 68025 2013-03-13 13:43:46Z gcosmo $
//
//
@@ -36,6 +36,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G01PhysicsList::G01PhysicsList()
: G4VUserPhysicsList()
{
}
@@ -27,7 +27,7 @@
/// \brief Implementation of the G01PrimaryGeneratorAction class
//
//
// $Id$
// $Id: G01PrimaryGeneratorAction.cc 68025 2013-03-13 13:43:46Z gcosmo $
//
//
@@ -41,6 +41,8 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G01PrimaryGeneratorAction::G01PrimaryGeneratorAction()
: G4VUserPrimaryGeneratorAction(),
fParticleGun(0)
{
G4int n_particle = 1;
fParticleGun = new G4ParticleGun(n_particle);
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.2 2008-08-27 11:04:41 gcosmo Exp $
# $Id: GNUmakefile 68025 2013-03-13 13:43:46Z gcosmo $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -1,4 +1,4 @@
$Id: History,v 1.11 2010-11-30 10:53:38 gcosmo Exp $
$Id: History 73394 2013-08-27 09:23:26Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -17,8 +17,11 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
August 27th, 2013 Gabriele Cosmo G02-V09-06-00
- Added G4Ellipsoid among solids for parameterisation.
July 27th, 2011 Witek Pokorski G02-V09-05-00
- Cosmetic changes to comply to coding conventions
- Cosmetic changes to comply to coding conventions.
November 10th, 2011 Gabriele Cosmo G02-V09-04-01
- Changed from no longer supported physics-list QGSP-BERT-EMV to QGSP-BERT.
@@ -1,4 +1,4 @@
$Id: README,v 1.2 2008-11-13 16:44:29 gcosmo Exp $
$Id: README 68025 2013-03-13 13:43:46Z gcosmo $
-------------------------------------------------------------------
Example of use GDML reader/writer in Detector Construction
@@ -27,7 +27,7 @@
/// \brief Main program of the persistency/gdml/G02 example
//
//
// $Id$
// $Id: geotest.cc 68025 2013-03-13 13:43:46Z gcosmo $
//
//
// --------------------------------------------------------------
@@ -27,7 +27,7 @@
/// \brief Definition of the G02ChamberParameterisation class
//
//
// $Id$
// $Id: G02ChamberParameterisation.hh 73394 2013-08-27 09:23:26Z gcosmo $
//
// Class G02ChamberParameterisation
//
@@ -53,6 +53,7 @@ class G4Trap;
class G4Cons;
class G4Orb;
class G4Sphere;
class G4Ellipsoid;
class G4Torus;
class G4Para;
class G4Hype;
@@ -75,7 +76,7 @@ class G02ChamberParameterisation : public G4VPVParameterisation
G4double lengthInitial,
G4double lengthFinal );
virtual ~G02ChamberParameterisation();
~G02ChamberParameterisation();
void ComputeTransformation (const G4int copyNo,
G4VPhysicalVolume* physVol) const;
@@ -90,6 +91,7 @@ class G02ChamberParameterisation : public G4VPVParameterisation
void ComputeDimensions (G4Cons&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Sphere&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Orb&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Ellipsoid&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Torus&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Para&,const G4int,const G4VPhysicalVolume*) const {}
void ComputeDimensions (G4Hype&,const G4int,const G4VPhysicalVolume*) const {}
@@ -27,7 +27,7 @@
/// \brief Definition of the G02DetectorConstruction class
//
//
// $Id$
// $Id: G02DetectorConstruction.hh 68025 2013-03-13 13:43:46Z gcosmo $
//
// Class G02DetectorConstruction
//
@@ -63,7 +63,7 @@ class G02DetectorConstruction : public G4VUserDetectorConstruction
// Construction of SubDetectors
//
G4VPhysicalVolume* Construct();
virtual G4VPhysicalVolume* Construct();
G4LogicalVolume* ConstructSubDetector1();
G4LogicalVolume* ConstructSubDetector2();
G4VPhysicalVolume* ConstructDetector();
@@ -27,7 +27,7 @@
/// \brief Definition of the G02DetectorMessenger class
//
//
// $Id$
// $Id: G02DetectorMessenger.hh 68025 2013-03-13 13:43:46Z gcosmo $
//
// Class G02DetectorMessenger
//
@@ -58,8 +58,7 @@ class G02DetectorMessenger: public G4UImessenger
G02DetectorMessenger( G02DetectorConstruction* );
~G02DetectorMessenger();
void SetNewValue( G4UIcommand*, G4String );
void SetNewValue( G4UIcommand*, G4int );
virtual void SetNewValue( G4UIcommand*, G4String );
private:

Some files were not shown because too many files have changed in this diff Show More