|
|
|||
Warning, file /geant4/examples/extended/biasing/GB06/include/GB06BOptnSplitAndKillByImportance.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // 0027 /// \file GB06BOptnSplitAndKillByImportance.hh 0028 /// \brief Definition of the GB06BOptnSplitAndKillByImportance class 0029 0030 #ifndef GB06BOptnSplitAndKillByImportance_hh 0031 #define GB06BOptnSplitAndKillByImportance_hh 1 0032 0033 #include "G4ParticleChange.hh" 0034 #include "G4ParticleChangeForNothing.hh" 0035 #include "G4TouchableHandle.hh" 0036 #include "G4VBiasingOperation.hh" 0037 class G4BiasingProcessSharedData; 0038 #include <map> 0039 0040 class GB06BOptnSplitAndKillByImportance : public G4VBiasingOperation 0041 { 0042 public: 0043 // -- Constructor : 0044 GB06BOptnSplitAndKillByImportance(G4String name); 0045 // -- destructor: 0046 ~GB06BOptnSplitAndKillByImportance() override; 0047 0048 public: 0049 // ---------------------------------------------- 0050 // -- Methods from G4VBiasingOperation interface: 0051 // ---------------------------------------------- 0052 // -- Unused: 0053 const G4VBiasingInteractionLaw* 0054 ProvideOccurenceBiasingInteractionLaw(const G4BiasingProcessInterface*, G4ForceCondition&) final 0055 { 0056 return nullptr; 0057 } 0058 G4VParticleChange* ApplyFinalStateBiasing(const G4BiasingProcessInterface*, const G4Track*, 0059 const G4Step*, G4bool&) final 0060 { 0061 return nullptr; 0062 } 0063 0064 // -- Used methods ("non-physics biasing methods"): 0065 // ------------------------------------------------ 0066 // -- Method to return the distance or the condition under which 0067 // -- requesting the biasing. 0068 // -- Here we use the condition "forced" and the distance returned 0069 // -- is "dummy" (DBL_MAX). 0070 G4double DistanceToApplyOperation(const G4Track*, G4double, G4ForceCondition* condition) final; 0071 // -- Method the generate the final state, which is: 0072 // -- - made of the primary with half of its original weight, and a clone of it in 0073 // -- case of splitting 0074 // -- - the primary with increased weight or the primary killed, in case of killing 0075 G4VParticleChange* GenerateBiasingFinalState(const G4Track*, const G4Step*) final; 0076 0077 // -- Specific to this example: 0078 // ---------------------------- 0079 // -- The parallel world index refers to the index in the list of parallel worlds 0080 // -- handled by the G4ParallelGeometriesLimiterProcess intance: 0081 void SetParallelWorldIndex(G4int parallelWorldIndex) 0082 { 0083 fParallelWorldIndex = parallelWorldIndex; 0084 } 0085 G4int GetParallelWorldIndex() const { return fParallelWorldIndex; } 0086 // -- Method to set the biasing shared data, they contain many 0087 // -- of the information we need related to parallel geometry: 0088 void SetBiasingSharedData(const G4BiasingProcessSharedData* sharedData) 0089 { 0090 fBiasingSharedData = sharedData; 0091 } 0092 // -- Set the importance map to be used: 0093 void SetImportanceMap(std::map<G4int, G4int>* importanceMap) { fImportanceMap = importanceMap; } 0094 0095 private: 0096 G4int fParallelWorldIndex; 0097 const G4BiasingProcessSharedData* fBiasingSharedData; 0098 G4TouchableHandle fPreStepTouchableHistory; 0099 G4TouchableHandle fPostStepTouchableHistory; 0100 G4ParticleChange fParticleChange; 0101 G4ParticleChangeForNothing fDummyParticleChange; 0102 std::map<G4int, G4int>* fImportanceMap; 0103 }; 0104 0105 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|