Import Geant4 7.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.27 2003/10/03 15:35:05 gcosmo Exp $
|
||||
$Id: History,v 1.33 2004/12/10 18:50:14 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,27 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
10 Dec 04: G.Cosmo (xrays-V06-02-05)
|
||||
- Replaced M_PI with CLHEP's pi.
|
||||
|
||||
02 Dec 04: V.Ivant (xrays-V06-02-04)
|
||||
- Migration to cmath
|
||||
|
||||
18 October 04: P. Gumplinger (xrays-V06-02-03)
|
||||
- Migration of ParticleChange method names to 7.0 for:
|
||||
G4Scintillation.cc G4Cerenkov.cc G4ForwardXrayTR.cc G4VXTRenergyLoss.cc
|
||||
|
||||
11 August 04: V.Ivant (xrays-V06-02-02)
|
||||
- Substitute absolete iterfaces to G4ParticleDefinition
|
||||
|
||||
05 August 04: P. Gumplinger (xrays-V06-02-01)
|
||||
- changed StronglyForced back to Forced in GetMeanLifeTime of
|
||||
G4Scintillation.cc
|
||||
|
||||
27 July 04: V.Ivant (xrays-V06-02-00)
|
||||
- Fix a compilation problem connected with removal of the dependence
|
||||
of particle cathegory on G4Material
|
||||
|
||||
4 Oct 03: G.Cosmo (xrays-V05-02-01)
|
||||
- Modified GNUmakefiles:
|
||||
o added dependency to new module "geometry/navigation".
|
||||
@@ -51,6 +72,9 @@ committal in the CVS repository !
|
||||
- G4VXTRenergyLoss[.hh.cc]: removed reduntant headers inclusions and
|
||||
ordered inclusion for complex numbers to allow porting on Windows .NET VC++.
|
||||
|
||||
25 November 02: P. Gumplinger (xrays-V04-01-04)
|
||||
- G4int binding error fixed when calcuating number of photons
|
||||
|
||||
25 November 02: P. Gumplinger (xrays-V04-01-03)
|
||||
- G4Scintillation now allows for particle dependent excitation levels
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Cerenkov.hh,v 1.5 2001/07/11 10:03:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ForwardXrayTR.hh,v 1.11 2003/06/16 17:02:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4ForwardXrayTR.hh,v 1.13 2004/08/11 14:41:31 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// G4ForwardXrayTR -- header file
|
||||
//
|
||||
@@ -62,6 +62,7 @@
|
||||
#include "G4TransitionRadiation.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
|
||||
class G4ForwardXrayTR : public G4TransitionRadiation
|
||||
{
|
||||
@@ -156,7 +157,7 @@ protected : // for access from X-ray TR fast simulation models
|
||||
|
||||
// private : /////////////// Data members ///////////////////////////
|
||||
|
||||
G4Gamma* fPtrGamma ; // pointer to TR photon
|
||||
G4ParticleDefinition* fPtrGamma ; // pointer to TR photon
|
||||
|
||||
const std::vector<G4double>* fGammaCutInKineticEnergy ;
|
||||
// TR photon cut in energy array
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4GammaXTRadiator.hh,v 1.1 2002/01/22 15:22:53 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4GammaXTRadiator.hh,v 1.2 2004/12/02 08:31:07 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -31,7 +31,7 @@
|
||||
// Thicknesses of plates and gas gaps are distributed according to gamma
|
||||
// distribution. x are thicknesses of plates or gas gaps:
|
||||
//
|
||||
// p(x) = (alpha/<x>)^alpha * x^(alpha-1) * exp(-alpha*x/<x>) / G(alpha)
|
||||
// p(x) = (alpha/<x>)^alpha * x^(alpha-1) * std::exp(-alpha*x/<x>) / G(alpha)
|
||||
//
|
||||
// G(alpha) is Euler's gamma function.
|
||||
// Plates have mean <x> = fPlateThick > 0 and power alpha = fAlphaPlate > 0 :
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RegularXTRadiator.hh,v 1.2 2002/01/18 17:26:20 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Scintillation.hh,v 1.11 2002/11/25 18:48:51 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TransitionRadiation.hh,v 1.7 2003/06/03 08:11:01 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// G4TransitionRadiation -- header file
|
||||
//
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VTRModel.hh,v 1.1 2004/03/01 11:49:49 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// G4VTRModel -- header file
|
||||
//
|
||||
// The model of transition radiation
|
||||
//
|
||||
// History:
|
||||
// 29.02.04, V.Ivanchenko created
|
||||
|
||||
#ifndef G4VTRModel_h
|
||||
#define G4VTRModel_h
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4Material;
|
||||
class G4Track;
|
||||
class G4VParticleChange;
|
||||
|
||||
class G4VTRModel
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
G4VTRModel( const G4String& modelName) {name = modelName;};
|
||||
|
||||
// Destructor
|
||||
virtual ~G4VTRModel() {};
|
||||
|
||||
const G4String& GetName() const {return name;};
|
||||
|
||||
virtual void GenerateSecondaries(G4VParticleChange& pChange,
|
||||
std::vector<const G4Material*>& materials,
|
||||
std::vector<G4double>& steps,
|
||||
std::vector<G4ThreeVector>& normals,
|
||||
G4ThreeVector& startingPosition,
|
||||
const G4Track& track) = 0;
|
||||
|
||||
virtual void PrintInfo() const = 0;
|
||||
|
||||
// private :
|
||||
|
||||
// hide assignment operator
|
||||
G4VTRModel & operator=(const G4VTRModel &right);
|
||||
G4VTRModel(const G4VTRModel&);
|
||||
|
||||
G4String name;
|
||||
};
|
||||
|
||||
#endif // G4VTRModel_h
|
||||
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VTransitionRadiation.hh,v 1.1 2004/03/01 11:49:49 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// G4VTransitionRadiation -- header file
|
||||
//
|
||||
// Generic process of transition radiation
|
||||
//
|
||||
// History:
|
||||
// 29.02.04, V.Ivanchenko created
|
||||
|
||||
#ifndef G4VTransitionRadiation_h
|
||||
#define G4VTransitionRadiation_h
|
||||
|
||||
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4ForceCondition.hh"
|
||||
#include "globals.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4Material;
|
||||
class G4Region;
|
||||
class G4VTRModel;
|
||||
class G4particleDefinition;
|
||||
|
||||
class G4VTransitionRadiation : public G4VDiscreteProcess
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
G4VTransitionRadiation( const G4String& processName = "TR");
|
||||
|
||||
|
||||
// Destructor
|
||||
virtual ~G4VTransitionRadiation() ;
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
virtual G4double GetMeanFreePath(const G4Track& track, G4double,
|
||||
G4ForceCondition* condition);
|
||||
|
||||
virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
|
||||
const G4Step& step);
|
||||
|
||||
virtual void PrintInfoDefinition();
|
||||
// Print out of the class parameters
|
||||
|
||||
void SetRegion(const G4Region* reg);
|
||||
|
||||
void SetModel(G4VTRModel* m);
|
||||
|
||||
// private :
|
||||
|
||||
void Clear();
|
||||
|
||||
// hide assignment operator
|
||||
G4VTransitionRadiation & operator=(const G4VTransitionRadiation &right);
|
||||
G4VTransitionRadiation(const G4VTransitionRadiation&);
|
||||
|
||||
std::vector<const G4Material*> materials;
|
||||
std::vector<G4double> steps;
|
||||
std::vector<G4ThreeVector> normals;
|
||||
|
||||
G4ThreeVector startingPosition;
|
||||
G4ThreeVector startingDirection;
|
||||
const G4Region* region;
|
||||
G4VTRModel* model;
|
||||
|
||||
G4int nSteps;
|
||||
|
||||
G4double gammaMin;
|
||||
G4double cosDThetaMax;
|
||||
|
||||
};
|
||||
|
||||
inline G4double G4VTransitionRadiation::GetMeanFreePath(
|
||||
const G4Track& track, G4double,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
if(nSteps > 0) {
|
||||
*condition = StronglyForced;
|
||||
} else {
|
||||
*condition = NotForced;
|
||||
if(track.GetKineticEnergy()/track.GetDefinition()->GetPDGMass() + 1.0 > gammaMin &&
|
||||
track.GetVolume()->GetLogicalVolume()->GetRegion() == region) {
|
||||
*condition = StronglyForced;
|
||||
}
|
||||
}
|
||||
return DBL_MAX; // so TR doesn't limit mean free path
|
||||
}
|
||||
|
||||
|
||||
#endif // G4VTransitionRadiation_h
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VXTRenergyLoss.hh,v 1.5 2003/06/16 17:02:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4VXTRenergyLoss.hh,v 1.6 2004/08/11 14:41:31 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
G4Gamma* fPtrGamma ; // pointer to TR photon
|
||||
G4ParticleDefinition* fPtrGamma ; // pointer to TR photon
|
||||
|
||||
G4double* fGammaCutInKineticEnergy ; // TR photon cut in energy array
|
||||
G4double fGammaTkinCut ; // Tkin cut of TR photon in current mat.
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Cerenkov.cc,v 1.14 2003/02/12 08:52:55 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Cerenkov.cc,v 1.17 2004/12/10 18:49:57 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Cerenkov Radiation Class Implementation
|
||||
@@ -55,6 +55,8 @@
|
||||
#include "G4Poisson.hh"
|
||||
#include "G4Cerenkov.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/////////////////////////
|
||||
// Class Implementation
|
||||
/////////////////////////
|
||||
@@ -181,7 +183,7 @@ G4Cerenkov::AlongStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
|
||||
if (fTrackSecondariesFirst) {
|
||||
if (aTrack.GetTrackStatus() == fAlive )
|
||||
aParticleChange.SetStatusChange(fSuspend);
|
||||
aParticleChange.ProposeTrackStatus(fSuspend);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
@@ -224,7 +226,7 @@ G4Cerenkov::AlongStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
|
||||
rand = G4UniformRand();
|
||||
|
||||
G4double phi = 2*M_PI*rand;
|
||||
G4double phi = twopi*rand;
|
||||
G4double sinPhi = sin(phi);
|
||||
G4double cosPhi = cos(phi);
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ForwardXrayTR.cc,v 1.10 2003/06/03 08:11:01 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4ForwardXrayTR.cc,v 1.12 2004/12/02 08:31:07 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
// G4ForwardXrayTR class -- implementation file
|
||||
|
||||
@@ -81,6 +81,7 @@ G4double G4ForwardXrayTR::fPlasmaCof = 4.0*pi*fine_structure_const*
|
||||
|
||||
G4double G4ForwardXrayTR::fCofTR = fine_structure_const/pi ;
|
||||
|
||||
using namespace std;
|
||||
|
||||
/* ************************************************************************
|
||||
|
||||
@@ -676,7 +677,7 @@ G4VParticleChange* G4ForwardXrayTR::PostStepDoIt(const G4Track& aTrack,
|
||||
// G4cout<<"energyTR = "<<energyTR/keV<<"keV"<<G4endl ;
|
||||
|
||||
kinEnergy -= energyTR ;
|
||||
aParticleChange.SetEnergyChange(kinEnergy);
|
||||
aParticleChange.ProposeEnergy(kinEnergy);
|
||||
|
||||
anglePos = (*(*fAngleDistrTable)(iPlace))(0)*G4UniformRand() ;
|
||||
for(iTransfer=0;iTransfer<fBinTR-1;iTransfer++)
|
||||
@@ -749,7 +750,7 @@ G4VParticleChange* G4ForwardXrayTR::PostStepDoIt(const G4Track& aTrack,
|
||||
// G4cout<<"energyTR = "<<energyTR/keV<<"keV"<<G4endl ;
|
||||
|
||||
kinEnergy -= energyTR ;
|
||||
aParticleChange.SetEnergyChange(kinEnergy);
|
||||
aParticleChange.ProposeEnergy(kinEnergy);
|
||||
|
||||
anglePos = ((*(*fAngleDistrTable)(iPlace))(0)*W1+
|
||||
(*(*fAngleDistrTable)(iPlace + 1))(0)*W2)*G4UniformRand() ;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4GammaXTRadiator.cc,v 1.2 2003/06/16 17:02:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4GammaXTRadiator.cc,v 1.3 2004/12/02 08:31:07 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
|
||||
#include <complex>
|
||||
@@ -32,6 +32,8 @@
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor, destructor
|
||||
@@ -89,19 +91,19 @@ G4GammaXTRadiator::GetStackFactor( G4double energy,
|
||||
G4complex Ca(1.0+0.5*fPlateThick*Ma/fAlphaPlate,fPlateThick/Za/fAlphaPlate) ;
|
||||
G4complex Cb(1.0+0.5*fGasThick*Mb/fAlphaGas,fGasThick/Zb/fAlphaGas) ;
|
||||
|
||||
G4complex Ha = std::pow(Ca,-fAlphaPlate) ;
|
||||
G4complex Hb = std::pow(Cb,-fAlphaGas) ;
|
||||
G4complex Ha = pow(Ca,-fAlphaPlate) ;
|
||||
G4complex Hb = pow(Cb,-fAlphaGas) ;
|
||||
G4complex H = Ha*Hb ;
|
||||
|
||||
G4complex F1 = (1.0 - Ha)*(1.0 - Hb )/(1.0 - H)
|
||||
* G4double(fPlateNumber) ;
|
||||
|
||||
G4complex F2 = (1.0-Ha)*(1.0-Ha)*Hb/(1.0-H)/(1.0-H)
|
||||
* (1.0 - std::pow(H,fPlateNumber)) ;
|
||||
* (1.0 - pow(H,fPlateNumber)) ;
|
||||
|
||||
G4complex R = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle) ;
|
||||
|
||||
result = 2.0*std::real(R) ;
|
||||
result = 2.0*real(R) ;
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RegularXTRadiator.cc,v 1.3 2003/06/16 17:02:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4RegularXTRadiator.cc,v 1.4 2004/12/02 08:31:07 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
|
||||
#include <complex>
|
||||
@@ -32,6 +32,8 @@
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor, destructor
|
||||
@@ -91,7 +93,7 @@ G4RegularXTRadiator::GetStackFactor( G4double energy,
|
||||
|
||||
G4complex H = Ha*Hb ;
|
||||
|
||||
G4complex Hs = std::conj(H) ;
|
||||
G4complex Hs = conj(H) ;
|
||||
|
||||
D = 1.0 /( (1 - sqrt(Q))*(1 - sqrt(Q)) +
|
||||
4*sqrt(Q)*sin(0.5*(aZa+bZb))*sin(0.5*(aZa+bZb)) ) ;
|
||||
@@ -100,11 +102,11 @@ G4RegularXTRadiator::GetStackFactor( G4double energy,
|
||||
* G4double(fPlateNumber)*D ;
|
||||
|
||||
G4complex F2 = (1.0-Ha)*(1.0-Ha)*Hb*(1.0-Hs)*(1.0-Hs)
|
||||
* (1.0 - std::pow(H,fPlateNumber)) * D*D ;
|
||||
* (1.0 - pow(H,fPlateNumber)) * D*D ;
|
||||
|
||||
G4complex R = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle) ;
|
||||
|
||||
result = 2.0*std::real(R) ;
|
||||
result = 2.0*real(R) ;
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scintillation.cc,v 1.18 2003/06/16 17:02:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Scintillation.cc,v 1.22 2004/12/10 18:49:57 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Scintillation Light Class Implementation
|
||||
@@ -33,7 +33,9 @@
|
||||
// Version: 1.0
|
||||
// Created: 1998-11-07
|
||||
// Author: Peter Gumplinger
|
||||
// Updated: 2002-11-21 by Peter Gumplinger
|
||||
// Updated: 2004-08-05 by Peter Gumplinger
|
||||
// > changed StronglyForced back to Forced in GetMeanLifeTime
|
||||
// 2002-11-21 by Peter Gumplinger
|
||||
// > change to use G4Poisson for small MeanNumPhotons
|
||||
// 2002-11-07 by Peter Gumplinger
|
||||
// > now allow for fast and slow scintillation component
|
||||
@@ -56,6 +58,8 @@
|
||||
#include "G4ios.hh"
|
||||
#include "G4Scintillation.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/////////////////////////
|
||||
// Class Implementation
|
||||
/////////////////////////
|
||||
@@ -198,7 +202,7 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
|
||||
if (fTrackSecondariesFirst) {
|
||||
if (aTrack.GetTrackStatus() == fAlive )
|
||||
aParticleChange.SetStatusChange(fSuspend);
|
||||
aParticleChange.ProposeTrackStatus(fSuspend);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
@@ -234,10 +238,10 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
G4double YieldRatio = aMaterialPropertiesTable->
|
||||
GetConstProperty("YIELDRATIO");
|
||||
if ( ExcitationRatio == 1.0 ) {
|
||||
Num = G4int (std::min(YieldRatio,1.0) * NumPhotons);
|
||||
Num = G4int (min(YieldRatio,1.0) * NumPhotons);
|
||||
}
|
||||
else {
|
||||
Num = G4int (std::min(ExcitationRatio,1.0) * NumPhotons);
|
||||
Num = G4int (min(ExcitationRatio,1.0) * NumPhotons);
|
||||
}
|
||||
ScintillationTime = aMaterialPropertiesTable->
|
||||
GetConstProperty("FASTTIMECONSTANT");
|
||||
@@ -277,7 +281,7 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
G4double cost = 1. - 2.*G4UniformRand();
|
||||
G4double sint = sqrt((1.-cost)*(1.+cost));
|
||||
|
||||
G4double phi = 2*M_PI*G4UniformRand();
|
||||
G4double phi = twopi*G4UniformRand();
|
||||
G4double sinp = sin(phi);
|
||||
G4double cosp = cos(phi);
|
||||
|
||||
@@ -299,7 +303,7 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
|
||||
G4ThreeVector perp = photonMomentum.cross(photonPolarization);
|
||||
|
||||
phi = 2*M_PI*G4UniformRand();
|
||||
phi = twopi*G4UniformRand();
|
||||
sinp = sin(phi);
|
||||
cosp = cos(phi);
|
||||
|
||||
@@ -550,7 +554,7 @@ G4double G4Scintillation::GetMeanFreePath(const G4Track&,
|
||||
G4double G4Scintillation::GetMeanLifeTime(const G4Track&,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
*condition = StronglyForced;
|
||||
*condition = Forced;
|
||||
|
||||
return DBL_MAX;
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4TransitionRadiation.cc,v 1.3 2001/07/11 10:03:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4TransitionRadiation.cc,v 1.4 2004/12/02 08:31:07 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
// G4TransitionRadiation class -- implementation file
|
||||
|
||||
@@ -53,6 +53,7 @@ const G4int G4TransitionRadiation::fSympsonNumber = 100 ;
|
||||
const G4int G4TransitionRadiation::fGammaNumber = 15 ;
|
||||
const G4int G4TransitionRadiation::fPointNumber = 100 ;
|
||||
|
||||
using namespace std;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VTransitionRadiation.cc,v 1.3 2004/12/02 08:31:08 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
// G4VTransitionRadiation class -- implementation file
|
||||
|
||||
// GEANT 4 class implementation file --- Copyright CERN 1995
|
||||
// CERN Geneva Switzerland
|
||||
|
||||
// History:
|
||||
// 29.02.04 V.Ivanchenko create
|
||||
|
||||
#include "G4VTransitionRadiation.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4VTRModel.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Region.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
using namespace std;
|
||||
|
||||
G4VTransitionRadiation::G4VTransitionRadiation( const G4String& processName )
|
||||
: G4VDiscreteProcess(processName),
|
||||
nSteps(0),
|
||||
gammaMin(100),
|
||||
cosDThetaMax(cos(0.1))
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4VTransitionRadiation::~G4VTransitionRadiation()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
void G4VTransitionRadiation::Clear()
|
||||
{
|
||||
materials.clear();
|
||||
steps.clear();
|
||||
normals.clear();
|
||||
nSteps = 0;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4VParticleChange* G4VTransitionRadiation::PostStepDoIt(
|
||||
const G4Track& track,
|
||||
const G4Step& step)
|
||||
{
|
||||
|
||||
// Fill temporary vectors
|
||||
|
||||
const G4Material* material = track.GetMaterial();
|
||||
G4double length = step.GetStepLength();
|
||||
G4ThreeVector direction = track.GetMomentumDirection();
|
||||
|
||||
if(nSteps == 0) {
|
||||
|
||||
nSteps = 1;
|
||||
materials.push_back(material);
|
||||
steps.push_back(length);
|
||||
const G4StepPoint* point = step.GetPreStepPoint();
|
||||
startingPosition = point->GetPosition();
|
||||
startingDirection = point->GetMomentumDirection();
|
||||
G4bool valid = true;
|
||||
G4ThreeVector n = G4TransportationManager::GetTransportationManager()
|
||||
->GetNavigatorForTracking()->GetLocalExitNormal(&valid);
|
||||
if(valid) normals.push_back(n);
|
||||
else normals.push_back(direction);
|
||||
|
||||
} else {
|
||||
|
||||
if(material == materials[nSteps-1]) {
|
||||
steps[nSteps-1] += length;
|
||||
} else {
|
||||
nSteps++;
|
||||
materials.push_back(material);
|
||||
steps.push_back(length);
|
||||
G4bool valid = true;
|
||||
G4ThreeVector n = G4TransportationManager::GetTransportationManager()
|
||||
->GetNavigatorForTracking()->GetLocalExitNormal(&valid);
|
||||
if(valid) normals.push_back(n);
|
||||
else normals.push_back(direction);
|
||||
}
|
||||
}
|
||||
|
||||
// Check POstStepPoint condition
|
||||
|
||||
if(track.GetTrackStatus() == fStopAndKill ||
|
||||
track.GetVolume()->GetLogicalVolume()->GetRegion() != region ||
|
||||
startingDirection.x()*direction.x() +
|
||||
startingDirection.y()*direction.y() +
|
||||
startingDirection.z()*direction.z() < cosDThetaMax)
|
||||
{
|
||||
if(model) {
|
||||
model->GenerateSecondaries(*pParticleChange, materials, steps,
|
||||
normals, startingPosition, track);
|
||||
}
|
||||
Clear();
|
||||
}
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4bool G4VTransitionRadiation::IsApplicable(
|
||||
const G4ParticleDefinition& aParticle)
|
||||
{
|
||||
return ( aParticle.GetPDGCharge() != 0.0 );
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
void G4VTransitionRadiation::SetRegion(const G4Region* reg)
|
||||
{
|
||||
region = reg;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
void G4VTransitionRadiation::SetModel(G4VTRModel* m)
|
||||
{
|
||||
model = m;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
void G4VTransitionRadiation::PrintInfoDefinition()
|
||||
{
|
||||
if(model) model->PrintInfo();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
@@ -22,8 +22,8 @@
|
||||
//
|
||||
//
|
||||
|
||||
// $Id: G4VXTRenergyLoss.cc,v 1.11 2003/06/20 15:10:20 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4VXTRenergyLoss.cc,v 1.14 2004/12/02 08:31:08 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
// History:
|
||||
// 2001-2002 R&D by V.Grichine
|
||||
@@ -54,6 +54,8 @@ G4double G4VXTRenergyLoss::fMaxProtonTkin = 100.0*TeV ;
|
||||
G4int G4VXTRenergyLoss::fTotBin = 50 ;
|
||||
// Proton energy vector initialization
|
||||
|
||||
using namespace std;
|
||||
|
||||
G4PhysicsLogVector* G4VXTRenergyLoss::
|
||||
fProtonEnergyVector = new G4PhysicsLogVector(fMinProtonTkin,
|
||||
fMaxProtonTkin,
|
||||
@@ -415,7 +417,7 @@ G4VParticleChange* G4VXTRenergyLoss::AlongStepDoIt( const G4Track& aTrack,
|
||||
}
|
||||
sumEnergyTR += energyTR ;
|
||||
|
||||
theta = abs(G4RandGauss::shoot(0.0,pi/gamma)) ;
|
||||
theta = fabs(G4RandGauss::shoot(0.0,pi/gamma)) ;
|
||||
|
||||
if( theta >= 0.1 ) theta = 0.1 ;
|
||||
|
||||
@@ -457,7 +459,7 @@ G4VParticleChange* G4VXTRenergyLoss::AlongStepDoIt( const G4Track& aTrack,
|
||||
aParticleChange.AddSecondary(aSecondaryTrack);
|
||||
}
|
||||
kinEnergy -= sumEnergyTR ;
|
||||
aParticleChange.SetEnergyChange(kinEnergy) ;
|
||||
aParticleChange.ProposeEnergy(kinEnergy) ;
|
||||
}
|
||||
}
|
||||
// return G4VContinuousProcess::AlongStepDoIt(aTrack, aStep);
|
||||
@@ -741,7 +743,7 @@ void G4VXTRenergyLoss::ComputeGasPhotoAbsCof()
|
||||
for(i=0;i<fGasIntervalNumber;i++)
|
||||
{
|
||||
fGasPhotoAbsCof[i] = new G4double[5] ;
|
||||
}
|
||||
}
|
||||
for(i=0;i<fGasIntervalNumber;i++)
|
||||
{
|
||||
fGasPhotoAbsCof[i][0] = thisMaterialSandiaTable.
|
||||
@@ -805,8 +807,8 @@ G4double G4VXTRenergyLoss::GetPlateZmuProduct( G4double omega ,
|
||||
|
||||
void G4VXTRenergyLoss::GetPlateZmuProduct()
|
||||
{
|
||||
std::ofstream outPlate("plateZmu.dat", std::ios::out ) ;
|
||||
outPlate.setf( std::ios::scientific, std::ios::floatfield );
|
||||
ofstream outPlate("plateZmu.dat", ios::out ) ;
|
||||
outPlate.setf( ios::scientific, ios::floatfield );
|
||||
|
||||
G4int i ;
|
||||
G4double omega, varAngle, gamma ;
|
||||
@@ -840,8 +842,8 @@ G4double G4VXTRenergyLoss::GetGasZmuProduct( G4double omega ,
|
||||
|
||||
void G4VXTRenergyLoss::GetGasZmuProduct()
|
||||
{
|
||||
std::ofstream outGas("gasZmu.dat", std::ios::out ) ;
|
||||
outGas.setf( std::ios::scientific, std::ios::floatfield );
|
||||
ofstream outGas("gasZmu.dat", ios::out ) ;
|
||||
outGas.setf( ios::scientific, ios::floatfield );
|
||||
G4int i ;
|
||||
G4double omega, varAngle, gamma ;
|
||||
gamma = 10000. ;
|
||||
@@ -943,11 +945,11 @@ void G4VXTRenergyLoss::GetNumberOfPhotons()
|
||||
G4int iTkin ;
|
||||
G4double gamma, numberE ;
|
||||
|
||||
std::ofstream outEn("numberE.dat", std::ios::out ) ;
|
||||
outEn.setf( std::ios::scientific, std::ios::floatfield );
|
||||
ofstream outEn("numberE.dat", ios::out ) ;
|
||||
outEn.setf( ios::scientific, ios::floatfield );
|
||||
|
||||
std::ofstream outAng("numberAng.dat", std::ios::out ) ;
|
||||
outAng.setf( std::ios::scientific, std::ios::floatfield );
|
||||
ofstream outAng("numberAng.dat", ios::out ) ;
|
||||
outAng.setf( ios::scientific, ios::floatfield );
|
||||
|
||||
for(iTkin=0;iTkin<fTotBin;iTkin++) // Lorentz factor loop
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user