Ignore:
Timestamp:
Apr 6, 2009, 12:17:57 PM (17 years ago)
Author:
garnier
Message:

update processes

Location:
trunk/source/processes/biasing/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/biasing/src/G4GeometrySampler.cc

    r819 r960  
    2525//
    2626//
    27 // $Id: G4GeometrySampler.cc,v 1.8 2007/06/01 09:52:23 ahoward Exp $
    28 // GEANT4 tag $Name: geant4-09-01-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 $
    2929//
    3030// ----------------------------------------------------------------------
     
    4646#include "G4WeightWindowConfigurator.hh"
    4747#include "G4WeightCutOffConfigurator.hh"
    48 #include "G4GCellFinder.hh"
     48//#include "G4GCellFinder.hh"
    4949
    5050 G4GeometrySampler::
     
    5454    fImportanceConfigurator(0),
    5555    //    fScoreConfigurator(0),
    56     fGCellFinder(0),
     56    //    fGCellFinder(0),
    5757    fWeightCutOffConfigurator(0),
    5858    fIStore(0),
     
    9191    fWeightCutOffConfigurator = 0;
    9292  }
    93   if (fGCellFinder)
    94   {
    95     delete fGCellFinder;
    96     fGCellFinder = 0;
    97   }
     93//   if (fGCellFinder)
     94//   {
     95//     delete fGCellFinder;
     96//     fGCellFinder = 0;
     97//   }
    9898  fIStore = 0;
    9999  fConfigurators.clear();
     
    162162  //  fGCellFinder = new G4GCellFinder(fWorld);
    163163  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//   }
    171171 
    172172  fWeightCutOffConfigurator =
     
    176176                                   isource,
    177177                                   fIStore,
    178                                    *fGCellFinder, paraflag);
     178                                   paraflag);
     179                                   //*fGCellFinder, paraflag);
    179180  if (!fWeightCutOffConfigurator)
    180181  {
  • trunk/source/processes/biasing/src/G4ImportanceConfigurator.cc

    r819 r960  
    2525//
    2626//
    27 // $Id: G4ImportanceConfigurator.cc,v 1.3 2007/06/01 09:16:33 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
  • trunk/source/processes/biasing/src/G4ImportanceProcess.cc

    r819 r960  
    2525//
    2626//
    27 // $Id: G4ImportanceProcess.cc,v 1.3 2007/06/01 09:16:33 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
  • trunk/source/processes/biasing/src/G4ProcessPlacer.cc

    r819 r960  
    2525//
    2626//
    27 // $Id: G4ProcessPlacer.cc,v 1.4 2007/10/31 18:05:44 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
  • trunk/source/processes/biasing/src/G4SamplingPostStepAction.cc

    r819 r960  
    2525//
    2626//
    27 // $Id: G4SamplingPostStepAction.cc,v 1.2 2007/06/01 09:16:33 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
  • trunk/source/processes/biasing/src/G4VProcessPlacer.cc

    r819 r960  
    2525//
    2626//
    27 // $Id: G4VProcessPlacer.cc,v 1.1 2007/06/01 14:57:03 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
  • trunk/source/processes/biasing/src/G4VSampler.cc

    r819 r960  
    2525//
    2626//
    27 // $Id: G4VSampler.cc,v 1.2 2007/06/01 09:16:34 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
  • trunk/source/processes/biasing/src/G4VSamplerConfigurator.cc

    r819 r960  
    2525//
    2626//
    27 // $Id: G4VSamplerConfigurator.cc,v 1.2 2007/06/01 09:16:34 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
  • trunk/source/processes/biasing/src/G4WeightCutOffConfigurator.cc

    r819 r960  
    2525//
    2626//
    27 // $Id: G4WeightCutOffConfigurator.cc,v 1.2 2007/06/01 09:16:34 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
     
    4444                                 G4double isource,
    4545                                 G4VIStore *istore,
    46                            const G4VGCellFinder &aGCellfinder, G4bool para)
     46                                 G4bool para)
     47  //                           const G4VGCellFinder &aGCellfinder, G4bool para)
    4748  : fWorld(worldvolume),
    4849    fPlacer(particlename),
     
    5152{
    5253  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);
    5456  if (!fWeightCutOffProcess)
    5557  {
  • trunk/source/processes/biasing/src/G4WeightCutOffProcess.cc

    r819 r960  
    2525//
    2626//
    27 // $Id: G4WeightCutOffProcess.cc,v 1.2 2007/06/01 09:16:34 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
     
    3838//#include "G4VScorer.hh"
    3939#include "G4GeometryCellStep.hh"
    40 #include "G4GCellFinder.hh"
     40//#include "G4GCellFinder.hh"
    4141#include "G4TouchableHandle.hh"
    4242#include "G4VIStore.hh"
     
    5858                      G4double isource,
    5959                      G4VIStore *istore,
    60                       const G4VGCellFinder &aGCellFinder,
     60                      //                      const G4VGCellFinder &aGCellFinder,
    6161                      const G4String &aName, G4bool para)
    6262  : G4VProcess(aName),
     
    6666    fSourceImportance(isource),
    6767    fIStore(istore),
    68     fGCellFinder(aGCellFinder),
     68    //    fGCellFinder(aGCellFinder),
    6969   fGhostNavigator(0), fNavigatorID(-1), fFieldTrack('0')
    7070{
     
    225225  }
    226226
    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
    252289  return fParticleChange;
     290
    253291}
    254292
  • trunk/source/processes/biasing/src/G4WeightWindowConfigurator.cc

    r819 r960  
    2525//
    2626//
    27 // $Id: G4WeightWindowConfigurator.cc,v 1.3 2007/06/01 09:16:34 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
  • trunk/source/processes/biasing/src/G4WeightWindowProcess.cc

    r819 r960  
    2525//
    2626//
    27 // $Id: G4WeightWindowProcess.cc,v 1.3 2007/06/01 09:16:34 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.