Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 2.2 1998/11/18 17:46:01 kurasige Exp $
|
||||
# $Id: GNUmakefile,v 1.1 1999/01/07 16:14:28 gunter Exp $
|
||||
# ----------------------------------------------------------
|
||||
# GNUmakefile for tracking library. Katsuya Amako, 5/9/95.
|
||||
# ----------------------------------------------------------
|
||||
|
||||
+10
-1
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 2.5 1998/11/25 06:12:53 tsasaki Exp $
|
||||
$Id: History,v 1.5 1999/06/29 16:20:22 gunter Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,6 +16,15 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
Jun 29, 99 G.Folger have the ctor always assign a SteppingVerbose to fVerbose
|
||||
Apr 15, 99 M.Asai (tracking-01-00-03)
|
||||
- Make arguments in user action classes take const pointers.
|
||||
- Make trajectory and trajectory point as derivable classes.
|
||||
Mar 23, 99 T.Sasaki (tracking-01-00-02)
|
||||
- Fix for precision problem of safety in SteppingManager by John Apostolakis
|
||||
- G4VSteppingVerbose is introduced
|
||||
Feb 18, 99 T.Sasaki (tracking-01-00-01)
|
||||
- ShowStep() method was moved from G4Step to G4SteppingVerbose
|
||||
Nov 25, 98 T.Sasaki (tracking-00-04-03)
|
||||
- Fix to G4SteppingManager.cc to set proper 2ndary numbers.
|
||||
Nov 17 ,98 H.Kurashige (tracking-00-04-01)
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SteppingManager.hh,v 2.4 1998/08/26 01:55:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4SteppingManager.hh,v 1.3 1999/04/16 02:14:50 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -93,6 +93,7 @@ class G4SteppingManager
|
||||
void SetUserAction(G4UserSteppingAction* apAction);
|
||||
G4Track* GetTrack() const;
|
||||
void SetVerboseLevel(G4int vLevel);
|
||||
void SetVerbose(G4VSteppingVerbose*);
|
||||
G4Step* GetStep() const;
|
||||
|
||||
|
||||
@@ -194,7 +195,7 @@ class G4SteppingManager
|
||||
|
||||
G4UserSteppingAction* fUserSteppingAction;
|
||||
|
||||
G4SteppingVerbose* fVerbose;
|
||||
G4VSteppingVerbose* fVerbose;
|
||||
|
||||
G4double PhysicalStep;
|
||||
G4double GeometricalStep;
|
||||
@@ -488,6 +489,10 @@ class G4SteppingManager
|
||||
verboseLevel = vLevel;
|
||||
}
|
||||
|
||||
inline void G4SteppingManager::SetVerbose(G4VSteppingVerbose* yourVerbose){
|
||||
fVerbose = yourVerbose;
|
||||
}
|
||||
|
||||
inline G4Step* G4SteppingManager::GetStep() const {
|
||||
return fStep;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SteppingManager.icc,v 2.5 1998/11/18 17:46:43 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4SteppingManager.icc,v 1.2 1999/03/24 04:42:35 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SteppingVerbose.hh,v 2.2 1998/08/26 02:36:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4SteppingVerbose.hh,v 1.3 1999/03/24 04:42:47 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -34,28 +34,25 @@ class G4SteppingVerbose;
|
||||
#include <iomanip.h>
|
||||
|
||||
#include "globals.hh" // Include from 'global'
|
||||
#include "G4Navigator.hh" // Include from 'geometry'
|
||||
#include "G4LogicalVolume.hh" // Include from 'geometry'
|
||||
#include "G4VPhysicalVolume.hh" // Include from 'geometry'
|
||||
class G4Navigator;
|
||||
class G4VPhysicalVolume;
|
||||
#include "G4VSensitiveDetector.hh" // Include from 'hits/digi'
|
||||
#include "G4ProcessManager.hh" // Include from 'piim'
|
||||
class G4SteppingManager; // Include from 'tracking'
|
||||
#include "G4Track.hh" // Include from 'tracking'
|
||||
#include "G4TrackVector.hh" // Include from 'tracking'
|
||||
#include "G4TrackStatus.hh" // Include from 'tracking'
|
||||
class G4Track;
|
||||
#include "G4StepStatus.hh" // Include from 'tracking'
|
||||
#include "G4UserSteppingAction.hh" // Include from 'tracking'
|
||||
#include "G4Step.hh" // Include from 'tracking'
|
||||
#include "G4StepPoint.hh" // Include from 'tracking'
|
||||
#include "G4VTouchable.hh" // Include from 'geometry'
|
||||
#include "G4TouchableHistory.hh" // Include from 'geometry'
|
||||
class G4UserSteppingAction;
|
||||
class G4StepPoint;
|
||||
class G4VTouchable;
|
||||
#include "G4VSteppingVerbose.hh"
|
||||
|
||||
|
||||
class G4SteppingVerbose{
|
||||
class G4SteppingVerbose : public G4VSteppingVerbose {
|
||||
public:
|
||||
// Constructor/Destructor
|
||||
G4SteppingVerbose();
|
||||
G4SteppingVerbose(G4SteppingManager*);
|
||||
// G4SteppingVerbose();
|
||||
G4SteppingVerbose(G4SteppingManager* const );
|
||||
~G4SteppingVerbose();
|
||||
//
|
||||
void NewStep();
|
||||
@@ -71,11 +68,11 @@ public:
|
||||
void DPSLUserLimit();
|
||||
void DPSLPostStep();
|
||||
void DPSLAlongStep();
|
||||
void DPSLAlongStepDoItOneByOne();
|
||||
void DPSLPostStepDoItOneByOne();
|
||||
// void DPSLAlongStepDoItOneByOne();
|
||||
// void DPSLPostStepDoItOneByOne();
|
||||
void VerboseTrack();
|
||||
void VerboseParticleChange();
|
||||
|
||||
void ShowStep() const;
|
||||
//
|
||||
// Member data
|
||||
private:
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrackVector.hh,v 2.2 1998/08/26 01:55:48 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4TrackVector.hh,v 1.2 1999/03/24 04:43:04 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrackingManager.hh,v 2.1 1998/07/12 03:09:00 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4TrackingManager.hh,v 1.3 1999/04/15 08:47:07 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -38,7 +38,7 @@ class G4TrackingManager;
|
||||
#include "G4StepStatus.hh" // Include from 'tracking'
|
||||
#include "G4UserTrackingAction.hh" // Include from 'tracking'
|
||||
#include "G4UserSteppingAction.hh" // Include from 'tracking'
|
||||
#include "G4Trajectory.hh" // Include from 'tracking'
|
||||
#include "G4VTrajectory.hh" // Include from 'tracking'
|
||||
|
||||
|
||||
////////////////////////
|
||||
@@ -72,7 +72,8 @@ class G4TrackingManager
|
||||
|
||||
G4UserTrackingAction* GetUserTrackingAction() const;
|
||||
|
||||
G4Trajectory* GimmeTrajectory() const;
|
||||
G4VTrajectory* GimmeTrajectory() const;
|
||||
void SetTrajectory(G4VTrajectory* aTrajectory);
|
||||
|
||||
G4TrackVector* GimmeSecondaries() const;
|
||||
|
||||
@@ -84,6 +85,7 @@ class G4TrackingManager
|
||||
void SetVerboseLevel(G4int vLevel);
|
||||
G4int GetVerboseLevel() const;
|
||||
|
||||
|
||||
// Other member functions
|
||||
|
||||
void ProcessOneTrack(G4Track* apValueG4Track);
|
||||
@@ -112,7 +114,7 @@ class G4TrackingManager
|
||||
G4Track* fpTrack;
|
||||
G4SteppingManager* fpSteppingManager;
|
||||
G4UserTrackingAction* fpUserTrackingAction;
|
||||
G4Trajectory* fpTrajectory;
|
||||
G4VTrajectory* fpTrajectory;
|
||||
G4bool StoreTrajectory;
|
||||
G4int verboseLevel;
|
||||
|
||||
@@ -145,7 +147,7 @@ class G4TrackingManager
|
||||
return fpUserTrackingAction;
|
||||
}
|
||||
|
||||
inline G4Trajectory* G4TrackingManager::GimmeTrajectory() const {
|
||||
inline G4VTrajectory* G4TrackingManager::GimmeTrajectory() const {
|
||||
return fpTrajectory ;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrackingMessenger.hh,v 2.3 1998/07/12 03:55:58 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4TrackingMessenger.hh,v 1.2 1999/03/24 04:44:17 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Trajectory.hh,v 2.2 1998/07/13 17:28:53 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4Trajectory.hh,v 1.5 1999/05/25 21:04:22 stesting Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -34,9 +34,11 @@ class G4Trajectory;
|
||||
#ifndef G4Trajectory_h
|
||||
#define G4Trajectory_h 1
|
||||
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include <stdlib.h> // Include from 'system'
|
||||
#include "G4ios.hh" // Include from 'system'
|
||||
#include <rw/tvordvec.h> // RWTValOrderedVector
|
||||
#include <rw/tpordvec.h> // RWTValOrderedVector
|
||||
#include "globals.hh" // Include from 'global'
|
||||
#include "G4ParticleDefinition.hh" // Include from 'particle+matter'
|
||||
#include "G4TrajectoryPoint.hh" // Include from 'tracking'
|
||||
@@ -46,7 +48,7 @@ class G4Trajectory;
|
||||
class G4Polyline; // Forward declaration.
|
||||
|
||||
///////////////////
|
||||
class G4Trajectory
|
||||
class G4Trajectory : public G4VTrajectory
|
||||
///////////////////
|
||||
{
|
||||
|
||||
@@ -55,12 +57,18 @@ class G4Trajectory
|
||||
//--------
|
||||
|
||||
// Constructor/Destrcutor
|
||||
G4Trajectory(G4Track* aTrack);
|
||||
|
||||
G4Trajectory();
|
||||
|
||||
G4Trajectory(const G4Track* aTrack);
|
||||
G4Trajectory(G4Trajectory &);
|
||||
~G4Trajectory();
|
||||
virtual ~G4Trajectory();
|
||||
|
||||
// Operators
|
||||
inline int operator == (const G4Trajectory& right){return (this==&right);};
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
inline int operator == (const G4Trajectory& right) const
|
||||
{return (this==&right);}
|
||||
|
||||
// Get/Set functions
|
||||
inline G4int GetTrackID() const
|
||||
@@ -75,12 +83,12 @@ class G4Trajectory
|
||||
{ return PDGEncoding; }
|
||||
|
||||
// Other member functions
|
||||
void ShowTrajectory();
|
||||
// Print all information of the trajectory to stdout
|
||||
|
||||
void DrawTrajectory(G4int i_mode=0);
|
||||
|
||||
void AppendStep(G4Step* aStep);
|
||||
virtual void ShowTrajectory() const;
|
||||
virtual void DrawTrajectory(G4int i_mode=0) const;
|
||||
virtual void AppendStep(const G4Step* aStep);
|
||||
virtual int GetPointEntries() const { return positionRecord->entries(); }
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
{ return (*positionRecord)[i]; }
|
||||
|
||||
G4ParticleDefinition* GetParticleDefinition();
|
||||
|
||||
@@ -88,7 +96,7 @@ class G4Trajectory
|
||||
private:
|
||||
//---------
|
||||
|
||||
RWTValOrderedVector<G4TrajectoryPoint> positionRecord;
|
||||
RWTPtrOrderedVector<G4VTrajectoryPoint>* positionRecord;
|
||||
G4int fTrackID;
|
||||
G4int fParentID;
|
||||
G4String ParticleName;
|
||||
@@ -97,6 +105,20 @@ class G4Trajectory
|
||||
|
||||
};
|
||||
|
||||
extern G4Allocator<G4Trajectory> aTrajectoryAllocator;
|
||||
|
||||
inline void* G4Trajectory::operator new(size_t)
|
||||
{
|
||||
void* aTrajectory;
|
||||
aTrajectory = (void*)aTrajectoryAllocator.MallocSingle();
|
||||
return aTrajectory;
|
||||
}
|
||||
|
||||
inline void G4Trajectory::operator delete(void* aTrajectory)
|
||||
{
|
||||
aTrajectoryAllocator.FreeSingle((G4Trajectory*)aTrajectory);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrajectoryPoint.hh,v 2.1 1998/07/12 03:09:01 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4TrajectoryPoint.hh,v 1.3 1999/04/15 08:47:08 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -29,18 +29,17 @@
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
class G4TrajectoryPoint;
|
||||
|
||||
#ifndef G4TrajectoryPoint_h
|
||||
#define G4TrajectoryPoint_h 1
|
||||
|
||||
#include "G4VTrajectoryPoint.hh"
|
||||
#include "globals.hh" // Include from 'global'
|
||||
#include "G4ThreeVector.hh" // Include from 'geometry'
|
||||
#include "G4Allocator.hh" // Include from 'particle+matter'
|
||||
|
||||
|
||||
////////////////////////
|
||||
class G4TrajectoryPoint
|
||||
class G4TrajectoryPoint : public G4VTrajectoryPoint
|
||||
////////////////////////
|
||||
{
|
||||
|
||||
@@ -52,7 +51,7 @@ class G4TrajectoryPoint
|
||||
G4TrajectoryPoint();
|
||||
G4TrajectoryPoint(G4ThreeVector pos);
|
||||
G4TrajectoryPoint(const G4TrajectoryPoint &right);
|
||||
~G4TrajectoryPoint();
|
||||
virtual ~G4TrajectoryPoint();
|
||||
|
||||
// Operators
|
||||
inline void *operator new(size_t);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserSteppingAction.hh,v 2.0 1998/07/02 17:29:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4UserSteppingAction.hh,v 1.3 1999/04/15 08:47:09 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -24,13 +24,10 @@
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
class G4UserSteppingAction;
|
||||
|
||||
#ifndef G4UserSteppingAction_h
|
||||
#define G4UserSteppingAction_h 1
|
||||
|
||||
#include "globals.hh" // Include from 'global'
|
||||
#include "G4Track.hh" // Include from 'tracking'
|
||||
class G4Step;
|
||||
class G4SteppingManager; // Forward declaration
|
||||
|
||||
///////////////////////////
|
||||
@@ -43,28 +40,16 @@ class G4UserSteppingAction
|
||||
//--------
|
||||
|
||||
// Constructor and destructors
|
||||
G4UserSteppingAction(){}
|
||||
virtual ~G4UserSteppingAction(){}
|
||||
G4UserSteppingAction(){;}
|
||||
virtual ~G4UserSteppingAction(){;}
|
||||
|
||||
// Member functions
|
||||
void SetSteppingManagerPointer(G4SteppingManager* pValue);
|
||||
virtual void UserSteppingAction(){}
|
||||
virtual void UserSteppingAction(const G4Step* aStep){;}
|
||||
|
||||
//-----------
|
||||
//-----------
|
||||
protected:
|
||||
//-----------
|
||||
|
||||
// Member functions
|
||||
inline const G4SteppingManager* GetSteppingManager() {
|
||||
return fpSteppingManager;
|
||||
}
|
||||
inline G4SteppingManager* GetOmnipotentSteppingManager() {
|
||||
return fpSteppingManager;
|
||||
}
|
||||
|
||||
//---------
|
||||
private:
|
||||
//---------
|
||||
//-----------
|
||||
|
||||
// Member data
|
||||
G4SteppingManager* fpSteppingManager;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserTrackingAction.hh,v 2.0 1998/07/02 17:29:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4UserTrackingAction.hh,v 1.3 1999/04/15 08:47:10 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -30,6 +30,7 @@ class G4UserTrackingAction;
|
||||
#define G4UserTrackingAction_h 1
|
||||
|
||||
class G4TrackingManager; // Forward declaration
|
||||
class G4Track;
|
||||
|
||||
///////////////////////////
|
||||
class G4UserTrackingAction
|
||||
@@ -41,30 +42,18 @@ class G4UserTrackingAction
|
||||
//--------
|
||||
|
||||
// Constructor & Destructor
|
||||
G4UserTrackingAction(){};
|
||||
virtual ~G4UserTrackingAction(){}
|
||||
G4UserTrackingAction(){;}
|
||||
virtual ~G4UserTrackingAction(){;}
|
||||
|
||||
// Member functions
|
||||
void SetTrackingManagerPointer(G4TrackingManager* pValue);
|
||||
virtual void PreUserTrackingAction(){}
|
||||
virtual void PostUserTrackingAction(){}
|
||||
virtual void PreUserTrackingAction(const G4Track* aTrack){;}
|
||||
virtual void PostUserTrackingAction(const G4Track* aTrack){;}
|
||||
|
||||
//-----------
|
||||
protected:
|
||||
//-----------
|
||||
|
||||
// Member functions
|
||||
inline const G4TrackingManager* GetTrackingManager() {
|
||||
return fpTrackingManager;
|
||||
}
|
||||
inline G4TrackingManager* GetOmnipotentTrackingManager() {
|
||||
return fpTrackingManager;
|
||||
}
|
||||
|
||||
//---------
|
||||
private:
|
||||
//---------
|
||||
|
||||
// Member data
|
||||
G4TrackingManager* fpTrackingManager;
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
// 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: G4VSteppingVerbose.hh,v 1.1 1999/03/24 04:45:47 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4VSteppingVerbose.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)
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
#ifndef G4VSteppingVerbose_h
|
||||
#define G4VSteppingVerbose_h
|
||||
class G4SteppingManager;
|
||||
|
||||
class G4VSteppingVerbose{
|
||||
|
||||
public:
|
||||
// Constructor/Destructor
|
||||
G4VSteppingVerbose();
|
||||
G4VSteppingVerbose(G4SteppingManager*);
|
||||
virtual ~G4VSteppingVerbose();
|
||||
//
|
||||
virtual void NewStep() = 0;
|
||||
virtual void CopyState() = 0;
|
||||
virtual void AtRestDoItInvoked() = 0;
|
||||
virtual void AlongStepDoItAllDone() = 0;
|
||||
virtual void PostStepDoItAllDone() = 0;
|
||||
virtual void AlongStepDoItOneByOne() = 0;
|
||||
virtual void PostStepDoItOneByOne() = 0;
|
||||
virtual void StepInfo() = 0;
|
||||
virtual void TrackingStarted() = 0;
|
||||
virtual void DPSLStarted() = 0;
|
||||
virtual void DPSLUserLimit() = 0;
|
||||
virtual void DPSLPostStep() = 0;
|
||||
virtual void DPSLAlongStep() = 0;
|
||||
// virtual void DPSLAlongStepDoItOneByOne() = 0;
|
||||
// virtual void DPSLPostStepDoItOneByOne() = 0;
|
||||
virtual void VerboseTrack() = 0;
|
||||
virtual void VerboseParticleChange() = 0;
|
||||
};
|
||||
#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: G4VTrajectory.hh,v 1.1 1999/04/15 08:47:10 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4VTrajectory.hh
|
||||
//
|
||||
// Description:
|
||||
// This is the abstract base class of a trajectory.
|
||||
//
|
||||
// Contact:
|
||||
// Questions and comments to this code should be sent to
|
||||
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
|
||||
// Makoto Asai (e-mail: asai@kekvax.kek.jp)
|
||||
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
#ifndef G4VTrajectory_h
|
||||
#define G4VTrajectory_h 1
|
||||
|
||||
class G4Step;
|
||||
#include "G4VTrajectoryPoint.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VTrajectory
|
||||
{
|
||||
public:
|
||||
|
||||
G4VTrajectory() {;}
|
||||
virtual ~G4VTrajectory() {;}
|
||||
|
||||
inline int operator == (const G4VTrajectory& right){return (this==&right);}
|
||||
|
||||
virtual void ShowTrajectory() const = 0;
|
||||
virtual void DrawTrajectory(G4int i_mode=0) const = 0;
|
||||
virtual void AppendStep(const G4Step*) = 0;
|
||||
virtual int GetPointEntries() const = 0;
|
||||
virtual G4VTrajectoryPoint* GetPoint(int) const = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// 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: G4VTrajectoryPoint.hh,v 1.1 1999/04/15 08:47:11 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
|
||||
#ifndef G4VTrajectoryPoint_h
|
||||
#define G4VTrajectoryPoint_h 1
|
||||
|
||||
class G4VTrajectoryPoint
|
||||
{
|
||||
public:
|
||||
|
||||
G4VTrajectoryPoint() {;}
|
||||
virtual ~G4VTrajectoryPoint() {;}
|
||||
|
||||
inline int operator==(const G4VTrajectoryPoint& right) const
|
||||
{ return (this==&right); }
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SteppingManager.cc,v 2.4 1998/11/25 05:50:44 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4SteppingManager.cc,v 1.5 1999/06/29 16:16:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -141,6 +141,7 @@ G4StepStatus G4SteppingManager::Stepping()
|
||||
// Store the Step length (geometrical length) to G4Step and G4Track
|
||||
fStep->SetStepLength( PhysicalStep );
|
||||
fTrack->SetStepLength( PhysicalStep );
|
||||
G4double GeomStepLength = PhysicalStep;
|
||||
|
||||
// Store StepStatus to PostStepPoint
|
||||
fStep->GetPostStepPoint()->SetStepStatus( fStepStatus );
|
||||
@@ -153,11 +154,7 @@ G4StepStatus G4SteppingManager::Stepping()
|
||||
|
||||
// Update safety after invocation of all AlongStepDoIts
|
||||
endpointSafOrigin= fPostStepPoint->GetPosition();
|
||||
endpointSafety= max( proposedSafety -
|
||||
(fPostStepPoint->GetPosition() -
|
||||
fPreStepPoint->GetPosition()
|
||||
).mag(),
|
||||
0.);
|
||||
endpointSafety= max( proposedSafety - GeomStepLength, 0.);
|
||||
|
||||
fStep->GetPostStepPoint()->SetSafety( endpointSafety );
|
||||
|
||||
@@ -200,7 +197,7 @@ G4StepStatus G4SteppingManager::Stepping()
|
||||
// User intervention process.
|
||||
fStep->SetTrack(fTrack);
|
||||
if( fUserSteppingAction != NULL ) {
|
||||
fUserSteppingAction->UserSteppingAction();
|
||||
fUserSteppingAction->UserSteppingAction(fStep);
|
||||
}
|
||||
|
||||
// Stepping process finish. Return the value of the StepStatus.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SteppingVerbose.cc,v 2.8 1998/11/05 17:13:44 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4SteppingVerbose.cc,v 1.3 1999/03/24 04:46:27 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -34,12 +34,12 @@
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
G4SteppingVerbose::G4SteppingVerbose()
|
||||
//G4SteppingVerbose::G4SteppingVerbose()
|
||||
//////////////////////////////////////////////////
|
||||
{
|
||||
}
|
||||
//{
|
||||
//}
|
||||
//////////////////////////////////////////////////
|
||||
G4SteppingVerbose::G4SteppingVerbose(G4SteppingManager* fMan)
|
||||
G4SteppingVerbose::G4SteppingVerbose(G4SteppingManager* const fMan)
|
||||
:fManager(fMan)
|
||||
//////////////////////////////////////////////////
|
||||
{
|
||||
@@ -190,7 +190,7 @@ void G4SteppingVerbose::AtRestDoItInvoked()
|
||||
}
|
||||
|
||||
if( verboseLevel >= 4 ){
|
||||
fStep->ShowStep();
|
||||
ShowStep();
|
||||
G4cout << endl;
|
||||
}
|
||||
}
|
||||
@@ -215,7 +215,7 @@ void G4SteppingVerbose::AlongStepDoItAllDone()
|
||||
}
|
||||
}
|
||||
|
||||
fStep->ShowStep();
|
||||
ShowStep();
|
||||
G4cout << endl;
|
||||
G4cout << " ++List of secondaries generated "
|
||||
<< "(x,y,z,kE,t,PID):"
|
||||
@@ -275,7 +275,7 @@ void G4SteppingVerbose::PostStepDoItAllDone()
|
||||
}
|
||||
}
|
||||
|
||||
fStep->ShowStep();
|
||||
ShowStep();
|
||||
G4cout << endl;
|
||||
G4cout << " ++List of secondaries generated "
|
||||
<< "(x,y,z,kE,t,PID):"
|
||||
@@ -411,57 +411,6 @@ void G4SteppingVerbose::StepInfo()
|
||||
G4cout.precision(prec);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////
|
||||
void G4SteppingVerbose::TrackingStarted()
|
||||
////////////////////////////////////////////////
|
||||
{
|
||||
|
||||
CopyState();
|
||||
G4int prec = G4cout.precision(3);
|
||||
if( verboseLevel > 0 ){
|
||||
|
||||
#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
|
||||
G4cout << setw( 5) << "Step#" << " "
|
||||
<< setw( 8) << "X" << " "
|
||||
<< setw( 8) << "Y" << " "
|
||||
<< setw( 8) << "Z" << " "
|
||||
<< setw( 9) << "KineE" << " "
|
||||
<< setw( 8) << "dE" << " "
|
||||
<< setw(12) << "StepLeng" << " "
|
||||
<< setw(12) << "TrackLeng" << " "
|
||||
<< setw(12) << "NextVolume" << " "
|
||||
<< setw( 8) << "ProcName" << endl;
|
||||
#else
|
||||
G4cout << setw( 5) << "Step#" << " "
|
||||
<< setw( 8) << "X(mm)" << " "
|
||||
<< setw( 8) << "Y(mm)" << " "
|
||||
<< setw( 8) << "Z(mm)" << " "
|
||||
<< setw( 9) << "KinE(MeV)" << " "
|
||||
<< setw( 8) << "dE(MeV)" << " "
|
||||
<< setw( 8) << "StepLeng" << " "
|
||||
<< setw( 9) << "TrackLeng" << " "
|
||||
<< setw(11) << "NextVolume" << " "
|
||||
<< setw( 8) << "ProcName" << endl;
|
||||
#endif
|
||||
|
||||
G4cout << setw( 5) << fTrack->GetCurrentStepNumber() << " "
|
||||
<< setw( 8) << G4BestUnit(fTrack->GetPosition().x(),"Length")<< " "
|
||||
<< setw( 8) << G4BestUnit(fTrack->GetPosition().y(),"Length") << " "
|
||||
<< setw( 8) << G4BestUnit(fTrack->GetPosition().z(),"Length")<< " "
|
||||
<< setw( 9) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")<< " "
|
||||
<< setw( 8) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy") << " "
|
||||
<< setw( 8) << G4BestUnit(fStep->GetStepLength(),"Length")<< " "
|
||||
<< setw( 9) << G4BestUnit(fTrack->GetTrackLength(),"Length") << " ";
|
||||
|
||||
if(fTrack->GetNextVolume()){
|
||||
G4cout << setw(11) << fTrack->GetNextVolume()->GetName() << " ";
|
||||
} else {
|
||||
G4cout << setw(11) << "OutOfWorld" << " ";
|
||||
}
|
||||
G4cout << "initStep" << endl;
|
||||
}
|
||||
G4cout.precision(prec);
|
||||
}
|
||||
////////////////////////////////////////////
|
||||
void G4SteppingVerbose::DPSLStarted()
|
||||
////////////////////////////////////////////
|
||||
@@ -537,6 +486,59 @@ void G4SteppingVerbose::DPSLAlongStep()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////
|
||||
void G4SteppingVerbose::TrackingStarted()
|
||||
////////////////////////////////////////////////
|
||||
{
|
||||
|
||||
CopyState();
|
||||
G4int prec = G4cout.precision(3);
|
||||
if( verboseLevel > 0 ){
|
||||
|
||||
#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
|
||||
G4cout << setw( 5) << "Step#" << " "
|
||||
<< setw( 8) << "X" << " "
|
||||
<< setw( 8) << "Y" << " "
|
||||
<< setw( 8) << "Z" << " "
|
||||
<< setw( 9) << "KineE" << " "
|
||||
<< setw( 8) << "dE" << " "
|
||||
<< setw(12) << "StepLeng" << " "
|
||||
<< setw(12) << "TrackLeng" << " "
|
||||
<< setw(12) << "NextVolume" << " "
|
||||
<< setw( 8) << "ProcName" << endl;
|
||||
#else
|
||||
G4cout << setw( 5) << "Step#" << " "
|
||||
<< setw( 8) << "X(mm)" << " "
|
||||
<< setw( 8) << "Y(mm)" << " "
|
||||
<< setw( 8) << "Z(mm)" << " "
|
||||
<< setw( 9) << "KinE(MeV)" << " "
|
||||
<< setw( 8) << "dE(MeV)" << " "
|
||||
<< setw( 8) << "StepLeng" << " "
|
||||
<< setw( 9) << "TrackLeng" << " "
|
||||
<< setw(11) << "NextVolume" << " "
|
||||
<< setw( 8) << "ProcName" << endl;
|
||||
#endif
|
||||
|
||||
G4cout << setw( 5) << fTrack->GetCurrentStepNumber() << " "
|
||||
<< setw( 8) << G4BestUnit(fTrack->GetPosition().x(),"Length")<< " "
|
||||
<< setw( 8) << G4BestUnit(fTrack->GetPosition().y(),"Length") << " "
|
||||
<< setw( 8) << G4BestUnit(fTrack->GetPosition().z(),"Length")<< " "
|
||||
<< setw( 9) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")<< " "
|
||||
<< setw( 8) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy") << " "
|
||||
<< setw( 8) << G4BestUnit(fStep->GetStepLength(),"Length")<< " "
|
||||
<< setw( 9) << G4BestUnit(fTrack->GetTrackLength(),"Length") << " ";
|
||||
|
||||
if(fTrack->GetNextVolume()){
|
||||
G4cout << setw(11) << fTrack->GetNextVolume()->GetName() << " ";
|
||||
} else {
|
||||
G4cout << setw(11) << "OutOfWorld" << " ";
|
||||
}
|
||||
G4cout << "initStep" << endl;
|
||||
}
|
||||
G4cout.precision(prec);
|
||||
}
|
||||
//////////////////////////////////////////////////////
|
||||
void G4SteppingVerbose::AlongStepDoItOneByOne()
|
||||
//////////////////////////////////////////////////////
|
||||
@@ -548,7 +550,7 @@ void G4SteppingVerbose::AlongStepDoItOneByOne()
|
||||
<< " Process Name = "
|
||||
<< fCurrentProcess->GetProcessName() << endl;
|
||||
|
||||
fStep->ShowStep();
|
||||
ShowStep();
|
||||
G4cout << " "
|
||||
<< "!Note! Safety of PostStep is only valid "
|
||||
<< "after all DoIt invocations."
|
||||
@@ -598,7 +600,7 @@ void G4SteppingVerbose::PostStepDoItOneByOne()
|
||||
<< " Process Name = "
|
||||
<< fCurrentProcess->GetProcessName() << endl;
|
||||
|
||||
fStep->ShowStep();
|
||||
ShowStep();
|
||||
G4cout << endl;
|
||||
VerboseParticleChange();
|
||||
G4cout << endl;
|
||||
@@ -807,3 +809,136 @@ void G4SteppingVerbose::VerboseParticleChange()
|
||||
G4cout << " ++G4ParticleChange Information " << endl;
|
||||
fParticleChange->DumpInfo();
|
||||
}
|
||||
/////////////////////////////////////////
|
||||
void G4SteppingVerbose::ShowStep() const
|
||||
////////////////////////////////////////
|
||||
{
|
||||
|
||||
// Show header
|
||||
G4cout << endl;
|
||||
G4cout << " ++G4Step Information " << endl;
|
||||
G4cout.precision(3);
|
||||
|
||||
// Show G4Step specific information
|
||||
G4cout << " Address of G4Track : " << fStep->GetTrack() << endl;
|
||||
G4cout << " Step Length (mm) : " << fStep->GetTrack()->GetStepLength() << endl;
|
||||
G4cout << " Energy Deposit (MeV) : " << fStep->GetTotalEnergyDeposit() << endl;
|
||||
|
||||
// Show G4StepPoint specific information
|
||||
G4cout << " -------------------------------------------------------"
|
||||
<< "----------------" << endl;
|
||||
G4cout << " StepPoint Information " << setw(20) << "PreStep"
|
||||
<< setw(20) << "PostStep" << endl;
|
||||
G4cout << " -------------------------------------------------------"
|
||||
<< "----------------" << endl;
|
||||
G4cout << " Position - x (mm) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetPosition().x()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetPosition().x() << endl;
|
||||
G4cout << " Position - y (mm) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetPosition().y()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetPosition().y() << endl;
|
||||
G4cout << " Position - z (mm) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetPosition().z()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetPosition().z() << endl;
|
||||
G4cout << " Global Time (ns) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetGlobalTime()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetGlobalTime() << endl;
|
||||
G4cout << " Local Time (ns) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetLocalTime()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetLocalTime() << endl;
|
||||
G4cout << " Proper Time (ns) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetProperTime()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetProperTime() << endl;
|
||||
G4cout << " Momentum Direct - x : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().x()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().x() << endl;
|
||||
G4cout << " Momentum Direct - y : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().y()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().y() << endl;
|
||||
G4cout << " Momentum Direct - z : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().z()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().z() << endl;
|
||||
G4cout << " Momentum - x (MeV/c): "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetMomentum().x()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetMomentum().x() << endl;
|
||||
G4cout << " Momentum - y (MeV/c): "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetMomentum().y()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetMomentum().y() << endl;
|
||||
G4cout << " Momentum - z (MeV/c): "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetMomentum().z()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetMomentum().z() << endl;
|
||||
G4cout << " Total Energy (MeV) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetTotalEnergy()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetTotalEnergy() << endl;
|
||||
G4cout << " Kinetic Energy (MeV): "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetKineticEnergy()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetKineticEnergy() << endl;
|
||||
G4cout << " Velocity (mm/ns) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetVelocity()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetVelocity() << endl;
|
||||
G4cout << " Volume Name : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetPhysicalVolume()->GetName() << endl;
|
||||
G4cout << " Safety (mm) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetSafety()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetSafety() << endl;
|
||||
G4cout << " Polarization - x : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetPolarization().x()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetPolarization().x() << endl;
|
||||
G4cout << " Polarization - y : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetPolarization().y()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetPolarization().y() << endl;
|
||||
G4cout << " Polarization - Z : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetPolarization().z()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetPolarization().z() << endl;
|
||||
G4cout << " Weight : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetWeight()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetWeight() << endl;
|
||||
G4cout << " Step Status : " ;
|
||||
G4StepStatus tStepStatus = fStep->GetPreStepPoint()->GetStepStatus();
|
||||
if( tStepStatus == fGeomBoundary ){
|
||||
G4cout << setw(20) << "Geom Limit";
|
||||
} else if ( tStepStatus == fAlongStepDoItProc ){
|
||||
G4cout << setw(20) << "AlongStep Proc.";
|
||||
} else if ( tStepStatus == fPostStepDoItProc ){
|
||||
G4cout << setw(20) << "PostStep Proc";
|
||||
} else if ( tStepStatus == fAtRestDoItProc ){
|
||||
G4cout << setw(20) << "AtRest Proc";
|
||||
} else if ( tStepStatus == fUndefined ){
|
||||
G4cout << setw(20) << "Undefined";
|
||||
}
|
||||
|
||||
tStepStatus = fStep->GetPostStepPoint()->GetStepStatus();
|
||||
if( tStepStatus == fGeomBoundary ){
|
||||
G4cout << setw(20) << "Geom Limit";
|
||||
} else if ( tStepStatus == fAlongStepDoItProc ){
|
||||
G4cout << setw(20) << "AlongStep Proc.";
|
||||
} else if ( tStepStatus == fPostStepDoItProc ){
|
||||
G4cout << setw(20) << "PostStep Proc";
|
||||
} else if ( tStepStatus == fAtRestDoItProc ){
|
||||
G4cout << setw(20) << "AtRest Proc";
|
||||
} else if ( tStepStatus == fUndefined ){
|
||||
G4cout << setw(20) << "Undefined";
|
||||
}
|
||||
|
||||
G4cout << endl;
|
||||
G4cout << " Process defined Step: " ;
|
||||
if( fStep->GetPreStepPoint()->GetProcessDefinedStep() == NULL ){
|
||||
G4cout << setw(20) << "Undefined";
|
||||
} else {
|
||||
G4cout << setw(20) << fStep->GetPreStepPoint()->GetProcessDefinedStep()
|
||||
->GetProcessName();
|
||||
}
|
||||
if( fStep->GetPostStepPoint()->GetProcessDefinedStep() == NULL){
|
||||
G4cout << setw(20) << "Undefined";
|
||||
} else {
|
||||
G4cout << setw(20) << fStep->GetPostStepPoint()->GetProcessDefinedStep()
|
||||
->GetProcessName();
|
||||
}
|
||||
|
||||
G4cout << endl;
|
||||
G4cout << " -------------------------------------------------------"
|
||||
<< "----------------" << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrackingManager.cc,v 2.4 1998/11/25 02:17:00 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4TrackingManager.cc,v 1.3 1999/04/15 08:47:22 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "G4TrackingManager.hh"
|
||||
#include "G4TrackingMessenger.hh"
|
||||
#include "G4Trajectory.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
G4TrackingMessenger * messenger;
|
||||
@@ -57,16 +58,14 @@ void G4TrackingManager::ProcessOneTrack(G4Track* apValueG4Track)
|
||||
GimmeSecondaries()->clearAndDestroy();
|
||||
|
||||
// Pre tracking user intervention process.
|
||||
fpTrajectory = NULL;
|
||||
if( fpUserTrackingAction != NULL ) {
|
||||
fpUserTrackingAction->PreUserTrackingAction();
|
||||
fpUserTrackingAction->PreUserTrackingAction(fpTrack);
|
||||
}
|
||||
#ifdef G4_STORE_TRAJECTORY
|
||||
// Construct a trajectory if it is requested
|
||||
if(StoreTrajectory) {
|
||||
fpTrajectory = new G4Trajectory(fpTrack);
|
||||
}
|
||||
else {
|
||||
fpTrajectory = NULL;
|
||||
if(StoreTrajectory&&(!fpTrajectory)) {
|
||||
fpTrajectory = new G4Trajectory(fpTrack); // default trajectory concrete class object
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -105,7 +104,7 @@ void G4TrackingManager::ProcessOneTrack(G4Track* apValueG4Track)
|
||||
|
||||
// Post tracking user intervention process.
|
||||
if( fpUserTrackingAction != NULL ) {
|
||||
fpUserTrackingAction->PostUserTrackingAction();
|
||||
fpUserTrackingAction->PostUserTrackingAction(fpTrack);
|
||||
}
|
||||
|
||||
// Destruct the trajectory if it was created
|
||||
@@ -117,6 +116,14 @@ void G4TrackingManager::ProcessOneTrack(G4Track* apValueG4Track)
|
||||
}
|
||||
}
|
||||
|
||||
void G4TrackingManager::SetTrajectory(G4VTrajectory* aTrajectory)
|
||||
{
|
||||
#ifndef G4_STORE_TRAJECTORY
|
||||
G4Exception("G4TrackingManager::SetTrajectory is invoked without G4_STORE_TRAJECTORY compilor option");
|
||||
#endif
|
||||
fpTrajectory = aTrajectory;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
void G4TrackingManager::EventAborted()
|
||||
//////////////////////////////////////
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrackingMessenger.cc,v 2.4 1998/07/13 17:28:59 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4TrackingMessenger.cc,v 1.2 1999/03/24 04:46:58 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Trajectory.cc,v 2.2 1998/07/13 17:29:00 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4Trajectory.cc,v 1.4 1999/05/25 21:04:36 stesting Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
#include "G4Trajectory.hh"
|
||||
|
||||
#include "G4TrajectoryPoint.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Polyline.hh"
|
||||
@@ -32,8 +32,23 @@
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
G4Allocator<G4Trajectory> aTrajectoryAllocator;
|
||||
|
||||
///////////////////////////////////////////
|
||||
G4Trajectory::G4Trajectory(G4Track* aTrack)
|
||||
G4Trajectory::G4Trajectory()
|
||||
///////////////////////////////////////////
|
||||
{
|
||||
G4ParticleDefinition * fpParticleDefinition = 0;
|
||||
ParticleName = "";
|
||||
PDGCharge = 0;
|
||||
PDGEncoding = 0;
|
||||
fTrackID = 0;
|
||||
fParentID = 0;
|
||||
positionRecord = 0;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////
|
||||
G4Trajectory::G4Trajectory(const G4Track* aTrack)
|
||||
///////////////////////////////////////////
|
||||
{
|
||||
G4ParticleDefinition * fpParticleDefinition = aTrack->GetDefinition();
|
||||
@@ -42,13 +57,25 @@ G4Trajectory::G4Trajectory(G4Track* aTrack)
|
||||
PDGEncoding = fpParticleDefinition->GetPDGEncoding();
|
||||
fTrackID = aTrack->GetTrackID();
|
||||
fParentID = aTrack->GetParentID();
|
||||
positionRecord.insert(aTrack->GetPosition());
|
||||
positionRecord = new RWTPtrOrderedVector<G4VTrajectoryPoint>;
|
||||
positionRecord->insert(new G4TrajectoryPoint(aTrack->GetPosition()));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////
|
||||
G4Trajectory::G4Trajectory(G4Trajectory &)
|
||||
G4Trajectory::G4Trajectory(G4Trajectory & right)
|
||||
//////////////////////////////////////////
|
||||
{
|
||||
ParticleName = right.ParticleName;
|
||||
PDGCharge = right.PDGCharge;
|
||||
PDGEncoding = right.PDGEncoding;
|
||||
fTrackID = right.fTrackID;
|
||||
fParentID = right.fParentID;
|
||||
positionRecord = new RWTPtrOrderedVector<G4VTrajectoryPoint>;
|
||||
for(int i=0;i<right.positionRecord->entries();i++)
|
||||
{
|
||||
G4TrajectoryPoint* rightPoint = (G4TrajectoryPoint*)((*(right.positionRecord))[i]);
|
||||
positionRecord->insert(new G4TrajectoryPoint(*rightPoint));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,27 +83,30 @@ G4Trajectory::G4Trajectory(G4Trajectory &)
|
||||
G4Trajectory::~G4Trajectory()
|
||||
/////////////////////////////
|
||||
{
|
||||
positionRecord->clearAndDestroy();
|
||||
delete positionRecord;
|
||||
}
|
||||
|
||||
///////////////////////////////////
|
||||
void G4Trajectory::ShowTrajectory()
|
||||
void G4Trajectory::ShowTrajectory() const
|
||||
///////////////////////////////////
|
||||
{
|
||||
G4cout << endl << "TrackID =" << fTrackID
|
||||
<< ":ParentID=" << fParentID << endl;
|
||||
G4cout << "Particle name : " << ParticleName
|
||||
<< " Charge : " << PDGCharge << endl;
|
||||
G4cout << " Current trajectory has " << positionRecord.entries()
|
||||
G4cout << " Current trajectory has " << positionRecord->entries()
|
||||
<< " points." << endl;
|
||||
|
||||
for( size_t i=0 ; i < positionRecord.entries() ; i++){
|
||||
for( size_t i=0 ; i < positionRecord->entries() ; i++){
|
||||
G4TrajectoryPoint* aTrajectoryPoint = (G4TrajectoryPoint*)((*positionRecord)[i]);
|
||||
G4cout << "Point[" << i << "]"
|
||||
<< " Position= " << positionRecord[i].GetPosition() << endl;
|
||||
<< " Position= " << aTrajectoryPoint->GetPosition() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////
|
||||
void G4Trajectory::DrawTrajectory(G4int i_mode)
|
||||
void G4Trajectory::DrawTrajectory(G4int i_mode) const
|
||||
///////////////////////////////////////////////
|
||||
{
|
||||
|
||||
@@ -86,8 +116,9 @@ void G4Trajectory::DrawTrajectory(G4int i_mode)
|
||||
if(i_mode>=0)
|
||||
{
|
||||
G4Polyline pPolyline;
|
||||
for (int i = 0; i < positionRecord.entries() ; i++) {
|
||||
pos = positionRecord[i].GetPosition();
|
||||
for (int i = 0; i < positionRecord->entries() ; i++) {
|
||||
G4TrajectoryPoint* aTrajectoryPoint = (G4TrajectoryPoint*)((*positionRecord)[i]);
|
||||
pos = aTrajectoryPoint->GetPosition();
|
||||
pPolyline.append( pos );
|
||||
}
|
||||
|
||||
@@ -106,8 +137,9 @@ void G4Trajectory::DrawTrajectory(G4int i_mode)
|
||||
|
||||
if(i_mode!=0)
|
||||
{
|
||||
for(int j=0; j<positionRecord.entries(); j++) {
|
||||
pos = positionRecord[j].GetPosition();
|
||||
for(int j=0; j<positionRecord->entries(); j++) {
|
||||
G4TrajectoryPoint* aTrajectoryPoint = (G4TrajectoryPoint*)((*positionRecord)[j]);
|
||||
pos = aTrajectoryPoint->GetPosition();
|
||||
G4Circle circle( pos );
|
||||
circle.SetScreenSize(0.001*i_mode);
|
||||
circle.SetFillStyle(G4Circle::filled);
|
||||
@@ -121,11 +153,11 @@ void G4Trajectory::DrawTrajectory(G4int i_mode)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////
|
||||
void G4Trajectory::AppendStep(G4Step* aStep)
|
||||
void G4Trajectory::AppendStep(const G4Step* aStep)
|
||||
////////////////////////////////////////////
|
||||
{
|
||||
positionRecord.append( aStep->GetPostStepPoint()->
|
||||
GetPosition() );
|
||||
positionRecord->append( new G4TrajectoryPoint(aStep->GetPostStepPoint()->
|
||||
GetPosition() ));
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrajectoryPoint.cc,v 2.0 1998/07/02 17:29:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4TrajectoryPoint.cc,v 1.2 1999/03/24 04:48:10 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserSteppingAction.cc,v 2.0 1998/07/02 17:29:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4UserSteppingAction.cc,v 1.2 1999/03/24 04:48:23 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserTrackingAction.cc,v 2.0 1998/07/02 17:29:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4UserTrackingAction.cc,v 1.2 1999/03/24 04:48:42 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
// 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: G4VSteppingVerbose.cc,v 1.1 1999/03/24 04:49:16 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4VSteppingVerbose.cc
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
#include "G4VSteppingVerbose.hh"
|
||||
|
||||
G4VSteppingVerbose::G4VSteppingVerbose(){;}
|
||||
G4VSteppingVerbose::~G4VSteppingVerbose(){;}
|
||||
|
||||
Reference in New Issue
Block a user