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