Import Geant4 10.0.0 source tree
This commit is contained in:
+18
-37
@@ -23,48 +23,29 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file parameterisations/gflash/include/ExGflashMaterialManager.hh
|
||||
/// \brief Definition of the ExGflashMaterialManager class
|
||||
// $Id: ExGflashActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
#ifndef MATERIALMANAGER_H
|
||||
#define MATERIALMANAGER_H
|
||||
/// \file ExGflashActionInitialization.hh
|
||||
/// \brief Definition of the ExGflashActionInitialization class
|
||||
|
||||
#include "G4Element.hh"
|
||||
#include "G4Material.hh"
|
||||
#ifndef ExGflashActionInitialization_h
|
||||
#define ExGflashActionInitialization_h 1
|
||||
|
||||
#include <map>
|
||||
#include <iostream>
|
||||
#include <functional>
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
|
||||
typedef std::map< G4String, G4Element*, std::less<G4String> > ElementList;
|
||||
typedef std::map< G4String, G4Material*, std::less<G4String> > MaterialList;
|
||||
/// Action initialization class.
|
||||
///
|
||||
|
||||
class ExGflashActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
ExGflashActionInitialization();
|
||||
virtual ~ExGflashActionInitialization();
|
||||
|
||||
|
||||
|
||||
class ExGflashMaterialManager {
|
||||
private:
|
||||
ElementList elist;
|
||||
MaterialList mlist;
|
||||
ExGflashMaterialManager() {initialize();}
|
||||
static ExGflashMaterialManager *mpointer;
|
||||
public:
|
||||
static ExGflashMaterialManager* GetMaterialManager()
|
||||
{
|
||||
if (!mpointer)
|
||||
mpointer=new ExGflashMaterialManager;
|
||||
return mpointer;
|
||||
}
|
||||
void storeElement(G4String, G4String, double, double);
|
||||
G4Element* getElement(G4String);
|
||||
void storeMaterial(G4String, double, double, double);
|
||||
void storeMaterial(G4String, double, int);
|
||||
G4Material* getMaterial(G4String);
|
||||
void addMaterial(G4String,G4String,double);
|
||||
void addElement(G4String,G4String,double);
|
||||
void addElement(G4String,G4String,int);
|
||||
void printElementTable();
|
||||
void printMaterialTable();
|
||||
void initialize();
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+45
-41
@@ -23,6 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: ExGflashDetectorConstruction.hh 73006 2013-08-15 08:17:11Z gcosmo $
|
||||
//
|
||||
/// \file parameterisations/gflash/include/ExGflashDetectorConstruction.hh
|
||||
/// \brief Definition of the ExGflashDetectorConstruction class
|
||||
//
|
||||
@@ -44,47 +46,49 @@ class GFlashParticleBounds;
|
||||
|
||||
class ExGflashDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
ExGflashDetectorConstruction();
|
||||
~ExGflashDetectorConstruction();
|
||||
G4VPhysicalVolume* Construct();
|
||||
|
||||
const G4VPhysicalVolume* GetCristal(int num__crystal)
|
||||
{return m_crystal_phys[num__crystal];};
|
||||
|
||||
|
||||
private:
|
||||
G4LogicalVolume* m_experimentalHall_log;
|
||||
G4LogicalVolume* m_calo_log;
|
||||
|
||||
G4VPhysicalVolume* m_experimentalHall_phys;
|
||||
G4VPhysicalVolume* m_calo_phys;
|
||||
|
||||
G4Box *m_experimentalHall_box;
|
||||
|
||||
G4double m_experimentalHall_x;
|
||||
G4double m_experimentalHall_y;
|
||||
G4double m_experimentalHall_z;
|
||||
|
||||
G4double m_calo_xside;
|
||||
G4double m_calo_yside;
|
||||
G4double m_calo_zside;
|
||||
|
||||
G4int m_NbOfCrystals; // Nb of chambers in the tracker region
|
||||
G4double m_CrystalWidth; // width of the chambers
|
||||
G4double m_CrystalWidht;
|
||||
G4double m_CrystalLenght;
|
||||
//@@@ ExGflashDetectorConstruction : wie mache ich das am besten ?
|
||||
G4Box *m_crystal[100];
|
||||
G4LogicalVolume* m_crystal_log[100];
|
||||
G4VPhysicalVolume* m_crystal_phys[100];
|
||||
|
||||
// Gflash members
|
||||
GFlashHomoShowerParameterisation *m_theParameterisation;
|
||||
GFlashHitMaker *m_theHMaker;
|
||||
GFlashParticleBounds *m_theParticleBounds;
|
||||
GFlashShowerModel* m_theFastShowerModel;
|
||||
G4Region* aRegion;
|
||||
public:
|
||||
ExGflashDetectorConstruction();
|
||||
~ExGflashDetectorConstruction();
|
||||
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
|
||||
const G4VPhysicalVolume* GetCristal(int num__crystal)
|
||||
{return fCrystal_phys[num__crystal];};
|
||||
|
||||
|
||||
private:
|
||||
G4LogicalVolume* fExperimentalHall_log;
|
||||
G4LogicalVolume* fCalo_log;
|
||||
|
||||
G4VPhysicalVolume* fExperimentalHall_phys;
|
||||
G4VPhysicalVolume* fCalo_phys;
|
||||
|
||||
G4Box *fExperimentalHall_box;
|
||||
|
||||
G4double fExperimentalHall_x;
|
||||
G4double fExperimentalHall_y;
|
||||
G4double fExperimentalHall_z;
|
||||
|
||||
G4double fCalo_xside;
|
||||
G4double fCalo_yside;
|
||||
G4double fCalo_zside;
|
||||
|
||||
G4int fNbOfCrystals; // Nb of chambers in the tracker region
|
||||
G4double fCrystalWidth; // width of the chambers
|
||||
G4double fCrystalLenght;
|
||||
//@@@ ExGflashDetectorConstruction : wie mache ich das am besten ?
|
||||
G4Box *fCrystal[100];
|
||||
G4LogicalVolume* fCrystal_log[100];
|
||||
G4VPhysicalVolume* fCrystal_phys[100];
|
||||
|
||||
// Gflash members
|
||||
GFlashHomoShowerParameterisation* fTheParameterisation;
|
||||
GFlashHitMaker* fTheHMaker;
|
||||
GFlashParticleBounds* fTheParticleBounds;
|
||||
GFlashShowerModel* fTheFastShowerModel;
|
||||
G4Region* fRegion;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: ExGflashEventAction.hh 72372 2013-07-16 14:30:39Z gcosmo $
|
||||
//
|
||||
/// \file parameterisations/gflash/include/ExGflashEventAction.hh
|
||||
/// \brief Definition of the ExGflashEventAction class
|
||||
//
|
||||
@@ -31,18 +33,22 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "G4Timer.hh"
|
||||
|
||||
|
||||
class ExGflashEventAction: public G4UserEventAction {
|
||||
public:
|
||||
ExGflashEventAction();
|
||||
~ExGflashEventAction();
|
||||
|
||||
void BeginOfEventAction(const G4Event*);
|
||||
void EndOfEventAction(const G4Event*);
|
||||
private:
|
||||
G4int nevent;
|
||||
G4double dtime;
|
||||
G4int calorimeterCollectionId;
|
||||
public:
|
||||
ExGflashEventAction();
|
||||
~ExGflashEventAction();
|
||||
|
||||
void BeginOfEventAction(const G4Event*);
|
||||
void EndOfEventAction(const G4Event*);
|
||||
|
||||
private:
|
||||
G4int fNevent;
|
||||
G4double fDtime;
|
||||
G4int fCalorimeterCollectionId;
|
||||
G4Timer fTimerIntern;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: ExGflashHit.hh 72372 2013-07-16 14:30:39Z gcosmo $
|
||||
//
|
||||
/// \file parameterisations/gflash/include/ExGflashHit.hh
|
||||
/// \brief Definition of the ExGflashHit class
|
||||
//
|
||||
@@ -60,56 +62,55 @@ class ExGflashHit : public G4VHit
|
||||
void Print();
|
||||
|
||||
private:
|
||||
G4double edep;
|
||||
G4ThreeVector pos;
|
||||
G4int crystalnumber;
|
||||
G4ThreeVector start;
|
||||
G4RotationMatrix rot;
|
||||
const G4LogicalVolume* pLogV;
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
G4int fCrystalNumber;
|
||||
G4ThreeVector fStart;
|
||||
G4RotationMatrix fRot;
|
||||
const G4LogicalVolume* fLogV;
|
||||
|
||||
public:
|
||||
inline void SetEdep(G4double de)
|
||||
{ edep = de; };
|
||||
{ fEdep = de; };
|
||||
inline void AddEdep(G4double de)
|
||||
{ edep += de; };
|
||||
{ fEdep += de; };
|
||||
inline G4double GetEdep()
|
||||
{ return edep; };
|
||||
{ return fEdep; };
|
||||
inline void SetPos(G4ThreeVector xyz)
|
||||
{ pos = xyz; };
|
||||
{ fPos = xyz; };
|
||||
inline G4int GetCrystalNum()
|
||||
{ return crystalnumber; };
|
||||
{ return fCrystalNumber; };
|
||||
inline void SetCrystalNum(G4int num)
|
||||
{ crystalnumber=num; };
|
||||
{ fCrystalNumber=num; };
|
||||
inline G4ThreeVector GetPos()
|
||||
{ return pos; };
|
||||
{ return fPos; };
|
||||
inline void SetStart(G4ThreeVector xyz)
|
||||
{ start = xyz; };
|
||||
{ fStart = xyz; };
|
||||
inline G4ThreeVector GetStart()
|
||||
{ return start; };
|
||||
{ return fStart; };
|
||||
|
||||
inline void SetRot(G4RotationMatrix rmat)
|
||||
{ rot = rmat; };
|
||||
{ fRot = rmat; };
|
||||
inline G4RotationMatrix GetRot()
|
||||
{ return rot; };
|
||||
{ return fRot; };
|
||||
inline const G4LogicalVolume * GetLogV()
|
||||
{ return pLogV; };
|
||||
{ return fLogV; };
|
||||
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<ExGflashHit> ExGflashHitsCollection;
|
||||
|
||||
extern G4Allocator<ExGflashHit> ExGflashHitAllocator;
|
||||
extern G4ThreadLocal G4Allocator<ExGflashHit>* ExGflashHitAllocator;
|
||||
|
||||
inline void* ExGflashHit::operator new(size_t)
|
||||
{
|
||||
void *aHit;
|
||||
aHit = (void *) ExGflashHitAllocator.MallocSingle();
|
||||
return aHit;
|
||||
if(!ExGflashHitAllocator) ExGflashHitAllocator = new G4Allocator<ExGflashHit>;
|
||||
return (void *) ExGflashHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void ExGflashHit::operator delete(void *aHit)
|
||||
{
|
||||
ExGflashHitAllocator.FreeSingle((ExGflashHit*) aHit);
|
||||
ExGflashHitAllocator->FreeSingle((ExGflashHit*) aHit);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: ExGflashHitsCollection.hh 70923 2013-06-07 13:10:39Z gcosmo $
|
||||
//
|
||||
/// \file parameterisations/gflash/include/ExGflashHitsCollection.hh
|
||||
/// \brief Definition of the ExGflashHitsCollection class
|
||||
//
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: ExGflashPhysicsList.hh 70923 2013-06-07 13:10:39Z gcosmo $
|
||||
//
|
||||
/// \file parameterisations/gflash/include/ExGflashPhysicsList.hh
|
||||
/// \brief Definition of the ExGflashPhysicsList class
|
||||
//
|
||||
|
||||
+3
-1
@@ -23,6 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: ExGflashPrimaryGeneratorAction.hh 70923 2013-06-07 13:10:39Z gcosmo $
|
||||
//
|
||||
/// \file parameterisations/gflash/include/ExGflashPrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the ExGflashPrimaryGeneratorAction class
|
||||
//
|
||||
@@ -45,7 +47,7 @@ class ExGflashPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction {
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
|
||||
private:
|
||||
G4GeneralParticleSource * particleGun;
|
||||
G4GeneralParticleSource* fParticleGun;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: ExGflashRunAction.hh 70923 2013-06-07 13:10:39Z gcosmo $
|
||||
//
|
||||
/// \file parameterisations/gflash/include/ExGflashRunAction.hh
|
||||
/// \brief Definition of the ExGflashRunAction class
|
||||
//
|
||||
@@ -37,15 +39,15 @@ class G4Run;
|
||||
|
||||
class ExGflashRunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
ExGflashRunAction();
|
||||
~ExGflashRunAction();
|
||||
void BeginOfRunAction(const G4Run* aRun);
|
||||
void EndOfRunAction(const G4Run* aRun);
|
||||
void setRunID (int i) {runID=i;};
|
||||
|
||||
private:
|
||||
G4int runID;
|
||||
public:
|
||||
ExGflashRunAction();
|
||||
~ExGflashRunAction();
|
||||
void BeginOfRunAction(const G4Run* aRun);
|
||||
void EndOfRunAction(const G4Run* aRun);
|
||||
void setRunID (int i) {fRunID=i;};
|
||||
|
||||
private:
|
||||
G4int fRunID;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: ExGflashSensitiveDetector.hh 73006 2013-08-15 08:17:11Z gcosmo $
|
||||
//
|
||||
/// \file parameterisations/gflash/include/ExGflashSensitiveDetector.hh
|
||||
/// \brief Definition of the ExGflashSensitiveDetector class
|
||||
//
|
||||
@@ -38,18 +40,21 @@
|
||||
class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
class G4TouchableHistory;
|
||||
class ExGflashSensitiveDetector: public G4VSensitiveDetector ,public G4VGFlashSensitiveDetector{
|
||||
public:
|
||||
ExGflashSensitiveDetector(G4String, ExGflashDetectorConstruction* det);
|
||||
~ExGflashSensitiveDetector();
|
||||
|
||||
void Initialize(G4HCofThisEvent*);
|
||||
G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
G4bool ProcessHits(G4GFlashSpot*aSpot,G4TouchableHistory*);
|
||||
void EndOfEvent(G4HCofThisEvent*);
|
||||
private:
|
||||
ExGflashHitsCollection* caloHitsCollection;
|
||||
G4double edep;
|
||||
ExGflashDetectorConstruction* Detector;
|
||||
|
||||
class ExGflashSensitiveDetector: public G4VSensitiveDetector,
|
||||
public G4VGFlashSensitiveDetector {
|
||||
public:
|
||||
ExGflashSensitiveDetector(G4String, ExGflashDetectorConstruction* det);
|
||||
~ExGflashSensitiveDetector();
|
||||
|
||||
void Initialize(G4HCofThisEvent*);
|
||||
G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
G4bool ProcessHits(G4GFlashSpot*aSpot,G4TouchableHistory*);
|
||||
void EndOfEvent(G4HCofThisEvent*);
|
||||
private:
|
||||
ExGflashHitsCollection* fCaloHitsCollection;
|
||||
ExGflashDetectorConstruction* fDetector;
|
||||
G4int HCID;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user