Back to home page

EIC code displayed by LXR

 
 

    


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

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 // ClassName:   G4GenericPhysicsList
0030 //
0031 // Author: Witek Pokorski
0032 //
0033 //
0034 //----------------------------------------------------------------------------
0035 //
0036 
0037 #include "globals.hh"
0038 #include "G4ProcessManager.hh"
0039 #include "G4ProcessVector.hh"
0040 #include "G4ParticleTypes.hh"
0041 #include "G4ParticleTable.hh"
0042 
0043 #include "G4Material.hh"
0044 #include "G4MaterialTable.hh"
0045 #include "G4ios.hh"
0046 #include <iomanip>
0047 
0048 
0049 template<class T> TG4GenericPhysicsList<T>::TG4GenericPhysicsList(G4int ver):  T(), messenger(this, "/PhysicsList/")
0050 {
0051   DeclareProperties();
0052 
0053   G4cout << "<<< Geant4 Physics List simulation engine: G4GenericPhysicsList"<<G4endl;
0054   G4cout <<G4endl;
0055     this->defaultCutValue = 0.7*CLHEP::mm;
0056   this->SetVerboseLevel(ver);
0057 }
0058 
0059 template<class T> TG4GenericPhysicsList<T>::TG4GenericPhysicsList(std::vector<G4String>* physConstr, G4int ver):  T(), messenger(this, "/PhysicsList/")
0060 {
0061   DeclareProperties();
0062 
0063   G4cout << "<<< Geant4 Physics List simulation engine: G4GenericPhysicsList"<<G4endl;
0064   G4cout <<G4endl;
0065     this->defaultCutValue = 0.7*CLHEP::mm;
0066   this->SetVerboseLevel(ver);
0067 
0068   for(std::vector<G4String>::iterator i=physConstr->begin(); i!=physConstr->end(); i++) RegisterPhysicsConstructor(*i);
0069 }
0070 
0071 template<class T> TG4GenericPhysicsList<T>::~TG4GenericPhysicsList()
0072 {
0073 }
0074 
0075 template<class T> void TG4GenericPhysicsList<T>::SetCuts()
0076 {
0077   if (this->verboseLevel >1){
0078     G4cout << "G4GenericPhysicsList::SetCuts:";
0079   }
0080 
0081   this->SetCutsWithDefault();
0082 
0083 }
0084 
0085 template<class T> void TG4GenericPhysicsList<T>::DeclareProperties()
0086 {
0087   messenger.DeclareProperty("defaultCutValue", this->defaultCutValue, "Default Cut Value");
0088   messenger.DeclareMethod("SetVerboseLevel", &TG4GenericPhysicsList::SetVerboseLevel, "Verbose Level");
0089 
0090   messenger.DeclareMethod("RegisterPhysics", &TG4GenericPhysicsList::RegisterPhysicsConstructor, "Register Physics Constructor");
0091 }
0092 
0093 #ifndef G4RegisterPhysicsConstructors_icc
0094   // include G4_REFERENCE_PHYSCONSTR_FACTORY() macros here to pull them in
0095   // for static builds.   Would do this in  G4PhysicsConstructorRegistry
0096   // but that causes a circular dependency when the phys_ctor libs
0097   // are broken in a "granular" build.
0098   #ifndef REGREF
0099     #define REGREF GenericPhysList // REFREF is used to make instances unique
0100   #endif
0101   #include "G4RegisterPhysicsConstructors.icc"
0102 #endif
0103