Import Geant4 8.0.0 source tree
This commit is contained in:
+10
-8
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.74 2005/06/20 10:16:54 gcosmo Exp $
|
||||
# $Id: GNUmakefile,v 1.75 2005/12/07 13:28:42 gcosmo Exp $
|
||||
# -----------------------------------------------------------------
|
||||
# "gmake" makes default libraries for each subdomain.
|
||||
# "gmake global" makes global libraries for each subdomain.
|
||||
@@ -31,13 +31,13 @@ unique := $(shell echo $$$$)
|
||||
|
||||
.PHONY: all glob global kernel_global kernel libmap dll win32def includes clean_libs clean clean_lists clean_all
|
||||
|
||||
all: kernel
|
||||
all: banner kernel
|
||||
ifdef G4LIB_USE_G3TOG4
|
||||
@for dir in $(SUBDIR4); do (cd $$dir && $(MAKE)); done;:
|
||||
endif
|
||||
@$(MAKE) libmap
|
||||
|
||||
glob global: kernel_global
|
||||
glob global: banner kernel_global
|
||||
ifdef G4LIB_USE_G3TOG4
|
||||
@for dir in $(SUBDIR4); do (cd $$dir && $(MAKE)); done;:
|
||||
endif
|
||||
@@ -48,10 +48,6 @@ kernel_global:
|
||||
@for dir in $(SUBDIR3); do (cd $$dir && $(MAKE) global); done;:
|
||||
|
||||
kernel:
|
||||
@echo "*************************************************************"
|
||||
@echo " Installation Geant4 version $$Name: geant4-07-01 $ "
|
||||
@echo " Copyright : Geant4 Collaboration "
|
||||
@echo "*************************************************************"
|
||||
@for dir in $(SUBDIR1); do (cd $$dir && $(MAKE)); done;:
|
||||
@for dir in $(SUBDIR2); do (cd $$dir && $(MAKE)); done;:
|
||||
@for dir in $(SUBDIR3); do (cd $$dir && $(MAKE)); done;:
|
||||
@@ -94,7 +90,7 @@ $(G4LIBDIR)/liblist: $(G4INSTALL)/config/liblist.c
|
||||
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ;fi
|
||||
@$(CC) $(CCFLAGS) -o $(G4LIBDIR)/liblist $(G4INSTALL)/config/liblist.c
|
||||
|
||||
dll: win32def
|
||||
dll: banner win32def
|
||||
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
||||
@echo "Verifying existence of global libraries for DLLs ..."
|
||||
@$(MAKE) kernel_global G4LIB_BUILD_DLL=1
|
||||
@@ -131,6 +127,12 @@ ifdef G4LIB_USE_G3TOG4
|
||||
@for dir in $(SUBDIR4); do (cd $$dir && $(MAKE) $@); done
|
||||
endif
|
||||
|
||||
banner:
|
||||
@echo "*************************************************************"
|
||||
@echo " Installation Geant4 version $$Name: geant4-08-00 $ "
|
||||
@echo " Copyright : Geant4 Collaboration "
|
||||
@echo "*************************************************************"
|
||||
|
||||
clean_libs::
|
||||
@echo Removing all libraries ...
|
||||
@for dir in $(SUBDIR1); do (cd $$dir && $(MAKE) clean_libs); done
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# $Id: GNUmakefile,v 1.3 2004/06/01 15:34:51 gcosmo Exp $
|
||||
# $Id: GNUmakefile,v 1.4 2005/11/16 22:59:01 asaim Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for digits+hits library. Makoto Asai, 1/11/96.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
name := G4digits_hits
|
||||
|
||||
SUBDIRS := detector hits digits
|
||||
SUBLIBS = G4detector G4digits G4hits
|
||||
SUBDIRS := detector hits digits utils
|
||||
SUBLIBS = G4detector G4digits G4hits G4detutils
|
||||
|
||||
GLOBLIBS = libG4track.lib libG4particles.lib libG4geometry.lib
|
||||
GLOBLIBS += libG4materials.lib libG4intercoms.lib libG4global.lib
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.11 2005/06/01 17:15:35 allison Exp $
|
||||
$Id: History,v 1.16 2005/11/22 21:41:55 asaim Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,24 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
Nov 22, 2005, M.Asai (digits_hits-V07-01-04)
|
||||
- G4SDParticleFilter: Protection against null pointer.
|
||||
|
||||
Nov 18, 2005, M.Asai (digits_hits-V07-01-03)
|
||||
- Introducing G4THitsMap template class.
|
||||
- Introducing concrete primitive scorer and filter classes.
|
||||
|
||||
Nov 16, 2005, M.Asai (digits_hits-V07-01-02)
|
||||
- Adding a new sub-directory "utils" where new concrete primitive scorers and
|
||||
concrete filters are stored.
|
||||
|
||||
Sept 27, 2005, M.Asai (digits_hits-V07-01-01)
|
||||
- Updating new classes.
|
||||
|
||||
Sept 22, 2005, M.Asai (digits_hits-V07-01-00)
|
||||
- Introducing G4MultiFunctionalDetector, G4VPrimitiveSensitivity and G4VSDFilter
|
||||
classes.
|
||||
|
||||
June 1, 2005, J.Allison (digits_hits-V07-00-00)
|
||||
- G4VHit: Fixed interface to CreateAttValues (removed const). Improved
|
||||
description.
|
||||
|
||||
@@ -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 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
|
||||
+35
-16
@@ -20,22 +20,41 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
// HEP Random
|
||||
// --- RandGeneralTmp ---
|
||||
// inlined functions implementation file
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
// =======================================================================
|
||||
// Gabriele Cosmo - Created: 20th August 1998
|
||||
// =======================================================================
|
||||
//
|
||||
// $Id: G4VSDFilter.hh,v 1.1 2005/09/22 22:21:36 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
inline G4double G4RandGeneralTmp::shoot()
|
||||
{
|
||||
return fire();
|
||||
}
|
||||
#ifndef G4VSDFilter_h
|
||||
#define G4VSDFilter_h 1
|
||||
|
||||
inline void G4RandGeneralTmp::shootArray( const G4int size, G4double* vect )
|
||||
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
|
||||
{
|
||||
fireArray(size, vect);
|
||||
}
|
||||
|
||||
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; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CellScoreComposer.cc,v 1.2 2004/07/01 09:19:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CellStoreScorer.cc,v 1.1 2003/10/03 10:10:56 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HCtable.cc,v 1.3 2004/03/15 19:16:07 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4HCtable.hh"
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.cc,v 1.3 2005/11/16 22:59:01 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4MultiFunctionalDetector
|
||||
#include "G4MultiFunctionalDetector.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
|
||||
G4MultiFunctionalDetector::G4MultiFunctionalDetector(G4String name)
|
||||
:G4VSensitiveDetector(name)
|
||||
{;}
|
||||
|
||||
G4MultiFunctionalDetector::~G4MultiFunctionalDetector()
|
||||
{;}
|
||||
|
||||
G4bool G4MultiFunctionalDetector::ProcessHits(G4Step* aStep,G4TouchableHistory* aTH)
|
||||
{
|
||||
G4int nPrim = primitives.size();
|
||||
for(G4int iPrim=0;iPrim<nPrim;iPrim++)
|
||||
{ primitives[iPrim]->HitPrimitive(aStep,aTH); }
|
||||
return true;
|
||||
}
|
||||
|
||||
G4bool G4MultiFunctionalDetector::RegisterPrimitive(G4VPrimitiveScorer* aPS)
|
||||
{
|
||||
G4int nPrim = primitives.size();
|
||||
for(G4int iPrim=0;iPrim<nPrim;iPrim++)
|
||||
{
|
||||
if(primitives[iPrim]==aPS)
|
||||
{
|
||||
G4cerr << "Primitive <" << aPS->GetName() << "> is already defined in <" << SensitiveDetectorName
|
||||
<< ">." << G4endl << "Method RegisterPrimitive() is ignored." << G4endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
primitives.push_back(aPS);
|
||||
aPS->SetMultiFunctionalDetector(this);
|
||||
collectionName.insert(aPS->GetName());
|
||||
if(G4SDManager::GetSDMpointer()->FindSensitiveDetector(SensitiveDetectorName,false))
|
||||
{
|
||||
// This G4MultiFunctionalDetector has already been registered to G4SDManager.
|
||||
// Make sure this new primitive is registered as well.
|
||||
G4SDManager::GetSDMpointer()->AddNewCollection(SensitiveDetectorName,aPS->GetName());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
G4bool G4MultiFunctionalDetector::RemovePrimitive(G4VPrimitiveScorer* aPS)
|
||||
{
|
||||
std::vector<G4VPrimitiveScorer*>::iterator iterPS;
|
||||
std::vector<G4String>::iterator iterName = collectionName.begin();
|
||||
for(iterPS=primitives.begin();iterPS!=primitives.end();iterPS++)
|
||||
{
|
||||
if(*iterPS==aPS)
|
||||
{
|
||||
primitives.erase(iterPS);
|
||||
aPS->SetMultiFunctionalDetector(0);
|
||||
return true;
|
||||
}
|
||||
iterName++;
|
||||
}
|
||||
G4cerr << "Primitive <" << aPS->GetName() << "> is not defined in <" << SensitiveDetectorName
|
||||
<< ">." << G4endl << "Method RemovePrimitive() is ignored." << G4endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
void G4MultiFunctionalDetector::Initialize(G4HCofThisEvent* HC)
|
||||
{
|
||||
G4int nPrim = primitives.size();
|
||||
for(G4int iPrim=0;iPrim<nPrim;iPrim++)
|
||||
{ primitives[iPrim]->Initialize(HC); }
|
||||
}
|
||||
|
||||
void G4MultiFunctionalDetector::EndOfEvent(G4HCofThisEvent* HC)
|
||||
{
|
||||
G4int nPrim = primitives.size();
|
||||
for(G4int iPrim=0;iPrim<nPrim;iPrim++)
|
||||
{ primitives[iPrim]->EndOfEvent(HC); }
|
||||
}
|
||||
|
||||
void G4MultiFunctionalDetector::clear()
|
||||
{
|
||||
G4int nPrim = primitives.size();
|
||||
for(G4int iPrim=0;iPrim<nPrim;iPrim++)
|
||||
{ primitives[iPrim]->clear(); }
|
||||
}
|
||||
|
||||
void G4MultiFunctionalDetector::DrawAll()
|
||||
{
|
||||
G4int nPrim = primitives.size();
|
||||
for(G4int iPrim=0;iPrim<nPrim;iPrim++)
|
||||
{ primitives[iPrim]->DrawAll(); }
|
||||
}
|
||||
|
||||
void G4MultiFunctionalDetector::PrintAll()
|
||||
{
|
||||
G4int nPrim = primitives.size();
|
||||
for(G4int iPrim=0;iPrim<nPrim;iPrim++)
|
||||
{ primitives[iPrim]->PrintAll(); }
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SDManager.cc,v 1.2 2004/05/03 08:14:01 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4SDManager.cc,v 1.3 2005/09/22 22:21:36 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4SDManager.hh"
|
||||
@@ -64,16 +64,17 @@ G4SDManager::~G4SDManager()
|
||||
|
||||
void G4SDManager::AddNewDetector(G4VSensitiveDetector*aSD)
|
||||
{
|
||||
G4String pathName = aSD->GetPathName();
|
||||
G4int numberOfCollections = aSD->GetNumberOfCollections();
|
||||
G4String pathName = aSD->GetPathName();
|
||||
if( pathName(0) != '/' ) pathName.prepend("/");
|
||||
if( pathName(pathName.length()-1) != '/' ) pathName += "/";
|
||||
treeTop->AddNewDetector(aSD,pathName);
|
||||
if(numberOfCollections<1) return;
|
||||
for(G4int i=0;i<numberOfCollections;i++)
|
||||
{
|
||||
G4String SDname = aSD->GetName();
|
||||
G4String DCname = aSD->GetCollectionName(i);
|
||||
HCtable->Registor(SDname,DCname);
|
||||
AddNewCollection(SDname,DCname);
|
||||
}
|
||||
if( verboseLevel > 0 )
|
||||
{
|
||||
@@ -82,6 +83,18 @@ void G4SDManager::AddNewDetector(G4VSensitiveDetector*aSD)
|
||||
}
|
||||
}
|
||||
|
||||
void G4SDManager::AddNewCollection(G4String SDname,G4String DCname)
|
||||
{
|
||||
G4int i = HCtable->Registor(SDname,DCname);
|
||||
if(verboseLevel>0)
|
||||
{
|
||||
if(i<0) G4cerr << "G4SDManager::AddNewCollection : the collection <"
|
||||
<< SDname << "/" << DCname << "> has already been reginstered." << G4endl;
|
||||
else G4cout << "G4SDManager::AddNewCollection : the collection <"
|
||||
<< SDname << "/" << DCname << "> is registered at " << i << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
G4HCofThisEvent* G4SDManager::PrepareNewEvent()
|
||||
{
|
||||
G4HCofThisEvent* HCE = new G4HCofThisEvent(HCtable->entries());
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SDStructure.cc,v 1.2 2004/05/03 08:14:02 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
// G4SDStructure
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SDmessenger.cc,v 1.1 2003/10/03 10:11:54 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SensitiveVolumeList.cc,v 1.1 2003/10/03 10:12:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TrackLogger.cc,v 1.2 2004/07/01 09:19:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.cc,v 1.1 2005/11/16 22:59:01 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4VPrimitiveScorer
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4MultiFunctionalDetector.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4TouchableHistory.hh"
|
||||
|
||||
|
||||
G4VPrimitiveScorer::G4VPrimitiveScorer(G4String name, G4int depth)
|
||||
:primitiveName(name),detector(0),filter(0),verboseLevel(0),indexDepth(depth)
|
||||
{;}
|
||||
|
||||
G4VPrimitiveScorer::~G4VPrimitiveScorer()
|
||||
{;}
|
||||
|
||||
G4int G4VPrimitiveScorer::GetCollectionID(G4int)
|
||||
{
|
||||
if(detector)
|
||||
return G4SDManager::GetSDMpointer()
|
||||
->GetCollectionID(detector->GetName()+"/"+primitiveName);
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
void G4VPrimitiveScorer::Initialize(G4HCofThisEvent*)
|
||||
{;}
|
||||
|
||||
void G4VPrimitiveScorer::EndOfEvent(G4HCofThisEvent*)
|
||||
{;}
|
||||
|
||||
void G4VPrimitiveScorer::clear()
|
||||
{;}
|
||||
|
||||
void G4VPrimitiveScorer::DrawAll()
|
||||
{;}
|
||||
|
||||
void G4VPrimitiveScorer::PrintAll()
|
||||
{;}
|
||||
|
||||
G4int G4VPrimitiveScorer::GetIndex(G4Step* aStep)
|
||||
{
|
||||
G4StepPoint* preStep = aStep->GetPreStepPoint();
|
||||
G4TouchableHistory* th = (G4TouchableHistory*)(preStep->GetTouchable());
|
||||
return th->GetReplicaNumber(indexDepth);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VReadOutGeometry.cc,v 1.1 2003/10/03 10:12:41 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4VReadOutGeometry.hh"
|
||||
|
||||
+9
-15
@@ -21,21 +21,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VIon.cc,v 1.3 2001/07/11 10:01:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4VSDFilter.cc,v 1.1 2005/09/22 22:21:36 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// --------------------------------------------------------------
|
||||
// G4VSensitiveDetector
|
||||
#include "G4VSDFilter.hh"
|
||||
|
||||
#include "G4VIon.hh"
|
||||
G4VSDFilter::G4VSDFilter(G4String name)
|
||||
:filterName(name)
|
||||
{;}
|
||||
|
||||
const G4VIon & G4VIon::operator=(const G4VIon &right)
|
||||
{
|
||||
if (this != &right) {
|
||||
} return right;
|
||||
}
|
||||
G4VSDFilter::~G4VSDFilter()
|
||||
{;}
|
||||
@@ -21,15 +21,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSensitiveDetector.cc,v 1.1 2003/10/03 10:12:56 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4VSensitiveDetector.cc,v 1.2 2005/09/22 22:21:36 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4VSensitiveDetector
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "G4SDManager.hh"
|
||||
|
||||
G4VSensitiveDetector::G4VSensitiveDetector(G4String name)
|
||||
:verboseLevel(0),active(true),ROgeometry(0)
|
||||
:verboseLevel(0),active(true),ROgeometry(0),filter(0)
|
||||
{
|
||||
size_t sLast = name.last('/');
|
||||
if(sLast==std::string::npos)
|
||||
@@ -56,6 +56,7 @@ G4VSensitiveDetector::G4VSensitiveDetector(const G4VSensitiveDetector &right)
|
||||
verboseLevel = right.verboseLevel;
|
||||
active = right.active;
|
||||
ROgeometry = right.ROgeometry;
|
||||
filter = right.filter;
|
||||
}
|
||||
|
||||
G4VSensitiveDetector::~G4VSensitiveDetector()
|
||||
@@ -70,6 +71,7 @@ const G4VSensitiveDetector & G4VSensitiveDetector::operator=(const G4VSensitiveD
|
||||
verboseLevel = right.verboseLevel;
|
||||
active = right.active;
|
||||
ROgeometry = right.ROgeometry;
|
||||
filter = right.filter;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DCofThisEvent.hh,v 1.4 2004/06/11 14:10:30 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4DCofThisEvent_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TDigiCollection.hh,v 1.4 2004/06/11 14:10:30 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4TDigiCollection_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VDigi.hh,v 1.3 2005/06/01 17:15:35 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VDigi_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VDigiCollection.hh,v 1.1 2003/10/03 10:14:48 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VDigiCollection_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DCofThisEvent.cc,v 1.3 2004/06/11 14:10:31 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4DCofThisEvent.hh"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TDigiCollection.cc,v 1.3 2004/06/11 14:10:31 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4TDigiCollection.hh"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VDigi.cc,v 1.1 2003/10/03 10:15:39 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
// G4VDigi
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VDigiCollection.cc,v 1.1 2003/10/03 10:15:55 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
// G4VDigiCollection
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HCofThisEvent.hh,v 1.4 2004/06/11 14:10:32 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4HCofThisEvent_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4THitsCollection.hh,v 1.4 2004/06/11 14:10:32 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4THitsCollection_h
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4THitsMap.hh,v 1.5 2005/11/18 22:47:06 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#ifndef G4THitsMap_h
|
||||
#define G4THitsMap_h 1
|
||||
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "globals.hh"
|
||||
#include <map>
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is a template class of hits map and parametrized by
|
||||
// The concrete class of G4VHit. This is a uniform collection for
|
||||
// a particular concrete hit class objects.
|
||||
// An intermediate layer class G4HitsMap appeared in this
|
||||
// header file is used just for G4Allocator, because G4Allocator
|
||||
// cannot be instansiated with a template class. Thus G4HitsMap
|
||||
// class MUST NOT be directly used by the user.
|
||||
|
||||
template <typename T> class G4THitsMap : public G4HitsCollection
|
||||
{
|
||||
public:
|
||||
G4THitsMap();
|
||||
public: // with description
|
||||
G4THitsMap(G4String detName,G4String colNam);
|
||||
// constructor.
|
||||
public:
|
||||
virtual ~G4THitsMap();
|
||||
G4int operator==(const G4THitsMap<T> &right) const;
|
||||
G4THitsMap<T> & operator+=(const G4THitsMap<T> &right) const;
|
||||
|
||||
public: // with description
|
||||
virtual void DrawAllHits();
|
||||
virtual void PrintAllHits();
|
||||
// These two methods invokes Draw() and Print() methods of all of
|
||||
// hit objects stored in this map, respectively.
|
||||
|
||||
public: // with description
|
||||
inline T* operator[](G4int key) const;
|
||||
|
||||
// Returns a pointer to a concrete hit object.
|
||||
inline std::map<G4int,T*>* GetMap() const
|
||||
{ return (std::map<G4int,T*>*)theCollection; }
|
||||
// Returns a collection map.
|
||||
inline G4int add(const G4int & key, T * &aHit) const;
|
||||
inline G4int add(const G4int & key, T &aHit) const;
|
||||
// Insert a hit object. Total number of hit objects stored in this
|
||||
// map is returned.
|
||||
inline G4int set(const G4int & key, T * &aHit) const;
|
||||
inline G4int set(const G4int & key, T &aHit) const;
|
||||
// Overwrite a hit object. Total number of hit objects stored in this
|
||||
// map is returned.
|
||||
inline G4int entries() const
|
||||
{ return ((std::map<G4int,T*>*)theCollection)->size(); }
|
||||
// Returns the number of hit objects stored in this map
|
||||
inline void clear();
|
||||
|
||||
public:
|
||||
virtual G4VHit* GetHit(size_t) const {return 0;}
|
||||
virtual size_t GetSize() const
|
||||
{ return ((std::map<G4int,T*>*)theCollection)->size(); }
|
||||
|
||||
};
|
||||
|
||||
template <typename T> G4THitsMap<T>::G4THitsMap()
|
||||
{
|
||||
theCollection = (void*)new std::map<G4int,T*>;
|
||||
}
|
||||
|
||||
template <typename T> G4THitsMap<T>::G4THitsMap(G4String detName,G4String colNam)
|
||||
: G4HitsCollection(detName,colNam)
|
||||
{
|
||||
theCollection = (void*)new std::map<G4int,T*>;
|
||||
}
|
||||
|
||||
template <typename T> G4THitsMap<T>::~G4THitsMap()
|
||||
{
|
||||
typename std::map<G4int,T*> * theHitsMap = GetMap();
|
||||
typename std::map<G4int,T*>::iterator itr = theHitsMap->begin();
|
||||
for(; itr != theHitsMap->end(); itr++) {
|
||||
delete itr->second;
|
||||
}
|
||||
|
||||
delete theHitsMap;
|
||||
}
|
||||
|
||||
template <typename T> G4int G4THitsMap<T>::operator==(const G4THitsMap<T> &right) const
|
||||
{ return (collectionName==right.collectionName); }
|
||||
|
||||
template <typename T> G4THitsMap<T> &
|
||||
G4THitsMap<T>::operator+=(const G4THitsMap<T> &right) const
|
||||
{
|
||||
std::map<G4int,T*> * aHitsMap = right.GetMap();
|
||||
typename std::map<G4int,T*>::iterator itr = aHitsMap->begin();
|
||||
for(; itr != aHitsMap->end(); itr++) {
|
||||
add(itr->first, *(itr->second));
|
||||
}
|
||||
return (G4THitsMap<T>&)(*this);
|
||||
}
|
||||
|
||||
template <typename T> inline T*
|
||||
G4THitsMap<T>::operator[](G4int key) const {
|
||||
std::map<G4int,T*> * theHitsMap = GetMap();
|
||||
if(theHitsMap->find(key) != theHitsMap->end()) {
|
||||
return theHitsMap->find(key)->second;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T> inline G4int
|
||||
G4THitsMap<T>::add(const G4int & key, T * &aHit) const {
|
||||
|
||||
typename std::map<G4int,T*> * theHitsMap = GetMap();
|
||||
if(theHitsMap->find(key) != theHitsMap->end()) {
|
||||
*(*theHitsMap)[key] += *aHit;
|
||||
} else {
|
||||
(*theHitsMap)[key] = aHit;
|
||||
}
|
||||
return theHitsMap->size();
|
||||
}
|
||||
|
||||
template <typename T> inline G4int
|
||||
G4THitsMap<T>::add(const G4int & key, T &aHit) const {
|
||||
|
||||
typename std::map<G4int,T*> * theHitsMap = GetMap();
|
||||
if(theHitsMap->find(key) != theHitsMap->end()) {
|
||||
*(*theHitsMap)[key] += aHit;
|
||||
} else {
|
||||
T * hit = new T;
|
||||
*hit = aHit;
|
||||
(*theHitsMap)[key] = hit;
|
||||
}
|
||||
|
||||
return theHitsMap->size();
|
||||
}
|
||||
|
||||
template <typename T> inline G4int
|
||||
G4THitsMap<T>::set(const G4int & key, T * &aHit) const {
|
||||
|
||||
typename std::map<G4int,T*> * theHitsMap = GetMap();
|
||||
if(theHitsMap->find(key) != theHitsMap->end()) {
|
||||
delete (*theHitsMap)[key]->second;
|
||||
}
|
||||
(*theHitsMap)[key] = aHit;
|
||||
return theHitsMap->size();
|
||||
}
|
||||
|
||||
template <typename T> inline G4int
|
||||
G4THitsMap<T>::set(const G4int & key, T &aHit) const {
|
||||
|
||||
typename std::map<G4int,T*> * theHitsMap = GetMap();
|
||||
if(theHitsMap->find(key) != theHitsMap->end()) {
|
||||
*(*theHitsMap)[key] = aHit;
|
||||
} else {
|
||||
T * hit = new T;
|
||||
*hit = aHit;
|
||||
(*theHitsMap)[key] = hit;
|
||||
}
|
||||
|
||||
return theHitsMap->size();
|
||||
}
|
||||
|
||||
template <typename T> void G4THitsMap<T>::DrawAllHits()
|
||||
{;}
|
||||
|
||||
template <typename T> void G4THitsMap<T>::PrintAllHits()
|
||||
{;}
|
||||
|
||||
template <typename T> void G4THitsMap<T>::clear() {
|
||||
|
||||
std::map<G4int,T*> * theHitsMap = GetMap();
|
||||
typename std::map<G4int, T*>::iterator itr = theHitsMap->begin();
|
||||
for(; itr != theHitsMap->end(); itr++) {
|
||||
delete itr->second;
|
||||
}
|
||||
theHitsMap->clear();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VHit.hh,v 1.2 2005/06/01 17:15:35 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VHit_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VHitsCollection.hh,v 1.1 2003/10/03 10:17:35 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VHitsCollection_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HCofThisEvent.cc,v 1.3 2004/06/11 14:10:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4HCofThisEvent.hh"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4THitsCollection.cc,v 1.3 2004/06/11 14:10:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4THitsCollection.hh"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VHit.cc,v 1.1 2003/10/03 10:18:31 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
// G4VHit
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VHitsCollection.cc,v 1.1 2003/10/03 10:20:47 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
// G4VHitsCollection
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# $Id: GNUmakefile,v 1.2 2005/11/16 23:24:08 asaim Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for digits+hits library. Makoto Asai, 1/11/96.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
name := G4detutils
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../..
|
||||
endif
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
CPPFLAGS += -DG4DIGI_ALLOC_EXPORT
|
||||
CPPFLAGS += \
|
||||
-I$(G4BASE)/global/HEPRandom/include \
|
||||
-I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/global/HEPGeometry/include \
|
||||
-I$(G4BASE)/track/include \
|
||||
-I$(G4BASE)/particles/management/include \
|
||||
-I$(G4BASE)/materials/include \
|
||||
-I$(G4BASE)/geometry/management/include \
|
||||
-I$(G4BASE)/geometry/volumes/include \
|
||||
-I$(G4BASE)/geometry/solids/CSG/include \
|
||||
-I$(G4BASE)/digits_hits/hits/include \
|
||||
-I$(G4BASE)/digits_hits/detector/include \
|
||||
-I$(G4BASE)/intercoms/include
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
$Id: History,v 1.2 2005/11/19 00:59:10 asaim 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 *
|
||||
----------------------------------------------------------
|
||||
|
||||
November 18, 2007 M.Asai (detutils-V07-01-01)
|
||||
- Introducing concrete primitive scorer and filter classes.
|
||||
|
||||
November 16, 2007 M.Asai (detutils-V07-01-00)
|
||||
- Created.
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSCellFlux.hh,v 1.2 2005/11/17 22:53:38 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PSCellFlux_h
|
||||
#define G4PSCellFlux_h 1
|
||||
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring cell flux.
|
||||
// The Cell Flux is defined by a sum of track length divided
|
||||
// by the geometry volume, where all of the tracks in the geometry
|
||||
// are taken into account. e.g. the unit of Cell Flux is mm/mm3.
|
||||
//
|
||||
//
|
||||
// If you want to score only tracks passing through the geometry volume,
|
||||
// please use G4PSPassageCellFlux.
|
||||
//
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
class G4PSCellFlux : public G4VPrimitiveScorer
|
||||
{
|
||||
public: // with description
|
||||
G4PSCellFlux(G4String name, G4int depth=0);
|
||||
virtual ~G4PSCellFlux();
|
||||
|
||||
protected: // with description
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
|
||||
public:
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
private:
|
||||
G4int HCID;
|
||||
G4THitsMap<G4double>* EvtMap;
|
||||
};
|
||||
#endif
|
||||
|
||||
+37
-26
@@ -20,37 +20,48 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ====================================================================
|
||||
//
|
||||
// G4HepMCAsciiReaderMessenger.hh
|
||||
// $Id: G4HepMCAsciiReaderMessenger.hh,v 1.2 2003/12/09 15:35:02 gunter Exp $
|
||||
// $Id: G4PSDirectionFlag.hh,v 1.1 2005/11/17 22:53:38 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ====================================================================
|
||||
#ifndef G4_HEPMC_ASCII_READER_MESSENGER_H
|
||||
#define G4_HEPMC_ASCII_READER_MESSENGER_H
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4PSDirectionFlag.hh
|
||||
//
|
||||
// Class Description:
|
||||
// This is an enumerator to define the direction of
|
||||
// the particle's Surface Current or Flux for PrimitiveScorer
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#ifndef G4PSDirectionFlag_h
|
||||
#define G4PSDirectionFlag_h 1
|
||||
|
||||
class G4HepMCAsciiReader;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithoutParameter;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
//////////////////
|
||||
enum G4PSFluxFlag
|
||||
//////////////////
|
||||
{
|
||||
fFlux_InOut,
|
||||
// For both direction In / Out.
|
||||
fFlux_In,
|
||||
// IN : Direction which comes into the geometry
|
||||
fFlux_Out
|
||||
};
|
||||
|
||||
class G4HepMCAsciiReaderMessenger : public G4UImessenger {
|
||||
private:
|
||||
G4HepMCAsciiReader* gen;
|
||||
|
||||
G4UIdirectory* dir;
|
||||
G4UIcmdWithAnInteger* verbose;
|
||||
G4UIcmdWithAString* open;
|
||||
|
||||
public:
|
||||
G4HepMCAsciiReaderMessenger(G4HepMCAsciiReader* agen);
|
||||
~G4HepMCAsciiReaderMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand* command, G4String newValues);
|
||||
G4String GetCurrentValue(G4UIcommand* command);
|
||||
/////////////////////
|
||||
enum G4PSCurrentFlag
|
||||
/////////////////////
|
||||
{
|
||||
fCurrent_InOut,
|
||||
// For both direction In / Out.
|
||||
fCurrent_In,
|
||||
// IN : Direction which comes into the geometry
|
||||
fCurrent_Out
|
||||
// OUT : Direction which goes out fromthe geometry
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+28
-27
@@ -21,41 +21,42 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4FoamXrayTRmodel.hh,v 1.1 2004/11/09 09:20:31 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Rough model describing a radiator of X-ray transition radiation.
|
||||
// Thicknesses of plates and gas gaps are exponentially distributed.
|
||||
// We suppose that:
|
||||
// formation zone ~ mean thickness << absorption length
|
||||
// for each material and in the range 1-100 keV. This allows us to simplify
|
||||
// interference effects in radiator stack (GetStackFactor method).
|
||||
//
|
||||
//
|
||||
// History:
|
||||
// 09.02.00 V. Grichine, first version
|
||||
// $Id: G4PSDoseDeposit.hh,v 1.2 2005/11/17 22:53:38 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PSDoseDeposit_h
|
||||
#define G4PSDoseDeposit_h 1
|
||||
|
||||
#ifndef G4FoamXrayTRmodel_h
|
||||
#define G4FoamXrayTRmodel_h 1
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
#include "G4VXrayTRadModel.hh"
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// Primitive scorer class for scoring dose deposit in the geometry volume.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4FoamXrayTRmodel : public G4VXrayTRadModel
|
||||
class G4PSDoseDeposit : public G4VPrimitiveScorer
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
G4PSDoseDeposit(G4String name, G4int depth=0);
|
||||
virtual ~G4PSDoseDeposit();
|
||||
|
||||
G4FoamXrayTRmodel (G4LogicalVolume *anEnvelope,G4double,G4double);
|
||||
~G4FoamXrayTRmodel ();
|
||||
protected: // with description
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
|
||||
// Pure virtual function from base class
|
||||
public:
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
|
||||
private:
|
||||
G4int HCID;
|
||||
G4THitsMap<G4double>* EvtMap;
|
||||
};
|
||||
|
||||
#endif
|
||||
+29
-27
@@ -21,41 +21,43 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PlateIrrGasXTRdEdx.hh,v 1.1 2004/11/09 09:20:32 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Model describing a radiator of X-ray transition radiation.
|
||||
// Thicknesses of plates is fixed while gas gaps are fully irregular.
|
||||
// We suppose that:
|
||||
// formation zone ~ mean thickness << absorption length
|
||||
// for each material and in the range 1-100 keV. This allows us to simplify
|
||||
// interference effects in radiator stack (GetStackFactor method).
|
||||
//
|
||||
//
|
||||
// History:
|
||||
// 27.02.01 V. Grichine, first version
|
||||
// $Id: G4PSEnergyDeposit.hh,v 1.1 2005/11/16 23:12:42 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PSEnergyDeposit_h
|
||||
#define G4PSEnergyDeposit_h 1
|
||||
|
||||
#ifndef G4PlateIrrGasXTRdEdx_h
|
||||
#define G4PlateIrrGasXTRdEdx_h 1
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
#include "G4VXTRdEdx.hh"
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Description:
|
||||
// This is a primitive scorer class for scoring energy deposit.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4PlateIrrGasXTRdEdx : public G4VXTRdEdx
|
||||
class G4PSEnergyDeposit : public G4VPrimitiveScorer
|
||||
{
|
||||
public:
|
||||
|
||||
public: // with description
|
||||
G4PSEnergyDeposit(G4String name, G4int depth=0);
|
||||
virtual ~G4PSEnergyDeposit();
|
||||
|
||||
G4PlateIrrGasXTRdEdx (G4LogicalVolume *anEnvelope,G4double,G4double);
|
||||
~G4PlateIrrGasXTRdEdx ();
|
||||
protected: // with description
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
|
||||
// Pure virtual function from base class
|
||||
public:
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
|
||||
private:
|
||||
G4int HCID;
|
||||
G4THitsMap<G4double>* EvtMap;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSFlatSurfaceCurrent.hh,v 1.2 2005/11/17 22:53:38 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PSFlatSurfaceCurrent_h
|
||||
#define G4PSFlatSurfaceCurrent_h 1
|
||||
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
#include "G4Box.hh"
|
||||
#include "G4PSDirectionFlag.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring Surface Current.
|
||||
// Current version assumes only for G4Box shape, and the surface
|
||||
// is defined at the -Z plane of the box.
|
||||
// The current is given in the unit of area.
|
||||
// e.g. (Number of tracks)/mm2.
|
||||
//
|
||||
// Surface is defined at the -Z surface.
|
||||
// Direction -Z +Z
|
||||
// 0 IN || OUT ->|<- | fCurrent_InOut
|
||||
// 1 IN ->| | fCurrent_In
|
||||
// 2 OUT |<- | fCurrent_Out
|
||||
//
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
// 17-Nov-2005 T.Aso, Bug fix for area definition.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4PSFlatSurfaceCurrent : public G4VPrimitiveScorer
|
||||
{
|
||||
|
||||
public: // with description
|
||||
G4PSFlatSurfaceCurrent(G4String name ,G4int direction, G4int depth=0);
|
||||
virtual ~G4PSFlatSurfaceCurrent();
|
||||
|
||||
protected: // with description
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
G4int IsSelectedSurface(G4Step*,G4Box*);
|
||||
|
||||
public:
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
private:
|
||||
G4int HCID;
|
||||
G4int fDirection;
|
||||
G4THitsMap<G4double>* EvtMap;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSFlatSurfaceFlux.hh,v 1.2 2005/11/17 22:53:38 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PSFlatSurfaceFlux_h
|
||||
#define G4PSFlatSurfaceFlux_h 1
|
||||
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4PSDirectionFlag.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring Surface Flux.
|
||||
// Current version assumes only for G4Box shape, and the surface
|
||||
// is defined at the -Z plane of the box.
|
||||
// The surface flux is given in the unit of area.
|
||||
// e.g. sum of 1/cos(T)/mm2, where T is a incident angle of the
|
||||
// track on the surface.
|
||||
//
|
||||
//
|
||||
// Surface is defined at the -Z surface.
|
||||
// Direction -Z +Z
|
||||
// 0 IN || OUT ->|<- | fFlux_InOut
|
||||
// 1 IN ->| | fFlux_In
|
||||
// 2 OUT |<- | fFlux_Out
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
// 18-Nov-2005 T.Aso, To use always positive value for anglefactor.
|
||||
// Bug fix. Area definition.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4PSFlatSurfaceFlux : public G4VPrimitiveScorer
|
||||
{
|
||||
public: // with description
|
||||
G4PSFlatSurfaceFlux(G4String name,G4int direction, G4int depth=0);
|
||||
virtual ~G4PSFlatSurfaceFlux();
|
||||
|
||||
protected: // with description
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
G4int IsSelectedSurface(G4Step*,G4Box*);
|
||||
|
||||
public:
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
private:
|
||||
G4int HCID;
|
||||
G4int fDirection;
|
||||
G4THitsMap<G4double>* EvtMap;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Regular → Executable
+41
-27
@@ -21,42 +21,56 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IrregularXTRdEdx.hh,v 1.1 2004/11/09 09:20:32 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Very rough model describing a radiator of X-ray transition radiation.
|
||||
// Thicknesses of plates and gas gaps are exponentially distributed.
|
||||
// We suppose that:
|
||||
// formation zone << mean thickness << absorption length
|
||||
// for each material and in the range 1-100 keV. This allows us to simplify
|
||||
// essentially interference effects in radiator stack (GetStackFactor method).
|
||||
// The price is decreasing of X-ray TR photon yield.
|
||||
//
|
||||
// History:
|
||||
// 27.02.01 V. Grichine first version
|
||||
// $Id: G4PSMinKinEAtGeneration.hh,v 1.1 2005/11/18 22:43:10 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PSMinKinEAtGeneration_h
|
||||
#define G4PSMinKinEAtGeneration_h 1
|
||||
|
||||
#ifndef G4IrregularXTRdEdx_h
|
||||
#define G4IrregularXTRdEdx_h 1
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
#include "G4VXTRdEdx.hh"
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring Number of particles
|
||||
// generated in the geometry.
|
||||
//
|
||||
// Created: 2005-11-18 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4IrregularXTRdEdx : public G4VXTRdEdx
|
||||
|
||||
class G4PSMinKinEAtGeneration : public G4VPrimitiveScorer
|
||||
{
|
||||
public:
|
||||
|
||||
public: // with description
|
||||
G4PSMinKinEAtGeneration(G4String name, G4int depth=0);
|
||||
|
||||
G4IrregularXTRdEdx (G4LogicalVolume *anEnvelope,G4double,G4double);
|
||||
~G4IrregularXTRdEdx();
|
||||
protected: // with description
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
|
||||
public:
|
||||
virtual ~G4PSMinKinEAtGeneration();
|
||||
|
||||
public:
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
virtual void clear();
|
||||
|
||||
public:
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
private:
|
||||
G4int HCID;
|
||||
G4THitsMap<G4double>* EvtMap;
|
||||
|
||||
public:
|
||||
|
||||
// Pure virtual function from base class
|
||||
|
||||
// void DoIt(const G4FastTrack&, G4FastStep&);
|
||||
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
Regular → Executable
+39
-49
@@ -21,66 +21,56 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhotoClusterModel.hh,v 1.2 2004/11/30 10:27:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Class for 'fast' parametrisation model describing X-ray ionisation clusters
|
||||
// created in some G4Envelope.
|
||||
//
|
||||
// History:
|
||||
// 14.07.00 V. Grichine first version
|
||||
// $Id: G4PSNofSecondary.hh,v 1.1 2005/11/18 22:43:10 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PSNofSecondary_h
|
||||
#define G4PSNofSecondary_h 1
|
||||
|
||||
#ifndef G4PhotoClusterModel_h
|
||||
#define G4PhotoClusterModel_h 1
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring Number of particles
|
||||
// generated in the geometry.
|
||||
//
|
||||
// Created: 2005-11-18 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4VClusterModel.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4VTouchable.hh"
|
||||
#include "G4TouchableHistory.hh"
|
||||
|
||||
|
||||
class G4PhotoClusterModel : public G4VClusterModel
|
||||
class G4PSNofSecondary : public G4VPrimitiveScorer
|
||||
{
|
||||
public:
|
||||
|
||||
G4PhotoClusterModel (G4LogicalVolume* anEnvelope);
|
||||
|
||||
~G4PhotoClusterModel ();
|
||||
|
||||
// Pure virtual functions from base class
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
G4bool ModelTrigger(const G4FastTrack &);
|
||||
|
||||
void DoIt(const G4FastTrack&, G4FastStep&) ;
|
||||
public: // with description
|
||||
G4PSNofSecondary(G4String name, G4int depth=0);
|
||||
|
||||
protected:
|
||||
protected: // with description
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
|
||||
void ComputePhotoAbsCof() ;
|
||||
G4double GetLinearPhotoAbs(G4double) ;
|
||||
public:
|
||||
virtual ~G4PSNofSecondary();
|
||||
|
||||
public:
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
virtual void clear();
|
||||
|
||||
public:
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
private:
|
||||
G4int HCID;
|
||||
G4THitsMap<G4double>* EvtMap;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4int fMatIndex ;
|
||||
G4double** fPhotoAbsCof ;
|
||||
G4int fIntervalNumber ;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+40
-26
@@ -21,41 +21,55 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4FoamXTRdEdx.hh,v 1.1 2004/11/09 09:20:31 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Rough model describing a radiator of X-ray transition radiation.
|
||||
// Thicknesses of plates and gas gaps are exponentially distributed.
|
||||
// We suppose that:
|
||||
// formation zone ~ mean thickness << absorption length
|
||||
// for each material and in the range 1-100 keV. This allows us to simplify
|
||||
// interference effects in radiator stack (GetStackFactor method).
|
||||
//
|
||||
//
|
||||
// History:
|
||||
// 27.02.01 V. Grichine, first version
|
||||
// $Id: G4PSNofStep.hh,v 1.1 2005/11/16 23:12:42 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PSNofStep_h
|
||||
#define G4PSNofStep_h 1
|
||||
|
||||
#ifndef G4FoamXTRdEdx_h
|
||||
#define G4FoamXTRdEdx_h 1
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
#include "G4VXTRdEdx.hh"
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring Number of Steps in the cell.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4FoamXTRdEdx : public G4VXTRdEdx
|
||||
|
||||
class G4PSNofStep : public G4VPrimitiveScorer
|
||||
{
|
||||
public:
|
||||
|
||||
public: // with description
|
||||
G4PSNofStep(G4String name, G4int depth=0);
|
||||
|
||||
G4FoamXTRdEdx (G4LogicalVolume *anEnvelope,G4double,G4double);
|
||||
~G4FoamXTRdEdx ();
|
||||
protected: // with description
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
|
||||
public:
|
||||
virtual ~G4PSNofStep();
|
||||
|
||||
public:
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
virtual void clear();
|
||||
|
||||
public:
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
private:
|
||||
G4int HCID;
|
||||
G4THitsMap<G4double>* EvtMap;
|
||||
|
||||
public:
|
||||
|
||||
// Pure virtual function from base class
|
||||
|
||||
G4double GetStackFactor( G4double energy, G4double gamma, G4double varAngle);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSPassageCellFlux.hh,v 1.2 2005/11/17 22:53:38 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PSPassageCellFlux_h
|
||||
#define G4PSPassageCellFlux_h 1
|
||||
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring cell flux.
|
||||
// The Cell Flux is defined by a track length divided by a geometry
|
||||
// volume, where only tracks passing through the geometry are taken
|
||||
// into account. e.g. the unit of Cell Flux is mm/mm3.
|
||||
//
|
||||
// If you want to score all tracks in the geometry volume,
|
||||
// please use G4PSCellFlux.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4PSPassageCellFlux : public G4VPrimitiveScorer
|
||||
{
|
||||
|
||||
public: // with description
|
||||
G4PSPassageCellFlux(G4String name, G4int depth=0);
|
||||
virtual ~G4PSPassageCellFlux();
|
||||
|
||||
protected: // with description
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
virtual G4bool IsPassed(G4Step*);
|
||||
|
||||
public:
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
private:
|
||||
G4int HCID;
|
||||
G4int fCurrentTrkID;
|
||||
G4double fCellFlux;
|
||||
G4THitsMap<G4double>* EvtMap;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+39
-39
@@ -21,56 +21,56 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VXrayTRadModel.hh,v 1.1 2004/11/09 09:20:34 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// base class for 'fast' parametrisation model describing X-ray transition
|
||||
// created in some G4Envelope. Anglur distribuiton is very rough !!! (see DoIt
|
||||
// method
|
||||
//
|
||||
// History:
|
||||
// 26.02.01 V. Grichine first version
|
||||
// 26.02.01 V. Grichine, DoIt was transformed from virtual
|
||||
// $Id: G4PSPassageCurrent.hh,v 1.2 2005/11/17 22:53:38 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PSPassageCurrent_h
|
||||
#define G4PSPassageCurrent_h 1
|
||||
|
||||
#ifndef G4VXrayTRadModel_h
|
||||
#define G4VXrayTRadModel_h 1
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring current.
|
||||
// The number of tracks passing through the geometry are taken
|
||||
// into account.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#include <complex>
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
#include "G4VXrayTRmodel.hh"
|
||||
|
||||
|
||||
class G4VXrayTRadModel : public G4VXrayTRmodel
|
||||
class G4PSPassageCurrent : public G4VPrimitiveScorer
|
||||
{
|
||||
public:
|
||||
|
||||
G4VXrayTRadModel (G4LogicalVolume *anEnvelope,G4double,G4double);
|
||||
virtual ~G4VXrayTRadModel ();
|
||||
|
||||
// Pure virtual functions from base class
|
||||
|
||||
void DoIt(const G4FastTrack&, G4FastStep&) ;
|
||||
public: // with description
|
||||
G4PSPassageCurrent(G4String name, G4int depth=0);
|
||||
|
||||
// Pure virtuals must be implemented in inherited particular TR radiators
|
||||
public:
|
||||
virtual ~G4PSPassageCurrent();
|
||||
|
||||
virtual G4double GetStackFactor( G4double energy, G4double gamma,
|
||||
G4double varAngle ) = 0 ;
|
||||
protected: // with description
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
|
||||
virtual G4bool IsPassed(G4Step*);
|
||||
|
||||
void BuildTable() ;
|
||||
void BuildEnergyTable() ;
|
||||
void BuildAngleTable() ;
|
||||
public:
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
virtual void clear();
|
||||
|
||||
public:
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
private:
|
||||
G4int HCID;
|
||||
G4int fCurrentTrkID;
|
||||
G4double fCurrent;
|
||||
G4double fCurrentSquare;
|
||||
G4THitsMap<G4double>* EvtMap;
|
||||
|
||||
};
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSPassageTrackLength.hh,v 1.2 2005/11/19 00:44:00 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PSPassageTrackLength_h
|
||||
#define G4PSPassageTrackLength_h 1
|
||||
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring only track length.
|
||||
// The tracks which passed a geometry is taken into account.
|
||||
//
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4PSPassageTrackLength : public G4VPrimitiveScorer
|
||||
{
|
||||
|
||||
public: // with description
|
||||
G4PSPassageTrackLength(G4String name, G4int depth=0);
|
||||
virtual ~G4PSPassageTrackLength();
|
||||
|
||||
inline void Weighted(G4bool flg=true) { weighted = flg; }
|
||||
// Multiply track weight
|
||||
|
||||
protected: // with description
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
G4bool IsPassed(G4Step*);
|
||||
|
||||
public:
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
private:
|
||||
G4int HCID;
|
||||
G4int fCurrentTrkID;
|
||||
G4double fTrackLength;
|
||||
G4THitsMap<G4double>* EvtMap;
|
||||
G4bool weighted;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSSphereSurfaceCurrent.hh,v 1.2 2005/11/17 22:53:38 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PSSphereSurfaceCurrent_h
|
||||
#define G4PSSphereSurfaceCurrent_h 1
|
||||
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4PSDirectionFlag.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring Surface Current.
|
||||
// Current version assumes only for G4Sphere shape, and the surface
|
||||
// is defined at the inside of the sphere.
|
||||
// The current is given in the unit of area.
|
||||
// e.g. (Number of tracks)/mm2.
|
||||
//
|
||||
// Surface is defined at the inside of sphere.
|
||||
// Direction -Rmin +Rmax
|
||||
// 0 IN || OUT ->|<- | fCurrent_InOut
|
||||
// 1 IN ->| | fCurrent_In
|
||||
// 2 OUT |<- | fCurrent_Out
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
// 17-Nov-2005 Bug fix. square definition.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4PSSphereSurfaceCurrent : public G4VPrimitiveScorer
|
||||
{
|
||||
|
||||
public: // with description
|
||||
G4PSSphereSurfaceCurrent(G4String name, G4int direction, G4int depth=0);
|
||||
virtual ~G4PSSphereSurfaceCurrent();
|
||||
|
||||
protected: // with description
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
G4int IsSelectedSurface(G4Step*,G4Sphere*);
|
||||
|
||||
public:
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
private:
|
||||
G4int HCID;
|
||||
G4int fDirection;
|
||||
G4THitsMap<G4double>* EvtMap;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSTrackLength.hh,v 1.3 2005/11/19 00:44:00 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PSTrackLength_h
|
||||
#define G4PSTrackLength_h 1
|
||||
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring track length.
|
||||
//
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4PSTrackLength : public G4VPrimitiveScorer
|
||||
{
|
||||
|
||||
public: // with description
|
||||
G4PSTrackLength(G4String name, G4int depth=0);
|
||||
virtual ~G4PSTrackLength();
|
||||
|
||||
inline void Weighted(G4bool flg=true) { weighted = flg; }
|
||||
// Multiply track weight
|
||||
|
||||
protected: // with description
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
|
||||
public:
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
private:
|
||||
G4int HCID;
|
||||
G4THitsMap<G4double>* EvtMap;
|
||||
G4bool weighted;
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4SDChargedFilter.hh,v 1.2 2005/11/17 22:53:38 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4SDChargedFilter_h
|
||||
#define G4SDChargedFilter_h 1
|
||||
|
||||
class G4Step;
|
||||
class G4ChargedDefinition;
|
||||
#include "globals.hh"
|
||||
#include "G4VSDFilter.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// class description:
|
||||
//
|
||||
// This is the class of a filter to be associated with a
|
||||
// sensitive detector.
|
||||
// This fileter accepts charged particles.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4SDChargedFilter : public G4VSDFilter
|
||||
{
|
||||
|
||||
public: // with description
|
||||
G4SDChargedFilter(G4String name);
|
||||
virtual ~G4SDChargedFilter();
|
||||
|
||||
public: // with description
|
||||
virtual G4bool Accept(const G4Step*) const;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4SDKineticEnergyFilter.hh,v 1.2 2005/11/17 22:53:38 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4SDKineticEnergyFilter_h
|
||||
#define G4SDKineticEnergyFilter_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VSDFilter.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// class description:
|
||||
//
|
||||
// This is the class of a filter to be associated with a
|
||||
// sensitive detector.
|
||||
//
|
||||
// This filter accepts particles defined energy range.
|
||||
// The energy range is given at constructor, or Set methods.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4SDKineticEnergyFilter : public G4VSDFilter
|
||||
{
|
||||
|
||||
//-------
|
||||
public: // with description
|
||||
G4SDKineticEnergyFilter(G4String name,
|
||||
G4double elow=0.0,
|
||||
G4double ehigh=DBL_MAX);
|
||||
// Constructor. Filter name and kinetic energy range( elow, ehigh).
|
||||
|
||||
virtual ~G4SDKineticEnergyFilter();
|
||||
|
||||
public: // with description
|
||||
virtual G4bool Accept(const G4Step*) const;
|
||||
|
||||
void SetKineticEnergy(G4double elow, G4double ehigh);
|
||||
void SetLowEnergy(G4double elow);
|
||||
void SetHighEnergy(G4double ehigh);
|
||||
// Set methods for kinetic energy range.
|
||||
//
|
||||
void show();
|
||||
|
||||
private:
|
||||
G4double fLowEnergy;
|
||||
G4double fHighEnergy;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4SDNeutralFilter.hh,v 1.2 2005/11/17 22:53:38 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4SDNeutralFilter_h
|
||||
#define G4SDNeutralFilter_h 1
|
||||
|
||||
class G4Step;
|
||||
class G4NeutralDefinition;
|
||||
#include "globals.hh"
|
||||
#include "G4VSDFilter.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// class description:
|
||||
//
|
||||
// This is the class of a filter to be associated with a
|
||||
// sensitive detector.
|
||||
//
|
||||
// This filter accepts neutral tracks.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4SDNeutralFilter : public G4VSDFilter
|
||||
{
|
||||
|
||||
public: // with description
|
||||
G4SDNeutralFilter(G4String name);
|
||||
virtual ~G4SDNeutralFilter();
|
||||
|
||||
public: // with description
|
||||
virtual G4bool Accept(const G4Step*) const;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+39
-49
@@ -21,69 +21,59 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VClusterModel.hh,v 1.2 2004/11/30 10:27:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Base class for 'fast' parametrisation models describing ionisation clusters
|
||||
// created in some G4Envelope.
|
||||
//
|
||||
// History:
|
||||
// 14.07.00 V. Grichine first version
|
||||
// $Id: G4SDParticleFilter.hh,v 1.2 2005/11/17 22:53:38 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4SDParticleFilter_h
|
||||
#define G4SDParticleFilter_h 1
|
||||
|
||||
#ifndef G4VClusterModel_h
|
||||
#define G4VClusterModel_h 1
|
||||
|
||||
|
||||
class G4Step;
|
||||
class G4ParticleDefinition;
|
||||
#include "globals.hh"
|
||||
#include "G4VSDFilter.hh"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "G4VFastSimulationModel.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4TouchableHandle.hh"
|
||||
#include "G4TouchableHistoryHandle.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// class description:
|
||||
//
|
||||
// This is the class of a filter to be associated with a
|
||||
// sensitive detector.
|
||||
// This class filters steps by partilce definition.
|
||||
// The particles are given at constructor or add() method.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
class G4VClusterModel : public G4VFastSimulationModel
|
||||
class G4SDParticleFilter : public G4VSDFilter
|
||||
{
|
||||
public:
|
||||
|
||||
G4VClusterModel (const G4String& modelName,G4LogicalVolume* anEnvelope);
|
||||
virtual ~G4VClusterModel ();
|
||||
public: // with description
|
||||
G4SDParticleFilter(G4String name);
|
||||
G4SDParticleFilter(G4String name,const G4String& particleName);
|
||||
G4SDParticleFilter(G4String name,
|
||||
const std::vector<G4String>& particleNames);
|
||||
G4SDParticleFilter(G4String name,
|
||||
const std::vector<G4ParticleDefinition*>& particleDef);
|
||||
// Constructors. Filter name and particle's name.
|
||||
//
|
||||
|
||||
// Pure virtual functions from base class
|
||||
virtual ~G4SDParticleFilter();
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition&) = 0 ;
|
||||
|
||||
virtual G4bool ModelTrigger(const G4FastTrack &) = 0 ;
|
||||
|
||||
virtual void DoIt(const G4FastTrack&, G4FastStep&) = 0 ;
|
||||
public: // with description
|
||||
virtual G4bool Accept(const G4Step*) const;
|
||||
|
||||
protected:
|
||||
void add(const G4String& particleName);
|
||||
// set method for acceptable particle name.
|
||||
//
|
||||
void show();
|
||||
|
||||
void BuildDetectorResponse();
|
||||
private:
|
||||
std::vector<G4ParticleDefinition*> thePdef;
|
||||
|
||||
void AssignClusterHit(const G4ThreeVector& position, G4double energy) ;
|
||||
|
||||
void FillFakeStep(const G4ThreeVector& position, G4double energy) ;
|
||||
|
||||
protected:
|
||||
|
||||
G4Step* fFakeStep ;
|
||||
G4StepPoint* fFakePreStepPoint ;
|
||||
G4StepPoint* fFakePostStepPoint ;
|
||||
|
||||
G4TouchableHandle fTouchable ;
|
||||
|
||||
G4Navigator* fNavigator ;
|
||||
G4bool fNavigatorSetup ;
|
||||
|
||||
std::vector<G4ThreeVector> fClusterPositionVector ;
|
||||
std::vector<G4double> fClusterEnergyVector ;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4SDParticleWithEnergyFilter.hh,v 1.2 2005/11/17 22:53:38 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4SDParticleWithEnergyFilter_h
|
||||
#define G4SDParticleWithEnergyFilter_h 1
|
||||
|
||||
class G4Step;
|
||||
class G4ParticleDefinition;
|
||||
#include "globals.hh"
|
||||
#include "G4VSDFilter.hh"
|
||||
#include "G4SDParticleFilter.hh"
|
||||
#include "G4SDKineticEnergyFilter.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// class description:
|
||||
//
|
||||
// This is the class of a filter to be associated with a
|
||||
// sensitive detector.
|
||||
// This class filters steps by partilce definition and kinetic energy.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4SDParticleWithEnergyFilter : public G4VSDFilter
|
||||
{
|
||||
public: // with description
|
||||
G4SDParticleWithEnergyFilter(G4String name,
|
||||
G4double elow=0.0, G4double ehigh=DBL_MAX);
|
||||
virtual ~G4SDParticleWithEnergyFilter();
|
||||
|
||||
public: // with description
|
||||
virtual G4bool Accept(const G4Step*) const;
|
||||
|
||||
void add(const G4String& particleName);
|
||||
// add the particle into accepatable particle list.
|
||||
//
|
||||
void SetKineticEnergy(G4double elow, G4double ehigh);
|
||||
// Set acceptable kinetic energy range.
|
||||
//
|
||||
void show();
|
||||
|
||||
private:
|
||||
G4SDParticleFilter* fParticleFilter;
|
||||
G4SDKineticEnergyFilter* fKineticFilter;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSCellFlux.cc,v 1.3 2005/11/19 03:16:07 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4PSCellFlux
|
||||
#include "G4PSCellFlux.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4VSolid.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring cell flux.
|
||||
// The Cell Flux is defined by a sum of track length divided
|
||||
// by the geometry volume, where all of the tracks in the geometry
|
||||
// are taken into account.
|
||||
//
|
||||
// If you want to score only tracks passing through the geometry volume,
|
||||
// please use G4PSPassageCellFlux.
|
||||
//
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSCellFlux::G4PSCellFlux(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1)
|
||||
{;}
|
||||
|
||||
G4PSCellFlux::~G4PSCellFlux()
|
||||
{;}
|
||||
|
||||
G4bool G4PSCellFlux::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
{
|
||||
G4double stepLength = aStep->GetStepLength();
|
||||
if ( stepLength == 0. ) return FALSE;
|
||||
G4double volume = aStep->GetPreStepPoint()->GetPhysicalVolume()
|
||||
->GetLogicalVolume()->GetSolid()->GetCubicVolume();
|
||||
G4double CellFlux = stepLength / volume ;
|
||||
CellFlux *= aStep->GetPreStepPoint()->GetWeight();
|
||||
G4int index = GetIndex(aStep);
|
||||
EvtMap->add(index,CellFlux);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void G4PSCellFlux::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
EvtMap = new G4THitsMap<G4double>(detector->GetName(),
|
||||
GetName());
|
||||
if ( HCID < 0 ) HCID = GetCollectionID(0);
|
||||
HCE->AddHitsCollection(HCID,EvtMap);
|
||||
}
|
||||
|
||||
void G4PSCellFlux::EndOfEvent(G4HCofThisEvent*)
|
||||
{;}
|
||||
|
||||
void G4PSCellFlux::clear(){
|
||||
EvtMap->clear();
|
||||
}
|
||||
|
||||
void G4PSCellFlux::DrawAll()
|
||||
{;}
|
||||
|
||||
void G4PSCellFlux::PrintAll()
|
||||
{
|
||||
G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl;
|
||||
G4cout << " PrimitiveScorer " << GetName() <<G4endl;
|
||||
G4cout << " Number of entries " << EvtMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
|
||||
for(; itr != EvtMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " cell flux : " << *(itr->second)*cm*cm << " [cm^-2]"
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSDoseDeposit.cc,v 1.3 2005/12/13 08:43:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4PSDoseDeposit
|
||||
#include "G4PSDoseDeposit.hh"
|
||||
#include "G4VSolid.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring only energy deposit.
|
||||
//
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSDoseDeposit::G4PSDoseDeposit(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1)
|
||||
{;}
|
||||
|
||||
G4PSDoseDeposit::~G4PSDoseDeposit()
|
||||
{;}
|
||||
|
||||
G4bool G4PSDoseDeposit::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
{
|
||||
G4double edep = aStep->GetTotalEnergyDeposit();
|
||||
if ( edep == 0. ) return FALSE;
|
||||
G4double volume = aStep->GetPreStepPoint()->GetPhysicalVolume()
|
||||
->GetLogicalVolume()->GetSolid()->GetCubicVolume();
|
||||
G4double density = aStep->GetTrack()->GetMaterial()->GetDensity();
|
||||
G4double dose = edep / ( density * volume );
|
||||
dose *= aStep->GetPreStepPoint()->GetWeight();
|
||||
G4int index = GetIndex(aStep);
|
||||
EvtMap->add(index,dose);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void G4PSDoseDeposit::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
EvtMap = new G4THitsMap<G4double>(GetMultiFunctionalDetector()->GetName(),
|
||||
GetName());
|
||||
if(HCID < 0) {HCID = GetCollectionID(0);}
|
||||
HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap);
|
||||
}
|
||||
|
||||
void G4PSDoseDeposit::EndOfEvent(G4HCofThisEvent*)
|
||||
{;}
|
||||
|
||||
void G4PSDoseDeposit::clear()
|
||||
{
|
||||
EvtMap->clear();
|
||||
}
|
||||
|
||||
void G4PSDoseDeposit::DrawAll()
|
||||
{;}
|
||||
|
||||
void G4PSDoseDeposit::PrintAll()
|
||||
{
|
||||
G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl;
|
||||
G4cout << " PrimitiveScorer " << GetName() << G4endl;
|
||||
G4cout << " Number of entries " << EvtMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
|
||||
for(; itr != EvtMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " dose deposit: " << G4BestUnit(*(itr->second),"Dose")
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSEnergyDeposit.cc,v 1.3 2005/12/13 08:43:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4PSEnergyDeposit
|
||||
#include "G4PSEnergyDeposit.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Description:
|
||||
// This is a primitive scorer class for scoring energy deposit.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSEnergyDeposit::G4PSEnergyDeposit(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1)
|
||||
{;}
|
||||
|
||||
G4PSEnergyDeposit::~G4PSEnergyDeposit()
|
||||
{;}
|
||||
|
||||
G4bool G4PSEnergyDeposit::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
{
|
||||
G4double edep = aStep->GetTotalEnergyDeposit();
|
||||
if ( edep == 0. ) return FALSE;
|
||||
edep *= aStep->GetPreStepPoint()->GetWeight(); // (Particle Weight)
|
||||
G4int index = GetIndex(aStep);
|
||||
EvtMap->add(index,edep);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void G4PSEnergyDeposit::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
EvtMap = new G4THitsMap<G4double>(GetMultiFunctionalDetector()->GetName(),
|
||||
GetName());
|
||||
if(HCID < 0) {HCID = GetCollectionID(0);}
|
||||
HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap);
|
||||
}
|
||||
|
||||
void G4PSEnergyDeposit::EndOfEvent(G4HCofThisEvent*)
|
||||
{;}
|
||||
|
||||
void G4PSEnergyDeposit::clear()
|
||||
{
|
||||
EvtMap->clear();
|
||||
}
|
||||
|
||||
void G4PSEnergyDeposit::DrawAll()
|
||||
{;}
|
||||
|
||||
void G4PSEnergyDeposit::PrintAll()
|
||||
{
|
||||
G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl;
|
||||
G4cout << " PrimitiveScorer " << GetName() << G4endl;
|
||||
G4cout << " Number of entries " << EvtMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
|
||||
for(; itr != EvtMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " energy deposit: " << G4BestUnit(*(itr->second),"Energy")
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSFlatSurfaceCurrent.cc,v 1.3 2005/11/19 03:16:07 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4PSFlatSurfaceCurrent
|
||||
#include "G4PSFlatSurfaceCurrent.hh"
|
||||
#include "G4StepStatus.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring only Surface Flux.
|
||||
// Current version assumes only for G4Box shape.
|
||||
//
|
||||
// Surface is defined at the -Z surface.
|
||||
// Direction -Z +Z
|
||||
// 0 IN || OUT ->|<- |
|
||||
// 1 IN ->| |
|
||||
// 2 OUT |<- |
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
G4PSFlatSurfaceCurrent::G4PSFlatSurfaceCurrent(G4String name,
|
||||
G4int direction, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction)
|
||||
{;}
|
||||
|
||||
G4PSFlatSurfaceCurrent::~G4PSFlatSurfaceCurrent()
|
||||
{;}
|
||||
|
||||
G4bool G4PSFlatSurfaceCurrent::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
{
|
||||
G4StepPoint* preStep = aStep->GetPreStepPoint();
|
||||
G4VSolid * solid =
|
||||
preStep->GetPhysicalVolume()->GetLogicalVolume()->GetSolid();
|
||||
if( solid->GetEntityType() != "G4Box" ){
|
||||
G4Exception("G4PSFlatSurfaceCurrentScorer. - Solid type is not supported.");
|
||||
return FALSE;
|
||||
}
|
||||
G4Box* boxSolid = (G4Box*)(solid);
|
||||
|
||||
G4int dirFlag =IsSelectedSurface(aStep,boxSolid);
|
||||
if ( dirFlag > 0 ) {
|
||||
G4int index = GetIndex(aStep);
|
||||
G4double square = 4.*boxSolid->GetXHalfLength()*boxSolid->GetYHalfLength();
|
||||
G4TouchableHandle theTouchable = preStep->GetTouchableHandle();
|
||||
G4ThreeVector pdirection = preStep->GetMomentumDirection();
|
||||
G4ThreeVector localdir =
|
||||
theTouchable->GetHistory()->GetTopTransform().TransformAxis(pdirection);
|
||||
G4double current = preStep->GetWeight(); // Current (Particle Weight)
|
||||
current = current/square; // Current with angle.
|
||||
|
||||
if ( fDirection == fCurrent_InOut || fDirection == dirFlag ){
|
||||
EvtMap->add(index,current);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
G4int G4PSFlatSurfaceCurrent::IsSelectedSurface(G4Step* aStep, G4Box* boxSolid){
|
||||
|
||||
G4TouchableHandle theTouchable =
|
||||
aStep->GetPreStepPoint()->GetTouchableHandle();
|
||||
|
||||
|
||||
if (aStep->GetPreStepPoint()->GetStepStatus() == fGeomBoundary ){
|
||||
// Entering Geometry
|
||||
G4ThreeVector stppos1= aStep->GetPreStepPoint()->GetPosition();
|
||||
G4ThreeVector localpos1 =
|
||||
theTouchable->GetHistory()->GetTopTransform().TransformPoint(stppos1);
|
||||
if(fabs( localpos1.z() + boxSolid->GetZHalfLength())<kCarTolerance ){
|
||||
return fCurrent_In;
|
||||
}
|
||||
}
|
||||
|
||||
if (aStep->GetPostStepPoint()->GetStepStatus() == fGeomBoundary ){
|
||||
// Exiting Geometry
|
||||
G4ThreeVector stppos2= aStep->GetPostStepPoint()->GetPosition();
|
||||
G4ThreeVector localpos2 =
|
||||
theTouchable->GetHistory()->GetTopTransform().TransformPoint(stppos2);
|
||||
if(fabs( localpos2.z() + boxSolid->GetZHalfLength())<kCarTolerance ){
|
||||
return fCurrent_Out;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
void G4PSFlatSurfaceCurrent::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
EvtMap = new G4THitsMap<G4double>(detector->GetName(), GetName());
|
||||
if ( HCID < 0 ) HCID = GetCollectionID(0);
|
||||
HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap);
|
||||
}
|
||||
|
||||
void G4PSFlatSurfaceCurrent::EndOfEvent(G4HCofThisEvent*)
|
||||
{;}
|
||||
|
||||
void G4PSFlatSurfaceCurrent::clear(){
|
||||
EvtMap->clear();
|
||||
}
|
||||
|
||||
void G4PSFlatSurfaceCurrent::DrawAll()
|
||||
{;}
|
||||
|
||||
void G4PSFlatSurfaceCurrent::PrintAll()
|
||||
{
|
||||
G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl;
|
||||
G4cout << " PrimitiveScorer " << GetName() <<G4endl;
|
||||
G4cout << " Number of entries " << EvtMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
|
||||
for(; itr != EvtMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " current : " << *(itr->second)*cm*cm << " [cm^-2]"
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSFlatSurfaceFlux.cc,v 1.3 2005/11/19 03:16:07 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4PSFlatSurfaceFlux
|
||||
#include "G4PSFlatSurfaceFlux.hh"
|
||||
#include "G4StepStatus.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring Surface Flux.
|
||||
// Current version assumes only for G4Box shape, and the surface
|
||||
// is fixed on -Z plane.
|
||||
//
|
||||
// Surface is defined at the -Z surface.
|
||||
// Direction -Z +Z
|
||||
// 0 IN || OUT ->|<- |
|
||||
// 1 IN ->| |
|
||||
// 2 OUT |<- |
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
// 18-Nov-2005 T.Aso, To use always positive value for anglefactor.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSFlatSurfaceFlux::G4PSFlatSurfaceFlux(G4String name,
|
||||
G4int direction, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction)
|
||||
{;}
|
||||
|
||||
G4PSFlatSurfaceFlux::~G4PSFlatSurfaceFlux()
|
||||
{;}
|
||||
|
||||
G4bool G4PSFlatSurfaceFlux::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
{
|
||||
G4StepPoint* preStep = aStep->GetPreStepPoint();
|
||||
G4VSolid * solid =
|
||||
preStep->GetPhysicalVolume()->GetLogicalVolume()->GetSolid();
|
||||
if( solid->GetEntityType() != "G4Box" ){
|
||||
G4Exception("G4PSFlatSurfaceFluxScorer. - Solid type is not supported.");
|
||||
return FALSE;
|
||||
}
|
||||
G4Box* boxSolid = (G4Box*)(solid);
|
||||
|
||||
G4int dirFlag =IsSelectedSurface(aStep,boxSolid);
|
||||
if ( dirFlag > 0 ) {
|
||||
G4int index = GetIndex(aStep);
|
||||
G4double square = 4.*boxSolid->GetXHalfLength()*boxSolid->GetYHalfLength();
|
||||
G4TouchableHandle theTouchable = preStep->GetTouchableHandle();
|
||||
G4ThreeVector pdirection = preStep->GetMomentumDirection();
|
||||
G4ThreeVector localdir =
|
||||
theTouchable->GetHistory()->GetTopTransform().TransformAxis(pdirection);
|
||||
G4double angleFactor = localdir.z();
|
||||
if ( angleFactor < 0 ) angleFactor *= -1.;
|
||||
G4double flux = preStep->GetWeight(); // Current (Particle Weight)
|
||||
flux = flux/angleFactor/square; // Flux with angle.
|
||||
|
||||
if ( fDirection == fFlux_InOut || fDirection == dirFlag ){
|
||||
EvtMap->add(index,flux);
|
||||
}
|
||||
|
||||
#ifdef debug
|
||||
G4cout << " PASSED vol "
|
||||
<< index << " trk "<<trkid<<" len " << fFlatSurfaceFlux<<G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
G4int G4PSFlatSurfaceFlux::IsSelectedSurface(G4Step* aStep, G4Box* boxSolid){
|
||||
|
||||
G4TouchableHandle theTouchable =
|
||||
aStep->GetPreStepPoint()->GetTouchableHandle();
|
||||
|
||||
if (aStep->GetPreStepPoint()->GetStepStatus() == fGeomBoundary ){
|
||||
// Entering Geometry
|
||||
G4ThreeVector stppos1= aStep->GetPreStepPoint()->GetPosition();
|
||||
G4ThreeVector localpos1 =
|
||||
theTouchable->GetHistory()->GetTopTransform().TransformPoint(stppos1);
|
||||
if(fabs( localpos1.z() + boxSolid->GetZHalfLength())<kCarTolerance ){
|
||||
return fFlux_In;
|
||||
}
|
||||
}
|
||||
|
||||
if (aStep->GetPostStepPoint()->GetStepStatus() == fGeomBoundary ){
|
||||
// Exiting Geometry
|
||||
G4ThreeVector stppos2= aStep->GetPostStepPoint()->GetPosition();
|
||||
G4ThreeVector localpos2 =
|
||||
theTouchable->GetHistory()->GetTopTransform().TransformPoint(stppos2);
|
||||
if(fabs( localpos2.z() + boxSolid->GetZHalfLength())<kCarTolerance ){
|
||||
return fFlux_Out;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
void G4PSFlatSurfaceFlux::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
EvtMap = new G4THitsMap<G4double>(GetMultiFunctionalDetector()->GetName(),
|
||||
GetName());
|
||||
if ( HCID < 0 ) HCID = GetCollectionID(0);
|
||||
HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap);
|
||||
}
|
||||
|
||||
void G4PSFlatSurfaceFlux::EndOfEvent(G4HCofThisEvent*)
|
||||
{;}
|
||||
|
||||
void G4PSFlatSurfaceFlux::clear(){
|
||||
EvtMap->clear();
|
||||
}
|
||||
|
||||
void G4PSFlatSurfaceFlux::DrawAll()
|
||||
{;}
|
||||
|
||||
void G4PSFlatSurfaceFlux::PrintAll()
|
||||
{
|
||||
G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl;
|
||||
G4cout << " PrimitiveScorer" << GetName() <<G4endl;
|
||||
G4cout << " Number of entries " << EvtMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
|
||||
for(; itr != EvtMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " flux : " << *(itr->second)*cm*cm << " [cm^-2]"
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSMinKinEAtGeneration.cc,v 1.4 2005/12/13 08:43:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4PSMinKinEAtGeneration
|
||||
#include "G4PSMinKinEAtGeneration.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring minimum energy of
|
||||
// newly produced particles in the geometry.
|
||||
//
|
||||
// Created: 2005-11-17 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
|
||||
G4PSMinKinEAtGeneration::G4PSMinKinEAtGeneration(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1)
|
||||
{;}
|
||||
|
||||
G4PSMinKinEAtGeneration::~G4PSMinKinEAtGeneration()
|
||||
{;}
|
||||
|
||||
G4bool G4PSMinKinEAtGeneration::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
{
|
||||
// ===============
|
||||
// First Step,
|
||||
// Confirm this is a newly produced secondary.
|
||||
//
|
||||
//- check for newly produced particle. e.g. Step number is 1.
|
||||
if ( aStep->GetTrack()->GetCurrentStepNumber() != 1) return FALSE;
|
||||
//- check for this is not a primary particle. e.g. ParentID != 0 .
|
||||
if ( aStep->GetTrack()->GetParentID() == 0 ) return FALSE;
|
||||
|
||||
//===============================================
|
||||
//- This is a newly produced secondary particle.
|
||||
//===============================================
|
||||
|
||||
// ===============
|
||||
// Second Step,
|
||||
// Confirm this track has lower energy than previous one.
|
||||
//
|
||||
|
||||
// -Kinetic energy of this particle at the starting point.
|
||||
G4double kinetic = aStep->GetPreStepPoint()->GetKineticEnergy();
|
||||
|
||||
// -Stored value in the current HitsMap.
|
||||
G4int index = GetIndex(aStep);
|
||||
G4double* mapValue= ((*EvtMap)[index]);
|
||||
|
||||
// -
|
||||
// If mapValue exits (e.g not NULL ), compare it with
|
||||
// current track's kinetic energy.
|
||||
if ( mapValue && ( kinetic > *mapValue ) ) return FALSE;
|
||||
|
||||
// -
|
||||
// Current Track is a newly produced secondary and has lower
|
||||
// kinetic energy than previous one in this geometry.
|
||||
//
|
||||
EvtMap->set(index, kinetic);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void G4PSMinKinEAtGeneration::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
EvtMap = new G4THitsMap<G4double>(detector->GetName(),GetName());
|
||||
if(HCID < 0) {HCID = GetCollectionID(0);}
|
||||
HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap);
|
||||
}
|
||||
|
||||
void G4PSMinKinEAtGeneration::EndOfEvent(G4HCofThisEvent*)
|
||||
{;}
|
||||
|
||||
void G4PSMinKinEAtGeneration::clear(){
|
||||
EvtMap->clear();
|
||||
}
|
||||
|
||||
void G4PSMinKinEAtGeneration::DrawAll()
|
||||
{;}
|
||||
|
||||
void G4PSMinKinEAtGeneration::PrintAll()
|
||||
{
|
||||
G4cout << " PrimitiveScorer " << GetName() << G4endl;
|
||||
G4cout << " Number of entries " << EvtMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
|
||||
for(; itr != EvtMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " num of step: " << G4BestUnit(*(itr->second),"Energy")
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSNofSecondary.cc,v 1.2 2005/12/13 08:43:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4PSNofSecondary
|
||||
#include "G4PSNofSecondary.hh"
|
||||
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring number of steps in the
|
||||
// Cell.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
|
||||
G4PSNofSecondary::G4PSNofSecondary(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1)
|
||||
{;}
|
||||
|
||||
G4PSNofSecondary::~G4PSNofSecondary()
|
||||
{;}
|
||||
|
||||
G4bool G4PSNofSecondary::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
{
|
||||
//- check for newly produced particle. e.g. first step.
|
||||
if ( aStep->GetTrack()->GetCurrentStepNumber() != 1) return FALSE;
|
||||
//- check for this is not a primary particle. e.g. ParentID > 0 .
|
||||
if ( aStep->GetTrack()->GetParentID() == 0 ) return FALSE;
|
||||
//
|
||||
//- This is a newly produced secondary particle.
|
||||
G4int index = GetIndex(aStep);
|
||||
G4double weight = aStep->GetPreStepPoint()->GetWeight();
|
||||
EvtMap->add(index,weight);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void G4PSNofSecondary::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
EvtMap = new G4THitsMap<G4double>(detector->GetName(),GetName());
|
||||
if(HCID < 0) {HCID = GetCollectionID(0);}
|
||||
HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap);
|
||||
}
|
||||
|
||||
void G4PSNofSecondary::EndOfEvent(G4HCofThisEvent*)
|
||||
{;}
|
||||
|
||||
void G4PSNofSecondary::clear(){
|
||||
EvtMap->clear();
|
||||
}
|
||||
|
||||
void G4PSNofSecondary::DrawAll()
|
||||
{;}
|
||||
|
||||
void G4PSNofSecondary::PrintAll()
|
||||
{
|
||||
G4cout << " PrimitiveScorer " << GetName() << G4endl;
|
||||
G4cout << " Number of entries " << EvtMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
|
||||
for(; itr != EvtMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " num of step: " << *(itr->second)
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSNofStep.cc,v 1.4 2005/12/13 08:43:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4PSNofStep
|
||||
#include "G4PSNofStep.hh"
|
||||
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring number of steps in the
|
||||
// Cell.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
|
||||
G4PSNofStep::G4PSNofStep(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1)
|
||||
{;}
|
||||
|
||||
G4PSNofStep::~G4PSNofStep()
|
||||
{;}
|
||||
|
||||
G4bool G4PSNofStep::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
{
|
||||
G4int index = GetIndex(aStep);
|
||||
G4double val = 1.0;
|
||||
EvtMap->add(index,val);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void G4PSNofStep::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
EvtMap = new G4THitsMap<G4double>(detector->GetName(),GetName());
|
||||
if(HCID < 0) {HCID = GetCollectionID(0);}
|
||||
HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap);
|
||||
}
|
||||
|
||||
void G4PSNofStep::EndOfEvent(G4HCofThisEvent*)
|
||||
{;}
|
||||
|
||||
void G4PSNofStep::clear(){
|
||||
EvtMap->clear();
|
||||
}
|
||||
|
||||
void G4PSNofStep::DrawAll()
|
||||
{;}
|
||||
|
||||
void G4PSNofStep::PrintAll()
|
||||
{
|
||||
G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl;
|
||||
G4cout << " PrimitiveScorer " << GetName() << G4endl;
|
||||
G4cout << " Number of entries " << EvtMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
|
||||
for(; itr != EvtMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " num of step: " << *(itr->second)
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSPassageCellFlux.cc,v 1.4 2005/11/19 03:16:07 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4PSPassageCellFlux
|
||||
#include "G4PSPassageCellFlux.hh"
|
||||
#include "G4StepStatus.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4VSolid.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring cell flux.
|
||||
// The Cell Flux is defined by a track length divided by a geometry
|
||||
// volume, where only tracks passing through the geometry are taken
|
||||
// into account. e.g. the unit of Cell Flux is mm/mm3.
|
||||
//
|
||||
// If you want to score all tracks in the geometry volume,
|
||||
// please use G4PSCellFlux.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSPassageCellFlux::G4PSPassageCellFlux(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fCellFlux(0)
|
||||
{;}
|
||||
|
||||
G4PSPassageCellFlux::~G4PSPassageCellFlux()
|
||||
{;}
|
||||
|
||||
G4bool G4PSPassageCellFlux::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
{
|
||||
|
||||
if ( IsPassed(aStep) ) {
|
||||
fCellFlux /=
|
||||
aStep->GetPreStepPoint()->GetPhysicalVolume()
|
||||
->GetLogicalVolume()->GetSolid()->GetCubicVolume();
|
||||
G4int index = GetIndex(aStep);
|
||||
EvtMap->add(index,fCellFlux);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
G4bool G4PSPassageCellFlux::IsPassed(G4Step* aStep){
|
||||
G4bool Passed = FALSE;
|
||||
|
||||
G4bool IsEnter = aStep->GetPreStepPoint()->GetStepStatus() == fGeomBoundary;
|
||||
G4bool IsExit = aStep->GetPostStepPoint()->GetStepStatus() == fGeomBoundary;
|
||||
|
||||
G4int trkid = aStep->GetTrack()->GetTrackID();
|
||||
G4double trklength = aStep->GetStepLength();
|
||||
trklength *= aStep->GetPreStepPoint()->GetWeight();
|
||||
|
||||
if ( IsEnter &&IsExit ){ // Passed at one step
|
||||
fCellFlux = trklength; // Track length is absolutely given.
|
||||
Passed = TRUE;
|
||||
}else if ( IsEnter ){ // Enter a new geometry
|
||||
fCurrentTrkID = trkid; // Resetting the current track.
|
||||
fCellFlux = trklength;
|
||||
}else if ( IsExit ){ // Exit a current geometry
|
||||
if ( fCurrentTrkID == trkid ) {// if the track is same as entered,
|
||||
fCellFlux += trklength; // add the track length to current one.
|
||||
Passed = TRUE;
|
||||
}
|
||||
}else{ // Inside geometry
|
||||
if ( fCurrentTrkID == trkid ){ // if the track is same as entered,
|
||||
fCellFlux += trklength; // adding the track length to current one.
|
||||
}
|
||||
}
|
||||
|
||||
return Passed;
|
||||
}
|
||||
|
||||
void G4PSPassageCellFlux::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
fCurrentTrkID = -1;
|
||||
|
||||
EvtMap = new G4THitsMap<G4double>(detector->GetName(),
|
||||
GetName());
|
||||
if ( HCID < 0 ) HCID = GetCollectionID(0);
|
||||
HCE->AddHitsCollection(HCID,EvtMap);
|
||||
|
||||
}
|
||||
|
||||
void G4PSPassageCellFlux::EndOfEvent(G4HCofThisEvent*)
|
||||
{;}
|
||||
|
||||
void G4PSPassageCellFlux::clear(){
|
||||
EvtMap->clear();
|
||||
}
|
||||
|
||||
void G4PSPassageCellFlux::DrawAll()
|
||||
{;}
|
||||
|
||||
void G4PSPassageCellFlux::PrintAll()
|
||||
{
|
||||
G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl;
|
||||
G4cout << " PrimitiveScorer " << GetName() <<G4endl;
|
||||
G4cout << " Number of entries " << EvtMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
|
||||
for(; itr != EvtMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " cell flux : " << *(itr->second)*cm*cm << " [cm^-2]"
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSPassageCurrent.cc,v 1.3 2005/11/19 03:16:07 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4PSPassageCurrent
|
||||
#include "G4PSPassageCurrent.hh"
|
||||
#include "G4StepStatus.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4VSolid.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring number of tracks,
|
||||
// where only tracks passing through the geometry are taken
|
||||
// into account.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSPassageCurrent::G4PSPassageCurrent(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fCurrent(0)
|
||||
{;}
|
||||
|
||||
G4PSPassageCurrent::~G4PSPassageCurrent()
|
||||
{;}
|
||||
|
||||
G4bool G4PSPassageCurrent::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
{
|
||||
|
||||
if ( IsPassed(aStep) ) {
|
||||
fCurrent = aStep->GetPreStepPoint()->GetWeight();
|
||||
G4int index = GetIndex(aStep);
|
||||
EvtMap->add(index,fCurrent);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
G4bool G4PSPassageCurrent::IsPassed(G4Step* aStep){
|
||||
G4bool Passed = FALSE;
|
||||
|
||||
G4bool IsEnter = aStep->GetPreStepPoint()->GetStepStatus() == fGeomBoundary;
|
||||
G4bool IsExit = aStep->GetPostStepPoint()->GetStepStatus() == fGeomBoundary;
|
||||
|
||||
G4int trkid = aStep->GetTrack()->GetTrackID();
|
||||
|
||||
if ( IsEnter &&IsExit ){ // Passed at one step
|
||||
Passed = TRUE;
|
||||
}else if ( IsEnter ){ // Enter a new geometry
|
||||
fCurrentTrkID = trkid; // Resetting the current track.
|
||||
}else if ( IsExit ){ // Exit a current geometry
|
||||
if ( fCurrentTrkID == trkid ) {
|
||||
Passed = TRUE; // if the track is same as entered.
|
||||
}
|
||||
}else{ // Inside geometry
|
||||
if ( fCurrentTrkID == trkid ){ // Adding the track length to current one ,
|
||||
}
|
||||
}
|
||||
return Passed;
|
||||
}
|
||||
|
||||
void G4PSPassageCurrent::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
fCurrentTrkID = -1;
|
||||
|
||||
EvtMap = new G4THitsMap<G4double>(detector->GetName(),
|
||||
GetName());
|
||||
if ( HCID < 0 ) HCID = GetCollectionID(0);
|
||||
HCE->AddHitsCollection(HCID,EvtMap);
|
||||
|
||||
}
|
||||
|
||||
void G4PSPassageCurrent::EndOfEvent(G4HCofThisEvent*)
|
||||
{
|
||||
}
|
||||
|
||||
void G4PSPassageCurrent::clear(){
|
||||
EvtMap->clear();
|
||||
}
|
||||
|
||||
void G4PSPassageCurrent::DrawAll()
|
||||
{;}
|
||||
|
||||
void G4PSPassageCurrent::PrintAll()
|
||||
{
|
||||
G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl;
|
||||
G4cout << " PrimitiveScorer " << GetName() <<G4endl;
|
||||
G4cout << " Number of entries " << EvtMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
|
||||
for(; itr != EvtMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " cell current : " << *(itr->second)
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSPassageTrackLength.cc,v 1.2 2005/11/19 00:44:00 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4PSPassageTrackLength
|
||||
#include "G4PSPassageTrackLength.hh"
|
||||
#include "G4StepStatus.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring only track length.
|
||||
// The tracks which passed a geometry is taken into account.
|
||||
//
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSPassageTrackLength::G4PSPassageTrackLength(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fTrackLength(0.),
|
||||
weighted(false)
|
||||
{;}
|
||||
|
||||
G4PSPassageTrackLength::~G4PSPassageTrackLength()
|
||||
{;}
|
||||
|
||||
G4bool G4PSPassageTrackLength::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
{
|
||||
|
||||
if ( IsPassed(aStep) ) {
|
||||
G4int index = GetIndex(aStep);
|
||||
EvtMap->add(index,fTrackLength);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
G4bool G4PSPassageTrackLength::IsPassed(G4Step* aStep){
|
||||
G4bool Passed = FALSE;
|
||||
|
||||
G4bool IsEnter = aStep->GetPreStepPoint()->GetStepStatus() == fGeomBoundary;
|
||||
G4bool IsExit = aStep->GetPostStepPoint()->GetStepStatus() == fGeomBoundary;
|
||||
|
||||
G4int trkid = aStep->GetTrack()->GetTrackID();
|
||||
G4double trklength = aStep->GetStepLength();
|
||||
if(weighted) trklength *= aStep->GetPreStepPoint()->GetWeight();
|
||||
|
||||
if ( IsEnter &&IsExit ){ // Passed at one step
|
||||
fTrackLength = trklength; // Track length is absolutely given.
|
||||
Passed = TRUE;
|
||||
}else if ( IsEnter ){ // Enter a new geometry
|
||||
fCurrentTrkID = trkid; // Resetting the current track.
|
||||
fTrackLength = trklength;
|
||||
}else if ( IsExit ){ // Exit a current geometry
|
||||
if ( fCurrentTrkID == trkid ) {
|
||||
fTrackLength += trklength; // Adding the track length to current one,
|
||||
Passed = TRUE; // if the track is same as entered.
|
||||
}
|
||||
}else{ // Inside geometry
|
||||
if ( fCurrentTrkID == trkid ){ // Adding the track length to current one ,
|
||||
fTrackLength += trklength; // if the track is same as entered.
|
||||
}
|
||||
}
|
||||
|
||||
return Passed;
|
||||
}
|
||||
|
||||
void G4PSPassageTrackLength::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
fCurrentTrkID = -1;
|
||||
|
||||
EvtMap = new G4THitsMap<G4double>(detector->GetName(),GetName());
|
||||
if ( HCID < 0 ) HCID = GetCollectionID(0);
|
||||
HCE->AddHitsCollection(HCID,EvtMap);
|
||||
}
|
||||
|
||||
void G4PSPassageTrackLength::EndOfEvent(G4HCofThisEvent*)
|
||||
{;}
|
||||
|
||||
void G4PSPassageTrackLength::clear(){
|
||||
EvtMap->clear();
|
||||
}
|
||||
|
||||
void G4PSPassageTrackLength::DrawAll()
|
||||
{;}
|
||||
|
||||
void G4PSPassageTrackLength::PrintAll()
|
||||
{
|
||||
G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl;
|
||||
G4cout << " PrimitiveSenstivity " << GetName() << G4endl;
|
||||
G4cout << " Number of entries " << EvtMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
|
||||
for(; itr != EvtMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " track length : " << G4BestUnit(*(itr->second),"Length")
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSSphereSurfaceCurrent.cc,v 1.3 2005/11/17 22:53:38 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4PSSphereSurfaceCurrent
|
||||
#include "G4PSSphereSurfaceCurrent.hh"
|
||||
#include "G4StepStatus.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring only Surface Current.
|
||||
// Current version assumes only for G4Sphere shape.
|
||||
//
|
||||
// Surface is defined at the inside of sphere.
|
||||
// Direction -Rmin +Rmax
|
||||
// 0 IN || OUT ->|<- |
|
||||
// 1 IN ->| |
|
||||
// 2 OUT |<- |
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSSphereSurfaceCurrent::G4PSSphereSurfaceCurrent(G4String name,
|
||||
G4int direction, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction)
|
||||
{;}
|
||||
|
||||
G4PSSphereSurfaceCurrent::~G4PSSphereSurfaceCurrent()
|
||||
{;}
|
||||
|
||||
G4bool G4PSSphereSurfaceCurrent::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
{
|
||||
G4StepPoint* preStep = aStep->GetPreStepPoint();
|
||||
G4VSolid * solid =
|
||||
preStep->GetPhysicalVolume()->GetLogicalVolume()->GetSolid();
|
||||
if( solid->GetEntityType() != "G4Sphere" ){
|
||||
G4Exception("G4PSSphereSurfaceCurrentScorer. - Solid type is not supported.");
|
||||
return FALSE;
|
||||
}
|
||||
G4Sphere* sphereSolid = (G4Sphere*)(solid);
|
||||
|
||||
G4int dirFlag =IsSelectedSurface(aStep,sphereSolid);
|
||||
if ( dirFlag > 0 ) {
|
||||
|
||||
G4double radi = sphereSolid->GetInsideRadius();
|
||||
G4double dph = sphereSolid->GetDeltaPhiAngle()/radian;
|
||||
G4double stth = sphereSolid->GetStartThetaAngle()/radian;
|
||||
G4double enth = stth+sphereSolid->GetDeltaThetaAngle()/radian;
|
||||
G4double square = radi*radi*dph*( -std::cos(enth) + std::cos(stth) );
|
||||
|
||||
G4double current = preStep->GetWeight(); // Current (Particle Weight)
|
||||
current = current/square; // Current with angle.
|
||||
if ( fDirection == fCurrent_InOut || fDirection == dirFlag ){
|
||||
G4int index = GetIndex(aStep);
|
||||
EvtMap->add(index,current);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
G4int G4PSSphereSurfaceCurrent::IsSelectedSurface(G4Step* aStep, G4Sphere* sphereSolid){
|
||||
|
||||
G4TouchableHandle theTouchable =
|
||||
aStep->GetPreStepPoint()->GetTouchableHandle();
|
||||
|
||||
if (aStep->GetPreStepPoint()->GetStepStatus() == fGeomBoundary ){
|
||||
// Entering Geometry
|
||||
G4ThreeVector stppos1= aStep->GetPreStepPoint()->GetPosition();
|
||||
G4ThreeVector localpos1 =
|
||||
theTouchable->GetHistory()->GetTopTransform().TransformPoint(stppos1);
|
||||
G4double localR2 = localpos1.x()*localpos1.x()
|
||||
+localpos1.y()*localpos1.y()
|
||||
+localpos1.z()*localpos1.z();
|
||||
G4double InsideRadius2 =
|
||||
sphereSolid->GetInsideRadius()*sphereSolid->GetInsideRadius();
|
||||
if(fabs( localR2 - InsideRadius2 ) < kCarTolerance ){
|
||||
return fCurrent_In;
|
||||
}
|
||||
}
|
||||
|
||||
if (aStep->GetPostStepPoint()->GetStepStatus() == fGeomBoundary ){
|
||||
// Exiting Geometry
|
||||
G4ThreeVector stppos2= aStep->GetPostStepPoint()->GetPosition();
|
||||
G4ThreeVector localpos2 =
|
||||
theTouchable->GetHistory()->GetTopTransform().TransformPoint(stppos2);
|
||||
G4double localR2 = localpos2.x()*localpos2.x()
|
||||
+localpos2.y()*localpos2.y()
|
||||
+localpos2.z()*localpos2.z();
|
||||
G4double InsideRadius2 =
|
||||
sphereSolid->GetInsideRadius()*sphereSolid->GetInsideRadius();
|
||||
if(fabs( localR2 - InsideRadius2 ) < kCarTolerance ){
|
||||
return fCurrent_Out;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
void G4PSSphereSurfaceCurrent::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
EvtMap = new G4THitsMap<G4double>(detector->GetName(), GetName());
|
||||
if ( HCID < 0 ) HCID = GetCollectionID(0);
|
||||
HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap);
|
||||
}
|
||||
|
||||
void G4PSSphereSurfaceCurrent::EndOfEvent(G4HCofThisEvent*)
|
||||
{;}
|
||||
|
||||
void G4PSSphereSurfaceCurrent::clear(){
|
||||
EvtMap->clear();
|
||||
}
|
||||
|
||||
void G4PSSphereSurfaceCurrent::DrawAll()
|
||||
{;}
|
||||
|
||||
void G4PSSphereSurfaceCurrent::PrintAll()
|
||||
{
|
||||
G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl;
|
||||
G4cout << " PrimitiveScorer " << GetName() <<G4endl;
|
||||
G4cout << " Number of entries " << EvtMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
|
||||
for(; itr != EvtMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " current : " << *(itr->second)
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PSTrackLength.cc,v 1.4 2005/12/13 08:43:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4PSTrackLength
|
||||
#include "G4PSTrackLength.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring sum of track length.
|
||||
//
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSTrackLength::G4PSTrackLength(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false)
|
||||
{;}
|
||||
|
||||
G4PSTrackLength::~G4PSTrackLength()
|
||||
{;}
|
||||
|
||||
G4bool G4PSTrackLength::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
{
|
||||
G4double trklength = aStep->GetStepLength();
|
||||
if ( trklength == 0. ) return FALSE;
|
||||
if(weighted) trklength *= aStep->GetPreStepPoint()->GetWeight();
|
||||
G4int index = GetIndex(aStep);
|
||||
EvtMap->add(index,trklength);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void G4PSTrackLength::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
EvtMap = new G4THitsMap<G4double>(detector->GetName(),GetName());
|
||||
if(HCID < 0) {HCID = GetCollectionID(0);}
|
||||
HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap);
|
||||
}
|
||||
|
||||
void G4PSTrackLength::EndOfEvent(G4HCofThisEvent*)
|
||||
{;}
|
||||
|
||||
void G4PSTrackLength::clear(){
|
||||
EvtMap->clear();
|
||||
}
|
||||
|
||||
void G4PSTrackLength::DrawAll()
|
||||
{;}
|
||||
|
||||
void G4PSTrackLength::PrintAll()
|
||||
{
|
||||
G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl;
|
||||
G4cout << " PrimitiveScorer " << GetName() << G4endl;
|
||||
G4cout << " Number of entries " << EvtMap->entries() << G4endl;
|
||||
std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
|
||||
for(; itr != EvtMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " track length: " << G4BestUnit(*(itr->second),"Length")
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
+26
-43
@@ -21,53 +21,36 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PAIclusterModel.hh,v 1.2 2004/11/10 10:03:12 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4SDChargedFilter.cc,v 1.1 2005/11/16 23:04:04 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Class for 'fast' parametrisation model describing PAI ionisation clusters
|
||||
// created in some G4Envelope.
|
||||
//
|
||||
// History:
|
||||
// 14.07.00 V. Grichine first version
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4PAIclusterModel_h
|
||||
#define G4PAIclusterModel_h 1
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4PAIModel.hh"
|
||||
#include "G4VClusterModel.hh"
|
||||
// G4VSensitiveDetector
|
||||
#include "G4SDChargedFilter.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4VTouchable.hh"
|
||||
#include "G4TouchableHistory.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// class description:
|
||||
//
|
||||
// This is the class of a filter to be associated with a
|
||||
// sensitive detector.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class G4PAIclusterModel : public G4VClusterModel
|
||||
G4SDChargedFilter::G4SDChargedFilter(G4String name)
|
||||
:G4VSDFilter(name)
|
||||
{;}
|
||||
|
||||
G4SDChargedFilter::~G4SDChargedFilter()
|
||||
{;}
|
||||
|
||||
G4bool G4SDChargedFilter::Accept(const G4Step* aStep) const
|
||||
{
|
||||
public:
|
||||
if (aStep->GetPreStepPoint()->GetCharge() != 0. ) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
G4PAIclusterModel (G4LogicalVolume* anEnvelope);
|
||||
|
||||
~G4PAIclusterModel ();
|
||||
|
||||
// Pure virtual functions from base class
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
G4bool ModelTrigger(const G4FastTrack &);
|
||||
|
||||
void DoIt(const G4FastTrack&, G4FastStep&) ;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4PAIModel* fPAIonisation ;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4SDKineticEnergyFilter.cc,v 1.4 2005/11/22 21:41:55 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4VSensitiveDetector
|
||||
#include "G4SDKineticEnergyFilter.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// class description:
|
||||
//
|
||||
// This is the class of a filter to be associated with a
|
||||
// sensitive detector.
|
||||
//
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4SDKineticEnergyFilter::G4SDKineticEnergyFilter(G4String name,
|
||||
G4double elow,
|
||||
G4double ehigh)
|
||||
:G4VSDFilter(name),fLowEnergy(elow),fHighEnergy(ehigh)
|
||||
{;}
|
||||
|
||||
G4SDKineticEnergyFilter::~G4SDKineticEnergyFilter()
|
||||
{;}
|
||||
|
||||
G4bool G4SDKineticEnergyFilter::Accept(const G4Step* aStep) const
|
||||
{
|
||||
G4double kinetic = aStep->GetPreStepPoint()->GetKineticEnergy();
|
||||
if ( kinetic < fLowEnergy ) return FALSE;
|
||||
if ( kinetic >= fHighEnergy ) return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void G4SDKineticEnergyFilter::SetKineticEnergy(G4double elow, G4double ehigh){
|
||||
fLowEnergy = elow;
|
||||
fHighEnergy = ehigh;
|
||||
}
|
||||
|
||||
void G4SDKineticEnergyFilter::show() {
|
||||
G4cout << " G4SDKineticEnergyFilter:: " << GetName()
|
||||
<< " LowE " << G4BestUnit(fLowEnergy,"Energy")
|
||||
<< " HighE " << G4BestUnit(fHighEnergy,"Energy")
|
||||
<<G4endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4SDNeutralFilter.cc,v 1.1 2005/11/16 23:04:04 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4VSensitiveDetector
|
||||
#include "G4SDNeutralFilter.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4TouchableHistory.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// class description:
|
||||
//
|
||||
// This is the class of a filter to be associated with a
|
||||
// sensitive detector.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4SDNeutralFilter::G4SDNeutralFilter(G4String name)
|
||||
:G4VSDFilter(name)
|
||||
{;}
|
||||
|
||||
G4SDNeutralFilter::~G4SDNeutralFilter()
|
||||
{;}
|
||||
|
||||
G4bool G4SDNeutralFilter::Accept(const G4Step* aStep) const
|
||||
{
|
||||
if (aStep->GetPreStepPoint()->GetCharge()== 0. ) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4SDParticleFilter.cc,v 1.2 2005/11/22 21:41:55 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4VSensitiveDetector
|
||||
#include "G4SDParticleFilter.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// class description:
|
||||
//
|
||||
// This is the class of a filter to be associated with a
|
||||
// sensitive detector.
|
||||
// This class filters steps by partilce definition.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4SDParticleFilter::G4SDParticleFilter(G4String name)
|
||||
:G4VSDFilter(name)
|
||||
{
|
||||
thePdef.clear();
|
||||
}
|
||||
|
||||
G4SDParticleFilter::G4SDParticleFilter(G4String name,
|
||||
const G4String& particleName)
|
||||
:G4VSDFilter(name)
|
||||
{
|
||||
thePdef.clear();
|
||||
G4ParticleDefinition* pd = G4ParticleTable::GetParticleTable()->FindParticle(particleName);
|
||||
if(!pd)
|
||||
{
|
||||
G4String msg = "Particle <";
|
||||
msg += particleName;
|
||||
msg += "> not found.";
|
||||
G4Exception("G4SDParticleFilter::G4SDParticleFilter()",
|
||||
"DetUtil0000",FatalException,msg);
|
||||
}
|
||||
thePdef.push_back(pd);
|
||||
}
|
||||
|
||||
G4SDParticleFilter::G4SDParticleFilter(G4String name,
|
||||
const std::vector<G4String>& particleNames)
|
||||
:G4VSDFilter(name)
|
||||
{
|
||||
thePdef.clear();
|
||||
for ( size_t i = 0; i < particleNames.size(); i++){
|
||||
G4ParticleDefinition* pd = G4ParticleTable::GetParticleTable()->FindParticle(particleNames[i]);
|
||||
if(!pd)
|
||||
{
|
||||
G4String msg = "Particle <";
|
||||
msg += particleNames[i];
|
||||
msg += "> not found.";
|
||||
G4Exception("G4SDParticleFilter::G4SDParticleFilter()",
|
||||
"DetUtil0000",FatalException,msg);
|
||||
}
|
||||
thePdef.push_back(pd);
|
||||
}
|
||||
}
|
||||
|
||||
G4SDParticleFilter::G4SDParticleFilter(G4String name,
|
||||
const std::vector<G4ParticleDefinition*>& particleDef)
|
||||
:G4VSDFilter(name), thePdef(particleDef)
|
||||
{
|
||||
for ( size_t i = 0; i < particleDef.size(); i++){
|
||||
if(!particleDef[i]) G4Exception("G4SDParticleFilter::G4SDParticleFilter()","DetUtil0001",FatalException,
|
||||
"NULL pointer is found in the given particleDef vector.");
|
||||
}
|
||||
}
|
||||
|
||||
G4SDParticleFilter::~G4SDParticleFilter()
|
||||
{
|
||||
thePdef.clear();
|
||||
}
|
||||
|
||||
G4bool G4SDParticleFilter::Accept(const G4Step* aStep) const
|
||||
{
|
||||
for ( size_t i = 0; i < thePdef.size(); i++){
|
||||
if ( thePdef[i] == aStep->GetTrack()->GetDefinition() ) return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void G4SDParticleFilter::add(const G4String& particleName)
|
||||
{
|
||||
G4ParticleDefinition* pd =
|
||||
G4ParticleTable::GetParticleTable()->FindParticle(particleName);
|
||||
if(!pd)
|
||||
{
|
||||
G4String msg = "Particle <";
|
||||
msg += particleName;
|
||||
msg += "> not found.";
|
||||
G4Exception("G4SDParticleFilter::add()",
|
||||
"DetUtil0002",FatalException,msg);
|
||||
}
|
||||
for ( size_t i = 0; i < thePdef.size(); i++){
|
||||
if ( thePdef[i] == pd ) return;
|
||||
}
|
||||
thePdef.push_back(pd);
|
||||
}
|
||||
|
||||
void G4SDParticleFilter::show(){
|
||||
G4cout << "----G4SDParticleFileter particle list------"<<G4endl;
|
||||
for ( size_t i = 0; i < thePdef.size(); i++){
|
||||
G4cout << thePdef[i]->GetParticleName() << G4endl;
|
||||
}
|
||||
G4cout << "-------------------------------------------"<<G4endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+43
-56
@@ -21,73 +21,60 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IrregularXTRdEdx.cc,v 1.1 2004/11/09 09:20:34 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4SDParticleWithEnergyFilter.cc,v 1.1 2005/11/16 23:04:04 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// G4VSensitiveDetector
|
||||
#include "G4SDParticleWithEnergyFilter.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
|
||||
|
||||
#include "G4IrregularXTRdEdx.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// class description:
|
||||
//
|
||||
// Constructor, destructor
|
||||
// This is the class of a filter to be associated with a
|
||||
// sensitive detector.
|
||||
// This class filters steps by partilce definition and kinetic energy.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4IrregularXTRdEdx::G4IrregularXTRdEdx(G4Envelope *anEnvelope,
|
||||
G4double a, G4double b) :
|
||||
G4VXTRdEdx(anEnvelope,a,b)
|
||||
G4SDParticleWithEnergyFilter::G4SDParticleWithEnergyFilter(G4String name,
|
||||
G4double elow,
|
||||
G4double ehigh)
|
||||
:G4VSDFilter(name)
|
||||
{
|
||||
G4cout<<"Irregular X-ray TR dE/dx model is called"<<G4endl ;
|
||||
|
||||
// Build energy and angular integral spectra of X-ray TR photons inside
|
||||
// a radiator
|
||||
|
||||
BuildTable() ;
|
||||
fParticleFilter = new G4SDParticleFilter(name);
|
||||
fKineticFilter = new G4SDKineticEnergyFilter(name,elow,ehigh);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4IrregularXTRdEdx::~G4IrregularXTRdEdx()
|
||||
{
|
||||
;
|
||||
G4SDParticleWithEnergyFilter::~G4SDParticleWithEnergyFilter()
|
||||
{
|
||||
delete fParticleFilter;
|
||||
delete fKineticFilter;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Very rough approximation for radiator interference factor for the case of
|
||||
// fully irregular radiator. The plate and gas gap thicknesses are distributed
|
||||
// according to exponent. The mean values of the plate and gas gap thicknesses
|
||||
// are supposed to be much more than XTR formation zones but much less than
|
||||
// mean absorption length of XTR photons in coresponding material.
|
||||
|
||||
G4double
|
||||
G4IrregularXTRdEdx::GetStackFactor( G4double energy,
|
||||
G4double gamma, G4double varAngle )
|
||||
G4bool G4SDParticleWithEnergyFilter::Accept(const G4Step* aStep) const
|
||||
{
|
||||
G4double result ;
|
||||
|
||||
G4complex R = OneInterfaceXTRdEdx(energy,gamma,varAngle)
|
||||
* G4double(fPlateNumber) ;
|
||||
result = 2.0*std::real(R) ;
|
||||
|
||||
return result ;
|
||||
if ( ! fParticleFilter->Accept(aStep) ) return FALSE;
|
||||
if ( ! fKineticFilter->Accept(aStep) ) return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void G4SDParticleWithEnergyFilter::add(const G4String& particleName)
|
||||
{
|
||||
fParticleFilter->add(particleName);
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void G4SDParticleWithEnergyFilter::SetKineticEnergy(G4double elow,
|
||||
G4double ehigh)
|
||||
{
|
||||
fKineticFilter->SetKineticEnergy(elow,ehigh);
|
||||
}
|
||||
|
||||
void G4SDParticleWithEnergyFilter::show(){
|
||||
fParticleFilter->show();
|
||||
fKineticFilter->show();
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.7 2004/06/11 14:11:15 gcosmo Exp $
|
||||
# $Id: GNUmakefile,v 1.8 2005/10/17 21:21:53 tinslay Exp $
|
||||
# ------------------------------------------------------------
|
||||
# GNUmakefile for events library. Makoto Asai, 5/9/95.
|
||||
# ------------------------------------------------------------
|
||||
@@ -41,7 +41,8 @@ CPPFLAGS += \
|
||||
-I$(G4BASE)/digits_hits/detector/include \
|
||||
-I$(G4BASE)/digits_hits/hits/include \
|
||||
-I$(G4BASE)/digits_hits/digits/include \
|
||||
-I$(G4BASE)/intercoms/include
|
||||
-I$(G4BASE)/intercoms/include \
|
||||
-I$(G4BASE)/graphics_reps/include
|
||||
|
||||
ifdef G4_STORE_TRAJECTORY
|
||||
CPPFLAGS += -DG4_STORE_TRAJECTORY
|
||||
|
||||
+29
-1
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.90 2005/06/13 14:05:05 gcosmo Exp $
|
||||
$Id: History,v 1.97 2005/11/30 15:23:49 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,34 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
November 30, 2005, G.Cosmo (event-V07-01-05)
|
||||
- Trivial fixes to G4SPSAngDistribution and G4SPSPosDistribution for
|
||||
support of CLHEP-2.0.X series.
|
||||
|
||||
November 22, 2005, M.Asai (event-V07-01-04)
|
||||
- Put G4Exception to the constructors of G4UserEventAction and
|
||||
G4UserStackingAction to protect against their instantiation before
|
||||
G4VUserPhysicsList is instantiated and set to G4RunManager.
|
||||
- Put protection against null pointer to
|
||||
G4ParticleGun::SetParticleDefinition().
|
||||
|
||||
November 21, 2005, M.Asai (event-V07-01-03)
|
||||
- Fix a bug in the previous tag.
|
||||
|
||||
November 18, 2005, M.Asai (event-V07-01-02)
|
||||
- Migration to sstream.
|
||||
- Move G4HepMC classes to examples/extended/eventgenerator/HepMC.
|
||||
|
||||
October 20, 2005, Joseph Perl (event-V07-01-01)
|
||||
- Tag to co-work with vis-V07-01-05.
|
||||
|
||||
Oct 17, 2005 Jane Tinslay
|
||||
- Modify GNUmakefile to follow intercoms->graphics_reps migration for
|
||||
G4VGraphicsScene and G4VVisManager
|
||||
|
||||
Sep 05, 2005, F.Lei (event-V07-01-00)
|
||||
- Corrected typo in printout in G4GeneralParticleMessenger.cc (bug #786)
|
||||
|
||||
Jun 13, 2005, G.Cosmo (event-V07-00-05)
|
||||
- Corrected typo in printout in G4GeneralParticleMessenger.cc.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CellScorer.hh,v 1.1 2002/10/28 10:06:00 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4CellScorer
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CellScorerStore.hh,v 1.2 2003/06/16 16:50:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4CellScorerStore
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ClassificationOfNewTrack.hh,v 1.5 2001/07/19 00:14:15 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4EvManMessenger.hh,v 1.4 2001/07/11 09:58:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4EvManMessenger_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Event.hh,v 1.10 2004/06/11 14:11:15 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4Event_h
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4EventManager.hh,v 1.15 2004/08/10 23:59:37 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4EventManager.hh,v 1.16 2005/11/21 23:45:48 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -48,8 +48,7 @@ class G4SDManager;
|
||||
#include "globals.hh"
|
||||
class G4VUserEventInformation;
|
||||
|
||||
#ifndef WIN32 // Temporarly disabled on Windows, until CLHEP
|
||||
// will support the HepMC module
|
||||
#ifdef CLHEP_HepMC // Temporarly disabled
|
||||
#include "CLHEP/HepMC/GenEvent.h"
|
||||
#endif
|
||||
|
||||
@@ -80,7 +79,7 @@ class G4EventManager
|
||||
void ProcessOneEvent(G4Event* anEvent);
|
||||
// This method is the main entry to this class for simulating an event.
|
||||
|
||||
#ifndef WIN32 // Temporarly disabled on Windows, until CLHEP
|
||||
#ifdef CLHEP_HepMC // Temporarly disabled on Windows, until CLHEP
|
||||
// will support the HepMC module
|
||||
void ProcessOneEvent(const HepMC::GenEvent* hepmcevt,G4Event* anEvent=0);
|
||||
// This is an alternative entry for large HEP experiments which use
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HEPEvtInterface.hh,v 1.7 2003/06/16 16:50:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4HEPEvtInterface_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HEPEvtParticle.hh,v 1.8 2004/06/11 14:11:15 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ====================================================================
|
||||
//
|
||||
// G4HepMCInterface.hh
|
||||
// $Id: G4HepMCInterface.hh,v 1.3 2003/12/09 15:35:03 gunter Exp $
|
||||
//
|
||||
// A base class for primary generation via HepMC object.
|
||||
// This class is derived from G4VPrimaryGenerator.
|
||||
//
|
||||
// ====================================================================
|
||||
#ifndef G4_HEPMC_INTERFACE_H
|
||||
#define G4_HEPMC_INTERFACE_H
|
||||
|
||||
#include "G4VPrimaryGenerator.hh"
|
||||
#include "CLHEP/HepMC/GenEvent.h"
|
||||
|
||||
class G4HepMCInterface : public G4VPrimaryGenerator {
|
||||
public:
|
||||
// static service method for conversion from HepMC::GenEvent to G4Event
|
||||
static void HepMC2G4(const HepMC::GenEvent* hepmcevt, G4Event* g4event);
|
||||
|
||||
// static service method for checking a point is included in the (current) world
|
||||
// static G4bool CheckVertexInsideWorld(const G4ThreeVector& pos);
|
||||
// ------------> This method has been moved to the base class
|
||||
|
||||
protected:
|
||||
// Note that the life of HepMC event object must be handled by users.
|
||||
// In the default implementation, a current HepMC event will be
|
||||
// deleted at GeneratePrimaryVertex() in the next event.
|
||||
HepMC::GenEvent* hepmcEvent; // (care for single event case only)
|
||||
|
||||
// Implement this method in his/her own concrete class.
|
||||
// An empty event will be created in default.
|
||||
virtual HepMC::GenEvent* GenerateHepMCEvent();
|
||||
|
||||
public:
|
||||
G4HepMCInterface();
|
||||
virtual ~G4HepMCInterface();
|
||||
|
||||
// set/get methods
|
||||
HepMC::GenEvent* GetHepMCGenEvent() const;
|
||||
|
||||
// The default behavior is that a single HepMC event generated by
|
||||
// GenerateHepMCEvent() will be converted to G4Event through HepMC2G4().
|
||||
virtual void GeneratePrimaryVertex(G4Event* anEvent);
|
||||
};
|
||||
|
||||
// ====================================================================
|
||||
// inline functions
|
||||
// ====================================================================
|
||||
|
||||
inline HepMC::GenEvent* G4HepMCInterface::GetHepMCGenEvent() const
|
||||
{
|
||||
return hepmcEvent;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleGun.hh,v 1.7 2001/11/20 23:21:41 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4ParticleGun_h
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user