Import Geant4 8.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:36:02 +02:00
parent d93e1e39a9
commit 8a51e0bc40
5471 changed files with 99628 additions and 55248 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4BosonConstructor.hh,v 1.3 2001/07/11 10:01:32 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4BosonConstructor.hh,v 1.5 2005/09/30 22:59:05 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// --------------------------------------------------------------
@@ -37,14 +37,13 @@
class G4BosonConstructor
{
//This class is a utility class for constructBoson
//short lived particles
public:
G4BosonConstructor();
~G4BosonConstructor();
public:
void ConstructParticle();
static void ConstructParticle();
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ChargedGeantino.hh,v 1.9 2002/12/16 11:15:36 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4ChargedGeantino.hh,v 1.11 2005/01/14 03:49:04 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ------------------------------------------------------------
@@ -31,47 +31,32 @@
// History: first implementation, based on object model of
// 4-th April 1996, G.Cosmo
// ****************************************************************
// Added particle definitions, H.Kurashige, 19 April 1996
// Revised, G.Cosmo, 6 June 1996
// Added not static GetEnergyCuts() and GetLengthCuts(), G.Cosmo, 11 July 1996
// New impelemenataion as an utility class H.Kurashige, 14 July 2004
// ----------------------------------------------------------------
// Each class inheriting from G4VBoson
// corresponds to a particle type; one and only one
// instance for each class is guaranteed.
#ifndef G4ChargedGeantino_h
#define G4ChargedGeantino_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4VBoson.hh"
#include "G4ParticleDefinition.hh"
// ######################################################################
// ### ChargedGeantino ###
// ######################################################################
class G4ChargedGeantino : public G4VBoson
class G4ChargedGeantino : public G4ParticleDefinition
{
private:
static G4ChargedGeantino theChargedGeantino;
static G4ChargedGeantino* theInstance;
private:
G4ChargedGeantino(
const G4String& aName, G4double mass,
G4double width, G4double charge,
G4int iSpin, G4int iParity,
G4int iConjugation, G4int iIsospin,
G4int iIsospin3, G4int gParity,
const G4String& pType, G4int lepton,
G4int baryon, G4int encoding,
G4bool stable, G4double lifetime,
G4DecayTable *decaytable
);
G4ChargedGeantino(){}
public:
virtual ~G4ChargedGeantino(){}
~G4ChargedGeantino(){}
static G4ChargedGeantino* Definition();
static G4ChargedGeantino* ChargedGeantinoDefinition();
static G4ChargedGeantino* ChargedGeantino();
+11 -26
View File
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4Gamma.hh,v 1.12 2002/12/16 11:15:36 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Gamma.hh,v 1.14 2005/01/14 03:49:05 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ------------------------------------------------------------
@@ -30,48 +30,33 @@
// History: first implementation, based on object model of
// 4-th April 1996, G.Cosmo
// ****************************************************************
// Added particle definitions, H.Kurashige, 19 April 1996
// Revised, G.Cosmo, 6 June 1996
// Added SetCuts, L.Urban, 12 June 1996
// Added not static GetEnergyCuts() and GetLengthCuts(), G.Cosmo, 11 July 1996
// New impelemenataion as an utility class H.Kurashige, 14 July 2004
// ----------------------------------------------------------------
// Each class inheriting from G4VBoson
// corresponds to a particle type; one and only one
// instance for each class is guaranteed.
#ifndef G4Gamma_h
#define G4Gamma_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4VBoson.hh"
#include "G4ParticleDefinition.hh"
// ######################################################################
// ### GAMMA ###
// ######################################################################
class G4Gamma : public G4VBoson
class G4Gamma : public G4ParticleDefinition
{
private:
static G4Gamma theGamma;
private: // hide conxtructor as private
G4Gamma(
const G4String& aName, G4double mass,
G4double width, G4double charge,
G4int iSpin, G4int iParity,
G4int iConjugation, G4int iIsospin,
G4int iIsospin3, G4int gParity,
const G4String& pType, G4int lepton,
G4int baryon, G4int encoding,
G4bool stable, G4double lifetime,
G4DecayTable *decaytable
);
static G4Gamma* theInstance;
private: // hide constructor as private
G4Gamma(){}
public:
virtual ~G4Gamma(){}
~G4Gamma(){}
static G4Gamma* Definition();
static G4Gamma* GammaDefinition();
static G4Gamma* Gamma();
};
+9 -25
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Geantino.hh,v 1.9 2002/12/16 11:15:36 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Geantino.hh,v 1.11 2005/01/14 03:49:05 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ------------------------------------------------------------
@@ -31,50 +31,34 @@
// History: first implementation, based on object model of
// 4-th April 1996, G.Cosmo
// ****************************************************************
// Added particle definitions, H.Kurashige, 19 April 1996
// Revised, G.Cosmo, 6 June 1996
// Added not static GetEnergyCuts() and GetLengthCuts(), G.Cosmo, 11 July 1996
// New impelemenataion as an utility class H.Kurashige, 14 July 2004
// ----------------------------------------------------------------
// Each class inheriting from G4VBoson
// corresponds to a particle type; one and only one
// instance for each class is guaranteed.
#ifndef G4Geantino_h
#define G4Geantino_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4VBoson.hh"
#include "G4ParticleDefinition.hh"
// ######################################################################
// ### GEANTINO ###
// ######################################################################
class G4Geantino : public G4VBoson
class G4Geantino : public G4ParticleDefinition
{
private:
static G4Geantino theGeantino;
static G4Geantino* theInstance;
private:
G4Geantino(
const G4String& aName, G4double mass,
G4double width, G4double charge,
G4int iSpin, G4int iParity,
G4int iConjugation, G4int iIsospin,
G4int iIsospin3, G4int gParity,
const G4String& pType, G4int lepton,
G4int baryon, G4int encoding,
G4bool stable, G4double lifetime,
G4DecayTable *decaytable
);
G4Geantino() {}
public:
virtual ~G4Geantino(){}
~G4Geantino(){}
static G4Geantino* Definition();
static G4Geantino* GeantinoDefinition();
static G4Geantino* Geantino();
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpticalPhoton.hh,v 1.8 2002/12/16 11:15:36 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4OpticalPhoton.hh,v 1.11 2005/01/30 22:57:53 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ------------------------------------------------------------
@@ -31,49 +31,35 @@
// History: first implementation, based on object model of
// 4-th April 1996, G.Cosmo
// ****************************************************************
// Added particle definitions, H.Kurashige, 19 April 1996
// Revised, G.Cosmo, 6 June 1996
// Added not static GetEnergyCuts() and GetLengthCuts(), G.Cosmo, 11 July 1996
// New impelemenataion as an utility class H.Kurashige, 14 July 2004
// ----------------------------------------------------------------
// Each class inheriting from G4VBoson
// corresponds to a particle type; one and only one
// instance for each class is guaranteed.
#ifndef G4OpticalPhoton_h
#define G4OpticalPhoton_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4VBoson.hh"
#include "G4ParticleDefinition.hh"
// ######################################################################
// ### OPTICAL PHOTON ###
// ######################################################################
class G4OpticalPhoton: public G4VBoson
class G4OpticalPhoton : public G4ParticleDefinition
{
private:
static G4OpticalPhoton theOpticalPhoton;
static G4OpticalPhoton* theInstance;
private:
G4OpticalPhoton (
const G4String& aName, G4double mass,
G4double width, G4double charge,
G4int iSpin, G4int iParity,
G4int iConjugation, G4int iIsospin,
G4int iIsospin3, G4int gParity,
const G4String& pType, G4int lepton,
G4int baryon, G4int encoding,
G4bool stable, G4double lifetime,
G4DecayTable *decaytable
);
G4OpticalPhoton () {}
public:
virtual ~G4OpticalPhoton (){}
~G4OpticalPhoton (){}
static G4OpticalPhoton* Definition();
static G4OpticalPhoton* OpticalPhotonDefinition();
static G4OpticalPhoton* OpticalPhoton();
};
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4UnknownParticle.hh,v 1.4 2005/01/30 22:58:02 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ------------------------------------------------------------
@@ -1,85 +0,0 @@
//
// ********************************************************************
// * 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: G4VBoson.hh,v 1.5 2004/07/26 08:14:36 kurasige Exp $
// GEANT4 tag $Name: geant4-07-01 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// Revised, Hisaya Kurashige, 15 Dec 1996
// Revised, Hisaya Kurashige, 24 Feb 1997
// ------------------------------------------------------------
#ifndef G4VBoson_h
#define G4VBoson_h 1
#include "globals.hh"
#include "G4ParticleDefinition.hh"
class G4VBoson : public G4ParticleDefinition
{
// A virtual class for Bosons particles. It defines
// public methods which describe the behavior of a
// boson.
private:
const G4VBoson & operator=(const G4VBoson &right);
public:
G4VBoson(const G4String& aName,
G4double mass,
G4double width,
G4double charge,
G4int iSpin,
G4int iParity,
G4int iConjugation,
G4int iIsospin,
G4int iIsospinZ,
G4int gParity,
const G4String& pType,
G4int lepton,
G4int baryon,
G4int encoding,
G4bool stable,
G4double lifetime,
G4DecayTable *decaytable)
: G4ParticleDefinition(aName, mass, width, charge, iSpin, iParity,
iConjugation, iIsospin, iIsospinZ, gParity,
pType, lepton, baryon, encoding, stable,
lifetime, decaytable) {};
virtual ~G4VBoson() {};
G4int operator==(const G4VBoson &right) const;
G4int operator!=(const G4VBoson &right) const;
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4BosonConstructor.cc,v 1.3 2001/07/11 10:01:33 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4BosonConstructor.cc,v 1.4 2004/09/02 01:52:26 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// --------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ChargedGeantino.cc,v 1.12 2003/06/16 16:56:45 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4ChargedGeantino.cc,v 1.14 2005/01/14 03:49:06 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ----------------------------------------------------------------------
@@ -31,67 +31,58 @@
// History: first implementation, based on object model of
// 4th April 1996, G.Cosmo
// **********************************************************************
// Added particle definitions, H.Kurashige, 19 April 1996
// Operators (+=, *=, ++, -> etc.) correctly used, P. Urban, 26/6/96
// Add G4ChargedGeantino::ChargedGeantinoDefinition() H.Kurashige, 4 July 1996
// ----------------------------------------------------------------------
#include <fstream>
#include <iomanip>
// New impelemenataion as an utility class H.Kurashige, 14 July 2004
// ----------------------------------------------------------------
#include "G4ChargedGeantino.hh"
#include "G4ParticleTable.hh"
// ######################################################################
// ### ChargedGeantino ###
// ######################################################################
G4ChargedGeantino* G4ChargedGeantino::theInstance = 0;
G4ChargedGeantino::G4ChargedGeantino(
const G4String& aName, G4double mass,
G4double width, G4double charge,
G4int iSpin, G4int iParity,
G4int iConjugation, G4int iIsospin,
G4int iIsospin3, G4int gParity,
const G4String& pType, G4int lepton,
G4int baryon, G4int encoding,
G4bool stable, G4double lifetime,
G4DecayTable *decaytable )
: G4VBoson( aName,mass,width,charge,iSpin,iParity,
iConjugation,iIsospin,iIsospin3,gParity,pType,
lepton,baryon,encoding,stable,lifetime,decaytable )
G4ChargedGeantino* G4ChargedGeantino::Definition()
{
SetParticleSubType("geantino");
// Anti-particle of ChargedGeantino is ChargedGeantino itself
SetAntiPDGEncoding(encoding);
}
if (theInstance !=0) return theInstance;
// ......................................................................
// ... static member definitions ...
// ......................................................................
//
// Arguments for constructor are as follows
// name mass width charge
// 2*spin parity C-conjugation
// 2*Isospin 2*Isospin3 G-parity
// type lepton number baryon number PDG encoding
// stable lifetime decay table
G4ChargedGeantino G4ChargedGeantino::theChargedGeantino(
"chargedgeantino", 0.0*MeV, 0.0*MeV, +1.*eplus,
const G4String name = "chargedgeantino";
// search in particle table
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
G4ParticleDefinition* anInstance = pTable->FindParticle(name);
if (anInstance ==0)
{
// create particle
//
// Arguments for constructor are as follows
// name mass width charge
// 2*spin parity C-conjugation
// 2*Isospin 2*Isospin3 G-parity
// type lepton number baryon number PDG encoding
// stable lifetime decay table
// shortlived subType anti_encoding
anInstance = new G4ParticleDefinition(
name, 0.0*MeV, 0.0*MeV, +1.*eplus,
0, 0, 0,
0, 0, 0,
"geantino", 0, 0, 0,
true, 0.0, NULL
);
G4ChargedGeantino* G4ChargedGeantino::ChargedGeantinoDefinition(){return &theChargedGeantino;}
// **********************************************************************
// **************************** SetCuts *********************************
// **********************************************************************
G4ChargedGeantino* G4ChargedGeantino::ChargedGeantino()
{
return &theChargedGeantino;
true, 0.0, NULL,
false, "geantino", 0
);
}
theInstance = reinterpret_cast<G4ChargedGeantino*>(anInstance);
return theInstance;
}
G4ChargedGeantino* G4ChargedGeantino::ChargedGeantinoDefinition()
{
return Definition();
}
G4ChargedGeantino* G4ChargedGeantino::ChargedGeantino()
{
return Definition();
}
+44 -51
View File
@@ -21,73 +21,66 @@
// ********************************************************************
//
//
// $Id: G4Gamma.cc,v 1.10 2003/06/16 16:56:46 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Gamma.cc,v 1.12 2005/01/14 03:49:06 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ----------------------------------------------------------------------
// GEANT 4 class implementation file
//
// History: first implementation, based on object model of
// 4th April 1996, G.Cosmo
// **********************************************************************
// Added particle definitions, H.Kurashige, 19 April 1996
// Added SetCuts implementation , L.Urban , 12 June 1996
// Code uses operators (+=, *=, ++, -> etc.) correctly, P. Urban, 26/6/96
// Add GammaDefinition(), H.Kurashige, 4 July 1996
// 4-th April 1996, G.Cosmo
// ****************************************************************
// New impelemenataion as an utility class H.Kurashige, 14 July 2004
// ----------------------------------------------------------------
// ----------------------------------------------------------------------
#include "G4ios.hh"
#include <fstream>
#include <iomanip>
#include "G4Gamma.hh"
#include "G4ParticleTable.hh"
// ######################################################################
// ### GAMMA ###
// ######################################################################
G4Gamma* G4Gamma::theInstance = 0;
G4Gamma::G4Gamma(
const G4String& aName, G4double mass,
G4double width, G4double charge,
G4int iSpin, G4int iParity,
G4int iConjugation, G4int iIsospin,
G4int iIsospin3, G4int gParity,
const G4String& pType, G4int lepton,
G4int baryon, G4int encoding,
G4bool stable, G4double lifetime,
G4DecayTable *decaytable )
: G4VBoson( aName,mass,width,charge,iSpin,iParity,
iConjugation,iIsospin,iIsospin3,gParity,pType,
lepton,baryon,encoding,stable,lifetime,decaytable )
G4Gamma* G4Gamma::Definition()
{
SetParticleSubType("photon");
// Anti-particle of gamma is gamma itself
SetAntiPDGEncoding(encoding);
}
if (theInstance !=0) return theInstance;
// ......................................................................
// ... static member definitions ...
// ......................................................................
//
// Arguments for constructor are as follows
// name mass width charge
// 2*spin parity C-conjugation
// 2*Isospin 2*Isospin3 G-parity
// type lepton number baryon number PDG encoding
// stable lifetime decay table
G4Gamma G4Gamma::theGamma(
"gamma", 0.0*MeV, 0.0*MeV, 0.0,
const G4String name = "gamma";
// search in particle table]
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
G4ParticleDefinition* anInstance = pTable->FindParticle(name);
if (anInstance ==0)
{
// create particle
//
// Arguments for constructor are as follows
// name mass width charge
// 2*spin parity C-conjugation
// 2*Isospin 2*Isospin3 G-parity
// type lepton number baryon number PDG encoding
// stable lifetime decay table
// shortlived subType anti_encoding
anInstance = new G4ParticleDefinition(
name, 0.0*MeV, 0.0*MeV, 0.0,
2, -1, -1,
0, 0, 0,
"gamma", 0, 0, 22,
true, 0.0, NULL
);
G4Gamma* G4Gamma::GammaDefinition() {return &theGamma;}
G4Gamma* G4Gamma::Gamma()
{
return &theGamma;
true, 0.0, NULL,
false, "photon", 22
);
}
theInstance = reinterpret_cast<G4Gamma*>(anInstance);
return theInstance;
}
G4Gamma* G4Gamma::GammaDefinition()
{
return Definition();
}
G4Gamma* G4Gamma::Gamma()
{
return Definition();
}
+45 -55
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Geantino.cc,v 1.12 2003/06/16 16:56:47 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Geantino.cc,v 1.14 2005/01/14 03:49:06 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ----------------------------------------------------------------------
@@ -30,68 +30,58 @@
//
// History: first implementation, based on object model of
// 4th April 1996, G.Cosmo
// **********************************************************************
// Added particle definitions, H.Kurashige, 19 April 1996
// Operators (+=, *=, ++, -> etc.) correctly used, P. Urban, 26/6/96
// Add G4Geantino::GeantinoDefinition() H.Kurashige, 4 July 1996
// ----------------------------------------------------------------------
#include <fstream>
#include <iomanip>
// ****************************************************************
// New impelemenataion as an utility class H.Kurashige, 14 July 2004
// ----------------------------------------------------------------
#include "G4Geantino.hh"
#include "G4ParticleTable.hh"
// ######################################################################
// ### GEANTINO ###
// ######################################################################
G4Geantino* G4Geantino::theInstance = 0;
G4Geantino::G4Geantino(
const G4String& aName, G4double mass,
G4double width, G4double charge,
G4int iSpin, G4int iParity,
G4int iConjugation, G4int iIsospin,
G4int iIsospin3, G4int gParity,
const G4String& pType, G4int lepton,
G4int baryon, G4int encoding,
G4bool stable, G4double lifetime,
G4DecayTable *decaytable )
: G4VBoson( aName,mass,width,charge,iSpin,iParity,
iConjugation,iIsospin,iIsospin3,gParity,pType,
lepton,baryon,encoding,stable,lifetime,decaytable )
G4Geantino* G4Geantino::Definition()
{
SetParticleSubType("geantino");
// Anti-particle of geantino is geantino itself
SetAntiPDGEncoding(encoding);
}
if (theInstance !=0) return theInstance;
// ......................................................................
// ... static member definitions ...
// ......................................................................
//
// Arguments for constructor are as follows
// name mass width charge
// 2*spin parity C-conjugation
// 2*Isospin 2*Isospin3 G-parity
// type lepton number baryon number PDG encoding
// stable lifetime decay table
const G4String name = "geantino";
// search in particle table]
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
G4ParticleDefinition* anInstance = pTable->FindParticle(name);
if (anInstance ==0)
{
// create particle
//
// Arguments for constructor are as follows
// name mass width charge
// 2*spin parity C-conjugation
// 2*Isospin 2*Isospin3 G-parity
// type lepton number baryon number PDG encoding
// stable lifetime decay table
// shortlived subType anti_encoding
anInstance = new G4ParticleDefinition(
name, 0.0*MeV, 0.0*MeV, 0.0,
0, 0, 0,
0, 0, 0,
"geantino", 0, 0, 0,
true, 0.0, NULL,
false, "geantino", 0
);
}
theInstance = reinterpret_cast<G4Geantino*>(anInstance);
return theInstance;
G4Geantino G4Geantino::theGeantino(
"geantino", 0.0*MeV, 0.0*MeV, 0.0,
0, 0, 0,
0, 0, 0,
"geantino", 0, 0, 0,
true, 0.0, NULL
);
G4Geantino* G4Geantino::GeantinoDefinition() {return &theGeantino;}
// **********************************************************************
// **************************** SetCuts *********************************
// **********************************************************************
G4Geantino* G4Geantino::Geantino()
{
return &theGeantino;
}
G4Geantino* G4Geantino::GeantinoDefinition()
{
return Definition();
}
G4Geantino* G4Geantino::Geantino()
{
return Definition();
}
+40 -50
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpticalPhoton.cc,v 1.10 2003/06/16 16:56:48 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4OpticalPhoton.cc,v 1.12 2005/01/14 03:49:06 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ----------------------------------------------------------------------
@@ -32,68 +32,58 @@
// 4th April 1996, G.Cosmo
// by H.Kurashige,17 Oct. 1996
// **********************************************************************
// Changed name intto "opticalphoton" Hisaya Kurashige, 08 Jan 1998
// ----------------------------------------------------------------------
#include <fstream>
#include <iomanip>
// New impelemenataion as an utility class H.Kurashige, 14 July 2004
// ----------------------------------------------------------------
#include "G4OpticalPhoton.hh"
#include "G4ParticleTable.hh"
// ######################################################################
// ### OPTICAL PHOTON ###
// ######################################################################
G4OpticalPhoton* G4OpticalPhoton::theInstance = 0;
G4OpticalPhoton::G4OpticalPhoton(
const G4String& aName, G4double mass,
G4double width, G4double charge,
G4int iSpin, G4int iParity,
G4int iConjugation, G4int iIsospin,
G4int iIsospin3, G4int gParity,
const G4String& pType, G4int lepton,
G4int baryon, G4int encoding,
G4bool stable, G4double lifetime,
G4DecayTable *decaytable )
: G4VBoson( aName,mass,width,charge,iSpin,iParity,
iConjugation,iIsospin,iIsospin3,gParity,pType,
lepton,baryon,encoding,stable,lifetime,decaytable )
G4OpticalPhoton* G4OpticalPhoton::Definition()
{
SetParticleSubType("photon");
// Anti-particle of OpticalPhoton is OpticalPhoton itself
SetAntiPDGEncoding(encoding);
}
if (theInstance !=0) return theInstance;
// ......................................................................
// ... static member definitions ...
// ......................................................................
//
// Arguments for constructor are as follows
// name mass width charge
// 2*spin parity C-conjugation
// 2*Isospin 2*Isospin3 G-parity
// type lepton number baryon number PDG encoding
// stable lifetime decay table
// !! PDG encoding is set to 0 because G4OpticalPhoton is not
// !! gamma which has PDG code of 22
G4OpticalPhoton G4OpticalPhoton::theOpticalPhoton(
"opticalphoton", 0.0*MeV, 0.0*MeV, 0.0,
const G4String name = "opticalphoton";
// search in particle table]
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
G4ParticleDefinition* anInstance = pTable->FindParticle(name);
if (anInstance ==0)
{
// create particle
//
// Arguments for constructor are as follows
// name mass width charge
// 2*spin parity C-conjugation
// 2*Isospin 2*Isospin3 G-parity
// type lepton number baryon number PDG encoding
// stable lifetime decay table
// shortlived subType anti_encoding
anInstance = new G4ParticleDefinition(
name, 0.0*MeV, 0.0*MeV, 0.0,
2, -1, -1,
0, 0, 0,
"opticalphoton", 0, 0, 0,
true, 0.0, NULL
);
G4OpticalPhoton* G4OpticalPhoton::OpticalPhotonDefinition()
{return &theOpticalPhoton;}
G4OpticalPhoton* G4OpticalPhoton::OpticalPhoton()
{
return &theOpticalPhoton;
true, 0.0, NULL,
false, "photon", 0
);
}
theInstance = reinterpret_cast<G4OpticalPhoton*>(anInstance);
return theInstance;
}
G4OpticalPhoton* G4OpticalPhoton::OpticalPhotonDefinition()
{
return Definition();
}
G4OpticalPhoton* G4OpticalPhoton::OpticalPhoton()
{
return Definition();
}
@@ -22,7 +22,7 @@
//
//
// $Id: G4UnknownParticle.cc,v 1.3 2005/01/14 03:49:06 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ----------------------------------------------------------------------
-51
View File
@@ -1,51 +0,0 @@
//
// ********************************************************************
// * 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: G4VBoson.cc,v 1.3 2001/07/11 10:01:33 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
//
//
// --------------------------------------------------------------
// GEANT 4 class implementation file
//
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// --------------------------------------------------------------
#include "G4VBoson.hh"
const G4VBoson & G4VBoson::operator=(const G4VBoson &right)
{
if (this != &right) {
} return right;
}
G4int G4VBoson::operator==(const G4VBoson &right) const
{
return (this->GetParticleName() == right.GetParticleName());
}
G4int G4VBoson::operator!=(const G4VBoson &right) const
{
return (this->GetParticleName() != right.GetParticleName());
}