Back to home page

EIC code displayed by LXR

 
 

    


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

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 // GEANT4 Class header file
0030 //
0031 // File name:     G4EmConfigurator
0032 //
0033 // Author:        Vladimir Ivanchenko
0034 //
0035 // Creation date: 14.07.2008
0036 //
0037 // Modifications:
0038 //
0039 // Class Description:
0040 //
0041 // This class provides configuration EM models for 
0042 // particles/processes/regions
0043 //
0044 
0045 // -------------------------------------------------------------------
0046 //
0047 
0048 #ifndef G4EmConfigurator_h
0049 #define G4EmConfigurator_h 1
0050 
0051 #include "globals.hh"
0052 #include "G4VEmModel.hh"
0053 #include "G4VEmFluctuationModel.hh"
0054 #include <vector>
0055 
0056 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0057 
0058 class G4VEnergyLossProcess;
0059 class G4VEmProcess;
0060 class G4VMultipleScattering;
0061 class G4TransportationWithMsc;
0062 
0063 class G4EmConfigurator 
0064 {
0065 public: 
0066   
0067   explicit G4EmConfigurator(G4int verboseLevel = 1);
0068  
0069   ~G4EmConfigurator();
0070 
0071   // Set EM model for particle type and process to 
0072   // be active for the G4Region and energy interval
0073   // The model will be added to the list 
0074   //
0075   void SetExtraEmModel(const G4String& particleName,
0076                        const G4String& processName,
0077                        G4VEmModel*,
0078                        const G4String& regionName = "",
0079                        G4double emin = 0.0,
0080                        G4double emax = DBL_MAX,
0081                        G4VEmFluctuationModel* fm = nullptr); 
0082 
0083   // Add all previously declared models to corresponding processes
0084   // Can be called in ConstructPhysics
0085   //
0086   void AddModels();
0087 
0088   // These methods called by G4LossTableManager
0089   //
0090   void PrepareModels(const G4ParticleDefinition* aParticle,
0091                      G4VEnergyLossProcess* p);
0092 
0093   void PrepareModels(const G4ParticleDefinition* aParticle,
0094                      G4VEmProcess* p);
0095 
0096   void PrepareModels(const G4ParticleDefinition* aParticle,
0097                      G4VMultipleScattering* p,
0098                      G4TransportationWithMsc* trans = nullptr);
0099 
0100   void Clear();
0101 
0102   inline void SetVerbose(G4int value);
0103 
0104   // hide assignment operator
0105   G4EmConfigurator & operator=(const G4EmConfigurator &right) = delete;
0106   G4EmConfigurator(const G4EmConfigurator&) = delete;
0107 
0108 private:
0109 
0110   void SetModelForRegion(G4VEmModel* model,
0111                          G4VEmFluctuationModel* fm,
0112                          const G4Region* reg,
0113                          const G4String& particleName,
0114                          const G4String& processName,
0115                          G4double emin,
0116                          G4double emax);
0117 
0118   G4bool UpdateModelEnergyRange(G4VEmModel* mod,
0119                                 G4double emin, G4double emax);
0120 
0121   std::vector<G4VEmModel*> models;  
0122   std::vector<G4VEmFluctuationModel*> flucModels;  
0123   std::vector<G4String> particles;  
0124   std::vector<G4String> processes;  
0125   std::vector<G4String> regions;  
0126   std::vector<G4double> lowEnergy;
0127   std::vector<G4double> highEnergy;
0128   
0129   G4int index;
0130   G4int verbose;
0131 };
0132 
0133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0134 
0135 inline void G4EmConfigurator::SetVerbose(G4int value)
0136 {
0137   verbose = value;
0138 }
0139 
0140 #endif
0141 
0142 
0143 
0144 
0145 
0146 
0147 
0148