Changeset 1230 for trunk/examples/extended/medical/fanoCavity
- Timestamp:
- Jan 8, 2010, 3:02:48 PM (14 years ago)
- Location:
- trunk/examples/extended/medical/fanoCavity
- Files:
-
- 44 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/medical/fanoCavity/GNUmakefile
r807 r1230 1 # $Id: GNUmakefile,v 1. 1 2007/01/19 17:20:26 maireExp $1 # $Id: GNUmakefile,v 1.2 2008/06/11 15:25:38 vnivanch Exp $ 2 2 # -------------------------------------------------------------- 3 3 # GNUmakefile for examples module. Gabriele Cosmo, 06/04/98. … … 17 17 #### G4ANALYSIS_USE := true 18 18 19 ifdef G4ANALYSIS_USE20 CPPFLAGS += -DG4ANALYSIS_USE21 endif22 23 19 include $(G4INSTALL)/config/architecture.gmk 24 25 ifdef G4ANALYSIS_USE26 # for the aida-config command see the README file27 CPPFLAGS += `aida-config --include`28 LOADLIBS += `aida-config --lib`29 endif30 20 31 21 include $(G4INSTALL)/config/binmake.gmk … … 34 24 rm -f g4*.prim g4*.eps g4*.wrl 35 25 rm -f .DAWN_* 36 26 37 27 histclean: 38 28 rm ${G4WORKDIR}/tmp/${G4SYSTEM}/${G4TARGET}/HistoManager.o -
trunk/examples/extended/medical/fanoCavity/fanoCavity.cc
r807 r1230 25 25 // 26 26 // $Id: fanoCavity.cc,v 1.6 2007/10/29 17:09:53 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/DetectorConstruction.hh
r807 r1230 25 25 // 26 26 // $Id: DetectorConstruction.hh,v 1.2 2007/10/08 12:05:02 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/DetectorMessenger.hh
r807 r1230 25 25 // 26 26 // $Id: DetectorMessenger.hh,v 1.2 2007/10/08 12:05:02 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/EventAction.hh
r807 r1230 25 25 // 26 26 // $Id: EventAction.hh,v 1.3 2007/10/29 17:09:53 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/EventActionMessenger.hh
r807 r1230 25 25 // 26 26 // $Id: EventActionMessenger.hh,v 1.1 2007/01/19 17:20:26 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/HistoManager.hh
r807 r1230 25 25 // 26 26 // $Id: HistoManager.hh,v 1.4 2007/11/13 11:31:54 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/HistoMessenger.hh
r807 r1230 25 25 // 26 26 // $Id: HistoMessenger.hh,v 1.2 2007/11/13 11:31:54 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/MyKleinNishinaCompton.hh
r807 r1230 24 24 // ******************************************************************** 25 25 // 26 // $Id: MyKleinNishinaCompton.hh,v 1. 3 2007/05/23 08:40:21 vnivanchExp $27 // GEANT4 tag $Name: $26 // $Id: MyKleinNishinaCompton.hh,v 1.4 2009/10/25 19:06:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 36 36 37 37 class DetectorConstruction; 38 class MyKleinNishinaMessenger; 38 39 class G4ParticleChangeForGamma; 39 40 … … 66 67 protected: 67 68 68 DetectorConstruction* detector; 69 G4double CrossSectionFactor; 69 DetectorConstruction* detector; 70 MyKleinNishinaMessenger* pMessenger; 71 G4double CrossSectionFactor; 70 72 71 73 }; -
trunk/examples/extended/medical/fanoCavity/include/MyMollerBhabhaModel.hh
r807 r1230 25 25 // 26 26 // $Id: MyMollerBhabhaModel.hh,v 1.1 2007/01/19 17:20:26 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/examples/extended/medical/fanoCavity/include/PhysicsList.hh
r807 r1230 24 24 // ******************************************************************** 25 25 // 26 // $Id: PhysicsList.hh,v 1.4 2009/10/25 19:06:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 26 28 // 27 // $Id: PhysicsList.hh,v 1.3 2007/10/02 14:42:51 maire Exp $28 // GEANT4 tag $Name: $29 //30 //31 32 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 33 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 36 33 #define PhysicsList_h 1 37 34 38 #include "G4V UserPhysicsList.hh"35 #include "G4VModularPhysicsList.hh" 39 36 #include "globals.hh" 40 37 38 class G4VPhysicsConstructor; 39 41 40 class DetectorConstruction; 42 class MyKleinNishinaCompton;43 41 class PhysicsListMessenger; 44 42 45 43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 46 44 47 class PhysicsList: public G4V UserPhysicsList45 class PhysicsList: public G4VModularPhysicsList 48 46 { 49 50 51 ~PhysicsList();47 public: 48 PhysicsList(DetectorConstruction*); 49 virtual ~PhysicsList(); 52 50 53 // Construct particle and physics 54 void ConstructParticle(); 55 void ConstructProcess(); 56 57 void SetCuts(); 51 void ConstructParticle(); 52 53 void AddPhysicsList(const G4String& name); 54 void ConstructProcess(); 55 void AddStepMax(); 56 57 void SetCuts(); 58 58 59 // these methods Construct physics processes and register them 60 void ConstructEM(); 61 void AddStepMax(); 62 63 void SetComptonCSfactor(G4double); 64 void SingleCoulombScattering (G4bool); 65 void RegisterBrem (G4bool); 66 67 private: 68 DetectorConstruction* detector; 69 MyKleinNishinaCompton* comptonModel; 70 G4bool singleScattering; 71 G4bool registerBrem; 72 PhysicsListMessenger* pMessenger; 59 private: 60 61 DetectorConstruction* detector; 62 PhysicsListMessenger* pMessenger; 63 64 G4String emName; 65 G4VPhysicsConstructor* emPhysicsList; 73 66 }; 74 67 … … 77 70 #endif 78 71 79 80 -
trunk/examples/extended/medical/fanoCavity/include/PhysicsListMessenger.hh
r807 r1230 24 24 // ******************************************************************** 25 25 // 26 // $Id: PhysicsListMessenger.hh,v 1. 2 2007/10/02 14:42:51maire Exp $27 // GEANT4 tag $Name: $26 // $Id: PhysicsListMessenger.hh,v 1.3 2009/10/25 19:06:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 33 33 #define PhysicsListMessenger_h 1 34 34 35 #include "G4UImessenger.hh" 35 36 #include "globals.hh" 36 #include "G4UImessenger.hh"37 37 38 38 class PhysicsList; 39 39 class G4UIdirectory; 40 class G4UIcmdWithADouble ;41 class G4UIcmdWithA Bool;40 class G4UIcmdWithADoubleAndUnit; 41 class G4UIcmdWithAString; 42 42 43 43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 45 45 class PhysicsListMessenger: public G4UImessenger 46 46 { 47 public: 47 public: 48 48 49 PhysicsListMessenger(PhysicsList* ); 49 50 ~PhysicsListMessenger(); … … 51 52 void SetNewValue(G4UIcommand*, G4String); 52 53 53 private: 54 PhysicsList* pPhysicsList;55 G4UIdirectory* physDir;56 G4UIcmdWithADouble* csFactor;57 G4UI cmdWithABool* singleScat;58 G4UIcmdWithA Bool* brem;54 private: 55 56 PhysicsList* pPhysicsList; 57 58 G4UIdirectory* physDir; 59 G4UIcmdWithAString* pListCmd; 59 60 }; 60 61 -
trunk/examples/extended/medical/fanoCavity/include/PrimaryGeneratorAction.hh
r807 r1230 25 25 // 26 26 // $Id: PrimaryGeneratorAction.hh,v 1.1 2007/01/19 17:20:26 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/PrimaryGeneratorMessenger.hh
r807 r1230 25 25 // 26 26 // $Id: PrimaryGeneratorMessenger.hh,v 1.1 2007/01/19 17:20:26 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/ProcessesCount.hh
r807 r1230 26 26 // 27 27 // $Id: ProcessesCount.hh,v 1.1 2007/01/19 17:20:26 maire Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/RunAction.hh
r807 r1230 25 25 // 26 26 // $Id: RunAction.hh,v 1.3 2007/10/29 12:36:26 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/StackingAction.hh
r807 r1230 25 25 // 26 26 // $Id: StackingAction.hh,v 1.1 2007/01/23 13:34:19 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/StackingMessenger.hh
r807 r1230 25 25 // 26 26 // $Id: StackingMessenger.hh,v 1.1 2007/01/23 13:34:19 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/StepMax.hh
r807 r1230 25 25 // 26 26 // $Id: StepMax.hh,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/StepMaxMessenger.hh
r807 r1230 25 25 // 26 26 // $Id: StepMaxMessenger.hh,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/SteppingAction.hh
r807 r1230 25 25 // 26 26 // $Id: SteppingAction.hh,v 1.4 2007/10/29 17:09:53 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/SteppingVerbose.hh
r807 r1230 25 25 // 26 26 // $Id: SteppingVerbose.hh,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/TrackingAction.hh
r807 r1230 25 25 // 26 26 // $Id: TrackingAction.hh,v 1.3 2007/10/29 17:09:53 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/run01.mac
r807 r1230 1 # $Id: run01.mac,v 1. 5 2007/10/29 17:09:53maire Exp $1 # $Id: run01.mac,v 1.7 2009/10/25 19:06:26 maire Exp $ 2 2 # 3 3 /control/verbose 2 4 4 /run/verbose 2 5 # 6 /testem/phys/addPhysics standard_opt3 5 7 # 6 8 /run/initialize … … 9 11 # 10 12 /testem/histo/setFileName fanocavity 11 /testem/histo/setFileType hbook13 /testem/histo/setFileType root 12 14 /testem/histo/setHisto 1 120 -6 +6 mm #interaction point 13 15 /testem/histo/setHisto 2 125 0 1250 keV #energy spectrum -
trunk/examples/extended/medical/fanoCavity/src/DetectorConstruction.cc
r807 r1230 25 25 // 26 26 // $Id: DetectorConstruction.cc,v 1.3 2007/10/08 12:05:02 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 29 29 // -
trunk/examples/extended/medical/fanoCavity/src/DetectorMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: DetectorMessenger.cc,v 1.3 2007/11/05 13:44:18 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/EventAction.cc
r807 r1230 25 25 // 26 26 // $Id: EventAction.cc,v 1.4 2007/10/29 17:09:53 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/EventActionMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: EventActionMessenger.cc,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/HistoManager.cc
r807 r1230 24 24 // ******************************************************************** 25 25 // 26 // $Id: HistoManager.cc,v 1. 5 2007/11/13 11:31:54maire Exp $27 // GEANT4 tag $Name: $26 // $Id: HistoManager.cc,v 1.7 2008/09/28 16:04:01 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 54 54 55 55 fileName[0] = "fanocavity"; 56 fileType = " hbook";57 fileOption = "--noErrors uncompress";56 fileType = "root"; 57 fileOption = "--noErrors export=root uncompress"; 58 58 // histograms 59 59 for (G4int k=0; k<MaxHisto; k++) { … … 224 224 if (ih > MaxHisto) { 225 225 G4cout << "---> warning from HistoManager::RemoveHisto() : histo " << ih 226 << "does not exist "<< G4endl;226 << "does not exist (fac = " << fac << ")" << G4endl; 227 227 return; 228 228 } -
trunk/examples/extended/medical/fanoCavity/src/HistoMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: HistoMessenger.cc,v 1.2 2007/11/13 11:31:54 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/MyKleinNishinaCompton.cc
r807 r1230 24 24 // ******************************************************************** 25 25 // 26 // $Id: MyKleinNishinaCompton.cc,v 1. 5 2007/10/01 15:19:57maire Exp $27 // GEANT4 tag $Name: $26 // $Id: MyKleinNishinaCompton.cc,v 1.6 2009/10/25 19:06:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 31 31 32 32 #include "MyKleinNishinaCompton.hh" 33 #include "MyKleinNishinaMessenger.hh" 33 34 #include "DetectorConstruction.hh" 34 35 … … 48 49 :G4KleinNishinaCompton(0,nam), detector(det) 49 50 { 50 CrossSectionFactor = 1.; 51 CrossSectionFactor = 1.; 52 pMessenger = new MyKleinNishinaMessenger(this); 51 53 } 52 54 … … 54 56 55 57 MyKleinNishinaCompton::~MyKleinNishinaCompton() 56 {} 58 { 59 delete pMessenger; 60 } 57 61 58 62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/examples/extended/medical/fanoCavity/src/MyMollerBhabhaModel.cc
r807 r1230 25 25 // 26 26 // $Id: MyMollerBhabhaModel.cc,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/PhysicsList.cc
r807 r1230 24 24 // ******************************************************************** 25 25 // 26 // $Id: PhysicsList.cc,v 1.18 2009/10/29 16:19:59 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 26 28 // 27 // $Id: PhysicsList.cc,v 1.9 2007/10/02 14:42:51 maire Exp $28 // GEANT4 tag $Name: $29 //30 31 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 32 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 34 32 #include "PhysicsList.hh" 35 33 #include "PhysicsListMessenger.hh" 36 #include "DetectorConstruction.hh" 34 35 #include "PhysListEmStandard_option0.hh" 36 #include "PhysListEmStandard_option3.hh" 37 #include "PhysListEmStandard_GS.hh" 38 #include "PhysListEmStandard_SS.hh" 39 40 #include "StepMax.hh" 37 41 38 42 #include "G4ParticleDefinition.hh" 39 #include "G4ParticleTypes.hh"40 #include "G4ParticleTable.hh"41 43 42 44 #include "G4ProcessManager.hh" 43 45 #include "G4LossTableManager.hh" 44 46 47 // Bosons 48 #include "G4ChargedGeantino.hh" 49 #include "G4Geantino.hh" 50 #include "G4Gamma.hh" 51 52 // leptons 53 #include "G4Electron.hh" 54 #include "G4Positron.hh" 55 56 // Hadrons 57 #include "G4Proton.hh" 58 59 45 60 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 46 61 47 62 PhysicsList::PhysicsList(DetectorConstruction* det) 48 : G4V UserPhysicsList(), detector(det)63 : G4VModularPhysicsList(), detector(det) 49 64 { 50 defaultCutValue = 10.*km; 51 singleScattering = false; 52 registerBrem = false; 53 pMessenger = new PhysicsListMessenger(this); 54 SetVerboseLevel(1); 65 G4LossTableManager::Instance(); 66 pMessenger = new PhysicsListMessenger(this); 67 68 // EM physics 69 emName = G4String("standard_opt3"); 70 emPhysicsList = new PhysListEmStandard_option3(emName,detector); 71 72 defaultCutValue = 10*km; 73 74 SetVerboseLevel(1); 55 75 56 G4LossTableManager::Instance(); 76 G4LossTableManager::Instance(); 57 77 } 58 78 … … 60 80 61 81 PhysicsList::~PhysicsList() 62 { delete pMessenger; } 82 { 83 delete emPhysicsList; 84 delete pMessenger; 85 } 63 86 64 87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 66 89 void PhysicsList::ConstructParticle() 67 90 { 91 // pseudo-particles 68 92 G4Geantino::GeantinoDefinition(); 93 G4ChargedGeantino::ChargedGeantinoDefinition(); 94 95 // gamma 69 96 G4Gamma::GammaDefinition(); 70 97 98 // leptons 71 99 G4Electron::ElectronDefinition(); 72 100 G4Positron::PositronDefinition(); 73 101 74 G4Proton::ProtonDefinition(); 102 // baryons 103 G4Proton::ProtonDefinition(); 75 104 } 76 105 … … 80 109 { 81 110 AddTransportation(); 82 ConstructEM(); 111 emPhysicsList->ConstructProcess(); 112 83 113 AddStepMax(); 84 114 } 85 115 86 116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 87 88 #include "G4ComptonScattering.hh"89 #include "MyKleinNishinaCompton.hh"90 #include "G4GammaConversion.hh"91 #include "G4PhotoElectricEffect.hh"92 93 #include "G4MultipleScattering.hh"94 #include "G4CoulombScattering.hh"95 96 #include "G4eIonisation.hh"97 #include "MyMollerBhabhaModel.hh"98 #include "G4eBremsstrahlung.hh"99 #include "G4eplusAnnihilation.hh"100 101 #include "G4hIonisation.hh"102 103 #include "G4EmProcessOptions.hh"104 #include "G4MscStepLimitType.hh"105 106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......107 108 109 void PhysicsList::ConstructEM()110 {111 theParticleIterator->reset();112 while( (*theParticleIterator)() ){113 G4ParticleDefinition* particle = theParticleIterator->value();114 G4ProcessManager* pmanager = particle->GetProcessManager();115 G4String particleName = particle->GetParticleName();116 G4int iAlong = 0, iPost = 0;117 118 if (particleName == "gamma") {119 120 G4ComptonScattering* compton = new G4ComptonScattering();121 compton->SetModel(comptonModel = new MyKleinNishinaCompton(detector));122 comptonModel->SetCSFactor(1000.);123 124 pmanager->AddDiscreteProcess(compton);125 pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);126 pmanager->AddDiscreteProcess(new G4GammaConversion);127 128 } else if (particleName == "e-") {129 130 if (singleScattering)131 pmanager->AddProcess(new G4CoulombScattering, -1, -1, ++iPost);132 else133 pmanager->AddProcess(new G4MultipleScattering, -1, ++iAlong, ++iPost);134 135 G4eIonisation* eIoni = new G4eIonisation();136 eIoni->SetEmModel(new MyMollerBhabhaModel);137 pmanager->AddProcess(eIoni, -1, ++iAlong, ++iPost);138 139 if (registerBrem)140 pmanager->AddProcess(new G4eBremsstrahlung, -1, ++iAlong, ++iPost);141 142 } else if (particleName == "e+") {143 144 if (singleScattering)145 pmanager->AddProcess(new G4CoulombScattering, -1, -1, ++iPost);146 else147 pmanager->AddProcess(new G4MultipleScattering, -1, ++iAlong, ++iPost);148 149 G4eIonisation* pIoni = new G4eIonisation();150 pIoni->SetEmModel(new MyMollerBhabhaModel);151 pmanager->AddProcess(pIoni, -1, ++iAlong, ++iPost);152 153 if (registerBrem) {154 pmanager->AddProcess(new G4eBremsstrahlung, -1, ++iAlong, ++iPost);155 pmanager->AddProcess(new G4eplusAnnihilation, 0, -1, ++iPost);156 }157 158 } else if (particleName == "proton") {159 160 if (singleScattering)161 pmanager->AddProcess(new G4CoulombScattering, -1, -1, ++iPost);162 else163 pmanager->AddProcess(new G4MultipleScattering, -1, ++iAlong, ++iPost);164 165 pmanager->AddProcess(new G4hIonisation, -1, ++iAlong, ++iPost);166 }167 }168 169 // Em options170 //171 G4EmProcessOptions emOptions;172 173 //multiple scattering174 //175 emOptions.SetMscStepLimitation(fUseDistanceToBoundary);176 emOptions.SetSkin(2.);177 178 //physics tables179 //180 emOptions.SetMinEnergy(100*eV);181 emOptions.SetMaxEnergy(10*GeV);182 emOptions.SetDEDXBinning(800);183 emOptions.SetLambdaBinning(800);184 185 //energy loss186 //187 emOptions.SetStepFunction(0.2, 10*um);188 emOptions.SetLinearLossLimit(1.e-6);189 190 //build CSDA range191 //192 emOptions.SetBuildCSDARange(true);193 emOptions.SetMaxEnergyForCSDARange(10*GeV);194 emOptions.SetDEDXBinningForCSDARange(800);195 }196 197 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......198 199 #include "StepMax.hh"200 117 201 118 void PhysicsList::AddStepMax() … … 209 126 G4ProcessManager* pmanager = particle->GetProcessManager(); 210 127 211 if (stepMaxProcess->IsApplicable(*particle) )128 if (stepMaxProcess->IsApplicable(*particle) && !particle->IsShortLived()) 212 129 { 213 130 pmanager ->AddDiscreteProcess(stepMaxProcess); 214 131 } 132 } 133 } 134 135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 136 137 void PhysicsList::AddPhysicsList(const G4String& name) 138 { 139 if (verboseLevel>-1) { 140 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl; 141 } 142 143 if (name == emName) return; 144 145 if (name == "standard_opt0") { 146 147 emName = name; 148 delete emPhysicsList; 149 emPhysicsList = new PhysListEmStandard_option0(name,detector); 150 151 } else if (name == "standard_opt3") { 152 153 emName = name; 154 delete emPhysicsList; 155 emPhysicsList = new PhysListEmStandard_option3(name,detector); 156 157 } else if (name == "standard_GS") { 158 159 emName = name; 160 delete emPhysicsList; 161 emPhysicsList = new PhysListEmStandard_GS(name,detector); 162 163 } else if (name == "standard_SS") { 164 165 emName = name; 166 delete emPhysicsList; 167 emPhysicsList = new PhysListEmStandard_SS(name,detector); 168 } else { 169 170 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" 171 << " is not defined" 172 << G4endl; 215 173 } 216 174 } … … 232 190 SetCutValue(defaultCutValue, "e-"); 233 191 SetCutValue(defaultCutValue, "e+"); 192 SetCutValue(defaultCutValue, "proton"); 234 193 } 235 194 236 195 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 237 238 void PhysicsList::SetComptonCSfactor(G4double factor)239 {240 if (comptonModel) comptonModel->SetCSFactor(factor);241 }242 243 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......244 245 void PhysicsList::SingleCoulombScattering(G4bool flag)246 {247 singleScattering = flag;248 }249 250 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......251 252 void PhysicsList::RegisterBrem(G4bool flag)253 {254 registerBrem = flag;255 }256 257 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......258 259 260 261 -
trunk/examples/extended/medical/fanoCavity/src/PhysicsListMessenger.cc
r807 r1230 24 24 // ******************************************************************** 25 25 // 26 // $Id: PhysicsListMessenger.cc,v 1. 2 2007/10/02 14:42:51maire Exp $27 // GEANT4 tag $Name: $26 // $Id: PhysicsListMessenger.cc,v 1.3 2009/10/25 19:06:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 33 33 34 34 #include "PhysicsList.hh" 35 #include "MyKleinNishinaCompton.hh"36 35 #include "G4UIdirectory.hh" 37 #include "G4UIcmdWithADouble .hh"38 #include "G4UIcmdWithA Bool.hh"36 #include "G4UIcmdWithADoubleAndUnit.hh" 37 #include "G4UIcmdWithAString.hh" 39 38 40 39 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 42 41 PhysicsListMessenger::PhysicsListMessenger(PhysicsList* pPhys) 43 42 :pPhysicsList(pPhys) 44 { 43 { 45 44 physDir = new G4UIdirectory("/testem/phys/"); 46 45 physDir->SetGuidance("physics list commands"); 47 48 csFactor = new G4UIcmdWithADouble("/testem/phys/crossSectionFactor",this); 49 csFactor->SetGuidance("multiply Compton cross section"); 50 csFactor->SetParameterName("factor",false); 51 csFactor->SetRange("factor>=0"); 52 53 singleScat = new G4UIcmdWithABool("/testem/phys/singleScattering",this); 54 singleScat->SetGuidance("apply single Coulomb scattering process"); 55 singleScat->SetParameterName("flag",true); 56 singleScat->SetDefaultValue(true); 57 singleScat->AvailableForStates(G4State_PreInit); 58 59 brem = new G4UIcmdWithABool("/testem/phys/registerBrem",this); 60 brem->SetGuidance("register Brems in PhysicsList"); 61 brem->SetParameterName("flag",true); 62 brem->SetDefaultValue(true); 63 brem->AvailableForStates(G4State_PreInit); 46 47 pListCmd = new G4UIcmdWithAString("/testem/phys/addPhysics",this); 48 pListCmd->SetGuidance("Add modula physics list."); 49 pListCmd->SetParameterName("PList",false); 50 pListCmd->AvailableForStates(G4State_PreInit); 64 51 } 65 52 … … 68 55 PhysicsListMessenger::~PhysicsListMessenger() 69 56 { 70 delete csFactor; 71 delete singleScat; 72 delete brem; 73 delete physDir; 57 delete pListCmd; 58 delete physDir; 74 59 } 75 60 … … 78 63 void PhysicsListMessenger::SetNewValue(G4UIcommand* command, 79 64 G4String newValue) 80 { 81 if (command == csFactor) 82 {pPhysicsList->SetComptonCSfactor(csFactor->GetNewDoubleValue(newValue));} 83 84 if (command == singleScat) 85 {pPhysicsList->SingleCoulombScattering(singleScat->GetNewBoolValue(newValue));} 86 87 if (command == brem) 88 {pPhysicsList->RegisterBrem(brem->GetNewBoolValue(newValue));} 65 { 66 if( command == pListCmd ) 67 { pPhysicsList->AddPhysicsList(newValue);} 89 68 } 90 69 -
trunk/examples/extended/medical/fanoCavity/src/PrimaryGeneratorAction.cc
r807 r1230 25 25 // 26 26 // $Id: PrimaryGeneratorAction.cc,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/PrimaryGeneratorMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: PrimaryGeneratorMessenger.cc,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/RunAction.cc
r807 r1230 24 24 // ******************************************************************** 25 25 // 26 // $Id: RunAction.cc,v 1. 3 2007/10/29 12:36:26 maire Exp $27 // GEANT4 tag $Name: $26 // $Id: RunAction.cc,v 1.4 2009/01/22 18:34:06 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 325 325 // 326 326 G4double ratio = doseOverBeam/massTransfCoef; 327 G4double error = ratio* (dEoverE +dToverT);327 G4double error = ratio*std::sqrt(dEoverE*dEoverE + dToverT*dToverT); 328 328 329 329 G4cout.precision(5); -
trunk/examples/extended/medical/fanoCavity/src/StackingAction.cc
r807 r1230 25 25 // 26 26 // $Id: StackingAction.cc,v 1.2 2007/03/02 11:08:41 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/StackingMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: StackingMessenger.cc,v 1.1 2007/01/23 13:34:19 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/StepMax.cc
r807 r1230 25 25 // 26 26 // $Id: StepMax.cc,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/StepMaxMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: StepMaxMessenger.cc,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/SteppingAction.cc
r807 r1230 25 25 // 26 26 // $Id: SteppingAction.cc,v 1.4 2007/10/29 17:09:53 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/SteppingVerbose.cc
r807 r1230 25 25 // 26 26 // $Id: SteppingVerbose.cc,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/TrackingAction.cc
r807 r1230 25 25 // 26 26 // $Id: TrackingAction.cc,v 1.4 2007/10/29 17:09:53 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Note: See TracChangeset
for help on using the changeset viewer.