Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
@@ -25,7 +25,7 @@
//
//
// $Id: G4OpAbsorption.hh,v 1.9 2006/06/29 21:08:36 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
////////////////////////////////////////////////////////////////////////
// Optical Photon Absorption Class Definition
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4OpBoundaryProcess.hh,v 1.16 2007/10/15 21:16:24 gum Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4OpBoundaryProcess.hh,v 1.18 2008/11/07 17:59:37 gum Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
////////////////////////////////////////////////////////////////////////
@@ -67,6 +67,10 @@
#include "templates.hh"
#include "geomdefs.hh"
#include "Randomize.hh"
#include "G4RandomTools.hh"
#include "G4RandomDirection.hh"
#include "G4Step.hh"
#include "G4VDiscreteProcess.hh"
#include "G4DynamicParticle.hh"
@@ -161,20 +165,8 @@ public: // With description
private:
void G4Swap(G4double* a, G4double* b) const;
void G4Swap(G4Material* a, G4Material* b) const;
void G4VectorSwap(G4ThreeVector* vec1, G4ThreeVector* vec2) const;
G4bool G4BooleanRand(const G4double prob) const;
G4ThreeVector G4IsotropicRand() const;
G4ThreeVector G4LambertianRand(const G4ThreeVector& normal);
G4ThreeVector G4PlaneVectorRand(const G4ThreeVector& normal) const;
G4ThreeVector GetFacetNormal(const G4ThreeVector& Momentum,
const G4ThreeVector& Normal) const;
@@ -227,45 +219,6 @@ private:
// Inline methods
////////////////////
inline
void G4OpBoundaryProcess::G4Swap(G4double* a, G4double* b) const
{
// swaps the contents of the objects pointed
// to by 'a' and 'b'!
G4double temp;
temp = *a;
*a = *b;
*b = temp;
}
inline
void G4OpBoundaryProcess::G4Swap(G4Material* a, G4Material* b) const
{
// ONLY swaps the pointers; i.e. what used to be pointed
// to by 'a' is now pointed to by 'b' and vice versa!
G4Material* temp = a;
a = b;
b = temp;
}
inline
void G4OpBoundaryProcess::G4VectorSwap(G4ThreeVector* vec1,
G4ThreeVector* vec2) const
{
// swaps the contents of the objects pointed
// to by 'vec1' and 'vec2'!
G4ThreeVector temp;
temp = *vec1;
*vec1 = *vec2;
*vec2 = temp;
}
inline
G4bool G4OpBoundaryProcess::G4BooleanRand(const G4double prob) const
{
@@ -274,68 +227,6 @@ G4bool G4OpBoundaryProcess::G4BooleanRand(const G4double prob) const
return (G4UniformRand() < prob);
}
inline
G4ThreeVector G4OpBoundaryProcess::G4IsotropicRand() const
{
/* Returns a random isotropic unit vector. */
G4ThreeVector vect;
G4double len2;
do {
vect.setX(G4UniformRand() - 0.5);
vect.setY(G4UniformRand() - 0.5);
vect.setZ(G4UniformRand() - 0.5);
len2 = vect.mag2();
} while (len2 < 0.01 || len2 > 0.25);
return vect.unit();
}
inline
G4ThreeVector G4OpBoundaryProcess::
G4LambertianRand(const G4ThreeVector& normal)
{
/* Returns a random lambertian unit vector. */
G4ThreeVector vect;
G4double ndotv;
do {
vect = G4IsotropicRand();
ndotv = normal * vect;
if (ndotv < 0.0) {
vect = -vect;
ndotv = -ndotv;
}
} while (!G4BooleanRand(ndotv));
return vect;
}
inline
G4ThreeVector G4OpBoundaryProcess::
G4PlaneVectorRand(const G4ThreeVector& normal) const
/* This function chooses a random vector within a plane given
by the unit normal */
{
G4ThreeVector vec1 = normal.orthogonal();
G4ThreeVector vec2 = vec1.cross(normal);
G4double phi = twopi*G4UniformRand();
G4double cosphi = std::cos(phi);
G4double sinphi = std::sin(phi);
return cosphi * vec1 + sinphi * vec2;
}
inline
G4bool G4OpBoundaryProcess::IsApplicable(const G4ParticleDefinition&
aParticleType)
@@ -0,0 +1,53 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4OpProcessSubType.hh,v 1.3 2008/12/18 13:02:46 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//---------------------------------------------------------------
//
// G4OpProcessSubType.hh
//
// Class Description:
// This is an enumerator to define sub-type of optical processes
//
// Creation date: 23.09.2008
// Modifications:
//
//---------------------------------------------------------------
#ifndef G4OpProcessSubType_h
#define G4OpProcessSubType_h 1
enum G4OpProcessSubType
{
fOpAbsorption = 31,
fOpBoundary = 32,
fOpRayleigh = 33,
fOpWLS = 34
};
#endif
@@ -25,7 +25,7 @@
//
//
// $Id: G4OpRayleigh.hh,v 1.9 2006/06/29 21:08:40 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
////////////////////////////////////////////////////////////////////////
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4OpWLS.hh,v 1.4 2006/06/29 21:08:42 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
////////////////////////////////////////////////////////////////////////
// Optical Photon WaveLength Shifting (WLS) Class Definition