Ignore:
Timestamp:
Nov 5, 2010, 4:08:39 PM (14 years ago)
Author:
garnier
Message:

update ti head

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.13 2010/06/07 05:40:46 perl Exp $
     1$Id: History,v 1.15 2010/10/13 13:50:45 vnivanch Exp $
    22-------------------------------------------------------------------
    33
     
    1515     * Reverse chronological order (last date on top), please *
    1616     ----------------------------------------------------------
     17
     1813-10-10 V.Ivanchenko (testem16-V09-03-03)
     19- SteppingAction - use const pointers for step/track objects;
     20                   use process subtype instead of name
    1721     
    182206-06-10 J.Perl (testem16-V09-03-02)
  • trunk/examples/extended/electromagnetic/TestEm16/TestEm16.out

    r1337 r1342  
    55
    66*************************************************************
    7  Geant4 version Name: geant4-09-03-ref-06    (25-June-2010)
     7 Geant4 version Name: geant4-09-03-ref-09    (25-June-2010)
    88                      Copyright : Geant4 Collaboration
    99                      Reference : NIM A 506 (2003), 250-303
     
    1414***** Table : Nb of materials = 4 *****
    1515
    16  Material: Beryllium     density:  1.848 g/cm3   RadL:  35.276 cm   Nucl.Int.Length:  39.413 cm   Imean:  63.700 eV
     16 Material: Beryllium     density:  1.848 g/cm3   RadL:  35.276 cm   Nucl.Int.Length:  39.449 cm   Imean:  63.700 eV
    1717   --->  Element: Beryllium ( )   Z =  4.0   N =   9.0   A =   9.01 g/mole  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
    1818
    19  Material:   Carbon     density:  2.265 g/cm3   RadL:  18.851 cm   Nucl.Int.Length:  35.388 cm   Imean:  81.000 eV
     19 Material:   Carbon     density:  2.265 g/cm3   RadL:  18.851 cm   Nucl.Int.Length:  35.410 cm   Imean:  81.000 eV
    2020   --->  Element: Carbon ( )   Z =  6.0   N =  12.0   A =  12.01 g/mole  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
    2121
    22  Material:     Iron     density:  7.870 g/cm3   RadL:   1.759 cm   Nucl.Int.Length:  16.999 cm   Imean: 286.000 eV
     22 Material:     Iron     density:  7.870 g/cm3   RadL:   1.759 cm   Nucl.Int.Length:  16.969 cm   Imean: 286.000 eV
    2323   --->  Element: Iron ( )   Z = 26.0   N =  55.8   A =  55.85 g/mole  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
    2424
    25  Material:   Vacuum     density:  0.000 kg/m3   RadL: 25050955080.963 km   Nucl.Int.Length: 55627598682.933 km   Imean:  82.000 eV   temperature: 296.15 K  pressure:   0.00 atm
     25 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
    2626   --->  Element: Vacuum ( )   Z =  7.0   N =  14.0   A =  14.01 g/mole  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
    2727
     
    7171phot:   for  gamma    SubType= 12
    7272      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    73        PhotoElectric :     Emin=          0 eV         Emax=   10 TeV
     73       PhotoElectric :   Emin=        0 eV       Emax=         10 TeV
    7474
    7575compt:   for  gamma    SubType= 13
    7676      Lambda tables from 100 eV  to 10 TeV in 77 bins, spline: 1
    7777      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    78        Klein-Nishina :     Emin=          0 eV         Emax=   10 TeV
     78       Klein-Nishina :   Emin=        0 eV       Emax=         10 TeV
    7979
    8080conv:   for  gamma    SubType= 14
    8181      Lambda tables from 1.022 MeV to 10 TeV in 77 bins, spline: 1
    8282      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    83        Bethe-Heitler :     Emin=          0 eV         Emax=   10 TeV
     83        BetheHeitler :   Emin=        0 eV       Emax=         10 TeV
    8484
    8585msc:   for e-    SubType= 10
     
    8787      RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
    8888      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    89           UrbanMsc93 :     Emin=          0 eV         Emax=   10 TeV
     89          UrbanMsc93 :   Emin=        0 eV       Emax=         10 TeV
    9090
    9191eIoni:   for  e-    SubType= 2
     
    9393      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
    9494      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    95         MollerBhabha :     Emin=          0 eV         Emax=   10 TeV
     95        MollerBhabha :   Emin=        0 eV       Emax=         10 TeV
    9696
    9797eBrem:   for  e-    SubType= 3
     
    101101      LPM flag: 1 for E > 1 GeV
    102102      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    103                eBrem :     Emin=          0 eV         Emax=   1 GeV
    104             eBremRel :     Emin=          1 GeV        Emax=   10 TeV
     103               eBrem :   Emin=        0 eV       Emax=          1 GeV  AngularGenUrban
     104            eBremLPM :   Emin=        1 GeV      Emax=         10 TeV  AngularGenUrban
    105105
    106106SynRad:  Incoherent Synchrotron Radiation
     
    111111      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
    112112      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    113         MollerBhabha :     Emin=          0 eV         Emax=   10 TeV
     113        MollerBhabha :   Emin=        0 eV       Emax=         10 TeV
    114114
    115115eBrem:   for  e+    SubType= 3
     
    119119      LPM flag: 1 for E > 1 GeV
    120120      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    121                eBrem :     Emin=          0 eV         Emax=   1 GeV
    122             eBremRel :     Emin=          1 GeV        Emax=   10 TeV
     121               eBrem :   Emin=        0 eV       Emax=          1 GeV  AngularGenUrban
     122            eBremLPM :   Emin=        1 GeV      Emax=         10 TeV  AngularGenUrban
    123123
    124124annihil:   for  e+    SubType= 5
    125125      Lambda tables from 100 eV  to 10 TeV in 77 bins, spline: 1
    126126      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    127             eplus2gg :     Emin=          0 eV         Emax=   10 TeV
     127            eplus2gg :   Emin=        0 eV       Emax=         10 TeV
    128128
    129129muMsc:   for mu+    SubType= 10
     
    131131      RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 0
    132132      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    133           UrbanMsc90 :     Emin=          0 eV         Emax=   10 TeV
     133          UrbanMsc90 :   Emin=        0 eV       Emax=         10 TeV
    134134
    135135muIoni:   for  mu+    SubType= 2
     
    138138      finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
    139139      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    140                Bragg :     Emin=          0 eV         Emax=   200 keV
    141           BetheBloch :     Emin=        200 keV        Emax=   1 GeV
    142         MuBetheBloch :     Emin=          1 GeV        Emax=   10 TeV
     140               Bragg :   Emin=        0 eV       Emax=        200 keV
     141          BetheBloch :   Emin=      200 keV      Emax=          1 GeV
     142        MuBetheBloch :   Emin=        1 GeV      Emax=         10 TeV
    143143
    144144muBrems:   for  mu+    SubType= 3
     
    146146      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
    147147      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    148               MuBrem :     Emin=          0 eV         Emax=   10 TeV
     148              MuBrem :   Emin=        0 eV       Emax=         10 TeV
    149149
    150150muPairProd:   for  mu+    SubType= 4
     
    152152      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
    153153      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    154           muPairProd :     Emin=          0 eV         Emax=   10 TeV
     154          muPairProd :   Emin=        0 eV       Emax=         10 TeV
    155155
    156156muIoni:   for  mu-    SubType= 2
     
    159159      finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
    160160      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    161             ICRU73QO :     Emin=          0 eV         Emax=   200 keV
    162           BetheBloch :     Emin=        200 keV        Emax=   1 GeV
    163         MuBetheBloch :     Emin=          1 GeV        Emax=   10 TeV
     161            ICRU73QO :   Emin=        0 eV       Emax=        200 keV
     162          BetheBloch :   Emin=      200 keV      Emax=          1 GeV
     163        MuBetheBloch :   Emin=        1 GeV      Emax=         10 TeV
    164164
    165165muBrems:   for  mu-    SubType= 3
     
    167167      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
    168168      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    169               MuBrem :     Emin=          0 eV         Emax=   10 TeV
     169              MuBrem :   Emin=        0 eV       Emax=         10 TeV
    170170
    171171muPairProd:   for  mu-    SubType= 4
     
    173173      Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
    174174      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
    175           muPairProd :     Emin=          0 eV         Emax=   10 TeV
     175          muPairProd :   Emin=        0 eV       Emax=         10 TeV
    176176
    177177Region <DefaultRegionForTheWorld> -- appears in <Vacuum> world volume
     
    216216Run Summary
    217217  Number of events processed : 100
    218   User=0.61s Real=0.89s Sys=0s
     218  User=0.51s Real=0.52s Sys=0s
    219219Summary for synchrotron radiation :
    220220  Number of photons = 64554
  • trunk/examples/extended/electromagnetic/TestEm16/src/SteppingAction.cc

    r1337 r1342  
    2424// ********************************************************************
    2525//
    26 // $Id: SteppingAction.cc,v 1.5 2007/01/18 09:07:20 hbu Exp $
    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 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    3737#include "G4UnitsTable.hh"
    3838#include "HistoManager.hh"
     39#include "G4EmProcessSubType.hh"
    3940
    4041//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    5354void SteppingAction::UserSteppingAction(const G4Step* aStep)
    5455{
    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; }
    6058
    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
    6661
    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());
    8589           
    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);
    102102
     103          // power spectrum : gamma weighted with its energy
     104          histoManager->FillHisto(2,Egamma,Egamma/keV);
     105
     106          histoManager->FillHisto(3,aStep->GetStepLength());
     107        }
     108    }
    103109}
    104110
Note: See TracChangeset for help on using the changeset viewer.