Import Geant4 6.2.0 source tree
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IonC12.cc,v 1.1 2004/05/14 12:29:33 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 4th April 1996, G.Cosmo
|
||||
// **********************************************************************
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
#include "G4IonC12.hh"
|
||||
|
||||
// ######################################################################
|
||||
// ### IonC12 ###
|
||||
// ######################################################################
|
||||
|
||||
G4IonC12::G4IonC12(
|
||||
const G4String& aName, G4double mass,
|
||||
G4double width, G4double charge,
|
||||
G4int iSpin, G4int iParity,
|
||||
G4int iConjugation, G4int iIsospin,
|
||||
G4int iIsospin3, G4int gParity,
|
||||
const G4String& pType, G4int lepton,
|
||||
G4int baryon, G4int encoding,
|
||||
G4bool stable, G4double lifetime,
|
||||
G4DecayTable *decaytable )
|
||||
: G4VIon( aName,mass,width,charge,iSpin,iParity,
|
||||
iConjugation,iIsospin,iIsospin3,gParity,pType,
|
||||
lepton,baryon,encoding,stable,lifetime,decaytable )
|
||||
{
|
||||
}
|
||||
|
||||
G4IonC12::~G4IonC12()
|
||||
{
|
||||
}
|
||||
|
||||
// ......................................................................
|
||||
// ... static member definitions ...
|
||||
// ......................................................................
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
|
||||
G4IonC12 G4IonC12::theIonC12(
|
||||
"IonC12", 11.1749*GeV, 0.0*MeV, +6.0*eplus,
|
||||
0, +1, 0,
|
||||
0, 0, 0,
|
||||
"static_nucleus", 0, +12, 0,
|
||||
true, -1.0, 0
|
||||
);
|
||||
|
||||
G4IonC12* G4IonC12::IonC12Definition(){return &theIonC12;}
|
||||
G4IonC12* G4IonC12::IonC12(){return &theIonC12;}
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IonFe52.cc,v 1.1 2004/05/14 12:29:33 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 4th April 1996, G.Cosmo
|
||||
// **********************************************************************
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
#include "G4IonFe52.hh"
|
||||
|
||||
// ######################################################################
|
||||
// ### IonFe52 ###
|
||||
// ######################################################################
|
||||
|
||||
G4IonFe52::G4IonFe52(
|
||||
const G4String& aName, G4double mass,
|
||||
G4double width, G4double charge,
|
||||
G4int iSpin, G4int iParity,
|
||||
G4int iConjugation, G4int iIsospin,
|
||||
G4int iIsospin3, G4int gParity,
|
||||
const G4String& pType, G4int lepton,
|
||||
G4int baryon, G4int encoding,
|
||||
G4bool stable, G4double lifetime,
|
||||
G4DecayTable *decaytable )
|
||||
: G4VIon( aName,mass,width,charge,iSpin,iParity,
|
||||
iConjugation,iIsospin,iIsospin3,gParity,pType,
|
||||
lepton,baryon,encoding,stable,lifetime,decaytable )
|
||||
{
|
||||
}
|
||||
|
||||
G4IonFe52::~G4IonFe52()
|
||||
{
|
||||
}
|
||||
|
||||
// ......................................................................
|
||||
// ... static member definitions ...
|
||||
// ......................................................................
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
|
||||
G4IonFe52 G4IonFe52::theIonFe52(
|
||||
"IonFe52", 48.3761*GeV, 0.0*MeV, +26.0*eplus,
|
||||
0, +1, 0,
|
||||
0, 0, 0,
|
||||
"static_nucleus", 0, +52, 0,
|
||||
true, -1.0, 0
|
||||
);
|
||||
|
||||
G4IonFe52* G4IonFe52::IonFe52Definition(){return &theIonFe52;}
|
||||
G4IonFe52* G4IonFe52::IonFe52(){return &theIonFe52;}
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
#include "G4IonO16.hh"
|
||||
|
||||
// ######################################################################
|
||||
// ### IonO16 ###
|
||||
// ######################################################################
|
||||
|
||||
G4IonO16::G4IonO16(
|
||||
const G4String& aName, G4double mass,
|
||||
G4double width, G4double charge,
|
||||
G4int iSpin, G4int iParity,
|
||||
G4int iConjugation, G4int iIsospin,
|
||||
G4int iIsospin3, G4int gParity,
|
||||
const G4String& pType, G4int lepton,
|
||||
G4int baryon, G4int encoding,
|
||||
G4bool stable, G4double lifetime,
|
||||
G4DecayTable *decaytable )
|
||||
: G4VIon( aName,mass,width,charge,iSpin,iParity,
|
||||
iConjugation,iIsospin,iIsospin3,gParity,pType,
|
||||
lepton,baryon,encoding,stable,lifetime,decaytable )
|
||||
{
|
||||
}
|
||||
|
||||
G4IonO16::~G4IonO16()
|
||||
{
|
||||
}
|
||||
|
||||
// ......................................................................
|
||||
// ... static member definitions ...
|
||||
// ......................................................................
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
|
||||
G4IonO16 G4IonO16::theIonO16(
|
||||
"IonO16", 14.8951*GeV, 0.0*MeV, +8.0*eplus,
|
||||
0, +1, 0,
|
||||
0, 0, 0,
|
||||
"static_nucleus", 0, +16, 0,
|
||||
true, -1.0, 0
|
||||
);
|
||||
|
||||
G4IonO16* G4IonO16::IonO16Definition(){return &theIonO16;}
|
||||
G4IonO16* G4IonO16::IonO16(){return &theIonO16;}
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IonSi28.cc,v 1.1 2004/05/14 12:29:33 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 4th April 1996, G.Cosmo
|
||||
// **********************************************************************
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
#include "G4IonSi28.hh"
|
||||
|
||||
// ######################################################################
|
||||
// ### IonSi28 ###
|
||||
// ######################################################################
|
||||
|
||||
G4IonSi28::G4IonSi28(
|
||||
const G4String& aName, G4double mass,
|
||||
G4double width, G4double charge,
|
||||
G4int iSpin, G4int iParity,
|
||||
G4int iConjugation, G4int iIsospin,
|
||||
G4int iIsospin3, G4int gParity,
|
||||
const G4String& pType, G4int lepton,
|
||||
G4int baryon, G4int encoding,
|
||||
G4bool stable, G4double lifetime,
|
||||
G4DecayTable *decaytable )
|
||||
: G4VIon( aName,mass,width,charge,iSpin,iParity,
|
||||
iConjugation,iIsospin,iIsospin3,gParity,pType,
|
||||
lepton,baryon,encoding,stable,lifetime,decaytable )
|
||||
{
|
||||
}
|
||||
|
||||
G4IonSi28::~G4IonSi28()
|
||||
{
|
||||
}
|
||||
|
||||
// ......................................................................
|
||||
// ... static member definitions ...
|
||||
// ......................................................................
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
|
||||
G4IonSi28 G4IonSi28::theIonSi28(
|
||||
"IonSi28", 26.0532*GeV, 0.0*MeV, +14.0*eplus,
|
||||
0, +1, 0,
|
||||
0, 0, 0,
|
||||
"static_nucleus", 0, +28, 0,
|
||||
true, -1.0, 0
|
||||
);
|
||||
|
||||
G4IonSi28* G4IonSi28::IonSi28Definition(){return &theIonSi28;}
|
||||
G4IonSi28* G4IonSi28::IonSi28(){return &theIonSi28;}
|
||||
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * RemSimAnalysisManager.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: RemSimAnalysisManager.cc,v 1.5 2004/05/22 12:57:06 guatelli Exp $
|
||||
//
|
||||
// Author:Susanna Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include <stdlib.h>
|
||||
#include <fstream>
|
||||
#include "RemSimAnalysisManager.hh"
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <AIDA/AIDA.h>
|
||||
#include "G4RunManager.hh"
|
||||
|
||||
|
||||
RemSimAnalysisManager* RemSimAnalysisManager::instance = 0;
|
||||
|
||||
RemSimAnalysisManager::RemSimAnalysisManager()
|
||||
: aFact(0), treeFact(0), theTree(0), dataPointFactory(0),
|
||||
histogramFactory(0), dataPoint(0), energyDeposit(0),
|
||||
primary(0), secondaryDeposit(0), primaryInitialE(0),
|
||||
primaryInitialEout(0), initialE(0),
|
||||
initialEout(0)
|
||||
{
|
||||
aFact = AIDA_createAnalysisFactory();
|
||||
treeFact = aFact -> createTreeFactory();
|
||||
}
|
||||
|
||||
RemSimAnalysisManager::~RemSimAnalysisManager()
|
||||
{
|
||||
delete initialEout;
|
||||
initialEout = 0;
|
||||
|
||||
delete initialE;
|
||||
initialE = 0;
|
||||
|
||||
delete primaryInitialEout;
|
||||
primaryInitialEout = 0;
|
||||
|
||||
delete primaryInitialE;
|
||||
primaryInitialE = 0;
|
||||
|
||||
delete secondaryDeposit;
|
||||
secondaryDeposit = 0;
|
||||
|
||||
delete primary;
|
||||
primary = 0;
|
||||
|
||||
delete energyDeposit;
|
||||
energyDeposit = 0;
|
||||
|
||||
delete dataPoint;
|
||||
dataPoint = 0;
|
||||
|
||||
delete histogramFactory;
|
||||
histogramFactory = 0;
|
||||
|
||||
delete dataPointFactory;
|
||||
dataPointFactory = 0;
|
||||
|
||||
delete theTree;
|
||||
theTree = 0;
|
||||
|
||||
delete treeFact;
|
||||
treeFact = 0;
|
||||
|
||||
delete aFact;
|
||||
aFact = 0;
|
||||
}
|
||||
|
||||
RemSimAnalysisManager* RemSimAnalysisManager::getInstance()
|
||||
{
|
||||
if (instance == 0) instance = new RemSimAnalysisManager;
|
||||
return instance;
|
||||
}
|
||||
|
||||
void RemSimAnalysisManager::book()
|
||||
{
|
||||
// Define the hbook file
|
||||
theTree = treeFact -> create("remsim.hbk","hbook",false, true);
|
||||
|
||||
// Create histogram factory
|
||||
histogramFactory = aFact -> createHistogramFactory(*theTree);
|
||||
|
||||
// Histograms
|
||||
|
||||
energyDeposit = histogramFactory -> createHistogram1D("10",
|
||||
"Energy Deposit",
|
||||
30,// number of bins
|
||||
0.,//xmin
|
||||
30.);//xmax
|
||||
|
||||
primary = histogramFactory -> createHistogram1D("20",
|
||||
"Initial energy of primary particles",
|
||||
200000,0.,100000.);
|
||||
|
||||
secondaryDeposit = histogramFactory -> createHistogram1D("30",
|
||||
"EnergyDeposit given by secondaries",
|
||||
30,0.,30.);
|
||||
|
||||
primaryInitialE = histogramFactory -> createHistogram1D("40",
|
||||
"Initial energy of primaries reaching the phantom",
|
||||
200000,0.,100000.);
|
||||
|
||||
|
||||
primaryInitialEout = histogramFactory -> createHistogram1D("50",
|
||||
"Initial energy of primaries ougoing the phantom",
|
||||
200000,0.,100000.);
|
||||
|
||||
initialE = histogramFactory -> createHistogram1D("60",
|
||||
"Energy of primaries reaching the phantom",
|
||||
200000,0.,100000.);
|
||||
|
||||
|
||||
initialEout = histogramFactory -> createHistogram1D("70",
|
||||
"Energy of primaries outgoing the phantom",
|
||||
200000,0.,100000.);
|
||||
}
|
||||
|
||||
void RemSimAnalysisManager::energyDepositStore(G4int layer, G4double eDep)
|
||||
{
|
||||
energyDeposit -> fill(layer,eDep);
|
||||
}
|
||||
|
||||
void RemSimAnalysisManager::primaryParticleEnergyDistribution(G4double energy)
|
||||
{
|
||||
primary -> fill(energy);
|
||||
}
|
||||
|
||||
void RemSimAnalysisManager::SecondaryEnergyDeposit(G4int i, G4double EnergyDep)
|
||||
{
|
||||
secondaryDeposit -> fill(i,EnergyDep);
|
||||
}
|
||||
|
||||
void RemSimAnalysisManager::PrimaryInitialEnergyIn(G4double EnergyDep)
|
||||
{
|
||||
primaryInitialE -> fill(EnergyDep);
|
||||
}
|
||||
|
||||
void RemSimAnalysisManager::PrimaryInitialEnergyOut(G4double EnergyDep)
|
||||
{
|
||||
primaryInitialEout -> fill(EnergyDep);
|
||||
}
|
||||
|
||||
void RemSimAnalysisManager::PrimaryEnergyIn(G4double EnergyDep)
|
||||
{
|
||||
initialE -> fill(EnergyDep);
|
||||
}
|
||||
|
||||
void RemSimAnalysisManager::PrimaryEnergyOut(G4double EnergyDep)
|
||||
{
|
||||
initialEout -> fill(EnergyDep);
|
||||
}
|
||||
|
||||
void RemSimAnalysisManager::finish()
|
||||
{
|
||||
theTree -> commit();
|
||||
theTree -> close();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * RemSimAstronautDecorator.cc *
|
||||
// * *
|
||||
// **********************************
|
||||
//
|
||||
// $Id: RemSimAstronautDecorator.cc,v 1.5 2004/05/22 12:57:06 guatelli Exp $
|
||||
//
|
||||
// Author:Susanna Guatelli, guatelli@ge.infn.it
|
||||
|
||||
#include "RemSimVGeometryComponent.hh"
|
||||
#include "RemSimMaterial.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "RemSimAstronautDecorator.hh"
|
||||
#include "RemSimDecorator.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "RemSimSensitiveDetector.hh"
|
||||
#include "RemSimROGeometry.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UserLimits.hh"
|
||||
|
||||
RemSimAstronautDecorator::RemSimAstronautDecorator(RemSimVGeometryComponent* comp)
|
||||
: RemSimDecorator(comp), phantom(0), phantomLog(0), phantomPhys(0)
|
||||
{
|
||||
motherAstronaut = 0;
|
||||
flag = false;
|
||||
}
|
||||
RemSimAstronautDecorator::~RemSimAstronautDecorator()
|
||||
{
|
||||
}
|
||||
void RemSimAstronautDecorator::ConstructComponent(G4VPhysicalVolume* motherVolume)
|
||||
{
|
||||
RemSimDecorator::ConstructComponent(motherVolume);
|
||||
if (flag == false) ConstructAstronaut(motherVolume);
|
||||
else ConstructAstronaut(motherAstronaut);
|
||||
}
|
||||
|
||||
void RemSimAstronautDecorator::DestroyComponent()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RemSimAstronautDecorator::ConstructAstronaut(G4VPhysicalVolume* motherVolume)
|
||||
{
|
||||
// Astronaut definition: Box of water
|
||||
// The Astronaut is the sensitive detector
|
||||
|
||||
RemSimMaterial* pMaterial = new RemSimMaterial();
|
||||
|
||||
G4Material* water = pMaterial -> GetMaterial("Water");
|
||||
delete pMaterial;
|
||||
|
||||
// Phantom sizes
|
||||
G4double phantomX = 3. *m;
|
||||
G4double phantomY = 3. *m;
|
||||
G4double phantomZ = 30. *cm;
|
||||
|
||||
phantom = new G4Box("phantom",phantomX/2.,phantomY/2.,phantomZ/2.);
|
||||
|
||||
phantomLog = new G4LogicalVolume(phantom,
|
||||
water,
|
||||
"phantom",
|
||||
0,0,0);
|
||||
|
||||
phantomPhys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,0.),
|
||||
"phantom",phantomLog,
|
||||
motherVolume,false,0);
|
||||
|
||||
G4cout << "The mother volume of the phantom is: "
|
||||
<< motherVolume -> GetName()
|
||||
<< G4endl;
|
||||
|
||||
// Visualisation attributes
|
||||
G4Colour lblue (0.0, 0.0,.75);
|
||||
G4VisAttributes* phantomVisAtt = new G4VisAttributes(lblue);
|
||||
phantomVisAtt -> SetVisibility(true);
|
||||
phantomVisAtt -> SetForceSolid(true);
|
||||
phantomLog -> SetVisAttributes(phantomVisAtt);
|
||||
|
||||
//Sensitive Detector
|
||||
G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
||||
|
||||
G4String sensitiveDetectorName = "AstronautSD";
|
||||
|
||||
RemSimSensitiveDetector* sensitiveDetector = new
|
||||
RemSimSensitiveDetector(sensitiveDetectorName);
|
||||
G4int VoxelNbAlongZ = 30;
|
||||
|
||||
G4double translation = 0;
|
||||
|
||||
if (flag == true)
|
||||
{
|
||||
G4double thickShelter = 4.5 *m;
|
||||
translation = 0.5*m + thickShelter/2.;
|
||||
}
|
||||
|
||||
RemSimROGeometry* ROGeometry = new RemSimROGeometry(phantomX,
|
||||
phantomY,
|
||||
phantomZ,
|
||||
VoxelNbAlongZ,
|
||||
translation);
|
||||
ROGeometry -> BuildROGeometry();
|
||||
sensitiveDetector -> SetROgeometry(ROGeometry);
|
||||
SDman->AddNewDetector(sensitiveDetector);
|
||||
phantomLog -> SetSensitiveDetector(sensitiveDetector);
|
||||
|
||||
// Set max step allowd to particles in the phantom
|
||||
phantomLog -> SetUserLimits(new G4UserLimits(0.1*cm));
|
||||
}
|
||||
|
||||
void RemSimAstronautDecorator::ChangeThickness(G4double)
|
||||
{
|
||||
G4cout << "It is not possible to change the sizes of the Astronaut"
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
void RemSimAstronautDecorator::PrintDetectorParameters()
|
||||
{
|
||||
G4cout << "-----------------------------------------------------------------------"
|
||||
<< G4endl
|
||||
<< "the astronaut is a box whose thickness is: " << G4endl
|
||||
<< ((phantom -> GetZHalfLength())*2.)/cm
|
||||
<< " cm along the Z axis"
|
||||
<< G4endl
|
||||
<< "material of the astronaut: "
|
||||
<< phantomLog -> GetMaterial() -> GetName() <<G4endl
|
||||
<< G4endl;
|
||||
}
|
||||
void RemSimAstronautDecorator::ChangeMother(G4VPhysicalVolume* mother)
|
||||
{
|
||||
motherAstronaut = mother;
|
||||
flag = true;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * RemSimBasicGenerator.hh *
|
||||
// * *
|
||||
// **********************************
|
||||
//
|
||||
// $Id: RemSimBasicGenerator.cc,v 1.5 2004/05/22 12:57:06 guatelli Exp $
|
||||
//
|
||||
// Author:Susanna Guatelli, guatelli@ge.infn.it
|
||||
|
||||
#include "RemSimBasicGenerator.hh"
|
||||
#include "RemSimVPrimaryGeneratorFactory.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include "RemSimAnalysisManager.hh"
|
||||
#endif
|
||||
|
||||
RemSimBasicGenerator::RemSimBasicGenerator()
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
particleGun = new G4ParticleGun(n_particle);
|
||||
|
||||
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String particleName = "proton";
|
||||
particleGun -> SetParticleDefinition(particleTable->FindParticle(particleName));
|
||||
particleGun -> SetParticlePosition(G4ThreeVector(0., 0., -25.*m));
|
||||
G4ThreeVector v(0.0,0.0,1.0);
|
||||
particleGun -> SetParticleEnergy(100.*MeV);
|
||||
particleGun -> SetParticleMomentumDirection(v);
|
||||
}
|
||||
|
||||
RemSimBasicGenerator::~RemSimBasicGenerator()
|
||||
{
|
||||
delete particleGun;
|
||||
}
|
||||
|
||||
void RemSimBasicGenerator::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
G4double energy = particleGun -> GetParticleEnergy();
|
||||
RemSimAnalysisManager* analysis = RemSimAnalysisManager::getInstance();
|
||||
analysis -> primaryParticleEnergyDistribution(energy/MeV);
|
||||
#endif
|
||||
particleGun -> GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
|
||||
G4double RemSimBasicGenerator:: GetInitialEnergy()
|
||||
{
|
||||
G4double primaryParticleEnergy = particleGun -> GetParticleEnergy();
|
||||
return primaryParticleEnergy;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// ***********************
|
||||
// * *
|
||||
// * RemSimDecay.cc *
|
||||
// * *
|
||||
// ***********************
|
||||
//
|
||||
// $Id: RemSimDecay.cc,v 1.2 2004/05/22 12:57:06 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Author:Susanna Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
|
||||
#include "RemSimDecay.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
RemSimDecay::RemSimDecay(const G4String& name): G4VPhysicsConstructor(name)
|
||||
{ }
|
||||
|
||||
RemSimDecay::~RemSimDecay()
|
||||
{ }
|
||||
|
||||
void RemSimDecay::ConstructProcess()
|
||||
{
|
||||
// Add Decay Process
|
||||
G4Decay* theDecayProcess = new G4Decay();
|
||||
theParticleIterator -> reset();
|
||||
while( (*theParticleIterator)() )
|
||||
{
|
||||
G4ParticleDefinition* particle = theParticleIterator -> value();
|
||||
G4ProcessManager* pmanager = particle -> GetProcessManager();
|
||||
|
||||
if (theDecayProcess -> IsApplicable(*particle))
|
||||
{
|
||||
pmanager -> AddProcess(theDecayProcess);
|
||||
// set ordering for PostStepDoIt and AtRestDoIt
|
||||
pmanager -> SetProcessOrdering(theDecayProcess, idxPostStep);
|
||||
pmanager -> SetProcessOrdering(theDecayProcess, idxAtRest);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// ***************************
|
||||
// * *
|
||||
// * RemSimDecorator.cc *
|
||||
// * *
|
||||
// ***************************
|
||||
//
|
||||
// $Id: RemSimDecorator.cc,v 1.5 2004/05/22 12:57:06 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Author:Susanna Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
#include "RemSimVGeometryComponent.hh"
|
||||
#include "RemSimDecorator.hh"
|
||||
|
||||
RemSimDecorator::RemSimDecorator(RemSimVGeometryComponent* geoComponent)
|
||||
: component(geoComponent)
|
||||
{
|
||||
}
|
||||
|
||||
RemSimDecorator::~RemSimDecorator()
|
||||
{;}
|
||||
|
||||
void RemSimDecorator::ConstructComponent(G4VPhysicalVolume* motherVolume)
|
||||
{
|
||||
component -> ConstructComponent(motherVolume) ;
|
||||
}
|
||||
|
||||
void RemSimDecorator::DestroyComponent()
|
||||
{
|
||||
component -> DestroyComponent();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,274 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// **************************************
|
||||
// * *
|
||||
// * RemSimDetectorConstruction.cc *
|
||||
// * *
|
||||
// **************************************
|
||||
//
|
||||
// $Id: RemSimDetectorConstruction.cc,v 1.13 2004/05/27 08:36:51 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Author:Susanna Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
#include "RemSimDetectorConstruction.hh"
|
||||
#include "RemSimMaterial.hh"
|
||||
#include "RemSimDetectorMessenger.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4UserLimits.hh"
|
||||
#include "RemSimVGeometryComponent.hh"
|
||||
#include "RemSimVehicle1.hh"
|
||||
#include "RemSimMoonHabitat.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "RemSimSensitiveDetector.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "RemSimROGeometry.hh"
|
||||
#include "RemSimDecorator.hh"
|
||||
#include "RemSimShieldingDecorator.hh"
|
||||
#include "RemSimShelterSPEDecorator.hh"
|
||||
#include "RemSimAstronautDecorator.hh"
|
||||
#include "RemSimRoofDecorator.hh"
|
||||
|
||||
RemSimDetectorConstruction::RemSimDetectorConstruction()
|
||||
: experimentalHall_log(0), experimentalHall_phys(0),
|
||||
phantomPhys(0), detectorPhys(0)
|
||||
{
|
||||
pMaterial = new RemSimMaterial();
|
||||
|
||||
pVehicle = new RemSimVehicle1();
|
||||
pMoon = new RemSimMoonHabitat();
|
||||
|
||||
messenger = new RemSimDetectorMessenger(this);
|
||||
decoratorValue ="Nothing";
|
||||
astronautValue ="On";
|
||||
decorator = 0; //pointing to shielding
|
||||
decoratorSPE = 0; //pointing to SPE shelter
|
||||
decorator1 = 0; //pointing to the phantom/astronaut
|
||||
decoratorRoof = 0; //pointing to the roof of the Moon Habitat
|
||||
moon = false; // moon = true: moon configuration selected
|
||||
// moon = false: vehicle configuration selected
|
||||
flag = false; // flag = true : the geometry configuration (vehicle/moon)
|
||||
// has been chosen
|
||||
// flag = false : the geometry configuration (vehicle/moon)
|
||||
// has not been chosen}
|
||||
}
|
||||
|
||||
RemSimDetectorConstruction::~RemSimDetectorConstruction()
|
||||
{
|
||||
delete decoratorRoof;
|
||||
delete decorator1;
|
||||
delete decoratorSPE;
|
||||
delete decorator;
|
||||
delete messenger;
|
||||
delete pMoon;
|
||||
delete pVehicle;
|
||||
delete pMaterial;
|
||||
}
|
||||
|
||||
G4VPhysicalVolume* RemSimDetectorConstruction::Construct()
|
||||
{
|
||||
pMaterial -> DefineMaterials();
|
||||
G4Material* vacuum = pMaterial -> GetMaterial("Galactic");
|
||||
|
||||
// World definition
|
||||
|
||||
G4double expHall_x = 30.0*m;
|
||||
G4double expHall_y = 30.0*m;
|
||||
G4double expHall_z = 30.0*m;
|
||||
|
||||
G4Box* experimentalHall_box
|
||||
= new G4Box("world",expHall_x,expHall_y,expHall_z);
|
||||
experimentalHall_log = new G4LogicalVolume(experimentalHall_box,
|
||||
vacuum,"world",0,0,0);
|
||||
|
||||
experimentalHall_phys = new G4PVPlacement(0,G4ThreeVector(),"world",
|
||||
experimentalHall_log,0,
|
||||
false,0);
|
||||
return experimentalHall_phys;
|
||||
}
|
||||
void RemSimDetectorConstruction::ConstructVolume()
|
||||
{
|
||||
if (moon == true)
|
||||
{
|
||||
pMoon -> ConstructComponent(experimentalHall_phys);
|
||||
decorator1 = new RemSimAstronautDecorator(pMoon);
|
||||
G4VPhysicalVolume* shelter = pMoon -> GetShelter();
|
||||
decorator1 -> ChangeMother(shelter);
|
||||
decorator1 -> ConstructComponent(experimentalHall_phys);
|
||||
}
|
||||
else
|
||||
{
|
||||
pVehicle -> ConstructComponent(experimentalHall_phys);
|
||||
decorator1 = new RemSimAstronautDecorator(pVehicle);
|
||||
decorator1 -> ConstructComponent(experimentalHall_phys);
|
||||
}
|
||||
}
|
||||
|
||||
void RemSimDetectorConstruction::AddShielding(G4String value)
|
||||
{
|
||||
if (moon == false)
|
||||
{
|
||||
decoratorValue = value;
|
||||
|
||||
if (decoratorValue == "On")
|
||||
{
|
||||
if (decorator == 0)
|
||||
{
|
||||
decorator = new RemSimShieldingDecorator(pVehicle);
|
||||
decorator -> ConstructComponent(experimentalHall_phys);
|
||||
G4RunManager::GetRunManager() -> DefineWorldVolume(experimentalHall_phys);
|
||||
}
|
||||
else G4cout<<" The shielding alread exists!"<<G4endl;
|
||||
}
|
||||
|
||||
if (decoratorValue == "Off")
|
||||
{
|
||||
if (decorator != 0)
|
||||
{
|
||||
decorator -> DestroyComponent();
|
||||
G4RunManager::GetRunManager() -> DefineWorldVolume(experimentalHall_phys);
|
||||
decorator = 0;
|
||||
}
|
||||
|
||||
else G4cout<<" The shielding does not exist!"<<G4endl;
|
||||
}
|
||||
}
|
||||
else G4cout << " The shielding is not available in moon habitat configuration"<<G4endl;
|
||||
}
|
||||
|
||||
void RemSimDetectorConstruction::AddShelterSPE(G4String value)
|
||||
{
|
||||
if (moon == false)
|
||||
{
|
||||
if (value == "On")
|
||||
{
|
||||
if (decoratorSPE == 0)
|
||||
{
|
||||
decoratorSPE = new RemSimShelterSPEDecorator(pVehicle);
|
||||
decoratorSPE -> ConstructComponent(experimentalHall_phys);
|
||||
G4RunManager::GetRunManager() -> DefineWorldVolume(experimentalHall_phys);
|
||||
}
|
||||
else G4cout<<" The SPE shelter alread exists!"<<G4endl;
|
||||
}
|
||||
|
||||
if (value == "Off")
|
||||
{
|
||||
if (decoratorSPE != 0)
|
||||
{
|
||||
decoratorSPE -> DestroyComponent();
|
||||
G4RunManager::GetRunManager() -> DefineWorldVolume(experimentalHall_phys);
|
||||
decoratorSPE = 0;
|
||||
}
|
||||
|
||||
else G4cout<<" The SPE shelter does not exist!"<<G4endl;
|
||||
}
|
||||
}
|
||||
else G4cout<< " It is not possible to select SPE shelter in moon habitat configuration" << G4endl;
|
||||
}
|
||||
|
||||
void RemSimDetectorConstruction::AddHabitatRoof(G4String value)
|
||||
{
|
||||
if (moon == true)
|
||||
{
|
||||
if (value == "On")
|
||||
{
|
||||
if (decoratorRoof == 0)
|
||||
{
|
||||
decoratorRoof = new RemSimRoofDecorator(pMoon);
|
||||
decoratorRoof -> ConstructComponent(experimentalHall_phys);
|
||||
G4RunManager::GetRunManager() -> DefineWorldVolume(experimentalHall_phys);
|
||||
}
|
||||
else G4cout<<" The roof alread exists!"<<G4endl;
|
||||
}
|
||||
|
||||
if (value == "Off")
|
||||
{
|
||||
if (decoratorRoof != 0)
|
||||
{
|
||||
decoratorRoof -> DestroyComponent();
|
||||
G4RunManager::GetRunManager() -> DefineWorldVolume(experimentalHall_phys);
|
||||
decoratorRoof = 0;
|
||||
}
|
||||
|
||||
else G4cout<<" The roof does not exist!"<<G4endl;
|
||||
}
|
||||
}
|
||||
else G4cout<< " It is not possible to select the roof in the vehicle configuration" << G4endl;
|
||||
}
|
||||
|
||||
void RemSimDetectorConstruction::ChangeShieldingThickness(G4double thick)
|
||||
{
|
||||
if (moon == false)
|
||||
{
|
||||
if (decorator != 0)
|
||||
{
|
||||
decorator -> ChangeThickness(thick);
|
||||
G4RunManager::GetRunManager() -> DefineWorldVolume(experimentalHall_phys);
|
||||
}
|
||||
else G4cout<<" Define the shielding before!"<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
void RemSimDetectorConstruction::ChangeRoofThickness(G4double thick)
|
||||
{
|
||||
if (moon == true)
|
||||
{
|
||||
if (decoratorRoof != 0)
|
||||
{
|
||||
decoratorRoof -> ChangeThickness(thick);
|
||||
G4RunManager::GetRunManager() -> DefineWorldVolume(experimentalHall_phys);
|
||||
}
|
||||
else G4cout<<" Define the roof before!"<< G4endl;
|
||||
}
|
||||
|
||||
else G4cout<<"The roof can be selected in moon habitat configuration"<<G4endl;
|
||||
}
|
||||
|
||||
void RemSimDetectorConstruction:: ChooseConfiguration(G4String value)
|
||||
{
|
||||
if (flag == false)
|
||||
{
|
||||
if (value == "vehicle") ConstructVolume();
|
||||
|
||||
else if (value == "moon")
|
||||
{
|
||||
moon = true;
|
||||
ConstructVolume();
|
||||
}
|
||||
G4RunManager::GetRunManager() -> DefineWorldVolume(experimentalHall_phys);
|
||||
flag = true;
|
||||
}
|
||||
else
|
||||
G4cout<< "The configurations vehicle/moon can not be switched" << G4endl;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// *********************************
|
||||
// * *
|
||||
// * RemSimDetectorMessenger.cc *
|
||||
// * *
|
||||
// *********************************
|
||||
//
|
||||
//
|
||||
// $Id: RemSimDetectorMessenger.cc,v 1.9 2004/05/22 12:57:06 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
|
||||
#include "RemSimDetectorMessenger.hh"
|
||||
#include "RemSimDetectorConstruction.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
|
||||
RemSimDetectorMessenger::RemSimDetectorMessenger( RemSimDetectorConstruction* Det): detector(Det)
|
||||
{
|
||||
vehicleDir = new G4UIdirectory("/configuration/");
|
||||
vehicleDir -> SetGuidance("geometry control.");
|
||||
|
||||
vehicleCmd = new G4UIcmdWithAString("/configuration/choose",this);
|
||||
vehicleCmd -> SetGuidance("Assign the geometrical set-up to G4RunManager.");
|
||||
vehicleCmd -> SetParameterName("choice",true);
|
||||
vehicleCmd -> SetCandidates("vehicle moon");
|
||||
vehicleCmd -> AvailableForStates(G4State_Idle);
|
||||
|
||||
shieldingCmd = new G4UIcmdWithAString("/configuration/AddShielding",this);
|
||||
shieldingCmd -> SetGuidance("Add shielding layer in vehicle configuration.");
|
||||
shieldingCmd -> SetParameterName("choice",true);
|
||||
shieldingCmd -> SetCandidates("On Off");
|
||||
shieldingCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
SPECmd = new G4UIcmdWithAString("/configuration/AddSPE",this);
|
||||
SPECmd -> SetGuidance("Add SPE shelter in vehicle configuration.");
|
||||
SPECmd -> SetParameterName("choice",true);
|
||||
SPECmd -> SetCandidates("On Off");
|
||||
SPECmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
roofCmd = new G4UIcmdWithAString("/configuration/AddRoof",this);
|
||||
roofCmd -> SetGuidance("Add the Roof to the moon habitat.");
|
||||
roofCmd -> SetParameterName("choice",true);
|
||||
roofCmd -> SetCandidates("On Off");
|
||||
roofCmd -> AvailableForStates(G4State_Idle);
|
||||
|
||||
|
||||
// Fix the parameters of the shielding: material and thickness
|
||||
shieldingDir = new G4UIdirectory("/shielding/");
|
||||
shieldingDir -> SetGuidance("shielding control.");
|
||||
|
||||
thicknessCmd = new G4UIcmdWithADoubleAndUnit("/shielding/thickness",this);
|
||||
thicknessCmd -> SetGuidance("Set the thickness of the shielding.");
|
||||
thicknessCmd -> SetParameterName("Size",true);
|
||||
thicknessCmd -> SetRange("Size>=0.");
|
||||
thicknessCmd -> SetUnitCategory("Length");
|
||||
thicknessCmd -> AvailableForStates(G4State_Idle);
|
||||
|
||||
roofDir = new G4UIdirectory("/roof/");
|
||||
roofDir -> SetGuidance("Roof control.");
|
||||
thicknessRoofCmd = new G4UIcmdWithADoubleAndUnit("/roof/thickness",this);
|
||||
thicknessRoofCmd -> SetGuidance("Set the thickness of the Roof.");
|
||||
thicknessRoofCmd -> SetParameterName("Size",true);
|
||||
thicknessRoofCmd -> SetRange("Size>=0.");
|
||||
thicknessRoofCmd -> SetUnitCategory("Length");
|
||||
thicknessRoofCmd -> AvailableForStates(G4State_Idle);
|
||||
}
|
||||
|
||||
RemSimDetectorMessenger::~RemSimDetectorMessenger()
|
||||
{
|
||||
delete thicknessRoofCmd;
|
||||
delete roofDir;
|
||||
delete thicknessCmd;
|
||||
delete shieldingDir;
|
||||
delete roofCmd;
|
||||
delete SPECmd;
|
||||
delete shieldingCmd;
|
||||
delete vehicleCmd;
|
||||
delete vehicleDir;
|
||||
}
|
||||
|
||||
void RemSimDetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
if(command == vehicleCmd)
|
||||
detector -> ChooseConfiguration(newValue);
|
||||
|
||||
if(command == shieldingCmd)
|
||||
detector -> AddShielding(newValue);
|
||||
|
||||
if(command == SPECmd)
|
||||
detector -> AddShelterSPE(newValue);
|
||||
|
||||
if(command == roofCmd)
|
||||
detector -> AddHabitatRoof(newValue);
|
||||
|
||||
if(command == thicknessCmd)
|
||||
detector -> ChangeShieldingThickness
|
||||
(thicknessCmd -> GetNewDoubleValue(newValue));
|
||||
|
||||
if(command == thicknessRoofCmd)
|
||||
detector -> ChangeRoofThickness
|
||||
(thicknessRoofCmd -> GetNewDoubleValue(newValue));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RemSimElectronEEDL.cc,v 1.3 2004/05/22 12:57:06 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Author: Susanna Guatelli, guatelloi@ge.infn.it
|
||||
|
||||
#include "RemSimElectronEEDL.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4MultipleScattering.hh"
|
||||
#include "G4LowEnergyIonisation.hh"
|
||||
#include "G4LowEnergyBremsstrahlung.hh"
|
||||
|
||||
RemSimElectronEEDL::RemSimElectronEEDL(const G4String& name): G4VPhysicsConstructor(name)
|
||||
{ }
|
||||
|
||||
RemSimElectronEEDL::~RemSimElectronEEDL()
|
||||
{ }
|
||||
|
||||
void RemSimElectronEEDL::ConstructProcess()
|
||||
{
|
||||
// Add EEDL processes for electrons
|
||||
|
||||
theParticleIterator->reset();
|
||||
|
||||
while( (*theParticleIterator)() )
|
||||
{
|
||||
G4ParticleDefinition* particle = theParticleIterator -> value();
|
||||
G4ProcessManager* manager = particle -> GetProcessManager();
|
||||
G4String particleName = particle -> GetParticleName();
|
||||
|
||||
if (particleName == "e-")
|
||||
{
|
||||
manager -> AddProcess(new G4MultipleScattering, -1, 1,1);
|
||||
manager -> AddProcess(new G4LowEnergyIonisation, -1, 2,2);
|
||||
manager -> AddProcess(new G4LowEnergyBremsstrahlung,-1,-1,3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * RemSimEventAction.cc *
|
||||
// * *
|
||||
// **********************************
|
||||
//
|
||||
//
|
||||
// $Id: RemSimEventAction.cc,v 1.7 2004/05/27 12:31:31 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Author : Susanna Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
#include "RemSimEventAction.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4EventManager.hh"
|
||||
#include "G4TrajectoryContainer.hh"
|
||||
#include "G4Trajectory.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "CLHEP/Random/RandEngine.h"
|
||||
RemSimEventAction::RemSimEventAction():evtNo(-1)
|
||||
{}
|
||||
|
||||
RemSimEventAction::~RemSimEventAction()
|
||||
{}
|
||||
|
||||
void RemSimEventAction::BeginOfEventAction(const G4Event* evt)
|
||||
{
|
||||
evtNo = evt -> GetEventID();
|
||||
G4int printModul = 500;
|
||||
if (evtNo%printModul == 0)
|
||||
G4cout << "\n---> Begin Of Event: " << evtNo << G4endl;
|
||||
}
|
||||
|
||||
void RemSimEventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
|
||||
G4int n_trajectories =0;
|
||||
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
|
||||
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
{
|
||||
for (G4int i=0; i<n_trajectories; i++)
|
||||
{ G4Trajectory* trj = (G4Trajectory*)
|
||||
((*(evt->GetTrajectoryContainer()))[i]);
|
||||
trj->DrawTrajectory(50);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,271 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// **************************************
|
||||
// * *
|
||||
// * RemSimHadronicPhysics.cc *
|
||||
// * *
|
||||
// **************************************
|
||||
//
|
||||
// $Id: RemSimHadronicPhysics.cc,v 1.2 2004/05/22 12:57:06 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Author : Susanna Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
#include "RemSimHadronicPhysics.hh"
|
||||
#include "G4BinaryLightIonReaction.hh"
|
||||
#include "G4TripathiCrossSection.hh"
|
||||
#include "G4IonsShenCrossSection.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ProcessVector.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
#include "G4ProtonInelasticCrossSection.hh"
|
||||
#include "G4NeutronInelasticCrossSection.hh"
|
||||
#include "G4PiNuclearCrossSection.hh"
|
||||
#include "G4LElastic.hh"
|
||||
#include "G4CascadeInterface.hh"
|
||||
#include "G4LEProtonInelastic.hh"
|
||||
#include "G4LENeutronInelastic.hh"
|
||||
#include "G4LEPionPlusInelastic.hh"
|
||||
#include "G4LEPionMinusInelastic.hh"
|
||||
#include "G4LEAlphaInelastic.hh"
|
||||
#include "G4LFission.hh"
|
||||
#include "G4LCapture.hh"
|
||||
#include "G4TheoFSGenerator.hh"
|
||||
#include "G4GeneratorPrecompoundInterface.hh"
|
||||
#include "G4ExcitationHandler.hh"
|
||||
#include "G4PreCompoundModel.hh"
|
||||
#include "G4QGSMFragmentation.hh"
|
||||
#include "G4ExcitedStringDecay.hh"
|
||||
|
||||
RemSimHadronicPhysics::RemSimHadronicPhysics(const G4String& name):
|
||||
G4VPhysicsConstructor(name)
|
||||
{
|
||||
// Hadronic cross sections
|
||||
|
||||
proton_XC = new G4ProtonInelasticCrossSection();
|
||||
neutron_XC = new G4NeutronInelasticCrossSection();
|
||||
pion_XC = new G4PiNuclearCrossSection();
|
||||
|
||||
// Hadronic cross sections for alpha particles
|
||||
tripathi = new G4TripathiCrossSection();
|
||||
shen = new G4IonsShenCrossSection();
|
||||
|
||||
// Hadronic models
|
||||
|
||||
elastic_model = new G4LElastic();
|
||||
bertini_model = new G4CascadeInterface();
|
||||
binary_ion_model = new G4BinaryLightIonReaction();
|
||||
|
||||
LEP_proton_model = new G4LEProtonInelastic();
|
||||
LEP_neutron_model = new G4LENeutronInelastic();
|
||||
LEP_pip_model = new G4LEPionPlusInelastic();
|
||||
LEP_pim_model = new G4LEPionMinusInelastic();
|
||||
LEP_alpha_model = new G4LEAlphaInelastic();
|
||||
nfission_model = new G4LFission();
|
||||
ncapture_model = new G4LCapture();
|
||||
|
||||
QGSP_model = new G4TheoFSGenerator();
|
||||
theCascade = new G4GeneratorPrecompoundInterface();
|
||||
theHandler = new G4ExcitationHandler();
|
||||
thePreEquilib = new G4PreCompoundModel(theHandler);
|
||||
theCascade -> SetDeExcitation(thePreEquilib);
|
||||
QGSP_model -> SetTransport(theCascade);
|
||||
theFragmentation = new G4QGSMFragmentation();
|
||||
theStringDecay = new G4ExcitedStringDecay(theFragmentation);
|
||||
theStringModel.SetFragmentationModel(theStringDecay);
|
||||
QGSP_model -> SetHighEnergyGenerator(&theStringModel);
|
||||
|
||||
}
|
||||
RemSimHadronicPhysics::~RemSimHadronicPhysics()
|
||||
{}
|
||||
|
||||
#include "G4HadronElasticProcess.hh"
|
||||
#include "G4HadronFissionProcess.hh"
|
||||
#include "G4HadronCaptureProcess.hh"
|
||||
#include "G4ProtonInelasticProcess.hh"
|
||||
#include "G4NeutronInelasticProcess.hh"
|
||||
#include "G4PionPlusInelasticProcess.hh"
|
||||
#include "G4PionMinusInelasticProcess.hh"
|
||||
#include "G4AlphaInelasticProcess.hh"
|
||||
|
||||
void RemSimHadronicPhysics::ConstructProcess()
|
||||
{
|
||||
// Set model energy regions
|
||||
// 0 - 3.2 GeV: Bertini cascade model for p, n, pi+, pi-
|
||||
|
||||
bertini_model -> SetMaxEnergy(3.2*GeV);
|
||||
|
||||
// 80 MeV - 20 GeV for light ions
|
||||
|
||||
binary_ion_model -> SetMinEnergy(80*MeV);
|
||||
binary_ion_model -> SetMaxEnergy(110.*GeV);
|
||||
|
||||
// 2.8 - 25 GeV: LEP models for p, n, pi+, pi-
|
||||
|
||||
LEP_proton_model -> SetMinEnergy(2.8*GeV);
|
||||
LEP_proton_model -> SetMaxEnergy(25*GeV);
|
||||
LEP_neutron_model -> SetMinEnergy(2.8*GeV);
|
||||
LEP_neutron_model -> SetMaxEnergy(25*GeV);
|
||||
LEP_pip_model -> SetMinEnergy(2.8*GeV);
|
||||
LEP_pip_model -> SetMaxEnergy(25*GeV);
|
||||
LEP_pim_model -> SetMinEnergy(2.8*GeV);
|
||||
LEP_pim_model -> SetMaxEnergy(25*GeV);
|
||||
nfission_model -> SetMinEnergy(0*TeV);
|
||||
nfission_model -> SetMaxEnergy(100*TeV);
|
||||
ncapture_model -> SetMinEnergy(0*TeV);
|
||||
ncapture_model -> SetMaxEnergy(100*TeV);
|
||||
|
||||
// Up to 100 MeV for alphas
|
||||
LEP_alpha_model -> SetMaxEnergy(100.*MeV);
|
||||
|
||||
// 15 GeV - 100 TeV: QGSP model for p, n, pi+, pi-
|
||||
|
||||
QGSP_model -> SetMinEnergy(15*GeV);
|
||||
QGSP_model -> SetMaxEnergy(100*TeV);
|
||||
|
||||
// ******************************************
|
||||
// * register models, processes to proton *
|
||||
// ******************************************
|
||||
|
||||
G4ParticleDefinition* proton = G4Proton::ProtonDefinition();
|
||||
G4ProcessManager* protMan = proton -> GetProcessManager();
|
||||
|
||||
// Elastic process
|
||||
|
||||
G4HadronElasticProcess* protelProc = new G4HadronElasticProcess();
|
||||
protelProc -> RegisterMe(elastic_model);
|
||||
protMan -> AddDiscreteProcess(protelProc);
|
||||
|
||||
// Inelastic process
|
||||
|
||||
G4ProtonInelasticProcess* protinelProc = new G4ProtonInelasticProcess();
|
||||
protinelProc -> AddDataSet(proton_XC);
|
||||
protinelProc -> RegisterMe(bertini_model);
|
||||
protinelProc -> RegisterMe(LEP_proton_model);
|
||||
protinelProc -> RegisterMe(QGSP_model);
|
||||
protMan -> AddDiscreteProcess(protinelProc);
|
||||
|
||||
// ******************************************
|
||||
// * register models, processes to neutron *
|
||||
// ******************************************
|
||||
|
||||
G4ParticleDefinition* neutron = G4Neutron::NeutronDefinition();
|
||||
G4ProcessManager* neutMan = neutron->GetProcessManager();
|
||||
|
||||
// Elastic process
|
||||
|
||||
G4HadronElasticProcess* neutelProc = new G4HadronElasticProcess();
|
||||
neutelProc -> RegisterMe(elastic_model);
|
||||
neutMan -> AddDiscreteProcess(neutelProc);
|
||||
|
||||
// Inelastic process
|
||||
|
||||
G4NeutronInelasticProcess* neutinelProc = new G4NeutronInelasticProcess();
|
||||
neutinelProc -> AddDataSet(neutron_XC);
|
||||
neutinelProc -> RegisterMe(bertini_model);
|
||||
neutinelProc -> RegisterMe(LEP_neutron_model);
|
||||
neutinelProc -> RegisterMe(QGSP_model);
|
||||
neutMan -> AddDiscreteProcess(neutinelProc);
|
||||
|
||||
G4HadronCaptureProcess* neutcapProc = new G4HadronCaptureProcess();
|
||||
neutcapProc -> RegisterMe(ncapture_model);
|
||||
neutMan -> AddDiscreteProcess(neutcapProc);
|
||||
|
||||
G4HadronFissionProcess* neutfisProc = new G4HadronFissionProcess();
|
||||
neutfisProc -> RegisterMe(nfission_model);
|
||||
neutMan -> AddDiscreteProcess(neutfisProc);
|
||||
|
||||
// ******************************************
|
||||
// * register models, processes to pi+ *
|
||||
// ******************************************
|
||||
|
||||
G4ParticleDefinition* piplus = G4PionPlus::PionPlusDefinition();
|
||||
G4ProcessManager* pipMan = piplus -> GetProcessManager();
|
||||
|
||||
// Elastic process
|
||||
|
||||
G4HadronElasticProcess* pipelProc = new G4HadronElasticProcess();
|
||||
pipelProc -> RegisterMe(elastic_model);
|
||||
pipMan -> AddDiscreteProcess(pipelProc);
|
||||
|
||||
// Inelastic process
|
||||
|
||||
G4PionPlusInelasticProcess* pipinelProc = new G4PionPlusInelasticProcess();
|
||||
pipinelProc -> AddDataSet(pion_XC);
|
||||
pipinelProc -> RegisterMe(bertini_model);
|
||||
pipinelProc -> RegisterMe(LEP_pip_model);
|
||||
pipinelProc -> RegisterMe(QGSP_model);
|
||||
pipMan -> AddDiscreteProcess(pipinelProc);
|
||||
|
||||
// ******************************************
|
||||
// * register models, processes to pi- *
|
||||
// ******************************************
|
||||
|
||||
G4ParticleDefinition* piminus = G4PionMinus::PionMinusDefinition();
|
||||
G4ProcessManager* pimMan = piminus -> GetProcessManager();
|
||||
|
||||
// Elastic process
|
||||
|
||||
G4HadronElasticProcess* pimelProc = new G4HadronElasticProcess();
|
||||
pimelProc -> RegisterMe(elastic_model);
|
||||
pimMan -> AddDiscreteProcess(pimelProc);
|
||||
|
||||
// Inelastic process
|
||||
|
||||
G4PionMinusInelasticProcess* piminelProc = new G4PionMinusInelasticProcess();
|
||||
piminelProc -> AddDataSet(pion_XC);
|
||||
piminelProc -> RegisterMe(bertini_model);
|
||||
piminelProc -> RegisterMe(LEP_pim_model);
|
||||
piminelProc -> RegisterMe(QGSP_model);
|
||||
pimMan -> AddDiscreteProcess(piminelProc);
|
||||
|
||||
// ******************************************
|
||||
// * register models, processes to alpha *
|
||||
// ******************************************
|
||||
|
||||
G4ParticleDefinition* alpha = G4Alpha::AlphaDefinition();
|
||||
G4ProcessManager* alfMan = alpha -> GetProcessManager();
|
||||
|
||||
// Elastic process
|
||||
|
||||
G4HadronElasticProcess* alfelProc = new G4HadronElasticProcess();
|
||||
alfelProc -> RegisterMe(elastic_model);
|
||||
alfMan -> AddDiscreteProcess(alfelProc);
|
||||
|
||||
// Inelastic process
|
||||
|
||||
G4AlphaInelasticProcess* alfinelProc = new G4AlphaInelasticProcess();
|
||||
alfinelProc -> AddDataSet(tripathi);
|
||||
alfinelProc -> AddDataSet(shen);
|
||||
alfinelProc -> RegisterMe(LEP_alpha_model);
|
||||
alfinelProc -> RegisterMe(binary_ion_model);
|
||||
alfMan -> AddDiscreteProcess(alfinelProc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
#include "RemSimHit.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4Circle.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4ios.hh"
|
||||
G4Allocator<RemSimHit> RemSimHitAllocator;
|
||||
|
||||
RemSimHit::RemSimHit()
|
||||
{;}
|
||||
|
||||
RemSimHit::~RemSimHit()
|
||||
{;}
|
||||
|
||||
RemSimHit::RemSimHit(const RemSimHit &right)
|
||||
: G4VHit()
|
||||
{
|
||||
edep = right.edep;
|
||||
zID = right.zID;
|
||||
position = right.position;
|
||||
}
|
||||
|
||||
const RemSimHit& RemSimHit::operator=(const RemSimHit &right)
|
||||
{
|
||||
edep = right.edep;
|
||||
zID = right.zID;
|
||||
position = right.position;
|
||||
return *this;
|
||||
}
|
||||
|
||||
G4int RemSimHit::operator==(const RemSimHit &right) const
|
||||
{
|
||||
return (this==&right) ? 1 : 0;
|
||||
}
|
||||
|
||||
void RemSimHit::Draw()
|
||||
{
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
if(pVVisManager)
|
||||
{
|
||||
G4Circle circle(position);
|
||||
circle.SetScreenSize(4.);
|
||||
circle.SetFillStyle(G4Circle::filled);
|
||||
G4Colour colour(1.,0.,0.);
|
||||
G4VisAttributes attribs(colour);
|
||||
circle.SetVisAttributes(attribs);
|
||||
pVVisManager->Draw(circle);
|
||||
}
|
||||
}
|
||||
|
||||
void RemSimHit::Print()
|
||||
{
|
||||
G4cout<<
|
||||
"Hit in Astronaut:"
|
||||
<< G4BestUnit(edep, "Energy")
|
||||
<< " in position: "
|
||||
<< G4BestUnit(position, "Length") <<G4endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Author : Susanna Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
#include "CLHEP/Random/RandGeneral.h"
|
||||
#include "RemSimInterplanetarySpaceConfiguration.hh"
|
||||
#include "RemSimVPrimaryGeneratorFactory.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "Randomize.hh"
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include "RemSimAnalysisManager.hh"
|
||||
#endif
|
||||
#include "RemSimRunAction.hh"
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
|
||||
|
||||
RemSimInterplanetarySpaceConfiguration::RemSimInterplanetarySpaceConfiguration()
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
particleGun = new G4ParticleGun(n_particle);
|
||||
|
||||
run = new RemSimRunAction();
|
||||
|
||||
moon = false;
|
||||
|
||||
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String particleName = "proton";
|
||||
particleGun -> SetParticleDefinition(particleTable->FindParticle(particleName));
|
||||
particleGun -> SetParticlePosition(G4ThreeVector(0., 0., -25.*m));
|
||||
G4ThreeVector v(0.0,0.0,1.0);
|
||||
particleGun -> SetParticleEnergy(1.*MeV);
|
||||
particleGun -> SetParticleMomentumDirection(v);
|
||||
}
|
||||
|
||||
RemSimInterplanetarySpaceConfiguration::~RemSimInterplanetarySpaceConfiguration()
|
||||
{
|
||||
delete run;
|
||||
delete particleGun;
|
||||
}
|
||||
|
||||
void RemSimInterplanetarySpaceConfiguration::GeneratePrimaries(G4Event* anEvent){
|
||||
// Read the ASCII files containing the fluxes of particles in respect
|
||||
// to the energy in MeV
|
||||
G4bool value = run -> GetFile();
|
||||
if (value == true)
|
||||
{
|
||||
G4DataVector* energies = run -> GetPrimaryParticleEnergy();
|
||||
G4DataVector* data = run -> GetPrimaryParticleEnergyDistribution();
|
||||
G4double sum = run -> GetPrimaryParticleEnergyDistributionSum();
|
||||
G4double partSum = 0;
|
||||
G4int j = 0;
|
||||
G4double random = sum*G4UniformRand();
|
||||
while (partSum<random)
|
||||
{
|
||||
partSum += (*data)[j];
|
||||
j++;
|
||||
}
|
||||
|
||||
particleGun -> SetParticleEnergy((*energies)[j]);
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
G4double energy = particleGun -> GetParticleEnergy();
|
||||
RemSimAnalysisManager* analysis = RemSimAnalysisManager::getInstance();
|
||||
analysis -> primaryParticleEnergyDistribution(energy/MeV);
|
||||
#endif
|
||||
|
||||
if (moon == true) MoonConfiguration();
|
||||
else
|
||||
{
|
||||
particleGun -> SetParticlePosition(G4ThreeVector(0., 0., -25.*m));
|
||||
G4ThreeVector v(0.0,0.0,1.0);
|
||||
particleGun -> SetParticleMomentumDirection(v);
|
||||
|
||||
}
|
||||
|
||||
particleGun -> GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
G4String excep = "Load data file";
|
||||
G4Exception(excep);
|
||||
}
|
||||
}
|
||||
|
||||
void RemSimInterplanetarySpaceConfiguration:: MoonConfiguration()
|
||||
{
|
||||
//Generate the primary particles on a hemisphere with random direction
|
||||
//position
|
||||
G4double radius = 25.* m;
|
||||
G4double angle = pi * G4UniformRand()*rad;
|
||||
G4double y0 = radius*cos(angle);
|
||||
G4double x0 = 0.*m;
|
||||
G4double z0 = -radius*sin(angle);
|
||||
|
||||
if ( z0 < 0. *m)
|
||||
{
|
||||
particleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
|
||||
}
|
||||
|
||||
//direction
|
||||
G4double angledir = pi * G4UniformRand()*rad;
|
||||
if ((angledir> (pi/2.-angle)) && angledir<(3*pi/2.-angle))
|
||||
{
|
||||
G4double a,b,c;
|
||||
b=cos(angledir);
|
||||
a=0.;
|
||||
c=sin(angledir);
|
||||
G4ThreeVector direction(a,b,c);
|
||||
particleGun -> SetParticleMomentumDirection(direction);
|
||||
}
|
||||
}
|
||||
|
||||
G4double RemSimInterplanetarySpaceConfiguration:: GetInitialEnergy()
|
||||
{
|
||||
G4double primaryParticleEnergy = particleGun -> GetParticleEnergy();
|
||||
return primaryParticleEnergy;
|
||||
}
|
||||
void RemSimInterplanetarySpaceConfiguration::SetMoon(G4bool value)
|
||||
{
|
||||
moon = value;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#include "RemSimIonICRU.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4MultipleScattering.hh"
|
||||
#include "G4hLowEnergyIonisation.hh"
|
||||
#include "G4hIonisation.hh"
|
||||
#include "G4hLowEnergyLoss.hh"
|
||||
|
||||
RemSimIonICRU::RemSimIonICRU(const G4String& name): G4VPhysicsConstructor(name)
|
||||
{ }
|
||||
|
||||
RemSimIonICRU::~RemSimIonICRU()
|
||||
{ }
|
||||
|
||||
void RemSimIonICRU::ConstructProcess()
|
||||
{
|
||||
theParticleIterator -> reset();
|
||||
|
||||
while( (*theParticleIterator)() )
|
||||
{
|
||||
G4ParticleDefinition* particle = theParticleIterator -> value();
|
||||
G4ProcessManager* manager = particle -> GetProcessManager();
|
||||
G4String particleName = particle -> GetParticleName();
|
||||
G4double charge = particle -> GetPDGCharge();
|
||||
|
||||
if (particleName == "proton" || particleName == "alpha"
|
||||
|| particleName == "GenericIon")
|
||||
{
|
||||
G4hLowEnergyIonisation* ionisation = new G4hLowEnergyIonisation();
|
||||
G4VProcess* multipleScattering = new G4MultipleScattering();
|
||||
manager -> AddProcess(multipleScattering, -1,1,1);
|
||||
manager -> AddProcess(ionisation, -1,2,2);
|
||||
}
|
||||
else if (charge != 0.0)
|
||||
{
|
||||
if (particleName != "e+" && particleName != "e-" &&
|
||||
(particleName != "mu+") && (particleName != "mu-"))
|
||||
{
|
||||
if((!particle -> IsShortLived()) &&
|
||||
(particle -> GetParticleName() != "chargedgeantino"))
|
||||
{
|
||||
G4hLowEnergyIonisation* ionisation = new G4hLowEnergyIonisation();
|
||||
G4VProcess* multipleScattering = new G4MultipleScattering();
|
||||
manager -> AddProcess(multipleScattering, -1,1,1);
|
||||
manager -> AddProcess(ionisation, -1,2,2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#include "RemSimIonStandard.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4MultipleScattering.hh"
|
||||
#include "G4hIonisation.hh"
|
||||
|
||||
RemSimIonStandard::RemSimIonStandard(const G4String& name): G4VPhysicsConstructor(name)
|
||||
{ }
|
||||
|
||||
RemSimIonStandard::~RemSimIonStandard()
|
||||
{ }
|
||||
|
||||
void RemSimIonStandard::ConstructProcess()
|
||||
{
|
||||
theParticleIterator -> reset();
|
||||
|
||||
while( (*theParticleIterator)() )
|
||||
{
|
||||
G4ParticleDefinition* particle = theParticleIterator -> value();
|
||||
G4ProcessManager* manager = particle -> GetProcessManager();
|
||||
G4String particleName = particle -> GetParticleName();
|
||||
G4double charge = particle -> GetPDGCharge();
|
||||
|
||||
if (particleName == "proton" || particleName == "alpha"
|
||||
|| particleName == "GenericIon")
|
||||
{
|
||||
G4hIonisation* ionisation = new G4hIonisation();
|
||||
G4VProcess* multipleScattering = new G4MultipleScattering();
|
||||
manager -> AddProcess(multipleScattering, -1,1,1);
|
||||
manager -> AddProcess(ionisation, -1,2,2);
|
||||
}
|
||||
else if (charge != 0.0)
|
||||
{
|
||||
if (particleName != "e+" && particleName != "e-" &&
|
||||
(particleName != "mu+") && (particleName != "mu-"))
|
||||
{
|
||||
if((!particle -> IsShortLived()) &&
|
||||
(particle -> GetParticleName() != "chargedgeantino"))
|
||||
{
|
||||
G4hIonisation* ionisation = new G4hIonisation();
|
||||
G4VProcess* multipleScattering = new G4MultipleScattering();
|
||||
manager -> AddProcess(multipleScattering, -1,1,1);
|
||||
manager -> AddProcess(ionisation, -1,2,2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,250 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * RemSimMaterial.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: RemSimMaterial.cc,v 1.5 2004/05/22 12:57:06 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
#include "G4MaterialPropertyVector.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "RemSimMaterial.hh"
|
||||
|
||||
RemSimMaterial::RemSimMaterial():
|
||||
matPb(0), matAir(0), matH2O(0), Al(0), nylon(0), mylar(0),
|
||||
beta(0), nextel(0), kevlar(0),
|
||||
vacuum(0), betaCloth(0), eterogeneousNextel(0), kevlarVacuum(0),
|
||||
polyethylene(0), polyacrylate(0), evoh(0), nomex(0), nomexAir(0),
|
||||
kevlarAir(0), moon(0)
|
||||
{;}
|
||||
|
||||
RemSimMaterial::~RemSimMaterial()
|
||||
{
|
||||
delete moon;
|
||||
delete kevlarAir;
|
||||
delete nomexAir;
|
||||
delete nomex;
|
||||
delete evoh;
|
||||
delete polyacrylate;
|
||||
delete polyethylene;
|
||||
delete kevlarVacuum;
|
||||
delete eterogeneousNextel;
|
||||
delete betaCloth;
|
||||
delete vacuum;
|
||||
delete kevlar;
|
||||
delete nextel;
|
||||
delete beta;
|
||||
delete mylar;
|
||||
delete nylon;
|
||||
delete Al;
|
||||
delete matH2O;
|
||||
delete matAir;
|
||||
delete matPb;
|
||||
}
|
||||
|
||||
void RemSimMaterial::DefineMaterials()
|
||||
{
|
||||
// Define required materials
|
||||
|
||||
G4double A; // atomic mass
|
||||
G4double Z; // atomic number
|
||||
G4double d; // density
|
||||
|
||||
// General elements
|
||||
|
||||
A = 1.01*g/mole;
|
||||
G4Element* elH = new G4Element ("Hydrogen","H",Z = 1.,A);
|
||||
|
||||
A = 10.811*g/mole;
|
||||
G4Element* elB = new G4Element ("Boro","B",Z = 5.,A);
|
||||
|
||||
A = 14.01*g/mole;
|
||||
G4Element* elN = new G4Element("Nitrogen","N",Z = 7.,A);
|
||||
|
||||
A = 16.00*g/mole;
|
||||
|
||||
G4Element* elO = new G4Element("Oxygen","O",Z = 8.,A);
|
||||
|
||||
A=26.98*g/mole;
|
||||
G4Element* elAl = new G4Element("Aluminum","Al", Z = 13.,A);
|
||||
|
||||
A = 12.011*g/mole;
|
||||
G4Element* elC = new G4Element("Carbon","C",Z = 6.,A);
|
||||
|
||||
A = 24.305*g/mole;
|
||||
G4Element* elMg = new G4Element("Magnesium","Mg",Z = 12.,A);
|
||||
|
||||
A = 35.453*g/mole;
|
||||
G4Element* elCl = new G4Element("Chlorine","Cl",Z = 17.,A);
|
||||
|
||||
A = 40.08*g/mole;
|
||||
G4Element* elCa = new G4Element("Calcium","Ca",Z = 20.,A);
|
||||
|
||||
A = 28.09*g/mole;
|
||||
G4Element* elSi = new G4Element("Silicon","Si",Z = 14.,A);
|
||||
|
||||
A = 55.85*g/mole;
|
||||
G4Element* elFe = new G4Element("Iron","Fe",Z = 26.,A);
|
||||
|
||||
//Lead material
|
||||
A = 207.19*g/mole;
|
||||
Z = 82;
|
||||
d = 11.35*g/cm3;
|
||||
matPb = new G4Material("Lead",Z,A,d);
|
||||
|
||||
// Air material
|
||||
G4double airDensity = 1.290*mg/cm3;
|
||||
G4Material* matAir = new G4Material("Air",airDensity,2);
|
||||
matAir -> AddElement(elN,0.7);
|
||||
matAir -> AddElement(elO,0.3);
|
||||
|
||||
// Water
|
||||
d = 1.000*g/cm3;
|
||||
matH2O = new G4Material("Water",d,2);
|
||||
matH2O -> AddElement(elH,2);
|
||||
matH2O -> AddElement(elO,1);
|
||||
matH2O -> GetIonisation() -> SetMeanExcitationEnergy(75.0*eV);
|
||||
|
||||
Al = new G4Material("Aluminium", Z= 13., A= 26.98*g/mole, d = 2.7*g/cm3);
|
||||
|
||||
//nylon (alenia spazio)
|
||||
d = 1.14 *g/cm3;
|
||||
nylon = new G4Material("nylon",d,4);
|
||||
nylon -> AddElement(elH,0.108);
|
||||
nylon -> AddElement(elC,0.68);
|
||||
nylon -> AddElement(elN,0.099);
|
||||
nylon -> AddElement(elO,0.113);
|
||||
|
||||
//mylar (alenia spazio)
|
||||
d= 1.4 *g/cm3;
|
||||
mylar = new G4Material("mylar",d,3);
|
||||
mylar -> AddElement(elH,0.042);
|
||||
mylar -> AddElement(elC,0.625);
|
||||
mylar -> AddElement(elO,0.333);
|
||||
|
||||
//beta cloth
|
||||
G4double betaDensity = 2.3 *g/cm3;
|
||||
beta = new G4Material("beta",betaDensity,2);
|
||||
beta -> AddElement(elO,0.53);
|
||||
beta -> AddElement(elSi,0.47);
|
||||
|
||||
G4double nextelDensity = 2.7 * g/cm3;
|
||||
nextel = new G4Material("nextel",nextelDensity,4);
|
||||
nextel -> AddElement(elB,0.04);
|
||||
nextel -> AddElement(elO,0.52);
|
||||
nextel -> AddElement(elAl,0.33);
|
||||
nextel -> AddElement(elSi,0.11);
|
||||
|
||||
//kevlar
|
||||
G4double kevlarDensity = 1.44 *g/cm3;
|
||||
kevlar = new G4Material("kevlar",d,4);
|
||||
kevlar -> AddElement(elH,0.04);
|
||||
kevlar -> AddElement(elC,0.71);
|
||||
kevlar -> AddElement(elO,0.12);
|
||||
kevlar -> AddElement(elN,0.13);
|
||||
|
||||
//vacuum
|
||||
G4double vacuumDensity = 1.e-25 *g/cm3;
|
||||
G4double pressure = 3.e-18*pascal;
|
||||
G4double temperature = 2.73*kelvin;
|
||||
vacuum = new G4Material("Galactic", Z=1., A=1.01*g/mole,
|
||||
vacuumDensity,kStateGas,temperature,pressure);
|
||||
|
||||
d = (vacuumDensity*0.44)+ (betaDensity*0.56);
|
||||
betaCloth = new G4Material("betacloth",d,2);
|
||||
betaCloth -> AddMaterial (beta, 0.56);
|
||||
betaCloth -> AddMaterial (vacuum,0.44);
|
||||
|
||||
d = (vacuumDensity*0.73)+ (nextelDensity*0.27);
|
||||
eterogeneousNextel = new G4Material("Nextel312AF62",d,2);
|
||||
eterogeneousNextel -> AddMaterial (vacuum, 0.73);
|
||||
eterogeneousNextel -> AddMaterial (nextel, 0.27);
|
||||
|
||||
d = (vacuumDensity*0.44)+ (kevlarDensity*0.56);
|
||||
kevlarVacuum = new G4Material("kevlarVacuum",d,2);
|
||||
kevlarVacuum -> AddMaterial (vacuum, 0.44);
|
||||
kevlarVacuum -> AddMaterial (kevlar, 0.56);
|
||||
|
||||
d = 0.94 * g/cm3;
|
||||
polyethylene = new G4Material("polyethylene",d,2);
|
||||
polyethylene -> AddElement(elH,0.14);
|
||||
polyethylene -> AddElement(elC,0.86);
|
||||
|
||||
d = 1.19 * g/cm3;
|
||||
polyacrylate = new G4Material("polyacrylate",d,3);
|
||||
polyacrylate -> AddElement(elH,0.08);
|
||||
polyacrylate -> AddElement(elC,0.60);
|
||||
polyacrylate -> AddElement(elO,0.32);
|
||||
|
||||
d = 1.17 * g/cm3;
|
||||
evoh = new G4Material("evoh",d,3);
|
||||
evoh -> AddElement(elH,0.11);
|
||||
evoh -> AddElement(elC,0.67);
|
||||
evoh -> AddElement(elO,0.22);
|
||||
|
||||
G4double nomexDensity = 0.98 * g/cm3;
|
||||
nomex = new G4Material("nomex",nomexDensity,5);
|
||||
nomex -> AddElement(elH,0.04);
|
||||
nomex -> AddElement(elC,0.54);
|
||||
nomex -> AddElement(elN,0.09);
|
||||
nomex -> AddElement(elO,0.10);
|
||||
nomex -> AddElement(elCl,0.23);
|
||||
|
||||
d = 0.45*(nomexDensity)+ 0.55*(airDensity);
|
||||
nomexAir = new G4Material("nomexAir",d,2);
|
||||
nomexAir -> AddMaterial(nomex,0.45);
|
||||
nomexAir -> AddMaterial(matAir,0.55);
|
||||
|
||||
d =0.56*(kevlarDensity)+ 0.44*(airDensity);
|
||||
kevlarAir = new G4Material("kevlarAir",d,2);
|
||||
kevlarAir -> AddMaterial(kevlar,0.56);
|
||||
kevlarAir -> AddMaterial(matAir,0.44);
|
||||
|
||||
d = 1.5*g/cm3;
|
||||
moon = new G4Material("moon",d,6);
|
||||
moon -> AddElement(elO,0.45);
|
||||
moon -> AddElement(elMg,0.05);
|
||||
moon -> AddElement(elAl,0.13);
|
||||
moon -> AddElement(elSi,0.21);
|
||||
moon -> AddElement(elCa,0.10);
|
||||
moon -> AddElement(elFe,0.06);
|
||||
}
|
||||
|
||||
G4Material* RemSimMaterial::GetMaterial(G4String material)
|
||||
{
|
||||
G4Material* pttoMaterial = G4Material::GetMaterial(material);
|
||||
return pttoMaterial;
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// **************************************
|
||||
// * *
|
||||
// * RemSimMoonHabitat.cc *
|
||||
// * *
|
||||
// **************************************
|
||||
//
|
||||
// $Id: RemSimMoonHabitat.cc,v 1.4 2004/05/22 12:57:06 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Author:Susanna Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
#include "RemSimVGeometryComponent.hh"
|
||||
#include "RemSimMaterial.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "RemSimMoonHabitat.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Trd.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4UserLimits.hh"
|
||||
#include "RemSimDecorator.hh"
|
||||
#include "RemSimAstronautDecorator.hh"
|
||||
|
||||
RemSimMoonHabitat::RemSimMoonHabitat()
|
||||
{
|
||||
pMaterial = new RemSimMaterial();
|
||||
shelterPhys = 0;
|
||||
}
|
||||
RemSimMoonHabitat::~RemSimMoonHabitat()
|
||||
{
|
||||
delete pMaterial;
|
||||
}
|
||||
void RemSimMoonHabitat::ConstructComponent(G4VPhysicalVolume* motherVolume)
|
||||
{
|
||||
pMaterial -> DefineMaterials();
|
||||
|
||||
G4Material* moonMaterial = pMaterial->GetMaterial("moon");
|
||||
G4Material* air = pMaterial -> GetMaterial("Air");
|
||||
|
||||
// Moon Surface definition
|
||||
G4double sizeX = 30.*m;
|
||||
G4double sizeY = 30.*m;
|
||||
G4double sizeZ = 15.*m;
|
||||
|
||||
G4Box* moon = new G4Box("moon",sizeX,sizeY,sizeZ);
|
||||
|
||||
G4LogicalVolume* moonLogical = new G4LogicalVolume(moon,
|
||||
moonMaterial,
|
||||
"moon",0,0,0);
|
||||
|
||||
G4VPhysicalVolume* moonPhys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,sizeZ), "moon",moonLogical,
|
||||
motherVolume,
|
||||
false,0);
|
||||
|
||||
G4double thick = 4.5 *m;
|
||||
G4Box* shelter = new G4Box("shelter",5.*m,5.*m,thick/2.);
|
||||
G4LogicalVolume* shelterLog = new G4LogicalVolume(shelter,
|
||||
air,
|
||||
"shelter",
|
||||
0,0,0);
|
||||
|
||||
G4double translation = - sizeZ + thick/2. + 0.5 *m;
|
||||
|
||||
shelterPhys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,translation),
|
||||
"shelter",shelterLog,
|
||||
moonPhys,false,0);
|
||||
|
||||
G4Colour red (1.0,0.0,0.0);
|
||||
G4Colour blue (0.,0.,1.);
|
||||
|
||||
G4VisAttributes* moonVisAtt = new G4VisAttributes(red);
|
||||
moonVisAtt -> SetVisibility(true);
|
||||
moonVisAtt -> SetForceWireframe(true);
|
||||
moonLogical -> SetVisAttributes(moonVisAtt);
|
||||
|
||||
G4VisAttributes* shelterVisAtt = new G4VisAttributes(blue);
|
||||
shelterVisAtt -> SetVisibility(true);
|
||||
shelterVisAtt -> SetForceWireframe(true);
|
||||
shelterLog -> SetVisAttributes(shelterVisAtt);
|
||||
}
|
||||
|
||||
void RemSimMoonHabitat::DestroyComponent()
|
||||
{}
|
||||
|
||||
G4VPhysicalVolume* RemSimMoonHabitat::GetShelter()
|
||||
{
|
||||
return shelterPhys;
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RemSimMuonStandard.cc,v 1.3 2004/05/22 12:57:07 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Author:Susanna Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
#include "RemSimMuonStandard.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
//muon:
|
||||
#include "G4hIonisation.hh"
|
||||
#include "G4MultipleScattering.hh"
|
||||
#include "G4MuIonisation.hh"
|
||||
#include "G4MuBremsstrahlung.hh"
|
||||
#include "G4MuPairProduction.hh"
|
||||
#include "G4MuonMinusCaptureAtRest.hh"
|
||||
|
||||
RemSimMuonStandard::RemSimMuonStandard(const G4String& name): G4VPhysicsConstructor(name)
|
||||
{ }
|
||||
|
||||
RemSimMuonStandard::~RemSimMuonStandard()
|
||||
{ }
|
||||
|
||||
void RemSimMuonStandard::ConstructProcess()
|
||||
{
|
||||
// Add standard processes for muons
|
||||
|
||||
theParticleIterator -> reset();
|
||||
|
||||
while( (*theParticleIterator)() )
|
||||
{
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle -> GetProcessManager();
|
||||
G4String particleName = particle -> GetParticleName();
|
||||
|
||||
if(( particleName == "mu+")|| (particleName == "mu-" ))
|
||||
{//muon
|
||||
G4VProcess* aMultipleScattering = new G4MultipleScattering();
|
||||
G4VProcess* aBremsstrahlung = new G4MuBremsstrahlung();
|
||||
G4VProcess* aPairProduction = new G4MuPairProduction();
|
||||
G4VProcess* anIonisation = new G4MuIonisation();
|
||||
//
|
||||
// add processes
|
||||
pmanager -> AddProcess(anIonisation);
|
||||
pmanager -> AddProcess(aMultipleScattering);
|
||||
pmanager -> AddProcess(aBremsstrahlung);
|
||||
pmanager -> AddProcess(aPairProduction);
|
||||
//
|
||||
// set ordering for AlongStepDoIt
|
||||
pmanager -> SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
|
||||
pmanager -> SetProcessOrdering(anIonisation, idxAlongStep,2);
|
||||
pmanager -> SetProcessOrdering(aBremsstrahlung, idxAlongStep,3);
|
||||
pmanager -> SetProcessOrdering(aPairProduction, idxAlongStep,4);
|
||||
//
|
||||
// set ordering for PostStepDoIt
|
||||
pmanager -> SetProcessOrdering(aMultipleScattering, idxPostStep,1);
|
||||
pmanager -> SetProcessOrdering(anIonisation, idxPostStep,2);
|
||||
pmanager -> SetProcessOrdering(aBremsstrahlung, idxPostStep,3);
|
||||
pmanager -> SetProcessOrdering(aPairProduction, idxPostStep,4);
|
||||
|
||||
if( particleName == "mu-" )
|
||||
pmanager -> AddProcess(new G4MuonMinusCaptureAtRest(), 0,-1,-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RemSimParticles.cc,v 1.4 2004/05/22 12:57:07 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Author:Susanna Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
|
||||
#include "RemSimParticles.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4IonO16.hh"
|
||||
#include "G4IonC12.hh"
|
||||
#include "G4IonSi28.hh"
|
||||
#include "G4IonFe52.hh"
|
||||
#include "G4MesonConstructor.hh"
|
||||
#include "G4BaryonConstructor.hh"
|
||||
#include "G4ShortLivedConstructor.hh"
|
||||
#include "G4IonConstructor.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4TauMinus.hh"
|
||||
#include "G4TauPlus.hh"
|
||||
#include "G4NeutrinoTau.hh"
|
||||
#include "G4AntiNeutrinoTau.hh"
|
||||
#include "G4NeutrinoMu.hh"
|
||||
#include "G4AntiNeutrinoMu.hh"
|
||||
#include "G4NeutrinoE.hh"
|
||||
#include "G4AntiNeutrinoE.hh"
|
||||
#include "G4ChargedGeantino.hh"
|
||||
#include "G4Geantino.hh"
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4PionZero.hh"
|
||||
RemSimParticles::RemSimParticles(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{ }
|
||||
|
||||
RemSimParticles::~RemSimParticles()
|
||||
{}
|
||||
|
||||
void RemSimParticles::ConstructParticle()
|
||||
{
|
||||
G4Gamma::GammaDefinition();
|
||||
G4Electron::ElectronDefinition();
|
||||
G4Positron::PositronDefinition();
|
||||
G4Proton :: ProtonDefinition();
|
||||
G4Alpha :: AlphaDefinition();
|
||||
G4IonO16::IonO16Definition();
|
||||
G4IonC12::IonC12Definition();
|
||||
G4IonSi28::IonSi28Definition();
|
||||
G4IonFe52::IonFe52Definition();
|
||||
|
||||
// Mu
|
||||
G4MuonPlus::MuonPlusDefinition();
|
||||
G4MuonMinus::MuonMinusDefinition();
|
||||
G4NeutrinoMu::NeutrinoMuDefinition();
|
||||
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
|
||||
|
||||
// Tau
|
||||
G4TauMinus::TauMinusDefinition();
|
||||
G4TauPlus::TauPlusDefinition();
|
||||
G4NeutrinoTau::NeutrinoTauDefinition();
|
||||
G4AntiNeutrinoTau::AntiNeutrinoTauDefinition();
|
||||
|
||||
G4NeutrinoE::NeutrinoEDefinition();
|
||||
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
|
||||
|
||||
G4Geantino::GeantinoDefinition();
|
||||
G4ChargedGeantino::ChargedGeantinoDefinition();
|
||||
|
||||
G4PionPlus::PionPlusDefinition();
|
||||
G4PionMinus::PionMinusDefinition();
|
||||
G4PionZero::PionZeroDefinition();
|
||||
|
||||
G4MesonConstructor pMesonConstructor;
|
||||
pMesonConstructor.ConstructParticle();
|
||||
|
||||
G4BaryonConstructor pBaryonConstructor;
|
||||
pBaryonConstructor.ConstructParticle();
|
||||
|
||||
G4ShortLivedConstructor pShortLivedConstructor;
|
||||
pShortLivedConstructor.ConstructParticle();
|
||||
|
||||
G4IonConstructor pConstructor;
|
||||
pConstructor.ConstructParticle();
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RemSimPhotonEPDL.cc,v 1.4 2004/05/22 12:57:07 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Author:Susanna Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
#include "RemSimPhotonEPDL.hh"
|
||||
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4LowEnergyCompton.hh"
|
||||
#include "G4LowEnergyGammaConversion.hh"
|
||||
#include "G4LowEnergyPhotoElectric.hh"
|
||||
#include "G4LowEnergyRayleigh.hh"
|
||||
|
||||
RemSimPhotonEPDL::RemSimPhotonEPDL(const G4String& name):
|
||||
G4VPhysicsConstructor(name)
|
||||
{ }
|
||||
|
||||
RemSimPhotonEPDL::~RemSimPhotonEPDL()
|
||||
{ }
|
||||
|
||||
void RemSimPhotonEPDL::ConstructProcess()
|
||||
{
|
||||
// Add EPDL processes for photons
|
||||
|
||||
theParticleIterator -> reset();
|
||||
|
||||
while( (*theParticleIterator)() )
|
||||
{
|
||||
G4ParticleDefinition* particle = theParticleIterator -> value();
|
||||
G4ProcessManager* manager = particle -> GetProcessManager();
|
||||
G4String particleName = particle -> GetParticleName();
|
||||
|
||||
if (particleName == "gamma")
|
||||
{
|
||||
manager -> AddDiscreteProcess(new G4LowEnergyPhotoElectric);
|
||||
manager -> AddDiscreteProcess(new G4LowEnergyCompton);
|
||||
manager -> AddDiscreteProcess(new G4LowEnergyGammaConversion);
|
||||
manager -> AddDiscreteProcess(new G4LowEnergyRayleigh);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,239 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RemSimPhysicsList.cc,v 1.6 2004/05/27 13:32:46 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Author: Susanna Guatelli
|
||||
|
||||
#include "RemSimPhysicsList.hh"
|
||||
#include "RemSimPhysicsListMessenger.hh"
|
||||
#include "RemSimParticles.hh"
|
||||
#include "RemSimPhotonEPDL.hh"
|
||||
#include "RemSimElectronEEDL.hh"
|
||||
#include "RemSimPositronStandard.hh"
|
||||
#include "RemSimIonICRU.hh"
|
||||
#include "RemSimIonStandard.hh"
|
||||
#include "RemSimMuonStandard.hh"
|
||||
#include "RemSimDecay.hh"
|
||||
#include "RemSimHadronicPhysics.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ProcessVector.hh"
|
||||
#include "G4VProcess.hh"
|
||||
|
||||
RemSimPhysicsList::RemSimPhysicsList(): G4VModularPhysicsList(),
|
||||
electronIsRegistered(false),
|
||||
positronIsRegistered(false),
|
||||
photonIsRegistered(false),
|
||||
ionIsRegistered(false),
|
||||
hadronicIsRegistered(false),
|
||||
decayIsRegistered(false),
|
||||
muonIsRegistered(false)
|
||||
{
|
||||
defaultCutValue = 1.* mm;
|
||||
SetVerboseLevel(1);
|
||||
|
||||
messenger = new RemSimPhysicsListMessenger(this);
|
||||
|
||||
RegisterPhysics( new RemSimParticles("particles") );
|
||||
}
|
||||
|
||||
|
||||
RemSimPhysicsList::~RemSimPhysicsList()
|
||||
{
|
||||
delete messenger;
|
||||
}
|
||||
|
||||
|
||||
void RemSimPhysicsList::AddPhysicsList(const G4String& name)
|
||||
{
|
||||
|
||||
G4cout << "Adding PhysicsList chunk " << name << G4endl;
|
||||
|
||||
// Register LowE-EPDL processes for photons
|
||||
if (name == "photon-epdl")
|
||||
{
|
||||
if (photonIsRegistered)
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " cannot be registered ---- photon List already existing"
|
||||
<< G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " is registered" << G4endl;
|
||||
RegisterPhysics( new RemSimPhotonEPDL(name) );
|
||||
photonIsRegistered = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Register LowE-EEDL processes for electrons
|
||||
if (name == "electron-eedl")
|
||||
{
|
||||
if (electronIsRegistered)
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " cannot be registered ---- electron List already existing" << G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " is registered" << G4endl;
|
||||
RegisterPhysics( new RemSimElectronEEDL(name) );
|
||||
electronIsRegistered = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Register standard processes for positrons
|
||||
if (name == "positron-standard")
|
||||
{
|
||||
if (positronIsRegistered)
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " cannot be registered ---- positron List already existing" << G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " is registered" << G4endl;
|
||||
RegisterPhysics( new RemSimPositronStandard(name) );
|
||||
positronIsRegistered = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Register LowEnergy processes - ICRU Model - for p, alpha, ions.
|
||||
if (name == "ion-ICRU")
|
||||
{
|
||||
if (ionIsRegistered)
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " cannot be registered ----ion e.m. List already existing"
|
||||
<< G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " is registered" << G4endl;
|
||||
RegisterPhysics( new RemSimIonICRU(name) );
|
||||
ionIsRegistered = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (name == "ion-standard")
|
||||
{
|
||||
if (ionIsRegistered)
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " cannot be registered ----ion e.m. List already existing"
|
||||
<< G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " is registered" << G4endl;
|
||||
RegisterPhysics( new RemSimIonStandard(name) );
|
||||
ionIsRegistered = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Register hadronic process for p and alpha particle
|
||||
if (name == "hadronic")
|
||||
{
|
||||
if (hadronicIsRegistered)
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " cannot be registered ---- hadronic physics List already existing" << G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " is registered" << G4endl;
|
||||
RegisterPhysics( new RemSimHadronicPhysics(name) );
|
||||
hadronicIsRegistered = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (name == "muon-standard")
|
||||
{
|
||||
if (muonIsRegistered)
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " cannot be registered -- muon e.m. List already existing"
|
||||
<< G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " is registered" << G4endl;
|
||||
RegisterPhysics( new RemSimMuonStandard(name) );
|
||||
muonIsRegistered = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (name == "decay")
|
||||
{
|
||||
if (decayIsRegistered)
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " cannot be registered ---- decay physics List already existing" << G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout << "RemSimPhysicsList::AddPhysicsList: " << name
|
||||
<< " is registered" << G4endl;
|
||||
RegisterPhysics( new RemSimDecay(name) );
|
||||
decayIsRegistered = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (electronIsRegistered && positronIsRegistered && photonIsRegistered &&
|
||||
ionIsRegistered)
|
||||
{
|
||||
G4cout << "The electromagnetic processes are registered" << G4endl;
|
||||
|
||||
|
||||
if (muonIsRegistered && decayIsRegistered && hadronicIsRegistered)
|
||||
{
|
||||
G4cout << "The hadronic physics is registered for p and alpha (up to 100 GeV), the e.m. physics for muons is registered, the decay is registered"
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RemSimPhysicsList::SetCuts()
|
||||
{
|
||||
G4VUserPhysicsList::SetCutsWithDefault();
|
||||
if (verboseLevel>0) DumpCutValuesTable();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RemSimPhysicsListMessenger.cc,v 1.3 2004/05/22 12:57:07 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Author: Susanna Guatelli, guatelli@ge.infn.it
|
||||
|
||||
#include "RemSimPhysicsListMessenger.hh"
|
||||
#include "RemSimPhysicsList.hh"
|
||||
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
|
||||
RemSimPhysicsListMessenger::RemSimPhysicsListMessenger(RemSimPhysicsList * List)
|
||||
:RemSimList(List)
|
||||
{
|
||||
EnDir = new G4UIdirectory("/physics/");
|
||||
EnDir -> SetGuidance("physics commands");
|
||||
|
||||
physicsListCmd = new G4UIcmdWithAString("/physics/addPhysics",this);
|
||||
physicsListCmd -> SetGuidance("Add chunks of PhysicsList");
|
||||
physicsListCmd -> SetParameterName("choice",false);
|
||||
physicsListCmd -> AvailableForStates(G4State_PreInit);
|
||||
}
|
||||
|
||||
RemSimPhysicsListMessenger::~RemSimPhysicsListMessenger()
|
||||
{
|
||||
delete physicsListCmd;
|
||||
delete EnDir;
|
||||
}
|
||||
|
||||
void RemSimPhysicsListMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
if (command == physicsListCmd)
|
||||
{ RemSimList->AddPhysicsList(newValue); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RemSimPositronStandard.cc,v 1.3 2004/05/22 12:57:07 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Author: Susanna Guatelli, guatelli@ge.infn.it
|
||||
#include "RemSimPositronStandard.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4MultipleScattering.hh"
|
||||
#include "G4eIonisation.hh"
|
||||
#include "G4eBremsstrahlung.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
|
||||
RemSimPositronStandard::RemSimPositronStandard(const G4String& name): G4VPhysicsConstructor(name)
|
||||
{ }
|
||||
|
||||
RemSimPositronStandard::~RemSimPositronStandard()
|
||||
{ }
|
||||
|
||||
void RemSimPositronStandard::ConstructProcess()
|
||||
{
|
||||
// Add standard processes for positrons
|
||||
|
||||
theParticleIterator -> reset();
|
||||
|
||||
while( (*theParticleIterator)() )
|
||||
{
|
||||
G4ParticleDefinition* particle = theParticleIterator -> value();
|
||||
G4ProcessManager* manager = particle -> GetProcessManager();
|
||||
G4String particleName = particle -> GetParticleName();
|
||||
|
||||
if (particleName == "e+")
|
||||
{
|
||||
manager -> AddProcess(new G4MultipleScattering, -1, 1,1);
|
||||
manager -> AddProcess(new G4eIonisation, -1, 2,2);
|
||||
manager -> AddProcess(new G4eBremsstrahlung, -1,-1,3);
|
||||
manager -> AddProcess(new G4eplusAnnihilation, 0,-1,4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: RemSimPrimaryGeneratorAction.cc,v 1.8 2004/05/27 10:33:12 guatelli Exp $// Author: Susanna Guatelli, guatelli@ge.infn.it
|
||||
|
||||
#include "RemSimPrimaryGeneratorAction.hh"
|
||||
#include "RemSimPrimaryGeneratorMessenger.hh"
|
||||
#include "RemSimBasicGenerator.hh"
|
||||
#include "RemSimInterplanetarySpaceConfiguration.hh"
|
||||
#include "RemSimVPrimaryGeneratorFactory.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
RemSimPrimaryGeneratorAction::RemSimPrimaryGeneratorAction()
|
||||
{
|
||||
value = "Basic";
|
||||
primaryFactory1 = new RemSimBasicGenerator();
|
||||
primaryFactory2 = new RemSimInterplanetarySpaceConfiguration();
|
||||
messenger = new RemSimPrimaryGeneratorMessenger(this);
|
||||
}
|
||||
|
||||
RemSimPrimaryGeneratorAction::~RemSimPrimaryGeneratorAction()
|
||||
{
|
||||
delete messenger;
|
||||
delete primaryFactory2;
|
||||
delete primaryFactory1;
|
||||
}
|
||||
|
||||
G4double RemSimPrimaryGeneratorAction::GetInitialEnergy()
|
||||
{
|
||||
G4double initialEnergy = 0.;
|
||||
|
||||
if(value == "Basic")
|
||||
initialEnergy = primaryFactory1 -> GetInitialEnergy();
|
||||
|
||||
else if(value == "Interplanetary")
|
||||
initialEnergy = primaryFactory2 -> GetInitialEnergy();
|
||||
|
||||
return initialEnergy;
|
||||
}
|
||||
|
||||
void RemSimPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
if(value == "Basic")
|
||||
primaryFactory1 -> GeneratePrimaries(anEvent);
|
||||
|
||||
else if(value == "Interplanetary")
|
||||
{
|
||||
primaryFactory2 -> SetMoon(false);
|
||||
primaryFactory2 -> GeneratePrimaries(anEvent);
|
||||
}
|
||||
else if(value == "Moon")
|
||||
{
|
||||
primaryFactory2 -> SetMoon(true);
|
||||
primaryFactory2 -> GeneratePrimaries(anEvent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RemSimPrimaryGeneratorAction::SelectPrimaries(G4String val)
|
||||
{
|
||||
value = val;
|
||||
|
||||
if(value == "Basic")
|
||||
G4cout<< "The configuration is the basic generator" <<G4endl;
|
||||
|
||||
else if(value == "Interplanetary")
|
||||
{
|
||||
G4cout<< "The configuration is the interplanetary space configuration"
|
||||
<<G4endl;
|
||||
G4cout<<
|
||||
"Remember to type /run/data file.txt with the energy spectrum of primary particles!!!" <<G4endl;
|
||||
}
|
||||
|
||||
else if (value == "Moon")
|
||||
{
|
||||
G4cout<< "The configuration is the Moon Configuration" <<G4endl;
|
||||
G4cout<<
|
||||
"Remember to type /run/data file.txt with the energy spectrum of primary particles!!!" <<G4endl;
|
||||
}
|
||||
|
||||
else G4cout << "This Generator is not defined!" <<G4endl;
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Code developed by: S.Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
// *****************************************
|
||||
// * *
|
||||
// * RemSimPrimaryGeneratorMessenger.cc *
|
||||
// * *
|
||||
// *****************************************
|
||||
//
|
||||
//
|
||||
// $Id: RemSimPrimaryGeneratorMessenger.cc,v 1.5 2004/05/22 12:57:07 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
|
||||
#include "RemSimPrimaryGeneratorMessenger.hh"
|
||||
#include "RemSimRunAction.hh"
|
||||
#include "RemSimPrimaryGeneratorAction.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWithoutParameter.hh"
|
||||
|
||||
RemSimPrimaryGeneratorMessenger::RemSimPrimaryGeneratorMessenger( RemSimPrimaryGeneratorAction* prim): primary(prim)
|
||||
{
|
||||
gunDir = new G4UIdirectory("/gun/");
|
||||
gunDir->SetGuidance("Select the generation configuration of primary particles.");
|
||||
|
||||
fluxCmd = new G4UIcmdWithAString("/gun/generator",this);
|
||||
fluxCmd -> SetGuidance("Assign the configuration of generation of primary particles.");
|
||||
fluxCmd -> SetParameterName("choice",true);
|
||||
fluxCmd -> SetCandidates("Moon Interplanetary Basic");
|
||||
fluxCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
}
|
||||
|
||||
RemSimPrimaryGeneratorMessenger::~RemSimPrimaryGeneratorMessenger()
|
||||
{
|
||||
delete fluxCmd;
|
||||
delete gunDir;
|
||||
}
|
||||
|
||||
void RemSimPrimaryGeneratorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
if(command == fluxCmd) primary -> SelectPrimaries(newValue);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Code developed by: S.Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
// ************************************
|
||||
// * *
|
||||
// * RemSimROGeometry.cc *
|
||||
// * *
|
||||
// ************************************
|
||||
//
|
||||
// $Id: RemSimROGeometry.cc,v 1.5 2004/05/22 12:57:07 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
#include "RemSimROGeometry.hh"
|
||||
#include "RemSimDummySD.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4PVReplica.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4SubtractionSolid.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Material.hh"
|
||||
|
||||
RemSimROGeometry::RemSimROGeometry(G4double astronautDimX,
|
||||
G4double astronautDimY,
|
||||
G4double astronautDimZ,
|
||||
G4int numberOfVoxelsZ,
|
||||
G4double trans):
|
||||
|
||||
astronautDimensionX(astronautDimX),
|
||||
astronautDimensionY(astronautDimY),
|
||||
astronautDimensionZ(astronautDimZ),
|
||||
numberOfVoxelsAlongZ(numberOfVoxelsZ),
|
||||
translation(trans),
|
||||
ROAstronautZDivisionPhys(0)
|
||||
{
|
||||
}
|
||||
|
||||
RemSimROGeometry::~RemSimROGeometry()
|
||||
{
|
||||
}
|
||||
|
||||
G4VPhysicalVolume* RemSimROGeometry::Build()
|
||||
{
|
||||
// A dummy material is used to fill the volumes of the readout geometry.
|
||||
// (It will be allowed to set a NULL pointer in volumes of such virtual
|
||||
// division in future, since this material is irrelevant for tracking.)
|
||||
|
||||
G4Material* dummyMat = new G4Material(name="dummyMat", 1., 1.*g/mole, 1.*g/cm3);
|
||||
|
||||
G4double worldDimensionX = 30.0*m;
|
||||
G4double worldDimensionY = 30.0*m;
|
||||
G4double worldDimensionZ = 30.0*m;
|
||||
|
||||
// world volume of ROGeometry ...
|
||||
G4Box *ROWorld = new G4Box("ROWorld",
|
||||
worldDimensionX,
|
||||
worldDimensionY,
|
||||
worldDimensionZ);
|
||||
|
||||
G4LogicalVolume *ROWorldLog = new G4LogicalVolume(ROWorld,
|
||||
dummyMat,
|
||||
"ROWorldLog",
|
||||
0,0,0);
|
||||
|
||||
G4VPhysicalVolume *ROWorldPhys = new G4PVPlacement(0,
|
||||
G4ThreeVector(),
|
||||
"ROWorldPhys",
|
||||
ROWorldLog,
|
||||
0,false,0);
|
||||
|
||||
// ROGeometry corresponding to the phantom
|
||||
G4Box *ROAstronaut = new G4Box("ROAstronaut",
|
||||
astronautDimensionX/2.,
|
||||
astronautDimensionY/2.,
|
||||
astronautDimensionZ/2.);
|
||||
|
||||
G4LogicalVolume *ROAstronautLog = new G4LogicalVolume(ROAstronaut,
|
||||
dummyMat,
|
||||
"ROAstronautLog",
|
||||
0,0,0);
|
||||
|
||||
G4VPhysicalVolume *ROAstronautPhys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,translation),
|
||||
"AstronautPhys",
|
||||
ROAstronautLog,
|
||||
ROWorldPhys,
|
||||
false,0);
|
||||
|
||||
// Z division ...
|
||||
G4double voxelSizeZ = astronautDimensionZ/numberOfVoxelsAlongZ;
|
||||
|
||||
G4Box *ROAstronautZDivision = new G4Box("ROAstronautZDivision",
|
||||
astronautDimensionX/2,
|
||||
astronautDimensionY/2.,
|
||||
voxelSizeZ/2.);
|
||||
|
||||
G4LogicalVolume *ROAstronautZDivisionLog = new G4LogicalVolume(ROAstronautZDivision,
|
||||
dummyMat,
|
||||
"ROAstronautZDivisionLog",
|
||||
0,0,0);
|
||||
|
||||
ROAstronautZDivisionPhys = new G4PVReplica("ROAstronautXDivisionPhys",
|
||||
ROAstronautZDivisionLog,
|
||||
ROAstronautPhys,
|
||||
kZAxis,
|
||||
numberOfVoxelsAlongZ,
|
||||
voxelSizeZ);
|
||||
RemSimDummySD *dummySD = new RemSimDummySD;
|
||||
ROAstronautZDivisionLog -> SetSensitiveDetector(dummySD);
|
||||
|
||||
return ROWorldPhys;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ************************************
|
||||
// * *
|
||||
// * RemSimRoofDecorator.cc *
|
||||
// * *
|
||||
// ************************************
|
||||
//
|
||||
// Code developed by: S.Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
//
|
||||
// $Id: RemSimRoofDecorator.cc,v 1.4 2004/06/18 09:18:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
#include "RemSimVGeometryComponent.hh"
|
||||
#include "RemSimMaterial.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "RemSimRoofDecorator.hh"
|
||||
#include "RemSimDecorator.hh"
|
||||
#include "G4Trd.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "RemSimSensitiveDetector.hh"
|
||||
#include "RemSimROGeometry.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
|
||||
RemSimRoofDecorator::RemSimRoofDecorator(RemSimVGeometryComponent* comp)
|
||||
: RemSimDecorator(comp)
|
||||
{
|
||||
pMaterial = new RemSimMaterial();
|
||||
roofVisAtt = 0;
|
||||
roof = 0;
|
||||
roofLog = 0;
|
||||
roofPhys = 0;
|
||||
}
|
||||
RemSimRoofDecorator::~RemSimRoofDecorator()
|
||||
{
|
||||
delete pMaterial;
|
||||
}
|
||||
void RemSimRoofDecorator::ConstructComponent(G4VPhysicalVolume* motherVolume)
|
||||
{
|
||||
pMaterial -> DefineMaterials();
|
||||
RemSimDecorator::ConstructComponent(motherVolume);
|
||||
ConstructRoof(motherVolume);
|
||||
}
|
||||
|
||||
void RemSimRoofDecorator::DestroyComponent()
|
||||
{
|
||||
delete roofVisAtt;
|
||||
roofVisAtt = 0;
|
||||
|
||||
delete roofPhys;
|
||||
roofPhys = 0;
|
||||
|
||||
delete roofLog;
|
||||
roofLog = 0;
|
||||
|
||||
delete roof;
|
||||
roof = 0;
|
||||
}
|
||||
void RemSimRoofDecorator::ConstructRoof(G4VPhysicalVolume* motherVolume)
|
||||
{
|
||||
// Geometry definition
|
||||
pMaterial -> DefineMaterials();
|
||||
|
||||
G4Material* moonMaterial = pMaterial -> GetMaterial("moon");
|
||||
|
||||
|
||||
roof = new G4Trd("roof",2.25*m,7.*m,5.*m, 8.*m, 1.5 *m);
|
||||
|
||||
roofLog = new G4LogicalVolume(roof,
|
||||
moonMaterial,
|
||||
"roof",
|
||||
0,0,0);
|
||||
|
||||
roofPhys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0., - 1.5 *m),
|
||||
"roof",roofLog,
|
||||
motherVolume,false,0);
|
||||
|
||||
//Visualisation attributes
|
||||
G4Colour red (1.0,0.0,0.0);
|
||||
roofVisAtt = new G4VisAttributes(red);
|
||||
roofVisAtt -> SetVisibility(true);
|
||||
roofVisAtt -> SetForceSolid(true);
|
||||
roofLog -> SetVisAttributes(roofVisAtt);
|
||||
PrintDetectorParameters();
|
||||
}
|
||||
|
||||
void RemSimRoofDecorator::ChangeThickness(G4double thick)
|
||||
{
|
||||
PrintDetectorParameters();
|
||||
roof -> SetZHalfLength(thick/2.);
|
||||
roofPhys -> SetTranslation(G4ThreeVector
|
||||
(0.,0., - thick/2.));
|
||||
}
|
||||
|
||||
void RemSimRoofDecorator::PrintDetectorParameters()
|
||||
{
|
||||
;
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * RemSimRunAction.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// Code developed by: S.Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
// $Id: RemSimRunAction.cc,v 1.9 2004/06/18 09:18:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
|
||||
#include "RemSimRunAction.hh"
|
||||
#include "RemSimDetectorConstruction.hh"
|
||||
#include "RemSimPrimaryGeneratorAction.hh"
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include "RemSimAnalysisManager.hh"
|
||||
#endif
|
||||
#include "RemSimRunMessenger.hh"
|
||||
#include "G4Run.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "RemSimRunAction.hh"
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
|
||||
RemSimRunAction::RemSimRunAction()
|
||||
{
|
||||
//Read the input file concerning the generation of primary particles
|
||||
energies = new G4DataVector;
|
||||
data = new G4DataVector;
|
||||
messenger = new RemSimRunMessenger(this);
|
||||
file = "";
|
||||
}
|
||||
|
||||
RemSimRunAction::~RemSimRunAction()
|
||||
{
|
||||
delete messenger;
|
||||
delete energies;
|
||||
delete data;
|
||||
}
|
||||
|
||||
void RemSimRunAction::BeginOfRunAction(const G4Run*)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RemSimRunAction::EndOfRunAction(const G4Run* aRun)
|
||||
{
|
||||
G4double numberEvents = aRun -> GetNumberOfEvent();
|
||||
G4cout<< "Number of events:" << numberEvents << G4endl;
|
||||
}
|
||||
|
||||
void RemSimRunAction::Read(G4String name)
|
||||
{
|
||||
file = name;
|
||||
ReadData(MeV,name);
|
||||
G4cout << name << " is the input file!" << G4endl;
|
||||
}
|
||||
|
||||
void RemSimRunAction::ReadData(G4double unitE, G4String fileName)
|
||||
{
|
||||
char nameChar[100] = {""};
|
||||
std::ostrstream ost(nameChar, 100, std::ios::out);
|
||||
|
||||
ost << fileName;
|
||||
|
||||
G4String name(nameChar);
|
||||
|
||||
std::ifstream file(fileName);
|
||||
std::filebuf* lsdp = file.rdbuf();
|
||||
|
||||
if (! (lsdp->is_open()) )
|
||||
{
|
||||
G4String excep = "RemSimRunAction - data file: not found";
|
||||
G4Exception(excep);
|
||||
}
|
||||
G4double a = 0;
|
||||
G4int k = 1;
|
||||
|
||||
do
|
||||
{
|
||||
file >> a;
|
||||
G4int nColumns = 2;
|
||||
// The file is organized into two columns:
|
||||
// 1st column is the energy
|
||||
// 2nd column is the corresponding value
|
||||
// The file terminates with the pattern: -1 -1
|
||||
// -2 -2
|
||||
if (a == -1 || a == -2)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (k%nColumns != 0)
|
||||
{
|
||||
G4double e = a * unitE;
|
||||
energies->push_back(e);
|
||||
// G4cout<<e<<"energy";
|
||||
|
||||
k++;
|
||||
|
||||
}
|
||||
else if (k%nColumns == 0)
|
||||
{
|
||||
G4double value = a;
|
||||
data->push_back(value);
|
||||
//G4cout<<" "<<a<<"flux"<<G4endl;
|
||||
k = 1;
|
||||
}
|
||||
}
|
||||
|
||||
} while (a != -2); // end of file
|
||||
|
||||
file.close();
|
||||
}
|
||||
|
||||
G4DataVector* RemSimRunAction::GetPrimaryParticleEnergy()
|
||||
{
|
||||
return energies;
|
||||
}
|
||||
|
||||
G4DataVector* RemSimRunAction::GetPrimaryParticleEnergyDistribution()
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
G4double RemSimRunAction::GetPrimaryParticleEnergyDistributionSum()
|
||||
{
|
||||
G4double sum = 0;
|
||||
size_t size = data -> size();
|
||||
for (size_t i = 0; i < size; i++)
|
||||
{
|
||||
sum+=(*data)[i];
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
G4bool RemSimRunAction::GetFile()
|
||||
{
|
||||
if (file == "") return false;
|
||||
else return true;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Code developed by: S.Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
// *********************************
|
||||
// * *
|
||||
// * RemSimRunMessenger.cc *
|
||||
// * *
|
||||
// *********************************
|
||||
//
|
||||
//
|
||||
// $Id: RemSimRunMessenger.cc,v 1.2 2004/05/22 12:57:07 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
|
||||
#include "RemSimRunMessenger.hh"
|
||||
#include "RemSimRunAction.hh"
|
||||
#include "RemSimRunAction.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
|
||||
RemSimRunMessenger::RemSimRunMessenger( RemSimRunAction* arun): run(arun)
|
||||
{
|
||||
runDir = new G4UIdirectory("/run/");
|
||||
runDir->SetGuidance("Select data.txt.");
|
||||
|
||||
readFileCmd = new G4UIcmdWithAString("/run/data",this);
|
||||
readFileCmd->SetGuidance("Select data.txt/ write the name of the file");
|
||||
readFileCmd->SetParameterName("choice",true);
|
||||
readFileCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
}
|
||||
|
||||
RemSimRunMessenger::~RemSimRunMessenger()
|
||||
{
|
||||
delete readFileCmd;
|
||||
delete runDir;
|
||||
}
|
||||
|
||||
void RemSimRunMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
if(command == readFileCmd) run -> Read(newValue);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: RemSimSensitiveDetector.cc,v 1.6 2004/05/22 12:57:07 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Code developed by: S.Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
#include "RemSimSensitiveDetector.hh"
|
||||
#include "RemSimHit.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4HCofThisEvent.hh"
|
||||
#include "G4TouchableHistory.hh"
|
||||
#include "G4ios.hh"
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include "RemSimAnalysisManager.hh"
|
||||
#endif
|
||||
|
||||
RemSimSensitiveDetector::RemSimSensitiveDetector(G4String name)
|
||||
:G4VSensitiveDetector(name)
|
||||
{
|
||||
G4String HCname;
|
||||
collectionName.insert(HCname="trackerCollection");
|
||||
}
|
||||
|
||||
RemSimSensitiveDetector::~RemSimSensitiveDetector(){;}
|
||||
|
||||
void RemSimSensitiveDetector::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
static G4int HCID = -1;
|
||||
trackerCollection = new RemSimHitsCollection
|
||||
(SensitiveDetectorName,collectionName[0]);
|
||||
if(HCID<0)
|
||||
{ HCID = GetCollectionID(0); }
|
||||
HCE -> AddHitsCollection(HCID,trackerCollection);
|
||||
}
|
||||
|
||||
G4bool RemSimSensitiveDetector::ProcessHits(G4Step* aStep,
|
||||
G4TouchableHistory* ROhist)
|
||||
{
|
||||
G4double edep = aStep -> GetTotalEnergyDeposit();
|
||||
if(edep==0.) return false;
|
||||
|
||||
G4int i = ROhist -> GetReplicaNumber();
|
||||
|
||||
RemSimHit* newHit = new RemSimHit();
|
||||
newHit -> SetEdep(edep);
|
||||
newHit -> SetIndexes(i);
|
||||
newHit->SetPosition(aStep->GetPreStepPoint()->GetPosition());
|
||||
trackerCollection -> insert( newHit );
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
RemSimAnalysisManager* analysis = RemSimAnalysisManager::getInstance();
|
||||
|
||||
// Energy deposit in the phantom
|
||||
analysis -> energyDepositStore(i,edep/MeV);
|
||||
|
||||
// Energy deposit of secondary particles in the phantom
|
||||
if(aStep -> GetTrack() -> GetTrackID()!= 1)
|
||||
analysis -> SecondaryEnergyDeposit(i,edep/MeV);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void RemSimSensitiveDetector::EndOfEvent(G4HCofThisEvent*)
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RemSimShelterSPEDecorator.cc,v 1.2 2004/05/22 12:57:07 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Code developed by: S.Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
#include "RemSimVGeometryComponent.hh"
|
||||
#include "RemSimMaterial.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "RemSimShelterSPEDecorator.hh"
|
||||
#include "RemSimDecorator.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "RemSimSensitiveDetector.hh"
|
||||
#include "RemSimROGeometry.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
|
||||
RemSimShelterSPEDecorator::RemSimShelterSPEDecorator(RemSimVGeometryComponent* comp)
|
||||
: RemSimDecorator(comp)
|
||||
{
|
||||
shelterSPEX = 5.*m;
|
||||
shelterSPEY = 5.*m;
|
||||
shelterSPEZ = 75.*cm;
|
||||
translation = - 2.* m;
|
||||
pMaterial = new RemSimMaterial();
|
||||
|
||||
shelterSPEVisAtt = 0;
|
||||
}
|
||||
RemSimShelterSPEDecorator::~RemSimShelterSPEDecorator()
|
||||
{
|
||||
delete pMaterial;
|
||||
}
|
||||
void RemSimShelterSPEDecorator::ConstructComponent(G4VPhysicalVolume* motherVolume)
|
||||
{
|
||||
pMaterial -> DefineMaterials();
|
||||
RemSimDecorator::ConstructComponent(motherVolume);
|
||||
ConstructShelterSPE(motherVolume);
|
||||
}
|
||||
|
||||
void RemSimShelterSPEDecorator::DestroyComponent()
|
||||
{
|
||||
delete shelterSPEVisAtt;
|
||||
shelterSPEVisAtt = 0;
|
||||
|
||||
delete shelterSPEPhys;
|
||||
shelterSPEPhys = 0;
|
||||
|
||||
delete shelterSPELog;
|
||||
shelterSPELog = 0;
|
||||
|
||||
delete shelterSPE;
|
||||
shelterSPE = 0;
|
||||
}
|
||||
void RemSimShelterSPEDecorator::ConstructShelterSPE(G4VPhysicalVolume* motherVolume)
|
||||
{
|
||||
// Geometry definition
|
||||
pMaterial -> DefineMaterials();
|
||||
|
||||
G4Material* water = pMaterial -> GetMaterial("Water");
|
||||
|
||||
shelterSPE = new G4Box("shelterSPE",shelterSPEX/2.,shelterSPEY/2.,shelterSPEZ/2.);
|
||||
|
||||
shelterSPELog = new G4LogicalVolume(shelterSPE, water,
|
||||
"shelterSPELog",0,0,0);
|
||||
|
||||
shelterSPEPhys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,translation + shelterSPEZ/2.),
|
||||
"shelterSPEPhys", shelterSPELog, motherVolume,false,0);
|
||||
|
||||
//Visualisation attributes
|
||||
G4Colour red (1.0,0.0,0.0);
|
||||
shelterSPEVisAtt = new G4VisAttributes(red);
|
||||
shelterSPEVisAtt -> SetVisibility(true);
|
||||
shelterSPEVisAtt -> SetForceSolid(true);
|
||||
shelterSPELog -> SetVisAttributes(shelterSPEVisAtt);
|
||||
PrintDetectorParameters();
|
||||
}
|
||||
|
||||
void RemSimShelterSPEDecorator::ChangeThickness(G4double)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
void RemSimShelterSPEDecorator::PrintDetectorParameters()
|
||||
{
|
||||
G4cout << "-----------------------------------------------------------------------"
|
||||
<< G4endl
|
||||
<< "the shelterSPE is a box whose thickness is: " << G4endl
|
||||
<< ((shelterSPE -> GetZHalfLength())*2.)/cm
|
||||
<< " cm along the Z axis"
|
||||
<< G4endl
|
||||
<< "material of the shelterSPE: "
|
||||
<< shelterSPELog -> GetMaterial() -> GetName() <<G4endl
|
||||
<< G4endl;
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RemSimShieldingDecorator.cc,v 1.5 2004/05/27 08:36:52 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Code developed by: S.Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
#include "RemSimVGeometryComponent.hh"
|
||||
#include "RemSimMaterial.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "RemSimShieldingDecorator.hh"
|
||||
#include "RemSimDecorator.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "RemSimSensitiveDetector.hh"
|
||||
#include "RemSimROGeometry.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
|
||||
RemSimShieldingDecorator::RemSimShieldingDecorator(RemSimVGeometryComponent* comp)
|
||||
: RemSimDecorator(comp)
|
||||
{
|
||||
shieldingX = 5.*m;
|
||||
shieldingY = 5.*m;
|
||||
shieldingZ = 10.*cm;
|
||||
translation = -4.4* m;
|
||||
pMaterial = new RemSimMaterial();
|
||||
|
||||
shieldingVisAtt = 0;
|
||||
}
|
||||
RemSimShieldingDecorator::~RemSimShieldingDecorator()
|
||||
{
|
||||
delete pMaterial;
|
||||
}
|
||||
void RemSimShieldingDecorator::ConstructComponent(G4VPhysicalVolume* motherVolume)
|
||||
{
|
||||
pMaterial -> DefineMaterials();
|
||||
RemSimDecorator::ConstructComponent(motherVolume);
|
||||
ConstructShielding(motherVolume);
|
||||
}
|
||||
|
||||
void RemSimShieldingDecorator::DestroyComponent()
|
||||
{
|
||||
delete shieldingVisAtt;
|
||||
shieldingVisAtt = 0;
|
||||
|
||||
delete shieldingPhys;
|
||||
shieldingPhys = 0;
|
||||
|
||||
delete shieldingLog;
|
||||
shieldingLog = 0;
|
||||
|
||||
delete shielding;
|
||||
shielding = 0;
|
||||
}
|
||||
void RemSimShieldingDecorator::ConstructShielding(G4VPhysicalVolume* motherVolume)
|
||||
{
|
||||
// Geometry definition
|
||||
pMaterial -> DefineMaterials();
|
||||
|
||||
G4Material* water = pMaterial -> GetMaterial("Water");
|
||||
|
||||
shielding = new G4Box("shielding",shieldingX/2.,shieldingY/2.,shieldingZ/2.);
|
||||
|
||||
shieldingLog = new G4LogicalVolume(shielding, water,
|
||||
"shieldingLog",0,0,0);
|
||||
|
||||
shieldingPhys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,translation + shieldingZ/2.),
|
||||
"shieldingPhys", shieldingLog, motherVolume,false,0);
|
||||
|
||||
//Visualisation attributes
|
||||
G4Colour red (1.0,0.0,0.0);
|
||||
shieldingVisAtt = new G4VisAttributes(red);
|
||||
shieldingVisAtt -> SetVisibility(true);
|
||||
shieldingVisAtt -> SetForceSolid(true);
|
||||
shieldingLog -> SetVisAttributes(shieldingVisAtt);
|
||||
PrintDetectorParameters();
|
||||
}
|
||||
|
||||
void RemSimShieldingDecorator::ChangeThickness(G4double thick)
|
||||
{
|
||||
PrintDetectorParameters();
|
||||
shielding -> SetZHalfLength(thick/2.);
|
||||
shieldingPhys -> SetTranslation(G4ThreeVector
|
||||
(0.,0.,translation + thick/2.));
|
||||
}
|
||||
|
||||
void RemSimShieldingDecorator::PrintDetectorParameters()
|
||||
{
|
||||
G4cout << "-----------------------------------------------------------------------"
|
||||
<< G4endl
|
||||
<< "the shielding is a box whose thickness is: " << G4endl
|
||||
<< ((shielding -> GetZHalfLength())*2.)/cm
|
||||
<< " cm along the Z axis"
|
||||
<< G4endl
|
||||
<< "material of the shielding: "
|
||||
<< shieldingLog -> GetMaterial() -> GetName() <<G4endl
|
||||
<< G4endl;
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: RemSimSteppingAction.cc,v 1.5 2004/05/22 12:57:07 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
// Author: Susanna Guatelli (guatelli@ge.infn.it)
|
||||
//
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "G4SteppingManager.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4StepPoint.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "RemSimSteppingAction.hh"
|
||||
#include "RemSimPrimaryGeneratorAction.hh"
|
||||
#include "G4TrackStatus.hh"
|
||||
#include "RemSimSteppingActionMessenger.hh"
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include "RemSimAnalysisManager.hh"
|
||||
#endif
|
||||
|
||||
RemSimSteppingAction::RemSimSteppingAction(RemSimPrimaryGeneratorAction* primary):
|
||||
primaryAction(primary)
|
||||
{
|
||||
hadronic = "Off";
|
||||
messenger = new RemSimSteppingActionMessenger(this);
|
||||
}
|
||||
|
||||
RemSimSteppingAction::~RemSimSteppingAction()
|
||||
{
|
||||
delete messenger;
|
||||
}
|
||||
|
||||
void RemSimSteppingAction::UserSteppingAction(const G4Step* aStep)
|
||||
{
|
||||
G4String oldVolumeName = aStep -> GetPreStepPoint()->
|
||||
GetPhysicalVolume()-> GetName();
|
||||
|
||||
// Store in histograms useful information concerning primary particles
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
RemSimAnalysisManager* analysis = RemSimAnalysisManager::getInstance();
|
||||
|
||||
G4VPhysicalVolume* volume = aStep -> GetPostStepPoint() -> GetPhysicalVolume();
|
||||
|
||||
G4String particleName = (aStep -> GetTrack() -> GetDynamicParticle()
|
||||
-> GetDefinition() -> GetParticleName());
|
||||
|
||||
if(oldVolumeName != "phantom")
|
||||
{
|
||||
if (volume)
|
||||
{
|
||||
G4String volumeName = volume -> GetName();
|
||||
if (volumeName == "phantom")
|
||||
{
|
||||
G4double initialEnergy = primaryAction -> GetInitialEnergy();
|
||||
G4double particleEnergy = aStep -> GetTrack() -> GetKineticEnergy();
|
||||
if ( particleName == "proton" ||
|
||||
particleName == "alpha" ||
|
||||
particleName == "IonO16" ||
|
||||
particleName == "IonC12" ||
|
||||
particleName == "IonFe52"||
|
||||
particleName == "IonSi28")
|
||||
{
|
||||
analysis -> PrimaryInitialEnergyIn(initialEnergy);
|
||||
analysis -> PrimaryEnergyIn(particleEnergy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(oldVolumeName == "phantom")
|
||||
{
|
||||
if (volume)
|
||||
{
|
||||
G4String volumeName = volume -> GetName();
|
||||
|
||||
if (volumeName != "phantom")
|
||||
{
|
||||
G4double initialEnergy = primaryAction -> GetInitialEnergy();
|
||||
G4double particleEnergy = aStep->GetTrack() -> GetKineticEnergy();
|
||||
|
||||
if ( particleName == "proton" ||
|
||||
particleName == "alpha" ||
|
||||
particleName == "IonO16" ||
|
||||
particleName == "IonC12" ||
|
||||
particleName == "IonFe52"||
|
||||
particleName == "IonSi28" )
|
||||
{
|
||||
analysis -> PrimaryInitialEnergyOut(initialEnergy);
|
||||
analysis -> PrimaryEnergyOut(particleEnergy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//analysis of hadronic physics
|
||||
if (hadronic == "On")
|
||||
{
|
||||
if(aStep -> GetPostStepPoint() -> GetProcessDefinedStep() != NULL)
|
||||
{
|
||||
G4String process = aStep -> GetPostStepPoint() ->
|
||||
GetProcessDefinedStep() ->GetProcessName();
|
||||
|
||||
if ((process != "Transportation") &&
|
||||
(process != "msc") &&
|
||||
(process != "LowEnergyIoni") &&
|
||||
(process != "LowEnergyBrem") &&
|
||||
(process != "eIoni") &&
|
||||
(process != "hIoni") &&
|
||||
(process != "eBrem") &&
|
||||
(process != "compt") &&
|
||||
(process != "phot") &&
|
||||
(process != "conv") &&
|
||||
(process != "annihil") &&
|
||||
(process != "hLowEIoni") &&
|
||||
(process != "LowEnBrem") &&
|
||||
(process != "LowEnCompton") &&
|
||||
(process != "LowEnPhotoElec") &&
|
||||
(process != "LowEnRayleigh") &&
|
||||
(process != "LowEnConversion"))
|
||||
G4cout << "Hadronic Process:" << process << G4endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
void RemSimSteppingAction::SetHadronicAnalysis(G4String value)
|
||||
{
|
||||
hadronic = value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//$Id: RemSimSteppingActionMessenger.cc,v 1.2 2004/05/22 12:57:07 guatelli Exp $// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Code developed by: S.Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
|
||||
#include "RemSimSteppingActionMessenger.hh"
|
||||
#include "RemSimSteppingAction.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
|
||||
RemSimSteppingActionMessenger::RemSimSteppingActionMessenger(RemSimSteppingAction* SA)
|
||||
:steppingAction(SA)
|
||||
{
|
||||
stepDirectory = new G4UIdirectory("/step/");
|
||||
stepDirectory -> SetGuidance("Step control command.");
|
||||
|
||||
hadronicCmd = new G4UIcmdWithAString("/step/hadronicVerbose",this);
|
||||
hadronicCmd -> SetGuidance("Set the verbose level of hadronic processes");
|
||||
hadronicCmd -> SetParameterName("choice", true);
|
||||
hadronicCmd -> SetCandidates("On Off");
|
||||
hadronicCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
}
|
||||
RemSimSteppingActionMessenger::~RemSimSteppingActionMessenger()
|
||||
{
|
||||
delete hadronicCmd;
|
||||
delete stepDirectory;
|
||||
}
|
||||
|
||||
void RemSimSteppingActionMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
{
|
||||
if(command == hadronicCmd) steppingAction -> SetHadronicAnalysis(newValue);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RemSimVGeometryComponent.cc,v 1.3 2004/05/22 12:57:07 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Code developed by: S.Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
|
||||
#include"RemSimVGeometryComponent.hh"
|
||||
|
||||
RemSimVGeometryComponent::RemSimVGeometryComponent()
|
||||
{;}
|
||||
RemSimVGeometryComponent::~RemSimVGeometryComponent()
|
||||
{;}
|
||||
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RemSimVPrimaryGeneratorFactory.cc,v 1.5 2004/05/22 12:57:07 guatelli Exp $Name: geant4-06-02 $
|
||||
//
|
||||
// Code developed by: S.Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
#include "RemSimVPrimaryGeneratorFactory.hh"
|
||||
|
||||
RemSimVPrimaryGeneratorFactory::RemSimVPrimaryGeneratorFactory()
|
||||
{
|
||||
}
|
||||
|
||||
RemSimVPrimaryGeneratorFactory::~RemSimVPrimaryGeneratorFactory()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,456 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RemSimVehicle1.cc,v 1.8 2004/05/27 08:36:52 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Code developed by: S.Guatelli, guatelli@ge.infn.it
|
||||
//
|
||||
#include "RemSimVGeometryComponent.hh"
|
||||
#include "RemSimMaterial.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "RemSimVehicle1.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4UserLimits.hh"
|
||||
|
||||
RemSimVehicle1::RemSimVehicle1():
|
||||
layervacuumPhys(0), layer1Phys(0), layer2Phys(0), layer3Phys(0),
|
||||
layer4Phys(0), layer5Phys(0), layer6Phys(0), layer7Phys(0), layer8Phys(0),
|
||||
layer9Phys(0), layer10Phys(0), layer11Phys(0), layer12Phys(0),
|
||||
layer13Phys(0), layer14Phys(0), layer15Phys(0), layerPhys(0),
|
||||
layer16Phys(0), layer17Phys(0), layer18Phys(0), layer19Phys(0),
|
||||
layer20Phys(0), layer21Phys(0), layer22Phys(0), layer23Phys(0),
|
||||
layer24Phys(0), layer25Phys(0), layer26Phys(0), layer27Phys(0)
|
||||
{
|
||||
pMaterial = new RemSimMaterial();
|
||||
}
|
||||
RemSimVehicle1::~RemSimVehicle1()
|
||||
{
|
||||
delete pMaterial;
|
||||
}
|
||||
void RemSimVehicle1::ConstructComponent(G4VPhysicalVolume* motherVolume)
|
||||
{
|
||||
|
||||
G4double sizeX = 5.*m;
|
||||
G4double sizeY = 5.*m;
|
||||
|
||||
G4Material* betacloth = pMaterial -> GetMaterial("betacloth");
|
||||
|
||||
//layer of betacloth
|
||||
G4double translation = - 5.*m;
|
||||
|
||||
G4double thick = 0.03 *cm;
|
||||
|
||||
G4Box* layer1 = new G4Box("layer1",sizeX/2.,sizeY/2.,thick/2.);
|
||||
|
||||
G4LogicalVolume* layer1Log = new G4LogicalVolume(layer1,
|
||||
betacloth,
|
||||
"layer1Log",
|
||||
0,0,0);
|
||||
|
||||
layer1Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,translation+thick/2.),
|
||||
"layer1Phys",
|
||||
layer1Log,
|
||||
motherVolume,
|
||||
false,
|
||||
0);
|
||||
|
||||
translation = translation + thick;
|
||||
|
||||
thick = 0.01*cm;
|
||||
|
||||
// Mylar layer
|
||||
G4Material* mylar = pMaterial -> GetMaterial("mylar");
|
||||
|
||||
G4Box* layer2 = new G4Box("layer2",sizeX/2.,sizeY/2.,thick/2.);
|
||||
|
||||
G4LogicalVolume* layer2Log = new G4LogicalVolume(layer2,
|
||||
mylar,
|
||||
"layer2Log",
|
||||
0,0,0);
|
||||
|
||||
layer2Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+ translation),
|
||||
"layer2Phys",
|
||||
layer2Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
// Nextel layer
|
||||
G4Material* nextel = pMaterial -> GetMaterial("Nextel312AF62");
|
||||
translation = translation + thick;
|
||||
thick = 0.1*cm;
|
||||
|
||||
G4Box* layer3 = new G4Box("layer3",sizeX/2.,sizeY/2.,thick/2.);
|
||||
|
||||
G4LogicalVolume* layer3Log = new G4LogicalVolume(layer3,
|
||||
nextel,
|
||||
"layer3Log",
|
||||
0,0,0);
|
||||
|
||||
layer3Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+ translation),
|
||||
"layer3Phys",
|
||||
layer3Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
|
||||
translation = translation + thick;
|
||||
thick = 10.06*cm;
|
||||
G4Material* vacuum = pMaterial -> GetMaterial("Galactic") ;
|
||||
G4Box* layer4 = new G4Box("layer4",sizeX/2.,sizeY/2.,thick/2.);
|
||||
|
||||
G4LogicalVolume* layer4Log = new G4LogicalVolume(layer4,
|
||||
vacuum,
|
||||
"layer4Log",
|
||||
0,0,0);
|
||||
layer4Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+ translation),
|
||||
"layer4Phys",
|
||||
layer4Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
// Nextel layer
|
||||
thick = 0.1*cm;
|
||||
translation = translation + 10.06*cm;
|
||||
layer5Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+ translation),
|
||||
"layer5Phys",
|
||||
layer3Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//Vacuum layer
|
||||
translation = translation + thick;
|
||||
thick = 10.06 * cm;
|
||||
|
||||
layer6Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+ translation),
|
||||
"layer6Phys",
|
||||
layer4Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
// Nextel layer
|
||||
translation = translation + thick;
|
||||
thick = 0.2*cm;
|
||||
|
||||
layer7Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+ translation),
|
||||
"layer7Phys",
|
||||
layer3Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
// mylar layer
|
||||
translation = translation + thick;
|
||||
thick = 0.20 *cm;
|
||||
|
||||
G4Box* layer8 = new G4Box("layer8",sizeX/2.,sizeY/2.,thick/2.);
|
||||
|
||||
G4LogicalVolume* layer8Log = new G4LogicalVolume(layer8,
|
||||
mylar,
|
||||
"layer8Log",
|
||||
0,0,0);
|
||||
|
||||
layer8Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer8Phys",
|
||||
layer8Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
|
||||
//Vacuum layer
|
||||
translation = translation + thick;
|
||||
thick = 10.06 * cm;
|
||||
|
||||
layer9Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer6Phys",
|
||||
layer4Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
// mylar layer
|
||||
translation = translation + thick;
|
||||
thick = 0.2 *cm;
|
||||
|
||||
G4Box* layer10 = new G4Box("layer10",sizeX/2.,sizeY/2.,thick/2.);
|
||||
|
||||
G4LogicalVolume* layer10Log = new G4LogicalVolume(layer10,
|
||||
mylar,
|
||||
"layer10Log",
|
||||
0,0,0);
|
||||
|
||||
layer10Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer10Phys",
|
||||
layer10Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//Redundant Bladder
|
||||
//Polyethylene
|
||||
G4Material* polyethilene = pMaterial -> GetMaterial("polyethylene");
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
|
||||
G4Box* layer11 = new G4Box("layer11", sizeX/2.,sizeY/2.,thick/2.);
|
||||
|
||||
G4LogicalVolume* layer11Log = new G4LogicalVolume(layer11,
|
||||
polyethilene,
|
||||
"layer11Log",
|
||||
0,0,0);
|
||||
|
||||
layer11Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer11Phys",
|
||||
layer11Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//ployacrylate
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
|
||||
G4Material* polyacrylate = pMaterial ->GetMaterial("polyacrylate");
|
||||
G4LogicalVolume* layer12Log = new G4LogicalVolume(layer11,
|
||||
polyacrylate,
|
||||
"layer12Log",
|
||||
0,0,0);
|
||||
|
||||
layer12Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer12Phys",
|
||||
layer12Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
|
||||
//evoh layer
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
G4Material* evoh = pMaterial ->GetMaterial("evoh");
|
||||
G4LogicalVolume* layer13Log = new G4LogicalVolume(layer11,
|
||||
evoh,
|
||||
"layer13Log",
|
||||
0,0,0);
|
||||
|
||||
layer13Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer13Phys",
|
||||
layer13Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//polyacrylate
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
|
||||
layer14Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer14Phys",
|
||||
layer12Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//polyethilene
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
|
||||
layer15Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer15Phys",
|
||||
layer11Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//kevlar layer
|
||||
translation = translation + thick;
|
||||
thick = 0.026*cm;
|
||||
|
||||
G4Material* kevlarAir = pMaterial -> GetMaterial("kevlarAir");
|
||||
|
||||
G4Box* layer = new G4Box("layer",sizeX/2.,sizeY/2.,thick/2.);
|
||||
|
||||
G4LogicalVolume* layerLog = new G4LogicalVolume(layer,
|
||||
kevlarAir,
|
||||
"layerLog",
|
||||
0,0,0);
|
||||
|
||||
layerPhys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layerPhys",
|
||||
layerLog,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//polyethilene layer
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
|
||||
layer16Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer16Phys",
|
||||
layer11Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//polyacrylate layer
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
|
||||
layer17Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer17Phys",
|
||||
layer12Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//evoh
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
|
||||
layer18Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer18Phys",
|
||||
layer13Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//polyacrylate layer
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
layer19Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer19Phys",
|
||||
layer12Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//polyethilene layer
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
|
||||
layer20Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer20Phys",
|
||||
layer11Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//kevlar layer
|
||||
translation = translation + thick;
|
||||
thick = 0.026*cm;
|
||||
|
||||
layer21Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer21Phys",
|
||||
layerLog,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//polyethilene layer
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
|
||||
layer22Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer22Phys",
|
||||
layer11Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//polyacrylate layer
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
|
||||
layer23Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer23Phys",
|
||||
layer12Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//evoh layer
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
|
||||
layer24Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer24Phys",
|
||||
layer13Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
//polyacrylate layer
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
|
||||
layer25Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer25Phys",
|
||||
layer12Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
|
||||
//polyethilene layer
|
||||
translation = translation + thick;
|
||||
thick = 0.0028*cm;
|
||||
|
||||
layer26Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer26Phys",
|
||||
layer11Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
|
||||
//nomex layer
|
||||
translation = translation + thick;
|
||||
thick = 0.03*cm;
|
||||
|
||||
G4Material* nomex= pMaterial ->GetMaterial("nomexAir");
|
||||
|
||||
G4Box* layer27 = new G4Box("layer27",sizeX/2.,sizeY/2.,thick/2.);
|
||||
|
||||
G4LogicalVolume* layer27Log = new G4LogicalVolume(layer27,
|
||||
nomex,
|
||||
"layer27Log",
|
||||
0,0,0);
|
||||
|
||||
layer27Phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,thick/2.+translation),
|
||||
"layer27Phys",
|
||||
layer27Log,
|
||||
motherVolume,
|
||||
false,0);
|
||||
translation = translation + thick;
|
||||
|
||||
G4Colour magenta (1.0, 0.0, 1.0) ;
|
||||
G4Colour green (0.0,1.0,0.0);
|
||||
|
||||
G4VisAttributes* layer1VisAtt = new G4VisAttributes(green);
|
||||
layer1VisAtt -> SetVisibility(true);
|
||||
layer1VisAtt -> SetForceSolid(true);
|
||||
layer1Log -> SetVisAttributes(layer1VisAtt);
|
||||
layer3Log -> SetVisAttributes(layer1VisAtt);
|
||||
layer8Log -> SetVisAttributes(layer1VisAtt);
|
||||
layer11Log -> SetVisAttributes(layer1VisAtt);
|
||||
layer13Log -> SetVisAttributes(layer1VisAtt);
|
||||
|
||||
G4VisAttributes* layer2VisAtt = new G4VisAttributes(magenta);
|
||||
layer2VisAtt -> SetVisibility(true);
|
||||
layer2VisAtt -> SetForceSolid(true);
|
||||
layer2Log -> SetVisAttributes(layer2VisAtt);
|
||||
layer4Log -> SetVisAttributes(layer2VisAtt);
|
||||
layer10Log -> SetVisAttributes(layer2VisAtt);
|
||||
layer12Log -> SetVisAttributes(layer2VisAtt);
|
||||
layer27Log -> SetVisAttributes(layer2VisAtt);
|
||||
}
|
||||
|
||||
void RemSimVehicle1::DestroyComponent()
|
||||
{
|
||||
}
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: RemSimVisManager.cc,v 1.4 2004/05/22 12:57:07 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
// John Allison 24th January 1998.
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
|
||||
#include "RemSimVisManager.hh"
|
||||
|
||||
// Supported drivers...
|
||||
|
||||
// Not needing external packages or libraries...
|
||||
#include "G4ASCIITree.hh"
|
||||
#include "G4DAWNFILE.hh"
|
||||
#include "G4GAGTree.hh"
|
||||
#include "G4HepRepFile.hh"
|
||||
#include "G4HepRep.hh"
|
||||
#include "G4RayTracer.hh"
|
||||
#include "G4VRML1File.hh"
|
||||
#include "G4VRML2File.hh"
|
||||
|
||||
// Needing external packages or libraries...
|
||||
|
||||
#ifdef G4VIS_USE_DAWN
|
||||
#include "G4FukuiRenderer.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OPENGLX
|
||||
#include "G4OpenGLImmediateX.hh"
|
||||
#include "G4OpenGLStoredX.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OPENGLWIN32
|
||||
#include "G4OpenGLImmediateWin32.hh"
|
||||
#include "G4OpenGLStoredWin32.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OPENGLXM
|
||||
#include "G4OpenGLImmediateXm.hh"
|
||||
#include "G4OpenGLStoredXm.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OIX
|
||||
#include "G4OpenInventorX.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OIWIN32
|
||||
#include "G4OpenInventorWin32.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_VRML
|
||||
#include "G4VRML1.hh"
|
||||
#include "G4VRML2.hh"
|
||||
#endif
|
||||
|
||||
RemSimVisManager::RemSimVisManager ()
|
||||
{}
|
||||
|
||||
void RemSimVisManager::RegisterGraphicsSystems () {
|
||||
|
||||
// Graphics Systems not needing external packages or libraries...
|
||||
RegisterGraphicsSystem (new G4ASCIITree);
|
||||
RegisterGraphicsSystem (new G4DAWNFILE);
|
||||
RegisterGraphicsSystem (new G4GAGTree);
|
||||
RegisterGraphicsSystem (new G4HepRepFile);
|
||||
RegisterGraphicsSystem (new G4HepRep);
|
||||
RegisterGraphicsSystem (new G4RayTracer);
|
||||
RegisterGraphicsSystem (new G4VRML1File);
|
||||
RegisterGraphicsSystem (new G4VRML2File);
|
||||
|
||||
// Graphics systems needing external packages or libraries...
|
||||
|
||||
#ifdef G4VIS_USE_DAWN
|
||||
RegisterGraphicsSystem (new G4FukuiRenderer);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OPENGLX
|
||||
RegisterGraphicsSystem (new G4OpenGLImmediateX);
|
||||
RegisterGraphicsSystem (new G4OpenGLStoredX);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OPENGLWIN32
|
||||
RegisterGraphicsSystem (new G4OpenGLImmediateWin32);
|
||||
RegisterGraphicsSystem (new G4OpenGLStoredWin32);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OPENGLXM
|
||||
RegisterGraphicsSystem (new G4OpenGLImmediateXm);
|
||||
RegisterGraphicsSystem (new G4OpenGLStoredXm);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OIX
|
||||
RegisterGraphicsSystem (new G4OpenInventorX);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OIWIN32
|
||||
RegisterGraphicsSystem (new G4OpenInventorWin32);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_VRML
|
||||
RegisterGraphicsSystem (new G4VRML1);
|
||||
RegisterGraphicsSystem (new G4VRML2);
|
||||
#endif
|
||||
|
||||
if (fVerbose > 0) {
|
||||
G4cout <<
|
||||
"\nYou have successfully chosen to use the following graphics systems."
|
||||
<< G4endl;
|
||||
PrintAvailableGraphicsSystems ();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user