Import Geant4 8.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:44:26 +02:00
parent 8a51e0bc40
commit 216a75eeb1
8717 changed files with 360418 additions and 141343 deletions
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10CalorHit.cc,v 1.3 2004/12/03 09:33:46 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10CalorHit.cc,v 1.4 2006/06/29 16:38:31 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10CalorimeterSD.cc,v 1.3 2004/12/03 09:33:46 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10CalorimeterSD.cc,v 1.4 2006/06/29 16:38:33 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
File diff suppressed because it is too large Load Diff
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10DetectorMessenger.cc,v 1.9 2005/11/29 14:42:22 grichine Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10DetectorMessenger.cc,v 1.11 2006/06/29 16:38:38 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
@@ -55,6 +58,12 @@ Em10DetectorMessenger::Em10DetectorMessenger(Em10DetectorConstruction * Em10Det)
RadiatorMaterCmd->SetDefaultValue("CH2");
RadiatorMaterCmd->AvailableForStates(G4State_Idle);
DetectorSetUpCmd = new G4UIcmdWithAString("/XTRdetector/setup",this);
DetectorSetUpCmd->SetGuidance("Select setup for comparison with experiment");
DetectorSetUpCmd->SetParameterName("choice",true);
DetectorSetUpCmd->SetDefaultValue("simpleALICE");
DetectorSetUpCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
ModelCmd = new G4UIcmdWithAnInteger("/XTRdetector/setModel",this);
ModelCmd->SetGuidance("Select Model for XTR");
ModelCmd->SetParameterName("choice",true);
@@ -210,6 +219,9 @@ void Em10DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
if( command == AbsMaterCmd )
{ Em10Detector->SetAbsorberMaterial(newValue);}
if( command == DetectorSetUpCmd )
{ Em10Detector->SetDetectorSetUp(newValue);}
if( command == RadiatorMaterCmd )
{ Em10Detector->SetRadiatorMaterial(newValue);}
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10EventAction.cc,v 1.5 2005/12/06 11:31:44 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10EventAction.cc,v 1.6 2006/06/29 16:38:41 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10EventActionMessenger.cc,v 1.3 2002/12/05 00:24:24 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10EventActionMessenger.cc,v 1.4 2006/06/29 16:38:44 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
@@ -0,0 +1,460 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
// GEANT 4 class
//
// History: based on object model of
// Em10Materials
// Originally Created in Test30 by Vladimir Ivanchenko, 12 March 2002
//
// Modified for TestEm10 by V. Grichine, 29 Jan 2006
// is filled with XTR related materials, plastics, gas mixtures, etc
#include "Em10Materials.hh"
#include "G4UnitsTable.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
Em10Materials::Em10Materials()
{
Initialise();
}
Em10Materials::~Em10Materials()
{}
void Em10Materials::Initialise()
{
G4String name, symbol;
G4double a, z;
G4double density, fractionmass;
G4int nel, ncomponents;
G4Material* ma;
// define Elements
a = 1.01*g/mole;
G4Element* elH = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
a = 6.94*g/mole;
G4Element* elLi = new G4Element(name="Lithium",symbol="Li" , z= 3., a);
a = 9.01*g/mole;
G4Element* elBe = new G4Element(name="Berillium",symbol="Be" , z= 4., a);
a = 12.01*g/mole;
G4Element* elC = new G4Element(name="Carbon", symbol="C", z=6., a);
a = 14.01*g/mole;
G4Element* elN = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
a = 16.00*g/mole;
G4Element* elO = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
a = 39.948*g/mole;
G4Element* elAr = new G4Element(name="Argon", symbol="Ar", z=18., a);
/*
a = 131.29*g/mole;
G4Element* elXe = new G4Element(name="Xenon", symbol="Xe", z=54., a);
a = 19.00*g/mole;
G4Element* elF = new G4Element(name="Fluorine", symbol="F", z=9., a);
*/
//////////////
//
// Detector windows, electrodes
// Al for electrodes
density = 2.700*g/cm3;
a = 26.98*g/mole;
ma = new G4Material(name="Al", z=13., a, density);
/////////
//
// Materials for popular X-ray TR radiators
//
// TRT_CH2
density = 0.935*g/cm3;
G4Material* TRT_CH2 = new G4Material(name="TRT_CH2",density, nel=2);
TRT_CH2->AddElement(elC,1);
TRT_CH2->AddElement(elH,2);
// Radiator
density = 0.059*g/cm3;
G4Material* Radiator = new G4Material(name="Radiator",density, nel=2);
Radiator->AddElement(elC,1);
Radiator->AddElement(elH,2);
// Carbon Fiber
density = 0.145*g/cm3;
G4Material* CarbonFiber = new G4Material(name="CarbonFiber",density, nel=1);
CarbonFiber->AddElement(elC,1);
// Lithium
density = 0.534*g/cm3;
G4Material* Li = new G4Material(name="Li",density, nel=1);
Li->AddElement(elLi,1);
// Beryllium
density = 1.848*g/cm3;
G4Material* Be = new G4Material(name="Be",density, nel=1);
Be->AddElement(elBe,1);
// Mylar
density = 1.39*g/cm3;
G4Material* Mylar = new G4Material(name="Mylar", density, nel=3);
Mylar->AddElement(elO,2);
Mylar->AddElement(elC,5);
Mylar->AddElement(elH,4);
// Kapton Dupont de Nemur (density: 1.396-1.430, get middle )
density = 1.413*g/cm3;
G4Material* Kapton = new G4Material(name="Kapton", density, nel=4);
Kapton->AddElement(elO,5);
Kapton->AddElement(elC,22);
Kapton->AddElement(elN,2);
Kapton->AddElement(elH,10);
// Kapton (polyimide) ??? since = Mylar C5H4O2
// density = 1.39*g/cm3;
// G4Material* kapton = new G4Material(name="kapton", density, nel=3);
// Kapton->AddElement(elO,2);
// Kapton->AddElement(elC,5);
// Kapton->AddElement(elH,4);
// Polypropelene
G4Material* CH2 = new G4Material ("CH2" , 0.91*g/cm3, 2);
CH2->AddElement(elH,2);
CH2->AddElement(elC,1);
////////////////////////////
//
// Noble gases , STP conditions
// Helium as detector gas, STP
density = 0.178*mg/cm3;
a = 4.0026*g/mole;
G4Material* He = new G4Material(name="He",z=2., a, density );
// Neon as detector gas, STP
density = 0.900*mg/cm3;
a = 20.179*g/mole;
ma = new G4Material(name="Ne",z=10., a, density );
// Argon as detector gas, STP
density = 1.7836*mg/cm3; // STP
G4Material* Argon = new G4Material(name="Argon" , density, ncomponents=1);
Argon->AddElement(elAr, 1);
// Krypton as detector gas, STP
density = 3.700*mg/cm3;
a = 83.80*g/mole;
G4Material* Kr = new G4Material(name="Kr",z=36., a, density );
// Xenon as detector gas, STP
density = 5.858*mg/cm3;
a = 131.29*g/mole;
G4Material* Xe = new G4Material(name="Xenon",z=54., a, density );
/////////////////////////////////
//
// Hydrocarbones, metane and others
// Metane, STP
density = 0.7174*mg/cm3;
G4Material* metane = new G4Material(name="CH4",density,nel=2);
metane->AddElement(elC,1);
metane->AddElement(elH,4);
// Propane, STP
density = 2.005*mg/cm3 ;
G4Material* propane = new G4Material(name="C3H8",density,nel=2);
propane->AddElement(elC,3);
propane->AddElement(elH,8);
// iso-Butane (methylpropane), STP
density = 2.67*mg/cm3;
G4Material* isobutane = new G4Material(name="isoC4H10",density,nel=2);
isobutane->AddElement(elC,4);
isobutane->AddElement(elH,10);
/////////////////////////
//
// Molecular gases
// Carbon dioxide, STP
density = 1.977*mg/cm3;
G4Material* CO2 = new G4Material(name="CO2", density, nel=2,
kStateGas,273.15*kelvin,1.*atmosphere);
CO2->AddElement(elC,1);
CO2->AddElement(elO,2);
// Carbon dioxide, STP
density = 1.977*273.*mg/cm3/293.;
G4Material* CarbonDioxide = new G4Material(name="CO2", density, nel=2);
CarbonDioxide->AddElement(elC,1);
CarbonDioxide->AddElement(elO,2);
// Nitrogen, STP
density = 1.25053*mg/cm3; // STP
G4Material* Nitrogen = new G4Material(name="N2" , density, ncomponents=1);
Nitrogen->AddElement(elN, 2);
// Oxygen, STP
density = 1.4289*mg/cm3; // STP
G4Material* Oxygen = new G4Material(name="O2" , density, ncomponents=1);
Oxygen->AddElement(elO, 2);
/* *****************************
density = 1.25053*mg/cm3; // STP
a = 14.01*g/mole ; // get atomic weight !!!
// a = 28.016*g/mole;
G4Material* N2 = new G4Material(name="Nitrogen", z= 7.,a,density) ;
density = 1.25053*mg/cm3; // STP
G4Material* anotherN2 = new G4Material(name="anotherN2", density,ncomponents=2);
anotherN2->AddElement(elN, 1);
anotherN2->AddElement(elN, 1);
// air made from oxigen and nitrogen only
density = 1.290*mg/cm3; // old air from elements
G4Material* air = new G4Material(name="air" , density, ncomponents=2);
air->AddElement(elN, fractionmass=0.7);
air->AddElement(elO, fractionmass=0.3);
******************************************** */
// Dry Air (average composition with Ar), STP
density = 1.2928*mg/cm3 ; // STP
G4Material* Air = new G4Material(name="Air" , density, ncomponents=3);
Air->AddMaterial( Nitrogen, fractionmass = 0.7557 );
Air->AddMaterial( Oxygen, fractionmass = 0.2315 );
Air->AddMaterial( Argon, fractionmass = 0.0128 );
////////////////////////////////////////////////////////////////////////////
//
// MWPC mixtures
// 85% Xe + 15% CO2, STP
density = 4.9*mg/cm3;
G4Material* Xe15CO2 = new G4Material(name="Xe15CO2" , density, ncomponents=2);
Xe15CO2->AddMaterial( Xe, fractionmass = 0.979);
Xe15CO2->AddMaterial( CarbonDioxide, fractionmass = 0.021);
// 80% Xe + 20% CO2, STP
density = 5.0818*mg/cm3;
G4Material* Xe20CO2 = new G4Material(name="Xe20CO2" , density, ncomponents=2);
Xe20CO2->AddMaterial( Xe, fractionmass = 0.922 );
Xe20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.078 );
// 70% Xe + 27% CO2 + 3% O2, 20 1 atm ATLAS straw tube mixture
density = 4.358*mg/cm3;
G4Material* Xe27CO23O2 = new G4Material(name="Xe27CO23O2" , density, ncomponents=3);
Xe27CO23O2->AddMaterial( Xe, fractionmass = 0.87671);
Xe27CO23O2->AddMaterial( CarbonDioxide, fractionmass = 0.11412);
Xe27CO23O2->AddMaterial( Oxygen, fractionmass = 0.00917);
// 80% Kr + 20% CO2, STP
density = 3.601*mg/cm3;
G4Material* Kr20CO2 = new G4Material(name="Kr20CO2", density,
ncomponents=2);
Kr20CO2->AddMaterial( Kr, fractionmass = 0.89 );
Kr20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.11 );
// Xe + 55% He + 15% CH4 ; NIM A294 (1990) 465-472; STP
density = 1.963*273.*mg/cm3/293.;
G4Material* Xe55He15CH4 = new G4Material(name="Xe55He15CH4",density,
ncomponents=3);
Xe55He15CH4->AddMaterial(Xe, 0.895);
Xe55He15CH4->AddMaterial(He, 0.050);
Xe55He15CH4->AddMaterial(metane,0.055);
// 90% Xe + 10% CH4, STP ; NIM A248 (1986) 379-388
density = 5.344*mg/cm3;
G4Material* Xe10CH4 = new G4Material(name="Xe10CH4" , density,
ncomponents=2);
Xe10CH4->AddMaterial( Xe, fractionmass = 0.987 ) ;
Xe10CH4->AddMaterial( metane, fractionmass = 0.013 ) ;
// 95% Xe + 5% CH4, STP ; NIM A214 (1983) 261-268
density = 5.601*mg/cm3;
G4Material* Xe5CH4 = new G4Material(name="Xe5CH4" , density,
ncomponents=2);
Xe5CH4->AddMaterial( Xe, fractionmass = 0.994 );
Xe5CH4->AddMaterial( metane, fractionmass = 0.006 );
// 80% Xe + 20% CH4, STP ; NIM A253 (1987) 235-244
density = 4.83*mg/cm3;
G4Material* Xe20CH4 = new G4Material(name="Xe20CH4" , density,
ncomponents=2);
Xe20CH4->AddMaterial( Xe, fractionmass = 0.97 );
Xe20CH4->AddMaterial( metane, fractionmass = 0.03 );
// 93% Ar + 7% CH4, STP ; NIM 107 (1973) 413-422
density = 1.709*mg/cm3;
G4Material* Ar7CH4 = new G4Material(name="Ar7CH4" , density,
ncomponents=2);
Ar7CH4->AddMaterial( Argon, fractionmass = 0.971 );
Ar7CH4->AddMaterial( metane, fractionmass = 0.029 );
// 93% Kr + 7% CH4, STP ; NIM 107 (1973) 413-422
density = 3.491*mg/cm3;
G4Material* Kr7CH4 = new G4Material(name="Kr7CH4" , density,
ncomponents=2);
Kr7CH4->AddMaterial( Kr, fractionmass = 0.986 );
Kr7CH4->AddMaterial( metane, fractionmass = 0.014 );
// 0.5*(95% Xe + 5% CH4)+0.5*(93% Ar + 7% CH4), STP ; NIM A214 (1983) 261-268
density = 3.655*mg/cm3;
G4Material* XeArCH4 = new G4Material(name="XeArCH4" , density,
ncomponents=2);
XeArCH4->AddMaterial( Xe5CH4, fractionmass = 0.766 );
XeArCH4->AddMaterial( Ar7CH4, fractionmass = 0.234 );
// Silicon as detector material
density = 2.330*g/cm3;
a = 28.09*g/mole;
ma = new G4Material(name="Si", z=14., a, density);
/*
G4Material* ma;
ma = new G4Material("H", 1., 1.0*g/mole, 1.*g/cm3);
ma = new G4Material("D", 1., 2.0*g/mole, 1.*g/cm3);
ma = new G4Material("Li", 3., 6.941*g/mole, 1.*g/cm3);
ma = new G4Material("Be", 4., 9.01*g/mole, 1.848*g/cm3);
ma = new G4Material("C", 6., 12.00*g/mole, 2.0*g/cm3);
ma = new G4Material("Graphite",6., 12.00*g/mole, 2.265*g/cm3 );
ma->SetChemicalFormula("Graphite");
ma = new G4Material("Al", 13., 26.98*g/mole, 2.7 *g/cm3);
ma = new G4Material("Si", 14., 29.055*g/mole, 2.33*g/cm3);
ma = new G4Material("LAr", 18., 39.95*g/mole, 1.393*g/cm3);
ma = new G4Material("Zr", 40., 91.224*g/mole, 4.0*g/cm3);
ma = new G4Material("LXe", 54., 131.29*g/mole, 3.02*g/cm3);
ma = new G4Material("Fe", 26., 55.85*g/mole, 7.87*g/cm3);
ma = new G4Material("Ni", 29., 58.6934*g/mole, 8.00*g/cm3);
ma = new G4Material("Cu", 29., 63.55*g/mole, 8.96*g/cm3);
ma = new G4Material("Au", 79., 196.97*g/mole, 19.32*g/cm3);
ma = new G4Material("Ta", 73., 180.9479*g/mole, 16.67*g/cm3);
ma = new G4Material("W", 74., 183.85*g/mole, 19.30*g/cm3);
ma = new G4Material("Pb", 82., 207.19*g/mole, 11.35*g/cm3);
ma = new G4Material("Bi", 83., 208.98*g/mole, 12.*g/cm3);
ma = new G4Material("U", 92., 238.03*g/mole, 18.95*g/cm3);
G4Element* H = new G4Element ("Hydrogen", "H", 1. , 1.01*g/mole);
G4Element* N = new G4Element ("Nitrigen", "N", 7. , 14.00*g/mole);
G4Element* O = new G4Element ("Oxygen" , "O", 8. , 16.00*g/mole);
G4Element* C = new G4Element ("Carbon" , "C", 6. , 12.00*g/mole);
G4Element* Cs = new G4Element ("Cesium" , "Cs", 55. , 132.905*g/mole);
G4Element* I = new G4Element ("Iodide" , "I", 53. , 126.9044*g/mole);
ma = new G4Material("O2", 8., 16.00*g/mole, 1.1*g/cm3);
ma->SetChemicalFormula("O_2");
ma = new G4Material ("Water" , 1.*g/cm3, 2);
ma->AddElement(H,2);
ma->AddElement(O,1);
ma->SetChemicalFormula("H_2O");
ma = new G4Material ("Ethane" , 0.4241*g/cm3, 2);
ma->AddElement(H,6);
ma->AddElement(C,2);
ma->SetChemicalFormula("C_2H_6");
ma = new G4Material ("CsI" , 4.53*g/cm3, 2);
ma->AddElement(Cs,1);
ma->AddElement(I,1);
ma->SetChemicalFormula("CsI");
ma = new G4Material("Air" , 1.290*mg/cm3, 2);
// use fraction in mass
ma->AddElement(N, 0.7);
ma->AddElement(O, 0.3);
*/
}
G4Material* Em10Materials::GetMaterial(const G4String& name)
{
// const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
G4Material* ma = G4Material::GetMaterial(name);
G4cout << "Material is selected: " << ma->GetName() << G4endl;
return ma;
}
@@ -1,44 +1,43 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10PhysicsList.cc,v 1.14 2005/11/29 14:42:22 grichine Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10PhysicsList.cc,v 1.24 2006/06/29 16:38:49 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "G4Timer.hh"
#include "Em10PhysicsList.hh"
#include "Em10DetectorConstruction.hh"
// #include "ALICEDetectorConstruction.hh"
#include "Em10PhysicsListMessenger.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleTypes.hh"
#include "G4Material.hh"
#include "G4EnergyLossTables.hh"
#include "G4UnitsTable.hh"
#include "G4ios.hh"
#include <iomanip>
@@ -48,11 +47,8 @@
#include "G4Region.hh"
#include "G4RegionStore.hh"
#include "G4ProductionCuts.hh"
#include "G4EmProcessOptions.hh"
/////////////////////////////////////////////////////////////
//
@@ -61,22 +57,14 @@
Em10PhysicsList::Em10PhysicsList(Em10DetectorConstruction* p)
: G4VUserPhysicsList(),
MaxChargedStep(DBL_MAX),
thePhotoElectricEffect(0), theComptonScattering(0),
theGammaConversion(0),
theeminusMultipleScattering(0), theeminusIonisation(0),
theeminusBremsstrahlung(0),
theeplusMultipleScattering(0), theeplusIonisation(0),
theeplusBremsstrahlung(0),
theeplusAnnihilation(0),
theeminusStepCut(0), theeplusStepCut(0),
fMinElectronEnergy(1.0*keV),fMinGammaEnergy(1.0*keV),
fRadiatorCuts(0),fDetectorCuts(0)
fRadiatorCuts(0),fDetectorCuts(0),fXTRModel("transpM")
{
pDet = p;
// world cuts
defaultCutValue = 1.000*mm;
defaultCutValue = 1.*mm;
cutForGamma = defaultCutValue;
cutForElectron = defaultCutValue;
cutForPositron = defaultCutValue;
@@ -91,37 +79,6 @@ Em10PhysicsList::Em10PhysicsList(Em10DetectorConstruction* p)
physicsListMessenger = new Em10PhysicsListMessenger(this);
}
/////////////////////////////////////////////////////////////
//
//
/*
Em10PhysicsList::Em10PhysicsList(ALICEDetectorConstruction* p)
: G4VUserPhysicsList(),
MaxChargedStep(DBL_MAX),
thePhotoElectricEffect(0), theComptonScattering(0),
theGammaConversion(0),
theeminusMultipleScattering(0), theeminusIonisation(0),
theeminusBremsstrahlung(0),
theeplusMultipleScattering(0), theeplusIonisation(0),
theeplusBremsstrahlung(0),
theeplusAnnihilation(0),
theeminusStepCut(0), theeplusStepCut(0),
fMinElectronEnergy(1.0*keV),fMinGammaEnergy(1.0*keV)
{
apDet = p;
defaultCutValue = 1.000*mm ;
cutForGamma = defaultCutValue ;
cutForElectron = defaultCutValue ;
SetVerboseLevel(1);
physicsListMessenger = new Em10PhysicsListMessenger(this);
}
*/
/////////////////////////////////////////////////////////////////////////
//
//
Em10PhysicsList::~Em10PhysicsList()
{
delete physicsListMessenger;
@@ -209,10 +166,8 @@ void Em10PhysicsList::ConstructProcess()
//
#include "G4ComptonScattering.hh"
#include "XTRComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "XTRPhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
@@ -221,7 +176,8 @@ void Em10PhysicsList::ConstructProcess()
#include "G4eplusAnnihilation.hh"
#include "G4PAIModel.hh"
#include "G4PAIPhotonModel.hh"
// #include "G4PAIwithPhotons.hh"
#include "G4SynchrotronRadiation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
@@ -230,6 +186,7 @@ void Em10PhysicsList::ConstructProcess()
#include "G4hIonisation.hh"
// #include "G4ForwardXrayTR.hh"
#include "G4VXTRenergyLoss.hh"
#include "G4RegularXTRadiator.hh"
#include "G4TransparentRegXTRadiator.hh"
#include "G4GammaXTRadiator.hh"
@@ -238,25 +195,27 @@ void Em10PhysicsList::ConstructProcess()
#include "G4XTRGammaRadModel.hh"
#include "G4XTRRegularRadModel.hh"
#include "G4XTRTransparentRegRadModel.hh"
#include "Em10XTRTransparentRegRadModel.hh"
#include "Em10StepCut.hh"
void Em10PhysicsList::ConstructEM()
{
// G4cout<<"fMinElectronEnergy = "<<fMinElectronEnergy/keV<<" keV"<<G4endl;
// G4cout<<"fMinGammaEnergy = "<<fMinGammaEnergy/keV<<" keV"<<G4endl;
G4cout<<"XTR model = "<<fXTRModel<<G4endl;
const G4RegionStore* theRegionStore = G4RegionStore::GetInstance();
G4Region* gas = theRegionStore->GetRegion("XTRdEdxDetector");
/*
G4GammaXTRadiator* processXTR =
new G4GammaXTRadiator(pDet->GetLogicalRadiator(),
1000.,
G4VXTRenergyLoss* processXTR = 0;
if(fXTRModel == "gammaR" )
{
// G4GammaXTRadiator*
processXTR = new G4GammaXTRadiator(pDet->GetLogicalRadiator(),
100.,
100.,
pDet->GetFoilMaterial(),
pDet->GetGasMaterial(),
@@ -264,12 +223,12 @@ void Em10PhysicsList::ConstructEM()
pDet->GetGasThick(),
pDet->GetFoilNumber(),
"GammaXTRadiator");
G4XTRGammaRadModel* processXTR =
new G4XTRGammaRadModel(pDet->GetLogicalRadiator(),
1000.,
}
else if(fXTRModel == "gammaM" )
{
// G4XTRGammaRadModel*
processXTR = new G4XTRGammaRadModel(pDet->GetLogicalRadiator(),
100.,
100.,
pDet->GetFoilMaterial(),
pDet->GetGasMaterial(),
@@ -277,10 +236,12 @@ void Em10PhysicsList::ConstructEM()
pDet->GetGasThick(),
pDet->GetFoilNumber(),
"GammaXTRadiator");
}
else if(fXTRModel == "strawR" )
{
G4StrawTubeXTRadiator* processXTR =
new G4StrawTubeXTRadiator(pDet->GetLogicalRadiator(),
// G4StrawTubeXTRadiator*
processXTR = new G4StrawTubeXTRadiator(pDet->GetLogicalRadiator(),
pDet->GetFoilMaterial(),
pDet->GetGasMaterial(),
0.53, // pDet->GetFoilThick(),
@@ -288,32 +249,33 @@ void Em10PhysicsList::ConstructEM()
pDet->GetAbsorberMaterial(),
true,
"strawXTRadiator");
G4RegularXTRadiator* processXTR =
new G4RegularXTRadiator(pDet->GetLogicalRadiator(),
}
else if(fXTRModel == "regR" )
{
// G4RegularXTRadiator*
processXTR = new G4RegularXTRadiator(pDet->GetLogicalRadiator(),
pDet->GetFoilMaterial(),
pDet->GetGasMaterial(),
pDet->GetFoilThick(),
pDet->GetGasThick(),
pDet->GetFoilNumber(),
"RegularXTRadiator");
}
else if(fXTRModel == "transpR" )
{
// G4TransparentRegXTRadiator*
processXTR = new G4TransparentRegXTRadiator(pDet->GetLogicalRadiator(),
pDet->GetFoilMaterial(),
pDet->GetGasMaterial(),
pDet->GetFoilThick(),
pDet->GetGasThick(),
pDet->GetFoilNumber(),
"RegularXTRadiator");
G4TransparentRegXTRadiator* processXTR =
new G4TransparentRegXTRadiator(pDet->GetLogicalRadiator(),
pDet->GetFoilMaterial(),
pDet->GetGasMaterial(),
pDet->GetFoilThick(),
pDet->GetGasThick(),
pDet->GetFoilNumber(),
"RegularXTRadiator");
G4XTRRegularRadModel* processXTR =
new G4XTRRegularRadModel(pDet->GetLogicalRadiator(),
}
else if(fXTRModel == "regM" )
{
// G4XTRRegularRadModel*
processXTR = new G4XTRRegularRadModel(pDet->GetLogicalRadiator(),
pDet->GetFoilMaterial(),
pDet->GetGasMaterial(),
pDet->GetFoilThick(),
@@ -321,21 +283,27 @@ void Em10PhysicsList::ConstructEM()
pDet->GetFoilNumber(),
"RegularXTRadiator");
*/
G4XTRTransparentRegRadModel* processXTR =
new G4XTRTransparentRegRadModel(pDet->GetLogicalRadiator(),
}
else if(fXTRModel == "transpM" )
{
// G4XTRTransparentRegRadModel*
// processXTR = new G4XTRTransparentRegRadModel(pDet->GetLogicalRadiator(),
processXTR = new Em10XTRTransparentRegRadModel(pDet->GetLogicalRadiator(),
pDet->GetFoilMaterial(),
pDet->GetGasMaterial(),
pDet->GetFoilThick(),
pDet->GetGasThick(),
pDet->GetFoilNumber(),
"RegularXTRadiator");
}
else
{
G4Exception("Invalid XTR model name", "InvalidSetup",
FatalException, "XTR model name is out of the name list");
}
// processXTR->SetCompton(true);
processXTR->SetVerboseLevel(1);
theParticleIterator->reset();
while( (*theParticleIterator)() )
@@ -348,142 +316,65 @@ void Em10PhysicsList::ConstructEM()
{
// Construct processes for gamma
// thePhotoElectricEffect = new G4PhotoElectricEffect();
// theComptonScattering = new G4ComptonScattering();
// pmanager->AddDiscreteProcess(thePhotoElectricEffect);
// pmanager->AddDiscreteProcess(theComptonScattering);
XTRPhotoElectricEffect* xtrPhotoElectricEffect = new XTRPhotoElectricEffect();
// xtrPhotoElectricEffect->SetMinElectronEnergy(fMinElectronEnergy);
XTRComptonScattering* xtrComptonScattering = new XTRComptonScattering();
xtrComptonScattering->SetMinElectronEnergy(fMinElectronEnergy);
xtrComptonScattering->SetMinGammaEnergy(fMinGammaEnergy);
theGammaConversion = new G4GammaConversion();
pmanager->AddDiscreteProcess(xtrPhotoElectricEffect);
pmanager->AddDiscreteProcess(xtrComptonScattering);
pmanager->AddDiscreteProcess(theGammaConversion);
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
pmanager->AddDiscreteProcess(new G4ComptonScattering);
pmanager->AddDiscreteProcess(new G4GammaConversion);
}
else if (particleName == "e-")
{
// Construct processes for electron
theeminusMultipleScattering = new G4MultipleScattering();
theeminusBremsstrahlung = new G4eBremsstrahlung();
theeminusStepCut = new Em10StepCut();
theeminusIonisation = new G4eIonisation();
G4PAIModel* pai = new G4PAIModel(particle,"PAIModel");
theeminusIonisation->AddEmModel(0,pai,pai,gas);
pmanager->AddProcess(theeminusIonisation,-1,2,2);
pmanager->AddProcess(theeminusMultipleScattering,-1,1,1);
pmanager->AddProcess(theeminusBremsstrahlung,-1,-1,3);
/*
pmanager->AddContinuousProcess(
new G4RegularXTRadiator(pDet->GetLogicalRadiator(),
pDet->GetFoilMaterial(),
pDet->GetGasMaterial(),
pDet->GetFoilThick(),
pDet->GetGasThick(),
pDet->GetFoilNumber(),
"RegularXTRadiator"));
// ,-1,1,-1);
pmanager->AddContinuousProcess(
new G4GammaXTRadiator(pDet->GetLogicalRadiator(),
2.,
10.,
pDet->GetFoilMaterial(),
pDet->GetGasMaterial(),
pDet->GetFoilThick(),
pDet->GetGasThick(),
pDet->GetFoilNumber(),
"GammaXTRadiator"));
// ,-1,1,-1);
*/
// pmanager->AddContinuousProcess(processXTR);
// pmanager->AddContinuousProcess(strawXTRprocess);
// pmanager->AddProcess(new G4ForwardXrayTR("Air","Mylar","fXTR"),-1,-1,1);
pmanager->AddDiscreteProcess(processXTR);
pmanager->AddProcess(theeminusStepCut,-1,-1,4);
theeminusStepCut->SetMaxStep(MaxChargedStep) ;
G4eIonisation* eioni = new G4eIonisation();
G4PAIModel* pai = new G4PAIModel(particle,"PAIModel");
eioni->AddEmModel(0,pai,pai,gas);
pmanager->AddProcess(new G4MultipleScattering,-1,1,1);
pmanager->AddProcess(eioni,-1,2,2);
pmanager->AddProcess(new G4eBremsstrahlung,-1,3,3);
pmanager->AddDiscreteProcess(processXTR);
pmanager->AddDiscreteProcess(new G4SynchrotronRadiation);
pmanager->AddDiscreteProcess(theeminusStepCut);
}
else if (particleName == "e+")
{
// Construct processes for positron
theeplusMultipleScattering = new G4MultipleScattering();
theeplusIonisation = new G4eIonisation();
theeplusBremsstrahlung = new G4eBremsstrahlung();
theeplusAnnihilation = new G4eplusAnnihilation();
theeplusStepCut = new Em10StepCut();
G4PAIModel* pai = new G4PAIModel(particle,"PAIModel");
theeplusIonisation->AddEmModel(0,pai,pai,gas);
pmanager->AddProcess(theeplusMultipleScattering,-1,1,1);
pmanager->AddProcess(theeplusIonisation,-1,2,2);
pmanager->AddProcess(theeplusBremsstrahlung,-1,-1,3);
pmanager->AddProcess(theeplusAnnihilation,0,-1,4);
pmanager->AddProcess(theeplusStepCut,-1,-1,5);
theeplusStepCut->SetMaxStep(MaxChargedStep) ;
G4eIonisation* eioni = new G4eIonisation();
G4PAIModel* pai = new G4PAIModel(particle,"PAIModel");
eioni->AddEmModel(0,pai,pai,gas);
pmanager->AddProcess(new G4MultipleScattering,-1,1,1);
pmanager->AddProcess(eioni,-1,2,2);
pmanager->AddProcess(new G4eBremsstrahlung,-1,3,3);
pmanager->AddProcess(new G4eplusAnnihilation,0,-1,4);
pmanager->AddDiscreteProcess(processXTR);
pmanager->AddDiscreteProcess(new G4SynchrotronRadiation);
pmanager->AddDiscreteProcess(theeplusStepCut);
}
else if( particleName == "mu+" ||
particleName == "mu-" )
particleName == "mu-" )
{
// Construct processes for muon+
Em10StepCut* muonStepCut = new Em10StepCut();
muonStepCut->SetMaxStep(MaxChargedStep) ;
G4MuIonisation* themuIonisation = new G4MuIonisation() ;
G4MuIonisation* muioni = new G4MuIonisation() ;
G4PAIModel* pai = new G4PAIModel(particle,"PAIModel");
themuIonisation->AddEmModel(0,pai,pai,gas);
muioni->AddEmModel(0,pai,pai,gas);
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(themuIonisation,-1,2,2);
pmanager->AddProcess(new G4MuBremsstrahlung(),-1,-1,3);
pmanager->AddProcess(new G4MuPairProduction(),-1,-1,4);
/*
pmanager->AddContinuousProcess(
new G4RegularXTRadiator(pDet->GetLogicalRadiator(),
pDet->GetFoilMaterial(),
pDet->GetGasMaterial(),
pDet->GetFoilThick(),
pDet->GetGasThick(),
pDet->GetFoilNumber(),
"RegularXTRadiator"));
// ,-1,1,-1);
pmanager->AddContinuousProcess(
new G4GammaXTRadiator(pDet->GetLogicalRadiator(),
2.,
10.,
pDet->GetFoilMaterial(),
pDet->GetGasMaterial(),
pDet->GetFoilThick(),
pDet->GetGasThick(),
pDet->GetFoilNumber(),
"GammaXTRadiator"));
// ,-1,1,-1);
*/
pmanager->AddProcess(muioni,-1,2,2);
pmanager->AddProcess(new G4MuBremsstrahlung(),-1,3,3);
pmanager->AddProcess(new G4MuPairProduction(),-1,4,4);
pmanager->AddProcess( muonStepCut,-1,-1,5);
muonStepCut->SetMaxStep(MaxChargedStep) ;
}
else if (
@@ -496,40 +387,22 @@ void Em10PhysicsList::ConstructEM()
)
{
Em10StepCut* thehadronStepCut = new Em10StepCut();
thehadronStepCut->SetMaxStep(MaxChargedStep) ;
G4hIonisation* thehIonisation = new G4hIonisation();
G4MultipleScattering* thehMultipleScattering =
new G4MultipleScattering() ;
G4PAIModel* pai = new G4PAIModel(particle,"PAIModel");
thehIonisation->AddEmModel(0,pai,pai,gas);
pmanager->AddProcess(thehMultipleScattering,-1,1,1);
pmanager->AddProcess(new G4MultipleScattering,-1,1,1);
pmanager->AddProcess(thehIonisation,-1,2,2);
/*
pmanager->AddContinuousProcess(
new G4RegularXTRadiator(pDet->GetLogicalRadiator(),
pDet->GetFoilMaterial(),
pDet->GetGasMaterial(),
pDet->GetFoilThick(),
pDet->GetGasThick(),
pDet->GetFoilNumber(),
"RegularXTRadiator"));
// ,-1,1,-1);
*/
// pmanager->AddContinuousProcess(gammaXTRprocess);
// pmanager->AddContinuousProcess(regXTRprocess);
// ,-1,1,-1);
pmanager->AddProcess( thehadronStepCut,-1,-1,3);
thehadronStepCut->SetMaxStep(MaxChargedStep) ;
}
}
G4EmProcessOptions opt;
opt.SetApplyCuts(true);
}
#include "G4Decay.hh"
void Em10PhysicsList::ConstructGeneral()
@@ -556,28 +429,6 @@ void Em10PhysicsList::ConstructGeneral()
}
}
/////////////////////////////////////////////////////////////////////////////
/*
void Em10PhysicsList::AddParameterisation()
{
G4FastSimulationManagerProcess* theFastSimulationManagerProcess =
new G4FastSimulationManagerProcess() ;
theParticleIterator->reset();
while( (*theParticleIterator)() )
{
G4ParticleDefinition* particle = theParticleIterator->value() ;
G4ProcessManager* pmanager = particle->GetProcessManager() ;
// both postStep and alongStep action are required: because
// of the use of ghost volumes. If no ghost, the postStep is sufficient.
pmanager->AddProcess(theFastSimulationManagerProcess, -1, 1, 1);
}
}
*/
/////////////////////////////////////////////////////////////////////////////
void Em10PhysicsList::SetCuts()
@@ -602,7 +453,7 @@ void Em10PhysicsList::SetCuts()
region->SetProductionCuts(fRadiatorCuts);
G4cout << "Radiator cuts are set" << G4endl;
if( !fDetectorCuts ) SetDetectorCuts();
if( !fDetectorCuts ) SetDetectorCuts();
region = (G4RegionStore::GetInstance())->GetRegion("XTRdEdxDetector");
region->SetProductionCuts(fDetectorCuts);
G4cout << "Detector cuts are set" << G4endl;
@@ -1,33 +1,37 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10PhysicsListMessenger.cc,v 1.6 2005/11/29 14:42:22 grichine Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10PhysicsListMessenger.cc,v 1.9 2006/06/29 16:38:52 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
//
///////////////////////////////////////////////////////////////////////
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "Em10PhysicsListMessenger.hh"
@@ -35,8 +39,12 @@
#include "G4UIcmdWithoutParameter.hh"
#include "G4UIcmdWithADouble.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithAString.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//////////////////////////////////////////////////////////////////////////////
//
//
Em10PhysicsListMessenger::Em10PhysicsListMessenger(Em10PhysicsList* List)
:Em10List(List)
@@ -46,28 +54,14 @@ Em10PhysicsListMessenger::Em10PhysicsListMessenger(Em10PhysicsList* List)
cutGCmd->SetParameterName("range",true);
cutGCmd->SetDefaultValue(1.);
cutGCmd->SetDefaultUnit("mm");
cutGCmd->AvailableForStates(G4State_Idle);
cutGCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
cutECmd = new G4UIcmdWithADoubleAndUnit("/calor/cutE",this);
cutECmd->SetGuidance("Set cut values by RANGE for e- e+.");
cutECmd->SetParameterName("range",true);
cutECmd->SetDefaultValue(1.);
cutECmd->SetDefaultUnit("mm");
cutECmd->AvailableForStates(G4State_Idle);
eMinEnergyCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/eMinEnergy",this);
eMinEnergyCmd->SetGuidance("Set cut values by energy in Photo-Comp for e-");
eMinEnergyCmd->SetParameterName("range",true);
eMinEnergyCmd->SetDefaultValue(1.);
eMinEnergyCmd->SetDefaultUnit("keV");
eMinEnergyCmd->AvailableForStates(G4State_Idle);
gMinEnergyCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/gMinEnergy",this);
gMinEnergyCmd->SetGuidance("Set cut values by energy in Compton for gamma");
gMinEnergyCmd->SetParameterName("range",true);
gMinEnergyCmd->SetDefaultValue(1.);
gMinEnergyCmd->SetDefaultUnit("keV");
gMinEnergyCmd->AvailableForStates(G4State_Idle);
cutECmd->AvailableForStates(G4State_PreInit,G4State_Idle);
setMaxStepCmd = new G4UIcmdWithADoubleAndUnit("/step/setMaxStep",this);
setMaxStepCmd->SetGuidance("Set max. step length in the detector");
@@ -80,7 +74,7 @@ Em10PhysicsListMessenger::Em10PhysicsListMessenger(Em10PhysicsList* List)
ElectronCutCmd->SetParameterName("ElectronCut",false,false);
ElectronCutCmd->SetDefaultUnit("mm");
ElectronCutCmd->SetRange("ElectronCut>0.");
ElectronCutCmd->AvailableForStates(G4State_Idle);
ElectronCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
PositronCutCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/setPositronCut",this);
@@ -88,7 +82,7 @@ Em10PhysicsListMessenger::Em10PhysicsListMessenger(Em10PhysicsList* List)
PositronCutCmd->SetParameterName("PositronCut",false,false);
PositronCutCmd->SetDefaultUnit("mm");
PositronCutCmd->SetRange("PositronCut>0.");
PositronCutCmd->AvailableForStates(G4State_Idle);
PositronCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
GammaCutCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/setGammaCut",this);
@@ -96,42 +90,45 @@ Em10PhysicsListMessenger::Em10PhysicsListMessenger(Em10PhysicsList* List)
GammaCutCmd->SetParameterName("GammaCut",false,false);
GammaCutCmd->SetDefaultUnit("mm");
GammaCutCmd->SetRange("GammaCut>0.");
GammaCutCmd->AvailableForStates(G4State_Idle);
GammaCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
RadiatorCutCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/setRadiatorCuts",this);
RadiatorCutCmd->SetGuidance("Set radiator cut in mm for vertex region");
RadiatorCutCmd->SetParameterName("RadiatorCuts",false,false);
RadiatorCutCmd->SetDefaultUnit("mm");
RadiatorCutCmd->SetRange("RadiatorCuts > 0.");
RadiatorCutCmd->AvailableForStates(G4State_Idle);
RadiatorCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
DetectorCutCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/setDetectorCuts",this);
DetectorCutCmd->SetGuidance("Set radiator cut in mm for vertex region");
DetectorCutCmd->SetParameterName("DetectorCuts",false,false);
DetectorCutCmd->SetDefaultUnit("mm");
DetectorCutCmd->SetRange("DetectorCuts > 0.");
DetectorCutCmd->AvailableForStates(G4State_Idle);
DetectorCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
XTRModelCmd = new G4UIcmdWithAString("/emphyslist/setXTRModel",this);
XTRModelCmd->SetGuidance("Set XTR model");
XTRModelCmd->SetParameterName("XTRModel",false);
XTRModelCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
/////////////////////////////////////////////////////////////////////////////
Em10PhysicsListMessenger::~Em10PhysicsListMessenger()
{
delete cutGCmd;
delete cutECmd;
delete eMinEnergyCmd;
delete gMinEnergyCmd;
delete setMaxStepCmd;
delete ElectronCutCmd;
delete PositronCutCmd;
delete GammaCutCmd;
delete XTRModelCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
////////////////////////////////////////////////////////////////////////////////
void Em10PhysicsListMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
@@ -141,10 +138,6 @@ void Em10PhysicsListMessenger::SetNewValue(G4UIcommand* command,G4String newValu
{ Em10List->SetElectronCut(eCmd->GetNewDoubleValue(newValue));}
if(command == setMaxStepCmd)
{ Em10List->SetMaxStep(setMaxStepCmd->GetNewDoubleValue(newValue));}
if(command == eMinEnergyCmd)
{ Em10List->SetMinElectronEnergy(eMinEnergyCmd->GetNewDoubleValue(newValue));}
if(command == gMinEnergyCmd)
{ Em10List->SetMinGammaEnergy(gMinEnergyCmd->GetNewDoubleValue(newValue));}
if( command == ElectronCutCmd )
{
@@ -166,6 +159,10 @@ void Em10PhysicsListMessenger::SetNewValue(G4UIcommand* command,G4String newValu
{
Em10List->SetDetectorCuts();
}
if( command == XTRModelCmd )
{
Em10List->SetXTRModel(newValue);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10PrimaryGeneratorAction.cc,v 1.5 2004/12/03 09:12:42 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10PrimaryGeneratorAction.cc,v 1.6 2006/06/29 16:38:55 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10PrimaryGeneratorMessenger.cc,v 1.3 2002/12/05 00:24:24 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10PrimaryGeneratorMessenger.cc,v 1.4 2006/06/29 16:38:57 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10RunAction.cc,v 1.8 2005/12/06 11:27:37 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10RunAction.cc,v 1.9 2006/06/29 16:38:59 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10RunMessenger.cc,v 1.4 2005/12/06 11:31:44 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10RunMessenger.cc,v 1.5 2006/06/29 16:39:01 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10StepCut.cc,v 1.2 2001/07/11 09:57:26 gunter Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10StepCut.cc,v 1.3 2006/06/29 16:39:04 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "Em10StepCut.hh"
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10SteppingAction.cc,v 1.5 2004/12/03 09:12:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10SteppingAction.cc,v 1.6 2006/06/29 16:39:06 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10SteppingMessenger.cc,v 1.3 2004/12/03 09:33:46 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10SteppingMessenger.cc,v 1.4 2006/06/29 16:39:09 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: Em10SteppingVerbose.cc,v 1.5 2003/06/16 16:47:38 gunter Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: Em10SteppingVerbose.cc,v 1.6 2006/06/29 16:39:12 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
@@ -0,0 +1,216 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
#include <complex>
#include "Em10XTRTransparentRegRadModel.hh"
#include "Randomize.hh"
#include "G4Integrator.hh"
#include "G4Gamma.hh"
using namespace std;
////////////////////////////////////////////////////////////////////////////
//
// Constructor, destructor
Em10XTRTransparentRegRadModel::Em10XTRTransparentRegRadModel(G4LogicalVolume *anEnvelope,
G4Material* foilMat,G4Material* gasMat,
G4double a, G4double b, G4int n,
const G4String& processName) :
G4VXTRenergyLoss(anEnvelope,foilMat,gasMat,a,b,n,processName)
{
G4cout<<"Regular transparent X-ray TR radiator EM process is called"<<G4endl;
// Build energy and angular integral spectra of X-ray TR photons from
// a radiator
fExitFlux = true;
fAlphaPlate = 10000;
fAlphaGas = 1000;
// BuildTable();
}
///////////////////////////////////////////////////////////////////////////
Em10XTRTransparentRegRadModel::~Em10XTRTransparentRegRadModel()
{
;
}
///////////////////////////////////////////////////////////////////////////
//
//
G4double Em10XTRTransparentRegRadModel::SpectralXTRdEdx(G4double energy)
{
G4double result, sum = 0., tmp, cof1, cof2, cofMin, cofPHC,aMa, bMb, sigma;
G4int k, kMax, kMin;
aMa = GetPlateLinearPhotoAbs(energy);
bMb = GetGasLinearPhotoAbs(energy);
// if(fCompton)
{
aMa += GetPlateCompton(energy);
bMb += GetGasCompton(energy);
}
aMa *= fPlateThick;
bMb *= fGasThick;
sigma = aMa + bMb;
cofPHC = 4*pi*hbarc;
cofPHC *= 200./197.;
tmp = (fSigma1 - fSigma2)/cofPHC/energy;
cof1 = fPlateThick*tmp;
cof2 = fGasThick*tmp;
cofMin = energy*(fPlateThick + fGasThick)/fGamma/fGamma;
cofMin += (fPlateThick*fSigma1 + fGasThick*fSigma2)/energy;
cofMin /= cofPHC;
// if (fGamma < 1200) kMin = G4int(cofMin); // 1200 ?
// else kMin = 1;
kMin = G4int(cofMin);
if (cofMin > kMin) kMin++;
// tmp = (fPlateThick + fGasThick)*energy*fMaxThetaTR;
// tmp /= cofPHC;
// kMax = G4int(tmp);
// if(kMax < 0) kMax = 0;
// kMax += kMin;
kMax = kMin + 9; // 5; // 9; // kMin + G4int(tmp);
// tmp /= fGamma;
// if( G4int(tmp) < kMin ) kMin = G4int(tmp);
// G4cout<<"kMin = "<<kMin<<"; kMax = "<<kMax<<G4endl;
for( k = kMin; k <= kMax; k++ )
{
tmp = pi*fPlateThick*(k + cof2)/(fPlateThick + fGasThick);
result = (k - cof1)*(k - cof1)*(k + cof2)*(k + cof2);
if( k == kMin && kMin == G4int(cofMin) )
{
sum += 0.5*sin(tmp)*sin(tmp)*std::abs(k-cofMin)/result;
}
else
{
sum += sin(tmp)*sin(tmp)*std::abs(k-cofMin)/result;
}
// G4cout<<"k = "<<k<<"; sum = "<<sum<<G4endl;
}
result = 4.*( cof1 + cof2 )*( cof1 + cof2 )*sum/energy;
result *= ( 1. - exp(-fPlateNumber*sigma) )/( 1. - exp(-sigma) );
return result;
}
///////////////////////////////////////////////////////////////////////////
//
// Approximation for radiator interference factor for the case of
// fully Regular radiator. The plate and gas gap thicknesses are fixed .
// The mean values of the plate and gas gap thicknesses
// are supposed to be about XTR formation zones but much less than
// mean absorption length of XTR photons in coresponding material.
G4double
Em10XTRTransparentRegRadModel::GetStackFactor( G4double energy,
G4double gamma, G4double varAngle )
{
/*
G4double result, Za, Zb, Ma, Mb, sigma;
Za = GetPlateFormationZone(energy,gamma,varAngle);
Zb = GetGasFormationZone(energy,gamma,varAngle);
Ma = GetPlateLinearPhotoAbs(energy);
Mb = GetGasLinearPhotoAbs(energy);
sigma = Ma*fPlateThick + Mb*fGasThick;
G4complex Ca(1.0+0.5*fPlateThick*Ma/fAlphaPlate,fPlateThick/Za/fAlphaPlate);
G4complex Cb(1.0+0.5*fGasThick*Mb/fAlphaGas,fGasThick/Zb/fAlphaGas);
G4complex Ha = pow(Ca,-fAlphaPlate);
G4complex Hb = pow(Cb,-fAlphaGas);
G4complex H = Ha*Hb;
G4complex F1 = (1.0 - Ha)*(1.0 - Hb )/(1.0 - H)
* G4double(fPlateNumber) ;
G4complex F2 = (1.0-Ha)*(1.0-Ha)*Hb/(1.0-H)/(1.0-H)
* (1.0 - exp(-0.5*fPlateNumber*sigma)) ;
// *(1.0 - pow(H,fPlateNumber)) ;
G4complex R = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle);
// G4complex R = F2*OneInterfaceXTRdEdx(energy,gamma,varAngle);
result = 2.0*real(R);
return result;
*/
// numerically unstable result
G4double result, Qa, Qb, Q, aZa, bZb, aMa, bMb, D, sigma;
aZa = fPlateThick/GetPlateFormationZone(energy,gamma,varAngle);
bZb = fGasThick/GetGasFormationZone(energy,gamma,varAngle);
aMa = fPlateThick*GetPlateLinearPhotoAbs(energy);
bMb = fGasThick*GetGasLinearPhotoAbs(energy);
sigma = aMa*fPlateThick + bMb*fGasThick;
Qa = exp(-0.5*aMa);
Qb = exp(-0.5*bMb);
Q = Qa*Qb;
G4complex Ha( Qa*cos(aZa), -Qa*sin(aZa) );
G4complex Hb( Qb*cos(bZb), -Qb*sin(bZb) );
G4complex H = Ha*Hb;
G4complex Hs = conj(H);
D = 1.0 /( (1 - Q)*(1 - Q) +
4*Q*sin(0.5*(aZa + bZb))*sin(0.5*(aZa + bZb)) );
G4complex F1 = (1.0 - Ha)*(1.0 - Hb)*(1.0 - Hs)
* G4double(fPlateNumber)*D;
G4complex F2 = (1.0 - Ha)*(1.0 - Ha)*Hb*(1.0 - Hs)*(1.0 - Hs)
// * (1.0 - pow(H,fPlateNumber)) * D*D;
* (1.0 - exp(-0.5*fPlateNumber*sigma)) * D*D;
G4complex R = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle);
result = 2.0*real(R);
return result;
}
//
//
////////////////////////////////////////////////////////////////////////////
@@ -1,27 +1,30 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * 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. *
// * 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 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. *
// * 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: StepMax.cc,v 1.1 2005/04/19 15:01:39 grichine Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: StepMax.cc,v 1.2 2006/06/29 16:39:16 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
///////////////////////////////////////////////////////////////////////////
@@ -1,516 +0,0 @@
//
// ********************************************************************
// * 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: XTRComptonScattering.cc,v 1.1 2005/02/01 09:20:54 grichine Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
//------------ XTRComptonScattering physics process -----------------------------
// by Michel Maire, April 1996
//
// 28-05-96, DoIt() small change in ElecDirection, by M.Maire
// 10-06-96, simplification in ComputeMicroscopicCrossSection(), by M.Maire
// 21-06-96, SetCuts implementation, M.Maire
// 13-09-96, small changes in DoIt for better efficiency. Thanks to P.Urban
// 06-01-97, crossection table + meanfreepath table, M.Maire
// 05-03-97, new Physics scheme, M.Maire
// 28-03-97, protection in BuildPhysicsTable, M.Maire
// 07-04-98, remove 'tracking cut' of the scattered gamma, MMa
// 04-06-98, in DoIt, secondary production condition:
// range>std::min(threshold,safety)
// 13-08-98, new methods SetBining() PrintInfo()
// 15-12-98, cross section=0 below 10 keV
// 28-05-01, V.Ivanchenko minor changes to provide ANSI -wall compilation
// 13-07-01, DoIt: suppression of production cut for the electron (mma)
// 03-08-01, new methods Store/Retrieve PhysicsTable (mma)
// 06-08-01, BuildThePhysicsTable() called from constructor (mma)
// 17-09-01, migration of Materials to pure STL (mma)
// 20-09-01, DoIt: fMinimalEnergy = 1*eV (mma)
// 01-10-01, come back to BuildPhysicsTable(const G4ParticleDefinition&)
// 17-04-02, LowestEnergyLimit = 1*keV
// 26-05-04, cross section parametrization improved for low energy :
// Egamma <~ 15 keV (Laszlo)
// 08-11-04, Remove Store/Retrieve tables (V.Ivantchenko)
// 01-02-05, electron cuts in PostStepDoItfrom G4MaterialCutsCouple
// (V. Grichine)
// -----------------------------------------------------------------------------
#include "XTRComptonScattering.hh"
#include "G4UnitsTable.hh"
#include "G4PhysicsTableHelper.hh"
#include "G4ProductionCutsTable.hh"
#include "G4MaterialCutsCouple.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
XTRComptonScattering::XTRComptonScattering(const G4String& processName,
G4ProcessType type):G4VDiscreteProcess (processName, type),
theCrossSectionTable(NULL),
theMeanFreePathTable(NULL),
LowestEnergyLimit ( 1*keV),
HighestEnergyLimit(100*GeV),
NumbBinTable(80),
fMinElectronEnergy(1*eV),fMinGammaEnergy(1*eV)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// destructor
XTRComptonScattering::~XTRComptonScattering()
{
if (theCrossSectionTable) {
theCrossSectionTable->clearAndDestroy();
delete theCrossSectionTable;
}
if (theMeanFreePathTable) {
theMeanFreePathTable->clearAndDestroy();
delete theMeanFreePathTable;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool XTRComptonScattering::IsApplicable( const G4ParticleDefinition& particle)
{
return ( &particle == G4Gamma::Gamma() );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void XTRComptonScattering::SetPhysicsTableBining(
G4double lowE, G4double highE, G4int nBins)
{
LowestEnergyLimit = lowE; HighestEnergyLimit = highE; NumbBinTable = nBins;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void XTRComptonScattering::BuildPhysicsTable(const G4ParticleDefinition&)
// Build cross section and mean free path tables
{
G4double LowEdgeEnergy, Value;
G4PhysicsLogVector* ptrVector;
// Build cross section per atom tables for the Compton Scattering process
if (theCrossSectionTable) {
theCrossSectionTable->clearAndDestroy(); delete theCrossSectionTable;}
theCrossSectionTable = new G4PhysicsTable(G4Element::GetNumberOfElements());
const G4ElementTable* theElementTable = G4Element::GetElementTable();
G4double AtomicNumber;
size_t J;
for ( J=0 ; J < G4Element::GetNumberOfElements(); J++ )
{
//create physics vector then fill it ....
ptrVector = new G4PhysicsLogVector(LowestEnergyLimit,HighestEnergyLimit,
NumbBinTable );
AtomicNumber = (*theElementTable)[J]->GetZ();
for ( G4int i = 0 ; i < NumbBinTable ; i++ )
{
LowEdgeEnergy = ptrVector->GetLowEdgeEnergy(i);
Value = ComputeCrossSectionPerAtom(LowEdgeEnergy, AtomicNumber);
ptrVector->PutValue(i,Value);
}
theCrossSectionTable->insertAt( J , ptrVector ) ;
}
// Build mean free path table for the Compton Scattering process
if (theMeanFreePathTable) {
theMeanFreePathTable->clearAndDestroy(); delete theMeanFreePathTable;}
theMeanFreePathTable= new G4PhysicsTable(G4Material::GetNumberOfMaterials());
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
G4Material* material;
for ( J=0 ; J < G4Material::GetNumberOfMaterials(); J++ )
{
//create physics vector then fill it ....
ptrVector = new G4PhysicsLogVector(LowestEnergyLimit,HighestEnergyLimit,
NumbBinTable ) ;
material = (*theMaterialTable)[J];
for ( G4int i = 0 ; i < NumbBinTable ; i++ )
{
LowEdgeEnergy = ptrVector->GetLowEdgeEnergy( i ) ;
Value = ComputeMeanFreePath( LowEdgeEnergy, material);
ptrVector->PutValue( i , Value ) ;
}
theMeanFreePathTable->insertAt( J , ptrVector ) ;
}
PrintInfoDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double XTRComptonScattering::ComputeCrossSectionPerAtom
(G4double GammaEnergy, G4double Z)
// Calculates the cross section per atom in GEANT4 internal units.
// A parametrized formula from L. Urban is used to estimate
// the total cross section.
// It gives a good description of the data from 10 keV to 100/Z GeV.
// lower limit 1 keV now with a correction for low energy
{
G4double CrossSection = 0.0 ;
if ( Z < 1. ) return CrossSection;
if ( GammaEnergy < 1.*keV ) return CrossSection;
if ( GammaEnergy > (100.*GeV/Z) ) return CrossSection;
static const G4double a = 20.0 , b = 230.0 , c = 440.0;
static const G4double
d1= 2.7965e-1*barn, d2=-1.8300e-1*barn, d3= 6.7527 *barn, d4=-1.9798e+1*barn,
e1= 1.9756e-5*barn, e2=-1.0205e-2*barn, e3=-7.3913e-2*barn, e4= 2.7079e-2*barn,
f1=-3.9178e-7*barn, f2= 6.8241e-5*barn, f3= 6.0480e-5*barn, f4= 3.0274e-4*barn;
G4double p1Z = Z*(d1 + e1*Z + f1*Z*Z), p2Z = Z*(d2 + e2*Z + f2*Z*Z),
p3Z = Z*(d3 + e3*Z + f3*Z*Z), p4Z = Z*(d4 + e4*Z + f4*Z*Z);
G4double T0 = 15*keV; if (Z == 1.) T0 = 40*keV;
G4double X = max(GammaEnergy, T0) / electron_mass_c2;
CrossSection = p1Z*log(1.+2*X)/X
+ (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
// modification for low energy. (special case for Hydrogen)
if (GammaEnergy < T0) {
G4double dT0 = 1.*keV;
X = (T0+dT0) / electron_mass_c2 ;
G4double sigma = p1Z*log(1.+2*X)/X
+ (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
G4double c1 = -T0*(sigma-CrossSection)/(CrossSection*dT0);
G4double c2 = 0.150; if (Z > 1.) c2 = 0.375-0.0556*log(Z);
G4double y = log(GammaEnergy/T0);
CrossSection *= exp(-y*(c1+c2*y));
}
return CrossSection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double XTRComptonScattering::ComputeMeanFreePath(G4double GammaEnergy,
G4Material* aMaterial)
// returns the gamma mean free path in GEANT4 internal units
{
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume();
G4double SIGMA = 0.;
for ( size_t elm=0 ; elm < aMaterial->GetNumberOfElements() ; elm++ )
{
SIGMA += NbOfAtomsPerVolume[elm] *
ComputeCrossSectionPerAtom(GammaEnergy,
(*theElementVector)[elm]->GetZ());
}
return SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double XTRComptonScattering::GetCrossSectionPerAtom(
G4DynamicParticle* aDynamicGamma,
G4Element* anElement)
// gives the microscopic total cross section in GEANT4 internal units
{
G4double crossSection;
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
G4bool isOutRange ;
if (GammaEnergy < LowestEnergyLimit || GammaEnergy > HighestEnergyLimit)
crossSection = 0.;
else
crossSection = (*theCrossSectionTable)(anElement->GetIndex())->
GetValue(GammaEnergy, isOutRange);
return crossSection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double XTRComptonScattering::GetMeanFreePath(const G4Track& aTrack,
G4double,
G4ForceCondition*)
// returns the gamma mean free path in GEANT4 internal units
{
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
G4Material* aMaterial = aTrack.GetMaterial();
G4double MeanFreePath;
G4bool isOutRange;
if (GammaEnergy > HighestEnergyLimit || GammaEnergy < LowestEnergyLimit)
MeanFreePath = DBL_MAX;
else
MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
GetValue(GammaEnergy, isOutRange);
return MeanFreePath;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VParticleChange* XTRComptonScattering::PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep)
//
// The scattered gamma energy is sampled according to Klein - Nishina formula.
// The random number techniques of Butcher & Messel are used
// (Nuc Phys 20(1960),15).
// GEANT4 internal units
//
// Note : Effects due to binding of atomic electrons are negliged.
{
aParticleChange.Initialize(aTrack);
G4Material* aMaterial = aTrack.GetMaterial();
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
G4double GammaEnergy0 = aDynamicGamma->GetKineticEnergy();
G4double E0_m = GammaEnergy0 / electron_mass_c2 ;
G4ParticleMomentum GammaDirection0 = aDynamicGamma->GetMomentumDirection();
//
// sample the energy rate of the scattered gamma
//
G4double epsilon, epsilonsq, onecost, sint2, greject ;
G4double epsilon0 = 1./(1. + 2*E0_m) , epsilon0sq = epsilon0*epsilon0;
G4double alpha1 = - log(epsilon0) , alpha2 = 0.5*(1.- epsilon0sq);
do {
if ( alpha1/(alpha1+alpha2) > G4UniformRand() )
{ epsilon = exp(-alpha1*G4UniformRand()); // epsilon0**r
epsilonsq = epsilon*epsilon; }
else {
epsilonsq = epsilon0sq + (1.- epsilon0sq)*G4UniformRand();
epsilon = sqrt(epsilonsq);
};
onecost = (1.- epsilon)/(epsilon*E0_m);
sint2 = onecost*(2.-onecost);
greject = 1. - epsilon*sint2/(1.+ epsilonsq);
} while (greject < G4UniformRand());
//
// scattered gamma angles. ( Z - axis along the parent gamma)
//
G4double cosTeta = 1. - onecost , sinTeta = sqrt (sint2);
G4double Phi = twopi * G4UniformRand();
G4double dirx = sinTeta*cos(Phi), diry = sinTeta*sin(Phi), dirz = cosTeta;
//
// update G4VParticleChange for the scattered gamma
//
G4ThreeVector GammaDirection1 ( dirx,diry,dirz );
GammaDirection1.rotateUz(GammaDirection0);
aParticleChange.ProposeMomentumDirection( GammaDirection1 );
G4double GammaEnergy1 = epsilon*GammaEnergy0;
G4double localEnergyDeposit = 0.;
// Get electron/gamma cut in energy from track->materialcutscouple:
const G4MaterialCutsCouple* matCutsCouple = aTrack.GetMaterialCutsCouple();
const G4ProductionCutsTable* theCoupleTable=
G4ProductionCutsTable::GetProductionCutsTable();
size_t numOfCouples = theCoupleTable->GetTableSize(), jMatCC;
for (jMatCC = 0 ; jMatCC < numOfCouples ; jMatCC++ )
{
if( matCutsCouple == theCoupleTable->GetMaterialCutsCouple(jMatCC) ) break;
}
if( jMatCC == numOfCouples && jMatCC > 0 ) jMatCC--;
const vector<G4double>* deltaCutInKineticEnergy = theCoupleTable->
GetEnergyCutsVector(idxG4ElectronCut);
fMinElectronEnergy = (*deltaCutInKineticEnergy)[jMatCC];
// G4cout<<"XTRComptonScattering::PostStepDoIt::fMinElectronEnergy = "
// <<fMinElectronEnergy/keV<<" keV"<<" in "<<aMaterial->GetName()<<G4endl;
const vector<G4double>* deltaCutEnergyGamma = theCoupleTable->
GetEnergyCutsVector(idxG4GammaCut);
fMinGammaEnergy = (*deltaCutEnergyGamma)[jMatCC];
// G4cout<<"XTRComptonScattering::PostStepDoIt::fMinGammaEnergy = "
// <<fMinGammaEnergy/keV<<" keV"<<" in "<<aMaterial->GetName()<<G4endl;
if (GammaEnergy1 > fMinGammaEnergy)
{
aParticleChange.ProposeEnergy( GammaEnergy1 );
}
else
{
localEnergyDeposit += GammaEnergy1;
aParticleChange.ProposeEnergy(0.) ;
aParticleChange.ProposeTrackStatus(fStopAndKill);
}
//
// kinematic of the scattered electron
//
G4double ElecKineEnergy = GammaEnergy0 - GammaEnergy1;
if (ElecKineEnergy > fMinElectronEnergy)
{
G4double ElecMomentum = sqrt(ElecKineEnergy*
(ElecKineEnergy+2.*electron_mass_c2));
G4ThreeVector ElecDirection (
(GammaEnergy0*GammaDirection0 - GammaEnergy1*GammaDirection1)
*(1./ElecMomentum) );
// create G4DynamicParticle object for the electron.
G4DynamicParticle* aElectron= new G4DynamicParticle(
G4Electron::Electron(),ElecDirection,ElecKineEnergy);
aParticleChange.SetNumberOfSecondaries(1);
aParticleChange.AddSecondary( aElectron );
}
else
{
aParticleChange.SetNumberOfSecondaries(0);
localEnergyDeposit += ElecKineEnergy;
}
aParticleChange.ProposeLocalEnergyDeposit (localEnergyDeposit);
// Reset NbOfInteractionLengthLeft and return aParticleChange
return G4VDiscreteProcess::PostStepDoIt( aTrack, aStep);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool XTRComptonScattering::StorePhysicsTable(const G4ParticleDefinition* particle,
const G4String& directory,
G4bool ascii)
{
G4String filename;
// store cross section table
filename = GetPhysicsTableFileName(particle,directory,"CrossSection",ascii);
if ( !theCrossSectionTable->StorePhysicsTable(filename, ascii) ){
G4cout << " FAIL theCrossSectionTable->StorePhysicsTable in " << filename
<< G4endl;
return false;
}
// store mean free path table
filename = GetPhysicsTableFileName(particle,directory,"MeanFreePath",ascii);
if ( !theMeanFreePathTable->StorePhysicsTable(filename, ascii) ){
G4cout << " FAIL theMeanFreePathTable->StorePhysicsTable in " << filename
<< G4endl;
return false;
}
G4cout << GetProcessName() << " for " << particle->GetParticleName()
<< ": Success to store the PhysicsTables in "
<< directory << G4endl;
return true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/*
G4bool XTRComptonScattering::RetrievePhysicsTable(const G4ParticleDefinition* particle,
const G4String& directory,
G4bool ascii)
{
// delete theCrossSectionTable and theMeanFreePathTable
if (theCrossSectionTable != 0) {
theCrossSectionTable->clearAndDestroy();
delete theCrossSectionTable;
}
if (theMeanFreePathTable != 0) {
theMeanFreePathTable->clearAndDestroy();
delete theMeanFreePathTable;
}
G4String filename;
// retreive cross section table
filename = GetPhysicsTableFileName(particle,directory,"CrossSection",ascii);
theCrossSectionTable = new G4PhysicsTable(G4Element::GetNumberOfElements());
if ( !G4PhysicsTableHelper::RetrievePhysicsTable(filename, ascii) ){
G4cout << " FAIL theCrossSectionTable->RetrievePhysicsTable in " << filename
<< G4endl;
return false;
}
// retreive mean free path table
filename = GetPhysicsTableFileName(particle,directory,"MeanFreePath",ascii);
theMeanFreePathTable = new G4PhysicsTable(G4Material::GetNumberOfMaterials());
if ( !G4PhysicsTableHelper::RetrievePhysicsTable(filename, ascii) ){
G4cout << " FAIL theMeanFreePathTable->RetrievePhysicsTable in " << filename
<< G4endl;
return false;
}
G4cout << GetProcessName() << " for " << particle->GetParticleName()
<< ": Success to retrieve the PhysicsTables from "
<< directory << G4endl;
return true;
}
*/
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void XTRComptonScattering::PrintInfoDefinition()
{
G4String comments = "Total cross sections from a parametrisation. ";
comments += "Good description from 10 KeV to (100/Z) GeV. \n";
comments += " Scattered gamma energy according Klein-Nishina.";
G4cout << G4endl << GetProcessName() << ": " << comments
<< "\n PhysicsTables from "
<< G4BestUnit(LowestEnergyLimit,"Energy")
<< " to " << G4BestUnit(HighestEnergyLimit,"Energy")
<< " in " << NumbBinTable << " bins. \n";
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,307 +0,0 @@
//
// ********************************************************************
// * 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: XTRPhotoElectricEffect.cc,v 1.1 2005/02/01 09:20:54 grichine Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// 12-06-96, Added SelectRandomAtom() method, by M.Maire
// 21-06-96, SetCuts implementation, M.Maire
// 17-09-96, PartialSumSigma(i)
// split of ComputeBindingEnergy, M.Maire
// 08-01-97, crossection table + meanfreepath table, M.Maire
// 13-03-97, adapted for the new physics scheme, M.Maire
// 28-03-97, protection in BuildPhysicsTable, M.Maire
// 04-06-98, in DoIt, secondary production condition:
// range > std::min(threshold,safety)
// 13-08-98, new methods SetBining() PrintInfo()
// 17-11-98, use table of Atomic shells in PostStepDoIt
// 06-01-99, use Sandia crossSection below 50 keV, V.Grichine mma
// 20-05-99, protection against very low energy photons ,L.Urban
// 08-06-99, removed this above protection from the DoIt. mma
// 21-06-00, in DoIt, killing photon: aParticleChange.SetEnergyChange(0.); mma
// 22-06-00, in DoIt, absorbe very low energy photon (back to 20-05-99); mma
// 22-02-01, back to 08-06-99 after correc in SandiaTable (materials-V03-00-05)
// 28-05-01, V.Ivanchenko minor changes to provide ANSI -wall compilation
// 13-07-01, DoIt: suppression of production cut of the electron (mma)
// 06-08-01, new methods Store/Retrieve PhysicsTable (mma)
// 06-08-01, BuildThePhysicsTable() called from constructor (mma)
// 17-09-01, migration of Materials to pure STL (mma)
// 20-09-01, DoIt: fMinimalEnergy of generated electron = 1*eV (mma)
// 01-10-01, come back to BuildPhysicsTable(const G4ParticleDefinition&)
// 10-01-02, moved few function from icc to cc
// 17-04-02, Keep only Sandia crossSections. Remove BuildPhysicsTables.
// Simplify public interface (mma)
// 29-04-02, Generate theta angle of the photoelectron from Sauter-Gavrila
// distribution (mma)
// 15-01-03, photoelectron theta ditribution : return costeta=1 if gamma>5
// (helmut burkhardt)
// 01-02-05, electron cuts in PostStepDoItfrom G4MaterialCutsCouple
// (V. Grichine)
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "XTRPhotoElectricEffect.hh"
#include "G4UnitsTable.hh"
#include "G4ProductionCutsTable.hh"
#include "G4MaterialCutsCouple.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
XTRPhotoElectricEffect::XTRPhotoElectricEffect(const G4String& processName,
G4ProcessType type):G4VDiscreteProcess (processName, type),
fMinElectronEnergy(1*eV)
{ PrintInfoDefinition();}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// destructor
XTRPhotoElectricEffect::~XTRPhotoElectricEffect()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4bool XTRPhotoElectricEffect::IsApplicable(const G4ParticleDefinition&
particle)
{
return ( &particle == G4Gamma::Gamma() );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double XTRPhotoElectricEffect::ComputeCrossSectionPerAtom(G4double GammaEnergy,
G4double AtomicNumber)
// returns the photoElectric cross Section in GEANT4 internal units
{
G4double* SandiaCof
= G4SandiaTable::GetSandiaCofPerAtom((int)AtomicNumber,GammaEnergy);
G4double energy2 = GammaEnergy*GammaEnergy, energy3 = GammaEnergy*energy2,
energy4 = energy2*energy2;
return SandiaCof[0]/GammaEnergy + SandiaCof[1]/energy2 +
SandiaCof[2]/energy3 + SandiaCof[3]/energy4;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double XTRPhotoElectricEffect::ComputeMeanFreePath(G4double GammaEnergy,
G4Material* aMaterial)
// returns the gamma mean free path in GEANT4 internal units
{
G4double* SandiaCof = aMaterial->GetSandiaTable()
->GetSandiaCofForMaterial(GammaEnergy);
G4double energy2 = GammaEnergy*GammaEnergy, energy3 = GammaEnergy*energy2,
energy4 = energy2*energy2;
G4double SIGMA = SandiaCof[0]/GammaEnergy + SandiaCof[1]/energy2 +
SandiaCof[2]/energy3 + SandiaCof[3]/energy4;
return SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double XTRPhotoElectricEffect::GetMeanFreePath(const G4Track& aTrack,
G4double,
G4ForceCondition*)
// returns the gamma mean free path in GEANT4 internal units
{
G4double GammaEnergy = aTrack.GetDynamicParticle()->GetKineticEnergy();
G4double* SandiaCof = aTrack.GetMaterial()->GetSandiaTable()
->GetSandiaCofForMaterial(GammaEnergy);
G4double energy2 = GammaEnergy*GammaEnergy, energy3 = GammaEnergy*energy2,
energy4 = energy2*energy2;
G4double SIGMA = SandiaCof[0]/GammaEnergy + SandiaCof[1]/energy2 +
SandiaCof[2]/energy3 + SandiaCof[3]/energy4;
MeanFreePath = SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
return MeanFreePath;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VParticleChange* XTRPhotoElectricEffect::PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep)
//
// Generate an electron resulting of a photo electric effect.
// The incident photon disappear.
// GEANT4 internal units
//
{ aParticleChange.Initialize(aTrack);
G4Material* aMaterial = aTrack.GetMaterial();
const G4DynamicParticle* aDynamicPhoton = aTrack.GetDynamicParticle();
G4double PhotonEnergy = aDynamicPhoton->GetKineticEnergy();
G4ParticleMomentum PhotonDirection = aDynamicPhoton->GetMomentumDirection();
// select randomly one element constituing the material.
G4Element* anElement = SelectRandomAtom(aDynamicPhoton, aMaterial);
//
// Photo electron
//
G4int NbOfShells = anElement->GetNbOfAtomicShells();
G4int i=0;
while ((i<NbOfShells)&&(PhotonEnergy<anElement->GetAtomicShell(i))) i++;
if (i == NbOfShells) return G4VDiscreteProcess::PostStepDoIt(aTrack,aStep);
G4double ElecKineEnergy = PhotonEnergy - anElement->GetAtomicShell(i);
// Get electron cut in energy from track->materialcutscouple:
const G4MaterialCutsCouple* matCutsCouple = aTrack.GetMaterialCutsCouple();
const G4ProductionCutsTable* theCoupleTable=
G4ProductionCutsTable::GetProductionCutsTable();
size_t numOfCouples = theCoupleTable->GetTableSize(), jMatCC;
for (jMatCC = 0 ; jMatCC < numOfCouples ; jMatCC++ )
{
if( matCutsCouple == theCoupleTable->GetMaterialCutsCouple(jMatCC) ) break;
}
if( jMatCC == numOfCouples && jMatCC > 0 ) jMatCC--;
const vector<G4double>* deltaCutInKineticEnergy = theCoupleTable->
GetEnergyCutsVector(idxG4ElectronCut);
fMinElectronEnergy = (*deltaCutInKineticEnergy)[jMatCC];
// G4cout<<"XTRPhotoElectricEffect::PostStepDoIt::fMinElectronEnergy = "
// <<fMinElectronEnergy/keV<<" keV"<<" in "<<aMaterial->GetName()<<G4endl;
if (ElecKineEnergy > fMinElectronEnergy)
{
// direction of the photo electron
//
G4double cosTeta = ElecThetaDistribution(ElecKineEnergy);
G4double sinTeta = sqrt(1.-cosTeta*cosTeta);
G4double Phi = twopi * G4UniformRand();
G4double dirx = sinTeta*cos(Phi),diry = sinTeta*sin(Phi),dirz = cosTeta;
G4ThreeVector ElecDirection(dirx,diry,dirz);
ElecDirection.rotateUz(PhotonDirection);
//
G4DynamicParticle* aElectron = new G4DynamicParticle (
G4Electron::Electron(),ElecDirection, ElecKineEnergy);
aParticleChange.SetNumberOfSecondaries(1);
aParticleChange.AddSecondary(aElectron);
}
else
{
ElecKineEnergy = 0.;
aParticleChange.SetNumberOfSecondaries(0);
}
//
// Kill the incident photon
//
aParticleChange.ProposeLocalEnergyDeposit(PhotonEnergy-ElecKineEnergy);
aParticleChange.ProposeEnergy(0.);
aParticleChange.ProposeTrackStatus(fStopAndKill);
// Reset NbOfInteractionLengthLeft and return aParticleChange
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4Element* XTRPhotoElectricEffect::SelectRandomAtom(
const G4DynamicParticle* aDynamicPhoton,
G4Material* aMaterial)
{
// select randomly 1 element within the material
const G4int NumberOfElements = aMaterial->GetNumberOfElements();
const G4ElementVector* theElementVector = aMaterial->GetElementVector();
if (NumberOfElements == 1) return (*theElementVector)[0];
G4double GammaEnergy = aDynamicPhoton->GetKineticEnergy();
const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume();
G4double PartialSumSigma = 0. ;
G4double rval = G4UniformRand();
for ( G4int elm=0 ; elm < NumberOfElements ; elm++ )
{PartialSumSigma += NbOfAtomsPerVolume[elm] *
ComputeCrossSectionPerAtom(GammaEnergy,
(*theElementVector)[elm]->GetZ());
if (rval<=PartialSumSigma*MeanFreePath) return ((*theElementVector)[elm]);
}
return ((*theElementVector)[NumberOfElements-1]);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double XTRPhotoElectricEffect::ElecThetaDistribution(G4double kineEnergy)
{
// Compute Theta distribution of the emitted electron, with respect to the
// incident Gamma.
// The Sauter-Gavrila distribution for the K-shell is used.
//
G4double costeta = 1.;
G4double gamma = 1. + kineEnergy/electron_mass_c2;
if (gamma > 5.) return costeta;
G4double beta = sqrt(gamma*gamma-1.)/gamma;
G4double b = 0.5*gamma*(gamma-1.)*(gamma-2);
G4double rndm,term,greject,grejsup;
if (gamma < 2.) grejsup = gamma*gamma*(1.+b-beta*b);
else grejsup = gamma*gamma*(1.+b+beta*b);
do { rndm = 1.-2*G4UniformRand();
costeta = (rndm+beta)/(rndm*beta+1.);
term = 1.-beta*costeta;
greject = (1.-costeta*costeta)*(1.+b*term)/(term*term);
} while(greject < G4UniformRand()*grejsup);
return costeta;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void XTRPhotoElectricEffect::PrintInfoDefinition()
{
G4String comments = "Total cross sections from Sandia parametrisation. ";
G4cout << G4endl << GetProcessName() << ": " << comments << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......