Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
#
# Generated on : 24/9/2010
#
# $Id: CMakeLists.txt,v 1.1 2010-09-29 18:40:38 bmorgan Exp $
# $Id: CMakeLists.txt 66356 2012-12-18 09:02:32Z gcosmo $
#
#------------------------------------------------------------------------------
+1 -1
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.6 2010-10-27 07:34:32 gcosmo Exp $
# $Id: GNUmakefile 66356 2012-12-18 09:02:32Z gcosmo $
# --------------------------------------------------------------------
# GNUmakefile for geometry/biasing library. Gabriele Cosmo, 25/03/02.
# --------------------------------------------------------------------
+44 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.47 2010-09-06 09:13:46 gcosmo Exp $
$Id: History 77780 2013-11-28 07:50:59Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,49 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
November 27th, 2013 A.Howard (geombias-V09-06-10)
- Added Clear() method to G4IStore and G4WeightWindowStore to allow changes to
the store within a run, if required.
November 27th, 2013 A.Howard (geombias-V09-06-09)
- Added SetWorldVolume and SetParallelWorldVolume methods to G4WeightWindowStore
November 27th, 2013 A.Howard (geombias-V09-06-08)
- Added SetWorldVolume and SetParallelWorldVolume methods to G4IStore
November 25th, 2013 A.Howard (geombias-V09-06-07)
- Removed unused data member: fParaFlag from G4IStore and G4WeigthWindowStore
November 22nd, 2013 A.Howard (geombias-V09-06-06)
- Retagging to be co-working with:
phys-ctor-limiters-V09-06-013,
procbiasing-V09-06-10
B01-V09-06-12
B02-V09-06-10
B03-V09-06-01
test33-V09-06-04
exbiasing-V09-06-03
November 22nd, 2013 A.Howard (geombias-V09-06-05)
- Added missing getinstance method from G4WeightWindowStore.cc
November 22nd, 2013 A.Howard (geombias-V09-06-04)
- Fixed typo in G4WeightWindowStore.cc
November 22nd, 2013 A.Howard (geombias-V09-06-03)
- Added missing method from G4WeightWindowStore.cc
November 22nd, 2013 A.Howard (geombias-V09-06-02)
- Migrated missing parts of G4WeightWindowStore to MT compliance
November 21st, 2013 A.Howard (geombias-V09-06-01)
- Changed design to migrate to multi-threading. G4IStore and G4WeightWindowStore
now a shared singleton.
December 3rd, 2012 M.Asai (geombias-V09-06-00)
- Removed obsolete classes G4VCellScorer and G4VCellScorerStore.
October 22nd, 2012 G.Cosmo (geombias-V09-05-03)
- Added static flag on deprecation warning...
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GeometryCell.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4GeometryCell
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GeometryCellComp.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4GeometryCellComp
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GeometryCellImportance.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4GeometryCellImportance
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GeometryCellStep.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4GeometryCellStep
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GeometryCellStepStream.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Declarations
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GeometryCellWeight.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4GeometryCellWeight
+51 -6
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4IStore.hh 77780 2013-11-28 07:50:59Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4IStore
@@ -42,20 +42,43 @@
// should be applied between this cell and it's nighbors.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
//
// Alex Howard (alexander.howard@cern.ch):
// Changed class to a `singleton', with access via the static method
// G4IStore::GetInstance().
//
// Member data:
//
// static G4IStore* fInstance
// - Ptr to the unique instance of class
// ----------------------------------------------------------------------
#ifndef G4IStore_hh
#define G4IStore_hh G4IStore_hh
#include "G4VIStore.hh"
#include "G4GeometryCellImportance.hh"
#include "G4TransportationManager.hh"
class G4IStore : public G4VIStore
{
public: // with description
public:
explicit G4IStore(const G4VPhysicalVolume &worldvolume);
// static G4ThreadLocal G4IStore* GetInstance();
static G4IStore* GetInstance();
// Return ptr to singleton instance of the class.
// static G4ThreadLocal G4IStore* GetInstance(G4String ParallelWorldName);
static G4IStore* GetInstance(G4String ParallelWorldName);
// Return ptr to singleton instance of the class.
protected:
explicit G4IStore();
// initialise the importance store for the given geometry
explicit G4IStore(G4String ParallelWorldName);
// initialise the importance store for the given geometry
public: // with description
virtual ~G4IStore();
// destruct
@@ -67,9 +90,25 @@ public: // with description
virtual G4bool IsKnown(const G4GeometryCell &gCell) const;
// returns true if the gCell is in the store, else false
void Clear();
virtual const G4VPhysicalVolume &GetWorldVolume() const;
// return a reference to the wolrd volume of the
void SetWorldVolume();
// set a reference to the world volume of the
// "importance" geometry
void SetParallelWorldVolume(G4String paraName);
// set a reference to the parallel world volume of the
// "importance" geometry
virtual const G4VPhysicalVolume& GetWorldVolume() const;
// return a reference to the world volume of the
// "importance" geometry
// virtual const G4VPhysicalVolume& GetParallelWorldVolume() const;
// // return a reference to the world volume of the
// // "importance" geometry
virtual const G4VPhysicalVolume* GetParallelWorldVolumePointer() const;
// return a pointer to the world volume of the
// "importance" geometry
void AddImportanceGeometryCell(G4double importance,
@@ -97,10 +136,16 @@ private:
private:
const G4VPhysicalVolume &fWorldVolume;
const G4VPhysicalVolume* fWorldVolume;
// const G4VPhysicalVolume* fParallelWorldVolume;
// G4bool fParaFlag;
G4GeometryCellImportance fGeometryCelli;
mutable G4GeometryCellImportance::const_iterator fCurrentIterator;
// static G4ThreadLocal G4IStore* fInstance;
static G4IStore* fInstance;
};
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4ImportanceAlgorithm.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4ImportanceAlgorithm
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4Nsplit_Weight.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4Nsplit_Weight
@@ -1,73 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id$
//
// ----------------------------------------------------------------------
// Class G4VCellScorer
//
// Class description:
//
// This is an interface for an object which does scoring for one cell
// of a geometry.
// The cell may be a physical volume or replica in the mass or a
// parallel geometry.
//
// Three different situation of the step with respect to the cell
// are separated: entering end exiting the cell and stepping inside
// the cell.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4VCellScorer_hh
#define G4VCellScorer_hh G4VCellScorer_hh
class G4Step;
class G4GeometryCell;
class G4VCellScorer {
public: // with description
G4VCellScorer();
virtual ~G4VCellScorer();
virtual void ScoreAnExitingStep(const G4Step &aStep,
const G4GeometryCell &gCell) = 0;
// to update scores related with the exiting of a cell
virtual void ScoreAnEnteringStep(const G4Step &aStep,
const G4GeometryCell &gCell) = 0;
// to update scores related with the entering of a cell
virtual void ScoreAnInVolumeStep(const G4Step &aStep,
const G4GeometryCell &gCell) = 0;
// to update scores related with the stepping inside the cell
};
#endif
@@ -1,61 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id$
//
// ----------------------------------------------------------------------
// Class G4VCellScorerStore
//
// Class description:
//
// This class describes the interface for a store for
// G4VCellScorer objects. It is used by the class
// G4CellStoreScorer to score the G4CellScorer objects per cell.
//
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4VCellScorerStore_hh
#define G4VCellScorerStore_hh G4VCellScorerStore_hh
class G4VCellScorer;
class G4GeometryCell;
class G4VCellScorerStore {
public: // with description
G4VCellScorerStore();
virtual ~G4VCellScorerStore();
virtual G4VCellScorer *GetCellScore(const G4GeometryCell &gCell) = 0;
// returns a cell scorer related to the given cell
};
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4VGCellFinder.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4VGCellFinder
+1 -1
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4VIStore.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4VIStore
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4VImportanceAlgorithm.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4VImportanceAlgorithm
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4VImportanceSplitExaminer.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4VImportanceSplitExaminer
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4VWeightWindowAlgorithm.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4VWeightWindowAlgorithm
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4VWeightWindowStore.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4VWeightWindowStore
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4WeightWindowAlgorithm.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4WeightWindowAlgorithm
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4WeightWindowStore.hh 77780 2013-11-28 07:50:59Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4WeightWindowStore
@@ -36,6 +36,16 @@
// See G4VWeightWindowStore.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
//
// Alex Howard (alexander.howard@cern.ch):
// Changed class to a `singleton', with access via the static method
// G4WeightWindowStore::GetInstance().
//
// Member data:
//
// static G4WeightWindowStore* fInstance
// - Ptr to the unique instance of class
//
// ----------------------------------------------------------------------
#ifndef G4WeightWindowStore_hh
#define G4WeightWindowStore_hh G4WeightWindowStore_hh
@@ -50,24 +60,48 @@ class G4WeightWindowStore: public G4VWeightWindowStore
public: // with description
explicit G4WeightWindowStore(const G4VPhysicalVolume &worldvolume);
static G4WeightWindowStore* GetInstance();
// Return ptr to singleton instance of the class.
static G4WeightWindowStore* GetInstance(G4String ParallelWorldName);
// Return ptr to singleton instance of the class.
protected:
explicit G4WeightWindowStore();
// initialise the weight window store for the given geometry
explicit G4WeightWindowStore(G4String ParallelWorldName);
// initialise the weight window store for the given geometry
~G4WeightWindowStore();
public: // with description
virtual ~G4WeightWindowStore();
// destructor
G4double GetLowerWeight(const G4GeometryCell &gCell,
virtual G4double GetLowerWeight(const G4GeometryCell &gCell,
G4double partEnergy) const;
// derive a lower weight bound value of a "cell" addresed by a
// G4GeometryCell and the coresponding energy from the store.
G4bool IsKnown(const G4GeometryCell &gCell) const;
virtual G4bool IsKnown(const G4GeometryCell &gCell) const;
// returns true if the gCell is in the store, else false
void Clear();
const G4VPhysicalVolume &GetWorldVolume() const;
// return a reference to the wolrd volume of the
// geometry
void SetWorldVolume();
// set a pointer to the world volume of the
// weightwindow geometry
void SetParallelWorldVolume(G4String paraName);
// set a pointer to the parallel world volume of the
// weightwindow geometry
virtual const G4VPhysicalVolume &GetWorldVolume() const;
// return a reference to the world volume of the
// weightwindow geometry
virtual const G4VPhysicalVolume* GetParallelWorldVolumePointer() const;
// return a pointer to the parallel world volume of the
// weightwindow geometry
void AddLowerWeights(const G4GeometryCell &gCell,
const std::vector<G4double> &lowerWeights);
@@ -89,10 +123,14 @@ private:
private:
const G4VPhysicalVolume &fWorldVolume;
const G4VPhysicalVolume* fWorldVolume;
// G4bool fParaFlag;
std::set<G4double, std::less<G4double> > fGeneralUpperEnergyBounds;
G4GeometryCellWeight fCellToUpEnBoundLoWePairsMap;
mutable G4GeometryCellWeight::const_iterator fCurrentIterator;
static G4WeightWindowStore* fInstance;
};
+1 -5
View File
@@ -11,7 +11,7 @@
#
# Generated on : 24/9/2010
#
# $Id: sources.cmake,v 1.1 2010-09-29 18:40:46 bmorgan Exp $
# $Id: sources.cmake 66356 2012-12-18 09:02:32Z gcosmo $
#
#------------------------------------------------------------------------------
@@ -45,8 +45,6 @@ GEANT4_DEFINE_MODULE(NAME G4geombias
G4IStore.hh
G4ImportanceAlgorithm.hh
G4Nsplit_Weight.hh
G4VCellScorer.hh
G4VCellScorerStore.hh
G4VGCellFinder.hh
G4VIStore.hh
G4VImportanceAlgorithm.hh
@@ -64,8 +62,6 @@ GEANT4_DEFINE_MODULE(NAME G4geombias
G4IStore.cc
G4ImportanceAlgorithm.cc
G4Nsplit_Weight.cc
G4VCellScorer.cc
G4VCellScorerStore.cc
G4VGCellFinder.cc
G4VIStore.cc
G4VImportanceAlgorithm.cc
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GeometryCell.cc 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: G4GeometryCellComp.cc 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GeometryCellImportance.cc 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GeometryCellStep.cc 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GeometryCellStepStream.cc 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
+86 -7
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4IStore.cc 77780 2013-11-28 07:50:59Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -38,15 +38,60 @@
#include "G4GeometryCell.hh"
#include "G4GeometryCellStepStream.hh"
#include "G4LogicalVolume.hh"
#include "G4TransportationManager.hh"
G4IStore::G4IStore(const G4VPhysicalVolume &worldvolume) :
fWorldVolume(worldvolume)
// ***************************************************************************
// Static class variable: ptr to single instance of class
// ***************************************************************************
//G4ThreadLocal
G4IStore* G4IStore::fInstance = 0;
G4IStore::G4IStore() :
fWorldVolume(G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume())
{}
G4IStore::G4IStore(G4String ParallelWorldName) :
fWorldVolume(G4TransportationManager::GetTransportationManager()->GetParallelWorld(ParallelWorldName))
{
G4cout << " G4IStore:: ParallelWorldName = " << ParallelWorldName << G4endl;
G4cout << " G4IStore:: fParallelWorldVolume = " << fWorldVolume->GetName() << G4endl;
}
G4IStore::~G4IStore()
{}
const G4VPhysicalVolume &G4IStore::GetWorldVolume() const
void G4IStore::Clear()
{
fGeometryCelli.clear();
}
void G4IStore::SetWorldVolume()
{
G4cout << " G4IStore:: SetWorldVolume " << G4endl;
fWorldVolume = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume();
G4cout << " World volume is: " << fWorldVolume->GetName() << G4endl;
// fGeometryCelli = new G4GeometryCellImportance;
}
void G4IStore::SetParallelWorldVolume(G4String paraName)
{
G4cout << " G4IStore:: SetParallelWorldVolume " << G4endl;
fWorldVolume = G4TransportationManager::GetTransportationManager()->GetParallelWorld(paraName);
G4cout << " ParallelWorld volume is: " << fWorldVolume->GetName() << G4endl;
// fGeometryCelli = new G4GeometryCellImportance;
}
const G4VPhysicalVolume& G4IStore::GetWorldVolume() const
{
return *fWorldVolume;
}
// const G4VPhysicalVolume& G4IStore::GetParallelWorldVolume() const
// {
// return *fParallelWorldVolume;
// }
const G4VPhysicalVolume* G4IStore::GetParallelWorldVolumePointer() const
{
return fWorldVolume;
}
@@ -57,7 +102,8 @@ void G4IStore::SetInternalIterator(const G4GeometryCell &gCell) const
}
void G4IStore::AddImportanceGeometryCell(G4double importance,
const G4GeometryCell &gCell){
const G4GeometryCell &gCell)
{
if (importance < 0 ) {
Error("AddImportanceGeometryCell() - Invalid importance value given.");
}
@@ -142,8 +188,10 @@ G4bool G4IStore::IsKnown(const G4GeometryCell &gCell) const {
G4bool G4IStore::IsInWorld(const G4VPhysicalVolume &aVolume) const
{
G4bool isIn(true);
if (!(aVolume == fWorldVolume)) {
isIn = fWorldVolume.GetLogicalVolume()->IsAncestor(&aVolume);
// G4cout << "G4IStore:: aVolume: " << aVolume.GetName() << G4endl;
// G4cout << "G4IStore:: fWorld: " << fWorldVolume->GetName() << G4endl;
if (!(aVolume == *fWorldVolume)) {
isIn = fWorldVolume->GetLogicalVolume()->IsAncestor(&aVolume);
}
return isIn;
}
@@ -154,3 +202,34 @@ void G4IStore::Error(const G4String &msg) const
{
G4Exception("G4IStore::Error()", "GeomBias0002", FatalException, msg);
}
// ***************************************************************************
// Returns the instance of the singleton.
// Creates it in case it's called for the first time.
// ***************************************************************************
//
G4IStore* G4IStore::GetInstance()
{
if (!fInstance)
{
G4cout << "G4IStore:: Creating new MASS IStore " << G4endl;
fInstance = new G4IStore();
}
return fInstance;
}
// ***************************************************************************
// Returns the instance of the singleton.
// Creates it in case it's called for the first time.
// ***************************************************************************
//
G4IStore* G4IStore::GetInstance(G4String ParallelWorldName)
{
if (!fInstance)
{
G4cout << "G4IStore:: Creating new Parallel IStore " << ParallelWorldName << G4endl;
fInstance = new G4IStore(ParallelWorldName);
}
return fInstance;
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4ImportanceAlgorithm.cc 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4Nsplit_Weight.cc 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -1,57 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id$
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
//
// G4VCellScorer.cc
//
// ----------------------------------------------------------------------
#include "G4VCellScorer.hh"
#include "G4ios.hh"
G4VCellScorer::G4VCellScorer()
{
static G4bool warn=true;
if (warn)
{
G4cout
<< "--------------------------------------------------------" << G4endl
<< "WARNING: Class <G4VCellScorer> is now obsolete. It |" << G4endl
<< " will be removed starting from the next Geant4 |" << G4endl
<< " major release. Please, consider switching to |" << G4endl
<< " general purpose scoring functionality. |" << G4endl
<< "--------------------------------------------------------"
<< G4endl;
warn = false;
}
}
G4VCellScorer::~G4VCellScorer()
{}
@@ -1,58 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id$
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
//
// G4VCellScorerStore.cc
//
// ----------------------------------------------------------------------
#include "G4VCellScorerStore.hh"
#include "G4ios.hh"
G4VCellScorerStore::G4VCellScorerStore()
{
static G4bool warn=true;
if (warn)
{
G4cout
<< "--------------------------------------------------------" << G4endl
<< "WARNING: Class <G4VCellScorerStore> is now obsolete |" << G4endl
<< " and will be removed starting from next Geant4 |" << G4endl
<< " major release. Please, consider switching to |" << G4endl
<< " general purpose scoring functionality. |" << G4endl
<< "--------------------------------------------------------"
<< G4endl;
warn = false;
}
}
G4VCellScorerStore::~G4VCellScorerStore()
{}
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4VGCellFinder.cc 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
+1 -1
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4VIStore.cc 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4VImportanceAlgorithm.cc 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4VImportanceSplitExaminer.cc 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4VWeightWindowAlgorithm.cc 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4VWeightWindowStore.cc 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4WeightWindowAlgorithm.cc 66356 2012-12-18 09:02:32Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4WeightWindowStore.cc 77780 2013-11-28 07:50:59Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -38,11 +38,27 @@
#include "G4VPhysicalVolume.hh"
#include "G4LogicalVolume.hh"
#include "G4GeometryCellStepStream.hh"
#include "G4TransportationManager.hh"
// ***************************************************************************
// Static class variable: ptr to single instance of class
// ***************************************************************************
//G4ThreadLocal
G4WeightWindowStore* G4WeightWindowStore::fInstance = 0;
G4WeightWindowStore::
G4WeightWindowStore(const G4VPhysicalVolume &worldvolume) :
fWorldVolume(worldvolume),
G4WeightWindowStore() :
fWorldVolume(G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume()),
fGeneralUpperEnergyBounds(),
fCellToUpEnBoundLoWePairsMap(),
fCurrentIterator(fCellToUpEnBoundLoWePairsMap.end())
{}
G4WeightWindowStore::
G4WeightWindowStore(G4String ParallelWorldName) :
fWorldVolume(G4TransportationManager::GetTransportationManager()->GetParallelWorld(ParallelWorldName)),
fGeneralUpperEnergyBounds(),
fCellToUpEnBoundLoWePairsMap(),
fCurrentIterator(fCellToUpEnBoundLoWePairsMap.end())
@@ -94,8 +110,8 @@ G4bool G4WeightWindowStore::
IsInWorld(const G4VPhysicalVolume &aVolume) const
{
G4bool isIn(true);
if (!(aVolume == fWorldVolume)) {
isIn = fWorldVolume.GetLogicalVolume()->IsAncestor(&aVolume);
if (!(aVolume == *fWorldVolume)) {
isIn = fWorldVolume->GetLogicalVolume()->IsAncestor(&aVolume);
}
return isIn;
}
@@ -112,13 +128,38 @@ G4bool G4WeightWindowStore::IsKnown(const G4GeometryCell &gCell) const
return inWorldKnown;
}
void G4WeightWindowStore::Clear()
{
fCellToUpEnBoundLoWePairsMap.clear();
}
void G4WeightWindowStore::SetWorldVolume()
{
G4cout << " G4IStore:: SetWorldVolume " << G4endl;
fWorldVolume = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume();
G4cout << " World volume is: " << fWorldVolume->GetName() << G4endl;
// fGeometryCelli = new G4GeometryCellImportance;
}
void G4WeightWindowStore::SetParallelWorldVolume(G4String paraName)
{
fWorldVolume = G4TransportationManager::GetTransportationManager()->GetParallelWorld(paraName);
// fGeometryCelli = new G4GeometryCellImportance;
}
const G4VPhysicalVolume &G4WeightWindowStore::GetWorldVolume() const
{
return *fWorldVolume;
}
const G4VPhysicalVolume* G4WeightWindowStore::GetParallelWorldVolumePointer() const
{
return fWorldVolume;
}
void G4WeightWindowStore::
AddLowerWeights(const G4GeometryCell & gCell,
const std::vector<G4double> &lowerWeights)
@@ -181,3 +222,34 @@ void G4WeightWindowStore::Error(const G4String &msg) const
G4Exception("G4WeightWindowStore::Error()",
"GeomBias0002", FatalException, msg);
}
// ***************************************************************************
// Returns the instance of the singleton.
// Creates it in case it's called for the first time.
// ***************************************************************************
//
G4WeightWindowStore* G4WeightWindowStore::GetInstance()
{
if (!fInstance)
{
fInstance = new G4WeightWindowStore();
}
return fInstance;
}
// ***************************************************************************
// Returns the instance of the singleton.
// Creates it in case it's called for the first time.
// ***************************************************************************
//
G4WeightWindowStore* G4WeightWindowStore::GetInstance(G4String ParallelWorldName)
{
if (!fInstance)
{
G4cout << "G4IStore:: Creating new Parallel IStore " << ParallelWorldName << G4endl;
fInstance = new G4WeightWindowStore(ParallelWorldName);
}
return fInstance;
}