Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.1 2007/07/13 05:55:34 asaim Exp $
|
||||
# $Id: GNUmakefile 66780 2013-01-12 14:56:35Z gcosmo $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
@@ -13,6 +13,32 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
Nov 26, 2013 M. Asai (exampleRE04-V09-06-06)
|
||||
- Remove old local physics list and use FTFP_BERT and physics
|
||||
constructor for G4ParallelWOrldProcess.
|
||||
|
||||
Nov 21, 2013 M. Asai (exampleRE04-V09-06-05)
|
||||
- Fix incorrect material names used in the parallel world.
|
||||
|
||||
Oct 25, 2013 M. Asai (exampleRE04-V09-06-04)
|
||||
- MT migration
|
||||
|
||||
Aug 27, 2013 G. Cosmo (exampleRE04-V09-06-03)
|
||||
- Added G4Ellipsoid among solids enabled for parameterisation
|
||||
|
||||
Apr 05, 2013 A. Dotti (exampleRE04-V09-06-02)
|
||||
Migration to new API of physics list needed for G4MT
|
||||
|
||||
Feb 15, 2013 I. Hrivnacova
|
||||
- Applied coding guidelines (data members initialization)
|
||||
|
||||
Feb 01, 2013 V.Ivanchenko (exampleRE04-V09-06-01)
|
||||
Migration to new physics_lists directory structure
|
||||
|
||||
Dec 02, 2012 J.Allison (exampleRE04-V09-06-00)
|
||||
Migration to DrawTrajectory() (i_mode argument is no longer available):
|
||||
o RE04Trajectory.cc: Removed DrawTrajectory(G4int i_mode).
|
||||
|
||||
Oct. 24, 2012 A.Ribon (exampleRE04-V09-05-01)
|
||||
- Migrated to the new stopping physics.
|
||||
|
||||
|
||||
@@ -28,7 +28,11 @@
|
||||
//
|
||||
// $Id: $
|
||||
//
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
#else
|
||||
#include "G4RunManager.hh"
|
||||
#endif
|
||||
#include "G4ScoringManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
|
||||
@@ -40,19 +44,24 @@
|
||||
#include "G4UIExecutive.hh"
|
||||
#endif
|
||||
|
||||
#include "RE04ActionInitialization.hh"
|
||||
#include "RE04DetectorConstruction.hh"
|
||||
#include "RE04ParallelWorldConstruction.hh"
|
||||
#include "RE04PhysicsList.hh"
|
||||
#include "RE04PrimaryGeneratorAction.hh"
|
||||
#include "RE04EventAction.hh"
|
||||
#include "RE04TrackingAction.hh"
|
||||
#include "RE04SteppingAction.hh"
|
||||
|
||||
#include "FTFP_BERT.hh"
|
||||
#include "G4ParallelWorldPhysics.hh"
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
// Construct the run manager
|
||||
//
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MTRunManager * runManager = new G4MTRunManager;
|
||||
//runManager->SetNumberOfThreads(4);
|
||||
#else
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
#endif
|
||||
|
||||
G4ScoringManager::GetScoringManager();
|
||||
|
||||
G4String paraWorldName = "ParallelWorld";
|
||||
@@ -65,15 +74,14 @@ int main(int argc,char** argv)
|
||||
realWorld->RegisterParallelWorld(parallelWorld);
|
||||
runManager->SetUserInitialization(realWorld);
|
||||
//
|
||||
G4VUserPhysicsList* physics = new RE04PhysicsList(paraWorldName);
|
||||
runManager->SetUserInitialization(physics);
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
physicsList->RegisterPhysics
|
||||
(new G4ParallelWorldPhysics(paraWorldName,true));
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
// Set user action classes
|
||||
//
|
||||
runManager->SetUserAction(new RE04PrimaryGeneratorAction);
|
||||
// runManager->SetUserAction(new RE04EventAction);
|
||||
// runManager->SetUserAction(new RE04TrackingAction);
|
||||
// runManager->SetUserAction(new RE04SteppingAction);
|
||||
runManager->SetUserInitialization(new RE04ActionInitialization);
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
// Visualization manager
|
||||
|
||||
+14
-38
@@ -23,54 +23,30 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file runAndEvent/RE04/include/RE04PhysicsList.hh
|
||||
/// \brief Definition of the RE04PhysicsList class
|
||||
// $Id: RE04ActionInitialization.hh 66522 2012-12-19 12:26:04Z ihrivnac $
|
||||
//
|
||||
// $Id: $
|
||||
/// \file include/RE04ActionInitialization.hh
|
||||
/// \brief Definition of the RE04ActionInitialization class
|
||||
//
|
||||
#ifndef RE04PhysicsList_h
|
||||
#define RE04PhysicsList_h 1
|
||||
|
||||
#include "G4VModularPhysicsList.hh"
|
||||
#ifndef RE04ActionInitialization_H
|
||||
#define RE04ActionInitialization_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
|
||||
//
|
||||
/// Physics list class
|
||||
///
|
||||
/// - constructor
|
||||
/// registers EM, synchrotron radiation, GN, decays, hadron
|
||||
/// elastic scattering, hadron, stopping and ion physics
|
||||
///
|
||||
/// - void ConstructProcess()
|
||||
/// invokes AddParallelWorldProcess() and
|
||||
/// constructs processes with a G4VPhysicsConstructor vector
|
||||
///
|
||||
/// - AddParallelWorldProcess()
|
||||
/// adds a parallel world process, "paraWorldProc"
|
||||
///
|
||||
/// - void SetCuts()
|
||||
/// invokes default SetCuts methods with SetCutsWithDefault()
|
||||
//
|
||||
class RE04PhysicsList: public G4VModularPhysicsList
|
||||
class RE04ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
RE04PhysicsList(G4String& parWorldName);
|
||||
virtual ~RE04PhysicsList();
|
||||
RE04ActionInitialization();//G4bool bParallelWorld);
|
||||
virtual ~RE04ActionInitialization();
|
||||
|
||||
public:
|
||||
// Construct particle and physics
|
||||
virtual void ConstructProcess();
|
||||
virtual void SetCuts();
|
||||
|
||||
private:
|
||||
void AddParallelWorldProcess();
|
||||
|
||||
private:
|
||||
G4String fpWorldName;
|
||||
virtual void Build() const;
|
||||
virtual void BuildForMaster() const;
|
||||
|
||||
private:
|
||||
//G4bool m_bParallelWorld;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class RE04DetectorConstruction : public G4VUserDetectorConstruction
|
||||
|
||||
public:
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
|
||||
|
||||
private:
|
||||
void DefineMaterials();
|
||||
void SetupGeometry();
|
||||
|
||||
@@ -44,6 +44,7 @@ class G4Trap;
|
||||
class G4Cons;
|
||||
class G4Orb;
|
||||
class G4Sphere;
|
||||
class G4Ellipsoid;
|
||||
class G4Torus;
|
||||
class G4Para;
|
||||
class G4Hype;
|
||||
@@ -70,15 +71,17 @@ class G4Polyhedra;
|
||||
class RE04ParallelWorldParam : public G4VPVParameterisation
|
||||
{
|
||||
public:
|
||||
RE04ParallelWorldParam();
|
||||
virtual ~RE04ParallelWorldParam();
|
||||
|
||||
RE04ParallelWorldParam();
|
||||
~RE04ParallelWorldParam();
|
||||
|
||||
public:
|
||||
virtual void ComputeTransformation(const G4int copyNo,
|
||||
|
||||
void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume *physVol) const;
|
||||
virtual G4Material* ComputeMaterial(const G4int copyNo,
|
||||
G4VPhysicalVolume* currentVol,
|
||||
const G4VTouchable* parentTouch=0);
|
||||
G4Material* ComputeMaterial(const G4int copyNo,
|
||||
G4VPhysicalVolume* currentVol,
|
||||
const G4VTouchable* parentTouch=0);
|
||||
|
||||
public:
|
||||
virtual void ComputeDimensions (G4Box&,const G4int,const G4VPhysicalVolume*)
|
||||
@@ -86,28 +89,30 @@ class RE04ParallelWorldParam : public G4VPVParameterisation
|
||||
|
||||
private: // Dummy declarations to get rid of warnings ...
|
||||
|
||||
virtual void ComputeDimensions (G4Trd&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Trap&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Cons&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Orb&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Sphere&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Torus&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Para&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Hype&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Tubs&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Polycone&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Polyhedra&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Trd&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Trap&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Cons&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Orb&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Sphere&,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:
|
||||
G4Material* fWater;
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
class RE04TrackingAction : public G4UserTrackingAction {
|
||||
|
||||
public:
|
||||
RE04TrackingAction(){};
|
||||
RE04TrackingAction() : G4UserTrackingAction() {};
|
||||
virtual ~RE04TrackingAction(){};
|
||||
|
||||
virtual void PreUserTrackingAction(const G4Track*);
|
||||
|
||||
@@ -60,7 +60,7 @@ typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
|
||||
/// - void ShowTrajectory(std::ostream& os=G4cout) const
|
||||
/// invokes the default implementation
|
||||
///
|
||||
/// - void DrawTrajectory(G4int i_mode = 0) const
|
||||
/// - void DrawTrajectory() const
|
||||
/// invokes the default implementation
|
||||
///
|
||||
/// - void AppendStep(const G4Step* aStep)
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
// Other member functions
|
||||
virtual void ShowTrajectory(std::ostream& os=G4cout) const;
|
||||
//virtual void DrawTrajectory() const;
|
||||
virtual void DrawTrajectory(G4int i_mode = 0) const;
|
||||
virtual void DrawTrajectory() const;
|
||||
virtual void AppendStep(const G4Step* aStep);
|
||||
virtual int GetPointEntries() const { return fPositionRecord->size(); }
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
@@ -155,18 +155,17 @@ public:
|
||||
|
||||
};
|
||||
|
||||
extern G4Allocator<RE04Trajectory> faTrajAllocator;
|
||||
extern G4ThreadLocal G4Allocator<RE04Trajectory> * faTrajAllocator;
|
||||
|
||||
inline void* RE04Trajectory::operator new(size_t)
|
||||
{
|
||||
void* aTrajectory;
|
||||
aTrajectory = (void*)faTrajAllocator.MallocSingle();
|
||||
return aTrajectory;
|
||||
if(!faTrajAllocator) faTrajAllocator = new G4Allocator<RE04Trajectory>;
|
||||
return (void*)faTrajAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void RE04Trajectory::operator delete(void* aTrajectory)
|
||||
{
|
||||
faTrajAllocator.FreeSingle((RE04Trajectory*)aTrajectory);
|
||||
faTrajAllocator->FreeSingle((RE04Trajectory*)aTrajectory);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -95,18 +95,18 @@ public:
|
||||
|
||||
};
|
||||
|
||||
extern G4Allocator<RE04TrajectoryPoint> faTrajPointAllocator;
|
||||
extern G4ThreadLocal G4Allocator<RE04TrajectoryPoint> * faTrajPointAllocator;
|
||||
|
||||
inline void* RE04TrajectoryPoint::operator new(size_t)
|
||||
{
|
||||
void *aTrajectoryPoint;
|
||||
aTrajectoryPoint = (void *) faTrajPointAllocator.MallocSingle();
|
||||
return aTrajectoryPoint;
|
||||
if(!faTrajPointAllocator)
|
||||
faTrajPointAllocator = new G4Allocator<RE04TrajectoryPoint>;
|
||||
return (void *) faTrajPointAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void RE04TrajectoryPoint::operator delete(void *aTrajectoryPoint)
|
||||
{
|
||||
faTrajPointAllocator.FreeSingle((RE04TrajectoryPoint *) aTrajectoryPoint);
|
||||
faTrajPointAllocator->FreeSingle((RE04TrajectoryPoint *) aTrajectoryPoint);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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: RE04ActionInitialization.cc 66522 2012-12-19 12:26:04Z ihrivnac $
|
||||
//
|
||||
/// \file src/RE04ActionInitialization.cc
|
||||
/// \brief Implementation of the RE04ActionInitialization class
|
||||
//
|
||||
|
||||
#include "RE04ActionInitialization.hh"
|
||||
#include "RE04PrimaryGeneratorAction.hh"
|
||||
#include "RE04EventAction.hh"
|
||||
//#include "RE04TrackingAction.hh"
|
||||
//#include "RE04SteppingAction.hh"
|
||||
|
||||
RE04ActionInitialization::RE04ActionInitialization()
|
||||
{;}
|
||||
|
||||
RE04ActionInitialization::~RE04ActionInitialization()
|
||||
{;}
|
||||
|
||||
void RE04ActionInitialization::Build() const
|
||||
{
|
||||
//
|
||||
SetUserAction(new RE04PrimaryGeneratorAction);
|
||||
//
|
||||
SetUserAction(new RE04EventAction);
|
||||
//
|
||||
//SetUserAction(new RE04TrackingAction);
|
||||
//SetUserAction(new RE04SteppingAction);
|
||||
|
||||
}
|
||||
|
||||
void RE04ActionInitialization::BuildForMaster() const
|
||||
{
|
||||
//
|
||||
//G4UserRunAction* run_action = new RE04RunAction;
|
||||
//SetUserAction(run_action);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,8 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04DetectorConstruction::RE04DetectorConstruction()
|
||||
: fAir(0), fWater(0), fPb(0), fWorldPhys(0), fConstructed(false)
|
||||
: G4VUserDetectorConstruction(),
|
||||
fAir(0), fWater(0), fPb(0), fWorldPhys(0), fConstructed(false)
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04EventAction::RE04EventAction()
|
||||
: G4UserEventAction()
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -63,7 +63,7 @@ void RE04ParallelWorldConstruction::Construct()
|
||||
//
|
||||
// material defined in the mass world
|
||||
//
|
||||
G4Material* water = G4Material::GetMaterial("Water");
|
||||
G4Material* water = G4Material::GetMaterial("G4_WATER");
|
||||
|
||||
//
|
||||
// parallel world placement box
|
||||
@@ -93,4 +93,3 @@ void RE04ParallelWorldConstruction::Construct()
|
||||
kXAxis, 2, param);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -37,9 +37,11 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04ParallelWorldParam::RE04ParallelWorldParam()
|
||||
: G4VPVParameterisation(),
|
||||
fWater(0), fPb(0)
|
||||
{
|
||||
fWater = G4Material::GetMaterial("Water");
|
||||
fPb = G4Material::GetMaterial("Lead");
|
||||
fWater = G4Material::GetMaterial("G4_WATER");
|
||||
fPb = G4Material::GetMaterial("G4_Pb");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file runAndEvent/RE04/src/RE04PhysicsList.cc
|
||||
/// \brief Implementation of the RE04PhysicsList class
|
||||
//
|
||||
// $Id: $
|
||||
//
|
||||
#include "RE04PhysicsList.hh"
|
||||
|
||||
#include "G4EmStandardPhysics.hh"
|
||||
#include "G4EmExtraPhysics.hh"
|
||||
#include "G4DecayPhysics.hh"
|
||||
#include "G4HadronElasticPhysics.hh"
|
||||
#include "HadronPhysicsQGSP_BERT.hh"
|
||||
#include "G4StoppingPhysics.hh"
|
||||
#include "G4IonPhysics.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04PhysicsList::RE04PhysicsList(G4String& parWorldName)
|
||||
:fpWorldName(parWorldName)
|
||||
{
|
||||
defaultCutValue = 0.01*mm;
|
||||
G4int ver = 1;
|
||||
SetVerboseLevel(ver);
|
||||
|
||||
// EM Physics
|
||||
this->RegisterPhysics( new G4EmStandardPhysics(ver) );
|
||||
|
||||
// Synchrotron Radiation & GN Physics
|
||||
this->RegisterPhysics( new G4EmExtraPhysics(ver) );
|
||||
|
||||
// Decays
|
||||
this->RegisterPhysics( new G4DecayPhysics(ver) );
|
||||
|
||||
// Hadron Elastic scattering
|
||||
this->RegisterPhysics( new G4HadronElasticPhysics(ver) );
|
||||
|
||||
// Hadron Physics
|
||||
this->RegisterPhysics( new HadronPhysicsQGSP_BERT(ver));
|
||||
|
||||
// Stopping Physics
|
||||
this->RegisterPhysics( new G4StoppingPhysics(ver) );
|
||||
|
||||
// Ion Physics
|
||||
this->RegisterPhysics( new G4IonPhysics(ver));
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04PhysicsList::~RE04PhysicsList()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE04PhysicsList::ConstructProcess()
|
||||
{
|
||||
AddTransportation();
|
||||
|
||||
AddParallelWorldProcess();
|
||||
|
||||
G4PhysConstVector::iterator itr;
|
||||
for (itr = physicsVector->begin(); itr!= physicsVector->end(); ++itr) {
|
||||
(*itr)->ConstructProcess();
|
||||
}
|
||||
}
|
||||
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ProcessVector.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ChargedGeantino.hh"
|
||||
|
||||
#include "G4ParallelWorldProcess.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE04PhysicsList::AddParallelWorldProcess()
|
||||
{
|
||||
// Add parallel world process
|
||||
G4ParallelWorldProcess* theParallelWorldProcess
|
||||
= new G4ParallelWorldProcess("paraWorldProc");
|
||||
theParallelWorldProcess->SetParallelWorld(fpWorldName);
|
||||
theParallelWorldProcess->SetLayeredMaterialFlag();
|
||||
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
if(particle!=G4ChargedGeantino::Definition()) {
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
pmanager->AddProcess(theParallelWorldProcess);
|
||||
if(theParallelWorldProcess->IsAtRestRequired(particle))
|
||||
{pmanager->SetProcessOrdering(theParallelWorldProcess, idxAtRest, 9999);}
|
||||
pmanager->SetProcessOrdering(theParallelWorldProcess, idxAlongStep, 1);
|
||||
pmanager->SetProcessOrdering(theParallelWorldProcess, idxPostStep, 9999);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE04PhysicsList::SetCuts()
|
||||
{
|
||||
SetCutsWithDefault();
|
||||
}
|
||||
@@ -39,6 +39,8 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04PrimaryGeneratorAction::RE04PrimaryGeneratorAction()
|
||||
: G4VUserPrimaryGeneratorAction(),
|
||||
fParticleGun(0)
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
fParticleGun = new G4ParticleGun(n_particle);
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04SteppingAction::RE04SteppingAction()
|
||||
: G4UserSteppingAction()
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "RE04Trajectory.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE04TrackingAction::PreUserTrackingAction(const G4Track* aTrack)
|
||||
void RE04TrackingAction::PreUserTrackingAction(const G4Track* aTrack)
|
||||
{
|
||||
fpTrackingManager->SetStoreTrajectory(true);
|
||||
fpTrackingManager->SetTrajectory(new RE04Trajectory(aTrack));
|
||||
|
||||
@@ -42,11 +42,12 @@
|
||||
#include "G4AttCheck.hh"
|
||||
#endif
|
||||
|
||||
G4Allocator<RE04Trajectory> faTrajAllocator;
|
||||
G4ThreadLocal G4Allocator<RE04Trajectory> * faTrajAllocator = 0;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04Trajectory::RE04Trajectory()
|
||||
: fPositionRecord(0), fTrackID(0), fParentID(0),
|
||||
: G4VTrajectory(),
|
||||
fPositionRecord(0), fTrackID(0), fParentID(0),
|
||||
fPDGEncoding( 0 ), fPDGCharge(0.0), fParticleName(""),
|
||||
fInitialKineticEnergy( 0. ), fInitialMomentum( G4ThreeVector() )
|
||||
{;}
|
||||
@@ -110,7 +111,6 @@ void RE04Trajectory::ShowTrajectory(std::ostream& os) const
|
||||
// ... or override with your own code here.
|
||||
}
|
||||
|
||||
/***
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE04Trajectory::DrawTrajectory() const
|
||||
{
|
||||
@@ -118,15 +118,6 @@ void RE04Trajectory::DrawTrajectory() const
|
||||
G4VTrajectory::DrawTrajectory();
|
||||
// ... or override with your own code here.
|
||||
}
|
||||
***/
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE04Trajectory::DrawTrajectory(G4int i_mode) const
|
||||
{
|
||||
// Invoke the default implementation in G4VTrajectory...
|
||||
G4VTrajectory::DrawTrajectory(i_mode);
|
||||
// ... or override with your own code here.
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
const std::map<G4String,G4AttDef>* RE04Trajectory::GetAttDefs() const
|
||||
|
||||
@@ -42,26 +42,30 @@
|
||||
#include "G4AttCheck.hh"
|
||||
#endif
|
||||
|
||||
G4Allocator<RE04TrajectoryPoint> faTrajPointAllocator;
|
||||
G4ThreadLocal G4Allocator<RE04TrajectoryPoint> * faTrajPointAllocator = 0;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04TrajectoryPoint::RE04TrajectoryPoint()
|
||||
: G4VTrajectoryPoint(),
|
||||
fPosition(G4ThreeVector(0.,0.,0.)),
|
||||
fpMaterial(0)
|
||||
{
|
||||
fPosition = G4ThreeVector(0.,0.,0.);
|
||||
fpMaterial = 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04TrajectoryPoint::RE04TrajectoryPoint(G4ThreeVector pos,
|
||||
const G4Material* mat)
|
||||
: G4VTrajectoryPoint(),
|
||||
fPosition(pos),
|
||||
fpMaterial(mat)
|
||||
{
|
||||
fPosition = pos;
|
||||
fpMaterial = mat;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04TrajectoryPoint::RE04TrajectoryPoint(const RE04TrajectoryPoint &right)
|
||||
: G4VTrajectoryPoint(),fPosition(right.fPosition),fpMaterial(right.fpMaterial)
|
||||
: G4VTrajectoryPoint(),
|
||||
fPosition(right.fPosition),
|
||||
fpMaterial(right.fpMaterial)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user