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: G4VSampler.hh,v 1.9 2008/04/21 09:10:28 ahoward Exp $ |
---|
28 | // GEANT4 tag $Name: geant4-09-02 $ |
---|
29 | // |
---|
30 | // ---------------------------------------------------------------------- |
---|
31 | // Class G4VSampler |
---|
32 | // |
---|
33 | // Class description: |
---|
34 | // |
---|
35 | // This interface describes a configurable sampler. |
---|
36 | // It applies to a given particle type. |
---|
37 | // Concrete classes with this interface may be used for |
---|
38 | // scoring, importance sampling and weight cutoff (weight roulette). |
---|
39 | |
---|
40 | // Author: Michael Dressel (Michael.Dressel@cern.ch) |
---|
41 | // ---------------------------------------------------------------------- |
---|
42 | #ifndef G4VSampler_hh |
---|
43 | #define G4VSampler_hh G4VSampler_hh |
---|
44 | |
---|
45 | #include "G4Types.hh" |
---|
46 | #include "G4PlaceOfAction.hh" |
---|
47 | |
---|
48 | class G4VPhysicalVolume; |
---|
49 | class G4VImportanceAlgorithm; |
---|
50 | class G4VIStore; |
---|
51 | class G4VWeightWindowAlgorithm; |
---|
52 | class G4VWeightWindowStore; |
---|
53 | //class G4VScorer; |
---|
54 | |
---|
55 | class G4VSampler |
---|
56 | { |
---|
57 | |
---|
58 | public: // with description |
---|
59 | |
---|
60 | G4VSampler(); |
---|
61 | virtual ~G4VSampler(); |
---|
62 | |
---|
63 | // virtual void PrepareScoring(G4VScorer *Scorer) = 0; |
---|
64 | // virtual void PrepareScoring() = 0; |
---|
65 | |
---|
66 | virtual void PrepareImportanceSampling(G4VIStore *istore, |
---|
67 | const G4VImportanceAlgorithm |
---|
68 | *ialg = 0) = 0; |
---|
69 | |
---|
70 | |
---|
71 | virtual void PrepareWeightRoulett(G4double wsurvive = 0.5, |
---|
72 | G4double wlimit = 0.25, |
---|
73 | G4double isource = 1) = 0; |
---|
74 | |
---|
75 | virtual void PrepareWeightWindow(G4VWeightWindowStore *wwstore, |
---|
76 | G4VWeightWindowAlgorithm *wwAlg = 0, |
---|
77 | G4PlaceOfAction placeOfAction = |
---|
78 | onBoundary) = 0; |
---|
79 | |
---|
80 | virtual void Configure() = 0; |
---|
81 | |
---|
82 | virtual void ClearSampling() = 0; |
---|
83 | // clear the sampler and remove the processes |
---|
84 | |
---|
85 | virtual G4bool IsConfigured() const = 0; |
---|
86 | // check if some initialization hase already been done |
---|
87 | |
---|
88 | virtual void SetParallel(G4bool paraflag) = 0; |
---|
89 | |
---|
90 | }; |
---|
91 | |
---|
92 | #endif |
---|