00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #include "globals.hh"
00039 #include "G4ProcessManager.hh"
00040 #include "G4ProcessVector.hh"
00041 #include "G4ParticleTypes.hh"
00042 #include "G4ParticleTable.hh"
00043
00044 #include "G4Material.hh"
00045 #include "G4MaterialTable.hh"
00046 #include "G4ios.hh"
00047 #include <iomanip>
00048
00049 #include "G4DataQuestionaire.hh"
00050
00051
00052
00053 template<class T> TG4GenericPhysicsList<T>::TG4GenericPhysicsList(G4int ver): T(), messenger(this, "/PhysicsList/")
00054 {
00055 DeclareProperties();
00056
00057 G4DataQuestionaire it(photon);
00058 G4cout << "<<< Geant4 Physics List simulation engine: G4GenericPhysicsList"<<G4endl;
00059 G4cout <<G4endl;
00060 this->defaultCutValue = 0.7*CLHEP::mm;
00061 this->SetVerboseLevel(ver);
00062 }
00063
00064 template<class T> TG4GenericPhysicsList<T>::TG4GenericPhysicsList(std::vector<G4String>* physConstr, G4int ver): T(), messenger(this, "/PhysicsList/")
00065 {
00066 DeclareProperties();
00067
00068 G4DataQuestionaire it(photon);
00069 G4cout << "<<< Geant4 Physics List simulation engine: G4GenericPhysicsList"<<G4endl;
00070 G4cout <<G4endl;
00071 this->defaultCutValue = 0.7*CLHEP::mm;
00072 this->SetVerboseLevel(ver);
00073
00074 for(std::vector<G4String>::iterator i=physConstr->begin(); i!=physConstr->end(); i++) RegisterPhysicsConstructor(*i);
00075 }
00076
00077 template<class T> TG4GenericPhysicsList<T>::~TG4GenericPhysicsList()
00078 {
00079 }
00080
00081 template<class T> void TG4GenericPhysicsList<T>::SetCuts()
00082 {
00083 if (this->verboseLevel >1){
00084 G4cout << "G4GenericPhysicsList::SetCuts:";
00085 }
00086
00087 this->SetCutsWithDefault();
00088
00089 }
00090
00091 template<class T> void TG4GenericPhysicsList<T>::DeclareProperties()
00092 {
00093 messenger.DeclareProperty("defaultCutValue", this->defaultCutValue, "Default Cut Value");
00094 messenger.DeclareMethod("SetVerboseLevel", &TG4GenericPhysicsList::SetVerboseLevel, "Verbose Level");
00095
00096 messenger.DeclareMethod("RegisterPhysics", &TG4GenericPhysicsList::RegisterPhysicsConstructor, "Register Physics Constructor");
00097 }