|
||||
File indexing completed on 2025-01-18 09:58:51
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 // 0028 // --------------------------------------------------------------- 0029 // 0030 // G4ParticleChangeForOccurenceBiasing 0031 // 0032 // Class Description: 0033 // A G4VParticleChange dedicated to occurrence biasing : it 0034 // applies weights for non-interaction over a step, and for 0035 // interaction at the end of the step (if interaction occurs) on 0036 // top of a given particle change, that is the one produced by a 0037 // physics process (biased in its final state or not). 0038 // 0039 // --------------------------------------------------------------- 0040 // Initial version Nov. 2013 M. Verderi 0041 // 0042 #ifndef G4ParticleChangeForOccurenceBiasing_hh 0043 #define G4ParticleChangeForOccurenceBiasing_hh 1 0044 0045 #include "G4VParticleChange.hh" 0046 0047 class G4ParticleChangeForOccurenceBiasing : public G4VParticleChange { 0048 public: 0049 G4ParticleChangeForOccurenceBiasing(G4String name); 0050 ~G4ParticleChangeForOccurenceBiasing(); 0051 0052 public: 0053 void SetOccurenceWeightForNonInteraction(G4double w) {fOccurenceWeightForNonInteraction = w;} 0054 G4double GetOccurenceWeightForNonInteraction() const {return fOccurenceWeightForNonInteraction;} 0055 void SetOccurenceWeightForInteraction(G4double w) {fOccurenceWeightForInteraction = w;} 0056 G4double GetOccurenceWeightForInteraction() const {return fOccurenceWeightForInteraction;} 0057 0058 public: 0059 // -- set a wrapped particle change AND USE IT TO UPDATE this occurrence particle change state: 0060 void SetWrappedParticleChange(G4VParticleChange* wpc); 0061 G4VParticleChange* GetWrappedParticleChange() const {return fWrappedParticleChange;} 0062 public: 0063 // -- collect the secondaries from the wrapped particle change, apply weight correction, and clear wrapped particle change: 0064 void StealSecondaries(); 0065 0066 public: 0067 // -- from base class G4VParticleChange: 0068 virtual G4Step* UpdateStepForAtRest (G4Step* step); 0069 virtual G4Step* UpdateStepForAlongStep(G4Step* step); 0070 virtual G4Step* UpdateStepForPostStep (G4Step* step); 0071 0072 public: 0073 const G4String& GetName() const {return fName;} 0074 0075 private: 0076 G4String fName; 0077 G4VParticleChange* fWrappedParticleChange; 0078 G4double fOccurenceWeightForNonInteraction; 0079 G4double fOccurenceWeightForInteraction; 0080 0081 0082 }; 0083 0084 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |