Import Geant4 5.0.0 source tree
This commit is contained in:
+7
-1
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.63 2001/12/13 17:49:48 gcosmo Exp $
|
||||
$Id: History,v 1.65 2002/12/06 19:02:55 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,12 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
6th December 2002 Gabriele Cosmo (examples-V04-01-04)
|
||||
- Merged with recent development
|
||||
|
||||
4th December 2002 Makoto Asai (examples-V04-01-03)
|
||||
- Migration to new G4ApplicationState
|
||||
|
||||
13th December 2001 Gabriele Cosmo (examples-V03-02-05)
|
||||
- Updated reference outputs.
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
@@ -20,33 +19,39 @@
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: Brachy.cc
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano,S.Guatelli
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * Brachy.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// Brachytherapy simulates the energy deposition in a cubic (30*cm)
|
||||
//
|
||||
// Brachytherapy simulates the dose deposition in a cubic (30*cm)
|
||||
// water phantom for a IsoSeed I-125 Bebig
|
||||
// brachytherapy source.
|
||||
//
|
||||
// Simplified gamma generation is used.
|
||||
// Source axis is oriented along Z axis.
|
||||
// Voxel data on the X-Z plan
|
||||
//e is output to
|
||||
// "Brachy3.hbk".
|
||||
// Source axis is oriented along Z axis. The source is in the centre
|
||||
//of the box.
|
||||
|
||||
|
||||
// $Id: Brachy.cc,v 1.11 2002/06/18 22:20:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: brachy-V04-00-05 $
|
||||
//default source Ir-192
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4UIterminal.hh"
|
||||
#include "G4UItcsh.hh"
|
||||
|
||||
#include "BrachyFactoryIr.hh"
|
||||
#ifdef G4UI_USE_XM
|
||||
#include "G4UIXm.hh"
|
||||
#endif
|
||||
@@ -58,55 +63,67 @@
|
||||
#include "BrachyEventAction.hh"
|
||||
#include "BrachyDetectorConstruction.hh"
|
||||
#include "BrachyPhysicsList.hh"
|
||||
#include "BrachyPrimaryGeneratorAction.hh"
|
||||
#include "BrachyPhantomSD.hh"
|
||||
|
||||
#include "BrachyPrimaryGeneratorActionIr.hh"
|
||||
#include "G4SDManager.hh"
|
||||
|
||||
#include"BrachyRunAction.hh"
|
||||
|
||||
#include "Randomize.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
//Interactive mode//
|
||||
|
||||
int main(int argc ,char ** argv)
|
||||
|
||||
{
|
||||
// semi diversi li ha usati per l'errore
|
||||
|
||||
|
||||
//HepRandom::setTheSeed(16520);
|
||||
|
||||
// fix the seed
|
||||
// HepRandom::setTheSeed(16520);
|
||||
|
||||
HepRandom::setTheEngine(new RanecuEngine);
|
||||
|
||||
|
||||
G4int seed=time(NULL);
|
||||
HepRandom ::setTheSeed(seed);
|
||||
|
||||
|
||||
// Construct the default run manager
|
||||
G4RunManager* pRunManager = new G4RunManager;
|
||||
G4RunManager* pRunManager = new G4RunManager;
|
||||
|
||||
|
||||
// Set mandatory initialization classes
|
||||
G4String SDName = "Phantom";
|
||||
|
||||
BrachyDetectorConstruction *pDetectorConstruction=new BrachyDetectorConstruction(SDName);
|
||||
// Set mandatory initialization classes
|
||||
G4String SDName = "Phantom";
|
||||
|
||||
BrachyDetectorConstruction *pDetectorConstruction=new BrachyDetectorConstruction(SDName);
|
||||
|
||||
pRunManager->SetUserInitialization(pDetectorConstruction) ;
|
||||
|
||||
pRunManager->SetUserInitialization(new BrachyPhysicsList);
|
||||
|
||||
|
||||
pRunManager->SetUserInitialization(new BrachyPhysicsList);
|
||||
|
||||
/*
|
||||
#ifdef G4VIS_USE
|
||||
// visualization manager
|
||||
G4VisManager* visManager = new BrachyVisManager;
|
||||
visManager->Initialize();
|
||||
G4VisManager* visManager = new BrachyVisManager;
|
||||
visManager->Initialize();
|
||||
#endif
|
||||
|
||||
G4UIsession* session=0;
|
||||
*/
|
||||
|
||||
|
||||
// output environment variables:
|
||||
#ifdef G4ANALYSIS_USE
|
||||
G4cout << G4endl << G4endl << G4endl
|
||||
<< " User Environment " << G4endl
|
||||
<< " Using AIDA 3.0 analysis " << G4endl;
|
||||
# else
|
||||
G4cout << G4endl << G4endl << G4endl
|
||||
<< " User Environment " << G4endl
|
||||
<< " G4ANALYSIS_USE environment variable not set, NO ANALYSIS "
|
||||
<< G4endl;
|
||||
#endif
|
||||
/*
|
||||
G4UIsession* session=0;
|
||||
|
||||
|
||||
if (argc==1) // Define UI session for interactive mode.
|
||||
{
|
||||
// G4UIterminal is a (dumb) terminal.
|
||||
@@ -120,19 +137,18 @@ int main(int argc ,char ** argv)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
BrachyEventAction *pEventAction=new BrachyEventAction(SDName);
|
||||
pRunManager->SetUserAction(pEventAction );
|
||||
|
||||
|
||||
BrachyEventAction *pEventAction=new BrachyEventAction(SDName);
|
||||
|
||||
pRunManager->SetUserAction(pEventAction );
|
||||
pRunManager->SetUserAction(new BrachyPrimaryGeneratorAction);
|
||||
|
||||
BrachyRunAction *pRunAction=new BrachyRunAction();
|
||||
|
||||
BrachyRunAction *pRunAction=new BrachyRunAction(SDName);
|
||||
pRunManager->SetUserAction(pRunAction);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Initialize G4 kernel
|
||||
pRunManager->Initialize();
|
||||
|
||||
@@ -142,7 +158,9 @@ int main(int argc ,char ** argv)
|
||||
UI->ApplyCommand("/event/verbose 0");
|
||||
UI->ApplyCommand("/tracking/verbose 0");
|
||||
|
||||
if (session) // Define UI session for interactive mode.
|
||||
/*
|
||||
|
||||
if (session) // Define UI session for interactive mode.
|
||||
{
|
||||
// G4UIterminal is a (dumb) terminal.
|
||||
UI->ApplyCommand("/control/execute initInter.mac");
|
||||
@@ -159,25 +177,24 @@ int main(int argc ,char ** argv)
|
||||
G4String fileName = argv[1];
|
||||
UI->ApplyCommand(command+fileName);
|
||||
}
|
||||
|
||||
//int numberOfEvent = 10000;
|
||||
//pRunManager->BeamOn(numberOfEvent);
|
||||
|
||||
|
||||
|
||||
// Job termination
|
||||
*/
|
||||
int numberOfEvent = 1000;
|
||||
pRunManager->BeamOn(numberOfEvent);
|
||||
|
||||
|
||||
|
||||
|
||||
// Job termination
|
||||
|
||||
/*
|
||||
#ifdef G4VIS_USE
|
||||
delete visManager;
|
||||
#endif
|
||||
|
||||
|
||||
*/
|
||||
|
||||
delete pRunManager;
|
||||
|
||||
return 0;
|
||||
delete pRunManager;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# --------------------------------------------------------------
|
||||
# $Id: GNUmakefile,v 1.6 2002/06/13 15:11:27 guatelli Exp $
|
||||
# $Id: GNUmakefile,v 1.7 2002/11/15 17:36:55 guatelli Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
||||
# --------------------------------------------------------------
|
||||
@@ -14,10 +14,10 @@ G4ANALYSIS_USE = 1
|
||||
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../../
|
||||
G4INSTALL =~/GEANT4/geant4/
|
||||
endif
|
||||
|
||||
CPPFLAGS += -I${LHCXX_REL_DIR}/include -I/afs/cern.ch/sw/contrib/AIDA/2.2/cpp
|
||||
CPPFLAGS += -I${LHCXX_REL_DIR}/include -I/afs/cern.ch/sw/contrib/AIDA/3.0/cpp -g
|
||||
|
||||
|
||||
.PHONY: all
|
||||
@@ -25,9 +25,5 @@ all: lib bin
|
||||
|
||||
|
||||
include $(G4INSTALL)/config/binmake.gmk
|
||||
# From lowenergy/test/GNUmakefile
|
||||
CPPFLAGS += `aida-config --useHBook --include`
|
||||
LDFLAGS += `aida-config --useHBook --lib`
|
||||
LOADLIBS += `aida-config --useHBook --lib`
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
$Id: History,v 1.3 2000/12/10 08:42:44 chauvie Exp $
|
||||
$Id: History,v 1.4 2002/12/06 16:32:25 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -9,6 +9,9 @@ $Id: History,v 1.3 2000/12/10 08:42:44 chauvie Exp $
|
||||
Category History file
|
||||
---------------------
|
||||
|
||||
06.12.2002 - Gabriele Cosmo, tag brachy-V04-01-04
|
||||
Migration to new G4ApplicationState.
|
||||
|
||||
09.11.2000 - SA, tag brachy-V02-00-00
|
||||
(dvnote) First submission of Brachytherapy advanced example.
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
$Id: README,v 1.5 2002/06/13 15:59:43 guatelli Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - Brachytherapy example
|
||||
@@ -11,52 +8,63 @@ $Id: README,v 1.5 2002/06/13 15:59:43 guatelli Exp $
|
||||
|
||||
0. Introduction.
|
||||
|
||||
Brachytherapy example simulates energy deposition on a voxel grid
|
||||
for a Ir brachytherapy source.
|
||||
Brachytherapy example simulates energy deposition in a Phantom filled with
|
||||
soft tissue for:
|
||||
1) Ir brachytherapy source.
|
||||
2) I brachytherapy source.
|
||||
3) Leipzig Applicator.
|
||||
|
||||
1. Technical description
|
||||
1.Technical information.
|
||||
|
||||
1.0. the source is constructed in the
|
||||
brachyDetectorConstruction class. The source is composed by
|
||||
an iridium core encapsulated in a capsule (body + tip).
|
||||
The source is put in the center of a 30*cm water box.
|
||||
The default source is an Ir source put in the center of the Phantom.
|
||||
The Phantom is a box (dimension:30cm)
|
||||
|
||||
1.1. The water box is made sensitive detector. A longitudinal slice
|
||||
of it is associated to a planar read out geometry. At every hit
|
||||
energy deposition is read and stored in a 2D histogram.
|
||||
2.How to run the example.
|
||||
|
||||
- run "Brachy" executable.
|
||||
- you can run the example in batch or interative mode.
|
||||
|
||||
1.2. the output is the file brachy2.hbk
|
||||
(e.g. anysotropy and isodose calculations):
|
||||
1)1Dhistogram with the spectrum of initial energy of gamma
|
||||
Default: batch mode with 1000 events
|
||||
|
||||
|
||||
In interative mode, you can choose:
|
||||
|
||||
1)Ir source:
|
||||
idle>/run/beamOn NumberOfEvents and then
|
||||
idle> exit
|
||||
|
||||
2)Leipzig Applicator:
|
||||
idle>/geom/switch Leipzig
|
||||
idle>/run/beamOn NumberOfEvents and then
|
||||
idle> exit
|
||||
|
||||
3) I source:
|
||||
idle>/geom/switch Iodium
|
||||
idle>/run/energy Iodium
|
||||
idle>/run/beamOn NumberOfEvents
|
||||
idle>exit
|
||||
|
||||
Before the run you can also change the absorber material of the Phantom:
|
||||
idle>/detecor/setMaterial name
|
||||
|
||||
4)simulation output: brachytherapy.hbk
|
||||
It contains:
|
||||
1)1Dhistogram with the primary particle energy
|
||||
2)2Dhistogram with the distribution of energy in the plane (x,z,energy)
|
||||
2. Make
|
||||
3)Ntuple with the energy deposit in the Phantom
|
||||
|
||||
1.3.the default visualization is with Dawn
|
||||
|
||||
5)the default visualization is with Dawn
|
||||
|
||||
A standard Geant4 example GNUmakefile is provided.
|
||||
|
||||
2. Usage
|
||||
|
||||
run "Brachy" executable.
|
||||
The framework in in interactive mode,so
|
||||
you have to do:
|
||||
idle>/run/beamOn ( numberofevents)
|
||||
|
||||
The output is ("brachy2.hbk")
|
||||
|
||||
|
||||
|
||||
|
||||
------How to run the new version of AIDA:----------------------
|
||||
|
||||
|
||||
1)Aida platform for Linux:gcc compiler 2.95.2
|
||||
|
||||
-------------------------enviroment with the compiler 2.95.2 on lxplus---------
|
||||
|
||||
|
||||
setenv G4LEDATA /afs/cern.ch/sw/geant4/dev/data/G4EMLOW1.1
|
||||
setenv G4INSTALL /...
|
||||
setenv CLHEP_BASE_DIR /afs/cern.ch/sw/geant4/dev/CLHEP/Linux-g++/1.7.5
|
||||
#
|
||||
# ---- Linux setup ----
|
||||
#
|
||||
@@ -95,7 +103,7 @@ setenv G4VIS_USE_DAWN 1
|
||||
setenv G4VIS_USE_DAWNFILE 1
|
||||
setenv PATH ${PATH}:"/afs/cern.ch/sw/geant4/dev/DAWN/Linux-g++"
|
||||
|
||||
|
||||
setenv LD_LIBRARY_PATH $OGLHOME/lib
|
||||
|
||||
-----------------------------------------------------------------------------------
|
||||
|
||||
@@ -103,21 +111,15 @@ setenv PATH ${PATH}:"/afs/cern.ch/sw/geant4/dev/DAWN/Linux-g++"
|
||||
# ---- Analysis----
|
||||
|
||||
setenv G4ANALYSIS_BUILD 1
|
||||
setenv PATH "${PATH}:/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/4.0.0/bin"
|
||||
source /afs/cern.ch/sw/lhcxx/share/LHCXX/4.0.0/install/sharedstart.csh
|
||||
setenv G4ANALYSIS_AIDA_CONFIG_CFLAGS `aida-config --noLicense --include`
|
||||
setenv G4ANALYSIS_AIDA_CONFIG_LIBS `aida-config --noLicense --libs`
|
||||
setenv PATH "${PATH}:/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/5.0.1/bin"
|
||||
setenv G4ANALYSIS_AIDA_CONFIG_LIBS "-L/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/5.0.1/lib -lAnaphe_AIDA_AnalysisFactory_native -lAnaphe_AIDA_Annotation_native -lAnaphe_AIDA_Histogram_native -lAnaphe_AIDA_Tree_native -lAnaphe_AIDA_HBookStore -lg2c-forMinuit -lHepUtilities -lCLHEP -lAnaphe_AIDA_Tuple_native"
|
||||
setenv G4ANALYSIS_AIDA_CONFIG_CFLAGS "-I/afs/cern.ch/sw/contrib/AIDA/3.0/src/cpp -I/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/5.0.1/include"
|
||||
setenv ANAPHE5_REL_DIR /afs/cern.ch/sw/contrib/AIDA/3.0/src/cpp
|
||||
setenv LD_LIBRARY_PATH /afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/5.0.1/lib:$LD_LIBRARY_PATH
|
||||
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:"/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/5.0.1/lib"
|
||||
|
||||
|
||||
# ---- add to the LD_LIBRARY_PATH
|
||||
setenv LD_LIBRARY_PATH $OGLHOME/lib
|
||||
#
|
||||
# ---- end of Linux set-up ----
|
||||
|
||||
before running remenber to delete *.hbk
|
||||
|
||||
in the file brachy.py there are the instructions to visualize the histograms with the old version of Lizard;
|
||||
|
||||
in order to do that open another lxplus with egcs-2.91.66 and make:
|
||||
source /afs/cern.ch/sw/lhcxx/share/LHCXX/3.6.3-sec/install/sharedstart.csh
|
||||
then digit lizard in the directory where brachy3.hbk is and then follow the instruction of the brachy.py
|
||||
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
hm.selectStore("brachy3.hbk")
|
||||
#Lizard 3.6.6
|
||||
|
||||
|
||||
hm.selectStore("brachytherapy.hbk")
|
||||
hm.ls()
|
||||
#spectrum of initial particles
|
||||
hEn=hm.load1D("30")
|
||||
hEn=hm.load1D("20")
|
||||
hplot(hEn)
|
||||
#if you want to print the results:pl.psPrint("Brachyspettro.ps")
|
||||
h2=hm.load2D("20")
|
||||
#if you want to print the results:pl.psPrint("Brachytherapy.ps")
|
||||
h2=hm.load2D("10")
|
||||
hplot(h2)
|
||||
v=vm.from2D(h2)
|
||||
vm.list()
|
||||
vector=vm.retrieve2D (3)
|
||||
pl.dataOption("representation","color")
|
||||
pl.plot(vector)
|
||||
vector.toAscii("brachy.dat")
|
||||
pl.reset()
|
||||
pl.reset()
|
||||
|
||||
Binary file not shown.
@@ -1,55 +1,102 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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
|
||||
//
|
||||
//
|
||||
// $Id: BrachyAnalysisManager.hh,v 1.6 2002/11/27 11:11:22 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyAnalysisManager.hh *
|
||||
// * *
|
||||
// **********************************
|
||||
//
|
||||
|
||||
// the class Analysis creates and managed histograms and ntuples
|
||||
//
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifndef G4PROCESSTESTANALYSIS_HH
|
||||
#define G4PROCESSTESTANALYSIS_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/vector"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
#include "AIDA/IHistogram1D.h"
|
||||
#include "AIDA/IHistogram2D.h"
|
||||
#include "AIDA/IAnalysisFactory.h"
|
||||
namespace AIDA{
|
||||
class ITree;
|
||||
class IHistogramFactory;
|
||||
class IAnalysisFactory;
|
||||
class ITupleFactory;
|
||||
class ITuple;
|
||||
class ITreeFactory;
|
||||
};
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class BrachyAnalysisManager
|
||||
{
|
||||
public:
|
||||
|
||||
~BrachyAnalysisManager();
|
||||
|
||||
void book();
|
||||
|
||||
void finish();
|
||||
~BrachyAnalysisManager();
|
||||
|
||||
static BrachyAnalysisManager* getInstance();
|
||||
|
||||
void analyse(G4double,G4double,G4float);
|
||||
void hist(G4double,G4double,G4float);
|
||||
void Spectrum(G4double);
|
||||
void book();
|
||||
|
||||
void finish();
|
||||
|
||||
static BrachyAnalysisManager* getInstance();
|
||||
|
||||
void fill_Tuple(G4double,G4double,G4double,G4float);
|
||||
void hist(G4double,G4double,G4float);
|
||||
void Spectrum(G4double);
|
||||
|
||||
private:
|
||||
|
||||
G4double xx,zz;
|
||||
G4float en;
|
||||
G4double x,z;
|
||||
static BrachyAnalysisManager* instance;
|
||||
G4double xx,zz,yy;
|
||||
G4float en;
|
||||
G4double x,y,z;
|
||||
static BrachyAnalysisManager* instance;
|
||||
|
||||
private:
|
||||
BrachyAnalysisManager();
|
||||
BrachyAnalysisManager();
|
||||
|
||||
private:
|
||||
|
||||
IAnalysisFactory *aFact;
|
||||
ITree *theTree;
|
||||
IHistogramFactory *histFact;
|
||||
ITupleFactory *tupFact;
|
||||
|
||||
AIDA::IAnalysisFactory* aFact;
|
||||
AIDA::ITree* theTree;
|
||||
AIDA::IHistogramFactory *histFact;
|
||||
AIDA::ITupleFactory *tupFact;
|
||||
AIDA::ITreeFactory *treeFact;
|
||||
AIDA::IHistogram2D *h1;
|
||||
AIDA::IHistogram1D *h2;
|
||||
AIDA::ITuple *ntuple;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,36 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: BrachyDetectorConstruction.hh,v 1.13 2002/11/18 15:18:35 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ****************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstruction.hh *
|
||||
// * *
|
||||
// ****************************************
|
||||
|
||||
// this class manages the geometry of the simulation set up
|
||||
//
|
||||
|
||||
#ifndef BrachyDetectorConstruction_H
|
||||
#define BrachyDetectorConstruction_H 1
|
||||
@@ -12,7 +39,6 @@
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
|
||||
class BrachyPhantomSD;
|
||||
class BrachyDetectorMessenger;
|
||||
class G4LogicalVolume;
|
||||
@@ -21,89 +47,107 @@ class G4Tubs;
|
||||
class G4Box;
|
||||
class G4Sphere;
|
||||
class G4Tubs;
|
||||
|
||||
class G4Colour;
|
||||
class G4VPhysicalVolume;
|
||||
|
||||
|
||||
|
||||
class BrachyPhantomSD;
|
||||
class BrachyPhantomROGeometry;
|
||||
class G4VPhysicalVolume;
|
||||
class BrachyMaterial;
|
||||
class BrachyFactoryIr;
|
||||
class BrachyFactoryI;
|
||||
class BrachyFactoryLeipzig;
|
||||
class BrachyVoxelParameterisation;
|
||||
class BrachyDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
BrachyDetectorConstruction(G4String&);
|
||||
~BrachyDetectorConstruction();
|
||||
BrachyDetectorConstruction(G4String&);
|
||||
~BrachyDetectorConstruction();
|
||||
|
||||
|
||||
private:
|
||||
G4double m_BoxDimX;
|
||||
G4double m_BoxDimY;
|
||||
G4double m_BoxDimZ;
|
||||
G4int NumVoxelX;
|
||||
G4int NumVoxelZ;
|
||||
G4double dimVoxel;
|
||||
G4String m_SDName;
|
||||
G4int* pVoxel;
|
||||
G4double m_BoxDimX;
|
||||
G4double m_BoxDimY;
|
||||
G4double m_BoxDimZ;
|
||||
G4int NumVoxelX;
|
||||
G4int NumVoxelZ;
|
||||
G4double dimVoxel;
|
||||
G4String m_SDName;
|
||||
G4int detectorChoice;
|
||||
G4double ExpHall_x ;
|
||||
G4double ExpHall_y ;
|
||||
G4double ExpHall_z ;
|
||||
|
||||
|
||||
BrachyPhantomSD* pPhantomSD;
|
||||
BrachyPhantomROGeometry* pPhantomROGeometry;
|
||||
|
||||
|
||||
BrachyFactoryLeipzig* factoryLeipzig;
|
||||
BrachyFactoryI* factoryI;
|
||||
BrachyFactoryIr* factoryIr;
|
||||
BrachyMaterial* pMat;
|
||||
|
||||
|
||||
public:
|
||||
void PrintDetectorParameters();
|
||||
void SetAbsorberMaterial(G4String);
|
||||
const G4double VoxelWidth_X() {return m_BoxDimX/NumVoxelX;};//num voxel
|
||||
const G4double VoxelWidth_Z() {return m_BoxDimZ/NumVoxelZ;};
|
||||
const G4int GetNumVoxelX(){return NumVoxelX;};
|
||||
const G4int GetNumVoxelZ(){return NumVoxelZ;};
|
||||
const G4double GetDimX(){return m_BoxDimX;};
|
||||
|
||||
const G4double GetBoxDim_Z() {return m_BoxDimZ;};
|
||||
|
||||
|
||||
|
||||
private:
|
||||
void PrintDetectorParameters();
|
||||
void SetAbsorberMaterial(G4String);
|
||||
|
||||
BrachyDetectorMessenger* detectorMessenger;
|
||||
const G4double VoxelWidth_X() {return m_BoxDimX/NumVoxelX;};//num voxel
|
||||
const G4double VoxelWidth_Z() {return m_BoxDimZ/NumVoxelZ;};
|
||||
const G4int GetNumVoxelX(){return NumVoxelX;};
|
||||
const G4int GetNumVoxelZ(){return NumVoxelZ;};
|
||||
const G4double GetDimX(){return m_BoxDimX;};
|
||||
|
||||
G4Box* ExpHall; //pointer to the solid World
|
||||
G4LogicalVolume* ExpHallLog; //pointer to the logical World
|
||||
G4VPhysicalVolume* ExpHallPhys; //pointer to the physical World
|
||||
const G4double GetBoxDim_Z() {return m_BoxDimZ;};
|
||||
|
||||
|
||||
G4Box* Phantom;
|
||||
G4LogicalVolume* PhantomLog;
|
||||
G4VPhysicalVolume* PhantomPhys;
|
||||
|
||||
|
||||
G4Tubs* Capsule ;
|
||||
G4LogicalVolume* CapsuleLog; //pointer to the logical World
|
||||
G4VPhysicalVolume* CapsulePhys;
|
||||
|
||||
G4Sphere* CapsuleTip;
|
||||
G4LogicalVolume* CapsuleTipLog;
|
||||
G4VPhysicalVolume* CapsuleTipPhys;
|
||||
|
||||
G4Tubs* IridiumCore;
|
||||
G4LogicalVolume* IridiumCoreLog;
|
||||
G4VPhysicalVolume* IridiumCorePhys;
|
||||
|
||||
G4Material* air;
|
||||
//G4Material* water;
|
||||
G4Material* CapsuleMat;
|
||||
G4Material* IridiumMat;
|
||||
G4Material* AbsorberMaterial;
|
||||
|
||||
G4VPhysicalVolume* Construct();
|
||||
void SwitchDetector();
|
||||
|
||||
private:
|
||||
|
||||
void DefineMaterials();
|
||||
void ComputeDimVoxel();
|
||||
|
||||
|
||||
BrachyDetectorMessenger* detectorMessenger;
|
||||
|
||||
G4Box* ExpHall; //pointer to the solid World
|
||||
G4LogicalVolume* ExpHallLog; //pointer to the logical World
|
||||
G4VPhysicalVolume* ExpHallPhys; //pointer to the physical World
|
||||
|
||||
G4Box* solidVoxel;
|
||||
G4LogicalVolume* logicVoxel;
|
||||
G4VPhysicalVolume* physiVoxel;
|
||||
|
||||
|
||||
G4Box* Phantom;
|
||||
G4LogicalVolume* PhantomLog;
|
||||
G4VPhysicalVolume* PhantomPhys;
|
||||
G4Box* Voxel;
|
||||
G4LogicalVolume* VoxelLog;
|
||||
G4VPhysicalVolume* VoxelPhys;
|
||||
|
||||
|
||||
G4Material* AbsorberMaterial;
|
||||
|
||||
|
||||
void ConstructPhantom();
|
||||
void ConstructSensitiveDetector();
|
||||
|
||||
private:
|
||||
G4VPhysicalVolume* Construct();
|
||||
|
||||
void ComputeDimVoxel();
|
||||
|
||||
|
||||
public:
|
||||
G4VPhysicalVolume* ConstructDetector();
|
||||
|
||||
|
||||
G4VPhysicalVolume* ConstructDetector();
|
||||
void SelectDetector(G4String val);
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
inline void BrachyDetectorConstruction::ComputeDimVoxel()
|
||||
{
|
||||
dimVoxel=m_BoxDimX/NumVoxelX;
|
||||
dimVoxel=m_BoxDimX/NumVoxelX;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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: BrachyDetectorConstructionI.hh,v 1.2 2002/11/18 15:18:35 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ****************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstructionI.hh *
|
||||
// * *
|
||||
// ****************************************
|
||||
//Management of the Iodium source
|
||||
|
||||
#ifndef BrachyDetectorConstructionI_H
|
||||
#define BrachyDetectorConstructionI_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
|
||||
class G4LogicalVolume;
|
||||
|
||||
class G4Tubs;
|
||||
class G4Box;
|
||||
class G4Sphere;
|
||||
class G4Tubs;
|
||||
class G4Colour;
|
||||
class G4VPhysicalVolume;
|
||||
class G4VPhysicalVolume;
|
||||
class BrachyMaterial;
|
||||
|
||||
class BrachyDetectorConstructionI
|
||||
{
|
||||
public:
|
||||
BrachyDetectorConstructionI();
|
||||
~BrachyDetectorConstructionI();
|
||||
|
||||
|
||||
private:
|
||||
G4VisAttributes* simpleMarkerVisAtt;
|
||||
G4VisAttributes* simpleIodiumVisAtt;
|
||||
|
||||
G4VisAttributes* simpleCapsuleVisAtt;
|
||||
G4VisAttributes* simpleCapsuleTipVisAtt;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
void ConstructIodium(G4VPhysicalVolume*);
|
||||
private:
|
||||
G4Tubs* DefaultTub;
|
||||
G4LogicalVolume* DefaultTub_log;
|
||||
G4VPhysicalVolume*DefaultTub_Phys;
|
||||
|
||||
G4Tubs* Capsule ;
|
||||
G4LogicalVolume* CapsuleLog; //pointer to the logical World
|
||||
G4VPhysicalVolume* CapsulePhys;
|
||||
|
||||
G4Sphere* CapsuleTip;
|
||||
G4LogicalVolume* CapsuleTipLog;
|
||||
G4VPhysicalVolume* CapsuleTipPhys1;
|
||||
G4VPhysicalVolume* CapsuleTipPhys2;
|
||||
|
||||
G4Tubs* IodiumCore;
|
||||
G4LogicalVolume* ICoreLog;
|
||||
G4VPhysicalVolume* ICorePhys;
|
||||
|
||||
G4Tubs* Marker;
|
||||
G4LogicalVolume* MarkerLog;
|
||||
G4VPhysicalVolume* MarkerPhys;
|
||||
|
||||
BrachyMaterial* pMat;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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: BrachyDetectorConstructionIr.hh,v 1.2 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ****************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstructionIr.hh *
|
||||
// * *
|
||||
// ****************************************
|
||||
//
|
||||
//Management of the Iridium source
|
||||
//
|
||||
|
||||
#ifndef BrachyDetectorConstructionIr_H
|
||||
#define BrachyDetectorConstructionIr_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
|
||||
class G4LogicalVolume;
|
||||
|
||||
class G4Tubs;
|
||||
class G4Box;
|
||||
class G4Sphere;
|
||||
class G4Tubs;
|
||||
class G4Colour;
|
||||
class G4VPhysicalVolume;
|
||||
class G4VPhysicalVolume;
|
||||
class BrachyMaterial;
|
||||
|
||||
class BrachyDetectorConstructionIr
|
||||
{
|
||||
public:
|
||||
BrachyDetectorConstructionIr();
|
||||
~BrachyDetectorConstructionIr();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4VisAttributes* simpleCapsuleVisAtt;
|
||||
G4VisAttributes* simpleCapsuleTipVisAtt;
|
||||
G4VisAttributes* simpleIridiumVisAtt;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
void CleanIridium();
|
||||
void ConstructIridium(G4VPhysicalVolume*);
|
||||
private:
|
||||
|
||||
G4Box* WaterBox;
|
||||
G4LogicalVolume* WaterBoxLog;
|
||||
G4VPhysicalVolume* WaterBoxPhys;
|
||||
|
||||
G4Tubs* Capsule ;
|
||||
G4LogicalVolume* CapsuleLog; //pointer to the logical World
|
||||
G4VPhysicalVolume* CapsulePhys;
|
||||
|
||||
G4Sphere* CapsuleTip;
|
||||
G4LogicalVolume* CapsuleTipLog;
|
||||
G4VPhysicalVolume* CapsuleTipPhys;
|
||||
|
||||
G4Tubs* IridiumCore;
|
||||
G4LogicalVolume* IridiumCoreLog;
|
||||
G4VPhysicalVolume* IridiumCorePhys;
|
||||
|
||||
|
||||
BrachyMaterial* pMat;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: BrachyDetectorConstructionLeipzig.hh,v 1.2 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ************************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstructionLeipzig.hh *
|
||||
// * *
|
||||
// ************************************************
|
||||
//
|
||||
//Management of Leipzig Applicator
|
||||
//
|
||||
#ifndef BrachyDetectorConstructionLeipzig_H
|
||||
#define BrachyDetectorConstructionLeipzig_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
|
||||
class G4LogicalVolume;
|
||||
|
||||
class G4Tubs;
|
||||
class G4Box;
|
||||
class G4Sphere;
|
||||
class G4Tubs;
|
||||
class G4Colour;
|
||||
class G4VPhysicalVolume;
|
||||
class G4VPhysicalVolume;
|
||||
class BrachyMaterial;
|
||||
|
||||
class BrachyDetectorConstructionLeipzig
|
||||
{
|
||||
public:
|
||||
BrachyDetectorConstructionLeipzig();
|
||||
~BrachyDetectorConstructionLeipzig();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4VisAttributes* simpleCapsuleVisAtt;
|
||||
G4VisAttributes* simpleCapsuleTipVisAtt;
|
||||
public:
|
||||
|
||||
void ConstructLeipzig(G4VPhysicalVolume*);
|
||||
|
||||
private:G4Tubs* Capsule ;
|
||||
G4LogicalVolume* CapsuleLog; //pointer to the logical World
|
||||
G4VPhysicalVolume* CapsulePhys;
|
||||
|
||||
G4Sphere* CapsuleTip;
|
||||
G4LogicalVolume* CapsuleTipLog;
|
||||
G4VPhysicalVolume* CapsuleTipPhys;
|
||||
|
||||
G4Tubs* IridiumCore;
|
||||
G4LogicalVolume* IridiumCoreLog;
|
||||
G4VPhysicalVolume* IridiumCorePhys;
|
||||
|
||||
G4Tubs* Appl1;
|
||||
G4LogicalVolume* Appl1Log ;
|
||||
G4VPhysicalVolume* Appl1Phys;
|
||||
|
||||
G4Tubs* Appl2;
|
||||
G4LogicalVolume* Appl2Log ;
|
||||
G4VPhysicalVolume* Appl2Phys;
|
||||
|
||||
BrachyMaterial* pMat;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -21,8 +21,14 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorMessenger.hh,v 1.2 2002/06/18 22:24:22 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// *****************************************
|
||||
// * *
|
||||
// * BrachyDetectrorMessenger.hh *
|
||||
// * *
|
||||
// *****************************************
|
||||
//
|
||||
// $Id: BrachyDetectorMessenger.hh,v 1.4 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -36,6 +42,8 @@
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class BrachyDetectorConstruction;
|
||||
class BrachyFactoryIr;
|
||||
class BrachyRunAction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
@@ -46,19 +54,24 @@ class G4UIcmdWithoutParameter;
|
||||
|
||||
class BrachyDetectorMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
BrachyDetectorMessenger(BrachyDetectorConstruction* );
|
||||
~BrachyDetectorMessenger();
|
||||
public:
|
||||
BrachyDetectorMessenger(BrachyDetectorConstruction* );
|
||||
~BrachyDetectorMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
BrachyDetectorConstruction* Detector;
|
||||
|
||||
G4UIdirectory* detDir;
|
||||
G4UIcmdWithAString* AbsMaterCmd;
|
||||
|
||||
G4UIcmdWithoutParameter* UpdateCmd;
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
|
||||
BrachyDetectorConstruction* Detector;
|
||||
G4UIcmdWithAString* selDetCmd;
|
||||
G4UIcmdWithAString* switchCmd;
|
||||
G4UIcmdWithAString* cleanCmd;
|
||||
G4UIdirectory* detDir;
|
||||
G4UIdirectory* mydetDir;
|
||||
G4UIcmdWithAString* AbsMaterCmd;
|
||||
G4int detectorChoice;
|
||||
G4int flag;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -36,16 +36,16 @@ class G4Step;
|
||||
|
||||
class BrachyDummySD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
BrachyDummySD();
|
||||
~BrachyDummySD() {};
|
||||
public:
|
||||
BrachyDummySD();
|
||||
~BrachyDummySD() {};
|
||||
|
||||
void Initialize(G4HCofThisEvent*HCE) {};
|
||||
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist) {return false;}
|
||||
void EndOfEvent(G4HCofThisEvent*HCE) {};
|
||||
void clear() {};
|
||||
void DrawAll() {};
|
||||
void PrintAll() {};
|
||||
void Initialize(G4HCofThisEvent*HCE) {};
|
||||
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist) {return false;}
|
||||
void EndOfEvent(G4HCofThisEvent*HCE) {};
|
||||
void clear() {};
|
||||
void DrawAll() {};
|
||||
void PrintAll() {};
|
||||
};
|
||||
|
||||
BrachyDummySD::BrachyDummySD() : G4VSensitiveDetector("dummySD")
|
||||
|
||||
@@ -20,6 +20,13 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyEventAction.hh,v 1.11 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyEventAction.hh *
|
||||
@@ -33,42 +40,42 @@
|
||||
#include "globals.hh"
|
||||
class BrachyDetectorConstruction;
|
||||
class BrachyAnalysisManager;
|
||||
class BrachyPrimaryGeneratorActionI;
|
||||
class BrachyPrimaryGeneratorActionIr;
|
||||
class BrachyEventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
BrachyEventAction(G4String&);
|
||||
~BrachyEventAction();
|
||||
BrachyEventAction(G4String&);
|
||||
~BrachyEventAction();
|
||||
|
||||
public:
|
||||
void BeginOfEventAction(const G4Event*);
|
||||
void EndOfEventAction(const G4Event*);
|
||||
|
||||
|
||||
|
||||
void BeginOfEventAction(const G4Event*);
|
||||
void EndOfEventAction(const G4Event*);
|
||||
|
||||
private:
|
||||
G4double EnergyDep;
|
||||
G4int m_NumVoxelX;
|
||||
G4int m_NumVoxelZ;
|
||||
|
||||
BrachyDetectorConstruction *pDetector;
|
||||
G4double VoxelWidth_Z;
|
||||
G4double VoxelWidth_X;
|
||||
|
||||
G4double EnergyDep;
|
||||
G4int m_NumVoxelX;
|
||||
G4int m_NumVoxelZ;
|
||||
|
||||
G4double VoxelWidth_Z;
|
||||
G4double VoxelWidth_X;
|
||||
|
||||
private:
|
||||
G4int m_HitsCollectionID;
|
||||
G4String drawFlag;
|
||||
G4int j;
|
||||
G4int i;
|
||||
G4int k;
|
||||
G4double x;
|
||||
G4double z;
|
||||
G4String SDname;
|
||||
G4int printModulo;
|
||||
|
||||
G4int m_HitsCollectionID;
|
||||
G4String drawFlag;
|
||||
G4int j;
|
||||
G4int i;
|
||||
G4int k;
|
||||
G4double x;
|
||||
G4double z;
|
||||
G4double y;
|
||||
G4String SDname;
|
||||
G4int printModulo;
|
||||
BrachyDetectorConstruction* pDetector;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+38
-17
@@ -21,29 +21,50 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B07PrimaryGeneratorAction.hh,v 1.2 2002/04/19 10:54:34 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: BrachyFactory.hh,v 1.2 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyFactory.hh *
|
||||
// * *
|
||||
// **********************************
|
||||
//
|
||||
// this is the abstract class which manages the sources
|
||||
|
||||
#ifndef B07PrimaryGeneratorAction_hh
|
||||
#define B07PrimaryGeneratorAction_hh B07PrimaryGeneratorAction_hh
|
||||
|
||||
#ifndef BrachyFactory_h
|
||||
#define BrachyFactory_h 1
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
class G4ParticleGun;
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
class BrachyAnalysisManager;
|
||||
|
||||
class B07PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
class BrachyFactory
|
||||
{
|
||||
public:
|
||||
B07PrimaryGeneratorAction();
|
||||
~B07PrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
|
||||
private:
|
||||
G4ParticleGun* particleGun;
|
||||
public:
|
||||
BrachyFactory();
|
||||
virtual ~BrachyFactory();
|
||||
virtual G4VUserPrimaryGeneratorAction* CreatePrimaryGeneratorAction()=0;
|
||||
virtual void CreateSource(G4VPhysicalVolume*)=0;
|
||||
virtual void CleanSource()=0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+25
-18
@@ -20,30 +20,37 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: BrachyFactoryI.hh,v 1.3 2002/12/13 09:25:32 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// $Id: B06PrimaryGeneratorAction.hh,v 1.2 2002/04/19 10:54:31 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
|
||||
#ifndef B06PrimaryGeneratorAction_hh
|
||||
#define B06PrimaryGeneratorAction_hh B06PrimaryGeneratorAction_hh
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
#ifndef BrachyFactoryI_h
|
||||
#define BrachyFactoryI_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include"BrachyDetectorConstructionI.hh"
|
||||
#include"BrachyFactory.hh"
|
||||
#include "G4RunManager.hh"
|
||||
class G4ParticleGun;
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
|
||||
class B06PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
class BrachyAnalysisManager;
|
||||
class BrachyFactory;
|
||||
class BrachyPrimaryGeneratorActionI;
|
||||
class BrachyDetectorConstructionI;
|
||||
class BrachyFactoryI:public BrachyFactory
|
||||
{
|
||||
public:
|
||||
B06PrimaryGeneratorAction();
|
||||
~B06PrimaryGeneratorAction();
|
||||
public:
|
||||
BrachyFactoryI();
|
||||
~BrachyFactoryI();
|
||||
G4VUserPrimaryGeneratorAction* CreatePrimaryGeneratorAction();
|
||||
void CreateSource(G4VPhysicalVolume*);
|
||||
void CleanSource();
|
||||
private:
|
||||
BrachyDetectorConstructionI* pIodio;
|
||||
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
|
||||
private:
|
||||
G4ParticleGun* particleGun;
|
||||
};
|
||||
|
||||
#endif
|
||||
+29
-18
@@ -21,29 +21,40 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B08PrimaryGeneratorAction.hh,v 1.1 2002/06/04 11:14:52 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: BrachyFactoryIr.hh,v 1.2 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#ifndef B08PrimaryGeneratorAction_hh
|
||||
#define B08PrimaryGeneratorAction_hh B08PrimaryGeneratorAction_hh
|
||||
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyFactoryIr.hh *
|
||||
// * *
|
||||
// **********************************
|
||||
//
|
||||
//
|
||||
//
|
||||
#ifndef BrachyFactoryIr_h
|
||||
#define BrachyFactoryIr_h 1
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include"BrachyFactory.hh"
|
||||
#include "G4RunManager.hh"
|
||||
class G4ParticleGun;
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
class BrachyAnalysisManager;
|
||||
class BrachyFactory;
|
||||
class BrachyPrimaryGeneratorActionIr;
|
||||
class BrachyDetectorConstructionIr;
|
||||
|
||||
class B08PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
class BrachyFactoryIr:public BrachyFactory
|
||||
{
|
||||
public:
|
||||
B08PrimaryGeneratorAction();
|
||||
~B08PrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
|
||||
private:
|
||||
G4ParticleGun* particleGun;
|
||||
public:
|
||||
BrachyFactoryIr();
|
||||
~BrachyFactoryIr();
|
||||
G4VUserPrimaryGeneratorAction* CreatePrimaryGeneratorAction();
|
||||
void CreateSource(G4VPhysicalVolume*);
|
||||
void CleanSource();
|
||||
private:
|
||||
BrachyDetectorConstructionIr* pIridio;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: BrachyFactoryLeipzig.hh,v 1.2 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyFactoryLeipzig.hh *
|
||||
// * *
|
||||
// **********************************
|
||||
//
|
||||
//
|
||||
#ifndef BrachyFactoryLeipzig_h
|
||||
#define BrachyFactoryLeipzig_h 1
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include"BrachyFactory.hh"
|
||||
#include "G4RunManager.hh"
|
||||
class G4ParticleGun;
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
class BrachyAnalysisManager;
|
||||
class BrachyFactory;
|
||||
class BrachyPrimaryGeneratorActionIr;
|
||||
class BrachyDetectorConstructionLeipzig;
|
||||
|
||||
class BrachyFactoryLeipzig:public BrachyFactory
|
||||
{
|
||||
public:
|
||||
BrachyFactoryLeipzig();
|
||||
~BrachyFactoryLeipzig();
|
||||
G4VUserPrimaryGeneratorAction* CreatePrimaryGeneratorAction();
|
||||
void CreateSource(G4VPhysicalVolume*);
|
||||
void CleanSource();
|
||||
private:
|
||||
BrachyDetectorConstructionLeipzig* pLeipzig;
|
||||
};
|
||||
#endif
|
||||
+21
-19
@@ -21,31 +21,33 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B04ImportanceDetectorConstruction.hh,v 1.2 2002/04/19 10:54:29 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: BrachyMaterial.hh,v 1.2 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#ifndef B04ImportanceDetectorConstruction_hh
|
||||
#define B04ImportanceDetectorConstruction_hh B04ImportanceDetectorConstruction_hh
|
||||
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyMaterial.hh *
|
||||
// * *
|
||||
// **********************************
|
||||
//This class manages the elments and materials nedded by the simulation
|
||||
// set-up
|
||||
//
|
||||
#ifndef BrachyMaterial_H
|
||||
#define BrachyMaterial_H 1
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
class G4Material;
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4VIStore;
|
||||
|
||||
class B04ImportanceDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
class BrachyMaterial
|
||||
{ public:
|
||||
BrachyMaterial();
|
||||
~ BrachyMaterial();
|
||||
|
||||
public:
|
||||
B04ImportanceDetectorConstruction();
|
||||
~B04ImportanceDetectorConstruction();
|
||||
void DefineMaterials();
|
||||
|
||||
G4VPhysicalVolume* Construct();
|
||||
G4VIStore* GetIStore();
|
||||
|
||||
private:
|
||||
G4VIStore *fIStore;
|
||||
|
||||
public:
|
||||
G4Material* GetMat(G4String);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -20,11 +20,17 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPhantomHit.hh,v 1.4 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ********************************
|
||||
// * *
|
||||
// * BrachyPhantomHit.hh *
|
||||
// * *
|
||||
// ********************************
|
||||
// It manages the hits
|
||||
|
||||
#ifndef BrachyPhantomHit_h
|
||||
#define BrachyPhantomHit_h 1
|
||||
@@ -39,52 +45,56 @@
|
||||
|
||||
class BrachyPhantomHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
BrachyPhantomHit(G4LogicalVolume* logVol,G4int XID,G4int ZID);
|
||||
~BrachyPhantomHit();
|
||||
BrachyPhantomHit(const BrachyPhantomHit &right);
|
||||
const BrachyPhantomHit& operator=(const BrachyPhantomHit &right);
|
||||
int operator==(const BrachyPhantomHit &right) const;
|
||||
public:
|
||||
BrachyPhantomHit(G4LogicalVolume* ,G4int ,G4int ,G4int );
|
||||
~BrachyPhantomHit();
|
||||
BrachyPhantomHit(const BrachyPhantomHit &right);
|
||||
const BrachyPhantomHit& operator=(const BrachyPhantomHit &right);
|
||||
int operator==(const BrachyPhantomHit &right) const;
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aHit);
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aHit);
|
||||
|
||||
void Draw();
|
||||
void Print();
|
||||
void Draw();
|
||||
void Print();
|
||||
|
||||
private:
|
||||
G4ThreeVector m_Pos;
|
||||
G4RotationMatrix m_Rot;
|
||||
const G4LogicalVolume* m_pLogV;
|
||||
private:
|
||||
G4ThreeVector m_Pos;
|
||||
G4RotationMatrix m_Rot;
|
||||
const G4LogicalVolume* m_pLogV;
|
||||
|
||||
G4double m_Edep;
|
||||
G4double m_Edep;
|
||||
|
||||
G4int m_XID;
|
||||
G4int m_ZID;
|
||||
|
||||
public:
|
||||
inline void SetCellID(G4int XID,G4int ZID)
|
||||
{m_XID = XID;m_ZID = ZID;}
|
||||
inline G4int GetXID()
|
||||
{return m_XID;}
|
||||
inline G4int GetZID()
|
||||
{return m_ZID;}
|
||||
inline void SetEdep(G4double edep)
|
||||
{m_Edep = edep;}
|
||||
inline void AddEdep(G4double edep)
|
||||
{m_Edep += edep;}
|
||||
inline G4double GetEdep()
|
||||
{return m_Edep;}
|
||||
inline void SetPos(G4ThreeVector xyz)
|
||||
{m_Pos = xyz;}
|
||||
inline G4ThreeVector GetPos()
|
||||
{return m_Pos;}
|
||||
inline void SetRot(G4RotationMatrix rmat)
|
||||
{m_Rot = rmat;}
|
||||
inline G4RotationMatrix GetRot()
|
||||
{return m_Rot;}
|
||||
inline const G4LogicalVolume * GetLogV()
|
||||
{return m_pLogV;}
|
||||
G4int m_XID;
|
||||
G4int m_ZID;
|
||||
G4int m_YID;
|
||||
public:
|
||||
inline void SetCellID(G4int XID,G4int YID,G4int ZID)
|
||||
{m_XID = XID;m_ZID = ZID; m_YID = YID; }
|
||||
inline G4int GetXID()
|
||||
{return m_XID;}
|
||||
inline G4int GetZID()
|
||||
{return m_ZID;}
|
||||
|
||||
inline G4int GetYID()
|
||||
{return m_YID;}
|
||||
|
||||
inline void SetEdep(G4double edep)
|
||||
{m_Edep = edep;}
|
||||
inline void AddEdep(G4double edep)
|
||||
{m_Edep += edep;}
|
||||
inline G4double GetEdep()
|
||||
{return m_Edep;}
|
||||
inline void SetPos(G4ThreeVector xyz)
|
||||
{m_Pos = xyz;}
|
||||
inline G4ThreeVector GetPos()
|
||||
{return m_Pos;}
|
||||
inline void SetRot(G4RotationMatrix rmat)
|
||||
{m_Rot = rmat;}
|
||||
inline G4RotationMatrix GetRot()
|
||||
{return m_Rot;}
|
||||
inline const G4LogicalVolume * GetLogV()
|
||||
{return m_pLogV;}
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<BrachyPhantomHit> BrachyPhantomHitsCollection;
|
||||
@@ -92,14 +102,14 @@ extern G4Allocator<BrachyPhantomHit> BrachyPhantomHitAllocator;
|
||||
|
||||
inline void* BrachyPhantomHit::operator new(size_t)
|
||||
{
|
||||
void *aHit;
|
||||
aHit = (void *) BrachyPhantomHitAllocator.MallocSingle();
|
||||
return aHit;
|
||||
void *aHit;
|
||||
aHit = (void *) BrachyPhantomHitAllocator.MallocSingle();
|
||||
return aHit;
|
||||
}
|
||||
|
||||
inline void BrachyPhantomHit::operator delete(void *aHit)
|
||||
{
|
||||
BrachyPhantomHitAllocator.FreeSingle((BrachyPhantomHit*) aHit);
|
||||
BrachyPhantomHitAllocator.FreeSingle((BrachyPhantomHit*) aHit);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,13 +20,18 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPhantomROGeometry.hh,v 1.3 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ************************************
|
||||
// * *
|
||||
// * BrachyWaterBoxROGeometry.hh *
|
||||
// * BrachyPhantomROGeometry.hh *
|
||||
// * *
|
||||
// ************************************
|
||||
|
||||
|
||||
//
|
||||
//The phantom is devided in voxels. the dimension of the voxel is 1mm
|
||||
//
|
||||
#ifndef BrachyPhantomROGeometry_h
|
||||
#define BrachyPhantomROGeometry_h
|
||||
|
||||
@@ -34,18 +39,18 @@
|
||||
|
||||
class BrachyPhantomROGeometry : public G4VReadOutGeometry
|
||||
{
|
||||
public:
|
||||
BrachyPhantomROGeometry(G4String aString,G4double DetDimX,G4double DetDimZ,G4int NumVoxelX,G4int NumVoxelZ);
|
||||
~BrachyPhantomROGeometry();
|
||||
public:
|
||||
BrachyPhantomROGeometry(G4String aString,G4double DetDimX,G4double DetDimZ,G4int NumVoxelX,G4int NumVoxelZ);
|
||||
~BrachyPhantomROGeometry();
|
||||
|
||||
private:
|
||||
const G4double m_DetDimX;
|
||||
const G4double m_DetDimZ;
|
||||
const G4int m_NumVoxelX;
|
||||
const G4int m_NumVoxelZ;
|
||||
private:
|
||||
const G4double m_DetDimX;
|
||||
const G4double m_DetDimZ;
|
||||
const G4int m_NumVoxelX;
|
||||
const G4int m_NumVoxelZ;
|
||||
|
||||
private:
|
||||
G4VPhysicalVolume* Build();
|
||||
private:
|
||||
G4VPhysicalVolume* Build();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,14 +20,18 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPhantomSD.hh,v 1.3 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ********************************
|
||||
// * *
|
||||
// * BrachyWaterBoxSD.hh *
|
||||
// * BrachyPhantomSD.hh *
|
||||
// * *
|
||||
// ********************************
|
||||
|
||||
#ifndef BrachyPhantomSD_h
|
||||
#define BrachyPHANTOMSD_h 1
|
||||
#define BrachyPhantomSD_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "BrachyPhantomHit.hh"
|
||||
@@ -38,22 +42,23 @@ class G4TouchableHistory;
|
||||
|
||||
class BrachyPhantomSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
BrachyPhantomSD(G4String name, G4int NumVoxelX, G4int NumVoxelZ);
|
||||
~BrachyPhantomSD();
|
||||
public:
|
||||
BrachyPhantomSD(G4String name, G4int NumVoxelX, G4int NumVoxelZ);
|
||||
~BrachyPhantomSD();
|
||||
|
||||
void Initialize(G4HCofThisEvent*HCE);
|
||||
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
void EndOfEvent(G4HCofThisEvent*HCE);
|
||||
void clear();
|
||||
void DrawAll();
|
||||
void PrintAll();
|
||||
private:
|
||||
BrachyPhantomHitsCollection *m_pPhantomHitsCollection;
|
||||
void Initialize(G4HCofThisEvent*HCE);
|
||||
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
void EndOfEvent(G4HCofThisEvent*HCE);
|
||||
void clear();
|
||||
void DrawAll();
|
||||
void PrintAll();
|
||||
private:
|
||||
BrachyPhantomHitsCollection *m_pPhantomHitsCollection;
|
||||
|
||||
const G4int m_NumVoxelX;
|
||||
const G4int m_NumVoxelZ;
|
||||
G4int *m_pVoxelID;
|
||||
const G4int m_NumVoxelX;
|
||||
const G4int m_NumVoxelZ;
|
||||
G4int *m_pVoxelID;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPhysicsList.hh,v 1.6 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyPhysicsList.hh *
|
||||
@@ -40,46 +44,46 @@ class G4LowEnergyBremsstrahlung;
|
||||
|
||||
class BrachyPhysicsList: public G4VUserPhysicsList
|
||||
{
|
||||
public:
|
||||
BrachyPhysicsList();
|
||||
~BrachyPhysicsList();
|
||||
public:
|
||||
BrachyPhysicsList();
|
||||
~BrachyPhysicsList();
|
||||
|
||||
protected:
|
||||
// Construct particle and physics
|
||||
void ConstructParticle();
|
||||
void ConstructProcess();
|
||||
protected:
|
||||
// Construct particle and physics
|
||||
void ConstructParticle();
|
||||
void ConstructProcess();
|
||||
|
||||
void SetCuts();
|
||||
void SetCuts();
|
||||
|
||||
public:
|
||||
// Set Cuts
|
||||
void SetGammaCut(G4double);
|
||||
void SetElectronCut(G4double);
|
||||
void SetPositronCut(G4double);
|
||||
public:
|
||||
// Set Cuts
|
||||
void SetGammaCut(G4double);
|
||||
void SetElectronCut(G4double);
|
||||
void SetPositronCut(G4double);
|
||||
|
||||
void SetGammaLowLimit(G4double);
|
||||
void SetElectronLowLimit(G4double);
|
||||
void SetGELowLimit(G4double);
|
||||
void SetLowEnSecPhotCut(G4double);
|
||||
void SetLowEnSecElecCut(G4double);
|
||||
void SetGammaLowLimit(G4double);
|
||||
void SetElectronLowLimit(G4double);
|
||||
void SetGELowLimit(G4double);
|
||||
void SetLowEnSecPhotCut(G4double);
|
||||
void SetLowEnSecElecCut(G4double);
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
G4double cutForGamma;
|
||||
G4double cutForElectron;
|
||||
G4double cutForPositron;
|
||||
G4double cutForGamma;
|
||||
G4double cutForElectron;
|
||||
G4double cutForPositron;
|
||||
|
||||
protected:
|
||||
// these methods Construct particles
|
||||
void ConstructBosons();
|
||||
void ConstructLeptons();
|
||||
protected:
|
||||
// these methods Construct particles
|
||||
void ConstructBosons();
|
||||
void ConstructLeptons();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
// these methods Construct physics processes and register them
|
||||
void ConstructGeneral();
|
||||
void ConstructEM();
|
||||
void ConstructGeneral();
|
||||
void ConstructEM();
|
||||
|
||||
private:
|
||||
private:
|
||||
G4LowEnergyIonisation* loweIon;
|
||||
G4LowEnergyPhotoElectric* lowePhot;
|
||||
G4LowEnergyBremsstrahlung* loweBrem;
|
||||
|
||||
@@ -1,3 +1,29 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: BrachyPrimaryGeneratorAction.hh,v 1.8 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyPrimaryGeneratorAction.hh *
|
||||
@@ -15,25 +41,18 @@ class G4ParticleGun;
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
class BrachyAnalysisManager;
|
||||
|
||||
class BrachyPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
BrachyPrimaryGeneratorAction();
|
||||
~BrachyPrimaryGeneratorAction();
|
||||
public:
|
||||
BrachyPrimaryGeneratorAction();
|
||||
~BrachyPrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
public:
|
||||
virtual void GeneratePrimaries(G4Event* anEvent)=0;
|
||||
|
||||
|
||||
private:
|
||||
G4ParticleGun* m_pParticleGun;
|
||||
|
||||
|
||||
G4RadioactiveDecay *m_pRadioactiveDecay;
|
||||
G4double Energy;
|
||||
|
||||
// BrachyPrimaryGeneratorMessenger* gunMessenger;
|
||||
G4std::vector<G4double> vettore;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorActionI.hh,v 1.2 2002/11/18 15:18:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyPrimaryGeneratorActionI.hh *
|
||||
// * *
|
||||
// ********************************************
|
||||
//Primary particles of the Iodium source. They are delivered from a random
|
||||
//point of the radionuclide with random direction. The energy spectrum
|
||||
// of the gamma delivered is activated
|
||||
|
||||
#ifndef BrachyPrimaryGeneratorActionI_h
|
||||
#define BrachyPrimaryGeneratorActionI_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "BrachyPrimaryGeneratorAction.hh"
|
||||
class G4ParticleGun;
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
class BrachyAnalysisManager;
|
||||
class BrachyPrimaryGeneratorAction;
|
||||
//class BrachyPrimaryGeneratorMessenger;
|
||||
class BrachyPrimaryGeneratorActionI : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
BrachyPrimaryGeneratorActionI();
|
||||
~BrachyPrimaryGeneratorActionI();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
|
||||
G4double GetEnergy();
|
||||
private:
|
||||
G4ParticleGun* m_pParticleGun;
|
||||
|
||||
G4RadioactiveDecay *m_pRadioactiveDecay;
|
||||
G4double Energy;
|
||||
|
||||
// BrachyPrimaryGeneratorMessenger* gunMessenger;
|
||||
G4std::vector<G4double> vettore;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorActionIr.hh,v 1.2 2002/11/18 15:18:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// *************************************************
|
||||
// * *
|
||||
// * BrachyPrimaryGeneratorActionIr.hh" *
|
||||
// * *
|
||||
// *************************************************
|
||||
//
|
||||
//
|
||||
//Primary particles of the Iridium source. They are delivered from a random
|
||||
//point of the radionuclide with random direction.
|
||||
|
||||
#ifndef BrachyPrimaryGeneratorActionIr_h
|
||||
#define BrachyPrimaryGeneratorActionIr_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "BrachyPrimaryGeneratorAction.hh"
|
||||
|
||||
class G4ParticleGun;
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
class BrachyAnalysisManager;
|
||||
class BrachyPrimaryGeneratorAction;
|
||||
class BrachyPrimaryGeneratorActionIr: public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
BrachyPrimaryGeneratorActionIr();
|
||||
~BrachyPrimaryGeneratorActionIr();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
G4double GetEnergy(){return Energy;};
|
||||
|
||||
private:
|
||||
// G4ParticleGun* m_pParticleGun;
|
||||
G4ParticleGun* m_pParticleGun;
|
||||
//G4RadioactiveDecay *m_pRadioactiveDecay;
|
||||
G4double Energy;
|
||||
G4RadioactiveDecay *m_pRadioactiveDecay;
|
||||
// BrachyPrimaryGeneratorMessenger* gunMessenger;
|
||||
G4std::vector<G4double> vettore;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,28 +1,76 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: BrachyRunAction.hh,v 1.6 2002/11/18 15:18:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyRunAction.hh *
|
||||
// * *
|
||||
// ********************************************
|
||||
//
|
||||
#ifndef BrachyRunAction_h
|
||||
#define BrachyRunAction_h 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
|
||||
class G4Run;
|
||||
class BrachyAnalysisManager;
|
||||
class BrachyDetectorConstruction;
|
||||
class BrachyRunMessenger;
|
||||
|
||||
class BrachyFactory;
|
||||
class BrachyFactoryIr;
|
||||
class BrachyFactoryI;
|
||||
class BrachyRunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
BrachyRunAction( );
|
||||
~BrachyRunAction();
|
||||
public:
|
||||
BrachyRunAction(G4String& );
|
||||
~BrachyRunAction();
|
||||
|
||||
public:
|
||||
void BeginOfRunAction(const G4Run*);
|
||||
void EndOfRunAction(const G4Run* );
|
||||
private:
|
||||
|
||||
G4String SDname;
|
||||
public:
|
||||
void BeginOfRunAction(const G4Run*);
|
||||
void EndOfRunAction(const G4Run* );
|
||||
void SelectEnergy(G4int);
|
||||
private:
|
||||
|
||||
G4String SDname;
|
||||
BrachyFactory *factory;
|
||||
G4VUserDetectorConstruction* pDetector;
|
||||
BrachyDetectorConstruction* pDet;
|
||||
|
||||
G4int a;
|
||||
BrachyRunMessenger* pRun;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
+45
-42
@@ -21,57 +21,60 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B08ImportanceMessenger.hh,v 1.1 2002/06/04 11:14:51 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: BrachyRunMessenger.hh,v 1.2 2002/11/18 15:18:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyRunMessenger.hh *
|
||||
// * *
|
||||
// ********************************************
|
||||
// This class permits to switch the energy of the gamma delivered from the
|
||||
//radionuclides (Iodium/Iridium)
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef B08ImportanceMessenger_hh
|
||||
#define B08ImportanceMessenger_hh B08ImportanceMessenger_hh
|
||||
#ifndef BrachyRunMessenger_h
|
||||
#define BrachyRunMessenger_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4std/map"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class G4VIStore;
|
||||
class BrachyRunAction;
|
||||
class BrachyFactoryIr;
|
||||
class BrachyRunAction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADouble;
|
||||
class G4UIcommand;
|
||||
class G4VPhysicalVolume;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithoutParameter;
|
||||
|
||||
class B08BaseExp {
|
||||
public:
|
||||
B08BaseExp(G4double b = 1, G4double e = 1) : fBase(b), fExp(e){}
|
||||
void SetBase(G4double b){fBase = b;}
|
||||
void SetExponent(G4double e){fExp = e;}
|
||||
G4double GetImportance() const {return pow(fBase, fExp);}
|
||||
private:
|
||||
G4double fBase;
|
||||
G4double fExp;
|
||||
};
|
||||
|
||||
class B08ImportanceMessenger: public G4UImessenger{
|
||||
public:
|
||||
B08ImportanceMessenger(G4VIStore &istore);
|
||||
~B08ImportanceMessenger(){}
|
||||
void SetNewValue(G4UIcommand* pCmd,G4String szValue);
|
||||
void AddCell(const G4String &cellname, G4VPhysicalVolume *p);
|
||||
void SetImportanceBase(const G4String &cellname, G4double base);
|
||||
void SetImportanceExponent(const G4String &cellname, G4double exp);
|
||||
|
||||
typedef G4std::map<G4UIcmdWithADouble *, G4VPhysicalVolume *> B08BaseMap;
|
||||
typedef G4std::map<G4UIcmdWithADouble *, G4VPhysicalVolume *> B08ExpMap;
|
||||
typedef G4std::map<G4VPhysicalVolume *, B08BaseExp> B08BaseExpMap;
|
||||
typedef G4std::map<G4String, G4VPhysicalVolume *> B08CellVolMap;
|
||||
|
||||
private:
|
||||
G4VIStore &fIStore;
|
||||
|
||||
B08BaseMap fBaseMap;
|
||||
B08ExpMap fExpMap;
|
||||
B08BaseExpMap fBaseExpMap;
|
||||
B08CellVolMap fCellVolMap;
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class BrachyRunMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
BrachyRunMessenger(BrachyRunAction* );
|
||||
~BrachyRunMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
|
||||
BrachyRunAction* pRun;
|
||||
G4UIcmdWithAString* selDetCmd;
|
||||
|
||||
G4UIdirectory* detDir;
|
||||
G4UIdirectory* mydetDir;
|
||||
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,39 @@
|
||||
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: BrachyVisManager.hh,v 1.4 2002/11/18 15:18:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyVisManager.hh *
|
||||
// * *
|
||||
// ********************************************
|
||||
//
|
||||
//This class permits the visualisation of the experimerimental set up
|
||||
//
|
||||
#ifndef BrachyVisManager_h
|
||||
#define BrachyVisManager_h 1
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#/vis/open OGLIX
|
||||
/vis/open DAWNFILE
|
||||
/vis/viewer/flush
|
||||
|
||||
|
||||
#
|
||||
# draw scene/
|
||||
#
|
||||
|
||||
@@ -1,5 +1,38 @@
|
||||
|
||||
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyAnalysisManager.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyAnalysisManager.cc,v 1.9 2002/12/12 19:16:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include <stdlib.h>
|
||||
#include "g4std/fstream"
|
||||
#include "BrachyAnalysisManager.hh"
|
||||
@@ -25,20 +58,19 @@ BrachyAnalysisManager::BrachyAnalysisManager() :
|
||||
|
||||
{
|
||||
//build up the factories
|
||||
aFact = AIDA_createAnalysisFactory();
|
||||
aFact = AIDA_createAnalysisFactory();
|
||||
|
||||
ITreeFactory * treeFact = aFact->createTreeFactory();
|
||||
AIDA::ITreeFactory *treeFact = aFact->createTreeFactory();
|
||||
|
||||
|
||||
|
||||
//parameters for the TreeFactory
|
||||
bool fileExists = false;
|
||||
bool readOnly = false;
|
||||
std::string fileName="Brachy3.hbk";
|
||||
theTree = treeFact->create(fileName, readOnly, fileExists, "hbook");
|
||||
//parameters for the TreeFactory
|
||||
|
||||
std::string fileName="brachytherapy.hbk";
|
||||
theTree = treeFact->create(fileName,"hbook",false, true);
|
||||
|
||||
delete treeFact;
|
||||
//HistoFactory and TupleFactory depend on theTree
|
||||
|
||||
histFact = aFact->createHistogramFactory( *theTree );
|
||||
tupFact = aFact->createTupleFactory ( *theTree );
|
||||
|
||||
@@ -51,7 +83,7 @@ BrachyAnalysisManager::~BrachyAnalysisManager()
|
||||
delete tupFact;
|
||||
tupFact=0;
|
||||
|
||||
delete histFact;
|
||||
delete histFact;
|
||||
histFact=0;
|
||||
|
||||
delete theTree;
|
||||
@@ -71,71 +103,53 @@ BrachyAnalysisManager* BrachyAnalysisManager::getInstance()
|
||||
|
||||
void BrachyAnalysisManager::book()
|
||||
{
|
||||
|
||||
h1 = histFact->createHistogram2D("10","Energy, pos",300 ,-150.,150.,300,-150.,150.);
|
||||
|
||||
// histograms and ntuple are managed by theTree
|
||||
// h2 e h3 are not necessary ,useful for:check for non-zero
|
||||
//you could do histFact->create2D("20","Energy, pos",300 ,-150.,150.,300,-15 //0.,150.);
|
||||
|
||||
|
||||
IHistogram2D *h2 = histFact->create2D("20","Energy, pos",300 ,-150.,150.,300,-150.,150.);
|
||||
|
||||
// check for non-zero
|
||||
h2= histFact->createHistogram1D("20","Initial Energy", 100,0.,4.);
|
||||
|
||||
IHistogram1D *h3 = histFact->create1D("30","Initial Energy", 100,0.,1.);
|
||||
// check for non-zero
|
||||
|
||||
//Ntuple management
|
||||
std::string columnNames = "float energy, float x, float z";
|
||||
std::string options = "";
|
||||
ITuple *tup = tupFact->create("1","brachy",columnNames, options);
|
||||
// check for non-zero ...
|
||||
if (tup) G4cout<<"The Ntuple is non-zero"<<G4endl;
|
||||
std::string columnNames = "float energy, float x,float y, float z";
|
||||
std::string options = "";
|
||||
if (tupFact) ntuple = tupFact->create("1","1",columnNames, options);
|
||||
// check for non-zero ...
|
||||
if (ntuple) G4cout<<"The Ntuple is non-zero"<<G4endl;
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
void BrachyAnalysisManager::analyse(G4double xx,G4double zz,G4float en)
|
||||
void BrachyAnalysisManager::fill_Tuple(G4double xx,G4double yy, G4double zz,G4float en)
|
||||
{
|
||||
|
||||
ITuple * ntuple = dynamic_cast<ITuple *> ( theTree->find("1") );
|
||||
//ntuple = dynamic_cast<ITuple *> ( theTree->find("1") );
|
||||
|
||||
if (ntuple == 0) {
|
||||
cout << "AAAAAAAGH" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
ntuple->fill(1, en);// fill ( int column, double value )
|
||||
ntuple->fill(2, xx);
|
||||
ntuple->fill(3, zz);
|
||||
ntuple->fill(3, yy);
|
||||
ntuple->fill(4, zz);
|
||||
|
||||
// alternatively(if all the columns are of the same type):
|
||||
// std::vector<float> row;
|
||||
// row.push_back(en);
|
||||
// row.push_back(xx);
|
||||
// row.push_back(zz);
|
||||
// ntuple->fill(row);
|
||||
|
||||
// write Ntuple-row to file
|
||||
// Should be called after fill is called for the columns.
|
||||
// Unfilled columns will be filled with the default value for that column.
|
||||
ntuple->addRow();
|
||||
|
||||
}
|
||||
|
||||
void BrachyAnalysisManager::hist(G4double x,G4double z, G4float enn)
|
||||
{
|
||||
|
||||
|
||||
IHistogram2D* h2 = dynamic_cast<IHistogram2D *> ( theTree->find("20") );
|
||||
h2->fill(x,z,enn);
|
||||
h1->fill(x,z,enn);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void BrachyAnalysisManager::Spectrum(G4double Init_En)
|
||||
{
|
||||
IHistogram1D* h3 = dynamic_cast<IHistogram1D *> ( theTree->find("30") );
|
||||
h3->fill(Init_En);
|
||||
{
|
||||
h2->fill(Init_En);
|
||||
}
|
||||
|
||||
|
||||
void BrachyAnalysisManager::finish()
|
||||
{
|
||||
// write all histograms to file
|
||||
@@ -145,7 +159,7 @@ void BrachyAnalysisManager::finish()
|
||||
theTree->close();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,44 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
//
|
||||
// ****************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstruction.cc *
|
||||
// * *
|
||||
// ****************************************
|
||||
|
||||
//
|
||||
// $Id: BrachyDetectorConstruction.cc,v 1.13 2002/12/12 19:16:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPhantomROGeometry.hh"
|
||||
#include "BrachyPhantomSD.hh"
|
||||
#include "BrachyDetectorMessenger.hh"
|
||||
@@ -23,8 +58,8 @@
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
|
||||
|
||||
#include "Randomize.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4PVParameterised.hh"
|
||||
@@ -38,386 +73,258 @@
|
||||
#include "G4UnionSolid.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
#include "BrachyMaterial.hh"
|
||||
#include "BrachyFactoryLeipzig.hh"
|
||||
#include "BrachyFactoryIr.hh"
|
||||
#include "BrachyFactoryI.hh"
|
||||
|
||||
BrachyDetectorConstruction::BrachyDetectorConstruction(G4String &SDName):
|
||||
NumVoxelX(0),NumVoxelZ(0),m_BoxDimX(0), m_BoxDimY(0), m_BoxDimZ(0),
|
||||
ExpHall(0),ExpHallLog(0),ExpHallPhys(0),
|
||||
Phantom(0), PhantomLog(0), PhantomPhys(0),
|
||||
Capsule(0),CapsuleLog(0),CapsulePhys(0),
|
||||
CapsuleTip(0),CapsuleTipLog(0),CapsuleTipPhys(0),
|
||||
IridiumCore(0),IridiumCoreLog(0),IridiumCorePhys(0)
|
||||
|
||||
NumVoxelX(0),NumVoxelZ(0),m_BoxDimX(0), m_BoxDimY(0), m_BoxDimZ(0),
|
||||
ExpHall(0),ExpHallLog(0),ExpHallPhys(0),
|
||||
Phantom(0), PhantomLog (0), PhantomPhys (0),
|
||||
detectorChoice(0)
|
||||
|
||||
{
|
||||
NumVoxelX=300;
|
||||
NumVoxelZ=300;
|
||||
|
||||
NumVoxelX=300;
|
||||
NumVoxelZ=300;
|
||||
m_BoxDimX=30*cm ;
|
||||
m_BoxDimY=30*cm;
|
||||
m_BoxDimZ=30*cm;
|
||||
|
||||
m_BoxDimX=30*cm ;
|
||||
m_BoxDimY=30*cm;
|
||||
m_BoxDimZ=30*cm;
|
||||
ComputeDimVoxel();
|
||||
|
||||
ComputeDimVoxel();
|
||||
|
||||
|
||||
m_SDName = SDName;//pointer to sensitive detector
|
||||
// create commands for interactive definition of the calorimeter
|
||||
detectorMessenger = new BrachyDetectorMessenger(this);
|
||||
ExpHall_x = 4.0*m;
|
||||
ExpHall_y = 4.0*m;
|
||||
ExpHall_z = 4.0*m;
|
||||
|
||||
m_SDName = SDName;
|
||||
m_SDName = SDName;//pointer to sensitive detector
|
||||
|
||||
detectorMessenger = new BrachyDetectorMessenger(this);
|
||||
|
||||
|
||||
G4Colour white (1.0, 1.0, 1.0) ;
|
||||
G4Colour grey (0.5, 0.5, 0.5) ;
|
||||
G4Colour lgrey (.75, .75, .75) ;
|
||||
G4Colour red (1.0, 0.0, 0.0) ;
|
||||
G4Colour blue (0.0, 0.0, 1.0) ;
|
||||
G4Colour cyan (0.0, 1.0, 1.0) ;
|
||||
G4Colour magenta (1.0, 0.0, 1.0) ;
|
||||
G4Colour yellow (1.0, 1.0, 0.0) ;
|
||||
G4Colour lblue (0.0, 0.0, .75);
|
||||
|
||||
factoryIr=new BrachyFactoryIr();
|
||||
|
||||
pMat= new BrachyMaterial();
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....
|
||||
|
||||
BrachyDetectorConstruction::~BrachyDetectorConstruction()
|
||||
{
|
||||
|
||||
|
||||
delete detectorMessenger;
|
||||
delete pMat;
|
||||
|
||||
if (factoryLeipzig) delete factoryLeipzig;
|
||||
if (factoryI) delete factoryI;
|
||||
delete factoryIr;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
G4VPhysicalVolume* BrachyDetectorConstruction::Construct()
|
||||
{
|
||||
DefineMaterials();
|
||||
return ConstructDetector();
|
||||
}
|
||||
{ pMat-> DefineMaterials();
|
||||
|
||||
void BrachyDetectorConstruction::DefineMaterials()
|
||||
if (ExpHallPhys==0)
|
||||
{
|
||||
// Define required materials
|
||||
ConstructPhantom(); }
|
||||
|
||||
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 = 14.01*g/mole;
|
||||
G4Element* elN = new G4Element("Nitrogen","N",Z=7.,A);
|
||||
switch(detectorChoice)
|
||||
{
|
||||
case 1:
|
||||
factoryI=new BrachyFactoryI();
|
||||
factoryI->CreateSource(PhantomPhys);
|
||||
|
||||
A = 16.00*g/mole;
|
||||
|
||||
G4Element* elO = new G4Element("Oxygen","O",Z=8.,A);
|
||||
|
||||
A=12.011*g/mole;
|
||||
G4Element* elC=new G4Element("Carbon","C",Z=6.,A);
|
||||
|
||||
A=22.99*g/mole;
|
||||
G4Element* elNa=new G4Element("Sodium","Na",Z=11.,A);
|
||||
|
||||
A=24.305*g/mole;
|
||||
G4Element* elMg=new G4Element("Magnesium","Mg",Z=12.,A);
|
||||
|
||||
A=30.974*g/mole;
|
||||
G4Element* elP=new G4Element("Phosphorus","P",Z=15.,A);
|
||||
|
||||
A=32.06*g/mole;
|
||||
G4Element* elS=new G4Element("Sulfur","S",Z=16.,A);
|
||||
|
||||
A=35.453*g/mole;
|
||||
G4Element* elCl=new G4Element("Chlorine","Cl",Z=17.,A);
|
||||
|
||||
|
||||
A=39.098*g/mole;
|
||||
G4Element* elK=new G4Element("Potassium","K",Z=19.,A);
|
||||
|
||||
A=40.08*g/mole;
|
||||
G4Element* elCa=new G4Element("Calcium","Ca",Z=20.,A);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
// Elements for source capsule and cable
|
||||
case 2:
|
||||
factoryLeipzig=new BrachyFactoryLeipzig();
|
||||
factoryLeipzig->CreateSource(PhantomPhys);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
A=65.38*g/mole;
|
||||
G4Element* elZn=new G4Element("Zinc","Zn",Z=30.,A);
|
||||
A=26.98*g/mole;
|
||||
G4Element* elAl=new G4Element("Aluminum","Al", Z=13.,A);
|
||||
case 3:
|
||||
factoryIr->CreateSource(PhantomPhys);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
|
||||
A = 54.94*g/mole;
|
||||
G4Element* elMn = new G4Element("Manganese","Mn",Z=25.,A);
|
||||
|
||||
A = 28.09*g/mole;
|
||||
G4Element* elSi = new G4Element("Silicon","Si",Z=14.,A);
|
||||
|
||||
A = 52.00*g/mole;
|
||||
G4Element* elCr = new G4Element("Chromium","Cr",Z=24.,A);
|
||||
|
||||
A = 58.70*g/mole;
|
||||
G4Element* elNi = new G4Element("Nickel","Ni",Z=28.,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;
|
||||
G4Material* matPb = new G4Material("Lead",Z,A,d);
|
||||
|
||||
// Iridium (Medical Physics, Vol 25, No 10, Oct 1998)
|
||||
d = 22.42*g/cm3;
|
||||
A = 191.96260*g/mole ;
|
||||
Z = 77;
|
||||
G4Material* matIr192 = new G4Material("Iridium",Z,A,d);
|
||||
|
||||
//titanium
|
||||
A=47.88*g/mole;
|
||||
d=4.50*g/cm3;
|
||||
G4Material* Titanium=new G4Material("titanium" ,Z=22.,A,d);
|
||||
|
||||
// Air material
|
||||
d = 1.290*mg/cm3;
|
||||
G4Material* matAir = new G4Material("Air",d,2);
|
||||
matAir->AddElement(elN,0.7);
|
||||
matAir->AddElement(elO,0.3);
|
||||
|
||||
|
||||
// Water
|
||||
d = 1.000*g/cm3;
|
||||
G4Material* matH2O = new G4Material("Water",d,2);
|
||||
matH2O->AddElement(elH,2);
|
||||
matH2O->AddElement(elO,1);
|
||||
|
||||
//soft tissue(NIST data)
|
||||
|
||||
d=1.0*g/cm3;
|
||||
G4Material* soft=new G4Material("tissue",d,13);
|
||||
soft->AddElement(elH,0.104472);
|
||||
soft->AddElement(elC,0.23219);
|
||||
soft->AddElement(elN,0.02488);
|
||||
soft->AddElement(elO,0.630238);
|
||||
soft->AddElement(elNa,0.00113);
|
||||
soft->AddElement(elMg,0.00013);
|
||||
soft->AddElement(elP,0.00133);
|
||||
soft->AddElement(elS,0.00199);
|
||||
soft->AddElement(elCl,0.00134);
|
||||
soft->AddElement(elK,0.00199);
|
||||
soft->AddElement(elCa,0.00023);
|
||||
soft->AddElement(elFe,0.00005);
|
||||
soft->AddElement(elZn,0.00003);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Stainless steel (Medical Physics, Vol 25, No 10, Oct 1998)
|
||||
d = 8.02*g/cm3 ;
|
||||
G4Material* matSteel = new G4Material("Stainless steel",d,5);
|
||||
matSteel->AddElement(elMn, 0.02);
|
||||
matSteel->AddElement(elSi, 0.01);
|
||||
matSteel->AddElement(elCr, 0.19);
|
||||
matSteel->AddElement(elNi, 0.10);
|
||||
matSteel->AddElement(elFe, 0.68);
|
||||
|
||||
|
||||
//--elements for Iodium source which will be introduced in the next release
|
||||
|
||||
|
||||
|
||||
|
||||
//--elements for Iodium source which will be introduced in the next release
|
||||
|
||||
//gold(chimica degli elementi N.N Greenwood,A.Earnshaw)
|
||||
A=196.97*g/mole;
|
||||
d=19.32*g/cm3;
|
||||
G4Material* gold=new G4Material("gold",Z=79.,A,d);
|
||||
|
||||
|
||||
|
||||
//IodiumCore(chimica degli elementi N.N Greenwood,A.Earnshaw)
|
||||
A=124.9*g/mole;
|
||||
d=4.862*g/cm3;
|
||||
G4Material* matI=new G4Material("Iodium",Z=53.,A,d);
|
||||
|
||||
//ceramica(Medical Physics, May 2000)
|
||||
|
||||
d=2.88*g/cm3;
|
||||
G4Material* ceramica=new G4Material("allumina",d,2);
|
||||
ceramica->AddElement(elAl,2);
|
||||
ceramica->AddElement(elO,3);
|
||||
|
||||
|
||||
AbsorberMaterial=matH2O;
|
||||
air= matAir;
|
||||
CapsuleMat=matSteel;
|
||||
IridiumMat=matIr192;
|
||||
|
||||
factoryIr->CreateSource(PhantomPhys);
|
||||
}
|
||||
|
||||
|
||||
ConstructSensitiveDetector();
|
||||
|
||||
G4VPhysicalVolume* BrachyDetectorConstruction::ConstructDetector()
|
||||
{// Volumes
|
||||
ComputeDimVoxel();
|
||||
// EXPERIMENTAL HALL (our world volume)
|
||||
G4double ExpHall_x = 4.0*m;
|
||||
G4double ExpHall_y = 4.0*m;
|
||||
G4double ExpHall_z = 4.0*m;
|
||||
return ExpHallPhys;
|
||||
|
||||
|
||||
|
||||
}
|
||||
void BrachyDetectorConstruction::SwitchDetector()
|
||||
{
|
||||
factoryIr->CleanSource();
|
||||
switch(detectorChoice)
|
||||
{
|
||||
case 1:
|
||||
factoryI=new BrachyFactoryI();
|
||||
factoryI->CreateSource(PhantomPhys);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
factoryLeipzig=new BrachyFactoryLeipzig();
|
||||
factoryLeipzig->CreateSource(PhantomPhys);
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
factoryIr->CreateSource(PhantomPhys);
|
||||
|
||||
break;
|
||||
default:
|
||||
factoryIr->CreateSource(PhantomPhys);
|
||||
}
|
||||
|
||||
// Notify run manager that the new geometry has been built
|
||||
|
||||
G4RunManager::GetRunManager()->DefineWorldVolume( ExpHallPhys );
|
||||
G4RunManager::GetRunManager()->GeometryHasBeenModified();
|
||||
|
||||
// Let the navigator to know about the new top of the new geometry
|
||||
G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->SetWorldVolume(ExpHallPhys);
|
||||
// We have to tweak the navigator's state. By the following dummy call we ensure that navigator's
|
||||
// state is reset properly
|
||||
G4ThreeVector center(0,0,0);
|
||||
G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->LocateGlobalPointAndSetup(center,0,false);
|
||||
|
||||
|
||||
G4Colour white (1.0, 1.0, 1.0) ;
|
||||
G4Colour grey (0.5, 0.5, 0.5) ;
|
||||
G4Colour lgrey (.75, .75, .75) ;
|
||||
G4Colour red (1.0, 0.0, 0.0) ;
|
||||
G4Colour blue (0.0, 0.0, 1.0) ;
|
||||
G4Colour cyan (0.0, 1.0, 1.0) ;
|
||||
G4Colour magenta (1.0, 0.0, 1.0) ;
|
||||
G4Colour yellow (1.0, 1.0, 0.0) ;
|
||||
G4Colour lblue (0.0, 0.0, .75);
|
||||
}
|
||||
|
||||
|
||||
//World volume
|
||||
ExpHall = new G4Box("ExpHall",ExpHall_x,ExpHall_y,ExpHall_z);
|
||||
ExpHallLog = new G4LogicalVolume(ExpHall,air,"ExpHallLog",0,0,0);
|
||||
ExpHallPhys = new G4PVPlacement(0,G4ThreeVector(),"ExpHallPhys",ExpHallLog,NULL,false,0);
|
||||
void BrachyDetectorConstruction::SelectDetector(G4String val)
|
||||
{ if(val=="Iodium")
|
||||
{ detectorChoice = 1; }
|
||||
else
|
||||
{if(val=="Leipzig") detectorChoice = 2;
|
||||
else { if(val=="Iridium")detectorChoice = 3;}}
|
||||
|
||||
// Water Box
|
||||
Phantom= new G4Box("Phantom",m_BoxDimX/2,m_BoxDimY/2,m_BoxDimZ/2);
|
||||
PhantomLog = new G4LogicalVolume(Phantom,AbsorberMaterial,"PhantomLog",0,0,0);
|
||||
G4cout << "Now Detector is " << val << G4endl;
|
||||
}
|
||||
void BrachyDetectorConstruction::ConstructPhantom()
|
||||
|
||||
{
|
||||
G4Colour white (1.0, 1.0, 1.0) ;
|
||||
G4Colour grey (0.5, 0.5, 0.5) ;
|
||||
G4Colour lgrey (.75, .75, .75) ;
|
||||
G4Colour red (1.0, 0.0, 0.0) ;
|
||||
G4Colour blue (0.0, 0.0, 1.0) ;
|
||||
G4Colour cyan (0.0, 1.0, 1.0) ;
|
||||
G4Colour magenta (1.0, 0.0, 1.0) ;
|
||||
G4Colour yellow (1.0, 1.0, 0.0) ;
|
||||
G4Colour lblue (0.0, 0.0, .75);
|
||||
|
||||
PhantomPhys = new G4PVPlacement(0,G4ThreeVector(),"WaterBoxPhys",PhantomLog,ExpHallPhys,false,0);
|
||||
G4Material* air=pMat->GetMat("Air") ;
|
||||
G4Material* soft=pMat->GetMat("tissue");
|
||||
|
||||
ComputeDimVoxel();
|
||||
|
||||
//World volume
|
||||
ExpHall = new G4Box("ExpHall",ExpHall_x,ExpHall_y,ExpHall_z);
|
||||
ExpHallLog = new G4LogicalVolume(ExpHall,air,"ExpHallLog",0,0,0);
|
||||
ExpHallPhys = new G4PVPlacement(0,G4ThreeVector(),"ExpHallPhys",ExpHallLog,NULL,false,0);
|
||||
|
||||
// Water Box
|
||||
Phantom = new G4Box("Phantom",m_BoxDimX/2,m_BoxDimY/2,m_BoxDimZ/2);
|
||||
PhantomLog = new G4LogicalVolume(Phantom,soft,"PhantomLog",0,0,0);
|
||||
|
||||
PhantomPhys = new G4PVPlacement(0,G4ThreeVector(),"PhantomPhys",PhantomLog,ExpHallPhys,false,0);
|
||||
|
||||
ExpHallLog->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
|
||||
// Capsule main body
|
||||
G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(lblue);
|
||||
simpleBoxVisAtt->SetVisibility(true);
|
||||
simpleBoxVisAtt->SetForceWireframe(true);
|
||||
|
||||
PhantomLog->SetVisAttributes(simpleBoxVisAtt);
|
||||
|
||||
G4Tubs* Capsule = new G4Tubs("Capsule",0,0.55*mm,3.725*mm,0.*deg,360.*deg);
|
||||
G4LogicalVolume* CapsuleLog = new G4LogicalVolume(Capsule,CapsuleMat,"CapsuleLog");
|
||||
G4VPhysicalVolume* CapsulePhys = new G4PVPlacement(0,G4ThreeVector(0,0,-1.975),"CapsulePhys",CapsuleLog,PhantomPhys,false,0);
|
||||
}
|
||||
|
||||
// Capsule tip
|
||||
void BrachyDetectorConstruction::ConstructSensitiveDetector()
|
||||
// Sensitive Detector and ReadOut geometry definition
|
||||
{
|
||||
G4SDManager* pSDManager = G4SDManager::GetSDMpointer();
|
||||
|
||||
G4Sphere* CapsuleTip = new G4Sphere("CapsuleTip",0.*mm,0.55*mm,0.*deg,360.*deg,0.*deg,90.*deg);
|
||||
G4LogicalVolume* CapsuleTipLog = new G4LogicalVolume(CapsuleTip,CapsuleMat,"CapsuleTipLog");
|
||||
G4VPhysicalVolume* CapsuleTipPhys = new G4PVPlacement(0,G4ThreeVector(0.,0.,1.75*mm),"CapsuleTipPhys",CapsuleTipLog,PhantomPhys,false,0);
|
||||
|
||||
// Iridium core
|
||||
|
||||
G4Tubs* IridiumCore = new G4Tubs("IrCore",0,0.30*mm,1.75*mm,0.*deg,360.*deg);
|
||||
G4LogicalVolume* IridiumCoreLog = new G4LogicalVolume(IridiumCore,IridiumMat,"IridiumCoreLog");
|
||||
G4VPhysicalVolume* IridiumCorePhys = new G4PVPlacement(0,G4ThreeVector(),"IridiumCorePhys",IridiumCoreLog,CapsulePhys,false,0);
|
||||
|
||||
|
||||
|
||||
// Sensitive Detector and ReadOut geometry definition
|
||||
//
|
||||
G4SDManager* pSDManager = G4SDManager::GetSDMpointer();
|
||||
BrachyPhantomSD* pPhantomSD = new BrachyPhantomSD(m_SDName,NumVoxelX,NumVoxelZ);
|
||||
if(pPhantomSD)
|
||||
{
|
||||
if( pPhantomSD ==0)
|
||||
{
|
||||
pPhantomSD = new BrachyPhantomSD(m_SDName,NumVoxelX,NumVoxelZ);
|
||||
if(pPhantomSD)
|
||||
{
|
||||
G4String ROGeometryName = "PhantomROGeometry";
|
||||
BrachyPhantomROGeometry* pPhantomROGeometry = new BrachyPhantomROGeometry(ROGeometryName,m_BoxDimX,m_BoxDimZ,NumVoxelX,NumVoxelZ);
|
||||
pPhantomROGeometry = new BrachyPhantomROGeometry(ROGeometryName,m_BoxDimX,m_BoxDimZ,NumVoxelX,NumVoxelZ);
|
||||
|
||||
|
||||
pPhantomROGeometry->BuildROGeometry();
|
||||
pPhantomSD->SetROgeometry(pPhantomROGeometry);
|
||||
pSDManager->AddNewDetector(pPhantomSD);
|
||||
|
||||
|
||||
PhantomLog->SetSensitiveDetector(pPhantomSD);
|
||||
CapsuleLog->SetSensitiveDetector(pPhantomSD);
|
||||
CapsuleTipLog->SetSensitiveDetector(pPhantomSD);
|
||||
IridiumCoreLog->SetSensitiveDetector(pPhantomSD);
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Visualization attributes
|
||||
//
|
||||
ExpHallLog->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
|
||||
G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(lblue);
|
||||
simpleBoxVisAtt->SetVisibility(true);
|
||||
simpleBoxVisAtt->SetForceWireframe(true);
|
||||
|
||||
PhantomLog->SetVisAttributes(simpleBoxVisAtt);
|
||||
|
||||
|
||||
|
||||
G4VisAttributes* simpleIridiumVisAtt= new G4VisAttributes(magenta);
|
||||
simpleIridiumVisAtt->SetVisibility(true);
|
||||
simpleIridiumVisAtt->SetForceWireframe(true);
|
||||
IridiumCoreLog->SetVisAttributes(simpleIridiumVisAtt);
|
||||
|
||||
|
||||
|
||||
G4VisAttributes* simpleCapsuleVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleVisAtt->SetVisibility(true);
|
||||
simpleCapsuleVisAtt->SetForceWireframe(true);
|
||||
CapsuleLog->SetVisAttributes( simpleCapsuleVisAtt);
|
||||
|
||||
G4VisAttributes* simpleCapsuleTipVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleTipVisAtt->SetVisibility(true);
|
||||
simpleCapsuleTipVisAtt->SetForceSolid(true);
|
||||
CapsuleTipLog->SetVisAttributes( simpleCapsuleTipVisAtt);
|
||||
|
||||
|
||||
//always return the physical World
|
||||
|
||||
PrintDetectorParameters();
|
||||
return ExpHallPhys;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void BrachyDetectorConstruction::PrintDetectorParameters()
|
||||
{
|
||||
G4cout << "-----------------------------------------------------------------------"
|
||||
<< G4endl
|
||||
<<"the detector is a box whose size is: "
|
||||
<<G4endl
|
||||
<<m_BoxDimX/cm
|
||||
<< " cm * "
|
||||
<<m_BoxDimY/cm
|
||||
<< " cm * "
|
||||
<<m_BoxDimZ/cm
|
||||
<< " cm"
|
||||
<< G4endl
|
||||
<<"numVoxel: "
|
||||
<<NumVoxelX
|
||||
<<G4endl
|
||||
<<"dim voxel: "
|
||||
<<dimVoxel/mm
|
||||
<<"mm"
|
||||
<<G4endl
|
||||
<<"material of the box : "
|
||||
<<AbsorberMaterial->GetName()
|
||||
<<G4endl
|
||||
<<"the source is at the center of the detector"
|
||||
<<G4endl
|
||||
|
||||
G4cout << "-----------------------------------------------------------------------"
|
||||
<< G4endl
|
||||
<<"the detector is a box whose size is: "
|
||||
<<G4endl
|
||||
<<m_BoxDimX/cm
|
||||
<< " cm * "
|
||||
<<m_BoxDimY/cm
|
||||
<< " cm * "
|
||||
<<m_BoxDimZ/cm
|
||||
<< " cm"
|
||||
<< G4endl
|
||||
<<"numVoxel: "
|
||||
<<NumVoxelX
|
||||
<<G4endl
|
||||
<<"dim voxel: "
|
||||
<<dimVoxel/mm
|
||||
<<"mm"
|
||||
<<G4endl
|
||||
<<"material of the box : "
|
||||
<<AbsorberMaterial->GetName()
|
||||
<<G4endl
|
||||
<<"the source is at the center of the detector"
|
||||
<<G4endl
|
||||
|
||||
<<"-------------------------------------------------------------------------"
|
||||
<< G4endl;
|
||||
|
||||
<<"-------------------------------------------------------------------------"
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
|
||||
void BrachyDetectorConstruction::SetAbsorberMaterial(G4String materialChoice)
|
||||
|
||||
{
|
||||
// search the material by its name
|
||||
G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
|
||||
if (pttoMaterial)
|
||||
{AbsorberMaterial = pttoMaterial;
|
||||
PhantomLog->SetMaterial(pttoMaterial);
|
||||
PrintDetectorParameters();
|
||||
}
|
||||
else G4cout<<"that's not avaiable!"<<G4endl;
|
||||
// search the material by its name
|
||||
G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
|
||||
if (pttoMaterial)
|
||||
{AbsorberMaterial = pttoMaterial;
|
||||
PhantomLog->SetMaterial(pttoMaterial);
|
||||
PrintDetectorParameters();
|
||||
}
|
||||
else G4cout<<"that's not avaiable!"<<G4endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -433,12 +340,6 @@ void BrachyDetectorConstruction::SetAbsorberMaterial(G4String materialChoice)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by: S.Guatelli
|
||||
//
|
||||
/// ****************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstructionI.cc *
|
||||
// * *
|
||||
// ****************************************
|
||||
//
|
||||
// $Id: BrachyDetectorConstructionI.cc,v 1.2 2002/11/18 15:18:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyDetectorConstructionI.hh"
|
||||
#include "G4CSGSolid.hh"
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4MaterialPropertyVector.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4SubtractionSolid.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4PVParameterised.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4FieldManager.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4UnionSolid.hh"
|
||||
#include "BrachyMaterial.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
BrachyDetectorConstructionI::BrachyDetectorConstructionI():
|
||||
DefaultTub(0), DefaultTub_log(0),DefaultTub_Phys(0),
|
||||
Capsule(0),CapsuleLog(0),CapsulePhys(0),
|
||||
CapsuleTip(0),CapsuleTipLog(0),CapsuleTipPhys1(0),CapsuleTipPhys2(0),
|
||||
IodiumCore(0),ICoreLog(0),ICorePhys(0),
|
||||
Marker(0),MarkerLog(0),MarkerPhys(0)
|
||||
|
||||
{
|
||||
pMat= new BrachyMaterial() ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....
|
||||
|
||||
BrachyDetectorConstructionI::~BrachyDetectorConstructionI()
|
||||
{
|
||||
|
||||
delete pMat;
|
||||
}
|
||||
|
||||
//....
|
||||
void BrachyDetectorConstructionI::ConstructIodium(G4VPhysicalVolume* mother)
|
||||
{
|
||||
// Volumes
|
||||
|
||||
|
||||
G4Material* titanium=pMat->GetMat("titanium");
|
||||
G4Material* air =pMat->GetMat("Air");
|
||||
G4Material* Iodio=pMat->GetMat("Iodium");
|
||||
G4Material* Gold=pMat->GetMat("gold");
|
||||
|
||||
G4Colour white (1.0, 1.0, 1.0) ;
|
||||
G4Colour grey (0.5, 0.5, 0.5) ;
|
||||
G4Colour lgrey (.75, .75, .75) ;
|
||||
G4Colour red (1.0, 0.0, 0.0) ;
|
||||
G4Colour blue (0.0, 0.0, 1.0) ;
|
||||
G4Colour cyan (0.0, 1.0, 1.0) ;
|
||||
G4Colour magenta (1.0, 0.0, 1.0) ;
|
||||
G4Colour yellow (1.0, 1.0, 0.0) ;
|
||||
G4Colour lblue (0.0, 0.0, .75);
|
||||
|
||||
// Rotation Matrix
|
||||
G4RotationMatrix* rotateMatrix=new G4RotationMatrix(); //=new G4RotationMatrix() ;
|
||||
rotateMatrix->rotateX(180.0*deg);
|
||||
|
||||
DefaultTub=new G4Tubs("DefaultTub",
|
||||
0.*mm,
|
||||
0.40*mm,
|
||||
1.84*mm,
|
||||
0.*deg,
|
||||
360.*deg);
|
||||
DefaultTub_log = new G4LogicalVolume(DefaultTub,air,"DefaultTub_Log");
|
||||
DefaultTub_Phys = new G4PVPlacement(0,G4ThreeVector(),"DefaultTub_Phys",DefaultTub_log,
|
||||
mother,false,0);
|
||||
// Capsule main body
|
||||
G4double CapsuleR=0.35*mm;
|
||||
Capsule = new G4Tubs("Capsule",
|
||||
CapsuleR,//raggio interno
|
||||
0.40*mm,//raggio esterno
|
||||
1.84*mm,//meta' lunghezza
|
||||
0.*deg,//angolo di partenza
|
||||
360.*deg);//angolo di rotazione
|
||||
|
||||
CapsuleLog = new G4LogicalVolume(Capsule,titanium,"CapsuleLog");
|
||||
CapsulePhys = new G4PVPlacement
|
||||
(0,G4ThreeVector(),"CapsulePhys",CapsuleLog,
|
||||
DefaultTub_Phys,false,0);
|
||||
|
||||
// Capsule tip
|
||||
|
||||
CapsuleTip = new G4Sphere("CapsuleTip",0.*mm,0.40*mm,0.*deg,360.*deg,0.*deg,90.*deg);
|
||||
CapsuleTipLog = new G4LogicalVolume(CapsuleTip,titanium,"CapsuleTipLog");
|
||||
CapsuleTipPhys1 = new G4PVPlacement
|
||||
(0,G4ThreeVector(0.,0.,1.84*mm), "CapsuleTipPhys1",CapsuleTipLog,mother,false,0);
|
||||
|
||||
|
||||
CapsuleTipPhys2 = new G4PVPlacement(rotateMatrix, G4ThreeVector(0,0,-1.84*mm),"CapsuleTipPhys2",CapsuleTipLog,mother,false,0);
|
||||
|
||||
|
||||
IodiumCore = new G4Tubs("ICore",0.085*mm,0.35*mm,1.75*mm,0.*deg,360.*deg);
|
||||
|
||||
ICoreLog = new G4LogicalVolume(IodiumCore,Iodio,"IodiumCoreLog");
|
||||
ICorePhys = new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),
|
||||
"IodiumCorePhys",ICoreLog,DefaultTub_Phys,false,0);
|
||||
|
||||
Marker=new G4Tubs("GoldenMarker",0.*mm,0.085*mm,1.75*mm,
|
||||
0.*deg,360.*deg);
|
||||
MarkerLog = new G4LogicalVolume(Marker,Gold,"MarkerLog");
|
||||
MarkerPhys=new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),"MarkerPhys",MarkerLog,DefaultTub_Phys,false,0);
|
||||
|
||||
G4VisAttributes* simpleMarkerVisAtt= new G4VisAttributes(lblue);
|
||||
simpleMarkerVisAtt->SetVisibility(true);
|
||||
simpleMarkerVisAtt->SetForceSolid(true);
|
||||
|
||||
|
||||
|
||||
G4VisAttributes* simpleIodiumVisAtt= new G4VisAttributes(magenta);
|
||||
simpleIodiumVisAtt->SetVisibility(true);
|
||||
simpleIodiumVisAtt->SetForceWireframe(true);
|
||||
ICoreLog->SetVisAttributes(simpleIodiumVisAtt);
|
||||
|
||||
|
||||
|
||||
G4VisAttributes* simpleCapsuleVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleVisAtt->SetVisibility(true);
|
||||
simpleCapsuleVisAtt->SetForceWireframe(true);
|
||||
CapsuleLog->SetVisAttributes( simpleCapsuleVisAtt);
|
||||
|
||||
G4VisAttributes* simpleCapsuleTipVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleTipVisAtt->SetVisibility(true);
|
||||
simpleCapsuleTipVisAtt->SetForceSolid(true);
|
||||
CapsuleTipLog->SetVisAttributes( simpleCapsuleTipVisAtt);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
// ****************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstructionIr.cc *
|
||||
// * *
|
||||
// ****************************************
|
||||
//
|
||||
// $Id: BrachyDetectorConstructionIr.cc,v 1.3 2002/12/12 19:16:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyDetectorConstructionIr.hh"
|
||||
#include "G4CSGSolid.hh"
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4MaterialPropertyVector.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4SubtractionSolid.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4PVParameterised.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4FieldManager.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4UnionSolid.hh"
|
||||
#include "BrachyMaterial.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
BrachyDetectorConstructionIr::BrachyDetectorConstructionIr():
|
||||
Capsule(0),CapsuleLog(0),CapsulePhys(0),
|
||||
CapsuleTip(0),CapsuleTipLog(0),CapsuleTipPhys(0),
|
||||
IridiumCore(0),IridiumCoreLog(0),IridiumCorePhys(0)
|
||||
|
||||
{
|
||||
pMat= new BrachyMaterial() ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....
|
||||
|
||||
BrachyDetectorConstructionIr::~BrachyDetectorConstructionIr()
|
||||
{
|
||||
|
||||
delete pMat;
|
||||
}
|
||||
|
||||
//....
|
||||
void BrachyDetectorConstructionIr::ConstructIridium(G4VPhysicalVolume* mother)
|
||||
{
|
||||
|
||||
G4Colour white (1.0, 1.0, 1.0) ;
|
||||
G4Colour grey (0.5, 0.5, 0.5) ;
|
||||
G4Colour lgrey (.75, .75, .75) ;
|
||||
G4Colour red (1.0, 0.0, 0.0) ;
|
||||
G4Colour blue (0.0, 0.0, 1.0) ;
|
||||
G4Colour cyan (0.0, 1.0, 1.0) ;
|
||||
G4Colour magenta (1.0, 0.0, 1.0) ;
|
||||
G4Colour yellow (1.0, 1.0, 0.0) ;
|
||||
G4Colour lblue (0.0, 0.0, .75);
|
||||
|
||||
G4Material* CapsuleMat=pMat->GetMat("Stainless steel");
|
||||
G4Material*IridiumMat=pMat->GetMat("Iridium");
|
||||
|
||||
// Capsule main body
|
||||
|
||||
|
||||
G4Tubs* Capsule = new G4Tubs("Capsule",0,0.55*mm,3.725*mm,0.*deg,360.*deg);
|
||||
G4LogicalVolume* CapsuleLog = new G4LogicalVolume(Capsule,CapsuleMat,"CapsuleLog");
|
||||
G4VPhysicalVolume* CapsulePhys = new G4PVPlacement
|
||||
(0,G4ThreeVector(0,0,-1.975),"CapsulePhys",CapsuleLog,mother,false,0);
|
||||
|
||||
// Capsule tip
|
||||
|
||||
G4Sphere* CapsuleTip = new G4Sphere("CapsuleTipIridium",0.*mm,0.55*mm,0.*deg,360.*deg,0.*deg,90.*deg);
|
||||
|
||||
G4LogicalVolume* CapsuleTipLog = new G4LogicalVolume(CapsuleTip,CapsuleMat,"CapsuleTipIridumLog");
|
||||
G4VPhysicalVolume* CapsuleTipPhys = new G4PVPlacement(0,G4ThreeVector(0.,0.,1.75*mm),"CapsuleTipIridiumPhys",CapsuleTipLog,mother,false,0);
|
||||
|
||||
// Iridium core
|
||||
|
||||
G4Tubs* IridiumCore = new G4Tubs("IrCore",0,0.30*mm,1.75*mm,0.*deg,360.*deg);
|
||||
G4LogicalVolume* IridiumCoreLog = new G4LogicalVolume(IridiumCore,IridiumMat,"IridiumCoreLog");
|
||||
G4VPhysicalVolume* IridiumCorePhys = new G4PVPlacement(0,G4ThreeVector(),"IridiumCorePhys",IridiumCoreLog,CapsulePhys,false,0);
|
||||
|
||||
simpleIridiumVisAtt= new G4VisAttributes(magenta);
|
||||
simpleIridiumVisAtt->SetVisibility(true);
|
||||
simpleIridiumVisAtt->SetForceWireframe(true);
|
||||
IridiumCoreLog->SetVisAttributes(simpleIridiumVisAtt);
|
||||
|
||||
simpleCapsuleVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleVisAtt->SetVisibility(true);
|
||||
simpleCapsuleVisAtt->SetForceWireframe(true);
|
||||
CapsuleLog->SetVisAttributes( simpleCapsuleVisAtt);
|
||||
|
||||
simpleCapsuleTipVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleTipVisAtt->SetVisibility(true);
|
||||
simpleCapsuleTipVisAtt->SetForceSolid(true);
|
||||
CapsuleTipLog->SetVisAttributes( simpleCapsuleTipVisAtt);
|
||||
}
|
||||
|
||||
void BrachyDetectorConstructionIr::CleanIridium()
|
||||
{
|
||||
G4VPhysicalVolume* toDieCapsule = CapsulePhys;
|
||||
G4VPhysicalVolume* toDieTip =CapsuleTipPhys;
|
||||
G4VPhysicalVolume* toDieCore = IridiumCorePhys;
|
||||
|
||||
|
||||
|
||||
if ( toDieTip != 0 ){delete toDieTip;}
|
||||
if ( toDieCore !=0){delete toDieCore;}
|
||||
if(toDieCapsule !=0){delete toDieCapsule;}
|
||||
|
||||
if(CapsuleTipLog !=0)
|
||||
{G4VSolid* solToDieTip =CapsuleTipLog->GetSolid();
|
||||
if (solToDieTip !=0)
|
||||
{delete solToDieTip;}
|
||||
delete CapsuleTipLog;
|
||||
CapsuleTipLog=0; }
|
||||
|
||||
if( CapsuleLog !=0)
|
||||
{G4VSolid* solToDieCapsule =CapsuleLog->GetSolid();
|
||||
if (solToDieCapsule !=0)
|
||||
{delete solToDieCapsule;}
|
||||
delete CapsuleLog;
|
||||
CapsuleLog=0;}
|
||||
|
||||
if (IridiumCoreLog !=0)
|
||||
{G4VSolid* solToDieCore =IridiumCoreLog->GetSolid();
|
||||
if (solToDieCore !=0)
|
||||
{delete solToDieCore;}
|
||||
delete IridiumCoreLog;
|
||||
IridiumCoreLog=0 ;}
|
||||
|
||||
if( simpleIridiumVisAtt !=0){delete simpleIridiumVisAtt;}
|
||||
if (simpleCapsuleVisAtt !=0){ delete simpleCapsuleVisAtt;}
|
||||
if (simpleCapsuleTipVisAtt !=0) {delete simpleCapsuleTipVisAtt;}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
// *******************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstructionLeipzig.cc *
|
||||
// * *
|
||||
// *******************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorConstructionLeipzig.cc,v 1.3 2002/12/12 19:16:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyDetectorConstructionLeipzig.hh"
|
||||
#include "G4CSGSolid.hh"
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4MaterialPropertyVector.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4SubtractionSolid.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4PVParameterised.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4FieldManager.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4UnionSolid.hh"
|
||||
#include "BrachyMaterial.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
BrachyDetectorConstructionLeipzig::BrachyDetectorConstructionLeipzig():
|
||||
Capsule(0),CapsuleLog(0),CapsulePhys(0),
|
||||
CapsuleTip(0),CapsuleTipLog(0),CapsuleTipPhys(0),
|
||||
IridiumCore(0),IridiumCoreLog(0),IridiumCorePhys(0),
|
||||
Appl1(0),Appl1Log(0),Appl1Phys(0),
|
||||
Appl2(0),Appl2Log(0),Appl2Phys(0)
|
||||
|
||||
{
|
||||
pMat= new BrachyMaterial() ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....
|
||||
|
||||
BrachyDetectorConstructionLeipzig::~BrachyDetectorConstructionLeipzig()
|
||||
{
|
||||
|
||||
delete pMat;
|
||||
}
|
||||
void BrachyDetectorConstructionLeipzig::ConstructLeipzig(G4VPhysicalVolume* WaterBoxPhys)
|
||||
{
|
||||
|
||||
G4Colour white (1.0, 1.0, 1.0) ;
|
||||
G4Colour grey (0.5, 0.5, 0.5) ;
|
||||
G4Colour lgrey (.75, .75, .75) ;
|
||||
G4Colour red (1.0, 0.0, 0.0) ;
|
||||
G4Colour blue (0.0, 0.0, 1.0) ;
|
||||
G4Colour cyan (0.0, 1.0, 1.0) ;
|
||||
G4Colour magenta (1.0, 0.0, 1.0) ;
|
||||
G4Colour yellow (1.0, 1.0, 0.0) ;
|
||||
G4Colour lblue (0.0, 0.0, .75);
|
||||
|
||||
G4Material* CapsuleMat=pMat->GetMat("Stainless steel");
|
||||
G4Material*IridiumMat=pMat->GetMat("Iridium");
|
||||
G4Material* matTung=pMat->GetMat("Tungsten");
|
||||
|
||||
Capsule = new G4Tubs("Capsule",0,0.55*mm,3.725*mm,0.*deg,360.*deg);
|
||||
CapsuleLog = new G4LogicalVolume(Capsule,CapsuleMat,"CapsuleLog");
|
||||
CapsulePhys = new G4PVPlacement(0,G4ThreeVector(0,0,-1.975*mm),"CapsulePhys",
|
||||
CapsuleLog,WaterBoxPhys,false,0);
|
||||
|
||||
// Capsule tip
|
||||
|
||||
CapsuleTip = new G4Sphere("CapsuleTip",
|
||||
0.*mm,0.55*mm,0.*deg,360.*deg,0.*deg,90.*deg);
|
||||
CapsuleTipLog = new G4LogicalVolume(CapsuleTip,CapsuleMat,"CapsuleTipLog");
|
||||
CapsuleTipPhys = new G4PVPlacement(0,G4ThreeVector(0.,0.,1.75*mm),"CapsuleTipPhys",
|
||||
CapsuleTipLog,WaterBoxPhys,false,0);
|
||||
|
||||
// Iridium core
|
||||
|
||||
IridiumCore = new G4Tubs("IrCore",0,0.30*mm,1.75*mm,0.*deg,360.*deg);
|
||||
IridiumCoreLog = new G4LogicalVolume(IridiumCore,IridiumMat,"IridiumCoreLog");
|
||||
IridiumCorePhys = new G4PVPlacement(0,G4ThreeVector(0.,0.,1.975*mm),"IridiumCorePhys",
|
||||
IridiumCoreLog,CapsulePhys,false,0);
|
||||
// Applicator
|
||||
|
||||
Appl1 = new G4Tubs("Appl1",5*mm,10.5*mm,12*mm,0.*deg,360.*deg);
|
||||
Appl1Log = new G4LogicalVolume(Appl1,matTung,"Appl1");
|
||||
Appl1Phys = new G4PVPlacement (0,G4ThreeVector(0,0,4.0*mm),"Appl1Phys", Appl1Log,
|
||||
WaterBoxPhys,false,0);
|
||||
|
||||
Appl2 = new G4Tubs("Appl2",0.55*mm,5.*mm,3.125*mm,0.*deg,360.*deg);
|
||||
Appl2Log = new G4LogicalVolume(Appl2,matTung,"Appl2");
|
||||
Appl2Phys = new G4PVPlacement(0,G4ThreeVector(0,0,-4.875*mm),"Appl2Phys",Appl2Log,
|
||||
WaterBoxPhys,false,0);
|
||||
|
||||
|
||||
simpleCapsuleVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleVisAtt->SetVisibility(true);
|
||||
simpleCapsuleVisAtt->SetForceSolid(true);
|
||||
CapsuleLog->SetVisAttributes(simpleCapsuleVisAtt);
|
||||
|
||||
|
||||
//CapsuleTipLog->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
simpleCapsuleTipVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleTipVisAtt->SetVisibility(true);
|
||||
simpleCapsuleTipVisAtt->SetForceSolid(true);
|
||||
CapsuleTipLog->SetVisAttributes(simpleCapsuleTipVisAtt);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,18 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorMessenger.cc,v 1.2 2002/06/18 22:30:31 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// *********************************
|
||||
// * *
|
||||
// * BrachyDetectorMessenger.cc *
|
||||
// * *
|
||||
// *********************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorMessenger.cc,v 1.5 2002/12/06 16:32:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -30,7 +40,8 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "BrachyDetectorMessenger.hh"
|
||||
|
||||
#include "BrachyFactoryIr.hh"
|
||||
#include "BrachyRunAction.hh"
|
||||
#include "BrachyDetectorConstruction.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
@@ -40,8 +51,8 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
BrachyDetectorMessenger::BrachyDetectorMessenger( BrachyDetectorConstruction* Det)
|
||||
:Detector(Det)
|
||||
BrachyDetectorMessenger::BrachyDetectorMessenger( BrachyDetectorConstruction* Det):
|
||||
Detector(Det)
|
||||
{
|
||||
detDir = new G4UIdirectory("/detector/");
|
||||
detDir->SetGuidance(" detector control.");
|
||||
@@ -49,9 +60,32 @@ BrachyDetectorMessenger::BrachyDetectorMessenger( BrachyDetectorConstruction* De
|
||||
AbsMaterCmd = new G4UIcmdWithAString("/detector/setMaterial",this);
|
||||
AbsMaterCmd->SetGuidance("Select Material of the detector.");
|
||||
AbsMaterCmd->SetParameterName("choice",false);
|
||||
AbsMaterCmd->AvailableForStates(Idle);
|
||||
|
||||
}
|
||||
AbsMaterCmd->AvailableForStates(G4State_Idle);
|
||||
selDetCmd = new G4UIcmdWithAString("/geom/select",this);
|
||||
|
||||
mydetDir = new G4UIdirectory("/geom/");
|
||||
mydetDir->SetGuidance("Geometry setup commands.");
|
||||
|
||||
selDetCmd->SetGuidance("Select the way detector geometry is built.");
|
||||
selDetCmd->SetGuidance(" Iodium: Iodium Source ");
|
||||
selDetCmd->SetGuidance(" Iridium: Iridium Source " );
|
||||
selDetCmd->SetGuidance(" Leipzig: Leipzig Source " );
|
||||
selDetCmd->SetParameterName("choice",true);
|
||||
selDetCmd->SetDefaultValue("Iridium");
|
||||
selDetCmd->SetCandidates("Iridium / Iodium / Leipzig");
|
||||
selDetCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
switchCmd = new G4UIcmdWithAString("/geom/switch",this);
|
||||
switchCmd->SetGuidance("Assign the selected geometry to G4RunManager.");
|
||||
switchCmd->SetGuidance("In case the choice is present to this command,");
|
||||
switchCmd->SetGuidance("\"/geom/select\" will be invoked and then switched.");
|
||||
switchCmd->SetParameterName("choice",true);
|
||||
switchCmd->SetDefaultValue(" ");
|
||||
switchCmd->SetCandidates("Iridium Iodium Leipzig ");
|
||||
switchCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -59,7 +93,7 @@ BrachyDetectorMessenger::~BrachyDetectorMessenger()
|
||||
{
|
||||
|
||||
delete AbsMaterCmd;
|
||||
delete UpdateCmd;
|
||||
delete mydetDir;
|
||||
delete detDir;
|
||||
}
|
||||
|
||||
@@ -68,11 +102,20 @@ BrachyDetectorMessenger::~BrachyDetectorMessenger()
|
||||
void BrachyDetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
if( command == AbsMaterCmd )
|
||||
{ Detector->SetAbsorberMaterial(newValue);}
|
||||
|
||||
|
||||
{ Detector->SetAbsorberMaterial(newValue);}
|
||||
|
||||
|
||||
if( command == selDetCmd )
|
||||
{
|
||||
Detector->SelectDetector(newValue);
|
||||
}
|
||||
if( command == switchCmd )
|
||||
{
|
||||
if(newValue=="Iodium" || newValue=="Iridium"|| newValue=="Leipzig")
|
||||
{
|
||||
Detector->SelectDetector(newValue);
|
||||
Detector->SwitchDetector();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -20,12 +20,19 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyEventAction.cc *
|
||||
// * BrachyEventAction.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
|
||||
//
|
||||
// $Id: BrachyEventAction.cc,v 1.13 2002/11/27 11:11:22 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPrimaryGeneratorActionI.hh"
|
||||
#include "BrachyEventAction.hh"
|
||||
#include "BrachyPhantomHit.hh"
|
||||
#include "BrachyPhantomSD.hh"
|
||||
@@ -41,22 +48,30 @@
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include"BrachyAnalysisManager.hh"
|
||||
#endif
|
||||
|
||||
#include "BrachyPrimaryGeneratorActionIr.hh"
|
||||
//....
|
||||
|
||||
BrachyEventAction::BrachyEventAction(G4String &SDName) :
|
||||
drawFlag("all" ),printModulo(1)
|
||||
{
|
||||
|
||||
m_HitsCollectionID = -1;
|
||||
|
||||
SDname=SDName;
|
||||
pDetector=new BrachyDetectorConstruction(SDname);
|
||||
|
||||
m_NumVoxelX=pDetector-> GetNumVoxelX();
|
||||
m_NumVoxelZ=pDetector->GetNumVoxelZ();
|
||||
VoxelWidth_Z= pDetector -> VoxelWidth_Z() ;
|
||||
VoxelWidth_X=pDetector->VoxelWidth_X();
|
||||
SDname=SDName;
|
||||
|
||||
|
||||
pDetector=new BrachyDetectorConstruction(SDname);
|
||||
|
||||
|
||||
m_NumVoxelX=pDetector-> GetNumVoxelX();
|
||||
m_NumVoxelZ=pDetector->GetNumVoxelZ();
|
||||
VoxelWidth_Z= 0.1*cm ;
|
||||
VoxelWidth_X=0.1*cm;
|
||||
|
||||
}
|
||||
|
||||
@@ -64,7 +79,7 @@ BrachyEventAction::BrachyEventAction(G4String &SDName) :
|
||||
|
||||
BrachyEventAction::~BrachyEventAction()
|
||||
{
|
||||
delete pDetector;
|
||||
delete pDetector;
|
||||
|
||||
}
|
||||
|
||||
@@ -73,80 +88,82 @@ BrachyEventAction::~BrachyEventAction()
|
||||
void BrachyEventAction::BeginOfEventAction(const G4Event* aEvent)
|
||||
{
|
||||
|
||||
G4SDManager* pSDManager = G4SDManager::GetSDMpointer();
|
||||
if(m_HitsCollectionID == -1)
|
||||
m_HitsCollectionID = pSDManager->GetCollectionID("PhantomHitsCollection");
|
||||
|
||||
G4SDManager* pSDManager = G4SDManager::GetSDMpointer();
|
||||
if(m_HitsCollectionID == -1)
|
||||
m_HitsCollectionID = pSDManager->GetCollectionID("PhantomHitsCollection");
|
||||
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
void BrachyEventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
|
||||
|
||||
G4int evno = fpEventManager->GetConstCurrentEvent()->GetEventID() ;
|
||||
|
||||
if((evno==100)||(evno==500)||(evno==1000)||(evno==2500)
|
||||
||(evno==5000)||(evno==7000)||(evno==9000)||
|
||||
(evno==9500)||(evno==29000000)||(evno==29500000))
|
||||
G4cout << evno << G4endl;
|
||||
|
||||
if(m_HitsCollectionID < 0)
|
||||
return;
|
||||
if(m_HitsCollectionID < 0)
|
||||
return;
|
||||
|
||||
G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
|
||||
BrachyPhantomHitsCollection* CHC = NULL;
|
||||
G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
|
||||
BrachyPhantomHitsCollection* CHC = NULL;
|
||||
|
||||
if(HCE)
|
||||
CHC = (BrachyPhantomHitsCollection*)(HCE->GetHC(m_HitsCollectionID));
|
||||
if(HCE)
|
||||
CHC = (BrachyPhantomHitsCollection*)(HCE->GetHC(m_HitsCollectionID));
|
||||
|
||||
if(CHC)
|
||||
{
|
||||
if(CHC)
|
||||
{
|
||||
|
||||
|
||||
G4int HitCount = CHC->entries();
|
||||
G4int HitCount = CHC->entries();
|
||||
|
||||
for (G4int h=0; h<HitCount; h++)
|
||||
{
|
||||
for (G4int h=0; h<HitCount; h++)
|
||||
{
|
||||
|
||||
|
||||
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
|
||||
i=((*CHC)[h])->GetZID();
|
||||
k=((*CHC)[h])->GetXID();
|
||||
|
||||
j=i+k*m_NumVoxelX;
|
||||
#ifdef G4ANALYSIS_USE
|
||||
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
#endif
|
||||
i=((*CHC)[h])->GetZID();
|
||||
k=((*CHC)[h])->GetXID();
|
||||
j=((*CHC)[h])->GetYID();
|
||||
|
||||
|
||||
EnergyDep=(*CHC)[h]->GetEdep();
|
||||
EnergyDep=((*CHC)[h]->GetEdep())/keV;
|
||||
|
||||
x = (-m_NumVoxelZ+1+2*k)*VoxelWidth_X/2;
|
||||
z = (- m_NumVoxelZ+1+2*i)*VoxelWidth_Z/2;
|
||||
|
||||
if(EnergyDep!=0){
|
||||
{ if( abs(x)>0.56*mm && abs(z)>3.8*mm)
|
||||
analysis->hist(x,z,EnergyDep); analysis->analyse(x,z,EnergyDep);}}}
|
||||
|
||||
}
|
||||
|
||||
// extract the trajectories and draw them
|
||||
x = (-m_NumVoxelZ+1+2*k)*VoxelWidth_X/2;
|
||||
z = (- m_NumVoxelZ+1+2*i)*VoxelWidth_Z/2;
|
||||
y=(- m_NumVoxelZ+1+2*j)*VoxelWidth_Z/2;
|
||||
#ifdef G4ANALYSIS_USE
|
||||
if(EnergyDep!=0)
|
||||
|
||||
{
|
||||
|
||||
if (y<1.*mm){if (y> -1.*mm)
|
||||
{analysis->hist(x,z,EnergyDep);}}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(EnergyDep!=0)analysis->fill_Tuple(x,y,z,EnergyDep);
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
// extract the trajectories and draw them
|
||||
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
{
|
||||
G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();
|
||||
G4int n_trajectories = 0;
|
||||
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
|
||||
G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();
|
||||
G4int n_trajectories = 0;
|
||||
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
|
||||
|
||||
for (G4int i=0; i<n_trajectories; i++)
|
||||
for (G4int i=0; i<n_trajectories; i++)
|
||||
{ G4Trajectory* trj = (G4Trajectory*)((*(evt->
|
||||
GetTrajectoryContainer()))[i]);
|
||||
|
||||
|
||||
if (drawFlag == "all") trj->DrawTrajectory(50);
|
||||
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
|
||||
trj->DrawTrajectory(50);
|
||||
else if ((drawFlag == "neutral")&&(trj->GetCharge() == 0.))
|
||||
trj->DrawTrajectory(50);
|
||||
if (drawFlag == "all") trj->DrawTrajectory(50);
|
||||
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
|
||||
trj->DrawTrajectory(50);
|
||||
else if ((drawFlag == "neutral")&&(trj->GetCharge() == 0.))
|
||||
trj->DrawTrajectory(50);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+27
-35
@@ -19,44 +19,36 @@
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: PersEx02TrackerHit.cc,v 1.4 2001/07/11 09:58:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
|
||||
#include "PersEx02TrackerHit.hh"
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyFactory.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyFactory.cc,v 1.3 2002/12/12 19:16:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include"BrachyFactory.hh"
|
||||
|
||||
PersEx02TrackerHit::PersEx02TrackerHit()
|
||||
|
||||
|
||||
BrachyFactory::BrachyFactory()
|
||||
{ ;}
|
||||
BrachyFactory::~BrachyFactory()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
G4VUserPrimaryGeneratorAction* BrachyFactory::CreatePrimaryGeneratorAction()
|
||||
{;}
|
||||
|
||||
PersEx02TrackerHit::~PersEx02TrackerHit()
|
||||
void BrachyFactory::CreateSource(G4VPhysicalVolume* mother)
|
||||
{;}
|
||||
void BrachyFactory::CleanSource()
|
||||
{;}
|
||||
|
||||
PersEx02TrackerHit::PersEx02TrackerHit(const PersEx02TrackerHit &right)
|
||||
{
|
||||
edep = right.edep;
|
||||
pos = right.pos;
|
||||
}
|
||||
|
||||
const PersEx02TrackerHit& PersEx02TrackerHit::operator=(const PersEx02TrackerHit &right)
|
||||
{
|
||||
edep = right.edep;
|
||||
pos = right.pos;
|
||||
return *this;
|
||||
}
|
||||
|
||||
int PersEx02TrackerHit::operator==(const PersEx02TrackerHit &right) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void PersEx02TrackerHit::Draw()
|
||||
{
|
||||
}
|
||||
|
||||
void PersEx02TrackerHit::Print()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyFactoryI.cc
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyFactoryI.cc,v 1.2 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyFactoryI.hh"
|
||||
#include"BrachyPrimaryGeneratorActionI.hh"
|
||||
#include"BrachyDetectorConstructionI.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "globals.hh"
|
||||
#include <math.h>
|
||||
#include "G4RunManager.hh"
|
||||
|
||||
BrachyFactoryI:: BrachyFactoryI()
|
||||
{
|
||||
pIodio=new BrachyDetectorConstructionI();
|
||||
}
|
||||
|
||||
BrachyFactoryI:: ~BrachyFactoryI()
|
||||
{
|
||||
|
||||
delete pIodio;
|
||||
}
|
||||
|
||||
|
||||
G4VUserPrimaryGeneratorAction* BrachyFactoryI::CreatePrimaryGeneratorAction()
|
||||
|
||||
{
|
||||
|
||||
|
||||
G4VUserPrimaryGeneratorAction* pIodium =new BrachyPrimaryGeneratorActionI();
|
||||
if(pIodium) return pIodium ;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void BrachyFactoryI::CreateSource(G4VPhysicalVolume* mother)
|
||||
{
|
||||
|
||||
pIodio -> ConstructIodium(mother);
|
||||
|
||||
}
|
||||
|
||||
void BrachyFactoryI::CleanSource()
|
||||
{;}
|
||||
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyFactoryIr *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyFactoryIr.cc,v 1.2 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyFactoryIr.hh"
|
||||
#include"BrachyPrimaryGeneratorActionIr.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "globals.hh"
|
||||
#include <math.h>
|
||||
#include "G4RunManager.hh"
|
||||
#include"BrachyDetectorMessenger.hh"
|
||||
#include"BrachyDetectorConstructionIr.hh"
|
||||
BrachyFactoryIr:: BrachyFactoryIr()
|
||||
{
|
||||
pIridio=new BrachyDetectorConstructionIr();
|
||||
|
||||
}
|
||||
|
||||
BrachyFactoryIr:: ~BrachyFactoryIr()
|
||||
{
|
||||
delete pIridio;
|
||||
|
||||
}
|
||||
|
||||
|
||||
G4VUserPrimaryGeneratorAction* BrachyFactoryIr::CreatePrimaryGeneratorAction()
|
||||
|
||||
{
|
||||
|
||||
|
||||
G4VUserPrimaryGeneratorAction* pIridium =new BrachyPrimaryGeneratorActionIr();
|
||||
if(pIridium) return pIridium ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void BrachyFactoryIr::CreateSource(G4VPhysicalVolume* mother)
|
||||
{
|
||||
|
||||
pIridio -> ConstructIridium(mother);
|
||||
|
||||
}
|
||||
void BrachyFactoryIr::CleanSource()
|
||||
{
|
||||
|
||||
pIridio -> CleanIridium();
|
||||
|
||||
}
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyFactoryLeipzig.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyFactoryLeipzig.cc,v 1.2 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
|
||||
#include "BrachyFactoryLeipzig.hh"
|
||||
#include"BrachyPrimaryGeneratorActionIr.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "globals.hh"
|
||||
#include <math.h>
|
||||
#include "G4RunManager.hh"
|
||||
#include"BrachyDetectorMessenger.hh"
|
||||
#include"BrachyDetectorConstructionLeipzig.hh"
|
||||
BrachyFactoryLeipzig:: BrachyFactoryLeipzig()
|
||||
{
|
||||
pLeipzig=new BrachyDetectorConstructionLeipzig();
|
||||
|
||||
}
|
||||
|
||||
BrachyFactoryLeipzig:: ~BrachyFactoryLeipzig()
|
||||
{
|
||||
delete pLeipzig;
|
||||
|
||||
}
|
||||
|
||||
|
||||
G4VUserPrimaryGeneratorAction* BrachyFactoryLeipzig::CreatePrimaryGeneratorAction()
|
||||
|
||||
{
|
||||
|
||||
|
||||
G4VUserPrimaryGeneratorAction* pIridium =new BrachyPrimaryGeneratorActionIr();
|
||||
if(pIridium) return pIridium ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void BrachyFactoryLeipzig::CreateSource(G4VPhysicalVolume* mother)
|
||||
{
|
||||
|
||||
pLeipzig -> ConstructLeipzig(mother);
|
||||
|
||||
}
|
||||
void BrachyFactoryLeipzig::CleanSource()
|
||||
{
|
||||
|
||||
;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,262 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyMaterial.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyMaterial.cc,v 1.2 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#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 "BrachyMaterial.hh"
|
||||
|
||||
BrachyMaterial::BrachyMaterial()
|
||||
{;}
|
||||
|
||||
BrachyMaterial::~BrachyMaterial()
|
||||
{;}
|
||||
void BrachyMaterial::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 = 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=22.99*g/mole;
|
||||
G4Element* elNa=new G4Element("Sodium","Na",Z=11.,A);
|
||||
|
||||
A=24.305*g/mole;
|
||||
G4Element* elMg=new G4Element("Magnesium","Mg",Z=12.,A);
|
||||
|
||||
A=30.974*g/mole;
|
||||
G4Element* elP=new G4Element("Phosphorus","P",Z=15.,A);
|
||||
|
||||
A=32.06*g/mole;
|
||||
G4Element* elS=new G4Element("Sulfur","S",Z=16.,A);
|
||||
|
||||
A=35.453*g/mole;
|
||||
G4Element* elCl=new G4Element("Chlorine","Cl",Z=17.,A);
|
||||
|
||||
|
||||
A=39.098*g/mole;
|
||||
G4Element* elK=new G4Element("Potassium","K",Z=19.,A);
|
||||
|
||||
A=40.08*g/mole;
|
||||
G4Element* elCa=new G4Element("Calcium","Ca",Z=20.,A);
|
||||
|
||||
|
||||
|
||||
// Elements for source capsule and cable
|
||||
|
||||
|
||||
|
||||
|
||||
A=65.38*g/mole;
|
||||
G4Element* elZn=new G4Element("Zinc","Zn",Z=30.,A);
|
||||
|
||||
|
||||
|
||||
A = 54.94*g/mole;
|
||||
G4Element* elMn = new G4Element("Manganese","Mn",Z=25.,A);
|
||||
|
||||
A = 28.09*g/mole;
|
||||
G4Element* elSi = new G4Element("Silicon","Si",Z=14.,A);
|
||||
|
||||
A = 52.00*g/mole;
|
||||
G4Element* elCr = new G4Element("Chromium","Cr",Z=24.,A);
|
||||
|
||||
A = 58.70*g/mole;
|
||||
G4Element* elNi = new G4Element("Nickel","Ni",Z=28.,A);
|
||||
|
||||
A = 55.85*g/mole;
|
||||
G4Element* elFe = new G4Element("Iron","Fe",Z=26.,A);
|
||||
|
||||
// Material for Leipzig applicator and cup
|
||||
|
||||
// Tungsten
|
||||
|
||||
|
||||
A= 183.84* g/mole;
|
||||
d=19.3*g/cm3;
|
||||
G4Material* matW = new G4Material("Tungsten",Z=74.,A,d);
|
||||
|
||||
|
||||
// Perspex, plexiglass, lucite
|
||||
d= 1.19*g/cm3;
|
||||
|
||||
G4Material* matplexiglass = new G4Material("Plexiglass",d,3);
|
||||
matplexiglass->AddElement(elH,0.08);
|
||||
matplexiglass->AddElement(elC,0.60);
|
||||
matplexiglass->AddElement(elO,0.32);
|
||||
|
||||
// Lead material
|
||||
A = 207.19*g/mole;
|
||||
Z = 82;
|
||||
d = 11.35*g/cm3;
|
||||
G4Material* matPb = new G4Material("Lead",Z,A,d);
|
||||
|
||||
// Iridium (Medical Physics, Vol 25, No 10, Oct 1998)
|
||||
d = 22.42*g/cm3;
|
||||
A = 191.96260*g/mole ;
|
||||
Z = 77;
|
||||
G4Material* matir192 = new G4Material("Iridium",Z,A,d);
|
||||
|
||||
//titanium
|
||||
A=47.88*g/mole;
|
||||
d=4.50*g/cm3;
|
||||
G4Material* Titanium=new G4Material("titanium" ,Z=22.,A,d);
|
||||
|
||||
// Air material
|
||||
d = 1.290*mg/cm3;
|
||||
G4Material* matAir = new G4Material("Air",d,2);
|
||||
matAir->AddElement(elN,0.7);
|
||||
matAir->AddElement(elO,0.3);
|
||||
|
||||
|
||||
// Water
|
||||
d = 1.000*g/cm3;
|
||||
G4Material* matH2O = new G4Material("Water",d,2);
|
||||
matH2O->AddElement(elH,2);
|
||||
matH2O->AddElement(elO,1);
|
||||
|
||||
//soft tissue(NIST data)
|
||||
|
||||
d=1.0*g/cm3;
|
||||
G4Material* soft=new G4Material("tissue",d,13);
|
||||
soft->AddElement(elH,0.104472);
|
||||
soft->AddElement(elC,0.23219);
|
||||
soft->AddElement(elN,0.02488);
|
||||
soft->AddElement(elO,0.630238);
|
||||
soft->AddElement(elNa,0.00113);
|
||||
soft->AddElement(elMg,0.00013);
|
||||
soft->AddElement(elP,0.00133);
|
||||
soft->AddElement(elS,0.00199);
|
||||
soft->AddElement(elCl,0.00134);
|
||||
soft->AddElement(elK,0.00199);
|
||||
soft->AddElement(elCa,0.00023);
|
||||
soft->AddElement(elFe,0.00005);
|
||||
soft->AddElement(elZn,0.00003);
|
||||
|
||||
|
||||
|
||||
// Stainless steel (Medical Physics, Vol 25, No 10, Oct 1998)
|
||||
d = 8.02*g/cm3 ;
|
||||
G4Material* matsteel = new G4Material("Stainless steel",d,5);
|
||||
matsteel->AddElement(elMn, 0.02);
|
||||
matsteel->AddElement(elSi, 0.01);
|
||||
matsteel->AddElement(elCr, 0.19);
|
||||
matsteel->AddElement(elNi, 0.10);
|
||||
matsteel->AddElement(elFe, 0.68);
|
||||
|
||||
|
||||
//gold(chimica degli elementi N.N Greenwood,A.Earnshaw)
|
||||
A=196.97*g/mole;
|
||||
d=19.32*g/cm3;
|
||||
G4Material* gold=new G4Material("gold",Z=79.,A,d);
|
||||
|
||||
|
||||
|
||||
//IodiumCore(chimica degli elementi N.N Greenwood,A.Earnshaw)
|
||||
A=124.9*g/mole;
|
||||
d=4.862*g/cm3;
|
||||
G4Material* matI=new G4Material("Iodium",Z=53.,A,d);
|
||||
|
||||
//ceramica(Medical Physics, May 2000)
|
||||
|
||||
d=2.88*g/cm3;
|
||||
G4Material* ceramica=new G4Material("allumina",d,2);
|
||||
ceramica->AddElement(elAl,2);
|
||||
ceramica->AddElement(elO,3);
|
||||
|
||||
G4double density = universe_mean_density;
|
||||
G4double pressure = 3.e-18*pascal;
|
||||
G4double temperature = 2.73*kelvin;
|
||||
A=1.01*g/mole;
|
||||
G4Material*Vacuum = new G4Material("Galactic", Z=1., A,
|
||||
density,kStateGas,temperature,pressure);
|
||||
|
||||
|
||||
//compact bone
|
||||
|
||||
d=1.85*g/cm3;
|
||||
G4Material* bone=new G4Material("bone",d,8);
|
||||
bone->AddElement(elH,0.063984);
|
||||
bone->AddElement(elC,0.278);
|
||||
bone->AddElement(elN,0.027);
|
||||
bone->AddElement(elO,0.410016);
|
||||
bone->AddElement(elMg,0.002);
|
||||
bone->AddElement(elP,0.07);
|
||||
bone->AddElement(elS,0.002);
|
||||
bone->AddElement(elCa,0.147);
|
||||
|
||||
G4Material* muscle=new G4Material("muscle",d,9);
|
||||
muscle->AddElement(elH,0.101997);
|
||||
muscle->AddElement(elC,0.123);
|
||||
muscle->AddElement(elN,0.035);
|
||||
muscle->AddElement(elNa,0.0008);
|
||||
muscle->AddElement(elO,0.729);
|
||||
muscle->AddElement(elMg,0.0002);
|
||||
muscle->AddElement(elP,0.002);
|
||||
muscle->AddElement(elS,0.005);
|
||||
muscle->AddElement(elK,0.003);
|
||||
|
||||
|
||||
|
||||
}
|
||||
G4Material* BrachyMaterial::GetMat(G4String material)
|
||||
{
|
||||
G4Material* pttoMaterial = G4Material::GetMaterial(material);
|
||||
if (pttoMaterial) return pttoMaterial;
|
||||
}
|
||||
@@ -20,12 +20,19 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
// ********************************
|
||||
// * *
|
||||
// * BrachyPhantomHit.cc *
|
||||
// * BrachyPhantomHit.cc *
|
||||
// * *
|
||||
// ********************************
|
||||
|
||||
//
|
||||
// $Id: BrachyPhantomHit.cc,v 1.3 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPhantomHit.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
@@ -37,10 +44,10 @@ G4Allocator<BrachyPhantomHit> BrachyPhantomHitAllocator;
|
||||
|
||||
//....
|
||||
|
||||
BrachyPhantomHit::BrachyPhantomHit(G4LogicalVolume* logVol,G4int XID,G4int ZID)
|
||||
:m_pLogV(logVol),m_XID(XID),m_ZID(ZID)
|
||||
BrachyPhantomHit::BrachyPhantomHit(G4LogicalVolume* logVol,G4int XID,G4int YID,G4int ZID)
|
||||
:m_pLogV(logVol),m_XID(XID),m_ZID(ZID),m_YID(YID)
|
||||
{
|
||||
m_Edep=0;
|
||||
m_Edep=0;
|
||||
}
|
||||
|
||||
//....
|
||||
@@ -53,32 +60,34 @@ BrachyPhantomHit::~BrachyPhantomHit()
|
||||
|
||||
BrachyPhantomHit::BrachyPhantomHit(const BrachyPhantomHit &right)
|
||||
{
|
||||
m_XID = right.m_XID;
|
||||
m_ZID = right.m_ZID;
|
||||
m_Edep = right.m_Edep;
|
||||
m_Pos = right.m_Pos;
|
||||
m_Rot = right.m_Rot;
|
||||
m_pLogV = right.m_pLogV;
|
||||
m_XID = right.m_XID;
|
||||
m_ZID = right.m_ZID;
|
||||
m_YID = right.m_YID;
|
||||
m_Edep = right.m_Edep;
|
||||
m_Pos = right.m_Pos;
|
||||
m_Rot = right.m_Rot;
|
||||
m_pLogV = right.m_pLogV;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
const BrachyPhantomHit& BrachyPhantomHit::operator=(const BrachyPhantomHit &right)
|
||||
{
|
||||
m_XID = right.m_XID;
|
||||
m_ZID = right.m_ZID;
|
||||
m_Edep = right.m_Edep;
|
||||
m_Pos = right.m_Pos;
|
||||
m_Rot = right.m_Rot;
|
||||
m_pLogV = right.m_pLogV;
|
||||
return *this;
|
||||
m_XID = right.m_XID;
|
||||
m_ZID = right.m_ZID;
|
||||
m_YID = right.m_YID;
|
||||
m_Edep = right.m_Edep;
|
||||
m_Pos = right.m_Pos;
|
||||
m_Rot = right.m_Rot;
|
||||
m_pLogV = right.m_pLogV;
|
||||
return *this;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
int BrachyPhantomHit::operator==(const BrachyPhantomHit &right) const
|
||||
{
|
||||
return((m_XID==right.m_XID)&&(m_ZID==right.m_ZID));
|
||||
return((m_XID==right.m_XID)&&(m_ZID==right.m_ZID)&&(m_YID==right.m_YID));
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
@@ -20,12 +20,19 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
// ************************************
|
||||
// * *
|
||||
// * BrachyWaterBoxROGeometry.cc *
|
||||
// * BrachyPhantomROGeometry.cc *
|
||||
// * *
|
||||
// ************************************
|
||||
|
||||
//
|
||||
// $Id: BrachyPhantomROGeometry.cc,v 1.3 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPhantomROGeometry.hh"
|
||||
#include "BrachyDummySD.hh"
|
||||
|
||||
@@ -43,7 +50,7 @@
|
||||
//....
|
||||
|
||||
BrachyPhantomROGeometry::BrachyPhantomROGeometry(G4String aString,G4double DetDimX,G4double DetDimZ,G4int NumVoxelX,G4int NumVoxelZ)
|
||||
: G4VReadOutGeometry(aString),m_DetDimX(DetDimX),m_DetDimZ(DetDimZ),m_NumVoxelX(NumVoxelX),m_NumVoxelZ(NumVoxelZ)
|
||||
: G4VReadOutGeometry(aString),m_DetDimX(DetDimX),m_DetDimZ(DetDimZ),m_NumVoxelX(NumVoxelX),m_NumVoxelZ(NumVoxelZ)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -57,59 +64,70 @@ BrachyPhantomROGeometry::~BrachyPhantomROGeometry()
|
||||
|
||||
G4VPhysicalVolume* BrachyPhantomROGeometry::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.)
|
||||
|
||||
// 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);
|
||||
G4Material* dummyMat = new G4Material(name="dummyMat", 1., 1.*g/mole, 1.*g/cm3);
|
||||
|
||||
// Slice thickness is the average of Voxel X and Z sizes
|
||||
G4double DetVoxel_y = (m_DetDimX/m_NumVoxelX+m_DetDimZ/m_NumVoxelZ)/2.0;
|
||||
G4double DetVoxel_y = (m_DetDimX/m_NumVoxelX+m_DetDimZ/m_NumVoxelZ)/2.0;
|
||||
|
||||
G4double ExpHall_x = 4.0*m;
|
||||
G4double ExpHall_y = 4.0*m;
|
||||
G4double ExpHall_z = 4.0*m;
|
||||
G4double ExpHall_x = 4.0*m;
|
||||
G4double ExpHall_y = 4.0*m;
|
||||
G4double ExpHall_z = 4.0*m;
|
||||
|
||||
G4double Det_x = m_DetDimX/2;
|
||||
G4double Det_y = DetVoxel_y;
|
||||
G4double Det_z = m_DetDimZ/2;
|
||||
G4double Det_x = m_DetDimX/2;
|
||||
G4double Det_y = DetVoxel_y;
|
||||
G4double Det_z = m_DetDimZ/2;
|
||||
G4double Det_y2 =m_DetDimX/2 ;
|
||||
|
||||
G4double DetVoxelX_x = Det_x/m_NumVoxelX;
|
||||
G4double DetVoxelX_y = DetVoxel_y;
|
||||
G4double DetVoxelX_z = Det_z;
|
||||
G4double DetVoxelX_dx = 2*DetVoxelX_x;
|
||||
G4double DetVoxelX_x = Det_x/m_NumVoxelX;
|
||||
G4double DetVoxelX_y = DetVoxel_y;
|
||||
G4double DetVoxelX_z = Det_z;
|
||||
G4double DetVoxelX_dx = 2*DetVoxelX_x;
|
||||
|
||||
G4double DetVoxelZ_x = Det_x;
|
||||
G4double DetVoxelZ_y = DetVoxel_y;
|
||||
G4double DetVoxelZ_z = Det_z/m_NumVoxelZ;
|
||||
G4double DetVoxelZ_dz = 2*DetVoxelZ_z;
|
||||
G4double DetVoxelZ_x = Det_x;
|
||||
G4double DetVoxelZ_y = DetVoxel_y;
|
||||
G4double DetVoxelZ_z = Det_z/m_NumVoxelZ;
|
||||
G4double DetVoxelZ_dz = 2*DetVoxelZ_z;
|
||||
|
||||
G4Box *ROExpHall = new G4Box("ROExpHall",ExpHall_x,ExpHall_y,ExpHall_z);
|
||||
G4LogicalVolume *ROExpHallLog = new G4LogicalVolume(ROExpHall,dummyMat,"ROExpHallLog",0,0,0);
|
||||
G4VPhysicalVolume *ROExpHallPhys = new G4PVPlacement(0,G4ThreeVector(),"ROExpHallPhys",ROExpHallLog,0,false,0);
|
||||
G4Box *ROExpHall = new G4Box("ROExpHall",ExpHall_x,ExpHall_y,ExpHall_z);
|
||||
G4LogicalVolume *ROExpHallLog = new G4LogicalVolume(ROExpHall,dummyMat,"ROExpHallLog",0,0,0);
|
||||
G4VPhysicalVolume *ROExpHallPhys = new G4PVPlacement(0,G4ThreeVector(),"ROExpHallPhys",ROExpHallLog,0,false,0);
|
||||
|
||||
G4Box *RODetector = new G4Box("RODetector", Det_x, Det_y, Det_z);
|
||||
G4LogicalVolume *RODetectorLog = new G4LogicalVolume(RODetector,dummyMat,"RODetectorLog",0,0,0);
|
||||
G4VPhysicalVolume *RODetectorPhys = new G4PVPlacement(0,G4ThreeVector(),"DetectorPhys",RODetectorLog,ROExpHallPhys,false,0);
|
||||
G4Box *RODetector = new G4Box("RODetector", Det_x, Det_y2, Det_z);
|
||||
G4LogicalVolume *RODetectorLog = new G4LogicalVolume(RODetector,dummyMat,"RODetectorLog",0,0,0);
|
||||
G4VPhysicalVolume *RODetectorPhys = new G4PVPlacement(0,G4ThreeVector(),"DetectorPhys",RODetectorLog,ROExpHallPhys,false,0);
|
||||
|
||||
// ReadOut Voxel division
|
||||
|
||||
// ReadOut Voxel division
|
||||
|
||||
// X division first...
|
||||
|
||||
G4Box *RODetectorXDivision = new G4Box("RODetectorXDivision",DetVoxelX_x,DetVoxelX_y,DetVoxelX_z);
|
||||
G4LogicalVolume *RODetectorXDivisionLog = new G4LogicalVolume(RODetectorXDivision,dummyMat,"RODetectorXDivisionLog",0,0,0);
|
||||
G4VPhysicalVolume *RODetectorXDivisionPhys = new G4PVReplica("RODetectorXDivisionPhys",RODetectorXDivisionLog,RODetectorPhys,kXAxis,m_NumVoxelX,DetVoxelX_dx);
|
||||
G4Box *RODetectorXDivision = new G4Box("RODetectorXDivision",DetVoxelX_x,DetVoxelX_z,DetVoxelX_z);
|
||||
G4LogicalVolume *RODetectorXDivisionLog = new G4LogicalVolume(RODetectorXDivision,dummyMat,"RODetectorXDivisionLog",0,0,0);
|
||||
G4VPhysicalVolume *RODetectorXDivisionPhys = new G4PVReplica("RODetectorXDivisionPhys",RODetectorXDivisionLog,RODetectorPhys,kXAxis,m_NumVoxelX,DetVoxelX_dx);
|
||||
|
||||
// ...then Z division
|
||||
|
||||
G4Box *RODetectorZDivision = new G4Box("RODetectorZDivision",DetVoxelZ_x,DetVoxelZ_y,DetVoxelZ_z);
|
||||
G4LogicalVolume *RODetectorZDivisionLog = new G4LogicalVolume(RODetectorZDivision,dummyMat,"RODetectorZDivisionLog",0,0,0);
|
||||
G4VPhysicalVolume *RODetectorZDivisionPhys = new G4PVReplica("RODetectorZDivisionPhys",RODetectorZDivisionLog,RODetectorXDivisionPhys,kZAxis,m_NumVoxelZ,DetVoxelZ_dz);
|
||||
|
||||
BrachyDummySD *dummySD = new BrachyDummySD;
|
||||
RODetectorZDivisionLog->SetSensitiveDetector(dummySD);
|
||||
|
||||
return ROExpHallPhys;
|
||||
// ...then Z division
|
||||
|
||||
G4Box *RODetectorZDivision = new G4Box("RODetectorZDivision",DetVoxelZ_x,DetVoxelZ_x,DetVoxelZ_z);
|
||||
G4LogicalVolume *RODetectorZDivisionLog = new G4LogicalVolume(RODetectorZDivision,dummyMat,"RODetectorZDivisionLog",0,0,0);
|
||||
G4VPhysicalVolume *RODetectorZDivisionPhys = new G4PVReplica("RODetectorZDivisionPhys",RODetectorZDivisionLog,RODetectorXDivisionPhys,kZAxis,m_NumVoxelZ,DetVoxelZ_dz);
|
||||
|
||||
// ...then Y division
|
||||
|
||||
G4Box *RODetectorYDivision = new G4Box("RODetectorYDivision",DetVoxelZ_x,DetVoxelZ_y,DetVoxelZ_x);
|
||||
G4LogicalVolume *RODetectorYDivisionLog = new G4LogicalVolume(RODetectorYDivision,dummyMat,"RODetectorYDivisionLog",0,0,0);
|
||||
|
||||
G4VPhysicalVolume *RODetectorYDivisionPhys = new G4PVReplica("RODetectorYDivisionPhys",RODetectorYDivisionLog,RODetectorZDivisionPhys,kYAxis,m_NumVoxelZ,DetVoxelZ_dz);
|
||||
|
||||
BrachyDummySD *dummySD = new BrachyDummySD;
|
||||
RODetectorYDivisionLog->SetSensitiveDetector(dummySD);
|
||||
|
||||
return ROExpHallPhys;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,16 +20,23 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
// ********************************
|
||||
// * *
|
||||
// * BrachyWaterBoxSD.cc *
|
||||
// * BrachyPhantomSD.cc *
|
||||
// * *
|
||||
// ********************************
|
||||
|
||||
//
|
||||
// $Id: BrachyPhantomSD.cc,v 1.3 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPhantomSD.hh"
|
||||
#include "BrachyPhantomHit.hh"
|
||||
#include "BrachyDetectorConstruction.hh"
|
||||
|
||||
#include "BrachyDetectorConstruction.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
@@ -42,72 +49,75 @@
|
||||
//....
|
||||
|
||||
BrachyPhantomSD::BrachyPhantomSD(G4String name, G4int NumVoxelX, G4int NumVoxelZ)
|
||||
:G4VSensitiveDetector(name),m_NumVoxelX(NumVoxelX),m_NumVoxelZ(NumVoxelZ)
|
||||
:G4VSensitiveDetector(name),m_NumVoxelX(NumVoxelX),m_NumVoxelZ(NumVoxelZ)
|
||||
{
|
||||
G4String HCname;
|
||||
collectionName.insert(HCname="PhantomHitsCollection");
|
||||
m_pVoxelID = new G4int[NumVoxelX*NumVoxelZ];
|
||||
m_pPhantomHitsCollection = NULL;
|
||||
G4String HCname;
|
||||
collectionName.insert(HCname="PhantomHitsCollection");
|
||||
m_pVoxelID = new G4int[NumVoxelX*NumVoxelZ*NumVoxelZ];
|
||||
m_pPhantomHitsCollection = NULL;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
BrachyPhantomSD::~BrachyPhantomSD()
|
||||
{
|
||||
delete[] m_pVoxelID;
|
||||
delete[] m_pVoxelID;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
void BrachyPhantomSD::Initialize(G4HCofThisEvent*HCE)
|
||||
{
|
||||
m_pPhantomHitsCollection = new BrachyPhantomHitsCollection(SensitiveDetectorName,collectionName[0]);
|
||||
G4int m_NumVoxelY=300;
|
||||
m_pPhantomHitsCollection = new BrachyPhantomHitsCollection(SensitiveDetectorName,collectionName[0]);
|
||||
|
||||
for(G4int k=0;k<m_NumVoxelZ;k++)
|
||||
for(G4int i=0;i<m_NumVoxelX;i++)
|
||||
for(G4int j=0;j<m_NumVoxelY;j++)
|
||||
m_pVoxelID[i+k*m_NumVoxelX+j*m_NumVoxelY*m_NumVoxelY] = -1;
|
||||
|
||||
for(G4int k=0;k<m_NumVoxelZ;k++)
|
||||
for(G4int i=0;i<m_NumVoxelX;i++)
|
||||
m_pVoxelID[i+k*m_NumVoxelX] = -1;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
G4bool BrachyPhantomSD::ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist)
|
||||
{
|
||||
if(!ROhist)
|
||||
return false;
|
||||
if(!ROhist)
|
||||
return false;
|
||||
|
||||
if(aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName() != "WaterBoxPhys")
|
||||
return false;
|
||||
if(aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName() != "PhantomPhys")
|
||||
return false;
|
||||
|
||||
G4double edep = aStep->GetTotalEnergyDeposit();
|
||||
if(edep==0.)
|
||||
return false;
|
||||
G4double edep = aStep->GetTotalEnergyDeposit();
|
||||
if(edep==0.)
|
||||
return false;
|
||||
|
||||
G4VPhysicalVolume* physVol = ROhist->GetVolume();
|
||||
G4VPhysicalVolume* mothVol = ROhist->GetVolume(1);
|
||||
G4VPhysicalVolume* physVol = ROhist->GetVolume();
|
||||
G4VPhysicalVolume* mothVol = ROhist->GetVolume(1);
|
||||
|
||||
// Read Voxel indexes: i is the x index, k is the z index
|
||||
G4int k = ROhist->GetReplicaNumber();
|
||||
G4int i = ROhist->GetReplicaNumber(1);
|
||||
|
||||
if(m_pVoxelID[i+k*m_NumVoxelX]==-1)
|
||||
{
|
||||
BrachyPhantomHit* PhantomHit = new BrachyPhantomHit(physVol->GetLogicalVolume(),i,k);
|
||||
// Read Voxel indexes: i is the x index, k is the z index
|
||||
G4int k = ROhist->GetReplicaNumber(1);
|
||||
G4int i = ROhist->GetReplicaNumber(2);
|
||||
G4int j= ROhist->GetReplicaNumber();
|
||||
if(m_pVoxelID[i+k*m_NumVoxelX+j*m_NumVoxelX*m_NumVoxelX]==-1)
|
||||
{
|
||||
BrachyPhantomHit* PhantomHit = new BrachyPhantomHit(physVol->GetLogicalVolume(),i,j,k);
|
||||
|
||||
G4RotationMatrix rotM;
|
||||
if(physVol->GetObjectRotation())
|
||||
rotM = *(physVol->GetObjectRotation());
|
||||
G4RotationMatrix rotM;
|
||||
if(physVol->GetObjectRotation())
|
||||
rotM = *(physVol->GetObjectRotation());
|
||||
|
||||
PhantomHit->SetEdep(edep);
|
||||
PhantomHit->SetPos(physVol->GetTranslation());
|
||||
PhantomHit->SetRot(rotM);
|
||||
PhantomHit->SetEdep(edep);
|
||||
PhantomHit->SetPos(physVol->GetTranslation());
|
||||
PhantomHit->SetRot(rotM);
|
||||
|
||||
G4int VoxelID = m_pPhantomHitsCollection->insert(PhantomHit);
|
||||
m_pVoxelID[i+k*m_NumVoxelX] = VoxelID - 1;
|
||||
}
|
||||
else
|
||||
(*m_pPhantomHitsCollection)[m_pVoxelID[i+k*m_NumVoxelX]]->AddEdep(edep);
|
||||
G4int VoxelID = m_pPhantomHitsCollection->insert(PhantomHit);
|
||||
m_pVoxelID[i+k*m_NumVoxelX+j*m_NumVoxelX*m_NumVoxelX] = VoxelID - 1;
|
||||
}
|
||||
else
|
||||
(*m_pPhantomHitsCollection)[m_pVoxelID[i+k*m_NumVoxelX+j*m_NumVoxelX*m_NumVoxelX]]->AddEdep(edep);
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
//....
|
||||
@@ -116,9 +126,9 @@ void BrachyPhantomSD::EndOfEvent(G4HCofThisEvent*HCE)
|
||||
{
|
||||
static G4int HCID = -1;
|
||||
if(HCID<0)
|
||||
{
|
||||
HCID = GetCollectionID(0);
|
||||
}
|
||||
{
|
||||
HCID = GetCollectionID(0);
|
||||
}
|
||||
HCE->AddHitsCollection(HCID,m_pPhantomHitsCollection);
|
||||
}
|
||||
|
||||
@@ -139,3 +149,6 @@ void BrachyPhantomSD::DrawAll()
|
||||
void BrachyPhantomSD::PrintAll()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,12 +20,19 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyPhysicsList.cc *
|
||||
// * *
|
||||
// **********************************
|
||||
|
||||
//
|
||||
// $Id: BrachyPhysicsList.cc,v 1.6 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPhysicsList.hh"
|
||||
|
||||
#include "G4ParticleDefinition.hh"
|
||||
@@ -41,7 +48,7 @@
|
||||
|
||||
BrachyPhysicsList::BrachyPhysicsList(): G4VUserPhysicsList()
|
||||
{
|
||||
defaultCutValue = 1*mm;
|
||||
defaultCutValue = 0.1*mm;
|
||||
cutForGamma = defaultCutValue;
|
||||
cutForElectron = defaultCutValue;
|
||||
cutForPositron = defaultCutValue;
|
||||
@@ -121,12 +128,10 @@ void BrachyPhysicsList::ConstructEM()
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
//processes
|
||||
lowePhot = new G4LowEnergyPhotoElectric("LowEnPhotoElec");
|
||||
loweIon = new G4LowEnergyIonisation("LowEnergyIoni");
|
||||
loweBrem = new G4LowEnergyBremsstrahlung("LowEnBrem");
|
||||
|
||||
if (particleName == "gamma") {
|
||||
//gamma
|
||||
//gamma
|
||||
lowePhot = new G4LowEnergyPhotoElectric("LowEnPhotoElec");
|
||||
pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh);
|
||||
pmanager->AddDiscreteProcess(lowePhot);
|
||||
pmanager->AddDiscreteProcess(new G4LowEnergyCompton);
|
||||
@@ -134,6 +139,9 @@ void BrachyPhysicsList::ConstructEM()
|
||||
|
||||
} else if (particleName == "e-") {
|
||||
//electron
|
||||
loweIon = new G4LowEnergyIonisation("LowEnergyIoni");
|
||||
loweBrem = new G4LowEnergyBremsstrahlung("LowEnBrem");
|
||||
|
||||
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
|
||||
pmanager->AddProcess(loweIon, -1, 2,2);
|
||||
pmanager->AddProcess(loweBrem, -1,-1,3);
|
||||
|
||||
@@ -1,9 +1,43 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyPrimaryGeneratorAction.cc *
|
||||
// * *
|
||||
// ********************************************
|
||||
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorAction.cc,v 1.12 2002/12/12 19:16:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPrimaryGeneratorAction.hh"
|
||||
#include "BrachyAnalysisManager.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
@@ -22,16 +56,8 @@
|
||||
BrachyPrimaryGeneratorAction::BrachyPrimaryGeneratorAction()
|
||||
{
|
||||
|
||||
G4int NumParticles = 1;
|
||||
|
||||
m_pParticleGun = new G4ParticleGun(NumParticles);
|
||||
|
||||
|
||||
|
||||
m_pParticleGun = new G4ParticleGun(NumParticles);
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
@@ -39,9 +65,8 @@ BrachyPrimaryGeneratorAction::BrachyPrimaryGeneratorAction()
|
||||
|
||||
BrachyPrimaryGeneratorAction::~BrachyPrimaryGeneratorAction()
|
||||
{
|
||||
if(m_pParticleGun)
|
||||
delete m_pParticleGun;
|
||||
|
||||
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
@@ -49,60 +74,12 @@ BrachyPrimaryGeneratorAction::~BrachyPrimaryGeneratorAction()
|
||||
|
||||
void BrachyPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
|
||||
G4ParticleTable* pParticleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String ParticleName = "gamma";
|
||||
G4ParticleDefinition* pParticle = pParticleTable->FindParticle(ParticleName);
|
||||
|
||||
|
||||
m_pParticleGun->SetParticleDefinition(pParticle);
|
||||
|
||||
// Random generation of gamma source point inside the Iodium core
|
||||
G4double x,y,z;
|
||||
G4double radius= 0.30*mm;
|
||||
|
||||
|
||||
do{
|
||||
x = (G4UniformRand()-0.5)*(radius)/0.5;
|
||||
y = (G4UniformRand()-0.5)*(radius)/0.5;
|
||||
}while(x*x+y*y > radius*radius);
|
||||
|
||||
z = (G4UniformRand()-0.5)*1.75*mm/0.5 ;
|
||||
|
||||
G4ThreeVector position(x,y,z);
|
||||
m_pParticleGun->SetParticlePosition(position);
|
||||
|
||||
|
||||
// Random generation of the impulse direction
|
||||
G4double a,b,c;
|
||||
G4double n;
|
||||
do{
|
||||
a = (G4UniformRand()-0.5)/0.5;
|
||||
b = (G4UniformRand()-0.5)/0.5;
|
||||
c = (G4UniformRand()-0.5)/0.5;
|
||||
n = a*a+b*b+c*c;
|
||||
}while(n > 1 || n == 0.0);
|
||||
n = sqrt(n);
|
||||
a /= n;
|
||||
b /= n;
|
||||
c /= n;
|
||||
|
||||
G4ThreeVector direction(a,b,c);
|
||||
m_pParticleGun->SetParticleMomentumDirection(direction);
|
||||
|
||||
|
||||
//Energy = 0.356*MeV;
|
||||
|
||||
Energy = 356*keV;
|
||||
m_pParticleGun->SetParticleEnergy(Energy);
|
||||
|
||||
//Check the energy
|
||||
analysis->Spectrum(Energy);
|
||||
|
||||
m_pParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
|
||||
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyPrimaryGeneratorActionI.cc *
|
||||
// * *
|
||||
// ********************************************
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorActionI.cc,v 1.4 2002/12/12 19:16:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPrimaryGeneratorActionI.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include "BrachyAnalysisManager.hh"
|
||||
#endif
|
||||
|
||||
//#include "BrachyPrimaryGeneratorMessenger.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "globals.hh"
|
||||
#include <math.h>
|
||||
#include "G4RunManager.hh"
|
||||
|
||||
//....
|
||||
|
||||
BrachyPrimaryGeneratorActionI::BrachyPrimaryGeneratorActionI()
|
||||
{
|
||||
|
||||
G4int NumParticles = 1;
|
||||
|
||||
m_pParticleGun = new G4ParticleGun(NumParticles);
|
||||
|
||||
//create a messenger for this class
|
||||
// gunMessenger = new BrachyPrimaryGeneratorMessenger(this);
|
||||
|
||||
vettore.push_back(0.783913);
|
||||
vettore.push_back(0.170416);
|
||||
vettore.push_back(0.045671);
|
||||
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
BrachyPrimaryGeneratorActionI::~BrachyPrimaryGeneratorActionI()
|
||||
{
|
||||
if(m_pParticleGun)
|
||||
delete m_pParticleGun;
|
||||
|
||||
//delete gunMessenger;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
void BrachyPrimaryGeneratorActionI::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
#endif
|
||||
|
||||
G4ParticleTable* pParticleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String ParticleName = "gamma";
|
||||
G4ParticleDefinition* pParticle = pParticleTable->FindParticle(ParticleName);
|
||||
// G4cout<<"arrivo allfind particle"<<G4endl;
|
||||
|
||||
m_pParticleGun->SetParticleDefinition(pParticle);
|
||||
|
||||
// Random generation of gamma source point inside the Iodium core
|
||||
G4double x,y,z;
|
||||
G4double radiusmax = 0.30*mm;
|
||||
G4double radiusmin=0.085*mm;
|
||||
|
||||
do{
|
||||
x = (G4UniformRand()-0.5)*(radiusmax)/0.5;
|
||||
y = (G4UniformRand()-0.5)*(radiusmax)/0.5;
|
||||
}while(((x*x+y*y )> (radiusmax*radiusmax))||((x*x+y*y)<(radiusmin*radiusmin)));
|
||||
|
||||
z = (G4UniformRand()-0.5)*1.75*mm/0.5 ;
|
||||
|
||||
G4ThreeVector position(x,y,z);
|
||||
m_pParticleGun->SetParticlePosition(position);
|
||||
|
||||
|
||||
// Random generation of the impulse direction
|
||||
G4double a,b,c;
|
||||
G4double n;
|
||||
do{
|
||||
a = (G4UniformRand()-0.5)/0.5;
|
||||
b = (G4UniformRand()-0.5)/0.5;
|
||||
c = (G4UniformRand()-0.5)/0.5;
|
||||
n = a*a+b*b+c*c;
|
||||
}while(n > 1 || n == 0.0);
|
||||
n = sqrt(n);
|
||||
a /= n;
|
||||
b /= n;
|
||||
c /= n;
|
||||
|
||||
G4ThreeVector direction(a,b,c);
|
||||
m_pParticleGun->SetParticleMomentumDirection(direction);
|
||||
|
||||
|
||||
|
||||
G4double random=G4UniformRand();
|
||||
G4double sum=0;
|
||||
G4int i=0;
|
||||
while(sum<random){sum+=vettore[i];
|
||||
i++;}
|
||||
|
||||
|
||||
|
||||
if(i==1){Energy=27.4*keV;}
|
||||
else{
|
||||
if(i==2){Energy=31.4*keV;}
|
||||
else {Energy=35.5*keV;}}
|
||||
|
||||
//G4double Energy= 28.451602*keV;
|
||||
|
||||
m_pParticleGun->SetParticleEnergy(Energy);
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
analysis->Spectrum(Energy);
|
||||
#endif
|
||||
|
||||
m_pParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
G4double BrachyPrimaryGeneratorActionI::GetEnergy()
|
||||
{ return Energy;}
|
||||
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyPrimaryGeneratorActionIr.cc *
|
||||
// * *
|
||||
// ********************************************
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorActionIr.cc,v 1.4 2002/12/12 19:16:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPrimaryGeneratorActionIr.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include "BrachyAnalysisManager.hh"
|
||||
#endif
|
||||
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "globals.hh"
|
||||
#include <math.h>
|
||||
#include "G4RunManager.hh"
|
||||
|
||||
|
||||
//....
|
||||
|
||||
BrachyPrimaryGeneratorActionIr::BrachyPrimaryGeneratorActionIr()
|
||||
{
|
||||
G4int NumParticles = 1;
|
||||
|
||||
m_pParticleGun = new G4ParticleGun(NumParticles);
|
||||
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
BrachyPrimaryGeneratorActionIr::~BrachyPrimaryGeneratorActionIr()
|
||||
{
|
||||
if(m_pParticleGun)
|
||||
delete m_pParticleGun;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
void BrachyPrimaryGeneratorActionIr::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
#endif
|
||||
|
||||
G4ParticleTable* pParticleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String ParticleName = "gamma";
|
||||
G4ParticleDefinition* pParticle = pParticleTable->FindParticle(ParticleName);
|
||||
|
||||
|
||||
m_pParticleGun->SetParticleDefinition(pParticle);
|
||||
|
||||
// Random generation of gamma source point inside the Iodium core
|
||||
G4double x,y,z;
|
||||
G4double radius= 0.30*mm;
|
||||
|
||||
|
||||
do{
|
||||
x = (G4UniformRand()-0.5)*(radius)/0.5;
|
||||
y = (G4UniformRand()-0.5)*(radius)/0.5;
|
||||
}while(x*x+y*y > radius*radius);
|
||||
|
||||
z = (G4UniformRand()-0.5)*1.75*mm/0.5 ;
|
||||
|
||||
G4ThreeVector position(x,y,z);
|
||||
m_pParticleGun->SetParticlePosition(position);
|
||||
|
||||
|
||||
// Random generation of the impulse direction
|
||||
G4double a,b,c;
|
||||
G4double n;
|
||||
do{
|
||||
a = (G4UniformRand()-0.5)/0.5;
|
||||
b = (G4UniformRand()-0.5)/0.5;
|
||||
c = (G4UniformRand()-0.5)/0.5;
|
||||
n = a*a+b*b+c*c;
|
||||
}while(n > 1 || n == 0.0);
|
||||
n = sqrt(n);
|
||||
a /= n;
|
||||
b /= n;
|
||||
c /= n;
|
||||
|
||||
G4ThreeVector direction(a,b,c);
|
||||
m_pParticleGun->SetParticleMomentumDirection(direction);
|
||||
|
||||
|
||||
//Energy = 0.356*MeV;
|
||||
|
||||
Energy = 356*keV;
|
||||
m_pParticleGun->SetParticleEnergy(Energy);
|
||||
|
||||
//Check the energy
|
||||
#ifdef G4ANALYSIS_USE
|
||||
analysis->Spectrum(Energy);
|
||||
#endif
|
||||
m_pParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,52 +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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyRunAction.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyRunAction.cc,v 1.10 2002/12/12 19:16:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "BrachyRunAction.hh"
|
||||
#include "BrachyEventAction.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include "BrachyAnalysisManager.hh"
|
||||
#endif
|
||||
|
||||
#include "G4Run.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "BrachyDetectorConstruction.hh"
|
||||
#include "BrachyRunMessenger.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4Timer.hh"
|
||||
|
||||
BrachyRunAction::BrachyRunAction()
|
||||
#include "BrachyFactoryIr.hh"
|
||||
#include "BrachyFactoryI.hh"
|
||||
#include "BrachyFactory.hh"
|
||||
#include "BrachyRunAction.hh"
|
||||
BrachyRunAction::BrachyRunAction(G4String &SDNAME)
|
||||
{
|
||||
|
||||
|
||||
|
||||
SDname=SDNAME;
|
||||
pDet=new BrachyDetectorConstruction(SDname);
|
||||
pRun= new BrachyRunMessenger(this);
|
||||
}
|
||||
|
||||
BrachyRunAction::~BrachyRunAction()
|
||||
{
|
||||
|
||||
{ delete pDet;
|
||||
delete pDetector;
|
||||
delete pRun;
|
||||
}
|
||||
void BrachyRunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
{ BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
analysis->book();
|
||||
G4RunManager* pRunManager=G4RunManager::GetRunManager() ;
|
||||
{
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
analysis->book();
|
||||
#endif
|
||||
G4RunManager* pRunManager=G4RunManager::GetRunManager() ;
|
||||
|
||||
if(pRunManager)
|
||||
{ switch(a)
|
||||
{ case 1:
|
||||
factory=new BrachyFactoryI;
|
||||
break;
|
||||
|
||||
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
|
||||
|
||||
default:
|
||||
factory=new BrachyFactoryIr;
|
||||
}
|
||||
|
||||
G4VUserPrimaryGeneratorAction* irPrimary=factory->CreatePrimaryGeneratorAction();
|
||||
|
||||
|
||||
if(irPrimary)
|
||||
{ pRunManager->SetUserAction (irPrimary);}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BrachyRunAction::SelectEnergy(G4int choice)
|
||||
{a=choice;
|
||||
if (a==1)factory=new BrachyFactoryI;
|
||||
else factory=new BrachyFactoryIr;
|
||||
|
||||
}
|
||||
|
||||
void BrachyRunAction::EndOfRunAction(const G4Run* aRun)
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
G4cout << "number of event = " << aRun->GetNumberOfEvent() << G4endl;
|
||||
G4cout << "number of event = " << aRun->GetNumberOfEvent() << G4endl;
|
||||
|
||||
|
||||
analysis->finish();
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
analysis->finish();
|
||||
#endif
|
||||
delete factory;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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
|
||||
//
|
||||
// $Id: BrachyRunMessenger.cc,v 1.3 2002/12/08 22:40:55 stesting Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyRunMessenger.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
#include "BrachyRunMessenger.hh"
|
||||
#include"BrachyFactoryIr.hh"
|
||||
#include "BrachyRunAction.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWithoutParameter.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
BrachyRunMessenger::BrachyRunMessenger( BrachyRunAction* pBrachyRun):
|
||||
pRun(pBrachyRun)
|
||||
{
|
||||
|
||||
mydetDir = new G4UIdirectory("/run/");
|
||||
mydetDir->SetGuidance("Control gamma energy.");
|
||||
selDetCmd=new G4UIcmdWithAString("/run/energy",this);
|
||||
|
||||
|
||||
|
||||
selDetCmd->SetGuidance("Select the energy of gamma emitted by the source.");
|
||||
selDetCmd->SetGuidance(" Iodium: Iodium Source ");
|
||||
selDetCmd->SetGuidance(" Iridium: Iridium Source " );
|
||||
selDetCmd->SetParameterName("choice",true);
|
||||
selDetCmd->SetDefaultValue("Iridium");
|
||||
selDetCmd->SetCandidates("Iridium / Iodium");
|
||||
selDetCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
BrachyRunMessenger::~BrachyRunMessenger()
|
||||
{
|
||||
|
||||
delete selDetCmd;
|
||||
delete mydetDir;
|
||||
//delete detDir;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void BrachyRunMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
|
||||
|
||||
if( command == selDetCmd )
|
||||
{if (newValue== "Iodium") pRun->SelectEnergy(1);
|
||||
else pRun->SelectEnergy(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,40 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyVisManager.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyVisManager.cc,v 1.5 2002/11/18 15:18:39 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
|
||||
#include "BrachyVisManager.hh"
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CompositeCalorimeter.cc
|
||||
// Description: Main function for Geant4 application HCAL Test-BEAM H2-96
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "CCalDetectorConstruction.hh"
|
||||
#include "CCalEndOfEventAction.hh"
|
||||
#include "CCalRunAction.hh"
|
||||
|
||||
#include "CCalPrimaryGeneratorAction.hh"
|
||||
#include "CCalPhysicsList.hh"
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UIterminal.hh"
|
||||
|
||||
#ifdef G4UI_USE_XM
|
||||
#include "G4UIXm.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
#include "CCalVisManager.hh"
|
||||
#endif
|
||||
|
||||
|
||||
int main(int argc,char** argv) {
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
CCalVisManager *visManager = new CCalVisManager;
|
||||
visManager->Initialize();
|
||||
#endif
|
||||
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
runManager->SetUserInitialization(new CCalDetectorConstruction);
|
||||
runManager->SetUserInitialization(new CCalPhysicsList);
|
||||
|
||||
////////////////////////////
|
||||
// User action classes. //
|
||||
// -------------------- //
|
||||
////////////////////////////
|
||||
|
||||
//////////////////////////////////
|
||||
// PRIMARY PARTICLEs GENERATION //
|
||||
//////////////////////////////////
|
||||
|
||||
CCalPrimaryGeneratorAction* primaryGenerator = new CCalPrimaryGeneratorAction;
|
||||
runManager->SetUserAction(primaryGenerator);
|
||||
|
||||
/////////
|
||||
// RUN //
|
||||
/////////
|
||||
|
||||
runManager->SetUserAction(new CCalRunAction);
|
||||
|
||||
///////////
|
||||
// EVENT //
|
||||
///////////
|
||||
|
||||
runManager->SetUserAction(new CCalEndOfEventAction(primaryGenerator));
|
||||
|
||||
G4UImanager * UI = G4UImanager::GetUIpointer();
|
||||
UI->ApplyCommand("/CCal/generator/verbose 2");
|
||||
UI->ApplyCommand("/gun/position -1380. 0. 0. mm");
|
||||
UI->ApplyCommand("/gun/direction 1. 0. 0.");
|
||||
UI->ApplyCommand("/gun/energy 100 GeV");
|
||||
|
||||
G4UIsession * session = 0;
|
||||
// Define (G)UI terminal for interactive mode
|
||||
if (argc==1) {
|
||||
|
||||
#ifdef G4UI_USE_XM
|
||||
session = new G4UIXm(argc,argv);
|
||||
#else // G4UIterminal is a (dumb) terminal.
|
||||
session = new G4UIterminal;
|
||||
#endif
|
||||
|
||||
G4cout <<" Run initializing ..."<<G4endl;
|
||||
UI->ApplyCommand("/process/verbose 0");
|
||||
UI->ApplyCommand("/run/verbose 2");
|
||||
UI->ApplyCommand("/run/initialize");
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
// Create empty scene
|
||||
G4String visCommand = "/vis/scene/create";
|
||||
UI->ApplyCommand(visCommand);
|
||||
|
||||
// Choose one default viewer
|
||||
// (the user can always change it later on)
|
||||
// visCommand = "/vis/open DAWNFILE";
|
||||
// visCommand = "/vis/open VRML2FILE";
|
||||
visCommand = "/vis/open OGLIX";
|
||||
UI->ApplyCommand(visCommand);
|
||||
|
||||
visCommand = "/vis/viewer/flush";
|
||||
UI->ApplyCommand(visCommand);
|
||||
visCommand = "/tracking/storeTrajectory 1";
|
||||
UI->ApplyCommand(visCommand);
|
||||
#endif
|
||||
|
||||
#ifdef G4UI_USE_XM
|
||||
// Customize the G4UIXm menubar with a macro file :
|
||||
UI->ApplyCommand("/control/execute gui.mac");
|
||||
#else
|
||||
G4cout <<"Now, please, apply beamOn command..."<<G4endl;
|
||||
#endif
|
||||
|
||||
session->SessionStart();
|
||||
delete session;
|
||||
|
||||
} else {
|
||||
|
||||
// Batch mode
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UI->ApplyCommand(command+fileName);
|
||||
|
||||
}
|
||||
|
||||
delete runManager;
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
delete visManager;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+12
-4
@@ -1,18 +1,26 @@
|
||||
# $Id: GNUmakefile,v 1.1 2002/03/26 16:46:09 dressel Exp $
|
||||
# --------------------------------------------------------------
|
||||
# $Id: GNUmakefile,v 1.5 2002/12/05 18:09:07 ribon Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
name := exampleB04
|
||||
name := CompositeCalorimeter
|
||||
|
||||
G4TARGET := $(name)
|
||||
G4EXLIB := true
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../..
|
||||
G4INSTALL = ../../../
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
all: lib bin
|
||||
CPPFLAGS +=
|
||||
|
||||
include $(G4INSTALL)/config/binmake.gmk
|
||||
|
||||
ifdef G4ANALYSIS_USE
|
||||
CPPFLAGS += `aida-config --include`
|
||||
LDFLAGS += `aida-config --lib`
|
||||
LOADLIBS += `aida-config --lib`
|
||||
endif
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
-------------------------------------------------------------------
|
||||
$Id: History,v 1.8 2002/12/11 14:32:29 ribon Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - Composite calorimeter example
|
||||
=========================================================
|
||||
|
||||
Example History file
|
||||
---------------------
|
||||
|
||||
11.12.2002 - A.Ribon (ccal-V04-01-04)
|
||||
- Some clean up and fixes, but unfortunately not yet fixed
|
||||
the problem of reading the material in the Sun platform
|
||||
(it looks like a problem with file stream).
|
||||
|
||||
06.12.2002 - G.Cosmo (ccal-V04-01-03)
|
||||
- Migrated messenger to new G4ApplicationState.
|
||||
|
||||
15.11.2002 - A.Ribon (ccal-V04-01-02)
|
||||
- Fixed problem of Anaphe with c-shell, and tested with
|
||||
geant4-04-01-ref-04
|
||||
|
||||
24.10.2002 - A.Ribon (ccal-V04-01-01)
|
||||
- Changed default physics list to QGSC, with the possibility
|
||||
of easily switching to either LHEP or QGSP.
|
||||
|
||||
24.10.2002 - A.Ribon (ccal-V04-01-00)
|
||||
- Replaced physics list with ufficial LHEP one;
|
||||
added visualization and GUI; written README file.
|
||||
|
||||
9.10.2002 - S.Banerjee
|
||||
- Put the various classes in place, and rename them.
|
||||
|
||||
30.09.2002 - M.G.Pia
|
||||
- Created directory
|
||||
|
||||
@@ -0,0 +1,603 @@
|
||||
-------------------------------------------------------------------
|
||||
$Id: README,v 1.6 2002/12/05 18:09:07 ribon Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - Composite calorimeter example
|
||||
=========================================================
|
||||
|
||||
README
|
||||
---------------------
|
||||
|
||||
CompositeCalorimeter is an example of a test-beam simulation used
|
||||
by the CMS Collaboration to validate Geant4 against real data taken
|
||||
(in 1996) in a CMS Hadron calorimeter test-beam.
|
||||
The name "Composite" for this example emphasizes that, although the
|
||||
test-beam had the goal of study the hadronic calorimeter response,
|
||||
part of the data was taken with the presence of the electromagnetic
|
||||
crystal calorimeter in front of the hadronic calorimeter, to better
|
||||
reproduce the situation as in the real CMS experiment.
|
||||
The geometry of the simulation has been setup in such a way to allow
|
||||
very easily, at run time (therefore without need of changing any code;
|
||||
see below for the details) the inclusion or exclusion of the
|
||||
electromagnetic calorimeter part.
|
||||
Although some important aspects, for a detailed comparison between
|
||||
test-beam data and simulation, like beam profile, noise, and digitization,
|
||||
have been omitted here (to avoid too many technical details),
|
||||
nevertheless, this example is able to reproduce the main features of
|
||||
most of the relevant observables as measured in the real test-beam.
|
||||
The output of this example, if the AIDA or Anaphe/Lizard environment
|
||||
has been properly setup (see below), consists of a set of histograms
|
||||
and one ntuple which are stored on a HBOOK file.
|
||||
In our opinion, the most original "lesson" which is offered by this
|
||||
advanced example for the Geant4 user is to show how the Geometry and
|
||||
the Sensitive/Hit part of the simulation is treated in a big experiment.
|
||||
Although the details of how this is done vary from experiment to
|
||||
experiment (it is worth, for instance, to compare with the Atlas-based
|
||||
advanced example lAr_calorimeter), the main driving needs and goals
|
||||
are quite general: to have consistency, but avoiding duplication
|
||||
and couplings as much as possibile, between Simulation, Reconstruction,
|
||||
and Visualization. Notice that the solution offered in this example
|
||||
by CMS could appear "overdone" for the sake of simulating only a
|
||||
relatively simple test-beam setup; but it should be kept in mind
|
||||
that the same approach is used also for the full CMS detector
|
||||
simulation, as well as for any subdetector.
|
||||
|
||||
|
||||
1. Setting up the environment variables
|
||||
---------------------------------------
|
||||
|
||||
The user should first setup, as "usual", the Geant4 environmental
|
||||
variables (in particular, the variable G4ANALYSIS_USE must be set
|
||||
if you want to have the histograms and the ntuple).
|
||||
Then the specific setup for this example should be run:
|
||||
|
||||
> source envExample.csh in the case of C-shell
|
||||
or
|
||||
> . envExample.sh in the case of bash-shell
|
||||
|
||||
The analysis part is based on:
|
||||
*** AIDA version 3.0 & Anaphe version 5.0.1 ***
|
||||
|
||||
NB) Be careful that if you want to have this analysis part,
|
||||
you have not only to set the variable G4ANALYSIS_USE but
|
||||
also to edit the above script file (envExample.csh or envExample.sh)
|
||||
and remove the comments "#" on the setup of AIDA/Anaphe,
|
||||
because, by default, the analysis is not done (the reason being
|
||||
that, in some platform, such AIDA/Anaphe setup does not work).
|
||||
|
||||
Please take a look to the Anaphe/Lizard web page
|
||||
http://anaphe.web.cern.ch/anaphe
|
||||
|
||||
|
||||
2. Sample run
|
||||
-------------
|
||||
|
||||
Once the environmental variables are setup, you can get the executable
|
||||
$G4WORKDIR/bin/$G4SYSTEM/CompositeCalorimeter
|
||||
by typing "gmake" on this directory.
|
||||
Then, you can execute it using the Geant4 macro command input file test.g4mac
|
||||
as follows:
|
||||
|
||||
> $G4WORKDIR/bin/$G4SYSTEM/CompositeCalorimeter test.g4mac
|
||||
|
||||
which simulate 10 events, each being a 100 GeV pi- incident on the
|
||||
electromagnetic crystal calorimeter followed by the hadronic calorimeter,
|
||||
without magnetic field.
|
||||
The output is the HBOOK file "ccal.his" , which can be seen either with
|
||||
Lizard (or any other AIDA-compliant package) or with Paw or Root.
|
||||
See part "8. Analysis / Histogramming" below for more details on the
|
||||
content of that file.
|
||||
If you run instead:
|
||||
|
||||
> $G4WORKDIR/bin/$G4SYSTEM/CompositeCalorimeter
|
||||
|
||||
after having setup the Geant4 visualization variables and the PATH,
|
||||
you can visualize the geometry of the apparatus, and also see some
|
||||
events. Similarly, you can get a very simple graphical user interface
|
||||
that allows to select the particle type, its energy, and the number
|
||||
of events (between a limited number of possibilities).
|
||||
For more details, see part "9. Visualization / GUI".
|
||||
|
||||
|
||||
3. Detector description
|
||||
-----------------------
|
||||
|
||||
Let's start with a brief description of the test-beam setup.
|
||||
|
||||
There are two possible configurations:
|
||||
i) HCAL only, that is only the hadronic calorimeter is present;
|
||||
ii) ECAL+HCAL, that is the electromagnetic calorimeter (ECAL)
|
||||
is placed in front of the hadronic calorimeter.
|
||||
ECAL is made of 23 cm long PbWO4 crystals (corresponding to about
|
||||
25.8 radiation lengths, and 1.1 interaction lengths); for the
|
||||
test beam a 7 x 7 = 49 matrix of crystals is used.
|
||||
HCAL is a sampling calorimeter, with plastic scintillator as sensitive
|
||||
part and copper as absorber. 28 scintillator plates were used with
|
||||
absorber of varying thickness in between, and also varying thickness
|
||||
and type of scintillator. More precisely:
|
||||
--- layer 1: 2 cm of Copper
|
||||
--- layer 2 to 7: 4 cm of Copper
|
||||
--- layer 8 to 21: 6 cm of Copper
|
||||
--- layer 22 to 27: 8 cm of Copper
|
||||
For the scintillators: 2 mm passive Plastic; 4 mm active Plastic;
|
||||
1 mm passive Plastic.
|
||||
The total length of HCAL consists of 152 cm of Copper plus 189 mm of Plastic.
|
||||
The dimension orthogonal to the beam direction is 64 cm x 64 cm.
|
||||
The ECAL and HCAL considered here are prototypes for the Central and
|
||||
Endcap calorimeters of the CMS detector (which covers the rapidity
|
||||
region |eta| < 3.0 ; CMS has also a Forward calorimeter, which covers
|
||||
the region 3.0 < |eta| < 5.0, but this part was not considered in
|
||||
this test-beam setup). Notice, however, that there are more layers
|
||||
(28 instead of 19 in the Barrel or 18 in the Endcap) of HCAL in the
|
||||
test-beam setup than in the real CMS detector, in order to study
|
||||
energy containment. Therefore, the ECAL+HCAL in the test-beam amounts
|
||||
to more than 11 radiation lengths as for the real CMS detector (the
|
||||
19 layers of the Barrel have each 6 cm of absorber, whereas the
|
||||
18 layers of the Endcap have each 6.6 cm of absorber, so that the
|
||||
number of interaction lengths are rougly the same).
|
||||
Five values of the magnetic field (parallel to the face of the scintillators)
|
||||
have been considered in the test-beam: 0.0 , 0.375 , 0.75 , 1.50 , 3.0 Tesla.
|
||||
|
||||
In order to set the magnetic field, you have to edit the file
|
||||
dataglobal/fmap.tb96
|
||||
and change the first number (which appears in the third line of
|
||||
that file, on the first column; the unit being Tesla):
|
||||
#. Field map
|
||||
*DO FLDM
|
||||
0.0 9 652.0
|
||||
for example, if you want a magnetic field of 3.0 Tesla the last
|
||||
line must be set as follows:
|
||||
3.0 9 652.0
|
||||
|
||||
In this test-beam setup, at the back of ECAL, there is also some
|
||||
material for support and readout, which has been considered in the
|
||||
simulation. For the HCAL, only the fibres are close to the test-beam,
|
||||
and because they have the same composition as the scintillators
|
||||
they are adequately represented in the simulation; the remaining
|
||||
of the readout, including the photomultipliers, are in readout boxes
|
||||
far away from the HCAL, and hence are not present in the simulation.
|
||||
|
||||
Let's summarizes now the geometry description of the simulation.
|
||||
As said in the introduction, this part is the most original and
|
||||
important of this example, but it is quite complex and can be fully
|
||||
appreciated only in the context of the CMS software framework, in
|
||||
particular in the relation between Simulation, Reconstruction, and
|
||||
Visualization. Therefore we limit ourself to only few considerations,
|
||||
pointing to the internal CMS documentation for more details.
|
||||
|
||||
--- In order to share the same geometrical and physical information
|
||||
about CMS between Simulation, Reconstruction, and Visualization,
|
||||
avoiding inconsistencies, duplications, and unnecessary dependecies,
|
||||
all these information is store, once for all, in common databases
|
||||
(typically in XML format), instead of putting them inside C++ classes,
|
||||
as usually done in simpler detector descriptions (in most of the
|
||||
the Geant4 examples, novice or advanced, the geometry information
|
||||
is kept inside the concrete class which inherits from
|
||||
G4VUserDetectorConstruction). For simplicity, in this example,
|
||||
these "databases" are nothing more than ASCII files:
|
||||
|
||||
datageom/ : tbhcal96.geom, tbhcal96hcal.geom, tbhcal96xtal.geom
|
||||
store the information about the experimental Hall,
|
||||
the HCAL, and the ECAL, respectively.
|
||||
|
||||
dataconf/ : g4testbeamhcal96.conf, testbeamhcal96.conf
|
||||
store the information about which configuration
|
||||
(HCAL only, or ECAL+HACL) is considered, in the
|
||||
Simulation and Reconstruction, respectively.
|
||||
|
||||
dataglobal/ : fmap.tb96, material.cms, rotation.cms
|
||||
The first one is the magnetic field map (how the
|
||||
intensity of the magnetic field, in the direction
|
||||
orthogonal to the beam direction, varies along
|
||||
the beam axis). The second one, material.cms,
|
||||
keeps the full collection of all materials used in
|
||||
the CMS detector (not only in the calorimeters,
|
||||
although we are simulating only them in this example!).
|
||||
The third one, rotation.cms, collects a set of useful
|
||||
rotation parameters (angles).
|
||||
|
||||
datavis/ : tbhcal96.vis, tbhcal96hcal.vis, tbhcal96xtal.vis
|
||||
visualization information for, respectively, the
|
||||
experimental Hall, HCAL, and ECAL.
|
||||
|
||||
--- In order to allow an high degree of flexibility, at the geometry
|
||||
level the user can choose which subsystem of the detector setup
|
||||
should be simulated and can activate or deactivate the sensitive
|
||||
parts, subsystem by subsystem. This can be done at run time,
|
||||
by modifying one of the above database information, without need
|
||||
of putting the hands on the code, recompiling, etc.
|
||||
|
||||
--- There are two "parallel geometry factories": one described by "core"
|
||||
classes, which are independent from the Simulation (and therefore
|
||||
can be used, for instance, by the Reconstruction); and one which
|
||||
is specific of the Simulation. In the latter case (Geant4 side of
|
||||
the geometry model), all the geometry factories are derived from the
|
||||
base class CCalG4Albe. Furthermore, using double inheritance, each
|
||||
of them derives also from the counterpart in the "core" hierarchy.
|
||||
The design of the CCalG4Able class helps a modular approach and easy
|
||||
interchanging at the level of subdetectors, allowing a straightforward
|
||||
transition from the simulation of the entire CMS detector to that of
|
||||
just a part of it, or to a test-beam geometry, as indeed in this example.
|
||||
Of course this modular, flexible, and general approach does not come
|
||||
for free: the price to pay here is its complexity, which would be
|
||||
otherwise unjustified if we limited ourself to the pure simulation
|
||||
of a relatively simple test-beam setup.
|
||||
|
||||
--- See "10. Classes Overview" below for a schematic summary of the
|
||||
various classes involved in the Geometry description of this example.
|
||||
|
||||
|
||||
4. Physics processes
|
||||
--------------------
|
||||
|
||||
By the default, one of the ufficial High Energy Physics List for
|
||||
Calorimetry, QGSC, is used in this example. However, it is
|
||||
very easy to use instead either LHEP or QGSP. To do so, it is
|
||||
enough to copy one file (and then, of course, rebuild the executable)
|
||||
as follows:
|
||||
> cp src/CCalPhysicsList.cc-LHEP src/CCalPhysicsList.cc
|
||||
if you want to use LHEP, or
|
||||
> cp src/CCalPhysicsList.cc-QGSP src/CCalPhysicsList.cc
|
||||
if you want to use QGSP.
|
||||
(The fact that by default QGSC is used means that the file
|
||||
src/CCalPhysicsList.cc that you find in the Repository is
|
||||
a copy of src/CCalPhysicsList.cc-QGSC)
|
||||
|
||||
Notice that, for most of the cases (and certainly also in this case
|
||||
in which we don't even take into account the beam profile, noise
|
||||
and digitization!) the faster LHEP Physics List would be good enough
|
||||
for calorimetry studies. However, we prefer to use, as default, the
|
||||
more sophisticated (but slower) QGSP Physics List for the learning
|
||||
purposes of this example.
|
||||
|
||||
Please refer to the Web page:
|
||||
|
||||
http://cmsdoc.cern.ch/~hpw/GHAD/HomePage/index.html
|
||||
|
||||
for more information on these (and others) Physics Lists.
|
||||
Please notice that, for the time being, some classes, which can be
|
||||
downloaded from the above Web page, have to be included in the
|
||||
include/ and src/ subdirectories of this example. However, soon
|
||||
(probably with the next December release) these classes will be
|
||||
distributed with Geant4 and therefore their explicit inclusion
|
||||
in the example will no longer be necessary.
|
||||
|
||||
|
||||
5. Particle Generator
|
||||
---------------------
|
||||
|
||||
The 1996 test-beam has been taken with the following particles:
|
||||
--- 225 GeV muons (for calibration)
|
||||
--- 10 to 300 GeV pions
|
||||
--- 10 to 300 GeV electrons
|
||||
therefore the standard Geant4 Particle Gun has been used as primary
|
||||
generator. Notice that, for the sake of keeping the example not too
|
||||
complicated, the proper simulation of the beam profile and
|
||||
beam contamination have been neglected.
|
||||
|
||||
|
||||
6. Hits
|
||||
-------
|
||||
|
||||
In CMS there are two groups of hits: Tracker-like and Calorimeter-like.
|
||||
Only the latter one appears in this example.
|
||||
For the same reasons, as seen for the Geometry, of consistency without
|
||||
duplication of information and unnecessary coupling between Simulation,
|
||||
Reconstruction, and Visualization, the simulation calorimeter hit class,
|
||||
CCalG4Hit, doubly inherits from the common Geant4 abstract class for
|
||||
all hits, G4VHit, and from the "core" (i.e. simulation independent)
|
||||
CMS calorimeter hit class, CCalHit.
|
||||
A new Hit object is created
|
||||
- for each new particle entering the calorimeter;
|
||||
- for each detector unit (i.e cristal or fiber or scintillator layer);
|
||||
- for each nanosecond of the shower development;
|
||||
The information stored in each CCalHit object is the following:
|
||||
- Entry : local coordinates of the entrance point of the particle
|
||||
in the unit where the shower starts;
|
||||
- the TrackID : Identification number of the incident particle;
|
||||
- the IncidentEnergy : kinetic energy of that incident particle;
|
||||
- the UnitID : the identification number of the detector unit
|
||||
(crystal, or fiber, or scintillator layer);
|
||||
- the TimeSlice : the time interval, in nanoseconds, in which the
|
||||
hit has been created;
|
||||
- the EnergyDeposit : the energy deposit in this hit.
|
||||
Notice that all hit objects created for a given shower have the same
|
||||
values for the first three pieces of information.
|
||||
|
||||
|
||||
No Noise and Digitization
|
||||
--------------------------
|
||||
|
||||
In order to keep the complexity of this example to a reasonable
|
||||
level, both noise and digitization effects have not been included.
|
||||
|
||||
|
||||
7. User Actions
|
||||
----------------
|
||||
|
||||
In this example. there have been used the following User Actions:
|
||||
|
||||
--- G4UserRunAction (the derived, concrete class is CCalRunAction):
|
||||
it is used to invoke the Analysis object at the beginning of
|
||||
the Run, to instantiate it and passing it the Run number, and
|
||||
at the end of the Run, to inform it that the Run is finished
|
||||
and therefore the histograms, ntuples, etc. must be closed.
|
||||
|
||||
--- G4UserEventAction (the derived, concrete class is CCalEndOfEventAction):
|
||||
it is used to examine, at the end of the Event, all collected
|
||||
(calorimeter) hits, extract the various observables which are
|
||||
interesting (to the goal of understanding things like: the effect
|
||||
of magnetic field on scintiallator; choice of the absorber
|
||||
thickness by optimizing resolution versus containment; impact of
|
||||
the absorber depth in the energy caontainment; electromagnetic
|
||||
calorimeter contribution in the electron - pion separation; etc.)
|
||||
and finally call the analysis object to store such selected
|
||||
information on histograms and/or in the ntuple.
|
||||
The name of the class "CCalEndOfEventAction" is motivated by the
|
||||
fact that at the beginning of the Event nothing is done.
|
||||
|
||||
--- G4UserSteppingAction (the derived, concrete class is CCalSteppingAction):
|
||||
it is used to extract some "unphysical" information (that is not
|
||||
experimentally measurable, although interesting for a better
|
||||
understanding of the shower development), namely the lateral profile
|
||||
and the deposit as a function of the time (see "8.Analysis/Histogramming
|
||||
for more details"), which is available only from simulation, and then,
|
||||
at the end of Event, the analysis object is invoked to store such
|
||||
information on histograms.
|
||||
Please notice that the stepping action is not used to create hits.
|
||||
|
||||
--- G4UserStackingAction (the derived, concrete class is CCalStackingAction):
|
||||
it is used to ensure that the same track ID of the particle
|
||||
originating a shower appears in all hits (calorimeter hit objects
|
||||
of class CCalHit) of the shower, in any calorimeter part.
|
||||
|
||||
|
||||
8. Analysis / Histogramming
|
||||
----------------------------
|
||||
|
||||
The analysis part of CompositeCalorimeter is kept in class CCalAnalysis,
|
||||
and is based on the AIDA interfaces and their implementation in Anaphe:
|
||||
*** AIDA version 3.0 & Anaphe version 5.0.1 ***
|
||||
please look at their documentation for more details:
|
||||
http://anaphe.web.cern.ch/anaphe
|
||||
Both the histograms and the ntuple are saved at the end of the run in the
|
||||
HBOOK file "ccal.his". You can than analyze offline the contents of such
|
||||
a file, using Lizard (or any other AIDA-compliant package) or with
|
||||
Paw or Root. Please note that in a multiple run session, the last run
|
||||
always override the HBOOK file.
|
||||
What the histograms and the variables of the ntuple represent is
|
||||
explained below:
|
||||
|
||||
Histograms 100 - 127 : energy deposit (in GeV) in the sensitive part
|
||||
(plastic scintillator layer) of one Hadronic
|
||||
calorimeter module (there are 28 modules, numbered
|
||||
from 0 to 27, and the corresponding histogram has
|
||||
ID = 100 + number of module).
|
||||
Ntuple variables hcal0 - hcal27 : provide the same information.
|
||||
|
||||
Histograms 200 - 248 : energy deposit (in GeV) in one crystal
|
||||
electromagnetic towers (there are a matrix of
|
||||
7 x 7 = 49 towers, numbered from 0 to 48, and
|
||||
the corresponding histogram has
|
||||
ID = 200 + number of tower).
|
||||
Ntuple variables ecal0 - ecal48 : provide the same information.
|
||||
|
||||
Histograms 300 - 339 : total energy deposit (in GeV) in any
|
||||
electromagnetic crystal tower or hadronic module
|
||||
(either in a sensitive or insensitive layer)
|
||||
in one of the 40 nanosecond time slices: in other
|
||||
words, histogram 300+I , where I = 0 - 39,
|
||||
contains the total deposit energy between
|
||||
I and I+1 nanoseconds after the "collision".
|
||||
(Notice that the time window considered,
|
||||
40 nanoseconds, is larger than the LHC
|
||||
bunch-crossing of 25 nanoseconds.)
|
||||
|
||||
Histograms 400 - 469 : energy profile (in GeV), summed over all layers
|
||||
sensitive (plastic scintillator) and insensitive
|
||||
(copper absorber), as a function of the radial
|
||||
distance (in centimeter) from the beam axis
|
||||
( ID histo = 400 + radial distance in cm ).
|
||||
|
||||
Histogram 4000 : total energy deposit (in GeV) in the sensitive parts
|
||||
of either the electromagnetic or hadronic calorimeters.
|
||||
Ntuple variable edep provides the same information.
|
||||
|
||||
Other ntuple variables are the following:
|
||||
--- elab : energy (in GeV) of the incident particle.
|
||||
--- xpos, ypos, zpos : position (in mm) from where the projectile
|
||||
has been shot.
|
||||
--- edec, edhc : total energy deposit (in GeV) in the sensitive
|
||||
parts of, respectively, the electromagnetic
|
||||
and hadronic calorimeters. Notice that their
|
||||
sum edec+edhc coincides with edep
|
||||
|
||||
Notice that lateral profile (400-469) and time-slice (300-339)
|
||||
histograms show purely Monte Carlo quantities, which cannot be
|
||||
experimentally measured.
|
||||
Please be careful that the range of the histograms has been chosen
|
||||
in such a way to contain most of the entries, but only few histograms
|
||||
fill a large fraction of that range, whereas the remaining majority
|
||||
fill only the first few bins (corresponding to lower energy), and,
|
||||
therefore, when plotted they look almost empty, but they are not,
|
||||
and the results are sensible. We suggest to plot the ntuple's variables,
|
||||
rather than the histograms, when the same information is available
|
||||
from the ntuple.
|
||||
|
||||
|
||||
9. Visualization / GUI
|
||||
-----------------------
|
||||
|
||||
If you setup one of the following Geant4 environmental variables:
|
||||
G4VIS_USE_DAWN
|
||||
G4VIS_USE_VRML
|
||||
G4VIS_USE_OPENGLX
|
||||
which correspond to the use of DAWN, VRML, and OPENGLX, respectively,
|
||||
as visualization engine of Geant4, and set properly the corresponding
|
||||
PATH as well, it is then possible to visualize the detector and also
|
||||
some events.
|
||||
To do so, you have to run
|
||||
> $G4WORKDIR/bin/$G4SYSTEM/CompositeCalorimeter
|
||||
without input file: you then see the detector; after that,
|
||||
you can select the particle gun and its energy, in the
|
||||
case you want something different from the the default
|
||||
(which is a 100 GeV pi-), for example:
|
||||
Idle> /gun/particle e-
|
||||
Idle> /gun/energy 200 GeV
|
||||
and then run some events, for example:
|
||||
Idle> /run/beamOn 3
|
||||
|
||||
Notice that, by default, OGLIX is used for the visualization,
|
||||
because it is quite fast and it does not produce any files in
|
||||
output. However, you can always choose something else, for example
|
||||
VRML2FILE or DAWNFILE, either interactively as follows:
|
||||
Idle> /vis/open DAWNFILE
|
||||
or by changing the default, by editing the file (main program)
|
||||
CompositeCalorimeter.cc and comment/uncomment the lines
|
||||
in such a way to have, at the end:
|
||||
visCommand = "/vis/open DAWNFILE";
|
||||
// visCommand = "/vis/open VRML2FILE";
|
||||
// visCommand = "/vis/open OGLIX";
|
||||
|
||||
The tracks that are shown include both charged and neutral particles
|
||||
of any momentum: if you want instead only charged, or only neutral,
|
||||
then you have simply to edit src/CCalEndOfEventAction.cc
|
||||
at the end of the method EndOfEventAction and uncomment the line
|
||||
where the condition on the charge is made (it should then be
|
||||
straighforward to eventual add some other conditions, for example
|
||||
if you want to see only those particles that satisfy certain
|
||||
kinematic conditions).
|
||||
|
||||
Rather than to specify "by hand" the type of particle gun,
|
||||
its energy, and the number of events, it is possible to have
|
||||
a very simple GUI (graphical user interface) from which to make
|
||||
such choices, between a limited set of possibilities, via menus.
|
||||
Such GUI is based on Motif XmCommand widget, but it would be
|
||||
straightforward, eventually, to make the necessary changes
|
||||
in order to use a different one.
|
||||
The only thing you need to do to get the GUI is to setup
|
||||
the following Geant4 environmental variables:
|
||||
G4UI_BUILD_XM_SESSION=1
|
||||
G4UI_USE_XM=1
|
||||
Then, if you run the executable without specifying a macro file
|
||||
(like test.g4mac):
|
||||
> $G4WORKDIR/bin/$G4SYSTEM/CompositeCalorimeter
|
||||
a window automatically pops out, with the menus where you
|
||||
can make your selection of particle type, energy, and number
|
||||
of events to be run.
|
||||
|
||||
|
||||
10. Classes Overview
|
||||
---------------------
|
||||
|
||||
This is a schematic overview of the classes defined in this example:
|
||||
|
||||
CCalPrimaryGeneratorAction
|
||||
CCalPrimaryGeneratorMessenger
|
||||
User action for primaries generator.
|
||||
|
||||
CCalPhysicsList
|
||||
EMPhysics
|
||||
G4EMBuilder
|
||||
G4ElectroNuclearBuilder
|
||||
G4HadronQEDBuilder
|
||||
G4LEPNeutronBuilder
|
||||
G4LEPPiKBuilder
|
||||
G4LEPProtonBuilder
|
||||
G4LHEPNeutronBuilder
|
||||
G4LHEPPiKBuilder
|
||||
G4LHEPProtonBuilder
|
||||
G4MiscLHEPBuilder
|
||||
G4NeutronBuilder
|
||||
G4NeutronHPBuilder
|
||||
G4PiKBuilder
|
||||
G4PrecoNeutronBuilder
|
||||
G4PrecoProtonBuilder
|
||||
G4ProtonBuilder
|
||||
G4QGSCNeutronBuilder
|
||||
G4QGSCPiKBuilder
|
||||
G4QGSCProtonBuilder
|
||||
G4QGSPNeutronBuilder
|
||||
G4QGSPPiKBuilder
|
||||
G4QGSPProtonBuilder
|
||||
G4StoppingHadronBuilder
|
||||
G4VNeutronBuilder
|
||||
G4VPiKBuilder
|
||||
G4VProtonBuilder
|
||||
GeneralPhysics
|
||||
HadronPhysicsLHEP
|
||||
HadronPhysicsQGSC
|
||||
HadronPhysicsQGSP
|
||||
IonPhysics
|
||||
MuonPhysics
|
||||
Determination of particles and processes active in this example.
|
||||
The following three major Physics Lists for High Energy
|
||||
Calorimetry can been selected: LHEP, QGSC, QGSP.
|
||||
Most of these classes will be soon moved in the Geant4 kernel.
|
||||
Please refer to the Web page:
|
||||
http://cmsdoc.cern.ch/~hpw/GHAD/HomePage/index.html
|
||||
for more information of these (and others) Physics Lists,
|
||||
and for eventual updated versions.
|
||||
|
||||
CCalDetectorConstruction
|
||||
CCalAMaterial
|
||||
CCalDataSet
|
||||
CCalDetector
|
||||
CCalEcal
|
||||
CCalEcalOrganization
|
||||
CCalG4Able
|
||||
CCalG4Ecal
|
||||
CCalG4Hall
|
||||
CCalG4Hcal
|
||||
CCalGeometryConfiguration
|
||||
CCalHall
|
||||
CCalHcal
|
||||
CCalHcalOrganization
|
||||
CCalMagneticField
|
||||
CCalMaterial
|
||||
CCalMaterialFactory
|
||||
CCalRotationMatrixFactory
|
||||
CCalVOrganization
|
||||
CCalVisManager
|
||||
CCalVisualisable
|
||||
CCaloOrganization
|
||||
CCalutils
|
||||
Geometry and material definitions for the detector.
|
||||
Notice in particular that:
|
||||
CCalHall, CCalEcal, CCalHcal derive from CCalDetector;
|
||||
CCalG4Hall, CCalG4Ecal, CCalG4Hcal derive from the above
|
||||
corresponding classes and from CCalG4Able;
|
||||
CCalEcalOrganization, CCalHcalOrganization derive from
|
||||
CCalVOrganization : each sensitive cell has an unique
|
||||
number for detector organization (this is a software
|
||||
ID not an hardware/electronic one).
|
||||
|
||||
CCalHit
|
||||
CCalG4Hit
|
||||
CCalG4HitCollection
|
||||
CCalSDList
|
||||
CCalSensAssign
|
||||
CCalSensitiveConfiguration
|
||||
CCalSensitiveDetectors
|
||||
CCaloSD
|
||||
Hit and Sensitive Detectors.
|
||||
Notice in particular that:
|
||||
CCalG4Hit derives from G4VHit and CCalHit;
|
||||
CCaloSD derives from G4VSensitiveDetector.
|
||||
|
||||
CCalAnalysis
|
||||
Analysis manager class which uses Anaphe.
|
||||
|
||||
CCalRunAction
|
||||
User run action class.
|
||||
|
||||
CCalEndOfEventAction
|
||||
User event action class.
|
||||
|
||||
CCalStackingAction
|
||||
User Stacking action class.
|
||||
|
||||
CCalSteppingAction
|
||||
User Stepping action class.
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#. Configuration file to select the G4 Geometry properties
|
||||
#. Name Base Filename IsSensitive
|
||||
"HcalTB96" "tbhcal96" 1
|
||||
|
||||
#.============= Hadron Calorimeter
|
||||
|
||||
"HadronCalorimeter" "tbhcal96hcal" 1
|
||||
|
||||
#.============= CrystalMatrixModule
|
||||
"CrystalMatrixModule" "tbhcal96xtal" 1
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#. Configuration file to select the Geometry
|
||||
#. Name Base Filename Construct?
|
||||
"HcalTB96" "tbhcal96" 1
|
||||
|
||||
#.============= Hadron Calorimeter
|
||||
|
||||
"HadronCalorimeter" "tbhcal96hcal" 1
|
||||
|
||||
#.============= CrystalMatrixModule
|
||||
"CrystalMatrixModule" "tbhcal96xtal" 1
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#. HCAL 96 Test beam description fil
|
||||
*DO HcalTB96
|
||||
#.Experimentall hall size
|
||||
#. Material dy/2 dx/2
|
||||
"Air" 375.0 1384.0
|
||||
*ENDDO
|
||||
@@ -0,0 +1,55 @@
|
||||
#. HCAL 96 Test beam description file for HCAL part
|
||||
*DO HCal
|
||||
#. Mother volume of HCal
|
||||
#. Material dy/2 dx/2 Xpos
|
||||
"Air" 375.0 1013.0 361.0
|
||||
#. Boxes
|
||||
#. Material Number dy/2 dx/2 Wall_T Positions
|
||||
"Aluminium" 2 375.0 490.0 4.0 -523.0 509.0
|
||||
#. Scintillator Layers
|
||||
#. Type_Name Number
|
||||
#. Type Mother Xpos Type Mother Xpos
|
||||
"ScintillatorLayer" 28
|
||||
2 0 -427.0 1 0 -393.5
|
||||
0 0 -351.5 0 0 -314.5
|
||||
0 0 -277.5 0 0 -238.5
|
||||
0 0 -201.5 0 0 -164.5
|
||||
0 0 -95.5 0 0 -27.5
|
||||
0 0 39.5 0 0 107.5
|
||||
0 0 175.5 0 0 243.5
|
||||
0 0 318.5 0 0 388.5
|
||||
0 -1 -14.5 0 1 -412.5
|
||||
0 1 -344.5 0 1 -274.5
|
||||
0 1 -205.5 0 1 -136.5
|
||||
2 1 -47.0 1 1 45.5
|
||||
2 1 138.0 1 1 232.5
|
||||
2 1 328.0 0 -1 1009.5
|
||||
#. Absorber Layers
|
||||
#. Type_Name Number
|
||||
#. Type Mother Xpos Type Mother Xpos
|
||||
"AbsorberLayer" 28
|
||||
0 0 -410.0 1 0 -370.0
|
||||
1 0 -333.0 1 0 -296.0
|
||||
1 0 -257.0 1 0 -220.0
|
||||
1 0 -183.0 3 0 -129.0
|
||||
3 0 -61.0 3 0 6.0
|
||||
3 0 74.0 3 0 142.0
|
||||
3 0 210.0 3 0 285.0
|
||||
3 0 355.0 3 0 429.0
|
||||
3 1 -446.0 3 1 -378.0
|
||||
3 1 -308.0 3 1 -239.0
|
||||
3 1 -170.0 4 1 -92.0
|
||||
4 1 -1.0 4 1 93.0
|
||||
4 1 186.0 4 1 283.0
|
||||
2 1 358.0 2 1 438.0
|
||||
#. Absorber
|
||||
#. Material Number dY/2 Half thicknesses
|
||||
"Copper" 5 330.0 10.0 15.0 20.0 30.0 40.0
|
||||
#. Scintillator
|
||||
#. Material Wrapper Plastic Number
|
||||
#. dY/2 dX/2(L) dX/2(W) dX/2(FP) dX/2(BP) dX/2(Sc)
|
||||
"Scintillator" "Aluminium" "Polystyrene" 3
|
||||
320.0 3.5 0.0 0.5 1.0 2.0
|
||||
320.0 6.5 0.0 0.5 1.0 5.0
|
||||
330.0 5.0 0.5 0.5 0.5 2.0
|
||||
*ENDDO
|
||||
@@ -0,0 +1,18 @@
|
||||
#. HCAL 96 Test beam description file for crystal matrix
|
||||
*DO CrystalMatrix
|
||||
#. Envelope
|
||||
#. Material Width Length Position in space and Rotation angles
|
||||
"Air" 320.0 682.0
|
||||
-1033.0 0.0 0.0 90.0 90.0 0.0 0.0 90.0 0.0
|
||||
#. -1033.0 0.0 0.0 90.0 270.0 0.0 0.0 90.0 180.0
|
||||
#. Layer
|
||||
#. Material Number Radius Angle FrontLength Parameters
|
||||
"Air" 7 1500.0 0.01386 100.0
|
||||
10.5 11.9 73.5 85.0 115.5
|
||||
#. Crystal
|
||||
#. Material Number Length Toler. Parameters
|
||||
"E_PbWO4" 7 232.0 0.5 10.25 11.90 10.25 11.90 115.0
|
||||
#. Support
|
||||
#. Material dX dY dZ dist
|
||||
"Copper" 170.0 5.5 37.0 20.0
|
||||
*ENDDO
|
||||
@@ -0,0 +1,13 @@
|
||||
#. Field map
|
||||
*DO FLDM
|
||||
0.0 9 652.0
|
||||
-480.0 0.0012125 0.80
|
||||
-240.0 0.0015625 0.93
|
||||
80.0 0.0010 0.82
|
||||
260.0 0.0003889 0.90
|
||||
620.0 0.0 1.00
|
||||
800.0 -0.0003333 1.20
|
||||
1120.0 -0.0010 1.70
|
||||
1360.0 -0.0015625 2.30
|
||||
2026.0 -0.0012125 1.85
|
||||
*ENDDO
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,112 @@
|
||||
*.-- rotation.tz
|
||||
*LOG OFF
|
||||
*DO ROTM 0 -U -A4CW -C1/80 #.Title for CMS100 created on 940722 at 1159
|
||||
#. Thet1 Phi1 Thet2 Phi2 Thet3 Phi3
|
||||
:000D 90.0 0.0 90.0 90.0 0.0 0.0 #. (x,y,z) => ( x, y, z)
|
||||
:YZXD -90.0 0.0 -90.0 90.0 0.0 0.0 #. (x,y,z) => (-x,-y, z)
|
||||
:180X 90.0 0.0 90.0 -90.0 180.0 0.0 #. (x,y,z) => ( x,-y,-z)
|
||||
:180D 90.0 180.0 90.0 90.0 180.0 0.0 #. (x,y,z) => (-x, y,-z)
|
||||
:180Z 90.0 90.0 -90.0 0.0 0.0 0.0 #. (x,y,z) => ( y,-x, z)
|
||||
:Z180 -90.0 90.0 90.0 0.0 0.0 0.0 #. (x,y,z) => (-y, x, z)
|
||||
:90ZD -90.0 0.0 0.0 0.0 90.0 90.0 #. (x,y,z) => (-x, z, y)
|
||||
:90XD 90.0 90.0 0.0 0.0 90.0 0.0 #. (x,y,z) => ( y, z, x)
|
||||
:90DX -90.0 90.0 180.0 0.0 90.0 0.0 #. (x,y,z) => (-y,-z, x)
|
||||
:20XD 90.0 70.0 0.0 0.0 90.0 -20.0 #. (x,y,z) => ( ?, z, ?)
|
||||
:60XD 90.0 110.0 0.0 0.0 90.0 20.0 #. (x,y,z) => ( ?, z, ?)
|
||||
:90YZ 90.0 -90.0 180.0 0.0 90.0 0.0 #. (x,y,z) => (-y,-z, x)
|
||||
:90YD 0.0 0.0 90.0 0.0 90.0 90.0 #. (x,y,z) => ( z, x, y)
|
||||
:90XY 0.0 0.0 90.0 -90.0 90.0 0.0 #. (x,y,z) => ( z,-y, x)
|
||||
:90YX 180.0 0.0 90.0 90.0 90.0 0.0 #. (x,y,z) => (-z, y, x)
|
||||
:YXZ2 90.0 90.0 0.0 90.0 90.0 0.0 #. (x,y,z) => ( y, z, x)
|
||||
:YXZ4 90.0 -90.0 90.0 0.0 0.0 0.0 #. (x,y,z) => (-y, x, z)
|
||||
:YXZ5 90.0 -90.0 90.0 180.0 180.0 0.0 #. (x,y,z) => (-y,-x,-z)
|
||||
:R000 90.0 0.0 90.0 90.0 0.0 0.0 #. (x,y,z) => ( x, y, z)
|
||||
:R005 90.0 5.0 90.0 95.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R010 90.0 10.0 90.0 100.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R015 90.0 15.0 90.0 105.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R020 90.0 20.0 90.0 110.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R025 90.0 25.0 90.0 115.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R030 90.0 30.0 90.0 120.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R035 90.0 35.0 90.0 125.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R040 90.0 40.0 90.0 130.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R045 90.0 45.0 90.0 135.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R050 90.0 50.0 90.0 140.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R055 90.0 55.0 90.0 145.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R060 90.0 60.0 90.0 150.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R065 90.0 65.0 90.0 155.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R070 90.0 70.0 90.0 160.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R075 90.0 75.0 90.0 165.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R080 90.0 80.0 90.0 170.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R085 90.0 85.0 90.0 175.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R090 90.0 90.0 90.0 180.0 0.0 0.0 #. (x,y,z) => ( y,-x, z)
|
||||
:R095 90.0 95.0 90.0 185.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R100 90.0 100.0 90.0 190.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R105 90.0 105.0 90.0 195.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R110 90.0 110.0 90.0 200.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R115 90.0 115.0 90.0 205.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R120 90.0 120.0 90.0 210.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R125 90.0 125.0 90.0 215.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R130 90.0 130.0 90.0 220.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R135 90.0 135.0 90.0 225.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R140 90.0 140.0 90.0 230.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R145 90.0 145.0 90.0 235.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R150 90.0 150.0 90.0 240.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R155 90.0 155.0 90.0 245.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R160 90.0 160.0 90.0 250.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R165 90.0 165.0 90.0 255.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R170 90.0 170.0 90.0 260.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R175 90.0 175.0 90.0 265.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R180 90.0 180.0 90.0 270.0 0.0 0.0 #. (x,y,z) => (-x,-y, z)
|
||||
:R185 90.0 185.0 90.0 275.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R190 90.0 190.0 90.0 280.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R195 90.0 195.0 90.0 285.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R200 90.0 200.0 90.0 290.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R205 90.0 205.0 90.0 295.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R210 90.0 210.0 90.0 300.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R215 90.0 215.0 90.0 305.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R220 90.0 220.0 90.0 310.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R225 90.0 225.0 90.0 315.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R230 90.0 230.0 90.0 320.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R235 90.0 235.0 90.0 325.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R240 90.0 240.0 90.0 330.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R245 90.0 245.0 90.0 335.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R250 90.0 250.0 90.0 340.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R255 90.0 255.0 90.0 345.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R260 90.0 260.0 90.0 350.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R265 90.0 265.0 90.0 355.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R270 90.0 270.0 90.0 0.0 0.0 0.0 #. (x,y,z) => (-y, x, z)
|
||||
:R275 90.0 275.0 90.0 5.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R280 90.0 280.0 90.0 10.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R285 90.0 285.0 90.0 15.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R290 90.0 290.0 90.0 20.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R295 90.0 295.0 90.0 25.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R300 90.0 300.0 90.0 30.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R305 90.0 305.0 90.0 35.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R310 90.0 310.0 90.0 40.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R315 90.0 315.0 90.0 45.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R320 90.0 320.0 90.0 50.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R325 90.0 325.0 90.0 55.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R330 90.0 330.0 90.0 60.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R335 90.0 335.0 90.0 65.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R340 90.0 340.0 90.0 70.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R345 90.0 345.0 90.0 75.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R350 90.0 350.0 90.0 80.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R355 90.0 355.0 90.0 85.0 0.0 0.0 #. (x,y,z) => ( ?, ?, z)
|
||||
:R360 90.0 360.0 90.0 90.0 0.0 0.0 #. (x,y,z) => ( x, y, z)
|
||||
:Z1YX 90.0 90.0 0.0 0.0 90.0 0.0 #. (x,y,z) => ( y, z, x)
|
||||
:Z2XY 90.0 0.0 180.0 0.0 90.0 90.0 #. (x,y,z) => ( x,-z, y)
|
||||
:Z3XY -90.0 0.0 0.0 0.0 90.0 90.0 #. (x,y,z) => (-x, z, y)
|
||||
:Z4YX 90.0 90.0 180.0 0.0 -90.0 0.0 #. (x,y,z) => ( y,-z,-x)
|
||||
:Z5YX -90.0 90.0 0.0 0.0 -90.0 0.0 #. (x,y,z) => (-y, z,-x)
|
||||
:Z6XY -90.0 0.0 180.0 0.0 -90.0 90.0 #. (x,y,z) => (-x,-z,-y)
|
||||
:Z7XY 90.0 0.0 0.0 0.0 -90.0 90.0 #. (x,y,z) => ( x, z,-y)
|
||||
:Z8YX -90.0 90.0 180.0 0.0 90.0 0.0 #. (x,y,z) => (-y,-z, x)
|
||||
:270Y 0.0 0.0 90.0 90.0 90.0 180.0 #. (x,y,z) => (-z, y, x)
|
||||
:90XYZ 180.0 0.0 90.0 270.0 90.0 180.0 #. (x,y,z) => (-z,-y,-x)
|
||||
:90ZX 180.0 0.0 90.0 0.0 90.0 270.0 #. (x,y,z) => (-z, x,-y)
|
||||
:90ZXY 180.0 0.0 90.0 180.0 90.0 90.0 #. (x,y,z) => (-z,-x, y)
|
||||
:270YX 0.0 0.0 90.0 180.0 90.0 270.0 #. (x,y,z) -> ( z,-x,-y)
|
||||
:Y100 95.7296 0.0 90.0 90.0 5.7296 0.0 #. rotn by 100mr around y
|
||||
:9NYX 0.0 0.0 90.0 90.0 -90.0 0.0 #. (x,y,z) => ( z, y,-x)
|
||||
:F100 -95.7296 0.0 -90.0 90.0 -5.7296 0.0 #. flip z + rotn 100mr y
|
||||
*ENDDO
|
||||
@@ -0,0 +1,9 @@
|
||||
#. 96 Hcal Test beamm visualisation attributtes
|
||||
#. visType visualisable? R G B WireFrame
|
||||
"Sensitive" 1 0.0 0.0 1.0 0
|
||||
"Electronics" 0 0.0 0.0 0.0 1
|
||||
"Support" 0 0.0 0.0 0.2 1
|
||||
"Cable" 0 0.8 0.8 0.1 1
|
||||
"Absorber" 1 0.3 0.3 0.0 0
|
||||
"OtherServices" 0 0.2 0.4 0.2 1
|
||||
"PseudoVolumes" 0 0.2 0.4 0.2 1
|
||||
@@ -0,0 +1,9 @@
|
||||
#. HCal visualisation attributtes
|
||||
#. visType visualisable? R G B WireFrame
|
||||
"Sensitive" 1 0.0 0.0 1.0 0
|
||||
"Electronics" 0 0.0 0.0 0.0 1
|
||||
"Support" 0 0.0 0.0 0.2 1
|
||||
"Cable" 0 0.8 0.8 0.1 1
|
||||
"Absorber" 1 0.6 0.1 0.1 0
|
||||
"OtherServices" 0 0.2 0.4 0.2 1
|
||||
"PseudoVolumes" 0 0.2 0.4 0.2 1
|
||||
@@ -0,0 +1,9 @@
|
||||
#. CrystalModule visualisation attributtes
|
||||
#. visType visualisable? R G B WireFrame
|
||||
"Sensitive" 1 1.0 0.0 0.0 0
|
||||
"Electronics" 0 0.0 0.0 0.0 1
|
||||
"Support" 1 0.0 0.5 0.0 1
|
||||
"Cable" 0 0.8 0.8 0.1 1
|
||||
"Absorber" 0 0.0 0.3 0.3 0
|
||||
"OtherServices" 0 0.2 0.4 0.2 1
|
||||
"PseudoVolumes" 0 0.2 0.4 0.2 1
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
#------------------------------------------------------------------
|
||||
# C-shell script to be run before building/executing this example.
|
||||
# It has two parts: one for the Aida setup (for the histograms,
|
||||
# ntuples, and more in general for the data analysis); and one
|
||||
# more specific for this test-beam example.
|
||||
# Please notice that before running this script, you have to define
|
||||
# the usual Geant4 variables (in particular, the variable
|
||||
# G4ANALYSIS_USE must be set to 1).
|
||||
#------------------------------------------------------------------
|
||||
#
|
||||
### # --- Aida 2.2 , Anaphe 4.0.5 ---
|
||||
### setenv LHCXXTOP /afs/cern.ch/sw/lhcxx/
|
||||
### setenv LHCXXVERS 4.0.5
|
||||
### setenv PLATF redhat72/gcc-2.95.2/
|
||||
### source $LHCXXTOP/share/LHCXX/$LHCXXVERS/install/sharedstart.csh
|
||||
#
|
||||
# --- Aida 3.0 , Anaphe 5.0.1 ---
|
||||
#source /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.1/scripts/setupAnaphe.csh
|
||||
#setenv PATH ${PATH}:/afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.1/scripts/
|
||||
#
|
||||
# --- Specific setup for this test-beam example ---
|
||||
setenv CCAL_CONFPATH ./dataconf
|
||||
setenv CCAL_SENSITIVECONF g4testbeamhcal96.conf
|
||||
setenv CCAL_GEOMETRYCONF testbeamhcal96.conf
|
||||
setenv CCAL_GLOBALPATH ./dataglobal
|
||||
setenv CCAL_GEOMPATH ./datageom
|
||||
setenv CCAL_VISPATH ./datavis
|
||||
# ---
|
||||
|
||||
|
||||
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
#------------------------------------------------------------------
|
||||
# Bash-shell script to be run before building/executing this example.
|
||||
# It has two parts: one for the Aida setup (for the histograms,
|
||||
# ntuples, and more in general for the data analysis); and one
|
||||
# more specific for this test-beam example.
|
||||
# Please notice that before running this script, you have to define
|
||||
# the usual Geant4 variables (in particular, the variable
|
||||
# G4ANALYSIS_USE must be set to 1).
|
||||
#------------------------------------------------------------------
|
||||
#
|
||||
### # --- Aida 2.2 , Anaphe 4.0.5 ---
|
||||
### export LHCXXTOP=/afs/cern.ch/sw/lhcxx/
|
||||
### export LHCXXVERS=4.0.5
|
||||
### export PLATF=redhat72/gcc-2.95.2/
|
||||
### . $LHCXXTOP/share/LHCXX/$LHCXXVERS/install/sharedstart.sh
|
||||
#
|
||||
# --- Aida 3.0 , Anaphe 5.0.1 ---
|
||||
#. /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.1/scripts/setupAnaphe
|
||||
#export PATH=$PATH:/afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.1/scripts/
|
||||
#
|
||||
# --- Specific setup for this test-beam example ---
|
||||
export CCAL_CONFPATH=./dataconf
|
||||
export CCAL_SENSITIVECONF=g4testbeamhcal96.conf
|
||||
export CCAL_GEOMETRYCONF=testbeamhcal96.conf
|
||||
export CCAL_GLOBALPATH=./dataglobal
|
||||
export CCAL_GEOMPATH=./datageom
|
||||
export CCAL_VISPATH=./datavis
|
||||
# ---
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#
|
||||
# This file permits to customize, with commands,
|
||||
# the menu bar of the G4UIXm sessions.
|
||||
# It has no effect with G4UIterminal.
|
||||
#
|
||||
# --- File ---
|
||||
/gui/addMenu file File
|
||||
/gui/addButton file Continue continue
|
||||
/gui/addButton file Exit "exit"
|
||||
#
|
||||
# --- Particle ---
|
||||
/gui/addMenu particle Particle
|
||||
/gui/addButton particle muon- "/gun/particle mu-"
|
||||
/gui/addButton particle electron- "/gun/particle e-"
|
||||
/gui/addButton particle pion- "/gun/particle pi-"
|
||||
#
|
||||
# --- Energy ---
|
||||
/gui/addMenu energy Energy
|
||||
/gui/addButton energy 50-GeV "/gun/energy 50 GeV"
|
||||
/gui/addButton energy 100-GeV "/gun/energy 100 GeV"
|
||||
/gui/addButton energy 150-GeV "/gun/energy 150 GeV"
|
||||
/gui/addButton energy 200-GeV "/gun/energy 200 GeV"
|
||||
/gui/addButton energy 250-GeV "/gun/energy 250 GeV"
|
||||
/gui/addButton energy 300-GeV "/gun/energy 300 GeV"
|
||||
#
|
||||
# --- NumEvents ---
|
||||
/gui/addMenu numEvents NumEvents
|
||||
/gui/addButton numEvents 1 "/run/beamOn 1"
|
||||
/gui/addButton numEvents 2 "/run/beamOn 2"
|
||||
/gui/addButton numEvents 5 "/run/beamOn 5"
|
||||
/gui/addButton numEvents 10 "/run/beamOn 10"
|
||||
/gui/addButton numEvents 50 "/run/beamOn 50"
|
||||
/gui/addButton numEvents 100 "/run/beamOn 100"
|
||||
#
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalAMaterial.hh
|
||||
// Description: CCalAMaterial holds the basic information needed to make a
|
||||
// G4Material from atomic proportions.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalAMaterial_h
|
||||
#define CCalAMaterial_h 1
|
||||
|
||||
#include "CCalMaterial.hh"
|
||||
|
||||
#include "G4Element.hh"
|
||||
|
||||
class CCalAMaterial : public CCalMaterial {
|
||||
friend G4std::ostream& operator<<(G4std::ostream&, const CCalAMaterial&);
|
||||
|
||||
public:
|
||||
//Construct from list of constituents
|
||||
CCalAMaterial(G4String mat, double dens, int nelem,
|
||||
CCalAMaterial** constituents, double* weights);
|
||||
//Construct from one element
|
||||
CCalAMaterial(G4String elemat, double Aeff, double dens);
|
||||
//Copy constructor
|
||||
CCalAMaterial(const CCalAMaterial&);
|
||||
virtual ~CCalAMaterial();
|
||||
|
||||
G4double Aeff() const {return aEff;}
|
||||
|
||||
CCalAMaterial& operator= (const CCalAMaterial&); //Assignment
|
||||
|
||||
protected:
|
||||
void computeAeff(G4int nconst, CCalAMaterial** constituents, double* weights);
|
||||
|
||||
protected:
|
||||
double aEff; //Effective mass
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalAnalysis.hh
|
||||
// Description: CCalAnalysis is a singleton class and interfaces all user
|
||||
// analysis code
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
|
||||
#ifndef CCalAnalysis_h
|
||||
#define CCalAnalysis_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/vector"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
namespace AIDA {
|
||||
class IAnalysisFactory;
|
||||
class IHistogramFactory;
|
||||
class ITree;
|
||||
class IHistogram1D;
|
||||
class IHistogram2D;
|
||||
class ITuple;
|
||||
class IPlotter;
|
||||
}
|
||||
|
||||
|
||||
class CCalAnalysis {
|
||||
public:
|
||||
virtual ~CCalAnalysis();
|
||||
|
||||
public:
|
||||
void BeginOfRun(G4int n);
|
||||
void EndOfRun(G4int n);
|
||||
void EndOfEvent(G4int flag);
|
||||
|
||||
void Init();
|
||||
void Finish();
|
||||
|
||||
int maxbin() {return numberOfTimeSlices;}
|
||||
|
||||
void InsertEnergyHcal(float*);
|
||||
void InsertEnergyEcal(float*);
|
||||
void InsertEnergy(float v);
|
||||
void InsertLateralProfile(float*);
|
||||
void InsertTime(float*);
|
||||
|
||||
void setNtuple(float* hcalE, float* ecalE, float elab, float x, float y,
|
||||
float z, float edep, float edec, float edhc);
|
||||
|
||||
static CCalAnalysis* getInstance();
|
||||
|
||||
private:
|
||||
CCalAnalysis();
|
||||
private:
|
||||
static CCalAnalysis* instance;
|
||||
|
||||
AIDA::IAnalysisFactory* analysisFactory;
|
||||
AIDA::ITree* tree;
|
||||
AIDA::ITuple* tuple;
|
||||
|
||||
enum {numberOfTimeSlices = 40};
|
||||
|
||||
AIDA::IHistogram1D* energy;
|
||||
AIDA::IHistogram1D* hcalE[28]; // 28 hadronic modules
|
||||
AIDA::IHistogram1D* ecalE[49]; // 49 crystal towers
|
||||
AIDA::IHistogram1D* timeHist[40]; // 40 nanoseconds time window
|
||||
AIDA::IHistogram1D* lateralProfile[70]; // 70 centimeters lateral window
|
||||
// (indeed 64 should be enough)
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+56
-43
@@ -20,56 +20,69 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B02Scorer.cc,v 1.3 2002/04/19 10:54:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
#ifndef CCalDataSet_h
|
||||
#define CCalDataSet_h
|
||||
|
||||
#include "B02Scorer.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4PStep.hh"
|
||||
#include "G4Sigma.hh"
|
||||
#include "G4StateManager.hh"
|
||||
#include "G4NeutronHPInterpolator.hh"
|
||||
#include "g4std/vector"
|
||||
|
||||
B02Scorer::B02Scorer(){}
|
||||
B02Scorer::~B02Scorer(){}
|
||||
// by JPW, working, but to be cleaned up. @@@@
|
||||
|
||||
void B02Scorer::Score(const G4Step &aStep, const G4PStep &aPstep)
|
||||
class CCalDataSet
|
||||
{
|
||||
G4Track *track = aStep.GetTrack();
|
||||
public:
|
||||
|
||||
if (track->GetTrackStatus()==fStopAndKill)
|
||||
void insert(double anEnergy, double aXsection)
|
||||
{
|
||||
G4cout << " track status is StopAndKill -> do nothing" << G4endl;
|
||||
pair<double, double> aPoint(anEnergy, aXsection);
|
||||
theData.push_back(aPoint);
|
||||
}
|
||||
// do the scoring
|
||||
else
|
||||
{
|
||||
// the map fPtkTallys, the map nametallys and the "G4Sigma" will
|
||||
// be setup the first time they are accesed.
|
||||
// the user may choos any other place to store the results e.g.
|
||||
// histogramms
|
||||
G4PTouchableKey post_ptk(aPstep.fPostTouchableKey);
|
||||
if (aPstep.fCrossBoundary)
|
||||
{
|
||||
// Pstep crosses boundary
|
||||
fPtkTallys[post_ptk]["HistorysEntering"].Xin(1);
|
||||
fPtkTallys[post_ptk]["EnergyEnteringHistory"].
|
||||
Xin(track->GetKineticEnergy());
|
||||
}
|
||||
else
|
||||
{
|
||||
// this check is necessary in case of scoring in a parallel world
|
||||
if (aStep.GetPostStepPoint()->GetStepStatus() != fGeomBoundary)
|
||||
{
|
||||
fPtkTallys[post_ptk]["Collisions"].Xin(1);
|
||||
}
|
||||
|
||||
double getCrossSection(double anEnergy)
|
||||
{
|
||||
double result;
|
||||
if(anEnergy < theData[0].first)
|
||||
{
|
||||
result = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
double x1,x2;
|
||||
double y1,y2;
|
||||
if(anEnergy > theData[theData.size()-1].second)
|
||||
{
|
||||
// extrapolation
|
||||
int n=theData.size();
|
||||
x1 = theData[n-1].first;
|
||||
y1 = theData[n-1].second;
|
||||
x2 = theData[n-2].first;
|
||||
y2 = theData[n-2].second;
|
||||
}
|
||||
else
|
||||
{
|
||||
// linear search and interpolation
|
||||
unsigned int i;
|
||||
for(i=0; i<theData.size(); i++)
|
||||
{
|
||||
if(theData[i].first>anEnergy) break;
|
||||
}
|
||||
x1 = theData[i-1].first;
|
||||
y1 = theData[i-1].second;
|
||||
x2 = theData[i].first;
|
||||
y2 = theData[i].second;
|
||||
}
|
||||
// interpolate logarithmic in energy and linear in cross-section
|
||||
result = theInterpolator.Interpolate(LOGLIN, anEnergy, x1,x2,y1,y2);
|
||||
}
|
||||
return result*barn;
|
||||
}
|
||||
}
|
||||
|
||||
G4std::ostream& operator<<(G4std::ostream &out, const B02Scorer &ps)
|
||||
{
|
||||
out << ps.GetMapPtkTallys();
|
||||
return out;
|
||||
}
|
||||
private:
|
||||
|
||||
G4NeutronHPInterpolator theInterpolator;
|
||||
|
||||
private:
|
||||
|
||||
vector<pair<double, double> > theData;
|
||||
};
|
||||
#endif
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalDetector.hh
|
||||
// Description: CCalDetector will provide the basic functionallity of a
|
||||
// detector factory. It has a construct method that describes
|
||||
// the construction sequence of the detector. It has a Name,
|
||||
// a file associated with it, and a collection of other
|
||||
// CCalDetectors that are supposed to be inside this one.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalDetector_h
|
||||
#define CCalDetector_h 1
|
||||
|
||||
#include "g4std/iostream"
|
||||
#include "g4std/vector"
|
||||
#include "globals.hh"
|
||||
|
||||
//Forward declartion for the CCalDetectorTable typedef
|
||||
class CCalDetector;
|
||||
|
||||
//A table to hold a list of pointers to CMS Detectors
|
||||
typedef G4std::vector<CCalDetector*> CCalDetectorTable;
|
||||
|
||||
////////////////////
|
||||
//At last the class
|
||||
class CCalDetector {
|
||||
|
||||
friend G4std::ostream& operator<<(G4std::ostream&, const CCalDetector&);
|
||||
|
||||
public:
|
||||
////////////////////////////////////////////////////////////////
|
||||
//Constructor with a name and a filename.
|
||||
CCalDetector(const G4String &name);
|
||||
////////////////////////////////////////////////////////////////
|
||||
//Destructor
|
||||
virtual ~CCalDetector();
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Construction related methods
|
||||
|
||||
//This starts the detector construction
|
||||
void constructHierarchy() { construct();}
|
||||
void construct();
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//A method that allows to add a new detector inside this one.
|
||||
void addDetector(CCalDetector*);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//Other get methods
|
||||
G4String Name() const {return detectorName;}
|
||||
G4String baseFileName() const {return fileName;}
|
||||
G4String File() const {return fileName+".geom";}
|
||||
CCalDetector* getDaughter(int i) const {return theDetectorsInside[i];}
|
||||
int getNDaughters() const {return theDetectorsInside.size();}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//Local operators
|
||||
//Equality only checks name !!!
|
||||
G4bool operator==(const CCalDetector& left) const {
|
||||
return (detectorName==left.detectorName);
|
||||
}
|
||||
G4bool operator!=(const CCalDetector& left) const {
|
||||
return (detectorName!=left.detectorName);
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//Pure Virtual methods
|
||||
|
||||
//Should read a file and store the information inside the concrete
|
||||
//CCalDetector
|
||||
virtual int readFile() = 0;
|
||||
//Construct the daughters by calling the apropiate constructors
|
||||
virtual void constructDaughters() = 0;
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//Building related methods
|
||||
|
||||
//Builds the detector from a file
|
||||
int buildFromFile();
|
||||
|
||||
protected:
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//Data Members
|
||||
|
||||
G4String detectorName; //Detector name
|
||||
G4String fileName; //File name from it will be read
|
||||
static G4String pathName; //Path in which to look for files
|
||||
|
||||
CCalDetectorTable theDetectorsInside; //A collection of CCalDetectors inside
|
||||
|
||||
int constructFlag; //True if this detector is to be built
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+12
-19
@@ -20,31 +20,24 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B05DetectorConstruction.hh,v 1.2 2002/04/19 10:54:30 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalDetectorConstruction.hh
|
||||
// Description: Constructs the 96 test beam configuration of HCAL
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef B03DetectorConstruction_hh
|
||||
#define B05DetectorConstruction_hh B05DetectorConstruction_hh
|
||||
#ifndef CCalDetectorConstruction_h
|
||||
#define CCalDetectorConstruction_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class CCalDetectorConstruction : public G4VUserDetectorConstruction {
|
||||
public:
|
||||
CCalDetectorConstruction();
|
||||
~CCalDetectorConstruction();
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4VIStore;
|
||||
|
||||
class B05DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
B05DetectorConstruction();
|
||||
~B05DetectorConstruction();
|
||||
|
||||
G4VPhysicalVolume* Construct();
|
||||
G4VIStore* GetIStore();
|
||||
|
||||
private:
|
||||
G4VIStore *fIStore;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalEcal.hh
|
||||
// Description: CCalEcal Geometry factory class for crystal matrix
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalEcal_h
|
||||
#define CCalEcal_h 1
|
||||
|
||||
#include "CCalDetector.hh"
|
||||
|
||||
class CCalEcal: public CCalDetector {
|
||||
public:
|
||||
//Constructor and Destructor
|
||||
CCalEcal(const G4String &name):
|
||||
CCalDetector(name) {}
|
||||
virtual ~CCalEcal();
|
||||
|
||||
//Get Methods
|
||||
G4String getGenMat() const {return genMat;}
|
||||
double getWidBox() const {return widBox;}
|
||||
double getLengBox() const {return lengBox;}
|
||||
double getXpos() const {return xpos;}
|
||||
double getYpos() const {return ypos;}
|
||||
double getZpos() const {return zpos;}
|
||||
double getThetaX() const {return thetaX;}
|
||||
double getPhiX() const {return phiX;}
|
||||
double getThetaY() const {return thetaY;}
|
||||
double getPhiY() const {return phiY;}
|
||||
double getThetaZ() const {return thetaZ;}
|
||||
double getPhiZ() const {return phiZ;}
|
||||
G4String getLayMat() const {return layMat;}
|
||||
int getLayNum() const {return layNum;}
|
||||
double getLayRadius() const {return layRadius;}
|
||||
double getLayAngle() const {return layAngle;}
|
||||
double getLengFront() const {return lengFront;}
|
||||
double getLayPar(unsigned int i) const {return layPar[i];}
|
||||
G4String getCrystMat() const {return crystMat;}
|
||||
int getCrystNum() const {return crystNum;}
|
||||
double getCrystLength() const {return crystLength;}
|
||||
double getCrystTol() const {return crystTol;}
|
||||
double getCrystPar(unsigned int i) const {return crystPar[i];}
|
||||
G4String getSuppMat() const {return suppMat;}
|
||||
double getDxSupp() const {return dxSupp;}
|
||||
double getDySupp() const {return dySupp;}
|
||||
double getDzSupp() const {return dzSupp;}
|
||||
double getDistSupp() const {return distSupp;}
|
||||
|
||||
|
||||
protected:
|
||||
virtual int readFile();
|
||||
virtual void constructDaughters();
|
||||
|
||||
private:
|
||||
G4String genMat; //General material
|
||||
double widBox, lengBox; //Box parameters
|
||||
double xpos, ypos, zpos; //Translation matrix definition
|
||||
double thetaX,phiX,thetaY,phiY,thetaZ,phiZ; //Rotation matrix definition
|
||||
G4String layMat; //Material for the layers
|
||||
int layNum; //Layer numbers
|
||||
double layRadius,layAngle; //Positioning parameters
|
||||
double lengFront; //Distance from front
|
||||
double layPar[5]; //Layer parameters
|
||||
G4String crystMat; //Material for the crystals
|
||||
int crystNum; //Crystal numbers
|
||||
double crystLength; //Crystal length
|
||||
double crystTol; //Tolerance for position
|
||||
double crystPar[5]; //Crystal parameters
|
||||
G4String suppMat; //Material of support system
|
||||
double dxSupp, dySupp, dzSupp; //Dimension of support material
|
||||
double distSupp; //Separation of support material
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalEcalOrganization.hh
|
||||
// Description: Defines numbering schema for the Electromagnetic Calorimeter
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalEcalOrganization_h
|
||||
#define CCalEcalOrganization_h
|
||||
|
||||
#include "CCalVOrganization.hh"
|
||||
|
||||
class CCalEcalOrganization: public CCalVOrganization {
|
||||
|
||||
public:
|
||||
CCalEcalOrganization(){};
|
||||
~CCalEcalOrganization();
|
||||
|
||||
virtual unsigned int GetUnitID(const G4Step* aStep) const ;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalEndOfEventAction.hh
|
||||
// Description: CCalEndOfEventAction provides User actions at end of event
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef CCalEndOfEventAction_h
|
||||
#define CCalEndOfEventAction_h
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class CCaloOrganization;
|
||||
class G4HCofThisEvent;
|
||||
class CCalSteppingAction;
|
||||
class CCalPrimaryGeneratorAction;
|
||||
|
||||
typedef G4String nameType;
|
||||
|
||||
class CCalEndOfEventAction: public G4UserEventAction{
|
||||
|
||||
public:
|
||||
CCalEndOfEventAction(CCalPrimaryGeneratorAction*);
|
||||
~CCalEndOfEventAction();
|
||||
virtual void StartOfEventAction(const G4Event* evt);
|
||||
virtual void EndOfEventAction(const G4Event* evt);
|
||||
|
||||
private:
|
||||
void instanciateSteppingAction();
|
||||
void initialize();
|
||||
|
||||
private:
|
||||
G4bool isInitialized;
|
||||
|
||||
CCalPrimaryGeneratorAction* primaryGenerator;
|
||||
CCalSteppingAction* theSteppingAction;
|
||||
nameType* SDnames;
|
||||
G4int numberOfSD;
|
||||
CCaloOrganization* theOrg;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,109 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalG4Able.hh
|
||||
// Description: CCalG4Able will provide the basic functionallity of a CCal
|
||||
// "detector" to become a Geant4 Detector.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalG4Able_h
|
||||
#define CCalG4Able_h 1
|
||||
|
||||
#include "g4std/vector"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "CCalVisualisable.hh"
|
||||
|
||||
#include "g4std/iostream"
|
||||
|
||||
//Forward declartion for the CCalG4AbleTable typedef
|
||||
class CCalG4Able;
|
||||
|
||||
//A table to hold a list of pointers to CMS Detectors
|
||||
typedef G4std::vector<CCalG4Able*> CCalG4AbleTable;
|
||||
|
||||
////////////////////
|
||||
//At last the class
|
||||
class CCalG4Able {
|
||||
|
||||
friend G4std::ostream& operator<<(G4std::ostream&, const CCalG4Able&);
|
||||
|
||||
public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//Constructor with a name
|
||||
CCalG4Able(G4String name);
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//Destructor
|
||||
virtual ~CCalG4Able() {delete detPhysicalVolume;}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//Get/Set methods
|
||||
|
||||
//Method to retrieve the physical volume of the detector.
|
||||
G4VPhysicalVolume* PhysicalVolume(G4VPhysicalVolume*);
|
||||
|
||||
//Set the type of a logical volume to select its vis parameters.
|
||||
void setVisType(CCalVisualisable::visType, G4LogicalVolume*);
|
||||
|
||||
|
||||
//Sensitivity related
|
||||
void setSensitivity(G4bool sens=true) {sensitivity=sens;}
|
||||
G4bool isSensitive() const {return sensitivity;}
|
||||
|
||||
//Name
|
||||
G4String G4Name() const {return g4ableName;}
|
||||
void setName(const G4String& name) {g4ableName = name;}
|
||||
|
||||
|
||||
//Comparison operator needed for CCalG4AbleTable. Compares phys. volumes
|
||||
G4bool operator==(const CCalG4Able& right) const;
|
||||
|
||||
protected:
|
||||
//A method that allows to add a new CCalG4Able inside this one.
|
||||
void AddCCalG4Able(CCalG4Able*);
|
||||
|
||||
//This method actually constructs the volume. Pure virtual.
|
||||
virtual G4VPhysicalVolume* constructIn(G4VPhysicalVolume*) = 0;
|
||||
|
||||
//Constructs the sensitive detectors and associates them to the corresponding
|
||||
//logical volumes
|
||||
virtual void constructSensitive() {}
|
||||
|
||||
protected:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Data Members
|
||||
G4VPhysicalVolume *detPhysicalVolume; //The G4PhysVolume or 0 if not created
|
||||
CCalG4AbleTable theG4DetectorsInside; //CCalG4Able* daughters of this det.
|
||||
|
||||
G4String g4ableName;
|
||||
|
||||
G4bool sensitivity; //true if sentive, false if not.
|
||||
|
||||
//Visualisation in G4 related Variables
|
||||
CCalVisualisable visProperties; //Visualisation properties.
|
||||
G4VisAttributes* g4VisAtt[CCalVisualisable::TotalVisTypes];
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalG4Ecal.hh
|
||||
// Description: Equipped to describe crystal matrix for different testbeam run
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalG4Ecal_h
|
||||
#define CCalG4Ecal_h 1
|
||||
|
||||
#include "CCalEcal.hh"
|
||||
#include "CCalG4Able.hh"
|
||||
#include "g4std/vector"
|
||||
|
||||
typedef G4LogicalVolume* ptrG4Log;
|
||||
|
||||
class CCalG4Ecal: public CCalEcal, public CCalG4Able {
|
||||
public:
|
||||
//Backward or Forward type
|
||||
enum CMType {module1, module2};
|
||||
|
||||
//Constructor and Destructor
|
||||
CCalG4Ecal(const G4String &name);
|
||||
virtual ~CCalG4Ecal();
|
||||
|
||||
void setType(CMType ty) {type = ty;}
|
||||
|
||||
//Prefix to all names in the Detector
|
||||
static G4String idName;
|
||||
|
||||
protected:
|
||||
//This methods actually constructs the volume.
|
||||
virtual G4VPhysicalVolume* constructIn(G4VPhysicalVolume*);
|
||||
|
||||
//Constructs the sensitive detectors and associates them to the corresponding
|
||||
//logical volumes
|
||||
virtual void constructSensitive() ;
|
||||
|
||||
private:
|
||||
//Methods to construct the different parts of the detector
|
||||
G4LogicalVolume* constructGlobal();
|
||||
|
||||
private:
|
||||
//Private data members
|
||||
CMType type;
|
||||
|
||||
//Static logical volumes shared by forward and backward detectors.
|
||||
static G4LogicalVolume* crystalmatrixLog;
|
||||
|
||||
// Logical volumes for sensitive detectors
|
||||
G4std::vector<ptrG4Log> sensitiveLogs;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalG4Hall.hh
|
||||
// Description: Equipped to construct G4 geometry of the experimental hall
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalG4Hall_h
|
||||
#define CCalG4Hall_h 1
|
||||
|
||||
#include "CCalHall.hh"
|
||||
#include "CCalG4Able.hh"
|
||||
|
||||
class CCalG4Hall: public CCalHall, public CCalG4Able {
|
||||
public:
|
||||
//Constructor and Destructor
|
||||
CCalG4Hall(const G4String &name);
|
||||
virtual ~CCalG4Hall();
|
||||
|
||||
protected:
|
||||
//This methods actually constructs the volume.
|
||||
virtual G4VPhysicalVolume* constructIn(G4VPhysicalVolume*);
|
||||
virtual void constructDaughters();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalG4Hcal.hh
|
||||
// Description: Euipped to construct the G4 geometry of the hadron calorimeter
|
||||
// in the 96 test beam run
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalG4Hcal_h
|
||||
#define CCalG4Hcal_h 1
|
||||
|
||||
#include "CCalHcal.hh"
|
||||
#include "CCalG4Able.hh"
|
||||
#include "g4std/vector"
|
||||
|
||||
typedef G4LogicalVolume* ptrG4Log;
|
||||
|
||||
class CCalG4Hcal: public CCalHcal, public CCalG4Able {
|
||||
public:
|
||||
//Constructor and Destructor
|
||||
CCalG4Hcal(const G4String &name);
|
||||
virtual ~CCalG4Hcal();
|
||||
|
||||
protected:
|
||||
//This methods actually constructs the volume.
|
||||
virtual G4VPhysicalVolume* constructIn(G4VPhysicalVolume*);
|
||||
virtual void constructDaughters();
|
||||
|
||||
//Construct layer of scintillator or absorber
|
||||
G4LogicalVolume* constructScintillatorLayer (G4int);
|
||||
G4LogicalVolume* constructAbsorberLayer (G4int);
|
||||
|
||||
//Constructs the sensitive detectors and associates them to the corresponding
|
||||
//logical volumes
|
||||
virtual void constructSensitive() ;
|
||||
|
||||
private:
|
||||
//Private data members
|
||||
ptrG4Log* sclLog;
|
||||
ptrG4Log* absLog;
|
||||
|
||||
// Logical volumes for sensitive detectors
|
||||
G4std::vector<ptrG4Log> allSensitiveLogs;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalG4Hit.hh
|
||||
// Description: G4 Hit class for Calorimeters (Ecal, Hcal, ...)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef CCalG4Hit_h
|
||||
#define CCalG4Hit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "CCalHit.hh"
|
||||
|
||||
|
||||
class CCalG4Hit : public G4VHit, public CCalHit {
|
||||
|
||||
friend G4std::ostream& operator<< (G4std::ostream& os, const CCalG4Hit& hit);
|
||||
|
||||
public:
|
||||
|
||||
CCalG4Hit();
|
||||
~CCalG4Hit();
|
||||
CCalG4Hit(const CCalG4Hit & right);
|
||||
const CCalG4Hit& operator=(const CCalG4Hit & right);
|
||||
int operator==(const CCalG4Hit &right){return 0;}
|
||||
|
||||
public:
|
||||
|
||||
void Draw(){}
|
||||
void Print();
|
||||
|
||||
double getEM() const;
|
||||
void setEM (double e);
|
||||
|
||||
double getHadr() const;
|
||||
void setHadr (double e);
|
||||
|
||||
void addEnergyDeposit(const CCalG4Hit& aHit);
|
||||
void addEnergyDeposit(double em, double hd);
|
||||
|
||||
private:
|
||||
|
||||
double elem; // EnergyDeposit of EM particles
|
||||
double hadr; // EnergyDeposit of HD particles
|
||||
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalG4HitCollection.hh
|
||||
// Description: Collection of calorimetric hits
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef CCalG4HitCollection_h
|
||||
#define CCalG4HitCollection_h 1
|
||||
|
||||
#include "G4THitsCollection.hh"
|
||||
|
||||
#include "CCalG4Hit.hh"
|
||||
|
||||
typedef G4THitsCollection<CCalG4Hit> CCalG4HitCollection;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalGeometryConfiguration.hh
|
||||
// Description: This singleton holds the information in the file geometry.conf
|
||||
// Use getInstance to retrieve it.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalGeometryConfiguration_h
|
||||
#define CCalGeometryConfiguration_h 1
|
||||
|
||||
#include "g4std/map"
|
||||
#include "CCalutils.hh"
|
||||
|
||||
class CCalGeometryConfiguration {
|
||||
|
||||
struct GCInfo {
|
||||
G4String FileName;
|
||||
int ConstructFlag;
|
||||
};
|
||||
|
||||
typedef G4std::map<G4String, GCInfo, G4std::less<G4String> > CCalGeometryConfTable;
|
||||
typedef G4std::map<G4String, GCInfo, G4std::less<G4String> >::iterator CCalGeometryConfIterator;
|
||||
|
||||
|
||||
public:
|
||||
~CCalGeometryConfiguration() {}
|
||||
|
||||
static CCalGeometryConfiguration* getInstance();
|
||||
|
||||
int getConstructFlag(const G4String& n) /*const*/;
|
||||
G4String getFileName(const G4String& n) /*const*/;
|
||||
|
||||
CCalGeometryConfTable& getConfTable() {
|
||||
return theConfiguration;
|
||||
}
|
||||
|
||||
private:
|
||||
CCalGeometryConfiguration();
|
||||
|
||||
private:
|
||||
static CCalGeometryConfiguration* instance;
|
||||
CCalGeometryConfTable theConfiguration;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalHall.hh
|
||||
// Description: Equipped to construct the geometry of the 96 Test Beam
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalHall_h
|
||||
#define CCalHall_h 1
|
||||
|
||||
#include "CCalDetector.hh"
|
||||
|
||||
class CCalHall: public CCalDetector {
|
||||
public:
|
||||
//Constructor and Destructor
|
||||
CCalHall(const G4String &name);
|
||||
virtual ~CCalHall();
|
||||
|
||||
//Get Methods
|
||||
G4String getMaterial() const {return genMaterial;}
|
||||
double getDy_2Hall() const {return dy_2Hall;}
|
||||
double getDx_2Hall() const {return dx_2Hall;}
|
||||
|
||||
protected:
|
||||
virtual int readFile();
|
||||
virtual void constructDaughters();
|
||||
|
||||
private:
|
||||
G4String genMaterial; //General material
|
||||
double dy_2Hall; //Half width of the Experimental Hall
|
||||
double dx_2Hall; //Half thickness of the Experimental Hall
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalHcal.hh
|
||||
// Description: Equipped to construct the geometry of the hadron calorimeter
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalHcal_h
|
||||
#define CCalHcal_h 1
|
||||
|
||||
#include "CCalDetector.hh"
|
||||
|
||||
class CCalHcal: public CCalDetector {
|
||||
public:
|
||||
//Constructor and Destructor
|
||||
CCalHcal(const G4String &name);
|
||||
virtual ~CCalHcal();
|
||||
|
||||
//Get Methods
|
||||
G4String getGenMat() const {return genMaterial;}
|
||||
double getDy_2Cal() const {return dy_2Cal;}
|
||||
double getDx_2Cal() const {return dx_2Cal;}
|
||||
double getXposCal() const {return xposCal;}
|
||||
G4String getBoxMat() const {return boxMaterial;}
|
||||
int getNBox() const {return nBox;}
|
||||
double getDy_2Box() const {return dy_2Box;}
|
||||
double getDx_2Box() const {return dx_2Box;}
|
||||
double getWallThickBox() const {return wallThickBox;}
|
||||
double getXposBox(unsigned int i) const {return xposBox[i];}
|
||||
int getNLayerScnt() const {return nLayerScnt;}
|
||||
int getTypeScnt(unsigned int i) const {return typeLayerScnt[i];}
|
||||
int getMotherScnt(unsigned int i) const {return mothLayerScnt[i];}
|
||||
double getXposScnt(unsigned int i) const {return xposLayerScnt[i];}
|
||||
int getNLayerAbs() const {return nLayerAbs;}
|
||||
int getTypeAbs(unsigned int i) const {return typeLayerAbs[i];}
|
||||
int getMotherAbs(unsigned int i) const {return mothLayerAbs[i];}
|
||||
double getXposAbs(unsigned int i) const {return xposLayerAbs[i];}
|
||||
G4String getAbsMat() const {return absMaterial;}
|
||||
int getNAbsorber() const {return nAbsorber;}
|
||||
double getDy_2Abs( ) const {return dy_2Absorber;}
|
||||
double getDx_2Abs(unsigned int i) const {return dx_2Absorber[i];}
|
||||
G4String getScntMat() const {return scntMaterial;}
|
||||
G4String getWrapMat() const {return wrapMaterial;}
|
||||
G4String getPlasMat() const {return plasMaterial;}
|
||||
int getNScintillator() const {return nScintillator;}
|
||||
double getDy_2ScntLay(unsigned int i) const {return dy_2ScntLayer[i];}
|
||||
double getDx_2ScntLay(unsigned int i) const {return dx_2ScntLayer[i];}
|
||||
double getDx_2Wrap(unsigned int i) const {return dx_2Wrapper[i];}
|
||||
double getDx_2FrontP(unsigned int i) const {return dx_2FrontPlastic[i];}
|
||||
double getDx_2BackP(unsigned int i) const {return dx_2BackPlastic[i];}
|
||||
double getDx_2Scnt(unsigned int i) const {return dx_2Scintillator[i];}
|
||||
|
||||
protected:
|
||||
virtual int readFile();
|
||||
virtual void constructDaughters();
|
||||
|
||||
private:
|
||||
G4String genMaterial; //General material
|
||||
double dy_2Cal; //Half width of the Hcal
|
||||
double dx_2Cal; //Half thickness of the Hcal
|
||||
double xposCal; //Position in mother
|
||||
|
||||
G4String boxMaterial; //Material of boxes
|
||||
int nBox; //Number of boxes
|
||||
double dy_2Box; //Half width of the Boxes
|
||||
double dx_2Box; //Half thickness of the Boxes
|
||||
double wallThickBox; //Wall thickness of the boxes
|
||||
double* xposBox; //Position in mother
|
||||
|
||||
int nLayerScnt; //Number of scintillator layers
|
||||
int* typeLayerScnt; //Layer type
|
||||
int* mothLayerScnt; //Mother type
|
||||
double* xposLayerScnt; //Position in mother
|
||||
|
||||
int nLayerAbs; //Number of absorber layers
|
||||
int* typeLayerAbs; //Layer type
|
||||
int* mothLayerAbs; //Mother type
|
||||
double* xposLayerAbs; //Position in mother
|
||||
|
||||
G4String absMaterial; //Material of absorbers
|
||||
int nAbsorber; //Number of absorber types
|
||||
double dy_2Absorber; //Half width of the absorbers
|
||||
double* dx_2Absorber; //Half thickness of the absorbers
|
||||
|
||||
G4String scntMaterial; //Material of Scintillator
|
||||
G4String wrapMaterial; //Material of Wrapper
|
||||
G4String plasMaterial; //Material of plastic cover
|
||||
int nScintillator; //Number of scintillator types
|
||||
double* dy_2ScntLayer; //Half width of scintillator layers
|
||||
double* dx_2ScntLayer; //Half thickness of scintillator layers
|
||||
double* dx_2Wrapper; //Half thickness of wrappers
|
||||
double* dx_2FrontPlastic; //Half thickness of front plastic
|
||||
double* dx_2BackPlastic; //Half thickness of back plastic
|
||||
double* dx_2Scintillator; //Half thickness of scintillators
|
||||
};
|
||||
|
||||
#endif
|
||||
+13
-15
@@ -20,25 +20,23 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B04DetectorConstruction.hh,v 1.2 2002/04/19 10:54:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalHcalOrganization.hh
|
||||
// Description: Defines numbering schema for the Hadron Calorimeter
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalHcalOrganization_h
|
||||
#define CCalHcalOrganization_h
|
||||
|
||||
#ifndef B04DetectorConstruction_hh
|
||||
#define B04DetectorConstruction_hh B04DetectorConstruction_hh
|
||||
#include "CCalVOrganization.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class CCalHcalOrganization: public CCalVOrganization{
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
|
||||
class B04DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
B04DetectorConstruction();
|
||||
~B04DetectorConstruction();
|
||||
|
||||
G4VPhysicalVolume* Construct();
|
||||
CCalHcalOrganization(){};
|
||||
~CCalHcalOrganization();
|
||||
|
||||
virtual unsigned int GetUnitID(const G4Step* aStep) const ;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,97 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalHit.h
|
||||
// Description: Hit class for Calorimeters (Ecal, Hcal, ...)
|
||||
//
|
||||
// One Hit object should be created
|
||||
// -for each new particle entering the calorimeter
|
||||
// -for each detector unit (= cristal or fiber or scintillator layer)
|
||||
// -for each nanosecond of the shower development
|
||||
//
|
||||
// This implies that all hit objects created for a given shower
|
||||
// have the same value for
|
||||
// - Entry (= local coordinates of the entrance point of the particle
|
||||
// in the unit where the shower starts)
|
||||
// - the TrackID (= Identification number of the incident particle)
|
||||
// - the IncidentEnergy (= energy of that particle)
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef CCalHit_h
|
||||
#define CCalHit_h 1
|
||||
|
||||
#include "g4std/iostream"
|
||||
#include "CLHEP/Vector/ThreeVector.h"
|
||||
#include "globals.hh"
|
||||
|
||||
|
||||
class CCalHit {
|
||||
|
||||
friend G4std::ostream& operator<< (G4std::ostream&, const CCalHit&);
|
||||
|
||||
public:
|
||||
|
||||
CCalHit();
|
||||
~CCalHit();
|
||||
CCalHit(const CCalHit &right);
|
||||
const CCalHit& operator=(const CCalHit &right);
|
||||
int operator==(const CCalHit &right){return 0;}
|
||||
|
||||
void print();
|
||||
|
||||
public:
|
||||
|
||||
Hep3Vector getEntry() const;
|
||||
void setEntry(Hep3Vector xyz);
|
||||
|
||||
double getIncidentEnergy() const;
|
||||
void setIncidentEnergy (double e);
|
||||
|
||||
int getTrackID() const;
|
||||
void setTrackID (int i);
|
||||
|
||||
unsigned int getUnitID() const;
|
||||
void setUnitID (unsigned int i);
|
||||
|
||||
double getTimeSlice() const;
|
||||
void setTimeSlice(double d);
|
||||
int getTimeSliceID() const;
|
||||
|
||||
double getEnergyDeposit() const;
|
||||
void setEnergyDeposit(const double e);
|
||||
void addEnergyDeposit(const CCalHit& aHit);
|
||||
void addEnergyDeposit(const double e);
|
||||
|
||||
private:
|
||||
|
||||
Hep3Vector entry; // Entry point
|
||||
double theIncidentEnergy; // Energy of the primary particle
|
||||
int theTrackID; // Identification number of the primary particle
|
||||
unsigned int theUnitID; // Calorimeter Unit Number
|
||||
double theTimeSlice; // Time Slice Identification
|
||||
double theEnergyDeposit; // Cumulated Energy deposit
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalMagneticField.hh
|
||||
// Description: A class for control of the Magnetic Field of the detector.
|
||||
// The field is assumed to be uniform.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalMagneticField_H
|
||||
#define CCalMagneticField_H
|
||||
|
||||
#include "G4UniformMagField.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
class G4FieldManager;
|
||||
|
||||
class CCalMagneticField: public G4MagneticField {
|
||||
public:
|
||||
CCalMagneticField(const G4String &name);
|
||||
~CCalMagneticField();
|
||||
|
||||
// Access functions
|
||||
void MagneticField(const double Point[3], double Bfield[3]) const;
|
||||
Hep3Vector MagneticField(const Hep3Vector Point) const;
|
||||
virtual void GetFieldValue(const double Point[3], double* Bfield) const;
|
||||
G4double GetConstantFieldvalue() const {return fval;}
|
||||
|
||||
protected:
|
||||
// Find the global Field Manager
|
||||
G4FieldManager* GetGlobalFieldManager();
|
||||
|
||||
private:
|
||||
G4double fval; // Field value
|
||||
G4int npts; // Number of poinst
|
||||
G4double xoff; // Offset
|
||||
G4double* pos; // Position
|
||||
G4double* slope; // Slope
|
||||
G4double* intercept; // Intercept
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalMaterial.hh
|
||||
// Description: CCalMaterial holds the basic information needed to make a
|
||||
// G4Material.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalMaterial_h
|
||||
#define CCalMaterial_h 1
|
||||
#include "g4std/iostream"
|
||||
#include "globals.hh"
|
||||
|
||||
class CCalMaterial {
|
||||
|
||||
friend G4std::ostream& operator<<(G4std::ostream&, const CCalMaterial&);
|
||||
|
||||
public:
|
||||
enum FractionType {FTWeight, FTVolume};
|
||||
|
||||
//Constructors and destructors
|
||||
CCalMaterial(G4String mat, double dens, int nelem,
|
||||
CCalMaterial** constituents, double* weights,
|
||||
FractionType=FTWeight);
|
||||
CCalMaterial(const CCalMaterial&);
|
||||
virtual ~CCalMaterial();
|
||||
|
||||
//Get methods
|
||||
G4String Name() const {return name;} //Material name.
|
||||
double Density() const {return density;} //Density in g/cm3.
|
||||
int NElements() const {return nElem;} //Number of Elements.
|
||||
G4String Element(int i) const {return theElements[i];} //Should be protected.
|
||||
double Weight(int i) const {return theWeights[i];} //Should be protected.
|
||||
|
||||
//Operators
|
||||
G4bool operator==(const CCalMaterial&) const; //Compares ONLY names
|
||||
G4bool operator!=(const CCalMaterial&) const; //Compares ONLY names
|
||||
CCalMaterial& operator= (const CCalMaterial&); //Assignment
|
||||
|
||||
protected:
|
||||
CCalMaterial(){} //Default constructor
|
||||
void computeDensity(int nconst,
|
||||
CCalMaterial** constituents, double* weights,
|
||||
FractionType ft);
|
||||
void closeMaterial(); //Closes material construction.
|
||||
|
||||
protected:
|
||||
G4String name; //Material name
|
||||
double density; //Density in g/cm3
|
||||
int nElem; //Number of constituents.
|
||||
G4String* theElements; //Basic constituents
|
||||
double* theWeights; //Elements' weight fractions
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,97 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalMaterialFactory.hh
|
||||
// Description: CCalMaterialFactory is a singleton class to get from a file
|
||||
// the information to build CMS Materials. A G4Material is built
|
||||
// only if asked. A parallel structure with the file information
|
||||
// is keeped in a CCalMaterial pointer vector (CCalMaterialTable).
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalMaterialFactory_h
|
||||
#define CCalMaterialFactory_h 1
|
||||
|
||||
#include "g4std/fstream"
|
||||
|
||||
#include "CCalMaterial.hh"
|
||||
#include "CCalAMaterial.hh"
|
||||
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
|
||||
typedef G4std::vector<CCalMaterial*> CCalMaterialTable;
|
||||
typedef G4std::vector<CCalAMaterial*> CCalAMaterialTable;
|
||||
|
||||
class CCalMaterialFactory {
|
||||
public:
|
||||
enum MatDescription {byWeight, byVolume, byAtomic};
|
||||
|
||||
~CCalMaterialFactory();
|
||||
|
||||
static CCalMaterialFactory* getInstance(const G4String&, const G4String&);
|
||||
static CCalMaterialFactory* getInstance(const G4String&);
|
||||
static CCalMaterialFactory* getInstance();
|
||||
|
||||
G4Material* findMaterial(const G4String& ) const;
|
||||
G4Element* findElement (const G4String& ) const;
|
||||
|
||||
//Adds a new CCal Material to the list and returns a G4Material.
|
||||
G4Element* addElement (const G4String&, const G4String&, G4double,
|
||||
G4double, G4double );
|
||||
//Adds a new CCal Material to the list and returns a G4Material.
|
||||
G4Material* addMaterial(const G4String& nam, G4double density,
|
||||
G4int nconst, G4String mats[], G4double prop[],
|
||||
MatDescription md=byWeight);
|
||||
|
||||
void readElements (const G4String&);
|
||||
void readMaterials(const G4String&);
|
||||
|
||||
protected:
|
||||
void readElements(G4std::ifstream&);
|
||||
void readMaterials(G4std::ifstream&);
|
||||
|
||||
private:
|
||||
//Constructor
|
||||
CCalMaterialFactory();
|
||||
|
||||
G4Material* findG4Material (const G4String& ) const;
|
||||
CCalMaterial* findCCalMaterial (const G4String& ) const;
|
||||
CCalAMaterial* findCCalAMaterial(const G4String& ) const;
|
||||
|
||||
//Adds a CCalMaterial to the list. Used by readMaterials and addMaterial.
|
||||
CCalMaterial* addCCalMaterial(const G4String& nam, G4double density,
|
||||
G4int nconst, G4String mats[], G4double prop[],
|
||||
MatDescription md=byWeight);
|
||||
|
||||
|
||||
private:
|
||||
static CCalMaterialFactory* instance;
|
||||
|
||||
static G4String elementfile; //File with the elements.
|
||||
static G4String mixturefile; //File with the materials.
|
||||
|
||||
CCalMaterialTable theCCalMaterials; //Where the CCalMaterials are stored
|
||||
CCalAMaterialTable theCCalAMaterials; //Where the CCalAMaterials are stored
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
+19
-18
@@ -20,31 +20,32 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: PersEx02RunAction.hh,v 1.4 2001/07/11 09:58:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//-----------------------------------------------------------
|
||||
// Renamed of the ufficial Physics List.
|
||||
//-----------------------------------------------------------
|
||||
#ifndef CCalPhysicsList_h
|
||||
#define CCalPhysicsList_h 1
|
||||
|
||||
#ifndef PersEx02RunAction_h
|
||||
#define PersEx02RunAction_h 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "G4VModularPhysicsList.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Run;
|
||||
#define kNuCut 5*m
|
||||
|
||||
class PersEx02RunAction : public G4UserRunAction
|
||||
class CCalPhysicsList: public G4VModularPhysicsList
|
||||
{
|
||||
public:
|
||||
PersEx02RunAction();
|
||||
virtual ~PersEx02RunAction();
|
||||
public:
|
||||
CCalPhysicsList();
|
||||
virtual ~CCalPhysicsList();
|
||||
|
||||
public:
|
||||
// SetCuts()
|
||||
virtual void SetCuts();
|
||||
|
||||
public:
|
||||
virtual void BeginOfRunAction(const G4Run* aRun);
|
||||
virtual void EndOfRunAction(const G4Run* aRun);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
// 2002 by J.P. Wellisch
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalPrimaryGeneratorAction.hh
|
||||
// Description: Sets up particle beam
|
||||
//
|
||||
// By default 1 pi+ is shot from (0,0,0)
|
||||
// in (1,1,0.1) direction at 100 GeV
|
||||
// Use /gun/... commands to modify energy,origin,direction at run time.
|
||||
// or/and
|
||||
// /CCal/generator/random true/false to have random direction
|
||||
// /CCal/generator/scan true/false to scan in eta/phi
|
||||
// Use
|
||||
// /CCal/generator/minEnergy
|
||||
// /CCal/generator/maxEnergy
|
||||
// /CCal/generator/minPhi
|
||||
// /CCal/generator/maxPhi
|
||||
// /CCal/generator/minEta
|
||||
// /CCal/generator/maxEta
|
||||
// to set the range in energy and direction of particles shot at random.
|
||||
// Use
|
||||
// /CCal/generator/stepsPhi
|
||||
// /CCal/generator/stepsEta
|
||||
// to set number of steps in Phi and Eta for the scan
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef CCalPrimaryGeneratorAction_h
|
||||
#define CCalPrimaryGeneratorAction_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4VPrimaryGenerator.hh"
|
||||
|
||||
#include "CCalPrimaryGeneratorMessenger.hh"
|
||||
|
||||
enum generatorInputType {singleFixed, singleRandom, singleScan};
|
||||
|
||||
class CCalPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction {
|
||||
public:
|
||||
CCalPrimaryGeneratorAction();
|
||||
~CCalPrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
|
||||
public:
|
||||
void SetVerboseLevel(G4int val);
|
||||
void SetRandom(G4String val);
|
||||
void SetScan(G4String val);
|
||||
void SetMinimumEnergy(G4double p);
|
||||
void SetMaximumEnergy(G4double p);
|
||||
void SetMinimumPhi(G4double p);
|
||||
void SetMaximumPhi(G4double p);
|
||||
void SetStepsPhi(G4int val);
|
||||
void SetMinimumEta(G4double p);
|
||||
void SetMaximumEta(G4double p);
|
||||
void SetStepsEta(G4int val);
|
||||
void SetGunPosition(const G4ThreeVector & pos) const;
|
||||
void SetRunNo(G4int val);
|
||||
|
||||
public:
|
||||
G4ThreeVector GetParticlePosition() {return particleGun->GetParticlePosition();}
|
||||
G4double GetParticleEnergy() {return particleGun->GetParticleEnergy();}
|
||||
|
||||
private:
|
||||
CCalPrimaryGeneratorMessenger* gunMessenger;
|
||||
G4ParticleGun* particleGun;
|
||||
generatorInputType generatorInput;
|
||||
|
||||
G4int verboseLevel;
|
||||
G4int n_particle;
|
||||
G4String particleName;
|
||||
G4double particleEnergy;
|
||||
G4ThreeVector particlePosition;
|
||||
G4ThreeVector particleDir;
|
||||
|
||||
G4double energyMin,energyMax;
|
||||
G4double etaMin,etaMax;
|
||||
G4double phiMin,phiMax;
|
||||
G4int etaSteps,phiSteps;
|
||||
|
||||
G4int isInitialized;
|
||||
G4double etaValue, phiValue;
|
||||
G4int scanSteps;
|
||||
|
||||
private:
|
||||
void initialize();
|
||||
void print(G4int val);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalPrimaryGeneratorMessenger.hh
|
||||
// Description: Adds a new command to (un)select random shooting.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef CCalPrimaryGeneratorMessenger_h
|
||||
#define CCalPrimaryGeneratorMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class CCalPrimaryGeneratorAction;
|
||||
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWithADouble.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
|
||||
class CCalPrimaryGeneratorMessenger: public G4UImessenger {
|
||||
public:
|
||||
CCalPrimaryGeneratorMessenger(CCalPrimaryGeneratorAction* myGun);
|
||||
~CCalPrimaryGeneratorMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand * command,G4String newValues);
|
||||
|
||||
private:
|
||||
CCalPrimaryGeneratorAction* myAction;
|
||||
|
||||
G4UIcmdWithAnInteger* verboseCmd;
|
||||
G4UIcmdWithAString* rndmCmd;
|
||||
G4UIcmdWithAString* scanCmd;
|
||||
G4UIcmdWithADoubleAndUnit* minEnergyCmd;
|
||||
G4UIcmdWithADoubleAndUnit* maxEnergyCmd;
|
||||
G4UIcmdWithADoubleAndUnit* minPhiCmd;
|
||||
G4UIcmdWithADoubleAndUnit* maxPhiCmd;
|
||||
G4UIcmdWithADouble* minEtaCmd;
|
||||
G4UIcmdWithADouble* maxEtaCmd;
|
||||
G4UIcmdWithAnInteger* stepsPhiCmd;
|
||||
G4UIcmdWithAnInteger* stepsEtaCmd;
|
||||
G4UIcmdWithAnInteger* runNoCmd;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalRotationMatrixFactory.hh
|
||||
// Description: CCalRotationFactory is a singleton class to get from a file
|
||||
// the information to build CCal Rotation matrices.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalRotationMatrixFactory_h
|
||||
#define CCalRotationMatrixFactory_h 1
|
||||
|
||||
#include "g4std/map"
|
||||
#include "G4RotationMatrix.hh"
|
||||
|
||||
typedef G4RotationMatrix* G4RotationMatrixPtr;
|
||||
typedef G4std::map<G4String, G4RotationMatrixPtr, G4std::less<G4String> > G4RotationMatrixTable;
|
||||
typedef G4std::map<G4String, G4RotationMatrixPtr, G4std::less<G4String> >::iterator G4RotationMatrixTableIterator;
|
||||
|
||||
|
||||
//typedef RWTPtrOrderedVector<G4RotationMatrix> G4RotationMatrixTable;
|
||||
// Is an instantiation of the template class RWTPtrOrderedVector.
|
||||
|
||||
class CCalRotationMatrixFactory {
|
||||
public:
|
||||
~CCalRotationMatrixFactory();
|
||||
|
||||
static CCalRotationMatrixFactory* getInstance();
|
||||
static CCalRotationMatrixFactory* getInstance(const G4String& rotfile);
|
||||
static void setFileName(const G4String& rotfile);
|
||||
|
||||
G4RotationMatrix* findMatrix(const G4String&);
|
||||
G4RotationMatrix* AddMatrix(const G4String& name,
|
||||
G4double th1, G4double phi1, //Axis angles
|
||||
G4double th2, G4double phi2, //in rads
|
||||
G4double th3, G4double phi3); //
|
||||
|
||||
private:
|
||||
CCalRotationMatrixFactory();
|
||||
|
||||
private:
|
||||
static CCalRotationMatrixFactory* instance;
|
||||
static G4String file;
|
||||
|
||||
G4RotationMatrixTable theMatrices; //Where the matrices are stored.
|
||||
};
|
||||
|
||||
G4std::ostream& operator<<(G4std::ostream&, const G4RotationMatrix &);
|
||||
#endif
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalRunAction.hh
|
||||
// Description: A class for providing user actions at begin and end of run
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalRunAction_h
|
||||
#define CCalRunAction_h
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
|
||||
class G4Run;
|
||||
class CCalRunAction: public G4UserRunAction{
|
||||
|
||||
public:
|
||||
CCalRunAction(){};
|
||||
virtual ~CCalRunAction(){};
|
||||
|
||||
public:
|
||||
virtual void BeginOfRunAction(const G4Run* aRun);
|
||||
virtual void EndOfRunAction(const G4Run* aRun);
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalSDList.hh
|
||||
// Description: Records name of all SD objects and classify them into
|
||||
// CALO and Tracker SD
|
||||
// Singleton class
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalSDList_h
|
||||
#define CCalSDList_h 1
|
||||
|
||||
#include "g4std/vector"
|
||||
#include "globals.hh"
|
||||
|
||||
typedef G4String nameType;
|
||||
|
||||
class CCalSDList{
|
||||
private:
|
||||
CCalSDList();
|
||||
~CCalSDList();
|
||||
|
||||
public:
|
||||
static CCalSDList* getInstance();
|
||||
|
||||
public:
|
||||
|
||||
void addCalo(nameType name);
|
||||
void addTracker(nameType name);
|
||||
|
||||
nameType getCaloSDName(int i);
|
||||
nameType getTrackerSDName(int i);
|
||||
|
||||
int getNumberOfCaloSD();
|
||||
int getNumberOfTrackerSD();
|
||||
|
||||
private:
|
||||
static CCalSDList* theList;
|
||||
G4std::vector<nameType> caloSD;
|
||||
G4std::vector<nameType> trackerSD;
|
||||
|
||||
private:
|
||||
CCalSDList& operator=(CCalSDList&);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File: CCalSensAssign.hh
|
||||
// Description: CCalSenAssign creates and assigns the sensitive detetctors
|
||||
// from the map of logical volumes which are potentially sensitive
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalSensAssign_h
|
||||
#define CCalSensAssign_h
|
||||
|
||||
#include "CCalVOrganization.hh"
|
||||
|
||||
#include "g4std/map"
|
||||
#include "globals.hh"
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
|
||||
class CCalSensAssign {
|
||||
|
||||
public:
|
||||
~CCalSensAssign(){};
|
||||
static CCalSensAssign* getInstance();
|
||||
bool assign();
|
||||
bool stackingAction();
|
||||
bool addCaloSD(G4String name, CCalVOrganization* numberingScheme);
|
||||
|
||||
private:
|
||||
CCalSensAssign();
|
||||
|
||||
static CCalSensAssign* theInstance;
|
||||
G4std::map<G4String,G4VSensitiveDetector*> sens_;
|
||||
|
||||
};
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user