Skip to content
Snippets Groups Projects
Commit 5b8c1425 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 1349 additions and 0 deletions
build
build/*
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(OpNovice)
#----------------------------------------------------------------------------
# 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
#
include(${Geant4_USE_FILE})
#----------------------------------------------------------------------------
# Locate sources and headers for this project
#
include_directories(${PROJECT_SOURCE_DIR}/include
${Geant4_INCLUDE_DIR})
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
#----------------------------------------------------------------------------
# Add the executable, and link it to the Geant4 libraries
#
add_executable(OpNovice OpNovice.cc ${sources} ${headers})
target_link_libraries(OpNovice ${Geant4_LIBRARIES} )
#----------------------------------------------------------------------------
# Copy all scripts to the build directory, i.e. the directory in which we
# build OpNovice. This is so that we can run the executable directly because it
# relies on these scripts being in the current working directory.
#
set(OpNovice_SCRIPTS
OpNovice.out
OpNovice.in
optPhoton.mac
gui.mac
vis.mac
)
foreach(_script ${OpNovice_SCRIPTS})
configure_file(
${PROJECT_SOURCE_DIR}/${_script}
${PROJECT_BINARY_DIR}/${_script}
COPYONLY
)
endforeach()
#----------------------------------------------------------------------------
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
#
install(TARGETS OpNovice DESTINATION bin)
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := OpNovice
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
include $(G4INSTALL)/config/binmake.gmk
visclean:
rm -f g4*.prim g4*.eps g4*.wrl
rm -f .DAWN_*
History 0 → 100644
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Example OpNovice 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 *
----------------------------------------------------------
July 31, 2018 I. Hrivnacova (OpNovice-V10-04-02)
- Macro review:
- Added test for /OpNovice/phys/cerenkovMaxPhotons command at the end
of OpNovice.in macro
- Updated README files
May 17, 2018 J. Allison (OpNovice-V10-04-01)
- Remove G4UI_USE and G4VIS_USE.
- Move instantiation of G4UIExecutive to start of main.
May 08, 2018 B. Morgan (OpNovice-V10-04-00)
- Include G4Types before use of G4MULTITHREADED. For forward
compatibility with move to #defines over -D for G4 preprocessor
symbols.
August 18, 2017 J.Allison (OpNovice-V10-03-02)
- Fix gui.mac, which executed vis.mac (it should not!).
Mar 22, 2017 P.Gumplinger (OpNovice-V10-03-00/OpNovice-V10-03-01)
- exercise the new DAVIS LUT surface model
Nov 02, 2016 L.Garnier (OpNovice-V10-02-01)
- Remove icons.mac. Automatically include since interfaces-V10-02-07
Nov 02, 2016 I. Hrivnacova (OpNovice-V10-02-00)
- Added file descriptions for Doxygen documentation
Oct 14, 2016 G.Folger (OpNovice-V10-00-00) - not tagged
- remove direct use of theParticleIterator, use GetParticleTableIterator().
fix required by clang39 on Linux and MAC
Jun 15, 2015 - P. Gumplinger (OpNovice-V10-01-04)
- introduce G4ThreadLocal in OpNovicePhysicsList class
Jun 09, 2015 - P. Gumplinger (OpNovice-V10-01-03)
- revert back to kernel initialization in main
Jun 05, 2015 - P. Gumplinger (OpNovice-V10-01-02)
- reduce output size and move kernel initialization to input macro
May 22, 2015 - P. Gumplinger (OpNovice-V10-01-01)
- apply coding guideline 3.3
May 16, 2015 J. Allison (OpNovice-V10-01-00)
- Replaced !G4Threading::IsWorkerThread() by G4Threading::IsMasterThread().
October 27, 2014 A. Dotti (OpNovice-V10-00-06)
- Migration to new UI system. Requires:
xrays-V10-00-06, op-V10-00-09, phys-ctro-em-V10-00-17
July 11, 2014 P. Gumplinger (OpNovice-V10-00-05)
- Use implicit dimensioning for all arrays in
OpNoviceDetectorConstruction.cc and assert that they are the
same (thanks to M. Kelsey for suggesting this)
December 23, 2013 M. Asai (OpNovice-V10-00-04)
- Limit invokation of static method only from master/sequential.
December 22, 2013 M. Asai (OpNovice-V10-00-03)
- Avoid static G4Scintillation method invoked through a pointer.
December 18, 2013 M. Asai/P. Gumplinger (OpNovice-V10-00-02)
- allows changes to G4Cerenkov and G4Scintillation in Idle state
December 16, 2013 M. Asai (OpNovice-V10-00-01)
- Fix race condision issue in OpNovicePhysicsList.
December 04, 2013 P. Gumplinger (OpNovice-V10-00-00)
- Fixes in gui.mac:
Commented out command specific to B2 example
Let execute vis.mac first to make the command in added menus available;
Corrected wireframe parameter
November 28, 2013 P. Gumplinger (OpNovice-V09-06-11)
- add gui.mac, icons.mac and run.png
November 2, 2013 P. Gumplinger (OpNovice-V09-06-10)
- place G4Random::setTheSeed(myseed) so that it is executed for both
sequential and MT mode
October 31, 2013 P. Gumplinger (OpNovice-V09-06-09)
- to work with ctests-V09-06-19
October 29, 2013 P. Gumplinger (OpNovice-V09-06-08)
- remove all reference to LXeWorkerInitialization and remove SetNumberOfThreads
October 25, 2013 P. Gumplinger (OpNovice-V09-06-07)
- Instantiate SteppingVerbose in a new method in OpNoviceActionInitialization
and removed LXeWorkerInitialization (not needed anymore)
- Add OpNoviceSteppingAction to count secondary optical photons to compare
with OpNoviceStackingAction
11 June 2013, V.Ivanchenko (OpNovice-V09-06-06)
- OpNovicePhysicsList - construct all particles to avoid exception
in execution of ConstructParticle() method; removed unnecessary
methods to construct individual particle types
02 June 2013, P.Gumplinger (OpNovice-V09-06-05)
- make MultiThread (MT) capable
27 May 2013, I.Hrivnacova (OpNovice-V09-06-04)
- Updated .README file
27 May 2013, I.Hrivnacova (OpNovice-V09-06-03)
- Apply Examples Coding Guidelines
(data members/base class initialization)
13 May 2013 P. Gumplinger (OpNovice-V09-06-02)
- Add .README file
06 May 2013 P. Gumplinger (OpNovice-V09-06-01)
- Apply all Examples Coding Guidelines
18 Dec 2012 I. Hrivnacova (OpNovice-V09-06-00)
- Fixed CMake build: removed add_custom_target(..)
17 Dec 2012 P. Gumplinger
- move the example to /extended/optical/novice (from /novice/N06) and
rename N06 to OpNovice
20 June 2012 P. Gumplinger (exampleN06-V09-05-01)
- remove SetModel from ExN06PhysicsList.cc to cowork with op-V09-05-04
24 January 2012 P. Gumplinger (exampleN06-V09-05-00)
- set /tracking/verbose 3 in exampleN06.in and optPhoton.mac
to also test timing of optical photons - see Problem #1275
29 November 2011 Ben Morgan (exampleN06-V09-04-01)
- CMakeLists.txt edited to add standard UI/Vis activation and copying of scripts
to build directory, plus comments and neatification.
14th October 2011 P. Gumplinger (exampleN06-V09-04-00)
- modify to work with materials-V09-04-15 and use spline interpolation
for some of the G4MaterialPropertyVector (e.g. G4PhysicsOrderedFreeVector)
23rd October 2010 P. Gumplinger (exampleN06-V09-03-01)
- add G4OpMieHG scattering process and associated material properties
4th June 2010 Joseph Perl (exampleN06-V09-03-00)
- Updated vis usage
09th November 2009 Peter Gumplinger (exampleN06-V09-02-01)
- use G4eMultipleScattering, G4MuMultipleScattering and
G4hMultipleScattering instead of G4MultipleScattering
30th October 2009 John Allison (exampleN06-V09-02-00)
- Introduced G4UIExecutive.
20th November 2008 P. Gumplinger (exampleN06-V09-01-03)
- add theCerenkovProcess->SetMaxBetaChangePerStep in ExN06PhysicsList
16th July 2008 P. Gumplinger (exampleN06-V09-01-02)
- use dynamic_cast <G4OpticalSurface*> in ExN06DetectorConstruction.cc
12th June 2008 P. Gumplinger (exampleN06-V09-01-01)
- now use G4EmSaturation to implement the Birks Correction
for G4Scintillation
07th May 2008 J.Allison (exampleN06-V09-01-00)
- Protected "/control/execute vis.mac" with G4VIS_USE flag.
30 Sept 2007 Peter Gumplinger (exampleN06-V09-00-00)
- adjust to the G4Cerenkov process now being a G4VDiscreteProcess
October 18th 2006 J.Allison (exampleN06-V08-01-00)
- Migrate to new trajectory modeling commands.
16th June 2006 Gabriele Cosmo (exampleN06-V08-00-02)
- Use coherent allocation scheme for user-classes and
initialisation in main().
15th June 2006 Peter Gumplinger (exampleN06-V08-00-01)
- add new method ExN06PrimaryGeneratorAction::SetOptPhotonPolar()
to set a random linear polarization when the command -
/N06/gun/optPhotonPolar - is given without arguments
15th June 2006 Gabriele Cosmo (exampleN06-V08-00-00)
- Separate instantiation of the user-stepping-verbose class from
initialisation of the G4VSteppingVerbose singleton.
6th December 2005 Gabriele Cosmo
- Trivial changes for support of CLHEP-2.0.X series.
4th December 2005 John Allison (exampleN06-V07-01-00)
- Replaced vis code in EndOfEventAction by suitable vis commands in vis.mac.
16 May 2005 Peter Gumplinger (exampleN06-V07-00-01)
- use SetProcessOrdering for theDecayProces
11 May 2005 Michel Maire (exampleN06-V07-00-00)
- UI command cerenkovMaxPhotons available in Idle state only
3rd May 2005 John Allison (examples-V07-00-03)
- Replaced vis manager with G4VisExecutive.
June 1, 2004 Peter Gunplinger (exampleN06-V06-01-01)
- Updated README file.
April 2, 2004 Michel Maire (exampleN06-V06-01-00)
- PrimaryGenerator: e+ 500 keV
- Removed vis commands from RunAction
March 17, 2004 Peter Gumplinger (exampleN06-V06-00-00)
- DetectorConstruction: change surface model between OpWaterSurface
and OpAirSurface
December 1, 2003 Peter Gumplinger (exampleN06-V05-02-02)
- DetectorConstruction: use G4SurfaceProperty.
November 13, 2003 John Allison
- Removed OPACS from Vis Manager.
October 24, 2003 Michel Maire (exampleN06-V05-02-01)
- PhysicsList: AddProcess(Bremsstrahlung,-1,3,3) ..etc..
October 06, 2003 Michel Maire (exampleN06-V05-02-00)
- Cosmetic cleanup of material definition
April 17, 2003 Peter Gumplinger (exampleN06-V05-00-03)
- Changed OpWaterSurface to dielectric_dielectric in class
ExN06DetectorConstruction
March 26, 2003 Michel Maire (exampleN06-V05-00-02)
- G4PVPlacement in logical mother
Febuary 11, 2003 Michel Maire (exampleN06-V05-00-01)
- Added a blank in steppingVerbose !
January 23, 2003 Michel Maire (exampleN06-V05-00-00)
- Added tools for interactive session : UItcsh, visualisation of tracks.
- Added 2 messenger classes : PhysicsList and PrimaryGenerator
- exampleN06.in changed --> exampleN06.out reduced
November 21, 2002 Peter Gumplinger (exampleN06-V04-01-02)
- exampleN06.out output changed because of small change in G4Scintillation
November 14, 2002 Peter Gumplinger (exampleN06-V04-01-01)
- Reduced the scintillation photon yield to reduce the output size
November 12, 2002 Peter Gumplinger (exampleN06-V04-01-00)
- Added ExN06StackingAction
- Changed user interface to new version of G4Scintillation
May 30, 2002 Gabriele Cosmo (exampleN06-V04-00-02)
- Renamed file ExN06PrimaryGeneratoraction.cc to ExN06PrimaryGeneratorAction.cc
to be consistent with class name.
May 16, 2002 Peter Gumplinger (exampleN06-V04-00-01)
- Added G4Scintillation to the example and update reference output
Oct 19, 2001 Steve O'Neale (examples-V03-02-00)
- Updated reference output
06-02-2001 Update reference output for op-V03-00-05 S.W.O'Neale
June 17, 2000 John Allison (exampleN06-V01-01-00)
- Updated exampleN06.out for geant4-01-01-ref-06.
16th April 1999 Hisaya Kurashige
- Modified ExN06RunAction
- Modified ExN06PhysicsList::SetCuts
21st August 1998 John Allison
- Changed file names from N06* to ExN06*.
9th August 1998 John Allison
- Changed G4UIterminal to G4UIGAG.
April 09, 98 Gabriele Cosmo
- Created.
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file OpNovice/OpNovice.cc
/// \brief Main program of the OpNovice example
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
// Description: Test of Continuous Process G4Cerenkov
// and RestDiscrete Process G4Scintillation
// -- Generation Cerenkov Photons --
// -- Generation Scintillation Photons --
// -- Transport of optical Photons --
// Version: 5.0
// Created: 1996-04-30
// Author: Juliet Armstrong
// mail: gum@triumf.ca
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4Types.hh"
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
#else
#include "G4RunManager.hh"
#endif
#include "G4UImanager.hh"
#include "OpNovicePhysicsList.hh"
#include "OpNoviceDetectorConstruction.hh"
#include "OpNoviceActionInitialization.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
namespace {
void PrintUsage() {
G4cerr << " Usage: " << G4endl;
G4cerr << " OpNovice [-m macro ] [-u UIsession] [-t nThreads] [-r seed] "
<< G4endl;
G4cerr << " note: -t option is available only for multi-threaded mode."
<< G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
int main(int argc,char** argv)
{
// Evaluate arguments
//
if ( argc > 9 ) {
PrintUsage();
return 1;
}
G4String macro;
G4String session;
#ifdef G4MULTITHREADED
G4int nThreads = 0;
#endif
G4long myseed = 345354;
for ( G4int i=1; i<argc; i=i+2 ) {
if ( G4String(argv[i]) == "-m" ) macro = argv[i+1];
else if ( G4String(argv[i]) == "-u" ) session = argv[i+1];
else if ( G4String(argv[i]) == "-r" ) myseed = atoi(argv[i+1]);
#ifdef G4MULTITHREADED
else if ( G4String(argv[i]) == "-t" ) {
nThreads = G4UIcommand::ConvertToInt(argv[i+1]);
}
#endif
else {
PrintUsage();
return 1;
}
}
// Instantiate G4UIExecutive if interactive mode
G4UIExecutive* ui = nullptr;
if ( macro.size() == 0 ) {
ui = new G4UIExecutive(argc, argv);
}
// Choose the Random engine
//
G4Random::setTheEngine(new CLHEP::RanecuEngine);
// Construct the default run manager
//
#ifdef G4MULTITHREADED
G4MTRunManager * runManager = new G4MTRunManager;
if ( nThreads > 0 ) runManager->SetNumberOfThreads(nThreads);
#else
G4RunManager * runManager = new G4RunManager;
#endif
// Seed the random number generator manually
G4Random::setTheSeed(myseed);
// Set mandatory initialization classes
//
// Detector construction
runManager-> SetUserInitialization(new OpNoviceDetectorConstruction());
// Physics list
runManager-> SetUserInitialization(new OpNovicePhysicsList());
// User action initialization
runManager->SetUserInitialization(new OpNoviceActionInitialization());
// Initialize G4 kernel
//
runManager->Initialize();
// Initialize visualization
//
G4VisManager* visManager = new G4VisExecutive;
// G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
// G4VisManager* visManager = new G4VisExecutive("Quiet");
visManager->Initialize();
// Get the pointer to the User Interface manager
//
G4UImanager* UImanager = G4UImanager::GetUIpointer();
if ( macro.size() ) {
// Batch mode
G4String command = "/control/execute ";
UImanager->ApplyCommand(command+macro);
}
else // Define UI session for interactive mode
{
UImanager->ApplyCommand("/control/execute vis.mac");
if (ui->IsGUI())
UImanager->ApplyCommand("/control/execute gui.mac");
ui->SessionStart();
delete ui;
}
// Job termination
// Free the store: user actions, physics_list and detector_description are
// owned and deleted by the run manager, so they should not
// be deleted in the main() program !
delete visManager;
delete runManager;
return 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/control/verbose 2
/tracking/verbose 0
#
/gun/particle e+
/gun/energy 500 keV
#
/OpNovice/phys/verbose 0
#
/run/beamOn 1
#
/OpNovice/phys/cerenkovMaxPhotons 15 # default: 20
#
/run/beamOn 1
This diff is collapsed.
README 0 → 100644
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
OpNovice
--------
This example presently illustrates the following basic concepts, and in
particular (indicated with ***), how to use G4 for optical photon
generation and transport. Other extended example of what is possible
in Geant4 with optical photons can be found at
examples/extended/optical/LXe and wls.
main()
------
==> define Random Number Engine and initial seed
G4VUserPhysicsList
------------------
==> define particles; including *** G4OpticalPhoton ***
define processes; including *** G4Cerenkov ***
*** G4Scintillation ***
*** G4OpAbsorption ***
*** G4OpRayleigh ***
*** G4OpBoundaryProcess ***
==> A messenger command allows to define interactivly the
verbose level and the maximum number of Cerenkov photons per step
(see for instance OpNovice.in)
G4VUserDetectorConstruction
---------------------------
==> define material: Air and Water
define simple G4box geometry
*** add G4MaterialPropertiesTable to G4Material ***
*** define G4LogicalSurface(s) ***
*** define G4OpticalSurface ***
*** add G4MaterialPropertiesTable to G4OpticalSurface ***
G4VUserPrimaryGeneratorAction
-----------------------------
==> Use G4ParticleGun to shoot a charge particle into a Cerenkov radiator
==> A messenger command allows to define interactively the polarization of an
primary optical photon (see for instance optPhoton.mac)
G4UserRunAction
---------------
==> define G4Timer (start/stop)
set verbose levels
G4UserStackingAction
--------------------
==> show how to count the number of secondary particles in an event
Visualisation
-------------
The Visualization Manager is set in the main().
The initialisation of the drawing is done via a set of /vis/ commands
in the macro vis.mac. This macro is automatically read from
the main in case of interactive running mode.
The detector has a default view which is a longitudinal view of the tank.
The tracks are drawn at the end of event, and erased at the end of run.
HOW TO START
------------
- compile and link to generate an executable
% cd OpNovice
% gmake
This example handles the program arguments in a new way.
It can be run with the following optional arguments:
% OpNovice [-m macro ] [-u UIsession] [-t nThreads]
The -t option is available only in multi-threading mode
and it allows the user to override the Geant4 default number of
threads. The number of threads can be also set via G4FORCENUMBEROFTHREADS
environment variable which has the top priority.
- execute OpNovice in 'batch' mode from macro files
% OpNovice -m OpNovice.in
- execute OpNovice in 'interactive mode' with visualization
% OpNovice
....
Idle> type your commands. For instance:
Idle> /control/execute optPhoton.mac
....
Idle> exit
gui.mac 0 → 100644
#
# This file permits to customize, with commands,
# the menu bar of the G4UIXm, G4UIQt, G4UIWin32 sessions.
# It has no effect with G4UIterminal.
#
# File menu :
/gui/addMenu file File
/gui/addButton file Quit exit
#
# Run menu :
/gui/addMenu run Run
/gui/addButton run "beamOn 1" "/run/beamOn 1"
#/gui/addButton run run1 "/control/execute run1.mac"
#/gui/addButton run run2 "/control/execute run2.mac"
#
# Gun menu :
/gui/addMenu gun Gun
/gui/addButton gun "50 MeV" "/gun/energy 50 MeV"
/gui/addButton gun "1 GeV" "/gun/energy 1 GeV"
/gui/addButton gun "10 GeV" "/gun/energy 10 GeV"
/gui/addButton gun "e-" "/gun/particle e-"
/gui/addButton gun "pi0" "/gun/particle pi0"
/gui/addButton gun "pi+" "/gun/particle pi+"
/gui/addButton gun "neutron" "/gun/particle neutron"
/gui/addButton gun "proton" "/gun/particle proton"
#
# Field menu :
#/gui/addMenu field Field
#/gui/addButton field "off" "/B2/det/setField 0.2 tesla"
#/gui/addButton field "0.2 tesla" "/B2/det/setField 0.2 tesla"
#/gui/addButton field "2.0 tesla" "/B2/det/setField 2.0 tesla"
#
# Viewer menu :
/gui/addMenu viewer Viewer
/gui/addButton viewer "Set style surface" "/vis/viewer/set/style surface"
/gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wireframe"
/gui/addButton viewer "Refresh viewer" "/vis/viewer/refresh"
/gui/addButton viewer "Update viewer (interaction or end-of-file)" "/vis/viewer/update"
/gui/addButton viewer "Flush viewer (= refresh + update)" "/vis/viewer/flush"
/gui/addButton viewer "Update scene" "/vis/scene/notifyHandlers"
#
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
/// \file OpNoviceActionInitialization.hh
/// \brief Definition of the OpNoviceActionInitialization class
#ifndef OpNoviceActionInitialization_h
#define OpNoviceActionInitialization_h 1
#include "G4VUserActionInitialization.hh"
class B4DetectorConstruction;
/// Action initialization class.
///
class OpNoviceActionInitialization : public G4VUserActionInitialization
{
public:
OpNoviceActionInitialization();
virtual ~OpNoviceActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
virtual G4VSteppingVerbose* InitializeSteppingVerbose() const;
};
#endif
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file OpNovice/include/OpNoviceDetectorConstruction.hh
/// \brief Definition of the OpNoviceDetectorConstruction class
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef OpNoviceDetectorConstruction_h
#define OpNoviceDetectorConstruction_h 1
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class OpNoviceDetectorConstruction : public G4VUserDetectorConstruction
{
public:
OpNoviceDetectorConstruction();
virtual ~OpNoviceDetectorConstruction();
public:
virtual G4VPhysicalVolume* Construct();
private:
G4double fExpHall_x;
G4double fExpHall_y;
G4double fExpHall_z;
G4double fCherenkov_radius ;
G4double fCherenkov_length ;
G4double fTank_x;
G4double fTank_y;
G4double fTank_z;
G4double fBubble_x;
G4double fBubble_y;
G4double fBubble_z;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif /*OpNoviceDetectorConstruction_h*/
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file OpNovice/include/OpNovicePhysicsList.hh
/// \brief Definition of the OpNovicePhysicsList class
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef OpNovicePhysicsList_h
#define OpNovicePhysicsList_h 1
#include "globals.hh"
#include "G4VUserPhysicsList.hh"
class OpNovicePhysicsListMessenger;
class G4Cerenkov;
class G4Scintillation;
class G4OpAbsorption;
class G4OpRayleigh;
class G4OpMieHG;
class G4OpBoundaryProcess;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class OpNovicePhysicsList : public G4VUserPhysicsList
{
public:
OpNovicePhysicsList();
virtual ~OpNovicePhysicsList();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual void SetCuts();
//these methods Construct physics processes and register them
void ConstructDecay();
void ConstructEM();
void ConstructOp();
//for the Messenger
void SetVerbose(G4int);
void SetNbOfPhotonsCerenkov(G4int);
private:
OpNovicePhysicsListMessenger* fMessenger;
static G4ThreadLocal G4int fVerboseLevel;
static G4ThreadLocal G4int fMaxNumPhotonStep;
static G4ThreadLocal G4Cerenkov* fCerenkovProcess;
static G4ThreadLocal G4Scintillation* fScintillationProcess;
static G4ThreadLocal G4OpAbsorption* fAbsorptionProcess;
static G4ThreadLocal G4OpRayleigh* fRayleighScatteringProcess;
static G4ThreadLocal G4OpMieHG* fMieHGScatteringProcess;
static G4ThreadLocal G4OpBoundaryProcess* fBoundaryProcess;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif /* OpNovicePhysicsList_h */
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file OpNovice/include/OpNovicePhysicsListMessenger.hh
/// \brief Definition of the OpNovicePhysicsListMessenger class
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef OpNovicePhysicsListMessenger_h
#define OpNovicePhysicsListMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class OpNovicePhysicsList;
class G4UIdirectory;
class G4UIcmdWithAnInteger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class OpNovicePhysicsListMessenger: public G4UImessenger
{
public:
OpNovicePhysicsListMessenger(OpNovicePhysicsList* );
virtual ~OpNovicePhysicsListMessenger();
virtual void SetNewValue(G4UIcommand*, G4String);
private:
OpNovicePhysicsList* fPhysicsList;
G4UIdirectory* fOpNoviceDir;
G4UIdirectory* fPhysDir;
G4UIcmdWithAnInteger* fVerboseCmd;
G4UIcmdWithAnInteger* fCerenkovCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file OpNovice/include/OpNovicePrimaryGeneratorAction.hh
/// \brief Definition of the OpNovicePrimaryGeneratorAction class
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef OpNovicePrimaryGeneratorAction_h
#define OpNovicePrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class G4ParticleGun;
class G4Event;
class OpNovicePrimaryGeneratorMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class OpNovicePrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
OpNovicePrimaryGeneratorAction();
virtual ~OpNovicePrimaryGeneratorAction();
public:
virtual void GeneratePrimaries(G4Event*);
void SetOptPhotonPolar();
void SetOptPhotonPolar(G4double);
private:
G4ParticleGun* fParticleGun;
OpNovicePrimaryGeneratorMessenger* fGunMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif /*OpNovicePrimaryGeneratorAction_h*/
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file OpNovice/include/OpNovicePrimaryGeneratorMessenger.hh
/// \brief Definition of the OpNovicePrimaryGeneratorMessenger class
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef OpNovicePrimaryGeneratorMessenger_h
#define OpNovicePrimaryGeneratorMessenger_h 1
#include "G4UImessenger.hh"
#include "globals.hh"
class OpNovicePrimaryGeneratorAction;
class G4UIdirectory;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class OpNovicePrimaryGeneratorMessenger: public G4UImessenger
{
public:
OpNovicePrimaryGeneratorMessenger(OpNovicePrimaryGeneratorAction* );
virtual ~OpNovicePrimaryGeneratorMessenger();
virtual void SetNewValue(G4UIcommand*, G4String);
private:
OpNovicePrimaryGeneratorAction* fOpNoviceAction;
G4UIdirectory* fGunDir;
G4UIcmdWithADoubleAndUnit* fPolarCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file OpNovice/include/OpNoviceRunAction.hh
/// \brief Definition of the OpNoviceRunAction class
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef OpNoviceRunAction_h
#define OpNoviceRunAction_h 1
#include "globals.hh"
#include "G4UserRunAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4Timer;
class G4Run;
class OpNoviceRunAction : public G4UserRunAction
{
public:
OpNoviceRunAction();
virtual ~OpNoviceRunAction();
public:
virtual void BeginOfRunAction(const G4Run* aRun);
virtual void EndOfRunAction(const G4Run* aRun);
private:
G4Timer* fTimer;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif /*OpNoviceRunAction_h*/
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file OpNovice/include/OpNoviceStackingAction.hh
/// \brief Definition of the OpNoviceStackingAction class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef OpNoviceStackingAction_H
#define OpNoviceStackingAction_H 1
#include "globals.hh"
#include "G4UserStackingAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class OpNoviceStackingAction : public G4UserStackingAction
{
public:
OpNoviceStackingAction();
virtual ~OpNoviceStackingAction();
public:
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);
virtual void NewStage();
virtual void PrepareNewEvent();
private:
G4int fScintillationCounter;
G4int fCerenkovCounter;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
/// \file OpNoviceSteppingAction.hh
/// \brief Definition of the OpNoviceSteppingAction class
#ifndef OpNoviceSteppingAction_h
#define OpNoviceSteppingAction_h 1
#include "G4UserSteppingAction.hh"
#include "globals.hh"
/// Stepping action class
///
class OpNoviceSteppingAction : public G4UserSteppingAction
{
public:
OpNoviceSteppingAction();
virtual ~OpNoviceSteppingAction();
// method from the base class
virtual void UserSteppingAction(const G4Step*);
private:
G4int fScintillationCounter;
G4int fCerenkovCounter;
G4int fEventNumber;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file OpNovice/include/OpNoviceSteppingVerbose.hh
/// \brief Definition of the OpNoviceSteppingVerbose class
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class OpNoviceSteppingVerbose;
#ifndef OpNoviceSteppingVerbose_h
#define OpNoviceSteppingVerbose_h 1
#include "G4SteppingVerbose.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class OpNoviceSteppingVerbose : public G4SteppingVerbose
{
public:
OpNoviceSteppingVerbose();
virtual ~OpNoviceSteppingVerbose();
virtual void StepInfo();
virtual void TrackingStarted();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment