Import Geant4 0.0.0 source tree
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// 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: G4ClassificationOfNewTrack.hh,v 2.0 1998/07/02 16:53:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef G4ClassificationOfNewTrack_hh
|
||||
#define G4ClassificationOfNewTrack_hh 1
|
||||
|
||||
enum G4ClassificationOfNewTrack
|
||||
{
|
||||
fUrgent, // put into the urgent stack
|
||||
fWaiting, // put into the waiting stack
|
||||
fPostpone, // postpone to the next event
|
||||
fKill // kill
|
||||
};
|
||||
|
||||
#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: G4EvManMessenger.hh,v 2.2 1998/07/12 03:42:11 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef G4EvManMessenger_h
|
||||
#define G4EvManMessenger_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
class G4EventManager;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithoutParameter;
|
||||
class G4UIcmdWithAnInteger;
|
||||
|
||||
class G4EvManMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
G4EvManMessenger(G4EventManager * fEvMan);
|
||||
~G4EvManMessenger();
|
||||
void SetNewValue(G4UIcommand * command,G4String newValues);
|
||||
G4String GetCurrentValue(G4UIcommand * command);
|
||||
private:
|
||||
G4EventManager * fEvManager;
|
||||
G4UIdirectory* eventDirectory;
|
||||
G4UIcmdWithoutParameter* abortCmd;
|
||||
G4UIcmdWithAnInteger* verboseCmd;
|
||||
};
|
||||
|
||||
#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: G4Event.hh,v 2.2 1998/09/21 02:01:39 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef G4Event_h
|
||||
#define G4Event_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4PrimaryVertex.hh"
|
||||
#include "G4HCofThisEvent.hh"
|
||||
#include "G4DCofThisEvent.hh"
|
||||
#include "G4TrajectoryContainer.hh"
|
||||
|
||||
class G4VHitsCollection;
|
||||
class G4Event
|
||||
{
|
||||
public:
|
||||
G4Event();
|
||||
G4Event(G4int evID);
|
||||
~G4Event();
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void* anEvent);
|
||||
|
||||
int operator==(const G4Event &right) const;
|
||||
int operator!=(const G4Event &right) const;
|
||||
|
||||
void Print() const;
|
||||
void Draw() const;
|
||||
|
||||
private:
|
||||
// event ID
|
||||
G4int eventID;
|
||||
|
||||
// PrimaryVertex
|
||||
G4PrimaryVertex* thePrimaryVertex;
|
||||
G4int numberOfPrimaryVertex;
|
||||
|
||||
// HitsCollection
|
||||
G4HCofThisEvent* HC;
|
||||
|
||||
// DigiCollection
|
||||
G4DCofThisEvent* DC;
|
||||
|
||||
// TrajectoryContainer
|
||||
G4TrajectoryContainer * trajectoryContainer;
|
||||
|
||||
public:
|
||||
inline void SetEventID(G4int i)
|
||||
{ eventID = i; };
|
||||
inline G4int GetEventID() const
|
||||
{ return eventID; };
|
||||
inline void AddPrimaryVertex(G4PrimaryVertex* aPrimaryVertex)
|
||||
{
|
||||
if( thePrimaryVertex == NULL )
|
||||
{ thePrimaryVertex = aPrimaryVertex; }
|
||||
else
|
||||
{ thePrimaryVertex->SetNext( aPrimaryVertex ); }
|
||||
numberOfPrimaryVertex++;
|
||||
};
|
||||
inline G4int GetNumberOfPrimaryVertex() const
|
||||
{ return numberOfPrimaryVertex; };
|
||||
inline G4PrimaryVertex* GetPrimaryVertex(G4int i=0) const
|
||||
{
|
||||
if( i == 0 )
|
||||
{ return thePrimaryVertex; }
|
||||
else if( i > 0 && i < numberOfPrimaryVertex )
|
||||
{
|
||||
G4PrimaryVertex* primaryVertex = thePrimaryVertex;
|
||||
for( int j=0; j<i; j++ )
|
||||
{
|
||||
if( primaryVertex == NULL ) return NULL;
|
||||
primaryVertex = primaryVertex->GetNext();
|
||||
}
|
||||
return primaryVertex;
|
||||
}
|
||||
else
|
||||
{ return NULL; }
|
||||
};
|
||||
inline void SetHCofThisEvent(G4HCofThisEvent*value)
|
||||
{ HC = value; };
|
||||
inline G4HCofThisEvent* GetHCofThisEvent() const
|
||||
{ return HC; };
|
||||
inline void SetDCofThisEvent(G4DCofThisEvent*value)
|
||||
{ DC = value; };
|
||||
inline G4DCofThisEvent* GetDCofThisEvent() const
|
||||
{ return DC; };
|
||||
inline void SetTrajectoryContainer(G4TrajectoryContainer*value)
|
||||
{ trajectoryContainer = value; };
|
||||
inline G4TrajectoryContainer* GetTrajectoryContainer() const
|
||||
{ return trajectoryContainer; };
|
||||
};
|
||||
|
||||
extern G4Allocator<G4Event> anEventAllocator;
|
||||
|
||||
inline void* G4Event::operator new(size_t)
|
||||
{
|
||||
void* anEvent;
|
||||
anEvent = (void*)anEventAllocator.MallocSingle();
|
||||
return anEvent;
|
||||
}
|
||||
|
||||
inline void G4Event::operator delete(void* anEvent)
|
||||
{
|
||||
anEventAllocator.FreeSingle((G4Event*)anEvent);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
// 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: G4EventManager.hh,v 2.2 1998/10/10 10:51:17 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 10/Dec/96 M.Asai
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4EventManager_h
|
||||
#define G4EventManager_h 1
|
||||
|
||||
#include "evmandefs.hh"
|
||||
#include "G4StackManager.hh"
|
||||
#include "G4TrajectoryContainer.hh"
|
||||
#include "G4PrimaryTransformer.hh"
|
||||
class G4Event;
|
||||
class G4UserEventAction;
|
||||
class G4UserStackingAction;
|
||||
class G4UserTrackingAction;
|
||||
class G4UserSteppingAction;
|
||||
class G4EvManMessenger;
|
||||
#include "G4TrackingManager.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Trajectory.hh"
|
||||
#include "G4TrackStatus.hh"
|
||||
class G4SDManager;
|
||||
#include "globals.hh"
|
||||
|
||||
//## Class: G4EventManager
|
||||
// G4EventManager controls an event. This class has only
|
||||
// one public method, ProcessOneEvent(), which will be
|
||||
// called by GEANT4.
|
||||
|
||||
class G4EventManager
|
||||
{
|
||||
|
||||
public:
|
||||
G4EventManager();
|
||||
~G4EventManager();
|
||||
|
||||
private:
|
||||
G4EventManager(const G4EventManager &right);
|
||||
G4EventManager& operator=(const G4EventManager& right);
|
||||
|
||||
public:
|
||||
void ProcessOneEvent(G4Event* anEvent);
|
||||
|
||||
private:
|
||||
void StackTracks(G4TrackVector *trackVector);
|
||||
|
||||
G4Event* currentEvent;
|
||||
|
||||
G4StackManager *trackContainer;
|
||||
G4TrackingManager *trackManager;
|
||||
G4TrajectoryContainer *trajectoryContainer;
|
||||
G4int trackIDCounter;
|
||||
int verboseLevel;
|
||||
G4SDManager* sdManager;
|
||||
G4PrimaryTransformer* transformer;
|
||||
G4UserEventAction* userEventAction;
|
||||
G4bool tracking;
|
||||
|
||||
G4EvManMessenger* theMessenger;
|
||||
|
||||
public:
|
||||
inline const G4Event* GetConstCurrentEvent()
|
||||
{ return currentEvent; };
|
||||
inline G4Event* GetNonconstCurrentEvent()
|
||||
{ return currentEvent; };
|
||||
inline void AbortCurrentEvent()
|
||||
{
|
||||
trackContainer->clear();
|
||||
if(tracking) trackManager->EventAborted();
|
||||
};
|
||||
void SetUserAction(G4UserEventAction* userAction);
|
||||
inline void SetUserAction(G4UserStackingAction* userAction)
|
||||
{ trackContainer->SetUserStackingAction(userAction); };
|
||||
inline void SetUserAction(G4UserTrackingAction* userAction)
|
||||
{ trackManager->SetUserAction(userAction); };
|
||||
inline void SetUserAction(G4UserSteppingAction* userAction)
|
||||
{ trackManager->SetUserAction(userAction); };
|
||||
inline G4int GetVerboseLevel()
|
||||
{ return verboseLevel; };
|
||||
inline void SetVerboseLevel( G4int value )
|
||||
{
|
||||
verboseLevel = value;
|
||||
trackContainer->SetVerboseLevel( value );
|
||||
transformer->SetVerboseLevel( value );
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
// 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: G4HEPEvtInterface.hh,v 2.1 1998/07/12 02:53:50 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef G4HEPEvtInterface_h
|
||||
#define G4HEPEvtInterface_h 1
|
||||
|
||||
#include <fstream.h>
|
||||
#include <rw/tpordvec.h>
|
||||
#include "globals.hh"
|
||||
#include "G4VPrimaryGenerator.hh"
|
||||
#include "G4HEPEvtParticle.hh"
|
||||
|
||||
class G4PrimaryVertex;
|
||||
class G4Event;
|
||||
|
||||
class G4HEPEvtInterface:public G4VPrimaryGenerator
|
||||
{
|
||||
public:
|
||||
G4HEPEvtInterface(char* evfile);
|
||||
G4HEPEvtInterface(G4String evfile);
|
||||
~G4HEPEvtInterface();
|
||||
|
||||
void GeneratePrimaryVertex(G4Event* evt);
|
||||
|
||||
private:
|
||||
G4String fileName;
|
||||
ifstream inputFile;
|
||||
RWTPtrOrderedVector<G4HEPEvtParticle> HPlist;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
// 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: G4HEPEvtParticle.hh,v 2.1 1998/07/12 02:53:50 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4HEPEvtParticle_h
|
||||
#define G4HEPEvtParticle_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4PrimaryParticle.hh"
|
||||
|
||||
|
||||
class G4HEPEvtParticle
|
||||
{
|
||||
public:
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aStackedTrack);
|
||||
|
||||
G4HEPEvtParticle();
|
||||
G4HEPEvtParticle(G4PrimaryParticle* pp,
|
||||
G4int isthep, G4int jdahep1, G4int jdahep2);
|
||||
~G4HEPEvtParticle();
|
||||
|
||||
const G4HEPEvtParticle & operator=(const G4HEPEvtParticle &right);
|
||||
int operator==(const G4HEPEvtParticle &right) const;
|
||||
int operator!=(const G4HEPEvtParticle &right) const;
|
||||
|
||||
private:
|
||||
G4PrimaryParticle * theParticle;
|
||||
G4int ISTHEP; // Status code of the entry
|
||||
// Set to be 0 after generating links of
|
||||
// G4PrimaryParticle object
|
||||
G4int JDAHEP1;
|
||||
G4int JDAHEP2;
|
||||
|
||||
public:
|
||||
inline G4PrimaryParticle * GetTheParticle()
|
||||
{ return theParticle; };
|
||||
inline void Done()
|
||||
{ ISTHEP *= -1; };
|
||||
inline G4int GetISTHEP()
|
||||
{ return ISTHEP; };
|
||||
inline G4int GetJDAHEP1()
|
||||
{ return JDAHEP1; };
|
||||
inline G4int GetJDAHEP2()
|
||||
{ return JDAHEP2; };
|
||||
};
|
||||
|
||||
extern G4Allocator<G4HEPEvtParticle> aHEPEvtParticleAllocator;
|
||||
|
||||
inline void * G4HEPEvtParticle::operator new(size_t)
|
||||
{
|
||||
void * aHEPEvtParticle;
|
||||
aHEPEvtParticle = (void *) aHEPEvtParticleAllocator.MallocSingle();
|
||||
return aHEPEvtParticle;
|
||||
}
|
||||
|
||||
inline void G4HEPEvtParticle::operator delete(void * aHEPEvtParticle)
|
||||
{
|
||||
aHEPEvtParticleAllocator.FreeSingle((G4HEPEvtParticle *) aHEPEvtParticle);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
// 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: G4ParticleGun.hh,v 2.2 1998/10/01 16:41:52 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef G4ParticleGun_h
|
||||
#define G4ParticleGun_h 1
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPrimaryGenerator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4PrimaryVertex.hh"
|
||||
#include "G4ParticleMomentum.hh"
|
||||
|
||||
class G4Event;
|
||||
class G4ParticleGunMessenger;
|
||||
|
||||
class G4ParticleGun:public G4VPrimaryGenerator
|
||||
{
|
||||
public:
|
||||
G4ParticleGun();
|
||||
G4ParticleGun(G4int numberofparticles);
|
||||
G4ParticleGun(G4ParticleDefinition * particleDef,
|
||||
G4int numberofparticles = 1);
|
||||
virtual ~G4ParticleGun();
|
||||
G4ParticleGun(const G4ParticleGun &right);
|
||||
|
||||
const G4ParticleGun & operator=(const G4ParticleGun &right);
|
||||
int operator==(const G4ParticleGun &right) const;
|
||||
int operator!=(const G4ParticleGun &right) const;
|
||||
|
||||
virtual void GeneratePrimaryVertex(G4Event* evt);
|
||||
|
||||
// Set particle properties to be shoot out
|
||||
// SetParticleDefinition should be called at first
|
||||
// By using SetParticleMomentum(), both particle_momentum_direction and
|
||||
// particle_energy(Kinetic Energy) are determined.
|
||||
|
||||
void SetParticleMomentum(G4ParticleMomentum aMomentum);
|
||||
inline void SetParticleDefinition
|
||||
(G4ParticleDefinition * aParticleDefinition)
|
||||
{ particle_definition = aParticleDefinition; }
|
||||
inline void SetParticleMomentumDirection
|
||||
(G4ParticleMomentum aMomentumDirection)
|
||||
{ particle_momentum_direction = aMomentumDirection.unit(); }
|
||||
inline void SetParticleEnergy(G4double aKineticEnergy)
|
||||
{ particle_energy = aKineticEnergy; }
|
||||
inline void SetParticlePosition(G4ThreeVector aPosition)
|
||||
{ particle_position = aPosition; }
|
||||
inline void SetParticleTime(G4double aTime)
|
||||
{ particle_time = aTime; }
|
||||
inline G4ParticleDefinition* GetParticleDefinition()
|
||||
{ return particle_definition; }
|
||||
inline G4ParticleMomentum GetParticleMomentumDirection()
|
||||
{ return particle_momentum_direction; }
|
||||
inline G4double GetParticleEnergy()
|
||||
{ return particle_energy; }
|
||||
inline G4ThreeVector GetParticlePosition()
|
||||
{ return particle_position; }
|
||||
inline G4double GetParticleTime()
|
||||
{ return particle_time; }
|
||||
inline void SetParticlePolarization(G4ThreeVector aVal)
|
||||
{ particle_polarization = aVal; }
|
||||
inline G4ThreeVector GetParticlePolarization()
|
||||
{ return particle_polarization; }
|
||||
inline void SetNumberOfParticles(G4int i)
|
||||
{ NumberOfParticlesToBeGenerated = i; }
|
||||
inline G4int GetNumberOfParticles()
|
||||
{ return NumberOfParticlesToBeGenerated; }
|
||||
|
||||
protected:
|
||||
virtual void SetInitialValues();
|
||||
|
||||
G4int NumberOfParticlesToBeGenerated;
|
||||
G4ParticleDefinition* particle_definition;
|
||||
G4ParticleMomentum particle_momentum_direction;
|
||||
G4double particle_energy;
|
||||
G4ThreeVector particle_position;
|
||||
G4double particle_time;
|
||||
G4ThreeVector particle_polarization;
|
||||
|
||||
private:
|
||||
G4ParticleGunMessenger* theMessenger;
|
||||
};
|
||||
|
||||
#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: G4ParticleGunMessenger.hh,v 2.2 1998/07/12 03:42:15 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef G4ParticleGunMessenger_h
|
||||
#define G4ParticleGunMessenger_h 1
|
||||
|
||||
class G4ParticleGun;
|
||||
class G4ParticleTable;
|
||||
class G4UIcommand;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithoutParameter;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWith3Vector;
|
||||
class G4UIcmdWith3VectorAndUnit;
|
||||
class G4UIcmdWithAnInteger;
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4ParticleGunMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
G4ParticleGunMessenger(G4ParticleGun * fPtclGun);
|
||||
~G4ParticleGunMessenger();
|
||||
|
||||
public:
|
||||
void SetNewValue(G4UIcommand * command,G4String newValues);
|
||||
G4String GetCurrentValue(G4UIcommand * command);
|
||||
|
||||
private:
|
||||
G4ParticleGun * fParticleGun;
|
||||
G4ParticleTable * particleTable;
|
||||
|
||||
private: //commands
|
||||
G4UIdirectory * gunDirectory;
|
||||
G4UIcmdWithoutParameter * listCmd;
|
||||
G4UIcmdWithAString * particleCmd;
|
||||
G4UIcmdWith3Vector * directionCmd;
|
||||
G4UIcmdWithADoubleAndUnit * energyCmd;
|
||||
G4UIcmdWith3VectorAndUnit * positionCmd;
|
||||
G4UIcmdWithADoubleAndUnit * timeCmd;
|
||||
G4UIcmdWith3Vector * polCmd;
|
||||
G4UIcmdWithAnInteger * numberCmd;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
// 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: G4PrimaryParticle.hh,v 2.2 1998/10/10 10:51:18 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4PrimaryParticle_h
|
||||
#define G4PrimaryParticle_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
class G4ParticleDefinition;
|
||||
|
||||
class G4PrimaryParticle
|
||||
{
|
||||
public:
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aStackedTrack);
|
||||
|
||||
G4PrimaryParticle();
|
||||
G4PrimaryParticle(G4int Pcode);
|
||||
G4PrimaryParticle(G4int Pcode,
|
||||
G4double px,G4double py,G4double pz);
|
||||
G4PrimaryParticle(G4ParticleDefinition* Gcode);
|
||||
G4PrimaryParticle(G4ParticleDefinition* Gcode,
|
||||
G4double px,G4double py,G4double pz);
|
||||
~G4PrimaryParticle();
|
||||
|
||||
const G4PrimaryParticle & operator=(const G4PrimaryParticle &right);
|
||||
int operator==(const G4PrimaryParticle &right) const;
|
||||
int operator!=(const G4PrimaryParticle &right) const;
|
||||
|
||||
void Print() const;
|
||||
|
||||
private:
|
||||
G4int PDGcode;
|
||||
G4ParticleDefinition * G4code;
|
||||
G4double Px;
|
||||
G4double Py;
|
||||
G4double Pz;
|
||||
|
||||
G4PrimaryParticle * nextParticle;
|
||||
G4PrimaryParticle * daughterParticle;
|
||||
|
||||
G4int trackID; // This will be set if this particle is
|
||||
// sent to G4EventManager and converted to
|
||||
// G4Track. Otherwise = -1.
|
||||
G4double mass; // This is just for book keeping.
|
||||
// This will not be used but the mass in
|
||||
// G4ParticleDefinition will be used.
|
||||
|
||||
G4double polX;
|
||||
G4double polY;
|
||||
G4double polZ;
|
||||
|
||||
public:
|
||||
void SetPDGcode(G4int Pcode);
|
||||
inline G4int GetPDGcode() const
|
||||
{ return PDGcode; };
|
||||
void SetG4code(G4ParticleDefinition * Gcode);
|
||||
inline G4ParticleDefinition * GetG4code() const
|
||||
{ return G4code; };
|
||||
inline void SetMomentum(G4double px, G4double py, G4double pz)
|
||||
{
|
||||
Px = px;
|
||||
Py = py;
|
||||
Pz = pz;
|
||||
};
|
||||
inline G4ThreeVector GetMomentum() const
|
||||
{ return G4ThreeVector(Px,Py,Pz); };
|
||||
inline G4double GetPx() const
|
||||
{ return Px; };
|
||||
inline G4double GetPy() const
|
||||
{ return Py; };
|
||||
inline G4double GetPz() const
|
||||
{ return Pz; };
|
||||
inline void SetNext(G4PrimaryParticle * np)
|
||||
{
|
||||
if(nextParticle == NULL)
|
||||
{ nextParticle = np; }
|
||||
else
|
||||
{ nextParticle->SetNext(np); }
|
||||
};
|
||||
inline G4PrimaryParticle * GetNext() const
|
||||
{ return nextParticle; };
|
||||
inline void SetDaughter(G4PrimaryParticle * np)
|
||||
{
|
||||
if(daughterParticle == NULL)
|
||||
{ daughterParticle = np; }
|
||||
else
|
||||
{ daughterParticle->SetNext(np); }
|
||||
};
|
||||
inline G4PrimaryParticle * GetDaughter() const
|
||||
{ return daughterParticle; };
|
||||
inline void SetTrackID(G4int id)
|
||||
{ trackID = id; };
|
||||
inline G4int GetTrackID() const
|
||||
{ return trackID; };
|
||||
inline void SetMass(G4double mas)
|
||||
{ mass = mas; };
|
||||
inline G4double GetMass() const
|
||||
{ return mass; };
|
||||
inline void SetPolarization(G4double px,G4double py,G4double pz)
|
||||
{
|
||||
polX = px;
|
||||
polY = py;
|
||||
polZ = pz;
|
||||
};
|
||||
inline G4ThreeVector GetPolarization() const
|
||||
{ return G4ThreeVector(polX,polY,polZ); };
|
||||
inline G4double GetPolX() const { return polX; };
|
||||
inline G4double GetPolY() const { return polY; };
|
||||
inline G4double GetPolZ() const { return polZ; };
|
||||
};
|
||||
|
||||
extern G4Allocator<G4PrimaryParticle> aPrimaryParticleAllocator;
|
||||
|
||||
inline void * G4PrimaryParticle::operator new(size_t)
|
||||
{
|
||||
void * aPrimaryParticle;
|
||||
aPrimaryParticle = (void *) aPrimaryParticleAllocator.MallocSingle();
|
||||
return aPrimaryParticle;
|
||||
}
|
||||
|
||||
inline void G4PrimaryParticle::operator delete(void * aPrimaryParticle)
|
||||
{
|
||||
aPrimaryParticleAllocator.FreeSingle((G4PrimaryParticle *) aPrimaryParticle);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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: G4PrimaryTransformer.hh,v 2.2 1998/10/10 10:51:18 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PromaryTransformer_h
|
||||
#define G4PromaryTransformer_h 1
|
||||
|
||||
#include "G4TrackVector.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "globals.hh"
|
||||
class G4Event;
|
||||
class G4PrimaryVertex;
|
||||
#include "G4PrimaryParticle.hh"
|
||||
|
||||
class G4PrimaryTransformer
|
||||
{
|
||||
public:
|
||||
G4PrimaryTransformer();
|
||||
~G4PrimaryTransformer();
|
||||
|
||||
G4TrackVector* GimmePrimaries(G4Event* anEvent);
|
||||
|
||||
private:
|
||||
G4TrackVector TV;
|
||||
G4ParticleTable* particleTable;
|
||||
G4int verboseLevel;
|
||||
|
||||
public:
|
||||
inline void SetVerboseLevel(G4int vl)
|
||||
{ verboseLevel = vl; };
|
||||
|
||||
private:
|
||||
void GenerateTracks(G4PrimaryVertex* primaryVertex);
|
||||
void GenerateSingleTrack(G4PrimaryParticle* primaryParticle,
|
||||
G4double x0,G4double y0,G4double z0,G4double t0);
|
||||
void SetDecayProducts(G4PrimaryParticle* mother,
|
||||
G4DynamicParticle* motherDP);
|
||||
inline G4ParticleDefinition* GetDefinition(G4PrimaryParticle*pp)
|
||||
{
|
||||
G4ParticleDefinition* partDef = pp->GetG4code();
|
||||
if(!partDef) partDef = particleTable->FindParticle(pp->GetPDGcode());
|
||||
return partDef;
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
// 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: G4PrimaryVertex.hh,v 2.3 1998/11/11 11:19:37 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4PrimaryVertex_h
|
||||
#define G4PrimaryVertex_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PrimaryParticle.hh"
|
||||
|
||||
class G4PrimaryVertex
|
||||
{
|
||||
public:
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aStackedTrack);
|
||||
|
||||
G4PrimaryVertex();
|
||||
G4PrimaryVertex(G4double x0,G4double y0,G4double z0,G4double t0);
|
||||
G4PrimaryVertex(G4ThreeVector xyz0,G4double t0);
|
||||
~G4PrimaryVertex();
|
||||
|
||||
const G4PrimaryVertex & operator=(const G4PrimaryVertex &right);
|
||||
int operator==(const G4PrimaryVertex &right) const;
|
||||
int operator!=(const G4PrimaryVertex &right) const;
|
||||
|
||||
void Print() const;
|
||||
|
||||
private:
|
||||
G4double X0;
|
||||
G4double Y0;
|
||||
G4double Z0;
|
||||
G4double T0;
|
||||
G4PrimaryParticle * theParticle;
|
||||
G4PrimaryParticle * theTail;
|
||||
G4PrimaryVertex* nextVertex;
|
||||
G4int numberOfParticle;
|
||||
|
||||
public:
|
||||
inline G4ThreeVector GetPosition() const
|
||||
{ return G4ThreeVector(X0,Y0,Z0); }
|
||||
inline G4double GetX0() const
|
||||
{ return X0; }
|
||||
inline G4double GetY0() const
|
||||
{ return Y0; }
|
||||
inline G4double GetZ0() const
|
||||
{ return Z0; }
|
||||
inline G4double GetT0() const
|
||||
{ return T0; }
|
||||
inline G4int GetNumberOfParticle() const
|
||||
{ return numberOfParticle; }
|
||||
inline void SetPrimary(G4PrimaryParticle * pp)
|
||||
{
|
||||
if(theParticle == NULL)
|
||||
{
|
||||
theParticle = pp;
|
||||
theTail = pp;
|
||||
}
|
||||
else
|
||||
{
|
||||
theTail->SetNext(pp);
|
||||
theTail = pp;
|
||||
}
|
||||
numberOfParticle++;
|
||||
}
|
||||
inline G4PrimaryParticle* GetPrimary(G4int i=0) const
|
||||
{
|
||||
if( i == 0 )
|
||||
{ return theParticle; }
|
||||
else if( i > 0 && i < numberOfParticle )
|
||||
{
|
||||
G4PrimaryParticle* particle = theParticle;
|
||||
for( int j=0; j<i; j++ )
|
||||
{
|
||||
if( particle == NULL ) return NULL;
|
||||
particle = particle->GetNext();
|
||||
}
|
||||
return particle;
|
||||
}
|
||||
else
|
||||
{ return NULL; }
|
||||
}
|
||||
inline void SetNext(G4PrimaryVertex* nv)
|
||||
{
|
||||
if(nextVertex == NULL)
|
||||
{ nextVertex = nv; }
|
||||
else
|
||||
{ nextVertex->SetNext(nv); }
|
||||
}
|
||||
inline G4PrimaryVertex* GetNext() const
|
||||
{ return nextVertex; }
|
||||
};
|
||||
|
||||
extern G4Allocator<G4PrimaryVertex> aPrimaryVertexAllocator;
|
||||
|
||||
inline void * G4PrimaryVertex::operator new(size_t)
|
||||
{
|
||||
void * aPrimaryVertex;
|
||||
aPrimaryVertex = (void *) aPrimaryVertexAllocator.MallocSingle();
|
||||
return aPrimaryVertex;
|
||||
}
|
||||
|
||||
inline void G4PrimaryVertex::operator delete(void * aPrimaryVertex)
|
||||
{
|
||||
aPrimaryVertexAllocator.FreeSingle((G4PrimaryVertex *) aPrimaryVertex);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
// 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: G4StackManager.hh,v 2.1 1998/07/12 02:53:54 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 09/Dec/96 M.Asai
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4StackManager_h
|
||||
#define G4StackManager_h 1
|
||||
|
||||
#include "G4UserStackingAction.hh"
|
||||
#include "G4StackedTrack.hh"
|
||||
#include "G4TrackStack.hh"
|
||||
#include "G4ClassificationOfNewTrack.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4TrackStatus.hh"
|
||||
#include "globals.hh"
|
||||
class G4StackingMessenger;
|
||||
|
||||
class G4StackManager
|
||||
{
|
||||
public:
|
||||
G4StackManager();
|
||||
~G4StackManager();
|
||||
|
||||
private:
|
||||
const G4StackManager & operator=
|
||||
(const G4StackManager &right);
|
||||
int operator==(const G4StackManager &right) const;
|
||||
int operator!=(const G4StackManager &right) const;
|
||||
|
||||
public:
|
||||
G4int PushOneTrack(G4Track *newTrack);
|
||||
G4Track * PopNextTrack();
|
||||
G4int PrepareNewEvent();
|
||||
void ReClassify();
|
||||
|
||||
private:
|
||||
G4UserStackingAction * userStackingAction;
|
||||
int verboseLevel;
|
||||
G4TrackStack * urgentStack;
|
||||
G4TrackStack * waitingStack;
|
||||
G4TrackStack * postponeStack;
|
||||
G4StackingMessenger* theMessenger;
|
||||
|
||||
public:
|
||||
inline void clear()
|
||||
{
|
||||
ClearUrgentStack();
|
||||
ClearWaitingStack();
|
||||
};
|
||||
inline void ClearUrgentStack()
|
||||
{ urgentStack->clear(); };
|
||||
inline void ClearWaitingStack()
|
||||
{ waitingStack->clear(); };
|
||||
inline void ClearPostponeStack()
|
||||
{ postponeStack->clear(); };
|
||||
inline G4int GetNTotalTrack() const
|
||||
{ return urgentStack->GetNTrack()
|
||||
+ waitingStack->GetNTrack()
|
||||
+ postponeStack->GetNTrack(); };
|
||||
inline G4int GetNUrgentTrack() const
|
||||
{ return urgentStack->GetNTrack(); };
|
||||
inline G4int GetNWaitingTrack() const
|
||||
{ return waitingStack->GetNTrack(); };
|
||||
inline G4int GetNPostponedTrack() const
|
||||
{ return postponeStack->GetNTrack(); };
|
||||
inline void SetVerboseLevel( int const value )
|
||||
{ verboseLevel = value; };
|
||||
inline void SetUserStackingAction(G4UserStackingAction* value)
|
||||
{
|
||||
if (userStackingAction) delete userStackingAction;
|
||||
userStackingAction = value;
|
||||
userStackingAction->SetStackManager(this);
|
||||
};
|
||||
|
||||
private:
|
||||
inline G4ClassificationOfNewTrack
|
||||
DefaultClassification(G4Track *aTrack)
|
||||
{
|
||||
G4ClassificationOfNewTrack classification = fUrgent;
|
||||
if( aTrack->GetTrackStatus() == fPostponeToNextEvent )
|
||||
{ classification = fPostpone; }
|
||||
return classification;
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
// 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: G4StackedTrack.hh,v 2.1 1998/07/12 02:53:54 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 02/Feb/96 M.Asai
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4StackedTrack_h
|
||||
#define G4StackedTrack_h 1
|
||||
|
||||
#include "G4Track.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4Allocator.hh"
|
||||
|
||||
class G4StackedTrack
|
||||
{
|
||||
public:
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aStackedTrack);
|
||||
|
||||
G4StackedTrack();
|
||||
G4StackedTrack(G4Track * aTrack);
|
||||
~G4StackedTrack();
|
||||
|
||||
const G4StackedTrack & operator=(const G4StackedTrack &right);
|
||||
int operator==(const G4StackedTrack &right) const;
|
||||
int operator!=(const G4StackedTrack &right) const;
|
||||
|
||||
private:
|
||||
G4double priorityWeight;
|
||||
G4Track *track;
|
||||
G4StackedTrack * previousStackedTrack;
|
||||
G4StackedTrack * nextStackedTrack;
|
||||
|
||||
public:
|
||||
inline G4double GetPriorityWeight() const
|
||||
{ return priorityWeight; };
|
||||
inline void SetPriorityWeight(const G4double value)
|
||||
{ priorityWeight = value; };
|
||||
inline G4Track * GetTrack() const
|
||||
{ return track; };
|
||||
inline G4StackedTrack * GetPrevious() const
|
||||
{ return previousStackedTrack; };
|
||||
inline G4StackedTrack * GetNext() const
|
||||
{ return nextStackedTrack; };
|
||||
inline void SetPrevious(G4StackedTrack * value)
|
||||
{ previousStackedTrack = value; };
|
||||
inline void SetNext(G4StackedTrack * value)
|
||||
{ nextStackedTrack = value; };
|
||||
};
|
||||
|
||||
extern G4Allocator<G4StackedTrack> aStackedTrackAllocator;
|
||||
|
||||
inline void * G4StackedTrack::operator new(size_t)
|
||||
{
|
||||
void * aStackedTrack;
|
||||
aStackedTrack = (void *) aStackedTrackAllocator.MallocSingle();
|
||||
return aStackedTrack;
|
||||
}
|
||||
|
||||
inline void G4StackedTrack::operator delete(void * aStackedTrack)
|
||||
{
|
||||
aStackedTrackAllocator.FreeSingle((G4StackedTrack *) aStackedTrack);
|
||||
}
|
||||
|
||||
|
||||
#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: G4StackingMessenger.hh,v 2.2 1998/07/12 03:42:17 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef G4StackingMessenger_h
|
||||
#define G4StackingMessenger_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
class G4StackManager;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithoutParameter;
|
||||
class G4UIcmdWithAnInteger;
|
||||
|
||||
class G4StackingMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
G4StackingMessenger(G4StackManager* fCont);
|
||||
~G4StackingMessenger();
|
||||
void SetNewValue(G4UIcommand * command,G4String newValues);
|
||||
private:
|
||||
G4StackManager * fContainer;
|
||||
G4UIdirectory* stackDir;
|
||||
G4UIcmdWithoutParameter* statusCmd;
|
||||
G4UIcmdWithAnInteger* clearCmd;
|
||||
};
|
||||
|
||||
#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: G4TrackStack.hh,v 2.1 1998/07/12 02:53:55 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 09/Dec/96 M.Asai
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4TrackStack_h
|
||||
#define G4TrackStack_h 1
|
||||
|
||||
#include "G4StackedTrack.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4TrackStack
|
||||
{
|
||||
public:
|
||||
G4TrackStack();
|
||||
~G4TrackStack();
|
||||
|
||||
private:
|
||||
const G4TrackStack & operator=
|
||||
(const G4TrackStack &right);
|
||||
int operator==(const G4TrackStack &right) const;
|
||||
int operator!=(const G4TrackStack &right) const;
|
||||
|
||||
public:
|
||||
void PushToStack(G4StackedTrack * aStackedTrack);
|
||||
G4StackedTrack * PopFromStack();
|
||||
void GrabFromStack(G4StackedTrack * aStackedTrack);
|
||||
void clear();
|
||||
void TransferTo(G4TrackStack * aStack);
|
||||
|
||||
private:
|
||||
G4int n_stackedTrack;
|
||||
G4StackedTrack * firstStackedTrack;
|
||||
G4StackedTrack * lastStackedTrack;
|
||||
|
||||
public:
|
||||
inline G4int GetNTrack() const
|
||||
{ return n_stackedTrack; };
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// 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: G4TrajectoryContainer.hh,v 2.0 1998/07/02 16:53:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// G4TrajectoryContainer
|
||||
//
|
||||
|
||||
#ifndef G4TrajectoryContainer_h
|
||||
#define G4TrajectoryContainer_h 1
|
||||
|
||||
// TrackManagement
|
||||
#include "G4Trajectory.hh"
|
||||
// RWTPtrOrderedVector
|
||||
#include <rw/tpordvec.h>
|
||||
|
||||
typedef RWTPtrOrderedVector<G4Trajectory> G4TrajectoryContainer;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
// 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: G4UserEventAction.hh,v 2.1 1998/07/12 02:53:56 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef G4UserEventAction_h
|
||||
#define G4UserEventAction_h 1
|
||||
|
||||
class G4EventManager;
|
||||
|
||||
class G4UserEventAction
|
||||
{
|
||||
public:
|
||||
virtual ~G4UserEventAction()
|
||||
{;}
|
||||
inline void SetEventManager(G4EventManager* value)
|
||||
{ fpEventManager = value; };
|
||||
virtual void BeginOfEventAction();
|
||||
virtual void EndOfEventAction();
|
||||
protected:
|
||||
G4EventManager* fpEventManager;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
// 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: G4UserStackingAction.hh,v 2.1 1998/07/12 02:53:56 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 09/Dec/96 M.Asai
|
||||
//
|
||||
|
||||
#ifndef G4UserStackingAction_h
|
||||
#define G4UserStackingAction_h 1
|
||||
|
||||
class G4StackManager;
|
||||
class G4Track;
|
||||
#include "G4ClassificationOfNewTrack.hh"
|
||||
|
||||
class G4UserStackingAction
|
||||
{
|
||||
public:
|
||||
G4UserStackingAction();
|
||||
virtual ~G4UserStackingAction();
|
||||
protected:
|
||||
G4StackManager * stackManager;
|
||||
public:
|
||||
inline void SetStackManager(G4StackManager * value)
|
||||
{ stackManager = value; };
|
||||
|
||||
public:
|
||||
//---------------------------------------------------------------
|
||||
// vitual methods to be implemented by user
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
virtual G4ClassificationOfNewTrack
|
||||
ClassifyNewTrack(G4Track *const aTrack);
|
||||
//
|
||||
// Reply G4ClassificationOfNewTrack determined by the
|
||||
// newly coming G4Track.
|
||||
//
|
||||
// enum G4ClassificationOfNewTrack
|
||||
// {
|
||||
// fUrgent, // put into the urgent stack
|
||||
// fWaiting, // put into the waiting stack
|
||||
// fPostpone, // postpone to the next event
|
||||
// fKill // kill without stacking
|
||||
// };
|
||||
//
|
||||
// The parent_ID of the track indicates the origin of it.
|
||||
//
|
||||
// G4int parent_ID = aTrack->get_parentID();
|
||||
//
|
||||
// parent_ID = 0 : primary particle
|
||||
// > 0 : secondary particle
|
||||
// < 0 : postponed from the previous event
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
virtual void NewStage();
|
||||
//
|
||||
// This method is called by G4StackManager when the urgentStack
|
||||
// becomes empty and contents in the waitingStack are transtered
|
||||
// to the urgentStack.
|
||||
// Note that this method is not called at the begining of each
|
||||
// event, but "PrepareNewEvent" is called.
|
||||
//
|
||||
// In case re-classification of the stacked tracks is needed,
|
||||
// use the following method to request to G4StackManager.
|
||||
//
|
||||
// stackManager->ReClassify();
|
||||
//
|
||||
// All of the stacked tracks in the waitingStack will be re-classified
|
||||
// by "ClassifyNewTrack" method.
|
||||
// To abort current event, use the following method.
|
||||
//
|
||||
// stackManager->clear();
|
||||
//
|
||||
// Note that this way is valid and safe only for the case it is called
|
||||
// from this user class. The more global way of event abortion is
|
||||
//
|
||||
// G4UImanager * UImanager = G4UImanager::GetUIpointer();
|
||||
// UImanager->ApplyCommand("/event/abort");
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
virtual void PrepareNewEvent();
|
||||
//
|
||||
// This method is called by G4StackManager at the begining of
|
||||
// each event.
|
||||
// Be careful that the urgentStack and the waitingStack of
|
||||
// G4StackManager are empty at this moment, because this method
|
||||
// is called before accepting primary particles. Also, note that
|
||||
// the postponeStack of G4StackManager may have some postponed
|
||||
// tracks.
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// 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: G4VPrimaryGenerator.hh,v 2.1 1998/07/12 02:53:57 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VPrimaryGenerator_h
|
||||
#define G4VPrimaryGenerator_h 1
|
||||
|
||||
class G4Event;
|
||||
|
||||
class G4VPrimaryGenerator
|
||||
{
|
||||
public:
|
||||
G4VPrimaryGenerator();
|
||||
virtual ~G4VPrimaryGenerator();
|
||||
|
||||
virtual void GeneratePrimaryVertex(G4Event* evt) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// 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: eventgendefs.hh,v 2.0 1998/07/02 16:53:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
#ifndef EventGenerator_DEBUG
|
||||
#define EventGenerator_DEBUG
|
||||
@@ -0,0 +1,19 @@
|
||||
// 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: evmandefs.hh,v 2.0 1998/07/02 16:53:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
///#define G4EVENTMANAGER_DEBUG 1
|
||||
///#define G4EVENTMANAGER_DEBUG_0 1
|
||||
#ifdef G4EVENTMANAGER_DEBUG
|
||||
#define G4EVENTMANAGER_DEBUG_0 1
|
||||
#endif
|
||||
|
||||
#include "trajectoryControl.hh"
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// 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: trajectoryControl.hh,v 2.1 1998/10/10 10:51:20 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
////#define G4_STORE_TRAJECTORY 1
|
||||
|
||||
//#ifdef G4VISUALIZE
|
||||
//#ifndef G4_STORE_TRAJECTORY
|
||||
//#define G4_STORE_TRAJECTORY 1
|
||||
//#endif
|
||||
//#endif
|
||||
Reference in New Issue
Block a user