![]() |
|
|||
File indexing completed on 2025-02-23 09:20:45
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 GB03BOptrGeometryBasedBiasing.cc 0028 /// \brief Implementation of the GB03BOptrGeometryBasedBiasing class 0029 0030 #include "GB03BOptrGeometryBasedBiasing.hh" 0031 0032 #include "G4GenericMessenger.hh" 0033 #include "G4SystemOfUnits.hh" 0034 #include "G4Track.hh" 0035 0036 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0037 0038 GB03BOptrGeometryBasedBiasing::GB03BOptrGeometryBasedBiasing() 0039 : G4VBiasingOperator("GB03BOptrGeometryBasedBiasing"), fSplittingFactor(2), fApplyProbability(1.0) 0040 { 0041 fSplitAndKillOperation = new GB03BOptnSplitOrKillOnBoundary("splitAndkill"); 0042 0043 // -- Define messengers: 0044 fSplittingFactorMessenger = new G4GenericMessenger(this, "/GB03/biasing/", "Biasing control"); 0045 0046 G4GenericMessenger::Command& splittingFactorCmd = fSplittingFactorMessenger->DeclareProperty( 0047 "setSplittingFactor", fSplittingFactor, "Define the splitting factor."); 0048 splittingFactorCmd.SetStates(G4State_Idle); 0049 0050 fApplyProbabilityMessenger = new G4GenericMessenger(this, "/GB03/biasing/", "Biasing control"); 0051 0052 G4GenericMessenger::Command& applyProbCmd = fApplyProbabilityMessenger->DeclareProperty( 0053 "setApplyProbability", fApplyProbability, 0054 "Define the probability to apply the splitting/killing."); 0055 applyProbCmd.SetStates(G4State_Idle); 0056 } 0057 0058 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0059 0060 GB03BOptrGeometryBasedBiasing::~GB03BOptrGeometryBasedBiasing() 0061 { 0062 delete fSplitAndKillOperation; 0063 } 0064 0065 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0066 0067 void GB03BOptrGeometryBasedBiasing::StartRun() 0068 { 0069 fSplitAndKillOperation->SetSplittingFactor(fSplittingFactor); 0070 fSplitAndKillOperation->SetApplyProbability(fApplyProbability); 0071 G4cout << GetName() << " : starting run with splitting factor = " << fSplittingFactor 0072 << ", and probability for applying the technique " << fApplyProbability << " . " << G4endl; 0073 } 0074 0075 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0076 0077 G4VBiasingOperation* GB03BOptrGeometryBasedBiasing::ProposeNonPhysicsBiasingOperation( 0078 const G4Track* /* track */, const G4BiasingProcessInterface* /* callingProcess */) 0079 { 0080 // Here, we always return the split and kill biasing operation: 0081 return fSplitAndKillOperation; 0082 } 0083 0084 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |