Import Geant4 4.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.1 2000/11/14 16:15:01 gcosmo Exp $
|
||||
$Id: History,v 1.4 2001/11/08 13:53:51 mverderi Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,25 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
Nov 8th, 2001 M.Verderi - (parmodels-V03-02-02)
|
||||
-----------------------
|
||||
- Minor change in G4VClusterModel.cc
|
||||
|
||||
Nov 8th, 2001 G.Cosmo - (parmodels-V03-02-01)
|
||||
---------------------
|
||||
- Introduced changes in G4VClusterModel[.hh.cc] for reference-counted
|
||||
touchables (R.Chytracek).
|
||||
|
||||
Sep 18th, 2001 V.Grichine - (parmodels-V03-02-00)
|
||||
-------------------------
|
||||
- Added new classes describing X-ray transition radiation generation
|
||||
inside radiators (i.e. just along incident particle track):
|
||||
G4FoamXTRdEdx[.hh.cc], G4GamDistrXTRdEdx[.hh.cc], G4IrregularXTRdEdx[.hh.cc],
|
||||
G4PlateIrrGasXTRdEdx[.hh.cc], G4RegularXTRdEdx[.hh.cc], G4VXTRdEdx[.hh.cc]
|
||||
and G4VXrayTRadModel[.hh.cc]
|
||||
- Modifications in existing classes, introducing some new parameters,
|
||||
class fields and methods.
|
||||
|
||||
Nov 14th, 2000 G.Cosmo - (parmodels-V02-00-00)
|
||||
----------------------
|
||||
- Created.
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4FoamXTRdEdx.hh,v 1.2 2001/07/11 10:01:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Rough model describing a radiator of X-ray transition radiation.
|
||||
// Thicknesses of plates and gas gaps are exponentially distributed.
|
||||
// We suppose that:
|
||||
// formation zone ~ mean thickness << absorption length
|
||||
// for each material and in the range 1-100 keV. This allows us to simplify
|
||||
// interference effects in radiator stack (GetStackFactor method).
|
||||
//
|
||||
//
|
||||
// History:
|
||||
// 27.02.01 V. Grichine, first version
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4FoamXTRdEdx_h
|
||||
#define G4FoamXTRdEdx_h 1
|
||||
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
// #include "G4ForwardXrayTR.hh"
|
||||
|
||||
#include "G4VXTRdEdx.hh"
|
||||
|
||||
class G4FoamXTRdEdx : public G4VXTRdEdx
|
||||
{
|
||||
public:
|
||||
|
||||
G4FoamXTRdEdx (G4LogicalVolume *anEnvelope,G4double,G4double);
|
||||
~G4FoamXTRdEdx ();
|
||||
|
||||
// Pure virtual function from base class
|
||||
|
||||
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4FoamXrayTRmodel.hh,v 1.1.4.1 2001/06/28 19:10:33 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4FoamXrayTRmodel.hh,v 1.3 2001/07/11 10:01:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -46,9 +46,9 @@
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
// #include "G4ForwardXrayTR.hh"
|
||||
|
||||
#include "G4VXrayTRmodel.hh"
|
||||
#include "G4VXrayTRadModel.hh"
|
||||
|
||||
class G4FoamXrayTRmodel : public G4VXrayTRmodel
|
||||
class G4FoamXrayTRmodel : public G4VXrayTRadModel
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4GamDistrXTRdEdx.hh,v 1.2 2001/07/11 10:01:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Rough model describing a radiator of X-ray transition radiation.
|
||||
// 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)
|
||||
//
|
||||
// G(alpha) is Euler's gamma function.
|
||||
// Plates have mean <x> = fPlateThick > 0 and power alpha = fAlphaPlate > 0 :
|
||||
// Gas gaps have mean <x> = fGasThick > 0 and power alpha = fAlphaGas > 0 :
|
||||
// We suppose that:
|
||||
// formation zone ~ mean thickness << absorption length
|
||||
// for each material and in the range 1-100 keV. This allows us to simplify
|
||||
// interference effects in radiator stack (GetStackFactor method).
|
||||
//
|
||||
//
|
||||
// History:
|
||||
// 27.02.01 V. Grichine, first version
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4GamDistrXTRdEdx_h
|
||||
#define G4GamDistrXTRdEdx_h 1
|
||||
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
// #include "G4ForwardXrayTR.hh"
|
||||
|
||||
#include "G4VXTRdEdx.hh"
|
||||
|
||||
class G4GamDistrXTRdEdx : public G4VXTRdEdx
|
||||
{
|
||||
public:
|
||||
|
||||
G4GamDistrXTRdEdx (G4LogicalVolume *anEnvelope,
|
||||
G4double,G4double,
|
||||
G4double,G4double );
|
||||
~G4GamDistrXTRdEdx ();
|
||||
|
||||
// Pure virtual function from base class
|
||||
|
||||
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
|
||||
|
||||
private:
|
||||
|
||||
G4double fAlphaPlate, fAlphaGas ;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4GamDistrXrayTRmodel.hh,v 1.1.4.1 2001/06/28 19:10:33 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4GamDistrXrayTRmodel.hh,v 1.3 2001/07/11 10:01:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -53,9 +53,9 @@
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
// #include "G4ForwardXrayTR.hh"
|
||||
|
||||
#include "G4VXrayTRmodel.hh"
|
||||
#include "G4VXrayTRadModel.hh"
|
||||
|
||||
class G4GamDistrXrayTRmodel : public G4VXrayTRmodel
|
||||
class G4GamDistrXrayTRmodel : public G4VXrayTRadModel
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4IrregularXTRdEdx.hh,v 1.2 2001/07/11 10:01:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Very rough model describing a radiator of X-ray transition radiation.
|
||||
// Thicknesses of plates and gas gaps are exponentially distributed.
|
||||
// We suppose that:
|
||||
// formation zone << mean thickness << absorption length
|
||||
// for each material and in the range 1-100 keV. This allows us to simplify
|
||||
// essentially interference effects in radiator stack (GetStackFactor method).
|
||||
// The price is decreasing of X-ray TR photon yield.
|
||||
//
|
||||
// History:
|
||||
// 27.02.01 V. Grichine first version
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4IrregularXTRdEdx_h
|
||||
#define G4IrregularXTRdEdx_h 1
|
||||
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
#include "G4VXTRdEdx.hh"
|
||||
|
||||
class G4IrregularXTRdEdx : public G4VXTRdEdx
|
||||
{
|
||||
public:
|
||||
|
||||
G4IrregularXTRdEdx (G4LogicalVolume *anEnvelope,G4double,G4double);
|
||||
~G4IrregularXTRdEdx();
|
||||
|
||||
// Pure virtual function from base class
|
||||
|
||||
// void DoIt(const G4FastTrack&, G4FastStep&);
|
||||
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IrregularXrayTRmodel.hh,v 1.1.4.1 2001/06/28 19:10:33 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4IrregularXrayTRmodel.hh,v 1.3 2001/07/11 10:01:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -47,9 +47,9 @@
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
// #include "G4ForwardXrayTR.hh"
|
||||
|
||||
#include "G4VXrayTRmodel.hh"
|
||||
#include "G4VXrayTRadModel.hh"
|
||||
|
||||
class G4IrregularXrayTRmodel : public G4VXrayTRmodel
|
||||
class G4IrregularXrayTRmodel : public G4VXrayTRadModel
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PAIclusterModel.hh,v 1.1.4.1 2001/06/28 19:10:33 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4PAIclusterModel.hh,v 1.3 2001/09/18 09:30:26 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -46,7 +46,6 @@
|
||||
#include "G4Step.hh"
|
||||
#include "G4VTouchable.hh"
|
||||
#include "G4TouchableHistory.hh"
|
||||
#include <g4rw/tvordvec.h>
|
||||
|
||||
|
||||
class G4PAIclusterModel : public G4VClusterModel
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhotoClusterModel.hh,v 1.1.4.1 2001/06/28 19:10:34 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4PhotoClusterModel.hh,v 1.3 2001/09/18 09:30:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -46,7 +46,6 @@
|
||||
#include "G4Step.hh"
|
||||
#include "G4VTouchable.hh"
|
||||
#include "G4TouchableHistory.hh"
|
||||
#include <g4rw/tvordvec.h>
|
||||
|
||||
|
||||
class G4PhotoClusterModel : public G4VClusterModel
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PlateIrrGasXTRdEdx.hh,v 1.2 2001/07/11 10:01:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Model describing a radiator of X-ray transition radiation.
|
||||
// Thicknesses of plates is fixed while gas gaps are fully irregular.
|
||||
// We suppose that:
|
||||
// formation zone ~ mean thickness << absorption length
|
||||
// for each material and in the range 1-100 keV. This allows us to simplify
|
||||
// interference effects in radiator stack (GetStackFactor method).
|
||||
//
|
||||
//
|
||||
// History:
|
||||
// 27.02.01 V. Grichine, first version
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4PlateIrrGasXTRdEdx_h
|
||||
#define G4PlateIrrGasXTRdEdx_h 1
|
||||
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
#include "G4VXTRdEdx.hh"
|
||||
|
||||
class G4PlateIrrGasXTRdEdx : public G4VXTRdEdx
|
||||
{
|
||||
public:
|
||||
|
||||
G4PlateIrrGasXTRdEdx (G4LogicalVolume *anEnvelope,G4double,G4double);
|
||||
~G4PlateIrrGasXTRdEdx ();
|
||||
|
||||
// Pure virtual function from base class
|
||||
|
||||
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PlateIrrGasXrayTRmodel.hh,v 1.1.4.1 2001/06/28 19:10:34 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4PlateIrrGasXrayTRmodel.hh,v 1.3 2001/07/11 10:01:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -46,9 +46,9 @@
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
// #include "G4ForwardXrayTR.hh"
|
||||
|
||||
#include "G4VXrayTRmodel.hh"
|
||||
#include "G4VXrayTRadModel.hh"
|
||||
|
||||
class G4PlateIrrGasXrayTRmodel : public G4VXrayTRmodel
|
||||
class G4PlateIrrGasXrayTRmodel : public G4VXrayTRadModel
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4RegularXTRdEdx.hh,v 1.2 2001/07/11 10:01:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Model describing a radiator of X-ray transition radiation.
|
||||
// Thicknesses of plates and gas gaps are fixed.
|
||||
// We suppose that:
|
||||
// formation zone ~ mean thickness << absorption length
|
||||
// for each material and in the range 1-100 keV. This allows us to simplify
|
||||
// interference effects in radiator stack (GetStackFactor method).
|
||||
//
|
||||
//
|
||||
// History:
|
||||
// 27.02.01 V. Grichine, first version
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4RegularXTRdEdx_h
|
||||
#define G4RegularXTRdEdx_h 1
|
||||
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
#include "G4VXTRdEdx.hh"
|
||||
|
||||
class G4RegularXTRdEdx : public G4VXTRdEdx
|
||||
{
|
||||
public:
|
||||
|
||||
G4RegularXTRdEdx (G4LogicalVolume *anEnvelope,G4double,G4double);
|
||||
~G4RegularXTRdEdx ();
|
||||
|
||||
// Pure virtual function from base class
|
||||
|
||||
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RegularXrayTRmodel.hh,v 1.1.4.1 2001/06/28 19:10:34 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4RegularXrayTRmodel.hh,v 1.3 2001/07/11 10:01:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -46,9 +46,9 @@
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
// #include "G4ForwardXrayTR.hh"
|
||||
|
||||
#include "G4VXrayTRmodel.hh"
|
||||
#include "G4VXrayTRadModel.hh"
|
||||
|
||||
class G4RegularXrayTRmodel : public G4VXrayTRmodel
|
||||
class G4RegularXrayTRmodel : public G4VXrayTRadModel
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VClusterModel.hh,v 1.1.4.1 2001/06/28 19:10:34 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VClusterModel.hh,v 1.4 2001/11/07 10:27:21 radoone Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -44,9 +44,9 @@
|
||||
#include "G4PAIonisation.hh"
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4VTouchable.hh"
|
||||
#include "G4TouchableHistory.hh"
|
||||
#include <g4rw/tvordvec.h>
|
||||
#include "G4TouchableHandle.hh"
|
||||
#include "G4TouchableHistoryHandle.hh"
|
||||
#include "g4std/vector"
|
||||
|
||||
|
||||
class G4VClusterModel : public G4VFastSimulationModel
|
||||
@@ -78,12 +78,13 @@ protected:
|
||||
G4StepPoint* fFakePreStepPoint ;
|
||||
G4StepPoint* fFakePostStepPoint ;
|
||||
|
||||
G4VTouchable* fTouchable ;
|
||||
G4TouchableHandle fTouchable ;
|
||||
|
||||
G4Navigator* fNavigator ;
|
||||
G4bool fNavigatorSetup ;
|
||||
|
||||
G4RWTValOrderedVector<G4ThreeVector> fClusterPositionVector ;
|
||||
G4RWTValOrderedVector<G4double> fClusterEnergyVector ;
|
||||
G4std::vector<G4ThreeVector> fClusterPositionVector ;
|
||||
G4std::vector<G4double> fClusterEnergyVector ;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VXTRdEdx.hh,v 1.5 2001/09/18 09:02:00 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// base class for 'fast' parametrisation model describing X-ray transition
|
||||
// created in some G4Envelope. Anglur distribuiton is very rough !!! (see DoIt
|
||||
// method
|
||||
//
|
||||
// History:
|
||||
// 26.02.01 V. Grichine first version
|
||||
// 26.02.01 V. Grichine, DoIt was transformed from virtual
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4VXTRdEdx_h
|
||||
#define G4VXTRdEdx_h 1
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
#include "templates.hh"
|
||||
#include "g4std/complex"
|
||||
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
#include "G4VXrayTRmodel.hh"
|
||||
|
||||
|
||||
class G4VXTRdEdx : public G4VXrayTRmodel
|
||||
{
|
||||
public:
|
||||
|
||||
G4VXTRdEdx (G4LogicalVolume *anEnvelope,G4double,G4double);
|
||||
virtual ~G4VXTRdEdx ();
|
||||
|
||||
// Pure virtual functions from base class
|
||||
|
||||
void DoIt(const G4FastTrack&, G4FastStep&) ;
|
||||
|
||||
// Pure virtuals must be implemented in inherited particular TR radiators
|
||||
|
||||
virtual G4double GetStackFactor( G4double energy, G4double gamma,
|
||||
G4double varAngle ) = 0 ;
|
||||
|
||||
protected:
|
||||
|
||||
void BuildTable() ;
|
||||
void BuildEnergyTable() ;
|
||||
void BuildAngleTable() ;
|
||||
|
||||
G4complex OneInterfaceXTRdEdx( G4double energy,
|
||||
G4double gamma,
|
||||
G4double varAngle ) ;
|
||||
|
||||
G4double SpectralAngleXTRdEdx(G4double varAngle) ;
|
||||
|
||||
G4double SpectralXTRdEdx(G4double energy) ;
|
||||
|
||||
G4double AngleSpectralXTRdEdx(G4double energy) ;
|
||||
|
||||
G4double AngleXTRdEdx(G4double varAngle) ;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VXrayTRadModel.hh,v 1.2 2001/07/11 10:01:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// base class for 'fast' parametrisation model describing X-ray transition
|
||||
// created in some G4Envelope. Anglur distribuiton is very rough !!! (see DoIt
|
||||
// method
|
||||
//
|
||||
// History:
|
||||
// 26.02.01 V. Grichine first version
|
||||
// 26.02.01 V. Grichine, DoIt was transformed from virtual
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4VXrayTRadModel_h
|
||||
#define G4VXrayTRadModel_h 1
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
#include "templates.hh"
|
||||
#include "g4std/complex"
|
||||
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
#include "G4VXrayTRmodel.hh"
|
||||
|
||||
|
||||
class G4VXrayTRadModel : public G4VXrayTRmodel
|
||||
{
|
||||
public:
|
||||
|
||||
G4VXrayTRadModel (G4LogicalVolume *anEnvelope,G4double,G4double);
|
||||
virtual ~G4VXrayTRadModel ();
|
||||
|
||||
// Pure virtual functions from base class
|
||||
|
||||
void DoIt(const G4FastTrack&, G4FastStep&) ;
|
||||
|
||||
// Pure virtuals must be implemented in inherited particular TR radiators
|
||||
|
||||
virtual G4double GetStackFactor( G4double energy, G4double gamma,
|
||||
G4double varAngle ) = 0 ;
|
||||
|
||||
|
||||
void BuildTable() ;
|
||||
void BuildEnergyTable() ;
|
||||
void BuildAngleTable() ;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VXrayTRmodel.hh,v 1.1.4.1 2001/06/28 19:10:34 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VXrayTRmodel.hh,v 1.3 2001/07/11 10:01:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -43,6 +43,8 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include "templates.hh"
|
||||
#include "g4std/complex"
|
||||
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4Gamma.hh"
|
||||
@@ -66,7 +68,7 @@ public:
|
||||
|
||||
// Pure virtuals must be implemented in inherited particular TR radiators
|
||||
|
||||
void DoIt(const G4FastTrack&, G4FastStep&) ;
|
||||
virtual void DoIt(const G4FastTrack&, G4FastStep&) = 0 ;
|
||||
|
||||
virtual G4double GetStackFactor( G4double energy, G4double gamma,
|
||||
G4double varAngle ) = 0 ;
|
||||
@@ -75,9 +77,6 @@ public:
|
||||
G4double gamma,
|
||||
G4double varAngle ) const ;
|
||||
|
||||
void BuildTable() ;
|
||||
void BuildEnergyTable() ;
|
||||
void BuildAngleTable() ;
|
||||
|
||||
// for photon energy distribution tables
|
||||
|
||||
@@ -95,17 +94,19 @@ public:
|
||||
|
||||
// Auxiliary functions for plate/gas material parameters
|
||||
|
||||
G4double GetPlateFormationZone(G4double,G4double,G4double) ;
|
||||
void ComputePlatePhotoAbsCof() ;
|
||||
G4double GetPlateLinearPhotoAbs(G4double) ;
|
||||
void GetPlateZmuProduct() ;
|
||||
G4double GetPlateZmuProduct(G4double,G4double,G4double) ;
|
||||
G4double GetPlateFormationZone(G4double,G4double,G4double) ;
|
||||
G4complex GetPlateComplexFZ(G4double,G4double,G4double) ;
|
||||
void ComputePlatePhotoAbsCof() ;
|
||||
G4double GetPlateLinearPhotoAbs(G4double) ;
|
||||
void GetPlateZmuProduct() ;
|
||||
G4double GetPlateZmuProduct(G4double,G4double,G4double) ;
|
||||
|
||||
G4double GetGasFormationZone(G4double,G4double,G4double) ;
|
||||
void ComputeGasPhotoAbsCof() ;
|
||||
G4double GetGasLinearPhotoAbs(G4double) ;
|
||||
void GetGasZmuProduct() ;
|
||||
G4double GetGasZmuProduct(G4double,G4double,G4double) ;
|
||||
G4double GetGasFormationZone(G4double,G4double,G4double) ;
|
||||
G4complex GetGasComplexFZ(G4double,G4double,G4double) ;
|
||||
void ComputeGasPhotoAbsCof() ;
|
||||
G4double GetGasLinearPhotoAbs(G4double) ;
|
||||
void GetGasZmuProduct() ;
|
||||
G4double GetGasZmuProduct(G4double,G4double,G4double) ;
|
||||
|
||||
G4double GetXTRrandomEnergy( G4double scaledTkin, G4int iTkin ) ;
|
||||
G4double GetXTRenergy( G4int iPlace, G4double position, G4int iTransfer ) ;
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4FoamXTRdEdx.cc,v 1.3 2001/09/18 09:02:02 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "g4std/complex"
|
||||
|
||||
#include "G4FoamXTRdEdx.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor, destructor
|
||||
|
||||
G4FoamXTRdEdx::G4FoamXTRdEdx(G4Envelope *anEnvelope,
|
||||
G4double a, G4double b) :
|
||||
G4VXTRdEdx(anEnvelope,a,b)
|
||||
{
|
||||
G4cout<<"Foam XTR dE/dx model is called"<<G4endl ;
|
||||
|
||||
// Build energy and angular integral spectra of X-ray TR photons inside
|
||||
// a radiator
|
||||
|
||||
BuildTable() ;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4FoamXTRdEdx::~G4FoamXTRdEdx()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Rough approximation for radiator interference factor for the case of
|
||||
// fully Foam radiator. The plate and gas gap thicknesses are distributed
|
||||
// according to exponent. The mean values of the plate and gas gap thicknesses
|
||||
// are supposed to be about XTR formation zones but much less than
|
||||
// mean absorption length of XTR photons in coresponding material.
|
||||
|
||||
G4double
|
||||
G4FoamXTRdEdx::GetStackFactor( G4double energy, G4double gamma, G4double varAngle )
|
||||
{
|
||||
G4double result, Za, Zb, Ma, Mb ;
|
||||
|
||||
Za = GetPlateFormationZone(energy,gamma,varAngle) ;
|
||||
Zb = GetGasFormationZone(energy,gamma,varAngle) ;
|
||||
|
||||
Ma = GetPlateLinearPhotoAbs(energy) ;
|
||||
Mb = GetGasLinearPhotoAbs(energy) ;
|
||||
|
||||
G4complex Ca(1.0+0.5*fPlateThick*Ma,fPlateThick/Za) ;
|
||||
G4complex Cb(1.0+0.5*fGasThick*Mb,fGasThick/Zb) ;
|
||||
|
||||
G4complex Ha = 1.0/Ca ;
|
||||
G4complex Hb = 1.0/Cb ;
|
||||
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 - G4std::pow(H,fPlateNumber)) ;
|
||||
|
||||
G4complex R = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle) ;
|
||||
|
||||
result = 2.0*G4std::real(R) ;
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4FoamXrayTRmodel.cc,v 1.1.4.1 2001/06/28 19:10:34 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4FoamXrayTRmodel.cc,v 1.3 2001/07/11 10:01:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "g4std/complex"
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
G4FoamXrayTRmodel::G4FoamXrayTRmodel(G4Envelope *anEnvelope,
|
||||
G4double a, G4double b) :
|
||||
G4VXrayTRmodel(anEnvelope,a,b)
|
||||
G4VXrayTRadModel(anEnvelope,a,b)
|
||||
{
|
||||
G4cout<<"Foam X-ray TR radiator model is called"<<G4endl ;
|
||||
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4GamDistrXTRdEdx.cc,v 1.3 2001/09/18 09:02:02 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "g4std/complex"
|
||||
|
||||
#include "G4GamDistrXTRdEdx.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor, destructor
|
||||
|
||||
G4GamDistrXTRdEdx::G4GamDistrXTRdEdx(G4Envelope *anEnvelope,
|
||||
G4double a, G4double alphaPlate,
|
||||
G4double b, G4double alphaGas) :
|
||||
G4VXTRdEdx(anEnvelope,a,b)
|
||||
{
|
||||
G4cout<<"Gammma distributed X-ray TR radiator model is called"<<G4endl ;
|
||||
|
||||
// Build energy and angular integral spectra of X-ray TR photons from
|
||||
// a radiator
|
||||
|
||||
fAlphaPlate = alphaPlate ;
|
||||
fAlphaGas = alphaGas ;
|
||||
G4cout<<"fAlphaPlate = "<<fAlphaPlate<<" ; fAlphaGas = "<<fAlphaGas<<G4endl ;
|
||||
|
||||
BuildTable() ;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4GamDistrXTRdEdx::~G4GamDistrXTRdEdx()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Rough approximation for radiator interference factor for the case of
|
||||
// fully GamDistr radiator. The plate and gas gap thicknesses are distributed
|
||||
// according to exponent. The mean values of the plate and gas gap thicknesses
|
||||
// are supposed to be about XTR formation zones but much less than
|
||||
// mean absorption length of XTR photons in coresponding material.
|
||||
|
||||
G4double
|
||||
G4GamDistrXTRdEdx::GetStackFactor( G4double energy,
|
||||
G4double gamma, G4double varAngle )
|
||||
{
|
||||
G4double result, Za, Zb, Ma, Mb ;
|
||||
|
||||
Za = GetPlateFormationZone(energy,gamma,varAngle) ;
|
||||
Zb = GetGasFormationZone(energy,gamma,varAngle) ;
|
||||
|
||||
Ma = GetPlateLinearPhotoAbs(energy) ;
|
||||
Mb = GetGasLinearPhotoAbs(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 = G4std::pow(Ca,-fAlphaPlate) ;
|
||||
G4complex Hb = G4std::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 - G4std::pow(H,fPlateNumber)) ;
|
||||
|
||||
G4complex R = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle) ;
|
||||
|
||||
result = 2.0*G4std::real(R) ;
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4GamDistrXrayTRmodel.cc,v 1.1.4.1 2001/06/28 19:10:34 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4GamDistrXrayTRmodel.cc,v 1.3 2001/07/11 10:01:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "g4std/complex"
|
||||
@@ -39,7 +39,7 @@
|
||||
G4GamDistrXrayTRmodel::G4GamDistrXrayTRmodel(G4Envelope *anEnvelope,
|
||||
G4double a, G4double alphaPlate,
|
||||
G4double b, G4double alphaGas) :
|
||||
G4VXrayTRmodel(anEnvelope,a,b)
|
||||
G4VXrayTRadModel(anEnvelope,a,b)
|
||||
{
|
||||
G4cout<<"Gammma distributed X-ray TR radiator model is called"<<G4endl ;
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4IrregularXTRdEdx.cc,v 1.3 2001/09/18 09:02:02 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
|
||||
|
||||
#include "G4IrregularXTRdEdx.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor, destructor
|
||||
|
||||
G4IrregularXTRdEdx::G4IrregularXTRdEdx(G4Envelope *anEnvelope,
|
||||
G4double a, G4double b) :
|
||||
G4VXTRdEdx(anEnvelope,a,b)
|
||||
{
|
||||
G4cout<<"Irregular X-ray TR dE/dx model is called"<<G4endl ;
|
||||
|
||||
// Build energy and angular integral spectra of X-ray TR photons inside
|
||||
// a radiator
|
||||
|
||||
BuildTable() ;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4IrregularXTRdEdx::~G4IrregularXTRdEdx()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Very rough approximation for radiator interference factor for the case of
|
||||
// fully irregular radiator. The plate and gas gap thicknesses are distributed
|
||||
// according to exponent. The mean values of the plate and gas gap thicknesses
|
||||
// are supposed to be much more than XTR formation zones but much less than
|
||||
// mean absorption length of XTR photons in coresponding material.
|
||||
|
||||
G4double
|
||||
G4IrregularXTRdEdx::GetStackFactor( G4double energy,
|
||||
G4double gamma, G4double varAngle )
|
||||
{
|
||||
G4double result ;
|
||||
|
||||
G4complex R = OneInterfaceXTRdEdx(energy,gamma,varAngle)
|
||||
* G4double(fPlateNumber) ;
|
||||
result = 2.0*G4std::real(R) ;
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IrregularXrayTRmodel.cc,v 1.1.4.1 2001/06/28 19:10:34 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4IrregularXrayTRmodel.cc,v 1.4 2001/09/18 09:02:02 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
G4IrregularXrayTRmodel::G4IrregularXrayTRmodel(G4Envelope *anEnvelope,
|
||||
G4double a, G4double b) :
|
||||
G4VXrayTRmodel(anEnvelope,a,b)
|
||||
G4VXrayTRadModel(anEnvelope,a,b)
|
||||
{
|
||||
G4cout<<"Irregular X-ray TR model is called"<<G4endl ;
|
||||
|
||||
@@ -224,7 +224,7 @@ G4IrregularXrayTRmodel::GetStackFactor( G4double energy,
|
||||
|
||||
factor = plateFactor*gasFactor ;
|
||||
|
||||
result = ( 1 - pow(factor,fPlateNumber) )/( 1 - factor ) ;
|
||||
result = ( 1 - pow(factor,G4double(fPlateNumber)) )/( 1 - factor ) ;
|
||||
|
||||
result *= 1 + plateFactor ;
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PAIclusterModel.cc,v 1.1.4.1 2001/06/28 19:10:34 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4PAIclusterModel.cc,v 1.6 2001/09/18 09:30:30 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4Timer.hh"
|
||||
@@ -65,7 +65,7 @@ G4PAIclusterModel::~G4PAIclusterModel()
|
||||
|
||||
G4bool G4PAIclusterModel::IsApplicable(const G4ParticleDefinition& particle)
|
||||
{
|
||||
return ( particle.GetPDGCharge() != 0.0 ) ;
|
||||
return ( particle.GetPDGCharge() != 0.0 && particle.GetPDGMass() != 0 ) ;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
@@ -81,10 +81,12 @@ G4bool G4PAIclusterModel::IsApplicable(const G4ParticleDefinition& particle)
|
||||
|
||||
G4bool G4PAIclusterModel::ModelTrigger(const G4FastTrack& fastTrack)
|
||||
{
|
||||
// if (gamma >= 100.0) return true ;
|
||||
// else return false ;
|
||||
|
||||
return true ;
|
||||
G4double kinEnergy, mass, gamma ;
|
||||
kinEnergy = fastTrack.GetPrimaryTrack()->GetKineticEnergy() ;
|
||||
mass = fastTrack.GetPrimaryTrack()->GetDefinition()->GetPDGMass() ;
|
||||
gamma = 1.0 + kinEnergy/mass ;
|
||||
if (gamma >= 1.2) return true ;
|
||||
else return false ;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
@@ -95,9 +97,13 @@ void G4PAIclusterModel::DoIt( const G4FastTrack& fastTrack ,
|
||||
G4FastStep& fastStep )
|
||||
{
|
||||
G4double charge, charge2, kinEnergy, mass, massRatio, scaledTkin ;
|
||||
G4double distance, energyTransfer, energyLoss, lambda, step, stepSum = 0.0 ;
|
||||
G4double distance, energyTransfer, lambda, step, stepSum = 0.0 ;
|
||||
G4double energyLoss = 0.0 ;
|
||||
G4ThreeVector clusterPosition ;
|
||||
|
||||
fClusterPositionVector.clear() ;
|
||||
fClusterEnergyVector.clear() ;
|
||||
|
||||
charge = fastTrack.GetPrimaryTrack()->GetDefinition()->GetPDGCharge() ;
|
||||
charge2 = charge*charge ;
|
||||
kinEnergy = fastTrack.GetPrimaryTrack()->GetKineticEnergy() ;
|
||||
@@ -123,8 +129,9 @@ void G4PAIclusterModel::DoIt( const G4FastTrack& fastTrack ,
|
||||
step = RandExponential::shoot(lambda) ;
|
||||
// if (step < 0.0) step = 0.0 ;
|
||||
stepSum += step ;
|
||||
distance -= stepSum ;
|
||||
if(distance < 0.0) // no change, return
|
||||
// distance -= stepSum ;
|
||||
// if(distance < 0.0) // no change, return
|
||||
if(stepSum > distance ) // no change, return
|
||||
{
|
||||
return ;
|
||||
}
|
||||
@@ -135,7 +142,8 @@ void G4PAIclusterModel::DoIt( const G4FastTrack& fastTrack ,
|
||||
G4ParticleMomentum globalDirection = fastTrack.GetPrimaryTrack()->
|
||||
GetMomentumDirection() ;
|
||||
|
||||
while(distance >= 0.0) // global (or local ?) cluster coordinates
|
||||
// while(distance >= 0.0)
|
||||
while(stepSum <= distance ) // global (or local ?) cluster coordinates
|
||||
{
|
||||
// clusterPosition = fastTrack.GetPrimaryTrackLocalPosition() +
|
||||
// stepSum*direction ;
|
||||
@@ -143,12 +151,13 @@ void G4PAIclusterModel::DoIt( const G4FastTrack& fastTrack ,
|
||||
clusterPosition = globalStartPosition + stepSum*globalDirection ;
|
||||
energyTransfer = fPAIonisation->GetRandomEnergyTransfer(scaledTkin) ;
|
||||
|
||||
fClusterPositionVector.insert(clusterPosition) ;
|
||||
fClusterEnergyVector.insert(energyTransfer) ;
|
||||
fClusterPositionVector.push_back(clusterPosition) ;
|
||||
fClusterEnergyVector.push_back(energyTransfer) ;
|
||||
|
||||
step = RandExponential::shoot(lambda) ;
|
||||
// if (step < 0.0) step = 0.0 ;
|
||||
stepSum += step ;
|
||||
distance -= step ;
|
||||
// distance -= step ;
|
||||
energyLoss += energyTransfer ;
|
||||
}
|
||||
kinEnergy -= energyLoss ;
|
||||
@@ -168,3 +177,11 @@ void G4PAIclusterModel::DoIt( const G4FastTrack& fastTrack ,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhotoClusterModel.cc,v 1.1.4.1 2001/06/28 19:10:34 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4PhotoClusterModel.cc,v 1.3 2001/09/18 09:30:31 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4Timer.hh"
|
||||
@@ -137,8 +137,8 @@ void G4PhotoClusterModel::DoIt( const G4FastTrack& fastTrack ,
|
||||
// stepSum*direction ;
|
||||
|
||||
clusterPosition = globalStartPosition + step*globalDirection ;
|
||||
fClusterPositionVector.insert(clusterPosition) ;
|
||||
fClusterEnergyVector.insert(energy) ;
|
||||
fClusterPositionVector.push_back(clusterPosition) ;
|
||||
fClusterEnergyVector.push_back(energy) ;
|
||||
|
||||
fastStep.KillPrimaryTrack();
|
||||
fastStep.SetPrimaryTrackPathLength(step);
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PlateIrrGasXTRdEdx.cc,v 1.3 2001/09/18 09:02:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "g4std/complex"
|
||||
|
||||
#include "G4PlateIrrGasXTRdEdx.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor, destructor
|
||||
|
||||
G4PlateIrrGasXTRdEdx::G4PlateIrrGasXTRdEdx(G4Envelope *anEnvelope,
|
||||
G4double a, G4double b) :
|
||||
G4VXTRdEdx(anEnvelope,a,b)
|
||||
{
|
||||
G4cout<<"PlateIrrGas X-ray TR radiator model is called"<<G4endl ;
|
||||
|
||||
// Build energy and angular integral spectra of X-ray TR photons from
|
||||
// a radiator
|
||||
|
||||
BuildTable() ;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PlateIrrGasXTRdEdx::~G4PlateIrrGasXTRdEdx()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Approximation for radiator interference factor for the case of
|
||||
// fully PlateIrrGas radiator. The plate thickness is fixed .
|
||||
// The mean values of gas gap thicknesses
|
||||
// are supposed to be about XTR formation zones but much less than
|
||||
// mean absorption length of XTR photons in coresponding material.
|
||||
|
||||
G4double
|
||||
G4PlateIrrGasXTRdEdx::GetStackFactor( G4double energy,
|
||||
G4double gamma, G4double varAngle )
|
||||
{
|
||||
G4double result, Za, Ma ;
|
||||
|
||||
Za = GetPlateFormationZone(energy,gamma,varAngle) ;
|
||||
Ma = GetPlateLinearPhotoAbs(energy) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// G4complex Ca(1.0+0.5*fPlateThick*Ma,fPlateThick/Za) ;
|
||||
|
||||
G4complex Ha( exp(-0.5*fPlateThick*Ma)*cos(fPlateThick/Za),
|
||||
-exp(-0.5*fPlateThick*Ma)*sin(fPlateThick/Za) ) ;
|
||||
|
||||
|
||||
G4complex R = (1.0 - Ha) ;
|
||||
|
||||
R *= G4double(fPlateNumber)*OneInterfaceXTRdEdx(energy,gamma,varAngle) ;
|
||||
|
||||
result = 2.0*G4std::real(R) ;
|
||||
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PlateIrrGasXrayTRmodel.cc,v 1.1.4.1 2001/06/28 19:10:35 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4PlateIrrGasXrayTRmodel.cc,v 1.4 2001/09/18 09:02:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "g4std/complex"
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
G4PlateIrrGasXrayTRmodel::G4PlateIrrGasXrayTRmodel(G4Envelope *anEnvelope,
|
||||
G4double a, G4double b) :
|
||||
G4VXrayTRmodel(anEnvelope,a,b)
|
||||
G4VXrayTRadModel(anEnvelope,a,b)
|
||||
{
|
||||
G4cout<<"PlateIrrGas X-ray TR radiator model is called"<<G4endl ;
|
||||
|
||||
@@ -69,7 +69,7 @@ G4double
|
||||
G4PlateIrrGasXrayTRmodel::GetStackFactor( G4double energy,
|
||||
G4double gamma, G4double varAngle )
|
||||
{
|
||||
G4double result, Qa, Qb, Q, Za, Zb, Ma, Mb ;
|
||||
G4double result, Qa, Qb, Q, Za, Ma, Mb ;
|
||||
|
||||
Za = GetPlateFormationZone(energy,gamma,varAngle) ;
|
||||
// Zb = GetGasFormationZone(energy,gamma,varAngle) ;
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4RegularXTRdEdx.cc,v 1.3 2001/09/18 09:02:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "g4std/complex"
|
||||
|
||||
#include "G4RegularXTRdEdx.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor, destructor
|
||||
|
||||
G4RegularXTRdEdx::G4RegularXTRdEdx(G4Envelope *anEnvelope,
|
||||
G4double a, G4double b) :
|
||||
G4VXTRdEdx(anEnvelope,a,b)
|
||||
{
|
||||
G4cout<<"Regular X-ray TR dE/dx radiator model is called"<<G4endl ;
|
||||
|
||||
// Build energy and angular integral spectra of X-ray TR photons from
|
||||
// a radiator
|
||||
|
||||
BuildTable() ;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4RegularXTRdEdx::~G4RegularXTRdEdx()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Approximation for radiator interference factor for the case of
|
||||
// fully Regular radiator. The plate and gas gap thicknesses are fixed .
|
||||
// The mean values of the plate and gas gap thicknesses
|
||||
// are supposed to be about XTR formation zones but much less than
|
||||
// mean absorption length of XTR photons in coresponding material.
|
||||
|
||||
G4double
|
||||
G4RegularXTRdEdx::GetStackFactor( G4double energy,
|
||||
G4double gamma, G4double varAngle )
|
||||
{
|
||||
G4double result, Qa, Qb, Q, aZa, bZb, aMa, bMb, D ;
|
||||
|
||||
aZa = fPlateThick/GetPlateFormationZone(energy,gamma,varAngle) ;
|
||||
bZb = fGasThick/GetGasFormationZone(energy,gamma,varAngle) ;
|
||||
|
||||
aMa = fPlateThick*GetPlateLinearPhotoAbs(energy) ;
|
||||
bMb = fGasThick*GetGasLinearPhotoAbs(energy) ;
|
||||
|
||||
Qa = exp(-aMa) ;
|
||||
Qb = exp(-bMb) ;
|
||||
Q = Qa*Qb ;
|
||||
|
||||
G4complex Ha( exp(-0.5*aMa)*cos(aZa),
|
||||
-exp(-0.5*aMa)*sin(aZa) ) ;
|
||||
|
||||
G4complex Hb( exp(-0.5*bMb)*cos(bZb),
|
||||
-exp(-0.5*bMb)*sin(bZb) ) ;
|
||||
|
||||
G4complex H = Ha*Hb ;
|
||||
|
||||
G4complex Hs = G4std::conj(H) ;
|
||||
|
||||
D = 1.0 /( (1 - sqrt(Q))*(1 - sqrt(Q)) +
|
||||
4*sqrt(Q)*sin(0.5*(aZa+bZb))*sin(0.5*(aZa+bZb)) ) ;
|
||||
|
||||
G4complex F1 = (1.0 - Ha)*(1.0 - Hb)*(1.0 - Hs)
|
||||
* G4double(fPlateNumber)*D ;
|
||||
|
||||
G4complex F2 = (1.0-Ha)*(1.0-Ha)*Hb*(1.0-Hs)*(1.0-Hs)
|
||||
* (1.0 - G4std::pow(H,fPlateNumber)) * D*D ;
|
||||
|
||||
G4complex R = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle) ;
|
||||
|
||||
result = 2.0*G4std::real(R) ;
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RegularXrayTRmodel.cc,v 1.1.4.1 2001/06/28 19:10:35 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4RegularXrayTRmodel.cc,v 1.3 2001/07/11 10:01:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "g4std/complex"
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
G4RegularXrayTRmodel::G4RegularXrayTRmodel(G4Envelope *anEnvelope,
|
||||
G4double a, G4double b) :
|
||||
G4VXrayTRmodel(anEnvelope,a,b)
|
||||
G4VXrayTRadModel(anEnvelope,a,b)
|
||||
{
|
||||
G4cout<<"Regular X-ray TR radiator model is called"<<G4endl ;
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VClusterModel.cc,v 1.1.4.1 2001/06/28 19:10:35 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VClusterModel.cc,v 1.6 2001/11/08 13:53:51 mverderi Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4Timer.hh"
|
||||
@@ -38,7 +38,6 @@
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "G4VTouchable.hh"
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
@@ -63,7 +62,6 @@ G4VClusterModel::G4VClusterModel(const G4String& modelName,G4Envelope *anEnvelop
|
||||
G4VClusterModel::~G4VClusterModel()
|
||||
{
|
||||
delete fFakeStep ;
|
||||
delete fTouchable ;
|
||||
delete fNavigator ;
|
||||
}
|
||||
|
||||
@@ -74,7 +72,7 @@ G4VClusterModel::~G4VClusterModel()
|
||||
|
||||
void G4VClusterModel::BuildDetectorResponse()
|
||||
{
|
||||
for( G4int i = 0 ; i < fClusterEnergyVector.entries() ; i++ )
|
||||
for( size_t i = 0 ; i < fClusterEnergyVector.size() ; i++ )
|
||||
{
|
||||
AssignClusterHit(fClusterPositionVector[i],fClusterEnergyVector[i]) ;
|
||||
}
|
||||
@@ -97,8 +95,7 @@ void G4VClusterModel::AssignClusterHit(const G4ThreeVector& position,
|
||||
// call sensitive part: taken/adapted from the stepping:
|
||||
// Send G4Step information to Hit/Dig if the volume is sensitive
|
||||
|
||||
G4VPhysicalVolume* pCurrentVolume = fFakeStep->GetPreStepPoint()->
|
||||
GetPhysicalVolume() ;
|
||||
G4VPhysicalVolume* pCurrentVolume = fFakeStep->GetPreStepPoint()->GetPhysicalVolume() ;
|
||||
G4VSensitiveDetector* pSensitive ;
|
||||
|
||||
if( pCurrentVolume != 0 )
|
||||
@@ -116,26 +113,23 @@ void G4VClusterModel::AssignClusterHit(const G4ThreeVector& position,
|
||||
void G4VClusterModel::FillFakeStep(const G4ThreeVector& position,
|
||||
G4double energy )
|
||||
{
|
||||
G4ThreeVector dummyDirection;
|
||||
// find in which volume the spot is.
|
||||
|
||||
if (!fNavigatorSetup)
|
||||
{
|
||||
fNavigator->SetWorldVolume(G4TransportationManager::GetTransportationManager()->
|
||||
GetNavigatorForTracking()->GetWorldVolume()) ;
|
||||
|
||||
fNavigator->LocateGlobalPointAndUpdateTouchable(position,fTouchable,false);
|
||||
fNavigator->SetWorldVolume(G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume()) ;
|
||||
fNavigatorSetup = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
fNavigator->LocateGlobalPointAndUpdateTouchable(position,fTouchable);
|
||||
}
|
||||
|
||||
fNavigator->LocateGlobalPointAndUpdateTouchableHandle(position,dummyDirection,fTouchable, false);
|
||||
|
||||
// Fills attribute of the G4Step needed
|
||||
// by our sensitive detector:
|
||||
//
|
||||
// set touchable volume at PreStepPoint:
|
||||
|
||||
fFakePreStepPoint->SetTouchable(fTouchable) ;
|
||||
fFakePreStepPoint->SetTouchableHandle(fTouchable) ;
|
||||
|
||||
// set total energy deposit:
|
||||
|
||||
|
||||
@@ -0,0 +1,393 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VXTRdEdx.cc,v 1.7 2001/09/18 09:02:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4Timer.hh"
|
||||
|
||||
#include "G4VXTRdEdx.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4std/complex"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4Integrator.hh"
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor, destructor
|
||||
|
||||
G4VXTRdEdx::G4VXTRdEdx(G4Envelope *anEnvelope, G4double a, G4double b) :
|
||||
G4VXrayTRmodel(anEnvelope,a,b)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4VXTRdEdx::~G4VXTRdEdx()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// The main function which is responsible for the treatment of a particle passage
|
||||
// trough G4Envelope
|
||||
|
||||
void G4VXTRdEdx::DoIt( const G4FastTrack& fastTrack ,
|
||||
G4FastStep& fastStep )
|
||||
{
|
||||
G4int iTkin, iPlace, numOfTR, iTR ;
|
||||
G4double energyTR, theta, phi, dirX, dirY, dirZ ;
|
||||
G4double W, W1, W2, E1, E2 ;
|
||||
|
||||
G4double charge = fastTrack.GetPrimaryTrack()->GetDefinition()->GetPDGCharge() ;
|
||||
|
||||
// Now we are ready to Generate TR photons
|
||||
|
||||
G4double chargeSq = charge*charge ;
|
||||
G4double kinEnergy = fastTrack.GetPrimaryTrack()->GetKineticEnergy() ;
|
||||
G4double mass = fastTrack.GetPrimaryTrack()->GetDefinition()->GetPDGMass() ;
|
||||
G4double gamma = 1.0 + kinEnergy/mass ;
|
||||
// G4cout<<"gamma = "<<gamma<<G4endl ;
|
||||
G4double massRatio = proton_mass_c2/mass ;
|
||||
G4double TkinScaled = kinEnergy*massRatio ;
|
||||
|
||||
G4ParticleMomentum direction(fastTrack.GetPrimaryTrackLocalDirection());
|
||||
|
||||
G4double distance = fastTrack.GetEnvelopeSolid()->
|
||||
DistanceToOut(fastTrack.GetPrimaryTrackLocalPosition(),
|
||||
direction) ;
|
||||
|
||||
G4ThreeVector position = fastTrack.GetPrimaryTrackLocalPosition() +
|
||||
distance*direction ;
|
||||
|
||||
// Set final position:
|
||||
|
||||
fastStep.SetPrimaryTrackFinalPosition(position);
|
||||
|
||||
|
||||
for(iTkin=0;iTkin<fTotBin;iTkin++)
|
||||
{
|
||||
if(TkinScaled < fProtonEnergyVector->GetLowEdgeEnergy(iTkin)) break ;
|
||||
}
|
||||
iPlace = iTkin - 1 ;
|
||||
|
||||
// G4ParticleMomentum particleDir = fastTrack.GetPrimaryTrack()->
|
||||
// GetMomentumDirection() ;
|
||||
|
||||
if(iTkin == 0) // Tkin is too small, neglect of TR photon generation
|
||||
{
|
||||
return ;
|
||||
}
|
||||
else // general case: Tkin between two vectors of the material
|
||||
{
|
||||
if(iTkin == fTotBin)
|
||||
{
|
||||
numOfTR = RandPoisson::shoot( (*(*fEnergyDistrTable)(iPlace))(0)*chargeSq ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
E1 = fProtonEnergyVector->GetLowEdgeEnergy(iTkin - 1) ;
|
||||
E2 = fProtonEnergyVector->GetLowEdgeEnergy(iTkin) ;
|
||||
W = 1.0/(E2 - E1) ;
|
||||
W1 = (E2 - TkinScaled)*W ;
|
||||
W2 = (TkinScaled - E1)*W ;
|
||||
numOfTR = RandPoisson::shoot( ( (*(*fEnergyDistrTable)(iPlace))(0)*W1+
|
||||
(*(*fEnergyDistrTable)(iPlace+1))(0)*W2 )
|
||||
*chargeSq ) ;
|
||||
}
|
||||
|
||||
// G4cout<<iTkin<<" mean TR number = "<<(((*(*fEnergyDistrTable)(iPlace))(0)+
|
||||
// (*(*fAngleDistrTable)(iPlace))(0))*W1 +
|
||||
// ((*(*fEnergyDistrTable)(iPlace + 1))(0)+
|
||||
// (*(*fAngleDistrTable)(iPlace + 1))(0))*W2)
|
||||
// *chargeSq*0.5<<endl ;
|
||||
|
||||
if( numOfTR == 0 ) // no change, return
|
||||
{
|
||||
return ;
|
||||
}
|
||||
else
|
||||
{
|
||||
// G4cout<<"Number of X-ray TR photons = "<<numOfTR<<endl ;
|
||||
|
||||
fastStep.SetNumberOfSecondaries(numOfTR);
|
||||
|
||||
G4double sumEnergyTR = 0.0 ;
|
||||
|
||||
for(iTR=0;iTR<numOfTR;iTR++)
|
||||
{
|
||||
|
||||
// energyPos = ((*(*fEnergyDistrTable)(iPlace))(0)*W1+
|
||||
// (*(*fEnergyDistrTable)(iPlace + 1))(0)*W2)*G4UniformRand() ;
|
||||
// for(iTransfer=0;iTransfer<fBinTR-1;iTransfer++)
|
||||
// {
|
||||
// if(energyPos >= ((*(*fEnergyDistrTable)(iPlace))(iTransfer)*W1+
|
||||
// (*(*fEnergyDistrTable)(iPlace + 1))(iTransfer)*W2)) break ;
|
||||
// }
|
||||
// energyTR = ((*fEnergyDistrTable)(iPlace)->GetLowEdgeEnergy(iTransfer))*W1+
|
||||
// ((*fEnergyDistrTable)(iPlace + 1)->GetLowEdgeEnergy(iTransfer))*W2 ;
|
||||
|
||||
energyTR = GetXTRrandomEnergy(TkinScaled,iTkin) ;
|
||||
|
||||
// G4cout<<"energyTR = "<<energyTR/keV<<"keV"<<endl ;
|
||||
|
||||
sumEnergyTR += energyTR ;
|
||||
|
||||
theta = abs(G4RandGauss::shoot(0.0,pi/gamma)) ;
|
||||
|
||||
if( theta >= 0.1 ) theta = 0.1 ;
|
||||
|
||||
// G4cout<<" : theta = "<<theta<<endl ;
|
||||
|
||||
phi = twopi*G4UniformRand() ;
|
||||
|
||||
dirX = sin(theta)*cos(phi) ;
|
||||
dirY = sin(theta)*sin(phi) ;
|
||||
dirZ = cos(theta) ;
|
||||
|
||||
G4ThreeVector directionTR(dirX,dirY,dirZ) ;
|
||||
directionTR.rotateUz(direction) ;
|
||||
directionTR.unit() ;
|
||||
|
||||
G4DynamicParticle aPhotonTR(G4Gamma::Gamma(),directionTR,energyTR) ;
|
||||
|
||||
// A XTR photon is set along the particle track and is not moved to
|
||||
// the G4Envelope surface as in standard X-ray TR models
|
||||
|
||||
G4ThreeVector positionTR = fastTrack.GetPrimaryTrackLocalPosition() +
|
||||
G4UniformRand()*distance*direction ;
|
||||
|
||||
|
||||
fastStep.CreateSecondaryTrack( aPhotonTR,
|
||||
positionTR,
|
||||
fastTrack.GetPrimaryTrack()->
|
||||
GetGlobalTime() ) ;
|
||||
}
|
||||
kinEnergy -= sumEnergyTR ;
|
||||
fastStep.SetPrimaryTrackFinalKineticEnergy(kinEnergy) ;
|
||||
}
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Build integral energy distribution of XTR photons
|
||||
|
||||
void G4VXTRdEdx::BuildTable()
|
||||
{
|
||||
G4int iTkin, iTR, iPlace ;
|
||||
G4double radiatorCof = 1.0 ; // for tuning of XTR yield
|
||||
|
||||
|
||||
fEnergyDistrTable = new G4PhysicsTable(fTotBin) ;
|
||||
|
||||
fGammaTkinCut = 0.0 ;
|
||||
|
||||
// setting of min/max TR energies
|
||||
|
||||
if(fGammaTkinCut > fTheMinEnergyTR) fMinEnergyTR = fGammaTkinCut ;
|
||||
else fMinEnergyTR = fTheMinEnergyTR ;
|
||||
|
||||
if(fGammaTkinCut > fTheMaxEnergyTR) fMaxEnergyTR = 2.0*fGammaTkinCut ;
|
||||
else fMaxEnergyTR = fTheMaxEnergyTR ;
|
||||
|
||||
G4cout.precision(4) ;
|
||||
G4Timer timer ;
|
||||
timer.Start() ;
|
||||
|
||||
for( iTkin = 0 ; iTkin < fTotBin ; iTkin++ ) // Lorentz factor loop
|
||||
{
|
||||
G4PhysicsLogVector* energyVector = new G4PhysicsLogVector( fMinEnergyTR,
|
||||
fMaxEnergyTR,
|
||||
fBinTR ) ;
|
||||
|
||||
fGamma = 1.0 + (fProtonEnergyVector->
|
||||
GetLowEdgeEnergy(iTkin)/proton_mass_c2) ;
|
||||
|
||||
fMaxThetaTR = 25.0/(fGamma*fGamma) ; // theta^2
|
||||
|
||||
fTheMinAngle = 1.0e-6 ; // was 5.e-6, e-5, e-4
|
||||
|
||||
if( fMaxThetaTR > fTheMaxAngle ) fMaxThetaTR = fTheMaxAngle ;
|
||||
else
|
||||
{
|
||||
if( fMaxThetaTR < fTheMinAngle ) fMaxThetaTR = fTheMinAngle ;
|
||||
}
|
||||
|
||||
G4PhysicsLinearVector* angleVector = new G4PhysicsLinearVector( 0.0,
|
||||
fMaxThetaTR,
|
||||
fBinTR ) ;
|
||||
|
||||
G4double energySum = 0.0 ;
|
||||
G4double angleSum = 0.0 ;
|
||||
G4Integrator<G4VXTRdEdx,G4double(G4VXTRdEdx::*)(G4double)> integral ;
|
||||
energyVector->PutValue(fBinTR-1,energySum) ;
|
||||
angleVector->PutValue(fBinTR-1,angleSum) ;
|
||||
|
||||
for( iTR = fBinTR - 2 ; iTR >= 0 ; iTR-- )
|
||||
{
|
||||
energySum += radiatorCof*fCofTR*integral.Legendre10(
|
||||
this,&G4VXTRdEdx::SpectralXTRdEdx,
|
||||
energyVector->GetLowEdgeEnergy(iTR),
|
||||
energyVector->GetLowEdgeEnergy(iTR+1) ) ;
|
||||
|
||||
// angleSum += fCofTR*integral.Legendre96(
|
||||
// this,&G4VXTRdEdx::AngleXTRdEdx,
|
||||
// angleVector->GetLowEdgeEnergy(iTR),
|
||||
// angleVector->GetLowEdgeEnergy(iTR+1) ) ;
|
||||
|
||||
energyVector->PutValue(iTR,energySum) ;
|
||||
// angleVector ->PutValue(iTR,angleSum) ;
|
||||
}
|
||||
G4cout<<iTkin<<"\t"
|
||||
<<"fGamma = "<<fGamma<<"\t" // <<" fMaxThetaTR = "<<fMaxThetaTR
|
||||
<<"sumE = "<<energySum // <<" ; sumA = "<<angleSum
|
||||
<<G4endl ;
|
||||
iPlace = iTkin ;
|
||||
fEnergyDistrTable->insertAt(iPlace,energyVector) ;
|
||||
// fAngleDistrTable->insertAt(iPlace,angleVector) ;
|
||||
}
|
||||
timer.Stop() ;
|
||||
G4cout.precision(6) ;
|
||||
G4cout<<G4endl ;
|
||||
G4cout<<"total time for build X-ray TR dE/dx tables = "
|
||||
<<timer.GetUserElapsed()<<" s"<<G4endl ;
|
||||
return ;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
void G4VXTRdEdx::BuildEnergyTable()
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
void G4VXTRdEdx::BuildAngleTable()
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This function returns the spectral and angle density of TR quanta
|
||||
// in X-ray energy region generated forward when a relativistic
|
||||
// charged particle crosses interface between two materials.
|
||||
// The high energy small theta approximation is applied.
|
||||
// (matter1 -> matter2, or 2->1)
|
||||
// varAngle =2* (1 - cos(theta)) or approximately = theta*theta
|
||||
//
|
||||
|
||||
G4complex G4VXTRdEdx::OneInterfaceXTRdEdx( G4double energy,
|
||||
G4double gamma,
|
||||
G4double varAngle )
|
||||
{
|
||||
G4complex Z1 = GetPlateComplexFZ(energy,gamma,varAngle) ;
|
||||
G4complex Z2 = GetGasComplexFZ(energy,gamma,varAngle) ;
|
||||
|
||||
G4complex zOut = (Z1 - Z2)*(Z1 - Z2)
|
||||
* (varAngle*energy/hbarc/hbarc) ;
|
||||
return zOut ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// For photon energy distribution tables. Integrate first over angle
|
||||
//
|
||||
|
||||
G4double G4VXTRdEdx::SpectralAngleXTRdEdx(G4double varAngle)
|
||||
{
|
||||
G4double result = GetStackFactor(fEnergy,fGamma,varAngle) ;
|
||||
if(result < 0.0) result = 0.0 ;
|
||||
return result ;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// For second integration over energy
|
||||
|
||||
G4double G4VXTRdEdx::SpectralXTRdEdx(G4double energy)
|
||||
{
|
||||
fEnergy = energy ;
|
||||
G4Integrator<G4VXTRdEdx,G4double(G4VXTRdEdx::*)(G4double)> integral ;
|
||||
return integral.Legendre96(this,&G4VXTRdEdx::SpectralAngleXTRdEdx,
|
||||
0.0,0.3*fMaxThetaTR) +
|
||||
integral.Legendre96(this,&G4VXTRdEdx::SpectralAngleXTRdEdx,
|
||||
0.3*fMaxThetaTR,fMaxThetaTR) ;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// for photon angle distribution tables
|
||||
//
|
||||
|
||||
G4double G4VXTRdEdx::AngleSpectralXTRdEdx(G4double energy)
|
||||
{
|
||||
G4double result = GetStackFactor(energy,fGamma,fVarAngle) ;
|
||||
if(result < 0) result = 0.0 ;
|
||||
return result ;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
G4double G4VXTRdEdx::AngleXTRdEdx(G4double varAngle)
|
||||
{
|
||||
fVarAngle = varAngle ;
|
||||
G4Integrator<G4VXTRdEdx,G4double(G4VXTRdEdx::*)(G4double)> integral ;
|
||||
return integral.Legendre10(this,&G4VXTRdEdx::AngleSpectralXTRdEdx,
|
||||
fMinEnergyTR,fMaxEnergyTR) ;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,320 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VXrayTRadModel.cc,v 1.3 2001/09/18 09:02:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4Timer.hh"
|
||||
|
||||
#include "G4VXrayTRadModel.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4std/complex"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4Integrator.hh"
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor, destructor
|
||||
|
||||
G4VXrayTRadModel::G4VXrayTRadModel(G4Envelope *anEnvelope, G4double a, G4double b) :
|
||||
G4VXrayTRmodel(anEnvelope,a,b)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4VXrayTRadModel::~G4VXrayTRadModel()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// The main function which is responsible for the treatment of a particle passage
|
||||
// trough G4Envelope
|
||||
|
||||
void G4VXrayTRadModel::DoIt( const G4FastTrack& fastTrack ,
|
||||
G4FastStep& fastStep )
|
||||
{
|
||||
G4int iTkin, iPlace, numOfTR, iTR ;
|
||||
G4double energyTR, theta, phi, dirX, dirY, dirZ ;
|
||||
G4double W, W1, W2, E1, E2 ;
|
||||
|
||||
G4double charge = fastTrack.GetPrimaryTrack()->GetDefinition()->GetPDGCharge() ;
|
||||
|
||||
// Now we are ready to Generate TR photons
|
||||
|
||||
G4double chargeSq = charge*charge ;
|
||||
G4double kinEnergy = fastTrack.GetPrimaryTrack()->GetKineticEnergy() ;
|
||||
G4double mass = fastTrack.GetPrimaryTrack()->GetDefinition()->GetPDGMass() ;
|
||||
G4double gamma = 1.0 + kinEnergy/mass ;
|
||||
// G4cout<<"gamma = "<<gamma<<G4endl ;
|
||||
G4double massRatio = proton_mass_c2/mass ;
|
||||
G4double TkinScaled = kinEnergy*massRatio ;
|
||||
|
||||
G4ParticleMomentum direction(fastTrack.GetPrimaryTrackLocalDirection());
|
||||
|
||||
G4double distance = fastTrack.GetEnvelopeSolid()->
|
||||
DistanceToOut(fastTrack.GetPrimaryTrackLocalPosition(),
|
||||
direction) ;
|
||||
|
||||
G4ThreeVector position = fastTrack.GetPrimaryTrackLocalPosition() +
|
||||
distance*direction ;
|
||||
|
||||
// Set final position:
|
||||
|
||||
fastStep.SetPrimaryTrackFinalPosition(position);
|
||||
|
||||
|
||||
for(iTkin=0;iTkin<fTotBin;iTkin++)
|
||||
{
|
||||
if(TkinScaled < fProtonEnergyVector->GetLowEdgeEnergy(iTkin)) break ;
|
||||
}
|
||||
iPlace = iTkin - 1 ;
|
||||
|
||||
// G4ParticleMomentum particleDir = fastTrack.GetPrimaryTrack()->
|
||||
// GetMomentumDirection() ;
|
||||
|
||||
if(iTkin == 0) // Tkin is too small, neglect of TR photon generation
|
||||
{
|
||||
return ;
|
||||
}
|
||||
else // general case: Tkin between two vectors of the material
|
||||
{
|
||||
if(iTkin == fTotBin)
|
||||
{
|
||||
numOfTR = RandPoisson::shoot( (*(*fEnergyDistrTable)(iPlace))(0)*chargeSq ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
E1 = fProtonEnergyVector->GetLowEdgeEnergy(iTkin - 1) ;
|
||||
E2 = fProtonEnergyVector->GetLowEdgeEnergy(iTkin) ;
|
||||
W = 1.0/(E2 - E1) ;
|
||||
W1 = (E2 - TkinScaled)*W ;
|
||||
W2 = (TkinScaled - E1)*W ;
|
||||
numOfTR = RandPoisson::shoot( ( (*(*fEnergyDistrTable)(iPlace))(0)*W1+
|
||||
(*(*fEnergyDistrTable)(iPlace+1))(0)*W2 )
|
||||
*chargeSq ) ;
|
||||
}
|
||||
|
||||
// G4cout<<iTkin<<" mean TR number = "<<(((*(*fEnergyDistrTable)(iPlace))(0)+
|
||||
// (*(*fAngleDistrTable)(iPlace))(0))*W1 +
|
||||
// ((*(*fEnergyDistrTable)(iPlace + 1))(0)+
|
||||
// (*(*fAngleDistrTable)(iPlace + 1))(0))*W2)
|
||||
// *chargeSq*0.5<<endl ;
|
||||
|
||||
if( numOfTR == 0 ) // no change, return
|
||||
{
|
||||
return ;
|
||||
}
|
||||
else
|
||||
{
|
||||
// G4cout<<"Number of X-ray TR photons = "<<numOfTR<<endl ;
|
||||
|
||||
fastStep.SetNumberOfSecondaries(numOfTR);
|
||||
|
||||
G4double sumEnergyTR = 0.0 ;
|
||||
|
||||
for(iTR=0;iTR<numOfTR;iTR++)
|
||||
{
|
||||
|
||||
// energyPos = ((*(*fEnergyDistrTable)(iPlace))(0)*W1+
|
||||
// (*(*fEnergyDistrTable)(iPlace + 1))(0)*W2)*G4UniformRand() ;
|
||||
// for(iTransfer=0;iTransfer<fBinTR-1;iTransfer++)
|
||||
// {
|
||||
// if(energyPos >= ((*(*fEnergyDistrTable)(iPlace))(iTransfer)*W1+
|
||||
// (*(*fEnergyDistrTable)(iPlace + 1))(iTransfer)*W2)) break ;
|
||||
// }
|
||||
// energyTR = ((*fEnergyDistrTable)(iPlace)->GetLowEdgeEnergy(iTransfer))*W1+
|
||||
// ((*fEnergyDistrTable)(iPlace + 1)->GetLowEdgeEnergy(iTransfer))*W2 ;
|
||||
|
||||
energyTR = GetXTRrandomEnergy(TkinScaled,iTkin) ;
|
||||
|
||||
// G4cout<<"energyTR = "<<energyTR/keV<<"keV"<<endl ;
|
||||
|
||||
sumEnergyTR += energyTR ;
|
||||
|
||||
theta = abs(G4RandGauss::shoot(0.0,pi/gamma)) ;
|
||||
|
||||
if( theta >= 0.1 ) theta = 0.1 ;
|
||||
|
||||
// G4cout<<" : theta = "<<theta<<endl ;
|
||||
|
||||
phi = twopi*G4UniformRand() ;
|
||||
|
||||
dirX = sin(theta)*cos(phi) ;
|
||||
dirY = sin(theta)*sin(phi) ;
|
||||
dirZ = cos(theta) ;
|
||||
|
||||
G4ThreeVector directionTR(dirX,dirY,dirZ) ;
|
||||
directionTR.rotateUz(direction) ;
|
||||
directionTR.unit() ;
|
||||
|
||||
G4DynamicParticle aPhotonTR(G4Gamma::Gamma(),directionTR,energyTR) ;
|
||||
|
||||
G4ThreeVector positionTR = fastTrack.GetPrimaryTrackLocalPosition() +
|
||||
G4UniformRand()*distance*direction ;
|
||||
|
||||
|
||||
G4double distanceTR = fastTrack.GetEnvelopeSolid()->
|
||||
DistanceToOut(positionTR,directionTR) ;
|
||||
|
||||
positionTR = positionTR + distanceTR*directionTR ;
|
||||
|
||||
fastStep.CreateSecondaryTrack( aPhotonTR,
|
||||
positionTR,
|
||||
fastTrack.GetPrimaryTrack()->
|
||||
GetGlobalTime() ) ;
|
||||
}
|
||||
kinEnergy -= sumEnergyTR ;
|
||||
fastStep.SetPrimaryTrackFinalKineticEnergy(kinEnergy) ;
|
||||
}
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Build integral energy distribution of XTR photons
|
||||
|
||||
void G4VXrayTRadModel::BuildTable()
|
||||
{
|
||||
G4int iTkin, iTR, iPlace ;
|
||||
G4double radiatorCof = 1.0 ; // for tuning of XTR yield
|
||||
|
||||
// fAngleDistrTable = new G4PhysicsTable(fTotBin) ;
|
||||
fEnergyDistrTable = new G4PhysicsTable(fTotBin) ;
|
||||
|
||||
fGammaTkinCut = 0.0 ;
|
||||
// setting of min/max TR energies
|
||||
if(fGammaTkinCut > fTheMinEnergyTR) fMinEnergyTR = fGammaTkinCut ;
|
||||
else fMinEnergyTR = fTheMinEnergyTR ;
|
||||
|
||||
if(fGammaTkinCut > fTheMaxEnergyTR) fMaxEnergyTR = 2.0*fGammaTkinCut ;
|
||||
else fMaxEnergyTR = fTheMaxEnergyTR ;
|
||||
|
||||
G4cout.precision(4) ;
|
||||
|
||||
G4Timer timer ;
|
||||
timer.Start() ;
|
||||
for(iTkin=0;iTkin<fTotBin;iTkin++) // Lorentz factor loop
|
||||
{
|
||||
G4PhysicsLogVector* energyVector = new G4PhysicsLogVector( fMinEnergyTR,
|
||||
fMaxEnergyTR,
|
||||
fBinTR ) ;
|
||||
|
||||
fGamma = 1.0 + (fProtonEnergyVector->
|
||||
GetLowEdgeEnergy(iTkin)/proton_mass_c2) ;
|
||||
|
||||
fMaxThetaTR = 25.0/(fGamma*fGamma) ; // theta^2
|
||||
|
||||
fTheMinAngle = 1.0e-6 ; // was 5.e-6, e-5, e-4
|
||||
|
||||
if( fMaxThetaTR > fTheMaxAngle ) fMaxThetaTR = fTheMaxAngle ;
|
||||
else
|
||||
{
|
||||
if( fMaxThetaTR < fTheMinAngle ) fMaxThetaTR = fTheMinAngle ;
|
||||
}
|
||||
|
||||
G4PhysicsLinearVector* angleVector = new G4PhysicsLinearVector( 0.0,
|
||||
fMaxThetaTR,
|
||||
fBinTR ) ;
|
||||
|
||||
G4double energySum = 0.0 ;
|
||||
G4double angleSum = 0.0 ;
|
||||
G4Integrator<G4VXrayTRmodel,G4double(G4VXrayTRmodel::*)(G4double)> integral ;
|
||||
energyVector->PutValue(fBinTR-1,energySum) ;
|
||||
angleVector->PutValue(fBinTR-1,angleSum) ;
|
||||
|
||||
for(iTR=fBinTR-2;iTR>=0;iTR--)
|
||||
{
|
||||
energySum += radiatorCof*fCofTR*integral.Legendre10(
|
||||
this,&G4VXrayTRmodel::XTRNSpectralDensity,
|
||||
energyVector->GetLowEdgeEnergy(iTR),
|
||||
energyVector->GetLowEdgeEnergy(iTR+1) ) ;
|
||||
|
||||
// angleSum += fCofTR*integral.Legendre96(
|
||||
// this,&G4VXrayTRmodel::XTRNSpectralDensity,
|
||||
// angleVector->GetLowEdgeEnergy(iTR),
|
||||
// angleVector->GetLowEdgeEnergy(iTR+1) ) ;
|
||||
|
||||
energyVector->PutValue(iTR,energySum) ;
|
||||
// angleVector ->PutValue(iTR,angleSum) ;
|
||||
}
|
||||
G4cout<<iTkin<<"\t"
|
||||
<<"fGamma = "<<fGamma<<"\t" // <<" fMaxThetaTR = "<<fMaxThetaTR
|
||||
<<"sumE = "<<energySum // <<" ; sumA = "<<angleSum
|
||||
<<G4endl ;
|
||||
iPlace = iTkin ;
|
||||
fEnergyDistrTable->insertAt(iPlace,energyVector) ;
|
||||
// fAngleDistrTable->insertAt(iPlace,angleVector) ;
|
||||
}
|
||||
timer.Stop() ;
|
||||
G4cout.precision(6) ;
|
||||
G4cout<<G4endl ;
|
||||
G4cout<<"total time for build X-ray TR tables = "
|
||||
<<timer.GetUserElapsed()<<" s"<<G4endl ;
|
||||
return ;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
void G4VXrayTRadModel::BuildEnergyTable()
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
void G4VXrayTRadModel::BuildAngleTable()
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VXrayTRmodel.cc,v 1.1.4.1 2001/06/28 19:10:35 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VXrayTRmodel.cc,v 1.5 2001/09/18 09:02:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4Timer.hh"
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4std/complex"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
@@ -88,8 +89,13 @@ G4VXrayTRmodel::G4VXrayTRmodel(G4Envelope *anEnvelope, G4double a, G4double b) :
|
||||
// index of plate material
|
||||
fMatIndex1 = anEnvelope->GetDaughter(0)->GetLogicalVolume()->
|
||||
GetMaterial()->GetIndex() ;
|
||||
G4cout<<"plate material = "<<anEnvelope->GetDaughter(0)->GetLogicalVolume()->
|
||||
GetMaterial()->GetName()<<G4endl ;
|
||||
|
||||
// index of gas material
|
||||
fMatIndex2 = anEnvelope->GetMaterial()->GetIndex() ;
|
||||
G4cout<<"gas material = "<<anEnvelope->
|
||||
GetMaterial()->GetName()<<G4endl ;
|
||||
|
||||
// plasma energy squared for plate material
|
||||
|
||||
@@ -161,149 +167,6 @@ G4bool G4VXrayTRmodel::ModelTrigger(const G4FastTrack& fastTrack)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
void G4VXrayTRmodel::DoIt( const G4FastTrack& fastTrack ,
|
||||
G4FastStep& fastStep )
|
||||
{
|
||||
G4int iTkin, iPlace, numOfTR, iTR, iTransfer ;
|
||||
G4double energyPos, energyTR, theta, phi, dirX, dirY, dirZ ;
|
||||
G4double W, W1, W2, E1, E2 ;
|
||||
|
||||
G4double charge = fastTrack.GetPrimaryTrack()->GetDefinition()->GetPDGCharge() ;
|
||||
|
||||
// Now we are ready to Generate TR photons
|
||||
|
||||
G4double chargeSq = charge*charge ;
|
||||
G4double kinEnergy = fastTrack.GetPrimaryTrack()->GetKineticEnergy() ;
|
||||
G4double mass = fastTrack.GetPrimaryTrack()->GetDefinition()->GetPDGMass() ;
|
||||
G4double gamma = 1.0 + kinEnergy/mass ;
|
||||
// G4cout<<"gamma = "<<gamma<<G4endl ;
|
||||
G4double massRatio = proton_mass_c2/mass ;
|
||||
G4double TkinScaled = kinEnergy*massRatio ;
|
||||
|
||||
G4ParticleMomentum direction(fastTrack.GetPrimaryTrackLocalDirection());
|
||||
|
||||
G4double distance = fastTrack.GetEnvelopeSolid()->
|
||||
DistanceToOut(fastTrack.GetPrimaryTrackLocalPosition(),
|
||||
direction) ;
|
||||
|
||||
G4ThreeVector position = fastTrack.GetPrimaryTrackLocalPosition() +
|
||||
distance*direction ;
|
||||
|
||||
// Set final position:
|
||||
|
||||
fastStep.SetPrimaryTrackFinalPosition(position);
|
||||
|
||||
|
||||
for(iTkin=0;iTkin<fTotBin;iTkin++)
|
||||
{
|
||||
if(TkinScaled < fProtonEnergyVector->GetLowEdgeEnergy(iTkin)) break ;
|
||||
}
|
||||
iPlace = iTkin - 1 ;
|
||||
|
||||
// G4ParticleMomentum particleDir = fastTrack.GetPrimaryTrack()->
|
||||
// GetMomentumDirection() ;
|
||||
|
||||
if(iTkin == 0) // Tkin is too small, neglect of TR photon generation
|
||||
{
|
||||
return ;
|
||||
}
|
||||
else // general case: Tkin between two vectors of the material
|
||||
{
|
||||
if(iTkin == fTotBin)
|
||||
{
|
||||
numOfTR = RandPoisson::shoot( (*(*fEnergyDistrTable)(iPlace))(0)*chargeSq ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
E1 = fProtonEnergyVector->GetLowEdgeEnergy(iTkin - 1) ;
|
||||
E2 = fProtonEnergyVector->GetLowEdgeEnergy(iTkin) ;
|
||||
W = 1.0/(E2 - E1) ;
|
||||
W1 = (E2 - TkinScaled)*W ;
|
||||
W2 = (TkinScaled - E1)*W ;
|
||||
numOfTR = RandPoisson::shoot( ( (*(*fEnergyDistrTable)(iPlace))(0)*W1+
|
||||
(*(*fEnergyDistrTable)(iPlace+1))(0)*W2 )
|
||||
*chargeSq ) ;
|
||||
}
|
||||
|
||||
// G4cout<<iTkin<<" mean TR number = "<<(((*(*fEnergyDistrTable)(iPlace))(0)+
|
||||
// (*(*fAngleDistrTable)(iPlace))(0))*W1 +
|
||||
// ((*(*fEnergyDistrTable)(iPlace + 1))(0)+
|
||||
// (*(*fAngleDistrTable)(iPlace + 1))(0))*W2)
|
||||
// *chargeSq*0.5<<endl ;
|
||||
|
||||
if( numOfTR == 0 ) // no change, return
|
||||
{
|
||||
return ;
|
||||
}
|
||||
else
|
||||
{
|
||||
// G4cout<<"Number of X-ray TR photons = "<<numOfTR<<endl ;
|
||||
|
||||
fastStep.SetNumberOfSecondaries(numOfTR);
|
||||
|
||||
G4double sumEnergyTR = 0.0 ;
|
||||
|
||||
for(iTR=0;iTR<numOfTR;iTR++)
|
||||
{
|
||||
|
||||
// energyPos = ((*(*fEnergyDistrTable)(iPlace))(0)*W1+
|
||||
// (*(*fEnergyDistrTable)(iPlace + 1))(0)*W2)*G4UniformRand() ;
|
||||
// for(iTransfer=0;iTransfer<fBinTR-1;iTransfer++)
|
||||
// {
|
||||
// if(energyPos >= ((*(*fEnergyDistrTable)(iPlace))(iTransfer)*W1+
|
||||
// (*(*fEnergyDistrTable)(iPlace + 1))(iTransfer)*W2)) break ;
|
||||
// }
|
||||
// energyTR = ((*fEnergyDistrTable)(iPlace)->GetLowEdgeEnergy(iTransfer))*W1+
|
||||
// ((*fEnergyDistrTable)(iPlace + 1)->GetLowEdgeEnergy(iTransfer))*W2 ;
|
||||
|
||||
energyTR = GetXTRrandomEnergy(TkinScaled,iTkin) ;
|
||||
|
||||
// G4cout<<"energyTR = "<<energyTR/keV<<"keV"<<endl ;
|
||||
|
||||
sumEnergyTR += energyTR ;
|
||||
|
||||
theta = abs(G4RandGauss::shoot(0.0,pi/gamma)) ;
|
||||
|
||||
if( theta >= 0.1 ) theta = 0.1 ;
|
||||
|
||||
// G4cout<<" : theta = "<<theta<<endl ;
|
||||
|
||||
phi = twopi*G4UniformRand() ;
|
||||
|
||||
dirX = sin(theta)*cos(phi) ;
|
||||
dirY = sin(theta)*sin(phi) ;
|
||||
dirZ = cos(theta) ;
|
||||
|
||||
G4ThreeVector directionTR(dirX,dirY,dirZ) ;
|
||||
directionTR.rotateUz(direction) ;
|
||||
directionTR.unit() ;
|
||||
|
||||
G4DynamicParticle aPhotonTR(G4Gamma::Gamma(),directionTR,energyTR) ;
|
||||
|
||||
G4ThreeVector positionTR = fastTrack.GetPrimaryTrackLocalPosition() +
|
||||
G4UniformRand()*distance*direction ;
|
||||
|
||||
|
||||
G4double distanceTR = fastTrack.GetEnvelopeSolid()->
|
||||
DistanceToOut(positionTR,directionTR) ;
|
||||
|
||||
positionTR = positionTR + distanceTR*directionTR ;
|
||||
|
||||
fastStep.CreateSecondaryTrack( aPhotonTR,
|
||||
positionTR,
|
||||
fastTrack.GetPrimaryTrack()->
|
||||
GetGlobalTime() ) ;
|
||||
}
|
||||
kinEnergy -= sumEnergyTR ;
|
||||
fastStep.SetPrimaryTrackFinalKineticEnergy(kinEnergy) ;
|
||||
}
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -387,6 +250,27 @@ G4double G4VXrayTRmodel::GetPlateFormationZone( G4double omega ,
|
||||
return cof ;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Calculates complex formation zone for plates. Omega is energy !!!
|
||||
|
||||
G4complex G4VXrayTRmodel::GetPlateComplexFZ( G4double omega ,
|
||||
G4double gamma ,
|
||||
G4double varAngle )
|
||||
{
|
||||
G4double cof, length,delta, real, image ;
|
||||
|
||||
length = 0.5*GetPlateFormationZone(omega,gamma,varAngle) ;
|
||||
delta = length*GetPlateLinearPhotoAbs(omega) ;
|
||||
cof = 1.0/(1.0 + delta*delta) ;
|
||||
|
||||
real = length*cof ;
|
||||
image = real*delta ;
|
||||
|
||||
G4complex zone(real,image);
|
||||
return zone ;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Computes matrix of Sandia photo absorption cross section coefficients for
|
||||
@@ -480,6 +364,30 @@ G4double G4VXrayTRmodel::GetGasFormationZone( G4double omega ,
|
||||
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Calculates complex formation zone for gas gaps. Omega is energy !!!
|
||||
|
||||
G4complex G4VXrayTRmodel::GetGasComplexFZ( G4double omega ,
|
||||
G4double gamma ,
|
||||
G4double varAngle )
|
||||
{
|
||||
G4double cof, length,delta, real, image ;
|
||||
|
||||
length = 0.5*GetGasFormationZone(omega,gamma,varAngle) ;
|
||||
delta = length*GetGasLinearPhotoAbs(omega) ;
|
||||
cof = 1.0/(1.0 + delta*delta) ;
|
||||
|
||||
real = length*cof ;
|
||||
image = real*delta ;
|
||||
|
||||
G4complex zone(real,image);
|
||||
return zone ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Computes matrix of Sandia photo absorption cross section coefficients for
|
||||
@@ -581,7 +489,7 @@ void G4VXrayTRmodel::GetPlateZmuProduct()
|
||||
outPlate.setf( G4std::ios::scientific, G4std::ios::floatfield );
|
||||
|
||||
G4int i ;
|
||||
G4double omega, varAngle, gamma, result ;
|
||||
G4double omega, varAngle, gamma ;
|
||||
gamma = 10000. ;
|
||||
varAngle = 1/gamma/gamma ;
|
||||
G4cout<<"energy, keV"<<"\t"<<"Zmu for plate"<<G4endl ;
|
||||
@@ -615,7 +523,7 @@ void G4VXrayTRmodel::GetGasZmuProduct()
|
||||
G4std::ofstream outGas("gasZmu.dat", G4std::ios::out ) ;
|
||||
outGas.setf( G4std::ios::scientific, G4std::ios::floatfield );
|
||||
G4int i ;
|
||||
G4double omega, varAngle, gamma, result ;
|
||||
G4double omega, varAngle, gamma ;
|
||||
gamma = 10000. ;
|
||||
varAngle = 1/gamma/gamma ;
|
||||
G4cout<<"energy, keV"<<"\t"<<"Zmu for gas"<<G4endl ;
|
||||
@@ -656,107 +564,6 @@ G4VXrayTRmodel::OneBoundaryXTRNdensity( G4double energy,G4double gamma,
|
||||
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
void G4VXrayTRmodel::BuildTable()
|
||||
{
|
||||
G4int iMat, jMat, iTkin, iTR, iPlace ;
|
||||
G4double radiatorCof = 1.0 ; // for tuning of XTR yield
|
||||
|
||||
// fAngleDistrTable = new G4PhysicsTable(fTotBin) ;
|
||||
fEnergyDistrTable = new G4PhysicsTable(fTotBin) ;
|
||||
|
||||
fGammaTkinCut = 0.0 ;
|
||||
// setting of min/max TR energies
|
||||
if(fGammaTkinCut > fTheMinEnergyTR) fMinEnergyTR = fGammaTkinCut ;
|
||||
else fMinEnergyTR = fTheMinEnergyTR ;
|
||||
|
||||
if(fGammaTkinCut > fTheMaxEnergyTR) fMaxEnergyTR = 2.0*fGammaTkinCut ;
|
||||
else fMaxEnergyTR = fTheMaxEnergyTR ;
|
||||
|
||||
G4cout.precision(4) ;
|
||||
|
||||
G4Timer timer ;
|
||||
timer.Start() ;
|
||||
for(iTkin=0;iTkin<fTotBin;iTkin++) // Lorentz factor loop
|
||||
{
|
||||
G4PhysicsLogVector* energyVector = new G4PhysicsLogVector( fMinEnergyTR,
|
||||
fMaxEnergyTR,
|
||||
fBinTR ) ;
|
||||
|
||||
fGamma = 1.0 + (fProtonEnergyVector->
|
||||
GetLowEdgeEnergy(iTkin)/proton_mass_c2) ;
|
||||
|
||||
fMaxThetaTR = 25.0/(fGamma*fGamma) ; // theta^2
|
||||
|
||||
fTheMinAngle = 1.0e-6 ; // was 5.e-6, e-5, e-4
|
||||
|
||||
if( fMaxThetaTR > fTheMaxAngle ) fMaxThetaTR = fTheMaxAngle ;
|
||||
else
|
||||
{
|
||||
if( fMaxThetaTR < fTheMinAngle ) fMaxThetaTR = fTheMinAngle ;
|
||||
}
|
||||
|
||||
G4PhysicsLinearVector* angleVector = new G4PhysicsLinearVector( 0.0,
|
||||
fMaxThetaTR,
|
||||
fBinTR ) ;
|
||||
|
||||
G4double energySum = 0.0 ;
|
||||
G4double angleSum = 0.0 ;
|
||||
G4Integrator<G4VXrayTRmodel,G4double(G4VXrayTRmodel::*)(G4double)> integral ;
|
||||
energyVector->PutValue(fBinTR-1,energySum) ;
|
||||
angleVector->PutValue(fBinTR-1,angleSum) ;
|
||||
|
||||
for(iTR=fBinTR-2;iTR>=0;iTR--)
|
||||
{
|
||||
energySum += radiatorCof*fCofTR*integral.Legendre10(
|
||||
this,&G4VXrayTRmodel::XTRNSpectralDensity,
|
||||
energyVector->GetLowEdgeEnergy(iTR),
|
||||
energyVector->GetLowEdgeEnergy(iTR+1) ) ;
|
||||
|
||||
// angleSum += fCofTR*integral.Legendre96(
|
||||
// this,&G4VXrayTRmodel::XTRNSpectralDensity,
|
||||
// angleVector->GetLowEdgeEnergy(iTR),
|
||||
// angleVector->GetLowEdgeEnergy(iTR+1) ) ;
|
||||
|
||||
energyVector->PutValue(iTR,energySum) ;
|
||||
// angleVector ->PutValue(iTR,angleSum) ;
|
||||
}
|
||||
G4cout<<iTkin<<"\t"
|
||||
<<"fGamma = "<<fGamma<<"\t" // <<" fMaxThetaTR = "<<fMaxThetaTR
|
||||
<<"sumE = "<<energySum // <<" ; sumA = "<<angleSum
|
||||
<<G4endl ;
|
||||
iPlace = iTkin ;
|
||||
fEnergyDistrTable->insertAt(iPlace,energyVector) ;
|
||||
// fAngleDistrTable->insertAt(iPlace,angleVector) ;
|
||||
}
|
||||
timer.Stop() ;
|
||||
G4cout.precision(6) ;
|
||||
G4cout<<G4endl ;
|
||||
G4cout<<"total time for build X-ray TR tables = "
|
||||
<<timer.GetUserElapsed()<<" s"<<G4endl ;
|
||||
return ;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
void G4VXrayTRmodel::BuildEnergyTable()
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
void G4VXrayTRmodel::BuildAngleTable()
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -814,7 +621,7 @@ G4double G4VXrayTRmodel::XTRNAngleDensity(G4double varAngle)
|
||||
void G4VXrayTRmodel::GetNumberOfPhotons()
|
||||
{
|
||||
G4int iTkin ;
|
||||
G4double gamma, numberE, numberA ;
|
||||
G4double gamma, numberE ;
|
||||
|
||||
G4std::ofstream outEn("numberE.dat", G4std::ios::out ) ;
|
||||
outEn.setf( G4std::ios::scientific, G4std::ios::floatfield );
|
||||
|
||||
Reference in New Issue
Block a user