Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
GB06BOptrSplitAndKillByImportance.hh
이 파일의 문서화 페이지로 가기
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 //
28 //
29 // $Id: $
30 //---------------------------------------------------------------
31 //
32 // GB06BOptrSplitAndKillByImportance
33 //
34 // Class Description: §§§§
35 // A G4VBiasingOperator concrete implementation example to
36 // illustrate how to bias physics processes cross-section for
37 // one particle type.
38 // The G4VBiasingOperation G4BOptnChangeImportance is
39 // selected by this operator, and is sent to each process
40 // calling the operator.
41 // A simple constant bias to the cross-section is applied,
42 // but more sophisticated changes can be applied.
43 //
44 //---------------------------------------------------------------
45 //
46 
47 #ifndef GB06BOptrSplitAndKillByImportance_hh
48 #define GB06BOptrSplitAndKillByImportance_hh 1
49 
50 #include "G4VBiasingOperator.hh"
51 
52 
57 class G4VPhysicalVolume;
58 #include <map>
59 
60 
62 public:
63  // ------------------------------------------------------------
64  // -- Constructor: takes the name of the particle type to bias:
65  // ------------------------------------------------------------
67  G4String name = "SplitAndKillByImportance");
69 
70  // -- method called at beginning of run:
71  virtual void StartRun();
72 
73 private:
74  // -----------------------------
75  // -- Mandatory from base class:
76  // -----------------------------
77  // -- Not used:
78  virtual G4VBiasingOperation*
80  const G4BiasingProcessInterface*) final
81  { return 0; }
82 
83  // -- Not used:
84  virtual G4VBiasingOperation*
86  const G4BiasingProcessInterface*) final
87  { return 0; }
88 
89  // -- Used method : it will return the biasing operation that will split particles
90  // -- with a probabilty depending on the total absorption cross-section.
91  virtual G4VBiasingOperation*
93  const G4BiasingProcessInterface*) final;
94 
95 
96  // ---------------------------------------
97  // -- Method specific to this application:
98  // ---------------------------------------
99 public:
100  void SetParallelWorld( G4VPhysicalVolume* parallelWorld )
101  { fParallelWorld = parallelWorld; }
102 
103  // -- The importance map, linking a replica number to an volume importance:
104  std::map< G4int, G4int >& GetImportanceMap() { return fImportanceMap; }
105 
106 
107 
108 private:
115  std::map< G4int, G4int > fImportanceMap;
116 
117 };
118 
119 #endif
const XML_Char * name
Definition: expat.h:151
GB06BOptrSplitAndKillByImportance(G4String particleToBias, G4String name="SplitAndKillByImportance")
virtual G4VBiasingOperation * ProposeNonPhysicsBiasingOperation(const G4Track *, const G4BiasingProcessInterface *) final
const G4BiasingProcessSharedData * fBiasingSharedData
void SetParallelWorld(G4VPhysicalVolume *parallelWorld)
int G4int
Definition: G4Types.hh:78
const G4ParallelGeometriesLimiterProcess * fBiasingLimiterProcess
GB06BOptnSplitAndKillByImportance * fSplitAndKillByImportance
virtual G4VBiasingOperation * ProposeOccurenceBiasingOperation(const G4Track *, const G4BiasingProcessInterface *) final
virtual G4VBiasingOperation * ProposeFinalStateBiasingOperation(const G4Track *, const G4BiasingProcessInterface *) final