Import Geant4 3.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:10:37 +02:00
parent 137e303ecc
commit 36c080dca6
3464 changed files with 119310 additions and 52696 deletions
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * 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: G4NavigationHistory.icc,v 1.3 2000/11/01 16:51:06 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4NavigationHistory.icc,v 1.4.2.1 2001/06/28 19:09:38 gunter Exp $
// GEANT4 tag $Name: $
//
//
// class G4NavigationHistory Inline implementation
@@ -40,11 +56,11 @@ G4NavigationHistory::operator=(const G4NavigationHistory &h)
// fNavHistory=h.fNavHistory; // This works, but is very slow.
if( this->GetMaxDepth() < h.fStackDepth ){
fNavHistory.reshape( h.fStackDepth );
fNavHistory.resize( h.fStackDepth );
}
register G4int ilev= h.fStackDepth;
for ( ; ilev>=0; ilev--) {
fNavHistory(ilev) = h.fNavHistory(ilev);
fNavHistory[ilev] = h.fNavHistory[ilev];
}
fStackDepth=h.fStackDepth;
@@ -67,10 +83,10 @@ void G4NavigationHistory::Clear()
tmpNavLevel=G4NavigationLevel(0, dummyTransform, kParameterised, -1) ;
Reset();
for (G4int ilev=fNavHistory.length()-1; ilev>=0; ilev--)
for (G4int ilev=fNavHistory.size()-1; ilev>=0; ilev--)
{
// fNavHistory(ilev)= 0;
fNavHistory(ilev)= tmpNavLevel;
fNavHistory[ilev]= tmpNavLevel;
}
}
@@ -85,7 +101,7 @@ void G4NavigationHistory::SetFirstEntry(G4VPhysicalVolume* pVol)
if(pVol !=0) {
translation=pVol->GetTranslation();
}
fNavHistory(0)= G4NavigationLevel( pVol,
fNavHistory[0]= G4NavigationLevel( pVol,
G4AffineTransform(translation),
kNormal );
}
@@ -93,31 +109,31 @@ void G4NavigationHistory::SetFirstEntry(G4VPhysicalVolume* pVol)
inline
const G4AffineTransform* G4NavigationHistory::GetPtrTopTransform() const
{
return fNavHistory(fStackDepth).GetPtrTransform();
return fNavHistory[fStackDepth].GetPtrTransform();
}
inline
const G4AffineTransform& G4NavigationHistory::GetTopTransform() const
{
return fNavHistory(fStackDepth).GetTransform();
return fNavHistory[fStackDepth].GetTransform();
}
inline
G4int G4NavigationHistory::GetTopReplicaNo() const
{
return fNavHistory(fStackDepth).GetReplicaNo();
return fNavHistory[fStackDepth].GetReplicaNo();
}
inline
EVolume G4NavigationHistory::GetTopVolumeType() const
{
return fNavHistory(fStackDepth).GetVolumeType();
return fNavHistory[fStackDepth].GetVolumeType();
}
inline
G4VPhysicalVolume* G4NavigationHistory::GetTopVolume() const
{
return fNavHistory(fStackDepth).GetPhysicalVolume();
return fNavHistory[fStackDepth].GetPhysicalVolume();
}
inline
@@ -130,31 +146,31 @@ inline
const G4AffineTransform&
G4NavigationHistory::GetTransform(G4int n) const
{
return fNavHistory(n).GetTransform();
return fNavHistory[n].GetTransform();
}
inline
G4int G4NavigationHistory::GetReplicaNo(G4int n) const
{
return fNavHistory(n).GetReplicaNo();
return fNavHistory[n].GetReplicaNo();
}
inline
EVolume G4NavigationHistory::GetVolumeType(G4int n) const
{
return fNavHistory(n).GetVolumeType();
return fNavHistory[n].GetVolumeType();
}
inline
G4VPhysicalVolume* G4NavigationHistory::GetVolume(G4int n) const
{
return fNavHistory(n).GetPhysicalVolume();
return fNavHistory[n].GetPhysicalVolume();
}
inline
G4int G4NavigationHistory::GetMaxDepth() const
{
return fNavHistory.length();
return fNavHistory.size();
}
inline
@@ -177,11 +193,11 @@ void G4NavigationHistory::BackLevel(G4int n)
inline
void G4NavigationHistory::EnlargeHistory()
{
G4int len=fNavHistory.length();
G4int len=fNavHistory.size();
if (len==fStackDepth)
{ // Note: Resize operation clears additional entries
G4int nlen=len+kHistoryStride;
fNavHistory.reshape(nlen);
fNavHistory.resize(nlen);
}
}
@@ -193,9 +209,9 @@ void G4NavigationHistory::NewLevel(G4VPhysicalVolume *pNewMother,
{
EnlargeHistory(); // Enlarge if required
fStackDepth++;
fNavHistory(fStackDepth) =
fNavHistory[fStackDepth] =
G4NavigationLevel(pNewMother,
fNavHistory(fStackDepth-1).GetTransform(),
fNavHistory[fStackDepth-1].GetTransform(),
G4AffineTransform(pNewMother->GetRotation(),
pNewMother->GetTranslation()),
vType,