G4EmConfigurator.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 // $Id$
00027 //
00028 // -------------------------------------------------------------------
00029 //
00030 // GEANT4 Class header file
00031 //
00032 // File name:     G4EmConfigurator
00033 //
00034 // Author:        Vladimir Ivanchenko
00035 //
00036 // Creation date: 14.07.2008
00037 //
00038 // Modifications:
00039 //
00040 // Class Description:
00041 //
00042 // This class provides configuration EM models for 
00043 // particles/processes/regions
00044 //
00045 
00046 // -------------------------------------------------------------------
00047 //
00048 
00049 #ifndef G4EmConfigurator_h
00050 #define G4EmConfigurator_h 1
00051 
00052 #include "globals.hh"
00053 #include "G4VEmModel.hh"
00054 #include "G4VEmFluctuationModel.hh"
00055 #include <vector>
00056 
00057 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00058 
00059 class G4VEnergyLossProcess;
00060 class G4VEmProcess;
00061 class G4VMultipleScattering;
00062 
00063 class G4EmConfigurator 
00064 {
00065 public: 
00066   
00067   G4EmConfigurator(G4int verboseLevel = 1);
00068  
00069   ~G4EmConfigurator();
00070 
00071   // Set EM model for particle type and process to 
00072   // be active for the G4Region and energy interval
00073   // The model will be added to the list 
00074   //
00075   void SetExtraEmModel(const G4String& particleName,
00076                        const G4String& processName,
00077                        G4VEmModel*,
00078                        const G4String& regionName = "",
00079                        G4double emin = 0.0,
00080                        G4double emax = DBL_MAX,
00081                        G4VEmFluctuationModel* fm = 0); 
00082 
00083   // Add all previously declared models to corresponding processes
00084   // Can be called in ConstructPhysics
00085   //
00086   void AddModels();
00087 
00088   // These methods called by G4LossTableManager
00089   //
00090   void PrepareModels(const G4ParticleDefinition* aParticle,
00091                      G4VEnergyLossProcess* p);
00092 
00093   void PrepareModels(const G4ParticleDefinition* aParticle,
00094                      G4VEmProcess* p);
00095 
00096   void PrepareModels(const G4ParticleDefinition* aParticle,
00097                      G4VMultipleScattering* p);
00098 
00099   void Clear();
00100 
00101   inline void SetVerbose(G4int value);
00102 
00103 private:
00104 
00105   G4Region* FindRegion(const G4String&);
00106 
00107   void SetModelForRegion(G4VEmModel* model,
00108                          G4VEmFluctuationModel* fm,
00109                          G4Region* reg,
00110                          const G4String& particleName,
00111                          const G4String& processName,
00112                          G4double emin,
00113                          G4double emax);
00114 
00115   G4bool UpdateModelEnergyRange(G4VEmModel* mod,
00116                                 G4double emin, G4double emax);
00117 
00118   // hide assignment operator
00119   G4EmConfigurator & operator=(const G4EmConfigurator &right);
00120   G4EmConfigurator(const G4EmConfigurator&);
00121 
00122   std::vector<G4VEmModel*> models;  
00123   std::vector<G4VEmFluctuationModel*> flucModels;  
00124   std::vector<G4String> particles;  
00125   std::vector<G4String> processes;  
00126   std::vector<G4String> regions;  
00127   std::vector<G4double> lowEnergy;
00128   std::vector<G4double> highEnergy;
00129   
00130   G4int index;
00131   G4int verbose;
00132 };
00133 
00134 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00135 
00136 inline void G4EmConfigurator::SetVerbose(G4int value)
00137 {
00138   verbose = value;
00139 }
00140 
00141 #endif
00142 
00143 
00144 
00145 
00146 
00147 
00148 
00149 

Generated on Mon May 27 17:48:08 2013 for Geant4 by  doxygen 1.4.7