Ignore:
Timestamp:
Sep 30, 2010, 2:47:17 PM (14 years ago)
Author:
garnier
Message:

tag geant4.9.4 beta 1 + modifs locales

Location:
trunk/examples/advanced/xray_telescope
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/advanced/xray_telescope/include/XrayTelAnalysis.hh

    r1230 r1337  
    2626//
    2727// $Id: XrayTelAnalysis.hh,v 1.10 2006/06/29 16:29:39 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030// Author: A. Pfeiffer (Andreas.Pfeiffer@cern.ch)
  • trunk/examples/advanced/xray_telescope/include/XrayTelPhysicsList.hh

    r807 r1337  
    7171  void      SetCutForGamma(G4double);
    7272  void      SetCutForElectron(G4double);
    73   void      SetCutForProton(G4double);           
    7473  G4double  GetCutForGamma() const;
    7574  G4double  GetCutForElectron() const;
    76   G4double  GetCutForProton() const;
    7775   
    7876protected:
     
    8280  void ConstructMesons();
    8381  void ConstructBaryons();
     82  void ConstructIons();
    8483  void ConstructAllShortLiveds();
    8584
     
    9291  G4double cutForGamma;
    9392  G4double cutForElectron;
    94   G4double cutForProton;
    9593};
    9694
  • trunk/examples/advanced/xray_telescope/src/XrayTelAnalysis.cc

    r1230 r1337  
    2626//
    2727// $Id: XrayTelAnalysis.cc,v 1.12 2006/06/29 16:30:00 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030// Author:  A. Pfeiffer (Andreas.Pfeiffer@cern.ch)
  • trunk/examples/advanced/xray_telescope/src/XrayTelPhysicsList.cc

    r807 r1337  
    5959#include "G4MaterialTable.hh"
    6060#include "G4ios.hh"
     61// Hadrons
     62#include "G4MesonConstructor.hh"
     63#include "G4BaryonConstructor.hh"
     64#include "G4IonConstructor.hh"
    6165
    6266#include "globals.hh"
     
    6872  // Default cut values
    6973  defaultCutValue = 2.0*mm;
    70   cutForGamma     = 1.0*micrometer;
    71   cutForElectron  = 1.0*micrometer;
    72   cutForProton    = 1.0*micrometer;
     74  cutForGamma     = 1.0*m;
     75  cutForElectron  = 1.0*m;
    7376
    7477  SetVerboseLevel(1);
     
    8588  ConstructMesons();
    8689  ConstructBaryons();
     90  ConstructIons();
    8791  ConstructAllShortLiveds();
    8892}
     
    115119void XrayTelPhysicsList::ConstructMesons()
    116120{
     121  // mesons
     122  G4MesonConstructor mConstructor;
     123  mConstructor.ConstructParticle();
    117124}
    118125void XrayTelPhysicsList::ConstructBaryons()
    119126{
    120127  //  barions
    121   G4Proton::ProtonDefinition();
    122   G4AntiProton::AntiProtonDefinition();
    123   G4Neutron::NeutronDefinition();
    124   G4AntiNeutron::AntiNeutronDefinition();
     128  G4BaryonConstructor bConstructor;
     129  bConstructor.ConstructParticle();
     130}
     131void XrayTelPhysicsList::ConstructIons()
     132{
     133  // ions
     134  G4IonConstructor iConstructor;
     135  iConstructor.ConstructParticle();
    125136}
    126137void XrayTelPhysicsList::ConstructAllShortLiveds()
     
    140151#include "G4GammaConversion.hh"
    141152#include "G4PhotoElectricEffect.hh"
     153
     154#include "G4eMultipleScattering.hh"
     155#include "G4hMultipleScattering.hh"
     156
    142157#include "G4eIonisation.hh"
    143158#include "G4eBremsstrahlung.hh"
    144159#include "G4eplusAnnihilation.hh"
    145 #include "G4MultipleScattering.hh"
    146 #include "G4hLowEnergyIonisation.hh"
     160
     161#include "G4MuIonisation.hh"
     162#include "G4MuBremsstrahlung.hh"
     163#include "G4MuPairProduction.hh"
     164
     165#include "G4hIonisation.hh"
     166#include "G4hBremsstrahlung.hh"
     167#include "G4hPairProduction.hh"
     168
     169#include "G4ionIonisation.hh"
    147170
    148171void XrayTelPhysicsList::ConstructEM()
     
    166189        {
    167190          //electron
    168           pmanager->AddProcess(new G4MultipleScattering(),-1, 1,1);
     191          pmanager->AddProcess(new G4eMultipleScattering(),-1, 1,1);
    169192          pmanager->AddProcess(new G4eIonisation(),       -1, 2,2);
    170           pmanager->AddProcess(new G4eBremsstrahlung(),   -1,-1,3);
    171         }
    172       else if (particleName == "e+")
    173         {
     193          pmanager->AddProcess(new G4eBremsstrahlung(),   -1, 3,3);
     194
     195        } else if (particleName == "e+") {
     196
    174197          //positron
    175           pmanager->AddProcess(new G4MultipleScattering(),-1, 1,1);
     198          pmanager->AddProcess(new G4eMultipleScattering(),-1, 1,1);
    176199          pmanager->AddProcess(new G4eIonisation(),       -1, 2,2);
    177           pmanager->AddProcess(new G4eBremsstrahlung(),   -1,-1,3);
     200          pmanager->AddProcess(new G4eBremsstrahlung(),   -1, 3,3);
    178201          pmanager->AddProcess(new G4eplusAnnihilation(),  0,-1,4);
    179         }
    180       else if ((!particle->IsShortLived()) &&
     202
     203        } else if( particleName == "mu-" ||
     204                   particleName == "mu+" ) {
     205
     206          //muon 
     207          pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
     208          pmanager->AddProcess(new G4MuIonisation,        -1, 2, 2);
     209          pmanager->AddProcess(new G4MuBremsstrahlung,    -1, 3, 3);
     210          pmanager->AddProcess(new G4MuPairProduction,    -1, 4, 4);
     211         
     212        } else if( particleName == "pi-" ||
     213                   particleName == "pi+" ) {
     214
     215          //pions
     216          pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
     217          pmanager->AddProcess(new G4hIonisation,         -1, 2, 2);
     218          pmanager->AddProcess(new G4hBremsstrahlung,     -1, 3, 3);
     219          pmanager->AddProcess(new G4hPairProduction,     -1, 4, 4);       
     220     
     221        } else if( particleName == "proton" ) {
     222
     223          //proton 
     224          pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
     225          pmanager->AddProcess(new G4hIonisation,         -1, 2, 2);
     226          pmanager->AddProcess(new G4hBremsstrahlung,     -1, 3, 3);
     227          pmanager->AddProcess(new G4hPairProduction,     -1, 4, 4);       
     228     
     229        } else if( particleName == "alpha" ||
     230                   particleName == "He3" ||
     231                   particleName == "GenericIon" ) {
     232
     233          //Ions
     234          pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
     235          pmanager->AddProcess(new G4ionIonisation,       -1, 2, 2);
     236         
     237        } else if ((!particle->IsShortLived()) &&
    181238               (particle->GetPDGCharge() != 0.0) &&
    182                (particle->GetParticleName() != "chargedgeantino"))
    183         {
     239               (particle->GetParticleName() != "chargedgeantino")) {
     240
    184241          //all others charged particles except geantino
    185           pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
    186 
    187           G4double demax = 0.05;  // try to lose at most 5% of the energy in
    188           //    a single step (in limit of large energies)
    189           G4double stmin = 1.e-9 * m;  // length of the final step: 10 angstrom
    190           // reproduced angular distribution of TRIM
    191 
    192           G4hLowEnergyIonisation* lowEIonisation = new G4hLowEnergyIonisation();
    193           pmanager->AddProcess( lowEIonisation, -1,2,2);
    194           lowEIonisation->SetStepFunction( demax, stmin );
     242          pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
     243          pmanager->AddProcess(new G4hIonisation,         -1, 2, 2);
     244
    195245        }
    196246    }
     
    227277  SetCutValue(cutForElectron, "e+");
    228278
    229   // set cut values for proton
    230   SetCutValue(cutForProton, "proton");
    231   SetCutValue(cutForProton, "anti_proton");
    232 
    233279  // SetCutValueForOthers(defaultCutValue);
    234280 
     
    250296}
    251297
    252 void XrayTelPhysicsList::SetCutForProton(G4double cut)
    253 {
    254   ResetCuts();
    255   cutForProton = cut;
    256 }
    257 
    258298G4double XrayTelPhysicsList::GetCutForGamma() const
    259299{
     
    266306}
    267307
    268 G4double XrayTelPhysicsList::GetCutForProton() const
    269 {
    270   return cutForProton;
    271 }
    272 
    273 
    274 
    275 
    276 
     308
     309
     310
     311
  • trunk/examples/advanced/xray_telescope/src/XrayTelSteppingAction.cc

    r807 r1337  
    6767#include "G4Step.hh"
    6868#include "G4RunManager.hh"
    69 #include "XrayTelEventAction.hh"
    7069#include "XrayTelRunAction.hh"
    7170#include "XrayTelAnalysis.hh"
     
    9695      entering = true;
    9796
    98       // Notify the corresponding UserAction that the event must be visualised
    9997      G4RunManager* runManager = G4RunManager::GetRunManager();
    100       // Casting is safe here: one knows the RTTI of the UserActions
    101       // in the current application (otherwise one could dynamic_cast)
    102       XrayTelEventAction* eventAction = (XrayTelEventAction*) runManager->GetUserEventAction();
    103       eventAction->Update();
    10498
    10599      // Notify the corresponding UserAction to update the run counters
  • trunk/examples/advanced/xray_telescope/test.out

    r1313 r1337  
    11**********************************************
    2  Geant4 version $Name: geant4-09-04-beta-cand-00 $
     2 Geant4 version $Name: geant4-09-04-beta-01 $
    33                                (19-May-2003)
    44             Copyright : Geant4 Collaboration
Note: See TracChangeset for help on using the changeset viewer.