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
+5 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.1 1999/01/07 16:14:12 gunter Exp $
$Id: History,v 1.3 1999/11/09 00:33:45 asaim Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,10 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Nov 4, 99, M.Asai (tag readout-V00-01-00)
- entries() method is added to G4TDigiCollection
- Commecnts are enriched for the software reference manual.
July 15, 98 M.Asai (tag readout-00-01-02)
July 4, 98 M.Asai (tag readout-00-01-01)
+18 -6
View File
@@ -1,19 +1,31 @@
// 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: G4DCtable.hh,v 1.1 1999/01/07 16:14:12 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4DCtable.hh,v 1.2.2.1.2.1 1999/12/07 20:52:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4DCtable_H
#define G4DCtable_H 1
#include "globals.hh"
#include <rw/tvordvec.h>
#include "g4rw/tvordvec.h"
// class description:
//
// This class is used by G4DigiManager for book keeping the
// digitizer modules and digits collections. The order of
// digi collections stored in G4DCofThisEvent is same as the
// order of DClist.
// The order may vary from run to run, if the user adds/changes
// some of his/her digitizer modules.
// In case user wants to make G4Run object persistent, this
// G4DCtable class object should be copied and stored with
// G4Run object.
class G4DCtable
{
@@ -26,8 +38,8 @@ class G4DCtable
G4int GetCollectionID(G4String DCname);
private:
RWTValOrderedVector<G4String> DMlist;
RWTValOrderedVector<G4String> DClist;
G4RWTValOrderedVector<G4String> DMlist;
G4RWTValOrderedVector<G4String> DClist;
public:
inline G4int entries() const
+15 -3
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: G4DMmessenger.hh,v 1.1 1999/01/07 16:14:13 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4DMmessenger.hh,v 1.2.4.1 1999/12/07 20:52:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4DMmessenger_h
@@ -20,6 +20,18 @@ class G4UIcmdWithAnInteger;
class G4UIcmdWithoutParameter;
class G4UIcmdWithAString;
// class description:
//
// This class is a concrete class of G4UImessenger which manages
// commands for G4DigiManager. Commands defined in this class are
// /digi/
// /digi/List
// /digi/Digitize
// /digi/Verbose
// These commands are available only if the user creates his/her
// digitizer module(s).
//
class G4DMmessenger: public G4UImessenger
{
public:
+43 -6
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: G4DigiManager.hh,v 1.1 1999/01/07 16:14:13 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4DigiManager.hh,v 1.2.2.1.2.1 1999/12/07 20:52:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4DigiManager_h
@@ -21,12 +21,23 @@ class G4DMmessenger;
#include "G4DCtable.hh"
class G4RunManager;
class G4SDManager;
#include <rw/tpordvec.h>
#include "g4rw/tpordvec.h"
// class description:
//
// This is a singleton class which manages the digitizer modules.
// The user cannot access to the constructor. The pointer of the
// only existing object can be got via G4DigiManager::GetDMpointer()
// static method. The first invokation in the program makes the
// singleton object.
//
class G4DigiManager
{
public:
public: // with description
static G4DigiManager* GetDMpointer();
// Returns the pointer to the singleton object
public:
static G4DigiManager* GetDMpointerIfExist();
protected:
@@ -34,21 +45,47 @@ class G4DigiManager
public:
~G4DigiManager();
public: // with description
void AddNewModule(G4VDigitizerModule* DM);
// Registers the user's digitizer mudule. This method must be invoked when
// the user construct his/her digitizer module(s).
void Digitize(G4String mName);
// Invokes Digitize() method of specified digitizer module. This is a kind
// of service method. The user can invoke Digitize() method of a particular
// module without knowing the pointer of the module object. The argument
// "mName" is the name of the module, which is defined at the constructor
// of the concrete digitizer module.
G4VDigitizerModule* FindDigitizerModule(G4String mName);
// Returns the pointer to the digitizer module object with the given name.
// Null will be returned if the name is not defined.
const G4VHitsCollection* GetHitsCollection(G4int HCID, G4int eventID = 0);
const G4VDigiCollection* GetDigiCollection(G4int DCID, G4int eventID = 0);
// These two methods return the pointer to the hits and digi collection
// object, respectively. "HCID" and "DCID" are the ID numbers of hits and
// digi collections, which can be obtained vir the next two methods.
// If "eventID" is greater than zero, corresponding hits or digi collection
// of "eventID" prevuois event is returned so that event overlap can be
// handled. To do this, necessary number of events must be set to G4RunManager
// by G4RunManager::SetNumberOfEventsToBeStored() method previously to the
// event loop.
G4int GetHitsCollectionID(G4String HCname);
G4int GetDigiCollectionID(G4String DCname);
// Returns the ID number of hits and digi collections, respectively. "HCname"
// and "DCname" can be the collection name if it is unique, or can be detector
// or module name and the collection name connected by "/".
void SetDigiCollection(G4int DCID, G4VDigiCollection* aDC);
// This method must exclusively used by the base class of G4VDigitizerModule.
// To set digi collection, the user must use SetDigiCollection of G4VDigitizerModule.
public:
void SetVerboseLevel(G4int vl);
void List() const;
private:
static G4DigiManager * fDManager;
G4int verboseLevel;
RWTPtrOrderedVector<G4VDigitizerModule> DMtable;
G4RWTPtrOrderedVector<G4VDigitizerModule> DMtable;
G4DCtable* DCtable;
G4DMmessenger* theMessenger;
G4RunManager* runManager;
+24 -7
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: G4VDigitizerModule.hh,v 1.1 1999/01/07 16:14:13 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VDigitizerModule.hh,v 1.2.2.1.2.1 1999/12/07 20:52:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4VDigitizerModule_H
@@ -15,18 +15,35 @@
class G4DigiManager;
class G4VDigiCollection;
#include "globals.hh"
#include <rw/tvordvec.h>
#include "g4rw/tvordvec.h"
// class description:
//
// This is the abstract base class of the digitizer module. The user's
// digitizer module which generates digits must be derived from this
// class.
// In the derived class constructor, name(s) of digi collection(s) which
// are made by the digitizer module must be set to "collectionName" string
// vector.
class G4VDigitizerModule
{
public:
public: // with description
G4VDigitizerModule(G4String modName);
// Constructor. The user's concrete class must use this constructor
// by the constructor initializer of the derived class. The name of
// the detector module must be unique.
public:
virtual ~G4VDigitizerModule();
int operator==(const G4VDigitizerModule &right) const;
int operator!=(const G4VDigitizerModule &right) const;
public:
public: // with description
virtual void Digitize() = 0;
// The pure virtual method that the derived class must implement.
// In the concrete implementation of this method, necessary digi
// collection object must be constructed and set to G4DCofThisEvent
// by StoreDigiCollection protected method.
protected:
void StoreDigiCollection(G4VDigiCollection* aDC);
@@ -35,7 +52,7 @@ class G4VDigitizerModule
protected:
G4DigiManager* DigiManager;
G4String moduleName;
RWTValOrderedVector<G4String> collectionName;
G4RWTValOrderedVector<G4String> collectionName;
G4int verboseLevel;
public:
+4 -4
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: G4DCtable.cc,v 1.1 1999/01/07 16:14:13 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4DCtable.cc,v 1.1.8.1.2.1 1999/12/07 20:52:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4DCtable.hh"
@@ -27,7 +27,7 @@ G4int G4DCtable::Registor(G4String DMname,G4String DCname)
G4int G4DCtable::GetCollectionID(G4String DCname)
{
G4int i = -1;
if(DCname.index("/")==RW_NPOS) // DCname only
if(DCname.index("/")==G4std::string::npos) // DCname only
{
for(G4int j=0;j<DClist.entries();j++)
{
+3 -3
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: G4DMmessenger.cc,v 1.1 1999/01/07 16:14:13 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4DMmessenger.cc,v 1.1.10.1 1999/12/07 20:52:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// ---------------------------------------------------------------------
+4 -4
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: G4DigiManager.cc,v 1.1 1999/01/07 16:14:14 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4DigiManager.cc,v 1.1.8.1.2.1 1999/12/07 20:52:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4DigiManager.hh"
@@ -52,7 +52,7 @@ G4DigiManager::~G4DigiManager()
void G4DigiManager::AddNewModule(G4VDigitizerModule* DM)
{
G4String DMname = DM->GetName();
if(DMtable.index(DM) != RW_NPOS)
if(DMtable.index(DM) != G4std::string::npos)
{
G4cout << "<" << DMname << "> has already been registored." << endl;
return;
+3 -3
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: G4VDigitizerModule.cc,v 1.1 1999/01/07 16:14:14 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VDigitizerModule.cc,v 1.1.10.1 1999/12/07 20:52:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4VDigitizerModule.hh"