Import Geant4 1.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:28:20 +02:00
parent aaa409b6ee
commit ca1c8cb059
2995 changed files with 106830 additions and 299600 deletions
+67 -34
View File
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4PrimaryParticle.hh,v 1.1 1999/01/07 16:06:33 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4PrimaryParticle.hh,v 1.2.4.1 1999/12/07 20:47:50 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
@@ -20,6 +20,30 @@
class G4ParticleDefinition;
// class description:
//
// This is a class which represents a primary particle.
// This is completely deferent class from G4Track or G4DynamicParticle.
// This class is designed with taking into account the possibility of
// making this class persistent, i.e. kept with G4Event class object
// to ODBMS. Thus this class is almost free from any other Geant4 classes.
// The only exception is a pointer to G4ParticleDefinition but it can be
// rebuilt by the PDGcode.
//
// Primary particles are stored in G4PrimaryVertex object with a form
// of linked list. Also, an object of this PrimaryParticle class can have
// one or more objects of this class as its daughters with a form of
// linked list.
// A parimary particle represented by this class object needs not to be
// a particle of type which Geant4 can simulate.
// case a) mother particle is not a particle Geant4 can simulate
// daughters associated to the mother will be examined.
// case b) mother particle is a perticle Geant4 can simulate
// daughters associated to the mother will be converted to G4Dynamic
// particle and be set to the mother G4Track. For this case, dauthers
// are used as the "pre-fixed" decay channel.
//
class G4PrimaryParticle
{
public:
@@ -39,7 +63,9 @@ class G4PrimaryParticle
int operator==(const G4PrimaryParticle &right) const;
int operator!=(const G4PrimaryParticle &right) const;
public: // with description
void Print() const;
// Print the properties of the particle.
private:
G4int PDGcode;
@@ -62,64 +88,71 @@ class G4PrimaryParticle
G4double polY;
G4double polZ;
public: // with description
// followings are get methods available.
// "trackID" will be set if this particle is sent to G4EventManager and converted to
// G4Track. Otherwise = -1.
// "mass" is just for book keeping. This will not be used but the mass in
// G4ParticleDefinition will be used.
inline G4int GetPDGcode() const
{ return PDGcode; }
inline G4ParticleDefinition * GetG4code() const
{ return G4code; }
inline G4ThreeVector GetMomentum() const
{ return G4ThreeVector(Px,Py,Pz); }
inline G4double GetPx() const
{ return Px; }
inline G4double GetPy() const
{ return Py; }
inline G4double GetPz() const
{ return Pz; }
inline G4PrimaryParticle * GetNext() const
{ return nextParticle; }
inline G4PrimaryParticle * GetDaughter() const
{ return daughterParticle; }
inline G4int GetTrackID() const
{ return trackID; }
inline G4double GetMass() const
{ return mass; }
inline G4ThreeVector GetPolarization() const
{ return G4ThreeVector(polX,polY,polZ); }
inline G4double GetPolX() const { return polX; }
inline G4double GetPolY() const { return polY; }
inline G4double GetPolZ() const { return polZ; }
public:
void SetPDGcode(G4int Pcode);
inline G4int GetPDGcode() const
{ return PDGcode; };
void SetG4code(G4ParticleDefinition * Gcode);
inline G4ParticleDefinition * GetG4code() const
{ return G4code; };
inline void SetMomentum(G4double px, G4double py, G4double pz)
{
Px = px;
Py = py;
Pz = pz;
};
inline G4ThreeVector GetMomentum() const
{ return G4ThreeVector(Px,Py,Pz); };
inline G4double GetPx() const
{ return Px; };
inline G4double GetPy() const
{ return Py; };
inline G4double GetPz() const
{ return Pz; };
}
inline void SetNext(G4PrimaryParticle * np)
{
if(nextParticle == NULL)
{ nextParticle = np; }
else
{ nextParticle->SetNext(np); }
};
inline G4PrimaryParticle * GetNext() const
{ return nextParticle; };
}
inline void SetDaughter(G4PrimaryParticle * np)
{
if(daughterParticle == NULL)
{ daughterParticle = np; }
else
{ daughterParticle->SetNext(np); }
};
inline G4PrimaryParticle * GetDaughter() const
{ return daughterParticle; };
}
inline void SetTrackID(G4int id)
{ trackID = id; };
inline G4int GetTrackID() const
{ return trackID; };
{ trackID = id; }
inline void SetMass(G4double mas)
{ mass = mas; };
inline G4double GetMass() const
{ return mass; };
{ mass = mas; }
inline void SetPolarization(G4double px,G4double py,G4double pz)
{
polX = px;
polY = py;
polZ = pz;
};
inline G4ThreeVector GetPolarization() const
{ return G4ThreeVector(polX,polY,polZ); };
inline G4double GetPolX() const { return polX; };
inline G4double GetPolY() const { return polY; };
inline G4double GetPolZ() const { return polZ; };
}
};
extern G4Allocator<G4PrimaryParticle> aPrimaryParticleAllocator;