Import Geant4 0.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-01 15:25:35 +02:00
parent 54d6b71f95
commit b97f8d0df7
3237 changed files with 807095 additions and 0 deletions
@@ -0,0 +1,55 @@
// This code implementation is the intellectual property of
// the RD44 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: ExN02ChamberParameterisation.hh,v 1.2 1998/11/30 17:18:43 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// A parameterisation that describes a series of boxes along Z
// The boxes have equal width, & their lengths are a linear equation.
// They are spaced an equal distance apart, starting from given location.
//
#ifndef ExN02ChamberParameterisation_H
#define ExN02ChamberParameterisation_H 1
#include "globals.hh"
#include "G4VPVParameterisation.hh"
class G4VPhysicalVolume;
class G4Box;
class ExN02ChamberParameterisation : public G4VPVParameterisation
{
public:
ExN02ChamberParameterisation(G4int NoChambers,
G4double startZ,
G4double spacing,
G4double widthChamber,
G4double lengthInitial,
G4double lengthFinal );
~ExN02ChamberParameterisation();
void ComputeTransformation
(const G4int copyNo,G4VPhysicalVolume *physVol) const;
void ComputeDimensions
(G4Box & trackerLayer, const G4int copyNo,
const G4VPhysicalVolume * physVol) const;
// Functions to get the parameters would be nice.
// eg G4int GetNoChambers();
private:
G4int fNoChambers; //
G4double fStartZ;
G4double fHalfWidth; // The half-width of each tracker chamber
G4double fSpacing; // The distance between the chambers' center
G4double fHalfLengthFirst; // The first half-length
G4double fHalfLengthIncr; // The Increment for the half-length
};
#endif
@@ -0,0 +1,77 @@
// This code implementation is the intellectual property of
// the RD44 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: ExN02DetectorConstruction.hh,v 1.3 1998/10/09 14:31:01 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#ifndef ExN02DetectorConstruction_h
#define ExN02DetectorConstruction_h 1
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
// class G4UniformMagField;
#include "ExN02MagneticField.hh"
class G4Box;
class G4LogicalVolume;
class G4VPhysicalVolume;
class G4Material;
class ExN02DetectorMessenger;
class ExN02DetectorConstruction : public G4VUserDetectorConstruction
{
public:
ExN02DetectorConstruction();
~ExN02DetectorConstruction();
public:
G4VPhysicalVolume* Construct();
const G4VPhysicalVolume* GetTracker() {return physiTracker;};
G4double GetTargetFullLength() {return fTargetLength;};
G4double GetWorldFullLength() {return fWorldLength;};
void SetDetectorLength(G4double length);
// void setMaterial(G4String val);
void SetMagField(G4double val);
private:
G4Box* solidWorld; //pointer to the solid enveloppe
G4LogicalVolume* logicWorld; //pointer to the logical enveloppe
G4VPhysicalVolume* physiWorld; //pointer to the physical enveloppe
G4double fullSizeWorld; //full size of the enveloppe
G4Box* solidTracker; //pointer to the solid Tracker
G4LogicalVolume* logicTracker; //pointer to the logical Tracker
G4VPhysicalVolume* physiTracker; //pointer to the physical Tracker
G4Box* solidTarget; //pointer to the solid Target
G4LogicalVolume* logicTarget; //pointer to the logical Target
G4VPhysicalVolume* physiTarget; //pointer to the physical Target
G4Box* solidChamber; //pointer to the solid Chamber
G4LogicalVolume* logicChamber; //pointer to the logical Chamber
G4VPhysicalVolume* physiChamber; //pointer to the physical Chamber
G4Material* myMaterial; //pointer to the material
ExN02MagneticField* fpMagField; //pointer to the mag field
ExN02DetectorMessenger* detectorMessenger; //pointer to the Messenger object
G4double fWorldLength; // Full length of the world volume
// Sizes of pieces of the detector
G4double fDetectorLength; // Full length of the detector
G4double fTrackerLength; // Full length of Tracker
G4double fTargetLength; // Full length of Target
};
#endif
@@ -0,0 +1,42 @@
// This code implementation is the intellectual property of
// the RD44 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: ExN02DetectorMessenger.hh,v 1.3 1998/10/09 14:31:02 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#ifndef ExN02DetectorMessenger_h
#define ExN02DetectorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class ExN02DetectorConstruction;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithADoubleAndUnit;
class ExN02DetectorMessenger: public G4UImessenger
{
public:
ExN02DetectorMessenger(ExN02DetectorConstruction * myDet);
~ExN02DetectorMessenger();
void SetNewValue(G4UIcommand * command,G4String newValues);
private:
ExN02DetectorConstruction* myDetector;
G4UIdirectory* mydetDir;
G4UIcmdWithAString* MatCmd;
G4UIcmdWithADoubleAndUnit* SizeCmd;
G4UIcmdWithADoubleAndUnit* FieldCmd;
};
#endif
@@ -0,0 +1,36 @@
// This code implementation is the intellectual property of
// the RD44 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: ExN02EventAction.hh,v 1.3 1998/10/09 14:31:02 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#ifndef ExN02EventAction_h
#define ExN02EventAction_h 1
#include "G4UserEventAction.hh"
class G4Event;
class ExN02EventAction : public G4UserEventAction
{
public:
ExN02EventAction();
~ExN02EventAction();
public:
void BeginOfEventAction();
void EndOfEventAction();
private:
};
#endif
@@ -0,0 +1,46 @@
// This code implementation is the intellectual property of
// the RD44 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: ExN02MagneticField.hh,v 1.1 1998/10/09 14:31:03 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// A class for control of the Magnetic Field of the detector.
// The field is assumed to be uniform.
//
// $ Id: $
// Should this be a:
// i) messenger
// ii) user class that creates the field ?
// iii) simply a derived class of Uniform field ? <== I have chosen this now.
// iv) a field manager that creates/updates field (Prefered?)
#ifndef ExN02MagneticField_H
#define ExN02MagneticField_H
#include "G4UniformMagField.hh"
class G4FieldManager;
class ExN02MagneticField: public G4UniformMagField
{
public:
ExN02MagneticField(G4ThreeVector); // The value of the field
ExN02MagneticField(); // A zero field
~ExN02MagneticField();
// Set the field to (0, 0, fieldValue)
void SetFieldValue(G4ThreeVector fieldVector);
void SetFieldValue(G4double fieldValue);
G4ThreeVector GetConstantFieldValue();
protected:
// Find the global Field Manager
G4FieldManager* GetGlobalFieldManager(); // static
};
#endif
@@ -0,0 +1,88 @@
// This code implementation is the intellectual property of
// the RD44 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: ExN02PhysicsList.hh,v 1.4 1998/10/09 14:31:03 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// This class is a class derived from G4VUserPhysicsList
// for constructing all particles and processes.
//
// History
// first version 10 Jan. 1998 by H.Kurashige
// ------------------------------------------------------------
#ifndef ExN02PhysicsList_h
#define ExN02PhysicsList_h 1
#include "G4VUserPhysicsList.hh"
#include "globals.hh"
class G4PhotoElectricEffect;
class G4ComptonScattering;
class G4GammaConversion;
class G4MultipleScattering;
class G4eIonisation;
class G4eBremsstrahlung;
class G4eplusAnnihilation;
class G4MuIonisation;
class G4MuBremsstrahlung;
class G4MuPairProduction;
class G4hIonisation;
class ExN02PhysicsList: public G4VUserPhysicsList
{
public:
ExN02PhysicsList();
virtual ~ExN02PhysicsList();
protected:
// Construct particle and physics
virtual void ConstructParticle();
virtual void ConstructProcess();
//
virtual void SetCuts(G4double aCut);
protected:
// these methods Construct particles
virtual void ConstructBosons();
virtual void ConstructLeptons();
virtual void ConstructMesons();
virtual void ConstructBarions();
protected:
// these methods Construct physics processes and register them
virtual void ConstructGeneral();
virtual void ConstructEM();
private:
G4PhotoElectricEffect* thePhotoElectricEffect;
G4ComptonScattering* theComptonScattering;
G4GammaConversion* theGammaConversion;
G4MultipleScattering* theeminusMultipleScattering;
G4eIonisation* theeminusIonisation;
G4eBremsstrahlung* theeminusBremsstrahlung;
G4MultipleScattering* theeplusMultipleScattering;
G4eIonisation* theeplusIonisation;
G4eBremsstrahlung* theeplusBremsstrahlung;
G4eplusAnnihilation* theeplusAnnihilation;
};
#endif
@@ -0,0 +1,44 @@
// This code implementation is the intellectual property of
// the RD44 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: ExN02PrimaryGeneratorAction.hh,v 1.3 1998/10/09 14:31:04 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#ifndef ExN02PrimaryGeneratorAction_h
#define ExN02PrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class ExN02DetectorConstruction;
class G4ParticleGun;
class G4Event;
class ExN02PrimaryGeneratorMessenger;
class ExN02PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
ExN02PrimaryGeneratorAction(ExN02DetectorConstruction* myDC);
~ExN02PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event* anEvent);
void SetRndmFlag(G4String val) { rndmFlag = val;}
private:
G4ParticleGun* particleGun;
ExN02DetectorConstruction* myDetector;
ExN02PrimaryGeneratorMessenger* gunMessenger;
G4String rndmFlag;
};
#endif
@@ -0,0 +1,37 @@
// This code implementation is the intellectual property of
// the RD44 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: ExN02PrimaryGeneratorMessenger.hh,v 1.3 1998/10/09 14:31:05 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#ifndef ExN02PrimaryGeneratorMessenger_h
#define ExN02PrimaryGeneratorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class ExN02PrimaryGeneratorAction;
class G4UIcmdWithAString;
class ExN02PrimaryGeneratorMessenger: public G4UImessenger
{
public:
ExN02PrimaryGeneratorMessenger(ExN02PrimaryGeneratorAction* myGun);
~ExN02PrimaryGeneratorMessenger();
void SetNewValue(G4UIcommand * command,G4String newValues);
private:
ExN02PrimaryGeneratorAction* myAction;
G4UIcmdWithAString* RndmCmd;
};
#endif
@@ -0,0 +1,36 @@
// This code implementation is the intellectual property of
// the RD44 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: ExN02RunAction.hh,v 1.3 1998/10/09 14:31:06 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#ifndef ExN02RunAction_h
#define ExN02RunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
class G4Run;
class ExN02RunAction : public G4UserRunAction
{
public:
ExN02RunAction();
~ExN02RunAction();
public:
void BeginOfRunAction(G4Run* aRun);
void EndOfRunAction(G4Run* aRun);
private:
G4int runIDcounter;
};
#endif
@@ -0,0 +1,35 @@
// This code implementation is the intellectual property of
// the RD44 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: ExN02SteppingAction.hh,v 1.3 1998/10/09 14:31:06 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#ifndef ExN02SteppingAction_h
#define ExN02SteppingAction_h 1
#include "G4UserSteppingAction.hh"
#include "globals.hh"
class ExN02DetectorConstruction;
class ExN02EventAction;
class ExN02SteppingAction : public G4UserSteppingAction
{
public:
ExN02SteppingAction(ExN02DetectorConstruction* myDC,ExN02EventAction* myEA);
~ExN02SteppingAction(){};
void UserSteppingAction();
private:
ExN02DetectorConstruction* myDetector;
ExN02EventAction* eventAction;
};
#endif
@@ -0,0 +1,71 @@
// This code implementation is the intellectual property of
// the RD44 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: ExN02TrackerHit.hh,v 1.1 1998/10/09 14:31:07 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef ExN02TrackerHit_h
#define ExN02TrackerHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
#include "G4ThreeVector.hh"
class ExN02TrackerHit : public G4VHit
{
public:
ExN02TrackerHit();
~ExN02TrackerHit();
ExN02TrackerHit(const ExN02TrackerHit &right);
const ExN02TrackerHit& operator=(const ExN02TrackerHit &right);
int operator==(const ExN02TrackerHit &right) const;
inline void *operator new(size_t);
inline void operator delete(void *aHit);
void Draw();
void Print();
private:
G4double edep;
G4ThreeVector pos;
public:
inline void SetEdep(G4double de)
{ edep = de; };
inline G4double GetEdep()
{ return edep; };
inline void SetPos(G4ThreeVector xyz)
{ pos = xyz; };
inline G4ThreeVector GetPos()
{ return pos; };
};
typedef G4THitsCollection<ExN02TrackerHit> ExN02TrackerHitsCollection;
extern G4Allocator<ExN02TrackerHit> ExN02TrackerHitAllocator;
inline void* ExN02TrackerHit::operator new(size_t)
{
void *aHit;
aHit = (void *) ExN02TrackerHitAllocator.MallocSingle();
return aHit;
}
inline void ExN02TrackerHit::operator delete(void *aHit)
{
ExN02TrackerHitAllocator.FreeSingle((ExN02TrackerHit*) aHit);
}
#endif
@@ -0,0 +1,44 @@
// This code implementation is the intellectual property of
// the RD44 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: ExN02TrackerSD.hh,v 1.1 1998/10/09 14:31:08 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef ExN02TrackerSD_h
#define ExN02TrackerSD_h 1
#include "G4VSensitiveDetector.hh"
#include "G4ThreeVector.hh"
#include "ExN02TrackerHit.hh"
class G4Step;
class G4HCofThisEvent;
class ExN02TrackerSD : public G4VSensitiveDetector
{
public:
ExN02TrackerSD(G4String name);
~ExN02TrackerSD();
void Initialize(G4HCofThisEvent*HCE);
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
void EndOfEvent(G4HCofThisEvent*HCE);
void clear();
void DrawAll();
void PrintAll();
private:
ExN02TrackerHitsCollection *trackerCollection;
};
#endif
@@ -0,0 +1,50 @@
// This code implementation is the intellectual property of
// the RD44 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: ExN02VisManager.hh,v 1.3 1998/10/09 14:31:09 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
// Example Visualization Manager implementing virtual function
// RegisterGraphicsSystems. Exploits C-pre-processor variables
// G4VIS_USE_DAWN, etc., which are set by the GNUmakefiles if
// environment variables of the same name are set.
// So all you have to do is set environment variables and compile and
// instantiate this in your main().
// Alternatively, you can implement an empty function here and just
// register the systems you want in your main(), e.g.:
// G4VisManager* myVisManager = new MyVisManager;
// myVisManager -> RegisterGraphicsSystem (new MyGraphicsSystem);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef ExN02VisManager_h
#define ExN02VisManager_h 1
#include "G4VisManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class ExN02VisManager: public G4VisManager {
public:
ExN02VisManager ();
private:
void RegisterGraphicsSystems ();
};
#endif