Import Geant4 8.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:36:02 +02:00
parent d93e1e39a9
commit 8a51e0bc40
5471 changed files with 99628 additions and 55248 deletions
@@ -22,7 +22,7 @@
//
//
// $Id: G4CellScoreComposer.hh,v 1.1 2003/10/03 10:06:49 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// ----------------------------------------------------------------------
// Class G4CellScoreComposer
@@ -22,7 +22,7 @@
//
//
// $Id: G4CellScoreValues.hh,v 1.1 2003/10/03 10:07:07 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// ----------------------------------------------------------------------
// Class G4CellScoreValues
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: G4CellStoreScorer.hh,v 1.1 2003/10/03 10:07:30 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// ----------------------------------------------------------------------
// Class G4CellStoreScorer
@@ -22,7 +22,7 @@
//
//
// $Id: G4CollectionNameVector.hh,v 1.1 2003/10/03 10:07:48 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4CollectionNameVector_H
@@ -22,7 +22,7 @@
//
//
// $Id: G4HCtable.hh,v 1.2 2004/03/09 19:33:37 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4HCtable_H
@@ -0,0 +1,83 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4MultiFunctionalDetector.hh,v 1.2 2005/11/16 22:59:01 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4MultiFunctionalDetector_h
#define G4MultiFunctionalDetector_h 1
#include "G4VSensitiveDetector.hh"
#include "G4VHit.hh"
#include "G4Step.hh"
#include "G4HCofThisEvent.hh"
#include "G4VReadOutGeometry.hh"
#include "G4TouchableHistory.hh"
#include "G4CollectionNameVector.hh"
#include <vector>
class G4VPrimitiveScorer;
// class description:
//
// This is the base class of the sensitive detector which owns
// one or more G4VPrimitiveScorer class objects.
class G4MultiFunctionalDetector : public G4VSensitiveDetector
{
public: // with description
G4MultiFunctionalDetector(G4String);
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
std::vector<G4VPrimitiveScorer*> primitives;
public: // with description
G4bool RegisterPrimitive(G4VPrimitiveScorer*);
G4bool RemovePrimitive(G4VPrimitiveScorer*);
inline G4int GetNumberOfPrimitives() const
{ return primitives.size(); }
G4VPrimitiveScorer* GetPrimitive(G4int id) const
{ return primitives[id]; }
public:
virtual ~G4MultiFunctionalDetector();
public:
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
public:
virtual void DrawAll();
virtual void PrintAll();
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SDManager.hh,v 1.2 2004/05/03 08:14:01 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4SDManager.hh,v 1.3 2005/09/22 22:21:35 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4SDManager_h
@@ -74,6 +74,8 @@ class G4SDManager
G4VSensitiveDetector* FindSensitiveDetector(G4String dName, G4bool warning = true);
G4HCofThisEvent* PrepareNewEvent();
void TerminateCurrentEvent(G4HCofThisEvent* HCE);
void AddNewCollection(G4String SDname,G4String DCname);
private:
static G4SDManager * fSDManager;
@@ -22,7 +22,7 @@
//
//
// $Id: G4SDStructure.hh,v 1.2 2004/05/03 08:14:01 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4SDStructure_h
@@ -22,7 +22,7 @@
//
//
// $Id: G4SDmessenger.hh,v 1.1 2003/10/03 10:09:00 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4SDmessenger_h
@@ -22,7 +22,7 @@
//
//
// $Id: G4SensitiveVolumeList.hh,v 1.1 2003/10/03 10:09:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// ------------------------------------------------------------
// GEANT 4 class header file --- Copyright CERN 1996
@@ -22,7 +22,7 @@
//
//
// $Id: G4SensitiveVolumeList.icc,v 1.1 2003/10/03 10:09:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// -----------------------------------------------------------
// Inline functions of GEANT 4 class header file.
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: G4TrackLogger.hh,v 1.1 2003/10/03 10:09:45 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// ----------------------------------------------------------------------
// Class G4TrackLogger
@@ -0,0 +1,114 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4VPrimitiveScorer.hh,v 1.1 2005/11/16 22:59:01 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4VPrimitiveScorer_h
#define G4VPrimitiveScorer_h 1
class G4Step;
class G4HCofThisEvent;
class G4TouchableHistory;
#include "globals.hh"
#include "G4VSDFilter.hh"
#include "G4MultiFunctionalDetector.hh"
// class description:
//
// This is the base class of the sensitive detector which owns
// only one hits collection.
// A concrete class object derived from this base class can be
// used either as a sensitive detector or to be registered to
// G4MultiFunctionalDetector to define multiple functionalities.
class G4VPrimitiveScorer
{
friend class G4MultiFunctionalDetector;
public: // with description
G4VPrimitiveScorer(G4String name, G4int depth=0);
virtual ~G4VPrimitiveScorer();
protected: // with description
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*)=0;
// This is the method must be implemented in each concrete class.
virtual G4int GetIndex(G4Step*);
// This is a function mapping from copy number(s) to an index of
// the hit collection. In the default implementation, just the
// copy number of the physical volume is taken.
public: // with description
G4int GetCollectionID(G4int);
// This method returns the ID of its hitsCollection. This mehod
// gives valid value only after it is registered to G4MultiFunctionalDetector
// and the G4MultiFunctionalDetector is registered to G4SDManager.
virtual void Initialize(G4HCofThisEvent*);
virtual void EndOfEvent(G4HCofThisEvent*);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
// These five methods are exactly identical to those in G4VSensitiveDetector.
// These methods are invoked by G4SDManager through G4MultiFunctionalDetector.
protected:
G4String primitiveName;
G4MultiFunctionalDetector* detector;
G4VSDFilter* filter;
G4int verboseLevel;
G4int indexDepth;
public: // with description
// Set/Get methods
inline void SetMultiFunctionalDetector(G4MultiFunctionalDetector* d)
{ detector = d; }
inline G4MultiFunctionalDetector* GetMultiFunctionalDetector() const
{ return detector; }
inline G4String GetName() const
{ return primitiveName; }
inline void SetFilter(G4VSDFilter* f)
{ filter = f; }
inline G4VSDFilter* GetFilter() const
{ return filter; }
inline void SetVerboseLevel(G4int vl)
{ verboseLevel = vl; }
inline G4int GetVerboseLevel() const
{ return verboseLevel; }
private:
inline G4bool HitPrimitive(G4Step*aStep,G4TouchableHistory*ROhis)
{
if(filter)
{ if(!(filter->Accept(aStep))) return false; }
return ProcessHits(aStep,ROhis);
}
};
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4VReadOutGeometry.hh,v 1.1 2003/10/03 10:10:00 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// ------------------------------------------------------------
@@ -0,0 +1,60 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4VSDFilter.hh,v 1.1 2005/09/22 22:21:36 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4VSDFilter_h
#define G4VSDFilter_h 1
class G4Step;
#include "globals.hh"
// class description:
//
// This is the abstract base class of a filter to be associated with a
// sensitive detector.
class G4VSDFilter
{
public: // with description
G4VSDFilter(G4String name);
public:
virtual ~G4VSDFilter();
public: // with description
virtual G4bool Accept(const G4Step*) const = 0;
protected:
G4String filterName;
public:
inline G4String GetName() const
{ return filterName; }
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VSensitiveDetector.hh,v 1.1 2003/10/03 10:10:18 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4VSensitiveDetector.hh,v 1.3 2005/09/22 22:21:36 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4VSensitiveDetector_h
@@ -34,6 +34,7 @@
#include "G4VReadOutGeometry.hh"
#include "G4TouchableHistory.hh"
#include "G4CollectionNameVector.hh"
#include "G4VSDFilter.hh"
// class description:
//
@@ -89,7 +90,7 @@ class G4VSensitiveDetector
// "ROhist" will be given only is a Readout geometry is defined to this
// sensitive detector. The G4TouchableHistory object of the tracking geometry
// is stored in the PreStepPoint object of G4Step.
G4int GetCollectionID(G4int i);
virtual G4int GetCollectionID(G4int i);
// This is a utility method which returns the hits collection ID of the
// "i"-th collection. "i" is the order (starting with zero) of the collection
// whose name is stored to the collectionName protected vector.
@@ -104,22 +105,19 @@ class G4VSensitiveDetector
G4String fullPathName; // path + detector name
G4int verboseLevel;
G4bool active;
private:
G4VReadOutGeometry * ROgeometry;
G4VSDFilter* filter;
public: // with description
inline G4bool Hit(G4Step*aStep)
{
G4bool ack = true;
G4TouchableHistory* ROhis = 0;
if(!isActive())
{ ack = false; }
else if(ROgeometry)
{ ack = ROgeometry->CheckROVolume(aStep,ROhis); }
if(ack)
{ ack = ProcessHits(aStep,ROhis); }
return ack;
if(!isActive()) return false;
if(filter)
{ if(!(filter->Accept(aStep))) return false; }
if(ROgeometry)
{ if(!(ROgeometry->CheckROVolume(aStep,ROhis))) return false; }
return ProcessHits(aStep,ROhis);
}
// This is the public method invoked by G4SteppingManager for generating
// hit(s). The actual user's implementation for generating hit(s) must be
@@ -128,26 +126,31 @@ class G4VSensitiveDetector
inline void SetROgeometry(G4VReadOutGeometry*value)
{ ROgeometry = value; }
// Register the Readout geometry.
inline void SetFilter(G4VSDFilter*value)
{ filter = value; }
// Register a filter
public:
inline G4int GetNumberOfCollections()
inline G4int GetNumberOfCollections() const
{ return collectionName.size(); }
inline G4String GetCollectionName(G4int id)
inline G4String GetCollectionName(G4int id) const
{ return collectionName[id]; }
inline void SetVerboseLevel(G4int vl)
{ verboseLevel = vl; }
inline void Activate(G4bool activeFlag)
{ active = activeFlag; }
inline G4bool isActive()
inline G4bool isActive() const
{ return active; }
inline G4String GetName()
inline G4String GetName() const
{ return SensitiveDetectorName; }
inline G4String GetPathName()
inline G4String GetPathName() const
{ return thePathName; }
inline G4String GetFullPathName()
inline G4String GetFullPathName() const
{ return fullPathName; }
inline G4VReadOutGeometry* GetROgeometry()
inline G4VReadOutGeometry* GetROgeometry() const
{ return ROgeometry; }
inline G4VSDFilter* GetFilter() const
{ return filter; }
};