Import Geant4 9.6.0 source tree
This commit is contained in:
@@ -1,18 +1,69 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
||||
project(exampleB02)
|
||||
project(B02)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Find Geant4 package, no UI and Vis drivers activated
|
||||
#
|
||||
find_package(Geant4 REQUIRED)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup Geant4 include directories and compile definitions
|
||||
#
|
||||
include(${Geant4_USE_FILE})
|
||||
|
||||
find_package(AIDA QUIET)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Find AIDA (required package)
|
||||
#
|
||||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
||||
find_package(AIDA QUIET)
|
||||
if(NOT AIDA_FOUND)
|
||||
message(STATUS "G4 TESTS: AIDA package not found. --> exampleB02 disabled")
|
||||
message(STATUS "G4 Examples: AIDA package not found. --> B02 example disabled")
|
||||
return()
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${Geant4_INCLUDE_DIR})
|
||||
file(GLOB sources ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc)
|
||||
#----------------------------------------------------------------------------
|
||||
# Locate sources and headers for this project
|
||||
#
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include
|
||||
${Geant4_INCLUDE_DIR}
|
||||
${AIDA_INCLUDE_DIR})
|
||||
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
|
||||
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
|
||||
|
||||
add_executable(exampleB02 EXCLUDE_FROM_ALL exampleB02.cc ${sources})
|
||||
target_link_libraries(exampleB02 ${Geant4_LIBRARIES})
|
||||
#----------------------------------------------------------------------------
|
||||
# Add the executable, and link it to the Geant4 libraries
|
||||
#
|
||||
add_executable(exampleB02 exampleB02.cc ${sources} ${headers})
|
||||
target_link_libraries(exampleB02 ${Geant4_LIBRARIES} ${AIDA_LIBRARIES} )
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Copy all scripts to the build directory, i.e. the directory in which we
|
||||
# build B02. This is so that we can run the executable directly because it
|
||||
# relies on these scripts being in the current working directory.
|
||||
#
|
||||
set(B02_SCRIPTS
|
||||
exampleB02.out
|
||||
)
|
||||
|
||||
foreach(_script ${B02_SCRIPTS})
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/${_script}
|
||||
${PROJECT_BINARY_DIR}/${_script}
|
||||
COPYONLY
|
||||
)
|
||||
endforeach()
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Add program to the project targets
|
||||
# (this avoids the need of typing the program name after make)
|
||||
#
|
||||
add_custom_target(B02 DEPENDS exampleB02)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
|
||||
#
|
||||
install(TARGETS exampleB02 DESTINATION bin)
|
||||
|
||||
|
||||
@@ -17,6 +17,11 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
8 November 2012 Ivana Hrivnacova - B02-V09-05-00
|
||||
- Adding explicit use of system of units (missing in B02PhysicsList)
|
||||
- Fixed the order of deleting AIDA factories
|
||||
- Removed FindAIDA.cmake (now provided in Geant4 modules)
|
||||
|
||||
30 November 2010 Ivana Hrivnacova - B02-V09-03-00
|
||||
- Migrated to use particle-based multiple-scattering.
|
||||
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/exampleB02.cc
|
||||
/// \brief Main program of the biasing/B02 example
|
||||
//
|
||||
// $Id: exampleB02.cc,v 1.22 2007-06-22 13:38:55 ahoward Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -59,6 +61,7 @@
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "B02DetectorConstruction.hh"
|
||||
#include "B02PhysicsList.hh"
|
||||
@@ -209,9 +212,9 @@ int main(int , char **)
|
||||
tree->commit();
|
||||
tree->close();
|
||||
|
||||
delete af;
|
||||
delete tf;
|
||||
delete tree;
|
||||
delete tf;
|
||||
delete af;
|
||||
|
||||
pgs.ClearSampling();
|
||||
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/include/B02CellScorer.hh
|
||||
/// \brief Definition of the B02CellScorer class
|
||||
//
|
||||
// $Id: B02CellScorer.hh,v 1.3 2006-06-29 16:34:25 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class B02CellScorer
|
||||
@@ -54,11 +56,11 @@ public:
|
||||
B02CellScorer(AIDA::IHistogram1D *h);
|
||||
virtual ~B02CellScorer();
|
||||
virtual void ScoreAnExitingStep(const G4Step &aStep,
|
||||
const G4GeometryCell &gCell);
|
||||
const G4GeometryCell &gCell);
|
||||
virtual void ScoreAnEnteringStep(const G4Step &aStep,
|
||||
const G4GeometryCell &gCell);
|
||||
const G4GeometryCell &gCell);
|
||||
virtual void ScoreAnInVolumeStep(const G4Step &aStep,
|
||||
const G4GeometryCell &gCell);
|
||||
const G4GeometryCell &gCell);
|
||||
|
||||
G4CellScorer &GetG4CellScorer(){
|
||||
return fG4CellScorer;
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/include/B02CellScorerStore.hh
|
||||
/// \brief Definition of the B02CellScorerStore class
|
||||
//
|
||||
// $Id: B02CellScorerStore.hh,v 1.3 2006-06-29 16:34:27 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class B02CellScorerStore
|
||||
@@ -71,7 +73,7 @@ public:
|
||||
const G4MapGeometryCellCellScorer &GetMapGeometryCellCellScorer() ;
|
||||
|
||||
void AddB02CellScorer(B02CellScorer *b02cellScorer,
|
||||
const G4GeometryCell &gCell);
|
||||
const G4GeometryCell &gCell);
|
||||
const B02MapGeometryCellB02CellScorer &GetMapGeometryCellB02CellScorer() const ;
|
||||
|
||||
private:
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/include/B02DetectorConstruction.hh
|
||||
/// \brief Definition of the B02DetectorConstruction class
|
||||
//
|
||||
// $Id: B02DetectorConstruction.hh,v 1.6 2007-06-22 13:38:55 ahoward Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#ifndef B02DetectorConstruction_hh
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/include/B02ImportanceDetectorConstruction.hh
|
||||
/// \brief Definition of the B02ImportanceDetectorConstruction class
|
||||
//
|
||||
// $Id: B02ImportanceDetectorConstruction.hh,v 1.7 2007-06-22 13:38:55 ahoward Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#ifndef B02ImportanceDetectorConstruction_hh
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/include/B02PSScoringDetectorConstruction.hh
|
||||
/// \brief Definition of the B02PSScoringDetectorConstruction class
|
||||
//
|
||||
// $Id: B02PSScoringDetectorConstruction.hh,v 1.2 2007-06-22 13:38:55 ahoward Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#ifndef B02PSScoringDetectorConstruction_hh
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/include/B02PVolumeStore.hh
|
||||
/// \brief Definition of the B02PVolumeStore class
|
||||
//
|
||||
// $Id: B02PVolumeStore.hh,v 1.3 2006-06-29 16:34:33 gunter Exp $
|
||||
//
|
||||
// $Id$
|
||||
// GEANT4 tag
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/include/B02PhysicsList.hh
|
||||
/// \brief Definition of the B02PhysicsList class
|
||||
//
|
||||
//
|
||||
#ifndef B02PhysicsList_h
|
||||
#define B02PhysicsList_h 1
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/include/B02PrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the B02PrimaryGeneratorAction class
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef B02PrimaryGeneratorAction_hh
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/include/B02Run.hh
|
||||
/// \brief Definition of the B02Run class
|
||||
//
|
||||
// $Id: B02Run.hh,v 1.2 2007-06-21 15:03:41 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
//---------------------------------------------------------------------
|
||||
// (Purpose)
|
||||
@@ -67,7 +69,7 @@ public:
|
||||
// and by collection name with full path.
|
||||
G4THitsMap<G4double>* GetHitsMap(G4int i){return theRunMap[i];}
|
||||
G4THitsMap<G4double>* GetHitsMap(const G4String& detName,
|
||||
const G4String& colName);
|
||||
const G4String& colName);
|
||||
G4THitsMap<G4double>* GetHitsMap(const G4String& fullName);
|
||||
// - Dump All HitsMap of this RUN.
|
||||
// This method calls G4THisMap::PrintAll() for individual HitsMap.
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/include/B02RunAction.hh
|
||||
/// \brief Definition of the B02RunAction class
|
||||
//
|
||||
// $Id: B02RunAction.hh,v 1.2 2007-06-21 15:03:43 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#ifndef B02RunAction_h
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B02ScoreTable.hh,v 1.1 2007-06-13 13:31:41 ahoward Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
/// \file biasing/B02/include/B02ScoreTable.hh
|
||||
/// \brief Definition of the B02ScoreTable class
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class B02ScoreTable
|
||||
@@ -60,18 +62,18 @@ public: // with description
|
||||
~B02ScoreTable();
|
||||
|
||||
void Print(const G4MapGeometryCellCellScorer &cs,
|
||||
std::ostream *out = 0);
|
||||
std::ostream *out = 0);
|
||||
// create the table and print it to the ouput stream.
|
||||
|
||||
void PrintHeader(std::ostream *out);
|
||||
// print the table header, done by the above Print() function
|
||||
|
||||
void PrintTable(const G4MapGeometryCellCellScorer &cs,
|
||||
std::ostream *out);
|
||||
std::ostream *out);
|
||||
// print the table contend, done by the above Print() function
|
||||
|
||||
std::string FillString(const std::string &name,
|
||||
char c, G4int n, G4bool back = true);
|
||||
char c, G4int n, G4bool back = true);
|
||||
// create a string of length n, by filling up
|
||||
// name with the char c.
|
||||
|
||||
@@ -81,8 +83,8 @@ private:
|
||||
|
||||
G4String CreateName(const G4GeometryCell &gCell);
|
||||
void PrintLine(const G4String &name,
|
||||
const G4CellScoreValues &sc_scores,
|
||||
std::ostream *out);
|
||||
const G4CellScoreValues &sc_scores,
|
||||
std::ostream *out);
|
||||
const G4VIStore *fIStore;
|
||||
G4int FieldName;
|
||||
G4int FieldValue;
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/include/B02ScoringDetectorConstruction.hh
|
||||
/// \brief Definition of the B02ScoringDetectorConstruction class
|
||||
//
|
||||
// $Id: B02ScoringDetectorConstruction.hh,v 1.3 2006-06-29 16:34:40 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#ifndef B02ScoringDetectorConstruction_hh
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/src/B02CellScorer.cc
|
||||
/// \brief Implementation of the B02CellScorer class
|
||||
//
|
||||
// $Id: B02CellScorer.cc,v 1.2 2006-06-29 16:34:42 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -48,19 +50,19 @@ B02CellScorer::~B02CellScorer()
|
||||
{}
|
||||
|
||||
void B02CellScorer::ScoreAnExitingStep(const G4Step &aStep,
|
||||
const G4GeometryCell &pre_gCell){
|
||||
const G4GeometryCell &pre_gCell){
|
||||
fG4CellScorer.ScoreAnExitingStep(aStep, pre_gCell);
|
||||
FillHisto(aStep);
|
||||
}
|
||||
|
||||
void B02CellScorer::ScoreAnEnteringStep(const G4Step &aStep,
|
||||
const G4GeometryCell &post_gCell){
|
||||
const G4GeometryCell &post_gCell){
|
||||
fG4CellScorer.ScoreAnEnteringStep(aStep, post_gCell);
|
||||
return;
|
||||
}
|
||||
|
||||
void B02CellScorer::ScoreAnInVolumeStep(const G4Step &aStep,
|
||||
const G4GeometryCell &post_gCell){
|
||||
const G4GeometryCell &post_gCell){
|
||||
fG4CellScorer.ScoreAnInVolumeStep(aStep, post_gCell);
|
||||
FillHisto(aStep);
|
||||
}
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/src/B02CellScorerStore.cc
|
||||
/// \brief Implementation of the B02CellScorerStore class
|
||||
//
|
||||
// $Id: B02CellScorerStore.cc,v 1.3 2006-06-29 16:34:44 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -51,7 +53,7 @@ AddG4CellScorer(const G4GeometryCell &g) {
|
||||
|
||||
void B02CellScorerStore::
|
||||
AddB02CellScorer(B02CellScorer *b02scorer,
|
||||
const G4GeometryCell &g) {
|
||||
const G4GeometryCell &g) {
|
||||
fMapGeometryCellB02CellScorer[g] = b02scorer;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/src/B02DetectorConstruction.cc
|
||||
/// \brief Implementation of the B02DetectorConstruction class
|
||||
//
|
||||
// $Id: B02DetectorConstruction.cc,v 1.13 2007-06-13 13:31:41 ahoward Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
#include "G4Types.hh"
|
||||
#include "globals.hh"
|
||||
@@ -40,6 +42,8 @@
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
// for importance biasing
|
||||
#include "G4IStore.hh"
|
||||
@@ -166,7 +170,7 @@ G4VPhysicalVolume* B02DetectorConstruction::Construct()
|
||||
name = "shieldWorld";
|
||||
G4VPhysicalVolume *pWorldVolume = new
|
||||
G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
|
||||
name, 0, false, 0);
|
||||
name, 0, false, 0);
|
||||
|
||||
|
||||
// creating 18 slobs of 10 cm thick concrete
|
||||
@@ -203,12 +207,12 @@ G4VPhysicalVolume* B02DetectorConstruction::Construct()
|
||||
pos_z = 0;
|
||||
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aShield_log,
|
||||
name,
|
||||
worldCylinder_log,
|
||||
false,
|
||||
0);
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aShield_log,
|
||||
name,
|
||||
worldCylinder_log,
|
||||
false,
|
||||
0);
|
||||
|
||||
|
||||
return pWorldVolume;
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/src/B02ImportanceDetectorConstruction.cc
|
||||
/// \brief Implementation of the B02ImportanceDetectorConstruction class
|
||||
//
|
||||
// $Id: B02ImportanceDetectorConstruction.cc,v 1.11 2007-06-22 13:38:55 ahoward Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "globals.hh"
|
||||
@@ -38,6 +40,8 @@
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
// For Primitive Scorers
|
||||
#include "G4SDManager.hh"
|
||||
@@ -125,13 +129,13 @@ void B02ImportanceDetectorConstruction::Construct()
|
||||
G4double pos_z = startz + (i-1) * (2*hightShield);
|
||||
G4VPhysicalVolume *pvol =
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aShield_log,
|
||||
name,
|
||||
worldLogical,
|
||||
false,
|
||||
i);
|
||||
// 0);
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aShield_log,
|
||||
name,
|
||||
worldLogical,
|
||||
false,
|
||||
i);
|
||||
// 0);
|
||||
G4GeometryCell cell(*pvol, i);
|
||||
// G4GeometryCell cell(*pvol, 0);
|
||||
fPVolumeStore.AddPVolume(cell);
|
||||
@@ -149,11 +153,11 @@ void B02ImportanceDetectorConstruction::Construct()
|
||||
spanningAngleShield = 360*deg;
|
||||
|
||||
G4Tubs *aRest = new G4Tubs("Rest",
|
||||
innerRadiusShield,
|
||||
outerRadiusShield,
|
||||
hightShield,
|
||||
startAngleShield,
|
||||
spanningAngleShield);
|
||||
innerRadiusShield,
|
||||
outerRadiusShield,
|
||||
hightShield,
|
||||
startAngleShield,
|
||||
spanningAngleShield);
|
||||
|
||||
G4LogicalVolume *aRest_log =
|
||||
new G4LogicalVolume(aRest, Galactic, "aRest_log");
|
||||
@@ -168,13 +172,13 @@ void B02ImportanceDetectorConstruction::Construct()
|
||||
G4double pos_z = 95*cm;
|
||||
G4VPhysicalVolume *pvol =
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aRest_log,
|
||||
name,
|
||||
worldLogical,
|
||||
false,
|
||||
19);
|
||||
// 0);
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aRest_log,
|
||||
name,
|
||||
worldLogical,
|
||||
false,
|
||||
19);
|
||||
// 0);
|
||||
G4GeometryCell cell(*pvol, 19);
|
||||
// G4GeometryCell cell(*pvol, 0);
|
||||
fPVolumeStore.AddPVolume(cell);
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/src/B02PSScoringDetectorConstruction.cc
|
||||
/// \brief Implementation of the B02PSScoringDetectorConstruction class
|
||||
//
|
||||
// $Id: B02PSScoringDetectorConstruction.cc,v 1.2 2007-06-22 13:38:55 ahoward Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "globals.hh"
|
||||
@@ -38,6 +40,8 @@
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
// For Primitive Scorers
|
||||
#include "G4SDManager.hh"
|
||||
@@ -122,14 +126,13 @@ void B02PSScoringDetectorConstruction::Construct()
|
||||
G4double pos_x = 0*cm;
|
||||
G4double pos_y = 0*cm;
|
||||
G4double pos_z = startz + (i-1) * (2*hightShield);
|
||||
G4VPhysicalVolume *pvol =
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aShield_log,
|
||||
name,
|
||||
worldLogical,
|
||||
false,
|
||||
i);
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aShield_log,
|
||||
name,
|
||||
worldLogical,
|
||||
false,
|
||||
i);
|
||||
//G4GeometryCell cell(*pvol, i);
|
||||
//fPVolumeStore.AddPVolume(cell);
|
||||
}
|
||||
@@ -144,11 +147,11 @@ void B02PSScoringDetectorConstruction::Construct()
|
||||
spanningAngleShield = 360*deg;
|
||||
|
||||
G4Tubs *aRest = new G4Tubs("Rest",
|
||||
innerRadiusShield,
|
||||
outerRadiusShield,
|
||||
hightShield,
|
||||
startAngleShield,
|
||||
spanningAngleShield);
|
||||
innerRadiusShield,
|
||||
outerRadiusShield,
|
||||
hightShield,
|
||||
startAngleShield,
|
||||
spanningAngleShield);
|
||||
|
||||
G4LogicalVolume *aRest_log =
|
||||
new G4LogicalVolume(aRest, Galactic, "aRest_log");
|
||||
@@ -158,14 +161,13 @@ void B02PSScoringDetectorConstruction::Construct()
|
||||
G4double pos_x = 0*cm;
|
||||
G4double pos_y = 0*cm;
|
||||
G4double pos_z = 95*cm;
|
||||
G4VPhysicalVolume *pvol =
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aRest_log,
|
||||
name,
|
||||
worldLogical,
|
||||
false,
|
||||
19); // i = 19
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aRest_log,
|
||||
name,
|
||||
worldLogical,
|
||||
false,
|
||||
19); // i = 19
|
||||
//G4GeometryCell cell(*pvol, i);
|
||||
//fPVolumeStore.AddPVolume(cell);
|
||||
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/src/B02PVolumeStore.cc
|
||||
/// \brief Implementation of the B02PVolumeStore class
|
||||
//
|
||||
// $Id: B02PVolumeStore.cc,v 1.5 2006-06-29 16:34:50 gunter Exp $
|
||||
//
|
||||
// $Id$
|
||||
// GEANT4 tag
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -49,7 +52,7 @@ void B02PVolumeStore::AddPVolume(const G4GeometryCell &cell){
|
||||
fSetGeometryCell.find(cell);
|
||||
if (it != fSetGeometryCell.end()) {
|
||||
G4cout << "B02PVolumeStore::AddPVolume: cell already stored"
|
||||
<< G4endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -70,7 +73,7 @@ GetPVolume(const G4String &name) const {
|
||||
}
|
||||
if (!pvol) {
|
||||
G4cout << "B02PVolumeStore::GetPVolume: no physical volume named: "
|
||||
<< name << ", found" << G4endl;
|
||||
<< name << ", found" << G4endl;
|
||||
}
|
||||
return pvol;
|
||||
}
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/src/B02PhysicsList.cc
|
||||
/// \brief Implementation of the B02PhysicsList class
|
||||
//
|
||||
// $Id: B02PhysicsList.cc,v 1.8 2010-11-30 11:41:14 ivana Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "globals.hh"
|
||||
@@ -47,6 +49,7 @@
|
||||
#include "G4ShortLivedConstructor.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
B02PhysicsList::B02PhysicsList(): G4VUserPhysicsList()
|
||||
{
|
||||
@@ -306,7 +309,7 @@ void B02PhysicsList::ConstructHad()
|
||||
theHandler->SetMultiFragmentation(theMF);
|
||||
theHandler->SetMaxAandZForFermiBreakUp(12, 6);
|
||||
theHandler->SetMinEForMultiFrag(3*MeV);
|
||||
|
||||
|
||||
// Pre equilibrium stage
|
||||
G4PreCompoundModel * thePreEquilib = new G4PreCompoundModel(theHandler);
|
||||
|
||||
@@ -314,7 +317,7 @@ void B02PhysicsList::ConstructHad()
|
||||
// a no-cascade generator-precompound interaface
|
||||
G4GeneratorPrecompoundInterface * theCascade = new G4GeneratorPrecompoundInterface;
|
||||
theCascade->SetDeExcitation(thePreEquilib);
|
||||
|
||||
|
||||
// here come the high energy parts
|
||||
// the string model; still not quite according to design - Explicite use of the forseen interfaces
|
||||
// will be tested and documented in this program by beta-02 at latest.
|
||||
@@ -453,7 +456,7 @@ void B02PhysicsList::ConstructHad()
|
||||
G4LEAntiNeutronInelastic* theInelasticModel =
|
||||
new G4LEAntiNeutronInelastic;
|
||||
theInelasticProcess->RegisterMe(theInelasticModel);
|
||||
theInelasticProcess->RegisterMe(theTheoModel);
|
||||
theInelasticProcess->RegisterMe(theTheoModel);
|
||||
pmanager->AddDiscreteProcess(theInelasticProcess);
|
||||
}
|
||||
else if (particleName == "lambda") {
|
||||
@@ -653,11 +656,11 @@ void B02PhysicsList::AddScoringProcess(){
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
if ( !particle->IsShortLived() ){
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
pmanager->AddProcess(theParallelWorldScoringProcess);
|
||||
pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess,idxAtRest);
|
||||
pmanager->SetProcessOrdering(theParallelWorldScoringProcess,idxAlongStep,1);
|
||||
pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess,idxPostStep);
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
pmanager->AddProcess(theParallelWorldScoringProcess);
|
||||
pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess,idxAtRest);
|
||||
pmanager->SetProcessOrdering(theParallelWorldScoringProcess,idxAlongStep,1);
|
||||
pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess,idxPostStep);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/src/B02PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the B02PrimaryGeneratorAction class
|
||||
//
|
||||
// $Id: B02PrimaryGeneratorAction.cc,v 1.6 2006-06-29 16:34:55 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "globals.hh"
|
||||
@@ -36,6 +38,7 @@
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
B02PrimaryGeneratorAction::B02PrimaryGeneratorAction()
|
||||
{
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/src/B02Run.cc
|
||||
/// \brief Implementation of the B02Run class
|
||||
//
|
||||
// $Id: B02Run.cc,v 1.2 2007-06-21 15:03:45 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
//=====================================================================
|
||||
@@ -79,28 +81,28 @@ B02Run::B02Run(const std::vector<G4String> mfdName): G4Run()
|
||||
(G4MultiFunctionalDetector*)(SDman->FindSensitiveDetector(detName));
|
||||
//
|
||||
if ( mfd ){
|
||||
//--- Loop over the registered primitive scorers.
|
||||
for (G4int icol = 0; icol < mfd->GetNumberOfPrimitives(); icol++){
|
||||
// Get Primitive Scorer object.
|
||||
G4VPrimitiveScorer* scorer=mfd->GetPrimitive(icol);
|
||||
// collection name and collectionID for HitsCollection,
|
||||
//--- Loop over the registered primitive scorers.
|
||||
for (G4int icol = 0; icol < mfd->GetNumberOfPrimitives(); icol++){
|
||||
// Get Primitive Scorer object.
|
||||
G4VPrimitiveScorer* scorer=mfd->GetPrimitive(icol);
|
||||
// collection name and collectionID for HitsCollection,
|
||||
// where type of HitsCollection is G4THitsMap in case of primitive scorer.
|
||||
// The collection name is given by <MFD name>/<Primitive Scorer name>.
|
||||
G4String collectionName = scorer->GetName();
|
||||
G4String fullCollectionName = detName+"/"+collectionName;
|
||||
G4int collectionID = SDman->GetCollectionID(fullCollectionName);
|
||||
//
|
||||
if ( collectionID >= 0 ){
|
||||
G4cout << "++ "<<fullCollectionName<< " id " << collectionID << G4endl;
|
||||
// Store obtained HitsCollection information into data members.
|
||||
// And, creates new G4THitsMap for accumulating quantities during RUN.
|
||||
theCollName.push_back(fullCollectionName);
|
||||
theCollID.push_back(collectionID);
|
||||
theRunMap.push_back(new G4THitsMap<G4double>(detName,collectionName));
|
||||
}else{
|
||||
G4cout << "** collection " << fullCollectionName << " not found. "<<G4endl;
|
||||
}
|
||||
}
|
||||
G4String collectionName = scorer->GetName();
|
||||
G4String fullCollectionName = detName+"/"+collectionName;
|
||||
G4int collectionID = SDman->GetCollectionID(fullCollectionName);
|
||||
//
|
||||
if ( collectionID >= 0 ){
|
||||
G4cout << "++ "<<fullCollectionName<< " id " << collectionID << G4endl;
|
||||
// Store obtained HitsCollection information into data members.
|
||||
// And, creates new G4THitsMap for accumulating quantities during RUN.
|
||||
theCollName.push_back(fullCollectionName);
|
||||
theCollID.push_back(collectionID);
|
||||
theRunMap.push_back(new G4THitsMap<G4double>(detName,collectionName));
|
||||
}else{
|
||||
G4cout << "** collection " << fullCollectionName << " not found. "<<G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -161,7 +163,7 @@ void B02Run::RecordEvent(const G4Event* aEvent)
|
||||
// Access HitsMap.
|
||||
// By MultiFunctionalDetector name and Collection Name.
|
||||
G4THitsMap<G4double>* B02Run::GetHitsMap(const G4String& detName,
|
||||
const G4String& colName){
|
||||
const G4String& colName){
|
||||
G4String fullName = detName+"/"+colName;
|
||||
G4cout << " getting hits map " << fullName << G4endl;
|
||||
return GetHitsMap(fullName);
|
||||
@@ -175,9 +177,9 @@ G4THitsMap<G4double>* B02Run::GetHitsMap(const G4String& fullName){
|
||||
G4cout << " getting hits map " << fullName << G4endl;
|
||||
G4int Ncol = theCollName.size();
|
||||
for ( G4int i = 0; i < Ncol; i++){
|
||||
if ( theCollName[i] == fullName ){
|
||||
return theRunMap[i];
|
||||
}
|
||||
if ( theCollName[i] == fullName ){
|
||||
return theRunMap[i];
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -194,13 +196,13 @@ void B02Run::DumpAllScorer(){
|
||||
G4THitsMap<G4double>* RunMap =GetHitsMap(i);
|
||||
if ( RunMap ) {
|
||||
G4cout << " PrimitiveScorer RUN "
|
||||
<< RunMap->GetSDname() <<","<< RunMap->GetName() << G4endl;
|
||||
<< RunMap->GetSDname() <<","<< RunMap->GetName() << G4endl;
|
||||
G4cout << " Number of entries " << RunMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = RunMap->GetMap()->begin();
|
||||
for(; itr != RunMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " Run Value : " << *(itr->second)
|
||||
<< G4endl;
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " Run Value : " << *(itr->second)
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/src/B02RunAction.cc
|
||||
/// \brief Implementation of the B02RunAction class
|
||||
//
|
||||
// $Id: B02RunAction.cc,v 1.3 2007-06-22 13:38:55 ahoward Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
#include "B02RunAction.hh"
|
||||
#include "B02Run.hh"
|
||||
@@ -152,20 +154,20 @@ void B02RunAction::EndOfRunAction(const G4Run* aRun)
|
||||
if ( *SLs !=0. ) AverageTrackWeight = (*SLWs)/(*SLs);
|
||||
G4String cname = bdet->GetCellName(iz);
|
||||
G4cout
|
||||
<< std::setw(FieldValue) << cname << " |"
|
||||
<< std::setw(FieldValue) << (*TrackEnters) << " |"
|
||||
<< std::setw(FieldValue) << (*Populations) << " |"
|
||||
<< std::setw(FieldValue) << (*SumCollisions) << " |"
|
||||
<< std::setw(FieldValue) << (*SumCollWeight) << " |"
|
||||
<< std::setw(FieldValue) << NumWeightedEnergy << " |"
|
||||
<< std::setw(FieldValue) << FluxWeightedEnergy << " |"
|
||||
<< std::setw(FieldValue) << AverageTrackWeight << " |"
|
||||
<< std::setw(FieldValue) << (*SLs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLWs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLW_Vs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLWEs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLWE_Vs) << " |"
|
||||
<< G4endl;
|
||||
<< std::setw(FieldValue) << cname << " |"
|
||||
<< std::setw(FieldValue) << (*TrackEnters) << " |"
|
||||
<< std::setw(FieldValue) << (*Populations) << " |"
|
||||
<< std::setw(FieldValue) << (*SumCollisions) << " |"
|
||||
<< std::setw(FieldValue) << (*SumCollWeight) << " |"
|
||||
<< std::setw(FieldValue) << NumWeightedEnergy << " |"
|
||||
<< std::setw(FieldValue) << FluxWeightedEnergy << " |"
|
||||
<< std::setw(FieldValue) << AverageTrackWeight << " |"
|
||||
<< std::setw(FieldValue) << (*SLs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLWs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLW_Vs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLWEs) << " |"
|
||||
<< std::setw(FieldValue) << (*SLWE_Vs) << " |"
|
||||
<< G4endl;
|
||||
}
|
||||
G4cout << "============================================="<<G4endl;
|
||||
}
|
||||
@@ -197,9 +199,9 @@ void B02RunAction::PrintHeader(std::ostream *out)
|
||||
for (std::vector<G4String>::iterator it = vecScoreName.begin();
|
||||
it != vecScoreName.end(); it++) {
|
||||
//vname = FillString((*it),
|
||||
// ' ',
|
||||
// FieldValue+1,
|
||||
// false);
|
||||
// ' ',
|
||||
// FieldValue+1,
|
||||
// false);
|
||||
// *out << vname << '|';
|
||||
*out << std::setw(FieldValue) << (*it) << " |";
|
||||
}
|
||||
@@ -207,7 +209,7 @@ void B02RunAction::PrintHeader(std::ostream *out)
|
||||
}
|
||||
|
||||
std::string B02RunAction::FillString(const std::string &name,
|
||||
char c, G4int n, G4bool back)
|
||||
char c, G4int n, G4bool back)
|
||||
{
|
||||
std::string fname("");
|
||||
G4int k = n - name.size();
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/src/B02ScoreTable.cc
|
||||
/// \brief Implementation of the B02ScoreTable class
|
||||
//
|
||||
// $Id: B02ScoreTable.cc,v 1.2 2007-06-22 13:38:55 ahoward Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -84,9 +86,9 @@ void B02ScoreTable::PrintHeader(std::ostream *out)
|
||||
for (std::vector<G4String>::iterator it = vecScoreName.begin();
|
||||
it != vecScoreName.end(); it++) {
|
||||
vname = FillString((*it),
|
||||
' ',
|
||||
FieldValue+1,
|
||||
false);
|
||||
' ',
|
||||
FieldValue+1,
|
||||
false);
|
||||
*out << vname << '|';
|
||||
}
|
||||
*out << G4endl;
|
||||
@@ -104,13 +106,13 @@ G4String B02ScoreTable::CreateName(const G4GeometryCell &gCell) {
|
||||
|
||||
|
||||
void B02ScoreTable::PrintTable(const G4MapGeometryCellCellScorer &mcs,
|
||||
std::ostream *out) {
|
||||
std::ostream *out) {
|
||||
|
||||
// this lines sort the ScoreValues according to the volume
|
||||
// name they belong to
|
||||
std::map<G4String , G4CellScoreComposer> MapStringSCScorer;
|
||||
for (G4MapGeometryCellCellScorer::const_iterator mit =
|
||||
mcs.begin();
|
||||
mcs.begin();
|
||||
mit != mcs.end(); ++mit) {
|
||||
G4GeometryCell gCell = (*mit).first; // get a key identifying a volume
|
||||
G4String name(CreateName(gCell));
|
||||
@@ -118,7 +120,7 @@ void B02ScoreTable::PrintTable(const G4MapGeometryCellCellScorer &mcs,
|
||||
G4double importance = 1;
|
||||
if (fIStore) {
|
||||
if (fIStore->IsKnown(gCell)) {
|
||||
importance = fIStore->GetImportance(gCell);
|
||||
importance = fIStore->GetImportance(gCell);
|
||||
}
|
||||
}
|
||||
MapStringSCScorer[name] = (*mit).second->GetCellScoreComposer();
|
||||
@@ -126,8 +128,8 @@ void B02ScoreTable::PrintTable(const G4MapGeometryCellCellScorer &mcs,
|
||||
}
|
||||
// now do the printing
|
||||
for ( std::map<G4String , G4CellScoreComposer>::iterator
|
||||
it = MapStringSCScorer.begin();
|
||||
it != MapStringSCScorer.end(); ++it) {
|
||||
it = MapStringSCScorer.begin();
|
||||
it != MapStringSCScorer.end(); ++it) {
|
||||
G4String name((*it).first);
|
||||
PrintLine(name, (*it).second.GetStandardCellScoreValues(), out);
|
||||
}
|
||||
@@ -135,8 +137,8 @@ void B02ScoreTable::PrintTable(const G4MapGeometryCellCellScorer &mcs,
|
||||
}
|
||||
|
||||
void B02ScoreTable::PrintLine(const G4String &name,
|
||||
const G4CellScoreValues &sc_scores,
|
||||
std::ostream *out)
|
||||
const G4CellScoreValues &sc_scores,
|
||||
std::ostream *out)
|
||||
{
|
||||
std::string fname = FillString(name, '.', FieldName);
|
||||
*out << fname << " |";
|
||||
@@ -171,7 +173,7 @@ void B02ScoreTable::PrintLine(const G4String &name,
|
||||
|
||||
|
||||
std::string B02ScoreTable::FillString(const std::string &name,
|
||||
char c, G4int n, G4bool back)
|
||||
char c, G4int n, G4bool back)
|
||||
{
|
||||
std::string fname("");
|
||||
G4int k = n - name.size();
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file biasing/B02/src/B02ScoringDetectorConstruction.cc
|
||||
/// \brief Implementation of the B02ScoringDetectorConstruction class
|
||||
//
|
||||
// $Id: B02ScoringDetectorConstruction.cc,v 1.7 2006-06-29 16:34:57 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "globals.hh"
|
||||
@@ -37,6 +39,8 @@
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
G4VPhysicalVolume* B02ScoringDetectorConstruction::Construct()
|
||||
{
|
||||
@@ -65,11 +69,11 @@ G4VPhysicalVolume* B02ScoringDetectorConstruction::Construct()
|
||||
|
||||
|
||||
G4Tubs *score_worldCylinder = new G4Tubs("score_worldCylinder",
|
||||
innerRadiusCylinder,
|
||||
outerRadiusCylinder,
|
||||
hightCylinder,
|
||||
startAngleCylinder,
|
||||
spanningAngleCylinder);
|
||||
innerRadiusCylinder,
|
||||
outerRadiusCylinder,
|
||||
hightCylinder,
|
||||
startAngleCylinder,
|
||||
spanningAngleCylinder);
|
||||
|
||||
// logical score world
|
||||
|
||||
@@ -81,7 +85,7 @@ G4VPhysicalVolume* B02ScoringDetectorConstruction::Construct()
|
||||
name = "score_world_phys";
|
||||
G4VPhysicalVolume* score_worldCylinder_phys =
|
||||
new G4PVPlacement(0, G4ThreeVector(0,0,0), score_worldCylinder_log,
|
||||
name, 0, false, 0);
|
||||
name, 0, false, 0);
|
||||
|
||||
|
||||
///////////////////////////////////////////////
|
||||
@@ -97,11 +101,11 @@ G4VPhysicalVolume* B02ScoringDetectorConstruction::Construct()
|
||||
G4double spanningAngleShield = 360*deg;
|
||||
|
||||
G4Tubs *tube_M = new G4Tubs("tube_M",
|
||||
innerRadiusShield,
|
||||
outerRadiusShield,
|
||||
MhightShield,
|
||||
startAngleShield,
|
||||
spanningAngleShield);
|
||||
innerRadiusShield,
|
||||
outerRadiusShield,
|
||||
MhightShield,
|
||||
startAngleShield,
|
||||
spanningAngleShield);
|
||||
|
||||
G4LogicalVolume *M1_log =
|
||||
new G4LogicalVolume(tube_M, Galactic, "M1_log");
|
||||
@@ -113,7 +117,7 @@ G4VPhysicalVolume* B02ScoringDetectorConstruction::Construct()
|
||||
|
||||
// G4VPhysicalVolume *pM1 =
|
||||
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
M1_log, name, score_worldCylinder_log, false, 0);
|
||||
M1_log, name, score_worldCylinder_log, false, 0);
|
||||
|
||||
|
||||
/////////////////// D1 ///////////////////////////
|
||||
@@ -126,11 +130,11 @@ G4VPhysicalVolume* B02ScoringDetectorConstruction::Construct()
|
||||
|
||||
|
||||
G4Tubs *tube_D = new G4Tubs("tube_D",
|
||||
innerRadiusShield,
|
||||
outerRadiusShield,
|
||||
DhightShield,
|
||||
startAngleShield,
|
||||
spanningAngleShield);
|
||||
innerRadiusShield,
|
||||
outerRadiusShield,
|
||||
DhightShield,
|
||||
startAngleShield,
|
||||
spanningAngleShield);
|
||||
|
||||
G4LogicalVolume *D1_log =
|
||||
new G4LogicalVolume(tube_D, Galactic, "D1_log");
|
||||
@@ -139,7 +143,7 @@ G4VPhysicalVolume* B02ScoringDetectorConstruction::Construct()
|
||||
|
||||
// G4VPhysicalVolume *pD1 =
|
||||
new G4PVPlacement(0, G4ThreeVector(0, 0, 0),
|
||||
D1_log, name, M1_log, false, 0);
|
||||
D1_log, name, M1_log, false, 0);
|
||||
|
||||
/////////////////////// M2 //////////////////////////////////
|
||||
|
||||
@@ -152,7 +156,7 @@ G4VPhysicalVolume* B02ScoringDetectorConstruction::Construct()
|
||||
pos_z = MhightShield;
|
||||
// G4VPhysicalVolume *pM2 =
|
||||
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
M2_log, name, score_worldCylinder_log, false, 0);
|
||||
M2_log, name, score_worldCylinder_log, false, 0);
|
||||
|
||||
//////////////////// D2 /////////////////////////////////
|
||||
|
||||
@@ -163,7 +167,7 @@ G4VPhysicalVolume* B02ScoringDetectorConstruction::Construct()
|
||||
|
||||
// G4VPhysicalVolume *pD2 =
|
||||
new G4PVPlacement(0, G4ThreeVector(0, 0, 0),
|
||||
D2_log, name, M2_log, false, 0);
|
||||
D2_log, name, M2_log, false, 0);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user