Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4WeightWindowProcess.hh
Go to the documentation of this file.
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$
28 //
29 // ----------------------------------------------------------------------
30 // Class G4MassWeioghtWindowProcess
31 //
32 // Class description:
33 //
34 // Used internally by weight window technique in the "mass" geometry.
35 // This process is a forced post step process. It will apply
36 // weight window biasing on boundaries, collisions
37 // or both according to the G4PlaceOfAction argument.
38 
39 // Author: Michael Dressel (Michael.Dressel@cern.ch)
40 // ----------------------------------------------------------------------
41 #ifndef G4MassWeioghtWindowProcess_hh
42 #define G4MassWeioghtWindowProcess_hh G4MassWeioghtWindowProcess_hh
43 
44 #include "G4VProcess.hh"
45 #include "G4VTrackTerminator.hh"
46 #include "G4PlaceOfAction.hh"
47 
51 
52 class G4Step;
53 class G4Navigator;
55 class G4PathFinder;
56 class G4VTouchable;
57 
58 #include "G4FieldTrack.hh"
59 #include "G4TouchableHandle.hh"
60 
61 
63 {
64 
65 public: // with description
66 
68  aWeightWindowAlgorithm,
69  const G4VWeightWindowStore &aWWStore,
70  const G4VTrackTerminator *TrackTerminator,
71  G4PlaceOfAction placeOfAction,
72  const G4String &aName =
73  "WeightWindowProcess", G4bool para = false);
74  // creates a G4ParticleChange
75 
76  virtual ~G4WeightWindowProcess();
77  // delete the G4ParticleChange
78 
79 
80  //--------------------------------------------------------------
81  // Set Paralle World
82  //--------------------------------------------------------------
83 
84  void SetParallelWorld(G4String parallelWorldName);
85  void SetParallelWorld(G4VPhysicalVolume* parallelWorld);
86 
87  //--------------------------------------------------------------
88  // Process interface
89  //--------------------------------------------------------------
90 
91  void StartTracking(G4Track*);
92 
93 
94 
95  virtual G4double
97  G4double previousStepSize,
99  // make process beeing forced
100  virtual G4VParticleChange *PostStepDoIt(const G4Track&, const G4Step&);
101  // aply weight window sampling
102 
103  virtual void KillTrack() const;
104  // used in case no scoring process follows that does the killing
105 
106  virtual const G4String &GetName() const;
107 
108 
109 public: // without description
110 
111  // no operation in AtRestDoIt and AlongStepDoIt
112 
113  virtual G4double
115  G4double ,
116  G4double ,
117  G4double& ,
118  G4GPILSelection*);
119  virtual G4double
122 
123  virtual G4VParticleChange*
124  AtRestDoIt(const G4Track&, const G4Step&);
125 
126 
127  virtual G4VParticleChange*
128  AlongStepDoIt(const G4Track&, const G4Step&);
129 
130 private:
131 
133  G4WeightWindowProcess &operator=(const G4WeightWindowProcess &);
134 
135 private:
136 
137  void CopyStep(const G4Step & step);
138 
139  G4Step * fGhostStep;
140  G4StepPoint * fGhostPreStepPoint;
141  G4StepPoint * fGhostPostStepPoint;
142 
143  G4ParticleChange *fParticleChange;
144  const G4VWeightWindowAlgorithm &fWeightWindowAlgorithm;
145  const G4VWeightWindowStore &fWeightWindowStore;
146  G4SamplingPostStepAction *fPostStepAction;
147  G4PlaceOfAction fPlaceOfAction;
148 
149  G4TransportationManager* fTransportationManager;
150  G4PathFinder* fPathFinder;
151 
152  // -------------------------------
153  // Navigation in the Ghost World:
154  // -------------------------------
155  G4String fGhostWorldName;
156  G4VPhysicalVolume* fGhostWorld;
157  G4Navigator* fGhostNavigator;
158  G4int fNavigatorID;
159  G4TouchableHandle fOldGhostTouchable;
160  G4TouchableHandle fNewGhostTouchable;
161  G4FieldTrack fFieldTrack;
162  G4double fGhostSafety;
163  G4bool fOnBoundary;
164 
165  G4bool paraflag;
166 
167 };
168 
169 #endif