Import Geant4 10.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 12:08:39 +02:00
parent 286caacf06
commit c9b32a6c0a
5770 changed files with 1050949 additions and 367105 deletions
+10 -1
View File
@@ -6,7 +6,11 @@
/*! \page Examples_exoticphysics Category "exoticphysics"
Examples in this directory demonstrate exotic physics applications.
Currently, two examples are provided:
Currently, four examples are provided:
\link Examplechanneling channeling \endlink
This example simulates channeling of 400 GeV/c protons in a bent crystal.
\link Examplemonopole monopole \endlink
@@ -17,5 +21,10 @@ monopole.
This example simulates phonons in sub-Kelvin temperature Germanium crystal.
\link Exampleucn ucn \endlink
This example simulates the passage of ultra-cold neutrons (UCN) in a
hollow pipe.
*/
@@ -2,5 +2,7 @@
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
add_subdirectory(channeling)
add_subdirectory(monopole)
add_subdirectory(phonon)
add_subdirectory(ucn)
+10
View File
@@ -13,8 +13,18 @@ track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
27 November 2014: I. Hrivnacova (exExoticphysics-V10-00-02)
- Minor fixes in top README, .README
8 June 2014: P. Gumplinger (exExoticphysics-V10-00-01)
- Added new example subdirectory ucn
6 June 2014: A. Dotti (exExoticphysics-V10-00-00)
- Added new example subdirectory channeling
17 November 2012: I. Hrivnacova (exExoticphysics-V09-05-02)
- Updated documentation:
- Removed obsolete instructions (how to compile & link)
+11 -1
View File
@@ -3,7 +3,12 @@
----------------------------------------------
Examples in this directory demonstrate exotic physics applications.
Currently, only two examples are provided:
Currently, four examples are provided:
channeling
----------
This example simulates channeling of 400 GeV/c protons in a bent crystal.
monopole
---------
@@ -16,3 +21,8 @@ phonon
This example simulates phonons in sub-Kelvin temperature Germanium crystal.
ucn
---
This example simulates the passage of ultra-cold neutrons (UCN) in a
hollow pipe.
@@ -0,0 +1,97 @@
//$Id: .README $
///\file "exoticphysics/channeling/.README"
///\brief Example channeling README page
/*! \page Examplechanneling Example channeling
\author Enrico Bagli - INFN and University Ferrara (Italy) \n
bagli@fe.infn.it
This example shows how channeling in bent crystal can be simulated
in Geant4
\section channeling_s1 INTRODUCTION
The example simulates the channeling of 400 GeV/c protons in bent
Si crystal. Channeling occurs when particles enter a crystal aligned
with atomic planes or axes. In bent crystals, the particles are
trapped between atomic planes and follow the crystal curvature
being deflected. If the particle direction is tangent to a bent
crystal plane is reflected to the opposite direction with respect
to channeling, i.e., it suffer volume reflection. The example
provides the physical model for planar channeling and volume
reflection in bent crystals.
\section channeling_s2 GEOMETRY
The geometry is a bent Si crystal with three Si detectors placed at
-1.0 m, -0.01 m and 1.0 m with respect to bent crystal position.
The Si detectors allows to measure incoming and outgoing angle
after the interaction with the Si bent crystal. The
geometry is all under vacuum.
\section channeling_s3 PRIMARY EVENT
The primary events are 400 GeV/c protons at -1.05 m from the
crystal with 13.36E-6 rad x 11.25E-6 rad divergence.
\section channeling_s4 PHYSICS
In the example the physics of channeling and volume reflection
has been added to the standard Geant4 physics. The description
of the used model can be found in the paper A model for the
interaction of high-energy particles in straight and bent
crystals implemented in Geant4 by E. Bagli et al., available
online at http://arxiv.org/abs/1403.5819
\section channeling_s5 EXECUTION & OUTPUT
The executable must be run from within the source directory of the example
to ensure that it can find the path for crystal data files.
Data files for Si crystal interplanar potential, nuclei and electron density
are stored in a named subdirectorydata
Upon execution, the macro
\verbatim
2009_PLB680_129.mac
\endverbatim
will automatically run the
example with 1000 protons.
Use
\verbatim
/xtal/setCurvRadius XXX 0. 0. m
\endverbatim
To change crystal bending to XXX meters
Use
\verbatim
/xtal/setSize 1.0 70. XXX mm
\endverbatim
To change crystal length to XXX millimeter
Use
\verbatim
/xtal/potfilename data/si110
\endverbatim
or
\verbatim
/xtal/potfilename data/si111
\endverbatim
To select the (110) or (111) Si crystal plane of channeling
GPS commands are used for the primary generator.
\subsection channeling_s5_sub1 ExExhCh.root
The output is the ExExhCh.root file with the TTree ExExChTree
has the leaves:
- angXin : incoming particle X angle at the crystal
- angYin : incoming particle Y angle at the crystal
- posXin : hitting X position of the particle at the crystal
- posYin : hitting Y position of the particle at the crystal
- angXout: outgoing particle X angle out of the the crystal
- angYout: outgoing particle Y angle out of the the crystal
*/
@@ -0,0 +1,81 @@
#----------------------------------------------------------------------------
# Setup the project
#
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(channeling)
#----------------------------------------------------------------------------
# Find Geant4 package, activating all available UI and Vis drivers by default
# You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
# to build a batch mode only executable
#
option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
if(WITH_GEANT4_UIVIS)
find_package(Geant4 REQUIRED ui_all vis_all)
else()
find_package(Geant4 REQUIRED)
endif()
#----------------------------------------------------------------------------
# Setup Geant4 include directories and compile definitions
# Setup include directory for this project
#
include(${Geant4_USE_FILE})
include_directories(${PROJECT_SOURCE_DIR}/include)
#----------------------------------------------------------------------------
# Locate sources and headers for this project
# NB: headers are included so they will show up in IDEs
#
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
#----------------------------------------------------------------------------
# Install data
#
file(GLOB _data RELATIVE ${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/data/*.txt)
foreach(_dat ${_data})
configure_file(
${PROJECT_SOURCE_DIR}/${_dat}
${PROJECT_BINARY_DIR}/${_dat}
COPYONLY
)
endforeach()
file(GLOB _data RELATIVE ${PROJECT_SOURCE_DIR}/mac ${PROJECT_SOURCE_DIR}/mac/*.mac)
foreach(_dat ${_data})
configure_file(
${PROJECT_SOURCE_DIR}/mac/${_dat}
${PROJECT_BINARY_DIR}/${_dat}
COPYONLY
)
endforeach()
file(GLOB _data RELATIVE ${PROJECT_SOURCE_DIR}/analysis ${PROJECT_SOURCE_DIR}/analysis/*.sh ${PROJECT_SOURCE_DIR}/analysis/*.C)
foreach(_dat ${_data})
configure_file(
${PROJECT_SOURCE_DIR}/analysis/${_dat}
${PROJECT_BINARY_DIR}/${_dat}
COPYONLY
)
endforeach()
#----------------------------------------------------------------------------
# Add the executable, and link it to the Geant4 libraries
#
add_executable(channeling channeling.cc ${sources} ${headers})
target_link_libraries(channeling ${Geant4_LIBRARIES})
#----------------------------------------------------------------------------
# For internal Geant4 use - but has no effect if you build this
# example standalone
#
add_custom_target(channeling_custom DEPENDS channeling)
#----------------------------------------------------------------------------
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
#
install(TARGETS channeling DESTINATION bin)
@@ -0,0 +1,9 @@
##### Perform simulation with default macro
GEANT4_ADD_TEST(example-ext-exoticphysics-channeling
COMMAND ${CMAKE_BINARY_DIR}/examples/extended/exoticphysics/channeling/channeling
${CMAKE_BINARY_DIR}/examples/extended/exoticphysics/channeling/2009_PLB680_129.mac
SOURCE_DIR ${CMAKE_SOURCE_DIR}/examples/extended/exoticphysics/channeling
BINARY_DIR ${CMAKE_BINARY_DIR}/examples/extended/exoticphysics/channeling
BUILD channeling PROJECT channeling
ENVIRONMENT ${GEANT4_TEST_ENVIRONMENT}
)
@@ -0,0 +1,72 @@
$Id: $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Exotic Examples History file
-----------------------------
This file should be used by the G4 example coordinator to briefly
summarize all major modifications introduced in the code and keep
track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
October 16, 2014 E. Bagli (channelingExample-V10-00-15)
- minor modification to condition for vr
- minor modification to computation of channeling outgoing angle
- changed nuclei density to electron and nuclei density for ss cross section computation
July 1, 2014 G.Folger (channelingExample-V10-00-14)
- revert change introduced with tag ...-12, CMakeLists.txt rev.82513
June 30, 2014 E. Bagli (channelingExample-V10-00-13)
- erf function modified to CLHEP::HepStat::erfQ
June 26, 2014 G.Folger (channelingExample-V10-00-12)
- Build example only if erf() is available on system.
erf function misses on Windows up to VC11 (studio 2012) included.
June 22, 2014 E. Bagli (channelingExample-V10-00-11)
- CLHEP/Random/Stat.h added to XCrystalPlanarMoliereTempPotential.cc
June 21, 2014 E. Bagli (channelingExample-V10-00-10)
- Changed erfc(x) to 1.-erf(x)
June 20, 2014 E. Bagli (channelingExample-V10-00-09)
- Modified channelling to channeling in CMakeLists.txt
June 10, 2014 E. Bagli (channelingExample-V10-00-08)
- Moved Channeling to channeling in CMakeLists.txt and CTestDefinitions.txt
June 4, 2014 A. Dotti (channelingExample-V10-00-07)
- New GPS MT ready migration
June 2, 2014 E. Bagli (channelingExample-v10-00-06)
- Modified M_PI to CLHEP::pi
May 30, 2014 E. Bagli (channelingExample-v10-00-05)
- Removed measurement of time elapsed into channeling.c
May 28, 2014 E. Bagli (channelingExample-v10-00-04)
- Corrected conversions between data types.
- Added root reference file (physical/ExExCh.root).
May 27, 2014 A. Dotti (channelingExample-V10-00-03)
- First version of CTest introduced, via extenral
file CTestDefinitions.txt
May 20, 2014 E. Bagli (channelingExample-V10-00-02)
- Removed src/G4Channeling*.
- Removed include/G4Channeling*.
- Removed analysis/merge.sh
- Wrote History and inserted reference to channeling model adopted
May 19, 2014 E. Bagli (channelingExample-V10-00-01)
- Class names modified.
May 9, 2014, E. Bagli (channelingExample-V10-00-00)
- First import.
@@ -0,0 +1,73 @@
=================================================================
Channeling effect in Geant4
=================================================================
Enrico Bagli - INFN and University Ferrara (Italy)
bagli@fe.infn.it
This example shows how channeling in bent crystal can be simulated
in Geant4
1.INTRODUCTION
The example simulates the channeling of 400 GeV/c protons in bent
Si crystal. Channeling occurs when particles enter a crystal aligned
with atomic planes or axes. In bent crystals, the particles are
trapped between atomic planes and follow the crystal curvature
being deflected. If the particle direction is tangent to a bent
crystal plane is reflected to the opposite direction with respect
to channeling, i.e., it suffer volume reflection. The example
provides the physical model for planar channeling and volume
reflection in bent crystals.
2.GEOMETRY
The geometry is a bent Si crystal with three Si detectors placed at
-1.0 m, -0.01 m and 1.0 m with respect to bent crystal position.
The Si detectors allows to measure incoming and outgoing angle
after the interaction with the Si bent crystal. The
geometry is all under vacuum.
3.PRIMARY EVENT
The primary events are 400 GeV/c protons at -1.05 m from the
crystal with 13.36E-6 rad x 11.25E-6 rad divergence.
4.PHYSICS
In the example the physics of channeling and volume reflection
has been added to the standard Geant4 physics. The description
of the used model can be found in the paper A model for the
interaction of high-energy particles in straight and bent
crystals implemented in Geant4 by E. Bagli et al., available
online at http://arxiv.org/abs/1403.5819
5.EXECUTION & OUTPUT
The executable must be run from within the source directory of the example
to ensure that it can find the path for crystal data files.
Data files for Si crystal interplanar potential, nuclei and electron density
are stored in a named subdirectorydata
Upon execution, the 2009_PLB680_129.mac macro will automatically run the
example with 1000 protons.
Use
/xtal/setCurvRadius XXX 0. 0. m
To change crystal bending to XXX meters
Use
/xtal/setSize 1.0 70. XXX mm
To change crystal length to XXX millimeter
Use
/xtal/potfilename data/si110
or
/xtal/potfilename data/si111
To select the (110) or (111) Si crystal plane of channeling
GPS commands are used for the primary generator.
The output is the ExExhCh.root file with the TTree ExExChTree
has the leaves:
- angXin : incoming particle X angle at the crystal
- angYin : incoming particle Y angle at the crystal
- posXin : hitting X position of the particle at the crystal
- posYin : hitting Y position of the particle at the crystal
- angXout: outgoing particle X angle out of the the crystal
- angYout: outgoing particle Y angle out of the the crystal
@@ -0,0 +1,86 @@
// Function for the computation of the channeling efficiency
Double_t ComputeEfficiency(TH1D *h1,Double_t *fPar){
Double_t vXMin = fPar[1] - 3. * fPar[2];
Double_t vXMax = fPar[1] + 3. * fPar[2];
Int_t vBinMin = h1->FindBin(vXMin);
Int_t vBinMed = h1->FindBin(fPar[1]);
Int_t vBinMax = h1->FindBin(vXMax);
Double_t vEfficiency = h1->Integral(vBinMin+1,vBinMax-1);
vEfficiency += h1->GetBinContent(vBinMin)*(h1->GetBinLowEdge(vBinMin+1)-vXMin)/h1->GetBinWidth(vBinMin);
vEfficiency += h1->GetBinContent(vBinMax)*(-h1->GetBinLowEdge(vBinMax)+vXMax)/h1->GetBinWidth(vBinMax);
vEfficiency /= h1->Integral(0,-1);
vEfficiency *= 100.;
return vEfficiency;
}
// Function for the computation of channeling efficiency at various incoming angle
Int_t AnalyseChannelingEfficiency(TTree *fTree = G4CH,Float_t fChannelingMinimum = 35., Float_t fChannelingMaximum = 70.){
//**//Channeling Gaussian Fit Function
TF1 *vChanneling = new TF1("vChanneling","gaus",fChannelingMinimum,fChannelingMaximum);
vChanneling->SetParNames("Const","Mean","Sigma");
vChanneling->SetLineColor(4);
vChanneling->SetLineStyle(2);
TH2D *hChannelingPlot = new TH2D("hChannelingPlot","Deflection Angle vs. Incoming Angle;Horizontal Incoming Angle [#murad];Horizontal Deflection Angle [#murad]",21,-10.5,10.5,256,-127.5,128.5);
TH1F *hChannelingEfficiency = new TH1F("hChannelingEfficiency","G4Channeling;Horizontal Incoming Angle [#murad];Efficiency [%]",21,-10.5,10.5);
fTree->Draw("-(angXout-angXin):-angXin>>hChannelingPlot");
Double_t vNormalizationToAmorphous = 0.965; // Normalization for channeling efficiency, see PRSTAB 11, 063501 (2008)
for(int i=2;i<=21;i++){
TH1D* h1 = hChannelingPlot->ProjectionY("h1",i,i);
h1->Fit(vChanneling,"QR");
Double_t *vChannelingParameters;
vChannelingParameters = vChanneling->GetParameters();
hChannelingEfficiency->SetBinContent(i,ComputeEfficiency(h1,vChannelingParameters)/vNormalizationToAmorphous);
h1->Delete();
}
hChannelingEfficiency->SetLineColor(3);
hChannelingEfficiency->SetLineStyle(4);
hChannelingEfficiency->SetMarkerColor(3);
hChannelingEfficiency->SetFillStyle(0);
hChannelingEfficiency->SetMarkerStyle(20);
hChannelingEfficiency->Draw("PL");
c1->Update();
TGraph* gRoughExperimentalData = new TGraph(11);
gRoughExperimentalData->SetPoint( 0 , -10 , 20 );
gRoughExperimentalData->SetPoint( 1 , -8 , 38 );
gRoughExperimentalData->SetPoint( 2 , -6 , 56 );
gRoughExperimentalData->SetPoint( 3 , -4 , 72 );
gRoughExperimentalData->SetPoint( 4 , -2 , 80 );
gRoughExperimentalData->SetPoint( 5 , 0 , 84 );
gRoughExperimentalData->SetPoint( 6 , 2 , 82 );
gRoughExperimentalData->SetPoint( 7 , 4 , 78 );
gRoughExperimentalData->SetPoint( 8 , 6 , 66 );
gRoughExperimentalData->SetPoint( 9 , 8 , 52 );
gRoughExperimentalData->SetPoint( 10 , 10 , 37 );
gRoughExperimentalData->SetLineColor(4);
gRoughExperimentalData->SetLineStyle(3);
gRoughExperimentalData->SetFillStyle(0);
gRoughExperimentalData->SetFillColor(0);
gRoughExperimentalData->SetMarkerColor(4);
gRoughExperimentalData->SetMarkerStyle(21);
gRoughExperimentalData->SetTitle("Phys. Lett. B 680, 129");
gRoughExperimentalData->Draw("sameCP");
c1->Update();
TLegend *aLegend = new TLegend(0.30,0.15,0.55,0.3);
aLegend->AddEntry(hChannelingEfficiency);
aLegend->AddEntry(gRoughExperimentalData);
aLegend->SetFillStyle(0);
aLegend->SetLineColor(0);
aLegend->Draw();
c1->Update();
return 0;
}
@@ -0,0 +1,141 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
#else
#include "G4RunManager.hh"
#endif
#include "G4ScoringManager.hh"
#include "G4UImanager.hh"
#include "Randomize.hh"
#include "ExExChDetectorConstruction.hh"
#ifdef G4MULTITHREADED
#include "ExExChUserActionInitialization.hh"
#else
#include "ExExChPrimaryGeneratorAction.hh"
#include "ExExChTrackingAction.hh"
#include "ExExChStackingAction.hh"
#include "ExExChEventAction.hh"
#include "ExExChRunAction.hh"
#endif
#include "ExExChPhysicsList.hh"
#include "QGSP_BERT.hh"
#ifdef G4VIS_USE
#include "G4VisExecutive.hh"
#endif
#ifdef G4UI_USE
#include "G4UIExecutive.hh"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
int main(int argc,char** argv)
{
// Construct the default run manager
#ifdef G4MULTITHREADED
G4MTRunManager* runManager = new G4MTRunManager;
if(argv[2]){
if(atoi(argv[2])>0){
runManager->SetNumberOfThreads(atoi(argv[2]));
}
}
G4cout << "MT MODE ON " << runManager->GetNumberOfThreads() << G4endl;
#else
G4RunManager* runManager = new G4RunManager;
G4cout << "MT MODE OFF" << G4endl;
#endif
// Activate UI-command base scorer
G4ScoringManager * scManager = G4ScoringManager::GetScoringManager();
scManager->SetVerboseLevel(0);
// Choose the Random engine
#ifndef G4MULTITHREADED
CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine);
#endif
// Set mandatory initialization classes
G4VUserDetectorConstruction* detector =
new ExExChDetectorConstruction;
runManager->SetUserInitialization(detector);
runManager->SetUserInitialization(new ExExChPhysicsList());
#ifndef G4MULTITHREADED
// Set user action classes
runManager->SetUserAction(new ExExChPrimaryGeneratorAction());
runManager->SetUserAction(new ExExChEventAction());
runManager->SetUserAction(new ExExChStackingAction());
runManager->SetUserAction(new ExExChTrackingAction());
runManager->SetUserAction(new ExExChRunAction());
#else
runManager->SetUserInitialization(
new ExExChUserActionInitialization());
#endif
// Get the pointer to the User Interface manager
G4UImanager* UI = G4UImanager::GetUIpointer();
if(argc!=1) {
// Batch mode
G4String command = "/control/execute ";
G4String fileName = argv[1];
UI->ApplyCommand(command+fileName);
}
else {
// Define visualization and UI terminal for interactive mode
#ifdef G4VIS_USE
G4VisManager* visManager = new G4VisExecutive;
visManager->Initialize();
#endif
#ifdef G4UI_USE
G4UIExecutive * ui = new G4UIExecutive(argc,argv);
ui->SessionStart();
delete ui;
#endif
#ifdef G4VIS_USE
delete visManager;
#endif
}
// Job termination
delete runManager;
return 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
@@ -0,0 +1,513 @@
-14.6054 6.63854
3.91641
3.9094
3.90262
3.89584
3.88933
3.88258
3.87592
3.869
3.86233
3.85526
3.84888
3.84242
3.83548
3.8286
3.82221
3.81551
3.80888
3.80192
3.79513
3.78856
3.7812
3.77522
3.76832
3.76163
3.75476
3.74819
3.74142
3.7346
3.72804
3.72124
3.71432
3.70769
3.70079
3.69421
3.68747
3.68054
3.67385
3.66703
3.66034
3.65329
3.64657
3.63997
3.63307
3.6261
3.61973
3.6126
3.60575
3.59919
3.59215
3.58557
3.5788
3.572
3.56484
3.55807
3.55152
3.54471
3.53779
3.531
3.52411
3.5173
3.51031
3.50356
3.4963
3.4893
3.48311
3.47607
3.46936
3.46189
3.45562
3.44886
3.4418
3.43519
3.42825
3.4212
3.41441
3.40759
3.4007
3.39376
3.38707
3.38014
3.37265
3.36624
3.35938
3.35246
3.34568
3.33878
3.33191
3.32474
3.31755
3.31041
3.30417
3.2971
3.29039
3.28346
3.27634
3.26943
3.26198
3.25558
3.2488
3.24178
3.235
3.22814
3.22094
3.21406
3.20697
3.20002
3.19316
3.18603
3.1796
3.17205
3.16516
3.15825
3.15124
3.1443
3.13733
3.13009
3.12284
3.11658
3.10906
3.1025
3.09541
3.08821
3.08135
3.07425
3.06701
3.06032
3.05326
3.04739
3.03906
3.0321
3.02508
3.01801
3.01093
3.00404
2.9967
2.99056
2.98261
2.97578
2.9687
2.96161
2.95435
2.94759
2.94057
2.93442
2.92613
2.91918
2.91221
2.90501
2.89778
2.89076
2.88347
2.87834
2.86962
2.86262
2.8553
2.84815
2.8415
2.83386
2.82689
2.81968
2.81261
2.80578
2.79856
2.79112
2.78418
2.77695
2.76957
2.76264
2.75522
2.74846
2.74121
2.73378
2.72694
2.7196
2.71261
2.70537
2.69791
2.69094
2.68382
2.67668
2.66944
2.66206
2.65523
2.64754
2.64052
2.63336
2.62608
2.61872
2.61159
2.60441
2.59712
2.59134
2.58294
2.57534
2.56861
2.56085
2.55371
2.5465
2.53963
2.53229
2.52463
2.51769
2.51009
2.50315
2.49569
2.48854
2.48115
2.47401
2.46648
2.45921
2.4519
2.44468
2.43713
2.43015
2.42301
2.41549
2.40819
2.40085
2.39353
2.38643
2.37903
2.37149
2.36429
2.35716
2.34943
2.34248
2.33528
2.32778
2.3204
2.31284
2.30554
2.29839
2.29121
2.28392
2.2761
2.26873
2.26138
2.2541
2.24679
2.23946
2.23211
2.22477
2.21739
2.21003
2.20263
2.19524
2.1878
2.18042
2.17292
2.1655
2.15816
2.15126
2.14367
2.13632
2.12832
2.12139
2.11485
2.10669
2.09927
2.09162
2.08409
2.07696
2.06937
2.0623
2.05461
2.04724
2.04033
2.03243
2.0252
2.01798
2.01017
2.00301
1.9958
1.98799
1.98067
1.9736
1.96684
1.9585
1.95128
1.94399
1.93642
1.92908
1.92175
1.91439
1.90679
1.89951
1.89243
1.88467
1.87754
1.86991
1.86277
1.85537
1.848
1.8407
1.83324
1.82628
1.81865
1.81128
1.80384
1.79667
1.78947
1.78183
1.77451
1.76726
1.75983
1.75265
1.74541
1.738
1.73093
1.72365
1.71622
1.70915
1.7018
1.69434
1.68748
1.68039
1.6729
1.66625
1.65885
1.65145
1.64425
1.63714
1.63023
1.62327
1.61549
1.60925
1.60158
1.59437
1.58711
1.58014
1.57311
1.56642
1.55925
1.55218
1.5451
1.53837
1.53118
1.52408
1.517
1.51027
1.50294
1.49535
1.48934
1.48238
1.47549
1.46903
1.46189
1.45479
1.44816
1.44137
1.43489
1.42777
1.42112
1.41482
1.4078
1.40108
1.39438
1.38774
1.38104
1.37471
1.36766
1.36119
1.35457
1.3483
1.34174
1.33496
1.32859
1.32236
1.31559
1.30975
1.30302
1.29661
1.29031
1.28379
1.2779
1.27107
1.26518
1.25875
1.25291
1.24634
1.23987
1.23387
1.22794
1.22202
1.21611
1.20942
1.20346
1.19749
1.19153
1.18557
1.17962
1.17367
1.16772
1.16178
1.15599
1.15008
1.14464
1.13867
1.13271
1.12709
1.12172
1.11572
1.10977
1.10422
1.09891
1.09296
1.08765
1.08194
1.07638
1.07116
1.06543
1.05999
1.05443
1.04906
1.04372
1.03841
1.0331
1.02794
1.02232
1.01694
1.01181
1.00684
1.00167
0.995989
0.990929
0.985762
0.980698
0.975493
0.970568
0.965339
0.960588
0.955489
0.950116
0.945178
0.94021
0.935295
0.930277
0.925304
0.920306
0.915615
0.91061
0.906129
0.900992
0.896077
0.891507
0.886653
0.881699
0.876855
0.872168
0.867384
0.862678
0.857829
0.853135
0.848465
0.843973
0.839015
0.834384
0.829891
0.825054
0.820406
0.816113
0.810822
0.806296
0.801806
0.79713
0.792562
0.787727
0.782986
0.778957
0.773862
0.768843
0.764527
0.760117
0.7549
0.750081
0.745346
0.740505
0.736463
0.731346
0.726086
0.721433
0.716807
0.711785
0.70685
0.701569
0.696672
0.691408
0.686338
0.681076
0.675956
0.670434
0.665172
0.659492
0.654176
0.648235
0.642546
0.636941
0.630246
0.62399
0.617314
0.610522
0.603624
0.59545
0.588354
0.580301
0.571112
0.561115
0.550548
0.537534
0.522122
0.501348
0.459147
@@ -0,0 +1,513 @@
-14.6054 6.63854
10.2135
10.1639
10.1161
10.0683
10.0227
9.97541
9.92892
9.8807
9.83433
9.78536
9.74125
9.69669
9.64896
9.60179
9.55806
9.51235
9.46722
9.41994
9.37396
9.32965
9.28009
9.23994
9.19373
9.14907
9.10331
9.05969
9.01482
8.9698
8.92658
8.88189
8.83658
8.79332
8.74837
8.70564
8.66202
8.6173
8.57425
8.53044
8.48771
8.44269
8.39997
8.35815
8.31449
8.27057
8.2306
8.18591
8.14314
8.10229
8.05863
8.018
7.97622
7.93441
7.89053
7.84916
7.80942
7.76812
7.7262
7.68524
7.64386
7.60312
7.56147
7.52134
7.47827
7.43699
7.40053
7.35928
7.32014
7.27654
7.2401
7.20105
7.16037
7.12249
7.08272
7.04254
7.004
6.96548
6.92667
6.88748
6.85026
6.81163
6.76985
6.73442
6.69658
6.65875
6.62171
6.58411
6.54679
6.50792
6.46914
6.43095
6.39765
6.36006
6.3246
6.28803
6.25036
6.21433
6.17535
6.14218
6.10721
6.07107
6.03669
6.00166
5.9648
5.93016
5.89408
5.85931
5.82524
5.78962
5.75775
5.72054
5.68685
5.65321
5.61902
5.58547
5.55204
5.51708
5.48241
5.4531
5.4172
5.38675
5.3534
5.31952
5.28798
5.25486
5.22162
5.19128
5.15917
5.13253
5.09494
5.06384
5.03265
5.00105
4.96979
4.93982
4.90741
4.88075
4.8464
4.81731
4.78708
4.75666
4.72592
4.69776
4.66843
4.6425
4.60807
4.5796
4.55137
4.52155
4.49229
4.46399
4.43485
4.41434
4.38023
4.35275
4.32396
4.29607
4.27003
4.24078
4.2143
4.18683
4.1599
4.13497
4.10782
4.07996
4.0545
4.02771
4.00068
3.97573
3.94891
3.92502
3.8992
3.87267
3.84903
3.82328
3.79918
3.77421
3.74831
3.72481
3.70125
3.67714
3.65272
3.62801
3.60627
3.58043
3.55793
3.53503
3.51133
3.48781
3.46513
3.44301
3.42019
3.40221
3.37669
3.35284
3.3334
3.30914
3.2881
3.26662
3.24565
3.22533
3.20233
3.18262
3.16045
3.14156
3.1201
3.1
3.07905
3.0598
3.03866
3.01867
2.9988
2.97986
2.95918
2.94148
2.92276
2.9028
2.88374
2.8647
2.8462
2.82857
2.80981
2.79045
2.7731
2.75613
2.73627
2.72016
2.70325
2.68489
2.66736
2.64881
2.63188
2.61593
2.59973
2.5834
2.56451
2.54793
2.53167
2.51578
2.49956
2.48369
2.46783
2.45217
2.4364
2.42088
2.40525
2.38985
2.37428
2.35909
2.34377
2.32865
2.31393
2.30145
2.28582
2.27154
2.25483
2.24208
2.22958
2.21454
2.20024
2.1855
2.17103
2.15851
2.14392
2.13181
2.11712
2.1041
2.09292
2.07749
2.06513
2.05323
2.0388
2.02706
2.015
2.00063
1.98848
1.97743
1.96558
1.95196
1.94048
1.92863
1.91585
1.90419
1.89256
1.88111
1.86865
1.85734
1.84713
1.83398
1.8239
1.81165
1.80125
1.78995
1.77918
1.76856
1.75692
1.74768
1.73599
1.72537
1.71403
1.70414
1.69439
1.68276
1.67242
1.66248
1.65192
1.64191
1.632
1.62196
1.61256
1.60262
1.59257
1.58325
1.57313
1.56306
1.55468
1.54489
1.53553
1.52816
1.51817
1.50802
1.49875
1.49005
1.48181
1.47372
1.46212
1.45477
1.44575
1.43651
1.42736
1.41893
1.41068
1.40336
1.39455
1.3858
1.37735
1.36987
1.361
1.35213
1.34367
1.33618
1.3268
1.31718
1.31148
1.30344
1.29526
1.28911
1.28006
1.27143
1.26448
1.2566
1.25026
1.24122
1.23405
1.2283
1.21954
1.21209
1.20472
1.19733
1.18985
1.18385
1.17478
1.16804
1.16094
1.15484
1.14755
1.13956
1.13318
1.12707
1.11892
1.11416
1.10623
1.09949
1.09297
1.08549
1.08038
1.07187
1.06672
1.05965
1.0545
1.04679
1.03937
1.03338
1.02775
1.02212
1.01646
1.00802
1.00211
0.996146
0.990147
0.984106
0.978019
0.971889
0.965722
0.959511
0.953815
0.947561
0.943006
0.936508
0.930017
0.924822
0.920174
0.913373
0.906659
0.901196
0.896629
0.889727
0.885171
0.8791
0.873318
0.868744
0.862584
0.857117
0.851114
0.845848
0.840696
0.835467
0.830213
0.825519
0.819025
0.813394
0.808689
0.804201
0.799249
0.792289
0.787633
0.782278
0.777506
0.771918
0.767444
0.761711
0.757743
0.752357
0.746231
0.741459
0.7363
0.731547
0.726403
0.72103
0.715916
0.711597
0.706158
0.702463
0.69661
0.691513
0.687411
0.682336
0.676968
0.671683
0.667109
0.662143
0.657398
0.652162
0.647552
0.642798
0.638612
0.632919
0.628169
0.623919
0.618712
0.613873
0.610107
0.603305
0.598922
0.594519
0.589663
0.584991
0.579629
0.574422
0.571475
0.565334
0.559268
0.555451
0.551356
0.544833
0.539548
0.534513
0.529173
0.526255
0.520143
0.513637
0.509093
0.504537
0.498997
0.493596
0.487372
0.482329
0.47619
0.470796
0.464928
0.459667
0.453252
0.447709
0.441169
0.43592
0.428909
0.422917
0.4173
0.408922
0.40197
0.394243
0.386687
0.379285
0.369577
0.36196
0.353171
0.34229
0.330678
0.319038
0.303541
0.285676
0.261296
0.211925
@@ -0,0 +1,513 @@
-6.63854 14.6054
0.28002
0.280306
0.280591
0.280879
0.281166
0.281453
0.28174
0.282027
0.282315
0.282605
0.282892
0.283182
0.283476
0.283767
0.284064
0.284359
0.284653
0.284954
0.285253
0.285553
0.285859
0.286157
0.286464
0.28678
0.287087
0.287404
0.287712
0.288031
0.28835
0.288682
0.289003
0.289338
0.289662
0.29
0.29034
0.290682
0.291026
0.291385
0.291734
0.292098
0.292452
0.292822
0.293196
0.293559
0.293939
0.294322
0.294724
0.295115
0.295511
0.295909
0.296329
0.296737
0.297164
0.297582
0.298018
0.298462
0.298893
0.299346
0.299804
0.300269
0.300738
0.301215
0.301695
0.302184
0.302696
0.303196
0.303703
0.304235
0.304755
0.30528
0.305834
0.306374
0.306943
0.307517
0.308079
0.308671
0.309269
0.309876
0.310469
0.311092
0.311721
0.312362
0.313009
0.313666
0.314331
0.315004
0.315687
0.316379
0.317078
0.317815
0.318534
0.319262
0.319999
0.320775
0.321531
0.322297
0.3231
0.323887
0.324712
0.325517
0.326365
0.327188
0.328056
0.328902
0.329789
0.330685
0.331563
0.332483
0.333415
0.334357
0.335274
0.33624
0.337216
0.338203
0.3392
0.340209
0.34119
0.342221
0.343263
0.344317
0.345381
0.346457
0.347545
0.348685
0.349795
0.350916
0.352048
0.353193
0.354351
0.355521
0.356746
0.357936
0.359136
0.36035
0.361625
0.362861
0.364104
0.365413
0.366683
0.368012
0.369305
0.370613
0.371981
0.373305
0.3747
0.376043
0.377458
0.378827
0.380265
0.38166
0.383117
0.384593
0.386011
0.387508
0.389013
0.390472
0.391998
0.393539
0.395023
0.396586
0.398162
0.399739
0.401336
0.40287
0.404487
0.406118
0.407748
0.40939
0.411053
0.41272
0.414395
0.416008
0.417704
0.419408
0.42113
0.422852
0.424586
0.426328
0.428086
0.429923
0.431702
0.433485
0.435268
0.437056
0.43888
0.440701
0.442518
0.444353
0.446282
0.448126
0.449978
0.451846
0.45372
0.455685
0.457585
0.459482
0.461469
0.46339
0.465309
0.467224
0.46926
0.4712
0.473137
0.475193
0.47715
0.47921
0.481183
0.48316
0.485252
0.487246
0.48934
0.491351
0.49346
0.495467
0.497599
0.499611
0.501758
0.503798
0.505941
0.507998
0.510145
0.512314
0.514381
0.516556
0.518639
0.520804
0.523005
0.525099
0.5273
0.529393
0.531587
0.533835
0.536047
0.538146
0.540389
0.54263
0.544753
0.546972
0.549258
0.551486
0.553751
0.5559
0.558164
0.560428
0.562715
0.564864
0.56713
0.569446
0.571688
0.574028
0.576297
0.578617
0.580782
0.583076
0.585408
0.587718
0.590042
0.592367
0.594686
0.597025
0.599345
0.601695
0.604016
0.606376
0.6087
0.611071
0.6134
0.615778
0.618115
0.620497
0.622845
0.625228
0.627588
0.62997
0.632339
0.634721
0.637099
0.63948
0.641871
0.644253
0.646646
0.649062
0.651597
0.654038
0.656405
0.658855
0.661258
0.663671
0.666099
0.668671
0.671125
0.673541
0.675962
0.678389
0.680856
0.683442
0.68592
0.688368
0.6908
0.693284
0.695912
0.698378
0.700818
0.703324
0.705948
0.708452
0.710958
0.713589
0.716117
0.718581
0.721101
0.723766
0.726292
0.728834
0.7315
0.734053
0.736531
0.739111
0.741797
0.744342
0.746945
0.749655
0.752199
0.75474
0.757544
0.760136
0.762655
0.765475
0.768024
0.770667
0.77346
0.776005
0.778895
0.781467
0.784132
0.786949
0.789524
0.792465
0.795064
0.79776
0.800619
0.803227
0.806191
0.808832
0.811563
0.81448
0.817121
0.820082
0.822774
0.825774
0.828538
0.831442
0.834202
0.837159
0.8399
0.84279
0.845752
0.84858
0.851599
0.85435
0.857463
0.860262
0.863383
0.866268
0.869303
0.872198
0.87529
0.878128
0.881388
0.88425
0.887467
0.890416
0.893546
0.896524
0.899714
0.902646
0.906017
0.90897
0.912291
0.915341
0.918578
0.921663
0.92497
0.928003
0.931462
0.934529
0.937961
0.941146
0.944506
0.947716
0.951159
0.954298
0.957832
0.961039
0.964588
0.967946
0.971449
0.974798
0.978402
0.981954
0.985332
0.988963
0.992312
0.995882
0.999553
1.00336
1.00685
1.01057
1.01413
1.01794
1.02145
1.02544
1.029
1.03299
1.03669
1.0406
1.04436
1.04838
1.05208
1.05626
1.06003
1.06425
1.06817
1.0723
1.07628
1.08053
1.08447
1.08893
1.09292
1.09742
1.10156
1.10596
1.11018
1.11469
1.11899
1.12342
1.12801
1.13248
1.1372
1.14161
1.1466
1.15108
1.15579
1.16076
1.16575
1.17059
1.17532
1.18029
1.18552
1.19077
1.19591
1.20092
1.20615
1.21164
1.21693
1.22238
1.2281
1.23359
1.23945
1.24521
1.25087
1.25666
1.26262
1.26893
1.27501
1.28114
1.28744
1.29411
1.30067
1.30719
1.31395
1.32075
1.32771
1.33518
1.3424
1.34979
1.35729
1.365
1.37284
1.38089
1.38913
1.39753
1.40582
1.4146
1.4238
1.43313
1.44275
1.45233
1.46254
1.47319
1.48367
1.49507
1.5065
1.51881
1.5312
1.54422
1.55792
1.57277
1.58797
1.60371
1.62106
1.63965
1.65932
1.68084
1.70466
1.73142
1.76155
1.79697
1.83941
1.8952
1.97691
2.16717
@@ -0,0 +1,513 @@
-6.63854 14.6054
2.2244e-16
-3.20409e-17
-4.26578e-18
-1.08899e-16
-9.45117e-17
-2.60567e-16
-2.79967e-16
-2.35998e-16
-2.81345e-16
-2.36253e-16
-1.81285e-16
-1.7901e-16
-2.07951e-16
-7.83477e-17
-9.23254e-17
-1.47352e-16
-1.67327e-16
-1.48381e-16
-1.29635e-16
3.68288e-17
-6.41784e-17
-6.83116e-17
9.11575e-17
2.59588e-17
-3.95006e-17
1.687e-17
2.13176e-17
4.49649e-17
8.73797e-17
-1.08517e-17
4.55131e-17
7.18033e-17
3.99713e-17
-1.38334e-17
9.07273e-17
4.26614e-17
5.17485e-17
1.90177e-17
5.74401e-17
6.63742e-17
1.42392e-16
1.15713e-16
1.52514e-16
2.51621e-16
3.48266e-16
3.8602e-16
5.68425e-16
7.0719e-16
1.03991e-15
1.39101e-15
1.96049e-15
2.77634e-15
3.8731e-15
5.42379e-15
7.5718e-15
1.05874e-14
1.47158e-14
2.03917e-14
2.82014e-14
3.87688e-14
5.31082e-14
7.24742e-14
9.8544e-14
1.33416e-13
1.8003e-13
2.41785e-13
3.23575e-13
4.31589e-13
5.73067e-13
7.58051e-13
9.99822e-13
1.31354e-12
1.72078e-12
2.24605e-12
2.92075e-12
3.78785e-12
4.8959e-12
6.30994e-12
8.10066e-12
1.03755e-11
1.32487e-11
1.68692e-11
2.14165e-11
2.71188e-11
3.42356e-11
4.3102e-11
5.41356e-11
6.78081e-11
8.46931e-11
1.0562e-10
1.31265e-10
1.62786e-10
2.01367e-10
2.48661e-10
3.06116e-10
3.7599e-10
4.61013e-10
5.63852e-10
6.88418e-10
8.38206e-10
1.01902e-09
1.23527e-09
1.4956e-09
1.80579e-09
2.17728e-09
2.61975e-09
3.14448e-09
3.76922e-09
4.50978e-09
5.38563e-09
6.41446e-09
7.63275e-09
9.06602e-09
1.07491e-08
1.27223e-08
1.50316e-08
1.77184e-08
2.08634e-08
2.45253e-08
2.87828e-08
3.37249e-08
3.94526e-08
4.60801e-08
5.37698e-08
6.26052e-08
7.27792e-08
8.4477e-08
9.79199e-08
1.13354e-07
1.31028e-07
1.51326e-07
1.74407e-07
2.00713e-07
2.30688e-07
2.64957e-07
3.03696e-07
3.47591e-07
3.97607e-07
4.53942e-07
5.17862e-07
5.89822e-07
6.70902e-07
7.62499e-07
8.65117e-07
9.80925e-07
1.10997e-06
1.25565e-06
1.4177e-06
1.60019e-06
1.8028e-06
2.0294e-06
2.28267e-06
2.56199e-06
2.87547e-06
3.22299e-06
3.60815e-06
4.03495e-06
4.50882e-06
5.02894e-06
5.60808e-06
6.24823e-06
6.95162e-06
7.72916e-06
8.57663e-06
9.51732e-06
1.05515e-05
1.16824e-05
1.29233e-05
1.42854e-05
1.57744e-05
1.74047e-05
1.91739e-05
2.11131e-05
2.32291e-05
2.55422e-05
2.80528e-05
3.07838e-05
3.37526e-05
3.69817e-05
4.04996e-05
4.43025e-05
4.84173e-05
5.28625e-05
5.76686e-05
6.28879e-05
6.85126e-05
7.45665e-05
8.11193e-05
8.82133e-05
9.57904e-05
0.000103958
0.000112721
0.000122143
0.000132319
0.000143224
0.000154863
0.000167392
0.000180811
0.000195093
0.00021033
0.000226844
0.000244259
0.000262819
0.000282876
0.000303977
0.000326634
0.000350666
0.000376125
0.000403524
0.000432423
0.000463172
0.000495805
0.000530486
0.000566875
0.000605988
0.000646723
0.000690523
0.000736579
0.000785258
0.000836759
0.000890995
0.000948457
0.00100892
0.00107277
0.00114005
0.00121062
0.00128538
0.00136385
0.00144647
0.00153296
0.00162371
0.0017204
0.00182108
0.00192571
0.00203676
0.00215307
0.00227411
0.00240074
0.00253537
0.00267434
0.00282062
0.00297264
0.00313224
0.00329876
0.00347347
0.00365364
0.00384293
0.00404176
0.00424602
0.00446306
0.00468508
0.00491988
0.00515961
0.00541149
0.00567522
0.00594811
0.00623231
0.00652749
0.00683354
0.00715233
0.00748116
0.00782533
0.00817805
0.00854928
0.00892747
0.00932699
0.00973251
0.0101614
0.0105963
0.0110553
0.0115217
0.0120119
0.0125118
0.0130339
0.0135693
0.0141246
0.0146964
0.0152867
0.0158964
0.0165254
0.0171722
0.0178482
0.0185364
0.0192601
0.0199807
0.0207465
0.0215219
0.02232
0.0231507
0.0239978
0.0248808
0.0257735
0.0266942
0.0276384
0.0286248
0.0296236
0.0306684
0.0317216
0.0327998
0.0339283
0.0350767
0.0362535
0.0374478
0.0386994
0.0399623
0.0412773
0.0426143
0.043978
0.045396
0.0468154
0.0482925
0.0497985
0.0513552
0.0529368
0.0545505
0.0562206
0.0578873
0.059639
0.0614012
0.0632189
0.0650928
0.0669859
0.0689124
0.0708768
0.0729485
0.0750108
0.0770855
0.079288
0.081461
0.083732
0.086039
0.0883411
0.0908051
0.0932069
0.0957166
0.0982649
0.100811
0.103541
0.106192
0.108959
0.111774
0.114581
0.117575
0.120498
0.12354
0.12665
0.129729
0.132983
0.136204
0.139593
0.142971
0.146393
0.149884
0.15346
0.157055
0.160813
0.164563
0.168395
0.172311
0.176194
0.18031
0.184352
0.188597
0.192837
0.197129
0.201504
0.205975
0.210424
0.21518
0.219778
0.224627
0.229442
0.234336
0.239312
0.244406
0.249465
0.254883
0.260105
0.26561
0.271078
0.276636
0.282281
0.288064
0.293791
0.299888
0.305805
0.312022
0.318228
0.324516
0.330899
0.337447
0.343892
0.350698
0.357393
0.364376
0.371422
0.378519
0.385709
0.393108
0.400507
0.407986
0.415668
0.423266
0.431267
0.439261
0.447522
0.455687
0.464003
0.47243
0.481069
0.4896
0.498685
0.507475
0.516746
0.525942
0.535281
0.544751
0.554455
0.564023
0.574175
0.584047
0.594466
0.604789
0.615268
0.625903
0.636786
0.647538
0.658993
0.670056
0.681798
0.693332
0.70512
0.717012
0.729217
0.741478
0.754092
0.766781
0.779697
0.792873
0.805915
0.819846
0.833243
0.847219
0.861472
0.875904
0.890526
0.905022
0.920162
0.935567
0.951188
0.967082
0.982806
0.999157
1.01579
1.03256
1.04977
1.06735
1.08496
1.10314
1.12169
1.14009
1.15899
1.17842
1.19838
1.21842
1.23873
1.2596
1.28105
1.30296
1.3248
1.34751
1.37046
1.39397
1.41855
1.44305
1.46826
1.49388
1.52032
1.54724
1.57496
1.60336
1.63244
1.6619
1.69249
1.72435
1.75687
1.79046
1.82464
1.86038
1.89762
1.93523
1.97513
2.016
2.0592
2.10351
2.15003
2.19886
2.25097
2.30512
2.36188
2.42334
2.48917
2.55938
2.6359
2.72022
2.81447
2.92074
3.04488
3.19376
3.38722
3.66936
4.31864
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,34 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef ExExChAnalysis_h
#define ExExChAnalysis_h 1
#include "g4root.hh"
//#include "g4xml.hh"
//#include "g4csv.hh"
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef ExExChAntiBarionBuilder_h
#define ExExChAntiBarionBuilder_h 1
#include "globals.hh"
#include "G4ProtonInelasticProcess.hh"
#include "G4VAntiBarionBuilder.hh"
#include <vector>
class ExExChAntiBarionBuilder
{
public:
ExExChAntiBarionBuilder();
virtual ~ExExChAntiBarionBuilder();
public:
void Build();
void RegisterMe(G4VAntiBarionBuilder * aB) {
theModelCollections.push_back(aB);}
private:
G4AntiProtonInelasticProcess* theAntiProtonInelastic;
G4AntiNeutronInelasticProcess* theAntiNeutronInelastic;
G4AntiDeuteronInelasticProcess* theAntiDeuteronInelastic;
G4AntiTritonInelasticProcess* theAntiTritonInelastic;
G4AntiHe3InelasticProcess* theAntiHe3Inelastic;
G4AntiAlphaInelasticProcess* theAntiAlphaInelastic;
std::vector<G4VAntiBarionBuilder *> theModelCollections;
G4bool wasActivated;
};
#endif
@@ -0,0 +1,123 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
// --------------------------------------------------------------
//
#ifndef ExExChDetectorConstruction_h
#define ExExChDetectorConstruction_h 1
#endif
#include "G4VUserDetectorConstruction.hh"
#include "ExExChDetectorConstructionMessenger.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "G4RunManager.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class ExExChDetectorConstruction : public G4VUserDetectorConstruction
{
public:
ExExChDetectorConstruction();
~ExExChDetectorConstruction();
void DefineMaterials();
G4VPhysicalVolume* Construct();
private:
ExExChDetectorConstructionMessenger* fMessenger;
void ConstructSDandField();
private:
void ConstructWorld();
G4double fWorldSizeXY;
G4double fWorldSizeZ;
G4Box* fWorldSolid;
G4LogicalVolume* fWorldLogic;
G4VPhysicalVolume* fWorldPhysical;
G4Material* fWorldMaterial;
//** SSD **//
private:
void ConstructSiliconStripDetectors();
G4double fSSD0XtalDistance;
G4double fSSD1XtalDistance;
G4double fSSD2XtalDistance;
G4ThreeVector fSSDSize;
G4Box* fSSDSolid;
G4LogicalVolume* fSSDLogic;
//** Xtal **//
public:
void AddXtalTarget() {
bXtal = true;
G4RunManager::GetRunManager()->GeometryHasBeenModified();
};
void SetXtalMaterial(const G4String& name);
G4String GetXtalMaterial();
void SetXtalCurvatureRadius(G4ThreeVector);
G4ThreeVector GetXtalCurvatureRadius() {return fXtalCurvatureRadius;};
void SetXtalSize(G4ThreeVector);
G4ThreeVector GetXtalSize() {return fXtalSize;};
void SetXtalAngle(G4ThreeVector);
G4ThreeVector GetXtalAngle() {return fXtalAngle;};
void SetXtalCellSize(G4ThreeVector);
G4ThreeVector GetXtalCellSize() {return fXtalCellSize;};
void SetXtalCellAngle(G4ThreeVector);
G4ThreeVector GetXtalCellAngle() {return fXtalCellAngle;};
void SetXtalThermalVibrationAmplitude(G4double);
G4double GetXtalThermalVibrationAmplitude() {return fXtalTVA;};
void SetXtalMiller(G4ThreeVector);
G4ThreeVector GetXtalMiller() {return fXtalMiller;};
private:
void ConstructXtalTarget();
G4bool bXtal;
G4ThreeVector fXtalCurvatureRadius;
G4Material* fXtalMaterial;
G4ThreeVector fXtalAngle;
G4ThreeVector fXtalSize;
G4ThreeVector fXtalCellSize;
G4ThreeVector fXtalCellAngle;
G4ThreeVector fXtalMiller;
G4double fXtalTVA;
G4VSolid* fXtalSolid;
G4LogicalVolume* fXtalLogic;
G4VPhysicalVolume* fXtalPhysical;
};
@@ -0,0 +1,68 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef ExExChDetectorConstructionMessenger_h
#define ExExChDetectorConstructionMessenger_h 1
class ExExChDetectorConstruction;
class G4UIdirectory;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithAIntAndUnit;
class G4UIcmdWith3VectorAndUnit;
class G4UIcmdWith3Vector;
class G4UIcmdWithAString;
#include "G4UImessenger.hh"
#include "globals.hh"
class ExExChDetectorConstructionMessenger: public G4UImessenger
{
public:
ExExChDetectorConstructionMessenger(
ExExChDetectorConstruction* mpga);
~ExExChDetectorConstructionMessenger();
virtual void SetNewValue(G4UIcommand * command,G4String newValues);
virtual G4String GetCurrentValue(G4UIcommand * command);
private:
ExExChDetectorConstruction * fTarget;
G4UIdirectory* fMyXtalDirectory;
G4UIcmdWithAString* fXtalMaterialCmd;
G4UIcmdWith3VectorAndUnit* fXtalCurvatureRadiusCmd;
G4UIcmdWith3VectorAndUnit* fXtalSizeCmd;
G4UIcmdWith3VectorAndUnit* fXtalAngleCmd;
G4UIcmdWith3VectorAndUnit* fXtalCellSizeCmd;
G4UIcmdWith3VectorAndUnit* fXtalCellAngleCmd;
G4UIcmdWithADoubleAndUnit* fXtalCellThermalVibration;
G4UIcmdWith3Vector* fXtalMillerCmd;
G4UIcmdWithAString* fAddXtal;
};
#endif
@@ -0,0 +1,56 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
// --------------------------------------------------------------
//
#ifndef ExExChEventAction_h
#define ExExChEventAction_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
#include <iostream>
#include <fstream>
class ExExChEventActionMessenger;
class ExExChEventAction : public G4UserEventAction
{
public:
ExExChEventAction();
virtual ~ExExChEventAction();
virtual void BeginOfEventAction(const G4Event*);
virtual void EndOfEventAction(const G4Event*);
private:
G4int fSD_ID;
G4int fVerboseLevel;
public:
inline void SetVerbose(G4int val) { fVerboseLevel = val; }
inline G4int GetVerbose() const { return fVerboseLevel; }
};
#endif
@@ -0,0 +1,90 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef ExExChHadronElasticPhysics_h
#define ExExChHadronElasticPhysics_h 1
#include "globals.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4HadronElastic.hh"
#include "G4HadronicProcess.hh"
class ExExChHadronElasticPhysics : public G4VPhysicsConstructor
{
public:
ExExChHadronElasticPhysics(G4int ver = 0);
virtual ~ExExChHadronElasticPhysics();
// This method will be invoked in the Construct() method.
// each particle type will be instantiated
virtual void ConstructParticle();
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
inline G4HadronElastic* GetNeutronModel();
inline G4HadronicProcess* GetNeutronProcess();
private:
// copy constructor and hide assignment operator
ExExChHadronElasticPhysics(ExExChHadronElasticPhysics &);
ExExChHadronElasticPhysics & operator=(
const ExExChHadronElasticPhysics &right);
G4int verbose;
static G4ThreadLocal G4bool wasActivated;
static G4ThreadLocal G4HadronElastic* neutronModel;
static G4ThreadLocal G4HadronicProcess* neutronProcess;
};
inline G4HadronElastic* ExExChHadronElasticPhysics::GetNeutronModel()
{
return neutronModel;
}
inline G4HadronicProcess* ExExChHadronElasticPhysics::GetNeutronProcess()
{
return neutronProcess;
}
#endif
@@ -0,0 +1,104 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: ExExChHadronPhysicsQGSP_BIC.hh 76703 2013-11-14 10:29:11Z gcosmo $
//
#ifndef ExExChHadronPhysicsQGSP_BIC_h
#define ExExChHadronPhysicsQGSP_BIC_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4QGSPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4BinaryProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BinaryNeutronBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "ExExChProtonBuilder.hh"
#include "ExExChPiKBuilder.hh"
#include "ExExChHyperonFTFPBuilder.hh"
#include "ExExChAntiBarionBuilder.hh"
class ExExChHadronPhysicsQGSP_BIC : public G4VPhysicsConstructor
{
public:
ExExChHadronPhysicsQGSP_BIC(G4int verbose =1);
ExExChHadronPhysicsQGSP_BIC(const G4String& name,
G4bool quasiElastic=true);
virtual ~ExExChHadronPhysicsQGSP_BIC();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
private:
void CreateModels();
struct ThreadPrivate {
G4NeutronBuilder * theNeutrons;
G4FTFPNeutronBuilder * theFTFPNeutron;
G4QGSPNeutronBuilder * theQGSPNeutron;
G4BinaryNeutronBuilder * theBinaryNeutron;
ExExChPiKBuilder * thePiK;
G4FTFPPiKBuilder * theFTFPPiK;
G4QGSPPiKBuilder * theQGSPPiK;
G4BertiniPiKBuilder * theBertiniPiK;
ExExChProtonBuilder * thePro;
G4FTFPProtonBuilder * theFTFPPro;
G4QGSPProtonBuilder * theQGSPPro;
G4BinaryProtonBuilder * theBinaryPro;
ExExChHyperonFTFPBuilder * theHyperon;
ExExChAntiBarionBuilder * theAntiBaryon;
G4FTFPAntiBarionBuilder * theFTFPAntiBaryon;
G4VCrossSectionDataSet * xsNeutronInelasticXS;
G4VCrossSectionDataSet * xsNeutronCaptureXS;
};
static G4ThreadLocal ThreadPrivate* tpdata;
// G4bool QuasiElastic;
};
#endif
@@ -0,0 +1,91 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef ExExChHyperonFTFPBuilder_h
#define ExExChHyperonFTFPBuilder_h 1
#include "globals.hh"
#include "G4LambdaInelasticProcess.hh"
#include "G4AntiLambdaInelasticProcess.hh"
#include "G4SigmaPlusInelasticProcess.hh"
#include "G4SigmaMinusInelasticProcess.hh"
#include "G4AntiSigmaPlusInelasticProcess.hh"
#include "G4AntiSigmaMinusInelasticProcess.hh"
#include "G4XiZeroInelasticProcess.hh"
#include "G4XiMinusInelasticProcess.hh"
#include "G4AntiXiZeroInelasticProcess.hh"
#include "G4AntiXiMinusInelasticProcess.hh"
#include "G4OmegaMinusInelasticProcess.hh"
#include "G4AntiOmegaMinusInelasticProcess.hh"
#include "G4TheoFSGenerator.hh"
#include "G4ExcitationHandler.hh"
#include "G4PreCompoundModel.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4FTFModel.hh"
#include "G4LundStringFragmentation.hh"
#include "G4ExcitedStringDecay.hh"
#include "G4CascadeInterface.hh"
#include "G4ChipsHyperonInelasticXS.hh"
class ExExChHyperonFTFPBuilder
{
public:
ExExChHyperonFTFPBuilder();
virtual ~ExExChHyperonFTFPBuilder();
public:
void Build();
private:
G4TheoFSGenerator * HyperonFTFP;
G4TheoFSGenerator * AntiHyperonFTFP;
G4PreCompoundModel * thePreEquilib;
G4ExcitationHandler * theHandler;
G4GeneratorPrecompoundInterface * theCascade;
G4FTFModel * theStringModel;
G4ExcitedStringDecay * theStringDecay;
G4LundStringFragmentation * theLund;
G4CascadeInterface * theBertini;
G4LambdaInelasticProcess* theLambdaInelastic;
G4AntiLambdaInelasticProcess* theAntiLambdaInelastic;
G4SigmaMinusInelasticProcess* theSigmaMinusInelastic;
G4AntiSigmaMinusInelasticProcess* theAntiSigmaMinusInelastic;
G4SigmaPlusInelasticProcess* theSigmaPlusInelastic;
G4AntiSigmaPlusInelasticProcess* theAntiSigmaPlusInelastic;
G4XiZeroInelasticProcess* theXiZeroInelastic;
G4AntiXiZeroInelasticProcess* theAntiXiZeroInelastic;
G4XiMinusInelasticProcess* theXiMinusInelastic;
G4AntiXiMinusInelasticProcess* theAntiXiMinusInelastic;
G4OmegaMinusInelasticProcess* theOmegaMinusInelastic;
G4AntiOmegaMinusInelasticProcess* theAntiOmegaMinusInelastic;
G4VCrossSectionDataSet* theCHIPSInelastic;
G4bool wasActivated;
};
#endif
@@ -0,0 +1,78 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef ExExChIonPhysics_h
#define ExExChIonPhysics_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
class G4HadronicInteraction;
class G4VCrossSectionDataSet;
class G4VComponentCrossSection;
class G4FTFBuilder;
class G4BinaryLightIonReaction;
class ExExChIonPhysics : public G4VPhysicsConstructor
{
public:
ExExChIonPhysics(G4int ver = 0);
ExExChIonPhysics(const G4String& nname);
virtual ~ExExChIonPhysics();
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
void ConstructParticle();
void ConstructProcess();
private:
void AddProcess(const G4String&, G4ParticleDefinition*, G4bool isIon);
static G4ThreadLocal G4VCrossSectionDataSet* theNuclNuclData;
static G4ThreadLocal G4VComponentCrossSection* theGGNuclNuclXS;
static G4ThreadLocal G4BinaryLightIonReaction* theIonBC;
static G4ThreadLocal G4HadronicInteraction* theFTFP;
static G4ThreadLocal G4FTFBuilder* theBuilder;
G4int verbose;
static G4ThreadLocal G4bool wasActivated;
};
#endif
@@ -0,0 +1,105 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
// --------------------------------------------------------------
//
#ifndef ChannelingUserInfo_h
#define ChannelingUserInfo_h 1
#include "globals.hh"
#include "G4VUserTrackInformation.hh"
#include "G4ThreeVector.hh"
class ExExChParticleUserInfo : public G4VUserTrackInformation
{
public:
ExExChParticleUserInfo();
~ExExChParticleUserInfo();
void SetCoherentEffect(G4int flag);
G4int HasBeenUnderCoherentEffect();
void SetNucleiDensity(G4double);
G4double GetNucleiDensity();
void SetElectronDensity(G4double);
G4double GetElectronDensity();
G4double GetNucleiDensityPreviousStep();
G4double GetElectronDensityPreviousStep();
void StoreDensityPreviousStep();
G4ThreeVector GetMomentumChanneled();
void SetMomentumChanneled(G4ThreeVector);
G4ThreeVector GetPositionChanneled();
void SetPositionChanneled(G4ThreeVector);
G4double GetEnergyChanneled();
void SetEnergyChanneled(G4double);
G4ThreeVector GetMomentumChanneledInitial();
void SetMomentumChanneledInitial(G4ThreeVector);
G4ThreeVector GetPositionChanneledInitial();
void SetPositionChanneledInitial(G4ThreeVector);
G4int GetNumberOfDechanneling();
void IncreaseNumberOfDechanneling();
private:
G4int bHasBeenUnderCoherentEffect;
//Has been in channeling in the last step
G4double fNucleiDensity;
//Last value of density seen by channeled particle
G4double fNucleiDensityPreviousStep;
G4double fElectronDensity;
//Last value of density seen by channeled particle
G4double fElectronDensityPreviousStep;
G4ThreeVector fMomentumInChanneling;
//Last position of the particle in the channel
G4ThreeVector fMomentumInChannelingInitial;
//Last position of the particle in the channel
G4ThreeVector fPositionInChanneling;
//Last projection fof the particle momentum in the crystal reference system
G4ThreeVector fPositionInChannelingInitial;
//Last projection fof the particle momentum in the crystal reference system
G4int fNumberOfDechanneling;
};
#endif
@@ -0,0 +1,61 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef ExExChPhysListEmStandardSS_h
#define ExExChPhysListEmStandardSS_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class ExExChPhysListEmStandardSS : public G4VPhysicsConstructor
{
public:
ExExChPhysListEmStandardSS(const G4String& name = "standardSS");
~ExExChPhysListEmStandardSS();
public:
// This method is dummy for physics
virtual void ConstructParticle() {};
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,68 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
// --------------------------------------------------------------
//
#ifndef ExExChPhysicsList_h
#define ExExChPhysicsList_h 1
#include "G4VModularPhysicsList.hh"
#include "ExExChPhysicsListMessenger.hh"
class ExExChPhysicsList: public G4VModularPhysicsList
{
private:
G4VPhysicsConstructor* fParticleList;
G4VPhysicsConstructor* fEmPhysicsList;
G4VPhysicsConstructor* fDecayList;
G4VPhysicsConstructor* fRaddecayList;
G4VPhysicsConstructor* fHadronElasticPhysicsList;
G4VPhysicsConstructor* fHadronInelasticPhysicsList;
G4VPhysicsConstructor* fStoppingPhysics;
G4VPhysicsConstructor* fIonPhysics;
G4VPhysicsConstructor* fNeutronTrackingCut;
G4VPhysicsConstructor* fEmExtraPhysics;
G4String fFilePotentialName;
ExExChPhysicsListMessenger *fMessenger;
public:
ExExChPhysicsList();
~ExExChPhysicsList();
//Add processes
void AddChanneling();
void AddInelaticProcesses();
// Construct particle and physics
void ConstructParticle();
void ConstructProcess();
void SetCuts();
void SetFilePotentialName(const G4String&);
G4String GetFilePotentialName();
};
#endif
@@ -0,0 +1,56 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
// --------------------------------------------------------------
//
#ifndef PhysicsListMessenger_h
#define PhysicsListMessenger_h 1
class ExExChPhysicsList;
class G4UIcmdWithAString;
#include "G4UImessenger.hh"
#include "globals.hh"
class ExExChPhysicsListMessenger: public G4UImessenger
{
public:
ExExChPhysicsListMessenger(ExExChPhysicsList* mpga);
virtual ~ExExChPhysicsListMessenger();
virtual void SetNewValue(G4UIcommand * command,G4String newValues);
virtual G4String GetCurrentValue(G4UIcommand * command);
private:
ExExChPhysicsList* fTarget;
G4UIcmdWithAString* fFilePotentialNameCmd;
G4UIdirectory* fMyDirectory;
};
#endif
@@ -0,0 +1,61 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef ExExChPiKBuilder_h
#define ExExChPiKBuilder_h 1
#include "globals.hh"
#include "G4ProtonInelasticProcess.hh"
#include "G4VPiKBuilder.hh"
#include <vector>
class ExExChPiKBuilder
{
public:
ExExChPiKBuilder();
virtual ~ExExChPiKBuilder();
public:
void Build();
void RegisterMe(G4VPiKBuilder * aB) {theModelCollections.push_back(aB);}
private:
G4PionPlusInelasticProcess* thePionPlusInelastic;
G4PionMinusInelasticProcess* thePionMinusInelastic;
G4KaonPlusInelasticProcess* theKaonPlusInelastic;
G4KaonMinusInelasticProcess* theKaonMinusInelastic;
G4KaonZeroLInelasticProcess* theKaonZeroLInelastic;
G4KaonZeroSInelasticProcess* theKaonZeroSInelastic;
std::vector<G4VPiKBuilder *> theModelCollections;
G4bool wasActivated;
};
#endif
@@ -0,0 +1,56 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
// --------------------------------------------------------------
//
#ifndef ExExChPrimaryGeneratorAction_h
#define ExExChPrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class G4GeneralParticleSource;
class G4Event;
class ExExChDetectorConstruction;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class ExExChPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
ExExChPrimaryGeneratorAction();
virtual ~ExExChPrimaryGeneratorAction();
void GeneratePrimaries(G4Event*);
private:
G4GeneralParticleSource* fParticleGun;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,175 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
#ifndef ExExChProcessChanneling_h
#define ExExChProcessChanneling_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "G4VDiscreteProcess.hh"
#include "XLatticeManager3.hh"
#include "XVCrystalCharacteristic.hh"
#include "XCrystalIntegratedDensityHub.hh"
#include "G4VPhysicalVolume.hh"
#include "XPhysicalLattice.hh"
#include "ExExChParticleUserInfo.hh"
class ExExChProcessChanneling : public G4VDiscreteProcess
{
public:
ExExChProcessChanneling(const G4String& processName =
"ExExChProcessChanneling" );
virtual ~ExExChProcessChanneling();
virtual G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);
virtual G4bool IsApplicable(const G4ParticleDefinition&);
virtual void BuildPhysicsTable(const G4ParticleDefinition&);
protected:
virtual G4double GetMeanFreePath(const G4Track&,
G4double,
G4ForceCondition* );
private:
G4double GetChannelingMeanFreePath(const G4Track&);
G4bool IsUnderCoherentEffect(const G4Track&);
public:
XVCrystalCharacteristic* GetPotential();
void SetPotential(XVCrystalCharacteristic*);
XVCrystalCharacteristic* GetElectricField();
void SetElectricField(XVCrystalCharacteristic*);
XCrystalIntegratedDensityHub* GetIntegratedDensity();
void SetIntegratedDensity(XCrystalIntegratedDensityHub*);
XVCrystalCharacteristic* GetNucleiDensity();
void SetNucleiDensity(XVCrystalCharacteristic*);
XVCrystalCharacteristic* GetElectronDensity();
void SetElectronDensity(XVCrystalCharacteristic*);
void ReadFromFileCharacteristics(G4bool);
void SetFileCharacteristicsName(const G4String& vFilename)
{fFileCharacteristicsName = vFilename;};
G4bool GetFileCharacteristicsName() {return fFileCharacteristicsName;};
private:
void UpdateParameters(const G4Track&);
void UpdatePosition(const G4Track&);
void UpdateMomentum(const G4Track&);
void UpdateDensity(const G4Track&);
void ResetDensity(const G4Track&);
G4double ComputeCriticalEnergyBent(const G4Track&);
G4double ComputeCriticalEnergyMinimumBent(const G4Track&);
G4double ComputePotentialEnergyBent(const G4Track&);
G4ThreeVector ComputeTransverseEnergyBent(const G4Track&);
G4ThreeVector ComputeChannelingOutgoingMomentum(const G4Track&);
G4ThreeVector ComputeVolumeReflectionOutgoingMomentum(const G4Track&);
G4ThreeVector ComputePositionInTheCrystal(G4StepPoint*,const G4Track&);
G4double ComputeDistanceWhereParticleTangentToBentPlane(const G4Track&);
G4StepPoint* CheckStepPointLatticeForVolume(G4StepPoint*,const G4Track&);
G4StepPoint* CheckStepPointLatticeForPosition(G4StepPoint*,const G4Track&);
G4ThreeVector ComputeTransverseEnergy(const G4Track&);
G4ThreeVector ComputeKineticEnergy(const G4Track&);
G4ThreeVector ComputePotentialEnergy(const G4Track&);
G4ThreeVector ComputeMomentum(const G4Track&,G4StepPoint*);
G4ThreeVector ComputeCentrifugalEnergy(const G4Track&,G4ThreeVector);
G4ThreeVector ComputeCentrifugalEnergyMaximumVariation(const G4Track&);
G4double ComputeCriticalEnergyMaximum(const G4Track&);
G4double ComputeCriticalEnergyMinimum(const G4Track&);
G4double ComputeCriticalAngle(const G4Track&);
G4double ComputeCriticalRadius(const G4Track&);
G4double ComputeOscillationPeriod(const G4Track&);
G4ThreeVector ComputePotentialWellCentre(const G4Track&);
G4bool HasLattice(const G4Track&);
G4bool HasLatticeOnBoundary(const G4Track&);
G4bool HasLatticeOnBoundaryPre(const G4Track&);
G4bool HasLatticeOnBoundaryPost(const G4Track&);
G4bool ParticleIsTangentToBentPlane(const G4Track&);
G4bool ParticleIsNegative(const G4Track&);
G4bool ParticleIsNotOnBoundaryPre(const G4Track&);
G4bool ParticleIsNotOnBoundaryPost(const G4Track&);
G4bool ParticleIsNotOnBoundary(const G4Track&);
void ComputeCrystalCharacteristic(const G4Track&);
private:
//binding methods
XPhysicalLattice* GetXPhysicalLattice(const G4Track&);
G4VPhysicalVolume* GetVolume(const G4Track&);
ExExChParticleUserInfo* GetInfo(const G4Track&);
G4ParticleDefinition* GetParticleDefinition(const G4Track& aTrack);
private:
// hide assignment operator as private
ExExChProcessChanneling(ExExChProcessChanneling&);
ExExChProcessChanneling& operator=(
const ExExChProcessChanneling& right);
private:
XLatticeManager3* fLatticeManager;
XVCrystalCharacteristic* fPotentialEnergy;
XVCrystalCharacteristic* fElectricField;
XCrystalIntegratedDensityHub* fIntegratedDensity;
XVCrystalCharacteristic* fNucleiDensity;
XVCrystalCharacteristic* fElectronDensity;
G4String fFileCharacteristicsName;
};
#endif
@@ -0,0 +1,57 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
#ifndef ExExChProtonBuilder_h
#define ExExChProtonBuilder_h 1
#include "globals.hh"
#include "G4ProtonInelasticProcess.hh"
#include "G4VProtonBuilder.hh"
#include <vector>
class ExExChProtonBuilder
{
public:
ExExChProtonBuilder();
virtual ~ExExChProtonBuilder();
public:
void Build();
void RegisterMe(G4VProtonBuilder * aB) {theModelCollections.push_back(aB);}
private:
G4ProtonInelasticProcess * theProtonInelastic;
std::vector<G4VProtonBuilder *> theModelCollections;
G4bool wasActivated;
};
#endif
@@ -0,0 +1,48 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef ExExChRunAction_h
#define ExExChRunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
class G4Run;
class ExExChRunAction : public G4UserRunAction
{
public:
ExExChRunAction();
virtual ~ExExChRunAction();
virtual void BeginOfRunAction(const G4Run*);
virtual void EndOfRunAction(const G4Run*);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,53 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
// --------------------------------------------------------------
//
#ifndef ExExChSensitiveDetector_h
#define ExExChSensitiveDetector_h 1
#include "G4VSensitiveDetector.hh"
#include "ExExChSensitiveDetectorHit.hh"
class G4Step;
class G4HCofThisEvent;
class G4TouchableHistory;
class ExExChSensitiveDetector : public G4VSensitiveDetector
{
public:
ExExChSensitiveDetector(G4String name);
virtual ~ExExChSensitiveDetector();
virtual void Initialize(G4HCofThisEvent*HCE);
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
virtual void EndOfEvent(G4HCofThisEvent*HCE);
private:
ExExChSensitiveDetectorHitsCollection * fHitsCollection;
G4int fHCID;
};
#endif
@@ -0,0 +1,111 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
// --------------------------------------------------------------
//
#ifndef ExExChSensitiveDetectorHit_h
#define ExExChSensitiveDetectorHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
#include "G4ThreeVector.hh"
#include "G4LogicalVolume.hh"
#include "G4Transform3D.hh"
#include "G4RotationMatrix.hh"
class G4AttDef;
class G4AttValue;
class ExExChSensitiveDetectorHit : public G4VHit
{
public:
ExExChSensitiveDetectorHit();
ExExChSensitiveDetectorHit(G4int z);
virtual ~ExExChSensitiveDetectorHit();
ExExChSensitiveDetectorHit(
const ExExChSensitiveDetectorHit &right);
const ExExChSensitiveDetectorHit& operator=(
const ExExChSensitiveDetectorHit &right);
int operator==(const ExExChSensitiveDetectorHit &right) const;
inline void *operator new(size_t);
inline void operator delete(void *aHit);
virtual void Draw();
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
virtual std::vector<G4AttValue>* CreateAttValues() const;
virtual void Print();
private:
G4int fLayerID;
G4ThreeVector fWorldPos;
public:
inline void SetLayerID(G4int z) { fLayerID = z; }
inline G4int GetLayerID() const { return fLayerID; }
inline void SetWorldPos(G4ThreeVector xyz) { fWorldPos = xyz; }
inline G4ThreeVector GetWorldPos() const { return fWorldPos; }
};
typedef G4THitsCollection<ExExChSensitiveDetectorHit>
ExExChSensitiveDetectorHitsCollection;
#ifdef G4MULTITHREADED
extern G4ThreadLocal G4Allocator<ExExChSensitiveDetectorHit>*
ExExChSensitiveDetectorHitAllocator;
#else
extern G4Allocator<ExExChSensitiveDetectorHit>
ExExChSensitiveDetectorHitAllocator;
#endif
inline void* ExExChSensitiveDetectorHit::operator new(size_t)
{
#ifdef G4MULTITHREADED
if(!ExExChSensitiveDetectorHitAllocator)
ExExChSensitiveDetectorHitAllocator =
new G4Allocator<ExExChSensitiveDetectorHit>;
return (void *) ExExChSensitiveDetectorHitAllocator->MallocSingle();
#else
void* aHit;
aHit = (void*)ExExChSensitiveDetectorHitAllocator.MallocSingle();
return aHit;
#endif
}
inline void ExExChSensitiveDetectorHit::operator delete(void* aHit)
{
#ifdef G4MULTITHREADED
ExExChSensitiveDetectorHitAllocator->FreeSingle((
ExExChSensitiveDetectorHit*) aHit);
#else
ExExChSensitiveDetectorHitAllocator.FreeSingle((
ExExChSensitiveDetectorHit*) aHit);
#endif
}
#endif
@@ -0,0 +1,60 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
// --------------------------------------------------------------
//
#ifndef ExExChStackingAction_h
#define ExExChStackingAction_h 1
#include "G4UserStackingAction.hh"
#include "globals.hh"
class ExExChStackingActionMessenger;
class G4Track;
class G4ParticleDefinition;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class ExExChStackingAction : public G4UserStackingAction
{
public:
ExExChStackingAction();
virtual ~ExExChStackingAction();
void SetKillStatus(G4bool value);
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track*);
private:
ExExChStackingActionMessenger* fStackMessenger;
G4bool fKillSecondary;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,58 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
// --------------------------------------------------------------
//
#ifndef ExExChStackingActionMessenger_h
#define ExExChStackingActionMessenger_h 1
#include "G4UImessenger.hh"
#include "globals.hh"
class ExExChStackingAction;
class G4UIcmdWithABool;
class G4UIcmdWithAString;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class ExExChStackingActionMessenger: public G4UImessenger
{
public:
ExExChStackingActionMessenger(ExExChStackingAction*);
virtual ~ExExChStackingActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
ExExChStackingAction* fStackAction;
G4UIcmdWithABool* fKillAllSecondariesCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,52 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
#ifndef ExExChTrackingAction_h
#define ExExChTrackingAction_h 1
#include "G4UserTrackingAction.hh"
class ExExChTrackingAction : public G4UserTrackingAction{
public:
void PreUserTrackingAction(const G4Track*);
void PostUserTrackingAction(const G4Track*);
};
#endif
@@ -0,0 +1,57 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
#ifdef G4MULTITHREADED
#ifndef ExExChUserActionInitialization_h
#define ExExChUserActionInitialization_h 1
#endif
#include "G4VUserActionInitialization.hh"
class G4GeneralParticleSource;
class ExExChUserActionInitialization : public G4VUserActionInitialization{
public:
ExExChUserActionInitialization();
~ExExChUserActionInitialization();
void Build() const;
void BuildForMaster() const;
private:
G4GeneralParticleSource* masterGPS;
};
#endif
@@ -0,0 +1,51 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
// --------------------------------------------------------------
//
#ifndef XCrystalCharacteristicArray_h
#define XCrystalCharacteristicArray_h
#include "XVCrystalCharacteristic.hh"
class XCrystalCharacteristicArray: public XVCrystalCharacteristic {
private:
std::vector<XVCrystalCharacteristic*> fCharacteristicVector;
protected:
public:
std::vector<XVCrystalCharacteristic*> GetCharacteristicVector();
virtual G4ThreeVector ComputeEC(G4ThreeVector,XPhysicalLattice*);
virtual G4ThreeVector ComputePositionInUnitCell(G4ThreeVector,
XPhysicalLattice*);
//Contructors
XCrystalCharacteristicArray();
~XCrystalCharacteristicArray();
};
#endif
@@ -0,0 +1,83 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
// --------------------------------------------------------------
//
#ifndef XCrystalIntegratedDensityHub_h
#define XCrystalIntegratedDensityHub_h
#include "XVCrystalCharacteristic.hh"
#include "XVCrystalIntegratedDensity.hh"
#include "G4ParticleDefinition.hh"
class XCrystalIntegratedDensityHub {
public:
void SetDensityElectron(XVCrystalCharacteristic*);
XVCrystalCharacteristic* GetDensityElectron();
void SetDensityNuclei(XVCrystalCharacteristic*);
XVCrystalCharacteristic* GetDensityNuclei();
void SetPotential(XVCrystalCharacteristic*);
XVCrystalCharacteristic* GetPotential();
void SetXPhysicalLattice(XPhysicalLattice*);
XPhysicalLattice* GetXPhysicalLattice();
void SetIntegratedDensityNuclei(XVCrystalIntegratedDensity*,G4int);
XVCrystalIntegratedDensity* GetIntegratedDensityNuclei(G4int);
void SetIntegratedDensityElectron(XVCrystalIntegratedDensity*,G4int);
XVCrystalIntegratedDensity* GetIntegratedDensityElectron(G4int);
void PrintOnFiles(const G4String&);
void ReadFromFiles(const G4String&);
G4bool HasBeenInitialized(XPhysicalLattice*);
G4double GetIntegratedDensityElectron(G4double,XPhysicalLattice*,G4int);
G4double GetIntegratedDensityNuclei(G4double,XPhysicalLattice*,G4int);
public:
void InitializeTables();
private:
XPhysicalLattice* fLattice;
XVCrystalCharacteristic* fDensityElectron;
XVCrystalCharacteristic* fDensityNuclei;
XVCrystalCharacteristic* fPotential;
XVCrystalIntegratedDensity* fIntDensElectronPositive;
XVCrystalIntegratedDensity* fIntDensNucleiPositive;
XVCrystalIntegratedDensity* fIntDensElectronNegative;
XVCrystalIntegratedDensity* fIntDensNucleiNegative;
public: //Contructors
XCrystalIntegratedDensityHub();
~XCrystalIntegratedDensityHub();
};
#endif
@@ -0,0 +1,43 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
// --------------------------------------------------------------
//
#ifndef XCrystalIntegratedDensityPlanar_h
#define XCrystalIntegratedDensityPlanar_h
#include "XVCrystalIntegratedDensity.hh"
class XCrystalIntegratedDensityPlanar : public XVCrystalIntegratedDensity{
protected:
virtual G4double ComputeIntegratedDensity(G4double,G4int);
public: //Contructors
XCrystalIntegratedDensityPlanar();
~XCrystalIntegratedDensityPlanar();
};
#endif
@@ -0,0 +1,47 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
// --------------------------------------------------------------
//
#ifndef XCrystalPlanarMoliereElectricField_h
#define XCrystalPlanarMoliereElectricField_h
#include "XVCrystalPlanarAnalytical.hh"
class XCrystalPlanarMoliereElectricField:public XVCrystalPlanarAnalytical {
private:
G4double fAlfa[3];
G4double fBeta[3];
public:
G4double ComputeECForSinglePlane(G4double,XPhysicalLattice*);
//Contructors
XCrystalPlanarMoliereElectricField();
~XCrystalPlanarMoliereElectricField();
};
#endif
@@ -0,0 +1,48 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
#ifndef XCrystalPlanarMoliereElectronDensity_h
#define XCrystalPlanarMoliereElectronDensity_h
#include "XVCrystalPlanarAnalytical.hh"
class XCrystalPlanarMoliereElectronDensity:public XVCrystalPlanarAnalytical {
private:
G4double fAlfa[3];
G4double fBeta[3];
public:
G4double ComputeECForSinglePlane(G4double,XPhysicalLattice*);
//Contructors
XCrystalPlanarMoliereElectronDensity();
~XCrystalPlanarMoliereElectronDensity();
};
#endif
@@ -0,0 +1,50 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
#ifndef XCrystalPlanarMolierePotential_h
#define XCrystalPlanarMolierePotential_h
#include "XVCrystalPlanarAnalytical.hh"
class XCrystalPlanarMolierePotential:public XVCrystalPlanarAnalytical {
private:
G4double fAlfa[3];
G4double fBeta[3];
public:
G4double ComputeECForSinglePlane(G4double,XPhysicalLattice*);
G4double ComputeMaximum(XPhysicalLattice*);
G4double ComputeMinimum(XPhysicalLattice*);
//Contructors
XCrystalPlanarMolierePotential();
~XCrystalPlanarMolierePotential();
};
#endif
@@ -0,0 +1,51 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
#ifndef XCrystalPlanarMoliereTempPotential_h
#define XCrystalPlanarMoliereTempPotential_h
#include "XVCrystalPlanarAnalytical.hh"
class XCrystalPlanarMoliereTempPotential:public XVCrystalPlanarAnalytical {
private:
G4double fAlfa[3];
G4double fBeta[3];
G4double fGamma[3];
public:
G4double ComputeECForSinglePlane(G4double,XPhysicalLattice*);
G4double ComputeMaximum(XPhysicalLattice*);
G4double ComputeMinimum(XPhysicalLattice*);
//Contructors
XCrystalPlanarMoliereTempPotential();
~XCrystalPlanarMoliereTempPotential();
};
#endif
@@ -0,0 +1,45 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
#ifndef XCrystalPlanarNucleiDensity_h
#define XCrystalPlanarNucleiDensity_h
#include "XVCrystalPlanarAnalytical.hh"
class XCrystalPlanarNucleiDensity:public XVCrystalPlanarAnalytical {
private:
public:
G4double ComputeECForSinglePlane(G4double,XPhysicalLattice*);
//Contructors
XCrystalPlanarNucleiDensity();
~XCrystalPlanarNucleiDensity();
};
#endif
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef XLatticeManager3_h
#define XLatticeManager3_h 1
#define MAXLAT 10 //maximum number of different crystal lattices supported
#include "G4ThreeVector.hh"
#include "XPhysicalLattice.hh"
class XLatticeManager3
{
private:
static XLatticeManager3* LM;
protected:
XLatticeManager3();
~XLatticeManager3();
XPhysicalLattice* fLatticeList[MAXLAT];
int fTotalLattices;
public:
static XLatticeManager3* GetXLatticeManager();
XPhysicalLattice* GetXPhysicalLattice(G4VPhysicalVolume*);
bool RegisterLattice(XPhysicalLattice*);
bool HasLattice(G4VPhysicalVolume*);
double MapKtoV(G4VPhysicalVolume*,int,const G4ThreeVector &);
G4ThreeVector MapKtoVDir(G4VPhysicalVolume*,int,const G4ThreeVector &);
};
#endif
@@ -0,0 +1,69 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef XLogicalAtomicLattice_h
#define XLogicalAtomicLattice_h
#include <iostream>
#include <fstream>
#include <string>
#include "G4ThreeVector.hh"
#ifndef MAXLATTICEATOMS
#define MAXLATTICEATOMS 64
#endif
using namespace std;
class XLogicalAtomicLattice{
private:
// position of the atoms are saved in unit cell system, i.e MIN 0. & MAX 1.
G4ThreeVector fLatticeAtomPosition[MAXLATTICEATOMS];
G4int fLatticeAtomNumber;
public:
void InitializeXLogicalAtomicLattice();
// Get methods
G4ThreeVector GetAtomPosition(G4int i);
G4int GetLatticeNumberOfAtoms();
// Set methods
void AddAtom(G4ThreeVector);
void DeleteAtom(G4ThreeVector);
// Calculation methods
// ints == Miller indexes
G4complex ComputeGeometricalStructureFactorSingleKind(G4int,G4int,G4int);
// Definition methods
XLogicalAtomicLattice();
~XLogicalAtomicLattice();
};
#endif
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef XLogicalAtomicLatticeDiamond_h
#define XLogicalAtomicLatticeDiamond_h
#include <iostream>
#include <fstream>
#include <string>
#include "G4ThreeVector.hh"
#include "XLogicalAtomicLattice.hh"
using namespace std;
class XLogicalAtomicLatticeDiamond: public XLogicalAtomicLattice
{
private:
void InitializeXLogicalAtomicLatticeDiamond();
public:
XLogicalAtomicLatticeDiamond();
~XLogicalAtomicLatticeDiamond();
};
#endif
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef XLogicalAtomicLatticeSingleAtom_h
#define XLogicalAtomicLatticeSingleAtom_h
#include <iostream>
#include <fstream>
#include <string>
#include "G4ThreeVector.hh"
#include "XLogicalAtomicLattice.hh"
using namespace std;
class XLogicalAtomicLatticeSingleAtom: public XLogicalAtomicLattice
{
private:
void InitializeXLogicalAtomicLatticeSingleAtom();
public:
XLogicalAtomicLatticeSingleAtom();
~XLogicalAtomicLatticeSingleAtom();
};
#endif
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef XLogicalBase_h
#define XLogicalBase_h
#include <iostream>
#include <fstream>
#include <string>
#include "G4ThreeVector.hh"
#include "XLogicalAtomicLattice.hh"
#include "G4Element.hh"
using namespace std;
class XLogicalBase{
private:
XLogicalAtomicLattice* fLattice;
G4Element* fElement;
public:
// Retrieval methods
XLogicalAtomicLattice* GetLattice();
G4Element* GetElement();
// Set methods
void SetLattice(XLogicalAtomicLattice*);
void SetElement(G4Element*);
// Calculation methods
// ints == Miller indexes
virtual G4double ComputeAtomicFormFactor();
//Kittel - chapter 2 Eq. (42) for single atomic kind
G4complex ComputeStructureFactorSingleAtomicKind(G4int,G4int,G4int);
//Kittel - chapter 2 Eq. (46) for single atomic kind
XLogicalBase(G4Element*,XLogicalAtomicLattice*);
XLogicalBase();
~XLogicalBase();
};
#endif
@@ -0,0 +1,100 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef XLogicalLattice_h
#define XLogicalLattice_h
#define MAXRES 322 //maximum one dimensional map resolution
#include <iostream>
#include <fstream>
#include <string>
#include "G4ThreeVector.hh"
using namespace std;
class XLogicalLattice{
private:
int fVresTheta; //velocity map theta resolution (inclination)
int fVresPhi; //velocity map phi resolution (azimuth)
int fDresTheta; //direction map theta resn
int fDresPhi; //direction map phi resn
double fMap[3][MAXRES][MAXRES]; //map for group velocity scalars
double fN_map[3][MAXRES][MAXRES][3];
//normalized map containing group V direction unit vectors
double fA; //Scaling constant for Anh.Dec. mean free path
double fB; //Scaling constant for Iso.Scat. mean free path
double fDosL; //Density of states for L-phonons
double fDosST; //Density of states for ST-phonons
double fDosFT; //Density of states for FT-phonons
double fBeta, fGamma, fLambda, fMu; //dynamical constants for material
ifstream fMapFile;
int fThetaRes, fPhiRes;
public:
XLogicalLattice();
~XLogicalLattice();
void SetDynamicalConstants(double, double, double, double);
void SetScatteringConstant(G4double);
void SetAnhDecConstant(G4double);
void SetLDOS(double);
void SetSTDOS(double);
void SetFTDOS(double);
double GetBeta();
double GetGamma();
double GetLambda();
double GetMu();
G4double GetScatteringConstant();
G4double GetAnhDecConstant();
double GetLDOS();
double GetSTDOS();
double GetFTDOS();
bool LoadMap(int, int, int, string);
bool Load_NMap(int, int, int, string);
double MapKtoV(int, G4ThreeVector); //Get full group velocity vector
G4ThreeVector MapKtoVDir(int, G4ThreeVector);
//Get normalized group velocity direction so that normalisatioon
//does not have to be done at run time
};
#endif
@@ -0,0 +1,120 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef XPhysicalLattice_h
#define XPhysicalLattice_h 1
#include "XLogicalLattice.hh"
#include "G4ThreeVector.hh"
#include "G4AffineTransform.hh"
#include "XUnitCell.hh"
class G4VPhysicalVolume;
class XPhysicalLattice{
private:
G4double fTheta, fPhi, fOmega;
XLogicalLattice* fLattice;
G4VPhysicalVolume* fVolume;
double fA; //Scaling constant for Anh.Dec. mean free path
double fB; //Scaling constant for Iso.Scat. mean free path
double fDosL; //Density of states for L-phonons
double fDosST; //Density of states for ST-phonons
double fDosFT; //Density of states for FT-phonons
double fBeta, fGamma, fLambda, fMu; //dynamical constants for material
public:
G4AffineTransform fLocalToGlobal;
G4AffineTransform fGlobalToLocal;
void SetDynamicalConstants(double, double, double, double);
void SetScatteringConstant(G4double);
void SetAnhDecConstant(G4double);
void SetLDOS(double);
void SetSTDOS(double);
void SetFTDOS(double);
double GetBeta();
double GetGamma();
double GetLambda();
double GetMu();
G4double GetScatteringConstant();
G4double GetAnhDecConstant();
double GetLDOS();
double GetSTDOS();
double GetFTDOS();
XPhysicalLattice();
XPhysicalLattice(G4VPhysicalVolume*, XLogicalLattice*);
~XPhysicalLattice();
double MapKtoV(int, G4ThreeVector);
G4ThreeVector MapKtoVDir(int, G4ThreeVector);
G4VPhysicalVolume* GetVolume();
void SetPhysicalVolume(G4VPhysicalVolume*);
void SetXLogicalLattice(XLogicalLattice*);
void SetLatticeOrientation(G4double, G4double);
void SetLatticeOrientation(G4double, G4double, G4double);
void SetMillerOrientation(int, int, int);
public:
//set methods
void SetUnitCell(XUnitCell*);
G4ThreeVector ProjectMomentumVectorFromWorldToLattice(G4ThreeVector,
G4ThreeVector);
G4ThreeVector ProjectMomentumVectorFromLatticeToWorld(G4ThreeVector,
G4ThreeVector);
G4ThreeVector GetLatticeDirection(G4ThreeVector);
//retrieval methods
XUnitCell* GetXUnitCell();
XLogicalLattice* GetLogicalLattice();
G4int GetMiller(G4int);
G4ThreeVector GetLatticeAngles();
G4ThreeVector GetCurvatureRadius();
void SetCurvatureRadius(G4ThreeVector);
G4ThreeVector ComputeBendingAngle(G4ThreeVector);
G4bool IsBent();
//general functions
G4double ComputeInterplanarPeriod();
void SetThermalVibrationAmplitude(G4double);
G4double GetThermalVibrationAmplitude();
private:
G4ThreeVector fCurvatureRadius;
G4double fThermalVibrationAmplitude; // TO BE MOVED TO XLogicalLattice
G4int fMillerOrientation[3];
XUnitCell* fUnitCell;
};
#endif
@@ -0,0 +1,94 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef XUnitCell_h
#define XUnitCell_h
#include <iostream>
#include <fstream>
#include <string>
#include "G4ThreeVector.hh"
#include "XLogicalAtomicLattice.hh"
#include "XLogicalAtomicLatticeDiamond.hh"
#include "XLogicalBase.hh"
#define MAXBASENUMBER 32
using namespace std;
class XUnitCell{
private:
G4int fNumberOfBases;
XLogicalBase* fBase[MAXBASENUMBER];
G4ThreeVector fSize;
G4ThreeVector fAngle;
public:
//Retrieval methods
G4ThreeVector GetSize();
G4ThreeVector GetAngle();
XLogicalBase* GetBase(G4int);
//Set methods
void SetSize(G4ThreeVector);
void SetAngle(G4ThreeVector);
void SetBase(G4int,XLogicalBase*);
void AddBase(XLogicalBase*);
//Calculation methods
G4double ComputeVolume();
G4double ComputeMillerOverSizeSquared(G4int,G4int,G4int);
G4double ComputeMillerPerSizeSquared(G4int,G4int,G4int);
G4double ComputeReciprocalVectorSquared(G4int,G4int,G4int);
G4double ComputeReciprocalVector(G4int,G4int,G4int);
G4double ComputeDirectVectorSquared(G4int,G4int,G4int);
G4double ComputeDirectVector(G4int,G4int,G4int);
G4double ComputeDirectPeriodSquared(G4int,G4int,G4int);
G4double ComputeDirectPeriod(G4int,G4int,G4int);
G4double ComputeAtomVolumeDensity();
G4complex ComputeStructureFactor(G4int,G4int,G4int);
//Kittel - chapter 2 Eq. (46)
//Check method
G4bool IsOrthogonal();
G4bool IsCubic();
//Contructors
XUnitCell();
~XUnitCell();
};
#endif
@@ -0,0 +1,83 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef XVCrystalCharacteristic_h
#define XVCrystalCharacteristic_h
#include "XLatticeManager3.hh"
#include "G4Track.hh"
#include "G4PhysicsVector.hh"
class XVCrystalCharacteristic {
private:
XLatticeManager3* fLatticeManager;
protected:
G4double fMaximum;
G4double fMinimum;
XPhysicalLattice *fPhysicalLattice;
G4PhysicsVector* fVectorEC;
public:
//retrieval functions
XPhysicalLattice* GetXPhysicalLattice(G4VPhysicalVolume*);
XUnitCell* GetXUnitCell(G4VPhysicalVolume*);
XLogicalLattice* GetLogicalLattice(G4VPhysicalVolume*);
void InitializePhysicalLattice(XPhysicalLattice*);
//virtual function to compute value starting from the point in the xtal
//reference frame and the physical volume of the xtal
G4ThreeVector GetEC(G4ThreeVector,XPhysicalLattice*);
virtual G4ThreeVector ComputeEC(G4ThreeVector,XPhysicalLattice*) = 0;
virtual G4ThreeVector ComputeECFromVector(G4ThreeVector) = 0;
virtual G4ThreeVector ComputePositionInUnitCell(G4ThreeVector,
XPhysicalLattice*);
virtual G4double ComputeTFScreeningRadius(XPhysicalLattice*);
virtual G4double GetMaximum(XPhysicalLattice*);
virtual G4double GetMinimum(XPhysicalLattice*);
virtual G4double ComputeMaximum(XPhysicalLattice*);
virtual G4double ComputeMinimum(XPhysicalLattice*);
virtual void PrintOnFile(const G4String&,XPhysicalLattice*,
G4double = 1) = 0;
virtual void ReadFromFile(const G4String&,XPhysicalLattice*,
G4double = 1) = 0;
virtual void ReadFromECHARM(const G4String&,
G4double = 1) = 0;
G4bool IsInitialized(XPhysicalLattice*);
virtual void InitializeVector() = 0;
//Contructors
XVCrystalCharacteristic();
~XVCrystalCharacteristic();
};
#endif
@@ -0,0 +1,100 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef XVCrystalIntegratedDensity_h
#define XVCrystalIntegratedDensity_h
#include "XVCrystalCharacteristic.hh"
#include "G4PhysicsLinearVector.hh"
class XVCrystalIntegratedDensity {
public:
void SetIntegrationPoints(unsigned int,unsigned int);
unsigned int GetIntegrationPoints(unsigned int);
unsigned int GetIntegrationPoints();
void SetNumberOfPoints(unsigned int);
unsigned int GetNumberOfPoints();
void SetDensity(XVCrystalCharacteristic*);
XVCrystalCharacteristic* GetDensity();
void SetPotential(XVCrystalCharacteristic*);
XVCrystalCharacteristic* GetPotential();
void SetXPhysicalLattice(XPhysicalLattice*);
XPhysicalLattice* GetXPhysicalLattice();
void SetParticleCharge(G4int);
G4int GetParticleCharge();
void PrintOnFile(const G4String&);
void ReadFromFile(const G4String&);
G4bool HasBeenInitialized(XPhysicalLattice*,G4int);
G4double GetIntegratedDensity(G4double,XPhysicalLattice*,G4int);
protected:
G4double GetStep();
virtual void ComputePotentialParameters();
public:
virtual void InitializeTable();
protected:
virtual G4double ComputeIntegratedDensity(G4double,G4int);
G4double FindCatmullRomInterpolate(G4double &p0,
G4double &p1,
G4double &p2,
G4double &p3,
G4double &x);
private:
XPhysicalLattice* fLattice;
G4int fParticleCharge;
XVCrystalCharacteristic* fDensity;
XVCrystalCharacteristic* fPotential;
protected:
G4double fPotentialMinimum;
G4double fPotentialMaximum;
G4double fPotentialRange;
private:
G4PhysicsLinearVector* fTableVector;
unsigned int fNumberOfPoints;
unsigned int fIntegrationPoints[3];
public: //Contructors
XVCrystalIntegratedDensity();
~XVCrystalIntegratedDensity();
};
#endif
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef XVCrystalPlanarAnalytical_h
#define XVCrystalPlanarAnalytical_h
#include "XVCrystalCharacteristic.hh"
class XVCrystalPlanarAnalytical:public XVCrystalCharacteristic {
private:
G4int fNumberOfPlanes;
public:
//set function
void SetNumberOfPlanes(G4int);
//retrieval function
G4int GetNumberOfPlanes();
virtual G4double ComputeECForSinglePlane(G4double,XPhysicalLattice*) = 0;
// G4double = position in the channel
//virtual function of XVCrystalCharacteristic
G4ThreeVector ComputeEC(G4ThreeVector,XPhysicalLattice*);
G4ThreeVector ComputeECFromVector(G4ThreeVector);
G4ThreeVector ComputePositionInUnitCell(G4ThreeVector,XPhysicalLattice*);
//G4double = position in the channel; G4double& = interplanar distance
virtual G4double ComputeMaximum(XPhysicalLattice*);
virtual G4double ComputeMinimum(XPhysicalLattice*);
virtual void PrintOnFile(const G4String&,XPhysicalLattice*,G4double);
virtual void ReadFromFile(const G4String&,XPhysicalLattice*,G4double = 1);
virtual void ReadFromECHARM(const G4String&,G4double = 1);
void InitializeVector();
//Contructors
XVCrystalPlanarAnalytical();
~XVCrystalPlanarAnalytical();
};
#endif
@@ -0,0 +1,154 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef XWrapperContinuousDiscreteProcess_h
#define XWrapperContinuousDiscreteProcess_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "G4VContinuousDiscreteProcess.hh"
#include "ExExChParticleUserInfo.hh"
class G4Material;
class XWrapperContinuousDiscreteProcess : public G4VContinuousDiscreteProcess
{
public:
XWrapperContinuousDiscreteProcess(const G4String& processName
="XWrapperContinuousDiscreteProcess" );
XWrapperContinuousDiscreteProcess(const G4String& processName,
G4VContinuousDiscreteProcess*);
XWrapperContinuousDiscreteProcess(const G4String& processName,
G4ProcessType);
virtual ~XWrapperContinuousDiscreteProcess();
public:
void RegisterProcess(G4VContinuousDiscreteProcess*);
void RegisterProcess(G4VContinuousDiscreteProcess*,G4int);
G4VContinuousDiscreteProcess* GetRegisteredProcess()
{return fRegisteredProcess;};
G4double GetDensity(const G4Track&);
G4double GetDensityPreviousStep(const G4Track&);
void SetNucleiOrElectronFlag(G4int);
G4int GetNucleiOrElectronFlag();
private:
// hide assignment operator as private
XWrapperContinuousDiscreteProcess(XWrapperContinuousDiscreteProcess&);
XWrapperContinuousDiscreteProcess& operator=(
const XWrapperContinuousDiscreteProcess& right);
//private data members
G4int bNucleiOrElectronFlag;
//Decide whether to use nuclei (+1) or electron (-1)
//or both (0) density to change parameters
G4VContinuousDiscreteProcess* fRegisteredProcess;
const G4Step theStepCopy;
/////////////////////////////////////////////////////////
/////////////////// GEANT4 PROCESS METHODS //////////////
/////////////////////////////////////////////////////////
public:
// DO IT
virtual G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step& );
virtual G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step& );
// GPIL
virtual G4double PostStepGetPhysicalInteractionLength (
const G4Track&,
G4double,
G4ForceCondition*);
virtual G4double AlongStepGetPhysicalInteractionLength (
const G4Track&,
G4double,
G4double,
G4double&,
G4GPILSelection*);
// GENERAL
virtual void StartTracking(G4Track* aTrack);
virtual void EndTracking() {fRegisteredProcess->EndTracking();};
virtual void SetProcessManager(const G4ProcessManager* aPM)
{fRegisteredProcess->SetProcessManager(aPM);};
virtual const G4ProcessManager* GetProcessManager()
{return fRegisteredProcess->GetProcessManager();};
virtual void ResetNumberOfInteractionLengthLeft()
{fRegisteredProcess->ResetNumberOfInteractionLengthLeft();};
virtual void DumpInfo() const {fRegisteredProcess->DumpInfo();};
virtual void SetMasterProcess(G4VProcess* masterP) {
fRegisteredProcess->SetMasterProcess(
static_cast<XWrapperContinuousDiscreteProcess*>(masterP)
->fRegisteredProcess);
};
virtual void BuildWorkerPhysicsTable(const G4ParticleDefinition& aPD)
{fRegisteredProcess->BuildWorkerPhysicsTable(aPD);};
virtual void PrepareWorkerPhysicsTable(const G4ParticleDefinition& aPD)
{fRegisteredProcess->PrepareWorkerPhysicsTable(aPD);};
// PHYSICS TABLE
virtual G4bool IsApplicable(const G4ParticleDefinition& aPD)
{return fRegisteredProcess->IsApplicable(aPD);};
virtual void BuildPhysicsTable(const G4ParticleDefinition& aPD)
{fRegisteredProcess->BuildPhysicsTable(aPD);};
virtual void PreparePhysicsTable(const G4ParticleDefinition& aPD)
{fRegisteredProcess->PreparePhysicsTable(aPD);};
virtual G4bool StorePhysicsTable(const G4ParticleDefinition* aPD,
const G4String& aString,
G4bool aBool)
{return fRegisteredProcess->StorePhysicsTable(aPD,aString,aBool);};
virtual G4bool RetrievePhysicsTable(const G4ParticleDefinition* aPD,
const G4String& aString,
G4bool aBool)
{return fRegisteredProcess->RetrievePhysicsTable(aPD,aString,aBool);};
protected:
// MFP
virtual G4double GetMeanFreePath(const G4Track&,
G4double,
G4ForceCondition* );
protected:
virtual G4double GetContinuousStepLimit(const G4Track&,
G4double,
G4double,
G4double&);
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
};
#endif
@@ -0,0 +1,123 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef XWrapperDiscreteProcess_h
#define XWrapperDiscreteProcess_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "G4VDiscreteProcess.hh"
#include "ExExChParticleUserInfo.hh"
class G4Material;
class XWrapperDiscreteProcess : public G4VDiscreteProcess
{
public:
XWrapperDiscreteProcess(const G4String& processName =
"XWrapperDiscreteProcess" );
XWrapperDiscreteProcess(const G4String& , G4VDiscreteProcess*);
virtual ~XWrapperDiscreteProcess();
public:
void RegisterProcess(G4VDiscreteProcess*);
void RegisterProcess(G4VDiscreteProcess*,G4int);
G4double GetDensity(const G4Track&);
G4double GetDensityPreviousStep(const G4Track&);
void SetNucleiOrElectronFlag(G4int);
G4int GetNucleiOrElectronFlag();
private:
// hide assignment operator as private
XWrapperDiscreteProcess(XWrapperDiscreteProcess&);
XWrapperDiscreteProcess& operator=(const XWrapperDiscreteProcess&);
//private data members
///Decide whether to use nuclei (+1) or electron (-1) or both (0)
//density to change parameter
G4int bNucleiOrElectronFlag;
G4VDiscreteProcess* fRegisteredProcess;
/////////////////////////////////////////////////////////
/////////////////// GEANT4 PROCESS METHODS //////////////
/////////////////////////////////////////////////////////
public:
// DO IT
virtual G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step& );
// GPIL
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track&,
G4double, G4ForceCondition*);
// GENERAL
void StartTracking(G4Track*);
virtual G4bool IsApplicable(const G4ParticleDefinition&);
// PHYSICS TABLE
virtual void BuildPhysicsTable(const G4ParticleDefinition&);
virtual void PreparePhysicsTable(const G4ParticleDefinition&);
virtual G4bool StorePhysicsTable(const G4ParticleDefinition* , const G4String&, G4bool);
virtual G4bool RetrievePhysicsTable( const G4ParticleDefinition* ,const G4String&, G4bool);
protected:
// MFP
virtual G4double GetMeanFreePath(const G4Track&, G4double, G4ForceCondition* );
public:
virtual void EndTracking() {fRegisteredProcess->EndTracking();};
virtual void SetProcessManager(const G4ProcessManager* aPM)
{fRegisteredProcess->SetProcessManager(aPM);};
virtual const G4ProcessManager* GetProcessManager()
{return fRegisteredProcess->GetProcessManager();};
virtual void ResetNumberOfInteractionLengthLeft()
{fRegisteredProcess->ResetNumberOfInteractionLengthLeft();};
virtual void DumpInfo() const {fRegisteredProcess->DumpInfo();};
virtual void SetMasterProcess(G4VProcess* masterP){
fRegisteredProcess->SetMasterProcess(
static_cast<XWrapperDiscreteProcess*>(masterP)->fRegisteredProcess
);
};
virtual void BuildWorkerPhysicsTable(const G4ParticleDefinition& aPD)
{fRegisteredProcess->BuildWorkerPhysicsTable(aPD);};
virtual void PrepareWorkerPhysicsTable(const G4ParticleDefinition& aPD)
{fRegisteredProcess->PrepareWorkerPhysicsTable(aPD);};
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
};
#endif
@@ -0,0 +1,24 @@
#detector geometry
/xtal/setMaterial G4_Si
/xtal/setAngle 0. 0. 0. rad
/xtal/setSize 1.0 70. 1.94 mm
/xtal/setCellAngle 90. 90. 90. deg
/xtal/setCellSize 5.431 5.431 5.431 angstrom
/xtal/setCurvRadius 38.416 0. 0. m
/xtal/potfilename data/si110
#initialize run before stacking and primary generator actions
/run/initialize
#set gps properties
/gps/ene/mono 400. GeV
/gps/particle proton
/gps/ang/sigma_x 13.36E-6 rad
/gps/ang/sigma_y 11.25E-6 rad
#kill all secondaries produced
/mystack/KillAllSecondaries 1
#beam on
/run/beamOn 1000
@@ -0,0 +1,105 @@
//
// ********************************************************************
// * 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 "ExExChAntiBarionBuilder.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
// Wrapper
#include "XWrapperDiscreteProcess.hh"
ExExChAntiBarionBuilder::
ExExChAntiBarionBuilder(): wasActivated(false)
{
theAntiProtonInelastic=new G4AntiProtonInelasticProcess;
theAntiNeutronInelastic=new G4AntiNeutronInelasticProcess;
theAntiDeuteronInelastic=new G4AntiDeuteronInelasticProcess;
theAntiTritonInelastic=new G4AntiTritonInelasticProcess;
theAntiHe3Inelastic=new G4AntiHe3InelasticProcess;
theAntiAlphaInelastic=new G4AntiAlphaInelasticProcess;
}
ExExChAntiBarionBuilder::
~ExExChAntiBarionBuilder(){
delete theAntiProtonInelastic;
delete theAntiNeutronInelastic;
delete theAntiDeuteronInelastic;
delete theAntiTritonInelastic;
delete theAntiHe3Inelastic;
delete theAntiAlphaInelastic;
}
void ExExChAntiBarionBuilder::
Build()
{
wasActivated = true;
std::vector<G4VAntiBarionBuilder *>::iterator i;
for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
{
(*i)->Build(theAntiProtonInelastic);
(*i)->Build(theAntiNeutronInelastic);
(*i)->Build(theAntiDeuteronInelastic);
(*i)->Build(theAntiTritonInelastic);
(*i)->Build(theAntiHe3Inelastic);
(*i)->Build(theAntiAlphaInelastic);
}
G4ProcessManager * theProcMan;
theProcMan = G4AntiProton::AntiProton()->GetProcessManager();
XWrapperDiscreteProcess* theAntiProtonInelastic_wr =
new XWrapperDiscreteProcess();
theAntiProtonInelastic_wr->RegisterProcess(theAntiProtonInelastic,1);
theProcMan->AddDiscreteProcess(theAntiProtonInelastic_wr);
theProcMan = G4AntiNeutron::AntiNeutron()->GetProcessManager();
theProcMan->AddDiscreteProcess(theAntiNeutronInelastic);
theProcMan = G4AntiDeuteron::AntiDeuteron()->GetProcessManager();
XWrapperDiscreteProcess* theAntiDeuteronInelastic_wr =
new XWrapperDiscreteProcess();
theAntiDeuteronInelastic_wr->RegisterProcess(theAntiDeuteronInelastic,1);
theProcMan->AddDiscreteProcess(theAntiDeuteronInelastic_wr);
theProcMan = G4AntiTriton::AntiTriton()->GetProcessManager();
XWrapperDiscreteProcess* theAntiTritonInelastic_wr =
new XWrapperDiscreteProcess();
theAntiTritonInelastic_wr->RegisterProcess(theAntiTritonInelastic,1);
theProcMan->AddDiscreteProcess(theAntiTritonInelastic_wr);
theProcMan = G4AntiHe3::AntiHe3()->GetProcessManager();
XWrapperDiscreteProcess* theAntiHe3Inelastic_wr =
new XWrapperDiscreteProcess();
theAntiHe3Inelastic_wr->RegisterProcess(theAntiHe3Inelastic,1);
theProcMan->AddDiscreteProcess(theAntiHe3Inelastic_wr);
theProcMan = G4AntiAlpha::AntiAlpha()->GetProcessManager();
XWrapperDiscreteProcess* theAntiAlphaInelastic_wr =
new XWrapperDiscreteProcess();
theAntiAlphaInelastic_wr->RegisterProcess(theAntiAlphaInelastic,1);
theProcMan->AddDiscreteProcess(theAntiAlphaInelastic_wr);
}
@@ -0,0 +1,402 @@
//
// ********************************************************************
// * 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 "ExExChDetectorConstruction.hh"
#include "G4RunManager.hh"
#include "G4Material.hh"
#include "G4NistManager.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4UniformMagField.hh"
#include "G4SystemOfUnits.hh"
#include "G4PhysicalConstants.hh"
#include "G4GeometryManager.hh"
#include "G4PhysicalVolumeStore.hh"
#include "G4LogicalVolumeStore.hh"
#include "G4SolidStore.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "G4SDManager.hh"
#include "ExExChSensitiveDetector.hh"
#include "XLatticeManager3.hh"
#include "XLogicalAtomicLattice.hh"
#include "XLogicalAtomicLatticeDiamond.hh"
#include "XLogicalBase.hh"
#include "XUnitCell.hh"
#include "XCrystalPlanarMolierePotential.hh"
#include "XCrystalPlanarMoliereElectricField.hh"
#include "XCrystalPlanarNucleiDensity.hh"
#include "XCrystalPlanarMoliereElectronDensity.hh"
#include "XCrystalPlanarMoliereTempPotential.hh"
#include "XCrystalPlanarMoliereElectricField.hh"
#include "XCrystalPlanarNucleiDensity.hh"
#include "XCrystalPlanarMoliereElectronDensity.hh"
#include "XCrystalCharacteristicArray.hh"
#include "XCrystalIntegratedDensityPlanar.hh"
#include "XCrystalIntegratedDensityHub.hh"
#include "XCrystalIntegratedDensityHub.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChDetectorConstruction::ExExChDetectorConstruction():
fWorldLogic(0),fXtalLogic(0){
bXtal = true;
fXtalAngle = G4ThreeVector(0.,0.,0.);
fXtalSize = G4ThreeVector(1. * CLHEP::millimeter,
70. * CLHEP::millimeter,
1.94 * CLHEP::millimeter);
fXtalCurvatureRadius = G4ThreeVector(38.416 * CLHEP::meter,
0. * CLHEP::meter,
0. * CLHEP::meter);
fXtalCellSize = G4ThreeVector(5.431 * CLHEP::angstrom,
5.431 * CLHEP::angstrom,
5.431 * CLHEP::angstrom);
fXtalCellAngle = G4ThreeVector(90.*CLHEP::deg,
90.*CLHEP::deg,
90.*CLHEP::deg);
fXtalTVA = 0.075 * CLHEP::angstrom;
fXtalMiller = G4ThreeVector(2,2,0);
SetXtalMaterial("G4_Si");
fMessenger = new ExExChDetectorConstructionMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
ExExChDetectorConstruction::~ExExChDetectorConstruction(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
void ExExChDetectorConstruction::DefineMaterials(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VPhysicalVolume* ExExChDetectorConstruction::Construct(){
//** World **//
fWorldSizeXY = 20. * CLHEP::centimeter;
fWorldSizeZ = 2.2 * CLHEP::meter;
fWorldMaterial = G4NistManager::
Instance()->FindOrBuildMaterial("G4_Galactic");
fWorldSolid = new G4Box("World",
fWorldSizeXY/2.,
fWorldSizeXY/2.,
fWorldSizeZ/2.);
fWorldLogic = new G4LogicalVolume(fWorldSolid,
fWorldMaterial,
"World");
fWorldPhysical = new G4PVPlacement(0,
G4ThreeVector(),
fWorldLogic,
"World",
0,
false,
0);
//** SSD **//
G4Material* Si = G4NistManager::Instance()->FindOrBuildMaterial("G4_Si");
fSSDSize = G4ThreeVector(1.92 * CLHEP::centimeter,
1.92 * CLHEP::centimeter,
0.06 * CLHEP::centimeter); //
fSSD0XtalDistance = - 1.0 * CLHEP::meter;
fSSD1XtalDistance = - 0.01 * CLHEP::meter;
fSSD2XtalDistance = + 1.0 * CLHEP::meter;
fSSDSolid = new G4Box("SiSD",
fSSDSize.x()/2.,
fSSDSize.y()/2.,
fSSDSize.z()/2.);
fSSDLogic = new G4LogicalVolume(fSSDSolid,Si,"SiSD");
new G4PVPlacement(0,
G4ThreeVector(0.,0.,fSSD0XtalDistance),
fSSDLogic,"SiSD",
fWorldLogic,
false,
0);
new G4PVPlacement(0,
G4ThreeVector(0.,0.,fSSD1XtalDistance),
fSSDLogic,
"SiSD",
fWorldLogic,
false,
1);
new G4PVPlacement(0,
G4ThreeVector(0.,0.,fSSD2XtalDistance),
fSSDLogic,
"SiSD",
fWorldLogic,
false,2
);
#ifndef G4MULTITHREADED
G4String SDname;
G4VSensitiveDetector* telescope =
new ExExChSensitiveDetector(SDname="/telescope");
G4SDManager::GetSDMpointer()->AddNewDetector(telescope);
fSSDLogic->SetSensitiveDetector(telescope);
#endif
if(bXtal) ConstructXtalTarget();
return fWorldPhysical;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifdef G4MULTITHREADED
void ExExChDetectorConstruction::ConstructSDandField(){
G4String SDname;
G4VSensitiveDetector* telescope =
new ExExChSensitiveDetector(SDname="/telescope");
G4SDManager::GetSDMpointer()->AddNewDetector(telescope);
fSSDLogic->SetSensitiveDetector(telescope);
}
#else
void ExExChDetectorConstruction::ConstructSDandField(){
}
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChDetectorConstruction::ConstructXtalTarget(){
if(fXtalCurvatureRadius.x() != 0.){
double fXtalAngleOut =
fXtalAngle.y() + fXtalSize.z()/fXtalCurvatureRadius.x();
fXtalSolid = new G4Tubs("Target",
fXtalCurvatureRadius.x() - fXtalSize.x()/2,
fXtalCurvatureRadius.x() + fXtalSize.x()/2,
fXtalSize.y()/2.,
fXtalAngle.y(),
fXtalAngleOut);
}
else{
fXtalSolid = new G4Box("Target",
fXtalSize.x()/2.,
fXtalSize.y()/2.,
fXtalSize.z()/2.);
}
fXtalLogic = new G4LogicalVolume(fXtalSolid,fXtalMaterial,"Target");
G4RotationMatrix* vRotationMatrix =
new G4RotationMatrix; // Rotates X and Z axes only
if(fXtalCurvatureRadius.x() != 0.){
vRotationMatrix->rotateX(fXtalAngle.x()-CLHEP::pi*0.5);
vRotationMatrix->rotateY(fXtalAngle.y());
vRotationMatrix->rotateZ(fXtalAngle.z());
fXtalPhysical =
new G4PVPlacement(vRotationMatrix,
G4ThreeVector(-fXtalCurvatureRadius.x(),0.,0.),
fXtalLogic,"Target",
fWorldLogic,
false,
0);
}
else{
vRotationMatrix->rotateX(fXtalAngle.x());
vRotationMatrix->rotateY(fXtalAngle.y());
vRotationMatrix->rotateZ(fXtalAngle.z());
fXtalPhysical =
new G4PVPlacement(vRotationMatrix,
G4ThreeVector(0.,0.,0.),
fXtalLogic,"Target",
fWorldLogic,
false,
0);
}
//----------------------------------------
// Create XLogicalLattice
//----------------------------------------
XLogicalLattice* logicalLattice = new XLogicalLattice();
double vScatteringConstant =
3.67e-41*CLHEP::second*CLHEP::second*CLHEP::second;
logicalLattice->SetScatteringConstant(vScatteringConstant);
//----------------------------------------
// Create XLogicalBase
//----------------------------------------
XLogicalAtomicLatticeDiamond *diamond_lattice =
new XLogicalAtomicLatticeDiamond();
G4Element* element = G4NistManager::
Instance()->FindOrBuildElement(G4int(fXtalMaterial->GetZ()));
XLogicalBase *base = new XLogicalBase(element,diamond_lattice);
//----------------------------------------
// Create XUnitCell
//----------------------------------------
XUnitCell* myCell = new XUnitCell();
myCell->SetSize(fXtalCellSize);
myCell->AddBase(base);
//----------------------------------------
// Create XPhysicalLattice
//----------------------------------------
XPhysicalLattice* physicalLattice =
new XPhysicalLattice(fXtalPhysical, logicalLattice);
physicalLattice->SetUnitCell(myCell);
physicalLattice->SetMillerOrientation(G4int(fXtalMiller.x()),
G4int(fXtalMiller.y()),
G4int(fXtalMiller.z()));
physicalLattice->SetLatticeOrientation(fXtalAngle.x(),
fXtalAngle.y(),
fXtalAngle.z());
physicalLattice->SetThermalVibrationAmplitude(fXtalTVA);
physicalLattice->SetCurvatureRadius(fXtalCurvatureRadius);
//----------------------------------------
// Register XPhysicalLattice
//----------------------------------------
if(XLatticeManager3::
GetXLatticeManager()->GetXPhysicalLattice(fXtalPhysical)
!= physicalLattice){
XLatticeManager3::
GetXLatticeManager()->RegisterLattice(physicalLattice);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.
void ExExChDetectorConstruction::SetXtalMaterial(const G4String& name){
G4Material* vMaterial = G4Material::GetMaterial(name, false);
if(!vMaterial){
vMaterial = G4NistManager::Instance()->FindOrBuildMaterial(name);
}
if (vMaterial && vMaterial != fXtalMaterial) {
G4cout << "DetectorConstructor::SetXtalMaterial() - New Xtal Material: "
<< vMaterial->GetName() << G4endl;
fXtalMaterial = vMaterial;
if(fXtalLogic){
fXtalLogic->SetMaterial(vMaterial);
G4RunManager::GetRunManager()->PhysicsHasBeenModified();
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4String ExExChDetectorConstruction::GetXtalMaterial(){
if(fXtalMaterial) {
return fXtalMaterial->GetName();
}
return "";
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChDetectorConstruction::SetXtalCurvatureRadius(G4ThreeVector cr){
if(fXtalCurvatureRadius != cr) {
G4RunManager::GetRunManager()->GeometryHasBeenModified();
fXtalCurvatureRadius = cr;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChDetectorConstruction::SetXtalSize(G4ThreeVector size) {
if(fXtalSize != size) {
G4RunManager::GetRunManager()->GeometryHasBeenModified();
fXtalSize = size;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChDetectorConstruction::SetXtalAngle(G4ThreeVector angle) {
if(fXtalAngle != angle) {
G4RunManager::GetRunManager()->GeometryHasBeenModified();
fXtalAngle = angle;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChDetectorConstruction::SetXtalCellSize(G4ThreeVector cellsize) {
if(fXtalCellSize != cellsize) {
G4RunManager::GetRunManager()->GeometryHasBeenModified();
fXtalCellSize = cellsize;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChDetectorConstruction::SetXtalMiller(G4ThreeVector miller) {
if(fXtalMiller != miller) {
G4RunManager::GetRunManager()->GeometryHasBeenModified();
fXtalMiller = miller;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChDetectorConstruction::SetXtalCellAngle(
G4ThreeVector cellangle) {
if(fXtalCellAngle != cellangle) {
G4RunManager::GetRunManager()->GeometryHasBeenModified();
fXtalCellAngle = cellangle;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChDetectorConstruction::SetXtalThermalVibrationAmplitude(
G4double thermvibr) {
if(fXtalTVA != thermvibr) {
G4RunManager::GetRunManager()->GeometryHasBeenModified();
fXtalTVA = thermvibr;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..
@@ -0,0 +1,209 @@
//
// ********************************************************************
// * 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 "ExExChDetectorConstructionMessenger.hh"
#include "ExExChDetectorConstruction.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWith3VectorAndUnit.hh"
#include "G4UIcmdWith3Vector.hh"
#include "G4RunManager.hh"
#include "G4ios.hh"
ExExChDetectorConstructionMessenger::
ExExChDetectorConstructionMessenger(
ExExChDetectorConstruction* mpga)
:fTarget(mpga){
fMyXtalDirectory = new G4UIdirectory("/xtal/");
fMyXtalDirectory->SetGuidance("Xtal setup control commands.");
fXtalMaterialCmd = new G4UIcmdWithAString("/xtal/setMaterial",
this);
fXtalMaterialCmd->SetGuidance("Set Xtal material.");
fXtalMaterialCmd->SetParameterName("xMat",true);
fXtalMaterialCmd->SetDefaultValue("G4_Si");
fXtalCurvatureRadiusCmd =
new G4UIcmdWith3VectorAndUnit("/xtal/setCurvRadius",this);
fXtalCurvatureRadiusCmd->SetGuidance("Set Xtal curvature radius.");
fXtalCurvatureRadiusCmd->SetParameterName("xtalcrx",
"xtalcry",
"xtalcrz",
true);
fXtalCurvatureRadiusCmd->SetDefaultValue(G4ThreeVector(0.,0.,0.));
fXtalCurvatureRadiusCmd->SetDefaultUnit("m");
fXtalSizeCmd = new G4UIcmdWith3VectorAndUnit("/xtal/setSize",this);
fXtalSizeCmd->SetGuidance("Set Xtal size.");
fXtalSizeCmd->SetParameterName("xtalSizeX",
"xtalSizeY",
"xtalSizeZ",
true);
fXtalSizeCmd->SetDefaultValue(G4ThreeVector(6.,2.,6.));
fXtalSizeCmd->SetDefaultUnit("mm");
fXtalAngleCmd = new G4UIcmdWith3VectorAndUnit("/xtal/setAngle",this);
fXtalAngleCmd->SetGuidance("Set Xtal angles in the world.");
fXtalAngleCmd->SetParameterName("xtalAngleX",
"xtalAngleY",
"xtalAngleZ",
true);
fXtalAngleCmd->SetDefaultValue(G4ThreeVector(0.,0.,0.));
fXtalAngleCmd->SetDefaultUnit("rad");
fXtalCellSizeCmd = new G4UIcmdWith3VectorAndUnit("/xtal/setCellSize",this);
fXtalCellSizeCmd->SetGuidance("Set Xtal cell size.");
fXtalCellSizeCmd->SetParameterName("xtalCellSizeX",
"xtalCellSizeY",
"xtalCellSizeZ",
true);
fXtalCellSizeCmd->SetDefaultValue(G4ThreeVector(5.431,5.431,5.431));
fXtalCellSizeCmd->SetDefaultUnit("angstrom");
fXtalCellAngleCmd =
new G4UIcmdWith3VectorAndUnit("/xtal/setCellAngle",this);
fXtalCellAngleCmd->SetGuidance("Set Xtal cell angles in the world.");
fXtalCellAngleCmd->SetParameterName("xtalCellAngleX",
"xtalCellAngleY",
"xtalCellAngleZ",
true);
fXtalCellAngleCmd->SetDefaultValue(G4ThreeVector(90.,90.,90.));
fXtalCellAngleCmd->SetDefaultUnit("deg");
fXtalCellThermalVibration =
new G4UIcmdWithADoubleAndUnit("/xtal/setThermVibr",this);
fXtalCellThermalVibration->SetGuidance("Thermal vibration amplitude");
fXtalCellThermalVibration->SetParameterName("xtalThermVibr",true);
fXtalCellThermalVibration->SetDefaultValue(0.075);
fXtalCellThermalVibration->SetDefaultUnit("angstrom");
fXtalMillerCmd = new G4UIcmdWith3Vector("/xtal/setMiller",this);
fXtalMillerCmd->SetGuidance("Set Miller Indexes");
fXtalMillerCmd->SetParameterName("xtalMiller1",
"xtalMiller2",
"xtalMiller3",
true);
fXtalMillerCmd->SetDefaultValue(G4ThreeVector(2,2,0));
fAddXtal = new G4UIcmdWithAString("/addxtal",this);
fAddXtal->SetGuidance("Add Xtal.");
fAddXtal->SetParameterName("addxtal",true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExExChDetectorConstructionMessenger::
~ExExChDetectorConstructionMessenger(){
delete fXtalMaterialCmd;
delete fXtalMillerCmd;
delete fXtalCurvatureRadiusCmd;
delete fXtalSizeCmd;
delete fXtalAngleCmd;
delete fXtalCellSizeCmd;
delete fXtalCellAngleCmd;
delete fAddXtal;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExExChDetectorConstructionMessenger::SetNewValue(
G4UIcommand *command,
G4String newValue){
if(command==fXtalMaterialCmd ){
fTarget->SetXtalMaterial(newValue);
}
if(command==fXtalCurvatureRadiusCmd ){
fTarget->SetXtalCurvatureRadius(
fXtalCurvatureRadiusCmd->GetNew3VectorValue(newValue));
}
if(command==fXtalSizeCmd ){
fTarget->SetXtalSize(fXtalSizeCmd->GetNew3VectorValue(newValue));
}
if(command==fXtalAngleCmd ){
fTarget->SetXtalAngle(fXtalAngleCmd->GetNew3VectorValue(newValue));
}
if(command==fXtalCellSizeCmd ){
fTarget->SetXtalCellSize(
fXtalCellSizeCmd->GetNew3VectorValue(newValue));
}
if(command==fXtalCellAngleCmd ){
fTarget->SetXtalCellAngle(
fXtalCellAngleCmd->GetNew3VectorValue(newValue));
}
if(command==fXtalCellThermalVibration ){
fTarget->SetXtalThermalVibrationAmplitude(
fXtalCellThermalVibration->GetNewDoubleValue(newValue));
}
if(command==fXtalMillerCmd ){
fTarget->SetXtalMiller(fXtalMillerCmd->GetNew3VectorValue(newValue));
}
if(command==fAddXtal ){
fTarget->AddXtalTarget();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4String ExExChDetectorConstructionMessenger::GetCurrentValue(
G4UIcommand * command){
G4String cv;
if( command==fXtalMaterialCmd ){
cv = fTarget->GetXtalMaterial();
}
if( command==fXtalCurvatureRadiusCmd ){
cv = fXtalCurvatureRadiusCmd->ConvertToString(
fTarget->GetXtalCurvatureRadius(),"m");
}
if( command==fXtalSizeCmd ){
cv = fXtalSizeCmd->ConvertToString(fTarget->GetXtalSize(),"mm");
}
if( command==fXtalAngleCmd ){
cv = fXtalAngleCmd->ConvertToString(fTarget->GetXtalAngle(),"rad");
}
if( command==fXtalCellSizeCmd ){
cv = fXtalCellSizeCmd->ConvertToString(
fTarget->GetXtalCellSize(),"angstrom");
}
if( command==fXtalCellAngleCmd ){
cv = fXtalCellAngleCmd->ConvertToString(
fTarget->GetXtalCellAngle(),"deg");
}
if( command==fXtalCellThermalVibration ){
cv = fXtalCellThermalVibration->ConvertToString(
fTarget->GetXtalThermalVibrationAmplitude(),"angstrom");
}
if( command==fXtalMillerCmd ){
cv = fXtalMillerCmd->ConvertToString(fTarget->GetXtalMiller());
}
return cv;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,135 @@
//
// ********************************************************************
// * 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 "ExExChEventAction.hh"
#include "G4RunManager.hh"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4HCofThisEvent.hh"
#include "G4VHitsCollection.hh"
#include "G4TrajectoryContainer.hh"
#include "G4Trajectory.hh"
#include "G4VVisManager.hh"
#include "G4SDManager.hh"
#include "G4UImanager.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "ExExChSensitiveDetectorHit.hh"
#include "ExExChTrackingAction.hh"
#include "ExExChAnalysis.hh"
ExExChEventAction::ExExChEventAction()
{
fSD_ID = -1;
fVerboseLevel = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExExChEventAction::~ExExChEventAction(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExExChEventAction::BeginOfEventAction(const G4Event*){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExExChEventAction::EndOfEventAction(const G4Event* evt)
{
G4SDManager* SDman = G4SDManager::GetSDMpointer();
if(fSD_ID == -1) {
G4String sdName;
if(SDman->FindSensitiveDetector(sdName="telescope",0)){
fSD_ID = SDman->GetCollectionID(sdName="telescope/collection");
}
}
ExExChSensitiveDetectorHitsCollection* fSD = 0;
G4HCofThisEvent * HCE = evt->GetHCofThisEvent();
if(HCE)
{
if(fSD_ID != -1){
G4VHitsCollection* aHCSD = HCE->GetHC(fSD_ID);
fSD = (ExExChSensitiveDetectorHitsCollection*)(aHCSD);
}
}
G4ThreeVector SSDposition[3];
SSDposition[0]= G4ThreeVector(0.,0.,0.);
SSDposition[1]= G4ThreeVector(0.,0.,0.);
SSDposition[2]= G4ThreeVector(0.,0.,0.);
if(fSD)
{
int bTotalHits = 0;
int n_hit_sd = fSD->entries();
for(int i2=0;i2<3;i2++){
for(int i1=0;i1<n_hit_sd;i1++)
{
ExExChSensitiveDetectorHit* aHit = (*fSD)[i1];
if(aHit->GetLayerID()==i2) {
SSDposition[i2] = aHit->GetWorldPos();
bTotalHits++;
}
}
}
if(bTotalHits > 2){
double fAngXin = (SSDposition[1].x() - SSDposition[0].x());
fAngXin /= (SSDposition[1].z() - SSDposition[0].z());
double fAngYin = (SSDposition[1].y() - SSDposition[0].y());
fAngYin /= (SSDposition[1].z() - SSDposition[0].z());
double fPosXin = SSDposition[1].x();
double fPosYin = SSDposition[1].y();
double fAngXout = (SSDposition[2].x() - SSDposition[1].x());
fAngXout /= (SSDposition[2].z() - SSDposition[1].z());
double fAngYout = (SSDposition[2].y() - SSDposition[1].y());
fAngYout /= (SSDposition[2].z() - SSDposition[1].z());
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
analysisManager->FillNtupleDColumn(0, fAngXin * 1.E6 * CLHEP::rad);
analysisManager->FillNtupleDColumn(1, fAngYin * 1.E6 * CLHEP::rad);
analysisManager->FillNtupleDColumn(2, fPosXin / CLHEP::mm);
analysisManager->FillNtupleDColumn(3, fPosYin / CLHEP::mm);
analysisManager->FillNtupleDColumn(4, fAngXout * 1.E6 * CLHEP::rad);
analysisManager->FillNtupleDColumn(5, fAngYout * 1.E6 * CLHEP::rad);
analysisManager->AddNtupleRow();
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,250 @@
//
// ********************************************************************
// * 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 "ExExChHadronElasticPhysics.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4HadronElasticProcess.hh"
#include "G4HadronElastic.hh"
#include "G4ChipsElasticModel.hh"
#include "G4ElasticHadrNucleusHE.hh"
#include "G4AntiNuclElastic.hh"
#include "G4BGGNucleonElasticXS.hh"
#include "G4BGGPionElasticXS.hh"
#include "G4NeutronElasticXS.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4ChipsProtonElasticXS.hh"
#include "G4ChipsNeutronElasticXS.hh"
#include "G4ComponentAntiNuclNuclearXS.hh"
#include "G4CrossSectionElastic.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
// Wrapper
#include "XWrapperDiscreteProcess.hh"
#include "XWrapperContinuousDiscreteProcess.hh"
G4_DECLARE_PHYSCONSTR_FACTORY(ExExChHadronElasticPhysics);
//
G4ThreadLocal G4bool ExExChHadronElasticPhysics::wasActivated = false;
G4ThreadLocal G4HadronElastic*
ExExChHadronElasticPhysics::neutronModel = 0;
G4ThreadLocal G4HadronicProcess*
ExExChHadronElasticPhysics::neutronProcess = 0;
ExExChHadronElasticPhysics::ExExChHadronElasticPhysics(G4int ver)
: G4VPhysicsConstructor("hElasticWEL_CHIPS"), verbose(ver)
{
if(verbose > 1) {
G4cout << "### ExExChHadronElasticPhysics: " << GetPhysicsName()
<< G4endl;
}
}
ExExChHadronElasticPhysics::~ExExChHadronElasticPhysics()
{}
void ExExChHadronElasticPhysics::ConstructParticle()
{
G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();
G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();
G4IonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void ExExChHadronElasticPhysics::ConstructProcess()
{
if(wasActivated) { return; }
wasActivated = true;
const G4double elimitPi = 1.0*GeV;
const G4double elimitAntiNuc = 100.*MeV;
const G4double delta = 0.1*MeV;
if(verbose > 1) {
G4cout << "### HadronElasticPhysics::ConstructProcess: Elimit for pi "
<< elimitPi/GeV << " GeV" << G4endl;
G4cout << " for anti-neuclei "
<< elimitAntiNuc/GeV << " GeV" << G4endl;
}
G4AntiNuclElastic* anuc = new G4AntiNuclElastic();
anuc->SetMinEnergy(elimitAntiNuc);
G4CrossSectionElastic* anucxs =
new G4CrossSectionElastic(anuc->GetComponentCrossSection());
G4HadronElastic* lhep0 = new G4HadronElastic();
G4HadronElastic* lhep1 = new G4HadronElastic();
G4HadronElastic* lhep2 = new G4HadronElastic();
lhep1->SetMaxEnergy(elimitPi+delta);
lhep2->SetMaxEnergy(elimitAntiNuc+delta);
G4ChipsElasticModel* chipsp = new G4ChipsElasticModel();
neutronModel = new G4ChipsElasticModel();
G4ElasticHadrNucleusHE* he = new G4ElasticHadrNucleusHE();
he->SetMinEnergy(elimitPi);
aParticleIterator->reset();
while( (*aParticleIterator)() )
{
G4ParticleDefinition* particle = aParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String pname = particle->GetParticleName();
if(pname == "anti_lambda" ||
pname == "anti_neutron" ||
pname == "anti_omega-" ||
pname == "anti_sigma-" ||
pname == "anti_sigma+" ||
pname == "anti_xi-" ||
pname == "anti_xi0" ||
pname == "lambda" ||
pname == "omega-" ||
pname == "sigma-" ||
pname == "sigma+" ||
pname == "xi-" ||
pname == "alpha" ||
pname == "deuteron" ||
pname == "triton"
) {
G4HadronElasticProcess* hel = new G4HadronElasticProcess();
hel->RegisterMe(lhep0);
XWrapperDiscreteProcess* hel_wrapper =
new XWrapperDiscreteProcess();
hel_wrapper->RegisterProcess(hel,1);
pmanager->AddDiscreteProcess(hel_wrapper);
if(verbose > 1) {
G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
<< " added for " << particle->GetParticleName() << G4endl;
}
} else if(pname == "proton") {
G4HadronElasticProcess* hel = new G4HadronElasticProcess();
hel->AddDataSet(G4CrossSectionDataSetRegistry::
Instance()->GetCrossSectionDataSet(
G4ChipsProtonElasticXS::Default_Name()));
hel->RegisterMe(chipsp);
XWrapperDiscreteProcess* hel_wrapper =
new XWrapperDiscreteProcess();
hel_wrapper->RegisterProcess(hel,1);
pmanager->AddDiscreteProcess(hel_wrapper);
if(verbose > 1) {
G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
<< " added for " << particle->GetParticleName() << G4endl;
}
} else if(pname == "neutron") {
neutronProcess = new G4HadronElasticProcess();
//neutronProcess->AddDataSet(new G4BGGNucleonElasticXS(particle));
neutronProcess->AddDataSet(
G4CrossSectionDataSetRegistry::
Instance()->GetCrossSectionDataSet(
G4ChipsNeutronElasticXS::Default_Name()));
neutronProcess->RegisterMe(neutronModel);
pmanager->AddDiscreteProcess(neutronProcess);
if(verbose > 1) {
G4cout << "### HadronElasticPhysics: "
<< neutronProcess->GetProcessName()
<< " added for " << particle->GetParticleName() << G4endl;
}
} else if (pname == "pi+" || pname == "pi-") {
G4HadronElasticProcess* hel = new G4HadronElasticProcess();
hel->AddDataSet(new G4BGGPionElasticXS(particle));
hel->RegisterMe(lhep1);
hel->RegisterMe(he);
XWrapperDiscreteProcess* hel_wrapper =
new XWrapperDiscreteProcess();
hel_wrapper->RegisterProcess(hel,1);
pmanager->AddDiscreteProcess(hel_wrapper);
if(verbose > 1) {
G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
<< " added for " << particle->GetParticleName() << G4endl;
}
} else if(pname == "kaon-" ||
pname == "kaon+" ||
pname == "kaon0S" ||
pname == "kaon0L"
) {
G4HadronElasticProcess* hel = new G4HadronElasticProcess();
hel->RegisterMe(lhep0);
XWrapperDiscreteProcess* hel_wrapper =
new XWrapperDiscreteProcess();
hel_wrapper->RegisterProcess(hel,1);
pmanager->AddDiscreteProcess(hel_wrapper);
if(verbose > 1) {
G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
<< " added for " << particle->GetParticleName() << G4endl;
}
} else if(
pname == "anti_proton" ||
pname == "anti_alpha" ||
pname == "anti_deuteron" ||
pname == "anti_triton" ||
pname == "anti_He3" ) {
G4HadronElasticProcess* hel = new G4HadronElasticProcess();
hel->AddDataSet(anucxs);
hel->RegisterMe(lhep2);
hel->RegisterMe(anuc);
XWrapperDiscreteProcess* hel_wrapper =
new XWrapperDiscreteProcess();
hel_wrapper->RegisterProcess(hel,1);
pmanager->AddDiscreteProcess(hel_wrapper);
}
}
}
@@ -0,0 +1,205 @@
//
// ********************************************************************
// * 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 <iomanip>
#include "ExExChHadronPhysicsQGSP_BIC.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4NeutronRadCapture.hh"
#include "G4NeutronInelasticXS.hh"
#include "G4NeutronCaptureXS.hh"
#include "G4PhysListUtil.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
G4_DECLARE_PHYSCONSTR_FACTORY(ExExChHadronPhysicsQGSP_BIC);
G4ThreadLocal ExExChHadronPhysicsQGSP_BIC::ThreadPrivate*
ExExChHadronPhysicsQGSP_BIC::tpdata = 0;
ExExChHadronPhysicsQGSP_BIC::ExExChHadronPhysicsQGSP_BIC(G4int)
: G4VPhysicsConstructor("hInelastic Xtal QGSP_BIC")
/* , theNeutrons(0)
, theFTFPNeutron(0)
, theQGSPNeutron(0)
, theBinaryNeutron(0)
, thePiK(0)
, theFTFPPiK(0)
, theQGSPPiK(0)
, theBertiniPiK(0)
, thePro(0)
, theFTFPPro(0)
, theQGSPPro(0)
, theBinaryPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
// , QuasiElastic(true)
{}
ExExChHadronPhysicsQGSP_BIC::ExExChHadronPhysicsQGSP_BIC(
const G4String& name, G4bool /* quasiElastic */)
: G4VPhysicsConstructor(name)
/* , theNeutrons(0)
, theFTFPNeutron(0)
, theQGSPNeutron(0)
, theBinaryNeutron(0)
, thePiK(0)
, theFTFPPiK(0)
, theQGSPPiK(0)
, theBertiniPiK(0)
, thePro(0)
, theFTFPPro(0)
, theQGSPPro(0)
, theBinaryPro(0)
, theHyperon(0)
, theAntiBaryon(0)
, theFTFPAntiBaryon(0)
, xsNeutronInelasticXS(0)
, xsNeutronCaptureXS(0)*/
// , QuasiElastic(quasiElastic)
{}
void ExExChHadronPhysicsQGSP_BIC::CreateModels()
{
G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
G4bool quasiElasticQGS= true; // For QGS, it must use it.
const G4double maxFTFP = 25.0*GeV;
const G4double minFTFP = 9.5*GeV;
const G4double maxBIC = 9.9*GeV;
const G4double maxBERT = 5.0*GeV;
tpdata->theNeutrons=new G4NeutronBuilder;
tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron =
new G4QGSPNeutronBuilder(quasiElasticQGS));
tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron =
new G4FTFPNeutronBuilder(quasiElasticFTF));
tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
tpdata->theNeutrons->RegisterMe(tpdata->theBinaryNeutron =
new G4BinaryNeutronBuilder);
tpdata->theBinaryNeutron->SetMaxEnergy(maxBIC);
tpdata->thePro=new ExExChProtonBuilder;
tpdata->thePro->RegisterMe(tpdata->theQGSPPro =
new G4QGSPProtonBuilder(quasiElasticQGS));
tpdata->thePro->RegisterMe(tpdata->theFTFPPro =
new G4FTFPProtonBuilder(quasiElasticFTF));
tpdata->theFTFPPro->SetMinEnergy(minFTFP);
tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
tpdata->thePro->RegisterMe(tpdata->theBinaryPro=new G4BinaryProtonBuilder);
tpdata->theBinaryPro->SetMaxEnergy(maxBIC);
tpdata->thePiK=new ExExChPiKBuilder;
tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK =
new G4QGSPPiKBuilder(quasiElasticQGS));
tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK =
new G4FTFPPiKBuilder(quasiElasticFTF));
tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK =
new G4BertiniPiKBuilder);
tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
tpdata->theHyperon=new ExExChHyperonFTFPBuilder;
tpdata->theAntiBaryon=new ExExChAntiBarionBuilder;
tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon =
new G4FTFPAntiBarionBuilder(quasiElasticFTF));
}
ExExChHadronPhysicsQGSP_BIC::~ExExChHadronPhysicsQGSP_BIC()
{
if(tpdata) delete tpdata;
}
void ExExChHadronPhysicsQGSP_BIC::ConstructParticle()
{
G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();
G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();
G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();
G4IonConstructor pIonConstructor;
pIonConstructor.ConstructParticle();
}
#include "G4ProcessManager.hh"
void ExExChHadronPhysicsQGSP_BIC::ConstructProcess()
{
if ( tpdata == 0 ) tpdata = new ThreadPrivate;
CreateModels();
tpdata->theNeutrons->Build();
tpdata->thePro->Build();
tpdata->thePiK->Build();
tpdata->theHyperon->Build();
tpdata->theAntiBaryon->Build();
// --- Neutrons ---
tpdata->xsNeutronInelasticXS = new G4NeutronInelasticXS();
G4PhysListUtil::FindInelasticProcess(
G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
G4HadronicProcess* capture = 0;
G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
G4ProcessVector* pv = pmanager->GetProcessList();
for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
capture = static_cast<G4HadronicProcess*>((*pv)[i]);
}
}
if ( ! capture ) {
capture = new G4HadronCaptureProcess("nCapture");
pmanager->AddDiscreteProcess(capture);
}
tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
capture->AddDataSet(tpdata->xsNeutronCaptureXS);
capture->RegisterMe(new G4NeutronRadCapture());
}
@@ -0,0 +1,252 @@
//
// ********************************************************************
// * 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 "ExExChHyperonFTFPBuilder.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
#include "G4CrossSectionDataSetRegistry.hh"
// Wrapper
#include "XWrapperDiscreteProcess.hh"
ExExChHyperonFTFPBuilder::ExExChHyperonFTFPBuilder():
theLambdaInelastic(0),
theAntiLambdaInelastic(0),
theSigmaMinusInelastic(0),
theAntiSigmaMinusInelastic(0),
theSigmaPlusInelastic(0),
theAntiSigmaPlusInelastic(0),
theXiZeroInelastic(0),
theAntiXiZeroInelastic(0),
theXiMinusInelastic(0),
theAntiXiMinusInelastic(0),
theOmegaMinusInelastic(0),
theAntiOmegaMinusInelastic(0),
wasActivated(false)
{
// Hyperon : Bertini at low energies, then FTFP
HyperonFTFP = new G4TheoFSGenerator("FTFP");
HyperonFTFP->SetMinEnergy( 2.*GeV );
HyperonFTFP->SetMaxEnergy( 100.*TeV );
theStringModel = new G4FTFModel;
theLund = new G4LundStringFragmentation;
theStringDecay = new G4ExcitedStringDecay(theLund);
theStringModel->SetFragmentationModel(theStringDecay);
theCascade = new G4GeneratorPrecompoundInterface;
theHandler =new G4ExcitationHandler;
thePreEquilib = new G4PreCompoundModel(theHandler);
theCascade->SetDeExcitation(thePreEquilib);
HyperonFTFP->SetTransport(theCascade);
HyperonFTFP->SetHighEnergyGenerator(theStringModel);
theBertini = new G4CascadeInterface;
theBertini->SetMinEnergy( 0.*GeV );
theBertini->SetMaxEnergy( 6.*GeV );
// AntiHyperons: Use FTFP for full energy range, starting at 0.
AntiHyperonFTFP = new G4TheoFSGenerator("FTFP");
AntiHyperonFTFP->SetMinEnergy( 0.*GeV );
AntiHyperonFTFP->SetMaxEnergy( 100.*TeV );
AntiHyperonFTFP->SetTransport(theCascade);
AntiHyperonFTFP->SetHighEnergyGenerator(theStringModel);
// use CHIPS cross sections
theCHIPSInelastic = G4CrossSectionDataSetRegistry::
Instance()->GetCrossSectionDataSet(
G4ChipsHyperonInelasticXS::Default_Name());
}
ExExChHyperonFTFPBuilder::~ExExChHyperonFTFPBuilder()
{
delete HyperonFTFP;
delete theStringModel;
delete theStringDecay;
delete theCascade;
delete thePreEquilib;
// delete theHandler;
delete theBertini;
delete AntiHyperonFTFP;
if (wasActivated) {
delete theLambdaInelastic;
delete theAntiLambdaInelastic;
delete theSigmaMinusInelastic;
delete theAntiSigmaMinusInelastic;
delete theSigmaPlusInelastic;
delete theAntiSigmaPlusInelastic;
delete theXiMinusInelastic;
delete theAntiXiMinusInelastic;
delete theXiZeroInelastic;
delete theAntiXiZeroInelastic;
delete theOmegaMinusInelastic;
delete theAntiOmegaMinusInelastic;
}
}
void ExExChHyperonFTFPBuilder::Build()
{
G4ProcessManager * aProcMan = 0;
wasActivated = true;
// Lambda
theLambdaInelastic = new G4LambdaInelasticProcess();
theLambdaInelastic->RegisterMe(theBertini);
theLambdaInelastic->RegisterMe(HyperonFTFP);
theLambdaInelastic->AddDataSet(theCHIPSInelastic);
aProcMan = G4Lambda::Lambda()->GetProcessManager();
aProcMan->AddDiscreteProcess(theLambdaInelastic);
// AntiLambda
theAntiLambdaInelastic = new G4AntiLambdaInelasticProcess();
theAntiLambdaInelastic->RegisterMe(AntiHyperonFTFP);
theAntiLambdaInelastic->AddDataSet(theCHIPSInelastic);
aProcMan = G4AntiLambda::AntiLambda()->GetProcessManager();
aProcMan->AddDiscreteProcess(theAntiLambdaInelastic);
// SigmaMinus
theSigmaMinusInelastic = new G4SigmaMinusInelasticProcess();
theSigmaMinusInelastic->RegisterMe(theBertini);
theSigmaMinusInelastic->RegisterMe(HyperonFTFP);
theSigmaMinusInelastic->AddDataSet(theCHIPSInelastic);
aProcMan = G4SigmaMinus::SigmaMinus()->GetProcessManager();
XWrapperDiscreteProcess* theSigmaMinusInelastic_w =
new XWrapperDiscreteProcess();
theSigmaMinusInelastic_w->RegisterProcess(theSigmaMinusInelastic,1);
aProcMan->AddDiscreteProcess(theSigmaMinusInelastic_w);
// anti-SigmaMinus
theAntiSigmaMinusInelastic = new G4AntiSigmaMinusInelasticProcess();
theAntiSigmaMinusInelastic->RegisterMe(AntiHyperonFTFP);
theAntiSigmaMinusInelastic->AddDataSet(theCHIPSInelastic);
aProcMan = G4AntiSigmaMinus::AntiSigmaMinus()->GetProcessManager();
XWrapperDiscreteProcess* theAntiSigmaMinusInelastic_w =
new XWrapperDiscreteProcess();
theAntiSigmaMinusInelastic_w->RegisterProcess(theAntiSigmaMinusInelastic,1);
aProcMan->AddDiscreteProcess(theAntiSigmaMinusInelastic_w);
// SigmaPlus
theSigmaPlusInelastic = new G4SigmaPlusInelasticProcess();
theSigmaPlusInelastic->RegisterMe(theBertini);
theSigmaPlusInelastic->RegisterMe(HyperonFTFP);
theSigmaPlusInelastic->AddDataSet(theCHIPSInelastic);
aProcMan = G4SigmaPlus::SigmaPlus()->GetProcessManager();
XWrapperDiscreteProcess* theSigmaPlusInelastic_w =
new XWrapperDiscreteProcess();
theSigmaPlusInelastic_w->RegisterProcess(theSigmaPlusInelastic,1);
aProcMan->AddDiscreteProcess(theSigmaPlusInelastic_w);
// anti-SigmaPlus
theAntiSigmaPlusInelastic = new G4AntiSigmaPlusInelasticProcess();
theAntiSigmaPlusInelastic->RegisterMe(AntiHyperonFTFP);
theAntiSigmaPlusInelastic->AddDataSet(theCHIPSInelastic);
aProcMan = G4AntiSigmaPlus::AntiSigmaPlus()->GetProcessManager();
XWrapperDiscreteProcess* theAntiSigmaPlusInelastic_w =
new XWrapperDiscreteProcess();
theAntiSigmaPlusInelastic_w->RegisterProcess(theAntiSigmaPlusInelastic,1);
aProcMan->AddDiscreteProcess(theAntiSigmaPlusInelastic_w);
// XiMinus
theXiMinusInelastic = new G4XiMinusInelasticProcess();
theXiMinusInelastic->RegisterMe(theBertini);
theXiMinusInelastic->RegisterMe(HyperonFTFP);
theXiMinusInelastic->AddDataSet(theCHIPSInelastic);
aProcMan = G4XiMinus::XiMinus()->GetProcessManager();
XWrapperDiscreteProcess* theXiMinusInelastic_w =
new XWrapperDiscreteProcess();
theXiMinusInelastic_w->RegisterProcess(theXiMinusInelastic,1);
aProcMan->AddDiscreteProcess(theXiMinusInelastic_w);
// anti-XiMinus
theAntiXiMinusInelastic = new G4AntiXiMinusInelasticProcess();
theAntiXiMinusInelastic->RegisterMe(AntiHyperonFTFP);
theAntiXiMinusInelastic->AddDataSet(theCHIPSInelastic);
aProcMan = G4AntiXiMinus::AntiXiMinus()->GetProcessManager();
XWrapperDiscreteProcess* theAntiXiMinusInelastic_w =
new XWrapperDiscreteProcess();
theAntiXiMinusInelastic_w->RegisterProcess(theAntiXiMinusInelastic,1);
aProcMan->AddDiscreteProcess(theAntiXiMinusInelastic_w);
// XiZero
theXiZeroInelastic = new G4XiZeroInelasticProcess();
theXiZeroInelastic->RegisterMe(theBertini);
theXiZeroInelastic->RegisterMe(HyperonFTFP);
theXiZeroInelastic->AddDataSet(theCHIPSInelastic);
aProcMan = G4XiZero::XiZero()->GetProcessManager();
aProcMan->AddDiscreteProcess(theXiZeroInelastic);
// anti-XiZero
theAntiXiZeroInelastic = new G4AntiXiZeroInelasticProcess();
theAntiXiZeroInelastic->RegisterMe(AntiHyperonFTFP);
theAntiXiZeroInelastic->AddDataSet(theCHIPSInelastic);
aProcMan = G4AntiXiZero::AntiXiZero()->GetProcessManager();
aProcMan->AddDiscreteProcess(theAntiXiZeroInelastic);
// OmegaMinus
theOmegaMinusInelastic = new G4OmegaMinusInelasticProcess();
theOmegaMinusInelastic->RegisterMe(theBertini);
theOmegaMinusInelastic->RegisterMe(HyperonFTFP);
theOmegaMinusInelastic->AddDataSet(theCHIPSInelastic);
aProcMan = G4OmegaMinus::OmegaMinus()->GetProcessManager();
XWrapperDiscreteProcess* theOmegaMinusInelastic_w =
new XWrapperDiscreteProcess();
theOmegaMinusInelastic_w->RegisterProcess(theOmegaMinusInelastic,1);
aProcMan->AddDiscreteProcess(theOmegaMinusInelastic_w);
// anti-OmegaMinus
theAntiOmegaMinusInelastic = new G4AntiOmegaMinusInelasticProcess();
theAntiOmegaMinusInelastic->RegisterMe(AntiHyperonFTFP);
theAntiOmegaMinusInelastic->AddDataSet(theCHIPSInelastic);
aProcMan = G4AntiOmegaMinus::AntiOmegaMinus()->GetProcessManager();
XWrapperDiscreteProcess* theAntiOmegaMinusInelastic_w =
new XWrapperDiscreteProcess();
theAntiOmegaMinusInelastic_w->RegisterProcess(theAntiOmegaMinusInelastic,1);
aProcMan->AddDiscreteProcess(theAntiOmegaMinusInelastic_w);
}
@@ -0,0 +1,169 @@
//
// ********************************************************************
// * 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 "ExExChIonPhysics.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4Deuteron.hh"
#include "G4Triton.hh"
#include "G4He3.hh"
#include "G4Alpha.hh"
#include "G4GenericIon.hh"
#include "G4IonConstructor.hh"
#include "G4HadronInelasticProcess.hh"
#include "G4BinaryLightIonReaction.hh"
#include "G4ComponentGGNuclNuclXsc.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4PreCompoundModel.hh"
#include "G4ExcitationHandler.hh"
#include "G4FTFBuilder.hh"
#include "G4HadronicInteraction.hh"
#include "G4BuilderType.hh"
using namespace std;
// factory
#include "G4PhysicsConstructorFactory.hh"
//
// Wrapper
#include "XWrapperDiscreteProcess.hh"
G4_DECLARE_PHYSCONSTR_FACTORY(ExExChIonPhysics);
G4ThreadLocal G4bool ExExChIonPhysics::wasActivated = false;
G4ThreadLocal G4BinaryLightIonReaction* ExExChIonPhysics::theIonBC = 0;
G4ThreadLocal G4HadronicInteraction* ExExChIonPhysics::theFTFP = 0;
G4ThreadLocal G4VCrossSectionDataSet*
ExExChIonPhysics::theNuclNuclData = 0;
G4ThreadLocal G4VComponentCrossSection*
ExExChIonPhysics::theGGNuclNuclXS = 0;
G4ThreadLocal G4FTFBuilder* ExExChIonPhysics::theBuilder;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChIonPhysics::ExExChIonPhysics(G4int ver)
: G4VPhysicsConstructor("ionInelasticFTFP_BIC"),verbose(ver)
{
SetPhysicsType(bIons);
if(verbose > 1) { G4cout << "### ExExChIonPhysics" << G4endl; }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChIonPhysics::ExExChIonPhysics(const G4String& nname)
: G4VPhysicsConstructor(nname),verbose(1)
{
SetPhysicsType(bIons);
if(verbose > 1) { G4cout << "### ExExChIonPhysics" << G4endl; }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChIonPhysics::~ExExChIonPhysics()
{
//Explictly setting pointers to zero is actually needed.
//These are static variables, in case we restart threads
//we need to re-create objects
delete theBuilder; theBuilder = 0;
delete theGGNuclNuclXS; theGGNuclNuclXS = 0;
delete theNuclNuclData; theNuclNuclData = 0;
delete theIonBC; theIonBC = 0;
delete theFTFP; theFTFP = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChIonPhysics::ConstructParticle()
{
// Construct ions
G4IonConstructor pConstructor;
pConstructor.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChIonPhysics::ConstructProcess()
{
if(wasActivated) { return; }
wasActivated = true;
G4double emax = 100.*TeV;
G4ExcitationHandler* handler = new G4ExcitationHandler();
G4PreCompoundModel* thePreCompound = new G4PreCompoundModel(handler);
// Binary Cascade
theIonBC = new G4BinaryLightIonReaction(thePreCompound);
theIonBC->SetMinEnergy(0.0);
theIonBC->SetMaxEnergy(4*GeV);
// FTFP
theBuilder = new G4FTFBuilder("FTFP",thePreCompound);
theFTFP = theBuilder->GetModel();
theFTFP->SetMinEnergy(2*GeV);
theFTFP->SetMaxEnergy(emax);
theGGNuclNuclXS = new G4ComponentGGNuclNuclXsc();
theNuclNuclData = new G4CrossSectionInelastic(theGGNuclNuclXS);
AddProcess("dInelastic", G4Deuteron::Deuteron(),false);
AddProcess("tInelastic",G4Triton::Triton(),false);
AddProcess("He3Inelastic",G4He3::He3(),true);
AddProcess("alphaInelastic", G4Alpha::Alpha(),true);
AddProcess("ionInelastic",G4GenericIon::GenericIon(),true);
if(verbose > 1) {
G4cout << "ExExChIonPhysics::ConstructProcess done! "
<< G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChIonPhysics::AddProcess(const G4String& name,
G4ParticleDefinition* part,
G4bool )//isIon)
{
G4HadronInelasticProcess* hadi = new G4HadronInelasticProcess(name, part);
G4ProcessManager* pManager = part->GetProcessManager();
hadi->AddDataSet(theNuclNuclData);
hadi->RegisterMe(theIonBC);
hadi->RegisterMe(theFTFP);
XWrapperDiscreteProcess* hadi_wrapper = new XWrapperDiscreteProcess();
hadi_wrapper->RegisterProcess(hadi,1);
pManager->AddDiscreteProcess(hadi_wrapper);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,171 @@
//
// ********************************************************************
// * 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 "ExExChParticleUserInfo.hh"
ExExChParticleUserInfo::ExExChParticleUserInfo(){
bHasBeenUnderCoherentEffect = 0;
fNucleiDensity = 1.0;
fNucleiDensityPreviousStep = 1.0;
fElectronDensity = 1.0;
fElectronDensityPreviousStep = 1.0;
fNumberOfDechanneling = 0;
fMomentumInChanneling = G4ThreeVector(0.,0.,0.);
fPositionInChanneling = G4ThreeVector(0.,0.,0.);
fMomentumInChannelingInitial = G4ThreeVector(DBL_MAX,DBL_MAX,DBL_MAX);
fPositionInChannelingInitial = G4ThreeVector(DBL_MAX,DBL_MAX,DBL_MAX);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChParticleUserInfo::~ExExChParticleUserInfo(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChParticleUserInfo::SetCoherentEffect(G4int flag){
bHasBeenUnderCoherentEffect = flag;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4int ExExChParticleUserInfo::HasBeenUnderCoherentEffect(){
return bHasBeenUnderCoherentEffect;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChParticleUserInfo::SetNucleiDensity(G4double density){
fNucleiDensity = density;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double ExExChParticleUserInfo::GetNucleiDensity(){
return fNucleiDensity;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChParticleUserInfo::SetElectronDensity(G4double density){
fElectronDensity = density;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double ExExChParticleUserInfo::GetElectronDensity(){
return fElectronDensity;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double ExExChParticleUserInfo::GetNucleiDensityPreviousStep(){
return fNucleiDensityPreviousStep;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double ExExChParticleUserInfo::GetElectronDensityPreviousStep(){
return fElectronDensityPreviousStep;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChParticleUserInfo::StoreDensityPreviousStep(){
fElectronDensityPreviousStep = fElectronDensity;
fNucleiDensityPreviousStep = fNucleiDensity;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4ThreeVector ExExChParticleUserInfo::GetMomentumChanneled(){
return fMomentumInChanneling;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChParticleUserInfo::SetMomentumChanneled(
G4ThreeVector momentum){
fMomentumInChanneling = momentum;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4ThreeVector ExExChParticleUserInfo::GetPositionChanneled(){
return fPositionInChanneling;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChParticleUserInfo::SetPositionChanneled(
G4ThreeVector position){
fPositionInChanneling = position;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4ThreeVector ExExChParticleUserInfo::GetMomentumChanneledInitial(){
return fMomentumInChannelingInitial;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChParticleUserInfo::SetMomentumChanneledInitial(
G4ThreeVector momentum){
fMomentumInChannelingInitial = momentum;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4ThreeVector ExExChParticleUserInfo::GetPositionChanneledInitial(){
return fPositionInChannelingInitial;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChParticleUserInfo::SetPositionChanneledInitial(
G4ThreeVector position){
fPositionInChannelingInitial = position;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4int ExExChParticleUserInfo::GetNumberOfDechanneling(){
return fNumberOfDechanneling;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChParticleUserInfo::IncreaseNumberOfDechanneling(){
fNumberOfDechanneling++;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,318 @@
//
// ********************************************************************
// * 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 "ExExChPhysListEmStandardSS.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4LossTableManager.hh"
#include "G4EmProcessOptions.hh"
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4RayleighScattering.hh"
#include "G4PEEffectFluoModel.hh"
#include "G4KleinNishinaModel.hh"
#include "G4LowEPComptonModel.hh"
#include "G4PenelopeGammaConversionModel.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4eMultipleScattering.hh"
#include "G4MuMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
#include "G4CoulombScattering.hh"
#include "G4eCoulombScatteringModel.hh"
#include "G4eSingleCoulombScatteringModel.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4Generator2BS.hh"
#include "G4SeltzerBergerModel.hh"
#include "G4PenelopeIonisationModel.hh"
#include "G4UniversalFluctuation.hh"
#include "G4eplusAnnihilation.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
#include "G4IonParametrisedLossModel.hh"
#include "G4PhysicsListHelper.hh"
#include "G4BuilderType.hh"
#include "G4ProcessManager.hh"
// Wrapper
#include "XWrapperDiscreteProcess.hh"
#include "XWrapperContinuousDiscreteProcess.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChPhysListEmStandardSS::ExExChPhysListEmStandardSS(
const G4String& name)
:G4VPhysicsConstructor(name){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChPhysListEmStandardSS::~ExExChPhysListEmStandardSS()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChPhysListEmStandardSS::ConstructProcess()
{
aParticleIterator->reset();
while( (*aParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
// Compton scattering
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel(),1);
G4VEmModel* theLowEPComptonModel = new G4LowEPComptonModel();
theLowEPComptonModel->SetHighEnergyLimit(20*MeV);
cs->AddEmModel(0, theLowEPComptonModel);
pmanager->AddDiscreteProcess(cs);
// Photoelectric
G4PhotoElectricEffect* pe = new G4PhotoElectricEffect();
G4VEmModel* theLivermorePEModel =
new G4LivermorePhotoElectricModel();
theLivermorePEModel->SetHighEnergyLimit(10*GeV);
pe->SetEmModel(theLivermorePEModel,1);
pmanager->AddDiscreteProcess(pe);
// Gamma conversion
G4GammaConversion* gc = new G4GammaConversion();
G4VEmModel* thePenelopeGCModel =
new G4PenelopeGammaConversionModel();
thePenelopeGCModel->SetHighEnergyLimit(1*GeV);
gc->SetEmModel(thePenelopeGCModel,1);
pmanager->AddDiscreteProcess(gc);
// Rayleigh scattering
pmanager->AddDiscreteProcess(new G4RayleighScattering());
} else if (particleName == "e-") {
// ionisation
G4eIonisation* eIoni = new G4eIonisation();
eIoni->SetStepFunction(0.2, 100*um);
G4VEmModel* theIoniPenelope = new G4PenelopeIonisationModel();
theIoniPenelope->SetHighEnergyLimit(0.1*MeV);
eIoni->AddEmModel(0, theIoniPenelope, new G4UniversalFluctuation());
XWrapperContinuousDiscreteProcess *eIoni_wrapper =
new XWrapperContinuousDiscreteProcess();
eIoni_wrapper->RegisterProcess(eIoni,-1);
pmanager->AddProcess(eIoni_wrapper,-1, 1, 1);
// bremsstrahlung
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
XWrapperContinuousDiscreteProcess *eBrem_wrapper =
new XWrapperContinuousDiscreteProcess();
eBrem_wrapper->RegisterProcess(eBrem,-1);
pmanager->AddProcess(eBrem_wrapper,-1, 2, 2);
// coulomb scattering
G4CoulombScattering* ecs = new G4CoulombScattering();
ecs->SetBuildTableFlag(false);
G4eSingleCoulombScatteringModel* ecsmodel =
new G4eSingleCoulombScatteringModel();
ecsmodel->SetPolarAngleLimit(0.0);
ecs->AddEmModel(0, ecsmodel);
XWrapperDiscreteProcess *ecs_wrapper =
new XWrapperDiscreteProcess();
ecs_wrapper->RegisterProcess(ecs,0);
pmanager->AddDiscreteProcess(ecs_wrapper);
} else if (particleName == "e+") {
// ionisation
G4eIonisation* eIoni = new G4eIonisation();
eIoni->SetStepFunction(0.2, 100*um);
G4VEmModel* theIoniPenelope = new G4PenelopeIonisationModel();
theIoniPenelope->SetHighEnergyLimit(0.1*MeV);
eIoni->AddEmModel(0, theIoniPenelope, new G4UniversalFluctuation());
XWrapperContinuousDiscreteProcess *eIoni_wrapper =
new XWrapperContinuousDiscreteProcess();
eIoni_wrapper->RegisterProcess(eIoni,-1);
pmanager->AddProcess(eIoni_wrapper,-1, 1, 1);
// bremsstrahlung
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
XWrapperContinuousDiscreteProcess *eBrem_wrapper =
new XWrapperContinuousDiscreteProcess();
eBrem_wrapper->RegisterProcess(eBrem,-1);
pmanager->AddProcess(eBrem_wrapper,-1, 2, 2);
// annihilation at rest and in flight
G4eplusAnnihilation* eplusAnn = new G4eplusAnnihilation();
XWrapperDiscreteProcess *eplusAnn_wrapper =
new XWrapperDiscreteProcess();
eplusAnn_wrapper->RegisterProcess(eplusAnn,-1);
pmanager->AddProcess(eplusAnn_wrapper);
// coulomb scattering
G4CoulombScattering* ecs = new G4CoulombScattering();
ecs->SetBuildTableFlag(false);
G4eSingleCoulombScatteringModel* ecsmodel =
new G4eSingleCoulombScatteringModel();
ecsmodel->SetPolarAngleLimit(0.0);
ecs->AddEmModel(0, ecsmodel);
XWrapperDiscreteProcess *ecs_wrapper =
new XWrapperDiscreteProcess();
ecs_wrapper->RegisterProcess(ecs,0);
pmanager->AddDiscreteProcess(ecs_wrapper,1);
} else if ((particleName == "mu+" ||
particleName == "mu-")) {
// ionisation
G4MuIonisation* muIoni = new G4MuIonisation();
muIoni->SetStepFunction(0.2, 50*um);
XWrapperContinuousDiscreteProcess *muIoni_wrapper =
new XWrapperContinuousDiscreteProcess();
muIoni_wrapper->RegisterProcess(muIoni,-1);
pmanager->AddProcess(muIoni_wrapper,-1, 1, 1);
// bremsstrahlung
G4MuBremsstrahlung* muBrem = new G4MuBremsstrahlung();
XWrapperContinuousDiscreteProcess *muBrem_wrapper =
new XWrapperContinuousDiscreteProcess();
muBrem_wrapper->RegisterProcess(muBrem,-1);
pmanager->AddProcess(muBrem_wrapper,-1, 2, 2);
// pair production
G4MuPairProduction* muPair = new G4MuPairProduction();
XWrapperContinuousDiscreteProcess* muPair_wrapper =
new XWrapperContinuousDiscreteProcess();
muPair_wrapper->RegisterProcess(muPair,-1);
pmanager->AddProcess(muPair_wrapper,-1, 3, 3);
// coulomb scattering
G4CoulombScattering* ecs = new G4CoulombScattering();
ecs->SetBuildTableFlag(false);
G4eCoulombScatteringModel* ecsmodel =
new G4eCoulombScatteringModel();
ecsmodel->SetPolarAngleLimit(0.0);
ecs->AddEmModel(0, ecsmodel);
XWrapperDiscreteProcess *ecs_wrapper =
new XWrapperDiscreteProcess();
ecs_wrapper->RegisterProcess(ecs,0);
pmanager->AddDiscreteProcess(ecs_wrapper);
} else if ((particleName == "alpha" || particleName == "He3") ) {
// ionisation
G4ionIonisation* ionIoni = new G4ionIonisation();
ionIoni->SetStepFunction(0.1, 10*um);
XWrapperContinuousDiscreteProcess *ionIoni_wrapper =
new XWrapperContinuousDiscreteProcess();
ionIoni_wrapper->RegisterProcess(ionIoni,-1);
pmanager->AddProcess(ionIoni_wrapper,-1, 1, 1);
// coulomb scattering
G4CoulombScattering* ecs = new G4CoulombScattering();
ecs->SetBuildTableFlag(false);
XWrapperDiscreteProcess *ecs_wrapper =
new XWrapperDiscreteProcess();
ecs_wrapper->RegisterProcess(ecs,0);
pmanager->AddDiscreteProcess(ecs_wrapper);
} else if (particleName == "GenericIon" ) {
// ionisation
G4ionIonisation* ionIoni = new G4ionIonisation();
ionIoni->SetStepFunction(0.1, 1*um);
XWrapperContinuousDiscreteProcess *ionIoni_wrapper =
new XWrapperContinuousDiscreteProcess();
ionIoni_wrapper->RegisterProcess(ionIoni,-1);
pmanager->AddProcess(ionIoni_wrapper,-1, 1, 1);
// coulomb scattering
G4CoulombScattering* ecs = new G4CoulombScattering();
ecs->SetBuildTableFlag(false);
XWrapperDiscreteProcess *ecs_wrapper =
new XWrapperDiscreteProcess();
ecs_wrapper->RegisterProcess(ecs,0);
pmanager->AddDiscreteProcess(ecs_wrapper);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino") ) {
//all others charged particles except geantino
// ionisation
G4hIonisation* hIoni = new G4hIonisation();
XWrapperContinuousDiscreteProcess *hIoni_wrapper =
new XWrapperContinuousDiscreteProcess();
hIoni_wrapper->RegisterProcess(hIoni,-1);
pmanager->AddProcess(hIoni_wrapper,-1, 1, 1);
// coulomb scattering
G4CoulombScattering* ecs = new G4CoulombScattering();
ecs->SetBuildTableFlag(false);
XWrapperDiscreteProcess *ecs_wrapper =
new XWrapperDiscreteProcess();
ecs_wrapper->RegisterProcess(ecs,0);
pmanager->AddDiscreteProcess(ecs_wrapper);
}
}
// Em options
//
// Main options and setting parameters are shown here.
// Several of them have default values.
//
G4EmProcessOptions emOptions;
//physics tables
//
emOptions.SetMinEnergy(10*eV);
emOptions.SetMaxEnergy(10*TeV);
emOptions.SetDEDXBinning(12*20);
emOptions.SetLambdaBinning(12*20);
// scattering
emOptions.SetPolarAngleLimit(0.0);
// Deexcitation
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
de->SetFluo(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,238 @@
//
// ********************************************************************
// * 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 "ExExChPhysicsList.hh"
// general
#include "globals.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
#include "G4ProcessManager.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessVector.hh"
#include "G4RunManager.hh"
// physics lists
#include "ExExChPhysListEmStandardSS.hh"
#include "G4DecayPhysics.hh"
#include "G4RadioactiveDecayPhysics.hh"
#include "ExExChHadronPhysicsQGSP_BIC.hh"
#include "ExExChHadronElasticPhysics.hh"
#include "G4StoppingPhysics.hh"
#include "ExExChIonPhysics.hh"
#include "G4NeutronTrackingCut.hh"
#include "G4EmExtraPhysics.hh"
// channeling
#include "ExExChProcessChanneling.hh"
#include "XVCrystalCharacteristic.hh"
#include "XVCrystalIntegratedDensity.hh"
#include "XCrystalPlanarMoliereTempPotential.hh"
#include "XCrystalPlanarMoliereElectricField.hh"
#include "XCrystalPlanarNucleiDensity.hh"
#include "XCrystalPlanarMoliereElectronDensity.hh"
#include "XCrystalCharacteristicArray.hh"
#include "XCrystalIntegratedDensityPlanar.hh"
#include "XCrystalIntegratedDensityHub.hh"
ExExChPhysicsList::ExExChPhysicsList(): G4VModularPhysicsList(){
fFilePotentialName = "";
fParticleList = new G4DecayPhysics();
fDecayList = new G4RadioactiveDecayPhysics();
fRaddecayList = new G4DecayPhysics();
fEmPhysicsList = new ExExChPhysListEmStandardSS();
fHadronInelasticPhysicsList = new ExExChHadronPhysicsQGSP_BIC();
fHadronElasticPhysicsList = new ExExChHadronElasticPhysics();
fStoppingPhysics = new G4StoppingPhysics();
fIonPhysics = new ExExChIonPhysics();
fNeutronTrackingCut = new G4NeutronTrackingCut();
fEmExtraPhysics = new G4EmExtraPhysics();
fMessenger = new ExExChPhysicsListMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChPhysicsList::~ExExChPhysicsList(){
delete fMessenger;
delete fEmPhysicsList;
delete fDecayList;
delete fRaddecayList;
delete fHadronElasticPhysicsList;
delete fHadronInelasticPhysicsList;
delete fStoppingPhysics;
delete fIonPhysics;
delete fNeutronTrackingCut;
delete fEmExtraPhysics;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChPhysicsList::ConstructProcess(){
AddTransportation();
fParticleList->ConstructProcess();
fEmPhysicsList->ConstructProcess();
fDecayList->ConstructProcess();
fRaddecayList->ConstructProcess();
fHadronElasticPhysicsList->ConstructProcess();
fHadronInelasticPhysicsList->ConstructProcess();
fStoppingPhysics->ConstructProcess();
fIonPhysics->ConstructProcess();
fNeutronTrackingCut->ConstructProcess();
fEmExtraPhysics->ConstructProcess();
AddChanneling();
G4cout << "### ExExChPhysicsList::ConstructProcess is done" << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChPhysicsList::ConstructParticle(){
fParticleList->ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChPhysicsList::AddChanneling(){
XVCrystalCharacteristic* vPotentialEnergy =
new XCrystalPlanarMoliereTempPotential();
XVCrystalCharacteristic* vElectricField =
new XCrystalPlanarMoliereElectricField();
XVCrystalCharacteristic* vNucleiDensity =
new XCrystalPlanarNucleiDensity();
XVCrystalCharacteristic* vElectronDensity =
new XCrystalPlanarMoliereElectronDensity();
XVCrystalIntegratedDensity* vIntegratedDensityNuclei =
new XCrystalIntegratedDensityPlanar();
vIntegratedDensityNuclei->SetPotential(vPotentialEnergy);
vIntegratedDensityNuclei->SetDensity(vNucleiDensity);
XVCrystalIntegratedDensity* vIntegratedDensityElectron =
new XCrystalIntegratedDensityPlanar();
vIntegratedDensityElectron->SetPotential(vPotentialEnergy);
vIntegratedDensityElectron->SetDensity(vElectronDensity);
XCrystalIntegratedDensityHub* vIntegratedDensityHub =
new XCrystalIntegratedDensityHub();
vIntegratedDensityHub->SetPotential(vPotentialEnergy);
vIntegratedDensityHub->SetDensityNuclei(vNucleiDensity);
vIntegratedDensityHub->SetDensityElectron(vElectronDensity);
for(G4int i=-3;i<=+3;i++){
if(i!=0){
vIntegratedDensityHub->SetIntegratedDensityNuclei(
new XCrystalIntegratedDensityPlanar(),i);
vIntegratedDensityHub->SetIntegratedDensityElectron(
new XCrystalIntegratedDensityPlanar(),i);
}
}
ExExChProcessChanneling* channeling =
new ExExChProcessChanneling();
channeling->SetPotential(vPotentialEnergy);
channeling->SetIntegratedDensity(vIntegratedDensityHub);
channeling->SetElectricField(vElectricField);
channeling->SetNucleiDensity(vNucleiDensity);
channeling->SetElectronDensity(vElectronDensity);
if(fFilePotentialName != ""){
channeling->SetFileCharacteristicsName(fFilePotentialName);
}
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pManager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if(particle->GetPDGCharge() != 0)
{
pManager->AddDiscreteProcess(channeling);
}
}
G4cout << "\nPhysicsList::AddChanneling: Channeling process added...\n";
G4cout << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExExChPhysicsList::SetCuts()
{
// These values are used as the default production thresholds
// for the world volume.
SetCutsWithDefault();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExExChPhysicsList::SetFilePotentialName(const G4String& vFilename){
if(fFilePotentialName != vFilename){
fFilePotentialName = vFilename;
G4RunManager::GetRunManager()->PhysicsHasBeenModified();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4String ExExChPhysicsList::GetFilePotentialName(){
return fFilePotentialName;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,72 @@
//
// ********************************************************************
// * 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 "ExExChPhysicsListMessenger.hh"
#include "ExExChPhysicsList.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithABool.hh"
#include "G4UIcmdWithAString.hh"
#include "G4ios.hh"
ExExChPhysicsListMessenger::ExExChPhysicsListMessenger(
ExExChPhysicsList * mpga)
:fTarget (mpga){
fMyDirectory = new G4UIdirectory("/xtal/");
fFilePotentialNameCmd = new G4UIcmdWithAString("/xtal/potfilename",this);
fFilePotentialNameCmd->SetGuidance("Filename for input potential vector.");
fFilePotentialNameCmd->SetParameterName("potfilename",true);
fFilePotentialNameCmd->SetDefaultValue("");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExExChPhysicsListMessenger::~ExExChPhysicsListMessenger(){
delete fFilePotentialNameCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExExChPhysicsListMessenger::SetNewValue(G4UIcommand * command,
G4String newValue){
if( command==fFilePotentialNameCmd ){
fTarget->SetFilePotentialName(newValue);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4String ExExChPhysicsListMessenger::GetCurrentValue(
G4UIcommand * command){
G4String cv;
if( command==fFilePotentialNameCmd ){
cv = fTarget->GetFilePotentialName();
}
return cv;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,102 @@
//
// ********************************************************************
// * 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 "ExExChPiKBuilder.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
// Wrapper
#include "XWrapperDiscreteProcess.hh"
ExExChPiKBuilder::
ExExChPiKBuilder(): wasActivated(false)
{
thePionPlusInelastic=new G4PionPlusInelasticProcess;
thePionMinusInelastic=new G4PionMinusInelasticProcess;
theKaonPlusInelastic=new G4KaonPlusInelasticProcess;
theKaonMinusInelastic=new G4KaonMinusInelasticProcess;
theKaonZeroLInelastic=new G4KaonZeroLInelasticProcess;
theKaonZeroSInelastic=new G4KaonZeroSInelasticProcess;
}
ExExChPiKBuilder::
~ExExChPiKBuilder(){
delete thePionPlusInelastic;
delete thePionMinusInelastic;
delete theKaonPlusInelastic;
delete theKaonMinusInelastic;
delete theKaonZeroLInelastic;
delete theKaonZeroSInelastic;
}
void ExExChPiKBuilder::
Build()
{
wasActivated = true;
std::vector<G4VPiKBuilder *>::iterator i;
for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
{
(*i)->Build(thePionPlusInelastic);
(*i)->Build(thePionMinusInelastic);
(*i)->Build(theKaonPlusInelastic);
(*i)->Build(theKaonMinusInelastic);
(*i)->Build(theKaonZeroLInelastic);
(*i)->Build(theKaonZeroSInelastic);
}
G4ProcessManager * theProcMan;
theProcMan = G4PionPlus::PionPlus()->GetProcessManager();
XWrapperDiscreteProcess* thePionPlusInelastic_wrapper =
new XWrapperDiscreteProcess();
thePionPlusInelastic_wrapper->RegisterProcess(thePionPlusInelastic,1);
theProcMan->AddDiscreteProcess(thePionPlusInelastic_wrapper);
theProcMan = G4PionMinus::PionMinus()->GetProcessManager();
XWrapperDiscreteProcess* thePionMinusInelastic_wrapper =
new XWrapperDiscreteProcess();
thePionMinusInelastic_wrapper->RegisterProcess(thePionMinusInelastic,1);
theProcMan->AddDiscreteProcess(thePionMinusInelastic_wrapper);
theProcMan = G4KaonPlus::KaonPlus()->GetProcessManager();
XWrapperDiscreteProcess* theKaonPlusInelastic_wrapper =
new XWrapperDiscreteProcess();
theKaonPlusInelastic_wrapper->RegisterProcess(theKaonPlusInelastic,1);
theProcMan->AddDiscreteProcess(theKaonPlusInelastic_wrapper);
theProcMan = G4KaonMinus::KaonMinus()->GetProcessManager();
XWrapperDiscreteProcess* theKaonMinusInelastic_wrapper =
new XWrapperDiscreteProcess();
theKaonMinusInelastic_wrapper->RegisterProcess(theKaonMinusInelastic,1);
theProcMan->AddDiscreteProcess(theKaonMinusInelastic_wrapper);
theProcMan = G4KaonZeroLong::KaonZeroLong()->GetProcessManager();
theProcMan->AddDiscreteProcess(theKaonZeroLInelastic);
theProcMan = G4KaonZeroShort::KaonZeroShort()->GetProcessManager();
theProcMan->AddDiscreteProcess(theKaonZeroSInelastic);
}
// 2002 by J.P. Wellisch
@@ -0,0 +1,86 @@
//
// ********************************************************************
// * 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 "ExExChPrimaryGeneratorAction.hh"
#include "G4RunManager.hh"
#include "G4Event.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "Randomize.hh"
#include "G4GeneralParticleSource.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChPrimaryGeneratorAction::ExExChPrimaryGeneratorAction()
{
fParticleGun = new G4GeneralParticleSource();
fParticleGun->SetParticleDefinition(G4ParticleTable::
GetParticleTable()->FindParticle("proton"));
// Position distribution
G4SPSPosDistribution *vPosDist =
fParticleGun->GetCurrentSource()->GetPosDist();
vPosDist->SetPosDisType("Beam");
vPosDist->SetPosDisShape("Circle");
vPosDist->SetCentreCoords(G4ThreeVector(0.,0.,-1.05 * CLHEP::meter));
vPosDist->SetBeamSigmaInR(0.0 * CLHEP::mm);
// Angular distribution
G4SPSAngDistribution *vAngDist =
fParticleGun->GetCurrentSource()->GetAngDist();
vAngDist->DefineAngRefAxes("angref1",G4ThreeVector(1.,0.,0));
vAngDist->DefineAngRefAxes("angref2",G4ThreeVector(0.,-1.,0));
vAngDist->SetAngDistType("beam2d");
vAngDist->SetBeamSigmaInAngX(13.36E-6 * CLHEP::rad);
vAngDist->SetBeamSigmaInAngY(11.25E-6 * CLHEP::rad);
// Energy distribution
G4SPSEneDistribution *vEneDist =
fParticleGun->GetCurrentSource()->GetEneDist();
vEneDist->SetEnergyDisType("Mono");
vEneDist->SetMonoEnergy(400. * CLHEP::GeV);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChPrimaryGeneratorAction::~ExExChPrimaryGeneratorAction(){
delete fParticleGun;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent){
fParticleGun->GeneratePrimaryVertex(anEvent);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,60 @@
//
// ********************************************************************
// * 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 "ExExChProtonBuilder.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
// Wrapper
#include "XWrapperDiscreteProcess.hh"
void ExExChProtonBuilder::Build()
{
wasActivated = true;
std::vector<G4VProtonBuilder *>::iterator i;
for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
{
(*i)->Build(theProtonInelastic);
}
G4ProcessManager * theProcMan = G4Proton::Proton()->GetProcessManager();
XWrapperDiscreteProcess* theProtonInelastic_wrapper =
new XWrapperDiscreteProcess();
theProtonInelastic_wrapper->RegisterProcess(theProtonInelastic,1);
theProcMan->AddDiscreteProcess(theProtonInelastic_wrapper);
}
ExExChProtonBuilder::
ExExChProtonBuilder(): wasActivated(false)
{
theProtonInelastic=new G4ProtonInelasticProcess;
}
ExExChProtonBuilder::
~ExExChProtonBuilder()
{
delete theProtonInelastic;
}
@@ -0,0 +1,83 @@
//
// ********************************************************************
// * 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 "ExExChRunAction.hh"
#include "G4Run.hh"
#include "G4RunManager.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
#include "ExExChAnalysis.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChRunAction::ExExChRunAction(): G4UserRunAction(){
G4RunManager::GetRunManager()->SetPrintProgress(1);
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
G4cout << "Using " << analysisManager->GetType() << G4endl;
// Create directories
analysisManager->SetVerboseLevel(1);
analysisManager->SetFirstHistoId(1);
// Creating ntuple
analysisManager->CreateNtuple("ExExChTree", "Angles and Positions");
analysisManager->CreateNtupleDColumn("angXin");
analysisManager->CreateNtupleDColumn("angYin");
analysisManager->CreateNtupleDColumn("posXin");
analysisManager->CreateNtupleDColumn("posYin");
analysisManager->CreateNtupleDColumn("angXout");
analysisManager->CreateNtupleDColumn("angYout");
analysisManager->FinishNtuple();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChRunAction::~ExExChRunAction(){
delete G4AnalysisManager::Instance();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChRunAction::BeginOfRunAction(const G4Run* /*run*/){
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
G4String fileName = "ExExCh";
analysisManager->OpenFile(fileName);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChRunAction::EndOfRunAction(const G4Run* /*run*/)
{
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
analysisManager->Write();
analysisManager->CloseFile();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,94 @@
//
// ********************************************************************
// * 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 "ExExChSensitiveDetector.hh"
#include "ExExChSensitiveDetectorHit.hh"
#include "G4HCofThisEvent.hh"
#include "G4TouchableHistory.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4SDManager.hh"
#include "G4Navigator.hh"
#include "G4ios.hh"
ExExChSensitiveDetector::ExExChSensitiveDetector(G4String name):
G4VSensitiveDetector(name){
G4String HCname;
collectionName.insert(HCname="collection");
fHCID = -1;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExExChSensitiveDetector::~ExExChSensitiveDetector(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExExChSensitiveDetector::Initialize(G4HCofThisEvent*HCE){
fHitsCollection =
new ExExChSensitiveDetectorHitsCollection(SensitiveDetectorName,
collectionName[0]);
if(fHCID<0){
fHCID = G4SDManager::GetSDMpointer()->GetCollectionID(fHitsCollection);
}
HCE->AddHitsCollection(fHCID,fHitsCollection);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool ExExChSensitiveDetector::ProcessHits(G4Step*aStep,
G4TouchableHistory*){
if(aStep->GetTrack()->GetTrackID()>1) return true;
G4StepPoint* postStepPoint = aStep->GetPostStepPoint();
if(!(postStepPoint->GetStepStatus() == fGeomBoundary)) return true;
G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
G4TouchableHistory* theTouchable =
(G4TouchableHistory*)(preStepPoint->GetTouchable());
G4VPhysicalVolume* thePhysical = theTouchable->GetVolume(0);
G4int copyNo = thePhysical->GetCopyNo();
G4ThreeVector worldPos = preStepPoint->GetPosition();
ExExChSensitiveDetectorHit* aHit =
new ExExChSensitiveDetectorHit(copyNo);
aHit->SetLayerID(copyNo);
aHit->SetWorldPos(worldPos);
fHitsCollection->insert(aHit);
return true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExExChSensitiveDetector::EndOfEvent(G4HCofThisEvent* /*HCE*/){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,149 @@
//
// ********************************************************************
// * 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 "ExExChSensitiveDetectorHit.hh"
#include "G4ios.hh"
#include "G4VVisManager.hh"
#include "G4Circle.hh"
#include "G4Colour.hh"
#include "G4AttDefStore.hh"
#include "G4AttDef.hh"
#include "G4AttValue.hh"
#include "G4UIcommand.hh"
#include "G4UnitsTable.hh"
#include "G4VisAttributes.hh"
#include "G4LogicalVolume.hh"
#include "G4SystemOfUnits.hh"
#ifdef G4MULTITHREADED
G4ThreadLocal G4Allocator<ExExChSensitiveDetectorHit>*
ExExChSensitiveDetectorHitAllocator = 0;
#else
G4Allocator<ExExChSensitiveDetectorHit>
ExExChSensitiveDetectorHitAllocator;
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExExChSensitiveDetectorHit::ExExChSensitiveDetectorHit(){
fLayerID = -1;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExExChSensitiveDetectorHit::ExExChSensitiveDetectorHit(G4int z){
fLayerID = z;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExExChSensitiveDetectorHit::~ExExChSensitiveDetectorHit(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExExChSensitiveDetectorHit::ExExChSensitiveDetectorHit(
const ExExChSensitiveDetectorHit &right): G4VHit(){
fLayerID = right.fLayerID;
fWorldPos = right.fWorldPos;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
const ExExChSensitiveDetectorHit&
ExExChSensitiveDetectorHit::operator=(
const ExExChSensitiveDetectorHit &right){
fLayerID = right.fLayerID;
fWorldPos = right.fWorldPos;
return *this;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
int ExExChSensitiveDetectorHit::operator==
(const ExExChSensitiveDetectorHit &/*right*/) const{
return 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExExChSensitiveDetectorHit::Draw(){
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
if(pVVisManager)
{
G4Circle circle(fWorldPos);
circle.SetScreenSize(2);
circle.SetFillStyle(G4Circle::filled);
G4Colour colour(1.,1.,0.);
G4VisAttributes attribs(colour);
circle.SetVisAttributes(attribs);
pVVisManager->Draw(circle);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
const std::map<G4String,G4AttDef>*
ExExChSensitiveDetectorHit::GetAttDefs() const{
G4bool isNew;
std::map<G4String,G4AttDef>* store =
G4AttDefStore::GetInstance("ExExChSensitiveDetectorHit",isNew);
if (isNew) {
G4String ID("ID");
(*store)[ID] = G4AttDef(ID,"ID","Physics","","G4int");
G4String Pos("Pos");
(*store)[Pos] =
G4AttDef(Pos, "Position","Physics","G4BestUnit","G4ThreeVector");
}
return store;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
std::vector<G4AttValue>*
ExExChSensitiveDetectorHit::CreateAttValues() const{
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
values->push_back(G4AttValue("ID",
G4UIcommand::ConvertToString(fLayerID),
""));
values->push_back(G4AttValue("Pos",G4BestUnit(fWorldPos,"Length"),""));
return values;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExExChSensitiveDetectorHit::Print(){
G4cout << fLayerID <<
"," << fWorldPos.x() <<
"," << fWorldPos.z() <<
"," << fWorldPos.y() << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,72 @@
//
// ********************************************************************
// * 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 "ExExChStackingAction.hh"
#include "ExExChStackingActionMessenger.hh"
#include "G4Track.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChStackingAction::ExExChStackingAction()
{
fStackMessenger = new ExExChStackingActionMessenger(this);
fKillSecondary = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChStackingAction::~ExExChStackingAction()
{
delete fStackMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4ClassificationOfNewTrack
ExExChStackingAction::ClassifyNewTrack(const G4Track* aTrack)
{
G4ClassificationOfNewTrack status = fUrgent;
if(fKillSecondary){
if(aTrack->GetTrackID()>1){
status = fKill;
}
}
return status;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChStackingAction::SetKillStatus(G4bool value)
{
fKillSecondary = value;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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 "ExExChStackingActionMessenger.hh"
#include "ExExChStackingAction.hh"
#include "G4UIcmdWithABool.hh"
#include "G4UIcmdWithAString.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChStackingActionMessenger::
ExExChStackingActionMessenger(ExExChStackingAction* stack)
:fStackAction(stack)
{
fKillAllSecondariesCmd =
new G4UIcmdWithABool("/mystack/KillAllSecondaries",this);
fKillAllSecondariesCmd->SetGuidance("Kill all secondary particles");
fKillAllSecondariesCmd->SetParameterName("killall",true);
fKillAllSecondariesCmd->SetDefaultValue(false);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChStackingActionMessenger::~ExExChStackingActionMessenger()
{
delete fKillAllSecondariesCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChStackingActionMessenger::SetNewValue(G4UIcommand* command,
G4String newValue)
{
if(command == fKillAllSecondariesCmd) {
fStackAction->SetKillStatus(
fKillAllSecondariesCmd->GetNewBoolValue(newValue));
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,56 @@
//
// ********************************************************************
// * 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 "ExExChTrackingAction.hh"
#include "G4TrackingManager.hh"
#include "G4Track.hh"
#include "G4TrackVector.hh"
#include "ExExChParticleUserInfo.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChTrackingAction::PreUserTrackingAction(const G4Track* aTrack){
ExExChParticleUserInfo *trackInfo(
static_cast< ExExChParticleUserInfo * >
(aTrack->GetUserInformation() ) );
if(trackInfo){
return;
}
else{
G4Track * theTrack( const_cast< G4Track * >( aTrack ) );
trackInfo = new ExExChParticleUserInfo();
theTrack->SetUserInformation( trackInfo );
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExExChTrackingAction::PostUserTrackingAction(const G4Track*){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifdef G4MULTITHREADED
#include "ExExChUserActionInitialization.hh"
#include "ExExChPrimaryGeneratorAction.hh"
#include "ExExChTrackingAction.hh"
#include "ExExChStackingAction.hh"
#include "ExExChEventAction.hh"
#include "ExExChRunAction.hh"
#include "G4GeneralParticleSource.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChUserActionInitialization::ExExChUserActionInitialization() {
//AND->3June2014, temporary to take into account new GPS
//Create an instance of GPS in master so shared resources and messenger
//exist in master.
masterGPS = new G4GeneralParticleSource();
//AND<-3June2014
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChUserActionInitialization::~ExExChUserActionInitialization() {
delete masterGPS;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChUserActionInitialization::Build() const {
SetUserAction(new ExExChPrimaryGeneratorAction());
SetUserAction(new ExExChEventAction());
SetUserAction(new ExExChStackingAction());
SetUserAction(new ExExChTrackingAction());
SetUserAction(new ExExChRunAction());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExExChUserActionInitialization::BuildForMaster() const {
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -0,0 +1,81 @@
//
// ********************************************************************
// * 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 "XCrystalCharacteristicArray.hh"
XCrystalCharacteristicArray::XCrystalCharacteristicArray(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XCrystalCharacteristicArray::~XCrystalCharacteristicArray(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ThreeVector XCrystalCharacteristicArray::
ComputeEC(G4ThreeVector vPosition,
XPhysicalLattice* vLattice){
G4ThreeVector vValue = G4ThreeVector(0.,0.,0.);
if(fCharacteristicVector.size()!=0){
for(unsigned int i=0;i<fCharacteristicVector.size();i++){
vValue += fCharacteristicVector.at(i)->GetEC(vPosition,vLattice);
}
return (vValue * G4double(1./G4double(fCharacteristicVector.size())));
}
return G4ThreeVector(DBL_MAX,DBL_MAX,DBL_MAX);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ThreeVector XCrystalCharacteristicArray::
ComputePositionInUnitCell(G4ThreeVector vPosition,
XPhysicalLattice*vLattice){
G4ThreeVector vPositionInTheCellPrevious = G4ThreeVector(0.,0.,0.);
G4ThreeVector vPositionInTheCell = G4ThreeVector(0.,0.,0.);
if(fCharacteristicVector.size()!=0){
for(unsigned int i=0;i<fCharacteristicVector.size();i++){
if(vPositionInTheCellPrevious != vPositionInTheCell){
return G4ThreeVector(DBL_MAX,DBL_MAX,DBL_MAX);
}
vPositionInTheCellPrevious = vPositionInTheCell;
vPositionInTheCell =
fCharacteristicVector.at(i)->ComputePositionInUnitCell(vPosition,
vLattice);
}
return vPositionInTheCell;
}
return G4ThreeVector(DBL_MAX,DBL_MAX,DBL_MAX);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,268 @@
//
// ********************************************************************
// * 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 "XCrystalIntegratedDensityHub.hh"
XCrystalIntegratedDensityHub::XCrystalIntegratedDensityHub(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XCrystalIntegratedDensityHub::~XCrystalIntegratedDensityHub(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XCrystalIntegratedDensityHub::SetPotential(
XVCrystalCharacteristic* vPotential){
fPotential = vPotential;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XVCrystalCharacteristic* XCrystalIntegratedDensityHub::GetPotential(){
return fPotential;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XCrystalIntegratedDensityHub::SetDensityElectron(
XVCrystalCharacteristic* vDensity){
fDensityElectron = vDensity;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XVCrystalCharacteristic* XCrystalIntegratedDensityHub::GetDensityElectron(){
return fDensityElectron;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XCrystalIntegratedDensityHub::SetDensityNuclei(
XVCrystalCharacteristic* vDensity){
fDensityNuclei = vDensity;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XVCrystalCharacteristic* XCrystalIntegratedDensityHub::GetDensityNuclei(){
return fDensityNuclei;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XCrystalIntegratedDensityHub::SetXPhysicalLattice(
XPhysicalLattice* vLattice){
fLattice = vLattice;
fDensityElectron->InitializePhysicalLattice(fLattice);
fDensityNuclei->InitializePhysicalLattice(fLattice);
fPotential->InitializePhysicalLattice(fLattice);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XPhysicalLattice* XCrystalIntegratedDensityHub::GetXPhysicalLattice(){
return fLattice;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XCrystalIntegratedDensityHub::SetIntegratedDensityNuclei(
XVCrystalIntegratedDensity* vDensity,
G4int vParticleCharge){
if(vParticleCharge < 0){
fIntDensNucleiNegative = vDensity;
}
else if(vParticleCharge > 0){
fIntDensNucleiPositive = vDensity;
}
else{
G4cout << "XCrystalIntegratedDensityHub:: ERROR - Charge == 0";
G4cout << G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XVCrystalIntegratedDensity* XCrystalIntegratedDensityHub::
GetIntegratedDensityNuclei(G4int vParticleCharge){
if(vParticleCharge < 0.){
return fIntDensNucleiNegative;
}
else if(vParticleCharge > 0.){
return fIntDensNucleiPositive;
}
else{
G4cout << "XCrystalIntegratedDensityHub:: ERROR - Charge == 0";
G4cout << G4endl;
return NULL;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XCrystalIntegratedDensityHub::SetIntegratedDensityElectron(
XVCrystalIntegratedDensity* vDensity,
G4int vParticleCharge){
if(vParticleCharge < 0){
fIntDensElectronNegative = vDensity;
}
else if(vParticleCharge > 0){
fIntDensElectronPositive = vDensity;
}
else{
G4cout << "XCrystalIntegratedDensityHub:: ERROR - Charge == 0";
G4cout << G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XVCrystalIntegratedDensity* XCrystalIntegratedDensityHub::
GetIntegratedDensityElectron(G4int vParticleCharge){
if(vParticleCharge < 0.){
return fIntDensElectronNegative;
}
else if(vParticleCharge > 0.){
return fIntDensElectronPositive;
}
else{
G4cout << "XCrystalIntegratedDensityHub:: ERROR - Charge == 0" ;
G4cout << G4endl;
return NULL;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool XCrystalIntegratedDensityHub::HasBeenInitialized(
XPhysicalLattice* vLattice){
//now it checks only of the table is initialized,
//it does not check if the particular crystal is initialized.
//To be changed in the future!
if(vLattice != GetXPhysicalLattice()) return false;
else return true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XCrystalIntegratedDensityHub::InitializeTables(){
fIntDensElectronNegative->SetPotential(fPotential);
fIntDensElectronNegative->SetDensity(fDensityElectron);
fIntDensElectronNegative->SetXPhysicalLattice(fLattice);
fIntDensElectronNegative->SetParticleCharge(-1);
fIntDensElectronNegative->InitializeTable();
fIntDensElectronPositive->SetPotential(fPotential);
fIntDensElectronPositive->SetDensity(fDensityElectron);
fIntDensElectronPositive->SetXPhysicalLattice(fLattice);
fIntDensElectronPositive->SetParticleCharge(+1);
fIntDensElectronPositive->InitializeTable();
fIntDensNucleiNegative->SetPotential(fPotential);
fIntDensNucleiNegative->SetDensity(fDensityNuclei);
fIntDensNucleiNegative->SetXPhysicalLattice(fLattice);
fIntDensNucleiNegative->SetParticleCharge(-1);
fIntDensNucleiNegative->InitializeTable();
fIntDensNucleiPositive->SetPotential(fPotential);
fIntDensNucleiPositive->SetDensity(fDensityNuclei);
fIntDensNucleiPositive->SetXPhysicalLattice(fLattice);
fIntDensNucleiPositive->SetParticleCharge(+1);
fIntDensNucleiPositive->InitializeTable();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XCrystalIntegratedDensityHub::
GetIntegratedDensityNuclei(G4double vPotential,
XPhysicalLattice* vLattice,
G4int vParticleCharge){
if(vParticleCharge < 0.){
return fIntDensNucleiNegative->GetIntegratedDensity(vPotential,
vLattice,
vParticleCharge);
}
else if(vParticleCharge > 0.){
return fIntDensNucleiPositive->GetIntegratedDensity(vPotential,
vLattice,
vParticleCharge);
}
else{
G4cout << "XCrystalIntegratedDensityHub:: ERROR - Charge == 0";
G4cout << G4endl;
return -1;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XCrystalIntegratedDensityHub::
GetIntegratedDensityElectron(G4double vPotential,
XPhysicalLattice* vLattice,
G4int vParticleCharge){
if(vParticleCharge < 0.){
return fIntDensElectronNegative->GetIntegratedDensity(vPotential,
vLattice,
vParticleCharge);
}
else if(vParticleCharge > 0.){
return fIntDensElectronPositive->GetIntegratedDensity(vPotential,
vLattice,
vParticleCharge);
}
else{
G4cout << "XCrystalIntegratedDensityHub:: ERROR - Charge == 0";
G4cout << G4endl;
return -1;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XCrystalIntegratedDensityHub::PrintOnFiles(const G4String& vFileName){
std::string filename;
fIntDensElectronNegative->PrintOnFile(filename=vFileName + "_neg_eld.txt");
fIntDensElectronPositive->PrintOnFile(filename=vFileName + "_pos_eld.txt");
fIntDensNucleiNegative->PrintOnFile(filename=vFileName + "_neg_nud.txt");
fIntDensNucleiPositive->PrintOnFile(filename=vFileName + "_pos_nud.txt");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XCrystalIntegratedDensityHub::ReadFromFiles(const G4String& vFileName){
std::string filename;
fIntDensElectronNegative->ReadFromFile(filename=vFileName + "_neg_eld.txt");
fIntDensElectronPositive->ReadFromFile(filename=vFileName + "_pos_eld.txt");
fIntDensNucleiNegative->ReadFromFile(filename=vFileName + "_neg_nud.txt");
fIntDensNucleiPositive->ReadFromFile(filename=vFileName + "_pos_nud.txt");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,92 @@
//
// ********************************************************************
// * 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 "XCrystalIntegratedDensityPlanar.hh"
XCrystalIntegratedDensityPlanar::XCrystalIntegratedDensityPlanar(){
SetNumberOfPoints(256);
SetIntegrationPoints(0,1024);
SetIntegrationPoints(1,1);
SetIntegrationPoints(2,1);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XCrystalIntegratedDensityPlanar::~XCrystalIntegratedDensityPlanar(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XCrystalIntegratedDensityPlanar::ComputeIntegratedDensity(
G4double vPotentialInitial,
G4int vParticleCharge){
unsigned int i1 = 0;
G4ThreeVector vPositionTemp = G4ThreeVector(0.,0.,0.);
G4double vInterplanarPeriod =
GetXPhysicalLattice()->ComputeInterplanarPeriod();
G4double vPotential = 0.;
G4double vDensity = 0.;
G4double xPos = 0.;
G4double xMin = +vInterplanarPeriod;
G4double xMax = -vInterplanarPeriod;
while(i1<GetIntegrationPoints(0)){
xPos = G4double(G4double(i1)/G4double(GetIntegrationPoints(0)));
xPos *= vInterplanarPeriod;
vPositionTemp.setX(xPos + vInterplanarPeriod / 2.);
vPotential = G4double(vParticleCharge);
vPotential *= GetPotential()->GetEC(
vPositionTemp,GetXPhysicalLattice()).x();
if(vPotential <= vPotentialInitial){
vDensity += GetDensity()->GetEC(vPositionTemp,
GetXPhysicalLattice()).x();
if(xPos < xMin){
xMin = xPos;
}
if(xPos > xMax){
xMax = xPos;
}
}
i1++;
};
vDensity *= vInterplanarPeriod;
vDensity *= vInterplanarPeriod/std::fabs(xMax - xMin);
vDensity /= GetIntegrationPoints(0);
return vDensity;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,80 @@
//
// ********************************************************************
// * 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 "XCrystalPlanarMoliereElectricField.hh"
#include "G4PhysicalConstants.hh"
XCrystalPlanarMoliereElectricField::XCrystalPlanarMoliereElectricField(){
fAlfa[0] = 0.1;
fAlfa[1] = 0.55;
fAlfa[2] = 0.35;
fBeta[0] = 6.0;
fBeta[1] = 1.2;
fBeta[2] = 0.3;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XCrystalPlanarMoliereElectricField::~XCrystalPlanarMoliereElectricField(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XCrystalPlanarMoliereElectricField::
ComputeECForSinglePlane(G4double vXposition,
XPhysicalLattice* vLattice){
G4VPhysicalVolume* vVolume = vLattice->GetVolume();
G4double aTF = ComputeTFScreeningRadius(vLattice);
G4double vValueForSinglePlane = 0.;
for(unsigned int i=0;i<3;i++){
vValueForSinglePlane += ( fAlfa[i] *
std::exp( - std::fabs(vXposition) * fBeta[i] / aTF ) );
}
vValueForSinglePlane *= 2. * CLHEP::pi;
vValueForSinglePlane *= GetXUnitCell(vVolume)->ComputeDirectPeriod(
GetXPhysicalLattice(vVolume)->GetMiller(0),
GetXPhysicalLattice(vVolume)->GetMiller(1),
GetXPhysicalLattice(vVolume)->GetMiller(2));
vValueForSinglePlane *= (CLHEP::elm_coupling);
vValueForSinglePlane *= (GetXUnitCell(vVolume)->ComputeAtomVolumeDensity());
G4int vSign = +1;
if(vXposition < 0.) vSign = -1;
vValueForSinglePlane *= vSign;
return vValueForSinglePlane;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * 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 "XCrystalPlanarMoliereElectronDensity.hh"
XCrystalPlanarMoliereElectronDensity::XCrystalPlanarMoliereElectronDensity(){
fAlfa[0] = 0.1;
fAlfa[1] = 0.55;
fAlfa[2] = 0.35;
fBeta[0] = 6.0;
fBeta[1] = 1.2;
fBeta[2] = 0.3;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XCrystalPlanarMoliereElectronDensity::~XCrystalPlanarMoliereElectronDensity(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XCrystalPlanarMoliereElectronDensity::
ComputeECForSinglePlane(G4double vXposition,
XPhysicalLattice* vLattice){
G4double aTF = ComputeTFScreeningRadius(vLattice);
G4double vValueForSinglePlane = 0.;
for(unsigned int i=0;i<3;i++){
vValueForSinglePlane += ( fAlfa[i] * fBeta[i] *
std::exp( - std::fabs(vXposition) * fBeta[i] / aTF ) *
( 1. + fBeta[i] * std::fabs(vXposition) / aTF) );
}
vValueForSinglePlane /= aTF;
vValueForSinglePlane *= 0.25;
return vValueForSinglePlane;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,102 @@
//
// ********************************************************************
// * 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 "XCrystalPlanarMolierePotential.hh"
#include "G4PhysicalConstants.hh"
XCrystalPlanarMolierePotential::XCrystalPlanarMolierePotential(){
fAlfa[0] = 0.1;
fAlfa[1] = 0.55;
fAlfa[2] = 0.35;
fBeta[0] = 6.0;
fBeta[1] = 1.2;
fBeta[2] = 0.3;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XCrystalPlanarMolierePotential::~XCrystalPlanarMolierePotential(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XCrystalPlanarMolierePotential::
ComputeECForSinglePlane(G4double vXposition,
XPhysicalLattice* vLattice){
G4VPhysicalVolume* vVolume = vLattice->GetVolume();
G4double aTF = ComputeTFScreeningRadius(vLattice);
G4double vValueForSinglePlane = 0.;
for(unsigned int i=0;i<3;i++){
vValueForSinglePlane += ( fAlfa[i]/fBeta[i] *
std::exp( - std::fabs(vXposition) * fBeta[i] / aTF ) );
}
vValueForSinglePlane *= 2. * CLHEP::pi;
vValueForSinglePlane *= GetXUnitCell(vVolume)->ComputeDirectPeriod(
GetXPhysicalLattice(vVolume)->GetMiller(0),
GetXPhysicalLattice(vVolume)->GetMiller(1),
GetXPhysicalLattice(vVolume)->GetMiller(2));
vValueForSinglePlane *= aTF;
vValueForSinglePlane *= (CLHEP::elm_coupling);
vValueForSinglePlane *= (GetXUnitCell(vVolume)->ComputeAtomVolumeDensity());
return vValueForSinglePlane;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XCrystalPlanarMolierePotential::
ComputeMaximum(XPhysicalLattice* vLattice){
G4double vMaximum = GetEC(G4ThreeVector(0.,0.,0.),vLattice).y();
return vMaximum;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XCrystalPlanarMolierePotential::
ComputeMinimum(XPhysicalLattice* vLattice){
G4VPhysicalVolume* vVolume = vLattice->GetVolume();
G4double vInterplanarDistance =
GetXUnitCell(vVolume)->ComputeDirectPeriod(
GetXPhysicalLattice(vVolume)->GetMiller(0),
GetXPhysicalLattice(vVolume)->GetMiller(1),
GetXPhysicalLattice(vVolume)->GetMiller(2));
G4double vMinimum = GetEC(G4ThreeVector(0.,vInterplanarDistance/2.,0.),
vLattice).y();
return vMinimum;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,120 @@
//
// ********************************************************************
// * 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 "XCrystalPlanarMoliereTempPotential.hh"
#include "G4PhysicalConstants.hh"
#include "CLHEP/Random/Stat.h"
XCrystalPlanarMoliereTempPotential::XCrystalPlanarMoliereTempPotential(){
fAlfa[0] = 0.1;
fAlfa[1] = 0.55;
fAlfa[2] = 0.35;
fBeta[0] = 6.0;
fBeta[1] = 1.2;
fBeta[2] = 0.3;
for(unsigned int i=0;i<3;i++) {
fGamma[i] = fAlfa[i]/fBeta[i];
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XCrystalPlanarMoliereTempPotential::~XCrystalPlanarMoliereTempPotential(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XCrystalPlanarMoliereTempPotential::
ComputeECForSinglePlane(G4double vX,
XPhysicalLattice* vLattice){
G4VPhysicalVolume* vVolume = vLattice->GetVolume();
G4double aTF = ComputeTFScreeningRadius(vLattice);
G4double vTVA = vLattice->GetThermalVibrationAmplitude();
G4double vTau[3];
for(unsigned int i=0;i<3;i++){
vTau[i] = (std::pow( vTVA / aTF * fBeta[i] , 2. ) / 2.0);
}
G4double vValueForSinglePlane = 0.;
for(unsigned int i=0;i<3;i++){
G4double vTemp = 0.;
vTemp += ( std::exp(-vX/ aTF * fBeta[i] ) *
(1.-CLHEP::HepStat::erfQ((vTVA / aTF * fBeta[i] - vX/ vTVA) / std::pow(2.,0.5))) );
vTemp += ( std::exp( vX/ aTF * fBeta[i] ) *
(1.-CLHEP::HepStat::erfQ((vTVA / aTF * fBeta[i] + vX/ vTVA) / std::pow(2.,0.5))) );
vValueForSinglePlane += ( vTemp * fGamma[i] * std::exp( vTau[i] ) /2.0);
}
vValueForSinglePlane *= 2. * CLHEP::pi;
vValueForSinglePlane *= GetXUnitCell(vVolume)->ComputeDirectPeriod(
GetXPhysicalLattice(vVolume)->GetMiller(0),
GetXPhysicalLattice(vVolume)->GetMiller(1),
GetXPhysicalLattice(vVolume)->GetMiller(2));
vValueForSinglePlane *= aTF;
vValueForSinglePlane *= (CLHEP::elm_coupling);
vValueForSinglePlane *= (GetXUnitCell(vVolume)->ComputeAtomVolumeDensity());
return vValueForSinglePlane;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XCrystalPlanarMoliereTempPotential::
ComputeMaximum(XPhysicalLattice* vLattice){
G4double vMaximum = GetEC(G4ThreeVector(0.,0.,0.),
vLattice).x();
return vMaximum;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XCrystalPlanarMoliereTempPotential::
ComputeMinimum(XPhysicalLattice* vLattice){
G4VPhysicalVolume* vVolume = vLattice->GetVolume();
G4double vInterplanarDistance =
GetXUnitCell(vVolume)->ComputeDirectPeriod(
GetXPhysicalLattice(vVolume)->GetMiller(0),
GetXPhysicalLattice(vVolume)->GetMiller(1),
GetXPhysicalLattice(vVolume)->GetMiller(2));
G4double vMinimum = GetEC(G4ThreeVector(vInterplanarDistance/2.,0.,0.),
vLattice).x();
return vMinimum;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,53 @@
//
// ********************************************************************
// * 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 "XCrystalPlanarNucleiDensity.hh"
#include "G4SystemOfUnits.hh"
XCrystalPlanarNucleiDensity::XCrystalPlanarNucleiDensity(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XCrystalPlanarNucleiDensity::~XCrystalPlanarNucleiDensity(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XCrystalPlanarNucleiDensity::
ComputeECForSinglePlane(G4double vXposition,
XPhysicalLattice* vLattice){
G4double vValueForSinglePlane = std::exp( - 0.5 *
std::pow(vXposition/vLattice->GetThermalVibrationAmplitude(),2.0 ) );
vValueForSinglePlane /= (vLattice->GetThermalVibrationAmplitude());
vValueForSinglePlane /= ( std::sqrt( 2 * CLHEP::pi) );
return vValueForSinglePlane;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,148 @@
//
// ********************************************************************
// * 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 "XLatticeManager3.hh"
#include "G4VPhysicalVolume.hh"
//int XLatticeManager3::fTotalLattices = 0;
XLatticeManager3* XLatticeManager3::LM;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XLatticeManager3::XLatticeManager3()
{
fTotalLattices = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XLatticeManager3::~XLatticeManager3()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XLatticeManager3* XLatticeManager3::GetXLatticeManager(){
//if no lattice manager exists, create one.
if(!LM) LM = new XLatticeManager3();
//return pointer to single existing lattice manager
return LM;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
bool XLatticeManager3::RegisterLattice(XPhysicalLattice* Lat){
if(fTotalLattices<MAXLAT){
fTotalLattices++;
//using "fTotalLattices-1" so that first lattice corresponds to index 0
fLatticeList[fTotalLattices-1]=Lat;
G4cout<<"\nXLatticeManager3::registerLattice: Registering Lattice.";
G4cout<< "Total number of lattices:"<<fTotalLattices<<"\n"<<endl;
return true;
}
G4cout<<"\nXLatticeManager::RegisterLattice(XPhysicalLattice*):";
G4cout<<"Maximum number of lattices MAXLAT exceeded."<<endl;
return false;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XPhysicalLattice* XLatticeManager3::GetXPhysicalLattice(G4VPhysicalVolume* Vol){
//returns a pointer to the PhysicalLattice associated with Vol
for(int counter=0;counter<fTotalLattices;counter++){
if(fLatticeList[counter]->GetVolume()==Vol) {
return fLatticeList[counter]; //found matching lattice
}
}
return fLatticeList[0];
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
bool XLatticeManager3::HasLattice(G4VPhysicalVolume* Vol){
//return true if Vol has a physical lattice
for(int counter=0;counter<fTotalLattices;counter++){
if(fLatticeList[counter]->GetVolume()==Vol) {
return true; //found matching lattice
}
}
return false;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
double XLatticeManager3::MapKtoV(G4VPhysicalVolume* Vol,
int polarizationState,
const G4ThreeVector & k)
{
//Given the phonon wave vector k, phonon physical volume Vol
//and polarizationState(0=LON, 1=FT, 2=ST),
//returns phonon velocity in m/s
if((Vol==NULL)&&(fTotalLattices>0))
return fLatticeList[0]->MapKtoV(polarizationState, k);
for(int counter=0;counter<fTotalLattices;counter++){
if(fLatticeList[counter]->GetVolume()==Vol) {
return fLatticeList[counter]->MapKtoV(polarizationState, k);
}
}
G4cout<<"\nXLatticeManager::MapKtoV: Found no matching lattices for "
<<Vol->GetName()<<". Total number of lattices is "<<fTotalLattices<<endl;
return 300;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ThreeVector XLatticeManager3::MapKtoVDir(G4VPhysicalVolume* Vol,
int polarizationState,
const G4ThreeVector & k)
{
//Given the phonon wave vector k, phonon physical volume Vol
//and polarizationState(0=LON, 1=FT, 2=ST),
//returns phonon propagation direction as dimensionless unit vector
if((Vol==NULL)&&(fTotalLattices>0))
return fLatticeList[0]->MapKtoVDir(polarizationState, k);
for(int counter=0;counter<fTotalLattices;counter++){
if(fLatticeList[counter]->GetVolume()==Vol) {
if(counter!=0)
G4cout<<"\nLattiveManager2::MapKtoV:";
G4cout<<"returning group velocity from lattise position: "<<counter;
return fLatticeList[counter]->MapKtoVDir(polarizationState, k);
}
}
return G4ThreeVector(1,0,0);
}

Some files were not shown because too many files have changed in this diff Show More