Import Geant4 0.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-01 15:25:35 +02:00
parent 54d6b71f95
commit b97f8d0df7
3237 changed files with 807095 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
# $Id: GNUmakefile,v 2.0 1998/07/02 16:15:31 gunter Exp $
# --------------------------------------------------------------
# GNUmakefile for digits+hits library. Makoto Asai, 1/11/96.
# --------------------------------------------------------------
name := G4hits
ifndef G4INSTALL
G4INSTALL = ../../..
endif
include $(G4INSTALL)/config/architecture.gmk
CPPFLAGS += \
-I$(G4BASE)/global/HEPRandom/include \
-I$(G4BASE)/global/management/include \
-I$(G4BASE)/global/HEPGeometry/include
include $(G4INSTALL)/config/common.gmk
+21
View File
@@ -0,0 +1,21 @@
$Id: History,v 2.0 1998/07/02 16:15:22 gunter Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Category History file
---------------------
This file should be used by G4 developers and category coordinators
to briefly summarize all major modifications introduced in the code
and keep track of all category-tags.
It DOES NOT substitute the CVS log-message one should put at every
committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
June 6, 98 M.Asai
- Created.
@@ -0,0 +1,68 @@
// This code implementation is the intellectual property of
// the RD44 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: G4HCofThisEvent.hh,v 2.2 1998/10/26 01:53:29 asaim Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef G4HCofThisEvent_h
#define G4HCofThisEvent_h 1
#include "globals.hh"
#include "G4Allocator.hh"
#include "G4VHitsCollection.hh"
#include <rw/tpordvec.h>
class G4HCofThisEvent
{
public:
G4HCofThisEvent();
G4HCofThisEvent(G4int cap);
~G4HCofThisEvent();
inline void *operator new(size_t);
inline void operator delete(void* anHCoTE);
void AddHitsCollection(G4int HCID,G4VHitsCollection * aHC);
private:
RWTPtrOrderedVector<G4VHitsCollection> * HC;
public:
inline G4VHitsCollection* GetHC(G4int i)
{ return (*HC)[i]; }
inline G4int GetCapacity()
{
return HC->entries();
}
inline G4int GetNumberOfCollections()
{
G4int n = 0;
for(int i=0;i<HC->entries();i++)
{
if((*HC)[i]) n++;
}
return n;
}
};
extern G4Allocator<G4HCofThisEvent> anHCoTHAllocator;
inline void* G4HCofThisEvent::operator new(size_t)
{
void* anHCoTH;
anHCoTH = (void*)anHCoTHAllocator.MallocSingle();
return anHCoTH;
}
inline void G4HCofThisEvent::operator delete(void* anHCoTH)
{
anHCoTHAllocator.FreeSingle((G4HCofThisEvent*)anHCoTH);
}
#endif
@@ -0,0 +1,126 @@
// This code implementation is the intellectual property of
// the RD44 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: G4THitsCollection.hh,v 2.1 1998/07/12 02:53:42 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef G4THitsCollection_h
#define G4THitsCollection_h 1
#include "G4VHitsCollection.hh"
#include "G4Allocator.hh"
#include "globals.hh"
#include <rw/tpordvec.h>
class G4HitsCollection : public G4VHitsCollection
{
public:
G4HitsCollection();
G4HitsCollection(G4String detName,G4String colNam);
virtual ~G4HitsCollection();
int operator==(const G4HitsCollection &right) const;
protected:
void* theCollection;
};
extern G4Allocator<G4HitsCollection> anHCAllocator;
template <class T> class G4THitsCollection : public G4HitsCollection
{
public:
G4THitsCollection();
G4THitsCollection(G4String detName,G4String colNam);
virtual ~G4THitsCollection();
int operator==(const G4THitsCollection<T> &right) const;
inline void *operator new(size_t);
inline void operator delete(void* anHC);
virtual void DrawAllHits();
virtual void PrintAllHits();
public:
inline T* operator[](size_t i)
{ return (*((RWTPtrOrderedVector<T>*)theCollection))[i]; }
inline RWTPtrOrderedVector<T>* GetVector()
{ return (RWTPtrOrderedVector<T>*)theCollection; }
inline int insert(T* aHit)
{
RWTPtrOrderedVector<T>*theHitsCollection
= (RWTPtrOrderedVector<T>*)theCollection;
theHitsCollection->insert(aHit);
return theHitsCollection->entries();
}
inline int entries()
{
RWTPtrOrderedVector<T>*theHitsCollection
= (RWTPtrOrderedVector<T>*)theCollection;
return theHitsCollection->entries();
}
};
template <class T> inline void* G4THitsCollection<T>::operator new(size_t)
{
void* anHC;
anHC = (void*)anHCAllocator.MallocSingle();
return anHC;
}
template <class T> inline void G4THitsCollection<T>::operator delete(void* anHC)
{
anHCAllocator.FreeSingle((G4HitsCollection*)anHC);
}
template <class T> G4THitsCollection<T>::G4THitsCollection()
{
RWTPtrOrderedVector<T> * theHitsCollection
= new RWTPtrOrderedVector<T>;
theCollection = (void*)theHitsCollection;
}
template <class T> G4THitsCollection<T>::G4THitsCollection(G4String detName,G4String colNam)
: G4HitsCollection(detName,colNam)
{
RWTPtrOrderedVector<T> * theHitsCollection
= new RWTPtrOrderedVector<T>;
theCollection = (void*)theHitsCollection;
}
template <class T> G4THitsCollection<T>::~G4THitsCollection()
{
RWTPtrOrderedVector<T> * theHitsCollection
= (RWTPtrOrderedVector<T>*)theCollection;
theHitsCollection->clearAndDestroy();
delete theHitsCollection;
}
template <class T> int G4THitsCollection<T>::operator==(const G4THitsCollection<T> &right) const
{ return (collectionName==right.collectionName); }
template <class T> void G4THitsCollection<T>::DrawAllHits()
{
RWTPtrOrderedVector<T> * theHitsCollection
= (RWTPtrOrderedVector<T>*)theCollection;
int n = theHitsCollection->entries();
for(int i=0;i<n;i++)
{ (*theHitsCollection)[i]->Draw(); }
}
template <class T> void G4THitsCollection<T>::PrintAllHits()
{
RWTPtrOrderedVector<T> * theHitsCollection
= (RWTPtrOrderedVector<T>*)theCollection;
int n = theHitsCollection->entries();
for(int i=0;i<n;i++)
{ (*theHitsCollection)[i]->Print(); }
}
#endif
+30
View File
@@ -0,0 +1,30 @@
// This code implementation is the intellectual property of
// the RD44 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: G4VHit.hh,v 2.1 1998/07/12 02:53:42 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef G4VHit_h
#define G4VHit_h 1
class G4VHit
{
public:
G4VHit();
virtual ~G4VHit();
int operator==(const G4VHit &right) const;
virtual void Draw();
virtual void Print();
};
#endif
@@ -0,0 +1,42 @@
// This code implementation is the intellectual property of
// the RD44 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: G4VHitsCollection.hh,v 2.1 1998/07/12 02:53:43 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef G4VHitsCollection_h
#define G4VHitsCollection_h 1
#include "globals.hh"
class G4VHitsCollection
{
public:
G4VHitsCollection();
G4VHitsCollection(G4String detName,G4String colNam);
virtual ~G4VHitsCollection();
int operator==(const G4VHitsCollection &right) const;
virtual void DrawAllHits();
virtual void PrintAllHits();
protected:
// Collection name
G4String collectionName;
G4String SDname;
public:
inline G4String GetName()
{ return collectionName; }
inline G4String GetSDname()
{ return SDname; }
};
#endif
@@ -0,0 +1,42 @@
// This code implementation is the intellectual property of
// the RD44 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: G4HCofThisEvent.cc,v 2.1 1998/07/12 02:53:44 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
#include "G4HCofThisEvent.hh"
G4Allocator<G4HCofThisEvent> anHCoTHAllocator;
G4HCofThisEvent::G4HCofThisEvent()
{
HC = new RWTPtrOrderedVector<G4VHitsCollection>;
}
G4HCofThisEvent::G4HCofThisEvent(G4int cap)
{
HC = new RWTPtrOrderedVector<G4VHitsCollection>;
for(int i=0;i<cap;i++)
{
HC->insert((G4VHitsCollection*)NULL);
}
}
G4HCofThisEvent::~G4HCofThisEvent()
{
HC->clearAndDestroy();
delete HC;
}
void G4HCofThisEvent::AddHitsCollection(G4int HCID,G4VHitsCollection * aHC)
{
if(HCID>=0 && HCID<HC->entries())
{ (*HC)[HCID] = aHC; }
}
@@ -0,0 +1,28 @@
// This code implementation is the intellectual property of
// the RD44 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: G4THitsCollection.cc,v 2.0 1998/07/02 16:15:23 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
#include "G4THitsCollection.hh"
G4Allocator<G4HitsCollection> anHCAllocator;
G4HitsCollection::G4HitsCollection()
{;}
G4HitsCollection::G4HitsCollection(G4String detName,G4String colNam)
: G4VHitsCollection(detName,colNam)
{;}
G4HitsCollection::~G4HitsCollection()
{;}
int G4HitsCollection::operator==(const G4HitsCollection &right) const
{ return (collectionName==right.collectionName); }
+30
View File
@@ -0,0 +1,30 @@
// This code implementation is the intellectual property of
// the RD44 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: G4VHit.cc,v 2.1 1998/07/12 02:53:44 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
// G4VHit
#include "G4VHit.hh"
#include "globals.hh"
G4VHit::G4VHit()
{;}
G4VHit::~G4VHit()
{;}
int G4VHit::operator==(const G4VHit &right) const
{ return false; }
void G4VHit::Draw()
{;}
void G4VHit::Print()
{;}
@@ -0,0 +1,42 @@
// This code implementation is the intellectual property of
// the RD44 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: G4VHitsCollection.cc,v 2.1 1998/07/12 02:53:45 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
// G4VHitsCollection
#include "G4VHitsCollection.hh"
G4VHitsCollection::G4VHitsCollection()
{
collectionName = "Unknown";
SDname = "Unknown";
}
G4VHitsCollection::G4VHitsCollection(G4String detName,G4String colNam)
{
collectionName = colNam;
SDname = detName;
}
G4VHitsCollection::~G4VHitsCollection()
{ ; }
int G4VHitsCollection::operator==(const G4VHitsCollection &right) const
{
return ((collectionName==right.collectionName)
&&(SDname==right.SDname));
}
void G4VHitsCollection::DrawAllHits()
{;}
void G4VHitsCollection::PrintAllHits()
{;}