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 // G4ParticleChangeForOccurenceBiasing 27 // ------------------------------------------- 28 29 #include "G4ParticleChangeForOccurenceBiasing. 30 31 G4ParticleChangeForOccurenceBiasing:: 32 G4ParticleChangeForOccurenceBiasing(const G4St 33 : G4VParticleChange(), 34 fName(name) 35 {} 36 37 void G4ParticleChangeForOccurenceBiasing:: 38 SetWrappedParticleChange(G4VParticleChange* wp 39 { 40 fWrappedParticleChange = wpc; 41 } 42 43 void G4ParticleChangeForOccurenceBiasing::Stea 44 { 45 SetNumberOfSecondaries( fWrappedParticleChan 46 for (G4int isecond = 0; isecond < fWrappedPa 47 { 48 G4Track* secondary = fWrappedParticleChan 49 secondary->SetWeight ( secondary->GetWeigh 50 AddSecondary( secondary ); 51 } 52 fWrappedParticleChange->Clear(); 53 } 54 55 G4Step* G4ParticleChangeForOccurenceBiasing::U 56 { 57 return step; 58 } 59 60 G4Step* G4ParticleChangeForOccurenceBiasing::U 61 { 62 // -- make particle change of wrapped proces 63 if ( fWrappedParticleChange ) 64 fWrappedParticleChange->UpdateStepForAlong 65 66 // -- multiply parent weight by weight due t 67 G4StepPoint* postStepPoint = step->GetPostSt 68 postStepPoint->SetWeight( postStepPoint->Get 69 70 return step; 71 } 72 73 G4Step* G4ParticleChangeForOccurenceBiasing::U 74 { 75 // -- let make first wrapped process to appl 76 fWrappedParticleChange->UpdateStepForPostSte 77 // -- then apply weight correction due to oc 78 G4StepPoint* postStepPoint = step->GetPostSt 79 postStepPoint->SetWeight( postStepPoint->Get 80 81 return step; 82 } 83