Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
GB02BOptrMultiParticleForceCollision.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 
32 #include "G4BOptrForceCollision.hh"
33 #include "G4ParticleDefinition.hh"
34 #include "G4ParticleTable.hh"
35 
36 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
37 
39 : G4VBiasingOperator("TestManyForceCollision")
40 {
41 }
42 
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44 
46 {
47  const G4ParticleDefinition* particle =
49 
50  if ( particle == 0 )
51  {
53  ed << "Particle `" << particleName << "' not found !" << G4endl;
54  G4Exception("GB02BOptrMultiParticleForceCollision::AddParticle(...)",
55  "exGB02.01",
57  ed);
58  return;
59  }
60 
61  G4BOptrForceCollision* optr = new G4BOptrForceCollision(particleName,
62  "ForceCollisionFor"+particleName);
63  fParticlesToBias.push_back( particle );
64  fBOptrForParticle[ particle ] = optr;
65 
66 }
67 
68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
69 
73  const G4BiasingProcessInterface* callingProcess)
74 {
75  if ( fCurrentOperator ) return fCurrentOperator->
76  GetProposedOccurenceBiasingOperation(track, callingProcess);
77  else return 0;
78 }
79 
80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81 
85  const G4BiasingProcessInterface* callingProcess)
86 {
87  if ( fCurrentOperator ) return fCurrentOperator->
88  GetProposedNonPhysicsBiasingOperation(track, callingProcess);
89  else return 0;
90 }
91 
92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
93 
97  const G4BiasingProcessInterface* callingProcess)
98 {
99  if ( fCurrentOperator ) return fCurrentOperator->
100  GetProposedFinalStateBiasingOperation(track, callingProcess);
101  else return 0;
102 }
103 
104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
105 
107 {
108  const G4ParticleDefinition* definition = track->GetParticleDefinition();
109  std::map < const G4ParticleDefinition*, G4BOptrForceCollision* > :: iterator
110  it = fBOptrForParticle.find( definition );
111  fCurrentOperator = 0;
112  if ( it != fBOptrForParticle.end() ) fCurrentOperator = (*it).second;
113 }
114 
115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
116 
117 void
120  G4BiasingAppliedCase biasingCase,
121  G4VBiasingOperation* operationApplied,
122  const G4VParticleChange* particleChangeProduced )
123 {
125  biasingCase,
126  operationApplied,
127  particleChangeProduced );
128 
129 }
130 
131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
132 
133 void
136  G4BiasingAppliedCase biasingCase,
137  G4VBiasingOperation* occurenceOperationApplied,
138  G4double weightForOccurenceInteraction,
139  G4VBiasingOperation* finalStateOperationApplied,
140  const G4VParticleChange* particleChangeProduced )
141 {
143  biasingCase,
144  occurenceOperationApplied,
145  weightForOccurenceInteraction,
146  finalStateOperationApplied,
147  particleChangeProduced );
148 }
149 
150 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
151 
152 void
155  const G4BiasingProcessInterface* callingProcess )
156 {
157  if ( fCurrentOperator ) fCurrentOperator->ExitingBiasing( track, callingProcess );
158 }
159 
160 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4VBiasingOperation * GetProposedFinalStateBiasingOperation(const G4Track *track, const G4BiasingProcessInterface *callingProcess)
void OperationApplied(const G4BiasingProcessInterface *callingProcess, G4BiasingAppliedCase biasingCase, G4VBiasingOperation *operationApplied, const G4VParticleChange *particleChangeProduced) final
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:45
static G4ParticleTable * GetParticleTable()
void ExitingBiasing(const G4Track *track, const G4BiasingProcessInterface *callingProcess)
#define G4endl
Definition: G4ios.hh:61
const G4ParticleDefinition * GetParticleDefinition() const
std::map< const G4ParticleDefinition *, G4BOptrForceCollision * > fBOptrForParticle
virtual G4VBiasingOperation * ProposeFinalStateBiasingOperation(const G4Track *track, const G4BiasingProcessInterface *callingProcess) final
void ReportOperationApplied(const G4BiasingProcessInterface *callingProcess, G4BiasingAppliedCase biasingCase, G4VBiasingOperation *operationApplied, const G4VParticleChange *particleChangeProduced)
double G4double
Definition: G4Types.hh:76
Definition of the GB02BOptrMultiParticleForceCollision class.
virtual G4VBiasingOperation * ProposeOccurenceBiasingOperation(const G4Track *track, const G4BiasingProcessInterface *callingProcess) final
std::vector< const G4ParticleDefinition * > fParticlesToBias
void ExitBiasing(const G4Track *, const G4BiasingProcessInterface *) final
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.hh:65
G4VBiasingOperation * GetProposedNonPhysicsBiasingOperation(const G4Track *track, const G4BiasingProcessInterface *callingProcess)
virtual G4VBiasingOperation * ProposeNonPhysicsBiasingOperation(const G4Track *track, const G4BiasingProcessInterface *callingProcess) final
virtual void StartTracking(const G4Track *track) final
G4BiasingAppliedCase
G4VBiasingOperation * GetProposedOccurenceBiasingOperation(const G4Track *track, const G4BiasingProcessInterface *callingProcess)