Import Geant4 1.0.0 source tree
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
|
||||
#ifndef PersEx01DetectorConstruction_h
|
||||
#define PersEx01DetectorConstruction_h 1
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class PersEx01DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
PersEx01DetectorConstruction();
|
||||
~PersEx01DetectorConstruction();
|
||||
|
||||
public:
|
||||
G4VPhysicalVolume* Construct();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
#ifndef PersEx01EventAction_h
|
||||
#define PersEx01EventAction_h 1
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class PersEx01EventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
PersEx01EventAction();
|
||||
virtual ~PersEx01EventAction();
|
||||
|
||||
public:
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
|
||||
private:
|
||||
G4int colID1;
|
||||
G4int colID2;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
// $Id: PersEx01PhysicsList.hh,v 1.2 1999/11/04 12:54:26 morita Exp $
|
||||
// ------------------------------------------------------------
|
||||
// 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 PersEx01PhysicsList_h
|
||||
#define PersEx01PhysicsList_h 1
|
||||
|
||||
#include "G4VUserPhysicsList.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class PersEx01PhysicsList: public G4VUserPhysicsList
|
||||
{
|
||||
public:
|
||||
PersEx01PhysicsList();
|
||||
virtual ~PersEx01PhysicsList();
|
||||
|
||||
protected:
|
||||
// Construct particle and physics
|
||||
virtual void ConstructParticle();
|
||||
virtual void ConstructProcess();
|
||||
|
||||
//
|
||||
virtual void SetCuts();
|
||||
|
||||
protected:
|
||||
// these methods Construct particles
|
||||
virtual void ConstructBosons();
|
||||
virtual void ConstructLeptons();
|
||||
virtual void ConstructMesons();
|
||||
virtual void ConstructBaryons();
|
||||
virtual void ConstructIons();
|
||||
|
||||
protected:
|
||||
// these methods Construct physics processes and register them
|
||||
virtual void ConstructGeneral();
|
||||
virtual void ConstructEM();
|
||||
virtual void ConstructHad();
|
||||
virtual void ConstructLeptHad();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
|
||||
#ifndef PersEx01PrimaryGeneratorAction_h
|
||||
#define PersEx01PrimaryGeneratorAction_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
|
||||
class G4ParticleGun;
|
||||
class G4Event;
|
||||
|
||||
class PersEx01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
PersEx01PrimaryGeneratorAction();
|
||||
~PersEx01PrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
|
||||
private:
|
||||
G4ParticleGun* particleGun;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
#ifndef PersEx01RunAction_h
|
||||
#define PersEx01RunAction_h 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Run;
|
||||
|
||||
class PersEx01RunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
PersEx01RunAction();
|
||||
virtual ~PersEx01RunAction();
|
||||
|
||||
public:
|
||||
virtual void BeginOfRunAction(const G4Run* aRun);
|
||||
virtual void EndOfRunAction(const G4Run* aRun);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
#ifndef PersEx01StackingAction_H
|
||||
#define PersEx01StackingAction_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UserStackingAction.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
class G4Track;
|
||||
|
||||
class PersEx01StackingAction : public G4UserStackingAction
|
||||
{
|
||||
public:
|
||||
PersEx01StackingAction();
|
||||
virtual ~PersEx01StackingAction();
|
||||
|
||||
public:
|
||||
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);
|
||||
virtual void NewStage();
|
||||
virtual void PrepareNewEvent();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
|
||||
#ifndef PersEx01TrackerHit_h
|
||||
#define PersEx01TrackerHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
class PersEx01TrackerHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
|
||||
PersEx01TrackerHit();
|
||||
~PersEx01TrackerHit();
|
||||
PersEx01TrackerHit(const PersEx01TrackerHit &right);
|
||||
const PersEx01TrackerHit& operator=(const PersEx01TrackerHit &right);
|
||||
int operator==(const PersEx01TrackerHit &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<PersEx01TrackerHit> PersEx01TrackerHitsCollection;
|
||||
|
||||
extern G4Allocator<PersEx01TrackerHit> PersEx01TrackerHitAllocator;
|
||||
|
||||
inline void* PersEx01TrackerHit::operator new(size_t)
|
||||
{
|
||||
void *aHit;
|
||||
aHit = (void *) PersEx01TrackerHitAllocator.MallocSingle();
|
||||
return aHit;
|
||||
}
|
||||
|
||||
inline void PersEx01TrackerHit::operator delete(void *aHit)
|
||||
{
|
||||
PersEx01TrackerHitAllocator.FreeSingle((PersEx01TrackerHit*) aHit);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
#ifndef PersEx01TrackerSD_h
|
||||
#define PersEx01TrackerSD_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "PersEx01TrackerHit.hh"
|
||||
#include "G4Step.hh"
|
||||
|
||||
class PersEx01TrackerSD : public G4VSensitiveDetector
|
||||
{
|
||||
|
||||
public:
|
||||
PersEx01TrackerSD(G4String name);
|
||||
~PersEx01TrackerSD();
|
||||
|
||||
void Initialize(G4HCofThisEvent*HCE);
|
||||
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
void EndOfEvent(G4HCofThisEvent*HCE);
|
||||
void clear();
|
||||
void DrawAll();
|
||||
void PrintAll();
|
||||
|
||||
private:
|
||||
PersEx01TrackerHitsCollection *EvenCollection;
|
||||
PersEx01TrackerHitsCollection *OddCollection;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user