Skip to content
Snippets Groups Projects
Commit 67c4abec authored by Gabriele Cosmo's avatar Gabriele Cosmo
Browse files

Import Geant4 6.2.2 source tree

parent 9eb2178c
No related branches found
No related tags found
No related merge requests found
Showing
with 498 additions and 173 deletions
Geant4 6.2 - patch-02 Release Notes
-----------------------------------
26 October 2004
List of fixes included in this public patch since release 6.2-patch-01:
o Geometry:
--------
+ divisions:
o Removed unnecessary debug printout in method
G4PVDivision::CheckAndSetParamenters().
+ management:
o G4Region: added map for storage of materials/cuts and methods for
handling registration of couples in the map, finding a couple
according to a given material, clearing the map's storage.
Extensions necessary to resolve correct update of material-cut
couples in parameterised geometries by material.
o G4LogicalVolume: added method UpdateMaterial() to refresh a
material/cut couple in the corresponding region.
Extension necessary to resolve correct update of material-cut
couples in parameterised geometries by material.
o Fixed G4RegionStore::Clean() to avoid deletion of world region.
+ navigation:
o G4Navigator: corrected computation of fGrandMotherExitNormal in
ComputeStep() in the case where a not valid exit-normal exists.
o G4GeomTestSegment: fix to correctly determine whether starting
trajectory is entering or exiting the solid when the starting point
is on a surface. Added additional tests on solid consistencies
(from roundoff sometimes) to avoid incorrect overlap warnings.
Addresses problem reports #610 and #652.
o Dump out contents from the solid when a fatal G4Exception is thrown
from the navigators in ComputeStep().
o Invoke G4LogicalVolume::UpdateMaterial() instead of SetMaterial()
for parameterised navigation in G4Navigator and specialised
G4ParameterisedNavigation.
Modification necessary to resolve correct update of material-cut
couples in parameterised geometries by material.
+ solids/CSG:
o Fix in G4Cons::DistanceToIn(p,v) on fRmax surface and move in,
the condition became a bit more strict && determinant >=0, i.e.
intersections in addition to go in.
Fixes a rare problem of dIn=dOut=0 observed in 3 events over a
statistics of 10^8..
o Fix in G4Sphere::DistanceToOut(p,v,...) on fRmin moving outside.
The bug showed 3 events of dIn=dOut=0 for 10^7 statistics in the
unit testing.
o Bug fix in G4Sphere::SurfaceNormal(p) for theta normals.
+ solids/specific:
o G4VCSGfaceted: fix for rare anomalous situation in which
DistanceToOut(p,v,..) will report kInfinity, make an additional
check for the point p on the surface, in which case will report
zero. Addresses problem observed in G4Polyhedra and reported in #650.
o Materials:
---------
+ Added protection in G4AtomicShells::GetNumberOfShells(Z).
Fixes problem report #643.
+ Recalculate ionisation parameters after set of new mean ionisation
potential; added factor 2 to shell correction term.
o Processes/cuts:
--------------
+ Fixed bug in G4ProductionCutsTable for the update of materials/cuts
couple for dynamic setups where material may vary, like in the case
of parameterization of detectors through material.
o Electromagnetic processes:
-------------------------
+ lowenergy:
o Trivial fixes for removal of redundant semicolons in the code.
+ utils:
o Fixed a problem of cut dependence of transmission energy of low
energy e- via thin foil
+ xrays:
o Changed "StronglyForced" back to "Forced" in GetMeanLifeTime() for
the G4Scintillation process.
o Hadronic Processes:
------------------
+ models/cascade:
o Fixed bug in G4CascadeInterface for uncorrect deletion of dynamic
particles. Fixes problem report #645.
o Optical Processes:
-----------------
+ Allow for unified model reflectivity parameters to also work in case
of dielectric_metal surfaces; in G4OpBoundaryProcess, use GetMaterial()
from G4StepPoint directly, sample reflectivity and apply unified model
reflection parameters only once even for rough dielectric/metal
surfaces. Fixes problem report #654.
+ Fixed bug in G4PlaneVectorRand for G4OpBoundaryProcess and resample
'theFacetNormal' for LobeReflection in DielectricMetal.
o Run:
---
+ Updated date to run-manager.
o Visualization:
-------------
+ OpenGL: G4OpenGLTransform3D.cc: simplified implementation for
GetMatrix() to allow for porting on future CLHEP series.
o Examples:
--------
+ Updated reference outputs.
+ electromagnetic/MuonProcesses
o Modified HistoManager and Messenger in order to allow a multirun job.
+ electromagnetic/PhotonProcesses
o Modified HistoManager and Messenger in order to allow a multirun job.
+ electromagnetic/TestEm2
o Updated acceptance numbers in input macro.
o Fixed problem in initialisation of RunAction.
+ electromagnetic/TestEm4
o Modifications in RunAction for histograms management for JAIDA.
+ electromagnetic/TestEm6
o Correctly defined all UI subdirectories.
o Modifications in RunAction for histograms management for JAIDA.
+ electromagnetic/TestEm10
o Removed obsolete processes from PhysicsList.
+ extended/field
o Minor cleanup of PhysicsLists.
+ extended/optical
o Fixed compilation error and warnings for LXe on Linux/gcc compiler.
+ novice/N05
o Added protection for negative proposed step in ExN05MinEkineCuts.
----------------------------------------------------------------------------
Technical Notes
---------------
o This patch should be applied on top of release 6.2.
o Technical notes distributed for release 6.2 are also applicable and
valid for this patch.
The code and rebuilt binary libraries for release 6.2 are available through
our "Source Code" Web page: http://cern.ch/geant4
Please refer to the Geant4 User Documentation:
http://cern.ch/geant4/G4UsersDocuments/Overview/html
for further information about using Geant4.
*************************************************************
Geant4 version $Name: geant4-06-02 $ (25-June-2004)
Geant4 version $Name: geant4-06-02-patch-02 $ (26-October-2004)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
......
# $Id: GNUmakefile,v 1.1 2004/06/14 10:09:19 maire Exp $
# $Id: GNUmakefile,v 1.2 2004/06/30 15:48:54 maire Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
......@@ -17,17 +17,12 @@ all: lib bin
#### G4ANALYSIS_USE := true
ifdef G4ANALYSIS_USE
USE_AIDA := true
endif
ifdef USE_AIDA
CPPFLAGS += -DG4ANALYSIS_USE
CPPFLAGS += -DUSE_AIDA
endif
include $(G4INSTALL)/config/architecture.gmk
ifdef USE_AIDA
ifdef G4ANALYSIS_USE
# for the aida-config command see the README file
CPPFLAGS += `aida-config --include`
LDFLAGS += `aida-config --lib`
......@@ -38,3 +33,7 @@ include $(G4INSTALL)/config/binmake.gmk
visclean:
rm -f g4*.prim g4*.eps g4*.wrl
rm -f .DAWN_*
histclean:
rm ${G4WORKDIR}/tmp/${G4SYSTEM}/${G4TARGET}/HistoManager.o
rm ${G4WORKDIR}/tmp/${G4SYSTEM}/${G4TARGET}/RunAction.o
$Id: History,v 1.2 2004/06/16 10:46:47 maire Exp $
$Id: History,v 1.4 2004/08/17 18:09:59 vnivanch Exp $
-------------------------------------------------------------------
=========================================================
......@@ -14,8 +14,14 @@ track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
17.06.04 V. Ivanchenko (muonprocesses-V06-02-01)
- introduce MuNuclearBuilder and corresponding macro
30.06.04 mma (muonprocesses-V06-02-00)
- histo management like in testem5-V06-01-04
16.06.04 V. Ivantchenko (muonprocesses-V06-01-01)
16.06.04 V. Ivanchenko (muonprocesses-V06-01-01)
- std::max in MuCrossSections
14.06.04 Michel Maire (muonprocesses-V06-01-00)
......
......@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: MuonProcesses.cc,v 1.1 2004/06/14 10:09:20 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
// $Id: MuonProcesses.cc,v 1.2 2004/06/30 15:48:55 maire Exp $
// GEANT4 tag $Name: geant4-06-02-patch-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -74,10 +74,7 @@ int main(int argc,char** argv) {
visManager->Initialize();
#endif
HistoManager* histo = 0;
#ifdef G4ANALYSIS_USE
histo = new HistoManager();
#endif
HistoManager* histo = new HistoManager();
// set user action classes
RunAction* run;
......@@ -106,13 +103,12 @@ int main(int argc,char** argv) {
// job termination
//
#ifdef G4ANALYSIS_USE
delete histo;
#endif
#ifdef G4VIS_USE
delete visManager;
#endif
delete histo;
delete runManager;
return 0;
......
# $Id: allproc.mac,v 1.1 2004/06/14 10:09:20 maire Exp $
# $Id: allproc.mac,v 1.2 2004/07/27 10:13:16 maire Exp $
#
# Macro file for "MuonProcesses.cc"
# (can be run in batch, without graphic)
......@@ -10,7 +10,6 @@
/testem/det/setSize 1 m
#
/testem/phys/addPhysics standard
### /testem/phys/addPhysics g4v52
#
/testem/phys/setCuts 1 mm
#
......
......@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: HistoManager.hh,v 1.1 2004/06/14 10:09:22 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
// $Id: HistoManager.hh,v 1.2 2004/06/30 15:48:56 maire Exp $
// GEANT4 tag $Name: geant4-06-02-patch-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -29,8 +29,6 @@
#ifndef HistoManager_h
#define HistoManager_h 1
#ifdef USE_AIDA
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -39,53 +37,60 @@ namespace AIDA {
class ITree;
class IHistogramFactory;
class IHistogram1D;
}
}
class HistoMessenger;
const G4int MaxHisto = 5;
const G4int MaxHisto = 5;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class HistoManager
{
public:
HistoManager();
~HistoManager();
void SetFileName (G4String name) { fileName = name;};
void SetFactory ();
void SaveFactory ();
void SetHisto (G4int, G4int, G4double, G4double, G4String unit="none");
void SetFileName (const G4String& name) { fileName = name;};
void SetFileType (const G4String& name) { fileType = name;};
void book();
void save();
void SetHisto (G4int,G4int,G4double,G4double,const G4String& unit="none");
void FillHisto(G4int id, G4double e, G4double weight = 1.0);
void RemoveHisto (G4int);
AIDA::ITree* GetTree() {return tree;}
AIDA::IHistogramFactory* GetHistogramFactory() {return hf;}
AIDA::IHistogramFactory* GetHistogramFactory() {return hf;}
AIDA::IHistogram1D* GetHisto(G4int id) {return histo[id];}
G4double GetHistoUnit(G4int id) {return Unit[id];}
G4double GetBinWidth (G4int id) {return Width[id];}
G4bool HistoExist (G4int id) {return exist[id];}
G4String GetTitle (G4int id) {return Title[id];}
G4int GetNbins (G4int id) {return Nbins[id];}
G4double GetVmin (G4int id) {return Vmin[id];}
G4double GetVmax (G4int id) {return Vmax[id];}
G4double GetHistoUnit(G4int id) {return Unit[id];}
G4double GetBinWidth (G4int id) {return Width[id];}
private:
G4String fileName;
G4String fileType;
AIDA::ITree* tree;
AIDA::IHistogramFactory* hf;
AIDA::IHistogramFactory* hf;
AIDA::IHistogram1D* histo[MaxHisto];
G4bool exist[MaxHisto];
G4String Label[MaxHisto];
G4String Title[MaxHisto];
G4int Nbins[MaxHisto];
G4double Vmin [MaxHisto];
G4double Vmax [MaxHisto];
G4double Vmax [MaxHisto];
G4double Unit [MaxHisto];
G4double Width[MaxHisto];
G4bool factoryOn;
G4bool factoryOn;
HistoMessenger* histoMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
#endif
......@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: HistoMessenger.hh,v 1.1 2004/06/14 10:09:22 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
// $Id: HistoMessenger.hh,v 1.2 2004/06/30 15:48:56 maire Exp $
// GEANT4 tag $Name: geant4-06-02-patch-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -29,8 +29,6 @@
#ifndef HistoMessenger_h
#define HistoMessenger_h 1
#ifdef G4ANALYSIS_USE
#include "G4UImessenger.hh"
#include "globals.hh"
......@@ -59,12 +57,13 @@ class HistoMessenger: public G4UImessenger
G4UIdirectory* histoDir;
G4UIcmdWithAString* factoryCmd;
G4UIcmdWithAString* typeCmd;
G4UIcommand* histoCmd;
G4UIcmdWithAnInteger* rmhistoCmd;
G4UIcmdWithAnInteger* rmhistoCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
#endif
//
// ********************************************************************
// * 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: MuNuclearBuilder.hh,v 1.1 2004/08/17 18:07:28 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02-patch-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef MuNuclearBuilder_h
#define MuNuclearBuilder_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class MuNuclearBuilder : public G4VPhysicsConstructor
{
public:
MuNuclearBuilder(const G4String& name = "muNucl");
~MuNuclearBuilder();
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
......@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: PhysicsList.hh,v 1.1 2004/06/14 10:09:23 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
// $Id: PhysicsList.hh,v 1.2 2004/08/17 18:07:28 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02-patch-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -59,6 +59,7 @@ class PhysicsList: public G4VModularPhysicsList
G4double currentDefaultCut;
G4VPhysicsConstructor* emPhysicsList;
G4VPhysicsConstructor* muNuclPhysicsList;
G4String emName;
PhysicsListMessenger* pMessenger;
......
# $Id: nucl.mac,v 1.1 2004/08/17 18:07:40 vnivanch Exp $
#
# Macro file for "MuonProcesses.cc"
# (can be run in batch, without graphic)
#
/control/verbose 2
/run/verbose 2
/tracking/verbose 0
#
/testem/det/setMat Iron
/testem/det/setSize 1 m
#
/testem/phys/addPhysics standard
/testem/phys/addPhysics muNucl
#
/testem/phys/setCuts 1 mm
#
/run/initialize
#
/gun/particle mu+
/gun/energy 10 TeV
#
/testem/histo/setFileName allproc.paw
/testem/histo/setHisto 1 100 -10. 0.
/testem/histo/setHisto 2 100 -10. 0.
/testem/histo/setHisto 3 100 -10. 0.
#
/testem/event/printModulo 1000
#
/run/beamOn 10000
......@@ -20,19 +20,19 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: HistoManager.cc,v 1.1 2004/06/14 10:09:26 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
// $Id: HistoManager.cc,v 1.2 2004/06/30 15:48:56 maire Exp $
// GEANT4 tag $Name: geant4-06-02-patch-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifdef USE_AIDA
#include "HistoManager.hh"
#include "HistoMessenger.hh"
#include "G4UnitsTable.hh"
#ifdef G4ANALYSIS_USE
#include "AIDA/AIDA.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -40,80 +40,103 @@ HistoManager::HistoManager()
:tree(0),hf(0),factoryOn(false)
{
fileName = "muonprocesses.paw";
fileType = "hbook";
// histograms
for (G4int k=0; k<MaxHisto; k++) { histo[k] = 0; exist[k] = false;}
for (G4int k=0; k<MaxHisto; k++) {
histo[k] = 0;
exist[k] = false;
Unit[k] = 1.0;
Width[k] = 1.0;
}
histoMessenger = new HistoMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
HistoManager::~HistoManager()
{
SaveFactory();
delete histoMessenger;
{
delete histoMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void HistoManager::SetFactory()
{
if (factoryOn) {
G4cout << "\n--->HistoManager::SetFactory(): factory already exists"
<< G4endl;
SaveFactory();
}
// Creating the analysis factory
AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
// Creating the tree factory
void HistoManager::book()
{
#ifdef G4ANALYSIS_USE
// Creating the analysis factory
AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
// Creating the tree factory
AIDA::ITreeFactory* tf = af->createTreeFactory();
// Creating a tree mapped to an hbook file.
G4bool readOnly = false;
G4bool createNew = true;
tree = tf->create(fileName, "hbook", readOnly, createNew);
// Creating a histogram factory, whose histograms will be handled by the tree
hf = af->createHistogramFactory(*tree);
// create selected histograms
for (G4int k=0; k<MaxHisto; k++) {
if (exist[k]) histo[k] = hf->createHistogram1D( Label[k], Title[k],
Nbins[k], Vmin[k], Vmax[k]);
// Creating a tree mapped to an hbook file.
G4bool readOnly = false;
G4bool createNew = true;
tree = tf->create(fileName, fileType, readOnly, createNew);
// Creating a histogram factory, whose histograms will be handled by the tree
hf = af->createHistogramFactory(*tree);
// create selected histograms
for (G4int k=0; k<MaxHisto; k++) {
if (exist[k]) {
histo[k] = hf->createHistogram1D( Label[k], Title[k],
Nbins[k], Vmin[k], Vmax[k]);
factoryOn = true;
}
}
delete tf;
delete af;
factoryOn = true;
if(factoryOn)
G4cout << "\n----> Histogram Tree is opened " << G4endl;
delete tf;
delete af;
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void HistoManager::SaveFactory()
{
if (factoryOn) {
void HistoManager::save()
{
#ifdef G4ANALYSIS_USE
if (factoryOn) {
tree->commit(); // Writing the histograms to the file
tree->close(); // and closing the tree (and the file)
delete hf;
G4cout << "\n----> Histogram Tree is saved in " << fileName << G4endl;
delete hf;
delete tree;
factoryOn = false;
}
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void HistoManager::SetHisto(G4int ih,
G4int nbins, G4double valmin, G4double valmax, G4String unit)
{
void HistoManager::FillHisto(G4int ih, G4double e, G4double weight)
{
if (ih > MaxHisto) {
G4cout << "---> warning from HistoManager::FillHisto() : histo " << ih
<< "does not exist; e= " << e << " w= " << weight << G4endl;
return;
}
#ifdef G4ANALYSIS_USE
if(exist[ih]) histo[ih]->fill(e/Unit[ih], weight);
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void HistoManager::SetHisto(G4int ih,
G4int nbins, G4double valmin, G4double valmax, const G4String& unit)
{
if (ih > MaxHisto) {
G4cout << "---> warning from HistoManager::SetHisto() : histo " << ih
<< "does not exist" << G4endl;
return;
}
const G4String id[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8"};
}
const G4String id[] = { "0", "1", "2", "3", "4"};
const G4String title[] =
{ "dummy", //0
"log10(Etransfert/Emu) Ionization", //1
......@@ -122,44 +145,42 @@ void HistoManager::SetHisto(G4int ih,
"log10(Etransfert/Emu) Nuclear" //4
};
G4String titl = title[ih];
G4double vmin = valmin, vmax = valmax;
Unit[ih] = 1.;
if (unit != "none") {
titl = title[ih] + " (" + unit + ")";
Unit[ih] = G4UnitDefinition::GetValueOf(unit);
vmin = valmin/Unit[ih]; vmax = valmax/Unit[ih];
}
exist[ih] = true;
Label[ih] = id[ih];
Title[ih] = titl;
Nbins[ih] = nbins;
Vmin[ih] = vmin;
Vmax[ih] = vmax;
Nbins[ih] = nbins;
Vmin[ih] = vmin;
Vmax[ih] = vmax;
Width[ih] = (valmax-valmin)/nbins;
G4cout << "----> SetHisto " << ih << ": " << titl << "; "
<< nbins << " bins from "
<< nbins << " bins from "
<< vmin << " " << unit << " to " << vmax << " " << unit << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void HistoManager::RemoveHisto(G4int ih)
{
void HistoManager::RemoveHisto(G4int ih)
{
if (ih > MaxHisto) {
G4cout << "---> warning from HistoManager::RemoveHisto() : histo " << ih
<< "does not exist" << G4endl;
return;
}
histo[ih] = 0; exist[ih] = false;
histo[ih] = 0; exist[ih] = false;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
......@@ -20,14 +20,12 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: HistoMessenger.cc,v 1.1 2004/06/14 10:09:26 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
// $Id: HistoMessenger.cc,v 1.2 2004/06/30 15:48:57 maire Exp $
// GEANT4 tag $Name: geant4-06-02-patch-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifdef G4ANALYSIS_USE
#include "HistoMessenger.hh"
#include "HistoManager.hh"
......@@ -47,7 +45,10 @@ HistoMessenger::HistoMessenger(HistoManager* manager)
factoryCmd = new G4UIcmdWithAString("/testem/histo/setFileName",this);
factoryCmd->SetGuidance("set name for the histograms file");
typeCmd = new G4UIcmdWithAString("/testem/histo/setFileType",this);
typeCmd->SetGuidance("set histograms file type");
histoCmd = new G4UIcommand("/testem/histo/setHisto",this);
histoCmd->SetGuidance("Set bining of the histo number ih :");
histoCmd->SetGuidance(" nbBins; valMin; valMax; unit (of vmin and vmax)");
......@@ -60,8 +61,8 @@ HistoMessenger::HistoMessenger(HistoManager* manager)
G4UIparameter* nbBins = new G4UIparameter("nbBins",'i',false);
nbBins->SetGuidance("number of bins");
nbBins->SetParameterRange("nbBins>0");
histoCmd->SetParameter(nbBins);
//
histoCmd->SetParameter(nbBins);
//
G4UIparameter* valMin = new G4UIparameter("valMin",'d',false);
valMin->SetGuidance("valMin, expressed in unit");
histoCmd->SetParameter(valMin);
......@@ -87,8 +88,9 @@ HistoMessenger::~HistoMessenger()
{
delete rmhistoCmd;
delete histoCmd;
delete typeCmd;
delete factoryCmd;
delete histoDir;
delete histoDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -97,7 +99,10 @@ void HistoMessenger::SetNewValue(G4UIcommand* command, G4String newValues)
{
if (command == factoryCmd)
histoManager->SetFileName(newValues);
if (command == typeCmd)
histoManager->SetFileType(newValues);
if (command == histoCmd)
{ G4int ih,nbBins; G4double vmin,vmax; char unts[30];
const char* t = newValues;
......@@ -110,9 +115,8 @@ void HistoMessenger::SetNewValue(G4UIcommand* command, G4String newValues)
}
if (command == rmhistoCmd)
{ histoManager->RemoveHisto(rmhistoCmd->GetNewIntValue(newValues));}
histoManager->RemoveHisto(rmhistoCmd->GetNewIntValue(newValues));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
//
// ********************************************************************
// * 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: MuNuclearBuilder.cc,v 1.1 2004/08/17 18:07:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02-patch-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "MuNuclearBuilder.hh"
#include "G4ParticleDefinition.hh"
#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
#include "G4ProcessManager.hh"
#include "G4MuNuclearInteraction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
MuNuclearBuilder::MuNuclearBuilder(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
MuNuclearBuilder::~MuNuclearBuilder()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void MuNuclearBuilder::ConstructProcess()
{
// Add standard EM Processes for Muon
G4ParticleDefinition* particle = G4MuonPlus::MuonPlus();
G4ProcessManager* pmanager = particle->GetProcessManager();
pmanager->AddProcess(new G4MuNuclearInteraction,-1,-1,4);
particle = G4MuonMinus::MuonMinus();
pmanager = particle->GetProcessManager();
pmanager->AddProcess(new G4MuNuclearInteraction,-1,-1,4);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: PhysListEmStandard.cc,v 1.1 2004/06/14 10:09:26 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
// $Id: PhysListEmStandard.cc,v 1.2 2004/08/17 18:07:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02-patch-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -37,7 +37,6 @@
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4MuNuclearInteraction.hh"
#include "G4LossTableManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -62,7 +61,6 @@ void PhysListEmStandard::ConstructProcess()
pmanager->AddProcess(new G4MuIonisation, -1, 1,1);
pmanager->AddProcess(new G4MuBremsstrahlung, -1, 2,2);
pmanager->AddProcess(new G4MuPairProduction, -1, 3,3);
/// pmanager->AddProcess(new G4MuNuclearInteraction,-1,-1,4);
particle = G4MuonMinus::MuonMinus();
pmanager = particle->GetProcessManager();
......@@ -70,7 +68,6 @@ void PhysListEmStandard::ConstructProcess()
pmanager->AddProcess(new G4MuIonisation, -1, 1,1);
pmanager->AddProcess(new G4MuBremsstrahlung, -1, 2,2);
pmanager->AddProcess(new G4MuPairProduction, -1, 3,3);
/// pmanager->AddProcess(new G4MuNuclearInteraction,-1,-1,4);
//extend binning of PhysicsTables
//
......
......@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: PhysicsList.cc,v 1.1 2004/06/14 10:09:26 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
// $Id: PhysicsList.cc,v 1.2 2004/08/17 18:07:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02-patch-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -32,6 +32,7 @@
#include "PhysListEmStandard.hh"
#include "PhysListEmG4v52.hh"
#include "MuNuclearBuilder.hh"
#include "G4LossTableManager.hh"
......@@ -51,6 +52,8 @@ PhysicsList::PhysicsList() : G4VModularPhysicsList()
// EM physics
emName = G4String("standard");
emPhysicsList = new PhysListEmStandard(emName);
muNuclPhysicsList = 0;
// instanciate EnergyLossTable
G4LossTableManager::Instance();
......@@ -166,6 +169,7 @@ void PhysicsList::ConstructProcess()
// electromagnetic Physics List
//
emPhysicsList->ConstructProcess();
if(muNuclPhysicsList) muNuclPhysicsList->ConstructProcess();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -190,6 +194,9 @@ void PhysicsList::AddPhysicsList(const G4String& name)
delete emPhysicsList;
emPhysicsList = new PhysListEmG4v52(name);
} else if (name == "muNucl") {
muNuclPhysicsList = new MuNuclearBuilder(name);
} else {
G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
......
......@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: RunAction.cc,v 1.1 2004/06/14 10:09:27 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
// $Id: RunAction.cc,v 1.2 2004/06/30 15:48:57 maire Exp $
// GEANT4 tag $Name: geant4-06-02-patch-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -39,7 +39,7 @@
#include "Randomize.hh"
#ifdef USE_AIDA
#ifdef G4ANALYSIS_USE
#include "AIDA/AIDA.h"
#endif
......@@ -67,9 +67,7 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
ProcCounter = new ProcessesCount;
#ifdef G4ANALYSIS_USE
histoManager->SetFactory();
#endif
histoManager->book();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -165,9 +163,7 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
}
delete ProcCounter;
#ifdef G4ANALYSIS_USE
histoManager->SaveFactory();
#endif
histoManager->save();
// show Rndm status
HepRandom::showEngineStatus();
......@@ -192,22 +188,22 @@ G4double RunAction::ComputeTheory(G4String process, G4int NbOfMu)
G4int nbOfBins = 100;
G4double binMin = -10., binMax = 0., binWidth = (binMax-binMin)/nbOfBins;
#ifdef USE_AIDA
#ifdef G4ANALYSIS_USE
//create histo for theoritical crossSections, with same bining as simulation
//
const G4String label[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19"};
AIDA::IHistogram1D* histoMC = 0; AIDA::IHistogram1D* histoTh = 0;
if (histoManager->GetHisto(id)) {
histoMC = histoManager->GetHisto(id);
nbOfBins = (histoMC->axis()).bins();
binMin = (histoMC->axis()).lowerEdge();
binMax = (histoMC->axis()).upperEdge();
binWidth = (binMax-binMin)/nbOfBins;
if (histoManager->HistoExist(id)) {
histoMC = histoManager->GetHisto(id);
nbOfBins = histoManager->GetNbins(id);
binMin = histoManager->GetVmin (id);
binMax = histoManager->GetVmax (id);
binWidth = histoManager->GetBinWidth(id);
G4String labelTh = label[MaxHisto + id];
G4String titleTh = histoMC->title() + " (Th)";
G4String titleTh = histoManager->GetTitle(id) + " (Th)";
histoTh = histoManager->GetHistogramFactory()
->createHistogram1D(labelTh,titleTh,nbOfBins,binMin,binMax);
}
......@@ -229,12 +225,12 @@ G4double RunAction::ComputeTheory(G4String process, G4int NbOfMu)
dsigma = sigmaE*etransf*binWidth*ln10;
if (etransf > cut) sigmaTot += dsigma;
NbProcess = NbOfMu*length*dsigma;
#ifdef USE_AIDA
#ifdef G4ANALYSIS_USE
if (histoTh) histoTh->fill(lgeps,NbProcess);
#endif
}
#ifdef USE_AIDA
#ifdef G4ANALYSIS_USE
//compare simulation and theory
//
if (histoMC && histoTh) histoManager->GetHistogramFactory()
......
......@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: SteppingAction.cc,v 1.1 2004/06/14 10:09:27 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
// $Id: SteppingAction.cc,v 1.2 2004/06/30 15:48:57 maire Exp $
// GEANT4 tag $Name: geant4-06-02-patch-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -32,10 +32,6 @@
#include "G4RunManager.hh"
#ifdef USE_AIDA
#include "AIDA/IHistogram1D.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
SteppingAction::SteppingAction(RunAction* RuAct, HistoManager* Hist)
......@@ -69,16 +65,12 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep)
G4double lgepsE = 0.;
if (etrans > 0.) lgepsE = log10(etrans/E1);
#ifdef USE_AIDA
//
G4int id = 0;
if (procName == "MuIoni") id = 1;
if (procName == "MuPairProd") id = 2;
if (procName == "MuBrems") id = 3;
if (procName == "MuNucl") id = 4;
if ((id > 0) && (histoManager->GetHisto(id)))
histoManager->GetHisto(id)->fill(lgepsE);
#endif
histoManager->FillHisto(id,lgepsE);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......
# $Id: GNUmakefile,v 1.1 2004/04/28 11:09:04 maire Exp $
# $Id: GNUmakefile,v 1.3 2004/06/30 11:31:18 maire Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
......@@ -17,17 +17,12 @@ all: lib bin
#### G4ANALYSIS_USE := true
ifdef G4ANALYSIS_USE
USE_AIDA := true
endif
ifdef USE_AIDA
CPPFLAGS += -DG4ANALYSIS_USE
CPPFLAGS += -DUSE_AIDA
endif
include $(G4INSTALL)/config/architecture.gmk
ifdef USE_AIDA
ifdef G4ANALYSIS_USE
# for the aida-config command see the README file
CPPFLAGS += `aida-config --include`
LDFLAGS += `aida-config --lib`
......@@ -38,3 +33,6 @@ include $(G4INSTALL)/config/binmake.gmk
visclean:
rm -f g4*.prim g4*.eps g4*.wrl
rm -f .DAWN_*
histclean:
rm ${G4WORKDIR}/tmp/${G4SYSTEM}/${G4TARGET}/HistoManager.o
$Id: History,v 1.3 2004/06/10 15:55:35 maire Exp $
$Id: History,v 1.4 2004/06/30 11:13:56 maire Exp $
-------------------------------------------------------------------
=========================================================
......@@ -15,6 +15,9 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
30.06.04 mma (photonprocesses-V06-02-00)
- modifs in HistoManager and messenger to conform to testem5-V06-01-04
10.06.04 mma (photonprocesses-V06-01-01)
- modifs in HistoManager and messenger to allow a multiruns job.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment