Import Geant4 9.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.112 2007/02/15 19:02:06 japost Exp $
|
||||
$Id: History,v 1.119.2.2 2007/05/31 08:03:11 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -12,10 +12,40 @@ to briefly summarize all major modifications introduced in the code
|
||||
and keep track of all category-tags.
|
||||
It DOES NOT substitute the CVS log-message one should put at every
|
||||
committal in the CVS repository !
|
||||
|
||||
`
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
May 31st, 2007, A.Howard transport-V08-03-12
|
||||
------------------------
|
||||
- Archived classes for old biasing scheme, now replaced in module
|
||||
processes/biasing. Removed classes:
|
||||
G4MImportanceConfigurator, G4MScoreConfigurator, G4MScoreProcess,
|
||||
G4MWeightWindowConfigurator, G4MassGCellFinder, G4MassGeometrySampler,
|
||||
G4MassImportanceProcess, G4MassWeightWindowProcess,
|
||||
G4PImportanceConfigurator, G4PScoreConfigurator, G4PScoreProcess,
|
||||
G4PWeightWindowConfigurator, G4ParallelGCellFinder,
|
||||
G4ParallelGeometrySampler, G4ParallelImportanceProcess, G4ParallelTransport,
|
||||
G4ParallelTransportConfigurator, G4ParallelWWnTransportProcess,
|
||||
G4ParallelWeightWindowProcess, G4PlaceOfAction, G4ProcessPlacer,
|
||||
G4SamplingPostStepAction, G4VProcessPlacer, G4VSampler,
|
||||
G4VSamplerConfigurator, G4WeightCutOffConfigurator.
|
||||
|
||||
May 8th, 2007, G.Cosmo transport-V08-02-03a
|
||||
----------------------
|
||||
- Use call to G4GeometryTolerance instead of kCarTolerance in
|
||||
G4VTrackTerminator.
|
||||
- Requires tag "global-V08-03-00" and related tag set.
|
||||
|
||||
May 2nd, 2007, J.Apostolakis transport-V08-02-02
|
||||
----------------------------
|
||||
- G4CoupledTransportation:
|
||||
Make treatment of mass and full safety coherent (to-dos remain in PathFinder)
|
||||
Added storing of full safety in state; retrieve it after compute step
|
||||
from PathFinder; calculate them same way at start of step.
|
||||
Put back in the code for treating looping particles
|
||||
|
||||
February 15th, 2007, J.Apostolakis transport-V08-02-01
|
||||
----------------------------------
|
||||
- G4Transportation: protection against velocity=0 in AlongStep (invalid)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CoupledTransportation.hh,v 1.4 2006/11/14 09:12:59 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CoupledTransportation.icc,v 1.2 2006/11/14 09:12:59 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
//
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MImportanceConfigurator.hh,v 1.6 2006/06/29 21:09:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4MImportanceConfigurator
|
||||
//
|
||||
// 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 G4MImportanceConfigurator_hh
|
||||
#define G4MImportanceConfigurator_hh G4MImportanceConfigurator_hh
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4ProcessPlacer.hh"
|
||||
#include "G4VSamplerConfigurator.hh"
|
||||
|
||||
class G4MassImportanceProcess;
|
||||
class G4VImportanceAlgorithm;
|
||||
class G4VIStore;
|
||||
|
||||
class G4MImportanceConfigurator : public G4VSamplerConfigurator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4MImportanceConfigurator(const G4String &particlename,
|
||||
G4VIStore &istore,
|
||||
const G4VImportanceAlgorithm *ialg);
|
||||
|
||||
virtual ~G4MImportanceConfigurator();
|
||||
virtual void Configure(G4VSamplerConfigurator *preConf);
|
||||
virtual const G4VTrackTerminator *GetTrackTerminator() const;
|
||||
|
||||
private:
|
||||
|
||||
G4MImportanceConfigurator(const G4MImportanceConfigurator &);
|
||||
G4MImportanceConfigurator &
|
||||
operator=(const G4MImportanceConfigurator &);
|
||||
|
||||
G4ProcessPlacer fPlacer;
|
||||
G4VIStore &fIStore;
|
||||
G4bool fDeleteIalg;
|
||||
const G4VImportanceAlgorithm *fIalgorithm;
|
||||
G4MassImportanceProcess *fMassImportanceProcess;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,76 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MScoreConfigurator.hh,v 1.6 2006/06/29 21:09:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4MScoreConfigurator
|
||||
//
|
||||
// Class description:
|
||||
// This class builds and places the G4MScoreProcess.
|
||||
// If the object is deleted the process is removed from the
|
||||
// process list.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#ifndef G4MScoreConfigurator_hh
|
||||
#define G4MScoreConfigurator_hh G4MScoreConfigurator_hh
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4ProcessPlacer.hh"
|
||||
|
||||
#include "G4VSamplerConfigurator.hh"
|
||||
|
||||
class G4VScorer;
|
||||
class G4VTrackTerminator;
|
||||
class G4MScoreProcess;
|
||||
|
||||
class G4MScoreConfigurator : public G4VSamplerConfigurator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4MScoreConfigurator(const G4String &particlename,
|
||||
G4VScorer &scorer);
|
||||
virtual ~G4MScoreConfigurator();
|
||||
|
||||
virtual void Configure(G4VSamplerConfigurator *preConf);
|
||||
virtual const G4VTrackTerminator *GetTrackTerminator() const;
|
||||
|
||||
private:
|
||||
|
||||
G4MScoreConfigurator(const G4MScoreConfigurator&);
|
||||
G4MScoreConfigurator &operator=(const G4MScoreConfigurator&);
|
||||
|
||||
G4ProcessPlacer fPlacer;
|
||||
G4VScorer &fScorer;
|
||||
G4MScoreProcess *fMScoreProcess;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,109 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MScoreProcess.hh,v 1.9 2006/06/29 21:09:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4MScoreProcess
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Used internally by scoring in the "mass" world.
|
||||
// This is a forced post step process messaging a "scorer"
|
||||
// derived from G4VScorer.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
#ifndef G4MScoreProcess_hh
|
||||
#define G4MScoreProcess_hh G4MScoreProcess_hh
|
||||
|
||||
#include "G4VProcess.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
|
||||
class G4VScorer;
|
||||
|
||||
class G4MScoreProcess : public G4VProcess, public G4VTrackTerminator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
explicit G4MScoreProcess(G4VScorer &aScorer,
|
||||
const G4String &aName = "MScoreProcess");
|
||||
// take reference to scorer and coppy particle name and
|
||||
// create a G4ParticleChange
|
||||
|
||||
virtual ~G4MScoreProcess();
|
||||
// delete the G4ParticleChange
|
||||
|
||||
virtual G4double
|
||||
PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition);
|
||||
// make processed being forced
|
||||
|
||||
virtual G4VParticleChange * PostStepDoIt(const G4Track&, const G4Step&);
|
||||
// message "scorer" with G4Step and a G4GeometryCellStep from the "mass"
|
||||
// geometry
|
||||
|
||||
virtual void KillTrack() const;
|
||||
|
||||
// to be called by the importance process if the track should
|
||||
// be killed after scoring
|
||||
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:
|
||||
|
||||
G4MScoreProcess(const G4MScoreProcess &);
|
||||
G4MScoreProcess &operator=(const G4MScoreProcess &);
|
||||
|
||||
private:
|
||||
|
||||
G4VScorer &fScorer;
|
||||
mutable G4bool fKillTrack;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,79 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MWeightWindowConfigurator.hh,v 1.6 2006/06/29 21:09:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4MWeightWindowConfigurator
|
||||
//
|
||||
// Class description:
|
||||
// Configuration of weight window processes.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#ifndef G4MWeightWindowConfigurator_hh
|
||||
#define G4MWeightWindowConfigurator_hh G4MWeightWindowConfigurator_hh
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4ProcessPlacer.hh"
|
||||
#include "G4VSamplerConfigurator.hh"
|
||||
#include "G4PlaceOfAction.hh"
|
||||
|
||||
class G4VWeightWindowStore;
|
||||
class G4VWeightWindowAlgorithm;
|
||||
class G4MassWeightWindowProcess;
|
||||
|
||||
class G4MWeightWindowConfigurator : public G4VSamplerConfigurator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4MWeightWindowConfigurator(const G4String &particlename,
|
||||
G4VWeightWindowStore &wwstore,
|
||||
const G4VWeightWindowAlgorithm *wwAlg,
|
||||
G4PlaceOfAction placeOfAction);
|
||||
|
||||
virtual ~G4MWeightWindowConfigurator();
|
||||
virtual void Configure(G4VSamplerConfigurator *preConf);
|
||||
virtual const G4VTrackTerminator *GetTrackTerminator() const;
|
||||
|
||||
private:
|
||||
|
||||
G4MWeightWindowConfigurator(const G4MWeightWindowConfigurator &);
|
||||
G4MWeightWindowConfigurator &
|
||||
operator=(const G4MWeightWindowConfigurator &);
|
||||
|
||||
G4ProcessPlacer fPlacer;
|
||||
G4VWeightWindowStore &fWeightWindowStore;
|
||||
G4bool fDeleteWWalg;
|
||||
const G4VWeightWindowAlgorithm *fWWalgorithm;
|
||||
G4MassWeightWindowProcess *fMassWeightWindowProcess;
|
||||
G4PlaceOfAction fPlaceOfAction;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,60 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MassGCellFinder.hh,v 1.3 2006/06/29 21:09:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ParallelGCellFinder
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Finds a G4GeometryCell in the mass geometry.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
#ifndef G4MassGCellFinder_hh
|
||||
#define G4MassGCellFinder_hh G4MassGCellFinder_hh
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4VGCellFinder.hh"
|
||||
|
||||
class G4MassGCellFinder : public G4VGCellFinder
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4MassGCellFinder();
|
||||
virtual ~G4MassGCellFinder();
|
||||
|
||||
virtual G4GeometryCell
|
||||
GetPreGeometryCell(const G4Step &aStep) const;
|
||||
virtual G4GeometryCell
|
||||
GetPostGeometryCell(const G4Step &aStep) const;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,100 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MassGeometrySampler.hh,v 1.7 2006/06/29 21:09:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4MassGeometrySampler
|
||||
//
|
||||
// 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 G4MassGeometrySampler_hh
|
||||
#define G4MassGeometrySampler_hh G4MassGeometrySampler_hh
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4String.hh"
|
||||
#include "G4VSampler.hh"
|
||||
#include "G4VSamplerConfigurator.hh"
|
||||
|
||||
class G4MImportanceConfigurator;
|
||||
class G4MWeightWindowConfigurator;
|
||||
class G4MScoreConfigurator;
|
||||
class G4WeightCutOffConfigurator;
|
||||
class G4VGCellFinder;
|
||||
|
||||
class G4MassGeometrySampler : public G4VSampler
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
explicit G4MassGeometrySampler(const G4String &particlename);
|
||||
virtual ~G4MassGeometrySampler();
|
||||
|
||||
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;
|
||||
|
||||
private:
|
||||
|
||||
G4MassGeometrySampler(const G4MassGeometrySampler &);
|
||||
G4MassGeometrySampler &
|
||||
operator=(const G4MassGeometrySampler &);
|
||||
|
||||
private:
|
||||
|
||||
G4String fParticleName;
|
||||
G4MImportanceConfigurator *fMImportanceConfigurator;
|
||||
G4MScoreConfigurator *fMScoreConfigurator;
|
||||
G4VGCellFinder *fGCellFinder;
|
||||
G4WeightCutOffConfigurator *fWeightCutOffConfigurator;
|
||||
G4VIStore *fIStore;
|
||||
G4MWeightWindowConfigurator *fMWeightWindowConfigurator;
|
||||
G4VWeightWindowStore *fWWStore;
|
||||
G4bool fIsConfigured;
|
||||
G4Configurators fConfigurators;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MassImportanceProcess.hh,v 1.10 2006/06/29 21:09:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4MassImportanceProcess
|
||||
//
|
||||
// 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 G4MassImportanceProcess_hh
|
||||
#define G4MassImportanceProcess_hh G4MassImportanceProcess_hh
|
||||
|
||||
#include "G4VProcess.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
|
||||
class G4SamplingPostStepAction;
|
||||
class G4VImportanceAlgorithm;
|
||||
class G4VIStore;
|
||||
|
||||
class G4MassImportanceProcess : public G4VProcess, public G4VTrackTerminator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4MassImportanceProcess(const G4VImportanceAlgorithm &aImportanceAlgorithm,
|
||||
const G4VIStore &aIstore,
|
||||
const G4VTrackTerminator *TrackTerminator,
|
||||
const G4String &aName = "MassImportanceProcess");
|
||||
// creates a G4ParticleChange
|
||||
|
||||
virtual ~G4MassImportanceProcess();
|
||||
// delete the G4ParticleChange
|
||||
|
||||
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:
|
||||
|
||||
G4MassImportanceProcess(const G4MassImportanceProcess &);
|
||||
G4MassImportanceProcess &operator=(const G4MassImportanceProcess &);
|
||||
|
||||
private:
|
||||
|
||||
G4ParticleChange *fParticleChange;
|
||||
const G4VImportanceAlgorithm &fImportanceAlgorithm;
|
||||
const G4VIStore &fIStore;
|
||||
G4SamplingPostStepAction *fPostStepAction;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,120 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MassWeightWindowProcess.hh,v 1.5 2006/06/29 21:09:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// 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 G4MassWeightWindowProcess : public G4VProcess, public G4VTrackTerminator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4MassWeightWindowProcess(const G4VWeightWindowAlgorithm &
|
||||
aWeightWindowAlgorithm,
|
||||
const G4VWeightWindowStore &aWWStore,
|
||||
const G4VTrackTerminator *TrackTerminator,
|
||||
G4PlaceOfAction placeOfAction,
|
||||
const G4String &aName =
|
||||
"MassWeightWindowProcess");
|
||||
// creates a G4ParticleChange
|
||||
|
||||
virtual ~G4MassWeightWindowProcess();
|
||||
// delete the G4ParticleChange
|
||||
|
||||
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:
|
||||
|
||||
G4MassWeightWindowProcess(const G4MassWeightWindowProcess &);
|
||||
G4MassWeightWindowProcess &operator=(const G4MassWeightWindowProcess &);
|
||||
|
||||
private:
|
||||
|
||||
G4ParticleChange *fParticleChange;
|
||||
const G4VWeightWindowAlgorithm &fWeightWindowAlgorithm;
|
||||
const G4VWeightWindowStore &fWeightWindowStore;
|
||||
G4SamplingPostStepAction *fPostStepAction;
|
||||
G4PlaceOfAction fPlaceOfAction;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4NeutronKiller.hh,v 1.1 2006/11/17 15:53:04 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4NeutronKillerMessenger.hh,v 1.1 2006/11/17 15:53:04 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PImportanceConfigurator.hh,v 1.6 2006/06/29 21:10:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4PImportanceConfigurator
|
||||
//
|
||||
// Class description:
|
||||
// This class builds and places the G4PImportanceProcess.
|
||||
// If the object is deleted the process is removed from the
|
||||
// process list.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#ifndef G4PImportanceConfigurator_hh
|
||||
#define G4PImportanceConfigurator_hh G4PImportanceConfigurator_hh
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4VSamplerConfigurator.hh"
|
||||
#include "G4ImportanceSplitExaminer.hh"
|
||||
#include "G4ProcessPlacer.hh"
|
||||
|
||||
class G4ParallelWorld;
|
||||
class G4VImportanceAlgorithm;
|
||||
class G4ParallelImportanceProcess;
|
||||
|
||||
class G4PImportanceConfigurator : public G4VSamplerConfigurator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4PImportanceConfigurator(const G4String &particlename,
|
||||
G4ParallelWorld ¶llelWorld,
|
||||
G4VIStore &istore,
|
||||
const G4VImportanceAlgorithm *ialg);
|
||||
virtual ~G4PImportanceConfigurator();
|
||||
virtual void Configure(G4VSamplerConfigurator *preConf);
|
||||
virtual const G4VTrackTerminator *GetTrackTerminator() const;
|
||||
|
||||
private:
|
||||
|
||||
G4PImportanceConfigurator(const G4PImportanceConfigurator &);
|
||||
G4PImportanceConfigurator &
|
||||
operator=(const G4PImportanceConfigurator &);
|
||||
G4ProcessPlacer fPlacer;
|
||||
G4ParallelWorld &fPWorld;
|
||||
G4bool fDeleteIalg;
|
||||
const G4VImportanceAlgorithm *fIalgorithm;
|
||||
G4ImportanceSplitExaminer fExaminer;
|
||||
G4ParallelImportanceProcess *fParallelImportanceProcess;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,77 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PScoreConfigurator.hh,v 1.6 2006/06/29 21:10:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4PScoreConfigurator
|
||||
//
|
||||
// Class description:
|
||||
// This class builds and places the G4PScoreProcess.
|
||||
// If the object is deleted the process is removed from the
|
||||
// process list.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#ifndef G4PScoreConfigurator_hh
|
||||
#define G4PScoreConfigurator_hh G4PScoreConfigurator_hh
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4VSamplerConfigurator.hh"
|
||||
#include "G4ProcessPlacer.hh"
|
||||
|
||||
class G4VParallelStepper;
|
||||
class G4VScorer;
|
||||
class G4VTrackTerminator;
|
||||
class G4PScoreProcess;
|
||||
|
||||
class G4PScoreConfigurator : public G4VSamplerConfigurator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4PScoreConfigurator(const G4String &particlename,
|
||||
G4VParallelStepper &pstepper,
|
||||
G4VScorer &scorer);
|
||||
virtual ~G4PScoreConfigurator();
|
||||
|
||||
virtual void Configure(G4VSamplerConfigurator *preConf);
|
||||
virtual const G4VTrackTerminator *GetTrackTerminator() const;
|
||||
|
||||
private:
|
||||
|
||||
G4PScoreConfigurator(const G4PScoreConfigurator &);
|
||||
G4PScoreConfigurator &operator=(const G4PScoreConfigurator &);
|
||||
G4ProcessPlacer fPlacer;
|
||||
G4VParallelStepper &fPStepper;
|
||||
G4VScorer &fScorer;
|
||||
G4PScoreProcess *fPScoreProcess;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,117 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PScoreProcess.hh,v 1.9 2006/06/29 21:10:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4PIScoreProcess
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Used internally by scoring in a "parallel" geometry.
|
||||
// This forced process messages a "scorer" derived from G4VScorer.
|
||||
// The scorer is messaged with the current G4Step and G4GeometryCellStep.
|
||||
// This post step process is supposed to be placed as the
|
||||
// process following directly after transportation and the
|
||||
// importance sampling process if applied, and before all physical
|
||||
// post step processes.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
#ifndef G4PScoreProcess_hh
|
||||
#define G4PScoreProcess_hh G4PScoreProcess_hh
|
||||
|
||||
#include "G4VProcess.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
|
||||
class G4VParallelStepper;
|
||||
class G4VScorer;
|
||||
|
||||
class G4PScoreProcess : public G4VProcess,
|
||||
public G4VTrackTerminator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4PScoreProcess(G4VParallelStepper &astepper,
|
||||
G4VScorer &aScorer,
|
||||
const G4String &aName = "PScoreProcess");
|
||||
// create a G4ParticleChange
|
||||
|
||||
virtual ~G4PScoreProcess();
|
||||
// delete the G4ParticleChange
|
||||
|
||||
virtual G4double
|
||||
PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition);
|
||||
// make the process beeing forced
|
||||
|
||||
virtual G4VParticleChange * PostStepDoIt(const G4Track&,
|
||||
const G4Step&);
|
||||
// get G4GeometryCellStep and G4Step and message "scorer"
|
||||
|
||||
virtual void KillTrack() const;
|
||||
|
||||
virtual const G4String &GetName() const;
|
||||
|
||||
// to be called by the importance process if the track should
|
||||
// be killed after scoring
|
||||
|
||||
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:
|
||||
|
||||
G4PScoreProcess(const G4PScoreProcess &);
|
||||
G4PScoreProcess &operator=(const G4PScoreProcess &);
|
||||
|
||||
G4VParallelStepper &fPstepper;
|
||||
G4VScorer &fScorer;
|
||||
|
||||
mutable G4bool fKillTrack;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PWeightWindowConfigurator.hh,v 1.5 2006/06/29 21:10:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4PWeightWindowConfigurator
|
||||
//
|
||||
// Class description:
|
||||
// Configures the weight window processes for the parallel geometry.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#ifndef G4PWeightWindowConfigurator_hh
|
||||
#define G4PWeightWindowConfigurator_hh G4PWeightWindowConfigurator_hh
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4ProcessPlacer.hh"
|
||||
#include "G4VSamplerConfigurator.hh"
|
||||
#include "G4PlaceOfAction.hh"
|
||||
#include "G4WeightWindowExaminer.hh"
|
||||
|
||||
class G4VWeightWindowStore;
|
||||
class G4VWeightWindowAlgorithm;
|
||||
class G4ParallelWorld;
|
||||
class G4ParallelWeightWindowProcess;
|
||||
|
||||
class G4PWeightWindowConfigurator : public G4VSamplerConfigurator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4PWeightWindowConfigurator(const G4String &particlename,
|
||||
G4ParallelWorld ¶llelWorld,
|
||||
G4VWeightWindowStore &wwstore,
|
||||
const G4VWeightWindowAlgorithm *wwAlg,
|
||||
G4PlaceOfAction placeOfAction);
|
||||
|
||||
virtual ~G4PWeightWindowConfigurator();
|
||||
virtual void Configure(G4VSamplerConfigurator *preConf);
|
||||
virtual const G4VTrackTerminator *GetTrackTerminator() const;
|
||||
|
||||
private:
|
||||
|
||||
G4PWeightWindowConfigurator(const G4PWeightWindowConfigurator &);
|
||||
G4PWeightWindowConfigurator &
|
||||
operator=(const G4PWeightWindowConfigurator &);
|
||||
|
||||
G4ProcessPlacer fPlacer;
|
||||
G4ParallelWorld &fPWorld;
|
||||
G4bool fDeleteWWalg;
|
||||
const G4VWeightWindowAlgorithm *fWWalgorithm;
|
||||
G4WeightWindowExaminer fExaminer;
|
||||
G4VProcess *fParallelWWProcess;
|
||||
G4PlaceOfAction fPlaceOfAction;
|
||||
G4VTrackTerminator *fTrackTerminator;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,67 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelGCellFinder.hh,v 1.3 2006/06/29 21:10:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ParallelGCellFinder
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Finds a G4GeometryCell in the parallel geometry.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#ifndef G4ParallelGCellFinder_hh
|
||||
#define G4ParallelGCellFinder_hh G4ParallelGCellFinder_hh
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4VGCellFinder.hh"
|
||||
|
||||
class G4VParallelStepper;
|
||||
|
||||
class G4ParallelGCellFinder : public G4VGCellFinder
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
explicit G4ParallelGCellFinder(const G4VParallelStepper &astepper);
|
||||
virtual ~G4ParallelGCellFinder();
|
||||
|
||||
virtual G4GeometryCell
|
||||
GetPreGeometryCell(const G4Step &aStep) const;
|
||||
virtual G4GeometryCell
|
||||
GetPostGeometryCell(const G4Step &aStep) const;
|
||||
|
||||
private:
|
||||
|
||||
const G4VParallelStepper &fPStepper;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,107 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelGeometrySampler.hh,v 1.8 2006/06/29 21:10:10 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ParallelGeometrySampler
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Class description:
|
||||
// This class inherits from G4VSampler. It is used for scoring and
|
||||
// importance sampling in a parallel geometry.
|
||||
// See also the description in G4VSampler.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
#ifndef G4ParallelGeometrySampler_hh
|
||||
#define G4ParallelGeometrySampler_hh G4ParallelGeometrySampler_hh
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4VSampler.hh"
|
||||
#include "G4ParallelWorld.hh"
|
||||
#include "G4VSamplerConfigurator.hh"
|
||||
|
||||
class G4ParallelTransportConfigurator;
|
||||
class G4PScoreConfigurator;
|
||||
class G4PImportanceConfigurator;
|
||||
class G4WeightCutOffConfigurator;
|
||||
class G4VGCellFinder;
|
||||
class G4PWeightWindowConfigurator;
|
||||
class G4WeightWindowStore;
|
||||
|
||||
class G4ParallelGeometrySampler : public G4VSampler
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4ParallelGeometrySampler(G4VPhysicalVolume &worldvolume,
|
||||
const G4String &particlename);
|
||||
virtual ~G4ParallelGeometrySampler();
|
||||
|
||||
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;
|
||||
|
||||
private:
|
||||
|
||||
G4ParallelGeometrySampler(const G4ParallelGeometrySampler &);
|
||||
G4ParallelGeometrySampler &
|
||||
operator=(const G4ParallelGeometrySampler &);
|
||||
|
||||
private:
|
||||
|
||||
G4String fParticleName;
|
||||
G4ParallelWorld fParallelWorld;
|
||||
G4ParallelTransportConfigurator *fParallelTransportConfigurator;
|
||||
G4PImportanceConfigurator *fPImportanceConfigurator;
|
||||
G4PScoreConfigurator *fPScoreConfigurator;
|
||||
G4VGCellFinder *fGCellFinder;
|
||||
G4WeightCutOffConfigurator *fWeightCutOffConfigurator;
|
||||
G4VIStore *fIStore;
|
||||
G4PWeightWindowConfigurator *fPWeightWindowConfigurator;
|
||||
G4VWeightWindowStore *fWWStore;
|
||||
G4bool fIsConfigured;
|
||||
G4Configurators fConfigurators;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,89 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelImportanceProcess.hh,v 1.12 2006/06/29 21:10:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ParallelImportanceProcess
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Used internally by importance sampling in a "parallel" geometry.
|
||||
// This is a G4ParallelTransport that also does importance
|
||||
// sampling in the "parallel" geometry.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
#ifndef G4ParallelImportanceProcess_hh
|
||||
#define G4ParallelImportanceProcess_hh G4ParallelImportanceProcess_hh
|
||||
|
||||
#include "G4ParallelTransport.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
|
||||
class G4SamplingPostStepAction;
|
||||
class G4VImportanceSplitExaminer;
|
||||
class G4Nsplit_Weight;
|
||||
|
||||
class G4ParallelImportanceProcess : public G4ParallelTransport,
|
||||
public G4VTrackTerminator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4ParallelImportanceProcess(const G4VImportanceSplitExaminer &aImportanceSplitExaminer,
|
||||
G4VPGeoDriver &pgeodriver,
|
||||
G4VParallelStepper &aStepper,
|
||||
const G4VTrackTerminator *TrackTerminator,
|
||||
const G4String &aName = "ParallelImportanceProcess");
|
||||
// initialise G4ParallelTransport and members
|
||||
|
||||
virtual ~G4ParallelImportanceProcess();
|
||||
|
||||
virtual G4VParticleChange *PostStepDoIt(const G4Track&,
|
||||
const G4Step&);
|
||||
// do the "parallel transport" and importance sampling.
|
||||
|
||||
virtual void KillTrack() const;
|
||||
// used in case no scoring process follows that does the killing
|
||||
|
||||
virtual const G4String &GetName() const;
|
||||
|
||||
private:
|
||||
|
||||
G4ParallelImportanceProcess(const G4ParallelImportanceProcess &);
|
||||
G4ParallelImportanceProcess &operator=(const G4ParallelImportanceProcess &);
|
||||
|
||||
virtual void Error(const G4String &m);
|
||||
|
||||
private:
|
||||
|
||||
G4ParticleChange *fParticleChange;
|
||||
const G4VImportanceSplitExaminer &fImportanceSplitExaminer;
|
||||
G4SamplingPostStepAction *fPostStepAction;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,135 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelTransport.hh,v 1.10 2006/06/29 21:10:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ParallelTransport
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Used internally by importance sampling and scoring in a "parallel"
|
||||
// geometry.
|
||||
// This process "moves" a particle in a "parallel" geometry.
|
||||
// It should be placed in the post step process do-it vector after the
|
||||
// G4Transportation process.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
#ifndef G4ParallelTransport_hh
|
||||
#define G4ParallelTransport_hh G4ParallelTransport_hh
|
||||
|
||||
#include "G4Types.hh"
|
||||
|
||||
#include "G4VProcess.hh"
|
||||
|
||||
class G4VPGeoDriver;
|
||||
class G4VParallelStepper;
|
||||
|
||||
class G4ParallelTransport : public G4VProcess
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4ParallelTransport(G4VPGeoDriver &pgeodriver,
|
||||
G4VParallelStepper &aStepper,
|
||||
const G4String &aName = "ParallelTransport");
|
||||
// create G4ParticleChange
|
||||
|
||||
virtual ~G4ParallelTransport();
|
||||
// delete G4ParticleChange
|
||||
|
||||
// the post step pair of functions may be overwritten
|
||||
// in certain derived classes like the importance process
|
||||
|
||||
virtual G4double
|
||||
PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition);
|
||||
// straight distance to the boundary in the "parallel" geometry
|
||||
// in the direction of the track
|
||||
|
||||
virtual G4VParticleChange *PostStepDoIt(const G4Track&, const G4Step&);
|
||||
// move a track in a "parallel" geometry
|
||||
// and update a G4PArallelStepper
|
||||
|
||||
virtual void StartTracking(G4Track*);
|
||||
virtual void EndTracking();
|
||||
|
||||
|
||||
const G4VParallelStepper &GetPStepper() const;
|
||||
// get the fPStepper
|
||||
|
||||
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&);
|
||||
protected:
|
||||
|
||||
virtual void Error(const G4String &m);
|
||||
virtual void Warning(const G4String &m);
|
||||
|
||||
G4ParticleChange *fParticleChange;
|
||||
|
||||
private:
|
||||
|
||||
G4ParallelTransport(const G4ParallelTransport &);
|
||||
G4ParallelTransport &operator=(const G4ParallelTransport &);
|
||||
|
||||
private:
|
||||
|
||||
G4VPGeoDriver &fPgeodriver;
|
||||
G4VParallelStepper &fPStepper;
|
||||
G4bool fCrossBoundary;
|
||||
G4bool fInitStep;
|
||||
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------
|
||||
|
||||
inline const G4VParallelStepper &
|
||||
G4ParallelTransport::GetPStepper() const
|
||||
{
|
||||
return fPStepper;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,72 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelTransportConfigurator.hh,v 1.5 2006/06/29 21:10:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ParallelTransportConfigurator
|
||||
//
|
||||
// Class description:
|
||||
// This class builds and places the G4ParallelTransport.
|
||||
// If the object is deleted the process is removed from the
|
||||
// process list.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#ifndef G4ParallelTransportConfigurator_hh
|
||||
#define G4ParallelTransportConfigurator_hh G4ParallelTransportConfigurator_hh
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4VSamplerConfigurator.hh"
|
||||
#include "G4ParallelTransport.hh"
|
||||
#include "G4ProcessPlacer.hh"
|
||||
|
||||
class G4ParallelWorld;
|
||||
|
||||
class G4ParallelTransportConfigurator : public G4VSamplerConfigurator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4ParallelTransportConfigurator(const G4String &particlename,
|
||||
G4ParallelWorld &pworld);
|
||||
virtual ~G4ParallelTransportConfigurator();
|
||||
virtual void Configure(G4VSamplerConfigurator *preConf);
|
||||
virtual const G4VTrackTerminator *GetTrackTerminator() const;
|
||||
|
||||
private:
|
||||
|
||||
G4ParallelTransportConfigurator(const G4ParallelTransportConfigurator &);
|
||||
G4ParallelTransportConfigurator &
|
||||
operator=(const G4ParallelTransportConfigurator &);
|
||||
G4ProcessPlacer fPlacer;
|
||||
G4ParallelWorld &fPWorld;
|
||||
G4ParallelTransport *fParallelTransport;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,94 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelWWnTransportProcess.hh,v 1.5 2006/06/29 21:10:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ParallelWWnTransportProcess
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Used internally by weight window technique in a "parallel" geometry.
|
||||
// This is a G4ParallelTransport that also does weight window
|
||||
// sampling in the "parallel" geometry. It is used in case
|
||||
// the ww is applied only on the paralle boundaries.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
#ifndef G4ParallelWWnTransportProcess_hh
|
||||
#define G4ParallelWWnTransportProcess_hh G4ParallelWWnTransportProcess_hh
|
||||
|
||||
#include "G4ParallelTransport.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
|
||||
class G4SamplingPostStepAction;
|
||||
class G4VWeightWindowExaminer;
|
||||
class G4Nsplit_Weight;
|
||||
|
||||
class G4ParallelWWnTransportProcess : public G4ParallelTransport,
|
||||
public G4VTrackTerminator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4ParallelWWnTransportProcess(const G4VWeightWindowExaminer
|
||||
&aWeightWindowExaminer,
|
||||
G4VPGeoDriver &pgeodriver,
|
||||
G4VParallelStepper &aStepper,
|
||||
const G4VTrackTerminator *TrackTerminator,
|
||||
const G4String &aName =
|
||||
"ParallelWWnTransportProcess");
|
||||
// initialise G4ParallelTransport and members
|
||||
|
||||
virtual ~G4ParallelWWnTransportProcess();
|
||||
|
||||
|
||||
virtual G4VParticleChange *PostStepDoIt(const G4Track&,
|
||||
const G4Step&);
|
||||
// do the "parallel transport" and weight window sampling
|
||||
|
||||
virtual void KillTrack() const;
|
||||
// used in case no scoring process follows that does the killing
|
||||
|
||||
virtual const G4String &GetName() const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4ParallelWWnTransportProcess(const G4ParallelWWnTransportProcess &);
|
||||
G4ParallelWWnTransportProcess &operator=(const G4ParallelWWnTransportProcess &);
|
||||
|
||||
virtual void Error(const G4String &m);
|
||||
|
||||
private:
|
||||
|
||||
G4ParticleChange *fParticleChange;
|
||||
const G4VWeightWindowExaminer &fWeightWindowExaminer;
|
||||
G4SamplingPostStepAction *fPostStepAction;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,125 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelWeightWindowProcess.hh,v 1.10 2006/06/29 21:10:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ParallelWeightWindowProcess
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Used internally by weight window technique in a "parallel" geometry.
|
||||
// This process is a forced post step process. It will apply
|
||||
// weight window biasing on collisions or on collisions and
|
||||
// boundaries according to the G4PlaceOfAction argument.
|
||||
// It is not used in the case where it should apply only on boundaries.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
#ifndef G4ParallelWeightWindowProcess_hh
|
||||
#define G4ParallelWeightWindowProcess_hh G4ParallelWeightWindowProcess_hh
|
||||
|
||||
#include "G4VProcess.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
#include "G4PlaceOfAction.hh"
|
||||
|
||||
class G4SamplingPostStepAction;
|
||||
class G4VWeightWindowExaminer;
|
||||
class G4Nsplit_Weight;
|
||||
class G4VParallelStepper;
|
||||
class G4VParallelStepper;
|
||||
|
||||
class G4ParallelWeightWindowProcess : public G4VProcess,\
|
||||
public G4VTrackTerminator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4ParallelWeightWindowProcess(const G4VWeightWindowExaminer
|
||||
&aWeightWindowExaminer,
|
||||
G4VParallelStepper &aStepper,
|
||||
const G4VTrackTerminator *TrackTerminator,
|
||||
G4PlaceOfAction placeOfAction,
|
||||
const G4String &aName =
|
||||
"ParallelWeightWindowProcess");
|
||||
// initialise G4ParallelTransport and members
|
||||
|
||||
virtual ~G4ParallelWeightWindowProcess();
|
||||
|
||||
virtual G4double
|
||||
PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition);
|
||||
// make process beeing forced
|
||||
virtual G4VParticleChange *PostStepDoIt(const G4Track&, const G4Step&);
|
||||
// apply weight window sampliing
|
||||
|
||||
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:
|
||||
|
||||
G4ParallelWeightWindowProcess(const G4ParallelWeightWindowProcess &);
|
||||
G4ParallelWeightWindowProcess &operator=(const G4ParallelWeightWindowProcess &);
|
||||
|
||||
virtual void Error(const G4String &m);
|
||||
|
||||
private:
|
||||
|
||||
G4ParticleChange *fParticleChange;
|
||||
const G4VWeightWindowExaminer &fWeightWindowExaminer;
|
||||
G4VParallelStepper &fStepper;
|
||||
G4SamplingPostStepAction *fPostStepAction;
|
||||
G4PlaceOfAction fPlaceOfAction;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,49 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PlaceOfAction.hh,v 1.4 2006/06/29 21:10:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// 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
|
||||
@@ -1,94 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessPlacer.hh,v 1.8 2006/06/29 21:10:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// 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
|
||||
@@ -1,78 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SamplingPostStepAction.hh,v 1.2 2006/06/29 21:10:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// 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
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4StepLimiter.hh,v 1.3 2006/06/29 21:10:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// class description
|
||||
//
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TrackTerminator.hh,v 1.3 2006/06/29 21:10:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4TrackTerminator
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Transportation.hh,v 1.12 2006/06/29 21:10:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Transportation.icc,v 1.9 2006/06/29 21:10:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4UserSpecialCuts.hh,v 1.10 2006/06/29 21:10:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// class description
|
||||
//
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VProcessPlacer.hh,v 1.9 2006/06/29 21:10:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// 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
|
||||
@@ -1,88 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSampler.hh,v 1.10 2006/06/29 21:10:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// 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 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
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,70 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSamplerConfigurator.hh,v 1.7 2006/06/29 21:10:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// 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
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VTrackTerminator.hh,v 1.6 2006/06/29 21:10:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4VTrackTerminator.hh,v 1.7 2007/05/11 14:13:20 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4VTrackTerminator
|
||||
@@ -60,6 +60,10 @@ public: // with description
|
||||
virtual ~G4VTrackTerminator();
|
||||
virtual void KillTrack() const = 0;
|
||||
virtual const G4String &GetName() const = 0;
|
||||
|
||||
protected:
|
||||
|
||||
G4double kCarTolerance;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4WeightCutOffConfigurator.hh,v 1.5 2006/06/29 21:10:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// 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 G4WeightCutOffConfigurator : public G4VSamplerConfigurator
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4WeightCutOffConfigurator(const G4String &particlename,
|
||||
G4double wsurvival,
|
||||
G4double wlimit,
|
||||
G4double isource,
|
||||
G4VIStore *istore,
|
||||
const G4VGCellFinder &aGCellFinder);
|
||||
|
||||
virtual ~G4WeightCutOffConfigurator();
|
||||
virtual void Configure(G4VSamplerConfigurator *preConf);
|
||||
virtual const G4VTrackTerminator *GetTrackTerminator() const ;
|
||||
|
||||
private:
|
||||
|
||||
G4WeightCutOffConfigurator(const G4WeightCutOffConfigurator&);
|
||||
G4WeightCutOffConfigurator &
|
||||
operator=(const G4WeightCutOffConfigurator&);
|
||||
G4ProcessPlacer fPlacer;
|
||||
G4WeightCutOffProcess *fWeightCutOffProcess;
|
||||
G4bool fPlaced;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,109 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4WeightCutOffProcess.hh,v 1.4 2006/06/29 21:10:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// 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 G4WeightCutOffProcess : public G4VProcess
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
G4WeightCutOffProcess(G4double wsurvival,
|
||||
G4double wlimit,
|
||||
G4double isource,
|
||||
G4VIStore *istore,
|
||||
const G4VGCellFinder &aGCellFinder,
|
||||
const G4String &aName = "WeightCutOffProcess");
|
||||
// create a G4ParticleChange
|
||||
|
||||
virtual ~G4WeightCutOffProcess();
|
||||
// delete the G4ParticleChange
|
||||
|
||||
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:
|
||||
|
||||
G4WeightCutOffProcess(const G4WeightCutOffProcess &);
|
||||
G4WeightCutOffProcess &operator=(const G4WeightCutOffProcess &);
|
||||
|
||||
G4ParticleChange *fParticleChange;
|
||||
G4double fWeightSurvival;
|
||||
G4double fWeightLimit;
|
||||
G4double fSourceImportance;
|
||||
G4VIStore *fIStore;
|
||||
const G4VGCellFinder &fGCellFinder;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CoupledTransportation.cc,v 1.12 2006/11/22 18:41:44 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation
|
||||
// =======================================================================
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MImportanceConfigurator.cc,v 1.7 2006/11/13 16:13:50 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4MImportanceConfigurator
|
||||
//
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4MImportanceConfigurator.hh"
|
||||
|
||||
#include "G4MassImportanceProcess.hh"
|
||||
#include "G4ProcessPlacer.hh"
|
||||
#include "G4ImportanceAlgorithm.hh"
|
||||
|
||||
G4MImportanceConfigurator::
|
||||
G4MImportanceConfigurator(const G4String &particlename,
|
||||
G4VIStore &istore,
|
||||
const G4VImportanceAlgorithm *ialg)
|
||||
: fPlacer(particlename),
|
||||
fIStore(istore),
|
||||
fDeleteIalg( ( ! ialg) ),
|
||||
fIalgorithm(( (fDeleteIalg) ?
|
||||
new G4ImportanceAlgorithm : ialg)),
|
||||
fMassImportanceProcess(0)
|
||||
{
|
||||
}
|
||||
|
||||
G4MImportanceConfigurator::~G4MImportanceConfigurator()
|
||||
{
|
||||
if (fMassImportanceProcess)
|
||||
{
|
||||
fPlacer.RemoveProcess(fMassImportanceProcess);
|
||||
delete fMassImportanceProcess;
|
||||
}
|
||||
if (fDeleteIalg)
|
||||
{
|
||||
delete fIalgorithm;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
G4MImportanceConfigurator::Configure(G4VSamplerConfigurator *preConf)
|
||||
{
|
||||
const G4VTrackTerminator *terminator = 0;
|
||||
if (preConf)
|
||||
{
|
||||
terminator = preConf->GetTrackTerminator();
|
||||
};
|
||||
|
||||
fMassImportanceProcess =
|
||||
new G4MassImportanceProcess(*fIalgorithm,
|
||||
fIStore,
|
||||
terminator);
|
||||
if (!fMassImportanceProcess)
|
||||
{
|
||||
G4Exception("G4MImportanceConfigurator::Configure()",
|
||||
"FatalError", FatalException,
|
||||
"Failed allocation of G4MassImportanceProcess !");
|
||||
}
|
||||
fPlacer.AddProcessAsSecondDoIt(fMassImportanceProcess);
|
||||
}
|
||||
|
||||
const G4VTrackTerminator *G4MImportanceConfigurator::
|
||||
GetTrackTerminator() const
|
||||
{
|
||||
return fMassImportanceProcess;
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MScoreConfigurator.cc,v 1.9 2006/11/13 16:17:16 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4MScoreConfigurator
|
||||
//
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4MScoreConfigurator.hh"
|
||||
#include "G4VScorer.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
#include "G4MScoreProcess.hh"
|
||||
|
||||
G4MScoreConfigurator::
|
||||
G4MScoreConfigurator(const G4String &particlename,
|
||||
G4VScorer &scorer)
|
||||
: fPlacer(particlename),
|
||||
fScorer(scorer),
|
||||
fMScoreProcess(0)
|
||||
{
|
||||
}
|
||||
|
||||
G4MScoreConfigurator::~G4MScoreConfigurator()
|
||||
{
|
||||
if (fMScoreProcess)
|
||||
{
|
||||
fPlacer.RemoveProcess(fMScoreProcess);
|
||||
delete fMScoreProcess;
|
||||
}
|
||||
}
|
||||
|
||||
const G4VTrackTerminator *
|
||||
G4MScoreConfigurator::GetTrackTerminator() const
|
||||
{
|
||||
return fMScoreProcess;
|
||||
}
|
||||
|
||||
void G4MScoreConfigurator::Configure(G4VSamplerConfigurator *)
|
||||
{
|
||||
fMScoreProcess = new G4MScoreProcess(fScorer);
|
||||
if (!fMScoreProcess)
|
||||
{
|
||||
G4Exception("G4MScoreConfigurator::Configure()",
|
||||
"FatalError", FatalException,
|
||||
"Failed allocation of G4MScoreProcess !");
|
||||
}
|
||||
fPlacer.AddProcessAsSecondDoIt(fMScoreProcess);
|
||||
}
|
||||
@@ -1,142 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MScoreProcess.cc,v 1.14 2006/11/13 16:19:14 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4MScoreProcess.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4MScoreProcess.hh"
|
||||
#include "G4VScorer.hh"
|
||||
#include "G4GeometryCellStep.hh"
|
||||
#include "G4VParallelStepper.hh"
|
||||
|
||||
G4MScoreProcess::G4MScoreProcess(G4VScorer &aScorer,
|
||||
const G4String &aName)
|
||||
: G4VProcess(aName),
|
||||
fScorer(aScorer),
|
||||
fKillTrack(false)
|
||||
{
|
||||
G4VProcess::pParticleChange = new G4ParticleChange;
|
||||
if (!G4VProcess::pParticleChange)
|
||||
{
|
||||
G4Exception("G4MScoreProcess::G4MScoreProcess()", "Fatal Error",
|
||||
FatalException, "Failed to allocate G4ParticleChange !");
|
||||
}
|
||||
}
|
||||
|
||||
G4MScoreProcess::~G4MScoreProcess()
|
||||
{
|
||||
delete pParticleChange;
|
||||
}
|
||||
|
||||
G4double G4MScoreProcess::
|
||||
PostStepGetPhysicalInteractionLength(const G4Track&,
|
||||
G4double ,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
*condition = Forced;
|
||||
return kInfinity;
|
||||
}
|
||||
|
||||
G4VParticleChange *
|
||||
G4MScoreProcess::PostStepDoIt(const G4Track& aTrack, const G4Step &aStep)
|
||||
{
|
||||
pParticleChange->Initialize(aTrack);
|
||||
|
||||
if (aStep.GetStepLength() > kCarTolerance)
|
||||
{
|
||||
G4StepPoint *prepoint = aStep.GetPreStepPoint();
|
||||
G4StepPoint *postpoint = aStep.GetPostStepPoint();
|
||||
|
||||
G4GeometryCell prekey(*(prepoint->GetPhysicalVolume()),
|
||||
prepoint->GetTouchable()->GetReplicaNumber());
|
||||
G4GeometryCell postkey(*(postpoint->GetPhysicalVolume()),
|
||||
postpoint->GetTouchable()->GetReplicaNumber());
|
||||
|
||||
G4GeometryCellStep pstep(prekey, postkey);
|
||||
pstep.SetCrossBoundary(false);
|
||||
|
||||
if (prekey != postkey)
|
||||
{
|
||||
pstep.SetCrossBoundary(true);
|
||||
}
|
||||
fScorer.Score(aStep, pstep);
|
||||
}
|
||||
|
||||
if (fKillTrack)
|
||||
{
|
||||
fKillTrack = false;
|
||||
pParticleChange->ProposeTrackStatus(fStopAndKill);
|
||||
}
|
||||
|
||||
return G4VProcess::pParticleChange;
|
||||
}
|
||||
|
||||
const G4String &G4MScoreProcess::GetName() const
|
||||
{
|
||||
return theProcessName;
|
||||
}
|
||||
|
||||
|
||||
G4double G4MScoreProcess::
|
||||
AlongStepGetPhysicalInteractionLength(const G4Track&,
|
||||
G4double ,
|
||||
G4double ,
|
||||
G4double& ,
|
||||
G4GPILSelection*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4double G4MScoreProcess::
|
||||
AtRestGetPhysicalInteractionLength(const G4Track&,
|
||||
G4ForceCondition*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4MScoreProcess::AtRestDoIt(const G4Track&,
|
||||
const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4MScoreProcess::AlongStepDoIt(const G4Track&,
|
||||
const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void G4MScoreProcess::KillTrack() const
|
||||
{
|
||||
fKillTrack = true;
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MWeightWindowConfigurator.cc,v 1.6 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4MWeightWindowConfigurator
|
||||
//
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4MWeightWindowConfigurator.hh"
|
||||
#include "G4WeightWindowAlgorithm.hh"
|
||||
#include "G4MassWeightWindowProcess.hh"
|
||||
|
||||
G4MWeightWindowConfigurator::
|
||||
G4MWeightWindowConfigurator(const G4String &particlename,
|
||||
G4VWeightWindowStore &wwstore,
|
||||
const G4VWeightWindowAlgorithm *wwAlg,
|
||||
G4PlaceOfAction placeOfAction)
|
||||
: fPlacer(particlename),
|
||||
fWeightWindowStore(wwstore),
|
||||
fDeleteWWalg( ( ! wwAlg) ),
|
||||
fWWalgorithm(( (fDeleteWWalg) ?
|
||||
new G4WeightWindowAlgorithm(5,3,5) : wwAlg)),
|
||||
fMassWeightWindowProcess(0),
|
||||
fPlaceOfAction(placeOfAction)
|
||||
{
|
||||
}
|
||||
|
||||
G4MWeightWindowConfigurator::~G4MWeightWindowConfigurator()
|
||||
{
|
||||
if (fMassWeightWindowProcess)
|
||||
{
|
||||
fPlacer.RemoveProcess(fMassWeightWindowProcess);
|
||||
delete fMassWeightWindowProcess;
|
||||
}
|
||||
if (fDeleteWWalg)
|
||||
{
|
||||
delete fWWalgorithm;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
G4MWeightWindowConfigurator::Configure(G4VSamplerConfigurator *preConf)
|
||||
{
|
||||
const G4VTrackTerminator *terminator = 0;
|
||||
if (preConf)
|
||||
{
|
||||
terminator = preConf->GetTrackTerminator();
|
||||
};
|
||||
|
||||
fMassWeightWindowProcess =
|
||||
new G4MassWeightWindowProcess(*fWWalgorithm,
|
||||
fWeightWindowStore,
|
||||
terminator,
|
||||
fPlaceOfAction);
|
||||
fPlacer.AddProcessAsSecondDoIt(fMassWeightWindowProcess);
|
||||
}
|
||||
|
||||
const G4VTrackTerminator *
|
||||
G4MWeightWindowConfigurator::GetTrackTerminator() const
|
||||
{
|
||||
return fMassWeightWindowProcess;
|
||||
}
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MassGCellFinder.cc,v 1.5 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4MassGCellFinder.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4MassGCellFinder.hh"
|
||||
#include "G4TouchableHandle.hh"
|
||||
#include "G4Step.hh"
|
||||
|
||||
G4MassGCellFinder::G4MassGCellFinder()
|
||||
{
|
||||
}
|
||||
|
||||
G4MassGCellFinder::~G4MassGCellFinder()
|
||||
{
|
||||
}
|
||||
|
||||
G4GeometryCell
|
||||
G4MassGCellFinder::GetPreGeometryCell(const G4Step &aStep) const
|
||||
{
|
||||
const G4TouchableHandle& th =
|
||||
aStep.GetPreStepPoint()->GetTouchableHandle();
|
||||
G4GeometryCell g(*th->GetVolume(), th->GetReplicaNumber());
|
||||
return g;
|
||||
}
|
||||
|
||||
G4GeometryCell
|
||||
G4MassGCellFinder::GetPostGeometryCell(const G4Step &aStep) const
|
||||
{
|
||||
const G4TouchableHandle& th =
|
||||
aStep.GetPostStepPoint()->GetTouchableHandle();
|
||||
G4GeometryCell g(*th->GetVolume(), th->GetReplicaNumber());
|
||||
return g;
|
||||
}
|
||||
@@ -1,216 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MassGeometrySampler.cc,v 1.13 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4MassGeometrySampler.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4MassGeometrySampler.hh"
|
||||
|
||||
#include "G4VIStore.hh"
|
||||
#include "G4WeightWindowStore.hh"
|
||||
#include "G4VScorer.hh"
|
||||
|
||||
#include "G4MScoreConfigurator.hh"
|
||||
#include "G4MImportanceConfigurator.hh"
|
||||
#include "G4MWeightWindowConfigurator.hh"
|
||||
#include "G4WeightCutOffConfigurator.hh"
|
||||
#include "G4MassGCellFinder.hh"
|
||||
|
||||
G4MassGeometrySampler::
|
||||
G4MassGeometrySampler(const G4String &particlename)
|
||||
: fParticleName(particlename),
|
||||
fMImportanceConfigurator(0),
|
||||
fMScoreConfigurator(0),
|
||||
fGCellFinder(0),
|
||||
fWeightCutOffConfigurator(0),
|
||||
fIStore(0),
|
||||
fMWeightWindowConfigurator(0),
|
||||
fWWStore(0),
|
||||
fIsConfigured(false)
|
||||
{
|
||||
}
|
||||
|
||||
G4MassGeometrySampler::~G4MassGeometrySampler()
|
||||
{
|
||||
ClearSampling();
|
||||
}
|
||||
|
||||
void G4MassGeometrySampler::ClearSampling()
|
||||
{
|
||||
if (fMImportanceConfigurator)
|
||||
{
|
||||
delete fMImportanceConfigurator;
|
||||
fMImportanceConfigurator = 0;
|
||||
}
|
||||
if (fMWeightWindowConfigurator)
|
||||
{
|
||||
delete fMWeightWindowConfigurator;
|
||||
fMWeightWindowConfigurator = 0;
|
||||
}
|
||||
if (fMScoreConfigurator)
|
||||
{
|
||||
delete fMScoreConfigurator;
|
||||
fMScoreConfigurator = 0;
|
||||
}
|
||||
if (fWeightCutOffConfigurator)
|
||||
{
|
||||
delete fWeightCutOffConfigurator;
|
||||
fWeightCutOffConfigurator = 0;
|
||||
}
|
||||
if (fGCellFinder)
|
||||
{
|
||||
delete fGCellFinder;
|
||||
fGCellFinder = 0;
|
||||
}
|
||||
fIStore = 0;
|
||||
fConfigurators.clear();
|
||||
fIsConfigured = false;
|
||||
}
|
||||
|
||||
G4bool G4MassGeometrySampler::IsConfigured() const
|
||||
{
|
||||
G4bool isconf = false;
|
||||
if (fIsConfigured)
|
||||
{
|
||||
G4cout << "WARNING - G4MassGeometrySampler::IsConfigured()"
|
||||
<< " Some initalization exists, use ClearSampling()"
|
||||
<< " before a new initialization !" << G4endl;
|
||||
isconf = true;
|
||||
}
|
||||
return isconf;
|
||||
}
|
||||
|
||||
void G4MassGeometrySampler::PrepareScoring(G4VScorer *scorer)
|
||||
{
|
||||
fMScoreConfigurator = new G4MScoreConfigurator(fParticleName, *scorer);
|
||||
if (!fMScoreConfigurator)
|
||||
{
|
||||
G4Exception("G4MassGeometrySampler::PrepareScoring()",
|
||||
"FatalError", FatalException,
|
||||
"Failed allocation of G4MScoreConfigurator !");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
G4MassGeometrySampler::PrepareImportanceSampling(G4VIStore *istore,
|
||||
const G4VImportanceAlgorithm *ialg)
|
||||
{
|
||||
fIStore = istore;
|
||||
|
||||
fMImportanceConfigurator =
|
||||
new G4MImportanceConfigurator(fParticleName, *fIStore, ialg);
|
||||
if (!fMImportanceConfigurator)
|
||||
{
|
||||
G4Exception("G4MassGeometrySampler::PrepareImportanceSampling()",
|
||||
"FatalError", FatalException,
|
||||
"Failed allocation of G4MImportanceConfigurator !");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
G4MassGeometrySampler::PrepareWeightRoulett(G4double wsurvive,
|
||||
G4double wlimit,
|
||||
G4double isource)
|
||||
{
|
||||
fGCellFinder = new G4MassGCellFinder;
|
||||
if (!fGCellFinder)
|
||||
{
|
||||
G4Exception("G4MassGeometrySampler::PrepareWeightRoulett()",
|
||||
"FatalError", FatalException,
|
||||
"Failed allocation of G4MassGCellFinder !");
|
||||
}
|
||||
|
||||
fWeightCutOffConfigurator =
|
||||
new G4WeightCutOffConfigurator(fParticleName,
|
||||
wsurvive,
|
||||
wlimit,
|
||||
isource,
|
||||
fIStore,
|
||||
*fGCellFinder);
|
||||
if (!fWeightCutOffConfigurator)
|
||||
{
|
||||
G4Exception("G4MassGeometrySampler::PrepareWeightRoulett()",
|
||||
"FatalError", FatalException,
|
||||
"Failed allocation of G4WeightCutOffConfigurator !");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
G4MassGeometrySampler::PrepareWeightWindow(G4VWeightWindowStore *wwstore,
|
||||
G4VWeightWindowAlgorithm *wwAlg,
|
||||
G4PlaceOfAction placeOfAction)
|
||||
{
|
||||
|
||||
fWWStore = wwstore;
|
||||
|
||||
fMWeightWindowConfigurator =
|
||||
new G4MWeightWindowConfigurator(fParticleName,
|
||||
*fWWStore,
|
||||
wwAlg,
|
||||
placeOfAction);
|
||||
}
|
||||
|
||||
void G4MassGeometrySampler::Configure()
|
||||
{
|
||||
if (!IsConfigured())
|
||||
{
|
||||
fIsConfigured = true;
|
||||
|
||||
if (fMScoreConfigurator)
|
||||
{
|
||||
fConfigurators.push_back(fMScoreConfigurator);
|
||||
}
|
||||
if (fMImportanceConfigurator)
|
||||
{
|
||||
fConfigurators.push_back(fMImportanceConfigurator);
|
||||
}
|
||||
if (fMWeightWindowConfigurator)
|
||||
{
|
||||
fConfigurators.push_back(fMWeightWindowConfigurator);
|
||||
}
|
||||
|
||||
G4VSamplerConfigurator *preConf = 0;
|
||||
for (G4Configurators::iterator it = fConfigurators.begin();
|
||||
it != fConfigurators.end(); it++)
|
||||
{
|
||||
G4VSamplerConfigurator *currConf =*it;
|
||||
currConf->Configure(preConf);
|
||||
preConf = *it;
|
||||
}
|
||||
if (fWeightCutOffConfigurator)
|
||||
{
|
||||
fWeightCutOffConfigurator->Configure(0);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MassImportanceProcess.cc,v 1.19 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4MassImportanceProcess.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4MassImportanceProcess.hh"
|
||||
#include "G4VImportanceAlgorithm.hh"
|
||||
#include "G4GeometryCell.hh"
|
||||
#include "G4SamplingPostStepAction.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
#include "G4VIStore.hh"
|
||||
|
||||
G4MassImportanceProcess::
|
||||
G4MassImportanceProcess(const G4VImportanceAlgorithm &aImportanceAlgorithm,
|
||||
const G4VIStore &aIstore,
|
||||
const G4VTrackTerminator *TrackTerminator,
|
||||
const G4String &aName)
|
||||
: G4VProcess(aName),
|
||||
fParticleChange(new G4ParticleChange),
|
||||
fImportanceAlgorithm(aImportanceAlgorithm),
|
||||
fIStore(aIstore),
|
||||
fPostStepAction(0)
|
||||
{
|
||||
if (TrackTerminator)
|
||||
{
|
||||
fPostStepAction = new G4SamplingPostStepAction(*TrackTerminator);
|
||||
}
|
||||
else
|
||||
{
|
||||
fPostStepAction = new G4SamplingPostStepAction(*this);
|
||||
}
|
||||
if (!fParticleChange)
|
||||
{
|
||||
G4Exception("G4MassImportanceProcess::G4MassImportanceProcess()",
|
||||
"FatalError", FatalException,
|
||||
"Failed allocation of G4ParticleChange !");
|
||||
}
|
||||
G4VProcess::pParticleChange = fParticleChange;
|
||||
}
|
||||
|
||||
G4MassImportanceProcess::~G4MassImportanceProcess()
|
||||
{
|
||||
delete fPostStepAction;
|
||||
delete fParticleChange;
|
||||
}
|
||||
|
||||
G4double G4MassImportanceProcess::
|
||||
PostStepGetPhysicalInteractionLength(const G4Track& ,
|
||||
G4double ,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
*condition = Forced;
|
||||
return kInfinity;
|
||||
}
|
||||
|
||||
G4VParticleChange *
|
||||
G4MassImportanceProcess::PostStepDoIt(const G4Track &aTrack,
|
||||
const G4Step &aStep)
|
||||
{
|
||||
fParticleChange->Initialize(aTrack);
|
||||
if ( (aStep.GetPostStepPoint()->GetStepStatus() == fGeomBoundary)
|
||||
&& (aStep.GetStepLength() > kCarTolerance) )
|
||||
{
|
||||
if (aTrack.GetTrackStatus()==fStopAndKill)
|
||||
{
|
||||
G4cout << "WARNING - G4MassImportanceProcess::PostStepDoIt()"
|
||||
<< " StopAndKill track." << G4endl;
|
||||
}
|
||||
|
||||
G4StepPoint *prepoint = aStep.GetPreStepPoint();
|
||||
G4StepPoint *postpoint = aStep.GetPostStepPoint();
|
||||
|
||||
G4GeometryCell prekey(*(prepoint->GetPhysicalVolume()),
|
||||
prepoint->GetTouchable()->GetReplicaNumber());
|
||||
G4GeometryCell postkey(*(postpoint->GetPhysicalVolume()),
|
||||
postpoint->GetTouchable()->GetReplicaNumber());
|
||||
|
||||
G4Nsplit_Weight nw = fImportanceAlgorithm.
|
||||
Calculate(fIStore.GetImportance(prekey),
|
||||
fIStore.GetImportance(postkey),
|
||||
aTrack.GetWeight());
|
||||
fPostStepAction->DoIt(aTrack, fParticleChange, nw);
|
||||
}
|
||||
return fParticleChange;
|
||||
}
|
||||
|
||||
void G4MassImportanceProcess::KillTrack() const
|
||||
{
|
||||
fParticleChange->ProposeTrackStatus(fStopAndKill);
|
||||
}
|
||||
|
||||
const G4String &G4MassImportanceProcess::GetName() const
|
||||
{
|
||||
return theProcessName;
|
||||
}
|
||||
|
||||
G4double G4MassImportanceProcess::
|
||||
AlongStepGetPhysicalInteractionLength(const G4Track&,
|
||||
G4double ,
|
||||
G4double ,
|
||||
G4double& ,
|
||||
G4GPILSelection*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4double G4MassImportanceProcess::
|
||||
AtRestGetPhysicalInteractionLength(const G4Track& ,
|
||||
G4ForceCondition*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4MassImportanceProcess::
|
||||
AtRestDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4MassImportanceProcess::
|
||||
AlongStepDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MassWeightWindowProcess.cc,v 1.7 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4MassWeightWindowProcess.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4MassWeightWindowProcess.hh"
|
||||
#include "G4VWeightWindowAlgorithm.hh"
|
||||
#include "G4GeometryCell.hh"
|
||||
#include "G4SamplingPostStepAction.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
#include "G4PlaceOfAction.hh"
|
||||
#include "G4VWeightWindowStore.hh"
|
||||
|
||||
G4MassWeightWindowProcess::G4MassWeightWindowProcess(
|
||||
const G4VWeightWindowAlgorithm &aWeightWindowAlgorithm,
|
||||
const G4VWeightWindowStore &aWWStore,
|
||||
const G4VTrackTerminator *TrackTerminator,
|
||||
G4PlaceOfAction placeOfAction,
|
||||
const G4String &aName)
|
||||
: G4VProcess(aName),
|
||||
fParticleChange(new G4ParticleChange),
|
||||
fWeightWindowAlgorithm(aWeightWindowAlgorithm),
|
||||
fWeightWindowStore(aWWStore),
|
||||
fPostStepAction(0),
|
||||
fPlaceOfAction(placeOfAction)
|
||||
{
|
||||
if (TrackTerminator)
|
||||
{
|
||||
fPostStepAction = new G4SamplingPostStepAction(*TrackTerminator);
|
||||
}
|
||||
else
|
||||
{
|
||||
fPostStepAction = new G4SamplingPostStepAction(*this);
|
||||
}
|
||||
if (!fParticleChange)
|
||||
{
|
||||
G4Exception("G4MassWeightWindowProcess::G4MassWeightWindowProcess()",
|
||||
"FatalError", FatalException,
|
||||
"Failed allocation of G4ParticleChange !");
|
||||
}
|
||||
G4VProcess::pParticleChange = fParticleChange;
|
||||
}
|
||||
|
||||
G4MassWeightWindowProcess::~G4MassWeightWindowProcess()
|
||||
{
|
||||
delete fPostStepAction;
|
||||
delete fParticleChange;
|
||||
}
|
||||
|
||||
G4double G4MassWeightWindowProcess::
|
||||
PostStepGetPhysicalInteractionLength(const G4Track& ,
|
||||
G4double ,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
*condition = Forced;
|
||||
return kInfinity;
|
||||
}
|
||||
|
||||
G4VParticleChange *
|
||||
G4MassWeightWindowProcess::PostStepDoIt(const G4Track &aTrack,
|
||||
const G4Step &aStep)
|
||||
{
|
||||
fParticleChange->Initialize(aTrack);
|
||||
if (aStep.GetStepLength() > kCarTolerance)
|
||||
{
|
||||
if ( ( fPlaceOfAction == onBoundaryAndCollision)
|
||||
|| ( (fPlaceOfAction == onBoundary) &&
|
||||
(aStep.GetPostStepPoint()->GetStepStatus() == fGeomBoundary) )
|
||||
|| ( (fPlaceOfAction == onCollision) &&
|
||||
(aStep.GetPostStepPoint()->GetStepStatus() != fGeomBoundary) ) )
|
||||
{
|
||||
|
||||
G4StepPoint *postpoint = aStep.GetPostStepPoint();
|
||||
|
||||
G4GeometryCell postCell(*(postpoint->GetPhysicalVolume()),
|
||||
postpoint->GetTouchable()->GetReplicaNumber());
|
||||
|
||||
G4Nsplit_Weight nw =
|
||||
fWeightWindowAlgorithm.Calculate(aTrack.GetWeight(),
|
||||
fWeightWindowStore.GetLowerWeitgh(postCell,
|
||||
aTrack.GetKineticEnergy()));
|
||||
fPostStepAction->DoIt(aTrack, fParticleChange, nw);
|
||||
}
|
||||
}
|
||||
return fParticleChange;
|
||||
}
|
||||
|
||||
void G4MassWeightWindowProcess::KillTrack() const
|
||||
{
|
||||
fParticleChange->ProposeTrackStatus(fStopAndKill);
|
||||
}
|
||||
|
||||
const G4String &G4MassWeightWindowProcess::GetName() const
|
||||
{
|
||||
return G4VProcess::GetProcessName();
|
||||
}
|
||||
|
||||
G4double G4MassWeightWindowProcess::
|
||||
AlongStepGetPhysicalInteractionLength(const G4Track&,
|
||||
G4double ,
|
||||
G4double ,
|
||||
G4double& ,
|
||||
G4GPILSelection*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4double G4MassWeightWindowProcess::
|
||||
AtRestGetPhysicalInteractionLength(const G4Track& ,
|
||||
G4ForceCondition*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4MassWeightWindowProcess::
|
||||
AtRestDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4MassWeightWindowProcess::
|
||||
AlongStepDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4NeutronKiller.cc,v 1.1 2006/11/17 15:53:04 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4NeutronKillerMessenger.cc,v 1.1 2006/11/17 15:53:04 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PImportanceConfigurator.cc,v 1.8 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4PImportanceConfigurator
|
||||
//
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4PImportanceConfigurator.hh"
|
||||
|
||||
#include "G4ParallelWorld.hh"
|
||||
#include "G4ImportanceAlgorithm.hh"
|
||||
#include "G4ParallelImportanceProcess.hh"
|
||||
|
||||
G4PImportanceConfigurator::
|
||||
G4PImportanceConfigurator(const G4String &particlename,
|
||||
G4ParallelWorld ¶llelWorld,
|
||||
G4VIStore &istore,
|
||||
const G4VImportanceAlgorithm *ialg)
|
||||
: fPlacer(particlename),
|
||||
fPWorld(parallelWorld),
|
||||
fDeleteIalg( ( ! ialg) ),
|
||||
fIalgorithm(( (fDeleteIalg) ? new G4ImportanceAlgorithm : ialg)),
|
||||
fExaminer(*fIalgorithm, parallelWorld.GetParallelStepper(), istore),
|
||||
fParallelImportanceProcess(0)
|
||||
{
|
||||
if (!fIalgorithm)
|
||||
{
|
||||
G4Exception("G4PImportanceConfigurator::G4PImportanceConfigurator()",
|
||||
"InvalidSetup", FatalException, "No algorithm specified !");
|
||||
}
|
||||
}
|
||||
|
||||
G4PImportanceConfigurator::~G4PImportanceConfigurator()
|
||||
{
|
||||
if (fParallelImportanceProcess)
|
||||
{
|
||||
fPlacer.RemoveProcess(fParallelImportanceProcess);
|
||||
delete fParallelImportanceProcess;
|
||||
}
|
||||
if (fDeleteIalg)
|
||||
{
|
||||
delete fIalgorithm;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
G4PImportanceConfigurator::Configure(G4VSamplerConfigurator *preConf)
|
||||
{
|
||||
const G4VTrackTerminator *terminator = 0;
|
||||
if (preConf)
|
||||
{
|
||||
terminator = preConf->GetTrackTerminator();
|
||||
}
|
||||
|
||||
fParallelImportanceProcess =
|
||||
new G4ParallelImportanceProcess(fExaminer,
|
||||
fPWorld.GetGeoDriver(),
|
||||
fPWorld.GetParallelStepper(),
|
||||
terminator);
|
||||
if (!fParallelImportanceProcess)
|
||||
{
|
||||
G4Exception("G4PImportanceConfigurator::Configure()",
|
||||
"FatalError", FatalException,
|
||||
"Failed to allocate G4ParallelImportanceProcess !");
|
||||
}
|
||||
fPlacer.AddProcessAsSecondDoIt(fParallelImportanceProcess);
|
||||
}
|
||||
|
||||
const G4VTrackTerminator *
|
||||
G4PImportanceConfigurator::GetTrackTerminator() const
|
||||
{
|
||||
return fParallelImportanceProcess;
|
||||
}
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PScoreConfigurator.cc,v 1.9 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4PScoreConfigurator
|
||||
//
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4PScoreConfigurator.hh"
|
||||
|
||||
#include "G4VTrackTerminator.hh"
|
||||
#include "G4PScoreProcess.hh"
|
||||
|
||||
G4PScoreConfigurator::
|
||||
G4PScoreConfigurator(const G4String &particlename,
|
||||
G4VParallelStepper &pstepper,
|
||||
G4VScorer &scorer)
|
||||
: fPlacer(particlename),
|
||||
fPStepper(pstepper),
|
||||
fScorer(scorer),
|
||||
fPScoreProcess(0)
|
||||
{
|
||||
}
|
||||
|
||||
G4PScoreConfigurator::~G4PScoreConfigurator()
|
||||
{
|
||||
if (fPScoreProcess)
|
||||
{
|
||||
fPlacer.RemoveProcess(fPScoreProcess);
|
||||
delete fPScoreProcess;
|
||||
}
|
||||
}
|
||||
|
||||
void G4PScoreConfigurator::Configure(G4VSamplerConfigurator *)
|
||||
{
|
||||
fPScoreProcess = new G4PScoreProcess(fPStepper, fScorer);
|
||||
if (!fPScoreProcess)
|
||||
{
|
||||
G4Exception("G4PScoreConfigurator::Configure()", "FatalError",
|
||||
FatalException, "Failed to allocate G4PScoreProcess !");
|
||||
}
|
||||
fPlacer.AddProcessAsSecondDoIt(fPScoreProcess);
|
||||
}
|
||||
|
||||
const G4VTrackTerminator *
|
||||
G4PScoreConfigurator::GetTrackTerminator() const
|
||||
{
|
||||
return fPScoreProcess;
|
||||
}
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PScoreProcess.cc,v 1.11 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4PScoreProcess.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4PScoreProcess.hh"
|
||||
#include "G4VScorer.hh"
|
||||
#include "G4GeometryCellStep.hh"
|
||||
#include "G4VParallelStepper.hh"
|
||||
|
||||
G4PScoreProcess::G4PScoreProcess(G4VParallelStepper &astepper,
|
||||
G4VScorer &aScorer,
|
||||
const G4String &aName)
|
||||
: G4VProcess(aName),
|
||||
fPstepper(astepper),
|
||||
fScorer(aScorer),
|
||||
fKillTrack(false)
|
||||
{
|
||||
G4VProcess::pParticleChange = new G4ParticleChange;
|
||||
if (!G4VProcess::pParticleChange)
|
||||
{
|
||||
G4Exception("G4PScoreProcess::G4PScoreProcess()", "FatalError",
|
||||
FatalException, "Failed to allocate G4ParticleChange !");
|
||||
}
|
||||
}
|
||||
|
||||
G4PScoreProcess::~G4PScoreProcess()
|
||||
{
|
||||
delete pParticleChange;
|
||||
}
|
||||
|
||||
G4double G4PScoreProcess::
|
||||
PostStepGetPhysicalInteractionLength(const G4Track &,
|
||||
G4double ,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
*condition = Forced;
|
||||
return kInfinity;
|
||||
}
|
||||
|
||||
G4VParticleChange *
|
||||
G4PScoreProcess::PostStepDoIt(const G4Track& aTrack, const G4Step &aStep)
|
||||
{
|
||||
pParticleChange->Initialize(aTrack);
|
||||
fScorer.Score(aStep, fPstepper.GetPStep());
|
||||
if (fKillTrack)
|
||||
{
|
||||
fKillTrack = false;
|
||||
pParticleChange->ProposeTrackStatus(fStopAndKill);
|
||||
}
|
||||
return G4VProcess::pParticleChange;
|
||||
}
|
||||
|
||||
void G4PScoreProcess::KillTrack() const
|
||||
{
|
||||
fKillTrack = true;
|
||||
}
|
||||
|
||||
const G4String &G4PScoreProcess::GetName() const
|
||||
{
|
||||
return theProcessName;
|
||||
}
|
||||
|
||||
G4double G4PScoreProcess::
|
||||
AlongStepGetPhysicalInteractionLength(const G4Track&,
|
||||
G4double ,
|
||||
G4double ,
|
||||
G4double& ,
|
||||
G4GPILSelection*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4double G4PScoreProcess::
|
||||
AtRestGetPhysicalInteractionLength(const G4Track& , G4ForceCondition*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4PScoreProcess::
|
||||
AtRestDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4PScoreProcess::
|
||||
AlongStepDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PWeightWindowConfigurator.cc,v 1.6 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4PWeightWindowConfigurator
|
||||
//
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4PWeightWindowConfigurator.hh"
|
||||
#include "G4ParallelWWnTransportProcess.hh"
|
||||
#include "G4ParallelWeightWindowProcess.hh"
|
||||
#include "G4WeightWindowAlgorithm.hh"
|
||||
#include "G4ParallelWorld.hh"
|
||||
#include "G4ParallelWeightWindowProcess.hh"
|
||||
|
||||
G4PWeightWindowConfigurator::
|
||||
G4PWeightWindowConfigurator(const G4String &particlename,
|
||||
G4ParallelWorld ¶llelWorld,
|
||||
G4VWeightWindowStore &wwstore,
|
||||
const G4VWeightWindowAlgorithm *wwAlg,
|
||||
G4PlaceOfAction placeOfAction)
|
||||
: fPlacer(particlename),
|
||||
fPWorld(parallelWorld),
|
||||
fDeleteWWalg( ( ! wwAlg) ),
|
||||
fWWalgorithm(( (fDeleteWWalg) ? new G4WeightWindowAlgorithm(5,3,5)
|
||||
: wwAlg)),
|
||||
fExaminer(*fWWalgorithm, parallelWorld.GetParallelStepper(), wwstore),
|
||||
fParallelWWProcess(0),
|
||||
fPlaceOfAction(placeOfAction),
|
||||
fTrackTerminator(0)
|
||||
{
|
||||
}
|
||||
|
||||
G4PWeightWindowConfigurator::~G4PWeightWindowConfigurator()
|
||||
{
|
||||
if (fParallelWWProcess)
|
||||
{
|
||||
fPlacer.RemoveProcess(fParallelWWProcess);
|
||||
delete fParallelWWProcess;
|
||||
fTrackTerminator = 0;
|
||||
fParallelWWProcess = 0;
|
||||
}
|
||||
if (fDeleteWWalg)
|
||||
{
|
||||
delete fWWalgorithm;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
G4PWeightWindowConfigurator::Configure(G4VSamplerConfigurator *preConf)
|
||||
{
|
||||
const G4VTrackTerminator *terminator = 0;
|
||||
if (preConf)
|
||||
{
|
||||
terminator = preConf->GetTrackTerminator();
|
||||
}
|
||||
|
||||
if (fPlaceOfAction == onBoundary)
|
||||
{
|
||||
G4ParallelWWnTransportProcess *parallelWWnTransportProcess =
|
||||
new G4ParallelWWnTransportProcess(fExaminer,
|
||||
fPWorld.GetGeoDriver(),
|
||||
fPWorld.GetParallelStepper(),
|
||||
terminator);
|
||||
fTrackTerminator = parallelWWnTransportProcess;
|
||||
fParallelWWProcess = parallelWWnTransportProcess;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4ParallelWeightWindowProcess *parallelWeightWindowProcess =
|
||||
new G4ParallelWeightWindowProcess(fExaminer,
|
||||
fPWorld.GetParallelStepper(),
|
||||
terminator,
|
||||
fPlaceOfAction);
|
||||
fTrackTerminator = parallelWeightWindowProcess;
|
||||
fParallelWWProcess = parallelWeightWindowProcess;
|
||||
}
|
||||
|
||||
fPlacer.AddProcessAsSecondDoIt(fParallelWWProcess);
|
||||
}
|
||||
|
||||
const G4VTrackTerminator *
|
||||
G4PWeightWindowConfigurator::GetTrackTerminator() const
|
||||
{
|
||||
return fTrackTerminator;
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelGCellFinder.cc,v 1.5 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4ParallelGCellFinder.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4ParallelGCellFinder.hh"
|
||||
#include "G4VParallelStepper.hh"
|
||||
|
||||
G4ParallelGCellFinder::
|
||||
G4ParallelGCellFinder(const G4VParallelStepper &astepper)
|
||||
: fPStepper(astepper)
|
||||
{
|
||||
}
|
||||
|
||||
G4ParallelGCellFinder::~G4ParallelGCellFinder()
|
||||
{
|
||||
}
|
||||
|
||||
G4GeometryCell
|
||||
G4ParallelGCellFinder::GetPreGeometryCell(const G4Step &) const
|
||||
{
|
||||
G4GeometryCell g(fPStepper.GetPStep().GetPreGeometryCell());
|
||||
return g;
|
||||
}
|
||||
|
||||
G4GeometryCell
|
||||
G4ParallelGCellFinder::GetPostGeometryCell(const G4Step &) const
|
||||
{
|
||||
G4GeometryCell g(fPStepper.GetPStep().GetPostGeometryCell());
|
||||
return g;
|
||||
}
|
||||
@@ -1,254 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelGeometrySampler.cc,v 1.12 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4ParallelGeometrySampler.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4ParallelGeometrySampler.hh"
|
||||
|
||||
#include "G4VIStore.hh"
|
||||
#include "G4WeightWindowStore.hh"
|
||||
#include "G4VScorer.hh"
|
||||
|
||||
#include "G4ParallelTransportConfigurator.hh"
|
||||
#include "G4PScoreConfigurator.hh"
|
||||
#include "G4PImportanceConfigurator.hh"
|
||||
#include "G4WeightCutOffConfigurator.hh"
|
||||
#include "G4ParallelGCellFinder.hh"
|
||||
#include "G4PWeightWindowConfigurator.hh"
|
||||
|
||||
G4ParallelGeometrySampler::
|
||||
G4ParallelGeometrySampler(G4VPhysicalVolume &worldvolume,
|
||||
const G4String &particlename)
|
||||
: fParticleName(particlename),
|
||||
fParallelWorld(worldvolume),
|
||||
fParallelTransportConfigurator(0),
|
||||
fPImportanceConfigurator(0),
|
||||
fPScoreConfigurator(0),
|
||||
fGCellFinder(0),
|
||||
fWeightCutOffConfigurator(0),
|
||||
fIStore(0),
|
||||
fPWeightWindowConfigurator(0),
|
||||
fWWStore(0),
|
||||
fIsConfigured(false)
|
||||
{
|
||||
}
|
||||
|
||||
G4ParallelGeometrySampler::~G4ParallelGeometrySampler()
|
||||
{
|
||||
ClearSampling();
|
||||
}
|
||||
|
||||
void G4ParallelGeometrySampler::ClearSampling()
|
||||
{
|
||||
if (fParallelTransportConfigurator)
|
||||
{
|
||||
delete fParallelTransportConfigurator;
|
||||
fParallelTransportConfigurator = 0;
|
||||
}
|
||||
if (fPWeightWindowConfigurator)
|
||||
{
|
||||
delete fPWeightWindowConfigurator;
|
||||
fPWeightWindowConfigurator = 0;
|
||||
}
|
||||
if (fPImportanceConfigurator)
|
||||
{
|
||||
delete fPImportanceConfigurator;
|
||||
fPImportanceConfigurator = 0;
|
||||
}
|
||||
if (fPScoreConfigurator)
|
||||
{
|
||||
delete fPScoreConfigurator;
|
||||
fPScoreConfigurator = 0;
|
||||
}
|
||||
if (fWeightCutOffConfigurator)
|
||||
{
|
||||
delete fWeightCutOffConfigurator;
|
||||
fWeightCutOffConfigurator = 0;
|
||||
}
|
||||
if (fGCellFinder)
|
||||
{
|
||||
delete fGCellFinder;
|
||||
fGCellFinder = 0;
|
||||
}
|
||||
fIStore = 0;
|
||||
fConfigurators.clear();
|
||||
fIsConfigured = false;
|
||||
}
|
||||
|
||||
G4bool G4ParallelGeometrySampler::IsConfigured() const
|
||||
{
|
||||
G4bool isconf = false;
|
||||
if (fIsConfigured)
|
||||
{
|
||||
G4cout << "WARNING - G4ParallelGeometrySampler::IsConfigured()"
|
||||
<< " Some initalization exists already."
|
||||
<< " Use ClearSampling() before a new initialization !"
|
||||
<< G4endl;
|
||||
isconf = true;
|
||||
}
|
||||
return isconf;
|
||||
}
|
||||
|
||||
void G4ParallelGeometrySampler::
|
||||
PrepareImportanceSampling(G4VIStore *istore,
|
||||
const G4VImportanceAlgorithm *ialg)
|
||||
{
|
||||
fIStore = istore;
|
||||
fPImportanceConfigurator = new G4PImportanceConfigurator(fParticleName,
|
||||
fParallelWorld,
|
||||
*istore, ialg);
|
||||
if (!fPImportanceConfigurator)
|
||||
{
|
||||
G4Exception("G4ParallelGeometrySampler::PrepareImportanceSampling()",
|
||||
"FatalError", FatalException,
|
||||
"Failed to create G4PImportanceConfigurator !");
|
||||
}
|
||||
}
|
||||
|
||||
void G4ParallelGeometrySampler::PrepareScoring(G4VScorer *scorer)
|
||||
{
|
||||
fPScoreConfigurator =
|
||||
new G4PScoreConfigurator(fParticleName,
|
||||
fParallelWorld.
|
||||
GetParallelStepper(),
|
||||
*scorer);
|
||||
if (!fPScoreConfigurator)
|
||||
{
|
||||
G4Exception("G4ParallelGeometrySampler::PrepareScoring()",
|
||||
"FatalError", FatalException,
|
||||
"Failed to create G4PScoreConfigurator !");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
G4ParallelGeometrySampler::PrepareWeightRoulett(G4double wsuvive,
|
||||
G4double wlimit,
|
||||
G4double isource)
|
||||
{
|
||||
fGCellFinder = new G4ParallelGCellFinder(fParallelWorld.
|
||||
GetParallelStepper());
|
||||
if (!fGCellFinder)
|
||||
{
|
||||
G4Exception("G4ParallelGeometrySampler::PrepareWeightRoulett()",
|
||||
"FatalError", FatalException,
|
||||
"Failed to allocate G4ParallelGCellFinder !");
|
||||
}
|
||||
|
||||
fWeightCutOffConfigurator =
|
||||
new G4WeightCutOffConfigurator(fParticleName,
|
||||
wsuvive,
|
||||
wlimit,
|
||||
isource,
|
||||
fIStore,
|
||||
*fGCellFinder);
|
||||
if (!fWeightCutOffConfigurator)
|
||||
{
|
||||
G4Exception("G4ParallelGeometrySampler::PrepareWeightRoulett()",
|
||||
"FatalError", FatalException,
|
||||
"Failed to allocate G4WeightCutOffConfigurator !");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
G4ParallelGeometrySampler::PrepareWeightWindow(G4VWeightWindowStore *wwstore,
|
||||
G4VWeightWindowAlgorithm *wwAlg,
|
||||
G4PlaceOfAction placeOfAction)
|
||||
{
|
||||
if (placeOfAction != onBoundary)
|
||||
{
|
||||
// an additional paralel transport is needed
|
||||
// to cause a step on parallel boundaries
|
||||
fParallelTransportConfigurator =
|
||||
new G4ParallelTransportConfigurator(fParticleName, fParallelWorld);
|
||||
}
|
||||
|
||||
fWWStore = wwstore;
|
||||
fPWeightWindowConfigurator =
|
||||
new G4PWeightWindowConfigurator(fParticleName,
|
||||
fParallelWorld,
|
||||
*wwstore,
|
||||
wwAlg,
|
||||
placeOfAction);
|
||||
}
|
||||
|
||||
void G4ParallelGeometrySampler::Configure()
|
||||
{
|
||||
if (!IsConfigured())
|
||||
{
|
||||
fIsConfigured = true;
|
||||
|
||||
if (fPScoreConfigurator)
|
||||
{
|
||||
fConfigurators.push_back(fPScoreConfigurator);
|
||||
}
|
||||
if (fPImportanceConfigurator)
|
||||
{
|
||||
fConfigurators.push_back(fPImportanceConfigurator);
|
||||
}
|
||||
else if (fPWeightWindowConfigurator)
|
||||
{
|
||||
fConfigurators.push_back(fPWeightWindowConfigurator);
|
||||
if (fParallelTransportConfigurator)
|
||||
{
|
||||
fConfigurators.push_back(fParallelTransportConfigurator);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fParallelTransportConfigurator =
|
||||
new G4ParallelTransportConfigurator(fParticleName, fParallelWorld);
|
||||
if (!fParallelTransportConfigurator)
|
||||
{
|
||||
G4Exception("G4ParallelGeometrySampler::Configure()",
|
||||
"FatalError", FatalException,
|
||||
"Failed to allocate G4ParallelTransportConfigurator !");
|
||||
}
|
||||
fConfigurators.push_back(fParallelTransportConfigurator);
|
||||
}
|
||||
G4VSamplerConfigurator *preConf = 0;
|
||||
for (G4Configurators::iterator it = fConfigurators.begin();
|
||||
it != fConfigurators.end(); it++)
|
||||
{
|
||||
G4VSamplerConfigurator *currConf =*it;
|
||||
currConf->Configure(preConf);
|
||||
preConf = *it;
|
||||
}
|
||||
|
||||
if (fWeightCutOffConfigurator)
|
||||
{
|
||||
fWeightCutOffConfigurator->Configure(0);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelImportanceProcess.cc,v 1.19 2006/06/29 21:12:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4ParallelImportanceProcess.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4ParallelImportanceProcess.hh"
|
||||
#include "G4VImportanceSplitExaminer.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
#include "G4SamplingPostStepAction.hh"
|
||||
|
||||
G4ParallelImportanceProcess::G4ParallelImportanceProcess(
|
||||
const G4VImportanceSplitExaminer &aImportanceSplitExaminer,
|
||||
G4VPGeoDriver &pgeodriver,
|
||||
G4VParallelStepper &aStepper,
|
||||
const G4VTrackTerminator *TrackTerminator,
|
||||
const G4String &aName)
|
||||
: G4ParallelTransport(pgeodriver, aStepper, aName),
|
||||
fParticleChange(G4ParallelTransport::fParticleChange),
|
||||
fImportanceSplitExaminer(aImportanceSplitExaminer),
|
||||
fPostStepAction(0)
|
||||
{
|
||||
if (TrackTerminator)
|
||||
{
|
||||
fPostStepAction = new G4SamplingPostStepAction(*TrackTerminator);
|
||||
}
|
||||
else
|
||||
{
|
||||
fPostStepAction = new G4SamplingPostStepAction(*this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
G4ParallelImportanceProcess::~G4ParallelImportanceProcess()
|
||||
{
|
||||
delete fPostStepAction;
|
||||
}
|
||||
|
||||
G4VParticleChange *G4ParallelImportanceProcess::
|
||||
PostStepDoIt(const G4Track& aTrack, const G4Step &aStep)
|
||||
{
|
||||
if (aTrack.GetTrackStatus()==fStopAndKill)
|
||||
{
|
||||
G4cout << "WARNING - G4ParallelImportanceProcess::PostStepDoIt()"
|
||||
<< " StopAndKill track !" << G4endl;
|
||||
}
|
||||
G4ParallelTransport::PostStepDoIt(aTrack, aStep);
|
||||
|
||||
// get new weight and number of clones
|
||||
G4Nsplit_Weight nw(fImportanceSplitExaminer.Examine(aTrack.GetWeight()));
|
||||
|
||||
fPostStepAction->DoIt(aTrack, fParticleChange, nw);
|
||||
return fParticleChange;
|
||||
}
|
||||
|
||||
void G4ParallelImportanceProcess::Error(const G4String &m)
|
||||
{
|
||||
G4Exception("G4ParallelImportanceProcess::Error()",
|
||||
"ProgramError", FatalException, m);
|
||||
}
|
||||
|
||||
void G4ParallelImportanceProcess::KillTrack() const
|
||||
{
|
||||
fParticleChange->ProposeTrackStatus(fStopAndKill);
|
||||
}
|
||||
|
||||
const G4String &G4ParallelImportanceProcess::GetName() const
|
||||
{
|
||||
return G4ParallelTransport::GetProcessName();
|
||||
}
|
||||
@@ -1,178 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelTransport.cc,v 1.15 2006/06/29 21:12:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4ParallelTransport.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4ParallelTransport.hh"
|
||||
#include "G4VPGeoDriver.hh"
|
||||
#include "G4VParallelStepper.hh"
|
||||
#include <sstream>
|
||||
|
||||
G4ParallelTransport::G4ParallelTransport(G4VPGeoDriver &pgeodriver,
|
||||
G4VParallelStepper &aStepper,
|
||||
const G4String &aName)
|
||||
: G4VProcess(aName),
|
||||
fParticleChange(new G4ParticleChange),
|
||||
fPgeodriver(pgeodriver),
|
||||
fPStepper(aStepper),
|
||||
fCrossBoundary(false),
|
||||
fInitStep(false)
|
||||
{
|
||||
if (!fParticleChange)
|
||||
{
|
||||
G4Exception("G4ParallelTransport::G4ParallelTransport()",
|
||||
"FatalError", FatalException,
|
||||
"Failed to allocate G4ParticleChange !");
|
||||
}
|
||||
G4VProcess::pParticleChange = fParticleChange;
|
||||
}
|
||||
|
||||
G4ParallelTransport::~G4ParallelTransport()
|
||||
{
|
||||
delete fParticleChange;
|
||||
}
|
||||
|
||||
void G4ParallelTransport::StartTracking(G4Track*)
|
||||
{
|
||||
fInitStep = true;
|
||||
}
|
||||
|
||||
void G4ParallelTransport::EndTracking()
|
||||
{
|
||||
}
|
||||
|
||||
G4double G4ParallelTransport::
|
||||
PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
|
||||
G4double ,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
G4double stepLength = 0;
|
||||
|
||||
// if this function is called on a new track let the navigator
|
||||
// know about it
|
||||
// G4bool initStep = (aTrack.GetCurrentStepNumber() == 1);
|
||||
|
||||
if (fInitStep)
|
||||
{
|
||||
fInitStep = false;
|
||||
stepLength = fPgeodriver.
|
||||
ComputeStepLengthInit(aTrack.GetPosition(),
|
||||
aTrack.GetMomentumDirection());
|
||||
fPStepper.Init(fPgeodriver.GetCurrentGeometryCell());
|
||||
fCrossBoundary = false;
|
||||
}
|
||||
else if (fCrossBoundary)
|
||||
{
|
||||
stepLength = fPgeodriver.
|
||||
ComputeStepLengthCrossBoundary(aTrack.GetPosition(),
|
||||
aTrack.GetMomentumDirection());
|
||||
fPStepper.UnSetCrossBoundary();
|
||||
fCrossBoundary = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
stepLength = fPgeodriver.
|
||||
ComputeStepLengthInVolume(aTrack.GetPosition(),
|
||||
aTrack.GetMomentumDirection());
|
||||
}
|
||||
|
||||
*condition = NotForced;
|
||||
return stepLength;
|
||||
}
|
||||
|
||||
G4VParticleChange *
|
||||
G4ParallelTransport::PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep)
|
||||
{
|
||||
if (!(aStep.GetStepLength() > 0.))
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << "G4PArallelTransport::InitPostDoIt: StepLength() == 0.\n"
|
||||
<< "pos: " << aTrack.GetPosition() << ", "
|
||||
<< "dir: " << aTrack.GetMomentumDirection() << "\n";
|
||||
G4String m = os.str();
|
||||
Warning(m);
|
||||
}
|
||||
fParticleChange->Initialize(aTrack);
|
||||
|
||||
fCrossBoundary = true;
|
||||
fPgeodriver.LocateOnBoundary(aTrack.GetPosition(),
|
||||
aTrack.GetMomentumDirection());
|
||||
fPStepper.Update(fPgeodriver.GetCurrentGeometryCell());
|
||||
|
||||
return fParticleChange;
|
||||
}
|
||||
|
||||
void G4ParallelTransport::Error(const G4String &m)
|
||||
{
|
||||
G4Exception("G4ParallelTransport::Error()",
|
||||
"ProgramError", FatalException, m);
|
||||
}
|
||||
|
||||
void G4ParallelTransport::Warning(const G4String &m)
|
||||
{
|
||||
G4Exception("G4ParallelTransport::Warning()",
|
||||
"ProgramWarning", JustWarning, m);
|
||||
}
|
||||
|
||||
G4double G4ParallelTransport::
|
||||
AlongStepGetPhysicalInteractionLength(const G4Track&,
|
||||
G4double ,
|
||||
G4double ,
|
||||
G4double& ,
|
||||
G4GPILSelection*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4double G4ParallelTransport::
|
||||
AtRestGetPhysicalInteractionLength(const G4Track&, G4ForceCondition*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4VParticleChange*
|
||||
G4ParallelTransport::AtRestDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4ParallelTransport::
|
||||
AlongStepDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelTransportConfigurator.cc,v 1.7 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ParallelTransportConfigurator
|
||||
//
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4ParallelTransportConfigurator.hh"
|
||||
#include "G4ParallelWorld.hh"
|
||||
|
||||
G4ParallelTransportConfigurator::
|
||||
G4ParallelTransportConfigurator(const G4String &particlename,
|
||||
G4ParallelWorld &pworld)
|
||||
: fPlacer(particlename),
|
||||
fPWorld(pworld),
|
||||
fParallelTransport(0)
|
||||
{
|
||||
}
|
||||
|
||||
G4ParallelTransportConfigurator::~G4ParallelTransportConfigurator()
|
||||
{
|
||||
if (fParallelTransport)
|
||||
{
|
||||
fPlacer.RemoveProcess(fParallelTransport);
|
||||
delete fParallelTransport;
|
||||
}
|
||||
}
|
||||
|
||||
void G4ParallelTransportConfigurator::Configure(G4VSamplerConfigurator *)
|
||||
{
|
||||
fParallelTransport = new G4ParallelTransport(fPWorld.GetGeoDriver(),
|
||||
fPWorld.GetParallelStepper());
|
||||
if (!fParallelTransport)
|
||||
{
|
||||
G4Exception("G4ParallelTransportConfigurator::Configure()",
|
||||
"FatalError", FatalException,
|
||||
"Failed to allocate G4ParallelTransport !");
|
||||
}
|
||||
fPlacer.AddProcessAsSecondDoIt(fParallelTransport);
|
||||
}
|
||||
|
||||
const G4VTrackTerminator *
|
||||
G4ParallelTransportConfigurator::GetTrackTerminator() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelWWnTransportProcess.cc,v 1.6 2006/06/29 21:12:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4ParallelWWnTransportProcess.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4ParallelWWnTransportProcess.hh"
|
||||
#include "G4VWeightWindowExaminer.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
#include "G4SamplingPostStepAction.hh"
|
||||
|
||||
G4ParallelWWnTransportProcess::G4ParallelWWnTransportProcess(
|
||||
const G4VWeightWindowExaminer &aWeightWindowExaminer,
|
||||
G4VPGeoDriver &pgeodriver,
|
||||
G4VParallelStepper &aStepper,
|
||||
const G4VTrackTerminator *TrackTerminator,
|
||||
const G4String &aName )
|
||||
: G4ParallelTransport(pgeodriver, aStepper, aName),
|
||||
fParticleChange(G4ParallelTransport::fParticleChange),
|
||||
fWeightWindowExaminer(aWeightWindowExaminer),
|
||||
fPostStepAction(0)
|
||||
{
|
||||
if (TrackTerminator)
|
||||
{
|
||||
fPostStepAction = new G4SamplingPostStepAction(*TrackTerminator);
|
||||
}
|
||||
else
|
||||
{
|
||||
fPostStepAction = new G4SamplingPostStepAction(*this);
|
||||
}
|
||||
}
|
||||
|
||||
G4ParallelWWnTransportProcess::~G4ParallelWWnTransportProcess()
|
||||
{
|
||||
delete fPostStepAction;
|
||||
}
|
||||
|
||||
G4VParticleChange *
|
||||
G4ParallelWWnTransportProcess::PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step &aStep)
|
||||
{
|
||||
if (aTrack.GetTrackStatus()==fStopAndKill)
|
||||
{
|
||||
G4cout << "WARNING - G4ParallelWWnTransportProcess::PostStepDoIt()"
|
||||
<< " StopAndKill track !"
|
||||
<< G4endl;
|
||||
}
|
||||
G4ParallelTransport::PostStepDoIt(aTrack, aStep);
|
||||
|
||||
// get new weight and number of clones
|
||||
G4Nsplit_Weight nw(fWeightWindowExaminer.Examine(aTrack.GetWeight(),
|
||||
aTrack.
|
||||
GetKineticEnergy()));
|
||||
|
||||
fPostStepAction->DoIt(aTrack, fParticleChange, nw);
|
||||
return fParticleChange;
|
||||
}
|
||||
|
||||
void G4ParallelWWnTransportProcess::Error(const G4String &m)
|
||||
{
|
||||
G4Exception("G4ParallelWWnTransportProcess::Error()",
|
||||
"ProgramError", FatalException, m);
|
||||
}
|
||||
|
||||
void G4ParallelWWnTransportProcess::KillTrack() const
|
||||
{
|
||||
fParticleChange->ProposeTrackStatus(fStopAndKill);
|
||||
}
|
||||
|
||||
const G4String &G4ParallelWWnTransportProcess::GetName() const
|
||||
{
|
||||
return G4ParallelTransport::GetProcessName();
|
||||
}
|
||||
@@ -1,154 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelWeightWindowProcess.cc,v 1.13 2006/06/29 21:12:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4ParallelWeightWindowProcess.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4ParallelWeightWindowProcess.hh"
|
||||
#include "G4VWeightWindowExaminer.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
#include "G4SamplingPostStepAction.hh"
|
||||
#include "G4VParallelStepper.hh"
|
||||
|
||||
G4ParallelWeightWindowProcess::G4ParallelWeightWindowProcess(
|
||||
const G4VWeightWindowExaminer &aWeightWindowExaminer,
|
||||
G4VParallelStepper &aStepper,
|
||||
const G4VTrackTerminator *TrackTerminator,
|
||||
G4PlaceOfAction placeOfAction,
|
||||
const G4String &aName)
|
||||
: G4VProcess(aName),
|
||||
fParticleChange(new G4ParticleChange),
|
||||
fWeightWindowExaminer(aWeightWindowExaminer),
|
||||
fStepper(aStepper),
|
||||
fPostStepAction(0),
|
||||
fPlaceOfAction(placeOfAction)
|
||||
{
|
||||
if (TrackTerminator)
|
||||
{
|
||||
fPostStepAction = new G4SamplingPostStepAction(*TrackTerminator);
|
||||
}
|
||||
else
|
||||
{
|
||||
fPostStepAction = new G4SamplingPostStepAction(*this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
G4ParallelWeightWindowProcess::~G4ParallelWeightWindowProcess()
|
||||
{
|
||||
delete fParticleChange;
|
||||
delete fPostStepAction;
|
||||
}
|
||||
|
||||
G4double G4ParallelWeightWindowProcess::
|
||||
PostStepGetPhysicalInteractionLength(const G4Track& ,
|
||||
G4double ,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
*condition = Forced;
|
||||
return kInfinity;
|
||||
}
|
||||
|
||||
G4VParticleChange *
|
||||
G4ParallelWeightWindowProcess::PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step &aStep)
|
||||
{
|
||||
if (aTrack.GetTrackStatus()==fStopAndKill)
|
||||
{
|
||||
G4cout << "WARNING - G4ParallelWeightWindowProcess::PostStepDoIt()"
|
||||
<< " StopAndKill track !" << G4endl;
|
||||
}
|
||||
|
||||
fParticleChange->Initialize(aTrack);
|
||||
|
||||
if (aStep.GetPostStepPoint()->GetStepStatus() != fGeomBoundary)
|
||||
{
|
||||
if (!( fStepper.GetPStep().GetCrossBoundary()
|
||||
&& (fPlaceOfAction == onCollision) ) )
|
||||
{
|
||||
// get new weight and number of clones
|
||||
G4Nsplit_Weight nw(fWeightWindowExaminer.
|
||||
Examine(aTrack.GetWeight(),
|
||||
aTrack.
|
||||
GetKineticEnergy()));
|
||||
fPostStepAction->DoIt(aTrack, fParticleChange, nw);
|
||||
}
|
||||
}
|
||||
return fParticleChange;
|
||||
}
|
||||
|
||||
void G4ParallelWeightWindowProcess::Error(const G4String &m)
|
||||
{
|
||||
G4Exception("G4ParallelWeightWindowProcess::Error()",
|
||||
"ProgramError", FatalException, m);
|
||||
}
|
||||
|
||||
void G4ParallelWeightWindowProcess::KillTrack() const
|
||||
{
|
||||
fParticleChange->ProposeTrackStatus(fStopAndKill);
|
||||
}
|
||||
|
||||
const G4String &G4ParallelWeightWindowProcess::GetName() const
|
||||
{
|
||||
return theProcessName;
|
||||
}
|
||||
|
||||
G4double G4ParallelWeightWindowProcess::
|
||||
AlongStepGetPhysicalInteractionLength(const G4Track&,
|
||||
G4double ,
|
||||
G4double ,
|
||||
G4double& ,
|
||||
G4GPILSelection*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4double G4ParallelWeightWindowProcess::
|
||||
AtRestGetPhysicalInteractionLength(const G4Track& ,
|
||||
G4ForceCondition*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4ParallelWeightWindowProcess::
|
||||
AtRestDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4ParallelWeightWindowProcess::
|
||||
AlongStepDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1,202 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessPlacer.cc,v 1.16 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4ProcessPlacer.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4ProcessPlacer.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4VProcess.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
|
||||
G4ProcessPlacer::G4ProcessPlacer(const G4String &particlename)
|
||||
: fParticleName(particlename)
|
||||
{
|
||||
}
|
||||
|
||||
G4ProcessPlacer::~G4ProcessPlacer()
|
||||
{
|
||||
}
|
||||
|
||||
void G4ProcessPlacer::RemoveProcess(G4VProcess *process)
|
||||
{
|
||||
G4cout << "=== G4ProcessPlacer::RemoveProcess: for: " << fParticleName
|
||||
<< G4endl;
|
||||
G4cout << " ProcessName: " << process->GetProcessName()
|
||||
<< ", will be removed!" << G4endl;
|
||||
|
||||
G4cout << " The initial Vectors: " << G4endl;
|
||||
PrintPostStepGPILVec();
|
||||
PrintPostStepDoItVec();
|
||||
|
||||
GetProcessManager()->RemoveProcess(process);
|
||||
|
||||
G4cout << " The final Vectors: " << G4endl;
|
||||
PrintPostStepGPILVec();
|
||||
PrintPostStepDoItVec();
|
||||
|
||||
G4cout << "================================================" << G4endl;
|
||||
|
||||
}
|
||||
|
||||
void G4ProcessPlacer::AddProcessAs(G4VProcess *process, SecondOrLast sol)
|
||||
{
|
||||
G4cout << " ProcessName: " << process->GetProcessName() << G4endl;
|
||||
G4cout << "The initial Vectors: " << G4endl;
|
||||
PrintPostStepGPILVec();
|
||||
PrintPostStepDoItVec();
|
||||
|
||||
if (sol == eLast)
|
||||
{
|
||||
GetProcessManager()->AddProcess(process, ordInActive, ordInActive, ordLast);
|
||||
}
|
||||
else if (sol == eSecond)
|
||||
{
|
||||
// get transportation process
|
||||
G4VProcess *transportation =
|
||||
(* (GetProcessManager()->GetProcessList()))[0];
|
||||
|
||||
if (!transportation)
|
||||
{
|
||||
G4Exception(" G4ProcessPlacer:: could not get process id=0");
|
||||
}
|
||||
if (transportation->GetProcessName() != "Transportation")
|
||||
{
|
||||
G4cout << transportation->GetProcessName() << G4endl;
|
||||
G4Exception(" G4ProcessPlacer:: process id=0 is not Transportation");
|
||||
}
|
||||
|
||||
// place the given proces as first for the moment
|
||||
GetProcessManager()->AddProcess(process);
|
||||
GetProcessManager()->SetProcessOrderingToFirst(process,
|
||||
idxPostStep);
|
||||
// place transportation first again
|
||||
GetProcessManager()->SetProcessOrderingToFirst(transportation,
|
||||
idxPostStep);
|
||||
}
|
||||
|
||||
// for verification inly
|
||||
G4cout << "The final Vectors: " << G4endl;
|
||||
PrintPostStepGPILVec();
|
||||
PrintPostStepDoItVec();
|
||||
|
||||
G4cout << "================================================" << G4endl;
|
||||
}
|
||||
|
||||
void G4ProcessPlacer::AddProcessAsSecondDoIt(G4VProcess *process)
|
||||
{
|
||||
G4cout << "=== G4ProcessPlacer::AddProcessAsSecondDoIt: for: "
|
||||
<< fParticleName << G4endl;
|
||||
AddProcessAs(process, eSecond);
|
||||
}
|
||||
|
||||
void G4ProcessPlacer::AddProcessAsLastDoIt(G4VProcess *process)
|
||||
{
|
||||
G4cout << "=== G4ProcessPlacer::AddProcessAsLastDoIt: for: "
|
||||
<< fParticleName << G4endl;
|
||||
AddProcessAs(process, eLast);
|
||||
}
|
||||
|
||||
G4ProcessManager *G4ProcessPlacer::GetProcessManager()
|
||||
{
|
||||
// get particle iterator to add processes ---------------------
|
||||
G4ParticleTable* theParticleTable = 0;
|
||||
G4ParticleTable::G4PTblDicIterator* theParticleIterator = 0;
|
||||
theParticleTable = G4ParticleTable::GetParticleTable();
|
||||
theParticleIterator = theParticleTable->GetIterator();
|
||||
// -------------------------------------------------------
|
||||
G4ProcessManager *processmanager = 0;
|
||||
// find process manager ---------------------------
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() )
|
||||
{
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
if (particle->GetParticleName() == fParticleName)
|
||||
{
|
||||
processmanager = particle->GetProcessManager();
|
||||
break;
|
||||
}
|
||||
}
|
||||
// ---------------------------------------------------------
|
||||
if (!processmanager)
|
||||
{
|
||||
G4Exception("G4ProcessPlacer::GetProcessManager()", "InvalidSetup",
|
||||
FatalException, "NULL pointer to Process Manager !");
|
||||
}
|
||||
return processmanager;
|
||||
}
|
||||
|
||||
void G4ProcessPlacer::PrintPostStepGPILVec()
|
||||
{
|
||||
G4cout << "GPIL Vector: " << G4endl;
|
||||
G4ProcessVector* processGPILVec =
|
||||
GetProcessManager()->GetPostStepProcessVector(typeGPIL);
|
||||
PrintProcVec(processGPILVec);
|
||||
}
|
||||
|
||||
void G4ProcessPlacer::PrintPostStepDoItVec()
|
||||
{
|
||||
G4cout << "DoIt Vector: " << G4endl;
|
||||
G4ProcessVector* processDoItVec =
|
||||
GetProcessManager()->GetPostStepProcessVector(typeDoIt);
|
||||
PrintProcVec(processDoItVec);
|
||||
}
|
||||
|
||||
|
||||
void G4ProcessPlacer::PrintProcVec(G4ProcessVector* processVec)
|
||||
{
|
||||
if (!processVec)
|
||||
{
|
||||
G4Exception("G4ProcessPlacer::G4ProcessPlacer()", "InvalidArgument",
|
||||
FatalException, "NULL pointer to process-vector !");
|
||||
}
|
||||
G4int len = processVec->length();
|
||||
if (len==0)
|
||||
{
|
||||
G4Exception("G4ProcessPlacer::G4ProcessPlacer()", "InvalidSetup",
|
||||
FatalException, "Length of process-vector is zero !");
|
||||
}
|
||||
for (int pi=0; pi<len; pi++)
|
||||
{
|
||||
G4VProcess *p = (*processVec)[pi];
|
||||
if (p)
|
||||
{
|
||||
G4cout << " " << p->GetProcessName() << G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout << " " << "no process found for position: " << pi
|
||||
<< ", in vector of length: " << len << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SamplingPostStepAction.cc,v 1.4 2006/06/29 21:12:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4SamplingPostStepAction.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4SamplingPostStepAction.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4ParticleChange.hh"
|
||||
#include "G4VImportanceSplitExaminer.hh"
|
||||
#include "G4Nsplit_Weight.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
#include <sstream>
|
||||
|
||||
G4SamplingPostStepAction::
|
||||
G4SamplingPostStepAction(const G4VTrackTerminator &TrackTerminator)
|
||||
: fTrackTerminator(TrackTerminator)
|
||||
{
|
||||
}
|
||||
|
||||
G4SamplingPostStepAction::~G4SamplingPostStepAction()
|
||||
{
|
||||
}
|
||||
|
||||
void G4SamplingPostStepAction::DoIt(const G4Track& aTrack,
|
||||
G4ParticleChange *aParticleChange,
|
||||
const G4Nsplit_Weight &nw)
|
||||
{
|
||||
// evaluate results from sampler
|
||||
if (nw.fN>1)
|
||||
{
|
||||
// split track
|
||||
Split(aTrack, nw, aParticleChange);
|
||||
}
|
||||
else if (nw.fN==1)
|
||||
{
|
||||
// don't split, but weight may be changed !
|
||||
aParticleChange->ProposeWeight(nw.fW);
|
||||
}
|
||||
else if (nw.fN==0)
|
||||
{
|
||||
// kill track
|
||||
fTrackTerminator.KillTrack();
|
||||
}
|
||||
else
|
||||
{
|
||||
// wrong answer
|
||||
std::ostringstream os;
|
||||
os << "Sampler returned nw = "
|
||||
<< nw
|
||||
<< "\n";
|
||||
G4String m = os.str();
|
||||
|
||||
G4Exception("G4SamplingPostStepAction::DoIt()",
|
||||
"InvalidCondition", FatalException, m);
|
||||
}
|
||||
}
|
||||
|
||||
void G4SamplingPostStepAction::Split(const G4Track &aTrack,
|
||||
const G4Nsplit_Weight &nw,
|
||||
G4ParticleChange *aParticleChange)
|
||||
{
|
||||
aParticleChange->ProposeWeight(nw.fW);
|
||||
aParticleChange->SetNumberOfSecondaries(nw.fN-1);
|
||||
|
||||
for (G4int i=1;i<nw.fN;i++)
|
||||
{
|
||||
G4Track *ptrack = new G4Track(aTrack);
|
||||
|
||||
// ptrack->SetCreatorProcess(aTrack.GetCreatorProcess());
|
||||
ptrack->SetWeight(nw.fW);
|
||||
|
||||
if (ptrack->GetMomentumDirection() != aTrack.GetMomentumDirection())
|
||||
{
|
||||
G4Exception("G4SamplingPostStepAction::Split()", "InvalidCondition",
|
||||
FatalException, "Track with same momentum !");
|
||||
}
|
||||
aParticleChange->AddSecondary(ptrack);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4StepLimiter.cc,v 1.3 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// History
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Transportation.cc,v 1.60.4.2 2007/02/15 19:02:57 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 include file implementation
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UserSpecialCuts.cc,v 1.16 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// History
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VProcessPlacer.cc,v 1.4 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4VProcessPlacer.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4VProcessPlacer.hh"
|
||||
|
||||
G4VProcessPlacer::G4VProcessPlacer()
|
||||
{}
|
||||
G4VProcessPlacer::~G4VProcessPlacer()
|
||||
{}
|
||||
@@ -1,43 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSampler.cc,v 1.4 2006/10/16 18:19:53 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4VSampler.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4VSampler.hh"
|
||||
|
||||
G4VSampler::G4VSampler()
|
||||
{}
|
||||
|
||||
G4VSampler::~G4VSampler()
|
||||
{}
|
||||
@@ -1,45 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSamplerConfigurator.cc,v 1.4 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4VSamplerConfigurator.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
|
||||
#include "G4VSamplerConfigurator.hh"
|
||||
|
||||
|
||||
G4VSamplerConfigurator::G4VSamplerConfigurator()
|
||||
{}
|
||||
|
||||
G4VSamplerConfigurator::~G4VSamplerConfigurator()
|
||||
{}
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VTrackTerminator.cc,v 1.5 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4VTrackTerminator.cc,v 1.6 2007/05/11 14:13:20 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -35,9 +35,12 @@
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4VTrackTerminator.hh"
|
||||
#include "G4GeometryTolerance.hh"
|
||||
|
||||
G4VTrackTerminator::G4VTrackTerminator()
|
||||
{}
|
||||
{
|
||||
kCarTolerance = G4GeometryTolerance::GetInstance()->GetSurfaceTolerance();
|
||||
}
|
||||
|
||||
G4VTrackTerminator::~G4VTrackTerminator()
|
||||
{}
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4WeightCutOffConfigurator.cc,v 1.7 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4WeightCutOffConfigurator
|
||||
//
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4WeightCutOffConfigurator.hh"
|
||||
#include "G4WeightCutOffProcess.hh"
|
||||
|
||||
G4WeightCutOffConfigurator::
|
||||
G4WeightCutOffConfigurator(const G4String &particlename,
|
||||
G4double wsurvival,
|
||||
G4double wlimit,
|
||||
G4double isource,
|
||||
G4VIStore *istore,
|
||||
const G4VGCellFinder &aGCellfinder)
|
||||
: fPlacer(particlename),
|
||||
fPlaced(false)
|
||||
{
|
||||
fWeightCutOffProcess =
|
||||
new G4WeightCutOffProcess(wsurvival,wlimit,isource,istore,aGCellfinder);
|
||||
if (!fWeightCutOffProcess)
|
||||
{
|
||||
G4Exception("G4WeightCutOffConfigurator::G4WeightCutOffConfigurator()",
|
||||
"FatalError", FatalException,
|
||||
"Failed to allocate G4WeightCutOffProcess !");
|
||||
}
|
||||
}
|
||||
|
||||
G4WeightCutOffConfigurator::~G4WeightCutOffConfigurator()
|
||||
{
|
||||
if (fPlaced)
|
||||
{
|
||||
fPlacer.RemoveProcess(fWeightCutOffProcess);
|
||||
delete fWeightCutOffProcess;
|
||||
}
|
||||
}
|
||||
|
||||
void G4WeightCutOffConfigurator::Configure(G4VSamplerConfigurator *)
|
||||
{
|
||||
fPlacer.AddProcessAsLastDoIt(fWeightCutOffProcess);
|
||||
fPlaced = true;
|
||||
}
|
||||
|
||||
const G4VTrackTerminator
|
||||
*G4WeightCutOffConfigurator::GetTrackTerminator() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4WeightCutOffProcess.cc,v 1.9 2006/11/14 09:11:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4WeightCutOffProcess.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4WeightCutOffProcess.hh"
|
||||
#include "G4VScorer.hh"
|
||||
#include "G4GeometryCellStep.hh"
|
||||
#include "G4ParallelGCellFinder.hh"
|
||||
#include "G4MassGCellFinder.hh"
|
||||
#include "G4TouchableHandle.hh"
|
||||
#include "G4VIStore.hh"
|
||||
|
||||
G4WeightCutOffProcess::
|
||||
G4WeightCutOffProcess(G4double wsurvival,
|
||||
G4double wlimit,
|
||||
G4double isource,
|
||||
G4VIStore *istore,
|
||||
const G4VGCellFinder &aGCellFinder,
|
||||
const G4String &aName)
|
||||
: G4VProcess(aName),
|
||||
fParticleChange(new G4ParticleChange),
|
||||
fWeightSurvival(wsurvival),
|
||||
fWeightLimit(wlimit),
|
||||
fSourceImportance(isource),
|
||||
fIStore(istore),
|
||||
fGCellFinder(aGCellFinder)
|
||||
{
|
||||
if (!fParticleChange)
|
||||
{
|
||||
G4Exception("G4WeightCutOffProcess::G4WeightCutOffProcess()",
|
||||
"FatalError", FatalException,
|
||||
"Failed to allocate G4ParticleChange !");
|
||||
}
|
||||
G4VProcess::pParticleChange = fParticleChange;
|
||||
}
|
||||
|
||||
G4WeightCutOffProcess::~G4WeightCutOffProcess()
|
||||
{
|
||||
delete fParticleChange;
|
||||
}
|
||||
|
||||
G4double G4WeightCutOffProcess::
|
||||
PostStepGetPhysicalInteractionLength(const G4Track &,
|
||||
G4double, G4ForceCondition* condition)
|
||||
{
|
||||
*condition = Forced;
|
||||
return kInfinity;
|
||||
}
|
||||
|
||||
G4VParticleChange *
|
||||
G4WeightCutOffProcess::PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step &aStep)
|
||||
{
|
||||
fParticleChange->Initialize(aTrack);
|
||||
G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(aStep);
|
||||
G4double R = fSourceImportance;
|
||||
if (fIStore)
|
||||
{
|
||||
G4double i = fIStore->GetImportance(postCell);
|
||||
if (i>0)
|
||||
{
|
||||
R/=i;
|
||||
}
|
||||
}
|
||||
G4double w = aTrack.GetWeight();
|
||||
if (w<R*fWeightLimit)
|
||||
{
|
||||
G4double ws = fWeightSurvival*R;
|
||||
G4double p = w/(ws);
|
||||
if (G4UniformRand()<p)
|
||||
{
|
||||
fParticleChange->ProposeTrackStatus(fStopAndKill);
|
||||
}
|
||||
else
|
||||
{
|
||||
fParticleChange->ProposeWeight(ws);
|
||||
}
|
||||
}
|
||||
return fParticleChange;
|
||||
}
|
||||
|
||||
const G4String &G4WeightCutOffProcess::GetName() const
|
||||
{
|
||||
return theProcessName;
|
||||
}
|
||||
|
||||
G4double G4WeightCutOffProcess::
|
||||
AlongStepGetPhysicalInteractionLength(const G4Track&,
|
||||
G4double ,
|
||||
G4double ,
|
||||
G4double& ,
|
||||
G4GPILSelection*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
|
||||
G4double G4WeightCutOffProcess::
|
||||
AtRestGetPhysicalInteractionLength(const G4Track& ,
|
||||
G4ForceCondition*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4VParticleChange*
|
||||
G4WeightCutOffProcess::AtRestDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4VParticleChange*
|
||||
G4WeightCutOffProcess::AlongStepDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user