Import Geant4 10.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 78057 2013-12-03 08:31:15Z gcosmo $
|
||||
$Id: History 83518 2014-08-27 12:57:10Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,36 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
Aug 25, 2014, M.Asai (digits_hits-V10-00-08)
|
||||
- G4VScoringMesh, G4ScoringBox, G4ScoringCylinder : fix Construct()
|
||||
to make it work when the entire geometry has been destroyed.
|
||||
Addressing to bug report #1665.
|
||||
|
||||
May 26, 2014, M.Asai (digits_hits-V10-00-07)
|
||||
- G4ScoringMessenger.cc : fix broadcast parameters of the commands
|
||||
that should be used only by the master threads. Addressing to
|
||||
bug report #1554.
|
||||
|
||||
May 20, 2014, A.Dotti (digits_hits-V10-00-05, -06)
|
||||
- Correcting another missing end of line in a file
|
||||
|
||||
May 19, 2014, A.Dotti (digits_hits-V10-00-04)
|
||||
- Missing end of file empty line added
|
||||
|
||||
May 16, 2014, A.Dotti (digits_hits-V10-00-03)
|
||||
- Coverity fixes
|
||||
|
||||
Apr 27, 2014, M.Asai (digits_hits-V10-00-02)
|
||||
- G4PSCylinderSurfaceCurrent.cc : remove unnecessary cout.
|
||||
Addressing to Bug Report #1610.
|
||||
|
||||
Mar 5, 2014, G.Cosmo (digits_hits-V10-00-01)
|
||||
- Added missing dependency to graphics_reps in scorer module.
|
||||
|
||||
Mar 2, 2014, T.Aso, M.Asai (digits_hits-V10-00-00)
|
||||
- Fix the angle factor in G4PSSphereSurfaceFlux to keep it always
|
||||
positive. Addressing to Bug Report #1479.
|
||||
|
||||
Dec 2, 2013, M.Asai (digits_hits-V09-06-13)
|
||||
- Remove uninitialized and unused datamember from G4ScoringMessenger.
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SDManager.hh 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4SDManager.hh 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef G4SDManager_h
|
||||
@@ -100,6 +100,10 @@ class G4SDManager
|
||||
{ return HCtable->entries(); }
|
||||
inline G4HCtable* GetHCtable() const
|
||||
{ return HCtable; }
|
||||
private:
|
||||
//Disable copy constructor and assignment operator
|
||||
G4SDManager( const G4SDManager& );
|
||||
G4SDManager& operator=(const G4SDManager&);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SensitiveVolumeList.hh 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4SensitiveVolumeList.hh 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file --- Copyright CERN 1996
|
||||
@@ -64,7 +64,7 @@ class G4SensitiveVolumeList
|
||||
~G4SensitiveVolumeList();
|
||||
|
||||
//Assignment Operation
|
||||
const G4SensitiveVolumeList & operator=(const G4SensitiveVolumeList &right
|
||||
G4SensitiveVolumeList & operator=(const G4SensitiveVolumeList &right
|
||||
);
|
||||
|
||||
//Equality Operations
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VReadOutGeometry.hh 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4VReadOutGeometry.hh 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -58,7 +58,7 @@ class G4VReadOutGeometry
|
||||
|
||||
protected:
|
||||
G4VReadOutGeometry(const G4VReadOutGeometry &right);
|
||||
const G4VReadOutGeometry & operator=(const G4VReadOutGeometry &right);
|
||||
G4VReadOutGeometry & operator=(const G4VReadOutGeometry &right);
|
||||
|
||||
virtual G4bool FindROTouchable(G4Step*);
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSensitiveDetector.hh 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4VSensitiveDetector.hh 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef G4VSensitiveDetector_h
|
||||
@@ -60,7 +60,7 @@ class G4VSensitiveDetector
|
||||
public:
|
||||
virtual ~G4VSensitiveDetector();
|
||||
|
||||
const G4VSensitiveDetector & operator=(const G4VSensitiveDetector &right);
|
||||
G4VSensitiveDetector & operator=(const G4VSensitiveDetector &right);
|
||||
|
||||
G4int operator==(const G4VSensitiveDetector &right) const;
|
||||
G4int operator!=(const G4VSensitiveDetector &right) const;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SensitiveVolumeList.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4SensitiveVolumeList.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
|
||||
//Assignment Operation
|
||||
const G4SensitiveVolumeList & G4SensitiveVolumeList::operator=(const G4SensitiveVolumeList &right)
|
||||
G4SensitiveVolumeList & G4SensitiveVolumeList::operator=(const G4SensitiveVolumeList &right)
|
||||
{
|
||||
thePhysicalVolumeList = right.thePhysicalVolumeList;
|
||||
theLogicalVolumeList = right.theLogicalVolumeList;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VReadOutGeometry.cc 74048 2013-09-20 09:34:57Z gcosmo $
|
||||
// $Id: G4VReadOutGeometry.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
|
||||
#include "G4VReadOutGeometry.hh"
|
||||
@@ -75,8 +75,9 @@ G4VReadOutGeometry::~G4VReadOutGeometry()
|
||||
if(ROnavigator) delete ROnavigator;
|
||||
}
|
||||
|
||||
const G4VReadOutGeometry & G4VReadOutGeometry::operator=(const G4VReadOutGeometry &right)
|
||||
G4VReadOutGeometry & G4VReadOutGeometry::operator=(const G4VReadOutGeometry &right)
|
||||
{
|
||||
if ( this == &right ) return *this;
|
||||
delete fincludeList; fincludeList = 0;
|
||||
delete fexcludeList; fexcludeList = 0;
|
||||
name = right.name;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSensitiveDetector.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4VSensitiveDetector.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4VSensitiveDetector
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
@@ -75,8 +75,9 @@ G4VSensitiveDetector* G4VSensitiveDetector::Clone() const
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const G4VSensitiveDetector & G4VSensitiveDetector::operator=(const G4VSensitiveDetector &right)
|
||||
G4VSensitiveDetector & G4VSensitiveDetector::operator=(const G4VSensitiveDetector &right)
|
||||
{
|
||||
if (this == &right ) return *this;
|
||||
SensitiveDetectorName = right.SensitiveDetectorName;
|
||||
thePathName = right.thePathName;
|
||||
fullPathName = right.fullPathName;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DCofThisEvent.hh 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4DCofThisEvent.hh 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef G4DCofThisEvent_h
|
||||
@@ -58,6 +58,8 @@ class G4DCofThisEvent
|
||||
|
||||
void AddDigiCollection(G4int DCID,G4VDigiCollection * aDC);
|
||||
|
||||
G4DCofThisEvent(const G4DCofThisEvent&);
|
||||
G4DCofThisEvent& operator=(const G4DCofThisEvent&);
|
||||
private:
|
||||
std::vector<G4VDigiCollection*> * DC;
|
||||
|
||||
|
||||
@@ -24,10 +24,11 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DCofThisEvent.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4DCofThisEvent.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
|
||||
#include "G4DCofThisEvent.hh"
|
||||
#include <algorithm>
|
||||
|
||||
G4ThreadLocal G4Allocator<G4DCofThisEvent> *anDCoTHAllocator_G4MT_TLS_ = 0;
|
||||
|
||||
@@ -60,3 +61,26 @@ void G4DCofThisEvent::AddDigiCollection(G4int DCID,G4VDigiCollection * aDC)
|
||||
{ (*DC)[DCID] = aDC; }
|
||||
}
|
||||
|
||||
G4DCofThisEvent::G4DCofThisEvent(const G4DCofThisEvent& rhs)
|
||||
{
|
||||
if ( !anDCoTHAllocator_G4MT_TLS_ ) anDCoTHAllocator_G4MT_TLS_ = new G4Allocator<G4DCofThisEvent>;
|
||||
DC = new std::vector<G4VDigiCollection*>(rhs.DC->size());
|
||||
for ( unsigned int i = 0 ; i < rhs.DC->size() ; ++i )
|
||||
*(DC->at(i)) = *(rhs.DC->at(i));
|
||||
}
|
||||
|
||||
G4DCofThisEvent& G4DCofThisEvent::operator=(const G4DCofThisEvent& rhs)
|
||||
{
|
||||
if ( this == &rhs ) return *this;
|
||||
if ( !anDCoTHAllocator_G4MT_TLS_ ) anDCoTHAllocator_G4MT_TLS_ = new G4Allocator<G4DCofThisEvent>;
|
||||
for ( std::vector<G4VDigiCollection*>::const_iterator it = DC->begin() ;
|
||||
it != DC->end() ; ++it )
|
||||
{
|
||||
delete *it;
|
||||
}
|
||||
DC->resize(rhs.DC->size());
|
||||
for ( unsigned int i = 0 ; i < rhs.DC->size() ; ++i )
|
||||
*(DC->at(i)) = *(rhs.DC->at(i));
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HCofThisEvent.hh 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4HCofThisEvent.hh 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef G4HCofThisEvent_h
|
||||
@@ -57,6 +57,8 @@ class G4HCofThisEvent
|
||||
|
||||
void AddHitsCollection(G4int HCID,G4VHitsCollection * aHC);
|
||||
|
||||
G4HCofThisEvent(const G4HCofThisEvent&);
|
||||
G4HCofThisEvent& operator=(const G4HCofThisEvent&);
|
||||
private:
|
||||
std::vector<G4VHitsCollection*> * HC;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HCofThisEvent.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4HCofThisEvent.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
|
||||
#include "G4HCofThisEvent.hh"
|
||||
@@ -61,3 +61,26 @@ void G4HCofThisEvent::AddHitsCollection(G4int HCID,G4VHitsCollection * aHC)
|
||||
}
|
||||
|
||||
|
||||
G4HCofThisEvent::G4HCofThisEvent(const G4HCofThisEvent& rhs)
|
||||
{
|
||||
if ( !anHCoTHAllocator_G4MT_TLS_ ) anHCoTHAllocator_G4MT_TLS_ = new G4Allocator<G4HCofThisEvent>;
|
||||
HC = new std::vector<G4VHitsCollection*>(rhs.HC->size());
|
||||
for ( unsigned int i = 0 ; i<rhs.HC->size() ; ++i)
|
||||
*(HC->at(i)) = *(rhs.HC->at(i));
|
||||
}
|
||||
|
||||
G4HCofThisEvent& G4HCofThisEvent::operator=(const G4HCofThisEvent& rhs)
|
||||
{
|
||||
if ( this == &rhs ) return *this;
|
||||
if ( !anHCoTHAllocator_G4MT_TLS_ ) anHCoTHAllocator_G4MT_TLS_ = new G4Allocator<G4HCofThisEvent>;
|
||||
for ( std::vector<G4VHitsCollection*>::const_iterator it = HC->begin() ;
|
||||
it != HC->end() ; ++it )
|
||||
{
|
||||
delete *it;
|
||||
}
|
||||
HC->resize(rhs.HC->size());
|
||||
for ( unsigned int i = 0 ; i<rhs.HC->size() ; ++i)
|
||||
*(HC->at(i)) = *(rhs.HC->at(i));
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile 66892 2013-01-17 10:57:59Z gunter $
|
||||
# $Id: GNUmakefile 79489 2014-03-05 15:22:41Z gcosmo $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for digits+hits library. Makoto Asai, 1/11/96.
|
||||
# --------------------------------------------------------------
|
||||
@@ -27,6 +27,7 @@ CPPFLAGS += \
|
||||
-I$(G4BASE)/digits_hits/detector/include \
|
||||
-I$(G4BASE)/digits_hits/digits/include \
|
||||
-I$(G4BASE)/intercoms/include \
|
||||
-I$(G4BASE)/graphics_reps/include
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SDParticleWithEnergyFilter.hh 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4SDParticleWithEnergyFilter.hh 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef G4SDParticleWithEnergyFilter_h
|
||||
@@ -69,6 +69,9 @@ class G4SDParticleWithEnergyFilter : public G4VSDFilter
|
||||
private:
|
||||
G4SDParticleFilter* fParticleFilter;
|
||||
G4SDKineticEnergyFilter* fKineticFilter;
|
||||
public:
|
||||
G4SDParticleWithEnergyFilter(const G4SDParticleWithEnergyFilter&);
|
||||
G4SDParticleWithEnergyFilter& operator=(const G4SDParticleWithEnergyFilter&);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: sources.cmake 66892 2013-01-17 10:57:59Z gunter $
|
||||
# $Id: sources.cmake 79489 2014-03-05 15:22:41Z gcosmo $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,7 @@ include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/graphics_reps/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PSCellCharge.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSCellCharge.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSCellCharge
|
||||
#include "G4PSCellCharge.hh"
|
||||
@@ -41,14 +41,14 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSCellCharge::G4PSCellCharge(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0)
|
||||
{
|
||||
SetUnit("e+");
|
||||
}
|
||||
|
||||
G4PSCellCharge::G4PSCellCharge(G4String name, const G4String& unit,
|
||||
G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0)
|
||||
{
|
||||
SetUnit(unit);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSCellFlux.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSCellFlux.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// G4PSCellFlux
|
||||
@@ -54,7 +54,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSCellFlux::G4PSCellFlux(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),weighted(true)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0),weighted(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
SetUnit("percm2");
|
||||
@@ -62,7 +62,7 @@ G4PSCellFlux::G4PSCellFlux(G4String name, G4int depth)
|
||||
}
|
||||
|
||||
G4PSCellFlux::G4PSCellFlux(G4String name, const G4String& unit, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),weighted(true)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0),weighted(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
SetUnit(unit);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSCylinderSurfaceCurrent.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSCylinderSurfaceCurrent.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSCylinderSurfaceCurrent
|
||||
#include "G4PSCylinderSurfaceCurrent.hh"
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
G4PSCylinderSurfaceCurrent::G4PSCylinderSurfaceCurrent(G4String name,
|
||||
G4int direction, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),EvtMap(0),
|
||||
weighted(true),divideByArea(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
@@ -67,7 +67,7 @@ G4PSCylinderSurfaceCurrent::G4PSCylinderSurfaceCurrent(G4String name,
|
||||
G4int direction,
|
||||
const G4String& unit,
|
||||
G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),EvtMap(0),
|
||||
weighted(true),divideByArea(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
@@ -98,7 +98,7 @@ G4bool G4PSCylinderSurfaceCurrent::ProcessHits(G4Step* aStep,G4TouchableHistory*
|
||||
G4Tubs* tubsSolid = (G4Tubs*)(solid);
|
||||
|
||||
G4int dirFlag =IsSelectedSurface(aStep,tubsSolid);
|
||||
G4cout << " pos " << preStep->GetPosition() <<" dirFlag " << G4endl;
|
||||
// G4cout << " pos " << preStep->GetPosition() <<" dirFlag " << G4endl;
|
||||
if ( dirFlag > 0 ) {
|
||||
if ( fDirection == fCurrent_InOut || fDirection == dirFlag ){
|
||||
G4TouchableHandle theTouchable = preStep->GetTouchableHandle();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSCylinderSurfaceFlux.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSCylinderSurfaceFlux.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// // G4PSCylinderSurfaceFlux
|
||||
#include "G4PSCylinderSurfaceFlux.hh"
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
G4PSCylinderSurfaceFlux::G4PSCylinderSurfaceFlux(G4String name,
|
||||
G4int direction, G4int depth)
|
||||
: G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
|
||||
: G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),EvtMap(0),
|
||||
weighted(true),divideByArea(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
@@ -68,7 +68,7 @@ G4PSCylinderSurfaceFlux::G4PSCylinderSurfaceFlux(G4String name,
|
||||
G4int direction,
|
||||
const G4String& unit,
|
||||
G4int depth)
|
||||
: G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
|
||||
: G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),EvtMap(0),
|
||||
weighted(true),divideByArea(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSDoseDeposit.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSDoseDeposit.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// G4PSDoseDeposit
|
||||
@@ -45,14 +45,14 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSDoseDeposit::G4PSDoseDeposit(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0)
|
||||
{
|
||||
SetUnit("Gy");
|
||||
}
|
||||
|
||||
G4PSDoseDeposit::G4PSDoseDeposit(G4String name, const G4String& unit,
|
||||
G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0)
|
||||
{
|
||||
SetUnit(unit);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSEnergyDeposit.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSEnergyDeposit.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSEnergyDeposit
|
||||
#include "G4PSEnergyDeposit.hh"
|
||||
@@ -39,14 +39,14 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSEnergyDeposit::G4PSEnergyDeposit(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0)
|
||||
{
|
||||
SetUnit("MeV");
|
||||
}
|
||||
|
||||
G4PSEnergyDeposit::G4PSEnergyDeposit(G4String name, const G4String& unit,
|
||||
G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0)
|
||||
{
|
||||
SetUnit(unit);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSFlatSurfaceCurrent.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSFlatSurfaceCurrent.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSFlatSurfaceCurrent
|
||||
#include "G4PSFlatSurfaceCurrent.hh"
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
G4PSFlatSurfaceCurrent::G4PSFlatSurfaceCurrent(G4String name,
|
||||
G4int direction, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),EvtMap(0),
|
||||
weighted(true),divideByArea(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
@@ -69,7 +69,7 @@ G4PSFlatSurfaceCurrent::G4PSFlatSurfaceCurrent(G4String name,
|
||||
G4int direction,
|
||||
const G4String& unit,
|
||||
G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),EvtMap(0),
|
||||
weighted(true),divideByArea(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSFlatSurfaceFlux.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSFlatSurfaceFlux.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSFlatSurfaceFlux
|
||||
#include "G4PSFlatSurfaceFlux.hh"
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
G4PSFlatSurfaceFlux::G4PSFlatSurfaceFlux(G4String name,
|
||||
G4int direction, G4int depth)
|
||||
: G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
|
||||
: G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),EvtMap(0),
|
||||
weighted(true),divideByArea(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
@@ -70,7 +70,7 @@ G4PSFlatSurfaceFlux::G4PSFlatSurfaceFlux(G4String name,
|
||||
G4int direction,
|
||||
const G4String& unit,
|
||||
G4int depth)
|
||||
: G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
|
||||
: G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),EvtMap(0),
|
||||
weighted(true),divideByArea(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSMinKinEAtGeneration.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSMinKinEAtGeneration.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSMinKinEAtGeneration
|
||||
#include "G4PSMinKinEAtGeneration.hh"
|
||||
@@ -40,7 +40,7 @@
|
||||
//
|
||||
|
||||
G4PSMinKinEAtGeneration::G4PSMinKinEAtGeneration(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0)
|
||||
{
|
||||
SetUnit("MeV");
|
||||
}
|
||||
@@ -48,7 +48,7 @@ G4PSMinKinEAtGeneration::G4PSMinKinEAtGeneration(G4String name, G4int depth)
|
||||
G4PSMinKinEAtGeneration::G4PSMinKinEAtGeneration(G4String name,
|
||||
const G4String& unit,
|
||||
G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0)
|
||||
{
|
||||
SetUnit(unit);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSNofCollision.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSNofCollision.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSNofCollision
|
||||
#include "G4PSNofCollision.hh"
|
||||
@@ -40,7 +40,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSNofCollision::G4PSNofCollision(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0),weighted(false)
|
||||
{
|
||||
SetUnit("");
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSNofSecondary.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSNofSecondary.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSNofSecondary
|
||||
#include "G4PSNofSecondary.hh"
|
||||
@@ -38,7 +38,7 @@
|
||||
//
|
||||
|
||||
G4PSNofSecondary::G4PSNofSecondary(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),particleDef(0),
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0),particleDef(0),
|
||||
weighted(true)
|
||||
{;}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSNofStep.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSNofStep.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSNofStep
|
||||
#include "G4PSNofStep.hh"
|
||||
@@ -39,7 +39,7 @@
|
||||
//
|
||||
|
||||
G4PSNofStep::G4PSNofStep(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),boundaryFlag(false)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0),boundaryFlag(false)
|
||||
{
|
||||
SetUnit("");
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSPassageCellCurrent.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSPassageCellCurrent.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSPassageCellCurrent
|
||||
#include "G4PSPassageCellCurrent.hh"
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
G4PSPassageCellCurrent::G4PSPassageCellCurrent(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fCurrent(0),
|
||||
weighted(true)
|
||||
EvtMap(0),weighted(true)
|
||||
{
|
||||
SetUnit("");
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSPassageCellFlux.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSPassageCellFlux.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// G4PSPassageCellFlux
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
G4PSPassageCellFlux::G4PSPassageCellFlux(G4String name, G4int depth)
|
||||
: G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fCellFlux(0),
|
||||
weighted(true)
|
||||
EvtMap(0),weighted(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
SetUnit("percm2");
|
||||
@@ -64,7 +64,7 @@ G4PSPassageCellFlux::G4PSPassageCellFlux(G4String name, G4int depth)
|
||||
G4PSPassageCellFlux::G4PSPassageCellFlux(G4String name, const G4String& unit,
|
||||
G4int depth)
|
||||
: G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fCellFlux(0),
|
||||
weighted(true)
|
||||
EvtMap(0),weighted(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
SetUnit(unit);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSPassageTrackLength.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSPassageTrackLength.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSPassageTrackLength
|
||||
#include "G4PSPassageTrackLength.hh"
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
G4PSPassageTrackLength::G4PSPassageTrackLength(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fTrackLength(0.),
|
||||
weighted(false)
|
||||
EvtMap(0),weighted(false)
|
||||
{
|
||||
SetUnit("mm");
|
||||
}
|
||||
@@ -54,7 +54,7 @@ G4PSPassageTrackLength::G4PSPassageTrackLength(G4String name,
|
||||
const G4String& unit,
|
||||
G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fTrackLength(0.),
|
||||
weighted(false)
|
||||
EvtMap(0),weighted(false)
|
||||
{
|
||||
SetUnit(unit);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSPopulation.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSPopulation.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSPopulation
|
||||
#include "G4PSPopulation.hh"
|
||||
@@ -40,7 +40,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSPopulation::G4PSPopulation(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0),weighted(false)
|
||||
{
|
||||
SetUnit("");
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSSphereSurfaceCurrent.cc 76272 2013-11-08 11:53:00Z gcosmo $
|
||||
// $Id: G4PSSphereSurfaceCurrent.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSSphereSurfaceCurrent
|
||||
#include "G4PSSphereSurfaceCurrent.hh"
|
||||
@@ -56,7 +56,7 @@
|
||||
G4PSSphereSurfaceCurrent::G4PSSphereSurfaceCurrent(G4String name,
|
||||
G4int direction, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
|
||||
weighted(true),divideByArea(true)
|
||||
EvtMap(0),weighted(true),divideByArea(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
SetUnit("percm2");
|
||||
@@ -67,7 +67,7 @@ G4PSSphereSurfaceCurrent::G4PSSphereSurfaceCurrent(G4String name,
|
||||
const G4String& unit,
|
||||
G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
|
||||
weighted(true),divideByArea(true)
|
||||
EvtMap(0),weighted(true),divideByArea(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
SetUnit(unit);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSSphereSurfaceFlux.cc 76272 2013-11-08 11:53:00Z gcosmo $
|
||||
// $Id: G4PSSphereSurfaceFlux.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSSphereSurfaceFlux
|
||||
#include "G4PSSphereSurfaceFlux.hh"
|
||||
@@ -54,23 +54,24 @@
|
||||
// 2010-07-22 Add weighted and divideByAre options
|
||||
// 2011-02-21 Get correct momentum direction in Flux_Out.
|
||||
// 2011-09-09 Modify comment in PrintAll().
|
||||
// 2014-03-03 T.Aso, To use always positive value for anglefactor.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSSphereSurfaceFlux::G4PSSphereSurfaceFlux(G4String name,
|
||||
G4int direction, G4int depth)
|
||||
G4int direction, G4int depth)
|
||||
: G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
|
||||
weighted(true),divideByArea(true)
|
||||
EvtMap(0),weighted(true),divideByArea(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
SetUnit("percm2");
|
||||
}
|
||||
|
||||
G4PSSphereSurfaceFlux::G4PSSphereSurfaceFlux(G4String name,
|
||||
G4int direction,
|
||||
const G4String& unit,
|
||||
G4int depth)
|
||||
G4int direction,
|
||||
const G4String& unit,
|
||||
G4int depth)
|
||||
: G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
|
||||
weighted(true),divideByArea(true)
|
||||
EvtMap(0),weighted(true),divideByArea(true)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
SetUnit(unit);
|
||||
@@ -106,30 +107,31 @@ G4bool G4PSSphereSurfaceFlux::ProcessHits(G4Step* aStep,G4TouchableHistory*)
|
||||
|
||||
G4StepPoint* thisStep=0;
|
||||
if ( dirFlag == fFlux_In ){
|
||||
thisStep = preStep;
|
||||
thisStep = preStep;
|
||||
}else if ( dirFlag == fFlux_Out ){
|
||||
thisStep = aStep->GetPostStepPoint();
|
||||
thisStep = aStep->GetPostStepPoint();
|
||||
}else{
|
||||
return FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
G4TouchableHandle theTouchable = thisStep->GetTouchableHandle();
|
||||
G4ThreeVector pdirection = thisStep->GetMomentumDirection();
|
||||
G4ThreeVector localdir =
|
||||
theTouchable->GetHistory()->GetTopTransform().TransformAxis(pdirection);
|
||||
theTouchable->GetHistory()->GetTopTransform().TransformAxis(pdirection);
|
||||
G4double localdirL2 = localdir.x()*localdir.x()
|
||||
+localdir.y()*localdir.y()
|
||||
+localdir.z()*localdir.z();
|
||||
+localdir.y()*localdir.y()
|
||||
+localdir.z()*localdir.z();
|
||||
G4ThreeVector stppos1= aStep->GetPreStepPoint()->GetPosition();
|
||||
G4ThreeVector localpos1 =
|
||||
theTouchable->GetHistory()->GetTopTransform().TransformPoint(stppos1);
|
||||
theTouchable->GetHistory()->GetTopTransform().TransformPoint(stppos1);
|
||||
G4double localR2 = localpos1.x()*localpos1.x()
|
||||
+localpos1.y()*localpos1.y()
|
||||
+localpos1.z()*localpos1.z();
|
||||
+localpos1.y()*localpos1.y()
|
||||
+localpos1.z()*localpos1.z();
|
||||
G4double anglefactor = (localdir.x()*localpos1.x()
|
||||
+localdir.y()*localpos1.y()
|
||||
+localdir.z()*localpos1.z())
|
||||
/std::sqrt(localdirL2)/std::sqrt(localR2);
|
||||
+localdir.y()*localpos1.y()
|
||||
+localdir.z()*localpos1.z())
|
||||
/std::sqrt(localdirL2)/std::sqrt(localR2);
|
||||
if ( anglefactor < 0.0 ) anglefactor *= -1.0;
|
||||
|
||||
G4double radi = sphereSolid->GetInnerRadius();
|
||||
G4double dph = sphereSolid->GetDeltaPhiAngle()/radian;
|
||||
@@ -170,7 +172,7 @@ G4int G4PSSphereSurfaceFlux::IsSelectedSurface(G4Step* aStep, G4Sphere* sphereSo
|
||||
//if(std::fabs( localR2 - InsideRadius2 ) < kCarTolerance ){
|
||||
G4double InsideRadius = sphereSolid->GetInnerRadius();
|
||||
if ( localR2 > (InsideRadius-kCarTolerance)*(InsideRadius-kCarTolerance)
|
||||
&&localR2 < (InsideRadius+kCarTolerance)*(InsideRadius+kCarTolerance)){
|
||||
&&localR2 < (InsideRadius+kCarTolerance)*(InsideRadius+kCarTolerance)){
|
||||
return fFlux_In;
|
||||
}
|
||||
}
|
||||
@@ -188,7 +190,7 @@ G4int G4PSSphereSurfaceFlux::IsSelectedSurface(G4Step* aStep, G4Sphere* sphereSo
|
||||
//if(std::facb(localR2 - InsideRadius2) ) < kCarTolerance ){
|
||||
G4double InsideRadius = sphereSolid->GetInnerRadius();
|
||||
if ( localR2 > (InsideRadius-kCarTolerance)*(InsideRadius-kCarTolerance)
|
||||
&&localR2 < (InsideRadius+kCarTolerance)*(InsideRadius+kCarTolerance)){
|
||||
&&localR2 < (InsideRadius+kCarTolerance)*(InsideRadius+kCarTolerance)){
|
||||
return fFlux_Out;
|
||||
}
|
||||
}
|
||||
@@ -221,24 +223,24 @@ void G4PSSphereSurfaceFlux::PrintAll()
|
||||
std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
|
||||
for(; itr != EvtMap->GetMap()->end(); itr++) {
|
||||
G4cout << " copy no.: " << itr->first
|
||||
<< " Flux : " << *(itr->second)/GetUnitValue()
|
||||
<< " ["<<GetUnit()<<"]"
|
||||
<< G4endl;
|
||||
<< " Flux : " << *(itr->second)/GetUnitValue()
|
||||
<< " ["<<GetUnit()<<"]"
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
void G4PSSphereSurfaceFlux::SetUnit(const G4String& unit)
|
||||
{
|
||||
if ( divideByArea ) {
|
||||
CheckAndSetUnit(unit,"Per Unit Surface");
|
||||
CheckAndSetUnit(unit,"Per Unit Surface");
|
||||
} else {
|
||||
if (unit == "" ){
|
||||
unitName = unit;
|
||||
unitValue = 1.0;
|
||||
}else{
|
||||
G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] ) for " + GetName();
|
||||
G4Exception("G4PSSphereSurfaceFlux::SetUnit","DetPS0016",JustWarning,msg);
|
||||
}
|
||||
if (unit == "" ){
|
||||
unitName = unit;
|
||||
unitValue = 1.0;
|
||||
}else{
|
||||
G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] ) for " + GetName();
|
||||
G4Exception("G4PSSphereSurfaceFlux::SetUnit","DetPS0016",JustWarning,msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSTermination.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSTermination.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSTermination
|
||||
#include "G4PSTermination.hh"
|
||||
@@ -41,7 +41,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSTermination::G4PSTermination(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0),weighted(false)
|
||||
{
|
||||
SetUnit("");
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSTrackCounter.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSTrackCounter.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSTrackCounter
|
||||
#include "G4PSTrackCounter.hh"
|
||||
@@ -40,7 +40,8 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSTrackCounter::G4PSTrackCounter(G4String name, G4int direction, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),weighted(false)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
|
||||
EvtMap(0),weighted(false)
|
||||
{
|
||||
SetUnit("");
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSTrackLength.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4PSTrackLength.cc 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
// G4PSTrackLength
|
||||
#include "G4PSTrackLength.hh"
|
||||
@@ -42,8 +42,8 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4PSTrackLength::G4PSTrackLength(G4String name, G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false),multiplyKinE(false),
|
||||
divideByVelocity(false)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0),weighted(false),
|
||||
multiplyKinE(false),divideByVelocity(false)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
SetUnit("mm");
|
||||
@@ -51,8 +51,8 @@ G4PSTrackLength::G4PSTrackLength(G4String name, G4int depth)
|
||||
|
||||
G4PSTrackLength::G4PSTrackLength(G4String name, const G4String& unit,
|
||||
G4int depth)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false),multiplyKinE(false),
|
||||
divideByVelocity(false)
|
||||
:G4VPrimitiveScorer(name,depth),HCID(-1),EvtMap(0),weighted(false),
|
||||
multiplyKinE(false),divideByVelocity(false)
|
||||
{
|
||||
DefineUnitAndCategory();
|
||||
SetUnit(unit);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SDParticleWithEnergyFilter.cc 67992 2013-03-13 10:59:57Z gcosmo $
|
||||
// $Id: G4SDParticleWithEnergyFilter.cc 81108 2014-05-21 08:10:15Z gcosmo $
|
||||
//
|
||||
// G4VSensitiveDetector
|
||||
#include "G4SDParticleWithEnergyFilter.hh"
|
||||
@@ -80,3 +80,23 @@ void G4SDParticleWithEnergyFilter::show(){
|
||||
fParticleFilter->show();
|
||||
fKineticFilter->show();
|
||||
}
|
||||
|
||||
G4SDParticleWithEnergyFilter::G4SDParticleWithEnergyFilter(const G4SDParticleWithEnergyFilter& rhs)
|
||||
: G4VSDFilter(rhs.filterName)
|
||||
{
|
||||
fParticleFilter = new G4SDParticleFilter(*rhs.fParticleFilter);
|
||||
fKineticFilter = new G4SDKineticEnergyFilter(*rhs.fKineticFilter);
|
||||
}
|
||||
|
||||
|
||||
G4SDParticleWithEnergyFilter& G4SDParticleWithEnergyFilter::operator=(const G4SDParticleWithEnergyFilter& rhs)
|
||||
{
|
||||
if ( this == &rhs ) return *this;
|
||||
G4VSDFilter::operator=(rhs);
|
||||
delete fParticleFilter;
|
||||
fParticleFilter = new G4SDParticleFilter(*(rhs.fParticleFilter));
|
||||
delete fKineticFilter;
|
||||
fKineticFilter = new G4SDKineticEnergyFilter(*(rhs.fKineticFilter));
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringBox.hh 68735 2013-04-05 09:49:13Z gcosmo $
|
||||
// $Id: G4ScoringBox.hh 83518 2014-08-27 12:57:10Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef G4ScoringBox_h
|
||||
@@ -46,9 +46,11 @@ public:
|
||||
G4ScoringBox(G4String wName);
|
||||
~G4ScoringBox();
|
||||
|
||||
public:
|
||||
virtual void Construct(G4VPhysicalVolume* fWorldPhys);
|
||||
protected:
|
||||
// construct this mesh
|
||||
virtual void SetupGeometry(G4VPhysicalVolume * fWorldPhys);
|
||||
|
||||
public:
|
||||
void List() const;
|
||||
void Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg=111);
|
||||
void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap,
|
||||
@@ -58,8 +60,6 @@ public:
|
||||
void SetSegmentDirection(G4int dir) {fSegmentDirection = dir;}
|
||||
|
||||
private:
|
||||
// construct this mesh
|
||||
void SetupGeometry(G4VPhysicalVolume * fWorldPhys);
|
||||
// get replicated position from 3D index (x,y,z)
|
||||
G4ThreeVector GetReplicaPosition(G4int x, G4int y, G4int z);
|
||||
// get 3D index (x,y,z) from sequential index
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringCylinder.hh 68735 2013-04-05 09:49:13Z gcosmo $
|
||||
// $Id: G4ScoringCylinder.hh 83518 2014-08-27 12:57:10Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef G4ScoringCylinder_h
|
||||
@@ -44,9 +44,10 @@ class G4ScoringCylinder : public G4VScoringMesh
|
||||
G4ScoringCylinder(G4String wName);
|
||||
~G4ScoringCylinder();
|
||||
|
||||
public:
|
||||
virtual void Construct(G4VPhysicalVolume* fWorldPhys);
|
||||
protected:
|
||||
virtual void SetupGeometry(G4VPhysicalVolume * fWorldPhys);
|
||||
|
||||
public:
|
||||
virtual void List() const;
|
||||
virtual void Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg=111);
|
||||
virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap,
|
||||
@@ -66,8 +67,6 @@ public:
|
||||
//enum IDX {IR, IZ, IPHI};
|
||||
enum IDX {IZ, IPHI, IR};
|
||||
|
||||
private:
|
||||
void SetupGeometry(G4VPhysicalVolume * fWorldPhys);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringManager.hh 68735 2013-04-05 09:49:13Z gcosmo $
|
||||
// $Id: G4ScoringManager.hh 81087 2014-05-20 15:44:27Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef G4ScoringManager_h
|
||||
@@ -150,6 +150,10 @@ class G4ScoringManager
|
||||
if(writer) writer->SetVerboseLevel(verboseLevel);
|
||||
}
|
||||
// Replace score writers.
|
||||
private:
|
||||
//Disable copy constructor and assignement operator
|
||||
G4ScoringManager(const G4ScoringManager&);
|
||||
G4ScoringManager& operator=(const G4ScoringManager&);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VScoringMesh.hh 68735 2013-04-05 09:49:13Z gcosmo $
|
||||
// $Id: G4VScoringMesh.hh 83518 2014-08-27 12:57:10Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef G4VScoringMesh_h
|
||||
@@ -40,10 +40,11 @@ class G4MultiFunctionalDetector;
|
||||
class G4VPrimitiveScorer;
|
||||
class G4VSDFilter;
|
||||
class G4VScoreColorMap;
|
||||
class G4ParallelWorldProcess;
|
||||
|
||||
#include <map>
|
||||
|
||||
enum MeshShape { boxMesh, cylinderMesh, sphereMesh };
|
||||
enum MeshShape { boxMesh, cylinderMesh, sphereMesh , undefinedMesh = -1};
|
||||
typedef std::map<G4String,G4THitsMap<G4double>* > MeshScoreMap;
|
||||
// class description:
|
||||
//
|
||||
@@ -58,10 +59,14 @@ class G4VScoringMesh
|
||||
|
||||
public: // with description
|
||||
// a pure virtual function to construct this mesh geometry
|
||||
virtual void Construct(G4VPhysicalVolume* fWorldPhys)=0;
|
||||
void Construct(G4VPhysicalVolume* fWorldPhys);
|
||||
|
||||
virtual void WorkerConstruct(G4VPhysicalVolume* fWorldPhys);
|
||||
void WorkerConstruct(G4VPhysicalVolume* fWorldPhys);
|
||||
|
||||
protected:
|
||||
virtual void SetupGeometry(G4VPhysicalVolume * fWorldPhys) = 0;
|
||||
|
||||
public: // with description
|
||||
// list infomration of this mesh
|
||||
virtual void List() const;
|
||||
|
||||
@@ -196,6 +201,20 @@ public:
|
||||
{ fMeshElementLogical = val; }
|
||||
inline G4LogicalVolume* GetMeshElementLogical() const
|
||||
{ return fMeshElementLogical; }
|
||||
|
||||
protected:
|
||||
G4ParallelWorldProcess* fParallelWorldProcess;
|
||||
G4bool fGeometryHasBeenDestroyed;
|
||||
public:
|
||||
inline void SetParallelWorldProcess(G4ParallelWorldProcess* proc)
|
||||
{ fParallelWorldProcess = proc; }
|
||||
inline G4ParallelWorldProcess* GetParallelWorldProcess() const
|
||||
{ return fParallelWorldProcess; }
|
||||
inline void GeometryHasBeenDestroyed()
|
||||
{
|
||||
fGeometryHasBeenDestroyed = true;
|
||||
fMeshElementLogical = 0;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringBox.cc 74457 2013-10-07 15:21:35Z gcosmo $
|
||||
// $Id: G4ScoringBox.cc 83518 2014-08-27 12:57:10Z gcosmo $
|
||||
//
|
||||
|
||||
#include "G4ScoringBox.hh"
|
||||
@@ -62,21 +62,6 @@ G4ScoringBox::~G4ScoringBox()
|
||||
{
|
||||
}
|
||||
|
||||
void G4ScoringBox::Construct(G4VPhysicalVolume* fWorldPhys)
|
||||
{
|
||||
if(fConstructed) {
|
||||
|
||||
if(verboseLevel > 0)
|
||||
G4cout << fWorldPhys->GetName() << " --- All quantities are reset."
|
||||
<< G4endl;
|
||||
ResetScore();
|
||||
|
||||
} else {
|
||||
fConstructed = true;
|
||||
SetupGeometry(fWorldPhys);
|
||||
}
|
||||
}
|
||||
|
||||
void G4ScoringBox::SetupGeometry(G4VPhysicalVolume * fWorldPhys) {
|
||||
|
||||
if(verboseLevel > 9) G4cout << "G4ScoringBox::SetupGeometry() ..." << G4endl;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringCylinder.cc 68735 2013-04-05 09:49:13Z gcosmo $
|
||||
// $Id: G4ScoringCylinder.cc 83518 2014-08-27 12:57:10Z gcosmo $
|
||||
//
|
||||
|
||||
#include "G4ScoringCylinder.hh"
|
||||
@@ -65,20 +65,6 @@ G4ScoringCylinder::G4ScoringCylinder(G4String wName)
|
||||
G4ScoringCylinder::~G4ScoringCylinder()
|
||||
{;}
|
||||
|
||||
void G4ScoringCylinder::Construct(G4VPhysicalVolume* fWorldPhys)
|
||||
{
|
||||
if(fConstructed) {
|
||||
|
||||
if(verboseLevel > 0)
|
||||
G4cout << fWorldPhys->GetName() << " --- All quantities are reset." << G4endl;
|
||||
ResetScore();
|
||||
|
||||
} else {
|
||||
fConstructed = true;
|
||||
SetupGeometry(fWorldPhys);
|
||||
}
|
||||
}
|
||||
|
||||
void G4ScoringCylinder::SetupGeometry(G4VPhysicalVolume * fWorldPhys) {
|
||||
|
||||
if(verboseLevel > 9) G4cout << "G4ScoringCylinder::SetupGeometry() ..." << G4endl;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringMessenger.cc 78057 2013-12-03 08:31:15Z gcosmo $
|
||||
// $Id: G4ScoringMessenger.cc 81308 2014-05-26 14:28:07Z gcosmo $
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
@@ -195,6 +195,7 @@ G4ScoringMessenger::G4ScoringMessenger(G4ScoringManager* SManager)
|
||||
param = new G4UIparameter("proj",'i',true);
|
||||
param->SetDefaultValue(111);
|
||||
drawCmd->SetParameter(param);
|
||||
drawCmd->SetToBeBroadcasted(false);
|
||||
|
||||
// Draw column
|
||||
drawColumnCmd = new G4UIcommand("/score/drawColumn",this);
|
||||
@@ -213,17 +214,20 @@ G4ScoringMessenger::G4ScoringMessenger(G4ScoringManager* SManager)
|
||||
param = new G4UIparameter("colorMapName",'s',true);
|
||||
param->SetDefaultValue("defaultLinearColorMap");
|
||||
drawColumnCmd->SetParameter(param);
|
||||
drawColumnCmd->SetToBeBroadcasted(false);
|
||||
|
||||
colorMapDir = new G4UIdirectory("/score/colorMap/");
|
||||
colorMapDir->SetGuidance("Color map commands.");
|
||||
|
||||
listColorMapCmd = new G4UIcmdWithoutParameter("/score/colorMap/listScoreColorMaps",this);
|
||||
listColorMapCmd->SetGuidance("List registered score color maps.");
|
||||
listColorMapCmd->SetToBeBroadcasted(false);
|
||||
|
||||
floatMinMaxCmd = new G4UIcmdWithAString("/score/colorMap/floatMinMax",this);
|
||||
floatMinMaxCmd->SetGuidance("Min/Max of the color map is calculated accorging to the actual scores.");
|
||||
floatMinMaxCmd->SetParameterName("colorMapName",true,false);
|
||||
floatMinMaxCmd->SetDefaultValue("defaultLinearColorMap");
|
||||
floatMinMaxCmd->SetToBeBroadcasted(false);
|
||||
|
||||
colorMapMinMaxCmd = new G4UIcommand("/score/colorMap/setMinMax",this);
|
||||
colorMapMinMaxCmd->SetGuidance("Define min/max value of the color map.");
|
||||
@@ -234,6 +238,7 @@ G4ScoringMessenger::G4ScoringMessenger(G4ScoringManager* SManager)
|
||||
colorMapMinMaxCmd->SetParameter(param);
|
||||
param = new G4UIparameter("maxValue",'d',false);
|
||||
colorMapMinMaxCmd->SetParameter(param);
|
||||
colorMapMinMaxCmd->SetToBeBroadcasted(false);
|
||||
|
||||
/*
|
||||
chartCmd = new G4UIcommand("/score/drawChart",this);
|
||||
@@ -266,6 +271,7 @@ G4ScoringMessenger::G4ScoringMessenger(G4ScoringManager* SManager)
|
||||
dumpQtyToFileCmd->SetParameter(param);
|
||||
param = new G4UIparameter("option", 's', true);
|
||||
dumpQtyToFileCmd->SetParameter(param);
|
||||
dumpQtyToFileCmd->SetToBeBroadcasted(false);
|
||||
|
||||
// Dump all scored quantities
|
||||
dumpAllQtsToFileCmd = new G4UIcommand("/score/dumpAllQuantitiesToFile", this);
|
||||
@@ -276,6 +282,7 @@ G4ScoringMessenger::G4ScoringMessenger(G4ScoringManager* SManager)
|
||||
dumpAllQtsToFileCmd->SetParameter(param);
|
||||
param = new G4UIparameter("option", 's', true);
|
||||
dumpAllQtsToFileCmd->SetParameter(param);
|
||||
dumpAllQtsToFileCmd->SetToBeBroadcasted(false);
|
||||
|
||||
}
|
||||
|
||||
@@ -389,7 +396,7 @@ void G4ScoringMessenger::SetNewValue(G4UIcommand * command,G4String newVal)
|
||||
} else if(command==meshCylinderCreateCmd) {
|
||||
G4VScoringMesh* currentmesh = fSMan->GetCurrentMesh();
|
||||
if ( currentmesh ){
|
||||
G4cerr << "ERROR[" << meshBoxCreateCmd->GetCommandPath()
|
||||
G4cerr << "ERROR[" << meshCylinderCreateCmd->GetCommandPath()
|
||||
<< "] : Mesh <" << currentmesh->GetWorldName()
|
||||
<< "> is still open. Close it first. Command ignored." << G4endl;
|
||||
} else {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VScoringMesh.cc 68735 2013-04-05 09:49:13Z gcosmo $
|
||||
// $Id: G4VScoringMesh.cc 83518 2014-08-27 12:57:10Z gcosmo $
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
// Modifications
|
||||
@@ -44,10 +44,11 @@
|
||||
#include "G4SDManager.hh"
|
||||
|
||||
G4VScoringMesh::G4VScoringMesh(const G4String& wName)
|
||||
: fWorldName(wName),fCurrentPS(0),fConstructed(false),fActive(true),
|
||||
: fWorldName(wName),fCurrentPS(0),fConstructed(false),fActive(true),fShape(undefinedMesh),
|
||||
fRotationMatrix(0), fMFD(new G4MultiFunctionalDetector(wName)),
|
||||
verboseLevel(0),sizeIsSet(false),nMeshIsSet(false),
|
||||
fDrawUnit(""), fDrawUnitValue(1.), fMeshElementLogical(0)
|
||||
fDrawUnit(""), fDrawUnitValue(1.), fMeshElementLogical(0),
|
||||
fParallelWorldProcess(0), fGeometryHasBeenDestroyed(false)
|
||||
{
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(fMFD);
|
||||
|
||||
@@ -332,9 +333,31 @@ void G4VScoringMesh::Accumulate(G4THitsMap<G4double> * map)
|
||||
}
|
||||
}
|
||||
|
||||
void G4VScoringMesh::Construct(G4VPhysicalVolume* fWorldPhys)
|
||||
{
|
||||
if(fConstructed) {
|
||||
if(fGeometryHasBeenDestroyed) {
|
||||
SetupGeometry(fWorldPhys);
|
||||
fGeometryHasBeenDestroyed = false;
|
||||
}
|
||||
if(verboseLevel > 0)
|
||||
G4cout << fWorldPhys->GetName() << " --- All quantities are reset."
|
||||
<< G4endl;
|
||||
ResetScore();
|
||||
}
|
||||
else {
|
||||
fConstructed = true;
|
||||
SetupGeometry(fWorldPhys);
|
||||
}
|
||||
}
|
||||
|
||||
void G4VScoringMesh::WorkerConstruct(G4VPhysicalVolume* fWorldPhys)
|
||||
{
|
||||
if(fConstructed) {
|
||||
if(fGeometryHasBeenDestroyed) {
|
||||
fMeshElementLogical->SetSensitiveDetector(fMFD);
|
||||
fGeometryHasBeenDestroyed = false;
|
||||
}
|
||||
|
||||
if(verboseLevel > 0)
|
||||
G4cout << fWorldPhys->GetName() << " --- All quantities are reset." << G4endl;
|
||||
|
||||
Reference in New Issue
Block a user