Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:21

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 G4GeometrySampler
0030 //
0031 // Class description:
0032 // This class inherits from G4VSampler. It is used for scoring and 
0033 // importance sampling in the tracking (mass) geometry.
0034 // See also the description in G4VSampler.hh.
0035 
0036 // Author: Michael Dressel (Michael.Dressel@cern.ch)
0037 // ----------------------------------------------------------------------
0038 #ifndef G4GeometrySampler_hh
0039 #define G4GeometrySampler_hh G4GeometrySampler_hh
0040 
0041 #include "G4Types.hh"
0042 #include "G4String.hh"
0043 #include "G4VSampler.hh"
0044 #include "G4VSamplerConfigurator.hh"
0045 
0046 class G4ImportanceConfigurator;
0047 class G4WeightWindowConfigurator;
0048 //class G4ScoreConfigurator;
0049 class G4WeightCutOffConfigurator;
0050 //class G4VGCellFinder;
0051 
0052 class G4GeometrySampler : public G4VSampler
0053 {
0054 
0055 public:  // with description
0056  
0057   explicit G4GeometrySampler(G4VPhysicalVolume *worldvolume, const G4String &particlename);
0058   explicit G4GeometrySampler(G4String worldvolumeName, const G4String &particlename);
0059   virtual ~G4GeometrySampler();
0060 
0061   //  virtual void PrepareScoring(G4VScorer *Scorer);
0062   virtual void PrepareImportanceSampling(G4VIStore* istore,
0063                                          const G4VImportanceAlgorithm 
0064                                          *ialg);
0065   virtual void PrepareWeightRoulett(G4double wsurvive, 
0066                                     G4double wlimit,
0067                                     G4double isource);
0068   
0069   virtual void PrepareWeightWindow(G4VWeightWindowStore *wwstore,
0070                                    G4VWeightWindowAlgorithm *wwAlg,
0071                                    G4PlaceOfAction placeOfAction);
0072 
0073   virtual void Configure();
0074   virtual void AddProcess();
0075 
0076   virtual void ClearSampling();
0077   virtual G4bool IsConfigured() const;
0078 
0079   void SetParallel(G4bool paraflag);
0080   void SetWorld(const G4VPhysicalVolume* world);
0081   void SetParticle(const G4String &particlename);
0082 
0083   inline G4String GetParticleName(){return fParticleName;};
0084   
0085 private:
0086 
0087   G4GeometrySampler(const G4GeometrySampler &);
0088   G4GeometrySampler &
0089   operator=(const G4GeometrySampler &);
0090 
0091 private:
0092 
0093   G4String fParticleName;
0094   const G4VPhysicalVolume* fWorld;
0095   G4String fWorldName;
0096   G4ImportanceConfigurator *fImportanceConfigurator;
0097   //  G4ScoreConfigurator *fScoreConfigurator;
0098   //  G4VGCellFinder *fGCellFinder;
0099   G4WeightCutOffConfigurator *fWeightCutOffConfigurator;
0100   G4VIStore* fIStore;
0101   G4WeightWindowConfigurator *fWeightWindowConfigurator;
0102   G4VWeightWindowStore *fWWStore;
0103   G4bool fIsConfigured;
0104   G4Configurators fConfigurators;
0105   
0106   G4bool paraflag;
0107 
0108 };
0109   
0110 #endif
0111