Import Geant4 9.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:16:48 +02:00
parent 75c7fd177d
commit a8e9364cea
6592 changed files with 84274 additions and 69292 deletions
@@ -0,0 +1,73 @@
//
// ********************************************************************
// * 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-00 $
//
// ----------------------------------------------------------------------
// 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
@@ -0,0 +1,107 @@
//
// ********************************************************************
// * 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: G4GeometrySampler.hh,v 1.9 2007/06/01 09:52:23 ahoward Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
// ----------------------------------------------------------------------
// Class G4GeometrySampler
//
// Class description:
// This class inherits from G4VSampler. It is used for scoring and
// importance sampling in the tracking (mass) geometry.
// See also the description in G4VSampler.hh.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4GeometrySampler_hh
#define G4GeometrySampler_hh G4GeometrySampler_hh
#include "G4Types.hh"
#include "G4String.hh"
#include "G4VSampler.hh"
#include "G4VSamplerConfigurator.hh"
class G4ImportanceConfigurator;
class G4WeightWindowConfigurator;
//class G4ScoreConfigurator;
class G4WeightCutOffConfigurator;
class G4VGCellFinder;
class G4GeometrySampler : public G4VSampler
{
public: // with description
explicit G4GeometrySampler(G4VPhysicalVolume *worldvolume, const G4String &particlename);
virtual ~G4GeometrySampler();
// virtual void PrepareScoring(G4VScorer *Scorer);
virtual void PrepareImportanceSampling(G4VIStore *istore,
const G4VImportanceAlgorithm
*ialg);
virtual void PrepareWeightRoulett(G4double wsurvive,
G4double wlimit,
G4double isource);
virtual void PrepareWeightWindow(G4VWeightWindowStore *wwstore,
G4VWeightWindowAlgorithm *wwAlg,
G4PlaceOfAction placeOfAction);
virtual void Configure();
virtual void ClearSampling();
virtual G4bool IsConfigured() const;
void SetParallel(G4bool paraflag);
void SetParticle(const G4String &particlename);
private:
G4GeometrySampler(const G4GeometrySampler &);
G4GeometrySampler &
operator=(const G4GeometrySampler &);
private:
G4String fParticleName;
G4VPhysicalVolume* fWorld;
G4ImportanceConfigurator *fImportanceConfigurator;
// G4ScoreConfigurator *fScoreConfigurator;
G4VGCellFinder *fGCellFinder;
G4WeightCutOffConfigurator *fWeightCutOffConfigurator;
G4VIStore *fIStore;
G4WeightWindowConfigurator *fWeightWindowConfigurator;
G4VWeightWindowStore *fWWStore;
G4bool fIsConfigured;
G4Configurators fConfigurators;
G4bool paraflag;
};
#endif
@@ -0,0 +1,87 @@
//
// ********************************************************************
// * 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: G4ImportanceConfigurator.hh,v 1.3 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
// ----------------------------------------------------------------------
// Class G4ImportanceConfigurator
//
// Class description:
// This class builds and places the G4ImportanceProcess.
// If the object is deleted the process is removed from the
// process list.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4ImportanceConfigurator_hh
#define G4ImportanceConfigurator_hh G4ImportanceConfigurator_hh
#include "G4Types.hh"
#include "G4ProcessPlacer.hh"
#include "G4VSamplerConfigurator.hh"
class G4ImportanceProcess;
class G4VImportanceAlgorithm;
class G4VIStore;
class G4VPhysicalVolume;
class G4ImportanceConfigurator : public G4VSamplerConfigurator
{
public: // with description
G4ImportanceConfigurator(G4VPhysicalVolume* worldvolume,
const G4String &particlename,
G4VIStore &istore,
const G4VImportanceAlgorithm *ialg,
G4bool paraflag);
virtual ~G4ImportanceConfigurator();
virtual void Configure(G4VSamplerConfigurator *preConf);
virtual const G4VTrackTerminator *GetTrackTerminator() const;
private:
G4ImportanceConfigurator(const G4ImportanceConfigurator &);
G4ImportanceConfigurator &
operator=(const G4ImportanceConfigurator &);
G4VPhysicalVolume* fWorld;
G4ProcessPlacer fPlacer;
G4VIStore &fIStore;
G4bool fDeleteIalg;
const G4VImportanceAlgorithm *fIalgorithm;
G4ImportanceProcess *fImportanceProcess;
G4bool paraflag;
};
#endif
@@ -0,0 +1,164 @@
//
// ********************************************************************
// * 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: G4ImportanceProcess.hh,v 1.3 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
// ----------------------------------------------------------------------
// Class G4ImportanceProcess
//
// Class description:
//
// Used internally by importance sampling in the "mass" geometry.
// This process is a forced post step process. I will apply
// importance sampling if the particle crosses a boundary in the
// "mass" geometry.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4ImportanceProcess_hh
#define G4ImportanceProcess_hh G4ImportanceProcess_hh
#include "G4VProcess.hh"
#include "G4VTrackTerminator.hh"
class G4SamplingPostStepAction;
class G4VImportanceAlgorithm;
class G4VIStore;
class G4Step;
class G4Navigator;
class G4TransportationManager;
class G4PathFinder;
class G4VTouchable;
#include "G4FieldTrack.hh"
#include "G4TouchableHandle.hh"
class G4ImportanceProcess : public G4VProcess, public G4VTrackTerminator
{
public: // with description
G4ImportanceProcess(const G4VImportanceAlgorithm &aImportanceAlgorithm,
const G4VIStore &aIstore,
const G4VTrackTerminator *TrackTerminator,
const G4String &aName = "ImportanceProcess", G4bool para = false);
// creates a G4ParticleChange
virtual ~G4ImportanceProcess();
// delete the G4ParticleChange
//--------------------------------------------------------------
// Set Paralle World
//--------------------------------------------------------------
void SetParallelWorld(G4String parallelWorldName);
void SetParallelWorld(G4VPhysicalVolume* parallelWorld);
//--------------------------------------------------------------
// Process interface
//--------------------------------------------------------------
void StartTracking(G4Track*);
virtual G4double
PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition);
// make process beeing forced
virtual G4VParticleChange *PostStepDoIt(const G4Track&, const G4Step&);
// manage the importance sampling in the "mass" geometry
virtual void KillTrack() const;
// used in case no scoring process follows that does the killing
virtual const G4String &GetName() const;
public: // without description
// no operation in AtRestDoIt and AlongStepDoIt
virtual G4double
AlongStepGetPhysicalInteractionLength(const G4Track&,
G4double ,
G4double ,
G4double& ,
G4GPILSelection*);
virtual G4double
AtRestGetPhysicalInteractionLength(const G4Track& ,
G4ForceCondition*);
virtual G4VParticleChange*
AtRestDoIt(const G4Track&, const G4Step&);
virtual G4VParticleChange*
AlongStepDoIt(const G4Track&, const G4Step&);
private:
G4ImportanceProcess(const G4ImportanceProcess &);
G4ImportanceProcess &operator=(const G4ImportanceProcess &);
private:
void CopyStep(const G4Step & step);
G4Step * fGhostStep;
G4StepPoint * fGhostPreStepPoint;
G4StepPoint * fGhostPostStepPoint;
G4ParticleChange *fParticleChange;
const G4VImportanceAlgorithm &fImportanceAlgorithm;
const G4VIStore &fIStore;
G4SamplingPostStepAction *fPostStepAction;
G4TransportationManager* fTransportationManager;
G4PathFinder* fPathFinder;
// -------------------------------
// Navigation in the Ghost World:
// -------------------------------
G4String fGhostWorldName;
G4VPhysicalVolume* fGhostWorld;
G4Navigator* fGhostNavigator;
G4int fNavigatorID;
G4TouchableHandle fOldGhostTouchable;
G4TouchableHandle fNewGhostTouchable;
G4FieldTrack fFieldTrack;
G4double fGhostSafety;
G4bool fOnBoundary;
G4bool paraflag;
};
#endif
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * 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: G4PlaceOfAction.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
// ----------------------------------------------------------------------
// Class G4PlaceOfAction
//
// Class description:
// This is an enum to specify when weight window sampling shoul be
// applied: onBoundary, onCollision, onBoundaryAndCollision.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4PlaceOfAction_hh
#define G4PlaceOfAction_hh G4PlaceOfAction_hh
enum G4PlaceOfAction
{
onBoundary = 1,
onCollision = 2,
onBoundaryAndCollision = 3
};
#endif
@@ -0,0 +1,94 @@
//
// ********************************************************************
// * 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: G4ProcessPlacer.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
// ----------------------------------------------------------------------
// Class G4ProcessPlacer
//
// Class description:
//
// Used internally by importance sampling and scoring.
// See G4VProcessPlacer.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4ProcessPlacer_hh
#define G4ProcessPlacer_hh G4ProcessPlacer_hh
#include "G4Types.hh"
#include "G4String.hh"
#include "G4VProcessPlacer.hh"
class G4ProcessManager;
class G4ProcessVector;
class G4ProcessPlacer : public G4VProcessPlacer
{
public: // with description
explicit G4ProcessPlacer(const G4String &particlename);
// create a process placer for a particle type
virtual ~G4ProcessPlacer();
virtual void AddProcessAsLastDoIt(G4VProcess *process);
// place a post step do it process such that the
// PostStepDoIt function is called last
// THE ORDER CHANGES BY SUBSEQUENT CALLS
virtual void AddProcessAsSecondDoIt(G4VProcess *process);
// place a post step do it process such that the
// PostStepDoIt function is called second
// THE ORDER CHANGES BY SUBSEQUENT CALLS
virtual void RemoveProcess(G4VProcess *process);
// removes a given process
enum SecondOrLast
{
eSecond = 1,
eLast = 0
};
private:
G4ProcessManager *GetProcessManager();
void AddProcessAs(G4VProcess *process, SecondOrLast);
void PrintProcVec(G4ProcessVector* processVec);
void PrintPostStepGPILVec();
void PrintPostStepDoItVec();
private:
G4String fParticleName;
};
#endif
@@ -0,0 +1,78 @@
//
// ********************************************************************
// * 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: G4SamplingPostStepAction.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
// ----------------------------------------------------------------------
// Class G4SamplingPostStepAction
//
// Class description:
//
// Used internally by importance and weight window sampling.
// Creates cloned tracks or kills tracks.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4SamplingPostStepAction_hh
#define G4SamplingPostStepAction_hh G4SamplingPostStepAction_hh
class G4VImportanceSplitExaminer;
class G4ParticleChange;
class G4Track;
class G4Step;
class G4Nsplit_Weight;
class G4VTrackTerminator;
class G4SamplingPostStepAction
{
public: // with description
explicit G4SamplingPostStepAction(const G4VTrackTerminator &TrackTerminator);
// Constructor
~G4SamplingPostStepAction();
// Destructor
void DoIt(const G4Track& aTrack,
G4ParticleChange *aParticleChange,
const G4Nsplit_Weight &nw);
// Do the PostStepDoIt part common to importance and weight window
// sampling in the
// "mass" and "parallel" geometry.
private:
void Split(const G4Track &aTrack,
const G4Nsplit_Weight &nw,
G4ParticleChange *aParticleChange);
const G4VTrackTerminator &fTrackTerminator;
};
#endif
@@ -0,0 +1,70 @@
//
// ********************************************************************
// * 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: G4TrackTerminator.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
// ----------------------------------------------------------------------
// Class G4TrackTerminator
//
// Class description:
//
// This is an interface for an object which can be called to kill a track.
// The type it provides is needed in case importance biasing and scoring
// is done at the same time.
// For navigation in the parallel geometry which is done by the importance
// biasing process (it derives from G4ParallelTransport), importance
// biasing has to be done before scoring (to score the correct volume).
// But since scoring would not be called if the importance biasing kills
// a track, it only tells a G4TrackTerminator to kill the track.
// The scoring process implements the interface G4TrackTerminator
// and is now able to kill the track after it has performed the scoring.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4TrackTerminator_hh
#define G4TrackTerminator_hh G4TrackTerminator_hh
#include "G4Types.hh"
class G4TrackTerminator
{
public: // without description
G4TrackTerminator()
: fKillTrack(false) {}
~G4TrackTerminator();
void SetKillTrack(){fKillTrack = true;}
G4bool GetKillTrack() const {return fKillTrack;}
private:
G4bool fKillTrack;
};
#endif
@@ -0,0 +1,70 @@
//
// ********************************************************************
// * 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: G4VProcessPlacer.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
// ----------------------------------------------------------------------
// Class G4VProcessPlacer
//
// Class description:
//
// Used internally by importance sampling and scoring to place
// processes as second or last PostStepDoIt processes.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4VProcessPlacer_hh
#define G4VProcessPlacer_hh G4VProcessPlacer_hh
#include "G4Types.hh"
class G4VProcess;
class G4VProcessPlacer
{
public: // with description
G4VProcessPlacer();
virtual ~G4VProcessPlacer();
virtual void AddProcessAsLastDoIt(G4VProcess *process) = 0;
// place a post step do it process such that the
// PostStepDoIt function is called last
// THE ORDER CHANGES BY SUBSEQUENT CALLS
virtual void AddProcessAsSecondDoIt(G4VProcess *process) = 0;
// place a post step do it process such that the
// PostStepDoIt function is called second
// THE ORDER CHANGES BY SUBSEQUENT CALLS
virtual void RemoveProcess(G4VProcess *process) = 0;
// removes a given process
};
#endif
@@ -0,0 +1,92 @@
//
// ********************************************************************
// * 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: G4VSampler.hh,v 1.8 2007/06/25 06:57:22 ahoward Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
// ----------------------------------------------------------------------
// Class G4VSampler
//
// Class description:
//
// This interface describes a configurable sampler.
// It applies to a given particle type.
// Concrete classes with this interface may be used for
// scoring, importance sampling and weight cutoff (weight roulette).
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4VSampler_hh
#define G4VSampler_hh G4VSampler_hh
#include "G4Types.hh"
#include "G4PlaceOfAction.hh"
class G4VPhysicalVolume;
class G4VImportanceAlgorithm;
class G4VIStore;
class G4VWeightWindowAlgorithm;
class G4VWeightWindowStore;
//class G4VScorer;
class G4VSampler
{
public: // with description
G4VSampler();
virtual ~G4VSampler();
// virtual void PrepareScoring(G4VScorer *Scorer) = 0;
// virtual void PrepareScoring() = 0;
virtual void PrepareImportanceSampling(G4VIStore *istore,
const G4VImportanceAlgorithm
*ialg = 0) = 0;
virtual void PrepareWeightRoulett(G4double wsurvive = 0.5,
G4double wlimit = 0.25,
G4double isource = 1) = 0;
virtual void PrepareWeightWindow(G4VWeightWindowStore *wwstore,
G4VWeightWindowAlgorithm *wwAlg = 0,
G4PlaceOfAction placeOfAction =
onBoundary) = 0;
virtual void Configure() = 0;
virtual void ClearSampling() = 0;
// clear the sampler and remove the processes
virtual G4bool IsConfigured() const = 0;
// check if some initialization hase already been done
virtual void SetParallel(G4bool paraflag) = 0;
};
#endif
@@ -0,0 +1,70 @@
//
// ********************************************************************
// * 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: G4VSamplerConfigurator.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
// ----------------------------------------------------------------------
// Class G4VSamplerConfigurator
//
// Class description:
//
// This is an interface for configurators setting up processes
// needed for importance sampling and scoring.
// The Configurator may be given a pointer to another Configurator.
// If a configurator will be given a pointer to another configurator
// it may obtain a G4VTrackTerminator from the given Configurator.
// This way it is possible to delegate the killing of a track.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4VSamplerConfigurator_hh
#define G4VSamplerConfigurator_hh G4VSamplerConfigurator_hh
#include "G4Types.hh"
#include <vector>
class G4VTrackTerminator;
class G4VSamplerConfigurator
{
public: // with description
G4VSamplerConfigurator();
virtual ~G4VSamplerConfigurator();
virtual void Configure(G4VSamplerConfigurator *preConf) = 0;
// Do the configuration, if preConf is given a
// G4VTrackTerminator may be obtained from it.
virtual const G4VTrackTerminator *GetTrackTerminator() const = 0;
// Return a G4VTrackTerminator or 0.
};
typedef std::vector<G4VSamplerConfigurator *> G4Configurators;
#endif
@@ -0,0 +1,84 @@
//
// ********************************************************************
// * 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: G4WeightCutOffConfigurator.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
// ----------------------------------------------------------------------
// Class G4WeightCutOffConfigurator
//
// Class description:
// This class builds and places the G4WeightCutOffProcess.
// If the object is deleted the process is removed from the
// process list.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4WeightCutOffConfigurator_hh
#define G4WeightCutOffConfigurator_hh G4WeightCutOffConfigurator_hh
#include "G4Types.hh"
#include "G4VSamplerConfigurator.hh"
#include "G4ProcessPlacer.hh"
class G4WeightCutOffProcess;
class G4VGCellFinder;
class G4VIStore;
class G4VPhysicalVolume;
class G4WeightCutOffConfigurator : public G4VSamplerConfigurator
{
public: // with description
G4WeightCutOffConfigurator(G4VPhysicalVolume* worldvolume,
const G4String &particlename,
G4double wsurvival,
G4double wlimit,
G4double isource,
G4VIStore *istore,
const G4VGCellFinder &aGCellFinder,G4bool paraflag);
virtual ~G4WeightCutOffConfigurator();
virtual void Configure(G4VSamplerConfigurator *preConf);
virtual const G4VTrackTerminator *GetTrackTerminator() const ;
private:
G4WeightCutOffConfigurator(const G4WeightCutOffConfigurator&);
G4WeightCutOffConfigurator &
operator=(const G4WeightCutOffConfigurator&);
G4VPhysicalVolume* fWorld;
G4ProcessPlacer fPlacer;
G4WeightCutOffProcess *fWeightCutOffProcess;
G4bool fPlaced;
G4bool paraflag;
};
#endif
@@ -0,0 +1,159 @@
//
// ********************************************************************
// * 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: G4WeightCutOffProcess.hh,v 1.2 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
// ----------------------------------------------------------------------
// Class G4WeightCutOffProcess
//
// Class description:
//
// Process for biasing particle-change cutoff.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4WeightCutOffProcess_hh
#define G4WeightCutOffProcess_hh G4WeightCutOffProcess_hh
#include "G4VProcess.hh"
#include "G4VTrackTerminator.hh"
#include "G4GeometryCell.hh"
class G4VGCellFinder;
class G4VIStore;
class G4Step;
class G4Navigator;
class G4TransportationManager;
class G4PathFinder;
class G4VTouchable;
#include "G4FieldTrack.hh"
#include "G4TouchableHandle.hh"
class G4WeightCutOffProcess : public G4VProcess
{
public: // with description
G4WeightCutOffProcess(G4double wsurvival,
G4double wlimit,
G4double isource,
G4VIStore *istore,
const G4VGCellFinder &aGCellFinder,
const G4String &aName = "WeightCutOffProcess", G4bool para = false);
// create a G4ParticleChange
virtual ~G4WeightCutOffProcess();
// delete the G4ParticleChange
//--------------------------------------------------------------
// Set Paralle World
//--------------------------------------------------------------
void SetParallelWorld(G4String parallelWorldName);
void SetParallelWorld(G4VPhysicalVolume* parallelWorld);
//--------------------------------------------------------------
// Process interface
//--------------------------------------------------------------
void StartTracking(G4Track*);
virtual G4double
PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition);
// make the process beeing forced
virtual G4VParticleChange * PostStepDoIt(const G4Track&,
const G4Step&);
const G4String &GetName() const;
public: // without description
// no operation in AtRestDoIt and AlongStepDoIt
virtual G4double
AlongStepGetPhysicalInteractionLength(const G4Track&,
G4double ,
G4double ,
G4double& ,
G4GPILSelection*);
virtual G4double
AtRestGetPhysicalInteractionLength(const G4Track& ,
G4ForceCondition*);
virtual G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&);
virtual G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&);
private:
void CopyStep(const G4Step & step);
G4Step * fGhostStep;
G4StepPoint * fGhostPreStepPoint;
G4StepPoint * fGhostPostStepPoint;
G4WeightCutOffProcess(const G4WeightCutOffProcess &);
G4WeightCutOffProcess &operator=(const G4WeightCutOffProcess &);
G4ParticleChange *fParticleChange;
G4double fWeightSurvival;
G4double fWeightLimit;
G4double fSourceImportance;
G4VIStore *fIStore;
const G4VGCellFinder &fGCellFinder;
G4TransportationManager* fTransportationManager;
G4PathFinder* fPathFinder;
// -------------------------------
// Navigation in the Ghost World:
// -------------------------------
G4String fGhostWorldName;
G4VPhysicalVolume* fGhostWorld;
G4Navigator* fGhostNavigator;
G4int fNavigatorID;
G4TouchableHandle fOldGhostTouchable;
G4TouchableHandle fNewGhostTouchable;
G4FieldTrack fFieldTrack;
G4double fGhostSafety;
G4bool fOnBoundary;
G4bool paraflag;
};
#endif
@@ -0,0 +1,87 @@
//
// ********************************************************************
// * 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: G4WeightWindowConfigurator.hh,v 1.3 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
// ----------------------------------------------------------------------
// Class G4WeightWindowConfigurator
//
// Class description:
// Configuration of weight window processes.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4WeightWindowConfigurator_hh
#define G4WeightWindowConfigurator_hh G4WeightWindowConfigurator_hh
#include "G4Types.hh"
#include "G4ProcessPlacer.hh"
#include "G4VSamplerConfigurator.hh"
#include "G4PlaceOfAction.hh"
class G4VWeightWindowStore;
class G4VWeightWindowAlgorithm;
class G4WeightWindowProcess;
class G4VPhysicalVolume;
class G4WeightWindowConfigurator : public G4VSamplerConfigurator
{
public: // with description
G4WeightWindowConfigurator(G4VPhysicalVolume* worldvolume,
const G4String &particlename,
G4VWeightWindowStore &wwstore,
const G4VWeightWindowAlgorithm *wwAlg,
G4PlaceOfAction placeOfAction,
G4bool paraflag);
virtual ~G4WeightWindowConfigurator();
virtual void Configure(G4VSamplerConfigurator *preConf);
virtual const G4VTrackTerminator *GetTrackTerminator() const;
private:
G4WeightWindowConfigurator(const G4WeightWindowConfigurator &);
G4WeightWindowConfigurator &
operator=(const G4WeightWindowConfigurator &);
G4VPhysicalVolume* fWorld;
G4ProcessPlacer fPlacer;
G4VWeightWindowStore &fWeightWindowStore;
G4bool fDeleteWWalg;
const G4VWeightWindowAlgorithm *fWWalgorithm;
G4WeightWindowProcess *fWeightWindowProcess;
G4PlaceOfAction fPlaceOfAction;
G4bool paraflag;
};
#endif
@@ -0,0 +1,170 @@
//
// ********************************************************************
// * 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: G4WeightWindowProcess.hh,v 1.3 2007/06/01 09:16:33 ahoward Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
// ----------------------------------------------------------------------
// Class G4MassWeioghtWindowProcess
//
// Class description:
//
// Used internally by weight window technique in the "mass" geometry.
// This process is a forced post step process. It will apply
// weight window biasing on boundaries, collisions
// or both according to the G4PlaceOfAction argument.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef G4MassWeioghtWindowProcess_hh
#define G4MassWeioghtWindowProcess_hh G4MassWeioghtWindowProcess_hh
#include "G4VProcess.hh"
#include "G4VTrackTerminator.hh"
#include "G4PlaceOfAction.hh"
class G4SamplingPostStepAction;
class G4VWeightWindowAlgorithm;
class G4VWeightWindowStore;
class G4Step;
class G4Navigator;
class G4TransportationManager;
class G4PathFinder;
class G4VTouchable;
#include "G4FieldTrack.hh"
#include "G4TouchableHandle.hh"
class G4WeightWindowProcess : public G4VProcess, public G4VTrackTerminator
{
public: // with description
G4WeightWindowProcess(const G4VWeightWindowAlgorithm &
aWeightWindowAlgorithm,
const G4VWeightWindowStore &aWWStore,
const G4VTrackTerminator *TrackTerminator,
G4PlaceOfAction placeOfAction,
const G4String &aName =
"WeightWindowProcess", G4bool para = false);
// creates a G4ParticleChange
virtual ~G4WeightWindowProcess();
// delete the G4ParticleChange
//--------------------------------------------------------------
// Set Paralle World
//--------------------------------------------------------------
void SetParallelWorld(G4String parallelWorldName);
void SetParallelWorld(G4VPhysicalVolume* parallelWorld);
//--------------------------------------------------------------
// Process interface
//--------------------------------------------------------------
void StartTracking(G4Track*);
virtual G4double
PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition);
// make process beeing forced
virtual G4VParticleChange *PostStepDoIt(const G4Track&, const G4Step&);
// aply weight window sampling
virtual void KillTrack() const;
// used in case no scoring process follows that does the killing
virtual const G4String &GetName() const;
public: // without description
// no operation in AtRestDoIt and AlongStepDoIt
virtual G4double
AlongStepGetPhysicalInteractionLength(const G4Track&,
G4double ,
G4double ,
G4double& ,
G4GPILSelection*);
virtual G4double
AtRestGetPhysicalInteractionLength(const G4Track& ,
G4ForceCondition*);
virtual G4VParticleChange*
AtRestDoIt(const G4Track&, const G4Step&);
virtual G4VParticleChange*
AlongStepDoIt(const G4Track&, const G4Step&);
private:
G4WeightWindowProcess(const G4WeightWindowProcess &);
G4WeightWindowProcess &operator=(const G4WeightWindowProcess &);
private:
void CopyStep(const G4Step & step);
G4Step * fGhostStep;
G4StepPoint * fGhostPreStepPoint;
G4StepPoint * fGhostPostStepPoint;
G4ParticleChange *fParticleChange;
const G4VWeightWindowAlgorithm &fWeightWindowAlgorithm;
const G4VWeightWindowStore &fWeightWindowStore;
G4SamplingPostStepAction *fPostStepAction;
G4PlaceOfAction fPlaceOfAction;
G4TransportationManager* fTransportationManager;
G4PathFinder* fPathFinder;
// -------------------------------
// Navigation in the Ghost World:
// -------------------------------
G4String fGhostWorldName;
G4VPhysicalVolume* fGhostWorld;
G4Navigator* fGhostNavigator;
G4int fNavigatorID;
G4TouchableHandle fOldGhostTouchable;
G4TouchableHandle fNewGhostTouchable;
G4FieldTrack fFieldTrack;
G4double fGhostSafety;
G4bool fOnBoundary;
G4bool paraflag;
};
#endif