Changeset 960 for trunk


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

update processes

Location:
trunk/source/processes/biasing
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/biasing/History

    r819 r960  
    1 $Id: History,v 1.16 2007/10/31 18:05:44 ahoward Exp $
     1$Id: History,v 1.19 2008/04/22 09:29:35 ahoward Exp $
    22-------------------------------------------------------------------
    33
     
    1717     * Reverse chronological order (last date on top), please *
    1818     ----------------------------------------------------------
     19
     20April 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
     27April 21st, 2008 Alex Howard (procbiasing-V09-01-01)
     28- mis-tagged - please ignore
     29
     30April 21st, 2008 Alex Howard (procbiasing-V09-01-00)
     31- Tag of the HEAD which includes scoring for backwards compatibility
    1932
    2033October 31st, 2007 Alex Howard (procbiasing-V09-00-00)
  • trunk/source/processes/biasing/include/G4GeometrySampler.hh

    r819 r960  
    2525//
    2626//
    27 // $Id: G4GeometrySampler.hh,v 1.9 2007/06/01 09:52:23 ahoward Exp $
    28 // GEANT4 tag $Name: geant4-09-01-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 $
    2929//
    3030// ----------------------------------------------------------------------
     
    5050//class G4ScoreConfigurator;
    5151class G4WeightCutOffConfigurator;
    52 class G4VGCellFinder;
     52//class G4VGCellFinder;
    5353
    5454class G4GeometrySampler : public G4VSampler
     
    9292  G4ImportanceConfigurator *fImportanceConfigurator;
    9393  //  G4ScoreConfigurator *fScoreConfigurator;
    94   G4VGCellFinder *fGCellFinder;
     94  //  G4VGCellFinder *fGCellFinder;
    9595  G4WeightCutOffConfigurator *fWeightCutOffConfigurator;
    9696  G4VIStore *fIStore;
  • trunk/source/processes/biasing/include/G4ImportanceConfigurator.hh

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

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

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

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

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

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

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

    r819 r960  
    2525//
    2626//
    27 // $Id: G4VSampler.hh,v 1.8 2007/06/25 06:57:22 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
  • trunk/source/processes/biasing/include/G4VSamplerConfigurator.hh

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

    r819 r960  
    2525//
    2626//
    27 // $Id: G4WeightCutOffConfigurator.hh,v 1.2 2007/06/01 09:16:33 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
     
    4646
    4747class G4WeightCutOffProcess;
    48 class G4VGCellFinder;
     48//class G4VGCellFinder;
    4949class G4VIStore;
    5050class G4VPhysicalVolume;
     
    6161                             G4double isource,
    6262                             G4VIStore *istore,
    63                              const G4VGCellFinder &aGCellFinder,G4bool paraflag);
     63                             //const G4VGCellFinder &aGCellFinder,
     64                             G4bool paraflag);
    6465
    6566  virtual ~G4WeightCutOffConfigurator();
  • trunk/source/processes/biasing/include/G4WeightCutOffProcess.hh

    r819 r960  
    2525//
    2626//
    27 // $Id: G4WeightCutOffProcess.hh,v 1.2 2007/06/01 09:16:33 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
     
    4444#include "G4GeometryCell.hh"
    4545
    46 class G4VGCellFinder;
     46//class G4VGCellFinder;
    4747class G4VIStore;
    4848
     
    6767                        G4double isource,
    6868                        G4VIStore *istore,
    69                         const G4VGCellFinder &aGCellFinder,
     69                        //                        const G4VGCellFinder &aGCellFinder,
    7070                        const G4String &aName = "WeightCutOffProcess", G4bool para = false);
    7171    // create a G4ParticleChange
     
    134134  G4double fSourceImportance;
    135135  G4VIStore *fIStore;
    136   const G4VGCellFinder &fGCellFinder;
     136  //  const G4VGCellFinder &fGCellFinder;
    137137
    138138
  • trunk/source/processes/biasing/include/G4WeightWindowConfigurator.hh

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

    r819 r960  
    2525//
    2626//
    27 // $Id: G4WeightWindowProcess.hh,v 1.3 2007/06/01 09:16:33 ahoward 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 $
    2929//
    3030// ----------------------------------------------------------------------
  • 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.