Import Geant4 6.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:56:29 +02:00
parent 1d812b78b1
commit e083ffb441
1415 changed files with 111223 additions and 21207 deletions
+3 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.17 2003/12/02 17:30:37 gcosmo Exp $
$Id: History,v 1.18 2004/05/28 15:56:58 guatelli Exp $
-------------------------------------------------------------------
=========================================================
@@ -16,6 +16,8 @@ committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
28.05.2004 - S. Guatelli, tag xraytel-V06-01-00
Migartion to AIDA 3.2.1, PI 1.2.1
13.11.2003 - J.Allison, tag xraytel-V05-02-02
Removed OPACS from Vis Manager.
+6 -19
View File
@@ -1,4 +1,4 @@
$Id: README,v 1.11 2003/12/02 17:30:37 gcosmo Exp $
$Id: README,v 1.12 2004/05/28 15:56:58 guatelli Exp $
-------------------------------------------------------------------
=========================================================
@@ -6,7 +6,7 @@ $Id: README,v 1.11 2003/12/02 17:30:37 gcosmo Exp $
=========================================================
NEW: Nov 2002: Migration to AIDA 3 - see below
NEW: May 2004: Migration to AIDA 3.2.1 - see below
Introduction
@@ -71,7 +71,7 @@ NOTE: The geometry is refreshed on the viewer at the beginning of each run,
Analysis
--------
Set up for the AIDA 3.0 interface:
Set up for the AIDA 3.2.1, PI 1.2.1 interface:
In case the variable G4ANALYSIS_USE is set:
setenv G4ANALYSIS_USE 1
relevant information from the simulation is processed in the XrayTelAnalysis
@@ -83,22 +83,9 @@ Specifically in the GNUmakefile you find the 2 lines:
CPPFLAGS += `aida-config --include`
LDFLAGS += `aida-config --lib`
On-line plotting
----------------
Set-up for the AIDA 3.0 interface:
In case the variable G4ANALYSIS_USE_PLOTTER is set:
setenv G4ANALYSIS_USE_PLOTTER 1
a new window is opened for on-line plotting.
NOTE: The histograms are plotted or refreshed only in case an interesting event occurs.
This is the case only for about 1 every 10**4 events.
You may need to add the AIDA tool path to your run-time library path
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:`aida-config -r`
For more information about AIDA and PI please look at:
> http://aida.freehep.org/
> http://www.cern.ch/PI
Sources
-------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: XrayTelAnalysis.hh,v 1.7 2003/06/16 16:46:56 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: XrayTelAnalysis.hh,v 1.8 2004/05/28 15:56:58 guatelli Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
// Author: A. Pfeiffer (Andreas.Pfeiffer@cern.ch)
// (copy of his UserAnalyser class)
@@ -108,9 +108,9 @@ private:
XrayTelAnalysis();
#ifdef G4ANALYSIS_USE_PLOTTER
void plotAll();
#endif
// #ifdef G4ANALYSIS_USE_PLOTTER
// void plotAll();
// #endif
static XrayTelAnalysis* instance;
#ifdef G4ANALYSIS_USE
@@ -118,10 +118,10 @@ private:
AIDA::ITree *tree;
AIDA::IHistogramFactory *histoFactory;
AIDA::ITupleFactory *tupleFactory;
#ifdef G4ANALYSIS_USE_PLOTTER
AIDA::IPlotterFactory *plotterFactory;
AIDA::IPlotter *plotter;
#endif
// #ifdef G4ANALYSIS_USE_PLOTTER
// AIDA::IPlotterFactory *plotterFactory;
// AIDA::IPlotter *plotter;
// #endif
#endif
// Quantities for the ntuple
G4double eKin;
@@ -135,7 +135,11 @@ private:
G4String asciiFileName;
G4String histFileName;
G4String histFileType;
AIDA::IHistogram1D *h1;
AIDA::IHistogram2D *h2;
AIDA::IHistogram1D *h3;
AIDA::IHistogram2D *h4;
AIDA::ITuple * ntuple;
// std::ofstream asciiFile;
};
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: XrayTelAnalysis.cc,v 1.10 2003/08/13 13:06:02 santin Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: XrayTelAnalysis.cc,v 1.11 2004/05/28 15:56:59 guatelli Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
// Author: A. Pfeiffer (Andreas.Pfeiffer@cern.ch)
// (copied from his UserAnalyser class)
@@ -51,11 +51,11 @@ XrayTelAnalysis::XrayTelAnalysis()
: analysisFactory(0)
, tree(0)
, histoFactory(0)
, tupleFactory(0)
#ifdef G4ANALYSIS_USE_PLOTTER
, plotterFactory(0)
, plotter(0)
#endif
, tupleFactory(0), h1(0), h2(0), h3(0), h4(0), ntuple(0)
// #ifdef G4ANALYSIS_USE_PLOTTER
// , plotterFactory(0)
// , plotter(0)
// #endif
#endif
{
#ifdef G4ANALYSIS_USE
@@ -74,10 +74,10 @@ XrayTelAnalysis::~XrayTelAnalysis()
{
#ifdef G4ANALYSIS_USE
#ifdef G4ANALYSIS_USE_PLOTTER
if (plotterFactory) delete plotterFactory;
plotterFactory = 0;
#endif
// #ifdef G4ANALYSIS_USE_PLOTTER
// if (plotterFactory) delete plotterFactory;
// plotterFactory = 0;
// #endif
if (tupleFactory) delete tupleFactory;
tupleFactory = 0;
@@ -107,7 +107,7 @@ void XrayTelAnalysis::book()
analysisFactory = AIDA_createAnalysisFactory();
if(analysisFactory) {
//parameters for the TreeFactory
G4bool fileExists = false;
G4bool fileExists = true;
G4bool readOnly = false;
AIDA::ITreeFactory* treeFactory = analysisFactory->createTreeFactory();
if(treeFactory) {
@@ -125,17 +125,15 @@ void XrayTelAnalysis::book()
tupleFactory = analysisFactory->createTupleFactory ( *tree );
// Book histograms
histoFactory->createHistogram1D("1","Energy, all /keV", 100,0.,100.);
histoFactory->createHistogram2D("2","y-z, all /mm", 100,-500.,500.,100,-500.,500.);
histoFactory->createHistogram1D("3","Energy, entering detector /keV", 500,0.,500.);
histoFactory->createHistogram2D("4","y-z, entering detector /mm", 200,-50.,50.,200,-50.,50.);
h1 = histoFactory->createHistogram1D("1","Energy, all /keV", 100,0.,100.);
h2 = histoFactory->createHistogram2D("2","y-z, all /mm", 100,-500.,500.,100,-500.,500.);
h3 = histoFactory->createHistogram1D("3","Energy, entering detector /keV", 500,0.,500.);
h4 = histoFactory->createHistogram2D("4","y-z, entering detector /mm", 200,-50.,50.,200,-50.,50.);
// Book ntuples
AIDA::ITuple* ntuple10 = tupleFactory->create( "10", "Track ntuple",
ntuple = tupleFactory->create( "10", "Track ntuple",
"double energy,x,y,z,dirx,diry,dirz" );
assert(ntuple10);
}
}
delete treeFactory;
}
}
@@ -148,11 +146,11 @@ void XrayTelAnalysis::finish()
#ifdef G4ANALYSIS_USE
if (tree) {
// Committing the transaction with the tree
std::cout << "Committing..." << std::endl;
G4cout << "Committing..." << G4endl;
// write all histograms to file
tree->commit();
std::cout << "Closing the tree..." << std::endl;
G4cout << "Closing the tree..." << G4endl;
// close (will again commit)
tree->close();
@@ -161,9 +159,9 @@ void XrayTelAnalysis::finish()
// extra delete as objects are created in book() method rather than during
// initialisation of class
#ifdef G4ANALYSIS_USE_PLOTTER
if (plotterFactory) delete plotterFactory;
#endif
// #ifdef G4ANALYSIS_USE_PLOTTER
// if (plotterFactory) delete plotterFactory;
// #endif
if (tupleFactory) delete tupleFactory;
if (histoFactory) delete histoFactory;
@@ -185,27 +183,25 @@ void XrayTelAnalysis::analyseStepping(const G4Track& track, G4bool entering)
#ifdef G4ANALYSIS_USE
// Fill histograms, all tracks
AIDA::IHistogram1D* h1 = dynamic_cast<AIDA::IHistogram1D *> ( tree->find("1") );
h1->fill(eKin); // fill(x,y,weight)
AIDA::IHistogram2D* h2 = dynamic_cast<AIDA::IHistogram2D *> ( tree->find("2") );
h2->fill(y,z);
// Fill histograms and ntuple, tracks entering the detector
if (entering) {
// Fill and plot histograms
AIDA::IHistogram1D* h3 = dynamic_cast<AIDA::IHistogram1D *> ( tree->find("3") );
h3->fill(eKin);
AIDA::IHistogram2D* h4 = dynamic_cast<AIDA::IHistogram2D *> ( tree->find("4") );
h4->fill(y,z);
#ifdef G4ANALYSIS_USE_PLOTTER
plotAll();
#endif
// #ifdef G4ANALYSIS_USE_PLOTTER
// plotAll();
// #endif
}
// Fill ntuple
if (entering) {
AIDA::ITuple * ntuple = dynamic_cast<AIDA::ITuple *> ( tree->find("10") );
if (ntuple) {
// Fill the secondaries ntuple
ntuple->fill( ntuple->findColumn( "energy" ), (G4double) eKin );
@@ -255,40 +251,40 @@ void XrayTelAnalysis::analyseStepping(const G4Track& track, G4bool entering)
}
#ifdef G4ANALYSIS_USE_PLOTTER
void XrayTelAnalysis::plotAll()
{
if (!plotter) {
AIDA::IPlotterFactory* plotterFactory =
analysisFactory->createPlotterFactory();
if(plotterFactory) {
G4cout << "Creating the Plotter" << G4endl;
plotter = plotterFactory->create();
if(plotter) {
// Map the plotter on screen :
G4cout << "Showing the Plotter on screen" << G4endl;
plotter->show();
} else {
G4cout << "XrayTelAnalysis::plotAll: WARNING: Plotter not created" << G4endl;
}
delete plotterFactory;
} else {
G4cout << "XrayTelAnalysis::plotAll: WARNING: Plotter Factory not created" << G4endl;
}
}
// #ifdef G4ANALYSIS_USE_PLOTTER
// void XrayTelAnalysis::plotAll()
// {
// if (!plotter) {
// AIDA::IPlotterFactory* plotterFactory =
// analysisFactory->createPlotterFactory();
// if(plotterFactory) {
// G4cout << "Creating the Plotter" << G4endl;
// plotter = plotterFactory->create();
// if(plotter) {
// // Map the plotter on screen :
// G4cout << "Showing the Plotter on screen" << G4endl;
// plotter->show();
// } else {
// G4cout << "XrayTelAnalysis::plotAll: WARNING: Plotter not created" << G4endl;
// }
// delete plotterFactory;
// } else {
// G4cout << "XrayTelAnalysis::plotAll: WARNING: Plotter Factory not created" << G4endl;
// }
// }
if (plotter) {
plotter->createRegions(2,1,0);
AIDA::IHistogram1D* hp = dynamic_cast<AIDA::IHistogram1D *> ( tree->find("3") );
AIDA::IHistogram1D& h = *hp;
(plotter->currentRegion()).plot(h);
plotter->refresh();
plotter->setCurrentRegionNumber(1);
AIDA::IHistogram1D* hp2 = dynamic_cast<AIDA::IHistogram1D *> ( tree->find("1") );
AIDA::IHistogram1D& h2 = *hp2;
(plotter->currentRegion()).plot(h2);
plotter->refresh();
}
}
#endif
// if (plotter) {
// plotter->createRegions(2,1,0);
// AIDA::IHistogram1D* hp = dynamic_cast<AIDA::IHistogram1D *> ( tree->find("3") );
// AIDA::IHistogram1D& h = *hp;
// (plotter->currentRegion()).plot(h);
// plotter->refresh();
// plotter->setCurrentRegionNumber(1);
// AIDA::IHistogram1D* hp2 = dynamic_cast<AIDA::IHistogram1D *> ( tree->find("1") );
// AIDA::IHistogram1D& h2 = *hp2;
// (plotter->currentRegion()).plot(h2);
// plotter->refresh();
// }
// }
// #endif
@@ -227,7 +227,7 @@ void XrayTelPhysicsList::SetCuts()
SetCutValue(cutForProton, "proton");
SetCutValue(cutForProton, "anti_proton");
SetCutValueForOthers(defaultCutValue);
// SetCutValueForOthers(defaultCutValue);
if (verboseLevel >1) {
DumpCutValuesTable();
@@ -103,10 +103,11 @@ void XrayTelSteppingAction::UserSteppingAction(const G4Step* step)
XrayTelRunAction* runAction = (XrayTelRunAction*) runManager->GetUserRunAction();
runAction->Update(track->GetKineticEnergy());
}
#ifdef G4ANALYSIS_USE
// Do the analysis related to this step
XrayTelAnalysis* analysis = XrayTelAnalysis::getInstance();
analysis->analyseStepping(*track,entering);
#endif
}
+1 -1
View File
@@ -12,7 +12,7 @@
/gps/maxtheta 1. deg
/gps/energytype Mono
/gps/monoenergy 0.5 MeV
/run/beamOn 100000
/run/beamOn 1000
@@ -5,3 +5,141 @@ Energy (keV) x (mm) y (mm) z (mm)
36.365 599.484 18.159 -18.523
470.381 599.484 3.447 5.493
451.996 599.484 -19.986 -1.455
Energy (keV) x (mm) y (mm) z (mm)
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
Energy (keV) x (mm) y (mm) z (mm)
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
1000.000 0.000 0.000 -32.500
Energy (keV) x (mm) y (mm) z (mm)
Energy (keV) x (mm) y (mm) z (mm)
Energy (keV) x (mm) y (mm) z (mm)
Energy (keV) x (mm) y (mm) z (mm)
Energy (keV) x (mm) y (mm) z (mm)
1000.00020267143300.719 0.000 -32.500
1000.00020267143300.719 0.000 -32.500
1000.00020267143300.719 0.000 -32.500
1000.00020267143300.719 0.000 -32.500
1000.00020267143300.719 0.000 -32.500
1000.00020267143300.719 0.000 -32.500
1000.00020267143300.719 0.000 -32.500
1000.00020267143300.719 0.000 -32.500
1000.00020267143300.719 0.000 -32.500
1000.00020267143300.719 0.000 -32.500
Energy (keV) x (mm) y (mm) z (mm)
Energy (keV) x (mm) y (mm) z (mm)