Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B03App.hh,v 1.3 2002/12/13 11:26:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef B03App_hh
|
||||
#define B03App_hh B03App_hh
|
||||
|
||||
class G4RunManager;
|
||||
class B03PrimaryGeneratorAction;
|
||||
class B03PhysicsList;
|
||||
class B03DetectorConstruction;
|
||||
|
||||
class B03AppBase {
|
||||
public:
|
||||
~B03AppBase();
|
||||
static B03AppBase &GetB03AppBase();
|
||||
G4RunManager &GetRunManager(){return *frunMgr;}
|
||||
|
||||
private:
|
||||
B03AppBase();
|
||||
static B03AppBase *fB03AppBase;
|
||||
G4RunManager *frunMgr;
|
||||
|
||||
B03DetectorConstruction *fDetector;
|
||||
B03PrimaryGeneratorAction *fPrimary;
|
||||
B03PhysicsList *fPhysics;
|
||||
};
|
||||
|
||||
// B03AppBase *GetB03AppBase();
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
%module B03App
|
||||
%{
|
||||
#include "globals.hh"
|
||||
#include "B03App.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4IStore.hh"
|
||||
#include "G4VCellScorerStore.hh"
|
||||
#include "G4VScorer.hh"
|
||||
#include "G4ParallelGeometrySampler.hh"
|
||||
#include "G4CellScorerStore.hh"
|
||||
#include "G4CellStoreScorer.hh"
|
||||
#include "G4GeometryCell.hh"
|
||||
#include "G4CellScoreComposer.hh"
|
||||
#include "G4CellScoreValues.hh"
|
||||
#include "G4CellScorer.hh"
|
||||
#include "G4ScoreTable.hh"
|
||||
#include "G4VIStore.hh"
|
||||
#include <string>
|
||||
#include "g4std/strstream"
|
||||
#include <memory>
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "B03ImportanceDetectorConstruction.hh"
|
||||
#include "G4VImportanceAlgorithm.hh"
|
||||
%}
|
||||
|
||||
class G4RunManager {
|
||||
public:
|
||||
void BeamOn(int e);
|
||||
};
|
||||
|
||||
class G4VIStore{
|
||||
};
|
||||
|
||||
class G4VPhysicalVolume {
|
||||
};
|
||||
|
||||
class G4GeometryCell{
|
||||
public:
|
||||
G4GeometryCell(const G4VPhysicalVolume &aVolume, int RepNum);
|
||||
~G4GeometryCell();
|
||||
const G4VPhysicalVolume &GetPhysicalVolume() const;
|
||||
int GetReplicaNumber() const;
|
||||
};
|
||||
|
||||
class G4IStore : public G4VIStore{
|
||||
public:
|
||||
G4IStore(const G4VPhysicalVolume &worldvolume);
|
||||
~G4IStore();
|
||||
void AddImportanceGeometryCell(double importance,
|
||||
const G4GeometryCell &gCell);
|
||||
void ChangeImportance(double importance,
|
||||
const G4GeometryCell &gCell);
|
||||
double GetImportance(const G4GeometryCell &gCell) const;
|
||||
bool IsKnown(const G4GeometryCell &gCell) const;
|
||||
const G4VPhysicalVolume &GetWorldVolume() const;
|
||||
};
|
||||
|
||||
|
||||
struct G4CellScoreValues {
|
||||
G4CellScoreValues();
|
||||
double fSumSL;
|
||||
double fSumSLW;
|
||||
double fSumSLW_v;
|
||||
double fSumSLWE;
|
||||
double fSumSLWE_v;
|
||||
int fSumTracksEntering;
|
||||
int fSumPopulation;
|
||||
int fSumCollisions;
|
||||
double fSumCollisionsWeight;
|
||||
double fNumberWeightedEnergy;
|
||||
double fFluxWeightedEnergy;
|
||||
double fAverageTrackWeight;
|
||||
double fImportance;
|
||||
};
|
||||
|
||||
|
||||
class G4CellScoreComposer {
|
||||
public:
|
||||
G4CellScoreComposer();
|
||||
~G4CellScoreComposer();
|
||||
G4CellScoreValues GetStandardCellScoreValues() const;
|
||||
};
|
||||
|
||||
|
||||
class G4CellScorer{
|
||||
public:
|
||||
G4CellScoreComposer GetCellScoreComposer() const;
|
||||
G4CellScoreValues GetCellScoreValues() const;
|
||||
};
|
||||
|
||||
typedef G4std::map<G4GeometryCell, G4CellScorer *, G4PTkComp> G4MapGeometryCellCellScorer;
|
||||
|
||||
class G4VCellScorerStore{
|
||||
};
|
||||
|
||||
class G4CellScorerStore : public G4VCellScorerStore{
|
||||
public:
|
||||
G4CellScorerStore();
|
||||
~G4CellScorerStore();
|
||||
void SetAutoScorerCreate();
|
||||
G4CellScorer *AddCellScorer(const G4GeometryCell &gCell);
|
||||
const G4MapGeometryCellCellScorer &GetMapGeometryCellCellScorer() const;
|
||||
};
|
||||
|
||||
class G4VScorer{
|
||||
};
|
||||
|
||||
class G4CellStoreScorer : public G4VScorer{
|
||||
public:
|
||||
G4CellStoreScorer(G4VCellScorerStore &csc);
|
||||
};
|
||||
|
||||
class G4VImportanceAlgorithm{
|
||||
};
|
||||
|
||||
class G4ParallelGeometrySampler{
|
||||
public:
|
||||
G4ParallelGeometrySampler(G4VPhysicalVolume &worldvolume,
|
||||
const char *);
|
||||
~G4ParallelGeometrySampler();
|
||||
void PrepareScoring(G4VScorer *Scorer);
|
||||
void PrepareImportanceSampling(G4VIStore *istore,
|
||||
const G4VImportanceAlgorithm *ialg = 0);
|
||||
void PrepareWeightRoulett(G4double wsurvive,
|
||||
G4double wlimit,
|
||||
G4double isource);
|
||||
|
||||
void Configure();
|
||||
|
||||
void ClearSampling();
|
||||
G4bool IsConfigured() const;
|
||||
};
|
||||
|
||||
class G4ScoreTable
|
||||
{
|
||||
public:
|
||||
G4ScoreTable(const G4VIStore *aIStore = 0);
|
||||
~G4ScoreTable(){}
|
||||
void Print(const G4MapGeometryCellCellScorer &cs,
|
||||
G4std::ostream *out = 0);
|
||||
%extend {
|
||||
const char *Write(const G4MapGeometryCellCellScorer &cs){
|
||||
G4std::ostrstream tmpout;
|
||||
self->Print(cs, &tmpout);
|
||||
string *value = new string(tmpout.str());
|
||||
return value->c_str();
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
class B03ImportanceDetectorConstruction{
|
||||
public:
|
||||
B03ImportanceDetectorConstruction();
|
||||
~B03ImportanceDetectorConstruction();
|
||||
|
||||
const G4VPhysicalVolume &GetPhysicalVolumeByName(const char *name) const;
|
||||
G4VPhysicalVolume &GetWorldVolume() const;
|
||||
%extend {
|
||||
const char *ListPhysNames(){
|
||||
G4String *value = new G4String(self->ListPhysNamesAsG4String());
|
||||
return value->c_str();
|
||||
}
|
||||
}
|
||||
G4GeometryCell GetGeometryCell(int i);
|
||||
};
|
||||
|
||||
class B03AppBase{
|
||||
public:
|
||||
~B03AppBase();
|
||||
static B03AppBase &GetB03AppBase();
|
||||
G4RunManager &GetRunManager();
|
||||
private:
|
||||
B03AppBase();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -21,18 +21,16 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B03DetectorConstruction.hh,v 1.2 2002/04/19 10:54:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: B03DetectorConstruction.hh,v 1.4 2002/11/08 17:35:18 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#ifndef B03DetectorConstruction_hh
|
||||
#define B03DetectorConstruction_hh B03DetectorConstruction_hh
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4VIStore;
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
|
||||
class B03DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
@@ -41,10 +39,6 @@ public:
|
||||
~B03DetectorConstruction();
|
||||
|
||||
G4VPhysicalVolume* Construct();
|
||||
G4VIStore* GetIStore();
|
||||
|
||||
private:
|
||||
G4VIStore *fIStore;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B03ImportanceDetectorConstruction.hh,v 1.1 2002/11/08 17:35:18 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#ifndef B03ImportanceDetectorConstruction_hh
|
||||
#define B03ImportanceDetectorConstruction_hh B03ImportanceDetectorConstruction_hh
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/map"
|
||||
#include "B03PVolumeStore.hh"
|
||||
class G4VPhysicalVolume;
|
||||
|
||||
|
||||
|
||||
class B03ImportanceDetectorConstruction
|
||||
{
|
||||
public:
|
||||
B03ImportanceDetectorConstruction();
|
||||
~B03ImportanceDetectorConstruction();
|
||||
|
||||
const G4VPhysicalVolume &GetPhysicalVolumeByName(const G4String& name) const;
|
||||
G4VPhysicalVolume &GetWorldVolume() const;
|
||||
G4String ListPhysNamesAsG4String();
|
||||
G4String GetCellName(G4int i);
|
||||
G4GeometryCell GetGeometryCell(G4int i);
|
||||
|
||||
private:
|
||||
void Construct();
|
||||
B03PVolumeStore fPVolumeStore;;
|
||||
G4VPhysicalVolume *fWorldVolume;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B03PVolumeStore.hh,v 1.1 2002/11/08 17:35:18 dressel Exp $
|
||||
// GEANT4 tag
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class B03PVolumeStore
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// ...
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#ifndef B03PVolumeStore_hh
|
||||
#define B03PVolumeStore_hh B03PVolumeStore_hh
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/set"
|
||||
#include "G4GeometryCell.hh"
|
||||
#include "G4GeometryCellComp.hh"
|
||||
|
||||
typedef G4std::set< G4GeometryCell, G4GeometryCellComp > B03SetGeometryCell;
|
||||
|
||||
class B03PVolumeStore {
|
||||
public:
|
||||
B03PVolumeStore();
|
||||
~B03PVolumeStore();
|
||||
|
||||
void AddPVolume(const G4GeometryCell &cell);
|
||||
const G4VPhysicalVolume *GetPVolume(const G4String &name) const;
|
||||
G4String GetPNames() const;
|
||||
|
||||
private:
|
||||
B03SetGeometryCell fSetGeometryCell;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B03PhysicsList.hh,v 1.2 2002/04/19 10:54:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: B03PhysicsList.hh,v 1.3 2002/11/08 17:35:18 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#ifndef B03PhysicsList_h
|
||||
@@ -42,16 +42,15 @@ class B03PhysicsList : public G4VUserPhysicsList
|
||||
virtual void ConstructParticle();
|
||||
virtual void ConstructProcess();
|
||||
|
||||
//
|
||||
virtual void SetCuts();
|
||||
|
||||
protected:
|
||||
// these methods Construct physics processes and register them
|
||||
// these methods Construct physics processes and register them
|
||||
virtual void ConstructGeneral();
|
||||
virtual void ConstructEM();
|
||||
virtual void ConstructHad();
|
||||
virtual void ConstructLeptHad();
|
||||
//
|
||||
|
||||
void ConstructAllBosons();
|
||||
void ConstructAllLeptons();
|
||||
void ConstructAllMesons();
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B03PrimaryGeneratorAction.hh,v 1.2 2002/04/19 10:54:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: B03PrimaryGeneratorAction.hh,v 1.3 2002/11/08 17:35:18 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#ifndef B03PrimaryGeneratorAction_hh
|
||||
|
||||
Reference in New Issue
Block a user