Import Geant4 4.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:39:52 +02:00
parent 921d3b1cda
commit 330b82b769
4524 changed files with 178689 additions and 43575 deletions
@@ -0,0 +1,93 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4IStore.hh,v 1.3 2002/04/10 13:13:06 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4IStore
//
// Class description:
//
// An implementation of a "importance store" with the interface
// G4VIStore. See description in G4VIStore.
// This implementation uses G4PtkImportance as the container
// to store the "cells" together with the importance values.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4IStore_hh
#define G4IStore_hh G4IStore_hh
#include "G4VIStore.hh"
#include "G4PtkImportance.hh"
class G4IStore : public G4VIStore
{
public: // with description
G4IStore(G4VPhysicalVolume &worldvolume);
// initialise the importance store for the given geometry
~G4IStore();
// destruct
void AddImportanceRegion(G4double importance,
const G4VPhysicalVolume &,
G4int aRepNum = 0);
// Add a "cell" together with a importance value to the store.
void ChangeImportance(G4double importance,
const G4VPhysicalVolume &,
G4int aRepNum = 0);
// Change a importance value of a "cell".
G4double GetImportance(const G4VPhysicalVolume &,
G4int aRepNum = 0) const ;
// derive the importance value of a "cell" from the store.
G4double GetImportance(const G4PTouchableKey &ptk) const;
// derive a importance value of a "cell" addresed by a G4PTouchableKey
// from the store.
G4VPhysicalVolume &GetWorldVolume();
// return a reference to the wolrd volume of the
// "importance" geometry
private:
G4bool IsInWorld(const G4VPhysicalVolume &) const;
void SetInternalIterator(const G4VPhysicalVolume &,
G4int aRepNum) const;
void Error(const G4String &m) const;
private:
G4VPhysicalVolume &fWorldVolume;
G4PtkImportance fPtki;
mutable G4PtkImportance::const_iterator fCurrentIterator;
};
#endif
@@ -0,0 +1,68 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ImportanceAlgorithm.hh,v 1.3 2002/04/10 13:13:06 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4ImportanceAlgorithm
//
// Class description:
//
// An implementation of a G4VImportanceAlgorithm (see description in
// G4VImportanceAlgorithm.hh).
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4ImportanceAlgorithm_hh
#define G4ImportanceAlgorithm_hh G4ImportanceAlgorithm_hh
#include "G4VImportanceAlgorithm.hh"
class G4ImportanceAlgorithm : public G4VImportanceAlgorithm
{
public: // with description
G4ImportanceAlgorithm();
// simple construction
~G4ImportanceAlgorithm();
// repeate warning if triggered
G4Nsplit_Weight Calculate(G4double ipre_over_ipost,
G4double init_w) const;
// calculate the number of tracks and their weight according
// to the ratio of pre over post importance and the weight of
// the mother track.
private:
void Error(const G4String &m) const;
void Warning(const G4String &m) const;
private:
mutable G4bool fWorned;
};
#endif
@@ -0,0 +1,72 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ImportanceFinder.hh,v 1.3 2002/04/10 13:13:06 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4ImportanceFinder
//
// Class description:
//
// This class is used internally by importance sampling in a parallel
// geometry. It derives the ratio of importances of the pre over the post
// G4PTouchableKey.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4ImportanceFinder_hh
#define G4ImportanceFinder_hh G4ImportanceFinder_hh
#include "globals.hh"
class G4VParallelStepper;
class G4VIStore;
class G4PTouchableKey;
class G4ImportanceFinder
{
public: // with description
G4ImportanceFinder(const G4VIStore &aIStore);
// initialise fIStore
~G4ImportanceFinder();
// destruction
G4double GetIPre_over_IPost(const G4PTouchableKey &prekey,
const G4PTouchableKey &postkey) const;
// get the ratio of importances of the pre over the
// post G4PTouchableKey importances.
private:
void Error(const G4String &m) const;
private:
const G4VIStore &fIStore;
};
#endif
@@ -0,0 +1,80 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ImportanceSplitExaminer.hh,v 1.2 2002/05/31 09:56:09 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4ImportanceSplitExaminer
//
// Class description:
//
// This class is used internally by importance sampling.
// Implementation of a importance split examiner
// (see G4VImportanceSplitExaminer).
// This implementation is used for sampling in a "parallel"
// geometry.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4ImportanceSplitExaminer_hh
#define G4ImportanceSplitExaminer_hh G4ImportanceSplitExaminer_hh
#include "G4VImportanceSplitExaminer.hh"
class G4VImportanceAlgorithm;
class G4VParallelStepper;
class G4ImportanceFinder;
class G4VIStore;
class G4ImportanceSplitExaminer: public G4VImportanceSplitExaminer
{
public: // with description
G4ImportanceSplitExaminer(const G4VImportanceAlgorithm &aIalg,
const G4VParallelStepper &astepper,
const G4VIStore &istore);
// initialisation and construct G4ImportanceFinder
~G4ImportanceSplitExaminer();
// delete G4ImportanceFinder
G4Nsplit_Weight Examine(G4double w) const;
// Get G4Nsplit_Weight for a given mother track weight.
private:
G4ImportanceSplitExaminer(const G4ImportanceSplitExaminer &);
G4ImportanceSplitExaminer &operator=(const G4ImportanceSplitExaminer &);
private:
const G4VImportanceAlgorithm &fIalgorithm;
const G4VParallelStepper &fPStepper;
const G4ImportanceFinder &fIfinder;
};
#endif
@@ -0,0 +1,68 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4Nsplit_Weight.hh,v 1.5 2002/04/10 13:13:06 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4Nsplit_Weight
//
// Class description:
//
// A struct used by importance sampling. It contains the number of tracks
// a mother track should be split into and their weight.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4Nsplit_Weight_hh
#define G4Nsplit_Weight_hh G4Nsplit_Weight_hh
#include "globals.hh"
struct G4Nsplit_Weight
{
G4Nsplit_Weight(G4int an, G4double aw): fN(an), fW(aw){}
// initialise members
G4int fN;
// number of tracks a mother track should be split into
// including the mother track
G4double fW;
// the weight to be given to the tracks
};
G4std::ostream& operator<<(G4std::ostream &out,
const G4Nsplit_Weight &nw);
#endif
@@ -0,0 +1,54 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4PMapPtkTallys.hh,v 1.8 2002/04/10 13:13:06 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4PMapNameTally and G4PMapPtkTallys
//
// Class description:
//
// Used by G4PScorer and G4PIScorer as containers for tallies.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4PMapPtkTallys_hh
#define G4PMapPtkTallys_hh G4PMapPtkTallys_hh
#include "g4std/map"
#include "globals.hh"
#include "g4std/iostream"
#include "G4PTouchableKey.hh"
#include "G4Sigma.hh"
typedef G4std::map<const char *, G4Sigma> G4PMapNameTally;
// container for a G4Sigma to each tally
typedef G4std::map<G4PTouchableKey, G4PMapNameTally, G4PTkComp> G4PMapPtkTallys;
// container for a G4PMapNameTally to each "cell" addressed by a
// G4PTouchableKey
G4std::ostream& operator<<(G4std::ostream &out, const G4PMapNameTally &tally);
G4std::ostream& operator<<(G4std::ostream &out, const G4PMapPtkTallys &ptktally);
#endif
@@ -0,0 +1,73 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4PStep.hh,v 1.3 2002/04/10 13:13:06 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4PStep
//
// Class description:
//
// This class serves to address the "cell" a track previously
// touched and a "cell" a track is currently in. It is used
// for scoring and importance sampling in the "mass" geometry as well
// as in a "parallel" geometry.
// The "cell" information is available with the fPreTouchableKey and the
// fPostTouchableKey.
// The fCrossBoundary member is set true in case the step
// crosses a boundary in the geometry it this G4PStep
// refers to.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4PStep_hh
#define G4PStep_hh G4PStep_hh
#include "G4PTouchableKey.hh"
class G4PStep
{
public: // with description
G4PStep(const G4PTouchableKey &preKey, const G4PTouchableKey &postKey)
: fPreTouchableKey(preKey), fPostTouchableKey(postKey),
fCrossBoundary(false) {}
// initialise pre and post G4PTouchableKey
~G4PStep(){}
public: // without description
G4PTouchableKey fPreTouchableKey;
// addressing the "cell" the track previously touched
G4PTouchableKey fPostTouchableKey;
// addressing the current "cell"
G4bool fCrossBoundary;
// true if step crosses boundary of the geometry it refers to
};
#endif
@@ -0,0 +1,45 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4PStepStream.hh,v 1.5 2002/04/10 13:13:06 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Declarations
//
// Declaration description:
//
// declarations of streams for G4PTouchableKey and G4PStep
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4PStepStream_hh
#define G4PStepStream_hh G4PStepStream_hh
#include "G4PTouchableKey.hh"
#include "G4PStep.hh"
G4std::ostream& operator<<(G4std::ostream &out, const G4PTouchableKey &tk);
G4std::ostream& operator<<(G4std::ostream &out, const G4PStep &ps);
#endif
@@ -0,0 +1,80 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4PTouchableKey.hh,v 1.3 2002/04/10 13:13:06 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4PTouchableKey
//
// Class description:
//
// This class is usde by scoring and importance sampling.
// It serves to address a "cell". A "cell" is somewhat
// related to a touchable in Geant4. It is identified by a reference
// to a G4VPhysicalVolume and a number (replica number).
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4PTouchableKey_hh
#define G4PTouchableKey_hh G4PTouchableKey_hh
#include "globals.hh"
class G4VPhysicalVolume;
class G4PTouchableKey
{
public: // with description
G4PTouchableKey(const G4VPhysicalVolume &aVolume, G4int RepNum);
// initialise volume and replica number
~G4PTouchableKey();
// simple destruction
const G4VPhysicalVolume *fVPhysiclaVolume;
// pinter to the G4VPhysicalVolume of the "cell"
G4int fRepNum;
// replica number of the "cell"
};
// -----------------------------------------------------------------------
class G4PTkComp
{
public: // without description
G4bool operator() (const G4PTouchableKey &k1,
const G4PTouchableKey &k2) const;
};
// -----------------------------------------------------------------------
G4bool operator==(const G4PTouchableKey &k1, const G4PTouchableKey &k2);
G4bool operator!=(const G4PTouchableKey &k1, const G4PTouchableKey &k2);
#endif
@@ -0,0 +1,125 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ParallelNavigator.hh,v 1.3 2002/04/10 13:13:06 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4ParallelNavigator
//
// Class description:
//
// Used internaly for importance sampling and scoring in a "parallel"
// geometry.
// It implements the interface G4VPGeoDriver (see G4VPGeoDriver.hh).
// It uses a G4Navigator.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4ParallelNavigator_hh
#define G4ParallelNavigator_hh G4ParallelNavigator_hh
#include "G4VPGeoDriver.hh"
#include "geomdefs.hh"
class G4VTouchable;
class G4Navigator;
class G4PTouchableKey ;
class G4VPhysicalVolume;
class G4ParallelNavigator : public G4VPGeoDriver
{
public: // with description
G4ParallelNavigator(G4VPhysicalVolume &aWorldVolume);
// initialise and create G4Navigator and a TouchableHistory
~G4ParallelNavigator();
// delete Touchable and Navigator
G4PTouchableKey LocateOnBoundary(const G4ThreeVector &aPosition,
const G4ThreeVector &aDirection);
// The location of a track according to it's position
// and direction in case the track crosses a boundary
// of a "parallel" geometry.
// Must be called in the PostDOIT of the ParallelTransportation.
// (The track crosses the boundary if PostDOIT gets called.)
G4PTouchableKey GetCurrentTouchableKey() const;
// get the current G4PTouchableKey of the "parallel" geometry
G4double ComputeStepLengthInit(const G4ThreeVector &aPosition,
const G4ThreeVector &aDirection);
// compute step length for a starting track.
G4double ComputeStepLengthCrossBoundary(const G4ThreeVector &aPosition,
const G4ThreeVector &aDirection);
// compute the step length after a track crossed a boundary
// in a "parallel" geometry
G4double ComputeStepLengthInVolume(const G4ThreeVector &aPosition,
const G4ThreeVector &aDirection);
// compute step length when track moves inside a volume.
private:
G4ParallelNavigator(const G4ParallelNavigator &);
G4ParallelNavigator &operator=(const G4ParallelNavigator &);
G4double ComputeStepLengthShifted(const G4String &m,
const G4ThreeVector &aPosition,
const G4ThreeVector &aDirection);
void Locate(const G4ThreeVector &aPosition,
const G4ThreeVector &aDirection,
G4bool histsearch);
void Error(const G4String &m,
const G4ThreeVector &pos,
const G4ThreeVector &dir);
G4double Shift(G4double d);
private:
G4Navigator &fNavigator;
G4VTouchable *fCurrentTouchable;
G4int fNlocated;
};
#endif
@@ -0,0 +1,83 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ParallelStepper.hh,v 1.3 2002/04/10 13:13:06 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4ParallelStepper
//
// Class description:
//
// Used internally by importance sampling and scoring in a "parallel"
// geometry. (See G4VParallelStepper.hh)
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4ParallelStepper_hh
#define G4ParallelStepper_hh G4ParallelStepper_hh
#include "G4VParallelStepper.hh"
#include "G4PStep.hh"
class G4ParallelStepper : public G4VParallelStepper
{
public: // with description
G4ParallelStepper();
// imitilisation
~G4ParallelStepper();
// delete G4Pstep if created
G4ParallelStepper(const G4ParallelStepper &);
// create new G4PStep
G4ParallelStepper &operator=(const G4ParallelStepper &);
// create new G4PStep
G4PStep GetPStep() const {return *fPStep;}
// get the current G4PStep
void Init(const G4PTouchableKey &aptk);
// initialise the parallel stepper and the G4PStep
// pre and post G4PTouchableKey of the step are set equal
void Update(const G4PTouchableKey &aptk);
// to be called when crossing a boundary of the
// "parallel" geometry to update the G4PStep
void UnSetCrossBoundary();
// to be called to unset the fCrossBoundary member of the G4PStep
private:
void Error(const G4String &m);
private:
G4PStep *fPStep;
};
#endif
@@ -0,0 +1,82 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ParallelWorld.hh,v 1.3 2002/04/10 13:13:06 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4ParallelWorld
//
// Class description:
//
// Used internally by importance samplin and scoring in a "parallel"
// geometry.
// The class relates the world volume (G4VPhysicalVolume),
// G4VGeoDriver and G4VParallelStepper for one "parallel"
// geometry.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4ParallelWorld_hh
#define G4ParallelWorld_hh G4ParallelWorld_hh
#include "globals.hh"
class G4VPhysicalVolume;
class G4VParallelStepper;
class G4VPGeoDriver;
class G4ParallelWorld
{
public: // with description
G4ParallelWorld(G4VPhysicalVolume &worldvolume);
// initialisation and create G4ParallelStepper and a G4VPGeoDriver
~G4ParallelWorld();
// delete G4ParallelStepper and a G4VPGeoDriver
G4ParallelWorld(const G4ParallelWorld &rhs);
// create G4ParallelStepper and a G4VPGeoDriver
G4ParallelWorld &operator=(const G4ParallelWorld &rhs);
// create G4ParallelStepper and a G4VPGeoDriver
G4VPhysicalVolume *GetWorldVolume() const;
// get the world volume
G4VParallelStepper &GetParallelStepper();
// get the parallel stepper
G4VPGeoDriver &GetGeoDriver();
// get the G4VPGeoDriver
private:
G4VPhysicalVolume *fWorldVolume;
G4VParallelStepper *fPstepper;
G4VPGeoDriver *fPdriver;
};
#endif
@@ -0,0 +1,52 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4Pstring.hh,v 1.3 2002/04/10 13:13:06 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Declaration
//
// Declaration description:
//
// This fucntions convert some non character objects into
// G4Strings
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4Pstring_hh
#define G4Pstring_hh G4Pstring_hh
#include "globals.hh"
#include "G4ThreeVector.hh"
G4String str(const int &i);
// convert an integer into a G4String
G4String str(const double &d);
// convert a double into a G4String
G4String str(const G4ThreeVector &v);
// convert a G4ThreeVector into a G4String
#endif
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4PtkImportance.hh,v 1.5 2002/04/10 13:13:07 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4PtkImportance
//
// Class description:
//
// Used internally by importance sampling.
// It is acontainer for "cell" importance value pairs.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4PtkImportance_hh
#define G4PtkImportance_hh G4PtkImportance_hh
#include "g4std/map"
#include "globals.hh"
#include "G4PTouchableKey.hh"
typedef G4std::map<G4PTouchableKey, G4double, G4PTkComp> G4PtkImportance;
// implement container G4PtkImportance as map
G4std::ostream& operator<<(G4std::ostream &out, const G4PtkImportance &ptki);
#endif
+106
View File
@@ -0,0 +1,106 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4Sigma.hh,v 1.6 2002/04/10 13:13:07 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4Sigma
//
// Class description:
//
// A class for simple Gaussian statistics taking into account
// weights.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4Sigma_hh
#define G4Sigma_hh G4Sigma_hh
#include "g4std/iostream"
#include "globals.hh"
class G4Sigma
{
public: // with description
G4Sigma();
// call Init()
~G4Sigma();
// simple deonstruction
void Init();
// initialisation
G4int Xin(G4double x, G4double w = 1.);
// enter a value [with a weight]
G4int GetEntries() const;
// get the number of entries
G4double GetMean() const;
// get the weighted mean value: Sum(w*x)/Sum(w)
G4double GetSigma() const;
// get the weighted sigma: sqrt(Sum(w*x*x)/Sum(w)-mean^2)
G4double GetXsum() const;
// get sum over x: Sum(x)
G4double GetXXsum() const;
// get sum over squared x: Sum(x*x)
G4double GetSumOfWeights() const;
// get sum over weights: Sum(w)
G4double GetWeightedXsum() const;
// get weighted sum over x*w: Sum(w*x)
G4double GetWeightedXXsum() const;
// get weighted sum over squarted x: Sum(W*x*x)
private:
G4int GetCalc() const;
G4int Calculate() const;
void Error(const G4String &m);
private:
G4int fEntries;
mutable G4double fMean;
mutable G4double fSigma;
G4double fXsum;
G4double fXXsum;
G4double fWsum;
G4double fWXsum;
G4double fWXXsum;
mutable G4int fcalc;
};
G4std::ostream& operator<<(G4std::ostream &out, const G4Sigma &s);
#endif
@@ -0,0 +1,78 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4VIStore.hh,v 1.3 2002/04/10 13:13:07 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4VIStore
//
// Class description:
//
// An interface of an "importance store" used by importance sampling.
// It defines how a importance value together with a "cell"
// (a G4VPhysicalVolume and a replica number) has to be added
// to the "importance store" and how a importance value can be derived
// from the "importance store".
//
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4VIStore_hh
#define G4VIStore_hh G4VIStore_hh
#include "globals.hh"
class G4PTouchableKey;
class G4VPhysicalVolume;
class G4VIStore
{
public: // with description
G4VIStore(G4VPhysicalVolume &worldVolume){}
virtual ~G4VIStore(){}
virtual void AddImportanceRegion(G4double importance,
const G4VPhysicalVolume &,
G4int aRepNum = 0) = 0;
// Add a "cell" together with a importance value to the store.
virtual void ChangeImportance(G4double importance,
const G4VPhysicalVolume &,
G4int aRepNum = 0) = 0;
// Change a importance value of a "cell".
virtual G4double GetImportance(const G4VPhysicalVolume &,
G4int aRepNum = 0) const = 0;
// derive the importance value of a "cell" from the store.
virtual G4double GetImportance(const G4PTouchableKey &ptk) const = 0;
// derive a importance value of a "cell" addresed by a G4PTouchableKey
// from the store.
virtual G4VPhysicalVolume &GetWorldVolume() = 0;
};
#endif
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4VImportanceAlgorithm.hh,v 1.3 2002/04/10 13:13:07 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4VImportanceAlgorithm
//
// Class description:
//
// This is an interface used by importance sampling to get the
// number of copies and weight a mother particle should be split
// into when crossing a boundary of "importance cells".
// The interface defines the input to be the ratio of the pre over
// the post importance and the weight of the mother track.
// It returns a struct containing the number of copies (including
// the mother track) to be produced and the weight of each track.
// A user defined algorithm deriving from this interface may be used
// by the importance sampling.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4VImportanceAlgorithm_hh
#define G4VImportanceAlgorithm_hh G4VImportanceAlgorithm_hh
#include "G4Nsplit_Weight.hh"
class G4VImportanceAlgorithm
{
public: // with description
virtual ~G4VImportanceAlgorithm(){}
virtual G4Nsplit_Weight Calculate(G4double ipre_over_ipost,
G4double init_w) const = 0;
// calculate the number of tracks and their weight according
// to the ratio of pre over post importance and the weight of
// the mother track.
};
#endif
@@ -0,0 +1,56 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4VImportanceSplitExaminer.hh,v 1.1 2002/05/31 08:07:47 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4VImportanceSplitExaminer
//
// Class description:
//
// This interface is used internally by importance sampling.
// It delivers G4Nsplit_Weight according to a track weight.
// An implementation of the interface decides how to obtain
// remaining necessary information about the ratio of importances
// in the pre and post "cell".
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4VImportanceSplitExaminer_hh
#define G4VImportanceSplitExaminer_hh G4VImportanceSplitExaminer_hh
#include "globals.hh"
#include "G4Nsplit_Weight.hh"
class G4VImportanceSplitExaminer
{
public: // with description
virtual ~G4VImportanceSplitExaminer(){}
virtual G4Nsplit_Weight Examine(G4double w) const = 0;
// Get G4Nsplit_Weight for a given mother track weight.
};
#endif
@@ -0,0 +1,79 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4VPGeoDriver.hh,v 1.3 2002/04/10 13:13:07 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4VPGeoDriver
//
// Class description:
//
// Used internally by importance sampling and scoring in a "parallel"
// geometry.
// It defines an interface to "drive" or "move" a particle in a
// "parallel" geometry.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4VPGeoDriver_hh
#define G4VPGeoDriver_hh G4VPGeoDriver_hh
#include "globals.hh"
#include "G4ThreeVector.hh"
#include "G4PTouchableKey.hh"
class G4VPGeoDriver
{
public: // with description
virtual ~G4VPGeoDriver(){}
virtual G4PTouchableKey LocateOnBoundary(const G4ThreeVector &aPosition,
const G4ThreeVector &aDirection) = 0;
// The location of a track according to it's position
// and direction in case the track crosses a boundary
// of a "parallel" geometry.
// Must be called in the PostDOIT of the ParallelTransportation.
// (The track crosses the boundary if PostDOIT gets called.)
virtual G4PTouchableKey GetCurrentTouchableKey() const = 0;
// get the current G4PTouchableKey of the "parallel" geometry
virtual G4double ComputeStepLengthInit(const G4ThreeVector &aPosition,
const G4ThreeVector &aDirection) = 0;
// compute step length for a starting track.
virtual G4double ComputeStepLengthCrossBoundary(const G4ThreeVector &aPosition,
const G4ThreeVector &aDirection) = 0;
// compute the step length after a track crossed a boundary
// in a "parallel" geometry
virtual G4double ComputeStepLengthInVolume(const G4ThreeVector &aPosition,
const G4ThreeVector &aDirection) = 0;
// compute step length when track moves inside a volume.
};
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4VPScorer.hh,v 1.3 2002/04/10 13:13:07 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4VPScorer
//
// Class description:
//
// This interface is known by scoring. Implementation of
// scorers should inherit from it.
// A scorer is applicable to a particle type.
// The scorer (inheriting from this interface) is informed
// about every step of a particle of a the applicable type.
// The information consists of the G4Step and the G4PStep
// (see G4PStep.hh).
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4VPScorer_hh
#define G4VPScorer_hh G4VPScorer_hh
class G4Step;
class G4PStep;
class G4VPScorer
{
public: // with description
virtual ~G4VPScorer() {}
virtual void Score(const G4Step &step, const G4PStep &pstep) = 0;
// perform scoring for the G4Step and G4PStep
};
#endif
@@ -0,0 +1,69 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4VParallelStepper.hh,v 1.3 2002/04/10 13:13:07 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4VParallelStepper
//
// Class description:
//
// This interface is used internally by importance sampling and scoring
// in a "parallel" geometry.
// It abstracts a parallel stepper which servs to comunicate
// information about a G4PStep between the "transportation"
// (done by G4ParallelTransport) of a track in a "parallel" geometry
// and a scorer for that geometry.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4VParallelStepper_hh
#define G4VParallelStepper_hh G4VParallelStepper_hh
#include "G4PStep.hh"
class G4VParallelStepper
{
public: // with description
virtual ~G4VParallelStepper(){}
virtual G4PStep GetPStep() const = 0;
// get the current G4PStep
virtual void Init(const G4PTouchableKey &aptk) = 0;
// initialise the parallel stepper and the G4PStep
// pre and post G4PTouchableKey of the step are set equal
virtual void Update(const G4PTouchableKey &aptk) = 0;
// to be called when crossing a boundary of the
// "parallel" geometry to update the G4PStep
virtual void UnSetCrossBoundary() = 0;
// to be called to unset the fCrossBoundary member of the G4PStep
};
#endif
@@ -0,0 +1,69 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4VWeightWindowAlgorithm.hh,v 1.2 2002/05/30 16:00:55 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4VWeightWindowAlgorithm
//
// Class description:
//
// This is a base class for an algorithm used for
// weight window importance sampling. It calculates
// the new weight of particles and the number of copies
// it should be split into according to the initial weight
// of the track and the importance of the cell. The window
// is defined by the values of Upper and Lower.
//
//
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4VWeightWindowAlgorithm_hh
#define G4VWeightWindowAlgorithm_hh G4VWeightWindowAlgorithm_hh
#include "G4Nsplit_Weight.hh"
class G4VWeightWindowAlgorithm
{
public: // with description
virtual ~G4VWeightWindowAlgorithm(){}
virtual void SetUpperLimit(G4double Upper) = 0;
// set upper limiting factor for window
virtual void SetLowerLimit(G4double Lower) = 0;
// set lower limiting facotr for window
virtual G4Nsplit_Weight Calculate(G4double init_w,
G4double importance) const = 0;
// calculate the number of tracks and their weight according
// to the upper and lower limmiting factors of the window
// and the initial weight
};
#endif
@@ -0,0 +1,76 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4WeightWindowAlgorithm.hh,v 1.2 2002/05/30 16:00:55 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// ----------------------------------------------------------------------
// Class G4WeightWindowAlgorithm
//
// Class description:
// see also G4VWeightWindowAlgorithm.
//
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4WeightWindowAlgorithm_hh
#define G4WeightWindowAlgorithm_hh G4WeightWindowAlgorithm_hh
#include "G4Nsplit_Weight.hh"
#include "G4VWeightWindowAlgorithm.hh"
class G4WeightWindowAlgorithm : public G4VWeightWindowAlgorithm
{
public: // with description
G4WeightWindowAlgorithm();
~G4WeightWindowAlgorithm(){}
void SetUpperLimit(G4double Upper);
// set upper limiting factor for window
// - Upper is the maximum factor by which the weight of a particle may
// be higher than it should be according to the importance
void SetLowerLimit(G4double Lower);
// set lower limiting facotr for window
// - Lower is the minimal factor by which the wight may be
// lower than it should be according to the importance
G4Nsplit_Weight Calculate(G4double init_w,
G4double importance) const;
// calculate the number of tracks and their weight according
// to the upper and lower limmiting factors of the window
// and the initial weight
// - init_w is the initial weight of the particle
// - importance is the importance of the cell
private:
G4double fUpper;
G4double fLower;
};
#endif