Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.19 2002/06/18 18:45:39 griccard Exp $
|
||||
# $Id: GNUmakefile,v 1.21 2002/12/08 18:17:25 flongo Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
||||
# --------------------------------------------------------------
|
||||
@@ -13,9 +13,13 @@ endif
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
ifdef G4STORE_DATA
|
||||
CPPFLAGS += -DG4STORE_DATA
|
||||
endif
|
||||
|
||||
ifdef G4ANALYSIS_USE
|
||||
CPPFLAGS += `aida-config --useHBook --include`
|
||||
LDFLAGS += `aida-config --useHBook --lib`
|
||||
CPPFLAGS += `aida-config --include`
|
||||
LDFLAGS += `aida-config --lib`
|
||||
endif
|
||||
|
||||
ifdef G4ANALYSIS_USE_NTUPLE
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTel.cc,v 1.9 2002/06/18 18:45:39 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: README,v 1.16 2002/06/18 21:15:13 griccard Exp $
|
||||
$Id: README,v 1.18 2002/12/08 18:08:10 flongo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -8,7 +8,7 @@ $Id: README,v 1.16 2002/06/18 21:15:13 griccard Exp $
|
||||
gammaray_telescope
|
||||
------------------
|
||||
F.Longo, R.Giannitrapani & G.Santin
|
||||
December 2000
|
||||
December 2002
|
||||
|
||||
--------------------------------------------------------------
|
||||
Acknowledgments to GEANT4 people, in particular to R.Nartallo,
|
||||
@@ -23,7 +23,7 @@ anticoincidence system. In this version, the three detectors are made
|
||||
sensitive but only the hits on the tracker strips are registered and relevant
|
||||
information (energy deposition, position etc) are dumped to an external
|
||||
ASCII file for subsequent analysis. If the user has set up the
|
||||
AIDA (version 2.2 or compatible) environment or Anaphe/Lizard is available,
|
||||
AIDA (version 3.0 or compatible) environment or Anaphe/Lizard is available,
|
||||
then some histograms with relevant hits information are displayed
|
||||
and saved as PostScript files, and histograms and ntuples with
|
||||
relevant information are stored on a HBOOK file.
|
||||
@@ -53,6 +53,14 @@ The main features of this example are
|
||||
1. Setting up the environment variables
|
||||
---------------------------------------
|
||||
|
||||
- Setup for storing ASCII data
|
||||
|
||||
If you want to store the output data in an ASCII file 'Tracks_x.dat'
|
||||
where x stays for the run number. You should specify the environment
|
||||
variable:
|
||||
|
||||
setenv G4STORE_DATA 1
|
||||
|
||||
- Setup for Visualization
|
||||
|
||||
IMPORTANT: be sure that your Geant4 installation has been done
|
||||
@@ -70,8 +78,6 @@ The main features of this example are
|
||||
- Setup for Xmotif user interface
|
||||
|
||||
setenv G4UI_USE_XM 1
|
||||
(IMPORTANT: Do not set G4ANALYSIS_USE_NTUPLE when using XM!)
|
||||
|
||||
|
||||
- Set up for analysis using AIDA
|
||||
|
||||
@@ -86,14 +92,12 @@ The main features of this example are
|
||||
|
||||
(on a CERN machine with the gcc-2.95 compiler)
|
||||
|
||||
setenv PATH ${PATH}:/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/4.0.3/bin
|
||||
source /afs/cern.ch/sw/lhcxx/share/LHCXX/4.0.3/install/sharedstart.csh
|
||||
|
||||
(on a CERN machine with the egcs-2.91.66 compiler (G4SYSTEM Linux-egcs)
|
||||
|
||||
setenv PATH ${PATH}:/afs/cern.ch/sw/lhcxx/specific/redhat61/egcs_1.1.2/4.0.3-sec/bin
|
||||
source /afs/cern.ch/sw/lhcxx/share/LHCXX/4.0.3-sec/install/sharedstart.csh
|
||||
ln -s /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.2/scripts/* ~/bin/.
|
||||
(to be done once)
|
||||
|
||||
|
||||
setenv PATH ${PATH}:/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/5.0.2/bin
|
||||
source /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.2/install/sharedstart.csh
|
||||
|
||||
|
||||
2. Sample run
|
||||
@@ -191,31 +195,25 @@ The main features of this example are
|
||||
Please note that in a multiple run session, the last run always override the
|
||||
hbook file.
|
||||
|
||||
|
||||
|
||||
9. Histogramming
|
||||
----------------
|
||||
|
||||
Some hits information can be visualized runtime using the Anaphe QPlotter
|
||||
(if it is available on the user platform); two 2D histograms and two
|
||||
1D histograms can be visualized and saved (as PostScript files)
|
||||
during the simulation run.
|
||||
Some hits information can be visualized runtime using the Anaphe Plotter
|
||||
(if it is available on the user platform); two 1D histograms can be
|
||||
visualized during the simulation run.
|
||||
|
||||
The 2D histograms contain the hits positions on the TKR projected on
|
||||
the XZ plane and the YZ plane; the 1D histograms contain the energy
|
||||
deposition in the last X plane of the TKR and the hits distribution along
|
||||
the X planes of the TKR (note again that this histograms have been chosen more
|
||||
for pedagogical motivation than for physical one).
|
||||
The 1D histograms contain the energy deposition in the last X plane of
|
||||
the TKR and the hits distribution along the X planes of the TKR
|
||||
(note again that these histograms have been chosen more for pedagogical
|
||||
motivation than for physical one).
|
||||
|
||||
These histograms are filled and updated at every event and are initialized
|
||||
with each new run; the scale of the histograms is automatically derived from
|
||||
the detector geometry.
|
||||
|
||||
Throught a messenger it is possible to set some options with
|
||||
the UI subtree "/analysis/" (use the UI help for more info); in particular
|
||||
it is possible to enable or disable the drawing of the 1D and 2D histograms
|
||||
at every event and to enable or disable the saving of PostScript files at the
|
||||
end of each run. If you feel that the simulation is too slow with the
|
||||
the UI subtree "/analysis/" (use the UI help for more info);
|
||||
If you feel that the simulation is too slow with the
|
||||
histograms updated every event, you can disable the drawing and retain
|
||||
the saving. Please note that the updating of the histograms is triggered
|
||||
only when there is some hit in an event.
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# Macro file for the test of
|
||||
# GammaRayTel
|
||||
#
|
||||
#
|
||||
|
||||
/control/verbose 1
|
||||
/control/saveHistory
|
||||
/run/verbose 1
|
||||
|
||||
/gun/particle proton
|
||||
/gun/energy 1 GeV
|
||||
/gun/sourceType 2
|
||||
/run/beamOn 100
|
||||
|
||||
/gun/particle gamma
|
||||
/gun/energy 1 GeV
|
||||
/gun/sourceType 2
|
||||
/run/beamOn 100
|
||||
|
||||
/gun/particle e-
|
||||
/gun/energy 1 GeV
|
||||
/gun/sourceType 2
|
||||
/run/beamOn 100
|
||||
|
||||
/gun/particle proton
|
||||
/gun/energy 1 GeV
|
||||
/gun/sourceType 2
|
||||
/run/beamOn 100
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,29 +1,52 @@
|
||||
global tree, hm
|
||||
|
||||
# Here use the name of the hbook you want to analyze
|
||||
tree = tf.create("gammaraytel.hbook",1,1,"hbook")
|
||||
tree.thisown=1
|
||||
hm = af.createHistogramFactory(tree)
|
||||
# Creating a memory-mapped tree
|
||||
|
||||
tree=tf.create()
|
||||
|
||||
# Creating a histogram factory mapped to the tree
|
||||
|
||||
hf=af.createHistogramFactory( tree )
|
||||
|
||||
# Open an existing HBook file
|
||||
|
||||
treeHBook=tf.create("gammaraytel.hbook", "hbook", 1, 0 )
|
||||
|
||||
# Mounting the hbook tree under the master memory tree.
|
||||
|
||||
tree.mkdir( "hbook" )
|
||||
tree.mount( "/hbook", treeHBook, "/" )
|
||||
|
||||
# Retrieve histograms and load them into memory:
|
||||
hE = tree.findH1D("10")
|
||||
hPl = tree.findH1D("20")
|
||||
hXZ = tree.findH2D("30")
|
||||
hYZ = tree.findH2D("40")
|
||||
|
||||
# Fetching the histograms from hbook
|
||||
|
||||
hE=tree.findH1D( "/hbook/10" )
|
||||
hPl=tree.findH1D( "/hbook/20" )
|
||||
hXZ=tree.findH2D("/hbook/30")
|
||||
hYZ=tree.findH2D("/hbook/40")
|
||||
|
||||
# set plotter to 2*2 zones
|
||||
pl.createRegions(2,2)
|
||||
|
||||
# ... and plot the histograms
|
||||
pl.plot(hE ) ; pl.show() ; pl.next()
|
||||
pl.plot(hPl ) ; pl.show() ; pl.next()
|
||||
pl.plot(hXZ ) ; pl.show() ; pl.next()
|
||||
pl.plot(hYZ ) ; pl.show() ; pl.next()
|
||||
|
||||
# get the primary ntuple from the NtupleManager (just a check)
|
||||
nt1 = tree.findTuple("1")
|
||||
#pl.createRegions(2,2)
|
||||
#>>> NOTE! ONLY SINGLE REGION IN THIS VERSION!
|
||||
|
||||
# plot the histograms
|
||||
|
||||
pr = pl.currentRegion()
|
||||
pr.plot(hE,"")
|
||||
pl.refresh()
|
||||
|
||||
wait()
|
||||
|
||||
pr.clear()
|
||||
pr.plot(hPl,"")
|
||||
pl.refresh()
|
||||
|
||||
wait()
|
||||
|
||||
del hf
|
||||
del tree
|
||||
del treeHBook
|
||||
exit()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelAnalysis.hh,v 1.11 2002/06/18 18:47:14 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: GammaRayTelAnalysis.hh,v 1.12 2002/11/08 14:18:52 pfeiffer Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
@@ -52,13 +52,15 @@
|
||||
class GammaRayTelAnalysisMessenger;
|
||||
class GammaRayTelDetectorConstruction;
|
||||
|
||||
class IAnalysisFactory;
|
||||
class IHistogramFactory;
|
||||
class ITree;
|
||||
class IHistogram1D;
|
||||
class IHistogram2D;
|
||||
class ITuple;
|
||||
class IPlotter;
|
||||
namespace AIDA {
|
||||
class IAnalysisFactory;
|
||||
class IHistogramFactory;
|
||||
class ITree;
|
||||
class IHistogram1D;
|
||||
class IHistogram2D;
|
||||
class ITuple;
|
||||
class IPlotter;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -93,23 +95,23 @@ public:
|
||||
|
||||
private:
|
||||
GammaRayTelAnalysis(int = 0, char** = 0);
|
||||
void plot1D(IHistogram1D* histo);
|
||||
void plot2D(IHistogram2D* histo);
|
||||
void plot1D(AIDA::IHistogram1D* histo);
|
||||
void plot2D(AIDA::IHistogram2D* histo);
|
||||
void Plot();
|
||||
private:
|
||||
static GammaRayTelAnalysis* instance;
|
||||
|
||||
GammaRayTelDetectorConstruction* GammaRayTelDetector;
|
||||
|
||||
IAnalysisFactory* analysisFactory;
|
||||
ITree* tree;
|
||||
IPlotter* plotter;
|
||||
ITuple* tuple;
|
||||
AIDA::IAnalysisFactory* analysisFactory;
|
||||
AIDA::ITree* tree;
|
||||
AIDA::IPlotter* plotter;
|
||||
AIDA::ITuple* tuple;
|
||||
|
||||
IHistogram1D* energy;
|
||||
IHistogram1D* hits;
|
||||
IHistogram2D* posXZ;
|
||||
IHistogram2D* posYZ;
|
||||
AIDA::IHistogram1D* energy;
|
||||
AIDA::IHistogram1D* hits;
|
||||
AIDA::IHistogram2D* posXZ;
|
||||
AIDA::IHistogram2D* posYZ;
|
||||
|
||||
G4String histo1DDraw;
|
||||
G4String histo1DSave;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelAnalysisMessenger.hh,v 1.3 2001/11/23 17:44:54 santin Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelAnticoincidenceHit.hh,v 1.2 2001/07/11 09:56:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelAnticoincidenceSD.hh,v 1.3 2001/11/29 11:19:17 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelCalorimeterHit.hh,v 1.2 2001/07/11 09:56:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelCalorimeterSD.hh,v 1.4 2001/11/29 11:19:17 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelDetectorConstruction.hh,v 1.6 2001/07/11 09:56:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelDetectorMessenger.hh,v 1.3 2001/07/11 09:56:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelDigi.hh,v 1.1 2001/10/24 13:11:54 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelDigitizer.hh,v 1.2 2001/11/29 09:34:17 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelDigitizerMessenger.hh,v 1.1 2001/11/29 09:34:17 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
//
|
||||
// $Id: GammaRayTelDummySD.hh,v 1.4 2001/11/28 10:07:01 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelEventAction.hh,v 1.9 2001/12/04 11:40:28 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelPhysicsList.hh,v 1.3 2001/07/11 09:56:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelPrimaryGeneratorAction.hh,v 1.6 2001/11/29 11:19:17 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelPrimaryGeneratorMessenger.hh,v 1.3 2001/07/11 09:56:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelRunAction.hh,v 1.5 2001/11/23 17:44:54 santin Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelTrackerHit.hh,v 1.2 2001/07/11 09:56:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelTrackerROGeometry.hh,v 1.3 2001/11/29 11:19:17 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelTrackerSD.hh,v 1.4 2001/11/29 11:19:17 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelVisManager.hh,v 1.3 2001/07/11 09:56:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -40,9 +40,7 @@
|
||||
# Flush visualization
|
||||
/vis/viewer/update
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# run 10 events
|
||||
/run/beamOn 10
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelAnalysis.cc,v 1.14 2002/06/18 21:15:13 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: GammaRayTelAnalysis.cc,v 1.15 2002/11/08 14:18:53 pfeiffer Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
@@ -53,21 +53,12 @@
|
||||
#include "GammaRayTelAnalysisMessenger.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include <AIDA/IAnalysisFactory.h>
|
||||
#include <AIDA/ITreeFactory.h>
|
||||
#include <AIDA/ITree.h>
|
||||
#include <AIDA/IHistogramFactory.h>
|
||||
#include <AIDA/IHistogram1D.h>
|
||||
#include <AIDA/IHistogram2D.h>
|
||||
#include <AIDA/IPlotterFactory.h>
|
||||
#include <AIDA/IPlotter.h>
|
||||
#include <AIDA/ITupleFactory.h>
|
||||
#include <AIDA/ITuple.h>
|
||||
#include <AIDA/IManagedObject.h>
|
||||
# include <AIDA/AIDA.h>
|
||||
#endif
|
||||
|
||||
GammaRayTelAnalysis* GammaRayTelAnalysis::instance = 0;
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
GammaRayTelAnalysis::GammaRayTelAnalysis(int argc,char** argv)
|
||||
@@ -88,27 +79,24 @@ GammaRayTelAnalysis::GammaRayTelAnalysis(int argc,char** argv)
|
||||
analysisFactory = AIDA_createAnalysisFactory();
|
||||
if(analysisFactory) {
|
||||
|
||||
ITreeFactory* treeFactory = analysisFactory->createTreeFactory();
|
||||
AIDA::ITreeFactory* treeFactory = analysisFactory->createTreeFactory();
|
||||
if(treeFactory) {
|
||||
// Tree in memory :
|
||||
// Create a "tree" associated to an hbook
|
||||
tree = treeFactory->create("gammaraytel.hbook", false, false,"hbook");
|
||||
tree = treeFactory->create("gammaraytel.hbook", "hbook", false, false);
|
||||
if(tree) {
|
||||
// Get a tuple factory :
|
||||
ITupleFactory* tupleFactory = analysisFactory->createTupleFactory(*tree);
|
||||
AIDA::ITupleFactory* tupleFactory = analysisFactory->createTupleFactory(*tree);
|
||||
if(tupleFactory) {
|
||||
// Create a tuple :
|
||||
tuple = tupleFactory->create("tuple","Event info",
|
||||
"float energy, plane, x, y, z");
|
||||
tuple = tupleFactory->create("1","1", "float energy, plane, x, y, z");
|
||||
|
||||
assert(tuple);
|
||||
|
||||
delete tupleFactory;
|
||||
}
|
||||
|
||||
|
||||
IHistogramFactory* histoFactory =
|
||||
analysisFactory->createHistogramFactory(*tree);
|
||||
AIDA::IHistogramFactory* histoFactory = analysisFactory->createHistogramFactory(*tree);
|
||||
if(histoFactory) {
|
||||
// Create histos :
|
||||
int Nplane = GammaRayTelDetector->GetNbOfTKRLayers();
|
||||
@@ -120,28 +108,28 @@ GammaRayTelAnalysis::GammaRayTelAnalysis(int argc,char** argv)
|
||||
|
||||
// 1D histogram that store the energy deposition of the
|
||||
// particle in the last (number 0) TKR X-plane
|
||||
energy = histoFactory->create1D("10","Energy deposition in the last X plane (keV)", 100, 50, 200);
|
||||
energy = histoFactory->createHistogram1D("10","Energy deposition in the last X plane (keV)", 100, 50, 200);
|
||||
|
||||
// 1D histogram that store the hits distribution along the TKR X-planes
|
||||
hits = histoFactory->create1D("20","Hits distribution in the TKR X planes",Nplane, 0, Nplane-1);
|
||||
hits = histoFactory->createHistogram1D("20","Hits distribution in the TKR X planes",Nplane, 0, Nplane-1);
|
||||
|
||||
// 2D histogram that store the position (mm) of the hits (XZ projection)
|
||||
if (histo2DMode == "strip")
|
||||
posXZ = histoFactory->create2D("30","Tracker Hits XZ (strip,plane)",
|
||||
posXZ = histoFactory->createHistogram2D("30","Tracker Hits XZ (strip,plane)",
|
||||
N, 0, N-1,
|
||||
2*Nplane, 0, Nplane-1);
|
||||
else
|
||||
posXZ = histoFactory->create2D("30","Tracker Hits XZ (x,z) in mm",
|
||||
posXZ = histoFactory->createHistogram2D("30","Tracker Hits XZ (x,z) in mm",
|
||||
sizexy/5, -sizexy/2, sizexy/2,
|
||||
sizez/5, -sizez/2, sizez/2);
|
||||
|
||||
// 2D histogram that store the position (mm) of the hits (YZ projection)
|
||||
if(histo2DMode=="strip")
|
||||
posYZ = histoFactory->create2D("40","Tracker Hits YZ (strip,plane)",
|
||||
posYZ = histoFactory->createHistogram2D("40","Tracker Hits YZ (strip,plane)",
|
||||
N, 0, N-1,
|
||||
2*Nplane, 0, Nplane-1);
|
||||
else
|
||||
posYZ = histoFactory->create2D("40","Tracker Hits YZ (y,z) in mm",
|
||||
posYZ = histoFactory->createHistogram2D("40","Tracker Hits YZ (y,z) in mm",
|
||||
sizexy/5, -sizexy/2, sizexy/2,
|
||||
sizez/5, -sizez/2, sizez/2);
|
||||
|
||||
@@ -152,11 +140,11 @@ GammaRayTelAnalysis::GammaRayTelAnalysis(int argc,char** argv)
|
||||
delete treeFactory; // Will not delete the ITree.
|
||||
}
|
||||
|
||||
IPlotterFactory* plotterFactory =
|
||||
AIDA::IPlotterFactory* plotterFactory =
|
||||
analysisFactory->createPlotterFactory(argc,argv);
|
||||
if(plotterFactory) {
|
||||
plotter = plotterFactory->create();
|
||||
if(plotter) {
|
||||
plotter = plotterFactory->create();
|
||||
if(plotter) {
|
||||
plotter->show();
|
||||
plotter->setParameter("pageTitle","Gamma Ray Tel");
|
||||
}
|
||||
@@ -240,7 +228,7 @@ void GammaRayTelAnalysis::InsertHits(int nplane)
|
||||
void GammaRayTelAnalysis::setNtuple(float E, float p, float x, float y, float z)
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
ITuple * ntuple = dynamic_cast<ITuple *> ( tree->find("tuple") );
|
||||
AIDA::ITuple * ntuple = dynamic_cast<AIDA::ITuple *> ( tree->find("1") );
|
||||
if(ntuple) {
|
||||
ntuple->fill(tuple->findColumn("energy"),E);
|
||||
ntuple->fill(tuple->findColumn("plane"),p);
|
||||
@@ -261,13 +249,13 @@ void GammaRayTelAnalysis::setNtuple(float E, float p, float x, float y, float z)
|
||||
void GammaRayTelAnalysis::BeginOfRun(G4int n)
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
|
||||
/*
|
||||
if(energy) energy->reset();
|
||||
if(hits) hits->reset();
|
||||
if(posXZ) posXZ->reset();
|
||||
if(posYZ) posYZ->reset();
|
||||
*/
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -279,41 +267,44 @@ void GammaRayTelAnalysis::BeginOfRun(G4int n)
|
||||
void GammaRayTelAnalysis::EndOfRun(G4int n)
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
if(tree) tree->commit();
|
||||
|
||||
if(tree) {
|
||||
tree->commit();
|
||||
tree->close();
|
||||
}
|
||||
|
||||
if(plotter) {
|
||||
|
||||
// We set one single region for the plotter
|
||||
// We now print the histograms, each one in a separate file
|
||||
if(histo2DSave == "enable") {
|
||||
char name[15];
|
||||
plotter->createRegions(1,1);
|
||||
sprintf(name,"posxz_%d.ps", n);
|
||||
plotter->plot(*posXZ);
|
||||
plotter->currentRegion().plot(*posXZ);
|
||||
plotter->refresh();
|
||||
plotter->write(name,"ps");
|
||||
//plotter->write(name,"ps");
|
||||
|
||||
plotter->createRegions(1,1);
|
||||
sprintf(name,"posyz_%d.ps", n);
|
||||
plotter->plot(*posYZ);
|
||||
plotter->currentRegion().plot(*posYZ);
|
||||
plotter->refresh();
|
||||
plotter->write(name,"ps");
|
||||
//plotter->write(name,"ps");
|
||||
}
|
||||
|
||||
if(histo1DSave == "enable") {
|
||||
plotter->createRegions(1,1);
|
||||
char name[15];
|
||||
sprintf(name,"energy_%d.ps", n);
|
||||
plotter->plot(*energy);
|
||||
plotter->currentRegion().plot(*energy);
|
||||
plotter->refresh();
|
||||
plotter->write(name,"ps");
|
||||
//plotter->write(name,"ps");
|
||||
|
||||
plotter->createRegions(1,1);
|
||||
sprintf(name,"hits_%d.ps", n);
|
||||
plotter->clearRegion();
|
||||
plotter->plot(*hits);
|
||||
//plotter->clearRegion();
|
||||
plotter->currentRegion().plot(*hits);
|
||||
plotter->refresh();
|
||||
plotter->write(name,"ps");
|
||||
//plotter->write(name,"ps");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -335,40 +326,22 @@ void GammaRayTelAnalysis::EndOfEvent(G4int flag)
|
||||
// for paper output.
|
||||
if(plotter) {
|
||||
if((histo2DDraw == "enable") && (histo1DDraw == "enable")) {
|
||||
plotter->createRegions(2,2);
|
||||
plotter->plot(*posXZ);
|
||||
plotter->show();
|
||||
plotter->next();
|
||||
|
||||
plotter->plot(*posYZ);
|
||||
plotter->show();
|
||||
plotter->next();
|
||||
|
||||
plotter->plot(*energy);
|
||||
plotter->show();
|
||||
plotter->next();
|
||||
plotter->plot(*hits);
|
||||
plotter->show();
|
||||
|
||||
plotter->currentRegion().plot(*posXZ);
|
||||
plotter->currentRegion().plot(*posYZ);
|
||||
plotter->currentRegion().plot(*energy);
|
||||
plotter->currentRegion().plot(*hits);
|
||||
} else if((histo1DDraw == "enable") && (histo2DDraw != "enable")) {
|
||||
plotter->createRegions(1,2);
|
||||
plotter->plot(*energy);
|
||||
plotter->show();
|
||||
plotter->next();
|
||||
plotter->plot(*hits);
|
||||
plotter->currentRegion().plot(*energy);
|
||||
plotter->currentRegion().plot(*hits);
|
||||
} else if((histo1DDraw != "enable") && (histo2DDraw == "enable")) {
|
||||
plotter->createRegions(1,2);
|
||||
plotter->plot(*posXZ);
|
||||
plotter->show();
|
||||
plotter->next();
|
||||
plotter->plot(*posYZ);
|
||||
plotter->currentRegion().plot(*posXZ);
|
||||
plotter->currentRegion().plot(*posYZ);
|
||||
} else { // Nothing to plot.
|
||||
plotter->createRegions(1,1);
|
||||
}
|
||||
plotter->refresh();
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelAnalysisMessenger.cc,v 1.5 2001/12/04 11:40:28 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: GammaRayTelAnalysisMessenger.cc,v 1.8 2002/12/11 17:13:38 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -67,7 +67,7 @@ GammaRayTelAnalysisMessenger::GammaRayTelAnalysisMessenger(GammaRayTelAnalysis*
|
||||
Histo1DDrawCmd->SetParameterName("choice",true);
|
||||
Histo1DDrawCmd->SetDefaultValue("ebable");
|
||||
Histo1DDrawCmd->SetCandidates("disable enable");
|
||||
Histo1DDrawCmd->AvailableForStates(Idle);
|
||||
Histo1DDrawCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
Histo1DSaveCmd = new G4UIcmdWithAString("/analysis/histo1dSave",this);
|
||||
Histo1DSaveCmd->SetGuidance("Enable the saving of the 1d histograms every run.");
|
||||
@@ -75,7 +75,7 @@ GammaRayTelAnalysisMessenger::GammaRayTelAnalysisMessenger(GammaRayTelAnalysis*
|
||||
Histo1DSaveCmd->SetParameterName("choice",true);
|
||||
Histo1DSaveCmd->SetDefaultValue("enable");
|
||||
Histo1DSaveCmd->SetCandidates("disable enable");
|
||||
Histo1DSaveCmd->AvailableForStates(Idle);
|
||||
Histo1DSaveCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
/*
|
||||
Commands for the 2D histograms (hits positions along the TKR)
|
||||
@@ -100,7 +100,7 @@ GammaRayTelAnalysisMessenger::GammaRayTelAnalysisMessenger(GammaRayTelAnalysis*
|
||||
Histo2DDrawCmd->SetParameterName("choice",true);
|
||||
Histo2DDrawCmd->SetDefaultValue("enable");
|
||||
Histo2DDrawCmd->SetCandidates("disable enable");
|
||||
Histo2DDrawCmd->AvailableForStates(Idle);
|
||||
Histo2DDrawCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
Histo2DSaveCmd = new G4UIcmdWithAString("/analysis/histo2dSave",this);
|
||||
Histo2DSaveCmd->SetGuidance("Enable the saving of the 2d histograms every run.");
|
||||
@@ -108,7 +108,7 @@ GammaRayTelAnalysisMessenger::GammaRayTelAnalysisMessenger(GammaRayTelAnalysis*
|
||||
Histo2DSaveCmd->SetParameterName("choice",true);
|
||||
Histo2DSaveCmd->SetDefaultValue("enable");
|
||||
Histo2DSaveCmd->SetCandidates("disable enable");
|
||||
Histo2DSaveCmd->AvailableForStates(Idle);
|
||||
Histo2DSaveCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
Histo2DModeCmd = new G4UIcmdWithAString("/analysis/histo2dMode",this);
|
||||
Histo2DModeCmd->SetGuidance("Select the mode for the 2d histograms.");
|
||||
@@ -118,7 +118,7 @@ GammaRayTelAnalysisMessenger::GammaRayTelAnalysisMessenger(GammaRayTelAnalysis*
|
||||
Histo2DModeCmd->SetParameterName("choice",true);
|
||||
Histo2DModeCmd->SetDefaultValue("strip");
|
||||
Histo2DModeCmd->SetCandidates("position strip");
|
||||
Histo2DModeCmd->AvailableForStates(Idle);
|
||||
Histo2DModeCmd->AvailableForStates(G4State_Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelAnticoincidenceHit.cc,v 1.2 2001/07/11 09:56:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelAnticoincidenceSD.cc,v 1.4 2001/11/29 11:19:18 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelCalorimeterHit.cc,v 1.2 2001/07/11 09:56:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelCalorimeterSD.cc,v 1.4 2001/11/29 11:19:18 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelDetectorConstruction.cc,v 1.9 2001/11/29 11:19:18 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelDetectorMessenger.cc,v 1.4 2001/07/11 09:56:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: GammaRayTelDetectorMessenger.cc,v 1.7 2002/12/11 17:13:38 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -57,7 +57,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
ConverterMaterCmd = new G4UIcmdWithAString("/payload/setConvMat",this);
|
||||
ConverterMaterCmd->SetGuidance("Select Material of the Converter.");
|
||||
ConverterMaterCmd->SetParameterName("choice",false);
|
||||
ConverterMaterCmd->AvailableForStates(Idle);
|
||||
ConverterMaterCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// converter thickness command
|
||||
|
||||
@@ -67,7 +67,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
ConverterThickCmd->SetParameterName("Size",false);
|
||||
ConverterThickCmd->SetRange("Size>=0.");
|
||||
ConverterThickCmd->SetUnitCategory("Length");
|
||||
ConverterThickCmd->AvailableForStates(Idle);
|
||||
ConverterThickCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// tracker silicon thickness command
|
||||
|
||||
@@ -77,7 +77,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
SiliconThickCmd->SetParameterName("Size",false);
|
||||
SiliconThickCmd->SetRange("Size>=0.");
|
||||
SiliconThickCmd->SetUnitCategory("Length");
|
||||
SiliconThickCmd->AvailableForStates(Idle);
|
||||
SiliconThickCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// tracker silicon pitch command
|
||||
|
||||
@@ -87,7 +87,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
SiliconPitchCmd->SetParameterName("Size",false);
|
||||
SiliconPitchCmd->SetRange("Size>=0.");
|
||||
SiliconPitchCmd->SetUnitCategory("Length");
|
||||
SiliconPitchCmd->AvailableForStates(Idle);
|
||||
SiliconPitchCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// tracker silicon tile size command
|
||||
|
||||
@@ -97,7 +97,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
SiliconTileXYCmd->SetParameterName("Size",false);
|
||||
SiliconTileXYCmd->SetRange("Size>=0.");
|
||||
SiliconTileXYCmd->SetUnitCategory("Length");
|
||||
SiliconTileXYCmd->AvailableForStates(Idle);
|
||||
SiliconTileXYCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// tracker number of silicon tiles
|
||||
|
||||
@@ -105,7 +105,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
NbSiTilesCmd->SetGuidance("Set number of Si Tiles.");
|
||||
NbSiTilesCmd->SetParameterName("NbSiTiles",false);
|
||||
NbSiTilesCmd->SetRange("NbSiTiles>0 && NbSiTiles<100");
|
||||
NbSiTilesCmd->AvailableForStates(Idle);
|
||||
NbSiTilesCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// tracker number of silicon layers
|
||||
|
||||
@@ -113,7 +113,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
NbTKRLayersCmd->SetGuidance("Set number of TKR Layers.");
|
||||
NbTKRLayersCmd->SetParameterName("NbTKRLayers",false);
|
||||
NbTKRLayersCmd->SetRange("NbTKRLayers>0 && NbTKRLayers<30");
|
||||
NbTKRLayersCmd->AvailableForStates(Idle);
|
||||
NbTKRLayersCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// tracker layer distance
|
||||
|
||||
@@ -123,7 +123,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
LayerDistanceCmd->SetParameterName("Size",false);
|
||||
LayerDistanceCmd->SetRange("Size>=0.");
|
||||
LayerDistanceCmd->SetUnitCategory("Length");
|
||||
LayerDistanceCmd->AvailableForStates(Idle);
|
||||
LayerDistanceCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// tracker views distance
|
||||
|
||||
@@ -133,7 +133,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
ViewsDistanceCmd->SetParameterName("Size",false);
|
||||
ViewsDistanceCmd->SetRange("Size>=0.");
|
||||
ViewsDistanceCmd->SetUnitCategory("Length");
|
||||
ViewsDistanceCmd->AvailableForStates(Idle);
|
||||
ViewsDistanceCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// calorimeter detector thickness
|
||||
|
||||
@@ -143,7 +143,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
CALThickCmd->SetParameterName("Size",false);
|
||||
CALThickCmd->SetRange("Size>=0.");
|
||||
CALThickCmd->SetUnitCategory("Length");
|
||||
CALThickCmd->AvailableForStates(Idle);
|
||||
CALThickCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// number calorimeter detectors
|
||||
|
||||
@@ -151,7 +151,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
NbCALBarsCmd->SetGuidance("Set number of CsI Bars.");
|
||||
NbCALBarsCmd->SetParameterName("NbSiTiles",false);
|
||||
NbCALBarsCmd->SetRange("NbSiTiles>0 && NbSiTiles<100");
|
||||
NbCALBarsCmd->AvailableForStates(Idle);
|
||||
NbCALBarsCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// number calorimeter layers
|
||||
|
||||
@@ -159,7 +159,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
NbCALLayersCmd->SetGuidance("Set number of CAL Layers.");
|
||||
NbCALLayersCmd->SetParameterName("NbCALLayers",false);
|
||||
NbCALLayersCmd->SetRange("NbCALLayers>0 && NbCALLayers<16");
|
||||
NbCALLayersCmd->AvailableForStates(Idle);
|
||||
NbCALLayersCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// calorimeter detector thickness
|
||||
|
||||
@@ -169,7 +169,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
ACDThickCmd->SetParameterName("Size",false);
|
||||
ACDThickCmd->SetRange("Size>=0.");
|
||||
ACDThickCmd->SetUnitCategory("Length");
|
||||
ACDThickCmd->AvailableForStates(Idle);
|
||||
ACDThickCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// update Payload
|
||||
|
||||
@@ -177,7 +177,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
UpdateCmd->SetGuidance("Update payload geometry.");
|
||||
UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
|
||||
UpdateCmd->SetGuidance("if you changed geometrical value(s).");
|
||||
UpdateCmd->AvailableForStates(Idle);
|
||||
UpdateCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// magnetic field
|
||||
|
||||
@@ -186,7 +186,7 @@ GammaRayTelDetectorMessenger::GammaRayTelDetectorMessenger(GammaRayTelDetectorCo
|
||||
MagFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
|
||||
MagFieldCmd->SetParameterName("Bz",false);
|
||||
MagFieldCmd->SetUnitCategory("Magnetic flux density");
|
||||
MagFieldCmd->AvailableForStates(Idle);
|
||||
MagFieldCmd->AvailableForStates(G4State_Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelDigi.cc,v 1.2 2001/12/13 13:44:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelDigitizer.cc,v 1.3 2001/12/04 11:40:28 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelDigitizerMessenger.cc,v 1.1 2001/11/29 09:34:17 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: GammaRayTelDigitizerMessenger.cc,v 1.4 2002/12/11 17:13:38 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
@@ -53,7 +53,7 @@ GammaRayTelDigitizerMessenger::GammaRayTelDigitizerMessenger
|
||||
ThresholdCmd->SetDefaultValue((G4double)20.*keV);
|
||||
ThresholdCmd->SetRange("Threshold >=0.");
|
||||
ThresholdCmd->SetUnitCategory("Energy");
|
||||
ThresholdCmd->AvailableForStates(PreInit,Idle);
|
||||
ThresholdCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelEventAction.cc,v 1.14 2002/06/18 18:45:42 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: GammaRayTelEventAction.cc,v 1.15 2002/11/14 10:55:28 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
@@ -66,7 +66,9 @@
|
||||
// This file is a global variable in which we store energy deposition per hit
|
||||
// and other relevant information
|
||||
|
||||
#ifdef G4STORE_DATA
|
||||
extern G4std::ofstream outFile;
|
||||
#endif
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -153,14 +155,24 @@ void GammaRayTelEventAction::EndOfEventAction(const G4Event* evt)
|
||||
NPlane = (*THC)[i]->GetNSilPlane();
|
||||
IsX = (*THC)[i]->GetPlaneType();
|
||||
|
||||
#ifdef G4STORE_DATA
|
||||
outFile << G4std::setw(7) << event_id << " " <<
|
||||
ESil/keV << " " << NStrip <<
|
||||
" " << NPlane << " " << IsX << " " <<
|
||||
(*THC)[i]->GetPos().x()/mm <<" "<<
|
||||
(*THC)[i]->GetPos().y()/mm <<" "<<
|
||||
(*THC)[i]->GetPos().z()/mm <<" "<<
|
||||
G4endl;
|
||||
|
||||
G4endl;
|
||||
#else
|
||||
G4cout << G4std::setw(7) << event_id << " " <<
|
||||
ESil/keV << " " << NStrip <<
|
||||
" " << NPlane << " " << IsX << " " <<
|
||||
(*THC)[i]->GetPos().x()/mm <<" "<<
|
||||
(*THC)[i]->GetPos().y()/mm <<" "<<
|
||||
(*THC)[i]->GetPos().z()/mm <<" "<<
|
||||
G4endl;
|
||||
#endif
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
|
||||
// Here we fill the histograms of the Analysis manager
|
||||
@@ -222,8 +234,8 @@ void GammaRayTelEventAction::EndOfEventAction(const G4Event* evt)
|
||||
NPlane = (*DC)[i]->GetPlaneNumber();
|
||||
IsX = (*DC)[i]->GetPlaneType();
|
||||
|
||||
outFile << G4std::setw(7) << event_id << " " << NStrip <<
|
||||
" " << NPlane << " " << IsX << " " << G4endl;
|
||||
// outFile << G4std::setw(7) << event_id << " " << NStrip <<
|
||||
// " " << NPlane << " " << IsX << " " << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelPhysicsList.cc,v 1.3 2001/07/11 09:56:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelPrimaryGeneratorAction.cc,v 1.6 2001/11/29 11:19:18 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelPrimaryGeneratorMessenger.cc,v 1.3 2001/07/11 09:56:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: GammaRayTelPrimaryGeneratorMessenger.cc,v 1.6 2002/12/11 17:13:38 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
@@ -55,27 +55,27 @@ GammaRayTelPrimaryGeneratorMessenger::GammaRayTelPrimaryGeneratorMessenger
|
||||
RndmCmd->SetParameterName("choice",true);
|
||||
RndmCmd->SetDefaultValue("on");
|
||||
RndmCmd->SetCandidates("on off");
|
||||
RndmCmd->AvailableForStates(PreInit,Idle);
|
||||
RndmCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
SourceTypeCmd = new G4UIcmdWithAnInteger("/gun/sourceType",this);
|
||||
SourceTypeCmd->SetGuidance("Select the type of incident flux.");
|
||||
SourceTypeCmd->SetGuidance(" Choice : 0(default), 1(isotropic), 2(wide parallel beam)");
|
||||
SourceTypeCmd->SetParameterName("choice",true);
|
||||
SourceTypeCmd->SetDefaultValue((G4int)0);
|
||||
SourceTypeCmd->AvailableForStates(PreInit,Idle);
|
||||
SourceTypeCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
VertexRadiusCmd = new G4UIcmdWithADoubleAndUnit("/gun/vertexRadius",this);
|
||||
VertexRadiusCmd->SetGuidance("Radius (and unit) of sphere for vertices of incident flux.");
|
||||
VertexRadiusCmd->SetParameterName("choice",true);
|
||||
VertexRadiusCmd->SetDefaultValue((G4double)1.*cm);
|
||||
VertexRadiusCmd->AvailableForStates(PreInit,Idle);
|
||||
VertexRadiusCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
SpectrumTypeCmd = new G4UIcmdWithAnInteger("/gun/spectrumType",this);
|
||||
SpectrumTypeCmd->SetGuidance("Select the type of incident spectrum.");
|
||||
SpectrumTypeCmd->SetGuidance(" Choice : 0(default), 1(), 2(E^{-gamma}), 3()");
|
||||
SpectrumTypeCmd->SetParameterName("choice",true);
|
||||
SpectrumTypeCmd->SetDefaultValue((G4int)0);
|
||||
SpectrumTypeCmd->AvailableForStates(PreInit,Idle);
|
||||
SpectrumTypeCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelRunAction.cc,v 1.7 2001/12/04 11:40:28 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: GammaRayTelRunAction.cc,v 1.8 2002/11/14 10:55:17 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
@@ -71,8 +71,11 @@ void GammaRayTelRunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
char name[15];
|
||||
|
||||
// Open the file for the tracks of this run
|
||||
|
||||
#ifdef G4STORE_DATA
|
||||
sprintf(name,"Tracks_%d.dat", aRun->GetRunID());
|
||||
outFile.open(name);
|
||||
#endif
|
||||
|
||||
// Prepare the visualization
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
@@ -98,7 +101,9 @@ void GammaRayTelRunAction::EndOfRunAction(const G4Run* aRun)
|
||||
}
|
||||
|
||||
// Close the file with the hits information
|
||||
#ifdef G4STORE_DATA
|
||||
outFile.close();
|
||||
#endif
|
||||
|
||||
// If analysis is used, print out the histograms
|
||||
#ifdef G4ANALYSIS_USE
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelTrackerHit.cc,v 1.2 2001/07/11 09:56:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelTrackerROGeometry.cc,v 1.5 2001/11/29 11:19:18 griccard Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelTrackerSD.cc,v 1.6 2001/12/04 11:40:28 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
Regular → Executable
+4
-2
@@ -22,8 +22,8 @@
|
||||
//
|
||||
|
||||
//
|
||||
// $Id: GammaRayTelVisManager.cc,v 1.6 2001/11/23 17:39:04 santin Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: GammaRayTelVisManager.cc,v 1.7 2002/11/13 19:17:13 duns Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "G4DAWNFILE.hh"
|
||||
#include "G4GAGTree.hh"
|
||||
//#include "G4HepRepFile.hh"
|
||||
//#include "G4HepRep.hh"
|
||||
#include "G4RayTracer.hh"
|
||||
#include "G4VRML1File.hh"
|
||||
#include "G4VRML2File.hh"
|
||||
@@ -101,6 +102,7 @@ void GammaRayTelVisManager::RegisterGraphicsSystems () {
|
||||
RegisterGraphicsSystem (new G4DAWNFILE);
|
||||
RegisterGraphicsSystem (new G4GAGTree);
|
||||
// RegisterGraphicsSystem (new G4HepRepFile);
|
||||
// RegisterGraphicsSystem (new G4HepRep);
|
||||
RegisterGraphicsSystem (new G4RayTracer);
|
||||
RegisterGraphicsSystem (new G4VRML1File);
|
||||
RegisterGraphicsSystem (new G4VRML2File);
|
||||
|
||||
Reference in New Issue
Block a user