|
||||
File indexing completed on 2025-01-18 09:57:59
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 // G4BOptnForceFreeFlight 0031 // 0032 // Class Description: 0033 // A G4VBiasingOperation physics-based biasing operation. 0034 // If forces the physics process to not act on the track. 0035 // In this implementation (meant for the ForceCollision 0036 // operator) the free flight is done under zero weight for 0037 // the track, and the action is meant to accumulate the weight 0038 // change for making this uninteracting flight, 0039 // cumulatedWeightChange. 0040 // When the track reaches the current volume boundary, its 0041 // weight is restored with value : 0042 // initialWeight * cumulatedWeightChange 0043 // 0044 //--------------------------------------------------------------- 0045 // Initial version Nov. 2013 M. Verderi 0046 #ifndef G4BOptnForceFreeFlight_hh 0047 #define G4BOptnForceFreeFlight_hh 1 0048 0049 #include "G4VBiasingOperation.hh" 0050 #include "G4ForceCondition.hh" 0051 #include "G4ParticleChange.hh" // -- ยงยง should add a dedicated "weight change only" particle change 0052 class G4ILawForceFreeFlight; 0053 0054 0055 class G4BOptnForceFreeFlight : public G4VBiasingOperation { 0056 public: 0057 // -- Constructor : 0058 G4BOptnForceFreeFlight(G4String name); 0059 // -- destructor: 0060 virtual ~G4BOptnForceFreeFlight(); 0061 0062 public: 0063 // -- Methods from G4VBiasingOperation interface: 0064 // ------------------------------------------- 0065 // -- Used: 0066 virtual const G4VBiasingInteractionLaw* ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface*, G4ForceCondition& ); 0067 virtual void AlongMoveBy( const G4BiasingProcessInterface*, const G4Step*, G4double ); 0068 virtual G4VParticleChange* ApplyFinalStateBiasing( const G4BiasingProcessInterface*, const G4Track*, const G4Step*, G4bool&); 0069 0070 // -- Unused: 0071 virtual G4double DistanceToApplyOperation( const G4Track*, 0072 G4double, 0073 G4ForceCondition*) {return DBL_MAX;} 0074 virtual G4VParticleChange* GenerateBiasingFinalState( const G4Track*, 0075 const G4Step* ) {return 0;} 0076 0077 0078 public: 0079 // -- Additional methods, specific to this class: 0080 // ---------------------------------------------- 0081 // -- return concrete type of interaction law: 0082 G4ILawForceFreeFlight* GetForceFreeFlightLaw() { 0083 return fForceFreeFlightInteractionLaw; 0084 } 0085 // -- initialization for weight: 0086 void ResetInitialTrackWeight(G4double w) {fInitialTrackWeight = w; fCumulatedWeightChange = 1.0;} 0087 G4bool OperationComplete() const { return fOperationComplete; } 0088 0089 private: 0090 G4ILawForceFreeFlight* fForceFreeFlightInteractionLaw; 0091 G4double fCumulatedWeightChange, 0092 fInitialTrackWeight; 0093 G4ParticleChange fParticleChange; 0094 G4bool fOperationComplete; 0095 }; 0096 0097 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |