Import Geant4 6.2.0 source tree
This commit is contained in:
@@ -0,0 +1,177 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysicsList.cc,v 1.1 2004/05/04 10:03:04 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: PhysicsList
|
||||
//
|
||||
// Author: V.Ivanchenko 03.05.2004
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "PhysicsList.hh"
|
||||
#include "PhysicsListMessenger.hh"
|
||||
|
||||
#include "ParticlesBuilder.hh"
|
||||
#include "G4EmQEDBuilder.hh"
|
||||
#include "G4EmMuonBuilder.hh"
|
||||
#include "G4EmHadronBuilder.hh"
|
||||
#include "G4EmHighEnergyBuilder.hh"
|
||||
#include "G4EmQEDBuilder52.hh"
|
||||
#include "G4EmMuonBuilder52.hh"
|
||||
#include "G4EmHadronBuilder52.hh"
|
||||
#include "DecaysBuilder.hh"
|
||||
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4LossTableManager.hh"
|
||||
#include "G4EmProcessOptions.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsList::PhysicsList() : G4VModularPhysicsList(),
|
||||
verbose(0),
|
||||
emBuilderIsRegisted(false)
|
||||
{
|
||||
G4LossTableManager::Instance();
|
||||
defaultCutValue = 1.*mm;
|
||||
cutForGamma = defaultCutValue;
|
||||
cutForElectron = defaultCutValue;
|
||||
cutForPositron = defaultCutValue;
|
||||
|
||||
pMessenger = new PhysicsListMessenger(this);
|
||||
|
||||
// Add Physics builders
|
||||
RegisterPhysics(new ParticlesBuilder());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsList::~PhysicsList()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::ConstructParticle()
|
||||
{
|
||||
if(!emBuilderIsRegisted) AddPhysicsList("standard");
|
||||
G4VModularPhysicsList::ConstructParticle();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::ConstructProcess()
|
||||
{
|
||||
G4VModularPhysicsList::ConstructProcess();
|
||||
|
||||
// Define energy interval for loss processes
|
||||
G4EmProcessOptions emOptions;
|
||||
emOptions.SetMinEnergy(0.1*keV);
|
||||
emOptions.SetMaxEnergy(100.*GeV);
|
||||
emOptions.SetDEDXBinning(90);
|
||||
emOptions.SetLambdaBinning(90);
|
||||
emOptions.SetBuildPreciseRange(false);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::AddPhysicsList(const G4String& name)
|
||||
{
|
||||
G4bool yes = false;
|
||||
|
||||
if ("standard" == name && !emBuilderIsRegisted) {
|
||||
RegisterPhysics(new G4EmQEDBuilder());
|
||||
RegisterPhysics(new G4EmMuonBuilder());
|
||||
RegisterPhysics(new G4EmHadronBuilder());
|
||||
RegisterPhysics(new DecaysBuilder());
|
||||
emBuilderIsRegisted = true;
|
||||
yes = true;
|
||||
|
||||
} else if ("g4v52" == name && !emBuilderIsRegisted) {
|
||||
RegisterPhysics(new G4EmQEDBuilder52());
|
||||
RegisterPhysics(new G4EmMuonBuilder52());
|
||||
RegisterPhysics(new G4EmHadronBuilder52());
|
||||
RegisterPhysics(new DecaysBuilder());
|
||||
emBuilderIsRegisted = true;
|
||||
yes = true;
|
||||
|
||||
} else if ("high_energy" == name ) {
|
||||
RegisterPhysics(new G4EmHighEnergyBuilder());
|
||||
|
||||
} else {
|
||||
G4cout << "PhysicsList::AddPhysicsList <" << name << ">"
|
||||
<< " fail - name is unknown " << G4endl;
|
||||
}
|
||||
if (verbose>0 && yes) {
|
||||
G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetCuts()
|
||||
{
|
||||
|
||||
SetCutValue(cutForGamma, "gamma");
|
||||
SetCutValue(cutForElectron, "e-");
|
||||
SetCutValue(cutForPositron, "e+");
|
||||
|
||||
if (verbose>0) DumpCutValuesTable();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetVerbose(G4int val)
|
||||
{
|
||||
verbose = val;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetCutForGamma(G4double cut)
|
||||
{
|
||||
cutForGamma = cut;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetCutForElectron(G4double cut)
|
||||
{
|
||||
cutForElectron = cut;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetCutForPositron(G4double cut)
|
||||
{
|
||||
cutForPositron = cut;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
Reference in New Issue
Block a user