Import Geant4 6.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:56:29 +02:00
parent 1d812b78b1
commit e083ffb441
1415 changed files with 111223 additions and 21207 deletions
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.9 2003/10/06 10:02:19 maire Exp $
# $Id: GNUmakefile,v 1.11 2004/03/31 11:34:57 maire Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -14,15 +14,19 @@ endif
.PHONY: all
all: lib bin
####G4ANALYSIS_USE := true
#### G4ANALYSIS_USE := true
ifdef G4ANALYSIS_USE
CPPFLAGS += -DG4ANALYSIS_USE
USE_AIDA := true
endif
ifdef USE_AIDA
CPPFLAGS += -DUSE_AIDA
endif
include $(G4INSTALL)/config/architecture.gmk
ifdef G4ANALYSIS_USE
ifdef USE_AIDA
# for the aida-config command see the README file
CPPFLAGS += `aida-config --include`
LDFLAGS += `aida-config --lib`
@@ -1,4 +1,4 @@
$Id: History,v 1.41 2003/11/25 18:43:35 vnivanch Exp $
$Id: History,v 1.46 2004/06/09 15:29:41 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,21 @@ track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
09-06-04 mma (testem1-V06-01-03)
- PhysicsLists: remove Particles and General
13-04-04 mma (testem1-V06-01-02)
- EmPhysicsList: set G4eBremsstrahlungCMS as default
05-04-04 V.Ivan. (testem1-V06-01-01)
- fix G4eBremsstrahlungCMS
31-03-04 mma (testem1-V06-01-00)
- remove ROOT histos
15-03-04 mma (testem1-V06-00-00)
- example of histograms with ROOT: USE_ROOT
25-11-03 V.Ivanchenko (testem1-V05-02-06)
- Fix geometry (G.Cosmo)
@@ -1,4 +1,4 @@
$Id: README,v 1.8 2003/10/06 10:02:19 maire Exp $
$Id: README,v 1.12 2004/06/23 11:31:00 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -94,7 +94,7 @@ $Id: README,v 1.8 2003/10/06 10:02:19 maire Exp $
7- HISTOGRAMS
Testem1 produces several histo which are saved as testem1.paw
Testem1 produces several histo which are saved as testem1.paw
Content of these histo:
@@ -105,18 +105,35 @@ $Id: README,v 1.8 2003/10/06 10:02:19 maire Exp $
Note that, by default, histograms are disabled. To activate them, uncomment
the flag G4ANALYSIS_USE in GNUmakefile.
8- Using the Anaphe implementation of the AIDA 3.0 histograms:
--------------------------------------------------------------
In order to use the Anaphe implementation of the AIDA 3.0 interfaces,
the 'aida-config' command (which is used in the GNUmakefile) is
available at:
/afs/cern.ch/sw/lhcxx/share/LHCXX/latest/scripts/aida-config
8- Using histograms
-------------------
In order to run the executable, you need to source the following
script (once):
$HOME/bin/setupAnaphe.csh (or $HOME/bin/setupAnaphe)
By default the histograms are not activated. To activate histograms
the environment variable G4ANALYSIS_USE should be defined. For instance
uncomment the flag G4ANALYSIS_USE in GNUmakefile.
To use histograms any of implementations of AIDA interfaces should
be available (see http://aida.freehep.org).
A package including AIDA and extended interfaces also using Python
is PI, available from: http://cern.ch/pi .
Once installed PI or PI-Lite in a specified local area $MYPY, it is
required to add the installation path to $PATH, i.e. for example,
for release 1.2.1 of PI:
setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin
CERN users can use the PATH to the LCG area on AFS.
Before compilation of the example it is optimal to clean up old
files:
gmake histclean
gmake
Before running the example the command should be issued:
eval `aida-config --runtime csh`
At cern 'setupAnaphe' is available at:
/afs/cern.ch/sw/lhcxx/share/LHCXX/latest/scripts/setupAnaphe.csh
(or /afs/cern.ch/sw/lhcxx/share/LHCXX/latest/scripts/setupAnaphe)
@@ -1,8 +1,8 @@
*************************************************************
Geant4 version $Name: geant4-06-01 $ (25-March-2004)
Geant4 version $Name: geant4-06-02 $ (25-June-2004)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303.
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
@@ -104,11 +104,12 @@ eIoni: tables are built for e-
Step function: finalRange(mm)= 0.0017, dRoverRange= 0.183, integral: 1
Delta cross sections from Moller+Bhabha, good description from 1 KeV to 100 GeV.
eBrem: tables are built for e-
brCMS: tables are built for e-
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Total cross sections from a parametrisation based on the EEDL data library.
Good description from 1 KeV to 100 GeV, log scale extrapolation above 100 GeV.
Gamma high energy threshold 10 MeV
eIoni: tables are built for e+
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
@@ -116,11 +117,12 @@ eIoni: tables are built for e+
Step function: finalRange(mm)= 0.0017, dRoverRange= 0.183, integral: 1
Delta cross sections from Moller+Bhabha, good description from 1 KeV to 100 GeV.
eBrem: tables are built for e+
brCMS: tables are built for e+
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Total cross sections from a parametrisation based on the EEDL data library.
Good description from 1 KeV to 100 GeV, log scale extrapolation above 100 GeV.
Gamma high energy threshold 10 MeV
annihil: Total cross section from Heilter formula(annihilation into 2 photons).
gamma energies sampled according Heitler
@@ -133,8 +135,8 @@ msc: Model variant of multiple scattering for proton
hIoni: tables are built for proton
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Step function: finalRange(mm)= 0.0017, dRoverRange= 0.183, integral: 0
Bether-Bloch model for Escaled > 2 MeV, parametrisation of Bragg peak below, Integral mode 0
Step function: finalRange(mm)= 0.0017, dRoverRange= 0.183, integral: 1
Bether-Bloch model for Escaled > 2 MeV, parametrisation of Bragg peak below, Integral mode 1
msc: Model variant of multiple scattering for mu+
Lambda tables from 100 eV to 100 TeV in 120 bins.
@@ -143,7 +145,7 @@ msc: Model variant of multiple scattering for mu+
MuIoni: tables are built for mu+
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Step function: finalRange(mm)= 0.0017, dRoverRange= 0.183, integral: 0
Step function: finalRange(mm)= 0.0017, dRoverRange= 0.183, integral: 1
Bether-Bloch model for E > 0.2 MeV, parametrisation of Bragg peak below,
radiative corrections for E > 1 GeV
@@ -161,7 +163,7 @@ MuPairProd: tables are built for mu+
MuIoni: tables are built for mu-
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Step function: finalRange(mm)= 0.0017, dRoverRange= 0.183, integral: 0
Step function: finalRange(mm)= 0.0017, dRoverRange= 0.183, integral: 1
Bether-Bloch model for E > 0.2 MeV, parametrisation of Bragg peak below,
radiative corrections for E > 1 GeV
@@ -201,20 +203,20 @@ Start Run processing.
Run terminated.
Run Summary
Number of events processed : 100
User=26s Real=41s Sys=10s
User=28s Real=43s Sys=10s
nb tracks/event neutral: 27.2700 charged: 695.2400
nb steps/event neutral: 149.2500 charged: 3410.4800
nb tracks/event neutral: 27.0700 charged: 701.4100
nb steps/event neutral: 145.7600 charged: 3504.0700
total energy deposit: 100.0000 MeV
nb of process calls per event:
eIoni eBrem compt phot conv annihil
3383.5800 25.3200 121.9800 25.6900 1.5800 1.5800
eIoni brCMS phot compt conv annihil
3477.4900 25.1900 25.6800 118.6900 1.3900 1.3900
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 1351988378, 1579045124
Current couple of seeds = 1009674686, 985243040
----------------------------------------
Graphics systems deleted.
Visualization Manager deleting...
@@ -22,11 +22,13 @@
/run/initialize
#/run/beamOn 1
#
/process/eLoss/verbose 0
/process/inactivate phot
/process/inactivate compt
/process/inactivate conv
/process/inactivate eIoni
/process/inactivate msc
/process/inactivate eBrem
#/process/inactivate msc
#
#/process/eLoss/fluct false
#/process/eLoss/integral false
@@ -1,65 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: PhysListGeneral.hh,v 1.1 2003/10/06 10:02:25 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PhysListGeneral_h
#define PhysListGeneral_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class PhysListGeneral : public G4VPhysicsConstructor
{
public:
PhysListGeneral(const G4String& name = "general");
~PhysListGeneral();
public:
// This method is dummy for physics
void ConstructParticle() {};
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
void ConstructProcess();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -1,65 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: PhysListParticles.hh,v 1.1 2003/10/06 10:02:25 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PhysListParticles_h
#define PhysListParticles_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class PhysListParticles : public G4VPhysicsConstructor
{
public:
PhysListParticles(const G4String& name = "particles");
~PhysListParticles();
public:
// This method will be invoked in the Construct() method.
// each particle type will be instantiated
void ConstructParticle();
// This method is dummy.
void ConstructProcess() {};
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: PhysicsList.hh,v 1.1 2003/10/06 10:02:25 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: PhysicsList.hh,v 1.2 2004/06/09 15:29:43 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
@@ -66,8 +66,6 @@ class PhysicsList: public G4VModularPhysicsList
G4double currentDefaultCut;
G4VPhysicsConstructor* emPhysicsList;
G4VPhysicsConstructor* generalPhysicsList;
G4VPhysicsConstructor* particleList;
G4String emName;
DetectorConstruction* pDet;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: RunAction.hh,v 1.2 2003/10/28 10:27:25 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: RunAction.hh,v 1.4 2004/03/31 11:34:58 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
@@ -40,13 +40,15 @@
class G4Run;
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
namespace AIDA {
class ITree;
class IHistogram1D;
}
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class RunAction : public G4UserRunAction
{
public:
@@ -64,10 +66,10 @@ class RunAction : public G4UserRunAction
void CountSteps1(G4int ns) { NbOfSteps1 += ns;}
void CountProcesses(G4String);
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
AIDA::IHistogram1D* GetHisto(G4int id) {return histo[id];}
#endif
private:
void bookHisto();
void cleanHisto();
@@ -78,10 +80,10 @@ class RunAction : public G4UserRunAction
G4double edep;
ProcessesCount* ProcCounter;
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
AIDA::ITree* tree;
AIDA::IHistogram1D* histo[3];
#endif
#endif
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,8 +22,8 @@
//
//
// $Id: DetectorConstruction.cc,v 1.2 2003/11/25 15:19:04 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: DetectorConstruction.cc,v 1.3 2004/03/15 11:09:36 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: EventAction.cc,v 1.2 2003/10/08 17:55:34 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: EventAction.cc,v 1.3 2004/03/15 11:09:36 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
@@ -84,9 +84,9 @@ void EventAction::EndOfEventAction(const G4Event* evt)
for(G4int i=0; i<n_trajectories; i++)
{ G4Trajectory* trj = (G4Trajectory*)
((*(evt->GetTrajectoryContainer()))[i]);
if (drawFlag == "all") trj->DrawTrajectory(50);
if (drawFlag == "all") trj->DrawTrajectory(1000);
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
trj->DrawTrajectory(50);
trj->DrawTrajectory(1000);
}
}
}
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4eBremsstrahlungCMS.cc,v 1.4 2003/10/28 10:27:26 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4eBremsstrahlungCMS.cc,v 1.5 2004/04/05 19:04:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
// -------------------------------------------------------------------
//
@@ -37,6 +37,7 @@
// Modifications:
//
// 17-10-03 model variant (V.Ivanchenko)
// 05-04-03 Migrate to ParticleChangeForLoss (V.Ivanchenko)
//
// -------------------------------------------------------------------
//
@@ -65,20 +66,20 @@ void G4eBremsstrahlungCMS::SecondariesPostStep( G4VEmModel* model,
G4double& tcut,
G4double& kinEnergy)
{
G4DynamicParticle* gamma = model->SampleSecondary(couple, dp, tcut, kinEnergy);
G4DynamicParticle* gamma = model->SampleSecondary(couple, dp, tcut, kinEnergy);
G4double gammaEnergy = gamma->GetKineticEnergy();
kinEnergy -= gammaEnergy;
G4int nSecond = 1;
if(gammaEnergy > gammaThreshold) nSecond = 2;
aParticleChange.SetNumberOfSecondaries(nSecond);
aParticleChange.AddSecondary(gamma);
aParticleChange.SetLocalEnergyDeposit(0.0);
fParticleChange.SetNumberOfSecondaries(nSecond);
fParticleChange.AddSecondary(gamma);
fParticleChange.SetLocalEnergyDeposit(0.0);
if(nSecond == 2) {
aParticleChange.SetStatusChange(fStopAndKill);
fParticleChange.SetStatusChange(fStopAndKill);
G4DynamicParticle* el = new G4DynamicParticle(dp->GetDefinition(),
dp->GetMomentumDirection(),
kinEnergy);
aParticleChange.AddSecondary(el);
fParticleChange.AddSecondary(el);
}
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: PhysListEmStandard.cc,v 1.5 2003/10/24 12:06:36 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: PhysListEmStandard.cc,v 1.6 2004/04/13 15:07:00 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -82,15 +82,15 @@ void PhysListEmStandard::ConstructProcess()
//electron
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
///pmanager->AddProcess(new G4eBremsstrahlungCMS("brCMS", 10*MeV),-1,3,3);
///pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
pmanager->AddProcess(new G4eBremsstrahlungCMS("brCMS", 10*MeV),-1,3,3);
} else if (particleName == "e+") {
//positron
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
///pmanager->AddProcess(new G4eBremsstrahlungCMS("brCMS", 10*MeV),-1,3,3);
///pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
pmanager->AddProcess(new G4eBremsstrahlungCMS("brCMS", 10*MeV),-1,3,3);
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
} else if( particleName == "mu+" ||
@@ -1,72 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: PhysListGeneral.cc,v 1.1 2003/10/06 10:02:32 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysListGeneral.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4Decay.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListGeneral::PhysListGeneral(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListGeneral::~PhysListGeneral()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysListGeneral::ConstructProcess()
{
// Add Decay Process
G4Decay* fDecayProcess = new G4Decay();
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (fDecayProcess->IsApplicable(*particle)) {
pmanager ->AddProcess(fDecayProcess);
// set ordering for PostStepDoIt and AtRestDoIt
pmanager ->SetProcessOrdering(fDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(fDecayProcess, idxAtRest);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,141 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: PhysListParticles.cc,v 1.1 2003/10/06 10:02:32 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysListParticles.hh"
// Bosons
#include "G4ChargedGeantino.hh"
#include "G4Geantino.hh"
#include "G4Gamma.hh"
#include "G4OpticalPhoton.hh"
// leptons
#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
#include "G4NeutrinoMu.hh"
#include "G4AntiNeutrinoMu.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4NeutrinoE.hh"
#include "G4AntiNeutrinoE.hh"
// Mesons
#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4PionZero.hh"
#include "G4Eta.hh"
#include "G4EtaPrime.hh"
#include "G4KaonPlus.hh"
#include "G4KaonMinus.hh"
#include "G4KaonZero.hh"
#include "G4AntiKaonZero.hh"
#include "G4KaonZeroLong.hh"
#include "G4KaonZeroShort.hh"
// Baryons
#include "G4Proton.hh"
#include "G4AntiProton.hh"
#include "G4Neutron.hh"
#include "G4AntiNeutron.hh"
// Nuclei
#include "G4Alpha.hh"
#include "G4Deuteron.hh"
#include "G4Triton.hh"
#include "G4He3.hh"
#include "G4GenericIon.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListParticles::PhysListParticles(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListParticles::~PhysListParticles()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysListParticles::ConstructParticle()
{
// pseudo-particles
G4Geantino::GeantinoDefinition();
G4ChargedGeantino::ChargedGeantinoDefinition();
// gamma
G4Gamma::GammaDefinition();
// optical photon
G4OpticalPhoton::OpticalPhotonDefinition();
// leptons
G4Electron::ElectronDefinition();
G4Positron::PositronDefinition();
G4MuonPlus::MuonPlusDefinition();
G4MuonMinus::MuonMinusDefinition();
G4NeutrinoE::NeutrinoEDefinition();
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
G4NeutrinoMu::NeutrinoMuDefinition();
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
// mesons
G4PionPlus::PionPlusDefinition();
G4PionMinus::PionMinusDefinition();
G4PionZero::PionZeroDefinition();
G4Eta::EtaDefinition();
G4EtaPrime::EtaPrimeDefinition();
G4KaonPlus::KaonPlusDefinition();
G4KaonMinus::KaonMinusDefinition();
G4KaonZero::KaonZeroDefinition();
G4AntiKaonZero::AntiKaonZeroDefinition();
G4KaonZeroLong::KaonZeroLongDefinition();
G4KaonZeroShort::KaonZeroShortDefinition();
// barions
G4Proton::ProtonDefinition();
G4AntiProton::AntiProtonDefinition();
G4Neutron::NeutronDefinition();
G4AntiNeutron::AntiNeutronDefinition();
// ions
G4Deuteron::DeuteronDefinition();
G4Triton::TritonDefinition();
G4He3::He3Definition();
G4Alpha::AlphaDefinition();
G4GenericIon::GenericIonDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: PhysicsList.cc,v 1.2 2003/10/24 12:06:36 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: PhysicsList.cc,v 1.3 2004/06/09 15:29:45 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -30,8 +30,6 @@
#include "PhysicsList.hh"
#include "PhysicsListMessenger.hh"
#include "PhysListParticles.hh"
#include "PhysListGeneral.hh"
#include "PhysListEmStandard.hh"
#include "PhysListEmG4v52.hh"
#include "DetectorConstruction.hh"
@@ -55,12 +53,6 @@ PhysicsList::PhysicsList(DetectorConstruction* p)
pMessenger = new PhysicsListMessenger(this);
SetVerboseLevel(1);
// Particles
particleList = new PhysListParticles("particles");
// General Physics
generalPhysicsList = new PhysListGeneral("general");
// EM physics
emName = G4String("standard");
@@ -77,18 +69,136 @@ PhysicsList::~PhysicsList()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Bosons
#include "G4ChargedGeantino.hh"
#include "G4Geantino.hh"
#include "G4Gamma.hh"
#include "G4OpticalPhoton.hh"
// leptons
#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
#include "G4NeutrinoMu.hh"
#include "G4AntiNeutrinoMu.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4NeutrinoE.hh"
#include "G4AntiNeutrinoE.hh"
// Mesons
#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4PionZero.hh"
#include "G4Eta.hh"
#include "G4EtaPrime.hh"
#include "G4KaonPlus.hh"
#include "G4KaonMinus.hh"
#include "G4KaonZero.hh"
#include "G4AntiKaonZero.hh"
#include "G4KaonZeroLong.hh"
#include "G4KaonZeroShort.hh"
// Baryons
#include "G4Proton.hh"
#include "G4AntiProton.hh"
#include "G4Neutron.hh"
#include "G4AntiNeutron.hh"
// Nuclei
#include "G4Alpha.hh"
#include "G4Deuteron.hh"
#include "G4Triton.hh"
#include "G4He3.hh"
#include "G4GenericIon.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::ConstructParticle()
{
particleList->ConstructParticle();
// pseudo-particles
G4Geantino::GeantinoDefinition();
G4ChargedGeantino::ChargedGeantinoDefinition();
// gamma
G4Gamma::GammaDefinition();
// optical photon
G4OpticalPhoton::OpticalPhotonDefinition();
// leptons
G4Electron::ElectronDefinition();
G4Positron::PositronDefinition();
G4MuonPlus::MuonPlusDefinition();
G4MuonMinus::MuonMinusDefinition();
G4NeutrinoE::NeutrinoEDefinition();
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
G4NeutrinoMu::NeutrinoMuDefinition();
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
// mesons
G4PionPlus::PionPlusDefinition();
G4PionMinus::PionMinusDefinition();
G4PionZero::PionZeroDefinition();
G4Eta::EtaDefinition();
G4EtaPrime::EtaPrimeDefinition();
G4KaonPlus::KaonPlusDefinition();
G4KaonMinus::KaonMinusDefinition();
G4KaonZero::KaonZeroDefinition();
G4AntiKaonZero::AntiKaonZeroDefinition();
G4KaonZeroLong::KaonZeroLongDefinition();
G4KaonZeroShort::KaonZeroShortDefinition();
// barions
G4Proton::ProtonDefinition();
G4AntiProton::AntiProtonDefinition();
G4Neutron::NeutronDefinition();
G4AntiNeutron::AntiNeutronDefinition();
// ions
G4Deuteron::DeuteronDefinition();
G4Triton::TritonDefinition();
G4He3::He3Definition();
G4Alpha::AlphaDefinition();
G4GenericIon::GenericIonDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4ProcessManager.hh"
#include "G4Decay.hh"
void PhysicsList::ConstructProcess()
{
// Transportation
//
AddTransportation();
generalPhysicsList->ConstructProcess();
// Electromagnetic physics list
//
emPhysicsList->ConstructProcess();
// Decay Process
//
G4Decay* fDecayProcess = new G4Decay();
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (fDecayProcess->IsApplicable(*particle)) {
pmanager ->AddProcess(fDecayProcess);
// set ordering for PostStepDoIt and AtRestDoIt
pmanager ->SetProcessOrdering(fDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(fDecayProcess, idxAtRest);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: RunAction.cc,v 1.3 2003/11/07 15:38:28 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: RunAction.cc,v 1.5 2004/03/31 11:34:59 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -35,14 +35,12 @@
#include "G4Run.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4VVisManager.hh"
#include "G4UnitsTable.hh"
#include "Randomize.hh"
#include <iomanip>
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
#include "AIDA/AIDA.h"
#endif
@@ -63,7 +61,7 @@ RunAction::~RunAction()
void RunAction::bookHisto()
{
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
// Creating the analysis factory
AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
@@ -78,11 +76,10 @@ void RunAction::bookHisto()
// Creating a histogram factory, whose histograms will be handled by the tree
AIDA::IHistogramFactory* hf = af->createHistogramFactory(*tree);
// booking histograms
histo[0] = hf->createHistogram1D("1","track length (mm) of a charged particle",
100,0.,50*cm);
histo[1] = hf->createHistogram1D("2","Nb of steps per track (charged particle)",
histo[1] = hf->createHistogram1D("2","Nb steps per track (charged particle)",
100,0.,100.);
histo[2] = hf->createHistogram1D("3","step length (mm) charged particle",
100,0.,10*mm);
@@ -90,19 +87,18 @@ void RunAction::bookHisto()
delete hf;
delete tf;
delete af;
#endif
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RunAction::cleanHisto()
{
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
tree->commit(); // Writing the histograms to the file
tree->close(); // and closing the tree (and the file)
tree->close(); // and closing the tree (and the file)
delete tree;
#endif
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -122,9 +118,6 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
//histograms
//
if (aRun->GetRunID() == 0) bookHisto();
if (G4VVisManager::GetConcreteInstance())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/scene/notifyHandlers");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -187,10 +180,6 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
delete aProcCount;
}
delete ProcCounter;
//draw the events
if (G4VVisManager::GetConcreteInstance())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
// show Rndm status
HepRandom::showEngineStatus();
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: SteppingAction.cc,v 1.3 2003/11/07 15:38:29 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: SteppingAction.cc,v 1.5 2004/03/31 11:34:59 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
@@ -36,7 +36,7 @@
#include "G4SteppingManager.hh"
#include "G4VProcess.hh"
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
#include "AIDA/IHistogram1D.h"
#endif
@@ -63,11 +63,11 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep)
if (process) runAction->CountProcesses(process->GetProcessName());
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
G4double charge = aStep->GetTrack()->GetDefinition()->GetPDGCharge();
G4double steplen = aStep->GetStepLength();
if (charge != 0.) runAction->GetHisto(2)->fill(steplen);
#endif
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: TrackingAction.cc,v 1.5 2003/10/28 10:27:26 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: TrackingAction.cc,v 1.7 2004/03/31 11:35:00 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -33,7 +33,7 @@
#include "G4Track.hh"
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
#include "AIDA/IHistogram1D.h"
#endif
@@ -70,11 +70,11 @@ void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
runAction->CountTraks1(1);
runAction->CountSteps1(nbSteps);
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
G4double Trleng = aTrack->GetTrackLength();
runAction->GetHisto(0)->fill(Trleng);
runAction->GetHisto(1)->fill((float)nbSteps);
#endif
#endif
}
}