Import Geant4 0.0.0 source tree
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# $Id: GNUmakefile,v 2.0 1998/07/02 16:15:12 gunter Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for digits+hits library. Makoto Asai, 1/11/96.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
name := G4digits
|
||||
|
||||
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
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
$Id: History,v 2.0 1998/07/02 16:15:04 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,67 @@
|
||||
// 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: G4DCofThisEvent.hh,v 2.2 1998/10/26 01:53:21 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef G4DCofThisEvent_h
|
||||
#define G4DCofThisEvent_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4VDigiCollection.hh"
|
||||
#include <rw/tpordvec.h>
|
||||
|
||||
class G4DCofThisEvent
|
||||
{
|
||||
public:
|
||||
G4DCofThisEvent();
|
||||
G4DCofThisEvent(G4int cap);
|
||||
~G4DCofThisEvent();
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void* anDCoTE);
|
||||
|
||||
void AddDigiCollection(G4int DCID,G4VDigiCollection * aDC);
|
||||
|
||||
private:
|
||||
RWTPtrOrderedVector<G4VDigiCollection> * DC;
|
||||
|
||||
public:
|
||||
inline G4VDigiCollection* GetDC(G4int i) const
|
||||
{ return (*DC)[i]; }
|
||||
inline G4int GetCapacity() const
|
||||
{
|
||||
return DC->entries();
|
||||
}
|
||||
inline G4int GetNumberOfCollections() const
|
||||
{
|
||||
G4int n = 0;
|
||||
for(int i=0;i<DC->entries();i++)
|
||||
{
|
||||
if((*DC)[i]) n++;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
};
|
||||
|
||||
extern G4Allocator<G4DCofThisEvent> anDCoTHAllocator;
|
||||
|
||||
inline void* G4DCofThisEvent::operator new(size_t)
|
||||
{
|
||||
void* anDCoTH;
|
||||
anDCoTH = (void*)anDCoTHAllocator.MallocSingle();
|
||||
return anDCoTH;
|
||||
}
|
||||
|
||||
inline void G4DCofThisEvent::operator delete(void* anDCoTH)
|
||||
{
|
||||
anDCoTHAllocator.FreeSingle((G4DCofThisEvent*)anDCoTH);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
// 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: G4TDigiCollection.hh,v 2.1 1998/07/12 02:53:35 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef G4TDigiCollection_h
|
||||
#define G4TDigiCollection_h 1
|
||||
|
||||
#include "G4VDigiCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tpordvec.h>
|
||||
|
||||
class G4DigiCollection : public G4VDigiCollection
|
||||
{
|
||||
public:
|
||||
G4DigiCollection();
|
||||
G4DigiCollection(G4String detName,G4String colNam);
|
||||
virtual ~G4DigiCollection();
|
||||
int operator==(const G4DigiCollection &right) const;
|
||||
|
||||
protected:
|
||||
void* theCollection;
|
||||
};
|
||||
|
||||
extern G4Allocator<G4DigiCollection> aDCAllocator;
|
||||
|
||||
template <class T> class G4TDigiCollection : public G4DigiCollection
|
||||
{
|
||||
public:
|
||||
G4TDigiCollection();
|
||||
G4TDigiCollection(G4String detName,G4String colNam);
|
||||
virtual ~G4TDigiCollection();
|
||||
int operator==(const G4TDigiCollection &right) const;
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void* aDC);
|
||||
|
||||
virtual void DrawAllDigi();
|
||||
virtual void PrintAllDigi();
|
||||
|
||||
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>*theDigiCollection
|
||||
= (RWTPtrOrderedVector<T>*)theCollection;
|
||||
theDigiCollection->insert(aHit);
|
||||
return theDigiCollection->entries();
|
||||
}
|
||||
};
|
||||
|
||||
template <class T> inline void* G4TDigiCollection<T>::operator new(size_t)
|
||||
{
|
||||
void* aDC;
|
||||
aDC = (void*)aDCAllocator.MallocSingle();
|
||||
return aDC;
|
||||
}
|
||||
|
||||
template <class T> inline void G4TDigiCollection<T>::operator delete(void* aDC)
|
||||
{
|
||||
aDCAllocator.FreeSingle((G4DigiCollection*)aDC);
|
||||
}
|
||||
|
||||
template <class T> G4TDigiCollection<T>::G4TDigiCollection()
|
||||
{
|
||||
RWTPtrOrderedVector<T> * theDigiCollection
|
||||
= new RWTPtrOrderedVector<T>;
|
||||
theCollection = (void*)theDigiCollection;
|
||||
}
|
||||
|
||||
template <class T> G4TDigiCollection<T>::G4TDigiCollection(G4String detName,G4String colNam)
|
||||
: G4DigiCollection(detName,colNam)
|
||||
{
|
||||
RWTPtrOrderedVector<T> * theDigiCollection
|
||||
= new RWTPtrOrderedVector<T>;
|
||||
theCollection = (void*)theDigiCollection;
|
||||
}
|
||||
|
||||
template <class T> G4TDigiCollection<T>::~G4TDigiCollection()
|
||||
{
|
||||
RWTPtrOrderedVector<T> * theDigiCollection
|
||||
= (RWTPtrOrderedVector<T>*)theCollection;
|
||||
theDigiCollection->clearAndDestroy();
|
||||
delete theDigiCollection;
|
||||
}
|
||||
|
||||
template <class T> int G4TDigiCollection<T>::operator==(const G4TDigiCollection<T> &right) const
|
||||
{ return (collectionName==right.collectionName); }
|
||||
|
||||
template <class T> void G4TDigiCollection<T>::DrawAllDigi()
|
||||
{
|
||||
RWTPtrOrderedVector<T> * theDigiCollection
|
||||
= (RWTPtrOrderedVector<T>*)theCollection;
|
||||
int n = theDigiCollection->entries();
|
||||
for(int i=0;i<n;i++)
|
||||
{ (*theDigiCollection)[i]->Draw(); }
|
||||
}
|
||||
|
||||
template <class T> void G4TDigiCollection<T>::PrintAllDigi()
|
||||
{
|
||||
RWTPtrOrderedVector<T> * theDigiCollection
|
||||
= (RWTPtrOrderedVector<T>*)theCollection;
|
||||
int n = theDigiCollection->entries();
|
||||
for(int i=0;i<n;i++)
|
||||
{ (*theDigiCollection)[i]->Print(); }
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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: G4VDigi.hh,v 2.1 1998/07/12 02:53:36 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VDigi_h
|
||||
#define G4VDigi_h 1
|
||||
|
||||
class G4VDigi
|
||||
{
|
||||
|
||||
public:
|
||||
G4VDigi();
|
||||
virtual ~G4VDigi();
|
||||
|
||||
int operator==(const G4VDigi &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: G4VDigiCollection.hh,v 2.1 1998/07/12 02:53:37 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VDigiCollection_h
|
||||
#define G4VDigiCollection_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VDigiCollection
|
||||
{
|
||||
public:
|
||||
G4VDigiCollection();
|
||||
G4VDigiCollection(G4String DMnam,G4String colNam);
|
||||
virtual ~G4VDigiCollection();
|
||||
int operator==(const G4VDigiCollection &right) const;
|
||||
|
||||
virtual void DrawAllDigi();
|
||||
virtual void PrintAllDigi();
|
||||
|
||||
protected:
|
||||
|
||||
// Collection name
|
||||
G4String collectionName;
|
||||
G4String DMname;
|
||||
|
||||
public:
|
||||
inline G4String GetName()
|
||||
{ return collectionName; };
|
||||
inline G4String GetDMname()
|
||||
{ return DMname; };
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
// 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: G4DCofThisEvent.cc,v 2.1 1998/07/12 02:53:39 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#include "G4DCofThisEvent.hh"
|
||||
|
||||
G4Allocator<G4DCofThisEvent> anDCoTHAllocator;
|
||||
|
||||
G4DCofThisEvent::G4DCofThisEvent()
|
||||
{
|
||||
DC = new RWTPtrOrderedVector<G4VDigiCollection>;
|
||||
}
|
||||
|
||||
G4DCofThisEvent::G4DCofThisEvent(G4int cap)
|
||||
{
|
||||
DC = new RWTPtrOrderedVector<G4VDigiCollection>;
|
||||
for(int i=0;i<cap;i++)
|
||||
{
|
||||
DC->insert((G4VDigiCollection*)NULL);
|
||||
}
|
||||
}
|
||||
|
||||
G4DCofThisEvent::~G4DCofThisEvent()
|
||||
{
|
||||
DC->clearAndDestroy();
|
||||
delete DC;
|
||||
}
|
||||
|
||||
void G4DCofThisEvent::AddDigiCollection(G4int DCID,G4VDigiCollection * aDC)
|
||||
{
|
||||
if(DCID>=0 && DCID<DC->entries())
|
||||
{ (*DC)[DCID] = aDC; }
|
||||
}
|
||||
|
||||
@@ -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: G4TDigiCollection.cc,v 2.0 1998/07/02 16:15:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#include "G4TDigiCollection.hh"
|
||||
|
||||
G4Allocator<G4DigiCollection> aDCAllocator;
|
||||
|
||||
G4DigiCollection::G4DigiCollection()
|
||||
{;}
|
||||
|
||||
G4DigiCollection::G4DigiCollection(G4String detName,G4String colNam)
|
||||
: G4VDigiCollection(detName,colNam)
|
||||
{;}
|
||||
|
||||
G4DigiCollection::~G4DigiCollection()
|
||||
{;}
|
||||
|
||||
int G4DigiCollection::operator==(const G4DigiCollection &right) const
|
||||
{ return (collectionName==right.collectionName); }
|
||||
|
||||
@@ -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: G4VDigi.cc,v 2.1 1998/07/12 02:53:39 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
// G4VDigi
|
||||
#include "G4VDigi.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
G4VDigi::G4VDigi()
|
||||
{;}
|
||||
|
||||
G4VDigi::~G4VDigi()
|
||||
{;}
|
||||
|
||||
int G4VDigi::operator==(const G4VDigi &right) const
|
||||
{ return false; }
|
||||
|
||||
void G4VDigi::Draw()
|
||||
{;}
|
||||
|
||||
void G4VDigi::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: G4VDigiCollection.cc,v 2.1 1998/07/12 02:53:40 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
// G4VDigiCollection
|
||||
|
||||
#include "G4VDigiCollection.hh"
|
||||
|
||||
G4VDigiCollection::G4VDigiCollection()
|
||||
{
|
||||
collectionName = "Unknown";
|
||||
DMname = "Unknown";
|
||||
}
|
||||
|
||||
G4VDigiCollection::G4VDigiCollection(G4String DMnam,G4String colNam)
|
||||
{
|
||||
collectionName = colNam;
|
||||
DMname = DMnam;
|
||||
}
|
||||
|
||||
G4VDigiCollection::~G4VDigiCollection()
|
||||
{ ; }
|
||||
|
||||
int G4VDigiCollection::operator==(const G4VDigiCollection &right) const
|
||||
{
|
||||
return ((collectionName==right.collectionName)
|
||||
&&(DMname==right.DMname));
|
||||
}
|
||||
|
||||
void G4VDigiCollection::DrawAllDigi()
|
||||
{;}
|
||||
|
||||
void G4VDigiCollection::PrintAllDigi()
|
||||
{;}
|
||||
|
||||
Reference in New Issue
Block a user