Changeset 1342 for trunk/examples/extended/electromagnetic/TestEm16
- Timestamp:
- Nov 5, 2010, 4:08:39 PM (14 years ago)
- Location:
- trunk/examples/extended/electromagnetic/TestEm16
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/electromagnetic/TestEm16/History
r1337 r1342 1 $Id: History,v 1.1 3 2010/06/07 05:40:46 perlExp $1 $Id: History,v 1.15 2010/10/13 13:50:45 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Reverse chronological order (last date on top), please * 16 16 ---------------------------------------------------------- 17 18 13-10-10 V.Ivanchenko (testem16-V09-03-03) 19 - SteppingAction - use const pointers for step/track objects; 20 use process subtype instead of name 17 21 18 22 06-06-10 J.Perl (testem16-V09-03-02) -
trunk/examples/extended/electromagnetic/TestEm16/TestEm16.out
r1337 r1342 5 5 6 6 ************************************************************* 7 Geant4 version Name: geant4-09-03-ref-0 6(25-June-2010)7 Geant4 version Name: geant4-09-03-ref-09 (25-June-2010) 8 8 Copyright : Geant4 Collaboration 9 9 Reference : NIM A 506 (2003), 250-303 … … 14 14 ***** Table : Nb of materials = 4 ***** 15 15 16 Material: Beryllium density: 1.848 g/cm3 RadL: 35.276 cm Nucl.Int.Length: 39.4 13cm Imean: 63.700 eV16 Material: Beryllium density: 1.848 g/cm3 RadL: 35.276 cm Nucl.Int.Length: 39.449 cm Imean: 63.700 eV 17 17 ---> Element: Beryllium ( ) Z = 4.0 N = 9.0 A = 9.01 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 % 18 18 19 Material: Carbon density: 2.265 g/cm3 RadL: 18.851 cm Nucl.Int.Length: 35. 388cm Imean: 81.000 eV19 Material: Carbon density: 2.265 g/cm3 RadL: 18.851 cm Nucl.Int.Length: 35.410 cm Imean: 81.000 eV 20 20 ---> Element: Carbon ( ) Z = 6.0 N = 12.0 A = 12.01 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 % 21 21 22 Material: Iron density: 7.870 g/cm3 RadL: 1.759 cm Nucl.Int.Length: 16.9 99 cm Imean: 286.000 eV22 Material: Iron density: 7.870 g/cm3 RadL: 1.759 cm Nucl.Int.Length: 16.969 cm Imean: 286.000 eV 23 23 ---> Element: Iron ( ) Z = 26.0 N = 55.8 A = 55.85 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 % 24 24 25 Material: Vacuum density: 0.000 kg/m3 RadL: 25050955080.963 km Nucl.Int.Length: 556 27598682.933 km Imean: 82.000 eV temperature: 296.15 K pressure: 0.00 atm25 Material: Vacuum density: 0.000 kg/m3 RadL: 25050955080.963 km Nucl.Int.Length: 55654089760.283 km Imean: 82.000 eV temperature: 296.15 K pressure: 0.00 atm 26 26 ---> Element: Vacuum ( ) Z = 7.0 N = 14.0 A = 14.01 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 % 27 27 … … 71 71 phot: for gamma SubType= 12 72 72 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 73 PhotoElectric : Emin= 0 eV Emax=10 TeV73 PhotoElectric : Emin= 0 eV Emax= 10 TeV 74 74 75 75 compt: for gamma SubType= 13 76 76 Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1 77 77 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 78 Klein-Nishina : Emin= 0 eV Emax=10 TeV78 Klein-Nishina : Emin= 0 eV Emax= 10 TeV 79 79 80 80 conv: for gamma SubType= 14 81 81 Lambda tables from 1.022 MeV to 10 TeV in 77 bins, spline: 1 82 82 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 83 Bethe-Heitler : Emin= 0 eV Emax=10 TeV83 BetheHeitler : Emin= 0 eV Emax= 10 TeV 84 84 85 85 msc: for e- SubType= 10 … … 87 87 RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1 88 88 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 89 UrbanMsc93 : Emin= 0 eV Emax=10 TeV89 UrbanMsc93 : Emin= 0 eV Emax= 10 TeV 90 90 91 91 eIoni: for e- SubType= 2 … … 93 93 Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 94 94 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 95 MollerBhabha : Emin= 0 eV Emax=10 TeV95 MollerBhabha : Emin= 0 eV Emax= 10 TeV 96 96 97 97 eBrem: for e- SubType= 3 … … 101 101 LPM flag: 1 for E > 1 GeV 102 102 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 103 eBrem : Emin= 0 eV Emax= 1 GeV104 eBrem Rel : Emin= 1 GeV Emax= 10 TeV103 eBrem : Emin= 0 eV Emax= 1 GeV AngularGenUrban 104 eBremLPM : Emin= 1 GeV Emax= 10 TeV AngularGenUrban 105 105 106 106 SynRad: Incoherent Synchrotron Radiation … … 111 111 Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 112 112 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 113 MollerBhabha : Emin= 0 eV Emax=10 TeV113 MollerBhabha : Emin= 0 eV Emax= 10 TeV 114 114 115 115 eBrem: for e+ SubType= 3 … … 119 119 LPM flag: 1 for E > 1 GeV 120 120 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 121 eBrem : Emin= 0 eV Emax= 1 GeV122 eBrem Rel : Emin= 1 GeV Emax= 10 TeV121 eBrem : Emin= 0 eV Emax= 1 GeV AngularGenUrban 122 eBremLPM : Emin= 1 GeV Emax= 10 TeV AngularGenUrban 123 123 124 124 annihil: for e+ SubType= 5 125 125 Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1 126 126 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 127 eplus2gg : Emin= 0 eV Emax=10 TeV127 eplus2gg : Emin= 0 eV Emax= 10 TeV 128 128 129 129 muMsc: for mu+ SubType= 10 … … 131 131 RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 0 132 132 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 133 UrbanMsc90 : Emin= 0 eV Emax=10 TeV133 UrbanMsc90 : Emin= 0 eV Emax= 10 TeV 134 134 135 135 muIoni: for mu+ SubType= 2 … … 138 138 finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 139 139 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 140 Bragg : Emin= 0 eV Emax=200 keV141 BetheBloch : Emin= 200 keV Emax=1 GeV142 MuBetheBloch : Emin= 1 GeV Emax=10 TeV140 Bragg : Emin= 0 eV Emax= 200 keV 141 BetheBloch : Emin= 200 keV Emax= 1 GeV 142 MuBetheBloch : Emin= 1 GeV Emax= 10 TeV 143 143 144 144 muBrems: for mu+ SubType= 3 … … 146 146 Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 147 147 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 148 MuBrem : Emin= 0 eV Emax=10 TeV148 MuBrem : Emin= 0 eV Emax= 10 TeV 149 149 150 150 muPairProd: for mu+ SubType= 4 … … 152 152 Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 153 153 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 154 muPairProd : Emin= 0 eV Emax=10 TeV154 muPairProd : Emin= 0 eV Emax= 10 TeV 155 155 156 156 muIoni: for mu- SubType= 2 … … 159 159 finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 160 160 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 161 ICRU73QO : Emin= 0 eV Emax=200 keV162 BetheBloch : Emin= 200 keV Emax=1 GeV163 MuBetheBloch : Emin= 1 GeV Emax=10 TeV161 ICRU73QO : Emin= 0 eV Emax= 200 keV 162 BetheBloch : Emin= 200 keV Emax= 1 GeV 163 MuBetheBloch : Emin= 1 GeV Emax= 10 TeV 164 164 165 165 muBrems: for mu- SubType= 3 … … 167 167 Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 168 168 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 169 MuBrem : Emin= 0 eV Emax=10 TeV169 MuBrem : Emin= 0 eV Emax= 10 TeV 170 170 171 171 muPairProd: for mu- SubType= 4 … … 173 173 Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 174 174 ===== EM models for the G4Region DefaultRegionForTheWorld ====== 175 muPairProd : Emin= 0 eV Emax=10 TeV175 muPairProd : Emin= 0 eV Emax= 10 TeV 176 176 177 177 Region <DefaultRegionForTheWorld> -- appears in <Vacuum> world volume … … 216 216 Run Summary 217 217 Number of events processed : 100 218 User=0. 61s Real=0.89s Sys=0s218 User=0.51s Real=0.52s Sys=0s 219 219 Summary for synchrotron radiation : 220 220 Number of photons = 64554 -
trunk/examples/extended/electromagnetic/TestEm16/src/SteppingAction.cc
r1337 r1342 24 24 // ******************************************************************** 25 25 // 26 // $Id: SteppingAction.cc,v 1. 5 2007/01/18 09:07:20 hbuExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: SteppingAction.cc,v 1.6 2010/10/13 13:50:22 vnivanch Exp $ 27 // GEANT4 tag $Name: examples-V09-03-09 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 37 37 #include "G4UnitsTable.hh" 38 38 #include "HistoManager.hh" 39 #include "G4EmProcessSubType.hh" 39 40 40 41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 53 54 void SteppingAction::UserSteppingAction(const G4Step* aStep) 54 55 { 55 const G4VProcess* process = aStep->GetPostStepPoint()->GetProcessDefinedStep(); 56 if (process == 0) return; 57 G4String processName = process->GetProcessName(); 58 static G4int iCalled=0; 59 const G4int nprint=0; // set to 10 to get debug print for first 10 calls 56 const G4VProcess* process = aStep->GetPostStepPoint()->GetProcessDefinedStep(); 57 if (process == 0) { return; } 60 58 61 if (processName == "SynRad") 62 { 63 iCalled++; 64 G4StepPoint* PrePoint = aStep->GetPreStepPoint(); 65 G4TrackVector* secondary = fpSteppingManager->GetSecondary(); 59 static G4int iCalled=0; 60 const G4int nprint=0; // set to 10 to get debug print for first 10 calls 66 61 67 //(*secondary)[lp-1] points to the last photon generated 68 // 69 size_t lp=(*secondary).size(); 70 if (lp) 71 { 72 G4double Egamma = (*secondary)[lp-1]->GetTotalEnergy(); 73 runAction->n_gam_sync++; 74 runAction->e_gam_sync += Egamma; 75 runAction->e_gam_sync2 += Egamma*Egamma; 76 if (Egamma > runAction->e_gam_sync_max) runAction->e_gam_sync_max = Egamma; 77 runAction->lam_gam_sync += aStep->GetStepLength(); 78 if (iCalled<nprint) 79 { 80 G4double Eelec = PrePoint->GetTotalEnergy(); 81 G4ThreeVector Pelec = PrePoint->GetMomentum(); 82 G4ThreeVector PGamma = (*secondary)[lp-1]->GetMomentum(); 83 G4bool IsGamma = 84 ((*secondary)[lp-1]->GetDefinition() == G4Gamma::GammaDefinition()); 62 if (fSynchrotronRadiation == process->GetProcessSubType()) 63 { 64 ++iCalled; 65 const G4StepPoint* PrePoint = aStep->GetPreStepPoint(); 66 const G4TrackVector* secondary = fpSteppingManager->GetSecondary(); 67 68 //(*secondary)[lp-1] points to the last photon generated 69 // 70 size_t lp=(*secondary).size(); 71 if (lp) 72 { 73 G4double Egamma = (*secondary)[lp-1]->GetTotalEnergy(); 74 runAction->n_gam_sync++; 75 runAction->e_gam_sync += Egamma; 76 runAction->e_gam_sync2 += Egamma*Egamma; 77 if (Egamma > runAction->e_gam_sync_max) 78 { 79 runAction->e_gam_sync_max = Egamma; 80 } 81 runAction->lam_gam_sync += aStep->GetStepLength(); 82 if (iCalled<nprint) 83 { 84 G4double Eelec = PrePoint->GetTotalEnergy(); 85 G4ThreeVector Pelec = PrePoint->GetMomentum(); 86 G4ThreeVector PGamma = (*secondary)[lp-1]->GetMomentum(); 87 G4bool IsGamma = 88 ((*secondary)[lp-1]->GetDefinition() == G4Gamma::Gamma()); 85 89 86 G4cout << "UserSteppingAction processName=" << process->GetProcessName() 87 << " Step Length=" << std::setw(6) 88 << G4BestUnit(aStep->GetStepLength(),"Length") 89 << " Eelec=" << G4BestUnit(Eelec,"Energy") 90 << " Pelec=" << G4BestUnit(Pelec,"Energy") 91 << " IsGamma=" << IsGamma 92 << " Egamma=" << G4BestUnit(Egamma,"Energy") 93 << " PGamma=" << G4BestUnit(PGamma,"Energy") 94 << " #secondaries lp=" << lp 95 << '\n'; 96 } 97 histoManager->FillHisto(1,Egamma); 98 histoManager->FillHisto(2,Egamma,Egamma/keV); // power spectrum : gamma weighted with its energy 99 histoManager->FillHisto(3,aStep->GetStepLength()); 100 } 101 } 90 G4cout << "UserSteppingAction processName=" << process->GetProcessName() 91 << " Step Length=" << std::setw(6) 92 << G4BestUnit(aStep->GetStepLength(),"Length") 93 << " Eelec=" << G4BestUnit(Eelec,"Energy") 94 << " Pelec=" << G4BestUnit(Pelec,"Energy") 95 << " IsGamma=" << IsGamma 96 << " Egamma=" << G4BestUnit(Egamma,"Energy") 97 << " PGamma=" << G4BestUnit(PGamma,"Energy") 98 << " #secondaries lp=" << lp 99 << '\n'; 100 } 101 histoManager->FillHisto(1,Egamma); 102 102 103 // power spectrum : gamma weighted with its energy 104 histoManager->FillHisto(2,Egamma,Egamma/keV); 105 106 histoManager->FillHisto(3,aStep->GetStepLength()); 107 } 108 } 103 109 } 104 110
Note: See TracChangeset
for help on using the changeset viewer.