Import Geant4 1.1.0 source tree
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
// 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: Em8CalorHit.hh,v 1.1 2000/01/07 14:50:20 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef Em8CalorHit_h
|
||||
#define Em8CalorHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8CalorHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
|
||||
Em8CalorHit();
|
||||
~Em8CalorHit();
|
||||
Em8CalorHit(const Em8CalorHit&);
|
||||
const Em8CalorHit& operator=(const Em8CalorHit&);
|
||||
int operator==(const Em8CalorHit&) const;
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
|
||||
void Print();
|
||||
|
||||
public:
|
||||
|
||||
void AddAbs(G4double de, G4double dl) {EdepAbs += de; TrackLengthAbs += dl;};
|
||||
void AddGap(G4double de, G4double dl) {EdepGap += de; TrackLengthGap += dl;};
|
||||
|
||||
G4double GetEdepAbs() { return EdepAbs; };
|
||||
G4double GetTrakAbs() { return TrackLengthAbs; };
|
||||
G4double GetEdepGap() { return EdepGap; };
|
||||
G4double GetTrakGap() { return TrackLengthGap; };
|
||||
|
||||
private:
|
||||
|
||||
G4double EdepAbs, TrackLengthAbs;
|
||||
G4double EdepGap, TrackLengthGap;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
typedef G4THitsCollection<Em8CalorHit> Em8CalorHitsCollection;
|
||||
|
||||
extern G4Allocator<Em8CalorHit> Em8CalorHitAllocator;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void* Em8CalorHit::operator new(size_t)
|
||||
{
|
||||
void* aHit;
|
||||
aHit = (void*) Em8CalorHitAllocator.MallocSingle();
|
||||
return aHit;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void Em8CalorHit::operator delete(void* aHit)
|
||||
{
|
||||
Em8CalorHitAllocator.FreeSingle((Em8CalorHit*) aHit);
|
||||
}
|
||||
|
||||
#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: Em8CalorimeterSD.hh,v 1.1 2000/01/07 14:50:20 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef Em8CalorimeterSD_h
|
||||
#define Em8CalorimeterSD_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class Em8DetectorConstruction;
|
||||
class G4HCofThisEvent;
|
||||
class G4Step;
|
||||
#include "Em8CalorHit.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8CalorimeterSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
|
||||
Em8CalorimeterSD(G4String, Em8DetectorConstruction* );
|
||||
~Em8CalorimeterSD();
|
||||
|
||||
void Initialize(G4HCofThisEvent*);
|
||||
G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
void EndOfEvent(G4HCofThisEvent*);
|
||||
void clear();
|
||||
void PrintAll();
|
||||
|
||||
private:
|
||||
|
||||
Em8CalorHitsCollection* CalCollection;
|
||||
Em8DetectorConstruction* Detector;
|
||||
G4int* HitID;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
// 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: Em8DetectorConstruction.hh,v 1.1 2000/01/07 14:50:20 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef Em8DetectorConstruction_h
|
||||
#define Em8DetectorConstruction_h 1
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
class G4Box;
|
||||
class G4Tubs;
|
||||
class G4LogicalVolume;
|
||||
class G4VPhysicalVolume;
|
||||
class G4Material;
|
||||
class G4UniformMagField;
|
||||
class Em8DetectorMessenger;
|
||||
class Em8CalorimeterSD;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
|
||||
Em8DetectorConstruction();
|
||||
~Em8DetectorConstruction();
|
||||
|
||||
public:
|
||||
|
||||
void SetAbsorberMaterial (G4String);
|
||||
void SetAbsorberThickness(G4double);
|
||||
void SetAbsorberRadius(G4double);
|
||||
|
||||
void SetAbsorberZpos(G4double);
|
||||
|
||||
void SetWorldMaterial(G4String);
|
||||
void SetWorldSizeZ(G4double);
|
||||
void SetWorldSizeR(G4double);
|
||||
|
||||
void SetMagField(G4double);
|
||||
|
||||
G4VPhysicalVolume* Construct();
|
||||
|
||||
void UpdateGeometry();
|
||||
|
||||
public:
|
||||
|
||||
void PrintCalorParameters();
|
||||
|
||||
G4Material* GetWorldMaterial() {return WorldMaterial;};
|
||||
G4double GetWorldSizeZ() {return WorldSizeZ;};
|
||||
G4double GetWorldSizeR() {return WorldSizeR;};
|
||||
|
||||
G4double GetAbsorberZpos() {return zAbsorber;};
|
||||
G4double GetzstartAbs() {return zstartAbs;};
|
||||
G4double GetzendAbs() {return zendAbs;};
|
||||
|
||||
G4Material* GetAbsorberMaterial() {return AbsorberMaterial;};
|
||||
G4double GetAbsorberThickness() {return AbsorberThickness;};
|
||||
G4double GetAbsorberRadius() {return AbsorberRadius;};
|
||||
|
||||
const G4VPhysicalVolume* GetphysiWorld() {return physiWorld;};
|
||||
const G4VPhysicalVolume* GetAbsorber() {return physiAbsorber;};
|
||||
G4LogicalVolume* GetLogicalAbsorber() {return logicAbsorber;};
|
||||
|
||||
private:
|
||||
|
||||
G4bool worldchanged;
|
||||
G4Material* AbsorberMaterial;
|
||||
G4double AbsorberThickness;
|
||||
G4double AbsorberRadius;
|
||||
|
||||
G4double zAbsorber ;
|
||||
G4double zstartAbs , zendAbs ;
|
||||
|
||||
G4Material* WorldMaterial;
|
||||
G4double WorldSizeR;
|
||||
G4double WorldSizeZ;
|
||||
|
||||
G4Tubs* solidWorld; //pointer to the solid World
|
||||
G4LogicalVolume* logicWorld; //pointer to the logical World
|
||||
G4VPhysicalVolume* physiWorld; //pointer to the physical World
|
||||
|
||||
// TR radiator volumes and dimensions
|
||||
|
||||
G4Tubs* fSolidRadSlice; // pointer to the solid z-slice
|
||||
G4LogicalVolume* fLogicRadSlice; // pointer to the logical z-slide
|
||||
G4VPhysicalVolume* fPhysicRadSlice; // pointer to the physical z-slide
|
||||
|
||||
G4Tubs* fSolidRadRing; // pointer to the solid R-slice
|
||||
G4LogicalVolume* fLogicRadRing; // pointer to the logical R-slide
|
||||
G4VPhysicalVolume* fPhysicRadRing; // pointer to the physical R-slide
|
||||
|
||||
G4Material* fRadiatorMat; //pointer to the TR radiator material
|
||||
|
||||
G4double fRadThickness ;
|
||||
G4double fGasGap ;
|
||||
|
||||
G4int fFoilNumber ;
|
||||
|
||||
G4double fDetThickness ;
|
||||
G4double fDetLength ;
|
||||
G4double fDetGap ;
|
||||
|
||||
G4double fStartR ;
|
||||
G4double fStartZ ;
|
||||
|
||||
G4int fModuleNumber ; // the number of Rad-Det modules
|
||||
|
||||
G4Tubs* solidAbsorber; //pointer to the solid Absorber
|
||||
G4LogicalVolume* logicAbsorber; //pointer to the logical Absorber
|
||||
G4VPhysicalVolume* physiAbsorber; //pointer to the physical Absorber
|
||||
|
||||
G4UniformMagField* magField; //pointer to the magnetic field
|
||||
|
||||
Em8DetectorMessenger* detectorMessenger; //pointer to the Messenger
|
||||
Em8CalorimeterSD* calorimeterSD; //pointer to the sensitive detector
|
||||
|
||||
private:
|
||||
|
||||
void DefineMaterials();
|
||||
void ComputeCalorParameters();
|
||||
G4VPhysicalVolume* ConstructCalorimeter();
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void Em8DetectorConstruction::ComputeCalorParameters()
|
||||
{
|
||||
// Compute derived parameters of the calorimeter
|
||||
if(!worldchanged)
|
||||
{
|
||||
// WorldSizeR=2.*AbsorberRadius ;
|
||||
// WorldSizeZ=2.*AbsorberThickness ;
|
||||
}
|
||||
|
||||
zstartAbs = zAbsorber-0.5*AbsorberThickness;
|
||||
zendAbs = zAbsorber+0.5*AbsorberThickness;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
// 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: Em8DetectorMessenger.hh,v 1.1 2000/01/07 14:50:21 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef Em8DetectorMessenger_h
|
||||
#define Em8DetectorMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class Em8DetectorConstruction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithoutParameter;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8DetectorMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
Em8DetectorMessenger(Em8DetectorConstruction* );
|
||||
~Em8DetectorMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
Em8DetectorConstruction* Em8Detector;
|
||||
|
||||
G4UIdirectory* Em8detDir;
|
||||
|
||||
G4UIcmdWithAString* AbsMaterCmd;
|
||||
G4UIcmdWithADoubleAndUnit* AbsThickCmd;
|
||||
G4UIcmdWithADoubleAndUnit* AbsRadCmd;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* AbsZposCmd;
|
||||
|
||||
G4UIcmdWithAString* WorldMaterCmd;
|
||||
G4UIcmdWithADoubleAndUnit* WorldZCmd;
|
||||
G4UIcmdWithADoubleAndUnit* WorldRCmd;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* MagFieldCmd;
|
||||
G4UIcmdWithoutParameter* UpdateCmd;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
// 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: Em8EventAction.hh,v 1.1 2000/01/07 14:50:21 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef Em8EventAction_h
|
||||
#define Em8EventAction_h 1
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class Em8RunAction;
|
||||
class Em8EventActionMessenger;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8EventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
Em8EventAction(Em8RunAction* Em8RA);
|
||||
~Em8EventAction();
|
||||
|
||||
public:
|
||||
void BeginOfEventAction(const G4Event*);
|
||||
void EndOfEventAction(const G4Event*);
|
||||
G4int GetEventno();
|
||||
void setEventVerbose(G4int level);
|
||||
|
||||
void CountStepsCharged() ;
|
||||
void CountStepsNeutral() ;
|
||||
void AddCharged() ;
|
||||
void AddNeutral() ;
|
||||
void AddE();
|
||||
void AddP();
|
||||
void SetTr();
|
||||
void SetRef();
|
||||
|
||||
void SetDrawFlag(G4String val) {drawFlag = val;};
|
||||
void SetPrintModulo(G4int val) {printModulo = val;};
|
||||
|
||||
private:
|
||||
G4int calorimeterCollID;
|
||||
Em8EventActionMessenger* eventMessenger;
|
||||
Em8RunAction* runaction;
|
||||
G4int verboselevel;
|
||||
G4double nstep,nstepCharged,nstepNeutral;
|
||||
G4double Nch,Nne;
|
||||
G4double NE,NP;
|
||||
G4double Transmitted,Reflected ;
|
||||
|
||||
G4String drawFlag;
|
||||
G4int printModulo;
|
||||
};
|
||||
|
||||
#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: Em8EventActionMessenger.hh,v 1.1 2000/01/07 14:50:21 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef Em8EventActionMessenger_h
|
||||
#define Em8EventActionMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class Em8EventAction;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8EventActionMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
Em8EventActionMessenger(Em8EventAction*);
|
||||
~Em8EventActionMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
Em8EventAction* eventAction;
|
||||
G4UIcmdWithAnInteger* setVerboseCmd;
|
||||
G4UIcmdWithAString* DrawCmd;
|
||||
G4UIcmdWithAnInteger* PrintCmd;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,118 @@
|
||||
// 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: Em8PhysicsList.hh,v 1.1 2000/01/07 14:50:21 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef Em8PhysicsList_h
|
||||
#define Em8PhysicsList_h 1
|
||||
|
||||
#include "G4VUserPhysicsList.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4PhotoElectricEffect;
|
||||
class G4ComptonScattering;
|
||||
class G4GammaConversion;
|
||||
|
||||
class G4MultipleScattering;
|
||||
|
||||
class G4PAIonisation ;
|
||||
class G4ForwardXrayTR ;
|
||||
class G4eIonisation;
|
||||
class G4eBremsstrahlung;
|
||||
class G4eplusAnnihilation;
|
||||
|
||||
class G4MuIonisation;
|
||||
class G4MuBremsstrahlung;
|
||||
class G4MuPairProduction;
|
||||
|
||||
class G4hIonisation;
|
||||
class G4hIonisationPlus;
|
||||
|
||||
class Em8StepCut;
|
||||
|
||||
class Em8DetectorConstruction;
|
||||
class Em8PhysicsListMessenger;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8PhysicsList: public G4VUserPhysicsList
|
||||
{
|
||||
public:
|
||||
Em8PhysicsList( Em8DetectorConstruction*);
|
||||
~Em8PhysicsList();
|
||||
|
||||
protected:
|
||||
// Construct particle and physics
|
||||
void ConstructParticle();
|
||||
void ConstructProcess();
|
||||
|
||||
void SetCuts();
|
||||
|
||||
protected:
|
||||
// these methods Construct particles
|
||||
void ConstructBosons();
|
||||
void ConstructLeptons();
|
||||
void ConstructMesons();
|
||||
void ConstructBarions();
|
||||
|
||||
protected:
|
||||
// these methods Construct physics processes and register them
|
||||
void ConstructGeneral();
|
||||
void ConstructEM();
|
||||
|
||||
public:
|
||||
|
||||
void SetGammaCut(G4double);
|
||||
void SetElectronCut(G4double);
|
||||
void SetProtonCut(G4double);
|
||||
void SetCutsByEnergy(G4double);
|
||||
void GetRange(G4double);
|
||||
|
||||
void SetMaxStep(G4double);
|
||||
|
||||
public:
|
||||
|
||||
G4double MaxChargedStep;
|
||||
|
||||
private:
|
||||
|
||||
G4PhotoElectricEffect* thePhotoElectricEffect;
|
||||
G4ComptonScattering* theComptonScattering;
|
||||
G4GammaConversion* theGammaConversion;
|
||||
|
||||
G4MultipleScattering* theeminusMultipleScattering;
|
||||
G4eIonisation* theeminusIonisation;
|
||||
G4eBremsstrahlung* theeminusBremsstrahlung;
|
||||
|
||||
G4PAIonisation* fPAIonisation ;
|
||||
G4ForwardXrayTR* fForwardXrayTR ;
|
||||
|
||||
G4MultipleScattering* theeplusMultipleScattering;
|
||||
G4eIonisation* theeplusIonisation;
|
||||
G4eBremsstrahlung* theeplusBremsstrahlung;
|
||||
G4eplusAnnihilation* theeplusAnnihilation;
|
||||
|
||||
Em8StepCut* theeminusStepCut ;
|
||||
Em8StepCut* theeplusStepCut ;
|
||||
|
||||
G4double cutForGamma;
|
||||
G4double cutForElectron;
|
||||
G4double cutForProton;
|
||||
|
||||
Em8DetectorConstruction* pDet;
|
||||
Em8PhysicsListMessenger* physicsListMessenger;
|
||||
};
|
||||
|
||||
#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: Em8PhysicsListMessenger.hh,v 1.1 2000/01/07 14:50:22 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef Em8PhysicsListMessenger_h
|
||||
#define Em8PhysicsListMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class Em8PhysicsList;
|
||||
class G4UIcmdWithoutParameter;
|
||||
class G4UIcmdWithADouble;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8PhysicsListMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
Em8PhysicsListMessenger(Em8PhysicsList*);
|
||||
~Em8PhysicsListMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
Em8PhysicsList* Em8List;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* setMaxStepCmd;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* cutGCmd;
|
||||
G4UIcmdWithADoubleAndUnit* cutECmd;
|
||||
G4UIcmdWithADoubleAndUnit* cutPCmd;
|
||||
G4UIcmdWithADoubleAndUnit* rCmd;
|
||||
G4UIcmdWithADoubleAndUnit* eCmd;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
// 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: Em8PrimaryGeneratorAction.hh,v 1.1 2000/01/07 14:50:22 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef Em8PrimaryGeneratorAction_h
|
||||
#define Em8PrimaryGeneratorAction_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4ParticleGun;
|
||||
class G4Event;
|
||||
class Em8DetectorConstruction;
|
||||
class Em8PrimaryGeneratorMessenger;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
Em8PrimaryGeneratorAction(Em8DetectorConstruction*);
|
||||
~Em8PrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event*);
|
||||
void SetRndmFlag(G4String val) { rndmFlag = val;}
|
||||
void Setxvertex(G4double x) ;
|
||||
void Setyvertex(G4double y) ;
|
||||
void Setzvertex(G4double z) ;
|
||||
|
||||
static G4String GetPrimaryName() ;
|
||||
|
||||
private:
|
||||
G4ParticleGun* particleGun; //pointer a to G4 service class
|
||||
Em8DetectorConstruction* Em8Detector; //pointer to the geometry
|
||||
|
||||
Em8PrimaryGeneratorMessenger* gunMessenger; //messenger of this class
|
||||
G4String rndmFlag; //flag for a random impact point
|
||||
|
||||
static G4String thePrimaryParticleName ;
|
||||
G4double xvertex,yvertex,zvertex;
|
||||
G4bool vertexdefined ;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
// 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: Em8PrimaryGeneratorMessenger.hh,v 1.1 2000/01/07 14:50:22 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef Em8PrimaryGeneratorMessenger_h
|
||||
#define Em8PrimaryGeneratorMessenger_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class Em8PrimaryGeneratorAction;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8PrimaryGeneratorMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
Em8PrimaryGeneratorMessenger(Em8PrimaryGeneratorAction*);
|
||||
~Em8PrimaryGeneratorMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
Em8PrimaryGeneratorAction* Em8Action;
|
||||
G4UIcmdWithAString* RndmCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setxvertexCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setyvertexCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setzvertexCmd;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
// 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: Em8RunAction.hh,v 1.1 2000/01/07 14:50:22 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef Em8RunAction_h
|
||||
#define Em8RunAction_h 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "globals.hh"
|
||||
#include <iostream.h>
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8RunMessenger;
|
||||
|
||||
class HepTupleManager;
|
||||
class HepHistogram;
|
||||
|
||||
class G4Run;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8RunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
Em8RunAction();
|
||||
~Em8RunAction();
|
||||
|
||||
public:
|
||||
void BeginOfRunAction(const G4Run*);
|
||||
void EndOfRunAction(const G4Run*);
|
||||
|
||||
void CountEvent();
|
||||
void CountParticles(G4double,G4double);
|
||||
void AddEP(G4double,G4double);
|
||||
void AddEdeps(G4double Eabs);
|
||||
void AddTrackLength(G4double tlabs);
|
||||
void AddnStepsCharged(G4double ns);
|
||||
void AddnStepsNeutral(G4double ns);
|
||||
|
||||
void AddTrRef(G4double tr,G4double ref);
|
||||
|
||||
void FillEn(G4double En);
|
||||
void FillTh(G4double Th);
|
||||
void FillThBack(G4double Th);
|
||||
void FillR(G4double R);
|
||||
void FillTt(G4double Tt);
|
||||
void FillTb(G4double Tt);
|
||||
void FillTsec(G4double T);
|
||||
void FillGammaSpectrum(G4double E);
|
||||
void FillNbOfSteps(G4double nstep);
|
||||
void Fillvertexz(G4double z);
|
||||
|
||||
void SethistName(G4String name) ;
|
||||
|
||||
void SetnbinStep(G4int nbin);
|
||||
void SetSteplow(G4double Slow);
|
||||
void SetStephigh(G4double Shigh);
|
||||
|
||||
void SetnbinEn(G4int nbin);
|
||||
void SetEnlow(G4double Elow);
|
||||
void SetEnhigh(G4double Enhigh);
|
||||
|
||||
void SetnbinTt(G4int nbin);
|
||||
void SetTtlow(G4double Ttlow);
|
||||
void SetTthigh(G4double Tthigh);
|
||||
|
||||
void SetnbinTb(G4int nbin);
|
||||
void SetTblow(G4double Tblow);
|
||||
void SetTbhigh(G4double Tbhigh);
|
||||
|
||||
void SetnbinTsec(G4int nbin);
|
||||
void SetTseclow(G4double Tlow);
|
||||
void SetTsechigh(G4double Thigh);
|
||||
|
||||
void SetnbinTh(G4int nbin);
|
||||
void SetThlow(G4double Thlow);
|
||||
void SetThhigh(G4double Thhigh);
|
||||
|
||||
void SetnbinThBack(G4int nbin);
|
||||
void SetThlowBack(G4double Thlow);
|
||||
void SetThhighBack(G4double Thhigh);
|
||||
|
||||
void SetnbinR(G4int nbin);
|
||||
void SetRlow(G4double Rlow);
|
||||
void SetRhigh(G4double Rhigh);
|
||||
|
||||
void SetnbinGamma(G4int nbin);
|
||||
void SetElowGamma(G4double Elow);
|
||||
void SetEhighGamma(G4double Ehigh);
|
||||
|
||||
void Setnbinzvertex(G4int nbin);
|
||||
void Setzlow(G4double z);
|
||||
void Setzhigh(G4double z);
|
||||
|
||||
void SetRndmFreq(G4int val) {saveRndm = val;}
|
||||
G4int GetRndmFreq() {return saveRndm;}
|
||||
|
||||
private:
|
||||
|
||||
void bookHisto();
|
||||
|
||||
private:
|
||||
|
||||
G4String histName ;
|
||||
HepTupleManager* hbookManager;
|
||||
HepHistogram *histo1, *histo2, *histo3, *histo4, *histo5 ;
|
||||
HepHistogram *histo6, *histo7, *histo8, *histo9, *histo10;
|
||||
|
||||
G4double EnergySumAbs,EnergySquareSumAbs;
|
||||
G4double tlSumAbs,tlsquareSumAbs;
|
||||
G4double nStepSumCharged,nStepSum2Charged ;
|
||||
G4double nStepSumNeutral,nStepSum2Neutral ;
|
||||
G4double TotNbofEvents;
|
||||
G4double SumCharged,Sum2Charged,SumNeutral,Sum2Neutral;
|
||||
G4double Selectron,Spositron;
|
||||
|
||||
G4double Transmitted,Reflected ;
|
||||
|
||||
G4double entryStep,underStep,overStep,distStep[200];
|
||||
G4double Steplow,Stephigh,dStep;
|
||||
G4int nbinStep;
|
||||
G4double entryEn,underEn,overEn,distEn[200];
|
||||
G4double Enlow,Enhigh,dEn;
|
||||
G4int nbinEn;
|
||||
G4double entryTt,underTt,overTt,distTt[200];
|
||||
G4double Ttlow,Tthigh,dTt;
|
||||
G4int nbinTt;
|
||||
G4double Ttmean,Tt2mean;
|
||||
G4double entryTb,underTb,overTb,distTb[200];
|
||||
G4double Tblow,Tbhigh,dTb;
|
||||
G4int nbinTb;
|
||||
G4double Tbmean,Tb2mean;
|
||||
G4double entryTsec,underTsec,overTsec,distTsec[200];
|
||||
G4double Tseclow,Tsechigh,dTsec;
|
||||
G4int nbinTsec;
|
||||
G4double entryTh,underTh,overTh,distTh[200];
|
||||
G4double Thlow,Thhigh,dTh;
|
||||
G4int nbinTh;
|
||||
G4double entryThback,underThback,overThback,distThback[200];
|
||||
G4double Thlowback,Thhighback,dThback;
|
||||
G4int nbinThback;
|
||||
G4double entryR ,underR ,overR ,distR[200];
|
||||
G4double Rlow,Rhigh,dR;
|
||||
G4int nbinR;
|
||||
G4double Rmean,R2mean;
|
||||
G4double entryGamma,underGamma,overGamma,distGamma[200];
|
||||
G4double ElowGamma,EhighGamma,dEGamma;
|
||||
G4int nbinGamma ;
|
||||
G4double entryvertexz,undervertexz,oververtexz,distvertexz[200];
|
||||
G4double zlow,zhigh,dz;
|
||||
G4int nbinvertexz;
|
||||
|
||||
Em8RunMessenger* runMessenger;
|
||||
G4int saveRndm;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
|
||||
// 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: Em8RunMessenger.hh,v 1.1 2000/01/07 14:50:22 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef Em8RunMessenger_h
|
||||
#define Em8RunMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8RunAction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithADouble;
|
||||
class G4UIcmdWithAString;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8RunMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
|
||||
Em8RunMessenger(Em8RunAction* );
|
||||
~Em8RunMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand* ,G4String );
|
||||
|
||||
private:
|
||||
|
||||
Em8RunAction* runAction;
|
||||
|
||||
G4UIdirectory* plotDir;
|
||||
|
||||
G4UIcmdWithAString* sethistNameCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* setnbinStepCmd;
|
||||
G4UIcmdWithADouble* setSteplowCmd;
|
||||
G4UIcmdWithADouble* setStephighCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* setnbinEnCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setEnlowCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setEnhighCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* setnbinGammaCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setElowGammaCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setEhighGammaCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* setnbinTtCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setTtlowCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setTthighCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* setnbinTbCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setTblowCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setTbhighCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* setnbinTsecCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setTseclowCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setTsechighCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* setnbinRCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setRlowCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setRhighCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* setnbinThCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setThlowCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setThhighCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* setnbinThbackCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setThlowbackCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setThhighbackCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* setnbinzvertexCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setzlowCmd;
|
||||
G4UIcmdWithADoubleAndUnit* setzhighCmd;
|
||||
|
||||
G4UIdirectory* RndmDir;
|
||||
G4UIcmdWithAnInteger* RndmSaveCmd;
|
||||
G4UIcmdWithAString* RndmReadCmd;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
// 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: Em8StepCut.hh,v 1.1 2000/01/07 14:50:23 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD group
|
||||
// ------------------------------------------------------------
|
||||
// 05 March 1999 L.Urban
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef Em8StepCut_h
|
||||
#define Em8StepCut_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
#include "G4Step.hh"
|
||||
|
||||
class Em8StepCut : public G4VDiscreteProcess
|
||||
{
|
||||
public:
|
||||
|
||||
Em8StepCut(const G4String& processName ="UserStepCut" );
|
||||
Em8StepCut(Em8StepCut &);
|
||||
|
||||
~Em8StepCut();
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
void SetMaxStep(G4double);
|
||||
|
||||
protected:
|
||||
|
||||
// it is not needed here !
|
||||
G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator as private
|
||||
Em8StepCut & operator=(const Em8StepCut &right);
|
||||
|
||||
private:
|
||||
|
||||
G4double MaxChargedStep ;
|
||||
};
|
||||
|
||||
// inlined function members implementation
|
||||
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4UserLimits.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
#include "G4EnergyLossTables.hh"
|
||||
|
||||
inline G4double Em8StepCut::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
G4double ProposedStep = DBL_MAX;
|
||||
|
||||
if((MaxChargedStep > 0.) &&
|
||||
(aTrack.GetVolume() != NULL) &&
|
||||
(aTrack.GetVolume()->GetName() == "Absorber") &&
|
||||
(aTrack.GetDynamicParticle()->GetDefinition()->GetPDGCharge() != 0.))
|
||||
ProposedStep = MaxChargedStep ;
|
||||
|
||||
return ProposedStep;
|
||||
}
|
||||
|
||||
inline G4VParticleChange* Em8StepCut::PostStepDoIt(
|
||||
const G4Track& aTrack,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// do nothing
|
||||
aParticleChange.Initialize(aTrack);
|
||||
return &aParticleChange;
|
||||
}
|
||||
|
||||
inline G4double Em8StepCut::GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
return 0.;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
// 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: Em8SteppingAction.hh,v 1.1 2000/01/07 14:50:23 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef Em8SteppingAction_h
|
||||
#define Em8SteppingAction_h 1
|
||||
|
||||
#include "G4UserSteppingAction.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4EventManager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class Em8DetectorConstruction;
|
||||
class Em8RunAction;
|
||||
class Em8EventAction;
|
||||
class Em8SteppingMessenger;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8SteppingAction : public G4UserSteppingAction
|
||||
{
|
||||
public:
|
||||
Em8SteppingAction(Em8DetectorConstruction*, Em8EventAction*,
|
||||
Em8RunAction* );
|
||||
~Em8SteppingAction();
|
||||
|
||||
void UserSteppingAction(const G4Step*);
|
||||
|
||||
private:
|
||||
Em8DetectorConstruction* detector;
|
||||
Em8EventAction* eventaction;
|
||||
Em8RunAction* runaction;
|
||||
Em8SteppingMessenger* steppingMessenger;
|
||||
|
||||
G4int IDnow,IDold;
|
||||
G4int evnoold ;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,47 @@
|
||||
// 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: Em8SteppingMessenger.hh,v 1.1 2000/01/07 14:50:23 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef Em8SteppingMessenger_h
|
||||
#define Em8SteppingMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8SteppingAction;
|
||||
class G4UIdirectory;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8SteppingMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
|
||||
Em8SteppingMessenger(Em8SteppingAction* );
|
||||
~Em8SteppingMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand* ,G4String );
|
||||
|
||||
private:
|
||||
|
||||
Em8SteppingAction* steppingAction;
|
||||
|
||||
G4UIdirectory* steppingDir;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
// 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: Em8SteppingVerbose.hh,v 1.1 2000/01/07 14:50:23 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// Em8SteppingVerbose.hh
|
||||
//
|
||||
// Description:
|
||||
// This class manages the vervose outputs in G4SteppingManager.
|
||||
//
|
||||
//
|
||||
// Contact:
|
||||
// Questions and comments to this code should be sent to
|
||||
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
|
||||
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
class Em8SteppingVerbose;
|
||||
|
||||
#ifndef Em8SteppingVerbose_h
|
||||
#define Em8SteppingVerbose_h 1
|
||||
|
||||
#include "G4SteppingVerbose.hh"
|
||||
|
||||
class Em8SteppingVerbose : public G4SteppingVerbose
|
||||
{
|
||||
public:
|
||||
// Constructor/Destructor
|
||||
|
||||
Em8SteppingVerbose();
|
||||
~Em8SteppingVerbose();
|
||||
|
||||
void StepInfo();
|
||||
void TrackingStarted();
|
||||
|
||||
};
|
||||
|
||||
#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: Em8VisManager.hh,v 1.1 2000/01/07 14:50:24 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....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 Em8VisManager_h
|
||||
#define Em8VisManager_h 1
|
||||
|
||||
#include "G4VisManager.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class Em8VisManager: public G4VisManager
|
||||
{
|
||||
public:
|
||||
|
||||
Em8VisManager ();
|
||||
|
||||
private:
|
||||
|
||||
void RegisterGraphicsSystems ();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
#ifndef TRTDetectorConstruction_h
|
||||
#define TRTDetectorConstruction_h 1
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
class TRTTrackerSD;
|
||||
class SCTTrackerSD;
|
||||
class HepJamesRandom;
|
||||
|
||||
class TRTDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
TRTDetectorConstruction();
|
||||
~TRTDetectorConstruction();
|
||||
|
||||
public:
|
||||
G4VPhysicalVolume* Construct();
|
||||
|
||||
private:
|
||||
TRTTrackerSD *TRTStrawSD;
|
||||
SCTTrackerSD *SCTStripSD;
|
||||
HepJamesRandom theJamesEngine;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,93 @@
|
||||
#ifndef TRT_MATERIALS_HH
|
||||
#define TRT_MATERIALS_HH
|
||||
|
||||
//--------- Material definition ---------
|
||||
|
||||
G4double a, iz, z, density;
|
||||
G4String name, symbol;
|
||||
G4int nel, nComponents;
|
||||
|
||||
a = 14.01*g/mole;
|
||||
G4Element* elN = new G4Element(name="Nitrogen", symbol="N", iz=7., a);
|
||||
a = 16.00*g/mole;
|
||||
G4Element* elO = new G4Element(name="Oxygen", symbol="O", iz=8., a);
|
||||
a = 12.01*g/mole;
|
||||
G4Element* elC = new G4Element(name="Carbon", symbol="C", iz=6., a);
|
||||
a = 1.01*g/mole;
|
||||
G4Element* elH = new G4Element(name="Hydrogen", symbol="H", iz=1., a);
|
||||
a = 131.29*g/mole;
|
||||
G4Element* elXe = new G4Element(name="Xenon", symbol="Xe", iz=54., a);
|
||||
a = 19.00*g/mole;
|
||||
G4Element* elF = new G4Element(name="Fluorine", symbol="F", iz=9., a);
|
||||
|
||||
density = 1.205*mg/cm3;
|
||||
G4Material* Air = new G4Material(name="Air", density, nel=2,
|
||||
kStateGas,293.15*kelvin,1.*atmosphere);
|
||||
Air->AddElement(elN, .7);
|
||||
Air->AddElement(elO, .3);
|
||||
|
||||
density = 1.39*g/cm3;
|
||||
G4Material* Kapton = new G4Material(name="Kapton", density, nel=3);
|
||||
Kapton->AddElement(elO,2);
|
||||
Kapton->AddElement(elC,5);
|
||||
Kapton->AddElement(elH,4);
|
||||
|
||||
a = 63.55*g/mole;
|
||||
density = 8.96*g/cm3;
|
||||
G4Material* Copper = new G4Material(name="Copper", z=29.,a, density);
|
||||
|
||||
a = 26.98*g/mole;
|
||||
density = 2.7*g/cm3;
|
||||
G4Material* Al = new G4Material(name="Aluminum", z=13., a, density);
|
||||
|
||||
a = 28.09*g/mole;
|
||||
density = 2.33*g/cm3;
|
||||
G4Material* Si = new G4Material(name="Silicon", z=14., a, density);
|
||||
|
||||
density = 1.977*mg/cm3;
|
||||
G4Material* CO2 = new G4Material(name="CO2", density, nel=2,
|
||||
kStateGas,273.15*kelvin,1.*atmosphere);
|
||||
CO2->AddElement(elC,1);
|
||||
CO2->AddElement(elO,2);
|
||||
|
||||
G4double TRT_Xe_density = 5.485*mg/cm3;
|
||||
G4Material* TRT_Xe = new G4Material(name="TRT_Xe", TRT_Xe_density, nel=1,
|
||||
kStateGas,293.15*kelvin,1.*atmosphere);
|
||||
TRT_Xe->AddElement(elXe,1);
|
||||
|
||||
G4double TRT_CO2_density = 1.842*mg/cm3;
|
||||
G4Material* TRT_CO2 = new G4Material(name="TRT_CO2", TRT_CO2_density, nel=2,
|
||||
kStateGas,293.15*kelvin,1.*atmosphere);
|
||||
TRT_CO2->AddElement(elC,1);
|
||||
TRT_CO2->AddElement(elO,2);
|
||||
|
||||
G4double TRT_CF4_density = 3.9*mg/cm3;
|
||||
G4Material* TRT_CF4 = new G4Material(name="TRT_CF4", TRT_CF4_density, nel=2,
|
||||
kStateGas,293.15*kelvin,1.*atmosphere);
|
||||
TRT_CF4->AddElement(elC,1);
|
||||
TRT_CF4->AddElement(elF,4);
|
||||
|
||||
G4double XeCO2CF4_density = 4.76*mg/cm3;
|
||||
G4Material* XeCO2CF4 = new G4Material(name="XeCO2CF4", XeCO2CF4_density,
|
||||
nComponents=3,
|
||||
kStateGas,293.15*kelvin,1.*atmosphere);
|
||||
XeCO2CF4->AddMaterial(TRT_Xe,0.807);
|
||||
XeCO2CF4->AddMaterial(TRT_CO2,0.039);
|
||||
XeCO2CF4->AddMaterial(TRT_CF4,0.154);
|
||||
|
||||
density = 0.935*g/cm3;
|
||||
G4Material* TRT_CH2 = new G4Material(name="TRT_CH2",density, nel=2);
|
||||
TRT_CH2->AddElement(elC,1);
|
||||
TRT_CH2->AddElement(elH,2);
|
||||
|
||||
density = 0.059*g/cm3;
|
||||
G4Material* Radiator = new G4Material(name="Radiator",density, nel=2);
|
||||
Radiator->AddElement(elC,1);
|
||||
Radiator->AddElement(elH,2);
|
||||
|
||||
density = 0.145*g/cm3;
|
||||
G4Material* CarbonFiber = new G4Material(name="CarbonFiber",density, nel=1);
|
||||
CarbonFiber->AddElement(elC,1);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user