Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
+14 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.16 2007/10/31 18:05:44 ahoward Exp $
$Id: History,v 1.19 2008/04/22 09:29:35 ahoward Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,19 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
April 22nd, 2008 Alex Howard (procbiasing-V09-01-02)
- Removed G4CellFinder and associated dependency in G4WeigthCutOffProcess and
G4WeightCutOffConfigurator- was a hang-up from previous implementation
which was erroneously left in the G4WeightCutOffProcess.
This meant the WeightCutOff could only work in a MASS geometry
(by coincidence between the ImportanceBiasing and the GeometryCells).
April 21st, 2008 Alex Howard (procbiasing-V09-01-01)
- mis-tagged - please ignore
April 21st, 2008 Alex Howard (procbiasing-V09-01-00)
- Tag of the HEAD which includes scoring for backwards compatibility
October 31st, 2007 Alex Howard (procbiasing-V09-00-00)
- Fixed G4ProcessPlacer.cc to put biasing process second for AlongStep
as well as PostStep - a bug which would feature for charged particles.
@@ -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: G4GCellFinder.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
// ----------------------------------------------------------------------
// Class G4ParallelGCellFinder
//
// Class description:
//
// Finds a G4GeometryCell in the mass geometry.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4GCellFinder_hh
#define G4GCellFinder_hh G4GCellFinder_hh
class G4Navigator;
class G4TransportationManager;
class G4PathFinder;
class G4VTouchable;
class G4VPhysicalVolume;
#include "G4Types.hh"
#include "G4VGCellFinder.hh"
class G4GCellFinder : public G4VGCellFinder
{
public: // with description
// G4GCellFinder(G4VPhysicalVolume &worldvolume);
G4GCellFinder();
virtual ~G4GCellFinder();
virtual G4GeometryCell
GetPreGeometryCell(const G4Step &aStep) const;
virtual G4GeometryCell
GetPostGeometryCell(const G4Step &aStep) const;
private:
// G4Navigator* fGhostNavigator;
// G4TouchableHandle fGhostTouchable;
};
#endif
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4GeometrySampler.hh,v 1.9 2007/06/01 09:52:23 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4GeometrySampler.hh,v 1.11 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4GeometrySampler
@@ -49,7 +49,7 @@ class G4ImportanceConfigurator;
class G4WeightWindowConfigurator;
//class G4ScoreConfigurator;
class G4WeightCutOffConfigurator;
class G4VGCellFinder;
//class G4VGCellFinder;
class G4GeometrySampler : public G4VSampler
{
@@ -91,7 +91,7 @@ private:
G4VPhysicalVolume* fWorld;
G4ImportanceConfigurator *fImportanceConfigurator;
// G4ScoreConfigurator *fScoreConfigurator;
G4VGCellFinder *fGCellFinder;
// G4VGCellFinder *fGCellFinder;
G4WeightCutOffConfigurator *fWeightCutOffConfigurator;
G4VIStore *fIStore;
G4WeightWindowConfigurator *fWeightWindowConfigurator;
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ImportanceConfigurator.hh,v 1.3 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ImportanceConfigurator.hh,v 1.4 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4ImportanceConfigurator
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ImportanceProcess.hh,v 1.3 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ImportanceProcess.hh,v 1.4 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4ImportanceProcess
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4PlaceOfAction.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4PlaceOfAction.hh,v 1.3 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4PlaceOfAction
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ProcessPlacer.hh,v 1.3 2007/10/31 18:05:44 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ProcessPlacer.hh,v 1.4 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4ProcessPlacer
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4SamplingPostStepAction.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4SamplingPostStepAction.hh,v 1.3 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4SamplingPostStepAction
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4TrackTerminator.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4TrackTerminator.hh,v 1.3 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4TrackTerminator
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VProcessPlacer.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4VProcessPlacer.hh,v 1.3 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4VProcessPlacer
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VSampler.hh,v 1.8 2007/06/25 06:57:22 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4VSampler.hh,v 1.9 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4VSampler
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VSamplerConfigurator.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4VSamplerConfigurator.hh,v 1.3 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4VSamplerConfigurator
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4WeightCutOffConfigurator.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4WeightCutOffConfigurator.hh,v 1.3 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4WeightCutOffConfigurator
@@ -45,7 +45,7 @@
#include "G4ProcessPlacer.hh"
class G4WeightCutOffProcess;
class G4VGCellFinder;
//class G4VGCellFinder;
class G4VIStore;
class G4VPhysicalVolume;
@@ -60,7 +60,8 @@ public: // with description
G4double wlimit,
G4double isource,
G4VIStore *istore,
const G4VGCellFinder &aGCellFinder,G4bool paraflag);
//const G4VGCellFinder &aGCellFinder,
G4bool paraflag);
virtual ~G4WeightCutOffConfigurator();
virtual void Configure(G4VSamplerConfigurator *preConf);
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4WeightCutOffProcess.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4WeightCutOffProcess.hh,v 1.3 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4WeightCutOffProcess
@@ -43,7 +43,7 @@
#include "G4VTrackTerminator.hh"
#include "G4GeometryCell.hh"
class G4VGCellFinder;
//class G4VGCellFinder;
class G4VIStore;
class G4Step;
@@ -66,7 +66,7 @@ public: // with description
G4double wlimit,
G4double isource,
G4VIStore *istore,
const G4VGCellFinder &aGCellFinder,
// const G4VGCellFinder &aGCellFinder,
const G4String &aName = "WeightCutOffProcess", G4bool para = false);
// create a G4ParticleChange
@@ -133,7 +133,7 @@ private:
G4double fWeightLimit;
G4double fSourceImportance;
G4VIStore *fIStore;
const G4VGCellFinder &fGCellFinder;
// const G4VGCellFinder &fGCellFinder;
G4TransportationManager* fTransportationManager;
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4WeightWindowConfigurator.hh,v 1.3 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4WeightWindowConfigurator.hh,v 1.4 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4WeightWindowConfigurator
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4WeightWindowProcess.hh,v 1.3 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4WeightWindowProcess.hh,v 1.4 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4MassWeioghtWindowProcess
@@ -1,67 +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: G4GCellFinder.cc,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
//
// G4GCellFinder.cc
//
// ----------------------------------------------------------------------
#include "G4GCellFinder.hh"
#include "G4TouchableHandle.hh"
#include "G4Step.hh"
G4GCellFinder::G4GCellFinder()
{
}
G4GCellFinder::~G4GCellFinder()
{
}
G4GeometryCell
G4GCellFinder::GetPreGeometryCell(const G4Step &aStep) const
{
const G4TouchableHandle& th =
aStep.GetPreStepPoint()->GetTouchableHandle();
G4GeometryCell g(*th->GetVolume(), th->GetReplicaNumber());
return g;
}
G4GeometryCell
G4GCellFinder::GetPostGeometryCell(const G4Step &aStep) const
{
const G4TouchableHandle& th =
aStep.GetPostStepPoint()->GetTouchableHandle();
G4GeometryCell g(*th->GetVolume(), th->GetReplicaNumber());
return g;
}
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4GeometrySampler.cc,v 1.8 2007/06/01 09:52:23 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4GeometrySampler.cc,v 1.10 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -45,7 +45,7 @@
#include "G4ImportanceConfigurator.hh"
#include "G4WeightWindowConfigurator.hh"
#include "G4WeightCutOffConfigurator.hh"
#include "G4GCellFinder.hh"
//#include "G4GCellFinder.hh"
G4GeometrySampler::
G4GeometrySampler(G4VPhysicalVolume *parallelworld, const G4String &particlename)
@@ -53,7 +53,7 @@
fWorld(parallelworld),
fImportanceConfigurator(0),
// fScoreConfigurator(0),
fGCellFinder(0),
// fGCellFinder(0),
fWeightCutOffConfigurator(0),
fIStore(0),
fWeightWindowConfigurator(0),
@@ -90,11 +90,11 @@ void G4GeometrySampler::ClearSampling()
delete fWeightCutOffConfigurator;
fWeightCutOffConfigurator = 0;
}
if (fGCellFinder)
{
delete fGCellFinder;
fGCellFinder = 0;
}
// if (fGCellFinder)
// {
// delete fGCellFinder;
// fGCellFinder = 0;
// }
fIStore = 0;
fConfigurators.clear();
fIsConfigured = false;
@@ -161,13 +161,13 @@ G4GeometrySampler::PrepareWeightRoulett(G4double wsurvive,
{
// fGCellFinder = new G4GCellFinder(fWorld);
G4cout << " preparing weight roulette" << G4endl;
fGCellFinder = new G4GCellFinder();
if (!fGCellFinder)
{
G4Exception("G4GeometrySampler::PrepareWeightRoulett()",
"FatalError", FatalException,
"Failed allocation of G4GCellFinder !");
}
// fGCellFinder = new G4GCellFinder();
// if (!fGCellFinder)
// {
// G4Exception("G4GeometrySampler::PrepareWeightRoulett()",
// "FatalError", FatalException,
// "Failed allocation of G4GCellFinder !");
// }
fWeightCutOffConfigurator =
new G4WeightCutOffConfigurator(fWorld, fParticleName,
@@ -175,7 +175,8 @@ G4GeometrySampler::PrepareWeightRoulett(G4double wsurvive,
wlimit,
isource,
fIStore,
*fGCellFinder, paraflag);
paraflag);
//*fGCellFinder, paraflag);
if (!fWeightCutOffConfigurator)
{
G4Exception("G4GeometrySampler::PrepareWeightRoulett()",
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ImportanceConfigurator.cc,v 1.3 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ImportanceConfigurator.cc,v 1.4 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4ImportanceConfigurator
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ImportanceProcess.cc,v 1.3 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ImportanceProcess.cc,v 1.4 2008/04/21 09:10:28 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ProcessPlacer.cc,v 1.4 2007/10/31 18:05:44 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ProcessPlacer.cc,v 1.5 2008/04/21 09:10:29 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4SamplingPostStepAction.cc,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4SamplingPostStepAction.cc,v 1.3 2008/04/21 09:10:29 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VProcessPlacer.cc,v 1.1 2007/06/01 14:57:03 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4VProcessPlacer.cc,v 1.2 2008/04/21 09:10:29 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
+2 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VSampler.cc,v 1.2 2007/06/01 09:16:34 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4VSampler.cc,v 1.3 2008/04/21 09:10:29 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VSamplerConfigurator.cc,v 1.2 2007/06/01 09:16:34 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4VSamplerConfigurator.cc,v 1.3 2008/04/21 09:10:29 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4WeightCutOffConfigurator.cc,v 1.2 2007/06/01 09:16:34 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4WeightCutOffConfigurator.cc,v 1.3 2008/04/21 09:10:29 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4WeightCutOffConfigurator
@@ -43,14 +43,16 @@ G4WeightCutOffConfigurator(G4VPhysicalVolume* worldvolume,
G4double wlimit,
G4double isource,
G4VIStore *istore,
const G4VGCellFinder &aGCellfinder, G4bool para)
G4bool para)
// const G4VGCellFinder &aGCellfinder, G4bool para)
: fWorld(worldvolume),
fPlacer(particlename),
fPlaced(false),
paraflag(para)
{
fWeightCutOffProcess =
new G4WeightCutOffProcess(wsurvival,wlimit,isource,istore,aGCellfinder,"WeightCutOffProcess",paraflag);
new G4WeightCutOffProcess(wsurvival,wlimit,isource,istore,"WeightCutOffProcess",paraflag);
// new G4WeightCutOffProcess(wsurvival,wlimit,isource,istore,aGCellfinder,"WeightCutOffProcess",paraflag);
if (!fWeightCutOffProcess)
{
G4Exception("G4WeightCutOffConfigurator::G4WeightCutOffConfigurator()",
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4WeightCutOffProcess.cc,v 1.2 2007/06/01 09:16:34 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4WeightCutOffProcess.cc,v 1.3 2008/04/21 09:10:29 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -37,7 +37,7 @@
#include "G4WeightCutOffProcess.hh"
//#include "G4VScorer.hh"
#include "G4GeometryCellStep.hh"
#include "G4GCellFinder.hh"
//#include "G4GCellFinder.hh"
#include "G4TouchableHandle.hh"
#include "G4VIStore.hh"
@@ -57,7 +57,7 @@ G4WeightCutOffProcess(G4double wsurvival,
G4double wlimit,
G4double isource,
G4VIStore *istore,
const G4VGCellFinder &aGCellFinder,
// const G4VGCellFinder &aGCellFinder,
const G4String &aName, G4bool para)
: G4VProcess(aName),
fParticleChange(new G4ParticleChange),
@@ -65,7 +65,7 @@ G4WeightCutOffProcess(G4double wsurvival,
fWeightLimit(wlimit),
fSourceImportance(isource),
fIStore(istore),
fGCellFinder(aGCellFinder),
// fGCellFinder(aGCellFinder),
fGhostNavigator(0), fNavigatorID(-1), fFieldTrack('0')
{
if (!fParticleChange)
@@ -224,32 +224,70 @@ G4WeightCutOffProcess::PostStepDoIt(const G4Track& aTrack,
}
G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(aStep);
// G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(fGhostStep);
G4double R = fSourceImportance;
if (fIStore)
{
G4double i = fIStore->GetImportance(postCell);
if (i>0)
{
R/=i;
}
}
G4double w = aTrack.GetWeight();
if (w<R*fWeightLimit)
{
G4double ws = fWeightSurvival*R;
G4double p = w/(ws);
if (G4UniformRand()<p)
{
fParticleChange->ProposeTrackStatus(fStopAndKill);
}
else
{
fParticleChange->ProposeWeight(ws);
}
if(paraflag) {
G4GeometryCell postCell(*(fGhostPostStepPoint->GetPhysicalVolume()),
fGhostPostStepPoint->GetTouchable()->GetReplicaNumber());
// G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(aStep);
// G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(fGhostStep);
G4double R = fSourceImportance;
if (fIStore)
{
G4double i = fIStore->GetImportance(postCell);
if (i>0)
{
R/=i;
}
}
G4double w = aTrack.GetWeight();
if (w<R*fWeightLimit)
{
G4double ws = fWeightSurvival*R;
G4double p = w/(ws);
if (G4UniformRand()<p)
{
fParticleChange->ProposeTrackStatus(fStopAndKill);
}
else
{
fParticleChange->ProposeWeight(ws);
}
}
} else {
G4GeometryCell postCell(*(aStep.GetPostStepPoint()->GetPhysicalVolume()),
aStep.GetPostStepPoint()->GetTouchable()->GetReplicaNumber());
// G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(aStep);
// G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(fGhostStep);
G4double R = fSourceImportance;
if (fIStore)
{
G4double i = fIStore->GetImportance(postCell);
if (i>0)
{
R/=i;
}
}
G4double w = aTrack.GetWeight();
if (w<R*fWeightLimit)
{
G4double ws = fWeightSurvival*R;
G4double p = w/(ws);
if (G4UniformRand()<p)
{
fParticleChange->ProposeTrackStatus(fStopAndKill);
}
else
{
fParticleChange->ProposeWeight(ws);
}
}
}
return fParticleChange;
}
const G4String &G4WeightCutOffProcess::GetName() const
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4WeightWindowConfigurator.cc,v 1.3 2007/06/01 09:16:34 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4WeightWindowConfigurator.cc,v 1.4 2008/04/21 09:10:29 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class G4WeightWindowConfigurator
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4WeightWindowProcess.cc,v 1.3 2007/06/01 09:16:34 ahoward Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4WeightWindowProcess.cc,v 1.4 2008/04/21 09:10:29 ahoward Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file