Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -26,7 +26,7 @@ ExN04EventAction::ExN04EventAction()
|
||||
ExN04EventAction::~ExN04EventAction()
|
||||
{;}
|
||||
|
||||
void ExN04EventAction::BeginOfEventAction()
|
||||
void ExN04EventAction::BeginOfEventAction(const G4Event*)
|
||||
{
|
||||
G4SDManager * SDman = G4SDManager::GetSDMpointer();
|
||||
if(trackerCollID<0||calorimeterCollID<0||muonCollID<0)
|
||||
@@ -43,10 +43,8 @@ void ExN04EventAction::BeginOfEventAction()
|
||||
}
|
||||
}
|
||||
|
||||
void ExN04EventAction::EndOfEventAction()
|
||||
void ExN04EventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
const G4Event* evt = fpEventManager->GetConstCurrentEvent();
|
||||
|
||||
G4cout << ">>> Event " << evt->GetEventID() << endl;
|
||||
|
||||
if(trackerCollID<0||calorimeterCollID<0||muonCollID<0) return;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: ExN04PhysicsList.cc,v 1.12 1998/12/14 21:17:58 stesting Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: ExN04PhysicsList.cc,v 1.5 1999/06/17 04:18:47 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
#include "G4ProcessVector.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4BosonConstructor.hh"
|
||||
#include "G4LeptonConstructor.hh"
|
||||
#include "G4MesonConstructor.hh"
|
||||
#include "G4BarionConstructor.hh"
|
||||
#include "G4IonConstructor.hh"
|
||||
#include "G4ShortLivedConstructor.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4ios.hh"
|
||||
@@ -29,6 +35,9 @@
|
||||
|
||||
ExN04PhysicsList::ExN04PhysicsList(): G4VUserPhysicsList()
|
||||
{
|
||||
// default cut value (1.0mm)
|
||||
defaultCutValue = 1.0*mm;
|
||||
|
||||
SetVerboseLevel(1);
|
||||
}
|
||||
|
||||
@@ -45,15 +54,19 @@ void ExN04PhysicsList::ConstructParticle()
|
||||
// created in the program.
|
||||
|
||||
// create all particles
|
||||
ConstructAllParticles();
|
||||
ConstructAllBosons();
|
||||
ConstructAllLeptons();
|
||||
ConstructAllMesons();
|
||||
ConstructAllBarions();
|
||||
ConstructAllIons();
|
||||
ConstructAllShortLiveds();
|
||||
}
|
||||
|
||||
void ExN04PhysicsList::ConstructProcess()
|
||||
{
|
||||
AddTransportation();
|
||||
AddParameterisation();
|
||||
|
||||
ConstructEM();
|
||||
ConstructLeptHad();
|
||||
ConstructHad();
|
||||
ConstructGeneral();
|
||||
}
|
||||
@@ -610,9 +623,6 @@ void ExN04PhysicsList::ConstructHad()
|
||||
}
|
||||
|
||||
|
||||
void ExN04PhysicsList::ConstructLeptHad()
|
||||
{;}
|
||||
|
||||
#include "G4Decay.hh"
|
||||
void ExN04PhysicsList::ConstructGeneral()
|
||||
{
|
||||
@@ -630,40 +640,53 @@ void ExN04PhysicsList::ConstructGeneral()
|
||||
}
|
||||
}
|
||||
}
|
||||
void ExN04PhysicsList::AddParameterisation()
|
||||
|
||||
void ExN04PhysicsList::SetCuts()
|
||||
{
|
||||
G4FastSimulationManagerProcess*
|
||||
theFastSimulationManagerProcess =
|
||||
new G4FastSimulationManagerProcess();
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
pmanager->AddDiscreteProcess(theFastSimulationManagerProcess);
|
||||
}
|
||||
// " G4VUserPhysicsList::SetCutsWithDefault" method sets
|
||||
// the default cut value for all particle types
|
||||
SetCutsWithDefault();
|
||||
}
|
||||
|
||||
void ExN04PhysicsList::SetCuts(G4double cut)
|
||||
void ExN04PhysicsList::ConstructAllBosons()
|
||||
{
|
||||
if (verboseLevel >0){
|
||||
G4cout << "ExN04PhysicsList::SetCuts:";
|
||||
G4cout << "CutLength : " << cut/mm << " (mm)" << endl;
|
||||
}
|
||||
|
||||
// set cut values for gamma at first and for e- second and next for e+,
|
||||
// because some processes for e+/e- need cut values for gamma
|
||||
SetCutValue(cut, "gamma");
|
||||
SetCutValue(cut, "e-");
|
||||
SetCutValue(cut, "e+");
|
||||
|
||||
// set cut values for proton and anti_proton before all other hadrons
|
||||
// because some processes for hadrons need cut values for proton/anti_proton
|
||||
SetCutValue(cut, "proton");
|
||||
SetCutValue(cut, "anti_proton");
|
||||
|
||||
SetCutValueForOthers(cut);
|
||||
|
||||
if (verboseLevel>1) {
|
||||
DumpCutValuesTable();
|
||||
}
|
||||
// Construct all bosons
|
||||
G4BosonConstructor pConstructor;
|
||||
pConstructor.ConstructParticle();
|
||||
}
|
||||
|
||||
void ExN04PhysicsList::ConstructAllLeptons()
|
||||
{
|
||||
// Construct all leptons
|
||||
G4LeptonConstructor pConstructor;
|
||||
pConstructor.ConstructParticle();
|
||||
}
|
||||
|
||||
void ExN04PhysicsList::ConstructAllMesons()
|
||||
{
|
||||
// Construct all mesons
|
||||
G4MesonConstructor pConstructor;
|
||||
pConstructor.ConstructParticle();
|
||||
}
|
||||
|
||||
void ExN04PhysicsList::ConstructAllBarions()
|
||||
{
|
||||
// Construct all barions
|
||||
G4BarionConstructor pConstructor;
|
||||
pConstructor.ConstructParticle();
|
||||
}
|
||||
|
||||
void ExN04PhysicsList::ConstructAllIons()
|
||||
{
|
||||
// Construct light ions
|
||||
G4IonConstructor pConstructor;
|
||||
pConstructor.ConstructParticle();
|
||||
}
|
||||
|
||||
void ExN04PhysicsList::ConstructAllShortLiveds()
|
||||
{
|
||||
// Construct resonaces and quarks
|
||||
G4ShortLivedConstructor pConstructor;
|
||||
pConstructor.ConstructParticle();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ ExN04StackingAction::~ExN04StackingAction()
|
||||
{ delete theMessenger; }
|
||||
|
||||
G4ClassificationOfNewTrack
|
||||
ExN04StackingAction::ClassifyNewTrack(G4Track *const aTrack)
|
||||
ExN04StackingAction::ClassifyNewTrack(const G4Track * aTrack)
|
||||
{
|
||||
G4ClassificationOfNewTrack classification = fWaiting;
|
||||
switch(stage)
|
||||
@@ -65,7 +65,7 @@ ExN04StackingAction::ClassifyNewTrack(G4Track *const aTrack)
|
||||
return classification;
|
||||
}
|
||||
|
||||
G4bool ExN04StackingAction::InsideRoI(G4Track *const aTrack,G4double ang)
|
||||
G4bool ExN04StackingAction::InsideRoI(const G4Track * aTrack,G4double ang)
|
||||
{
|
||||
if(!muonHits)
|
||||
{ muonHits = (ExN04MuonHitsCollection*)GetCollection("muonCollection"); }
|
||||
|
||||
@@ -15,10 +15,9 @@ ExN04SteppingAction::ExN04SteppingAction()
|
||||
ExN04SteppingAction::~ExN04SteppingAction()
|
||||
{;}
|
||||
|
||||
void ExN04SteppingAction::UserSteppingAction()
|
||||
void ExN04SteppingAction::UserSteppingAction(const G4Step * theStep)
|
||||
{
|
||||
G4SteppingManager * SM = GetOmnipotentSteppingManager();
|
||||
G4Step * theStep = SM->GetStep();
|
||||
G4SteppingManager * SM = fpSteppingManager;
|
||||
G4Track * theTrack = theStep->GetTrack();
|
||||
|
||||
// check if it is alive
|
||||
|
||||
@@ -4,16 +4,13 @@
|
||||
#include "G4TrackingManager.hh"
|
||||
#include "G4Track.hh"
|
||||
|
||||
void ExN04TrackingAction::PreUserTrackingAction()
|
||||
void ExN04TrackingAction::PreUserTrackingAction(const G4Track* aTrack)
|
||||
{
|
||||
G4TrackingManager* trackingManager = GetOmnipotentTrackingManager();
|
||||
G4Track* aTrack = trackingManager->GetTrack();
|
||||
|
||||
// Create trajectory only for primaries
|
||||
if(aTrack->GetParentID()==0)
|
||||
{ trackingManager->SetStoreTrajectory(true); }
|
||||
{ fpTrackingManager->SetStoreTrajectory(true); }
|
||||
else
|
||||
{ trackingManager->SetStoreTrajectory(false); }
|
||||
{ fpTrackingManager->SetStoreTrajectory(false); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user