Import Geant4 9.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:25:56 +02:00
parent 74cad5e589
commit 89a9605df1
4440 changed files with 379508 additions and 189225 deletions
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: ExN06DetectorConstruction.cc,v 1.17 2008/07/17 00:32:34 gum Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: ExN06DetectorConstruction.cc,v 1.18 2010/10/23 19:27:38 gum Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -33,26 +33,22 @@
#include "ExN06DetectorConstruction.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4Element.hh"
#include "G4ElementTable.hh"
#include "G4LogicalBorderSurface.hh"
#include "G4LogicalSkinSurface.hh"
#include "G4OpticalSurface.hh"
#include "G4Box.hh"
#include "G4LogicalVolume.hh"
#include "G4RotationMatrix.hh"
#include "G4ThreeVector.hh"
#include "G4Transform3D.hh"
#include "G4PVPlacement.hh"
#include "G4OpBoundaryProcess.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExN06DetectorConstruction::ExN06DetectorConstruction()
{
expHall_x = expHall_y = expHall_z = 10*m;
tank_x = tank_y = tank_z = 5*m;
bubble_x = bubble_y = bubble_z = 0.5*m;
expHall_x = expHall_y = expHall_z = 10.0*m;
tank_x = tank_y = tank_z = 5.0*m;
bubble_x = bubble_y = bubble_z = 0.5*m;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -144,7 +140,59 @@ G4VPhysicalVolume* ExN06DetectorConstruction::Construct()
myMPT1->AddConstProperty("FASTTIMECONSTANT", 1.*ns);
myMPT1->AddConstProperty("SLOWTIMECONSTANT",10.*ns);
myMPT1->AddConstProperty("YIELDRATIO",0.8);
const G4int NUMENTRIES_water = 90;
G4double ENERGY_water[NUMENTRIES_water] = {
1.56962*eV, 1.58974*eV, 1.61039*eV, 1.63157*eV,
1.65333*eV, 1.67567*eV, 1.69863*eV, 1.72222*eV,
1.74647*eV, 1.77142*eV, 1.7971 *eV, 1.82352*eV,
1.85074*eV, 1.87878*eV, 1.90769*eV, 1.93749*eV,
1.96825*eV, 1.99999*eV, 2.03278*eV, 2.06666*eV,
2.10169*eV, 2.13793*eV, 2.17543*eV, 2.21428*eV,
2.25454*eV, 2.29629*eV, 2.33962*eV, 2.38461*eV,
2.43137*eV, 2.47999*eV, 2.53061*eV, 2.58333*eV,
2.63829*eV, 2.69565*eV, 2.75555*eV, 2.81817*eV,
2.88371*eV, 2.95237*eV, 3.02438*eV, 3.09999*eV,
3.17948*eV, 3.26315*eV, 3.35134*eV, 3.44444*eV,
3.54285*eV, 3.64705*eV, 3.75757*eV, 3.87499*eV,
3.99999*eV, 4.13332*eV, 4.27585*eV, 4.42856*eV,
4.59258*eV, 4.76922*eV, 4.95999*eV, 5.16665*eV,
5.39129*eV, 5.63635*eV, 5.90475*eV, 6.19998*eV
};
//assume 100 times larger than the rayleigh scattering for now.
G4double MIE_water[NUMENTRIES_water] = {
167024.4*m, 158726.7*m, 150742 *m,
143062.5*m, 135680.2*m, 128587.4*m,
121776.3*m, 115239.5*m, 108969.5*m,
102958.8*m, 97200.35*m, 91686.86*m,
86411.33*m, 81366.79*m, 76546.42*m,
71943.46*m, 67551.29*m, 63363.36*m,
59373.25*m, 55574.61*m, 51961.24*m,
48527.00*m, 45265.87*m, 42171.94*m,
39239.39*m, 36462.50*m, 33835.68*m,
31353.41*m, 29010.30*m, 26801.03*m,
24720.42*m, 22763.36*m, 20924.88*m,
19200.07*m, 17584.16*m, 16072.45*m,
14660.38*m, 13343.46*m, 12117.33*m,
10977.70*m, 9920.416*m, 8941.407*m,
8036.711*m, 7202.470*m, 6434.927*m,
5730.429*m, 5085.425*m, 4496.467*m,
3960.210*m, 3473.413*m, 3032.937*m,
2635.746*m, 2278.907*m, 1959.588*m,
1675.064*m, 1422.710*m, 1200.004*m,
1004.528*m, 833.9666*m, 686.1063*m
};
// gforward, gbackward, forward backward ratio
G4double MIE_water_const[3]={0.99,0.99,0.8};
myMPT1->AddProperty("MIEHG",ENERGY_water,MIE_water,NUMENTRIES_water);
myMPT1->AddConstProperty("MIEHG_FORWARD",MIE_water_const[0]);
myMPT1->AddConstProperty("MIEHG_BACKWARD",MIE_water_const[1]);
myMPT1->AddConstProperty("MIEHG_FORWARD_RATIO",MIE_water_const[2]);
Water->SetMaterialPropertiesTable(myMPT1);
// Set the Birks Constant for the Water scintillator
@@ -210,13 +258,9 @@ G4VPhysicalVolume* ExN06DetectorConstruction::Construct()
OpWaterSurface->SetFinish(ground);
OpWaterSurface->SetModel(unified);
G4LogicalBorderSurface* WaterSurface =
new G4LogicalBorderSurface("WaterSurface",
new G4LogicalBorderSurface("WaterSurface",
waterTank_phys,expHall_phys,OpWaterSurface);
if(WaterSurface->GetVolume1() == waterTank_phys) G4cout << "Equal" << G4endl;
if(WaterSurface->GetVolume2() == expHall_phys ) G4cout << "Equal" << G4endl;
// Air Bubble
//
G4OpticalSurface* OpAirSurface = new G4OpticalSurface("AirSurface");
@@ -227,7 +271,6 @@ G4VPhysicalVolume* ExN06DetectorConstruction::Construct()
G4LogicalSkinSurface* AirSurface =
new G4LogicalSkinSurface("AirSurface", bubbleAir_log, OpAirSurface);
if(AirSurface->GetLogicalVolume() == bubbleAir_log) G4cout << "Equal" << G4endl;
G4OpticalSurface* opticalSurface = dynamic_cast <G4OpticalSurface*>
(AirSurface->GetSurface(bubbleAir_log)->GetSurfaceProperty());
@@ -237,7 +280,7 @@ G4VPhysicalVolume* ExN06DetectorConstruction::Construct()
// Generate & Add Material Properties Table attached to the optical surfaces
//
const G4int num = 2;
G4double Ephoton[num] = {2.038*eV, 4.144*eV};
G4double Ephoton[num] = {2.034*eV, 4.136*eV};
//OpticalWaterSurface
G4double RefractiveIndex[num] = {1.35, 1.40};
@@ -1,65 +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. *
// ********************************************************************
//
//
// $Id: ExN06EventAction.cc,v 1.3 2006/06/29 17:54:20 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "ExN06EventAction.hh"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4TrajectoryContainer.hh"
#include "G4Trajectory.hh"
#include "G4VVisManager.hh"
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExN06EventAction::ExN06EventAction()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExN06EventAction::~ExN06EventAction()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExN06EventAction::BeginOfEventAction(const G4Event*)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExN06EventAction::EndOfEventAction(const G4Event*)
{
// Trajectory drawing now done by vis mananger under vis comamnds.
// See vis.mac.
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+28 -26
View File
@@ -24,15 +24,12 @@
// ********************************************************************
//
//
// $Id: ExN06PhysicsList.cc,v 1.17 2009/11/10 05:16:23 gum Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: ExN06PhysicsList.cc,v 1.19 2010/10/23 19:14:03 gum Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4ios.hh"
#include <iomanip>
#include "globals.hh"
#include "ExN06PhysicsList.hh"
#include "ExN06PhysicsListMessenger.hh"
@@ -41,16 +38,13 @@
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4Cerenkov.hh"
#include "G4Scintillation.hh"
#include "G4OpAbsorption.hh"
#include "G4OpRayleigh.hh"
#include "G4OpMieHG.hh"
#include "G4OpBoundaryProcess.hh"
#include "G4LossTableManager.hh"
@@ -60,11 +54,12 @@
ExN06PhysicsList::ExN06PhysicsList() : G4VUserPhysicsList()
{
theCerenkovProcess = 0;
theScintillationProcess = 0;
theAbsorptionProcess = 0;
theRayleighScatteringProcess = 0;
theBoundaryProcess = 0;
theCerenkovProcess = NULL;
theScintillationProcess = NULL;
theAbsorptionProcess = NULL;
theRayleighScatteringProcess = NULL;
theMieHGScatteringProcess = NULL;
theBoundaryProcess = NULL;
pMessenger = new ExN06PhysicsListMessenger(this);
SetVerboseLevel(0);
@@ -109,12 +104,16 @@ void ExN06PhysicsList::ConstructBosons()
void ExN06PhysicsList::ConstructLeptons()
{
// leptons
// e+/-
G4Electron::ElectronDefinition();
G4Positron::PositronDefinition();
G4NeutrinoE::NeutrinoEDefinition();
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
// mu+/-
G4MuonPlus::MuonPlusDefinition();
G4MuonMinus::MuonMinusDefinition();
// nu_e
G4NeutrinoE::NeutrinoEDefinition();
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
// nu_mu
G4NeutrinoMu::NeutrinoMuDefinition();
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
}
@@ -123,7 +122,7 @@ void ExN06PhysicsList::ConstructLeptons()
void ExN06PhysicsList::ConstructMesons()
{
// mesons
// mesons
G4PionPlus::PionPlusDefinition();
G4PionMinus::PionMinusDefinition();
G4PionZero::PionZeroDefinition();
@@ -133,9 +132,10 @@ void ExN06PhysicsList::ConstructMesons()
void ExN06PhysicsList::ConstructBaryons()
{
// barions
// barions
G4Proton::ProtonDefinition();
G4AntiProton::AntiProtonDefinition();
G4Neutron::NeutronDefinition();
G4AntiNeutron::AntiNeutronDefinition();
}
@@ -206,9 +206,9 @@ void ExN06PhysicsList::ConstructEM()
if (particleName == "gamma") {
// gamma
// Construct processes for gamma
// pmanager->AddDiscreteProcess(new G4GammaConversion());
// pmanager->AddDiscreteProcess(new G4ComptonScattering());
// pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
pmanager->AddDiscreteProcess(new G4GammaConversion());
pmanager->AddDiscreteProcess(new G4ComptonScattering());
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
} else if (particleName == "e-") {
//electron
@@ -237,7 +237,7 @@ void ExN06PhysicsList::ConstructEM()
} else {
if ((particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
// all others charged particles except geantino
// all others charged particles except geantino
pmanager->AddProcess(new G4hMultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4hIonisation(), -1,2,2);
}
@@ -250,14 +250,14 @@ void ExN06PhysicsList::ConstructEM()
void ExN06PhysicsList::ConstructOp()
{
theCerenkovProcess = new G4Cerenkov("Cerenkov");
theScintillationProcess = new G4Scintillation("Scintillation");
theAbsorptionProcess = new G4OpAbsorption();
theScintillationProcess = new G4Scintillation("Scintillation");
theAbsorptionProcess = new G4OpAbsorption();
theRayleighScatteringProcess = new G4OpRayleigh();
theBoundaryProcess = new G4OpBoundaryProcess();
theMieHGScatteringProcess = new G4OpMieHG();
theBoundaryProcess = new G4OpBoundaryProcess();
// theCerenkovProcess->DumpPhysicsTable();
// theScintillationProcess->DumpPhysicsTable();
// theAbsorptionProcess->DumpPhysicsTable();
// theRayleighScatteringProcess->DumpPhysicsTable();
SetVerbose(1);
@@ -295,6 +295,7 @@ void ExN06PhysicsList::ConstructOp()
G4cout << " AddDiscreteProcess to OpticalPhoton " << G4endl;
pmanager->AddDiscreteProcess(theAbsorptionProcess);
pmanager->AddDiscreteProcess(theRayleighScatteringProcess);
pmanager->AddDiscreteProcess(theMieHGScatteringProcess);
pmanager->AddDiscreteProcess(theBoundaryProcess);
}
}
@@ -308,6 +309,7 @@ void ExN06PhysicsList::SetVerbose(G4int verbose)
theScintillationProcess->SetVerboseLevel(verbose);
theAbsorptionProcess->SetVerboseLevel(verbose);
theRayleighScatteringProcess->SetVerboseLevel(verbose);
theMieHGScatteringProcess->SetVerboseLevel(verbose);
theBoundaryProcess->SetVerboseLevel(verbose);
}
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: ExN06StackingAction.cc,v 1.5 2006/06/29 17:54:34 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: ExN06StackingAction.cc,v 1.6 2010/01/13 15:48:18 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -66,7 +66,7 @@ ExN06StackingAction::ClassifyNewTrack(const G4Track * aTrack)
void ExN06StackingAction::NewStage()
{
G4cout << "Number of optical photons produces in this event : "
G4cout << "Number of optical photons produced in this event : "
<< gammaCounter << G4endl;
}