Import Geant4 3.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:55:53 +02:00
parent e7d7193284
commit cfcb558cfe
3050 changed files with 91703 additions and 48310 deletions
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4NavigationHistory.hh,v 1.5 2000/04/25 16:15:03 gcosmo Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4NavigationHistory.hh,v 1.7 2000/11/20 18:59:38 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
// class G4NavigationHistory
//
@@ -25,7 +25,7 @@
#define G4NAVIGATIONHISTORY_HH
#include <assert.h>
#include "globals.hh"
#include "geomdefs.hh"
#include "G4AffineTransform.hh"
#include "G4VPhysicalVolume.hh"
@@ -35,56 +35,98 @@
#include "g4rw/tpvector.h"
#include "g4std/iostream"
const G4int kHistoryMax=15; // Default max size of history
const G4int kHistoryStride=16; // History increase stride
class G4NavigationHistory
{
public: // with description
friend G4std::ostream& operator << (G4std::ostream &os,const G4NavigationHistory &h);
friend G4std::ostream&
operator << (G4std::ostream &os, const G4NavigationHistory &h);
G4NavigationHistory();
G4NavigationHistory(const G4NavigationHistory &h);
// Constructor: sizes history lists & resets histories.
~G4NavigationHistory();
void Reset();
void Clear();
void SetFirstEntry(G4VPhysicalVolume* pVol);
const G4AffineTransform& GetTopTransform() const;
// Destructor.
const G4AffineTransform* GetPtrTopTransform() const;
G4int GetTopReplicaNo() const;
EVolume GetTopVolumeType() const;
G4VPhysicalVolume* GetTopVolume() const;
G4int GetDepth() const;
G4int GetMaxDepth() const;
const G4AffineTransform& GetTransform(const G4int n) const;
G4NavigationHistory(const G4NavigationHistory &h);
// Copy constructor.
G4int GetReplicaNo(const G4int n) const;
EVolume GetVolumeType(const G4int n) const;
G4VPhysicalVolume* GetVolume(const G4int n) const;
void NewLevel(G4VPhysicalVolume *pNewMother,
EVolume vType=kNormal,
G4int nReplica=-1);
void BackLevel();
void BackLevel(G4int n);
G4NavigationHistory& operator=(const G4NavigationHistory &h);
// Assignment operator.
inline void Reset();
// Resets history. It now does clear most entries.
// Level 0 is preserved.
inline void Clear();
// Clears entries, zeroing transforms, matrices & negating
// replica history.
inline void SetFirstEntry(G4VPhysicalVolume* pVol);
// Setup initial entry in stack: copies through volume transform & matrix.
// The volume is assumed to be unrotated.
inline const G4AffineTransform& GetTopTransform() const;
// Returns topmost transform.
inline const G4AffineTransform* GetPtrTopTransform() const;
// Returns pointer to topmost transform.
inline G4int GetTopReplicaNo() const;
// Returns topmost replica no record.
inline EVolume GetTopVolumeType() const;
// Returns topmost volume type.
inline G4VPhysicalVolume* GetTopVolume() const;
// Returns topmost physical volume pointer.
inline G4int GetDepth() const;
// Returns current history depth.
inline G4int GetMaxDepth() const;
// Returns current maximum size of history.
// Note: MaxDepth of 16 mean history entries [0..15] inclusive.
inline const G4AffineTransform& GetTransform(G4int n) const;
// Returns specified transformation.
inline G4int GetReplicaNo(G4int n) const;
// Returns specified replica no record.
inline EVolume GetVolumeType(G4int n) const;
// Returns specified volume type.
inline G4VPhysicalVolume* GetVolume(G4int n) const;
// Returns specified physical volume pointer.
inline void NewLevel(G4VPhysicalVolume *pNewMother,
EVolume vType=kNormal,
G4int nReplica=-1);
// Changes navigation level to that of the new mother.
inline void BackLevel();
// Back up one level in history: from mother to grandmother.
// It does not erase history record of current mother.
inline void BackLevel(G4int n);
// Back up specified number of levels in history.
private:
void EnlargeHistory();
inline void EnlargeHistory();
// Enlarge history if required: increase size by kHistoryStride.
// Note that additional history entries are `dirty' (non zero) apart
// from the volume history.
private:
G4RWTValVector<G4NavigationLevel> fNavHistory;
G4int fStackDepth;
// Depth of stack: effectively depth in geometrical tree
G4RWTValVector<G4NavigationLevel> fNavHistory;
// G4RWTPtrVector<G4NavigationLevel> fNavHistory;
};
#include "G4NavigationHistory.icc"