Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // G4VBiasingOperation 27 // 28 // Class Description: 29 // 30 // An abstract class to model the behavior of 31 // physics-based biasing (change of physics pr 32 // physics-based one, like splitting, killing. 33 // 34 // o The change of behavior of a physics proce 35 // - a change of the PostStep interaction 36 // occurrence biasing 37 // - a change in final state production 38 // - both, provided above two are uncorrel 39 // o The change of occurrence is driven by pro 40 // law (G4VBiasingInteractionLaw) that is us 41 // exponential law. 42 // This change of occurrence is controlled t 43 // o The change in final state production is m 44 // method the user is fully responsible of. 45 // 46 // o Non-physics-based biasing is controlled b 47 // specify where this biasing should happen, 48 // the related final-state. 49 // 50 // Author: Marc Verderi (LLR), November 2013 51 // ------------------------------------------- 52 #ifndef G4VBiasingOperation_hh 53 #define G4VBiasingOperation_hh 1 54 55 #include "globals.hh" 56 #include "G4ForceCondition.hh" 57 #include "G4GPILSelection.hh" 58 59 class G4VParticleChange; 60 class G4Track; 61 class G4Step; 62 class G4VBiasingInteractionLaw; 63 class G4VProcess; 64 class G4BiasingProcessInterface; 65 66 class G4VBiasingOperation 67 { 68 public: 69 70 // -- Constructor: 71 G4VBiasingOperation(const G4String& name); 72 73 // -- destructor: 74 virtual ~G4VBiasingOperation() = default; 75 76 // ----------------------------- 77 // -- Interface to sub-classes : 78 // ----------------------------- 79 // -- 80 // ************************************* 81 // ** Methods for physics-based biasing: 82 // ************************************* 83 // -- 84 // ---- I. Biasing of the process occurren 85 // --------------------------------------- 86 // ---- The biasing of the process occurre 87 // ---- behavior. But the weight is manipu 88 // ---- non-interaction) and PostStep meth 89 // ---- reason, occurrence biasing is hand 90 // ---- 91 // ---- If the operation is returned to th 92 // ---- ProposeOccurenceBiasingOperation(. 93 // ---- of the biasing operator, all metho 94 // ---- 95 // ---- I.1) Methods called in at the Post 96 // ---- 97 // ------ o Main and mandatory method for 98 // ------ - propose an interaction law t 99 // ------ - the operation is told which 100 // ------ callingProcess argument. 101 // ------ - the returned law will have t 102 // ------ asked for its GetSampledInte 103 // ------ - the operation can propose a 104 // ------ to the operation is the one 105 // ------ unchanged, this same value w 106 virtual const G4VBiasingInteractionLaw* 107 ProvideOccurenceBiasingInteractionLaw( con 108 G4F 109 // ---- 110 // ---- I.2) Methods called in at the Alon 111 // ---- 112 // ------ o Operation can optionnally limi 113 virtual G4double ProposeAlongStepLimit( co 114 { return DBL_MAX; } 115 116 // ------ o Operation can propose a GPILSe 117 // ------ this selection superseeded the 118 // ------ if the wrapped process exists, 119 virtual G4GPILSelection ProposeGPILSelecti 120 { return wrappedProcessSelection; } 121 122 // ---- 123 // ---- I.3) Methods called in at the Alon 124 // ---- 125 // ------ o Helper method to inform the op 126 // ------ applied to the primary track f 127 virtual void AlongMoveBy( const G4BiasingP 128 const G4Step* /* 129 G4double / 130 131 // ---- II. Biasing of the process post st 132 // --------------------------------------- 133 // ------ Mandatory method for biasing of 134 // ------ holds by the G4BiasingProcessInt 135 // ------ User has full freedom for the pa 136 // ------ the correctness of weights set t 137 // ------ The forcedBiasedFinalState shoul 138 // ------ way, if an occurrence biasing is 139 // ------ for it will be applied. If retur 140 // ------ the returned particle change wil 141 // ------ responsibility of the weight cor 142 // ------ The wrappedProcess can be access 143 // ------ This can be used in conjunction 144 // ------ state biasing is uncorrelated wi 145 // ------ of weights occur between these t 146 virtual G4VParticleChange* ApplyFinalState 147 148 149 150 151 // ---- III. Biasing of the process along 152 // --------------------------------------- 153 // ---- Unprovided for now : requires sign 154 155 // *************************************** 156 // -- Methods for non-physics-based biasin 157 // *************************************** 158 // ---- 159 // ---- If the operation is returned to th 160 // ---- ProposeNonPhysicsBiasingOperation( 161 // ---- of the biasing operator, all metho 162 // ----- 163 // ---- 1) Method called in at the PostSte 164 // ---- 165 // ---- o Return to the distance at which 166 // ---- play with the force condition fl 167 virtual G4double DistanceToApplyOperation( 168 169 170 // ---- 171 // ---- 2) Method called in at the PostSte 172 // ---- 173 // ---- o Generate the final state for bia 174 virtual G4VParticleChange* GenerateBiasing 175 176 177 // --------------------------------------- 178 // -- public interface and utility methods 179 // --------------------------------------- 180 181 const G4String& GetName() const { return f 182 std::size_t GetUniqueID() const { return f 183 184 private: 185 186 const G4String fName; 187 // -- better would be to have fUniqueID co 188 std::size_t fUniqueID; 189 }; 190 191 #endif 192