Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:26

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 //
0028 // ----------------------------------------------------------------------
0029 // Class G4VSampler
0030 //
0031 // Class description:
0032 //
0033 // This interface describes a configurable sampler.
0034 // It applies to a given particle type.
0035 // Concrete classes with this interface may be used for 
0036 // scoring, importance sampling and weight cutoff (weight roulette).
0037 
0038 // Author: Michael Dressel (Michael.Dressel@cern.ch)
0039 // ----------------------------------------------------------------------
0040 #ifndef G4VSampler_hh
0041 #define G4VSampler_hh G4VSampler_hh
0042 
0043 #include "G4Types.hh"
0044 #include "G4PlaceOfAction.hh"
0045 
0046 class G4VPhysicalVolume;
0047 class G4VImportanceAlgorithm;
0048 class G4VIStore;
0049 class G4VWeightWindowAlgorithm;
0050 class G4VWeightWindowStore;
0051 //class G4VScorer;
0052 
0053 class G4VSampler
0054 {
0055 
0056 public:  // with description
0057   
0058   G4VSampler();
0059   virtual ~G4VSampler();
0060 
0061   //  virtual void PrepareScoring(G4VScorer *Scorer) = 0;
0062   //  virtual void PrepareScoring() = 0;
0063 
0064   virtual void PrepareImportanceSampling(G4VIStore *istore,
0065                                          const G4VImportanceAlgorithm 
0066                                          *ialg = 0) = 0;
0067 
0068 
0069   virtual void PrepareWeightRoulett(G4double wsurvive = 0.5, 
0070                                     G4double wlimit = 0.25,
0071                                     G4double isource = 1) = 0;
0072 
0073   virtual void PrepareWeightWindow(G4VWeightWindowStore *wwstore,
0074                                    G4VWeightWindowAlgorithm *wwAlg = 0,
0075                                    G4PlaceOfAction placeOfAction = 
0076                                    onBoundary) = 0;
0077 
0078   virtual void Configure() = 0;
0079 
0080   virtual void ClearSampling() = 0;
0081     // clear the sampler and remove the processes
0082 
0083   virtual G4bool IsConfigured() const = 0;
0084     // check if some initialization hase already been done
0085 
0086   virtual void SetParallel(G4bool paraflag) = 0;
0087 
0088 };
0089   
0090 #endif