Changeset 1337 for trunk/examples/extended/medical
- Timestamp:
- Sep 30, 2010, 2:47:17 PM (14 years ago)
- Location:
- trunk/examples/extended/medical
- Files:
-
- 130 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/medical/DICOM/Data.dat
r807 r1337 1 8 2 3 3 1 1 4 2 2 5 3 3 141966164 141966335 141966506 6 10 7 7 Air 0.207 -
trunk/examples/extended/medical/DICOM/GNUmakefile
r807 r1337 1 # $Id: GNUmakefile,v 1. 3 2003/06/16 07:51:35 guatelliExp $1 # $Id: GNUmakefile,v 1.4 2010/01/11 16:42:22 gcosmo Exp $ 2 2 # -------------------------------------------------------------- 3 3 # GNUmakefile for examples module. Gabriele Cosmo, 06/04/98. … … 7 7 G4TARGET := $(name) 8 8 G4EXLIB := true 9 10 ifndef G4INSTALL 11 G4INSTALL = ../../../.. 12 endif 9 13 10 14 .PHONY: all -
trunk/examples/extended/medical/DICOM/History
r807 r1337 1 $Id: History,v 1. 13 2008/01/22 15:09:53 gcosmoExp $1 $Id: History,v 1.22 2010/06/07 05:40:46 perl Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 8 8 Category History file 9 9 --------------------- 10 06.06.2010 - Joseph Perl (DICOM-V09-03-03) 11 Remove unused variable in EventAction 12 13 03.06.2010 - Joseph Perl (DICOM-V09-03-02) 14 Updated vis usage 15 16 19.11.2009- Stéphane Chauvie (DICOM-V09-03-00) 17 01.06.2010- Stephane Chauvie - Andrea Armando 18 Added function to read nested items (defined and undefined) 19 Removed dependencies on CONQUEST 20 DICOM handler could now read whichever DICOM file (PT,CT,DR,CR,US,MR... ) 21 22 19.11.2009- Stephanee Chauvie (DICOM-V09-02-03) 23 Changed DICOM Handler to read CT files coming from CONQUEST DICOM server 24 25 05.02.2009 - Pedro Arce (DICOM-V09-02-01) 26 Added report on dose per voxel. 27 Added warning for erroneous inclusion of development code in 28 release 9.2 (to be removed when fix will be included in patch). 29 30 27.01.2009 - Gabriele Cosmo (DICOM-V09-02-00) 31 Use new class G4RegularNavigationHistory for counting of step 32 lengths in voxels of the regular structure. 33 34 27.11.2008 - Pedro Arce (DICOM-V09-01-02) 35 Included G4PSDoseDeposit_RegNav to distribute dose along voxels, 36 including msc and energy loss corrections, for the case of 37 skipping voxel with equal materials when using regular 38 navigation 39 40 21.07.2008 - Pedro Arce (DICOM-V09-01-01) 41 Bug fix in DicomNestedPhantomParameterisation in calculating the 42 'copyNo', so that material assignment was wrong 43 Set default cut to 1 mm (with previous 1.E-3 mm too much time is 44 spent on physics and no improvement is seen with different 45 navigation options). 46 Corrected direction and position of primary particles so that 47 they traverse the DICOM voxels. 10 48 11 49 22.01.2008 - Pedro Arce (DICOM-V09-01-00) -
trunk/examples/extended/medical/DICOM/README
r807 r1337 18 18 19 19 And it has been deeply reviewed by Pedro Arce in December 2007. 20 Very small changes by Stephane Chauvie in January 2008. 21 Stephane Chauvie, Oct 2009: changed Physics list; changes in DICOM read. 22 Stephane Chauvie and Andrea Armando; June 2010 adapted for reading whatever DICOM file 20 23 21 24 … … 30 33 31 34 - A standard Geant4 example GNUmakefile is provided 32 - Compile it with 'make' 35 - Compile it with 'make'/'gmake' 33 36 34 37 ---> 3) Run the example: 35 38 36 - To run the environment variab le G4LEDATA needs to be set, pointing to the low energy data base, G4EMLOW4.339 - To run the environment variabmore le G4LEDATA needs to be set, pointing to the low energy data base 37 40 38 41 - batch mode: … … 41 44 - interactive mode: 42 45 - $G4INSTALL/bin/Linux-g++/dicom 43 the file vis.mac is read in order to visualise the phantom with OpenGL 46 the file vis.mac is read in order to visualise the phantom with OpenGL, DAWN or VRML 44 47 45 48 --->4) Metadata: 46 49 47 50 The file Data.dat has the following information 48 - A line with the compression value (used only to create the .g4dcm , not to read it)51 - A line with the compression value (used only to create the .g4dcm and .g4dcmb, not to read it) 49 52 - A line with the number of files 50 53 - A line for each file name (to these names it will be added the suffix .dcm to read the DICOM files in their original format, and the suffix .g4dcm to read the text files that contain the DICOM information where the Hounsfield numbers have been converted to material and densities) … … 94 97 The file Colormap.dat defines the colour that will be assigned to the voxels of each material. 95 98 96 --->8) DICOM text file format:99 --->8) DICOM file formats: 97 100 98 101 The DICOM files are converted to a simple text format. You may create your own file with the following format (see e.g. 14196616.g4dcm): … … 109 112 As commented before the DICOM files (.dcm) are assumed to describe one Z slice per file, and therefore the GEANT4 text files (.g4dcm) created from them have also one unique Z slice per file. Nevertheless if you create your own .g4dcm file you may include as many Z slices as desired. In any case you have to respect the rule that the Z slices must be contiguous. 110 113 114 The same information is also used to fill a file in binary format, that contains the same information as the text format. Its name ends in .g4dcmb, instead of .g4dcm . 115 111 116 --->9) Choosing different parameterisation/navigation options: 112 117 113 118 There are four possible ways in GEANT4 to treat the navigation in regular voxelised volumes: 114 119 115 - The non-optimised way. It will be very slow because each time a track exits a voxel it has to loop to all other voxels to know which one it may enter116 - The optimisation with G4SmartVoxel: a 3D grid is built, so that the location of voxels is fast, but it requires a lot of memory120 - The 1D optimisation . It will be very slow because each time a track exits a voxel it has to loop to all other voxels to know which one it may enter 121 - The 3D optimisation with G4SmartVoxel: a 3D grid is built, so that the location of voxels is fast, but it requires a lot of memory 117 122 - Using G4NestedParameterisation. The search is done hierarchically in X, Y and Z. It is fast and does not require big memory 118 - Using G4PhantomParameterisation/G4RegularNavigation: an special algorithm to navigate in regular voxelised geometries (see GEANT4 doc). This is the fastest way without any extra memory requirement (and it is the default in this example). It includes an option (default) to skip frontiers between voxels when they have the same material 123 - Using G4PhantomParameterisation/G4RegularNavigation: an special algorithm to navigate in regular voxelised geometries (see GEANT4 doc). This is the fastest way without any extra memory requirement (and it is the default in this example). It includes an option (default) to skip frontiers between voxels when they have the same material. When using this option at each step the energy is all deposited in the last voxel; for properly distribution of the dose (=energy/volume) the G4PSDoseDeposit_RegNav scorer can be used (see below) 119 124 120 125 You can select amont the four options in the following way: … … 138 143 - To use the third option you have to set the enviromental variable DICOM_NESTED_PARAM to 1 139 144 145 146 --->10) Calculating dose in phantom voxels for regular navigation 147 148 As mentioned above the regular navigation has the option to keip voxel frontiers when two voxels share the same material, what can make the CPU time several times smaller. But this option makes that all energy deposited is computed in the last voxel, instead of distributing it along the voxels traversed. To properly calculate the dose in each voxel the G4PSDoseDeposit_RegNav scorer can be used. 149 It takes into account the fact that, when the particle travels through the voxels it looses energy and therefore the energy lost per length (dEdx) is bigger and also the effect of the multiple scattering is bigger. 150 The algorithm to make this correction is an iterative one, as the step length increase due multiple scattering (that converts the geometrical step length in what we will call the true step length) and the energy loss are correlated. 151 It works in the folloing way: first the total true step length is distributed among the voxels proportionally to their geometrical step length; with these values it is calculated one voxel after another the value of dEdx and then the value of the kinetic energy at the entrance of each voxel; with these values it is calculated the geometrical to true step corrections due to multiple scattering for each voxel; finally these new values are used to recalculate the energy lost in each voxel. It has been demonstrated for dose in a water phantom and in a real phantom that the two-step iteration described is enough to reproduce the dose calcualted when no skipping of voxel frontiers is done. 152 153 This scorer is implemented in this examples if the regular navigation option is 154 chosen. It is triggered at the method RegularDicomDetectorConstruction::ConstructPatient() by the call 155 156 SetScorer(voxel_logic); 157 158 --->11) Output 159 dicom.out is produced running th macro file run.mac. It has 2 columns: the first is the number of 160 voxel (ordered in x,y,z) and the second the dose there deposited (in Gy) 161 It is produced, as an example, with a compression value of 32 -
trunk/examples/extended/medical/DICOM/include/DicomDetectorConstruction.hh
r1230 r1337 97 97 std::vector<G4Material*> fMaterials; // list of new materials created to distinguish different density voxels that have the same original materials 98 98 size_t* fMateIDs; // index of material of each voxel 99 //unsigned int* fMateIDs; // index of material of each voxel 99 100 100 101 std::map<G4int,G4double> fDensityDiffs; // Density difference to distinguish material for each original material (by index) -
trunk/examples/extended/medical/DICOM/include/DicomHandler.hh
r807 r1337 90 90 91 91 void GetInformation(G4int &, char *); 92 G4 doublePixel2density(G4int pixel);92 G4float Pixel2density(G4int pixel); 93 93 void ReadMaterialIndices( std::ifstream& finData); 94 size_t GetMaterialIndex( G4doubledensity );94 unsigned int GetMaterialIndex( G4float density ); 95 95 void StoreData(std::ofstream& foutG4DCM); 96 G4int read_defined_nested(FILE *, G4int); 97 void read_undefined_nested(FILE *); 98 void read_undefined_item(FILE *); 96 99 97 100 short compression; … … 112 115 113 116 G4int** tab; 114 std::map<G4double,G4String> fMaterialIndices;117 std::map<G4float,G4String> fMaterialIndices; 115 118 }; 116 119 #endif -
trunk/examples/extended/medical/DICOM/include/DicomNestedPhantomParameterisation.hh
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: DicomNestedPhantomParameterisation.hh,v 1. 3 2009/01/27 10:44:58 gcosmoExp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: DicomNestedPhantomParameterisation.hh,v 1.5 2009/11/19 16:15:23 chauvie Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 // -------------------------------------------------------------------- … … 76 76 // of all instances with the same mother/ancestor volume 77 77 78 size_t GetMaterialIndex( size_t nx, size_t ny, size_t nz) const; 79 size_t GetMaterialIndex( size_t copyNo) const; 78 unsigned int GetMaterialIndex( unsigned int nx, unsigned int ny, unsigned int nz) const; 79 unsigned int GetMaterialIndex( unsigned int copyNo) const; 80 //void SetMaterialIndices( unsigned int* matInd ) { fMaterialIndices = matInd; } 80 81 void SetMaterialIndices( size_t* matInd ) { fMaterialIndices = matInd; } 81 void SetNoVoxel( size_t nx, size_t ny, size_t nz );82 void SetNoVoxel( unsigned int nx, unsigned int ny, unsigned int nz ); 82 83 83 84 void ComputeTransformation(const G4int no, … … 121 122 std::vector<G4Material*> fMaterials; 122 123 size_t* fMaterialIndices; // Index in materials corresponding to each voxel 124 // unsigned int* fMaterialIndices; // Index in materials corresponding to each voxel 123 125 }; 124 125 126 #endif -
trunk/examples/extended/medical/DICOM/include/DicomPhysicsList.hh
r807 r1337 24 24 // ******************************************************************** 25 25 // 26 // The code was written by : 27 // *Louis Archambault louis.archambault@phy.ulaval.ca, 28 // *Luc Beaulieu beaulieu@phy.ulaval.ca 29 // +Vincent Hubert-Tremblay at tigre.2@sympatico.ca 30 // 31 // 32 // *Centre Hospitalier Universitaire de Quebec (CHUQ), 33 // Hotel-Dieu de Quebec, departement de Radio-oncologie 34 // 11 cote du palais. Quebec, QC, Canada, G1R 2J6 35 // tel (418) 525-4444 #6720 36 // fax (418) 691 5268 37 // 38 // + Université Laval, Québec (QC) Canada 39 //*******************************************************// 26 // ------------------------------------------------------------------- 27 // $Id: DicomPhysicsList.hh,v 1.7 2009/10/26 11:21:01 chauvie Exp $ 28 // ------------------------------------------------------------------- 40 29 41 30 #ifndef DicomPhysicsList_h … … 43 32 44 33 #include "G4VUserPhysicsList.hh" 45 #include "globals.hh"46 34 47 class G4LowEnergyIonisation; 48 class G4LowEnergyPhotoElectric; 49 class G4LowEnergyBremsstrahlung; 35 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 50 36 51 37 class DicomPhysicsList: public G4VUserPhysicsList … … 55 41 ~DicomPhysicsList(); 56 42 57 // Set Cuts58 void SetGammaCut(G4double);59 void SetElectronCut(G4double);60 void SetPositronCut(G4double);61 62 protected:63 // Construct particle and physics64 void ConstructParticle();65 void ConstructProcess();66 67 void SetCuts();68 69 // these methods Construct particles70 void ConstructBosons();71 void ConstructLeptons();72 73 // these methods Construct physics processes and register them74 void ConstructGeneral();75 void ConstructEM();76 77 43 private: 78 44 79 45 G4double cutForGamma; 80 46 G4double cutForElectron; 81 47 G4double cutForPositron; 48 49 protected: 50 51 void ConstructParticle(); 52 void ConstructBosons(); 53 void ConstructLeptons(); 54 void ConstructBaryons(); 82 55 83 G4LowEnergyIonisation* loweIon; 84 G4LowEnergyPhotoElectric* lowePhot; 85 G4LowEnergyBremsstrahlung* loweBrem; 86 56 void ConstructProcess(); 57 void ConstructEM(); 58 void ConstructHad(); 59 void ConstructGeneral(); 60 void SetCuts(); 61 87 62 }; 88 89 63 #endif 90 64 -
trunk/examples/extended/medical/DICOM/run.mac
r807 r1337 1 # S. Chauvie 2 # 3 # Macro file recommended for the use with DICOM example and built-in physic list. 4 # This macro uses the physics list already contained in the Geant4 distribution 5 # 6 7 ######################### 8 # Set of the verboses 9 # 1 10 /control/verbose 1 11 /tracking/verbose 0 2 12 /run/verbose 1 3 /tracking/verbose 1 13 /event/verbose 0 14 15 16 ########################## 17 # Random 18 # 19 4 20 /random/setDirectoryName . 5 21 /random/setSavingFlag 1 6 22 #/random/resetEngineFrom currentEvent.rndm1 23 24 25 ########################## 26 # Initialisation procedure 27 # 28 /run/initialize 29 7 30 /run/beamOn 100 -
trunk/examples/extended/medical/DICOM/src/DicomDetectorConstruction.cc
r1230 r1337 314 314 G4double densityDiff = 0.1; 315 315 std::map<G4int,G4double> fDensityDiffs; // to be able to use a different densityDiff for each material 316 for( size_t ii = 0; ii < fOriginalMaterials.size(); ii++ ){316 for( unsigned int ii = 0; ii < fOriginalMaterials.size(); ii++ ){ 317 317 fDensityDiffs[ii] = densityDiff; //currently all materials with same difference 318 318 } … … 327 327 //--- If first slice, initiliaze fMateIDs 328 328 if( fZSliceHeaders.size() == 1 ) { 329 //fMateIDs = new unsigned int[fNoFiles*nVoxels]; 329 330 fMateIDs = new size_t[fNoFiles*nVoxels]; 330 } 331 332 size_t mateID; 331 332 } 333 334 unsigned int mateID; 333 335 G4int voxelCopyNo = (fZSliceHeaders.size()-1)*nVoxels; // number of voxels from previously read slices 334 336 for( G4int ii = 0; ii < nVoxels; ii++, voxelCopyNo++ ){ … … 353 355 354 356 //-- Look if a material with this name is already created (because a previous voxel was already in this density bin) 355 size_t im;357 unsigned int im; 356 358 for( im = 0; im < fMaterials.size(); im++ ){ 357 359 if( fMaterials[im]->GetName() == newMateName ) { … … 377 379 //----- Images must have the same dimension ... 378 380 fZSliceHeaderMerged = new DicomPatientZSliceHeader( *fZSliceHeaders[0] ); 379 for( size_t ii = 1; ii < fZSliceHeaders.size(); ii++ ) {381 for( unsigned int ii = 1; ii < fZSliceHeaders.size(); ii++ ) { 380 382 *fZSliceHeaderMerged += *fZSliceHeaders[ii]; 381 383 }; -
trunk/examples/extended/medical/DICOM/src/DicomEventAction.cc
r807 r1337 42 42 #include "DicomEventAction.hh" 43 43 #include "G4Event.hh" 44 #include "G4TrajectoryContainer.hh"45 #include "G4Trajectory.hh"46 #include "G4VVisManager.hh"47 44 48 45 DicomEventAction::DicomEventAction():drawFlag("all") … … 55 52 { 56 53 G4cout << "EV: " << evt->GetEventID() << G4endl; 57 }58 59 void DicomEventAction::EndOfEventAction(const G4Event* evt)60 {61 // extract the trajectories and draw them62 63 if (G4VVisManager::GetConcreteInstance())64 {65 G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();66 G4int nTrajectories = 0;67 if ( trajectoryContainer )68 nTrajectories = trajectoryContainer->entries();69 70 for ( G4int i = 0;i < nTrajectories; i++ )71 {72 G4Trajectory* trj = (G4Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);73 if (drawFlag == "all")74 trj->DrawTrajectory(50);75 else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))76 trj->DrawTrajectory(50);77 else if ((drawFlag == "neutral")&&(trj->GetCharge() == 0.))78 trj->DrawTrajectory(50);79 }80 }81 54 } 82 55 56 void DicomEventAction::EndOfEventAction(const G4Event*) 57 { 58 } -
trunk/examples/extended/medical/DICOM/src/DicomHandler.cc
r807 r1337 61 61 62 62 DicomHandler::DicomHandler() 63 : DATABUFFSIZE(8192), LINEBUFFSIZE( 128), FILENAMESIZE(512),63 : DATABUFFSIZE(8192), LINEBUFFSIZE(5020), FILENAMESIZE(512), 64 64 compression(0), nFiles(0), rows(0), columns(0), 65 65 bitAllocated(0), maxPixelValue(0), minPixelValue(0), … … 98 98 short readElementId; // identify a particular type information 99 99 short elementLength2; // deal with element length in 2 bytes 100 //unsigned int elementLength4; // deal with element length in 4 bytes 100 101 G4int elementLength4; // deal with element length in 4 bytes 101 102 102 103 char * data = new char[DATABUFFSIZE]; 103 104 105 104 106 // Read information up to the pixel data 105 107 while(true) { … … 117 119 // Creating a tag to be identified afterward 118 120 G4int tagDictionary = readGroupId*0x10000 + readElementId; 119 120 121 // VR or element length 121 122 // beginning of the pixels 123 if(tagDictionary == 0x7FE00010) break; 124 125 // VR or element length 122 126 std::fread(buffer,2,1,dicom); 123 127 GetValue(buffer, elementLength2); 124 125 // If value representation (VR) is OB, OW, SQ, UN,128 129 // If value representation (VR) is OB, OW, SQ, UN, added OF and UT 126 130 //the next length is 32 bits 127 131 if((elementLength2 == 0x424f || // "OB" 128 132 elementLength2 == 0x574f || // "OW" 129 elementLength2 == 0x5153 || // "SQ" 133 elementLength2 == 0x464f || // "OF" 134 elementLength2 == 0x5455 || // "UT" 135 elementLength2 == 0x5153 || // "SQ" 130 136 elementLength2 == 0x4e55) && // "UN" 131 137 !implicitEndian ) { // explicit VR … … 136 142 std::fread(buffer, 4, 1, dicom); 137 143 GetValue(buffer, elementLength4); 138 139 // beginning of the pixels 140 if(tagDictionary == 0x7FE00010) break; 141 144 145 if(elementLength2 == 0x5153) 146 { 147 if(elementLength4 == 0xFFFFFFFF) 148 read_undefined_nested( dicom ); 149 else{ 150 if(read_defined_nested( dicom, elementLength4 )==0){ 151 G4cerr << "Reading defined nested functin failed!" << G4endl; 152 exit(-10); } 153 } 154 } else { 142 155 // Reading the information with data 143 156 std::fread(data, elementLength4,1,dicom); 144 145 146 } else { // length is 16 bits : 147 148 if(!implicitEndian || readGroupId == 2) { 149 // element length (2 bytes) 150 std::fread(buffer, 2, 1, dicom); 151 GetValue(buffer, elementLength2); 152 elementLength4 = elementLength2; 153 154 } else { 155 // element length (4 bytes) 156 if(std::fseek(dicom, -2, SEEK_CUR) != 0) { 157 G4cerr << "[DicomHandler] fseek failed" << G4endl; 158 exit(-10); 159 } 160 std::fread(buffer, 4, 1, dicom); 161 GetValue(buffer, elementLength4); 162 } 163 164 // beginning of the pixels 165 if(tagDictionary == 0x7FE00010) break; 166 167 std::fread(data, elementLength4, 1, dicom); 157 } 158 159 160 } else { 161 162 if(!implicitEndian || readGroupId == 2) { // explicit with VR different than previous ones 163 164 //G4cout << "Reading DICOM files with Explicit VR"<< G4endl; 165 // element length (2 bytes) 166 std::fread(buffer, 2, 1, dicom); 167 GetValue(buffer, elementLength2); 168 elementLength4 = elementLength2; 169 170 171 172 std::fread(data, elementLength4, 1, dicom); 173 174 } else { // Implicit VR 175 176 //G4cout << "Reading DICOM files with Implicit VR"<< G4endl; 177 178 // element length (4 bytes) 179 if(std::fseek(dicom, -2, SEEK_CUR) != 0) { 180 G4cerr << "[DicomHandler] fseek failed" << G4endl; 181 exit(-10);} 182 183 std::fread(buffer, 4, 1, dicom); 184 GetValue(buffer, elementLength4); 185 186 //G4cout << std::hex<< elementLength4 << G4endl; 187 188 if(elementLength4 == 0xFFFFFFFF) 189 read_undefined_nested(dicom); 190 else { 191 192 193 std::fread(data, elementLength4, 1, dicom); 194 195 } 196 197 } 168 198 } 169 199 … … 179 209 G4String fnameG4DCM = G4String(filename2) + ".g4dcm"; 180 210 foutG4DCM.open(fnameG4DCM); 181 G4cout << " opened fnameG4DCM file " << fnameG4DCM<< G4endl;211 G4cout << "### Writing of " << fnameG4DCM << " ### " << G4endl; 182 212 183 213 foutG4DCM << fMaterialIndices.size() << G4endl; 184 214 //--- Write materials 185 size_t ii = 0;186 std::map<G4 double,G4String>::const_iterator ite;215 unsigned int ii = 0; 216 std::map<G4float,G4String>::const_iterator ite; 187 217 for( ite = fMaterialIndices.begin(); ite != fMaterialIndices.end(); ite++, ii++ ){ 188 218 foutG4DCM << ii << " " << (*ite).second << G4endl; … … 194 224 foutG4DCM << -pixelSpacingY*columns/2 << " " << pixelSpacingY*columns/2 << G4endl; 195 225 foutG4DCM << sliceLocation-sliceThickness/2. << " " << sliceLocation+sliceThickness/2. << G4endl; 226 // foutG4DCM << compression << G4endl; 196 227 197 228 ReadData( dicom, filename2 ); … … 431 462 void DicomHandler::ReadMaterialIndices( std::ifstream& finData) 432 463 { 433 size_t nMate;464 unsigned int nMate; 434 465 G4String mateName; 435 G4 doubledensityMax;466 G4float densityMax; 436 467 finData >> nMate; 437 468 if( finData.eof() ) return; 438 469 439 470 G4cout << " ReadMaterialIndices " << nMate << G4endl; 440 for( size_t ii = 0; ii < nMate; ii++ ){471 for( unsigned int ii = 0; ii < nMate; ii++ ){ 441 472 finData >> mateName >> densityMax; 442 473 fMaterialIndices[densityMax] = mateName; … … 446 477 } 447 478 448 size_t DicomHandler::GetMaterialIndex( G4doubledensity )479 unsigned int DicomHandler::GetMaterialIndex( G4float density ) 449 480 { 450 size_t mateID; 451 std::map<G4double,G4String>::reverse_iterator ite; 481 std::map<G4float,G4String>::reverse_iterator ite; 452 482 G4int ii = fMaterialIndices.size(); 453 483 for( ite = fMaterialIndices.rbegin(); ite != fMaterialIndices.rend(); ite++, ii-- ) { … … 508 538 509 539 // Creation of .g4 files wich contains averaged density data 510 511 540 char * nameProcessed = new char[FILENAMESIZE]; 512 FILE* processed;513 514 std::sprintf(nameProcessed,"%s.g4 ",filename2);515 processed= std::fopen(nameProcessed,"w+b");541 FILE* fileOut; 542 543 std::sprintf(nameProcessed,"%s.g4dcmb",filename2); 544 fileOut = std::fopen(nameProcessed,"w+b"); 516 545 std::printf("### Writing of %s ###\n",nameProcessed); 517 546 518 std::fwrite(&rows, 2, 1, processed); 519 std::fwrite(&columns, 2, 1, processed); 520 std::fwrite(&pixelSpacingX, 8, 1, processed); 521 std::fwrite(&pixelSpacingY, 8, 1, processed); 522 std::fwrite(&sliceThickness, 8, 1, processed); 523 std::fwrite(&sliceLocation, 8, 1, processed); 524 std::fwrite(&compression, 2, 1, processed); 547 unsigned int nMate = fMaterialIndices.size(); 548 std::fwrite(&nMate, sizeof(unsigned int), 1, fileOut); 549 //--- Write materials 550 std::map<G4float,G4String>::const_iterator ite; 551 for( ite = fMaterialIndices.begin(); ite != fMaterialIndices.end(); ite++ ){ 552 G4String mateName = (*ite).second; 553 for( G4int ii = (*ite).second.length(); ii < 40; ii++ ) { 554 mateName += " "; 555 } //mateName = const_cast<char*>(((*ite).second).c_str()); 556 557 const char* mateNameC = mateName.c_str(); 558 std::fwrite(mateNameC, sizeof(char),40, fileOut); 559 } 560 561 unsigned int rowsC = rows/compression; 562 unsigned int columnsC = columns/compression; 563 unsigned int planesC = 1; 564 G4float pixelLocationXM = -pixelSpacingX*rows/2.; 565 G4float pixelLocationXP = pixelSpacingX*rows/2.; 566 G4float pixelLocationYM = -pixelSpacingY*rows/2.; 567 G4float pixelLocationYP = pixelSpacingY*rows/2.; 568 G4float sliceLocationZM = sliceLocation-sliceThickness/2.; 569 G4float sliceLocationZP = sliceLocation+sliceThickness/2.; 570 //--- Write number of voxels (assume only one voxel in Z) 571 std::fwrite(&rowsC, sizeof(unsigned int), 1, fileOut); 572 std::fwrite(&columnsC, sizeof(unsigned int), 1, fileOut); 573 std::fwrite(&planesC, sizeof(unsigned int), 1, fileOut); 574 //--- Write minimum and maximum extensions 575 std::fwrite(&pixelLocationXM, sizeof(G4float), 1, fileOut); 576 std::fwrite(&pixelLocationXP, sizeof(G4float), 1, fileOut); 577 std::fwrite(&pixelLocationYM, sizeof(G4float), 1, fileOut); 578 std::fwrite(&pixelLocationYP, sizeof(G4float), 1, fileOut); 579 std::fwrite(&sliceLocationZM, sizeof(G4float), 1, fileOut); 580 std::fwrite(&sliceLocationZP, sizeof(G4float), 1, fileOut); 581 // std::fwrite(&compression, sizeof(unsigned int), 1, fileOut); 525 582 526 583 std::printf("%8i %8i\n",rows,columns); … … 532 589 G4int compSize = compression; 533 590 G4int mean; 534 G4 doubledensity;591 G4float density; 535 592 G4bool overflow = false; 536 593 G4int cpt=1; 537 594 595 //----- Write index of material for each pixel 538 596 if(compSize == 1) { // no compression: each pixel has a density value) 539 for( G4int ww = 0; ww < rows; ww++) { 540 for( G4int xx = 0; xx < columns; xx++) { 541 mean = tab[ww][xx]; 542 density = Pixel2density(mean); 543 std::fwrite(&density, sizeof(G4double), 1, processed); 544 } 545 } 597 for( G4int ww = 0; ww < rows; ww++) { 598 for( G4int xx = 0; xx < columns; xx++) { 599 mean = tab[ww][xx]; 600 density = Pixel2density(mean); 601 unsigned int mateID = GetMaterialIndex( density ); 602 std::fwrite(&mateID, sizeof(unsigned int), 1, fileOut); 603 } 604 } 546 605 547 606 } else { 548 // density value is the average of a square region of 549 // compression*compression pixels 550 for(G4int ww = 0; ww < rows ;ww += compSize ) { 551 for(G4int xx = 0; xx < columns ;xx +=compSize ) { 552 overflow = false; 553 mean = 0; 554 for(int sumx = 0; sumx < compSize; sumx++) { 555 for(int sumy = 0; sumy < compSize; sumy++) { 556 if(ww+sumy >= rows || xx+sumx >= columns) overflow = true; 557 mean += tab[ww+sumy][xx+sumx]; 558 } 559 if(overflow) break; 560 } 561 mean /= compSize*compSize; 562 cpt = 1; 563 564 if(!overflow) { 565 G4double density = Pixel2density(mean); 566 std::fwrite(&density, sizeof(G4double), 1, processed); 567 } 607 // density value is the average of a square region of 608 // compression*compression pixels 609 for(G4int ww = 0; ww < rows ;ww += compSize ) { 610 for(G4int xx = 0; xx < columns ;xx +=compSize ) { 611 overflow = false; 612 mean = 0; 613 for(int sumx = 0; sumx < compSize; sumx++) { 614 for(int sumy = 0; sumy < compSize; sumy++) { 615 if(ww+sumy >= rows || xx+sumx >= columns) overflow = true; 616 mean += tab[ww+sumy][xx+sumx]; 568 617 } 569 570 } 571 } 572 std::fclose(processed); 573 618 if(overflow) break; 619 } 620 mean /= compSize*compSize; 621 cpt = 1; 622 623 if(!overflow) { 624 density = Pixel2density(mean); 625 unsigned int mateID = GetMaterialIndex( density ); 626 std::fwrite(&mateID, sizeof(unsigned int), 1, fileOut); 627 } 628 } 629 630 } 631 } 632 633 //----- Write density for each pixel 634 if(compSize == 1) { // no compression: each pixel has a density value) 635 for( G4int ww = 0; ww < rows; ww++) { 636 for( G4int xx = 0; xx < columns; xx++) { 637 mean = tab[ww][xx]; 638 density = Pixel2density(mean); 639 std::fwrite(&density, sizeof(G4float), 1, fileOut); 640 } 641 } 642 643 } else { 644 // density value is the average of a square region of 645 // compression*compression pixels 646 for(G4int ww = 0; ww < rows ;ww += compSize ) { 647 for(G4int xx = 0; xx < columns ;xx +=compSize ) { 648 overflow = false; 649 mean = 0; 650 for(int sumx = 0; sumx < compSize; sumx++) { 651 for(int sumy = 0; sumy < compSize; sumy++) { 652 if(ww+sumy >= rows || xx+sumx >= columns) overflow = true; 653 mean += tab[ww+sumy][xx+sumx]; 654 } 655 if(overflow) break; 656 } 657 mean /= compSize*compSize; 658 cpt = 1; 659 660 if(!overflow) { 661 density = Pixel2density(mean); 662 std::fwrite(&density, sizeof(G4float), 1, fileOut); 663 } 664 } 665 666 } 667 } 668 669 std::fclose(fileOut); 670 574 671 delete [] nameProcessed; 575 672 … … 595 692 */ 596 693 597 G4 doubleDicomHandler::Pixel2density(G4int pixel)694 G4float DicomHandler::Pixel2density(G4int pixel) 598 695 { 599 G4 doubledensity = -1.;696 G4float density = -1.; 600 697 G4int nbrequali = 0; 601 698 G4double deltaCT = 0; … … 752 849 _rval = *(Type *)_val; 753 850 } 851 852 G4int DicomHandler::read_defined_nested(FILE * nested,G4int SQ_Length) 853 { 854 // VARIABLES 855 unsigned short item_GroupNumber; 856 unsigned short item_ElementNumber; 857 G4int item_Length; 858 G4int items_array_length=0; 859 char * buffer= new char[LINEBUFFSIZE]; 860 861 862 while(items_array_length < SQ_Length) 863 { 864 std::fread(buffer, 2, 1, nested); 865 GetValue(buffer, item_GroupNumber); 866 867 std::fread(buffer, 2, 1, nested); 868 GetValue(buffer, item_ElementNumber); 869 870 std::fread(buffer, 4, 1, nested); 871 GetValue(buffer, item_Length); 872 873 std::fread(buffer, item_Length, 1, nested); 874 875 items_array_length= items_array_length+8+item_Length; 876 } 877 878 delete []buffer; 879 880 if(SQ_Length>items_array_length) 881 return 0; 882 else 883 return 1; 884 885 } 886 887 void DicomHandler::read_undefined_nested(FILE * nested) 888 { 889 // VARIABLES 890 unsigned short item_GroupNumber; 891 unsigned short item_ElementNumber; 892 G4int item_Length; 893 char * buffer= new char[LINEBUFFSIZE]; 894 895 896 do 897 { 898 std::fread(buffer, 2, 1, nested); 899 GetValue(buffer, item_GroupNumber); 900 901 std::fread(buffer, 2, 1, nested); 902 GetValue(buffer, item_ElementNumber); 903 904 std::fread(buffer, 4, 1, nested); 905 GetValue(buffer, item_Length); 906 907 if(item_Length!=0xffffffff) 908 std::fread(buffer, item_Length, 1, nested); 909 else 910 read_undefined_item(nested); 911 912 913 }while(item_GroupNumber!=0xFFFE || item_ElementNumber!=0xE0DD || item_Length!=0); 914 915 delete [] buffer; 916 917 } 918 919 void DicomHandler::read_undefined_item(FILE * nested) 920 { 921 // VARIABLES 922 unsigned short item_GroupNumber; 923 unsigned short item_ElementNumber; 924 G4int item_Length; 925 char *buffer= new char[LINEBUFFSIZE]; 926 927 do 928 { 929 std::fread(buffer, 2, 1, nested); 930 GetValue(buffer, item_GroupNumber); 931 932 std::fread(buffer, 2, 1, nested); 933 GetValue(buffer, item_ElementNumber); 934 935 std::fread(buffer, 4, 1, nested); 936 GetValue(buffer, item_Length); 937 938 939 if(item_Length!=0) 940 std::fread(buffer,item_Length,1,nested); 941 942 } 943 while(item_GroupNumber!=0xFFFE || item_ElementNumber!=0xE00D || item_Length!=0); 944 945 delete []buffer; 946 947 } -
trunk/examples/extended/medical/DICOM/src/DicomNestedPhantomParameterisation.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: DicomNestedPhantomParameterisation.cc,v 1. 5 2009/01/27 10:44:58 gcosmoExp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: DicomNestedPhantomParameterisation.cc,v 1.6 2009/11/10 18:48:46 arce Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 // -------------------------------------------------------------------- … … 53 53 54 54 void DicomNestedPhantomParameterisation:: 55 SetNoVoxel( size_t nx, size_t ny, size_t nz )55 SetNoVoxel( unsigned int nx, unsigned int ny, unsigned int nz ) 56 56 { 57 57 fnX = nx; … … 80 80 G4int copyNo = ix + fnX*iy + fnX*fnY*iz; 81 81 82 size_t matIndex = GetMaterialIndex(copyNo);82 unsigned int matIndex = GetMaterialIndex(copyNo); 83 83 84 84 return fMaterials[ matIndex ]; … … 86 86 87 87 //------------------------------------------------------------------ 88 size_t DicomNestedPhantomParameterisation::89 GetMaterialIndex( size_t copyNo ) const88 unsigned int DicomNestedPhantomParameterisation:: 89 GetMaterialIndex( unsigned int copyNo ) const 90 90 { 91 91 return *(fMaterialIndices+copyNo); -
trunk/examples/extended/medical/DICOM/src/DicomPatientZSliceHeader.cc
r807 r1337 148 148 G4Exception(""); 149 149 } 150 for( size_t ii = 0; ii < fMaterialNames.size(); ii++ ) {150 for( unsigned int ii = 0; ii < fMaterialNames.size(); ii++ ) { 151 151 if( fMaterialNames[ii] != fMaterialNames2[ii] ) { 152 152 G4cerr << "DicomPatientZSliceHeader error adding two slice headers: !!! Different material number " << ii << " : " << fMaterialNames[ii] << " =? " << fMaterialNames2[ii] << G4endl; -
trunk/examples/extended/medical/DICOM/src/DicomPhantomParameterisationColour.cc
r807 r1337 77 77 if( physVol ) { 78 78 G4String mateName = mate->GetName(); 79 size_t iuu = mateName.find("__");79 unsigned int iuu = mateName.find("__"); 80 80 if( iuu != std::string::npos ) { 81 81 mateName = mateName.substr( 0, iuu ); -
trunk/examples/extended/medical/DICOM/src/DicomPhysicsList.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // The code was written by : 27 // *Louis Archambault louis.archambault@phy.ulaval.ca, 28 // *Luc Beaulieu beaulieu@phy.ulaval.ca 29 // +Vincent Hubert-Tremblay at tigre.2@sympatico.ca 30 // 31 // 32 // *Centre Hospitalier Universitaire de Quebec (CHUQ), 33 // Hotel-Dieu de Quebec, departement de Radio-oncologie 34 // 11 cote du palais. Quebec, QC, Canada, G1R 2J6 35 // tel (418) 525-4444 #6720 36 // fax (418) 691 5268 37 // 38 // + Université Laval, Québec (QC) Canada 39 // 40 // History: 30.11.07 P.Arce default cut changed to 1 mm 41 //******************************************************* 42 43 #include "DicomPhysicsList.hh" 26 // ------------------------------------------------------------------- 27 // $Id: DicomPhysicsList.cc,v 1.11 2009/10/26 11:20:49 chauvie Exp $ 28 // ------------------------------------------------------------------- 44 29 45 30 #include "G4ParticleDefinition.hh" 46 #include "G4ParticleWithCuts.hh"47 31 #include "G4ProcessManager.hh" 48 32 #include "G4ParticleTypes.hh" 49 #include "G4ParticleTable.hh" 50 #include "G4Material.hh" 51 #include "G4UnitsTable.hh" 52 #include "G4ios.hh" 33 #include "G4StepLimiter.hh" 34 #include "G4BaryonConstructor.hh" 35 #include "G4IonConstructor.hh" 36 #include "G4MesonConstructor.hh" 37 38 #include "DicomPhysicsList.hh" 39 40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 53 41 54 42 DicomPhysicsList::DicomPhysicsList(): G4VUserPhysicsList() 55 43 { 56 defaultCutValue = 1.*mm;57 cutForGamma = 1.*mm;44 defaultCutValue = 0.01*micrometer; 45 cutForGamma = defaultCutValue; 58 46 cutForElectron = defaultCutValue; 59 47 cutForPositron = defaultCutValue; 60 61 SetVerboseLevel(0); 62 } 48 SetVerboseLevel(1); 49 } 50 51 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 63 52 64 53 DicomPhysicsList::~DicomPhysicsList() 65 54 {} 66 55 56 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 57 67 58 void DicomPhysicsList::ConstructParticle() 68 59 { 69 // In this method, static member functions should be called70 // for all particles which you want to use.71 // This ensures that objects of these particle types will be72 // created in the program.73 74 60 ConstructBosons(); 75 61 ConstructLeptons(); 76 } 62 ConstructBaryons(); 63 } 64 65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 77 66 78 67 void DicomPhysicsList::ConstructBosons() 79 { 68 { 80 69 // gamma 81 70 G4Gamma::GammaDefinition(); 82 71 83 } 72 // optical photon 73 G4OpticalPhoton::OpticalPhotonDefinition(); 74 } 75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 84 76 85 77 void DicomPhysicsList::ConstructLeptons() … … 90 82 } 91 83 84 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 85 86 void DicomPhysicsList::ConstructBaryons() 87 { 88 // baryons 89 G4BaryonConstructor bConstructor; 90 bConstructor.ConstructParticle(); 91 92 G4IonConstructor iConstructor; 93 iConstructor.ConstructParticle(); 94 95 G4MesonConstructor mConstructor; 96 mConstructor.ConstructParticle(); 97 } 98 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 100 92 101 void DicomPhysicsList::ConstructProcess() 93 102 { 94 103 AddTransportation(); 95 104 ConstructEM(); 96 } 97 98 #include "G4MultipleScattering.hh" 105 ConstructHad(); 106 ConstructGeneral(); 107 } 108 109 // *** Processes and models 110 99 111 // gamma 100 #include "G4LowEnergyRayleigh.hh" 101 #include "G4LowEnergyPhotoElectric.hh" 102 #include "G4LowEnergyCompton.hh" 103 #include "G4LowEnergyGammaConversion.hh" 112 113 #include "G4PhotoElectricEffect.hh" 114 #include "G4LivermorePhotoElectricModel.hh" 115 116 #include "G4ComptonScattering.hh" 117 #include "G4LivermoreComptonModel.hh" 118 119 #include "G4GammaConversion.hh" 120 #include "G4LivermoreGammaConversionModel.hh" 121 122 #include "G4RayleighScattering.hh" 123 #include "G4LivermoreRayleighModel.hh" 124 104 125 // e- 105 #include "G4LowEnergyIonisation.hh" 106 #include "G4LowEnergyBremsstrahlung.hh" 126 127 #include "G4eMultipleScattering.hh" 128 #include "G4UniversalFluctuation.hh" 129 130 #include "G4eIonisation.hh" 131 #include "G4LivermoreIonisationModel.hh" 132 133 #include "G4eBremsstrahlung.hh" 134 #include "G4LivermoreBremsstrahlungModel.hh" 135 107 136 // e+ 108 #include "G4eIonisation.hh" 109 #include "G4eBremsstrahlung.hh" 137 110 138 #include "G4eplusAnnihilation.hh" 111 139 140 // mu 141 142 #include "G4MuIonisation.hh" 143 #include "G4MuBremsstrahlung.hh" 144 #include "G4MuPairProduction.hh" 145 146 // hadrons 147 148 #include "G4hMultipleScattering.hh" 149 #include "G4MscStepLimitType.hh" 150 151 #include "G4hBremsstrahlung.hh" 152 #include "G4hPairProduction.hh" 153 154 #include "G4hIonisation.hh" 155 #include "G4ionIonisation.hh" 156 #include "G4IonParametrisedLossModel.hh" 157 158 // 159 160 #include "G4LossTableManager.hh" 161 #include "G4EmProcessOptions.hh" 162 163 164 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 165 112 166 void DicomPhysicsList::ConstructEM() 113 167 { 168 theParticleIterator->reset(); 169 170 while( (*theParticleIterator)() ){ 171 172 G4ParticleDefinition* particle = theParticleIterator->value(); 173 G4ProcessManager* pmanager = particle->GetProcessManager(); 174 G4String particleName = particle->GetParticleName(); 175 176 if (particleName == "gamma") { 177 178 179 G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect(); 180 G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel = new G4LivermorePhotoElectricModel(); 181 thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel); 182 pmanager->AddDiscreteProcess(thePhotoElectricEffect); 183 184 G4ComptonScattering* theComptonScattering = new G4ComptonScattering(); 185 G4LivermoreComptonModel* theLivermoreComptonModel = new G4LivermoreComptonModel(); 186 theComptonScattering->AddEmModel(0, theLivermoreComptonModel); 187 pmanager->AddDiscreteProcess(theComptonScattering); 188 189 G4GammaConversion* theGammaConversion = new G4GammaConversion(); 190 G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel = new G4LivermoreGammaConversionModel(); 191 theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel); 192 pmanager->AddDiscreteProcess(theGammaConversion); 193 194 G4RayleighScattering* theRayleigh = new G4RayleighScattering(); 195 G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel(); 196 theRayleigh->AddEmModel(0, theRayleighModel); 197 pmanager->AddDiscreteProcess(theRayleigh); 198 199 pmanager->AddProcess(new G4StepLimiter(), -1, -1, 5); 200 201 } else if (particleName == "e-") { 202 203 G4eMultipleScattering* msc = new G4eMultipleScattering(); 204 msc->SetStepLimitType(fUseDistanceToBoundary); 205 pmanager->AddProcess(msc, -1, 1, 1); 206 207 // Ionisation 208 G4eIonisation* eIoni = new G4eIonisation(); 209 eIoni->AddEmModel(0, new G4LivermoreIonisationModel(), new G4UniversalFluctuation() ); 210 eIoni->SetStepFunction(0.2, 100*um); // 211 pmanager->AddProcess(eIoni, -1, 2, 2); 212 213 // Bremsstrahlung 214 G4eBremsstrahlung* eBrem = new G4eBremsstrahlung(); 215 eBrem->AddEmModel(0, new G4LivermoreBremsstrahlungModel()); 216 pmanager->AddProcess(eBrem, -1,-3, 3); 217 218 pmanager->AddProcess(new G4StepLimiter(), -1, -1, 4); 219 220 } else if (particleName == "e+") { 221 222 // Identical to G4EmStandardPhysics_option3 223 224 G4eMultipleScattering* msc = new G4eMultipleScattering(); 225 msc->SetStepLimitType(fUseDistanceToBoundary); 226 pmanager->AddProcess(msc, -1, 1, 1); 227 228 G4eIonisation* eIoni = new G4eIonisation(); 229 eIoni->SetStepFunction(0.2, 100*um); 230 pmanager->AddProcess(eIoni, -1, 2, 2); 231 232 pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3); 233 234 pmanager->AddProcess(new G4eplusAnnihilation,0,-1, 4); 235 236 pmanager->AddProcess(new G4StepLimiter(), -1, -1, 5); 237 238 } else if (particleName == "GenericIon") { 239 240 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 241 242 G4ionIonisation* ionIoni = new G4ionIonisation(); 243 ionIoni->SetEmModel(new G4IonParametrisedLossModel()); 244 ionIoni->SetStepFunction(0.1, 20*um); 245 pmanager->AddProcess(ionIoni, -1, 2, 2); 246 247 pmanager->AddProcess(new G4StepLimiter(), -1, -1, 3); 248 249 } else if (particleName == "alpha" || 250 particleName == "He3" ) { 251 252 // Identical to G4EmStandardPhysics_option3 253 254 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 255 256 G4ionIonisation* ionIoni = new G4ionIonisation(); 257 ionIoni->SetStepFunction(0.1, 20*um); 258 pmanager->AddProcess(ionIoni, -1, 2, 2); 259 260 pmanager->AddProcess(new G4StepLimiter(), -1, -1, 3); 261 } 262 263 // 264 265 } 266 } 267 268 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 269 270 #include "G4HadronElasticProcess.hh" 271 #include "G4LElastic.hh" 272 273 #include "G4AlphaInelasticProcess.hh" 274 #include "G4BinaryLightIonReaction.hh" 275 #include "G4TripathiCrossSection.hh" 276 #include "G4IonsShenCrossSection.hh" 277 #include "G4LEAlphaInelastic.hh" 278 279 void DicomPhysicsList::ConstructHad() 280 { 281 282 G4HadronElasticProcess * theElasticProcess = new G4HadronElasticProcess; 283 theElasticProcess->RegisterMe( new G4LElastic() ); 284 114 285 theParticleIterator->reset(); 115 286 while( (*theParticleIterator)() ) 116 { 117 G4ParticleDefinition* particle = theParticleIterator->value(); 118 G4ProcessManager* pmanager = particle->GetProcessManager(); 119 G4String particleName = particle->GetParticleName(); 120 121 //processes 122 lowePhot = new G4LowEnergyPhotoElectric("LowEnPhotoElec"); 123 loweIon = new G4LowEnergyIonisation("LowEnergyIoni"); 124 loweBrem = new G4LowEnergyBremsstrahlung("LowEnBrem"); 125 126 if (particleName == "gamma") 127 { 128 //gamma 129 pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh); 130 pmanager->AddDiscreteProcess(lowePhot); 131 pmanager->AddDiscreteProcess(new G4LowEnergyCompton); 132 pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion); 133 134 } 135 else if (particleName == "e-") 136 { 137 //electron 138 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1); 139 pmanager->AddProcess(loweIon, -1, 2,2); 140 pmanager->AddProcess(loweBrem, -1,-1,3); 141 142 } 143 else if (particleName == "e+") 144 { 145 //positron 146 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1); 147 pmanager->AddProcess(new G4eIonisation, -1, 2,2); 148 pmanager->AddProcess(new G4eBremsstrahlung, -1,-1,3); 149 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4); 150 151 } 152 } 153 } 154 #include "G4Decay.hh" 287 { 288 G4ParticleDefinition* particle = theParticleIterator->value(); 289 G4ProcessManager* pManager = particle->GetProcessManager(); 290 291 if (particle->GetParticleName() == "alpha") 292 { 293 294 // INELASTIC SCATTERING 295 // Binary Cascade 296 G4BinaryLightIonReaction* theBC = new G4BinaryLightIonReaction(); 297 theBC -> SetMinEnergy(80.*MeV); 298 theBC -> SetMaxEnergy(40.*GeV); 299 300 // TRIPATHI CROSS SECTION 301 // Implementation of formulas in analogy to NASA technical paper 3621 by 302 // Tripathi, et al. Cross-sections for ion ion scattering 303 G4TripathiCrossSection* TripathiCrossSection = new G4TripathiCrossSection; 304 305 // IONS SHEN CROSS SECTION 306 // Implementation of formulas 307 // Shen et al. Nuc. Phys. A 491 130 (1989) 308 // Total Reaction Cross Section for Heavy-Ion Collisions 309 G4IonsShenCrossSection* aShen = new G4IonsShenCrossSection; 310 311 // Final state production model for Alpha inelastic scattering below 20 GeV 312 G4LEAlphaInelastic* theAIModel = new G4LEAlphaInelastic; 313 theAIModel -> SetMaxEnergy(100.*MeV); 314 315 G4AlphaInelasticProcess * theIPalpha = new G4AlphaInelasticProcess; 316 theIPalpha->AddDataSet(TripathiCrossSection); 317 theIPalpha->AddDataSet(aShen); 318 319 // Register the Alpha Inelastic and Binary Cascade Model 320 theIPalpha->RegisterMe(theAIModel); 321 theIPalpha->RegisterMe(theBC); 322 323 // Activate the alpha inelastic scattering using the alpha inelastic and binary cascade model 324 pManager -> AddDiscreteProcess(theIPalpha); 325 326 // Activate the Hadron Elastic Process 327 pManager -> AddDiscreteProcess(theElasticProcess); 328 329 } 330 } 331 332 } 333 334 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 335 155 336 void DicomPhysicsList::ConstructGeneral() 156 { 157 // Add Decay Process 158 G4Decay* theDecayProcess = new G4Decay(); 159 theParticleIterator->reset(); 160 while( (*theParticleIterator)() ) 161 { 162 G4ParticleDefinition* particle = theParticleIterator->value(); 163 G4ProcessManager* pmanager = particle->GetProcessManager(); 164 if (theDecayProcess->IsApplicable(*particle)) 165 { 166 pmanager ->AddProcess(theDecayProcess); 167 // set ordering for PostStepDoIt and AtRestDoIt 168 pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep); 169 pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest); 170 } 171 } 172 } 337 { } 338 339 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 173 340 174 341 void DicomPhysicsList::SetCuts() 175 342 { 176 if (verboseLevel >0) 177 { 178 G4cout << "DicomPhysicsList::SetCuts:"; 179 G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl; 180 } 181 343 if (verboseLevel >0){ 344 G4cout << "DicomPhysicsList::SetCuts:"; 345 G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl; 346 } 347 182 348 // set cut values for gamma at first and for e- second and next for e+, 183 // because some processes for e+/e- need cut values for gamma 349 // because some processes for e+/e- need cut values for gamma 184 350 SetCutValue(cutForGamma, "gamma"); 185 351 SetCutValue(cutForElectron, "e-"); 186 352 SetCutValue(cutForPositron, "e+"); 187 188 189 if (verboseLevel>0) 190 DumpCutValuesTable(); 191 } 192 193 void DicomPhysicsList::SetGammaCut(G4double val) 194 { 195 ResetCuts(); 196 cutForGamma = val; 197 } 198 199 void DicomPhysicsList::SetElectronCut(G4double val) 200 { 201 // ResetCuts(); 202 cutForElectron = val; 203 } 204 205 void DicomPhysicsList::SetPositronCut(G4double val) 206 { 207 // ResetCuts(); 208 cutForPositron = val; 209 } 210 353 354 if (verboseLevel>0) DumpCutValuesTable(); 355 356 } 357 -
trunk/examples/extended/medical/DICOM/src/DicomPrimaryGeneratorAction.cc
r1230 r1337 74 74 particleGun->SetParticleEnergy(5.*MeV); 75 75 //put it at SAD = 1 m on xy plane of central slice 76 particleGun->SetParticlePosition(G4ThreeVector(0.,-99.9*cm, -27.));76 particleGun->SetParticlePosition(G4ThreeVector(0.,-99.9*cm,87.5*mm)); 77 77 //particleGun->SetParticlePosition(G4ThreeVector(0.,0.,-22.)); 78 78 particleGun->GeneratePrimaryVertex(anEvent); -
trunk/examples/extended/medical/DICOM/vis.mac
r1230 r1337 1 /control/verbose 21 surface/control/verbose 2 2 2 /run/verbose 2 3 #visualisation 4 /vis/scene/create 5 /vis/open OGLIX 3 # 4 # Use this open statement to create an OpenGL view: 5 #/vis/open OGL 600x600-0+0 6 # 7 # Use this open statement to create a .prim file suitable for 8 # viewing in DAWN: 6 9 #/vis/open DAWNFILE 10 # 11 # Use this open statement to create a .heprep file suitable for 12 # viewing in HepRApp: 13 #/vis/open HepRepFile 14 # 15 # Use this open statement to create a .wrl file suitable for 16 # viewing in a VRML viewer: 7 17 /vis/open VRML2FILE 8 /vis/viewer/update 9 /vis/viewer/zoom 5 10 /tracking/storeTrajectory 1 11 /vis/scene/endOfEventAction accumulate 18 # 19 # Disable auto refresh and quieten vis messages whilst scene and 20 # trajectories are established: 21 /vis/viewer/set/autoRefresh false 22 /vis/verbose errors 23 # 24 # Draw geometry: 25 /vis/drawVolume 26 # 27 # Specify view angle: 28 #/vis/viewer/set/viewpointThetaPhi 90. 0. 29 # 30 # Specify zoom value: 31 /vis/viewer/zoom 5. 32 # 33 # Specify style (surface or wireframe): 34 #/vis/viewer/set/style wireframe 35 # 36 # Draw coordinate axes: 37 #/vis/scene/add/axes 0 0 0 1 m 38 # 39 # Draw smooth trajectories at end of event, showing trajectory points 40 # as markers 2 pixels wide: 41 /vis/scene/add/trajectories smooth 42 /vis/modeling/trajectories/create/drawByCharge 43 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 44 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2 45 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 46 # 47 # Draw hits at end of event: 48 #/vis/scene/add/hits 49 # 50 # To draw only gammas: 51 #/vis/filtering/trajectories/create/particleFilter 52 #/vis/filtering/trajectories/particleFilter-0/add gamma 53 # 54 # To invert the above, drawing all particles except gammas, 55 # keep the above two lines but also add: 56 #/vis/filtering/trajectories/particleFilter-0/invert true 57 # 58 # Many other options are available with /vis/modeling and /vis/filtering. 59 # For example, to select colour by particle ID: 60 #/vis/modeling/trajectories/create/drawByParticleID 61 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue 62 # 63 # To superimpose all of the events from a given run: 64 /vis/scene/endOfEventAction accumulate 10 65 # 66 # Re-establish auto refreshing and verbosity: 67 /vis/viewer/set/autoRefresh true 68 /vis/verbose warnings 69 # 70 # For file-based drivers, use this to create an empty detector view: 71 #/vis/viewer/flush 72 # 12 73 /tracking/verbose 1 13 74 /run/beamOn 10 14 /vis/viewer/update15 75 -
trunk/examples/extended/medical/GammaTherapy/GNUmakefile
r1230 r1337 1 # $Id: GNUmakefile,v 1. 3 2008/06/11 15:17:57 vnivanchExp $1 # $Id: GNUmakefile,v 1.4 2010/01/11 16:43:05 gcosmo Exp $ 2 2 # -------------------------------------------------------------- 3 3 # GNUmakefile for examples module. Gabriele Cosmo, 06/04/98. … … 9 9 10 10 ifndef G4INSTALL 11 G4INSTALL = ../ geant411 G4INSTALL = ../../../.. 12 12 endif 13 13 -
trunk/examples/extended/medical/GammaTherapy/GammaTherapy.cc
r807 r1337 91 91 if (argc==1) // Define UI terminal for interactive mode 92 92 { 93 visManager = new G4VisExecutive( );93 visManager = new G4VisExecutive("Quiet"); 94 94 visManager->Initialize(); 95 95 G4UIsession * session; -
trunk/examples/extended/medical/GammaTherapy/GammaTherapy.in
r807 r1337 13 13 /testem/phys/addPhysics emstandard 14 14 #/testem/phys/addPhysics emstandard_opt2 15 #/testem/phys/addPhysics penelope16 #/testem/phys/addPhysics livermore15 #/testem/phys/addPhysics empenelope 16 #/testem/phys/addPhysics emlivermore 17 17 #/testem/phys/addPhysics step_limit 18 18 # -
trunk/examples/extended/medical/GammaTherapy/GammaTherapy.out
r807 r1337 1 2 ############################################ 3 !!! WARNING - FPE detection is activated !!! 4 ############################################ 1 5 2 6 ************************************************************* 3 Geant4 version Name: g lobal-V09-00-03 (9-May-2008)7 Geant4 version Name: geant4-09-03-ref-06 (25-June-2010) 4 8 Copyright : Geant4 Collaboration 5 9 Reference : NIM A 506 (2003), 250-303 … … 10 14 ***** Table : Nb of materials = 6 ***** 11 15 12 Material: G4_Be density: 1.848 g/cm3 RadL: 35.276 cm Imean: 63.700 eV16 Material: G4_Be density: 1.848 g/cm3 RadL: 35.276 cm Nucl.Int.Length: 39.449 cm Imean: 63.700 eV 13 17 ---> Element: Be (Be) Z = 4.0 N = 9.0 A = 9.01 g/mole 14 ---> Isotope: BeZ = 4 N = 9 A = 9.01 g/mole abundance: 100.00 % ElmMassFraction: 100.00 % ElmAbundance 100.00 %15 16 Material: G4_W density: 19.300 g/cm3 RadL: 3.504 mm Imean: 727.000 eV18 ---> Isotope: Be9 Z = 4 N = 9 A = 9.01 g/mole abundance: 100.00 % ElmMassFraction: 100.00 % ElmAbundance 100.00 % 19 20 Material: G4_W density: 19.300 g/cm3 RadL: 3.504 mm Nucl.Int.Length: 10.310 cm Imean: 727.000 eV 17 21 ---> Element: W (W) Z = 74.0 N = 183.9 A = 183.84 g/mole 18 ---> Isotope: WZ = 74 N = 180 A = 179.95 g/mole abundance: 0.12 %19 ---> Isotope: WZ = 74 N = 182 A = 181.95 g/mole abundance: 26.50 %20 ---> Isotope: WZ = 74 N = 183 A = 182.95 g/mole abundance: 14.31 %21 ---> Isotope: WZ = 74 N = 184 A = 183.95 g/mole abundance: 30.64 %22 ---> Isotope: WZ = 74 N = 186 A = 185.95 g/mole abundance: 28.43 % ElmMassFraction: 100.00 % ElmAbundance 100.00 %23 24 Material: G4_He density: 0.166 mg/cm3 RadL: 5.671km Imean: 41.800 eV temperature: 273.15 K pressure: 1.00 atm22 ---> Isotope: W180 Z = 74 N = 180 A = 179.95 g/mole abundance: 0.12 % 23 ---> Isotope: W182 Z = 74 N = 182 A = 181.95 g/mole abundance: 26.50 % 24 ---> Isotope: W183 Z = 74 N = 183 A = 182.95 g/mole abundance: 14.31 % 25 ---> Isotope: W184 Z = 74 N = 184 A = 183.95 g/mole abundance: 30.64 % 26 ---> Isotope: W186 Z = 74 N = 186 A = 185.95 g/mole abundance: 28.43 % ElmMassFraction: 100.00 % ElmAbundance 100.00 % 27 28 Material: G4_He density: 0.166 kg/m3 RadL: 5.671 km Nucl.Int.Length: 3.343 km Imean: 41.800 eV temperature: 273.15 K pressure: 1.00 atm 25 29 ---> Element: He (He) Z = 2.0 N = 4.0 A = 4.00 g/mole 26 ---> Isotope: HeZ = 2 N = 3 A = 3.02 g/mole abundance: 0.00 %27 ---> Isotope: HeZ = 2 N = 4 A = 4.00 g/mole abundance: 100.00 % ElmMassFraction: 100.00 % ElmAbundance 100.00 %28 29 Material: G4_WATER H_2O density: 1.000 g/cm3 RadL: 36.083 cm Imean: 75.000 eV30 ---> Isotope: He3 Z = 2 N = 3 A = 3.02 g/mole abundance: 0.00 % 31 ---> Isotope: He4 Z = 2 N = 4 A = 4.00 g/mole abundance: 100.00 % ElmMassFraction: 100.00 % ElmAbundance 100.00 % 32 33 Material: G4_WATER H_2O density: 1.000 g/cm3 RadL: 36.083 cm Nucl.Int.Length: 75.505 cm Imean: 78.000 eV 30 34 ---> Element: H (H) Z = 1.0 N = 1.0 A = 1.01 g/mole 31 ---> Isotope: HZ = 1 N = 1 A = 1.01 g/mole abundance: 99.99 %32 ---> Isotope: HZ = 1 N = 2 A = 2.01 g/mole abundance: 0.01 % ElmMassFraction: 11.19 % ElmAbundance 66.67 %35 ---> Isotope: H1 Z = 1 N = 1 A = 1.01 g/mole abundance: 99.99 % 36 ---> Isotope: H2 Z = 1 N = 2 A = 2.01 g/mole abundance: 0.01 % ElmMassFraction: 11.19 % ElmAbundance 66.67 % 33 37 ---> Element: O (O) Z = 8.0 N = 16.0 A = 16.00 g/mole 34 ---> Isotope: OZ = 8 N = 16 A = 15.99 g/mole abundance: 99.76 %35 ---> Isotope: OZ = 8 N = 17 A = 17.00 g/mole abundance: 0.04 %36 ---> Isotope: OZ = 8 N = 18 A = 18.00 g/mole abundance: 0.20 % ElmMassFraction: 88.81 % ElmAbundance 33.33 %37 38 Material: G4_AIR density: 1.205 mg/cm3 RadL: 303.921 m Imean: 85.700 eV temperature: 273.15 K pressure: 1.00 atm38 ---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.76 % 39 ---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.04 % 40 ---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.20 % ElmMassFraction: 88.81 % ElmAbundance 33.33 % 41 42 Material: G4_AIR density: 1.205 mg/cm3 RadL: 303.921 m Nucl.Int.Length: 710.137 m Imean: 85.700 eV temperature: 273.15 K pressure: 1.00 atm 39 43 ---> Element: C (C) Z = 6.0 N = 12.0 A = 12.01 g/mole 40 ---> Isotope: CZ = 6 N = 12 A = 12.00 g/mole abundance: 98.93 %41 ---> Isotope: CZ = 6 N = 13 A = 13.00 g/mole abundance: 1.07 % ElmMassFraction: 0.01 % ElmAbundance 0.02 %44 ---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.93 % 45 ---> Isotope: C13 Z = 6 N = 13 A = 13.00 g/mole abundance: 1.07 % ElmMassFraction: 0.01 % ElmAbundance 0.02 % 42 46 ---> Element: N (N) Z = 7.0 N = 14.0 A = 14.01 g/mole 43 ---> Isotope: NZ = 7 N = 14 A = 14.00 g/mole abundance: 99.63 %44 ---> Isotope: NZ = 7 N = 15 A = 15.00 g/mole abundance: 0.37 % ElmMassFraction: 75.53 % ElmAbundance 78.44 %47 ---> Isotope: N14 Z = 7 N = 14 A = 14.00 g/mole abundance: 99.63 % 48 ---> Isotope: N15 Z = 7 N = 15 A = 15.00 g/mole abundance: 0.37 % ElmMassFraction: 75.53 % ElmAbundance 78.44 % 45 49 ---> Element: O (O) Z = 8.0 N = 16.0 A = 16.00 g/mole 46 ---> Isotope: OZ = 8 N = 16 A = 15.99 g/mole abundance: 99.76 %47 ---> Isotope: OZ = 8 N = 17 A = 17.00 g/mole abundance: 0.04 %48 ---> Isotope: OZ = 8 N = 18 A = 18.00 g/mole abundance: 0.20 % ElmMassFraction: 23.18 % ElmAbundance 21.07 %50 ---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.76 % 51 ---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.04 % 52 ---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.20 % ElmMassFraction: 23.18 % ElmAbundance 21.07 % 49 53 ---> Element: Ar (Ar) Z = 18.0 N = 40.0 A = 39.95 g/mole 50 ---> Isotope: ArZ = 18 N = 36 A = 35.97 g/mole abundance: 0.34 %51 ---> Isotope: ArZ = 18 N = 38 A = 37.96 g/mole abundance: 0.06 %52 ---> Isotope: ArZ = 18 N = 40 A = 39.96 g/mole abundance: 99.60 % ElmMassFraction: 1.28 % ElmAbundance 0.47 %53 54 Material: G4_MYLAR density: 1.400 g/cm3 RadL: 28.536 cm Imean: 78.700 eV54 ---> Isotope: Ar36 Z = 18 N = 36 A = 35.97 g/mole abundance: 0.34 % 55 ---> Isotope: Ar38 Z = 18 N = 38 A = 37.96 g/mole abundance: 0.06 % 56 ---> Isotope: Ar40 Z = 18 N = 40 A = 39.96 g/mole abundance: 99.60 % ElmMassFraction: 1.28 % ElmAbundance 0.47 % 57 58 Material: G4_MYLAR density: 1.400 g/cm3 RadL: 28.536 cm Nucl.Int.Length: 55.961 cm Imean: 78.700 eV 55 59 ---> Element: H (H) Z = 1.0 N = 1.0 A = 1.01 g/mole 56 ---> Isotope: HZ = 1 N = 1 A = 1.01 g/mole abundance: 99.99 %57 ---> Isotope: HZ = 1 N = 2 A = 2.01 g/mole abundance: 0.01 % ElmMassFraction: 4.20 % ElmAbundance 36.36 %60 ---> Isotope: H1 Z = 1 N = 1 A = 1.01 g/mole abundance: 99.99 % 61 ---> Isotope: H2 Z = 1 N = 2 A = 2.01 g/mole abundance: 0.01 % ElmMassFraction: 4.20 % ElmAbundance 36.36 % 58 62 ---> Element: C (C) Z = 6.0 N = 12.0 A = 12.01 g/mole 59 ---> Isotope: CZ = 6 N = 12 A = 12.00 g/mole abundance: 98.93 %60 ---> Isotope: CZ = 6 N = 13 A = 13.00 g/mole abundance: 1.07 % ElmMassFraction: 62.50 % ElmAbundance 45.46 %63 ---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.93 % 64 ---> Isotope: C13 Z = 6 N = 13 A = 13.00 g/mole abundance: 1.07 % ElmMassFraction: 62.50 % ElmAbundance 45.46 % 61 65 ---> Element: O (O) Z = 8.0 N = 16.0 A = 16.00 g/mole 62 ---> Isotope: OZ = 8 N = 16 A = 15.99 g/mole abundance: 99.76 %63 ---> Isotope: OZ = 8 N = 17 A = 17.00 g/mole abundance: 0.04 %64 ---> Isotope: OZ = 8 N = 18 A = 18.00 g/mole abundance: 0.20 % ElmMassFraction: 33.30 % ElmAbundance 18.18 %66 ---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.76 % 67 ---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.04 % 68 ---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.20 % ElmMassFraction: 33.30 % ElmAbundance 18.18 % 65 69 66 70 … … 78 82 ### PhysicsList Add Physics <emstandard> emBuilderIsRegisted= 0 79 83 PhysicsList::AddPhysicsList <emstandard> 80 #/testem/phys/addPhysics emstandard_opt281 #/testem/phys/addPhysics penelope82 #/testem/phys/addPhysics livermore83 #/testem/phys/addPhysics step_limit84 #/testem/phys/addPhysics emstandard_opt2 85 #/testem/phys/addPhysics empenelope 86 #/testem/phys/addPhysics emlivermore 87 #/testem/phys/addPhysics step_limit 84 88 # 85 89 /testem/target1Material G4_Be … … 90 94 /testem/target2Z 6 mm 91 95 # 92 #/testem/histoName be_w_st.paw93 # 94 #/testem/stepMax 1.0mm96 #/testem/histoName be_w_st.paw 97 # 98 #/testem/stepMax 1.0 mm 95 99 # 96 100 /gun/particle e- … … 126 130 Index : 0 used in the geometry : Yes recalculation needed : No 127 131 Material : G4_AIR 128 Range cuts : gamma 100 um e- 100 um e+ 100 um129 Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV132 Range cuts : gamma 100 um e- 100 um e+ 100 um proton 0 fm 133 Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 0 eV 130 134 Region(s) which use this couple : 131 135 DefaultRegionForTheWorld … … 133 137 Index : 1 used in the geometry : Yes recalculation needed : No 134 138 Material : G4_Be 135 Range cuts : gamma 100 um e- 100 um e+ 100 um136 Energy thresholds : gamma 1.02934 keV e- 107.795 keV e+ 106.476 keV139 Range cuts : gamma 100 um e- 100 um e+ 100 um proton 0 fm 140 Energy thresholds : gamma 1.05172 keV e- 109.289 keV e+ 107.83 keV proton 0 eV 137 141 Region(s) which use this couple : 138 142 DefaultRegionForTheWorld … … 140 144 Index : 2 used in the geometry : Yes recalculation needed : No 141 145 Material : G4_He 142 Range cuts : gamma 100 um e- 100 um e+ 100 um143 Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV146 Range cuts : gamma 100 um e- 100 um e+ 100 um proton 0 fm 147 Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 0 eV 144 148 Region(s) which use this couple : 145 149 DefaultRegionForTheWorld … … 147 151 Index : 3 used in the geometry : Yes recalculation needed : No 148 152 Material : G4_W 149 Range cuts : gamma 100 um e- 100 um e+ 100 um150 Energy thresholds : gamma 36.0479 keV e- 351.438 keV e+ 334.551 keV153 Range cuts : gamma 100 um e- 100 um e+ 100 um proton 0 fm 154 Energy thresholds : gamma 36.0599 keV e- 351.877 keV e+ 337.972 keV proton 0 eV 151 155 Region(s) which use this couple : 152 156 DefaultRegionForTheWorld … … 154 158 Index : 4 used in the geometry : Yes recalculation needed : No 155 159 Material : G4_MYLAR 156 Range cuts : gamma 100 um e- 100 um e+ 100 um157 Energy thresholds : gamma 1.19365 keV e- 98.2879 keV e+ 96.4896 keV160 Range cuts : gamma 100 um e- 100 um e+ 100 um proton 0 fm 161 Energy thresholds : gamma 1.21113 keV e- 99.4755 keV e+ 98.1475 keV proton 0 eV 158 162 Region(s) which use this couple : 159 163 DefaultRegionForTheWorld … … 161 165 Index : 5 used in the geometry : Yes recalculation needed : No 162 166 Material : G4_WATER 163 Range cuts : gamma 100 um e- 100 um e+ 100 um164 Energy thresholds : gamma 1.09571 keV e- 84.2696 keV e+ 83.2385 keV167 Range cuts : gamma 100 um e- 100 um e+ 100 um proton 0 fm 168 Energy thresholds : gamma 1.10981 keV e- 84.6589 keV e+ 83.5287 keV proton 0 eV 165 169 Region(s) which use this couple : 166 170 DefaultRegionForTheWorld … … 178 182 Run Summary 179 183 Number of events processed : 10000 180 User= 14.88s Real=14.89s Sys=0.01s184 User=8.44s Real=10.22s Sys=0s 181 185 RunAction: End of run actions are started 182 186 Histo: End of run actions are started 183 187 ======================================================== 184 188 Number of events 10000 185 Average number of e- 12.2 6186 Average number of gamma 21. 05187 Average number of e+ 0.7 483189 Average number of e- 12.24 190 Average number of gamma 21.28 191 Average number of e+ 0.7963 188 192 Average number of neutrons 0 189 Average number of steps in absorber 3 3.78190 Average number of e- steps in target 18. 76191 Average number of g produced in the target 20. 18192 Average number of e- produced in the target 7. 089193 Average number of g produced in the phantom 0.5 544194 Average number of e- produced in the phantom 2. 927195 Total gamma fluence in front of phantom 9.022MeV193 Average number of steps in absorber 31.91 194 Average number of e- steps in target 18.67 195 Average number of g produced in the target 20.44 196 Average number of e- produced in the target 7.238 197 Average number of g produced in the phantom 0.5203 198 Average number of e- produced in the phantom 2.795 199 Total gamma fluence in front of phantom 8.671 MeV 196 200 ======================================================== 197 201 198 202 199 203 G4 kernel has come to Quit state. 204 -
trunk/examples/extended/medical/GammaTherapy/History
r807 r1337 1 $Id: History,v 1.2 5 2007/07/04 11:14:33 vnivanchExp $1 $Id: History,v 1.29 2010/06/07 05:40:46 perl Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Reverse chronological order (last date on top), please * 16 16 ---------------------------------------------------------- 17 18 06-06-10 J.Perl (gtherapy-V09-03-01) 19 - Remove unused variable in EventAction 20 21 04-06-10 J.Perl (gtherapy-V09-03-00) 22 - Updated vis usage 23 24 21-11-09 V.Ivant (gtherapy-V09-02-00) 25 - update EM physics according to 9.3 26 27 11-06-08 V.Ivant (gtherapy-V09-01-00) 28 - Remove AIDA from GNUmakefile 29 - Added opt3 variant of EM physics 17 30 18 31 04-07-07 V.Ivant (gtherapy-V09-00-00) -
trunk/examples/extended/medical/GammaTherapy/README
r807 r1337 42 42 Cu W target). 43 43 44 Following Physics Lists can be activated via UI commands: 44 Only Physics Lists from physics_list kernal library can be activated. 45 Corresponding UI commands are following 45 46 46 /testem/phys/addPhysics standard47 /testem/phys/addPhysics g4v5248 /testem/phys/addPhysics penelope49 /testem/phys/addPhysics lowenergy47 /testem/phys/addPhysics emstandard 48 /testem/phys/addPhysics emstandard_opt3 49 /testem/phys/addPhysics empenelope 50 /testem/phys/addPhysics emlivermore 50 51 51 52 For interactive mode G4 visualization options and variables should be -
trunk/examples/extended/medical/GammaTherapy/be.in
r807 r1337 11 11 /testem/phys/addPhysics emstandard 12 12 #/testem/phys/addPhysics emstandard_opt2 13 #/testem/phys/addPhysics livermore13 #/testem/phys/addPhysics emlivermore 14 14 #/testem/phys/addPhysics elastic 15 15 #/testem/phys/addPhysics binary -
trunk/examples/extended/medical/GammaTherapy/be_w.in
r807 r1337 13 13 /testem/phys/addPhysics emstandard 14 14 #/testem/phys/addPhysics emstandard_opt2 15 #/testem/phys/addPhysics livermore15 #/testem/phys/addPhysics emlivermore 16 16 #/testem/phys/addPhysics elastic 17 17 #/testem/phys/addPhysics binary … … 31 31 /gun/energy 50.0 MeV 32 32 # 33 /run/initialize34 /run/beamOn 100000033 #/run/initialize 34 #/run/beamOn 1000000 35 35 -
trunk/examples/extended/medical/GammaTherapy/cu_w.in
r807 r1337 13 13 /testem/phys/addPhysics emstandard 14 14 #/testem/phys/addPhysics emstandard_opt2 15 #/testem/phys/addPhysics lowenergy16 15 # 17 16 /testem/target1Material G4_W -
trunk/examples/extended/medical/GammaTherapy/include/EventActionMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: EventActionMessenger.hh,v 1.2 2006/06/29 17:25:54 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterBuilder.hh
r1230 r1337 26 26 // 27 27 // $Id: G4StepLimiterBuilder.hh,v 1.2 2006/06/29 17:26:25 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: G4StepLimiterMessenger.hh,v 1.2 2006/06/29 17:26:28 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterPerRegion.hh
r1230 r1337 25 25 // 26 26 // $Id: G4StepLimiterPerRegion.hh,v 1.4 2007/05/16 16:27:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/GammaTherapy/include/PhysicsList.hh
r1230 r1337 25 25 // 26 26 // $Id: PhysicsList.hh,v 1.6 2006/11/16 14:42:20 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 // Modified: -
trunk/examples/extended/medical/GammaTherapy/include/PhysicsListMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: PhysicsListMessenger.hh,v 1.3 2006/06/29 17:26:41 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/GammaTherapy/src/EventAction.cc
r807 r1337 41 41 42 42 #include "G4UImanager.hh" 43 #include "G4TrajectoryContainer.hh"44 #include "G4Trajectory.hh"45 #include "G4VVisManager.hh"46 43 #include "G4ios.hh" 47 44 … … 118 115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 119 116 120 void EventAction::EndOfEventAction(const G4Event* evt)117 void EventAction::EndOfEventAction(const G4Event*) 121 118 { 122 119 (Histo::GetPointer())->SaveEvent(); 123 G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();124 125 if(pVVisManager) {126 G4TrajectoryContainer* trjc = evt->GetTrajectoryContainer();127 G4int n_trajectories = 0;128 if (trjc) n_trajectories = trjc->entries();129 130 for(G4int i=0; i<n_trajectories; i++) {131 G4Trajectory* t = (G4Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);132 if (drawFlag == "all") t->DrawTrajectory(1000);133 else if ((drawFlag == "charged")&&(t->GetCharge() != 0.))134 t->DrawTrajectory(1000);135 else if ((drawFlag == "neutral")&&(t->GetCharge() == 0.))136 t->DrawTrajectory(1000);137 else if ((drawFlag == "charged+n")&&((t->GetCharge() != 0.)||138 (t->GetCharge()==0.&&t->GetParticleName()=="neutron")))139 t->DrawTrajectory(1000);140 }141 }142 120 143 121 if(verbose > 0) { -
trunk/examples/extended/medical/GammaTherapy/src/EventActionMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: EventActionMessenger.cc,v 1.2 2006/06/29 17:27:19 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterBuilder.cc
r1230 r1337 26 26 // 27 27 // $Id: G4StepLimiterBuilder.cc,v 1.3 2006/06/29 17:27:48 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //--------------------------------------------------------------------------- -
trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: G4StepLimiterMessenger.cc,v 1.2 2006/06/29 17:27:50 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterPerRegion.cc
r1230 r1337 25 25 // 26 26 // $Id: G4StepLimiterPerRegion.cc,v 1.4 2007/05/16 16:27:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/GammaTherapy/src/PhysicsList.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: PhysicsList.cc,v 1.1 6 2008/06/11 15:17:57 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: PhysicsList.cc,v 1.17 2009/11/21 16:47:07 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //--------------------------------------------------------------------------- … … 46 46 #include "PhysicsListMessenger.hh" 47 47 48 #include "ParticlesBuilder.hh"49 48 #include "G4EmStandardPhysics.hh" 50 49 #include "G4EmStandardPhysics_option1.hh" 51 50 #include "G4EmStandardPhysics_option2.hh" 52 51 #include "G4EmStandardPhysics_option3.hh" 53 #include " PhysListEmLivermore.hh"54 #include " PhysListEmPenelope.hh"52 #include "G4EmLivermorePhysics.hh" 53 #include "G4EmPenelopePhysics.hh" 55 54 #include "G4StepLimiterBuilder.hh" 56 55 #include "G4DecayPhysics.hh" … … 60 59 #include "G4EmExtraPhysics.hh" 61 60 #include "G4QStoppingPhysics.hh" 62 //#include "PhysListEmModelPai.hh"63 61 64 62 #include "G4UnitsTable.hh" … … 89 87 90 88 // Add Physics builders 91 RegisterPhysics(new ParticlesBuilder());89 RegisterPhysics(new G4DecayPhysics()); 92 90 } 93 91 … … 156 154 G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl; 157 155 158 } else if (name == "livermore" && !emBuilderIsRegisted) { 159 RegisterPhysics(new PhysListEmLivermore()); 160 emBuilderIsRegisted = true; 161 G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl; 162 163 } else if (name == "penelope" && !emBuilderIsRegisted) { 164 RegisterPhysics(new PhysListEmPenelope()); 165 emBuilderIsRegisted = true; 166 G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl; 167 /* 168 } else if (name == "pai" && !emBuilderIsRegisted) { 169 RegisterPhysics(new PhysListEmModelPai()); 170 emBuilderIsRegisted = true; 171 G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl; 172 */ 173 174 } else if (name == "decay" && !decayIsRegisted && emBuilderIsRegisted) { 175 RegisterPhysics(new G4DecayPhysics()); 176 decayIsRegisted = true; 156 } else if (name == "emlivermore" && !emBuilderIsRegisted) { 157 RegisterPhysics(new G4EmLivermorePhysics()); 158 emBuilderIsRegisted = true; 159 G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl; 160 161 } else if (name == "empenelope" && !emBuilderIsRegisted) { 162 RegisterPhysics(new G4EmPenelopePhysics()); 163 emBuilderIsRegisted = true; 177 164 G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl; 178 165 -
trunk/examples/extended/medical/GammaTherapy/src/PhysicsListMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: PhysicsListMessenger.cc,v 1.3 2006/06/29 17:28:04 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/GammaTherapy/vis.mac
r1230 r1337 27 27 /gun/energy 50.0 MeV 28 28 # 29 # Create empty scene ("world" is default)30 /vis/ scene/create29 # Use this open statement to create an OpenGL view: 30 /vis/open OGL 600x600-0+0 31 31 # 32 # Create a scene handler for a specific graphics system 33 # Edit the next line(s) to choose another graphic system 32 # Use this open statement to create a .prim file suitable for 33 # viewing in DAWN: 34 #/vis/open DAWNFILE 34 35 # 35 ####/vis/open DAWNFILE 36 /vis/open OGLIX 36 # Use this open statement to create a .heprep file suitable for 37 # viewing in HepRApp: 38 #/vis/open HepRepFile 37 39 # 38 # Draw scene 39 /vis/viewer/set/viewpointThetaPhi -90 0 deg 40 # Use this open statement to create a .wrl file suitable for 41 # viewing in a VRML viewer: 42 #/vis/open VRML2FILE 43 # 44 # Disable auto refresh and quieten vis messages whilst scene and 45 # trajectories are established: 46 /vis/viewer/set/autoRefresh false 47 /vis/verbose errors 48 # 49 # Draw geometry: 50 /vis/drawVolume 51 # 52 # Specify view angle: 53 /vis/viewer/set/viewpointThetaPhi -90. 0. 54 # 55 # Specify zoom value: 40 56 /vis/viewer/zoom 1.4 41 /vis/viewer/flush42 57 # 43 # for drawing the tracks 44 # if too many tracks cause core dump => storeTrajectory 0 45 /tracking/storeTrajectory 1 58 # Specify style (surface or wireframe): 59 #/vis/viewer/set/style wireframe 60 # 61 # Draw coordinate axes: 62 #/vis/scene/add/axes 0 0 0 1 m 63 # 64 # Draw smooth trajectories at end of event, showing trajectory points 65 # as markers 2 pixels wide: 66 /vis/scene/add/trajectories smooth 67 /vis/modeling/trajectories/create/drawByCharge 68 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 69 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2 70 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 71 # 72 # Draw hits at end of event: 73 #/vis/scene/add/hits 74 # 75 # To draw only gammas: 76 #/vis/filtering/trajectories/create/particleFilter 77 #/vis/filtering/trajectories/particleFilter-0/add gamma 78 # 79 # To invert the above, drawing all particles except gammas, 80 # keep the above two lines but also add: 81 #/vis/filtering/trajectories/particleFilter-0/invert true 82 # 83 # Many other options are available with /vis/modeling and /vis/filtering. 84 # For example, to select colour by particle ID: 85 #/vis/modeling/trajectories/create/drawByParticleID 86 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue 87 # 88 # To superimpose all of the events from a given run: 46 89 /vis/scene/endOfEventAction accumulate 47 90 # 48 /testem/event/drawTracks all 91 # Re-establish auto refreshing and verbosity: 92 /vis/viewer/set/autoRefresh true 93 /vis/verbose warnings 94 # 95 # For file-based drivers, use this to create an empty detector view: 96 #/vis/viewer/flush -
trunk/examples/extended/medical/fanoCavity/History
r807 r1337 1 $Id: History,v 1. 19 2007/11/13 11:31:53 maireExp $1 $Id: History,v 1.36 2010/06/07 05:40:46 perl Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Reverse chronological order (last date on top), please * 16 16 ---------------------------------------------------------- 17 18 06-06-10 J.Perl (fano-V09-03-03) 19 - Remove unused variable in EventAction 20 21 04-06-10 J.Perl (fano-V09-03-02) 22 - Updated vis usage 23 24 22-05-10 mma (fano-V09-03-01) 25 - fanoCavity.cc : introduction of G4UIExecutive 26 27 19-01-10 mma (fano-V09-03-00) 28 - introduce PhysListEmStandard_option2 : UrbanMscModel93 without options 29 PhysListEmStandard_WVI : WentzelVIModel 30 - put in run01.mac all physics lists choice 31 32 16-11-09 mma (fano-V09-02-03) 33 - PhysListEmStandard_option3 : use UrbanMscModel93 34 35 29-10-09 mma (fano-V09-02-02) 36 - new PhysListEmStandard_GS for GoudsmitSaundersonMsc model 37 38 25-10-09 mma (fano-V09-02-01) 39 - splite PhysicsList in 2, as others TestEm examples. 40 - local copy of PhysListEmStandard_option0, PhysListEmStandard_option3, 41 PhysListEmStandard_SS 42 - PhysicsList: add cut for proton recoil in case of Single Scattering 43 44 30-01-09 mma (fano-V09-02-00) 45 - EndOfRun : error = ratio*std::sqrt(dEoverE*dEoverE + dToverT*dToverT) 46 47 16-11-08 mma (fano-V09-01-06) 48 - Em options: 20bins/decade LinLossLimit=default=0.01 49 50 01-11-08 mma (fano-V09-01-05) 51 - PhysicsList : add comments for Em options 52 53 26-10-08 mma (fano-V09-01-04) 54 - PhysicsList : modified Em options 55 56 28-09-08 mma (fano-V09-01-03) 57 - HistoManager : root format by default 58 59 11-06-08 V.Ivant (fano-V09-01-02) 60 - Remove AIDA from GNUmakefile 61 62 07-05-08 mma (fano-V09-01-01) 63 - README : update Aida informations 64 65 11-04-08 mma 66 - HistoManager::Scale() : suppress warning 67 68 04-04-08 mma(fano-V09-01-00) 69 - PhysicsList : replace G4MultipleScattering by new G4eMultipleScattering 70 --> allows to use MscUrbanModel2 17 71 18 72 12-11-07 mma (fano-V09-00-08) -
trunk/examples/extended/medical/fanoCavity/README
r807 r1337 1 $Id: README,v 1.1 3 2007/11/13 11:31:54maire Exp $1 $Id: README,v 1.16 2009/10/25 19:06:26 maire Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 96 96 4- PHYSICS 97 97 98 The physics list contains the standard electromagnetic processes, with few98 The physics lists contains the standard electromagnetic processes, with few 99 99 modifications listed here. 100 100 … … 108 108 - Bremsstrahlung : Fano conditions imply no energy transfer via 109 109 bremsstrahlung radiation. Therefore this process is not registered in the 110 physics list. However, it is always possible to include it via an UI111 command. See PhysicsListMessengerclass.110 physics list. However, it is always possible to include it. 111 See PhysListEmStandard class. 112 112 113 113 - Ionisation : In order to have same stopping power in wall and cavity, one … … 154 154 155 155 It is possible to choose the format of the histogram file (hbook, root, XML) 156 with the command /testem/histo/setFileType ( hbookby default)156 with the command /testem/histo/setFileType (root by default) 157 157 158 158 It is also possible to print selected histograms on an ascii file: … … 182 182 183 183 To use histograms, at least one of the AIDA implementations should be 184 available (see http://aida.freehep.org).184 available. See InstallAida.txt 185 185 186 8a - PI187 188 A package including AIDA and extended interfaces also using Python is PI,189 available from: http://cern.ch/pi190 191 Once installed PI or PI-Lite in a specified local area $MYPY, it is required192 to add the installation path to $PATH, i.e. for example, for release 1.2.1 of193 PI:194 setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin195 196 CERN users can use the PATH to the LCG area on AFS.197 Before running the example the command should be issued:198 eval `aida-config --runtime csh`199 200 8b - OpenScientist201 202 OpenScientist is available at http://OpenScientist.lal.in2p3.fr.203 204 You have to "setup" the OpenScientist AIDA implementation before compiling205 (then with G4ANALYSIS_USE set) and running your Geant4 application.206 207 On UNIX you setup, with a csh flavoured shell :208 csh> source <<OpenScientist install path>/aida-setup.csh209 or with a sh flavoured shell :210 sh> . <<OpenScientist install path>/aida-setup.sh211 On Windows :212 DOS> call <<OpenScientist install path>/aida-setup.bat213 214 You can use various file formats for writing (AIDA-XML, hbook, root).215 These formats are readable by the Lab onx interactive program216 or the OpenPAW application. See the web pages.217 218 219 With OpenPAW, on a run.hbook file, one can view the histograms220 with something like :221 OS> opaw222 opaw> h/file 1 run.hbook ( or opaw> h/file 1 run.aida or run.root)223 opaw> zone 2 2224 opaw> h/plot 1225 opaw> h/plot 2 -
trunk/examples/extended/medical/fanoCavity/fanoCavity.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: fanoCavity.cc,v 1. 6 2007/10/29 17:09:53maire Exp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: fanoCavity.cc,v 1.7 2010/05/22 21:02:48 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 32 32 #include "G4RunManager.hh" 33 33 #include "G4UImanager.hh" 34 #include "G4UIterminal.hh"35 #include "G4UItcsh.hh"36 34 #include "Randomize.hh" 37 35 … … 50 48 #ifdef G4VIS_USE 51 49 #include "G4VisExecutive.hh" 50 #endif 51 52 #ifdef G4UI_USE 53 #include "G4UIExecutive.hh" 52 54 #endif 53 55 … … 104 106 #endif 105 107 106 G4UIsession * session = 0; 107 #ifdef G4UI_USE_TCSH 108 session = new G4UIterminal(new G4UItcsh); 109 #else 110 session = new G4UIterminal(); 111 #endif 112 session->SessionStart(); 113 delete session; 114 108 #ifdef G4UI_USE 109 G4UIExecutive * ui = new G4UIExecutive(argc,argv); 110 ui->SessionStart(); 111 delete ui; 112 #endif 113 115 114 #ifdef G4VIS_USE 116 115 delete visManager; 117 #endif 116 #endif 118 117 } 119 118 -
trunk/examples/extended/medical/fanoCavity/fanoCavity.in
r807 r1337 1 # $Id: fanoCavity.in,v 1. 5 2007/10/29 12:36:26 maire Exp $1 # $Id: fanoCavity.in,v 1.6 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 -
trunk/examples/extended/medical/fanoCavity/fanoCavity.out
r807 r1337 1 2 ############################################ 3 !!! WARNING - FPE detection is activated !!! 4 ############################################ 1 5 2 6 ************************************************************* 3 Geant4 version Name: g lobal-V09-00-03 (9-May-2008)7 Geant4 version Name: geant4-09-03-ref-06 (25-June-2010) 4 8 Copyright : Geant4 Collaboration 5 9 Reference : NIM A 506 (2003), 250-303 … … 10 14 ***** Table : Nb of materials = 7 ***** 11 15 12 Material: Water density: 1.000 g/cm3 RadL: 36.092 cm Imean: 75.000 eV16 Material: Water density: 1.000 g/cm3 RadL: 36.092 cm Nucl.Int.Length: 75.416 cm Imean: 75.000 eV 13 17 ---> Element: Hydrogen (H) Z = 1.0 N = 1.0 A = 1.01 g/mole ElmMassFraction: 11.21 % ElmAbundance 66.67 % 14 18 ---> Element: Oxygen (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 88.79 % ElmAbundance 33.33 % 15 19 16 Material: Water_vapor density: 1.000 mg/cm3 RadL: 360.92 5m Imean: 75.000 eV temperature: 273.15 K pressure: 1.00 atm20 Material: Water_vapor density: 1.000 mg/cm3 RadL: 360.924 m Nucl.Int.Length: 754.163 m Imean: 75.000 eV temperature: 273.15 K pressure: 1.00 atm 17 21 ---> Element: Hydrogen (H) Z = 1.0 N = 1.0 A = 1.01 g/mole ElmMassFraction: 11.21 % ElmAbundance 66.67 % 18 22 ---> Element: Oxygen (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 88.79 % ElmAbundance 33.33 % 19 23 20 Material: Air density: 1.290 mg/cm3 RadL: 285.161 m Imean: 85.684eV temperature: 273.15 K pressure: 1.00 atm24 Material: Air density: 1.290 mg/cm3 RadL: 285.161 m Nucl.Int.Length: 662.680 m Imean: 85.703 eV temperature: 273.15 K pressure: 1.00 atm 21 25 ---> Element: Nitrogen (N) Z = 7.0 N = 14.0 A = 14.01 g/mole ElmMassFraction: 70.00 % ElmAbundance 72.71 % 22 26 ---> Element: Oxygen (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 30.00 % ElmAbundance 27.29 % 23 27 24 Material: Graphite density: 2.265 g/cm3 RadL: 18.850 cm Imean: 78.000 eV28 Material: Graphite density: 2.265 g/cm3 RadL: 18.850 cm Nucl.Int.Length: 35.387 cm Imean: 81.000 eV 25 29 ---> Element: Graphite ( ) Z = 6.0 N = 12.0 A = 12.01 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 % 26 30 27 Material: Graphite_gas density: 2.265 mg/cm3 RadL: 188.496 m Imean: 78.000 eV temperature: 273.15 K pressure: 1.00 atm31 Material: Graphite_gas density: 2.265 mg/cm3 RadL: 188.496 m Nucl.Int.Length: 353.873 m Imean: 81.000 eV temperature: 273.15 K pressure: 1.00 atm 28 32 ---> Element: Graphite_gas ( ) Z = 6.0 N = 12.0 A = 12.01 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 % 29 33 30 Material: Aluminium density: 2.700 g/cm3 RadL: 8.893 cm Imean: 166.400 eV34 Material: Aluminium density: 2.700 g/cm3 RadL: 8.893 cm Nucl.Int.Length: 38.879 cm Imean: 166.000 eV 31 35 ---> Element: Aluminium ( ) Z = 13.0 N = 27.0 A = 26.98 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 % 32 36 33 Material: Aluminium_gas density: 2.700 mg/cm3 RadL: 88.925 m Imean: 166.400 eV temperature: 273.15 K pressure: 1.00 atm37 Material: Aluminium_gas density: 2.700 mg/cm3 RadL: 88.925 m Nucl.Int.Length: 388.793 m Imean: 166.000 eV temperature: 273.15 K pressure: 1.00 atm 34 38 ---> Element: Aluminium_gas ( ) Z = 13.0 N = 27.0 A = 26.98 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 % 35 39 36 40 37 41 /run/verbose 2 42 # 43 /testem/phys/addPhysics standard_opt3 44 PhysicsList::AddPhysicsList: <standard_opt3> 38 45 # 39 46 /run/initialize … … 48 55 physicsList->Construct() start. 49 56 physicsList->Construct() start. 57 physicsList->CheckParticleList() start. 50 58 physicsList->setCut() start. 51 59 PhysicsList::SetCuts:CutLength : 10 km … … 54 62 # 55 63 /run/beamOn 4000 56 G4VRangeToEnergyConverter::ConvertCutToKineticEnergy for gamma 57 The cut in range [1e+07 (mm)] is too big for material idx=0 58 The cut in energy is set1.79769e+305GeV 59 G4VRangeToEnergyConverter::ConvertCutToKineticEnergy for e- 60 The cut in range [1e+07 (mm)] is too big for material idx=0 61 The cut in energy is set1.79769e+305GeV 62 G4VRangeToEnergyConverter::ConvertCutToKineticEnergy for e+ 63 The cut in range [1e+07 (mm)] is too big for material idx=0 64 The cut in energy is set1.79769e+305GeV 65 G4VRangeToEnergyConverter::ConvertCutToKineticEnergy for gamma 66 The cut in range [1e+07 (mm)] is too big for material idx=1 67 The cut in energy is set1.79769e+305GeV 68 69 compt: Total cross sections has a good parametrisation from 10 KeV to (100/Z) GeV 70 Sampling according myKlein-Nishina model 71 tables are built for gamma 72 Lambda tables from 100 eV to 10 GeV in 800 bins. 73 74 phot: Total cross sections from Sandia parametrisation. 75 Sampling according PhotoElectric model 76 77 conv: Total cross sections has a good parametrisation from 1.5 MeV to 100 GeV for all Z; 78 sampling secondary e+e- according Bethe-Heitler model 79 tables are built for gamma 80 Lambda tables from 1.022 MeV to 10 GeV in 800 bins. 81 82 msc: Model variant of multiple scattering for e- 83 Lambda tables from 100 eV to 10 GeV in 800 bins. 84 LateralDisplacementFlag= 1 Skin= 2 85 Boundary/stepping algorithm is active with RangeFactor= 0.02 Step limit type 2 86 87 eIoni: tables are built for e- 88 dE/dx and range tables from 100 eV to 10 GeV in 800 bins. 89 Lambda tables from threshold to 10 GeV in 800 bins. 90 Delta cross sections and sampling from myMollerBhabha model 91 Good description from 1 KeV to 100 GeV. 92 Step function: finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1 93 CSDA range table up to 10 GeV in 800 bins. 94 95 eIoni: tables are built for e+ 96 dE/dx and range tables from 100 eV to 10 GeV in 800 bins. 97 Lambda tables from threshold to 10 GeV in 800 bins. 98 Delta cross sections and sampling from myMollerBhabha model 99 Good description from 1 KeV to 100 GeV. 100 Step function: finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1 101 CSDA range table up to 10 GeV in 800 bins. 102 103 msc: Model variant of multiple scattering for proton 104 Lambda tables from 100 eV to 10 GeV in 800 bins. 105 LateralDisplacementFlag= 1 Skin= 2 106 Boundary/stepping algorithm is active with RangeFactor= 0.02 Step limit type 2 107 108 hIoni: tables are built for proton 109 dE/dx and range tables from 100 eV to 10 GeV in 800 bins. 110 Lambda tables from threshold to 10 GeV in 800 bins. 111 Scaling relation is used from proton dE/dx and range. 112 Delta cross sections and sampling from BetheBloch model for scaled energy > 2 MeV 113 Parametrisation from Bragg for protons below. NuclearStopping= 1 114 Step function: finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1 115 CSDA range table up to 10 GeV in 800 bins. 64 65 phot: for gamma SubType= 12 66 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 67 PhotoElectric : Emin= 0 eV Emax= 10 GeV 68 69 compt: for gamma SubType= 13 70 Lambda tables from 100 eV to 10 GeV in 160 bins, spline: 1 71 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 72 myKlein-Nishina : Emin= 0 eV Emax= 10 GeV 73 74 conv: for gamma SubType= 14 75 Lambda tables from 1.022 MeV to 10 GeV in 160 bins, spline: 1 76 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 77 Bethe-Heitler : Emin= 0 eV Emax= 10 GeV 78 79 msc: for e- SubType= 10 80 Lambda tables from 100 eV to 10 GeV in 160 bins, spline: 1 81 RangeFactor= 0.02, stepLimitType: 2, latDisplacement: 1, skin= 3, geomFactor= 2.5 82 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 83 UrbanMsc93 : Emin= 0 eV Emax= 10 GeV 84 85 eIoni: for e- SubType= 2 86 dE/dx and range tables from 100 eV to 10 GeV in 160 bins 87 Lambda tables from threshold to 10 GeV in 160 bins, spline: 1 88 finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 89 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 90 myMollerBhabha : Emin= 0 eV Emax= 10 GeV 91 CSDA range table up to 10 GeV in 160 bins 92 93 eIoni: for e+ SubType= 2 94 dE/dx and range tables from 100 eV to 10 GeV in 160 bins 95 Lambda tables from threshold to 10 GeV in 160 bins, spline: 1 96 finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 97 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 98 myMollerBhabha : Emin= 0 eV Emax= 10 GeV 99 CSDA range table up to 10 GeV in 160 bins 100 101 annihil: for e+ SubType= 5 102 Lambda tables from 100 eV to 10 GeV in 160 bins, spline: 1 103 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 104 eplus2gg : Emin= 0 eV Emax= 10 GeV 105 106 msc: for proton SubType= 10 107 Lambda tables from 100 eV to 10 GeV in 160 bins, spline: 1 108 RangeFactor= 0.02, stepLimitType: 2, latDisplacement: 1, skin= 3, geomFactor= 2.5 109 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 110 UrbanMsc90 : Emin= 0 eV Emax= 10 GeV 111 112 hIoni: for proton SubType= 2 113 dE/dx and range tables from 100 eV to 10 GeV in 160 bins 114 Lambda tables from threshold to 10 GeV in 160 bins, spline: 1 115 finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 116 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 117 Bragg : Emin= 0 eV Emax= 2 MeV 118 BetheBloch : Emin= 2 MeV Emax= 10 GeV 119 CSDA range table up to 10 GeV in 160 bins 116 120 117 121 Region <DefaultRegionForTheWorld> -- appears in <Wall> world volume … … 119 123 Pointers : G4VUserRegionInformation[0], G4UserLimits[0], G4FastSimulationManager[0], G4UserSteppingAction[0] 120 124 Materials : Water Water_vapor 121 Production cuts : gamma 10 km e- 10 km e+10 km125 Production cuts : gamma 10 km e- 10 km e+ 10 km proton 10 km 122 126 123 127 ========= Table of registered couples ============================== … … 125 129 Index : 0 used in the geometry : Yes recalculation needed : No 126 130 Material : Water 127 Range cuts : gamma 10 km e- 10 km e+10 km128 Energy thresholds : gamma 2.88022e+295 J e- 2.88022e+295 J e+ 2.88022e+295 J131 Range cuts : gamma 10 km e- 10 km e+ 10 km proton 10 km 132 Energy thresholds : gamma 10 GeV e- 10 GeV e+ 10 GeV proton 1 TeV 129 133 Region(s) which use this couple : 130 134 DefaultRegionForTheWorld … … 132 136 Index : 1 used in the geometry : Yes recalculation needed : No 133 137 Material : Water_vapor 134 Range cuts : gamma 10 km e- 10 km e+10 km135 Energy thresholds : gamma 2.88022e+295 J e- 18.4792 GeV e+ 17.5913 GeV138 Range cuts : gamma 10 km e- 10 km e+ 10 km proton 10 km 139 Energy thresholds : gamma 10 GeV e- 10 GeV e+ 10 GeV proton 1 TeV 136 140 Region(s) which use this couple : 137 141 DefaultRegionForTheWorld … … 152 156 Start Run processing. 153 157 154 ---> NbofEvents= 1000 NbOfelectr= 70 497 Tkin= 590.556 keV (0.000 %) NbOfelec in cav= 4840 Dose/EnFluence= 29.303cm2/g (0.000 %)155 156 ---> NbofEvents= 2000 NbOfelectr= 14 0946 Tkin= 589.455 keV (-0.186 %) NbOfelec in cav= 9491 Dose/EnFluence= 27.877 cm2/g (-4.868%)157 158 ---> NbofEvents= 3000 NbOfelectr= 21 2082 Tkin= 589.024 keV (-0.073 %) NbOfelec in cav= 14452 Dose/EnFluence= 28.465 cm2/g (2.109%)158 ---> NbofEvents= 1000 NbOfelectr= 70538 Tkin= 590.669 keV (0.000 %) NbOfelec in cav= 4726 Dose/EnFluence= 30.091 cm2/g (0.000 %) 159 160 ---> NbofEvents= 2000 NbOfelectr= 141090 Tkin= 589.502 keV (-0.198 %) NbOfelec in cav= 9358 Dose/EnFluence= 28.953 cm2/g (-3.782 %) 161 162 ---> NbofEvents= 3000 NbOfelectr= 211481 Tkin= 589.178 keV (-0.055 %) NbOfelec in cav= 14156 Dose/EnFluence= 28.931 cm2/g (-0.076 %) 159 163 Run terminated. 160 164 Run Summary 161 165 Number of events processed : 4000 162 User= 45.49s Real=45.58s Sys=0.01s166 User=32.81s Real=48.36s Sys=0s 163 167 164 168 ======================== run summary ====================== … … 170 174 ============================================================ 171 175 172 Process calls frequency ---> compt= 282 830 Transportation= 78247 msc= 1357160 eIoni= 1879015176 Process calls frequency ---> compt= 282107 Transportation= 77642 msc= 2087713 eIoni= 1755986 173 177 174 178 Gamma crossSections in wall material : compt= 63.447 cm2/g --> total= 63.447 cm2/g 175 179 176 Mean energy of secondary e- = 58 9.0917 keV +- 0.1026 % (--> range in wall material = 2.2155mm )177 Mass_energy_transfer coef: 29. 9009cm2/g178 179 StoppingPower in wall = 1.97 19MeV*cm2/g180 in cavity = 1.97 19MeV*cm2/g180 Mean energy of secondary e- = 588.9126 keV +- 0.1029 % (--> range in wall material = 2.2146 mm ) 181 Mass_energy_transfer coef: 29.8918 cm2/g 182 183 StoppingPower in wall = 1.9720 MeV*cm2/g 184 in cavity = 1.9720 MeV*cm2/g 181 185 182 186 Charged particle flow in cavity : 183 Enter --> nbParticles = 1 9159 Energy = 9.6732GeV184 Exit --> nbParticles = 1 9159 Energy = 9.6744GeV185 186 Total edep in cavity = 1 2.6517 MeV +- 2.0796 % Total charged trackLength = 53.2115 m (mean value = 2.7774mm )187 Total dose in cavity = 20. 1358MeV/mg188 Dose/EnergyFluence = 2 8.4663cm2/g189 190 (Dose/EnergyFluence)/Mass_energy_transfer = 0.9 5202 +- 0.02078191 192 StepSize of ch. tracks in wall = 1 47.0421 um +- 130.3004 um (nbSteps/track = 11.3711)193 StepSize of ch. tracks in cavity = 585.5850 um +- 658.6927 um (nbSteps/track = 4.7429)187 Enter --> nbParticles = 18882 Energy = 9.5906 GeV 188 Exit --> nbParticles = 18879 Energy = 9.5913 GeV 189 190 Total edep in cavity = 13.0468 MeV +- 3.3776 % Total charged trackLength = 51.4975 m (mean value = 2.7273 mm ) 191 Total dose in cavity = 20.7646 MeV/mg 192 Dose/EnergyFluence = 29.3552 cm2/g 193 194 (Dose/EnergyFluence)/Mass_energy_transfer = 0.98205 +- 0.03318 195 196 StepSize of ch. tracks in wall = 122.8120 um +- 121.5387 um (nbSteps/track = 13.6004) 197 StepSize of ch. tracks in cavity = 668.5550 um +- 853.6674 um (nbSteps/track = 4.0794) 194 198 195 199 --------- Ranecu engine status --------- 196 200 Initial seed (index) = 0 197 Current couple of seeds = 1 874919070, 2097012381201 Current couple of seeds = 1335550696, 1317159614 198 202 ---------------------------------------- 199 203 UserDetectorConstruction deleted. … … 203 207 G4 kernel has come to Quit state. 204 208 EventManager deleted. 205 Default detector region deleted.206 209 UImanager deleted. 207 210 Units table cleared. … … 209 212 RunManagerKernel is deleted. 210 213 RunManager is deleting. 214 -
trunk/examples/extended/medical/fanoCavity/include/DetectorConstruction.hh
r1230 r1337 25 25 // 26 26 // $Id: DetectorConstruction.hh,v 1.2 2007/10/08 12:05:02 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/DetectorMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: DetectorMessenger.hh,v 1.2 2007/10/08 12:05:02 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/EventAction.hh
r1230 r1337 25 25 // 26 26 // $Id: EventAction.hh,v 1.3 2007/10/29 17:09:53 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/EventActionMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: EventActionMessenger.hh,v 1.1 2007/01/19 17:20:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/HistoManager.hh
r1230 r1337 25 25 // 26 26 // $Id: HistoManager.hh,v 1.4 2007/11/13 11:31:54 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/HistoMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: HistoMessenger.hh,v 1.2 2007/11/13 11:31:54 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/MyKleinNishinaCompton.hh
r1230 r1337 25 25 // 26 26 // $Id: MyKleinNishinaCompton.hh,v 1.4 2009/10/25 19:06:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/examples/extended/medical/fanoCavity/include/MyMollerBhabhaModel.hh
r1230 r1337 25 25 // 26 26 // $Id: MyMollerBhabhaModel.hh,v 1.1 2007/01/19 17:20:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/examples/extended/medical/fanoCavity/include/PhysicsList.hh
r1230 r1337 25 25 // 26 26 // $Id: PhysicsList.hh,v 1.4 2009/10/25 19:06:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/PhysicsListMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: PhysicsListMessenger.hh,v 1.3 2009/10/25 19:06:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/PrimaryGeneratorAction.hh
r1230 r1337 25 25 // 26 26 // $Id: PrimaryGeneratorAction.hh,v 1.1 2007/01/19 17:20:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/PrimaryGeneratorMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: PrimaryGeneratorMessenger.hh,v 1.1 2007/01/19 17:20:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/ProcessesCount.hh
r1230 r1337 26 26 // 27 27 // $Id: ProcessesCount.hh,v 1.1 2007/01/19 17:20:26 maire Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/RunAction.hh
r1230 r1337 25 25 // 26 26 // $Id: RunAction.hh,v 1.3 2007/10/29 12:36:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/StackingAction.hh
r1230 r1337 25 25 // 26 26 // $Id: StackingAction.hh,v 1.1 2007/01/23 13:34:19 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/StackingMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: StackingMessenger.hh,v 1.1 2007/01/23 13:34:19 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/StepMax.hh
r1230 r1337 25 25 // 26 26 // $Id: StepMax.hh,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/StepMaxMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: StepMaxMessenger.hh,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/SteppingAction.hh
r1230 r1337 25 25 // 26 26 // $Id: SteppingAction.hh,v 1.4 2007/10/29 17:09:53 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/SteppingVerbose.hh
r1230 r1337 25 25 // 26 26 // $Id: SteppingVerbose.hh,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/include/TrackingAction.hh
r1230 r1337 25 25 // 26 26 // $Id: TrackingAction.hh,v 1.3 2007/10/29 17:09:53 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/run01.mac
r1230 r1337 1 # $Id: run01.mac,v 1. 7 2009/10/25 19:06:26maire Exp $1 # $Id: run01.mac,v 1.8 2010/01/19 17:28:20 maire Exp $ 2 2 # 3 3 /control/verbose 2 4 4 /run/verbose 2 5 5 # 6 ###/testem/phys/addPhysics standard_opt0 7 ###/testem/phys/addPhysics standard_opt2 6 8 /testem/phys/addPhysics standard_opt3 9 ###/testem/phys/addPhysics standard_GS 10 ###/testem/phys/addPhysics standard_WVI 11 ###/testem/phys/addPhysics standard_SS 7 12 # 8 13 /run/initialize -
trunk/examples/extended/medical/fanoCavity/src/DetectorConstruction.cc
r1230 r1337 25 25 // 26 26 // $Id: DetectorConstruction.cc,v 1.3 2007/10/08 12:05:02 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 29 29 // -
trunk/examples/extended/medical/fanoCavity/src/DetectorMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: DetectorMessenger.cc,v 1.3 2007/11/05 13:44:18 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/EventAction.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: EventAction.cc,v 1. 4 2007/10/29 17:09:53 maireExp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: EventAction.cc,v 1.6 2010/06/07 05:40:46 perl Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 37 37 38 38 #include "G4Event.hh" 39 #include "G4TrajectoryContainer.hh"40 #include "G4Trajectory.hh"41 #include "G4VVisManager.hh"42 39 43 40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 69 66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 70 67 71 void EventAction::EndOfEventAction(const G4Event* evt)68 void EventAction::EndOfEventAction(const G4Event*) 72 69 { 73 //trajectories74 //75 if (G4VVisManager::GetConcreteInstance())76 {77 G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();78 G4int n_trajectories = 0;79 if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();80 for(G4int i=0; i<n_trajectories; i++)81 { G4Trajectory* trj = (G4Trajectory*)82 ((*(evt->GetTrajectoryContainer()))[i]);83 if (drawFlag == "all") trj->DrawTrajectory(1000);84 else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))85 trj->DrawTrajectory();86 }87 }88 70 } 89 71 -
trunk/examples/extended/medical/fanoCavity/src/EventActionMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: EventActionMessenger.cc,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/HistoManager.cc
r1230 r1337 25 25 // 26 26 // $Id: HistoManager.cc,v 1.7 2008/09/28 16:04:01 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/HistoMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: HistoMessenger.cc,v 1.2 2007/11/13 11:31:54 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/MyKleinNishinaCompton.cc
r1230 r1337 25 25 // 26 26 // $Id: MyKleinNishinaCompton.cc,v 1.6 2009/10/25 19:06:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/examples/extended/medical/fanoCavity/src/MyMollerBhabhaModel.cc
r1230 r1337 25 25 // 26 26 // $Id: MyMollerBhabhaModel.cc,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/PhysicsList.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: PhysicsList.cc,v 1.1 8 2009/10/29 16:19:59maire Exp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: PhysicsList.cc,v 1.19 2010/01/19 17:28:20 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 34 34 35 35 #include "PhysListEmStandard_option0.hh" 36 #include "PhysListEmStandard_option2.hh" 36 37 #include "PhysListEmStandard_option3.hh" 37 38 #include "PhysListEmStandard_GS.hh" 39 #include "PhysListEmStandard_WVI.hh" 38 40 #include "PhysListEmStandard_SS.hh" 39 41 … … 149 151 emPhysicsList = new PhysListEmStandard_option0(name,detector); 150 152 153 } else if (name == "standard_opt2") { 154 155 emName = name; 156 delete emPhysicsList; 157 emPhysicsList = new PhysListEmStandard_option2(name,detector); 158 151 159 } else if (name == "standard_opt3") { 152 160 … … 161 169 emPhysicsList = new PhysListEmStandard_GS(name,detector); 162 170 171 } else if (name == "standard_WVI") { 172 173 emName = name; 174 delete emPhysicsList; 175 emPhysicsList = new PhysListEmStandard_WVI(name,detector); 176 163 177 } else if (name == "standard_SS") { 164 178 -
trunk/examples/extended/medical/fanoCavity/src/PhysicsListMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: PhysicsListMessenger.cc,v 1.3 2009/10/25 19:06:26 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/PrimaryGeneratorAction.cc
r1230 r1337 25 25 // 26 26 // $Id: PrimaryGeneratorAction.cc,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/PrimaryGeneratorMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: PrimaryGeneratorMessenger.cc,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/RunAction.cc
r1230 r1337 25 25 // 26 26 // $Id: RunAction.cc,v 1.4 2009/01/22 18:34:06 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/StackingAction.cc
r1230 r1337 25 25 // 26 26 // $Id: StackingAction.cc,v 1.2 2007/03/02 11:08:41 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/StackingMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: StackingMessenger.cc,v 1.1 2007/01/23 13:34:19 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/StepMax.cc
r1230 r1337 25 25 // 26 26 // $Id: StepMax.cc,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/StepMaxMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: StepMaxMessenger.cc,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/SteppingAction.cc
r1230 r1337 25 25 // 26 26 // $Id: SteppingAction.cc,v 1.4 2007/10/29 17:09:53 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/SteppingVerbose.cc
r1230 r1337 25 25 // 26 26 // $Id: SteppingVerbose.cc,v 1.1 2007/01/19 17:20:27 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/src/TrackingAction.cc
r1230 r1337 25 25 // 26 26 // $Id: TrackingAction.cc,v 1.4 2007/10/29 17:09:53 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity/vis.mac
r807 r1337 10 10 /run/initialize 11 11 # 12 # Create empty scene ("world" is default)13 /vis/ scene/create12 # Use this open statement to create an OpenGL view: 13 /vis/open OGL 600x600-0+0 14 14 # 15 # Create a scene handler for a specific graphics system 16 # Edit the next line(s) to choose another graphic system 17 # 18 /vis/open OGLIX 19 # 15 # Use this open statement to create a .prim file suitable for 16 # viewing in DAWN: 20 17 #/vis/open DAWNFILE 21 18 # 22 # Draw scene 23 /vis/viewer/set/viewpointThetaPhi 90 180 deg 19 # Use this open statement to create a .heprep file suitable for 20 # viewing in HepRApp: 21 #/vis/open HepRepFile 22 # 23 # Use this open statement to create a .wrl file suitable for 24 # viewing in a VRML viewer: 25 #/vis/open VRML2FILE 26 # 27 # Disable auto refresh and quieten vis messages whilst scene and 28 # trajectories are established: 29 /vis/viewer/set/autoRefresh false 30 /vis/verbose errors 31 # 32 # Draw geometry: 33 /vis/drawVolume 34 # 35 # Specify view angle: 36 /vis/viewer/set/viewpointThetaPhi 90. 180. 37 # 38 # Specify zoom value: 24 39 /vis/viewer/zoom 1.4 25 /vis/viewer/flush26 40 # 27 # for drawing the tracks 28 # if too many tracks cause core dump => storeTrajectory 0 29 /tracking/storeTrajectory 1 41 # Specify style (surface or wireframe): 42 #/vis/viewer/set/style wireframe 43 # 44 # Draw coordinate axes: 45 #/vis/scene/add/axes 0 0 0 1 m 46 # 47 # Draw smooth trajectories at end of event, showing trajectory points 48 # as markers 2 pixels wide: 49 /vis/scene/add/trajectories smooth 50 /vis/modeling/trajectories/create/drawByCharge 51 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 52 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 1 53 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 54 # 55 # Draw hits at end of event: 56 #/vis/scene/add/hits 57 # 58 # To draw only gammas: 59 #/vis/filtering/trajectories/create/particleFilter 60 #/vis/filtering/trajectories/particleFilter-0/add gamma 61 # 62 # To invert the above, drawing all particles except gammas, 63 # keep the above two lines but also add: 64 #/vis/filtering/trajectories/particleFilter-0/invert true 65 # 66 # Many other options are available with /vis/modeling and /vis/filtering. 67 # For example, to select colour by particle ID: 68 #/vis/modeling/trajectories/create/drawByParticleID 69 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue 70 # 71 # To superimpose all of the events from a given run: 30 72 /vis/scene/endOfEventAction accumulate 31 73 # 32 /testem/event/drawTracks all 33 74 # Re-establish auto refreshing and verbosity: 75 /vis/viewer/set/autoRefresh true 76 /vis/verbose warnings 77 # 78 # For file-based drivers, use this to create an empty detector view: 79 #/vis/viewer/flush -
trunk/examples/extended/medical/fanoCavity2/History
r807 r1337 1 $Id: History,v 1. 4 2007/11/12 18:19:30 maireExp $1 $Id: History,v 1.18 2010/06/07 05:40:46 perl Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Reverse chronological order (last date on top), please * 16 16 ---------------------------------------------------------- 17 18 06-06-10 J.Perl (fano2-V09-03-03) 19 - Remove unused variable in EventAction 20 21 04-06-10 J.Perl (fano2-V09-03-02) 22 - Updated vis usage 23 24 20-01-10 mma (fano2-V09-03-00) 25 - introduce PhysListEmStandard_option2 : UrbanMscModel93 without options 26 PhysListEmStandard_WVI : WentzelVIModel 27 - put in run01.mac all physics lists choice 28 29 16-11-09 mma (fano2-V09-02-01) 30 - PhysListEmStandard_option3 : use UrbanMscModel93 31 32 31-10-09 mma (fano2-V09-02-00) 33 - splite PhysicsList in 2, as others TestEm examples. 34 - local copy of PhysListEmStandard_option0, PhysListEmStandard_option3, 35 PhysListEmStandard_SS 36 - new PhysListEmStandard_GS for GoudsmitSaundersonMsc model 37 - PhysicsList: add cut for proton recoil in case of Single Scattering 38 39 16-11-08 mma (fano2-V09-01-06) 40 - Em options: 20bins/decade LinLossLimit=default=0.01 41 42 01-11-08 mma (fano2-V09-01-05) 43 - PhysicsList : add comments for Em options 44 45 26-10-08 mma (fano2-V09-01-04) 46 - PhysicsList : modified Em options 47 48 28-09-08 mma (fano2-V09-01-03) 49 - HistoManager : root format by default 50 51 11-06-08 V.Ivant (fano2-V09-01-02) 52 - Remove AIDA from GNUmakefile 53 54 07-05-08 mma (fano2-V09-01-01) 55 - README : update Aida informations 56 57 11-04-08 mma 58 - HistoManager::Scale() : suppress warning 59 60 04-04-08 mma(fano2-V09-01-00) 61 - PhysicsList : replace G4MultipleScattering by new G4eMultipleScattering 62 --> allows to use MscUrbanModel2 17 63 18 64 12-11-07 mma (fano2-V09-00-01) -
trunk/examples/extended/medical/fanoCavity2/README
r807 r1337 1 $Id: README,v 1. 8 2007/11/12 18:19:30maire Exp $1 $Id: README,v 1.11 2009/10/31 18:05:56 maire Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 82 82 - Bremsstrahlung : Fano conditions imply no energy transfer via 83 83 bremsstrahlung radiation. Therefore this process is not registered in the 84 physics list. However, it is always possible to include it via an UI85 command. See PhysicsListMessenger class.84 physics list. However, it is always possible to include it. 85 See PhysListEm classes. 86 86 87 87 - Ionization : In order to have same stopping power in wall and cavity, one … … 125 125 126 126 One can control the name of the histograms file with the command: 127 /testem/histo/setFileName name (default fano Cavity)127 /testem/histo/setFileName name (default fanocavity2) 128 128 129 129 It is possible to choose the format of the histogram file (hbook, root, XML) 130 with the command /testem/histo/setFileType ( hbookby default)130 with the command /testem/histo/setFileType (root by default) 131 131 132 132 It is also possible to print selected histograms on an ascii file: … … 156 156 157 157 To use histograms, at least one of the AIDA implementations should be 158 available (see http://aida.freehep.org). 159 160 8a - PI 161 162 A package including AIDA and extended interfaces also using Python is PI, 163 available from: http://cern.ch/pi 164 165 Once installed PI or PI-Lite in a specified local area $MYPY, it is required 166 to add the installation path to $PATH, i.e. for example, for release 1.2.1 of 167 PI: 168 setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin 169 170 CERN users can use the PATH to the LCG area on AFS. 171 Before running the example the command should be issued: 172 eval `aida-config --runtime csh` 173 174 8b - OpenScientist 175 176 OpenScientist is available at http://OpenScientist.lal.in2p3.fr. 177 178 You have to "setup" the OpenScientist AIDA implementation before compiling 179 (then with G4ANALYSIS_USE set) and running your Geant4 application. 180 181 On UNIX you setup, with a csh flavoured shell : 182 csh> source <<OpenScientist install path>/aida-setup.csh 183 or with a sh flavoured shell : 184 sh> . <<OpenScientist install path>/aida-setup.sh 185 On Windows : 186 DOS> call <<OpenScientist install path>/aida-setup.bat 187 188 You can use various file formats for writing (AIDA-XML, hbook, root). 189 These formats are readable by the Lab onx interactive program 190 or the OpenPAW application. See the web pages. 191 192 193 With OpenPAW, on a run.hbook file, one can view the histograms 194 with something like : 195 OS> opaw 196 opaw> h/file 1 run.hbook ( or opaw> h/file 1 run.aida or run.root) 197 opaw> zone 2 2 198 opaw> h/plot 1 199 opaw> h/plot 2 158 available. See InstallAida.txt -
trunk/examples/extended/medical/fanoCavity2/essai.mac
r1230 r1337 1 # $Id: essai.mac,v 1. 5 2009/10/31 18:05:56maire Exp $1 # $Id: essai.mac,v 1.6 2010/01/20 15:41:14 maire Exp $ 2 2 # 3 3 /control/verbose 2 4 4 /run/verbose 2 5 5 # 6 /testem/phys/addPhysics standard_ opt36 /testem/phys/addPhysics standard_WVI 7 7 # 8 8 /run/initialize … … 10 10 /gun/energy 1 MeV 11 11 # 12 /testem/event/printModulo 10000 012 /testem/event/printModulo 10000 13 13 # 14 /run/beamOn 100000 014 /run/beamOn 100000 -
trunk/examples/extended/medical/fanoCavity2/fanoCavity2.cc
r1230 r1337 25 25 // 26 26 // $Id: fanoCavity2.cc,v 1.2 2007/10/31 16:16:20 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/fanoCavity2.in
r807 r1337 1 # $Id: fanoCavity2.in,v 1. 2 2007/11/05 13:19:16 maire Exp $1 # $Id: fanoCavity2.in,v 1.3 2009/10/31 18:05:56 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 -
trunk/examples/extended/medical/fanoCavity2/fanoCavity2.out
r807 r1337 1 2 ############################################ 3 !!! WARNING - FPE detection is activated !!! 4 ############################################ 1 5 2 6 ************************************************************* 3 Geant4 version Name: g lobal-V09-00-03 (9-May-2008)7 Geant4 version Name: geant4-09-03-ref-06 (25-June-2010) 4 8 Copyright : Geant4 Collaboration 5 9 Reference : NIM A 506 (2003), 250-303 … … 10 14 ***** Table : Nb of materials = 6 ***** 11 15 12 Material: Water density: 1.000 g/cm3 RadL: 36.092 cm Imean: 75.000 eV16 Material: Water density: 1.000 g/cm3 RadL: 36.092 cm Nucl.Int.Length: 75.416 cm Imean: 75.000 eV 13 17 ---> Element: Hydrogen (H) Z = 1.0 N = 1.0 A = 1.01 g/mole ElmMassFraction: 11.21 % ElmAbundance 66.67 % 14 18 ---> Element: Oxygen (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 88.79 % ElmAbundance 33.33 % 15 19 16 Material: Water_gas density: 1.000 mg/cm3 RadL: 360.92 5m Imean: 75.000 eV temperature: 273.15 K pressure: 1.00 atm20 Material: Water_gas density: 1.000 mg/cm3 RadL: 360.924 m Nucl.Int.Length: 754.163 m Imean: 75.000 eV temperature: 273.15 K pressure: 1.00 atm 17 21 ---> Element: Hydrogen (H) Z = 1.0 N = 1.0 A = 1.01 g/mole ElmMassFraction: 11.21 % ElmAbundance 66.67 % 18 22 ---> Element: Oxygen (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 88.79 % ElmAbundance 33.33 % 19 23 20 Material: Graphite density: 2.265 g/cm3 RadL: 18.850 cm Imean: 78.000 eV24 Material: Graphite density: 2.265 g/cm3 RadL: 18.850 cm Nucl.Int.Length: 35.387 cm Imean: 81.000 eV 21 25 ---> Element: Graphite ( ) Z = 6.0 N = 12.0 A = 12.01 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 % 22 26 23 Material: Graphite_gas density: 2.265 mg/cm3 RadL: 188.496 m Imean: 78.000 eV temperature: 273.15 K pressure: 1.00 atm27 Material: Graphite_gas density: 2.265 mg/cm3 RadL: 188.496 m Nucl.Int.Length: 353.873 m Imean: 81.000 eV temperature: 273.15 K pressure: 1.00 atm 24 28 ---> Element: Graphite_gas ( ) Z = 6.0 N = 12.0 A = 12.01 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 % 25 29 26 Material: Aluminium density: 2.700 g/cm3 RadL: 8.893 cm Imean: 166.400 eV30 Material: Aluminium density: 2.700 g/cm3 RadL: 8.893 cm Nucl.Int.Length: 38.879 cm Imean: 166.000 eV 27 31 ---> Element: Aluminium ( ) Z = 13.0 N = 27.0 A = 26.98 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 % 28 32 29 Material: Aluminium_gas density: 2.700 mg/cm3 RadL: 88.925 m Imean: 166.400 eV temperature: 273.15 K pressure: 1.00 atm33 Material: Aluminium_gas density: 2.700 mg/cm3 RadL: 88.925 m Nucl.Int.Length: 388.793 m Imean: 166.000 eV temperature: 273.15 K pressure: 1.00 atm 30 34 ---> Element: Aluminium_gas ( ) Z = 13.0 N = 27.0 A = 26.98 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 % 31 35 32 36 33 37 /run/verbose 2 38 # 39 /testem/phys/addPhysics standard_opt3 40 PhysicsList::AddPhysicsList: <standard_opt3> 34 41 # 35 42 /run/initialize … … 44 51 physicsList->Construct() start. 45 52 physicsList->Construct() start. 53 physicsList->CheckParticleList() start. 46 54 physicsList->setCut() start. 47 55 PhysicsList::SetCuts:CutLength : 10 km … … 52 60 # 53 61 /run/beamOn 40000 54 G4VRangeToEnergyConverter::ConvertCutToKineticEnergy for gamma 55 The cut in range [1e+07 (mm)] is too big for material idx=0 56 The cut in energy is set1.79769e+305GeV 57 G4VRangeToEnergyConverter::ConvertCutToKineticEnergy for e- 58 The cut in range [1e+07 (mm)] is too big for material idx=0 59 The cut in energy is set1.79769e+305GeV 60 G4VRangeToEnergyConverter::ConvertCutToKineticEnergy for e+ 61 The cut in range [1e+07 (mm)] is too big for material idx=0 62 The cut in energy is set1.79769e+305GeV 63 G4VRangeToEnergyConverter::ConvertCutToKineticEnergy for gamma 64 The cut in range [1e+07 (mm)] is too big for material idx=1 65 The cut in energy is set1.79769e+305GeV 66 67 phot: Total cross sections from Sandia parametrisation. 68 Sampling according PhotoElectric model 69 70 compt: Total cross sections has a good parametrisation from 10 KeV to (100/Z) GeV 71 Sampling according Klein-Nishina model 72 tables are built for gamma 73 Lambda tables from 100 eV to 10 GeV in 800 bins. 74 75 conv: Total cross sections has a good parametrisation from 1.5 MeV to 100 GeV for all Z; 76 sampling secondary e+e- according Bethe-Heitler model 77 tables are built for gamma 78 Lambda tables from 1.022 MeV to 10 GeV in 800 bins. 79 80 msc: Model variant of multiple scattering for e- 81 Lambda tables from 100 eV to 10 GeV in 800 bins. 82 LateralDisplacementFlag= 1 Skin= 2 83 Boundary/stepping algorithm is active with RangeFactor= 0.02 Step limit type 2 84 85 eIoni: tables are built for e- 86 dE/dx and range tables from 100 eV to 10 GeV in 800 bins. 87 Lambda tables from threshold to 10 GeV in 800 bins. 88 Delta cross sections and sampling from myMollerBhabha model 89 Good description from 1 KeV to 100 GeV. 90 Step function: finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1 91 CSDA range table up to 10 GeV in 800 bins. 92 93 eIoni: tables are built for e+ 94 dE/dx and range tables from 100 eV to 10 GeV in 800 bins. 95 Lambda tables from threshold to 10 GeV in 800 bins. 96 Delta cross sections and sampling from myMollerBhabha model 97 Good description from 1 KeV to 100 GeV. 98 Step function: finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1 99 CSDA range table up to 10 GeV in 800 bins. 100 101 msc: Model variant of multiple scattering for proton 102 Lambda tables from 100 eV to 10 GeV in 800 bins. 103 LateralDisplacementFlag= 1 Skin= 2 104 Boundary/stepping algorithm is active with RangeFactor= 0.02 Step limit type 2 105 106 hIoni: tables are built for proton 107 dE/dx and range tables from 100 eV to 10 GeV in 800 bins. 108 Lambda tables from threshold to 10 GeV in 800 bins. 109 Scaling relation is used from proton dE/dx and range. 110 Delta cross sections and sampling from BetheBloch model for scaled energy > 2 MeV 111 Parametrisation from Bragg for protons below. NuclearStopping= 1 112 Step function: finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1 113 CSDA range table up to 10 GeV in 800 bins. 62 63 phot: for gamma SubType= 12 64 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 65 PhotoElectric : Emin= 0 eV Emax= 10 GeV 66 67 compt: for gamma SubType= 13 68 Lambda tables from 100 eV to 10 GeV in 160 bins, spline: 1 69 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 70 Klein-Nishina : Emin= 0 eV Emax= 10 GeV 71 72 conv: for gamma SubType= 14 73 Lambda tables from 1.022 MeV to 10 GeV in 160 bins, spline: 1 74 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 75 Bethe-Heitler : Emin= 0 eV Emax= 10 GeV 76 77 msc: for e- SubType= 10 78 Lambda tables from 100 eV to 10 GeV in 160 bins, spline: 1 79 RangeFactor= 0.02, stepLimitType: 2, latDisplacement: 1, skin= 3, geomFactor= 2.5 80 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 81 UrbanMsc93 : Emin= 0 eV Emax= 10 GeV 82 83 eIoni: for e- SubType= 2 84 dE/dx and range tables from 100 eV to 10 GeV in 160 bins 85 Lambda tables from threshold to 10 GeV in 160 bins, spline: 1 86 finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 87 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 88 myMollerBhabha : Emin= 0 eV Emax= 10 GeV 89 CSDA range table up to 10 GeV in 160 bins 90 91 eIoni: for e+ SubType= 2 92 dE/dx and range tables from 100 eV to 10 GeV in 160 bins 93 Lambda tables from threshold to 10 GeV in 160 bins, spline: 1 94 finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 95 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 96 myMollerBhabha : Emin= 0 eV Emax= 10 GeV 97 CSDA range table up to 10 GeV in 160 bins 98 99 annihil: for e+ SubType= 5 100 Lambda tables from 100 eV to 10 GeV in 160 bins, spline: 1 101 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 102 eplus2gg : Emin= 0 eV Emax= 10 GeV 103 104 msc: for proton SubType= 10 105 Lambda tables from 100 eV to 10 GeV in 160 bins, spline: 1 106 RangeFactor= 0.02, stepLimitType: 2, latDisplacement: 1, skin= 3, geomFactor= 2.5 107 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 108 UrbanMsc90 : Emin= 0 eV Emax= 10 GeV 109 110 hIoni: for proton SubType= 2 111 dE/dx and range tables from 100 eV to 10 GeV in 160 bins 112 Lambda tables from threshold to 10 GeV in 160 bins, spline: 1 113 finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 114 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 115 Bragg : Emin= 0 eV Emax= 2 MeV 116 BetheBloch : Emin= 2 MeV Emax= 10 GeV 117 CSDA range table up to 10 GeV in 160 bins 114 118 115 119 Region <DefaultRegionForTheWorld> -- appears in <Wall> world volume … … 117 121 Pointers : G4VUserRegionInformation[0], G4UserLimits[0], G4FastSimulationManager[0], G4UserSteppingAction[0] 118 122 Materials : Water Water_gas 119 Production cuts : gamma 10 km e- 10 km e+10 km123 Production cuts : gamma 10 km e- 10 km e+ 10 km proton 10 km 120 124 121 125 ========= Table of registered couples ============================== … … 123 127 Index : 0 used in the geometry : Yes recalculation needed : No 124 128 Material : Water 125 Range cuts : gamma 10 km e- 10 km e+10 km126 Energy thresholds : gamma 2.88022e+295 J e- 2.88022e+295 J e+ 2.88022e+295 J129 Range cuts : gamma 10 km e- 10 km e+ 10 km proton 10 km 130 Energy thresholds : gamma 10 GeV e- 10 GeV e+ 10 GeV proton 1 TeV 127 131 Region(s) which use this couple : 128 132 DefaultRegionForTheWorld … … 130 134 Index : 1 used in the geometry : Yes recalculation needed : No 131 135 Material : Water_gas 132 Range cuts : gamma 10 km e- 10 km e+10 km133 Energy thresholds : gamma 2.88022e+295 J e- 18.4792 GeV e+ 17.5913 GeV136 Range cuts : gamma 10 km e- 10 km e+ 10 km proton 10 km 137 Energy thresholds : gamma 10 GeV e- 10 GeV e+ 10 GeV proton 1 TeV 134 138 Region(s) which use this couple : 135 139 DefaultRegionForTheWorld … … 163 167 Start Run processing. 164 168 165 --->evntNb= 10000 Nwall= 9997 Ncav= 4 Ic/Iw= 2.09883 Ne-_cav= 2823 doseCavity/Ebeam= 1.13192 (100*(ratio-1) = 13.19193%)166 167 --->evntNb= 20000 Nwall= 1999 6 Ncav= 5 Ic/Iw= 1.31164 Ne-_cav= 5677 doseCavity/Ebeam= 1.23974 (100*(ratio-1) = 23.97404%)168 169 --->evntNb= 30000 Nwall= 2999 1 Ncav= 10 Ic/Iw= 1.74903 Ne-_cav= 8523 doseCavity/Ebeam= 1.29183 (100*(ratio-1) = 29.18310 %)169 --->evntNb= 10000 Nwall= 10000 Ncav= 1 Ic/Iw= 0.52456 Ne-_cav= 2787 doseCavity/Ebeam= 1.12338 (100*(ratio-1) = 12.33820 %) 170 171 --->evntNb= 20000 Nwall= 19999 Ncav= 2 Ic/Iw= 0.52458 Ne-_cav= 5507 doseCavity/Ebeam= 1.00206 (100*(ratio-1) = 0.20619 %) 172 173 --->evntNb= 30000 Nwall= 29998 Ncav= 3 Ic/Iw= 0.52459 Ne-_cav= 8236 doseCavity/Ebeam= 0.98084 (100*(ratio-1) = -1.91610 %) 170 174 Run terminated. 171 175 Run Summary 172 176 Number of events processed : 40000 173 User= 13s Real=13s Sys=0.01s174 175 Process calls frequency ---> msc= 351630 eIoni= 635349 Transportation= 22715177 User=9.6s Real=12s Sys=0s 178 179 Process calls frequency ---> msc= 507867 eIoni= 620396 Transportation= 22034 176 180 177 181 Charged particle flow in cavity : 178 Enter --> nbParticles = 11 358 Energy = 7.238GeV179 Exit --> nbParticles = 11 357 Energy = 7.238GeV180 181 beamFluence in wall = 3999 0 in cavity = 10 Icav/Iwall = 1.31170 energyFluence = 38.12063MeV*cm2/mg182 183 Total edep in cavity = 9.95706 MeV +- 6.35210%184 Total dose in cavity = 49.78531 MeV*cm2/mg +- 6.35210%185 186 DoseCavity/EnergyFluence = 1. 30599 +- 0.08296187 188 Total charged trackLength in cavity = 40.0185 m (mean value = 3.5234mm )189 190 StepSize of ch. tracks in wall = 1 83.6241 um +- 185.5614 um (nbSteps/track = 23.8988)191 StepSize of ch. tracks in cavity = 7 41.3298 um +- 3.0344 mm (nbSteps/track = 4.7528)182 Enter --> nbParticles = 11019 Energy = 7.036 GeV 183 Exit --> nbParticles = 11015 Energy = 7.034 GeV 184 185 beamFluence in wall = 39994 in cavity = 6 Icav/Iwall = 0.78695 energyFluence = 38.12014 MeV*cm2/mg 186 187 Total edep in cavity = 7.76475 MeV +- 5.14221 % 188 Total dose in cavity = 38.82375 MeV*cm2/mg +- 5.14221 % 189 190 DoseCavity/EnergyFluence = 1.01846 +- 0.05237 191 192 Total charged trackLength in cavity = 33.1218 m (mean value = 3.0059 mm ) 193 194 StepSize of ch. tracks in wall = 158.8831 um +- 182.9748 um (nbSteps/track = 27.6011) 195 StepSize of ch. tracks in cavity = 713.5388 um +- 1.1439 mm (nbSteps/track = 4.2126) 192 196 193 197 --------- Ranecu engine status --------- 194 198 Initial seed (index) = 0 195 Current couple of seeds = 580686433, 475796940199 Current couple of seeds = 991846787, 685450694 196 200 ---------------------------------------- 197 201 UserDetectorConstruction deleted. … … 201 205 G4 kernel has come to Quit state. 202 206 EventManager deleted. 203 Default detector region deleted.204 207 UImanager deleted. 205 208 Units table cleared. … … 207 210 RunManagerKernel is deleted. 208 211 RunManager is deleting. 212 -
trunk/examples/extended/medical/fanoCavity2/include/DetectorConstruction.hh
r1230 r1337 25 25 // 26 26 // $Id: DetectorConstruction.hh,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/DetectorMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: DetectorMessenger.hh,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/EventAction.hh
r1230 r1337 25 25 // 26 26 // $Id: EventAction.hh,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/EventActionMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: EventActionMessenger.hh,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/HistoManager.hh
r1230 r1337 25 25 // 26 26 // $Id: HistoManager.hh,v 1.3 2007/11/12 18:19:30 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/HistoMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: HistoMessenger.hh,v 1.2 2007/11/12 18:19:30 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/MyMollerBhabhaModel.hh
r1230 r1337 25 25 // 26 26 // $Id: MyMollerBhabhaModel.hh,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/examples/extended/medical/fanoCavity2/include/PhysicsList.hh
r1230 r1337 25 25 // 26 26 // $Id: PhysicsList.hh,v 1.2 2009/10/31 18:05:56 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/PhysicsListMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: PhysicsListMessenger.hh,v 1.2 2009/10/31 18:05:56 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/PrimaryGeneratorAction.hh
r1230 r1337 25 25 // 26 26 // $Id: PrimaryGeneratorAction.hh,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/ProcessesCount.hh
r1230 r1337 26 26 // 27 27 // $Id: ProcessesCount.hh,v 1.1 2007/10/15 16:20:23 maire Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/RunAction.hh
r1230 r1337 25 25 // 26 26 // $Id: RunAction.hh,v 1.2 2007/10/31 16:16:20 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/StepMax.hh
r1230 r1337 25 25 // 26 26 // $Id: StepMax.hh,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/StepMaxMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: StepMaxMessenger.hh,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/SteppingAction.hh
r1230 r1337 25 25 // 26 26 // $Id: SteppingAction.hh,v 1.2 2007/10/31 16:16:20 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/SteppingVerbose.hh
r1230 r1337 25 25 // 26 26 // $Id: SteppingVerbose.hh,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/include/TrackingAction.hh
r1230 r1337 25 25 // 26 26 // $Id: TrackingAction.hh,v 1.2 2007/10/31 16:16:20 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/run01.mac
r1230 r1337 1 # $Id: run01.mac,v 1. 3 2009/10/31 18:05:56maire Exp $1 # $Id: run01.mac,v 1.4 2010/01/20 15:41:14 maire Exp $ 2 2 # 3 3 /control/verbose 2 4 4 /run/verbose 2 5 5 # 6 ###/testem/phys/addPhysics standard_opt0 7 ###/testem/phys/addPhysics standard_opt2 6 8 /testem/phys/addPhysics standard_opt3 9 ###/testem/phys/addPhysics standard_GS 10 ###/testem/phys/addPhysics standard_WVI 11 ###/testem/phys/addPhysics standard_SS 7 12 # 8 13 /run/initialize -
trunk/examples/extended/medical/fanoCavity2/src/DetectorConstruction.cc
r1230 r1337 25 25 // 26 26 // $Id: DetectorConstruction.cc,v 1.2 2007/11/05 13:19:16 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 29 29 // -
trunk/examples/extended/medical/fanoCavity2/src/DetectorMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: DetectorMessenger.cc,v 1.2 2007/11/05 13:19:16 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/src/EventAction.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: EventAction.cc,v 1. 1 2007/10/15 16:20:23 maireExp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: EventAction.cc,v 1.3 2010/06/07 05:40:46 perl Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 37 37 38 38 #include "G4Event.hh" 39 #include "G4TrajectoryContainer.hh"40 #include "G4Trajectory.hh"41 #include "G4VVisManager.hh"42 39 43 40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 69 66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 70 67 71 void EventAction::EndOfEventAction(const G4Event* evt)68 void EventAction::EndOfEventAction(const G4Event*) 72 69 { 73 //trajectories74 //75 if (G4VVisManager::GetConcreteInstance())76 {77 G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();78 G4int n_trajectories = 0;79 if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();80 for(G4int i=0; i<n_trajectories; i++)81 { G4Trajectory* trj = (G4Trajectory*)82 ((*(evt->GetTrajectoryContainer()))[i]);83 if (drawFlag == "all") trj->DrawTrajectory(1000);84 else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))85 trj->DrawTrajectory();86 }87 }88 70 } 89 71 -
trunk/examples/extended/medical/fanoCavity2/src/EventActionMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: EventActionMessenger.cc,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/src/HistoManager.cc
r1230 r1337 25 25 // 26 26 // $Id: HistoManager.cc,v 1.5 2008/09/28 16:15:39 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/src/HistoMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: HistoMessenger.cc,v 1.2 2007/11/12 18:19:30 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/src/MyMollerBhabhaModel.cc
r1230 r1337 25 25 // 26 26 // $Id: MyMollerBhabhaModel.cc,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/src/PhysicsList.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: PhysicsList.cc,v 1. 7 2009/10/31 18:05:01maire Exp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: PhysicsList.cc,v 1.8 2010/01/20 15:41:14 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 34 34 35 35 #include "PhysListEmStandard_option0.hh" 36 #include "PhysListEmStandard_option2.hh" 36 37 #include "PhysListEmStandard_option3.hh" 37 38 #include "PhysListEmStandard_GS.hh" 39 #include "PhysListEmStandard_WVI.hh" 38 40 #include "PhysListEmStandard_SS.hh" 39 41 … … 149 151 emPhysicsList = new PhysListEmStandard_option0(name,detector); 150 152 153 } else if (name == "standard_opt2") { 154 155 emName = name; 156 delete emPhysicsList; 157 emPhysicsList = new PhysListEmStandard_option2(name,detector); 158 151 159 } else if (name == "standard_opt3") { 152 160 … … 154 162 delete emPhysicsList; 155 163 emPhysicsList = new PhysListEmStandard_option3(name,detector); 156 164 157 165 } else if (name == "standard_GS") { 158 166 … … 160 168 delete emPhysicsList; 161 169 emPhysicsList = new PhysListEmStandard_GS(name,detector); 162 170 171 } else if (name == "standard_WVI") { 172 173 emName = name; 174 delete emPhysicsList; 175 emPhysicsList = new PhysListEmStandard_WVI(name,detector); 176 163 177 } else if (name == "standard_SS") { 164 178 165 179 emName = name; 166 180 delete emPhysicsList; 167 emPhysicsList = new PhysListEmStandard_SS(name,detector); 181 emPhysicsList = new PhysListEmStandard_SS(name,detector); 182 168 183 } else { 169 184 -
trunk/examples/extended/medical/fanoCavity2/src/PhysicsListMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: PhysicsListMessenger.cc,v 1.2 2009/10/31 18:05:01 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/src/PrimaryGeneratorAction.cc
r1230 r1337 25 25 // 26 26 // $Id: PrimaryGeneratorAction.cc,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/src/RunAction.cc
r1230 r1337 25 25 // 26 26 // $Id: RunAction.cc,v 1.3 2007/11/05 13:19:16 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/src/StepMax.cc
r1230 r1337 25 25 // 26 26 // $Id: StepMax.cc,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/src/StepMaxMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: StepMaxMessenger.cc,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/src/SteppingAction.cc
r1230 r1337 25 25 // 26 26 // $Id: SteppingAction.cc,v 1.2 2007/10/31 16:16:20 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/src/SteppingVerbose.cc
r1230 r1337 25 25 // 26 26 // $Id: SteppingVerbose.cc,v 1.1 2007/10/15 16:20:23 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/src/TrackingAction.cc
r1230 r1337 25 25 // 26 26 // $Id: TrackingAction.cc,v 1.2 2007/10/31 16:16:20 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/medical/fanoCavity2/vis.mac
r807 r1337 10 10 /run/initialize 11 11 # 12 # Create empty scene ("world" is default)13 /vis/ scene/create12 # Use this open statement to create an OpenGL view: 13 /vis/open OGL 600x600-0+0 14 14 # 15 # Create a scene handler for a specific graphics system 16 # Edit the next line(s) to choose another graphic system 17 # 18 /vis/open OGLIX 19 # 15 # Use this open statement to create a .prim file suitable for 16 # viewing in DAWN: 20 17 #/vis/open DAWNFILE 21 18 # 22 # Draw scene 23 /vis/viewer/set/viewpointThetaPhi 90 180 deg 19 # Use this open statement to create a .heprep file suitable for 20 # viewing in HepRApp: 21 #/vis/open HepRepFile 22 # 23 # Use this open statement to create a .wrl file suitable for 24 # viewing in a VRML viewer: 25 #/vis/open VRML2FILE 26 # 27 # Disable auto refresh and quieten vis messages whilst scene and 28 # trajectories are established: 29 /vis/viewer/set/autoRefresh false 30 /vis/verbose errors 31 # 32 # Draw geometry: 33 /vis/drawVolume 34 # 35 # Specify view angle: 36 /vis/viewer/set/viewpointThetaPhi 90. 180. 37 # 38 # Specify zoom value: 24 39 /vis/viewer/zoom 1.4 25 /vis/viewer/flush26 40 # 27 # for drawing the tracks 28 # if too many tracks cause core dump => storeTrajectory 0 29 /tracking/storeTrajectory 1 41 # Specify style (surface or wireframe): 42 #/vis/viewer/set/style wireframe 43 # 44 # Draw coordinate axes: 45 #/vis/scene/add/axes 0 0 0 1 m 46 # 47 # Draw smooth trajectories at end of event, showing trajectory points 48 # as markers 2 pixels wide: 49 /vis/scene/add/trajectories smooth 50 /vis/modeling/trajectories/create/drawByCharge 51 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 52 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 1 53 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 54 # 55 # Draw hits at end of event: 56 #/vis/scene/add/hits 57 # 58 # To draw only gammas: 59 #/vis/filtering/trajectories/create/particleFilter 60 #/vis/filtering/trajectories/particleFilter-0/add gamma 61 # 62 # To invert the above, drawing all particles except gammas, 63 # keep the above two lines but also add: 64 #/vis/filtering/trajectories/particleFilter-0/invert true 65 # 66 # Many other options are available with /vis/modeling and /vis/filtering. 67 # For example, to select colour by particle ID: 68 #/vis/modeling/trajectories/create/drawByParticleID 69 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue 70 # 71 # To superimpose all of the events from a given run: 30 72 /vis/scene/endOfEventAction accumulate 31 73 # 32 /testem/event/drawTracks all 33 74 # Re-establish auto refreshing and verbosity: 75 /vis/viewer/set/autoRefresh true 76 /vis/verbose warnings 77 # 78 # For file-based drivers, use this to create an empty detector view: 79 #/vis/viewer/flush
Note: See TracChangeset
for help on using the changeset viewer.