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
@@ -0,0 +1,39 @@
// 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: G4HCtable.hh,v 2.1 1998/07/12 02:53:17 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef G4HCtable_H
#define G4HCtable_H 1
#include "globals.hh"
#include <rw/tvordvec.h>
class G4HCtable
{
public:
G4HCtable();
~G4HCtable();
public:
G4int Registor(G4String SDname,G4String HCname);
G4int GetCollectionID(G4String HCname);
private:
RWTValOrderedVector<G4String> SDlist;
RWTValOrderedVector<G4String> HClist;
public:
inline G4int entries() const
{ return HClist.entries(); }
};
#endif
@@ -0,0 +1,70 @@
// 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: G4SDManager.hh,v 2.1 1998/07/12 02:53:19 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef G4SDManager_h
#define G4SDManager_h 1
#include "globals.hh"
#include "G4SDStructure.hh"
#include "G4HCtable.hh"
class G4VHitsCollection;
class G4VSensitiveDetector;
class G4HCofThisEvent;
class G4SDmessenger;
class G4SDManager
{
public:
static G4SDManager* GetSDMpointer();
static G4SDManager* GetSDMpointerIfExist();
protected:
G4SDManager();
public:
~G4SDManager();
void AddNewDetector(G4VSensitiveDetector*aSD);
G4HCofThisEvent* PrepareNewEvent();
void TerminateCurrentEvent(G4HCofThisEvent* HCE);
void Activate(G4String dName, G4bool activeFlag);
G4int GetCollectionID(G4String colName);
G4int GetCollectionID(G4VHitsCollection * aHC);
G4VSensitiveDetector* FindSensitiveDetector(G4String dName);
private:
static G4SDManager * fSDManager;
G4SDStructure * treeTop;
G4int verboseLevel;
G4HCtable* HCtable;
G4SDmessenger* theMessenger;
public:
inline void SetVerboseLevel(G4int vl)
{
verboseLevel = vl;
treeTop->SetVerboseLevel(vl);
}
inline G4SDStructure* GetTreeTop() const
{ return treeTop; }
inline void ListTree() const
{ treeTop->ListTree(); }
inline G4int GetCollectionCapacity() const
{ return HCtable->entries(); }
inline G4HCtable* GetHCtable() const
{ return HCtable; }
};
#endif
@@ -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: G4SDStructure.hh,v 2.1 1998/07/12 02:53:19 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef G4SDStructure_h
#define G4SDStructure_h 1
// Globals
#include "globals.hh"
// G4VSensitiveDetector
#include "G4VSensitiveDetector.hh"
// RWTPtrOrderedVector
#include <rw/tpordvec.h>
class G4HCofThisEvent;
class G4SDStructure
{
public:
G4SDStructure(G4String aPath);
~G4SDStructure();
int operator==(const G4SDStructure &right) const;
void AddNewDetector(G4VSensitiveDetector*aSD, G4String treeStructure);
void Activate(G4String aName, G4bool sensitiveFlag);
void Initialize(G4HCofThisEvent*HCE);
void Terminate(G4HCofThisEvent*HCE);
G4VSensitiveDetector* FindSensitiveDetector(G4String aName);
G4VSensitiveDetector* GetSD(G4String aName);
void ListTree();
private:
G4SDStructure* FindSubDirectory(G4String subD);
G4String ExtractDirName(G4String aPath);
private:
RWTPtrOrderedVector<G4SDStructure> structure;
RWTPtrOrderedVector<G4VSensitiveDetector> detector;
G4String pathName;
G4String dirName;
G4int verboseLevel;
public:
inline void SetVerboseLevel(G4int vl)
{
verboseLevel = vl;
for(int i=0; i<structure.entries(); i++)
{ structure(i)->SetVerboseLevel(vl); }
for(int j=0; j<detector.entries(); j++)
{ detector(j)->SetVerboseLevel(vl); }
};
};
#endif
@@ -0,0 +1,43 @@
// 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: G4SDmessenger.hh,v 2.1 1998/07/12 02:53:20 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef G4SDmessenger_h
#define G4SDmessenger_h 1
#include "G4UImessenger.hh"
class G4SDManager;
class G4UIdirectory;
class G4UIcmdWithoutParameter;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4SDmessenger: public G4UImessenger
{
public:
G4SDmessenger(G4SDManager * SDManager);
~G4SDmessenger();
void SetNewValue(G4UIcommand * command,G4String newValues);
private:
G4SDManager * fSDMan;
G4UIdirectory* hitsDir;
G4UIcmdWithoutParameter* listCmd;
G4UIcmdWithAString* activeCmd;
G4UIcmdWithAString* inactiveCmd;
G4UIcmdWithAnInteger* verboseCmd;
};
#endif
@@ -0,0 +1,75 @@
// 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: G4SensitiveVolumeList.hh,v 2.1 1998/07/12 02:53:20 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
// ------------------------------------------------------------
// GEANT 4 class header file --- Copyright CERN 1996
// CERN Geneva Switzerland
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// History: first implementation, based on Hits+Digi domain
// object model of April 1996, S.Piperov
//
// ---------------- G4SensitiveVolumeList -----------------
#ifndef G4SensitiveVolumeList_h
#define G4SensitiveVolumeList_h 1
#include <rw/tpordvec.h>
#include <rw/tvordvec.h>
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
class G4SensitiveVolumeList
{
public:
//Constructors
G4SensitiveVolumeList();
G4SensitiveVolumeList(const G4SensitiveVolumeList &right);
//Destructor
~G4SensitiveVolumeList();
//Assignment Operation
const G4SensitiveVolumeList & operator=(const G4SensitiveVolumeList &right
);
//Equality Operations
G4int operator==(const G4SensitiveVolumeList &right) const;
G4int operator!=(const G4SensitiveVolumeList &right) const;
//Other Operations
G4bool CheckPV(const G4VPhysicalVolume *pvp) const;
G4bool CheckLV(const G4LogicalVolume *lvp) const;
//Get and Set Operations for Has Relationships
const RWTPtrOrderedVector<G4VPhysicalVolume>& GetThePhysicalVolumeList() const;
void SetThePhysicalVolumeList(const RWTPtrOrderedVector<G4VPhysicalVolume> value);
const RWTPtrOrderedVector<G4LogicalVolume>& GetTheLogicalVolumeList() const;
void SetTheLogicalVolumeList(const RWTPtrOrderedVector<G4LogicalVolume> value);
private:
//Data Members for Has Relationships
RWTPtrOrderedVector<G4VPhysicalVolume> thePhysicalVolumeList;
RWTPtrOrderedVector<G4LogicalVolume> theLogicalVolumeList;
};
#endif
@@ -0,0 +1,35 @@
// 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: G4SensitiveVolumeList.icc,v 2.0 1998/07/02 16:14:33 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
// -----------------------------------------------------------
// Inline functions of GEANT 4 class header file.
// --- Copyright CERN 1996, CERN Geneva Switzerland ---
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// History: first implementation, based on Hits+Digi domain
// object model of April 1996, S.Piperov
//
// ---------------- G4SensitiveVolumeList -----------------
//Get and Set Operations for Has Relationships
inline const RWTPtrOrderedVector<G4VPhysicalVolume>& G4SensitiveVolumeList::get_the_G4VPhysicalVolume_list() const { return the_G4VPhysicalVolume_list; }
inline void G4SensitiveVolumeList::set_the_G4VPhysicalVolume_list(const RWTPtrOrderedVector<G4VPhysicalVolume> value) { the_G4VPhysicalVolume_list = value; }
inline const RWTPtrOrderedVector<G4LogicalVolume>& G4SensitiveVolumeList::get_the_G4LogicalVolume() const { return the_G4LogicalVolume_list; }
inline void G4SensitiveVolumeList::set_the_G4LogicalVolume(const RWTPtrOrderedVector<G4LogicalVolume> value) { the_G4LogicalVolume_list = value; }
@@ -0,0 +1,76 @@
// 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: G4VReadOutGeometry.hh,v 2.1 1998/07/12 02:53:20 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
// ------------------------------------------------------------
#ifndef G4VReadOutGeometry_h
#define G4VReadOutGeometry_h
#include "G4SensitiveVolumeList.hh"
#include "G4Step.hh"
#include "G4TouchableHistory.hh"
class G4Navigator;
class G4VReadOutGeometry
{
protected:
virtual G4VPhysicalVolume* Build() = 0; // must return the world of the ROGeometry;
public:
G4VReadOutGeometry();
G4VReadOutGeometry(const G4VReadOutGeometry &right);
G4VReadOutGeometry(G4String);
virtual ~G4VReadOutGeometry();
const G4VReadOutGeometry & operator=(const G4VReadOutGeometry &right);
G4int operator==(const G4VReadOutGeometry &right) const;
G4int operator!=(const G4VReadOutGeometry &right) const;
// buildROGeomety must be invoked to Build (ie Build() method)
// the ROGeometry. It sets up in addition the needed
// the G4Navigator used to navigate inside this ROGeometry.
void BuildROGeometry();
G4bool CheckROVolume(G4Step*,G4TouchableHistory*&);
protected:
G4bool FindROTouchable(G4Step*);
G4VPhysicalVolume* ROworld;
G4SensitiveVolumeList* fincludeList;
G4SensitiveVolumeList* fexcludeList;
G4String name;
private:
G4Navigator* ROnavigator;
G4TouchableHistory* touchableHistory;
public:
inline const G4SensitiveVolumeList* GetIncludeList() const
{ return fincludeList; }
inline void SetIncludeList(G4SensitiveVolumeList* value)
{ fincludeList = value; }
inline const G4SensitiveVolumeList* GetExcludeList() const
{ return fexcludeList; }
inline void SetExcludeList(G4SensitiveVolumeList* value)
{ fexcludeList = value; }
inline G4String GetName() const
{ return name; }
inline void SetName(G4String value)
{ name = value; }
// ADDED:
inline G4VPhysicalVolume* GetROWorld() const
{ return ROworld;}
};
#endif
@@ -0,0 +1,96 @@
// 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: G4VSensitiveDetector.hh,v 2.1 1998/07/12 02:53:21 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef G4VSensitiveDetector_h
#define G4VSensitiveDetector_h 1
#include "G4VHit.hh"
#include "G4Step.hh"
#include "G4HCofThisEvent.hh"
#include "G4VReadOutGeometry.hh"
#include "G4TouchableHistory.hh"
#include <rw/tvordvec.h>
class G4VSensitiveDetector
{
public:
G4VSensitiveDetector(G4String name);
G4VSensitiveDetector(const G4VSensitiveDetector &right);
virtual ~G4VSensitiveDetector();
const G4VSensitiveDetector & operator=(const G4VSensitiveDetector &right);
int operator==(const G4VSensitiveDetector &right) const;
int operator!=(const G4VSensitiveDetector &right) const;
virtual void Initialize(G4HCofThisEvent*HCE);
virtual void EndOfEvent(G4HCofThisEvent*HCE);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
protected:
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist) = 0;
G4int GetCollectionID(G4int i);
G4String SensitiveDetectorName; // detector name
G4String thePathName; // directory path
G4String fullPathName; // path + detector name
G4int verboseLevel;
G4bool active;
RWTValOrderedVector<G4String> collectionName;
private:
G4VReadOutGeometry * ROgeometry;
public:
inline G4bool Hit(G4Step*aStep)
{
G4bool ack = true;
G4TouchableHistory* ROhis = NULL;
if(!isActive())
{ ack = false; }
else if(ROgeometry)
{ ack = ROgeometry->CheckROVolume(aStep,ROhis); }
if(ack)
{ ack = ProcessHits(aStep,ROhis); }
return ack;
}
inline G4int GetNumberOfCollections()
{ return collectionName.entries(); };
inline G4String GetCollectionName(G4int id)
{ return collectionName[id]; };
inline void SetVerboseLevel(G4int vl)
{ verboseLevel = vl; };
inline void Activate(G4bool activeFlag)
{ active = activeFlag; };
inline G4bool isActive()
{ return active; };
inline G4String GetName()
{ return SensitiveDetectorName; };
inline G4String GetPathName()
{ return thePathName; };
inline G4String GetFullPathName()
{ return fullPathName; };
inline void SetROgeometry(G4VReadOutGeometry*value)
{ ROgeometry = value; };
inline G4VReadOutGeometry* GetROgeometry()
{ return ROgeometry; };
};
#endif