Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.12 2002/04/22 14:14:38 johna Exp $
|
||||
$Id: History,v 1.15 2002/12/11 16:01:24 johna Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -24,6 +24,16 @@ committal in the CVS repository !
|
||||
History file for visualization category
|
||||
---------------------------------------
|
||||
|
||||
11th December 2002 John Allison (vis-V04-01-10)
|
||||
- Fix for SUN-CC warnings: AddThis hides the virtual function...
|
||||
- Fix memory leak in RayTracer.
|
||||
|
||||
11th November 2002 Hajime Yoshida and Minamimoto (raytracer-V04-00-01)
|
||||
- Corrected G4RayTracer.cc devide-by-zero.
|
||||
|
||||
16th October 2002 John Allison (raytracer-V04-00-00)
|
||||
- Tag for changes in G4VTrajectory, etc.
|
||||
|
||||
22nd April 2002 John Allison
|
||||
- Workaround for pseudo-parallel/orthogonal projection in Ray Tracer. It is
|
||||
perspective projection with *very* small field angle (perMillion).
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RTJpeg.hh,v 1.5 2001/07/11 10:09:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RTJpegCoder.hh,v 1.5 2001/07/11 10:09:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RTJpegCoderTables.hh,v 1.5 2001/07/11 10:09:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
// class description:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RTJpegMaker.hh,v 1.5 2001/07/11 10:09:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RTMessenger.hh,v 1.4 2001/07/11 10:09:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RTOutBitStream.hh,v 1.6 2001/07/11 10:09:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RTSteppingAction.hh,v 1.4 2001/07/11 10:09:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RTTrackingAction.hh,v 1.4 2001/07/11 10:09:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RayShooter.hh,v 1.3 2001/07/11 10:09:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
// class description:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTracer.hh,v 1.8 2001/07/27 22:33:03 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTracerFeatures.hh,v 1.3 2001/07/11 10:09:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTracerSceneHandler.hh,v 1.5 2001/08/24 21:19:43 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4RayTracerSceneHandler.hh,v 1.6 2002/12/11 15:59:34 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
|
||||
// John Allison 17th March 2000
|
||||
|
||||
@@ -59,6 +59,8 @@ public:
|
||||
void AddThis(const G4Polycone&){}
|
||||
void AddThis(const G4Polyhedra&){}
|
||||
void AddThis(const G4VSolid&){}
|
||||
void AddThis(const G4VTrajectory&){}
|
||||
void AddThis(const G4VHit&){}
|
||||
|
||||
static G4int GetSceneCount();
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTracerViewer.hh,v 1.4 2001/07/11 10:09:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
|
||||
// John Allison 17th March 2000
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTrajectory.hh,v 1.8 2001/07/11 10:09:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4RayTrajectory.hh,v 1.9 2002/10/16 11:42:48 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -62,10 +62,10 @@ class G4RayTrajectory : public G4VTrajectory
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
inline int operator == (const G4RayTrajectory& right){return (this==&right);}
|
||||
// inline int operator == (const G4RayTrajectory& right){return (this==&right);}
|
||||
|
||||
virtual void AppendStep(const G4Step*);
|
||||
virtual void ShowTrajectory() const;
|
||||
virtual void ShowTrajectory(G4std::ostream&) const;
|
||||
virtual void DrawTrajectory(G4int i_mode=0) const {;}
|
||||
virtual int GetPointEntries() const {return positionRecord->size();}
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
@@ -74,6 +74,14 @@ class G4RayTrajectory : public G4VTrajectory
|
||||
{ return (*positionRecord)[i]; }
|
||||
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
|
||||
|
||||
// Get/Set functions to satisfy pure virtual functions of base class.
|
||||
inline G4int GetTrackID() const { return 0; }
|
||||
inline G4int GetParentID() const { return 0; }
|
||||
inline G4String GetParticleName() const { return ""; }
|
||||
inline G4double GetCharge() const { return 0.; }
|
||||
inline G4int GetPDGEncoding() const { return 0; }
|
||||
inline G4ThreeVector GetInitialMomentum() const { return G4ThreeVector(); }
|
||||
|
||||
private:
|
||||
|
||||
G4std::vector<G4RayTrajectoryPoint*>* positionRecord;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTrajectoryPoint.hh,v 1.4 2001/07/11 10:09:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4RayTrajectoryPoint.hh,v 1.5 2002/10/16 11:42:48 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -54,8 +54,8 @@ class G4RayTrajectoryPoint :public G4VTrajectoryPoint
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aTrajectoryPoint);
|
||||
inline int operator==(const G4RayTrajectoryPoint& right) const
|
||||
{ return (this==&right); };
|
||||
// inline int operator==(const G4RayTrajectoryPoint& right) const
|
||||
// { return (this==&right); };
|
||||
|
||||
private:
|
||||
const G4VisAttributes* preStepAtt;
|
||||
@@ -72,7 +72,9 @@ class G4RayTrajectoryPoint :public G4VTrajectoryPoint
|
||||
inline G4ThreeVector GetSurfaceNormal() const { return surfaceNormal; }
|
||||
inline void SetStepLength(G4double val) { stepLength = val; }
|
||||
inline G4double GetStepLength() const { return stepLength; }
|
||||
|
||||
|
||||
inline const G4ThreeVector GetPosition() const { return G4ThreeVector();}
|
||||
// Dummy function (not used) to satisfy base class pure virtual function.
|
||||
};
|
||||
|
||||
extern G4Allocator<G4RayTrajectoryPoint> G4RayTrajectoryPointAllocator;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VFigureFileMaker.hh,v 1.4 2001/07/11 10:09:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RTJpegCoder.cc,v 1.4 2001/07/11 10:09:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RTJpegMaker.cc,v 1.7 2001/11/22 17:29:01 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RTMessenger.cc,v 1.5 2001/07/11 10:09:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4RTMessenger.cc,v 1.6 2002/12/05 01:37:36 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -54,7 +54,7 @@ G4RTMessenger::G4RTMessenger(G4RayTracer* p1,G4RTSteppingAction* p2)
|
||||
fileCmd->SetGuidance("Define the name of output JPEG file.");
|
||||
fileCmd->SetParameterName("fileName",true);
|
||||
fileCmd->SetDefaultValue("g4RayTracer.jpeg");
|
||||
fileCmd->AvailableForStates(Idle);
|
||||
fileCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
columnCmd = new G4UIcmdWithAnInteger("/vis/rayTracer/column",this);
|
||||
columnCmd->SetGuidance("Define the number of horizontal pixels.");
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RTOutBitStream.cc,v 1.4 2001/07/11 10:09:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RTSteppingAction.cc,v 1.6 2001/07/11 10:09:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RTTrackingAction.cc,v 1.3 2001/07/11 10:09:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RayShooter.cc,v 1.2 2001/07/11 10:09:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "G4RayShooter.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTracer.cc,v 1.8 2001/07/11 10:09:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4RayTracer.cc,v 1.11 2002/12/11 16:00:00 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -84,13 +84,14 @@ G4RayTracer::~G4RayTracer()
|
||||
delete theRayTracerTrackingAction;
|
||||
delete theRayTracerSteppingAction;
|
||||
delete theMessenger;
|
||||
delete theFigMaker;
|
||||
}
|
||||
|
||||
void G4RayTracer::Trace(G4String fileName)
|
||||
{
|
||||
G4StateManager* theStateMan = G4StateManager::GetStateManager();
|
||||
G4ApplicationState currentState = theStateMan->GetCurrentState();
|
||||
if(currentState!=Idle)
|
||||
if(currentState!=G4State_Idle)
|
||||
{
|
||||
G4cerr << "Illegal application state - Trace() ignored." << G4endl;
|
||||
return;
|
||||
@@ -348,7 +349,10 @@ G4Colour G4RayTracer::Attenuate(G4RayTrajectoryPoint* point, G4Colour sourceCol)
|
||||
G4double stepAlpha = objCol.GetAlpha();
|
||||
G4double stepLength = point->GetStepLength();
|
||||
|
||||
G4double attenuationFuctor = -stepAlpha/(1.0-stepAlpha)*stepLength/attenuationLength;
|
||||
G4double attenuationFuctor;
|
||||
if(stepAlpha > 0.9999999){ stepAlpha = 0.9999999; } // patch to the next line
|
||||
attenuationFuctor = -stepAlpha/(1.0-stepAlpha)*stepLength/attenuationLength;
|
||||
|
||||
G4double KtRed = exp((1.0-stepRed)*attenuationFuctor);
|
||||
G4double KtGreen = exp((1.0-stepGreen)*attenuationFuctor);
|
||||
G4double KtBlue = exp((1.0-stepBlue)*attenuationFuctor);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTracerSceneHandler.cc,v 1.2 2001/07/11 10:09:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
|
||||
#include "G4RayTracerSceneHandler.hh"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTracerViewer.cc,v 1.10 2002/04/22 14:14:38 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
|
||||
#include "G4RayTracerViewer.hh"
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTrajectory.cc,v 1.8 2001/07/11 10:09:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4RayTrajectory.cc,v 1.9 2002/10/16 11:42:48 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -44,7 +44,6 @@
|
||||
|
||||
G4Allocator<G4RayTrajectory> G4RayTrajectoryAllocator;
|
||||
|
||||
|
||||
G4RayTrajectory :: G4RayTrajectory()
|
||||
{
|
||||
positionRecord = new G4std::vector<G4RayTrajectoryPoint*>;
|
||||
@@ -112,7 +111,7 @@ void G4RayTrajectory::AppendStep(const G4Step* aStep)
|
||||
positionRecord->push_back(trajectoryPoint);
|
||||
}
|
||||
|
||||
void G4RayTrajectory::ShowTrajectory() const
|
||||
void G4RayTrajectory::ShowTrajectory(G4std::ostream& os) const
|
||||
{ }
|
||||
|
||||
void G4RayTrajectory::MergeTrajectory(G4VTrajectory* secondTrajectory)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTrajectoryPoint.cc,v 1.3 2001/07/11 10:09:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user