- Timestamp:
- Apr 6, 2009, 12:17:57 PM (15 years ago)
- Location:
- trunk/source/processes/biasing
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/biasing/History
r819 r960 1 $Id: History,v 1.1 6 2007/10/31 18:05:44ahoward Exp $1 $Id: History,v 1.19 2008/04/22 09:29:35 ahoward Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 April 22nd, 2008 Alex Howard (procbiasing-V09-01-02) 21 - Removed G4CellFinder and associated dependency in G4WeigthCutOffProcess and 22 G4WeightCutOffConfigurator- was a hang-up from previous implementation 23 which was erroneously left in the G4WeightCutOffProcess. 24 This meant the WeightCutOff could only work in a MASS geometry 25 (by coincidence between the ImportanceBiasing and the GeometryCells). 26 27 April 21st, 2008 Alex Howard (procbiasing-V09-01-01) 28 - mis-tagged - please ignore 29 30 April 21st, 2008 Alex Howard (procbiasing-V09-01-00) 31 - Tag of the HEAD which includes scoring for backwards compatibility 19 32 20 33 October 31st, 2007 Alex Howard (procbiasing-V09-00-00) -
trunk/source/processes/biasing/include/G4GeometrySampler.hh
r819 r960 25 25 // 26 26 // 27 // $Id: G4GeometrySampler.hh,v 1. 9 2007/06/01 09:52:23ahoward Exp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4GeometrySampler.hh,v 1.11 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- … … 50 50 //class G4ScoreConfigurator; 51 51 class G4WeightCutOffConfigurator; 52 class G4VGCellFinder;52 //class G4VGCellFinder; 53 53 54 54 class G4GeometrySampler : public G4VSampler … … 92 92 G4ImportanceConfigurator *fImportanceConfigurator; 93 93 // G4ScoreConfigurator *fScoreConfigurator; 94 G4VGCellFinder *fGCellFinder;94 // G4VGCellFinder *fGCellFinder; 95 95 G4WeightCutOffConfigurator *fWeightCutOffConfigurator; 96 96 G4VIStore *fIStore; -
trunk/source/processes/biasing/include/G4ImportanceConfigurator.hh
r819 r960 25 25 // 26 26 // 27 // $Id: G4ImportanceConfigurator.hh,v 1. 3 2007/06/01 09:16:33ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4ImportanceConfigurator.hh,v 1.4 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/include/G4ImportanceProcess.hh
r819 r960 25 25 // 26 26 // 27 // $Id: G4ImportanceProcess.hh,v 1. 3 2007/06/01 09:16:33ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4ImportanceProcess.hh,v 1.4 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/include/G4PlaceOfAction.hh
r819 r960 25 25 // 26 26 // 27 // $Id: G4PlaceOfAction.hh,v 1. 2 2007/06/01 09:16:33ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4PlaceOfAction.hh,v 1.3 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/include/G4ProcessPlacer.hh
r819 r960 25 25 // 26 26 // 27 // $Id: G4ProcessPlacer.hh,v 1. 3 2007/10/31 18:05:44ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4ProcessPlacer.hh,v 1.4 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/include/G4SamplingPostStepAction.hh
r819 r960 25 25 // 26 26 // 27 // $Id: G4SamplingPostStepAction.hh,v 1. 2 2007/06/01 09:16:33ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4SamplingPostStepAction.hh,v 1.3 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/include/G4TrackTerminator.hh
r819 r960 25 25 // 26 26 // 27 // $Id: G4TrackTerminator.hh,v 1. 2 2007/06/01 09:16:33ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4TrackTerminator.hh,v 1.3 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/include/G4VProcessPlacer.hh
r819 r960 25 25 // 26 26 // 27 // $Id: G4VProcessPlacer.hh,v 1. 2 2007/06/01 09:16:33ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4VProcessPlacer.hh,v 1.3 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/include/G4VSampler.hh
r819 r960 25 25 // 26 26 // 27 // $Id: G4VSampler.hh,v 1. 8 2007/06/25 06:57:22ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4VSampler.hh,v 1.9 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/include/G4VSamplerConfigurator.hh
r819 r960 25 25 // 26 26 // 27 // $Id: G4VSamplerConfigurator.hh,v 1. 2 2007/06/01 09:16:33ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4VSamplerConfigurator.hh,v 1.3 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/include/G4WeightCutOffConfigurator.hh
r819 r960 25 25 // 26 26 // 27 // $Id: G4WeightCutOffConfigurator.hh,v 1. 2 2007/06/01 09:16:33ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4WeightCutOffConfigurator.hh,v 1.3 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- … … 46 46 47 47 class G4WeightCutOffProcess; 48 class G4VGCellFinder;48 //class G4VGCellFinder; 49 49 class G4VIStore; 50 50 class G4VPhysicalVolume; … … 61 61 G4double isource, 62 62 G4VIStore *istore, 63 const G4VGCellFinder &aGCellFinder,G4bool paraflag); 63 //const G4VGCellFinder &aGCellFinder, 64 G4bool paraflag); 64 65 65 66 virtual ~G4WeightCutOffConfigurator(); -
trunk/source/processes/biasing/include/G4WeightCutOffProcess.hh
r819 r960 25 25 // 26 26 // 27 // $Id: G4WeightCutOffProcess.hh,v 1. 2 2007/06/01 09:16:33ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4WeightCutOffProcess.hh,v 1.3 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- … … 44 44 #include "G4GeometryCell.hh" 45 45 46 class G4VGCellFinder;46 //class G4VGCellFinder; 47 47 class G4VIStore; 48 48 … … 67 67 G4double isource, 68 68 G4VIStore *istore, 69 const G4VGCellFinder &aGCellFinder,69 // const G4VGCellFinder &aGCellFinder, 70 70 const G4String &aName = "WeightCutOffProcess", G4bool para = false); 71 71 // create a G4ParticleChange … … 134 134 G4double fSourceImportance; 135 135 G4VIStore *fIStore; 136 const G4VGCellFinder &fGCellFinder;136 // const G4VGCellFinder &fGCellFinder; 137 137 138 138 -
trunk/source/processes/biasing/include/G4WeightWindowConfigurator.hh
r819 r960 25 25 // 26 26 // 27 // $Id: G4WeightWindowConfigurator.hh,v 1. 3 2007/06/01 09:16:33ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4WeightWindowConfigurator.hh,v 1.4 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/include/G4WeightWindowProcess.hh
r819 r960 25 25 // 26 26 // 27 // $Id: G4WeightWindowProcess.hh,v 1. 3 2007/06/01 09:16:33ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4WeightWindowProcess.hh,v 1.4 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/src/G4GeometrySampler.cc
r819 r960 25 25 // 26 26 // 27 // $Id: G4GeometrySampler.cc,v 1. 8 2007/06/01 09:52:23ahoward Exp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4GeometrySampler.cc,v 1.10 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- … … 46 46 #include "G4WeightWindowConfigurator.hh" 47 47 #include "G4WeightCutOffConfigurator.hh" 48 #include "G4GCellFinder.hh"48 //#include "G4GCellFinder.hh" 49 49 50 50 G4GeometrySampler:: … … 54 54 fImportanceConfigurator(0), 55 55 // fScoreConfigurator(0), 56 fGCellFinder(0),56 // fGCellFinder(0), 57 57 fWeightCutOffConfigurator(0), 58 58 fIStore(0), … … 91 91 fWeightCutOffConfigurator = 0; 92 92 } 93 if (fGCellFinder)94 {95 delete fGCellFinder;96 fGCellFinder = 0;97 }93 // if (fGCellFinder) 94 // { 95 // delete fGCellFinder; 96 // fGCellFinder = 0; 97 // } 98 98 fIStore = 0; 99 99 fConfigurators.clear(); … … 162 162 // fGCellFinder = new G4GCellFinder(fWorld); 163 163 G4cout << " preparing weight roulette" << G4endl; 164 fGCellFinder = new G4GCellFinder();165 if (!fGCellFinder)166 {167 G4Exception("G4GeometrySampler::PrepareWeightRoulett()",168 "FatalError", FatalException,169 "Failed allocation of G4GCellFinder !");170 }164 // fGCellFinder = new G4GCellFinder(); 165 // if (!fGCellFinder) 166 // { 167 // G4Exception("G4GeometrySampler::PrepareWeightRoulett()", 168 // "FatalError", FatalException, 169 // "Failed allocation of G4GCellFinder !"); 170 // } 171 171 172 172 fWeightCutOffConfigurator = … … 176 176 isource, 177 177 fIStore, 178 *fGCellFinder, paraflag); 178 paraflag); 179 //*fGCellFinder, paraflag); 179 180 if (!fWeightCutOffConfigurator) 180 181 { -
trunk/source/processes/biasing/src/G4ImportanceConfigurator.cc
r819 r960 25 25 // 26 26 // 27 // $Id: G4ImportanceConfigurator.cc,v 1. 3 2007/06/01 09:16:33ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4ImportanceConfigurator.cc,v 1.4 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/src/G4ImportanceProcess.cc
r819 r960 25 25 // 26 26 // 27 // $Id: G4ImportanceProcess.cc,v 1. 3 2007/06/01 09:16:33ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4ImportanceProcess.cc,v 1.4 2008/04/21 09:10:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/src/G4ProcessPlacer.cc
r819 r960 25 25 // 26 26 // 27 // $Id: G4ProcessPlacer.cc,v 1. 4 2007/10/31 18:05:44ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4ProcessPlacer.cc,v 1.5 2008/04/21 09:10:29 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/src/G4SamplingPostStepAction.cc
r819 r960 25 25 // 26 26 // 27 // $Id: G4SamplingPostStepAction.cc,v 1. 2 2007/06/01 09:16:33ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4SamplingPostStepAction.cc,v 1.3 2008/04/21 09:10:29 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/src/G4VProcessPlacer.cc
r819 r960 25 25 // 26 26 // 27 // $Id: G4VProcessPlacer.cc,v 1. 1 2007/06/01 14:57:03ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4VProcessPlacer.cc,v 1.2 2008/04/21 09:10:29 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/src/G4VSampler.cc
r819 r960 25 25 // 26 26 // 27 // $Id: G4VSampler.cc,v 1. 2 2007/06/01 09:16:34ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4VSampler.cc,v 1.3 2008/04/21 09:10:29 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/src/G4VSamplerConfigurator.cc
r819 r960 25 25 // 26 26 // 27 // $Id: G4VSamplerConfigurator.cc,v 1. 2 2007/06/01 09:16:34ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4VSamplerConfigurator.cc,v 1.3 2008/04/21 09:10:29 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/src/G4WeightCutOffConfigurator.cc
r819 r960 25 25 // 26 26 // 27 // $Id: G4WeightCutOffConfigurator.cc,v 1. 2 2007/06/01 09:16:34ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4WeightCutOffConfigurator.cc,v 1.3 2008/04/21 09:10:29 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- … … 44 44 G4double isource, 45 45 G4VIStore *istore, 46 const G4VGCellFinder &aGCellfinder, G4bool para) 46 G4bool para) 47 // const G4VGCellFinder &aGCellfinder, G4bool para) 47 48 : fWorld(worldvolume), 48 49 fPlacer(particlename), … … 51 52 { 52 53 fWeightCutOffProcess = 53 new G4WeightCutOffProcess(wsurvival,wlimit,isource,istore,aGCellfinder,"WeightCutOffProcess",paraflag); 54 new G4WeightCutOffProcess(wsurvival,wlimit,isource,istore,"WeightCutOffProcess",paraflag); 55 // new G4WeightCutOffProcess(wsurvival,wlimit,isource,istore,aGCellfinder,"WeightCutOffProcess",paraflag); 54 56 if (!fWeightCutOffProcess) 55 57 { -
trunk/source/processes/biasing/src/G4WeightCutOffProcess.cc
r819 r960 25 25 // 26 26 // 27 // $Id: G4WeightCutOffProcess.cc,v 1. 2 2007/06/01 09:16:34ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4WeightCutOffProcess.cc,v 1.3 2008/04/21 09:10:29 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- … … 38 38 //#include "G4VScorer.hh" 39 39 #include "G4GeometryCellStep.hh" 40 #include "G4GCellFinder.hh"40 //#include "G4GCellFinder.hh" 41 41 #include "G4TouchableHandle.hh" 42 42 #include "G4VIStore.hh" … … 58 58 G4double isource, 59 59 G4VIStore *istore, 60 const G4VGCellFinder &aGCellFinder,60 // const G4VGCellFinder &aGCellFinder, 61 61 const G4String &aName, G4bool para) 62 62 : G4VProcess(aName), … … 66 66 fSourceImportance(isource), 67 67 fIStore(istore), 68 fGCellFinder(aGCellFinder),68 // fGCellFinder(aGCellFinder), 69 69 fGhostNavigator(0), fNavigatorID(-1), fFieldTrack('0') 70 70 { … … 225 225 } 226 226 227 G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(aStep); 228 // G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(fGhostStep); 229 G4double R = fSourceImportance; 230 if (fIStore) 231 { 232 G4double i = fIStore->GetImportance(postCell); 233 if (i>0) 234 { 235 R/=i; 236 } 237 } 238 G4double w = aTrack.GetWeight(); 239 if (w<R*fWeightLimit) 240 { 241 G4double ws = fWeightSurvival*R; 242 G4double p = w/(ws); 243 if (G4UniformRand()<p) 244 { 245 fParticleChange->ProposeTrackStatus(fStopAndKill); 246 } 247 else 248 { 249 fParticleChange->ProposeWeight(ws); 250 } 251 } 227 if(paraflag) { 228 G4GeometryCell postCell(*(fGhostPostStepPoint->GetPhysicalVolume()), 229 fGhostPostStepPoint->GetTouchable()->GetReplicaNumber()); 230 231 232 // G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(aStep); 233 // G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(fGhostStep); 234 G4double R = fSourceImportance; 235 if (fIStore) 236 { 237 G4double i = fIStore->GetImportance(postCell); 238 if (i>0) 239 { 240 R/=i; 241 } 242 } 243 G4double w = aTrack.GetWeight(); 244 if (w<R*fWeightLimit) 245 { 246 G4double ws = fWeightSurvival*R; 247 G4double p = w/(ws); 248 if (G4UniformRand()<p) 249 { 250 fParticleChange->ProposeTrackStatus(fStopAndKill); 251 } 252 else 253 { 254 fParticleChange->ProposeWeight(ws); 255 } 256 } 257 } else { 258 259 G4GeometryCell postCell(*(aStep.GetPostStepPoint()->GetPhysicalVolume()), 260 aStep.GetPostStepPoint()->GetTouchable()->GetReplicaNumber()); 261 262 // G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(aStep); 263 // G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(fGhostStep); 264 G4double R = fSourceImportance; 265 if (fIStore) 266 { 267 G4double i = fIStore->GetImportance(postCell); 268 if (i>0) 269 { 270 R/=i; 271 } 272 } 273 G4double w = aTrack.GetWeight(); 274 if (w<R*fWeightLimit) 275 { 276 G4double ws = fWeightSurvival*R; 277 G4double p = w/(ws); 278 if (G4UniformRand()<p) 279 { 280 fParticleChange->ProposeTrackStatus(fStopAndKill); 281 } 282 else 283 { 284 fParticleChange->ProposeWeight(ws); 285 } 286 } 287 } 288 252 289 return fParticleChange; 290 253 291 } 254 292 -
trunk/source/processes/biasing/src/G4WeightWindowConfigurator.cc
r819 r960 25 25 // 26 26 // 27 // $Id: G4WeightWindowConfigurator.cc,v 1. 3 2007/06/01 09:16:34ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4WeightWindowConfigurator.cc,v 1.4 2008/04/21 09:10:29 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ---------------------------------------------------------------------- -
trunk/source/processes/biasing/src/G4WeightWindowProcess.cc
r819 r960 25 25 // 26 26 // 27 // $Id: G4WeightWindowProcess.cc,v 1. 3 2007/06/01 09:16:34ahoward Exp $28 // GEANT4 tag $Name: $27 // $Id: G4WeightWindowProcess.cc,v 1.4 2008/04/21 09:10:29 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.