Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -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