Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -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