G4WeightWindowProcess.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 // ----------------------------------------------------------------------
00030 // Class G4MassWeioghtWindowProcess
00031 //
00032 // Class description:
00033 //
00034 // Used internally by weight window technique in the "mass" geometry.
00035 // This process is a forced post step process. It will apply
00036 // weight window biasing on boundaries, collisions 
00037 // or both according to the G4PlaceOfAction argument.
00038 
00039 // Author: Michael Dressel (Michael.Dressel@cern.ch)
00040 // ----------------------------------------------------------------------
00041 #ifndef G4MassWeioghtWindowProcess_hh
00042 #define G4MassWeioghtWindowProcess_hh G4MassWeioghtWindowProcess_hh
00043 
00044 #include "G4VProcess.hh"
00045 #include "G4VTrackTerminator.hh"
00046 #include "G4PlaceOfAction.hh"
00047 
00048 class G4SamplingPostStepAction;
00049 class G4VWeightWindowAlgorithm;
00050 class G4VWeightWindowStore;
00051 
00052 class G4Step;
00053 class G4Navigator;
00054 class G4TransportationManager;
00055 class G4PathFinder;
00056 class G4VTouchable;
00057 
00058 #include "G4FieldTrack.hh"
00059 #include "G4TouchableHandle.hh"
00060 
00061 
00062 class G4WeightWindowProcess : public G4VProcess, public G4VTrackTerminator
00063 {
00064 
00065 public:  // with description
00066 
00067   G4WeightWindowProcess(const G4VWeightWindowAlgorithm &
00068                              aWeightWindowAlgorithm,
00069                              const G4VWeightWindowStore &aWWStore,
00070                              const G4VTrackTerminator *TrackTerminator,
00071                              G4PlaceOfAction placeOfAction,
00072                              const G4String &aName = 
00073                              "WeightWindowProcess", G4bool para = false);
00074     // creates a G4ParticleChange
00075 
00076   virtual ~G4WeightWindowProcess();
00077     // delete the G4ParticleChange
00078 
00079 
00080   //--------------------------------------------------------------
00081   // Set Paralle World
00082   //--------------------------------------------------------------
00083 
00084   void SetParallelWorld(G4String parallelWorldName);
00085   void SetParallelWorld(G4VPhysicalVolume* parallelWorld);
00086 
00087   //--------------------------------------------------------------
00088   //     Process interface
00089   //--------------------------------------------------------------
00090 
00091   void StartTracking(G4Track*);
00092   
00093 
00094 
00095   virtual G4double 
00096   PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
00097                                        G4double   previousStepSize,
00098                                        G4ForceCondition* condition);
00099     // make process beeing forced
00100   virtual G4VParticleChange *PostStepDoIt(const G4Track&, const G4Step&);
00101     // aply weight window sampling
00102 
00103   virtual void KillTrack() const;
00104     // used in case no scoring process follows that does the killing
00105 
00106   virtual const G4String &GetName() const;
00107 
00108 
00109 public:  // without description
00110 
00111   //  no operation in  AtRestDoIt and  AlongStepDoIt
00112 
00113   virtual G4double 
00114   AlongStepGetPhysicalInteractionLength(const G4Track&,
00115                                         G4double  ,
00116                                         G4double  ,
00117                                         G4double& ,
00118                                         G4GPILSelection*);
00119   virtual G4double 
00120   AtRestGetPhysicalInteractionLength(const G4Track& ,
00121                                      G4ForceCondition*);
00122   
00123   virtual G4VParticleChange* 
00124   AtRestDoIt(const G4Track&, const G4Step&);
00125 
00126 
00127   virtual G4VParticleChange* 
00128   AlongStepDoIt(const G4Track&, const G4Step&);
00129   
00130 private:
00131   
00132   G4WeightWindowProcess(const G4WeightWindowProcess &);
00133   G4WeightWindowProcess &operator=(const G4WeightWindowProcess &);
00134   
00135 private:
00136 
00137   void CopyStep(const G4Step & step);
00138 
00139   G4Step * fGhostStep;
00140   G4StepPoint * fGhostPreStepPoint;
00141   G4StepPoint * fGhostPostStepPoint;
00142 
00143   G4ParticleChange *fParticleChange;
00144   const G4VWeightWindowAlgorithm &fWeightWindowAlgorithm;
00145   const G4VWeightWindowStore &fWeightWindowStore;
00146   G4SamplingPostStepAction *fPostStepAction;
00147   G4PlaceOfAction fPlaceOfAction;
00148 
00149   G4TransportationManager* fTransportationManager;
00150   G4PathFinder*        fPathFinder;
00151 
00152   // -------------------------------
00153   // Navigation in the Ghost World:
00154   // -------------------------------
00155   G4String             fGhostWorldName;
00156   G4VPhysicalVolume*   fGhostWorld;
00157   G4Navigator*         fGhostNavigator;
00158   G4int                fNavigatorID;
00159   G4TouchableHandle    fOldGhostTouchable;
00160   G4TouchableHandle    fNewGhostTouchable;
00161   G4FieldTrack         fFieldTrack;
00162   G4double             fGhostSafety;
00163   G4bool               fOnBoundary;
00164 
00165   G4bool               paraflag;
00166 
00167 };
00168 
00169 #endif

Generated on Mon May 27 17:50:25 2013 for Geant4 by  doxygen 1.4.7