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
@@ -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;
}