Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
GB06BOptrSplitAndKillByImportance.cc
이 파일의 문서화 페이지로 가기
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 //
31 
35 
36 
37 #include "G4ParticleDefinition.hh"
38 #include "G4ParticleTable.hh"
39 #include "G4VProcess.hh"
40 
43 
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 
48  G4String name)
49  : G4VBiasingOperator(name),
50  fParallelWorld ( nullptr ),
51  fParallelWorldIndex ( -1 ),
52  fBiasingLimiterProcess ( nullptr )
53 {
55 
56  if ( fParticleToBias == 0 )
57  {
59  ed << "Particle `" << particleName << "' not found !" << G4endl;
60  G4Exception("GB06BOptrSplitAndKillByImportance(...)",
61  "exGB06.01",
63  ed);
64  }
65 
67  new GB06BOptnSplitAndKillByImportance("splitterFor_"+particleName);
68 
69 }
70 
71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
72 
74 {
76 }
77 
78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79 
81 {
82  // ---------------
83  // -- Setup stage:
84  // ---------------
85  // -- get the particle process manager...
86  const G4ProcessManager* processManager = fParticleToBias->GetProcessManager();
87  // -- ... to obtain the biasing information shared among this particle processes:
89  // -- Remember the index of the parallel world:
92 
93  // -- Setup the biasing operation:
94  fSplitAndKillByImportance-> SetBiasingSharedData( fBiasingSharedData );
96  fSplitAndKillByImportance-> SetImportanceMap( &fImportanceMap );
97 
98 }
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
101 
105  const G4BiasingProcessInterface* /*callingProcess*/)
106 {
107  // -- Check if current particle type is the one to bias:
108  if ( track->GetDefinition() != fParticleToBias ) return 0;
109 
110  // -- if so, request biasing:
112 
113 }
114 
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
const XML_Char * name
Definition: expat.h:151
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:45
static G4ParticleTable * GetParticleTable()
G4int GetParallelWorldIndex(const G4VPhysicalVolume *parallelWorld) const
const G4ParallelGeometriesLimiterProcess * GetParallelGeometriesLimiterProcess() const
#define G4endl
Definition: G4ios.hh:61
GB06BOptrSplitAndKillByImportance(G4String particleToBias, G4String name="SplitAndKillByImportance")
G4ParticleDefinition * GetDefinition() const
Definition of the GB06BOptrSplitAndKillByImportance class.
virtual G4VBiasingOperation * ProposeNonPhysicsBiasingOperation(const G4Track *, const G4BiasingProcessInterface *) final
void SetParallelWorldIndex(G4int parallelWorldIndex)
const G4BiasingProcessSharedData * fBiasingSharedData
Definition of the GB06BOptnSplitAndKillByImportance class.
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.hh:65
G4ProcessManager * GetProcessManager() const
const G4ParallelGeometriesLimiterProcess * fBiasingLimiterProcess
GB06BOptnSplitAndKillByImportance * fSplitAndKillByImportance
const G4BiasingProcessSharedData * GetSharedData() const