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
+69 -29
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: G4PEvent.ddl,v 1.1 1999/01/07 16:10:46 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4PEvent.ddl,v 1.8 1999/11/28 21:54:17 morita Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4PEvent_h
@@ -14,8 +14,13 @@
#include "globals.hh"
#include "G4PersistentTypes.hh"
#include "G4Event.hh"
#include "G4PersistentSchema.hh"
#include "G4PPrimaryVertex.hh"
#include "G4PHCofThisEvent.hh"
#include "G4PDCofThisEvent.hh"
class G4Event;
#include "HepODBMS/odbms/HepODBMS.h"
@@ -27,6 +32,12 @@ class G4PEvent
public:
G4PEvent();
G4PEvent(const G4Event *evt);
G4PEvent(const G4Event *evt,
HepRef(G4PHCofThisEvent) pHC,
HepRef(G4PDCofThisEvent) pDC);
void InitPEvent(const G4Event *evt,
HepRef(G4PHCofThisEvent) pHC,
HepRef(G4PDCofThisEvent) pDC);
~G4PEvent();
private:
@@ -34,41 +45,70 @@ class G4PEvent
G4Pint eventID;
// PrimaryVertex
ooRef(G4PPrimaryVertex) thePrimaryVertex;
d_Ref<G4PPrimaryVertex> thePrimaryVertex;
G4Pint numberOfPrimaryVertex;
// HitsCollection
// G4HCofThisEvent* HC;
d_Ref<G4PHCofThisEvent> HC;
// TrajectoryContainer
// G4TrajectoryContainer * trajectoryContainer;
// DigiCollection
d_Ref<G4PDCofThisEvent> DC;
// TrajectoryContainer (not supported yet)
// d_Ref<G4PTrajectoryContainer> trajectoryContainer;
public:
inline void SetEventID(const G4Event *evt)
{ eventID = evt->GetEventID(); };
void SetEventID(const G4Event *evt);
inline G4int GetEventID() const
{ return eventID; };
{ return eventID; }
inline void AddPrimaryVertex( HepRef(G4PPrimaryVertex) aPrimaryVertex)
{
if( thePrimaryVertex == NULL )
{ thePrimaryVertex = aPrimaryVertex; }
else
{ thePrimaryVertex->SetNext( aPrimaryVertex ); }
numberOfPrimaryVertex++;
}
inline G4int GetNumberOfPrimaryVertex() const
{ return numberOfPrimaryVertex; }
inline HepRef(G4PPrimaryVertex) GetPrimaryVertex(G4int i=0) const
{
if( i == 0 )
{ return thePrimaryVertex; }
else if( i > 0 && i < numberOfPrimaryVertex )
{
HepRef(G4PPrimaryVertex) primaryVertex = thePrimaryVertex;
for( int j=0; j<i; j++ )
{
if( primaryVertex == NULL ) return NULL;
primaryVertex = primaryVertex->GetNext();
}
return primaryVertex;
}
else
{ return NULL; }
}
inline void SetHCofThisEvent( HepRef(G4PHCofThisEvent) value)
{ HC = value; }
inline HepRef(G4PHCofThisEvent) GetHCofThisEvent() const
{ return HC; }
inline void SetDCofThisEvent( HepRef(G4PDCofThisEvent) value)
{ DC = value; }
inline HepRef(G4PDCofThisEvent) GetDCofThisEvent() const
{ return DC; }
// inline void AddPrimaryVertex()
// {
// primaryVertex should be added here
// ;
// };
// inline G4int GetNumberOfPrimaryVertex() const
// { return numberOfPrimaryVertex; };
// inline G4PrimaryVertex* GetPrimaryVertex(G4int i=0) const
// {
// primaryVertex should be added here
// ;
// };
// inline void SetHCofThisEvent()
// { HC = value; };
// inline G4HCofThisEvent* GetHCofThisEvent() const
// { return HC; };
// inline void SetTrajectoryContainer(G4TrajectoryContainer*value)
// { trajectoryContainer = value; };
// { trajectoryContainer = value; }
// inline G4TrajectoryContainer* GetTrajectoryContainer() const
// { return trajectoryContainer; };
// { return trajectoryContainer; }
G4Event* MakeTransientObject();
};
#endif
@@ -0,0 +1,94 @@
// 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: G4PPrimaryParticle.ddl,v 1.1 1999/12/05 22:32:25 morita Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4PPrimaryParticle_h
#define G4PPrimaryParticle_h 1
#include "globals.hh"
#include "G4ThreeVector.hh"
#include "G4PersistentTypes.hh"
#include "G4PersistentSchema.hh"
#include "HepODBMS/odbms/HepODBMS.h"
class G4PrimaryParticle;
// class description:
//
// This is the persistent version of a class G4PrimaryParticle.
//
class G4PPrimaryParticle
: public HepPersObj
{
public:
G4PPrimaryParticle( G4PrimaryParticle* particle );
~G4PPrimaryParticle();
G4PrimaryParticle* MakeTransientObject();
private:
G4Pint PDGcode;
// G4ParticleDefinition * G4code;
G4Pdouble Px;
G4Pdouble Py;
G4Pdouble Pz;
d_Ref<G4PPrimaryParticle> nextParticle;
d_Ref<G4PPrimaryParticle> daughterParticle;
G4Pint trackID; // This will be set if this particle is
// sent to G4EventManager and converted to
// G4Track. Otherwise = -1.
G4Pdouble mass; // This is just for book keeping.
// This will not be used but the mass in
// G4ParticleDefinition will be used.
G4Pdouble polX;
G4Pdouble polY;
G4Pdouble 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 HepRef(G4PPrimaryParticle) GetNext() const
{ return nextParticle; }
inline HepRef(G4PPrimaryParticle) 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; }
};
#endif
@@ -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: G4PPrimaryVertex.ddl,v 1.1 1999/01/07 16:10:46 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4PPrimaryVertex.ddl,v 1.7 1999/12/05 22:32:26 morita Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
@@ -15,8 +15,13 @@
#define G4PPrimaryVertex_h 1
#include "globals.hh"
#include "G4PrimaryVertex.hh"
#include "G4PrimaryParticle.hh"
#include "G4ThreeVector.hh"
#include "G4PersistentTypes.hh"
#include "G4PersistentSchema.hh"
class G4PrimaryVertex;
class G4PPrimaryParticle;
#pragma ooclassref G4PPrimaryParticle "G4PPrimaryParticle_ref.hh"
#include "HepODBMS/odbms/HepODBMS.h"
@@ -28,15 +33,45 @@ class G4PPrimaryVertex
G4PPrimaryVertex(const G4PrimaryVertex* vertex);
~G4PPrimaryVertex();
private:
G4double X0;
G4double Y0;
G4double Z0;
G4double T0;
G4PrimaryParticle * theParticle;
G4PrimaryVertex* MakeTransientObject();
private:
G4Pdouble X0;
G4Pdouble Y0;
G4Pdouble Z0;
G4Pdouble T0;
d_Ref<G4PPrimaryParticle> theParticle;
d_Ref<G4PPrimaryParticle> theTail;
d_Ref<G4PPrimaryVertex> nextVertex;
G4Pint numberOfParticle;
public:
inline G4ThreeVector GetPosition() const
{ return G4ThreeVector(X0,Y0,Z0); }
inline G4double GetX0() const
{ return X0; }
inline G4double GetY0() const
{ return Y0; }
inline G4double GetZ0() const
{ return Z0; }
inline G4double GetT0() const
{ return T0; }
inline G4int GetNumberOfParticle() const
{ return numberOfParticle; }
HepRef(G4PPrimaryParticle) GetPrimary(G4int i) const;
inline void SetNext(HepRef(G4PPrimaryVertex) nv)
{
if(nextVertex == NULL)
{ nextVertex = nv; }
else
{ nextVertex->SetNext(nv); }
}
inline HepRef(G4PPrimaryVertex) GetNext() const
{ return nextVertex; }
G4PPrimaryVertex* nextVertex;
G4int numberOfParticle;
};
#endif
@@ -0,0 +1,76 @@
// 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: G4PersistentEventMan.hh,v 1.9 1999/11/28 21:54:17 morita Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// class G4PersistentEventMan
//
// A Utility class for storing and retrieving the event objects.
//
// This class is not persistent-capable.
//
// Member functions:
// =================
// G4bool Store(HepDbApplication* dbApp,
// const G4Event* anEvent);
// Store anEvent and associated objects into database.
// G4bool Retrieve(HepDbApplication* dbApp,
// G4Event*& anEvent);
// Retrieve anEvent and associated objects from database.
//
// History:
// 98.10.30 Y.Morita Splited from G4PersistencyManager
#ifndef G4PERSISTENTEVENTMAN_HH
#define G4PERSISTENTEVENTMAN_HH 1
#include "globals.hh"
#include "HepODBMS/odbms/HepODBMS.h"
#include "G4VPersistentSubMan.hh"
#include "G4VPersistentSubDbMan.hh"
#include "G4PEvent.hh"
class HepDbApplication;
class G4Event;
class G4PersistentHitMan;
class G4PersistentDigitMan;
class G4PersistentEventMan
: public G4VPersistentSubMan, public G4VPersistentSubDbMan
{
friend class G4PersistencyManager;
private:
// to be used by G4PersistencyManager only
G4PersistentEventMan();
G4PersistentEventMan( G4PersistentHitMan* aPHCMan,
G4PersistentDigitMan* aPDCMan );
~G4PersistentEventMan();
private:
G4PersistentHitMan* f_PHCMan;
G4PersistentDigitMan* f_PDCMan;
G4int f_currentEventID;
HepRef(G4PEvent) f_currentPEvent;
public:
inline G4int CurrentEventID()
{ return f_currentEventID; }
private:
G4bool Store( HepDbApplication* dbApp,
const G4Event* anEvent );
G4bool Retrieve( HepDbApplication* dbApp,
G4Event*& anEvent );
};
#endif