source: trunk/source/processes/biasing/include/G4WeightWindowProcess.hh @ 1253

Last change on this file since 1253 was 1228, checked in by garnier, 14 years ago

update geant4.9.3 tag

File size: 6.0 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26//
27// $Id: G4WeightWindowProcess.hh,v 1.4 2008/04/21 09:10:28 ahoward Exp $
28// GEANT4 tag $Name: geant4-09-03 $
29//
30// ----------------------------------------------------------------------
31// Class G4MassWeioghtWindowProcess
32//
33// Class description:
34//
35// Used internally by weight window technique in the "mass" geometry.
36// This process is a forced post step process. It will apply
37// weight window biasing on boundaries, collisions
38// or both according to the G4PlaceOfAction argument.
39
40// Author: Michael Dressel (Michael.Dressel@cern.ch)
41// ----------------------------------------------------------------------
42#ifndef G4MassWeioghtWindowProcess_hh
43#define G4MassWeioghtWindowProcess_hh G4MassWeioghtWindowProcess_hh
44
45#include "G4VProcess.hh"
46#include "G4VTrackTerminator.hh"
47#include "G4PlaceOfAction.hh"
48
49class G4SamplingPostStepAction;
50class G4VWeightWindowAlgorithm;
51class G4VWeightWindowStore;
52
53class G4Step;
54class G4Navigator;
55class G4TransportationManager;
56class G4PathFinder;
57class G4VTouchable;
58
59#include "G4FieldTrack.hh"
60#include "G4TouchableHandle.hh"
61
62
63class G4WeightWindowProcess : public G4VProcess, public G4VTrackTerminator
64{
65
66public:  // with description
67
68  G4WeightWindowProcess(const G4VWeightWindowAlgorithm &
69                             aWeightWindowAlgorithm,
70                             const G4VWeightWindowStore &aWWStore,
71                             const G4VTrackTerminator *TrackTerminator,
72                             G4PlaceOfAction placeOfAction,
73                             const G4String &aName = 
74                             "WeightWindowProcess", G4bool para = false);
75    // creates a G4ParticleChange
76
77  virtual ~G4WeightWindowProcess();
78    // delete the G4ParticleChange
79
80
81  //--------------------------------------------------------------
82  // Set Paralle World
83  //--------------------------------------------------------------
84
85  void SetParallelWorld(G4String parallelWorldName);
86  void SetParallelWorld(G4VPhysicalVolume* parallelWorld);
87
88  //--------------------------------------------------------------
89  //     Process interface
90  //--------------------------------------------------------------
91
92  void StartTracking(G4Track*);
93 
94
95
96  virtual G4double
97  PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
98                                       G4double   previousStepSize,
99                                       G4ForceCondition* condition);
100    // make process beeing forced
101  virtual G4VParticleChange *PostStepDoIt(const G4Track&, const G4Step&);
102    // aply weight window sampling
103
104  virtual void KillTrack() const;
105    // used in case no scoring process follows that does the killing
106
107  virtual const G4String &GetName() const;
108
109
110public:  // without description
111
112  //  no operation in  AtRestDoIt and  AlongStepDoIt
113
114  virtual G4double
115  AlongStepGetPhysicalInteractionLength(const G4Track&,
116                                        G4double  ,
117                                        G4double  ,
118                                        G4double& ,
119                                        G4GPILSelection*);
120  virtual G4double
121  AtRestGetPhysicalInteractionLength(const G4Track& ,
122                                     G4ForceCondition*);
123 
124  virtual G4VParticleChange* 
125  AtRestDoIt(const G4Track&, const G4Step&);
126
127
128  virtual G4VParticleChange* 
129  AlongStepDoIt(const G4Track&, const G4Step&);
130 
131private:
132 
133  G4WeightWindowProcess(const G4WeightWindowProcess &);
134  G4WeightWindowProcess &operator=(const G4WeightWindowProcess &);
135 
136private:
137
138  void CopyStep(const G4Step & step);
139
140  G4Step * fGhostStep;
141  G4StepPoint * fGhostPreStepPoint;
142  G4StepPoint * fGhostPostStepPoint;
143
144  G4ParticleChange *fParticleChange;
145  const G4VWeightWindowAlgorithm &fWeightWindowAlgorithm;
146  const G4VWeightWindowStore &fWeightWindowStore;
147  G4SamplingPostStepAction *fPostStepAction;
148  G4PlaceOfAction fPlaceOfAction;
149
150  G4TransportationManager* fTransportationManager;
151  G4PathFinder*        fPathFinder;
152
153  // -------------------------------
154  // Navigation in the Ghost World:
155  // -------------------------------
156  G4String             fGhostWorldName;
157  G4VPhysicalVolume*   fGhostWorld;
158  G4Navigator*         fGhostNavigator;
159  G4int                fNavigatorID;
160  G4TouchableHandle    fOldGhostTouchable;
161  G4TouchableHandle    fNewGhostTouchable;
162  G4FieldTrack         fFieldTrack;
163  G4double             fGhostSafety;
164  G4bool               fOnBoundary;
165
166  G4bool               paraflag;
167
168};
169
170#endif
Note: See TracBrowser for help on using the repository browser.