Import Geant4 4.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:39:52 +02:00
parent 921d3b1cda
commit 330b82b769
4524 changed files with 178689 additions and 43575 deletions
@@ -0,0 +1,55 @@
#ifndef G4PROCESSTESTANALYSIS_HH
#define G4PROCESSTESTANALYSIS_HH
#include "globals.hh"
#include "g4std/vector"
#include "G4ThreeVector.hh"
class ITree;
class IHistogramFactory;
class IAnalysisFactory;
class ITupleFactory;
class ITuple;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class BrachyAnalysisManager
{
public:
~BrachyAnalysisManager();
void book();
void finish();
static BrachyAnalysisManager* getInstance();
void analyse(G4double,G4double,G4float);
void hist(G4double,G4double,G4float);
void Spectrum(G4double);
private:
G4double xx,zz;
G4float en;
G4double x,z;
static BrachyAnalysisManager* instance;
private:
BrachyAnalysisManager();
private:
IAnalysisFactory *aFact;
ITree *theTree;
IHistogramFactory *histFact;
ITupleFactory *tupFact;
};
#endif
@@ -1,25 +1,3 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// ****************************************
// * *
// * BrachyDetectorConstruction.hh *
@@ -30,32 +8,111 @@
#ifndef BrachyDetectorConstruction_H
#define BrachyDetectorConstruction_H 1
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
#include "G4LogicalVolume.hh"
class BrachyPhantomSD;
class BrachyDetectorMessenger;
class G4LogicalVolume;
class G4Material;
class G4Tubs;
class G4Box;
class G4Sphere;
class G4Tubs;
class G4VPhysicalVolume;
class BrachyWaterBoxSD;
class G4VPhysicalVolume;
class BrachyDetectorConstruction : public G4VUserDetectorConstruction
{
public:
BrachyDetectorConstruction(G4String &SDName,G4int NumVoxelX,G4int NumVoxelZ);
~BrachyDetectorConstruction();
public:
BrachyDetectorConstruction(G4String&);
~BrachyDetectorConstruction();
public:
G4double GetBoxDim_X() {return m_BoxDimX;};
G4double GetBoxDim_Z() {return m_BoxDimZ;};
public:
G4VPhysicalVolume* Construct();
private:
const G4int m_NumVoxelX;
const G4int m_NumVoxelZ;
G4double m_BoxDimX;
G4double m_BoxDimY;
G4double m_BoxDimZ;
G4double m_BoxDimX;
G4double m_BoxDimY;
G4double m_BoxDimZ;
G4int NumVoxelX;
G4int NumVoxelZ;
G4double dimVoxel;
G4String m_SDName;
};
public:
void PrintDetectorParameters();
void SetAbsorberMaterial(G4String);
const G4double VoxelWidth_X() {return m_BoxDimX/NumVoxelX;};//num voxel
const G4double VoxelWidth_Z() {return m_BoxDimZ/NumVoxelZ;};
const G4int GetNumVoxelX(){return NumVoxelX;};
const G4int GetNumVoxelZ(){return NumVoxelZ;};
const G4double GetDimX(){return m_BoxDimX;};
const G4double GetBoxDim_Z() {return m_BoxDimZ;};
private:
BrachyDetectorMessenger* detectorMessenger;
G4Box* ExpHall; //pointer to the solid World
G4LogicalVolume* ExpHallLog; //pointer to the logical World
G4VPhysicalVolume* ExpHallPhys; //pointer to the physical World
G4Box* Phantom;
G4LogicalVolume* PhantomLog;
G4VPhysicalVolume* PhantomPhys;
G4Tubs* Capsule ;
G4LogicalVolume* CapsuleLog; //pointer to the logical World
G4VPhysicalVolume* CapsulePhys;
G4Sphere* CapsuleTip;
G4LogicalVolume* CapsuleTipLog;
G4VPhysicalVolume* CapsuleTipPhys;
G4Tubs* IridiumCore;
G4LogicalVolume* IridiumCoreLog;
G4VPhysicalVolume* IridiumCorePhys;
G4Material* air;
//G4Material* water;
G4Material* CapsuleMat;
G4Material* IridiumMat;
G4Material* AbsorberMaterial;
G4VPhysicalVolume* Construct();
private:
void DefineMaterials();
void ComputeDimVoxel();
public:
G4VPhysicalVolume* ConstructDetector();
};
inline void BrachyDetectorConstruction::ComputeDimVoxel()
{
dimVoxel=m_BoxDimX/NumVoxelX;
}
#endif
@@ -0,0 +1,67 @@
//
// ********************************************************************
// * 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: BrachyDetectorMessenger.hh,v 1.2 2002/06/18 22:24:22 guatelli Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef BrachyDetectorMessenger_h
#define BrachyDetectorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class BrachyDetectorConstruction;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithoutParameter;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class BrachyDetectorMessenger: public G4UImessenger
{
public:
BrachyDetectorMessenger(BrachyDetectorConstruction* );
~BrachyDetectorMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
BrachyDetectorConstruction* Detector;
G4UIdirectory* detDir;
G4UIcmdWithAString* AbsMaterCmd;
G4UIcmdWithoutParameter* UpdateCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -36,16 +36,16 @@ class G4Step;
class BrachyDummySD : public G4VSensitiveDetector
{
public:
BrachyDummySD();
~BrachyDummySD() {};
public:
BrachyDummySD();
~BrachyDummySD() {};
void Initialize(G4HCofThisEvent*HCE) {};
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist) {return false;}
void EndOfEvent(G4HCofThisEvent*HCE) {};
void clear() {};
void DrawAll() {};
void PrintAll() {};
void Initialize(G4HCofThisEvent*HCE) {};
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist) {return false;}
void EndOfEvent(G4HCofThisEvent*HCE) {};
void clear() {};
void DrawAll() {};
void PrintAll() {};
};
BrachyDummySD::BrachyDummySD() : G4VSensitiveDetector("dummySD")
@@ -31,27 +31,40 @@
#include "G4UserEventAction.hh"
#include "globals.hh"
class BrachyDetectorConstruction;
class BrachyAnalysisManager;
class BrachyEventAction : public G4UserEventAction
{
public:
BrachyEventAction(G4float *pVoxel,G4int NumVoxelX,G4int NumVoxelZ);
~BrachyEventAction();
public:
BrachyEventAction(G4String&);
~BrachyEventAction();
public:
void BeginOfEventAction(const G4Event*);
void EndOfEventAction(const G4Event*);
public:
void BeginOfEventAction(const G4Event*);
void EndOfEventAction(const G4Event*);
private:
private:
G4double EnergyDep;
G4int m_NumVoxelX;
G4int m_NumVoxelZ;
const G4int m_NumVoxelX;
const G4int m_NumVoxelZ;
G4float *m_pVoxel;
private:
G4int m_HitsCollectionID;
BrachyDetectorConstruction *pDetector;
G4double VoxelWidth_Z;
G4double VoxelWidth_X;
private:
G4int m_HitsCollectionID;
G4String drawFlag;
G4int j;
G4int i;
G4int k;
G4double x;
G4double z;
G4String SDname;
G4int printModulo;
};
@@ -22,12 +22,12 @@
//
// ********************************
// * *
// * BrachyWaterBoxHit.hh *
// * BrachyPhantomHit.hh *
// * *
// ********************************
#ifndef BrachyWaterBoxHit_h
#define BrachyWaterBoxHit_h 1
#ifndef BrachyPhantomHit_h
#define BrachyPhantomHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
@@ -37,69 +37,69 @@
#include "G4Transform3D.hh"
#include "G4RotationMatrix.hh"
class BrachyWaterBoxHit : public G4VHit
class BrachyPhantomHit : public G4VHit
{
public:
BrachyWaterBoxHit(G4LogicalVolume* logVol,G4int XID,G4int ZID);
~BrachyWaterBoxHit();
BrachyWaterBoxHit(const BrachyWaterBoxHit &right);
const BrachyWaterBoxHit& operator=(const BrachyWaterBoxHit &right);
int operator==(const BrachyWaterBoxHit &right) const;
public:
BrachyPhantomHit(G4LogicalVolume* logVol,G4int XID,G4int ZID);
~BrachyPhantomHit();
BrachyPhantomHit(const BrachyPhantomHit &right);
const BrachyPhantomHit& operator=(const BrachyPhantomHit &right);
int operator==(const BrachyPhantomHit &right) const;
inline void *operator new(size_t);
inline void operator delete(void *aHit);
inline void *operator new(size_t);
inline void operator delete(void *aHit);
void Draw();
void Print();
void Draw();
void Print();
private:
G4ThreeVector m_Pos;
G4RotationMatrix m_Rot;
const G4LogicalVolume* m_pLogV;
private:
G4ThreeVector m_Pos;
G4RotationMatrix m_Rot;
const G4LogicalVolume* m_pLogV;
G4double m_Edep;
G4double m_Edep;
G4int m_XID;
G4int m_ZID;
G4int m_XID;
G4int m_ZID;
public:
inline void SetCellID(G4int XID,G4int ZID)
{m_XID = XID;m_ZID = ZID;}
inline G4int GetXID()
{return m_XID;}
inline G4int GetZID()
{return m_ZID;}
inline void SetEdep(G4double edep)
{m_Edep = edep;}
inline void AddEdep(G4double edep)
{m_Edep += edep;}
inline G4double GetEdep()
{return m_Edep;}
inline void SetPos(G4ThreeVector xyz)
{m_Pos = xyz;}
inline G4ThreeVector GetPos()
{return m_Pos;}
inline void SetRot(G4RotationMatrix rmat)
{m_Rot = rmat;}
inline G4RotationMatrix GetRot()
{return m_Rot;}
inline const G4LogicalVolume * GetLogV()
{return m_pLogV;}
public:
inline void SetCellID(G4int XID,G4int ZID)
{m_XID = XID;m_ZID = ZID;}
inline G4int GetXID()
{return m_XID;}
inline G4int GetZID()
{return m_ZID;}
inline void SetEdep(G4double edep)
{m_Edep = edep;}
inline void AddEdep(G4double edep)
{m_Edep += edep;}
inline G4double GetEdep()
{return m_Edep;}
inline void SetPos(G4ThreeVector xyz)
{m_Pos = xyz;}
inline G4ThreeVector GetPos()
{return m_Pos;}
inline void SetRot(G4RotationMatrix rmat)
{m_Rot = rmat;}
inline G4RotationMatrix GetRot()
{return m_Rot;}
inline const G4LogicalVolume * GetLogV()
{return m_pLogV;}
};
typedef G4THitsCollection<BrachyWaterBoxHit> BrachyWaterBoxHitsCollection;
extern G4Allocator<BrachyWaterBoxHit> BrachyWaterBoxHitAllocator;
typedef G4THitsCollection<BrachyPhantomHit> BrachyPhantomHitsCollection;
extern G4Allocator<BrachyPhantomHit> BrachyPhantomHitAllocator;
inline void* BrachyWaterBoxHit::operator new(size_t)
inline void* BrachyPhantomHit::operator new(size_t)
{
void *aHit;
aHit = (void *) BrachyWaterBoxHitAllocator.MallocSingle();
return aHit;
void *aHit;
aHit = (void *) BrachyPhantomHitAllocator.MallocSingle();
return aHit;
}
inline void BrachyWaterBoxHit::operator delete(void *aHit)
inline void BrachyPhantomHit::operator delete(void *aHit)
{
BrachyWaterBoxHitAllocator.FreeSingle((BrachyWaterBoxHit*) aHit);
BrachyPhantomHitAllocator.FreeSingle((BrachyPhantomHit*) aHit);
}
#endif
@@ -27,25 +27,25 @@
// ************************************
#ifndef BrachyWaterBoxROGeometry_h
#define BrachyWaterBoxROGeometry_h
#ifndef BrachyPhantomROGeometry_h
#define BrachyPhantomROGeometry_h
#include "G4VReadOutGeometry.hh"
class BrachyWaterBoxROGeometry : public G4VReadOutGeometry
class BrachyPhantomROGeometry : public G4VReadOutGeometry
{
public:
BrachyWaterBoxROGeometry(G4String aString,G4double DetDimX,G4double DetDimZ,G4int NumVoxelX,G4int NumVoxelZ);
~BrachyWaterBoxROGeometry();
public:
BrachyPhantomROGeometry(G4String aString,G4double DetDimX,G4double DetDimZ,G4int NumVoxelX,G4int NumVoxelZ);
~BrachyPhantomROGeometry();
private:
const G4double m_DetDimX;
const G4double m_DetDimZ;
const G4int m_NumVoxelX;
const G4int m_NumVoxelZ;
private:
const G4double m_DetDimX;
const G4double m_DetDimZ;
const G4int m_NumVoxelX;
const G4int m_NumVoxelZ;
private:
G4VPhysicalVolume* Build();
private:
G4VPhysicalVolume* Build();
};
#endif
@@ -26,34 +26,34 @@
// * *
// ********************************
#ifndef BrachyWaterBoxSD_h
#define BrachyWaterBoxSD_h 1
#ifndef BrachyPhantomSD_h
#define BrachyPHANTOMSD_h 1
#include "G4VSensitiveDetector.hh"
#include "BrachyWaterBoxHit.hh"
#include "BrachyPhantomHit.hh"
class G4Step;
class G4HCofThisEvent;
class G4TouchableHistory;
class BrachyWaterBoxSD : public G4VSensitiveDetector
class BrachyPhantomSD : public G4VSensitiveDetector
{
public:
BrachyWaterBoxSD(G4String name, G4int NumVoxelX, G4int NumVoxelZ);
~BrachyWaterBoxSD();
public:
BrachyPhantomSD(G4String name, G4int NumVoxelX, G4int NumVoxelZ);
~BrachyPhantomSD();
void Initialize(G4HCofThisEvent*HCE);
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
void EndOfEvent(G4HCofThisEvent*HCE);
void clear();
void DrawAll();
void PrintAll();
private:
BrachyWaterBoxHitsCollection *m_pWaterBoxHitsCollection;
void Initialize(G4HCofThisEvent*HCE);
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
void EndOfEvent(G4HCofThisEvent*HCE);
void clear();
void DrawAll();
void PrintAll();
private:
BrachyPhantomHitsCollection *m_pPhantomHitsCollection;
const G4int m_NumVoxelX;
const G4int m_NumVoxelZ;
G4int *m_pVoxelID;
const G4int m_NumVoxelX;
const G4int m_NumVoxelZ;
G4int *m_pVoxelID;
};
#endif
@@ -40,46 +40,46 @@ class G4LowEnergyBremsstrahlung;
class BrachyPhysicsList: public G4VUserPhysicsList
{
public:
BrachyPhysicsList();
~BrachyPhysicsList();
public:
BrachyPhysicsList();
~BrachyPhysicsList();
protected:
// Construct particle and physics
void ConstructParticle();
void ConstructProcess();
protected:
// Construct particle and physics
void ConstructParticle();
void ConstructProcess();
void SetCuts();
void SetCuts();
public:
// Set Cuts
void SetGammaCut(G4double);
void SetElectronCut(G4double);
void SetPositronCut(G4double);
public:
// Set Cuts
void SetGammaCut(G4double);
void SetElectronCut(G4double);
void SetPositronCut(G4double);
void SetGammaLowLimit(G4double);
void SetElectronLowLimit(G4double);
void SetGELowLimit(G4double);
void SetLowEnSecPhotCut(G4double);
void SetLowEnSecElecCut(G4double);
void SetGammaLowLimit(G4double);
void SetElectronLowLimit(G4double);
void SetGELowLimit(G4double);
void SetLowEnSecPhotCut(G4double);
void SetLowEnSecElecCut(G4double);
private:
private:
G4double cutForGamma;
G4double cutForElectron;
G4double cutForPositron;
G4double cutForGamma;
G4double cutForElectron;
G4double cutForPositron;
protected:
// these methods Construct particles
void ConstructBosons();
void ConstructLeptons();
protected:
// these methods Construct particles
void ConstructBosons();
void ConstructLeptons();
protected:
protected:
// these methods Construct physics processes and register them
void ConstructGeneral();
void ConstructEM();
void ConstructGeneral();
void ConstructEM();
private:
private:
G4LowEnergyIonisation* loweIon;
G4LowEnergyPhotoElectric* lowePhot;
G4LowEnergyBremsstrahlung* loweBrem;
@@ -1,25 +1,3 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// ********************************************
// * *
// * BrachyPrimaryGeneratorAction.hh *
@@ -34,20 +12,28 @@
#include "G4RadioactiveDecay.hh"
class G4ParticleGun;
class G4Run;
class G4Event;
class BrachyAnalysisManager;
class BrachyPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
BrachyPrimaryGeneratorAction();
~BrachyPrimaryGeneratorAction();
public:
BrachyPrimaryGeneratorAction();
~BrachyPrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event* anEvent);
private:
G4ParticleGun* m_pParticleGun;
G4RadioactiveDecay *m_pRadioactiveDecay;
public:
void GeneratePrimaries(G4Event* anEvent);
private:
G4ParticleGun* m_pParticleGun;
G4RadioactiveDecay *m_pRadioactiveDecay;
G4double Energy;
// BrachyPrimaryGeneratorMessenger* gunMessenger;
G4std::vector<G4double> vettore;
};
#endif
@@ -0,0 +1,28 @@
#ifndef BrachyRunAction_h
#define BrachyRunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
class G4Run;
class BrachyAnalysisManager;
class BrachyRunAction : public G4UserRunAction
{
public:
BrachyRunAction( );
~BrachyRunAction();
public:
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run* );
private:
G4String SDname;
};
#endif
@@ -0,0 +1,28 @@
#ifndef BrachyVisManager_h
#define BrachyVisManager_h 1
#ifdef G4VIS_USE
#include "G4VisManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class BrachyVisManager: public G4VisManager {
public:
BrachyVisManager ();
private:
void RegisterGraphicsSystems ();
};
#endif
#endif