Import Geant4 10.5.0 source tree
This commit is contained in:
@@ -23,21 +23,12 @@ include(${Geant4_USE_FILE})
|
||||
#----------------------------------------------------------------------------
|
||||
# Add options
|
||||
#
|
||||
option(ULTRA_MIRROR_USE "Use of mirrors" ON)
|
||||
if(ULTRA_MIRROR_USE)
|
||||
add_definitions(-DULTRA_MIRROR_USE)
|
||||
endif()
|
||||
|
||||
option(ULTRA_VERBOSE "Set verbosity" OFF)
|
||||
if(ULTRA_VERBOSE)
|
||||
add_definitions(-DULTRA_VERBOSE)
|
||||
endif()
|
||||
|
||||
option(ULTRA_GROUND_USE "Use ground" OFF)
|
||||
if(ULTRA_GROUND_USE)
|
||||
add_definitions(-DULTRA_GROUND_USE)
|
||||
endif()
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Locate sources and headers for this project
|
||||
#
|
||||
@@ -58,7 +49,7 @@ target_link_libraries(Ultra ${Geant4_LIBRARIES})
|
||||
# relies on these scripts being in the current working directory.
|
||||
#
|
||||
set(air_shower_SCRIPTS
|
||||
UltraMacro.mac Visualisation.mac
|
||||
UltraMacro.mac OpenVis.mac VisDirect.mac Direct.mac Mirror.mac Ground.mac Source.mac
|
||||
)
|
||||
|
||||
foreach(_script ${air_shower_SCRIPTS})
|
||||
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
/control/verbose 1
|
||||
/run/verbose 1
|
||||
/event/verbose 0
|
||||
/tracking/verbose 0
|
||||
/run/initialize
|
||||
/detector/reflection none
|
||||
|
||||
/gps/particle opticalphoton
|
||||
/gps/energy 3.0 eV
|
||||
/gps/direction 0.0 0.0 -1.0
|
||||
/gps/polarization 1.0 1.0 0.0
|
||||
|
||||
/gps/pos/type Plane
|
||||
/gps/pos/shape Circle
|
||||
/gps/pos/radius 20.0 cm
|
||||
|
||||
/gps/pos/rot1 1.0 0.0 0.0
|
||||
/gps/pos/rot2 0.0 1.0 0.0
|
||||
/gps/pos/centre 0.0 0.0 150. cm
|
||||
|
||||
/run/beamOn 100
|
||||
@@ -15,13 +15,6 @@ include $(G4INSTALL)/config/architecture.gmk
|
||||
ifdef SPACE_VERBOSE
|
||||
CPPFLAGS += -DULTRA_VERBOSE_USE
|
||||
endif
|
||||
ifdef ULTRA_MIRROR_USE
|
||||
CPPFLAGS += -DULTRA_MIRROR_USE
|
||||
endif
|
||||
ifdef ULTRA_GROUND_USE
|
||||
CPPFLAGS += -DULTRA_GROUND_USE
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: all
|
||||
all: lib bin
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
/run/initialize
|
||||
/detector/reflection ground
|
||||
/control/execute Source.mac
|
||||
/run/beamOn 100
|
||||
@@ -7,6 +7,22 @@
|
||||
History file
|
||||
------------
|
||||
|
||||
09.11.2018 - B. Tome (air_shower-V10-04-04)
|
||||
Allow to remove reflecting surface.
|
||||
|
||||
09.11.2018 - B. Tome (air_shower-V10-04-03)
|
||||
Add UltraMacro.mac to CMakeLists.txt
|
||||
|
||||
09.11.2018 - B. Tome (air_shower-V10-04-02)
|
||||
Reorganise macros. Add new macros.
|
||||
Reorganise and simplify code in UltraDetectorConstruction.
|
||||
Geometry can now be changed in the same interactive session.
|
||||
|
||||
08.11.2018 - B. Tome (air_shower-V10-04-01)
|
||||
Drop detector configuration through preprocessor directives. Use detector messenger instead.
|
||||
New macros for visualisation, replacing preprocessor options.
|
||||
No default PrimaryGeneratorAction in UserActionInitialization.
|
||||
|
||||
10.05.2018 - B. Morgan (air_shower-V10-04-00)
|
||||
Include G4Types before use of G4MULTITHREADED. For forward
|
||||
compatibility with move to #defines over -D for G4 preprocessor
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
/run/initialize
|
||||
/detector/reflection specular
|
||||
/control/execute Source.mac
|
||||
/run/beamOn 100
|
||||
-3
@@ -82,6 +82,3 @@
|
||||
# For file-based drivers, use this to create an empty detector view:
|
||||
#/vis/viewer/flush
|
||||
#
|
||||
/gps/particle opticalphoton
|
||||
/gps/energy 2.0 eV
|
||||
/run/beamOn 100
|
||||
@@ -31,8 +31,8 @@ of object parameterisation/replication capabilities.
|
||||
|
|
||||
The primary vertex generator describes a plane circular source of UV
|
||||
(3eV, about 400 nm) optical photons. |
|
||||
Depending on the user selection (see below for the relevant environment
|
||||
variables) the source can be positioned such that the photons are fired |
|
||||
Depending on the selected detector configuration, the source can be |
|
||||
positioned such that the photons are fired |
|
||||
to a reflecting surface or, by default, directly to the UVscope
|
||||
(no reflecting surface is present in this case). |
|
||||
Reflection at the surface can be chosen to be specular or diffuse.
|
||||
@@ -51,17 +51,16 @@ processes is made. |
|
||||
A standard Geant4 example GNUmakefile and a CMakeLists.txt file are
|
||||
provided, for building with cmake |
|
||||
|
||||
The following environment variables can be set: |
|
||||
The following environment variable can be set in order to get |
|
||||
additional verbosity during program running: |
|
||||
|
||||
1) GNUmakefile
|
||||
|
||||
setenv ULTRA_VERBOSE
|
||||
setenv ULTRA_MIRROR_USE 1 : A specular reflecting surface is used.
|
||||
setenv ULTRA_GROUND_USE 1 : A diffusive reflecting surface is used.
|
||||
setenv ULTRA_VERBOSE
|
||||
|
||||
2) CMakeLists.txt
|
||||
or
|
||||
|
||||
set ON/OFF the appropriate option (ULTRA_MIRROR_USE, ULTRA_GROUND_USE)
|
||||
2) cmake -DULTRA_VERBOSE=ON "path to source"
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
@@ -84,13 +83,23 @@ the Geant4 application developer manual (Analysis Manager Classes)
|
||||
-
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
----> How to run the example. |
|
||||
----> How to run the example. |
|
||||
|
||||
From the directory where the Ultra binary resides :
|
||||
|
||||
./Ultra UltraMacro.mac for running in batch mode |
|
||||
./Ultra "macro name" for running in batch mode |
|
||||
|
|
||||
./Ultra for running in interative mode. |
|
||||
./Ultra for running in interative mode. |
|
||||
The macro VisDirect.mac is executed. |
|
||||
|
|
||||
Several macros are available for interactive visualisation. |
|
||||
While in interactive mode type the command |
|
||||
/control/execute "name_of_macro",
|
||||
where "name_of_macro" is one of the following:
|
||||
|
||||
Direct.mac - a beam of photons is shot directly to the telescope. |
|
||||
Mirror.mac - the beam is directed to a specular reflecing surface |
|
||||
Ground.mac - the beam is directed to a diffusively reflecting surface|
|
||||
|
||||
------------------------------------------------------------------------
|
||||
----> Simulation output |
|
||||
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
/gps/particle opticalphoton
|
||||
/gps/energy 3.0 eV
|
||||
/gps/direction 0.0 -1.0 0.0
|
||||
/gps/polarization 1.0 1.0 0.0
|
||||
|
||||
/gps/pos/type Plane
|
||||
/gps/pos/shape Circle
|
||||
/gps/pos/radius 20.0 cm
|
||||
|
||||
/gps/pos/rot1 1.0 0.0 0.0
|
||||
/gps/pos/rot2 0.0 0.0 -1.0
|
||||
/gps/pos/centre 0.0 90.0 150. cm
|
||||
|
||||
@@ -69,10 +69,8 @@ int main(int argc,char** argv) {
|
||||
#endif
|
||||
|
||||
// UserInitialization classes - mandatory
|
||||
UltraDetectorConstruction* detector = new UltraDetectorConstruction;
|
||||
UltraPhysicsList* list = new UltraPhysicsList();
|
||||
runManager->SetUserInitialization(detector);
|
||||
runManager->SetUserInitialization(list);
|
||||
runManager->SetUserInitialization(new UltraDetectorConstruction);
|
||||
runManager->SetUserInitialization(new UltraPhysicsList());
|
||||
|
||||
// UserAction classes - optional
|
||||
runManager->SetUserInitialization(new UltraActionInitializer());
|
||||
@@ -94,7 +92,7 @@ int main(int argc,char** argv) {
|
||||
// Define (G)UI for interactive mode
|
||||
if(argc==1)
|
||||
{
|
||||
UImanager->ApplyCommand("/control/execute Visualisation.mac");
|
||||
UImanager->ApplyCommand("/control/execute VisDirect.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
/control/execute OpenVis.mac
|
||||
/control/execute Direct.mac
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
############################################
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-10-05-beta-01 (29-June-2018)
|
||||
Geant4 version Name: geant4-10-05-ref-00 (7-December-2018)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -12,58 +12,6 @@
|
||||
WWW : http://geant4.org/
|
||||
**************************************************************
|
||||
|
||||
Visualization Manager instantiating with verbosity "warnings (3)"...
|
||||
Visualization Manager initialising...
|
||||
Registering graphics systems...
|
||||
|
||||
You have successfully registered the following graphics systems.
|
||||
Current available graphics systems are:
|
||||
ASCIITree (ATree)
|
||||
DAWNFILE (DAWNFILE)
|
||||
G4HepRep (HepRepXML)
|
||||
G4HepRepFile (HepRepFile)
|
||||
RayTracer (RayTracer)
|
||||
VRML1FILE (VRML1FILE)
|
||||
VRML2FILE (VRML2FILE)
|
||||
gMocrenFile (gMocrenFile)
|
||||
OpenGLImmediateQt (OGLIQt, OGLI)
|
||||
OpenGLStoredQt (OGLSQt, OGL, OGLS)
|
||||
OpenGLImmediateXm (OGLIXm, OGLIQt_FALLBACK)
|
||||
OpenGLStoredXm (OGLSXm, OGLSQt_FALLBACK)
|
||||
OpenGLImmediateX (OGLIX, OGLIQt_FALLBACK, OGLIXm_FALLBACK)
|
||||
OpenGLStoredX (OGLSX, OGLSQt_FALLBACK, OGLSXm_FALLBACK)
|
||||
RayTracerX (RayTracerX)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
You have successfully registered the following model factories.
|
||||
Registered model factories:
|
||||
generic
|
||||
drawByAttribute
|
||||
drawByCharge
|
||||
drawByOriginVolume
|
||||
drawByParticleID
|
||||
drawByEncounteredVolume
|
||||
|
||||
Registered filter factories:
|
||||
attributeFilter
|
||||
chargeFilter
|
||||
originVolumeFilter
|
||||
particleFilter
|
||||
encounteredVolumeFilter
|
||||
|
||||
You have successfully registered the following user vis actions.
|
||||
Run Duration User Vis Actions: none
|
||||
End of Event User Vis Actions: none
|
||||
End of Run User Vis Actions: none
|
||||
|
||||
Some /vis commands (optionally) take a string to specify colour.
|
||||
"/vis/list" to see available colours.
|
||||
/run/verbose 2
|
||||
/event/verbose 0
|
||||
/tracking/verbose 0
|
||||
/run/initialize
|
||||
userDetector->Construct() start.
|
||||
|
||||
***** Table : Nb of materials = 4 *****
|
||||
|
||||
@@ -127,6 +75,58 @@ userDetector->Construct() start.
|
||||
|
||||
|
||||
|
||||
Visualization Manager instantiating with verbosity "warnings (3)"...
|
||||
Visualization Manager initialising...
|
||||
Registering graphics systems...
|
||||
|
||||
You have successfully registered the following graphics systems.
|
||||
Current available graphics systems are:
|
||||
ASCIITree (ATree)
|
||||
DAWNFILE (DAWNFILE)
|
||||
G4HepRep (HepRepXML)
|
||||
G4HepRepFile (HepRepFile)
|
||||
RayTracer (RayTracer)
|
||||
VRML1FILE (VRML1FILE)
|
||||
VRML2FILE (VRML2FILE)
|
||||
gMocrenFile (gMocrenFile)
|
||||
OpenGLImmediateQt (OGLIQt, OGLI)
|
||||
OpenGLStoredQt (OGLSQt, OGL, OGLS)
|
||||
OpenGLImmediateXm (OGLIXm, OGLIQt_FALLBACK)
|
||||
OpenGLStoredXm (OGLSXm, OGLSQt_FALLBACK)
|
||||
OpenGLImmediateX (OGLIX, OGLIQt_FALLBACK, OGLIXm_FALLBACK)
|
||||
OpenGLStoredX (OGLSX, OGLSQt_FALLBACK, OGLSXm_FALLBACK)
|
||||
RayTracerX (RayTracerX)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
You have successfully registered the following model factories.
|
||||
Registered model factories:
|
||||
generic
|
||||
drawByAttribute
|
||||
drawByCharge
|
||||
drawByOriginVolume
|
||||
drawByParticleID
|
||||
drawByEncounteredVolume
|
||||
|
||||
Registered filter factories:
|
||||
attributeFilter
|
||||
chargeFilter
|
||||
originVolumeFilter
|
||||
particleFilter
|
||||
encounteredVolumeFilter
|
||||
|
||||
You have successfully registered the following user vis actions.
|
||||
Run Duration User Vis Actions: none
|
||||
End of Event User Vis Actions: none
|
||||
End of Run User Vis Actions: none
|
||||
|
||||
Some /vis commands (optionally) take a string to specify colour.
|
||||
"/vis/list" to see available colours.
|
||||
/run/verbose 2
|
||||
/event/verbose 0
|
||||
/tracking/verbose 0
|
||||
/run/initialize
|
||||
userDetector->Construct() start.
|
||||
|
||||
|
||||
|
||||
@@ -164,7 +164,6 @@ userDetector->Construct() start.
|
||||
# #
|
||||
# #
|
||||
######################################################
|
||||
Using mirror reflecting surface
|
||||
World is registered to the default region.
|
||||
physicsList->Construct() start.
|
||||
### Birks coefficients used in run time
|
||||
@@ -239,14 +238,14 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||
Voxelisation: top memory users:
|
||||
Percent Memory Heads Nodes Pointers Total CPU Volume
|
||||
------- -------- ------ ------ -------- ---------- ----------
|
||||
50.87 0k 3 11 24 0.00 World
|
||||
49.13 0k 1 13 26 0.00 LensMotherLV
|
||||
52.31 0k 1 13 26 0.00 LensMotherLV
|
||||
47.69 0k 3 9 22 0.00 World
|
||||
### Run 0 starts.
|
||||
ooo Run 0 starts (global).
|
||||
|
||||
--------- Ranlux engine status ---------
|
||||
Initial seed = 1530114067
|
||||
float_seed_table[] = 0.188293 0.490304 0.0825232 0.101945 0.316145 0.414369 0.665873 0.269078 0.990349 0.979141 0.543387 0.203802 0.948203 0.551859 0.292129 0.404647 0.672051 0.585644 0.109071 0.391517 0.304521 0.184678 0.832482 0.0944577
|
||||
Initial seed = 1544023047
|
||||
float_seed_table[] = 0.388647 0.452262 0.956626 0.567198 0.0222793 0.640822 0.0487022 0.853861 0.587637 0.812594 0.164311 0.86216 0.588282 0.672399 0.47142 0.502319 0.79472 0.0372033 0.662883 0.676855 0.719362 0.693128 0.848961 0.450234
|
||||
i_lag = 23, j_lag = 9
|
||||
carry = 0, count24 = 0
|
||||
luxury = 3 nskip = 199
|
||||
@@ -257,7 +256,7 @@ mu- Mono Plane
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100
|
||||
User=2.270000s Real=2.280977s Sys=0.000000s
|
||||
User=2.180000s Real=2.188978s Sys=0.000000s
|
||||
### Run 0 (global) ended.
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
@@ -272,9 +271,9 @@ G4SDManager deleted.
|
||||
EventManager deleted.
|
||||
Units table cleared.
|
||||
TransportationManager deleted.
|
||||
Total navigation history collections cleaned: 10
|
||||
Total navigation history collections cleaned: 9
|
||||
================== Deleting memory pools ===================
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.0135 MB
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.0115 MB
|
||||
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
|
||||
Pool ID '7G4Event', size : 0.000961 MB
|
||||
Pool ID '15G4PrimaryVertex', size : 0.000961 MB
|
||||
@@ -285,9 +284,9 @@ Pool ID '17G4DynamicParticle', size : 0.025 MB
|
||||
Pool ID '7G4Track', size : 0.049 MB
|
||||
Pool ID '18G4TouchableHistory', size : 0.000961 MB
|
||||
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
|
||||
Pool ID '15UltraOpticalHit', size : 0.00481 MB
|
||||
Pool ID '15UltraOpticalHit', size : 0.00385 MB
|
||||
Number of memory pools allocated: 12 of which, static: 0
|
||||
Dynamic pools deleted: 12 / Total memory freed: 0.1 MB
|
||||
Dynamic pools deleted: 12 / Total memory freed: 0.097 MB
|
||||
============================================================
|
||||
G4Allocator objects are deleted.
|
||||
UImanager deleted.
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: UltraActionInitializer.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -33,7 +31,6 @@
|
||||
#define UltraActionInitializer_h 1
|
||||
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
class G4GeneralParticleSource;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -46,8 +43,9 @@ public:
|
||||
|
||||
void Build() const;
|
||||
void BuildForMaster() const;
|
||||
|
||||
private:
|
||||
G4GeneralParticleSource* masterGPS;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
class G4VPhysicalVolume;
|
||||
class G4LogicalVolume;
|
||||
class G4SDManager;
|
||||
class G4OpticalSurface;
|
||||
class UltraDetectorMessenger;
|
||||
class UltraScintSD;
|
||||
class UltraPMTSD;
|
||||
class UltraFresnelLens;
|
||||
@@ -67,26 +69,31 @@ public:
|
||||
public:
|
||||
G4VPhysicalVolume* Construct();
|
||||
void ConstructSDandField();
|
||||
|
||||
|
||||
void SetReflectionType(G4String);
|
||||
|
||||
inline G4double GetLambdaMin() const {return lambda_min;}
|
||||
inline G4double GetLambdaMax() const {return lambda_max;}
|
||||
|
||||
private:
|
||||
|
||||
// Methods to build ULTRA
|
||||
G4VPhysicalVolume *ConstructUVscope(G4VPhysicalVolume *);
|
||||
G4VPhysicalVolume *ConstructMirror(G4VPhysicalVolume *);
|
||||
G4VPhysicalVolume *ConstructGround(G4VPhysicalVolume *);
|
||||
UltraFresnelLens *FresnelLens ;
|
||||
|
||||
void ConstructUVscope();
|
||||
void ConstructReflector();
|
||||
void SetReflectorOpticalProperties();
|
||||
|
||||
// Material definitions
|
||||
void ConstructTableMaterials();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
G4LogicalVolume* logicalPMT;
|
||||
|
||||
UltraDetectorMessenger *fDetectorMessenger;
|
||||
G4VPhysicalVolume *fWorld_phys ;
|
||||
UltraFresnelLens *FresnelLens ;
|
||||
G4OpticalSurface *fReflectorOpticalSurface;
|
||||
G4LogicalVolume *logicalPMT;
|
||||
G4LogicalVolume *fReflectorLog;
|
||||
G4String fReflectionType;
|
||||
G4bool fIsReflectorConstructed;
|
||||
|
||||
G4double lambda_min ;
|
||||
G4double lambda_max ;
|
||||
};
|
||||
|
||||
@@ -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 UltraDetectorMessenger_h
|
||||
#define UltraDetectorMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class UltraDetectorConstruction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAString;
|
||||
|
||||
|
||||
class UltraDetectorMessenger: public G4UImessenger
|
||||
{
|
||||
friend class UltraDetectorConstruction;
|
||||
|
||||
public:
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
|
||||
UltraDetectorMessenger(UltraDetectorConstruction* );
|
||||
~UltraDetectorMessenger();
|
||||
UltraDetectorConstruction* fDetector;// pointer to detector
|
||||
G4UIdirectory* fDetectorDir;
|
||||
G4UIcmdWithAString* fMirrorCmd; // change surface reflective properties
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,17 +23,15 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: UltraActionInitializer.cc 66241 2012-12-13 18:34:42Z gunter $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "UltraActionInitializer.hh"
|
||||
|
||||
#include "UltraPrimaryGeneratorAction.hh"
|
||||
#include "UltraRunAction.hh"
|
||||
#include "UltraEventAction.hh"
|
||||
|
||||
#include "G4GeneralParticleSource.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
@@ -44,67 +42,12 @@
|
||||
|
||||
UltraActionInitializer::UltraActionInitializer() :
|
||||
G4VUserActionInitialization()
|
||||
{
|
||||
//Note: We instantiate a GPS here, because we want to set the defaults.
|
||||
//Since GPS distributions are shared among threads, we need to be sure
|
||||
//that defaults are done only once.
|
||||
//See comments in file G4GeneralParticleSource.hh
|
||||
masterGPS = new G4GeneralParticleSource();
|
||||
// Define here the user default properties for the General Particle Source (GPS)
|
||||
// Can be modified through the GPS Messenger (/gps/... commands)
|
||||
|
||||
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String particleName;
|
||||
|
||||
G4ParticleDefinition* opticalphoton = particleTable->FindParticle(particleName="opticalphoton");
|
||||
|
||||
//....PARTICLE DEFINITIONS
|
||||
masterGPS->SetParticleDefinition(opticalphoton);
|
||||
|
||||
G4ThreeVector Polarization = G4ThreeVector(1.,1.,0.) ;
|
||||
masterGPS->SetParticlePolarization(Polarization);
|
||||
|
||||
// DEFINE A MONO-ENERGETIC SOURCE
|
||||
G4SPSEneDistribution *eneDist = masterGPS->GetCurrentSource()->GetEneDist() ;
|
||||
eneDist->SetEnergyDisType("Mono");
|
||||
eneDist->SetMonoEnergy(3.0*eV);
|
||||
|
||||
// SET POSITION DISTRIBUTION
|
||||
G4SPSPosDistribution *posDist = masterGPS->GetCurrentSource()->GetPosDist() ;
|
||||
posDist->SetPosDisType("Plane");
|
||||
posDist->SetPosDisShape("Circle");
|
||||
posDist->SetRadius(20.0*cm);
|
||||
|
||||
#ifdef ULTRA_MIRROR_USE
|
||||
#define ULTRA_REFLECTION_USE
|
||||
#endif
|
||||
|
||||
#ifdef ULTRA_GROUND_USE
|
||||
#define ULTRA_REFLECTION_USE
|
||||
#endif
|
||||
|
||||
G4SPSAngDistribution *angDist = masterGPS->GetCurrentSource()->GetAngDist() ;
|
||||
|
||||
#ifdef ULTRA_REFLECTION_USE
|
||||
angDist->SetParticleMomentumDirection(G4ThreeVector(0.0,-1.0,0.0)) ;
|
||||
posDist->SetPosRot1(G4ThreeVector(1.,0.,0.));
|
||||
posDist->SetPosRot2(G4ThreeVector(0.,0.,-1.));
|
||||
posDist->SetCentreCoords(G4ThreeVector(0.0*cm,90.0*cm,150.0*cm));
|
||||
|
||||
#else
|
||||
angDist->SetParticleMomentumDirection(G4ThreeVector(0.0,0.0,-1.0)) ;
|
||||
posDist->SetCentreCoords(G4ThreeVector(0.0*cm,0.0*cm,150.0*cm));
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
UltraActionInitializer::~UltraActionInitializer()
|
||||
{
|
||||
delete masterGPS;
|
||||
}
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -46,11 +46,15 @@
|
||||
#include <cmath>
|
||||
|
||||
#include "UltraDetectorConstruction.hh"
|
||||
#include "UltraDetectorMessenger.hh"
|
||||
#include "UltraPMTSD.hh"
|
||||
#include "UltraFresnelLens.hh"
|
||||
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4MTRunManager.hh"
|
||||
#include "G4GeometryManager.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4Element.hh"
|
||||
@@ -73,25 +77,33 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
UltraDetectorConstruction::UltraDetectorConstruction() :
|
||||
logicalPMT(0)
|
||||
fReflectorOpticalSurface(0),
|
||||
logicalPMT(0),
|
||||
fReflectorLog(0),
|
||||
fIsReflectorConstructed(false)
|
||||
{
|
||||
// Define wavelength limits for materials definition
|
||||
lambda_min = 200*nm ;
|
||||
lambda_max = 700*nm ;
|
||||
lambda_max = 700*nm ;
|
||||
|
||||
fDetectorMessenger = new UltraDetectorMessenger(this);
|
||||
|
||||
ConstructTableMaterials();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
UltraDetectorConstruction::~UltraDetectorConstruction(){;}
|
||||
UltraDetectorConstruction::~UltraDetectorConstruction()
|
||||
{
|
||||
delete fDetectorMessenger;
|
||||
|
||||
delete fReflectorOpticalSurface;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4VPhysicalVolume* UltraDetectorConstruction::Construct()
|
||||
{
|
||||
ConstructTableMaterials();
|
||||
|
||||
|
||||
|
||||
// The experimental Hall
|
||||
// ---------------------
|
||||
|
||||
@@ -103,13 +115,12 @@ G4VPhysicalVolume* UltraDetectorConstruction::Construct()
|
||||
|
||||
// Get Air pointer from static funcion - (G4Material::GetMaterial)
|
||||
|
||||
G4String name;
|
||||
G4Material *Air = G4Material::GetMaterial(name = "Air");
|
||||
G4LogicalVolume *World_log ;
|
||||
World_log = new G4LogicalVolume(World_box,Air,"World",0,0,0);
|
||||
G4String name;
|
||||
G4Material *Air = G4Material::GetMaterial(name = "Air");
|
||||
G4LogicalVolume *World_log ;
|
||||
World_log = new G4LogicalVolume(World_box,Air,"World",0,0,0);
|
||||
|
||||
G4VPhysicalVolume *World_phys ;
|
||||
World_phys = new G4PVPlacement(0,G4ThreeVector(),"World",World_log,0,false,0);
|
||||
fWorld_phys = new G4PVPlacement(0,G4ThreeVector(),"World",World_log,0,false,0);
|
||||
|
||||
G4VisAttributes* UniverseVisAtt = new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
UniverseVisAtt->SetVisibility(true);
|
||||
@@ -128,35 +139,16 @@ World_phys = new G4PVPlacement(0,G4ThreeVector(),"World",World_log,0,false,0);
|
||||
G4cout << "# #" << G4endl ;
|
||||
G4cout << "# #" << G4endl ;
|
||||
|
||||
ConstructUVscope(World_phys);
|
||||
ConstructUVscope();
|
||||
|
||||
|
||||
G4cout << "# #" << G4endl ;
|
||||
G4cout << "# #" << G4endl ;
|
||||
G4cout << "######################################################" << G4endl ;
|
||||
|
||||
fIsReflectorConstructed = false;
|
||||
|
||||
#ifdef ULTRA_MIRROR_USE
|
||||
|
||||
G4cout << "Using mirror reflecting surface " << G4endl ;
|
||||
|
||||
// G4VPhysicalVolume* Mirror =
|
||||
ConstructMirror(World_phys);
|
||||
|
||||
#elif ULTRA_GROUND_USE
|
||||
|
||||
G4cout << "Using ground reflecting surface " << G4endl ;
|
||||
|
||||
// G4VPhysicalVolume* Ground =
|
||||
ConstructGround(World_phys);
|
||||
|
||||
#else
|
||||
|
||||
G4cout << "No reflecting surface used" << G4endl ;
|
||||
|
||||
#endif
|
||||
|
||||
return World_phys;
|
||||
return fWorld_phys;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -357,126 +349,79 @@ void UltraDetectorConstruction::ConstructTableMaterials()
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4VPhysicalVolume* UltraDetectorConstruction::ConstructMirror(G4VPhysicalVolume *World_phys){
|
||||
void UltraDetectorConstruction::ConstructReflector()
|
||||
{
|
||||
const G4double x = 40.0*cm;
|
||||
const G4double y = 40.0*cm;
|
||||
const G4double z = 1*cm;
|
||||
|
||||
G4double Mirror_x = 40.0*cm;
|
||||
G4double Mirror_y = 40.0*cm;
|
||||
G4double Mirror_z = 1*cm;
|
||||
|
||||
G4Box * boxMirror = new G4Box("Mirror",Mirror_x,Mirror_y,Mirror_z);
|
||||
G4Box * box = new G4Box("Mirror",x,y,z);
|
||||
|
||||
// Get Air pointer from static funcion - (G4Material::GetMaterial)
|
||||
|
||||
G4String name;
|
||||
G4Material *Al = G4Material::GetMaterial(name = "Aluminum");
|
||||
G4LogicalVolume *logMirror ;
|
||||
logMirror = new G4LogicalVolume(boxMirror,Al,"Mirror",0,0,0);
|
||||
G4String name;
|
||||
G4Material *Al = G4Material::GetMaterial(name = "Aluminum");
|
||||
|
||||
fReflectorLog = new G4LogicalVolume(box,Al,"Reflector",0,0,0);
|
||||
|
||||
G4ThreeVector SurfacePosition = G4ThreeVector(0*m,0*m,1.5*m) ;
|
||||
G4ThreeVector SurfacePosition = G4ThreeVector(0*m,0*m,1.5*m) ;
|
||||
|
||||
// Rotate reflecting surface by 45. degrees around the OX axis.
|
||||
// Rotate reflecting surface by 45. degrees around the OX axis.
|
||||
|
||||
G4RotationMatrix *Surfrot = new G4RotationMatrix(G4ThreeVector(1.0,0.0,0.0),-pi/4.);
|
||||
G4RotationMatrix *Surfrot = new G4RotationMatrix(G4ThreeVector(1.0,0.0,0.0),-pi/4.);
|
||||
|
||||
G4VPhysicalVolume *physMirror ;
|
||||
physMirror = new G4PVPlacement(Surfrot,SurfacePosition,"MirrorPV",logMirror,World_phys,false,0);
|
||||
new G4PVPlacement(Surfrot,SurfacePosition,"MirrorPV",fReflectorLog,fWorld_phys,false,0);
|
||||
|
||||
G4VisAttributes* SurfaceVisAtt = new G4VisAttributes(G4Colour(0.0,0.0,1.0));
|
||||
SurfaceVisAtt->SetVisibility(true);
|
||||
SurfaceVisAtt->SetForceWireframe(true);
|
||||
logMirror->SetVisAttributes(SurfaceVisAtt);
|
||||
G4VisAttributes* SurfaceVisAtt = new G4VisAttributes(G4Colour(0.0,0.0,1.0));
|
||||
SurfaceVisAtt->SetVisibility(true);
|
||||
SurfaceVisAtt->SetForceWireframe(true);
|
||||
fReflectorLog->SetVisAttributes(SurfaceVisAtt);
|
||||
|
||||
fReflectorOpticalSurface = new G4OpticalSurface("ReflectorOpticalSurface");
|
||||
fReflectorOpticalSurface->SetModel(unified);
|
||||
fReflectorOpticalSurface->SetType(dielectric_dielectric);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Optical properties of the interface between the Air and Reflective Surface
|
||||
// For Mirror, reflectivity is set at 95% and specular reflection is assumed.
|
||||
const G4int NUM = 2;
|
||||
G4double XX[NUM] = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
|
||||
G4double ICEREFLECTIVITY[NUM] = { 0.95, 0.95 };
|
||||
|
||||
G4MaterialPropertiesTable *AirMirrorMPT = new G4MaterialPropertiesTable();
|
||||
AirMirrorMPT->AddProperty("REFLECTIVITY", XX, ICEREFLECTIVITY,NUM);
|
||||
fReflectorOpticalSurface->SetMaterialPropertiesTable(AirMirrorMPT);
|
||||
|
||||
G4OpticalSurface *OpticalAirMirror = new G4OpticalSurface("AirMirrorSurface");
|
||||
OpticalAirMirror->SetModel(unified);
|
||||
OpticalAirMirror->SetType(dielectric_dielectric);
|
||||
OpticalAirMirror->SetFinish(polishedfrontpainted);
|
||||
new G4LogicalSkinSurface("ReflectorSurface",fReflectorLog,fReflectorOpticalSurface);
|
||||
|
||||
const G4int NUM = 2;
|
||||
G4double XX[NUM] = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
|
||||
G4double ICEREFLECTIVITY[NUM] = { 0.95, 0.95 };
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MTRunManager* runManager = G4MTRunManager::GetMasterRunManager();
|
||||
//runManager->SetNumberOfThreads(2);
|
||||
#else
|
||||
G4RunManager* runManager = G4RunManager::GetRunManager();
|
||||
#endif
|
||||
|
||||
G4MaterialPropertiesTable *AirMirrorMPT = new G4MaterialPropertiesTable();
|
||||
AirMirrorMPT->AddProperty("REFLECTIVITY", XX, ICEREFLECTIVITY,NUM);
|
||||
OpticalAirMirror->SetMaterialPropertiesTable(AirMirrorMPT);
|
||||
|
||||
|
||||
|
||||
new G4LogicalBorderSurface("Air/Mirror Surface",World_phys,physMirror,OpticalAirMirror);
|
||||
|
||||
return physMirror ;
|
||||
runManager->GeometryHasBeenModified();
|
||||
|
||||
fIsReflectorConstructed = true;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4VPhysicalVolume* UltraDetectorConstruction::ConstructGround(G4VPhysicalVolume *World_phys){
|
||||
|
||||
G4double Ground_x = 40.0*cm;
|
||||
G4double Ground_y = 40.0*cm;
|
||||
G4double Ground_z = 1*cm;
|
||||
|
||||
G4Box * boxGround = new G4Box("Ground",Ground_x,Ground_y,Ground_z);
|
||||
|
||||
// Get Air pointer from static funcion - (G4Material::GetMaterial)
|
||||
|
||||
G4String name;
|
||||
G4Material *Al = G4Material::GetMaterial(name = "Aluminum");
|
||||
G4LogicalVolume *logGround ;
|
||||
logGround = new G4LogicalVolume(boxGround,Al,"Ground",0,0,0);
|
||||
|
||||
|
||||
G4ThreeVector SurfacePosition = G4ThreeVector(0*m,0*m,1.5*m) ;
|
||||
|
||||
// Rotate reflecting surface by 45. degrees around the OX axis.
|
||||
|
||||
G4RotationMatrix *Surfrot = new G4RotationMatrix(G4ThreeVector(1.0,0.0,0.0),-pi/4.);
|
||||
|
||||
G4VPhysicalVolume *physGround ;
|
||||
physGround = new G4PVPlacement(Surfrot,SurfacePosition,"GroundPV",logGround,World_phys,false,0);
|
||||
|
||||
G4VisAttributes* SurfaceVisAtt = new G4VisAttributes(G4Colour(0.0,0.0,1.0));
|
||||
SurfaceVisAtt->SetVisibility(true);
|
||||
SurfaceVisAtt->SetForceWireframe(true);
|
||||
logGround->SetVisAttributes(SurfaceVisAtt);
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Optical properties of the interface between the Air and Reflective Surface
|
||||
// For Ground, reflectivity is set to 95% and diffusive reflection is assumed.
|
||||
|
||||
|
||||
G4OpticalSurface *OpticalAirGround = new G4OpticalSurface("AirGroundSurface");
|
||||
OpticalAirGround->SetModel(unified);
|
||||
OpticalAirGround->SetType(dielectric_dielectric);
|
||||
OpticalAirGround->SetFinish(groundfrontpainted);
|
||||
|
||||
const G4int NUM = 2;
|
||||
G4double XX[NUM] = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
|
||||
G4double ICEREFLECTIVITY[NUM] = { 0.95, 0.95 };
|
||||
|
||||
G4MaterialPropertiesTable *AirGroundMPT = new G4MaterialPropertiesTable();
|
||||
AirGroundMPT->AddProperty("REFLECTIVITY", XX, ICEREFLECTIVITY,NUM);
|
||||
OpticalAirGround->SetMaterialPropertiesTable(AirGroundMPT);
|
||||
|
||||
|
||||
new G4LogicalBorderSurface("Air/Ground Surface",World_phys,physGround,OpticalAirGround);
|
||||
|
||||
return physGround ;
|
||||
|
||||
void UltraDetectorConstruction::SetReflectorOpticalProperties()
|
||||
{
|
||||
if (fReflectionType == "ground") {
|
||||
G4cout << "Using ground reflecting surface " << G4endl ;
|
||||
if (fReflectorOpticalSurface)
|
||||
fReflectorOpticalSurface->SetFinish(groundfrontpainted);
|
||||
}
|
||||
else {
|
||||
G4cout << "Using mirror reflecting surface " << G4endl ;
|
||||
if (fReflectorOpticalSurface)
|
||||
fReflectorOpticalSurface->SetFinish(polishedfrontpainted);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4VPhysicalVolume* UltraDetectorConstruction::ConstructUVscope(G4VPhysicalVolume *World_phys)
|
||||
void UltraDetectorConstruction::ConstructUVscope()
|
||||
{
|
||||
|
||||
// ------------- Volumes --------------
|
||||
@@ -509,7 +454,7 @@ G4VPhysicalVolume* UltraDetectorConstruction::ConstructUVscope(G4VPhysicalVolume
|
||||
G4LogicalVolume *logicUVscope =
|
||||
new G4LogicalVolume(solidUVscope,Al,"UVscopeLV",0,0,0);
|
||||
G4VPhysicalVolume *physicalUVscope =
|
||||
new G4PVPlacement(0,UVscopePosition,"UVSCopePV",logicUVscope,World_phys,false,0);
|
||||
new G4PVPlacement(0,UVscopePosition,"UVSCopePV",logicUVscope,fWorld_phys,false,0);
|
||||
|
||||
|
||||
//////////////////////////////////////
|
||||
@@ -525,7 +470,7 @@ G4VPhysicalVolume* UltraDetectorConstruction::ConstructUVscope(G4VPhysicalVolume
|
||||
G4ThreeVector UVscopeBackPosition ;
|
||||
UVscopeBackPosition = UVscopePosition+G4ThreeVector(0.0*mm,0.0*mm,-(UVscopeHeight/2.0+UVscopeThickness/2.0)) ;
|
||||
G4VPhysicalVolume *physicalUVscopeBack =
|
||||
new G4PVPlacement(0,UVscopeBackPosition,"UVscopeBack",logicUVscopeBack,World_phys,false,0);
|
||||
new G4PVPlacement(0,UVscopeBackPosition,"UVscopeBack",logicUVscopeBack,fWorld_phys,false,0);
|
||||
|
||||
|
||||
|
||||
@@ -546,7 +491,7 @@ G4VPhysicalVolume* UltraDetectorConstruction::ConstructUVscope(G4VPhysicalVolume
|
||||
G4ThreeVector LensPosition = UVscopePosition+G4ThreeVector(0.0*mm,0.0*mm,UVscopeHeight/2.0-UVscopeBaffle) ;
|
||||
|
||||
|
||||
FresnelLens = new UltraFresnelLens(LensDiameter,LensNumOfGrooves,LensMaterial,World_phys,LensPosition) ;
|
||||
FresnelLens = new UltraFresnelLens(LensDiameter,LensNumOfGrooves,LensMaterial,fWorld_phys,LensPosition) ;
|
||||
|
||||
|
||||
///////////////////////////////////
|
||||
@@ -560,7 +505,7 @@ G4VPhysicalVolume* UltraDetectorConstruction::ConstructUVscope(G4VPhysicalVolume
|
||||
LensFramePosition = LensPosition+G4ThreeVector(0.0*mm,0.0*mm,-((FresnelLens->GetThickness())/2.0+solidLensFrame->GetZHalfLength())) ;
|
||||
|
||||
G4VPhysicalVolume *physicalLensFrame =
|
||||
new G4PVPlacement(0,LensFramePosition,"LensFramePV",logicLensFrame,World_phys,false,0);
|
||||
new G4PVPlacement(0,LensFramePosition,"LensFramePV",logicLensFrame,fWorld_phys,false,0);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -591,7 +536,7 @@ G4VPhysicalVolume* UltraDetectorConstruction::ConstructUVscope(G4VPhysicalVolume
|
||||
// Rotate PMT window through the axis OX by an angle = 180. degrees
|
||||
|
||||
G4RotationMatrix *PMTrot = new G4RotationMatrix(G4ThreeVector(1.0,0.0,0.0),pi);
|
||||
new G4PVPlacement(PMTrot,PMTpos,"PMT1",logicalPMT,World_phys,false,0);
|
||||
new G4PVPlacement(PMTrot,PMTpos,"PMT1",logicalPMT,fWorld_phys,false,0);
|
||||
|
||||
|
||||
G4VisAttributes* PMTVisAtt = new G4VisAttributes(true,G4Colour(0.0,0.0,1.0)) ;
|
||||
@@ -622,11 +567,11 @@ G4VPhysicalVolume* UltraDetectorConstruction::ConstructUVscope(G4VPhysicalVolume
|
||||
|
||||
//OpticalAirPaint->DumpInfo();
|
||||
|
||||
new G4LogicalBorderSurface("Air/UVscope Cylinder Surface",World_phys,physicalUVscope,OpticalAirPaint);
|
||||
new G4LogicalBorderSurface("Air/UVscope Cylinder Surface",fWorld_phys,physicalUVscope,OpticalAirPaint);
|
||||
|
||||
new G4LogicalBorderSurface("Air/LensFrame Surface",World_phys,physicalLensFrame,OpticalAirPaint);
|
||||
new G4LogicalBorderSurface("Air/LensFrame Surface",fWorld_phys,physicalLensFrame,OpticalAirPaint);
|
||||
|
||||
new G4LogicalBorderSurface("Air/UVscope Back Cover Surface",World_phys,physicalUVscopeBack,OpticalAirPaint);
|
||||
new G4LogicalBorderSurface("Air/UVscope Back Cover Surface",fWorld_phys,physicalUVscopeBack,OpticalAirPaint);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -653,11 +598,30 @@ G4VPhysicalVolume* UltraDetectorConstruction::ConstructUVscope(G4VPhysicalVolume
|
||||
G4cout << "# UVscope is built ! ... #" << G4endl ;
|
||||
G4cout << "# #" << G4endl ;
|
||||
|
||||
return physicalUVscope;
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void UltraDetectorConstruction::SetReflectionType(G4String rtype)
|
||||
{
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MTRunManager* runManager = G4MTRunManager::GetMasterRunManager();
|
||||
//runManager->SetNumberOfThreads(2);
|
||||
#else
|
||||
G4RunManager* runManager = G4RunManager::GetRunManager();
|
||||
#endif
|
||||
|
||||
fReflectionType = rtype;
|
||||
|
||||
if (fReflectionType == "none") {
|
||||
if (fIsReflectorConstructed) {
|
||||
// Cleanup old geometry to delete reflecting surface
|
||||
runManager->ReinitializeGeometry(true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!fIsReflectorConstructed) {
|
||||
ConstructReflector();
|
||||
}
|
||||
SetReflectorOpticalProperties();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Code developed by:
|
||||
// B. Tomé
|
||||
//
|
||||
// *********************************
|
||||
// * *
|
||||
// * UltraDetectorMessenger.cc *
|
||||
// * *
|
||||
// *********************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#include "UltraDetectorMessenger.hh"
|
||||
#include "UltraDetectorConstruction.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
|
||||
|
||||
UltraDetectorMessenger::UltraDetectorMessenger( UltraDetectorConstruction* Det): fDetector(Det)
|
||||
{
|
||||
fDetectorDir = new G4UIdirectory("/detector/");
|
||||
fDetectorDir -> SetGuidance("Configuration of Ultra setup.");
|
||||
|
||||
fMirrorCmd = new G4UIcmdWithAString("/detector/reflection",this);
|
||||
fMirrorCmd -> SetGuidance("Define the type of reflecting surface. Default is none.");
|
||||
fMirrorCmd -> SetParameterName("choice",true);
|
||||
fMirrorCmd -> SetDefaultValue("none");
|
||||
fMirrorCmd -> SetCandidates("none specular ground");
|
||||
fMirrorCmd -> AvailableForStates(G4State_Idle);
|
||||
}
|
||||
|
||||
UltraDetectorMessenger::~UltraDetectorMessenger()
|
||||
{
|
||||
delete fMirrorCmd;
|
||||
delete fDetectorDir;
|
||||
}
|
||||
|
||||
void UltraDetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
// Select the type of reflection at ground
|
||||
if( command == fMirrorCmd ) {
|
||||
fDetector -> SetReflectionType(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,9 +117,9 @@ G4bool UltraPMTSD::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
G4cout << "*******************************" << G4endl;
|
||||
G4cout << " PMT HIT " << G4endl;
|
||||
G4cout << " Volume: " << thisVolume << G4endl;
|
||||
G4cout << " Photon energy (eV) : " << kineticEnergy/eV << G4endl;
|
||||
G4cout << " Photon energy (eV) : " << kineticEnergy/CLHEP::eV << G4endl;
|
||||
G4cout << " POSITION (mm) : "
|
||||
<< HitPosition.x()/mm << " " << HitPosition.y()/mm << " " << HitPosition.z()/mm << G4endl;
|
||||
<< HitPosition.x()/CLHEP::mm << " " << HitPosition.y()/CLHEP::mm << " " << HitPosition.z()/CLHEP::mm << G4endl;
|
||||
G4cout << "*******************************" << G4endl;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -60,11 +60,7 @@
|
||||
|
||||
UltraPrimaryGeneratorAction::UltraPrimaryGeneratorAction()
|
||||
{
|
||||
|
||||
particleGun = new G4GeneralParticleSource();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -88,11 +84,8 @@ void UltraPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
|
||||
|
||||
// Check if optical photon wavelength is within limits set for material optical properties tables.
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
particleGun->GeneratePrimaryVertex(anEvent);
|
||||
|
||||
if (particleGun->GetParticleDefinition()->GetParticleName() == "opticalphoton"){
|
||||
|
||||
Reference in New Issue
Block a user