Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4BiasingProcessSharedData.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 //
26 // $Id: $
27 //
28 //--------------------------------------------------------------------------
29 //
30 // G4BiasingProcessSharedData
31 //
32 // Class Description:
33 // This class represents the data that the G4BiasingProcessInterface
34 // objects attached to a same particle / hold by a same G4ProcessManager
35 // share. It allows the active G4BiasingProcessInterface objects to share
36 // information on operations that are common the these instances:
37 // - the current and previous G4VBiasingOperator objects (their
38 // pointers are collected once, at the beginning of the PostStepGPIL
39 // by the first interface invoked)
40 // - add the list of cooperating G4BiasingProcessInterface objects,
41 // acting on a same particle type.
42 // G4BiasingProcessInterface is friend class of this one.
43 //---------------------------------------------------------------------------
44 // Initial version Sep. 2014 M. Verderi
45 
46 #ifndef G4BiasingProcessSharedData_h
47 #define G4BiasingProcessSharedData_h
48 
49 #include "globals.hh"
50 #include "G4Cache.hh"
51 #include <vector>
52 
53 class G4VBiasingOperator;
55 class G4ProcessManager;
57 
59 
62 
63 public:
64  // -------------------------
65  // -- Public access methods:
66  // -------------------------
67  // -- The biasing process interface objects sharing this shared data class:
68  const std::vector< const G4BiasingProcessInterface* >& GetBiasingProcessInterfaces() const
70  const std::vector< const G4BiasingProcessInterface* >& GetPhysicsBiasingProcessInterfaces() const
72  const std::vector< const G4BiasingProcessInterface* >& GetNonPhysicsBiasingProcessInterfaces() const
74 
75  // -- The possible geometry limiter process:
78 
79 
80 private:
81  // -- Methods used by the G4BiasingProcessInterface objects, thanks to class friendness.
82  // -- Object is created by G4BiasingProcessInterface object:
84  : fProcessManager (mgr),
85  fCurrentBiasingOperator ( nullptr ),
86  fPreviousBiasingOperator ( nullptr ),
87  fParallelGeometryOperator ( nullptr ),
88  fMassGeometryOperator ( nullptr ),
89  fIsNewOperator (true),
92  {}
94  // -- biasing operators:
99 
100 private:
101  // --
103  // -- biasing operators:
108  // --
111 
112  // -- biasing process interfaces sharing this object:
113  std::vector < G4BiasingProcessInterface* > fBiasingProcessInterfaces;
114  std::vector < G4BiasingProcessInterface* > fPhysicsBiasingProcessInterfaces;
115  std::vector < G4BiasingProcessInterface* > fNonPhysicsBiasingProcessInterfaces;
116  // -- the same ones, for public use:
117  std::vector < const G4BiasingProcessInterface* > fPublicBiasingProcessInterfaces;
118  std::vector < const G4BiasingProcessInterface* > fPublicPhysicsBiasingProcessInterfaces;
119  std::vector < const G4BiasingProcessInterface* > fPublicNonPhysicsBiasingProcessInterfaces;
120 
121  // -- possible process limiting step on parallel geometries:
123 
124 
125  // -- thread local:
126  // -- Map between process managers and shared data. This map is made of
127  // -- pointers of G4BiasingSharedData instead of objects themselves :
128  // -- each process needs to keep a valid pointer of a shared data object
129  // -- but a map of object will make pointers invalid when map is increased.
130  static G4MapCache< const G4ProcessManager*,
132 
133 };
134 
135 #endif
G4VBiasingOperator * PreviousBiasingOperator() const
G4BiasingProcessSharedData(const G4ProcessManager *mgr)
G4VBiasingOperator * fPreviousBiasingOperator
const std::vector< const G4BiasingProcessInterface * > & GetNonPhysicsBiasingProcessInterfaces() const
const G4ParallelGeometriesLimiterProcess * GetParallelGeometriesLimiterProcess() const
G4VBiasingOperator * fParallelGeometryOperator
std::vector< const G4BiasingProcessInterface * > fPublicBiasingProcessInterfaces
const std::vector< const G4BiasingProcessInterface * > & GetPhysicsBiasingProcessInterfaces() const
std::vector< G4BiasingProcessInterface * > fPhysicsBiasingProcessInterfaces
std::vector< const G4BiasingProcessInterface * > fPublicPhysicsBiasingProcessInterfaces
bool G4bool
Definition: G4Types.hh:79
const G4ProcessManager * fProcessManager
const std::vector< const G4BiasingProcessInterface * > & GetBiasingProcessInterfaces() const
G4VBiasingOperator * CurrentBiasingOperator() const
G4ParallelGeometriesLimiterProcess * fParallelGeometriesLimiterProcess
static G4MapCache< const G4ProcessManager *, G4BiasingProcessSharedData * > fSharedDataMap
G4VBiasingOperator * fCurrentBiasingOperator
std::vector< G4BiasingProcessInterface * > fNonPhysicsBiasingProcessInterfaces
std::vector< const G4BiasingProcessInterface * > fPublicNonPhysicsBiasingProcessInterfaces
std::vector< G4BiasingProcessInterface * > fBiasingProcessInterfaces