Import Geant4 9.4.0 source tree
This commit is contained in:
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CompositeDataSet.hh,v 1.3 2010/11/19 17:18:21 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created as G4CompositeEMDataSet
|
||||
// 31 Jul 2008 MGP Revised and renamed to G4CompositeDataSet
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Composite data set
|
||||
// Applies a Composite design pattern for data library management
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4COMPOSITEDATASET_HH
|
||||
#define G4COMPOSITEDATASET_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4IDataSet.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4IInterpolator;
|
||||
|
||||
class G4CompositeDataSet : public G4IDataSet
|
||||
{
|
||||
public:
|
||||
G4CompositeDataSet(G4IInterpolator* argAlgorithm,
|
||||
G4double eUnit=MeV,
|
||||
G4double dataUnit=barn,
|
||||
G4int zMin=1,
|
||||
G4int zMax=99);
|
||||
|
||||
virtual ~G4CompositeDataSet();
|
||||
|
||||
virtual G4double FindValue(G4double x, G4int componentId=0) const;
|
||||
|
||||
virtual void PrintData(void) const;
|
||||
|
||||
virtual const G4IDataSet* GetComponent(G4int componentId) const
|
||||
{ return components[componentId]; }
|
||||
|
||||
virtual void AddComponent(G4IDataSet* dataSet)
|
||||
{ components.push_back(dataSet); }
|
||||
|
||||
virtual size_t NumberOfComponents() const
|
||||
{ return components.size(); }
|
||||
|
||||
virtual const G4DataVector& GetEnergies(G4int componentId) const
|
||||
{ return GetComponent(componentId)->GetEnergies(0); }
|
||||
|
||||
virtual const G4DataVector& GetData(G4int componentId) const
|
||||
{ return GetComponent(componentId)->GetData(0); }
|
||||
|
||||
virtual void SetEnergiesData(G4DataVector* x, G4DataVector* data, G4int componentId);
|
||||
|
||||
virtual G4bool LoadData(const G4String& fileName);
|
||||
virtual G4bool SaveData(const G4String& fileName) const;
|
||||
|
||||
virtual G4double RandomSelect(G4int componentId) const;
|
||||
|
||||
private:
|
||||
|
||||
void CleanUpComponents(void);
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4CompositeDataSet();
|
||||
G4CompositeDataSet(const G4CompositeDataSet& copy);
|
||||
G4CompositeDataSet& operator=(const G4CompositeDataSet& right);
|
||||
|
||||
std::vector<G4IDataSet*> components; // Owned pointers
|
||||
|
||||
G4IInterpolator* algorithm; // Owned pointer
|
||||
|
||||
G4double unitEnergies;
|
||||
G4double unitData;
|
||||
|
||||
G4int minZ;
|
||||
G4int maxZ;
|
||||
};
|
||||
#endif /* G4COMPOSITEDATASET_HH */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DataSet.hh,v 1.2 2010/11/19 17:16:09 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created as G4EMDataSet
|
||||
// 31 Jul 2008 MGP Revised and renamed to G4DataSet
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Leaf data set
|
||||
// Applies a Composite design pattern for data library management
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4DATASET_HH
|
||||
#define G4DATASET_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4IDataSet.hh"
|
||||
|
||||
class G4IInterpolator;
|
||||
|
||||
class G4DataSet : public G4IDataSet
|
||||
{
|
||||
public:
|
||||
G4DataSet(G4int argZ,
|
||||
G4IInterpolator* algo,
|
||||
G4double xUnit=MeV,
|
||||
G4double yUnit=barn,
|
||||
G4bool random=false);
|
||||
|
||||
G4DataSet(G4int argZ,
|
||||
G4DataVector* xData,
|
||||
G4DataVector* data,
|
||||
G4IInterpolator* algo,
|
||||
G4double xUnit=MeV,
|
||||
G4double yUnit=barn,
|
||||
G4bool random=false);
|
||||
|
||||
virtual ~G4DataSet();
|
||||
|
||||
virtual G4double FindValue(G4double x, G4int componentId=0) const;
|
||||
|
||||
virtual void PrintData(void) const;
|
||||
|
||||
virtual const G4IDataSet* GetComponent(G4int /* componentId */) const { return 0; }
|
||||
|
||||
virtual void AddComponent(G4IDataSet* /* dataSet */) {}
|
||||
|
||||
virtual size_t NumberOfComponents(void) const { return 0; }
|
||||
|
||||
virtual const G4DataVector& GetEnergies(G4int /* componentId */) const { return *energies; }
|
||||
virtual const G4DataVector& GetData(G4int /* componentId */) const { return *data; }
|
||||
virtual void SetEnergiesData(G4DataVector* xData, G4DataVector* data, G4int componentId);
|
||||
|
||||
virtual G4bool LoadData(const G4String& fileName);
|
||||
virtual G4bool SaveData(const G4String& fileName) const;
|
||||
|
||||
virtual G4double RandomSelect(G4int componentId = 0) const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
size_t FindLowerBound(G4double energy) const;
|
||||
size_t FindLowerBound(G4double x, G4DataVector* values) const;
|
||||
|
||||
G4double IntegrationFunction(G4double x);
|
||||
|
||||
virtual void BuildPdf();
|
||||
|
||||
G4String FullFileName(const G4String& fileName) const;
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4DataSet();
|
||||
G4DataSet(const G4DataSet& copy);
|
||||
G4DataSet& operator=(const G4DataSet& right);
|
||||
|
||||
G4int z;
|
||||
|
||||
G4DataVector* energies; // Owned pointer
|
||||
G4DataVector* data; // Owned pointer
|
||||
|
||||
G4IInterpolator* algorithm; // Owned pointer
|
||||
|
||||
G4double unitEnergies;
|
||||
G4double unitData;
|
||||
|
||||
G4DataVector* pdf;
|
||||
G4bool randomSet;
|
||||
};
|
||||
#endif /* G4DATASET_HH */
|
||||
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IDataSet.hh,v 1.2 2010/11/19 17:16:09 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created as G4VDataSet
|
||||
// 31 Jul 2008 MGP Revised and renamed to G4IDataSet
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Data set abstract interface
|
||||
// Applies a Composite design pattern for data library management
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4IDATASET_HH
|
||||
#define G4IDATASET_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DataVector.hh"
|
||||
|
||||
class G4IDataSet
|
||||
{
|
||||
public:
|
||||
G4IDataSet() { }
|
||||
virtual ~G4IDataSet() { }
|
||||
|
||||
virtual G4double FindValue(G4double x, G4int componentId = 0) const = 0;
|
||||
|
||||
virtual void PrintData(void) const = 0;
|
||||
|
||||
virtual const G4IDataSet* GetComponent(G4int componentId) const = 0;
|
||||
virtual void AddComponent(G4IDataSet* dataSet) = 0;
|
||||
virtual size_t NumberOfComponents(void) const = 0;
|
||||
|
||||
virtual const G4DataVector& GetEnergies(G4int componentId) const = 0;
|
||||
virtual const G4DataVector& GetData(G4int componentId) const = 0;
|
||||
virtual void SetEnergiesData(G4DataVector* x, G4DataVector* data, G4int component=0) = 0;
|
||||
|
||||
virtual G4bool LoadData(const G4String& fileName) = 0;
|
||||
virtual G4bool SaveData(const G4String& fileName) const = 0;
|
||||
|
||||
virtual G4double RandomSelect(G4int componentId = 0) const = 0;
|
||||
|
||||
private:
|
||||
// Hide copy constructor and assignment operator
|
||||
G4IDataSet(const G4IDataSet& copy);
|
||||
G4IDataSet& operator=(const G4IDataSet& right);
|
||||
};
|
||||
#endif /* G4IDATASET_HH */
|
||||
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IInterpolator.hh,v 1.3 2010/12/15 07:39:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created
|
||||
// 31 Jul 2008 MGP Revised and renamed to G4IInterpolator
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// Class description:
|
||||
// Base class for a strategy pattern dealing with interpolation
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4IINTERPOLATOR_HH
|
||||
#define G4IINTERPOLATOR_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DataVector.hh"
|
||||
|
||||
class G4IInterpolator {
|
||||
|
||||
public:
|
||||
|
||||
G4IInterpolator() { }
|
||||
|
||||
virtual ~G4IInterpolator() { }
|
||||
|
||||
|
||||
virtual G4double Calculate(G4double point, G4int bin,
|
||||
const G4DataVector& energies,
|
||||
const G4DataVector& data) const = 0;
|
||||
|
||||
virtual G4IInterpolator* Clone() const = 0;
|
||||
|
||||
private:
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4IInterpolator(const G4IInterpolator&);
|
||||
G4IInterpolator& operator=(const G4IInterpolator& right);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LinInterpolator.hh,v 1.2 2010/11/19 17:16:09 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created
|
||||
// 31 Jul 2008 MGP Revised and renamed to G4LinInterpolator
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// Class description:
|
||||
// Linear interpolation of a data set
|
||||
// Part of a strategy pattern to encapsulate algorithms for interpolation
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4LININTERPOLATOR_HH
|
||||
#define G4LININTERPOLATOR_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4IInterpolator.hh"
|
||||
#include "G4DataVector.hh"
|
||||
|
||||
class G4LinInterpolator : public G4IInterpolator {
|
||||
|
||||
public:
|
||||
|
||||
G4LinInterpolator();
|
||||
|
||||
~G4LinInterpolator();
|
||||
|
||||
G4double Calculate(G4double point, G4int bin,
|
||||
const G4DataVector& energies,
|
||||
const G4DataVector& data) const;
|
||||
|
||||
G4IInterpolator* Clone() const;
|
||||
|
||||
private:
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LogLogInterpolator.hh,v 1.2 2010/11/19 17:16:09 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created
|
||||
// 31 Jul 2008 MGP Revised and renamed to G4LogLogInterpolator
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// Class description:
|
||||
// Log-Log interpolation of a data set
|
||||
// Part of a strategy pattern to encapsulate algorithms for interpolation
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4LOGLOGINTERPOLATOR_HH
|
||||
#define G4LOGLOGINTERPOLATOR_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4IInterpolator.hh"
|
||||
#include "G4DataVector.hh"
|
||||
|
||||
class G4LogLogInterpolator : public G4IInterpolator {
|
||||
|
||||
public:
|
||||
|
||||
G4LogLogInterpolator();
|
||||
|
||||
~G4LogLogInterpolator();
|
||||
|
||||
G4double Calculate(G4double point, G4int bin,
|
||||
const G4DataVector& energies,
|
||||
const G4DataVector& data) const;
|
||||
|
||||
virtual G4IInterpolator* Clone() const;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PixeCrossSectionHandler.hh,v 1.2 2010/11/19 17:16:09 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 16 Jun 2008 MGP Created on the basis of G4CrossSectionHandler
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class description:
|
||||
// Cross section manager for hadron impact ionization
|
||||
// Documented in:
|
||||
// M.G. Pia et al., PIXE Simulation With Geant4,
|
||||
// IEEE Trans. Nucl. Sci., vol. 56, no. 6, pp. 3614-3649, Dec. 2009.
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4PIXECROSSSECTIONHANDLER_HH
|
||||
#define G4PIXECROSSSECTIONHANDLER_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include "G4MaterialCutsCouple.hh"
|
||||
|
||||
class G4IInterpolator;
|
||||
class G4IDataSet;
|
||||
class G4Material;
|
||||
class G4Element;
|
||||
|
||||
class G4PixeCrossSectionHandler {
|
||||
|
||||
public:
|
||||
|
||||
G4PixeCrossSectionHandler();
|
||||
|
||||
G4PixeCrossSectionHandler(G4IInterpolator* interpolation,
|
||||
const G4String& modelK="ecpssr",
|
||||
const G4String& modelL="ecpssr",
|
||||
const G4String& modelM="ecpssr",
|
||||
G4double minE = 1*keV, G4double maxE = 0.1*GeV,
|
||||
G4int nBins = 200,
|
||||
G4double unitE = MeV, G4double unitData = barn,
|
||||
G4int minZ = 6, G4int maxZ = 92);
|
||||
|
||||
virtual ~G4PixeCrossSectionHandler();
|
||||
|
||||
void Initialise(G4IInterpolator* interpolation,
|
||||
const G4String& modelK="ecpssr",
|
||||
const G4String& modelL="ecpssr",
|
||||
const G4String& modelM="ecpssr",
|
||||
G4double minE = 1*keV, G4double maxE = 0.1*GeV,
|
||||
G4int nBins = 200,
|
||||
G4double unitE = MeV, G4double unitData = barn,
|
||||
G4int minZ = 6, G4int maxZ = 92);
|
||||
|
||||
G4int SelectRandomAtom(const G4Material* material, G4double e) const;
|
||||
|
||||
G4int SelectRandomShell(G4int Z, G4double e) const;
|
||||
|
||||
G4double FindValue(G4int Z, G4double e) const;
|
||||
|
||||
G4double FindValue(G4int Z, G4double e, G4int shellIndex) const;
|
||||
|
||||
G4double ValueForMaterial(const G4Material* material, G4double e) const;
|
||||
|
||||
// void LoadData(const G4String& dataFile);
|
||||
|
||||
void LoadShellData(const G4String& dataFile);
|
||||
|
||||
// Ionisation cross section as in Geant4 Physics Reference Manual
|
||||
G4double MicroscopicCrossSection(const G4ParticleDefinition* particleDef,
|
||||
G4double kineticEnergy,
|
||||
G4double Z,
|
||||
G4double deltaCut) const;
|
||||
|
||||
void PrintData() const;
|
||||
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4PixeCrossSectionHandler(const G4PixeCrossSectionHandler&);
|
||||
G4PixeCrossSectionHandler & operator=(const G4PixeCrossSectionHandler &right);
|
||||
|
||||
G4int NumberOfComponents(G4int Z) const;
|
||||
|
||||
void ActiveElements();
|
||||
|
||||
void BuildForMaterials();
|
||||
// Factory method
|
||||
std::vector<G4IDataSet*>* BuildCrossSectionsForMaterials(const G4DataVector& energyVector);
|
||||
|
||||
// Factory method
|
||||
G4IInterpolator* CreateInterpolation();
|
||||
|
||||
const G4IInterpolator* GetInterpolation() const { return interpolation; }
|
||||
|
||||
G4IInterpolator* interpolation;
|
||||
|
||||
G4double eMin;
|
||||
G4double eMax;
|
||||
G4int nBins;
|
||||
|
||||
G4double unit1;
|
||||
G4double unit2;
|
||||
|
||||
G4int zMin;
|
||||
G4int zMax;
|
||||
|
||||
G4DataVector activeZ;
|
||||
|
||||
// Map of PixeShellDataSets with the shell cross sections for each element
|
||||
std::map<G4int,G4IDataSet*,std::less<G4int> > dataMap;
|
||||
|
||||
// Vector of composite cross sections for each material in the MaterialTable
|
||||
// The composite cross section is composed of cross sections for each element in material
|
||||
std::vector<G4IDataSet*>* crossSections;
|
||||
|
||||
std::vector<G4String> crossModel;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PixeShellDataSet.hh,v 1.2 2010/11/19 17:16:09 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created as G4EMShellDataSe
|
||||
// 9 Mar 2008 MGP Cleaned up unreadable code modified by former developer
|
||||
// (Further clean-up needed)
|
||||
// 31 Jul 2008 MGP Revised and renamed to G4PixeShellDataSet
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Shell data set
|
||||
// Applies a Composite design pattern for data library management
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4PIXESHELLDATASET_HH
|
||||
#define G4PIXESHELLDATASET_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4IDataSet.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4IInterpolator;
|
||||
|
||||
class G4PixeShellDataSet : public G4IDataSet
|
||||
{
|
||||
public:
|
||||
G4PixeShellDataSet(G4int Z,
|
||||
G4IInterpolator* algo,
|
||||
//const G4String& particleTpye="proton",
|
||||
const G4String& modelK="ecpssr",
|
||||
const G4String& modelL="ecpssr",
|
||||
const G4String& modelM="ecpssr",
|
||||
G4double eUnit=MeV,
|
||||
G4double dataUnit=barn);
|
||||
|
||||
virtual ~G4PixeShellDataSet();
|
||||
|
||||
virtual G4double FindValue(G4double energy, G4int componentId=0) const;
|
||||
|
||||
virtual void PrintData(void) const;
|
||||
|
||||
virtual const G4IDataSet* GetComponent(G4int componentId) const
|
||||
{ return components[componentId]; }
|
||||
|
||||
virtual void AddComponent(G4IDataSet* dataSet)
|
||||
{ components.push_back(dataSet); }
|
||||
|
||||
virtual size_t NumberOfComponents(void) const
|
||||
{ return components.size(); }
|
||||
|
||||
virtual const G4DataVector& GetEnergies(G4int componentId) const
|
||||
{ return GetComponent(componentId)->GetEnergies(0); }
|
||||
|
||||
virtual const G4DataVector& GetData(G4int componentId) const
|
||||
{ return GetComponent(componentId)->GetData(0); }
|
||||
|
||||
virtual void SetEnergiesData(G4DataVector* energies,
|
||||
G4DataVector* data,
|
||||
G4int componentId);
|
||||
|
||||
virtual G4bool LoadData(const G4String& fileName);
|
||||
virtual G4bool SaveData(const G4String& fileName) const;
|
||||
|
||||
virtual G4double RandomSelect(G4int /*componentId = 0*/) const {return -1.;};
|
||||
|
||||
protected:
|
||||
|
||||
G4double GetUnitEnergies() const { return unitEnergies; }
|
||||
G4double GetUnitData() const { return unitData; }
|
||||
const G4IInterpolator* GetAlgorithm() const { return algorithm; }
|
||||
|
||||
void CleanUpComponents(void);
|
||||
|
||||
private:
|
||||
|
||||
G4String FullFileName(const G4String& particleType,
|
||||
const G4String& subShell) const;
|
||||
G4int TranslateShell(const G4String& subShell) const;
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4PixeShellDataSet();
|
||||
G4PixeShellDataSet(const G4PixeShellDataSet& copy);
|
||||
G4PixeShellDataSet& operator=(const G4PixeShellDataSet& right);
|
||||
|
||||
std::vector<G4IDataSet*> components; // Owned pointers
|
||||
|
||||
G4int z;
|
||||
G4IInterpolator* algorithm; // Owned pointer
|
||||
// G4String particle;
|
||||
// G4String crossModelK;
|
||||
// G4String crossModelL;
|
||||
// G4String crossModelM;
|
||||
std::vector<G4String> crossModel;
|
||||
G4double unitEnergies;
|
||||
G4double unitData;
|
||||
std::vector<G4String> shellName;
|
||||
std::vector<G4String> subShellName;
|
||||
|
||||
};
|
||||
#endif /* G4PIXESHELLDATASET_HH */
|
||||
@@ -0,0 +1,327 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// G4hImpactIonisation
|
||||
//
|
||||
// $Id: G4hImpactIonisation.hh,v 1.2 2010/11/19 17:16:09 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (MariaGrazia.Pia@ge.infn.it)
|
||||
//
|
||||
// 08 Sep 2008 - MGP - Created (initially based on G4hLowEnergyIonisation)
|
||||
// Added PIXE capabilities
|
||||
// Partial clean-up of the implementation (more needed)
|
||||
// Calculation of MicroscopicCrossSection delegated to specialised class
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
// Class Description:
|
||||
// Impact Ionisation process of charged hadrons and ions
|
||||
// Initially based on G4hLowEnergyIonisation, to be subject to redesign
|
||||
// and further evolution of physics capabilities
|
||||
//
|
||||
// The physics model of G4hLowEnergyIonisation is described in
|
||||
// CERN-OPEN-99-121 and CERN-OPEN-99-300.
|
||||
//
|
||||
// Documentation available in:
|
||||
// M.G. Pia et al., PIXE Simulation With Geant4,
|
||||
// IEEE Trans. Nucl. Sci., vol. 56, no. 6, pp. 3614-3649, Dec. 2009.
|
||||
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4HIMPACTIONISATION
|
||||
#define G4HIMPACTIONISATION 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4hRDEnergyLoss.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include "G4AtomicDeexcitation.hh"
|
||||
#include "G4PixeCrossSectionHandler.hh"
|
||||
|
||||
#include <map>
|
||||
|
||||
class G4VLowEnergyModel;
|
||||
class G4VParticleChange;
|
||||
class G4ParticleDefinition;
|
||||
class G4PhysicsTable;
|
||||
class G4MaterialCutsCouple;
|
||||
class G4Track;
|
||||
class G4Step;
|
||||
|
||||
class G4hImpactIonisation : public G4hRDEnergyLoss
|
||||
{
|
||||
public: // With description
|
||||
|
||||
G4hImpactIonisation(const G4String& processName = "hImpactIoni");
|
||||
// The ionisation process for hadrons/ions to be include in the
|
||||
// UserPhysicsList
|
||||
|
||||
~G4hImpactIonisation();
|
||||
// Destructor
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
// True for all charged hadrons/ions
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType) ;
|
||||
// Build physics table during initialisation
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
enum G4ForceCondition* condition );
|
||||
// Return MeanFreePath until delta-electron production
|
||||
|
||||
void PrintInfoDefinition() const;
|
||||
// Print out of the class parameters
|
||||
|
||||
void SetHighEnergyForProtonParametrisation(G4double energy) {protonHighEnergy = energy;} ;
|
||||
// Definition of the boundary proton energy. For higher energies
|
||||
// Bethe-Bloch formula is used, for lower energies a parametrisation
|
||||
// of the energy losses is performed. Default is 2 MeV.
|
||||
|
||||
void SetLowEnergyForProtonParametrisation(G4double energy) {protonLowEnergy = energy;} ;
|
||||
// Set of the boundary proton energy. For lower energies
|
||||
// the Free Electron Gas model is used for the energy losses.
|
||||
// Default is 1 keV.
|
||||
|
||||
void SetHighEnergyForAntiProtonParametrisation(G4double energy) {antiprotonHighEnergy = energy;} ;
|
||||
// Set of the boundary antiproton energy. For higher energies
|
||||
// Bethe-Bloch formula is used, for lower energies parametrisation
|
||||
// of the energy losses is performed. Default is 2 MeV.
|
||||
|
||||
void SetLowEnergyForAntiProtonParametrisation(G4double energy) {antiprotonLowEnergy = energy;} ;
|
||||
// Set of the boundary antiproton energy. For lower energies
|
||||
// the Free Electron Gas model is used for the energy losses.
|
||||
// Default is 1 keV.
|
||||
|
||||
G4double GetContinuousStepLimit(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety);
|
||||
// Calculation of the step limit due to ionisation losses
|
||||
|
||||
void SetElectronicStoppingPowerModel(const G4ParticleDefinition* aParticle,
|
||||
const G4String& dedxTable);
|
||||
// This method defines the electron ionisation parametrisation method
|
||||
// via the name of the table. Default is "ICRU_49p".
|
||||
|
||||
void SetNuclearStoppingPowerModel(const G4String& dedxTable)
|
||||
{theNuclearTable = dedxTable; SetNuclearStoppingOn();};
|
||||
// This method defines the nuclear ionisation parametrisation method
|
||||
// via the name of the table. Default is "ICRU_49".
|
||||
|
||||
// ---- MGP ---- The following design of On/Off is nonsense; to be modified
|
||||
// in a following design iteration
|
||||
|
||||
void SetNuclearStoppingOn() {nStopping = true;};
|
||||
// This method switch on calculation of the nuclear stopping power.
|
||||
|
||||
void SetNuclearStoppingOff() {nStopping = false;};
|
||||
// This method switch off calculation of the nuclear stopping power.
|
||||
|
||||
void SetBarkasOn() {theBarkas = true;};
|
||||
// This method switch on calculation of the Barkas and Bloch effects.
|
||||
|
||||
void SetBarkasOff() {theBarkas = false;};
|
||||
// This method switch off calculation of the Barkas and Bloch effects.
|
||||
|
||||
void SetPixe(const G4bool /* val */ ) {pixeIsActive = true;};
|
||||
// This method switches atomic relaxation on/off; currently always on
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(const G4Track& trackData ,
|
||||
const G4Step& stepData ) ;
|
||||
// Function to determine total energy deposition on the step
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& track,
|
||||
const G4Step& Step ) ;
|
||||
// Simulation of delta-ray production.
|
||||
|
||||
G4double ComputeDEDX(const G4ParticleDefinition* aParticle,
|
||||
const G4MaterialCutsCouple* couple,
|
||||
G4double kineticEnergy);
|
||||
// This method returns electronic dE/dx for protons or antiproton
|
||||
|
||||
void SetCutForSecondaryPhotons(G4double cut);
|
||||
// Set threshold energy for fluorescence
|
||||
|
||||
void SetCutForAugerElectrons(G4double cut);
|
||||
// Set threshold energy for Auger electron production
|
||||
|
||||
void ActivateAugerElectronProduction(G4bool val);
|
||||
// Set Auger electron production flag on/off
|
||||
|
||||
// Accessors to configure PIXE
|
||||
void SetPixeCrossSectionK(const G4String& name) { modelK = name; }
|
||||
void SetPixeCrossSectionL(const G4String& name) { modelL = name; }
|
||||
void SetPixeCrossSectionM(const G4String& name) { modelM = name; }
|
||||
void SetPixeProjectileMinEnergy(G4double energy) { eMinPixe = energy; }
|
||||
void SetPixeProjectileMaxEnergy(G4double energy) { eMaxPixe = energy; }
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
void InitializeMe();
|
||||
void InitializeParametrisation();
|
||||
void BuildLossTable(const G4ParticleDefinition& aParticleType);
|
||||
// void BuildDataForFluorescence(const G4ParticleDefinition& aParticleType);
|
||||
void BuildLambdaTable(const G4ParticleDefinition& aParticleType);
|
||||
void SetProtonElectronicStoppingPowerModel(const G4String& dedxTable)
|
||||
{protonTable = dedxTable ;};
|
||||
// This method defines the ionisation parametrisation method via its name
|
||||
|
||||
void SetAntiProtonElectronicStoppingPowerModel(const G4String& dedxTable)
|
||||
{antiprotonTable = dedxTable;};
|
||||
|
||||
G4double MicroscopicCrossSection(const G4ParticleDefinition& aParticleType,
|
||||
G4double kineticEnergy,
|
||||
G4double atomicNumber,
|
||||
G4double deltaCutInEnergy) const;
|
||||
|
||||
G4double GetConstraints(const G4DynamicParticle* particle,
|
||||
const G4MaterialCutsCouple* couple);
|
||||
// Function to determine StepLimit
|
||||
|
||||
G4double ProtonParametrisedDEDX(const G4MaterialCutsCouple* couple,
|
||||
G4double kineticEnergy) const;
|
||||
|
||||
G4double AntiProtonParametrisedDEDX(const G4MaterialCutsCouple* couple,
|
||||
G4double kineticEnergy) const;
|
||||
|
||||
G4double DeltaRaysEnergy(const G4MaterialCutsCouple* couple,
|
||||
G4double kineticEnergy,
|
||||
G4double particleMass) const;
|
||||
// This method returns average energy loss due to delta-rays emission with
|
||||
// energy higher than the cut energy for given material.
|
||||
|
||||
G4double BarkasTerm(const G4Material* material,
|
||||
G4double kineticEnergy) const;
|
||||
// Function to compute the Barkas term for protons
|
||||
|
||||
G4double BlochTerm(const G4Material* material,
|
||||
G4double kineticEnergy,
|
||||
G4double cSquare) const;
|
||||
// Function to compute the Bloch term for protons
|
||||
|
||||
G4double ElectronicLossFluctuation(const G4DynamicParticle* particle,
|
||||
const G4MaterialCutsCouple* material,
|
||||
G4double meanLoss,
|
||||
G4double step) const;
|
||||
// Function to sample electronic losses
|
||||
|
||||
// hide assignment operator
|
||||
G4hImpactIonisation & operator=(const G4hImpactIonisation &right);
|
||||
G4hImpactIonisation(const G4hImpactIonisation&);
|
||||
|
||||
private:
|
||||
// private data members ...............................
|
||||
G4VLowEnergyModel* betheBlochModel;
|
||||
G4VLowEnergyModel* protonModel;
|
||||
G4VLowEnergyModel* antiprotonModel;
|
||||
G4VLowEnergyModel* theIonEffChargeModel;
|
||||
G4VLowEnergyModel* theNuclearStoppingModel;
|
||||
G4VLowEnergyModel* theIonChuFluctuationModel;
|
||||
G4VLowEnergyModel* theIonYangFluctuationModel;
|
||||
|
||||
// std::map<G4int,G4double,std::less<G4int> > totalCrossSectionMap;
|
||||
|
||||
// name of parametrisation table of electron stopping power
|
||||
G4String protonTable;
|
||||
G4String antiprotonTable;
|
||||
G4String theNuclearTable;
|
||||
|
||||
// interval of parametrisation of electron stopping power
|
||||
G4double protonLowEnergy;
|
||||
G4double protonHighEnergy;
|
||||
G4double antiprotonLowEnergy;
|
||||
G4double antiprotonHighEnergy;
|
||||
|
||||
// flag of parametrisation of nucleus stopping power
|
||||
G4bool nStopping;
|
||||
G4bool theBarkas;
|
||||
|
||||
G4DataVector cutForDelta;
|
||||
G4DataVector cutForGamma;
|
||||
G4double minGammaEnergy;
|
||||
G4double minElectronEnergy;
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
|
||||
const G4double paramStepLimit; // parameter limits the step at low energy
|
||||
|
||||
G4double fdEdx; // computed in GetContraints
|
||||
G4double fRangeNow ; //
|
||||
G4double charge; //
|
||||
G4double chargeSquare; //
|
||||
G4double initialMass; // mass to calculate Lambda tables
|
||||
G4double fBarkas;
|
||||
|
||||
G4PixeCrossSectionHandler* pixeCrossSectionHandler;
|
||||
G4AtomicDeexcitation atomicDeexcitation;
|
||||
G4String modelK;
|
||||
G4String modelL;
|
||||
G4String modelM;
|
||||
G4double eMinPixe;
|
||||
G4double eMaxPixe;
|
||||
|
||||
G4bool pixeIsActive;
|
||||
|
||||
};
|
||||
|
||||
|
||||
inline G4double G4hImpactIonisation::GetContinuousStepLimit(const G4Track& track,
|
||||
G4double,
|
||||
G4double currentMinimumStep,
|
||||
G4double&)
|
||||
{
|
||||
G4double step = GetConstraints(track.GetDynamicParticle(),track.GetMaterialCutsCouple()) ;
|
||||
|
||||
// ---- MGP ---- The following line, taken as is from G4hLowEnergyIonisation,
|
||||
// is meaningless: currentMinimumStep is passed by value,
|
||||
// therefore any local modification to it has no effect
|
||||
|
||||
if ((step > 0.) && (step < currentMinimumStep)) currentMinimumStep = step ;
|
||||
|
||||
return step ;
|
||||
}
|
||||
|
||||
|
||||
inline G4bool G4hImpactIonisation::IsApplicable(const G4ParticleDefinition& particle)
|
||||
{
|
||||
// ---- MGP ---- Better criterion for applicability to be defined;
|
||||
// now hard-coded particle mass > 0.1 * proton_mass
|
||||
|
||||
return (particle.GetPDGCharge() != 0.0 && particle.GetPDGMass() > proton_mass_c2*0.1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,274 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4hRDEnergyLoss.hh,v 1.2 2010/11/19 17:16:09 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ---------- G4hEnergyLoss physics process -----------
|
||||
// by Laszlo Urban, 30 May 1997
|
||||
//
|
||||
// ************************************************************
|
||||
// It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
|
||||
// It calculates the continuous energy loss for charged hadrons.
|
||||
// Processes giving contribution to the continuous loss :
|
||||
// ionisation (= cont.ion.loss + delta ray production)
|
||||
// can be added more easily ..........
|
||||
// This class creates static proton/antiproton dE/dx and range tables ,
|
||||
// which tables can be used by other processes.
|
||||
// The energy loss for other charged hadrons is calculated from the p/pbar
|
||||
// tables with scaled kinetic energy.
|
||||
//
|
||||
// 7/10/98 L.Urban some bugs fixed + some cleanup
|
||||
// 22/10/98 L.Urban cleanup
|
||||
// 02/02/99 L.Urban several bugs fixed
|
||||
// 31/03/00 V.Ivanchenko rename to lowenergy as G4hLowEnergyLoss.hh
|
||||
// 09/08/00 V.Ivanchenko remove GetContinuousStepLimit and IsApplicable
|
||||
// 23/11/01 V.Ivanchenko Move static member-functions from header to source
|
||||
// 22/01/03 V.Ivanchenko Cuts per region
|
||||
// 18/04/03 V.Ivanchenko Make dRoverRange protected
|
||||
//
|
||||
// 31 Jul 2008 MGP Short term supply of energy loss of hadrons through clone of
|
||||
// former G4hLowEnergyLoss (with some initial cleaning)
|
||||
// To be replaced by reworked class to deal with condensed/discrete
|
||||
// issues properly
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Short term supply of energy loss of hadrons through clone of former G4hLowEnergyLoss
|
||||
// (with some initial cleaning)
|
||||
// To be replaced by reworked class to deal with condensed/discrete issues properly
|
||||
|
||||
// --------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef G4HRDENERGYLOSS_HH
|
||||
#define G4HRDENERGYLOSS_HH 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4VContinuousDiscreteProcess.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
|
||||
class G4EnergyLossMessenger;
|
||||
|
||||
class G4hRDEnergyLoss : public G4VContinuousDiscreteProcess
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4hRDEnergyLoss(const G4String& );
|
||||
|
||||
~G4hRDEnergyLoss();
|
||||
|
||||
virtual G4double GetMeanFreePath(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
enum G4ForceCondition* condition
|
||||
) = 0 ;
|
||||
|
||||
virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
|
||||
const G4Step& Step) = 0 ;
|
||||
|
||||
// ---- MGP ---- All this static stuff is expected to disappear in a future
|
||||
// development cycle
|
||||
|
||||
// get the number of processes contributing to the cont.energy loss
|
||||
static G4int GetNumberOfProcesses();
|
||||
|
||||
// set the number of processes contributing to the cont.energy loss
|
||||
static void SetNumberOfProcesses(G4int number);
|
||||
|
||||
// Increment the number of processes contributing to the cont.energy loss
|
||||
static void PlusNumberOfProcesses();
|
||||
|
||||
// decrement the number of processes contributing to the cont.energy loss
|
||||
static void MinusNumberOfProcesses();
|
||||
|
||||
static void SetdRoverRange(G4double value);
|
||||
static void SetRndmStep (G4bool value);
|
||||
static void SetEnlossFluc (G4bool value);
|
||||
static void SetStepFunction (G4double c1, G4double c2);
|
||||
|
||||
protected:
|
||||
|
||||
G4bool CutsWhereModified();
|
||||
|
||||
// G4Material *lastMaterial ;
|
||||
const G4double MaxExcitationNumber ;
|
||||
const G4double probLimFluct ;
|
||||
const long nmaxDirectFluct,nmaxCont1,nmaxCont2 ;
|
||||
|
||||
static void BuildDEDXTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
protected:
|
||||
|
||||
static G4PhysicsTable* theDEDXpTable ;
|
||||
static G4PhysicsTable* theDEDXpbarTable ;
|
||||
static G4PhysicsTable* theRangepTable ;
|
||||
static G4PhysicsTable* theRangepbarTable ;
|
||||
|
||||
//inverse of the range tables
|
||||
static G4PhysicsTable* theInverseRangepTable ;
|
||||
static G4PhysicsTable* theInverseRangepbarTable ;
|
||||
|
||||
//lab and proper time tables
|
||||
static G4PhysicsTable* theLabTimepTable ;
|
||||
static G4PhysicsTable* theLabTimepbarTable ;
|
||||
|
||||
static G4PhysicsTable* theProperTimepTable ;
|
||||
static G4PhysicsTable* theProperTimepbarTable ;
|
||||
|
||||
// processes inherited from G4hRDEnergyLoss
|
||||
// register themselves in the static array Recorder
|
||||
static G4PhysicsTable** RecorderOfpProcess;
|
||||
static G4PhysicsTable** RecorderOfpbarProcess;
|
||||
static G4int CounterOfpProcess ;
|
||||
static G4int CounterOfpbarProcess ;
|
||||
|
||||
// particle mass
|
||||
static G4double ParticleMass ;
|
||||
|
||||
// cut in range
|
||||
static G4double ptableElectronCutInRange;
|
||||
static G4double pbartableElectronCutInRange;
|
||||
|
||||
static G4double Charge ;
|
||||
|
||||
static G4double LowestKineticEnergy;
|
||||
static G4double HighestKineticEnergy;
|
||||
static G4int TotBin; // number of bins in table,
|
||||
// calculated in BuildPhysicsTable
|
||||
|
||||
static G4double RTable,LOGRTable; // LOGRTable=std::log(HighestKineticEnergy
|
||||
// /LowestKineticEnergy)/TotBin
|
||||
// RTable = std::exp(LOGRTable)
|
||||
|
||||
G4PhysicsTable* theLossTable ;
|
||||
|
||||
G4double linLossLimit ;
|
||||
|
||||
G4double MinKineticEnergy ;
|
||||
|
||||
static G4double dRoverRange ; // maximum allowed deltarange/range
|
||||
// in one step
|
||||
static G4double finalRange ; // last step before stop
|
||||
static G4double c1lim,c2lim,c3lim ; // coeffs for computing steplimit
|
||||
|
||||
static G4bool rndmStepFlag ;
|
||||
static G4bool EnlossFlucFlag ;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator
|
||||
|
||||
G4hRDEnergyLoss(G4hRDEnergyLoss &);
|
||||
G4hRDEnergyLoss & operator=(const G4hRDEnergyLoss &right);
|
||||
|
||||
// variables for the integration routines
|
||||
static G4double Mass,taulow,tauhigh,ltaulow,ltauhigh;
|
||||
|
||||
// ====================================================================
|
||||
// static part of the class
|
||||
|
||||
static void BuildRangeTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
static void BuildInverseRangeTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
static void BuildTimeTables(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
static void BuildLabTimeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
static void BuildProperTimeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
static void InvertRangeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
static void BuildRangeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
static G4double LabTimeIntLog(G4PhysicsVector* physicsVector, G4int nbin);
|
||||
|
||||
static G4double ProperTimeIntLog(G4PhysicsVector* physicsVector, G4int nbin);
|
||||
|
||||
static G4double RangeIntLin(G4PhysicsVector* physicsVector, G4int nbin);
|
||||
|
||||
static G4double RangeIntLog(G4PhysicsVector* physicsVector, G4int nbin);
|
||||
|
||||
static void BuildRangeCoeffATable( const G4ParticleDefinition& aParticleType);
|
||||
static void BuildRangeCoeffBTable( const G4ParticleDefinition& aParticleType);
|
||||
static void BuildRangeCoeffCTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
// ====================================================================
|
||||
|
||||
static G4PhysicsTable* theDEDXTable;
|
||||
|
||||
static G4PhysicsTable* theRangeTable;
|
||||
static G4PhysicsTable* theInverseRangeTable;
|
||||
|
||||
static G4PhysicsTable* theLabTimeTable;
|
||||
static G4PhysicsTable* theProperTimeTable;
|
||||
|
||||
static G4PhysicsTable** RecorderOfProcess;
|
||||
static G4int CounterOfProcess;
|
||||
|
||||
static G4PhysicsTable* thepRangeCoeffATable;
|
||||
static G4PhysicsTable* thepRangeCoeffBTable;
|
||||
static G4PhysicsTable* thepRangeCoeffCTable;
|
||||
static G4PhysicsTable* thepbarRangeCoeffATable;
|
||||
static G4PhysicsTable* thepbarRangeCoeffBTable;
|
||||
static G4PhysicsTable* thepbarRangeCoeffCTable;
|
||||
|
||||
static G4PhysicsTable* theRangeCoeffATable;
|
||||
static G4PhysicsTable* theRangeCoeffBTable;
|
||||
static G4PhysicsTable* theRangeCoeffCTable;
|
||||
static G4int NumberOfProcesses ;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user