Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
@@ -0,0 +1,141 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * 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: G4SmoothTrajectory.hh,v 1.4 2002/11/05 16:15:50 jacek Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//---------------------------------------------------------------
//
// G4SmoothTrajectory.hh
//
// class description:
// This class represents the trajectory of a particle tracked.
// It includes information of
// 1) List of trajectory points which compose the trajectory,
// 2) static information of particle which generated the
// trajectory,
// 3) trackID and parent particle ID of the trajectory,
// 4) Auxiliary points will be associated to G4SmoothTrajectoryPoint
// to assist drawing smoothly curved trajectory.
//
// ---------------------------------------------------------------
class G4SmoothTrajectory;
#ifndef G4SmoothTrajectory_h
#define G4SmoothTrajectory_h 1
#include "G4VTrajectory.hh"
#include "G4Allocator.hh"
#include <stdlib.h> // Include from 'system'
#include "G4ios.hh" // Include from 'system'
#include "g4std/vector" // G4RWTValOrderedVector
#include "globals.hh" // Include from 'global'
#include "G4ParticleDefinition.hh" // Include from 'particle+matter'
#include "G4SmoothTrajectoryPoint.hh" // Include from 'tracking'
#include "G4Track.hh"
#include "G4Step.hh"
class G4Polyline; // Forward declaration.
typedef G4std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
class G4SmoothTrajectory : public G4VTrajectory
{
//--------
public: // with description
//--------
// Constructor/Destrcutor
G4SmoothTrajectory();
G4SmoothTrajectory(const G4Track* aTrack);
G4SmoothTrajectory(G4SmoothTrajectory &);
virtual ~G4SmoothTrajectory();
// Operators
inline void* operator new(size_t);
inline void operator delete(void*);
inline int operator == (const G4SmoothTrajectory& right) const
{return (this==&right);}
// Get/Set functions
inline G4int GetTrackID() const
{ return fTrackID; }
inline G4int GetParentID() const
{ return fParentID; }
inline G4String GetParticleName() const
{ return ParticleName; }
inline G4double GetCharge() const
{ return PDGCharge; }
inline G4int GetPDGEncoding() const
{ return PDGEncoding; }
inline G4ThreeVector GetInitialMomentum() const
{ return initialMomentum; }
// Other member functions
virtual void ShowTrajectory(G4std::ostream& os=G4cout) const;
virtual void DrawTrajectory(G4int i_mode=0) const;
virtual void AppendStep(const G4Step* aStep);
virtual int GetPointEntries() const { return positionRecord->size(); }
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
{ return (*positionRecord)[i]; }
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
G4ParticleDefinition* GetParticleDefinition();
// Get method for HEPRep style attributes
virtual const G4std::map<G4String,G4AttDef>* GetAttDefs() const;
virtual G4std::vector<G4AttValue>* CreateAttValues() const;
//---------
private:
//---------
TrajectoryPointContainer* positionRecord;
G4int fTrackID;
G4int fParentID;
G4int PDGEncoding;
G4double PDGCharge;
G4String ParticleName;
G4ThreeVector initialMomentum;
};
extern G4Allocator<G4SmoothTrajectory> aSmoothTrajectoryAllocator;
inline void* G4SmoothTrajectory::operator new(size_t)
{
void* aTrajectory;
aTrajectory = (void*)aSmoothTrajectoryAllocator.MallocSingle();
return aTrajectory;
}
inline void G4SmoothTrajectory::operator delete(void* aTrajectory)
{
aSmoothTrajectoryAllocator.FreeSingle((G4SmoothTrajectory*)aTrajectory);
}
#endif
@@ -0,0 +1,106 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * 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: G4SmoothTrajectoryPoint.hh,v 1.6 2002/11/08 23:44:36 jacek Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//---------------------------------------------------------------
//
// G4SmoothTrajectoryPoint.hh
//
// class description:
// This class contains position and auxiliary points of a trajectory point.
//
// ---------------------------------------------------------------
#ifndef G4SmoothTrajectoryPoint_h
#define G4SmoothTrajectoryPoint_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 G4SmoothTrajectoryPoint : public G4VTrajectoryPoint
{
//--------
public: // without description
//--------
// Constructor/Destructor
G4SmoothTrajectoryPoint();
// No auxiliary points setter, so must set the points in the
// constructor already (jacek 31/10/2002)
G4SmoothTrajectoryPoint(G4ThreeVector pos,
G4std::vector<G4ThreeVector>* auxiliaryPoints);
G4SmoothTrajectoryPoint(G4ThreeVector pos);
G4SmoothTrajectoryPoint(const G4SmoothTrajectoryPoint &right);
virtual ~G4SmoothTrajectoryPoint();
// Operators
inline void *operator new(size_t);
inline void operator delete(void *aTrajectoryPoint);
inline int operator==(const G4SmoothTrajectoryPoint& right) const
{ return (this==&right); };
// Get/Set functions
inline const G4ThreeVector GetPosition() const
{ return fPosition; }
inline const G4std::vector<G4ThreeVector>* GetAuxiliaryPoints() const
{ return fAuxiliaryPointVector; }
// Get method for HEPRep style attributes
virtual const G4std::map<G4String,G4AttDef>* GetAttDefs() const;
virtual G4std::vector<G4AttValue>* CreateAttValues() const;
//---------
private:
//---------
// Member data
G4ThreeVector fPosition;
G4std::vector<G4ThreeVector>* fAuxiliaryPointVector;
};
extern G4Allocator<G4SmoothTrajectoryPoint> aSmoothTrajectoryPointAllocator;
inline void* G4SmoothTrajectoryPoint::operator new(size_t)
{
void *aTrajectoryPoint;
aTrajectoryPoint = (void *) aSmoothTrajectoryPointAllocator.MallocSingle();
return aTrajectoryPoint;
}
inline void G4SmoothTrajectoryPoint::operator delete(void *aTrajectoryPoint)
{
aSmoothTrajectoryPointAllocator.FreeSingle((G4SmoothTrajectoryPoint *) aTrajectoryPoint);
}
#endif
+3 -12
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SteppingManager.hh,v 1.20 2002/02/04 07:58:47 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4SteppingManager.hh,v 1.22 2002/11/06 02:24:34 tsasaki Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//---------------------------------------------------------------
//
@@ -195,6 +195,7 @@ public: //without description
void InvokeAtRestDoItProcs();
void InvokeAlongStepDoItProcs();
void InvokePostStepDoItProcs();
void InvokePSDIP(size_t); //
void SetNavigator(G4Navigator* value);
G4double CalculateSafety();
// Return the estimated safety value at the PostStepPoint
@@ -244,9 +245,6 @@ public: //without description
size_t MAXofAlongStepLoops;
size_t MAXofPostStepLoops;
G4double currentMinimumStep;
G4double numberOfInteractionLengthLeft;
size_t fAtRestDoItProcTriggered;
size_t fAlongStepDoItProcTriggered;
size_t fPostStepDoItProcTriggered;
@@ -395,13 +393,6 @@ public: //without description
return MAXofPostStepLoops;
}
inline G4double G4SteppingManager::GetcurrentMinimumStep(){
return currentMinimumStep;
}
inline G4double G4SteppingManager::GetnumberOfInteractionLengthLeft(){
return numberOfInteractionLengthLeft;
}
inline size_t G4SteppingManager::GetfAtRestDoItProcTriggered(){
return fAtRestDoItProcTriggered;
}
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4SteppingVerbose.hh,v 1.9 2001/07/11 10:08:40 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrackVector.hh,v 1.8 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//---------------------------------------------------------------
+3 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4TrackingManager.hh,v 1.13 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4TrackingManager.hh,v 1.14 2002/08/13 18:14:42 asaim Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//---------------------------------------------------------------
@@ -146,6 +146,7 @@ public: // without description
G4bool StoreTrajectory;
G4int verboseLevel;
G4TrackingMessenger* messenger;
G4bool EventIsAborted;
};
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrackingMessenger.hh,v 1.7 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//---------------------------------------------------------------
+9 -3
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Trajectory.hh,v 1.14 2001/11/07 10:39:46 radoone Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4Trajectory.hh,v 1.17 2002/10/28 11:10:57 johna Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//---------------------------------------------------------------
@@ -98,9 +98,11 @@ public: // with description
{ return PDGCharge; }
inline G4int GetPDGEncoding() const
{ return PDGEncoding; }
inline G4ThreeVector GetInitialMomentum() const
{ return initialMomentum; }
// Other member functions
virtual void ShowTrajectory() const;
virtual void ShowTrajectory(G4std::ostream& os=G4cout) const;
virtual void DrawTrajectory(G4int i_mode=0) const;
virtual void AppendStep(const G4Step* aStep);
virtual int GetPointEntries() const { return positionRecord->size(); }
@@ -110,6 +112,9 @@ public: // with description
G4ParticleDefinition* GetParticleDefinition();
virtual const G4std::map<G4String,G4AttDef>* GetAttDefs() const;
virtual G4std::vector<G4AttValue>* CreateAttValues() const;
//---------
private:
//---------
@@ -120,6 +125,7 @@ public: // with description
G4int PDGEncoding;
G4double PDGCharge;
G4String ParticleName;
G4ThreeVector initialMomentum;
};
+5 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4TrajectoryPoint.hh,v 1.7 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4TrajectoryPoint.hh,v 1.10 2002/10/28 11:10:57 johna Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//---------------------------------------------------------------
@@ -79,6 +79,9 @@ public: // without description
inline const G4ThreeVector GetPosition() const
{ return fPosition; };
// Get method for HEPRep style attributes
virtual const G4std::map<G4String,G4AttDef>* GetAttDefs() const;
virtual G4std::vector<G4AttValue>* CreateAttValues() const;
//---------
private:
@@ -22,7 +22,7 @@
//
//
// $Id: G4UserSteppingAction.hh,v 1.7 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4UserTrackingAction.hh,v 1.8 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//---------------------------------------------------------------
+4 -10
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VSteppingVerbose.hh,v 1.13 2001/11/07 13:04:50 radoone Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4VSteppingVerbose.hh,v 1.14 2002/12/04 23:00:50 tsasaki Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//---------------------------------------------------------------
@@ -76,14 +76,8 @@ public:
//
public: // with description
// static methods to set/get the object's pointer
static void SetInstance(G4VSteppingVerbose* Instance)
{
fInstance = Instance;
}
static G4VSteppingVerbose* GetInstance()
{
return fInstance;
}
static void SetInstance(G4VSteppingVerbose* Instance);
static G4VSteppingVerbose* GetInstance();
// these method are invoked in the SteppingManager
virtual void NewStep() = 0;
void CopyState();
+65 -18
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VTrajectory.hh,v 1.6 2001/07/11 10:08:42 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4VTrajectory.hh,v 1.11 2002/11/08 18:17:04 johna Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//---------------------------------------------------------------
@@ -30,38 +30,85 @@
// G4VTrajectory.hh
//
// class 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)
// This class is the abstract base class which represents a trajectory of
// a particle tracked.
// Its concrete class includes information of
// 1) List of trajectory points which compose the trajectory,
// 2) static information of particle which generated the
// trajectory,
// 3) trackID and parent particle ID of the trajectory,
//
// ---------------------------------------------------------------
#ifndef G4VTrajectory_h
#define G4VTrajectory_h 1
class G4Step;
#include "G4VTrajectoryPoint.hh"
#include "globals.hh"
#include "g4std/vector"
#include "g4std/map"
#include "G4ThreeVector.hh"
class G4Step;
class G4VTrajectoryPoint;
class G4AttDef;
class G4AttValue;
class G4VTrajectory
{
public: // without description
public: // with description
// Constructor/Destrcutor
G4VTrajectory() {;}
virtual ~G4VTrajectory() {;}
inline int operator == (const G4VTrajectory& right){return (this==&right);}
// Operators
inline int operator == (const G4VTrajectory& right) const
{return (this==&right);}
virtual void ShowTrajectory() const = 0;
virtual void DrawTrajectory(G4int i_mode=0) const = 0;
virtual void AppendStep(const G4Step*) = 0;
// Get/Set functions
virtual G4int GetTrackID() const = 0;
virtual G4int GetParentID() const = 0;
virtual G4String GetParticleName() const = 0;
virtual G4double GetCharge() const = 0;
// Charge is that of G4DynamicParticle
virtual G4int GetPDGEncoding() const = 0;
// Zero will be returned if the particle does not have PDG code.
virtual G4ThreeVector GetInitialMomentum() const = 0;
// Momentum at the origin of the track in global coordinate system.
// Other member functions
virtual int GetPointEntries() const = 0;
virtual G4VTrajectoryPoint* GetPoint(int) const = 0;
virtual void MergeTrajectory(G4VTrajectory*) = 0;
// Returns the number of trajectory points
virtual G4VTrajectoryPoint* GetPoint(G4int i) const = 0;
// Returns i-th trajectory point.
virtual void ShowTrajectory(G4std::ostream& os=G4cout) const;
// Convert attributes in trajectory (and trajectory point if
// needed) to ostream. A default implementation in this base class
// may be used or may be overridden in the concrete class. Note:
// the user needs to follow with new-line or end-of-string,
// depending on the nature of os.
virtual void DrawTrajectory(G4int i_mode=0) const;
// Draw the trajectory. A default implementation in this base
// class may be used or may be overridden in the concrete class.
virtual const G4std::map<G4String,G4AttDef>* GetAttDefs() const
{ return 0; }
// If implemented by a derived class, returns a pointer to a map of
// attribute definitions for the attribute values below. The user
// must test the validity of this pointer.
virtual G4std::vector<G4AttValue>* CreateAttValues() const
{ return 0; }
// If implemented by a derived class, returns a pointer to a list
// of attribute values suitable, e.g., for picking. Each must
// refer to an attribute definition in the above map; its name is
// the key. The user must test the validity of this pointer and
// delete the list after use.
public:
// Following methods MUST be invoked exclusively by G4TrackingManager
virtual void AppendStep(const G4Step* aStep) = 0;
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory) = 0;
};
#endif
+53 -8
View File
@@ -21,27 +21,72 @@
// ********************************************************************
//
//
// $Id: G4VTrajectoryPoint.hh,v 1.5 2001/07/11 10:08:42 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4VTrajectoryPoint.hh,v 1.9 2002/10/28 11:10:58 johna Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// class description
// The base class for the trajectory class
//
//---------------------------------------------------------------
//
// G4VTrajectoryPoint.hh
//
// class description:
// This class is the abstract base class which represents the point
// which consists of a trajectory.
// It includes information of a the point.
//
// ---------------------------------------------------------------
#ifndef G4VTrajectoryPoint_h
#define G4VTrajectoryPoint_h 1
#include "globals.hh"
#include "g4std/vector"
#include "g4std/map"
#include "G4ThreeVector.hh"
class G4AttDef;
class G4AttValue;
class G4VTrajectoryPoint
{
public:
public: // with description
// Constructor/Destructor
G4VTrajectoryPoint() {;}
virtual ~G4VTrajectoryPoint() {;}
// Operators
inline int operator==(const G4VTrajectoryPoint& right) const
{ return (this==&right); }
};
{ return (this==&right); };
// Get/Set functions
virtual const G4ThreeVector GetPosition() const = 0;
// Get method for a vector of auxiliary points
virtual const G4std::vector<G4ThreeVector>* GetAuxiliaryPoints() const
{ return 0; }
// If implemented by a derived class, returns a pointer to a list
// of auxiliary points, e.g., intermediate points used during the
// calculation of the step that can be used for drawing a smoother
// trajectory. The user must test the validity of this pointer.
// Get method for HEPRep style attribute definitions
virtual const G4std::map<G4String,G4AttDef>* GetAttDefs() const
{ return 0; }
// If implemented by a derived class, returns a pointer to a map of
// attribute definitions for the attribute values below. The user
// must test the validity of this pointer.
// Get method for HEPRep style attribute values
virtual G4std::vector<G4AttValue>* CreateAttValues() const
{ return 0; }
// If implemented by a derived class, returns a pointer to a list
// of attribute values suitable, e.g., for picking. Each must
// refer to an attribute definition in the above map; its name is
// the key. The user must test the validity of this pointer and
// delete the list after use.
};
#endif