Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
@@ -23,29 +23,38 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm5/include/g4hbook_defs.hh
/// \brief Definition of the g4hbook_defs class
// $Id: ActionInitialization.hh 76346 2013-11-08 15:48:19Z maire $
//
// $Id$
/// \file ActionInitialization.hh
/// \brief Definition of the ActionInitialization class
// Author: Ivana Hrivnacova, 15/06/2011 (ivana@ipno.in2p3.fr)
#ifndef ActionInitialization_h
#define ActionInitialization_h 1
#ifndef g4hbook_defs_h
#define g4hbook_defs_h
#include "G4VUserActionInitialization.hh"
#include <tools/hbook/h1>
#include <tools/hbook/h2>
#include <tools/hbook/wntuple>
#include "ExG4HbookAnalysisManager.hh"
class DetectorConstruction;
class G4VSteppingVerbose;
namespace G4Hbook {
/// Action initialization class.
///
typedef tools::hbook::h1 G4AnaH1;
typedef tools::hbook::h2 G4AnaH2;
typedef tools::hbook::wntuple G4Ntuple;
typedef ExG4HbookAnalysisManager G4AnalysisManager;
}
class ActionInitialization : public G4VUserActionInitialization
{
public:
ActionInitialization(DetectorConstruction*);
virtual ~ActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
virtual G4VSteppingVerbose* InitializeSteppingVerbose() const;
private:
DetectorConstruction* fDetector;
};
#endif
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/DetectorConstruction.hh
/// \brief Definition of the DetectorConstruction class
//
// $Id$
// $Id: DetectorConstruction.hh 77600 2013-11-26 17:07:41Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -37,6 +37,7 @@
#include "G4VUserDetectorConstruction.hh"
#include "G4LogicalVolume.hh"
#include "globals.hh"
#include "G4Cache.hh"
class G4Box;
class G4VPhysicalVolume;
@@ -44,6 +45,7 @@ class G4Material;
class G4MaterialCutsCouple;
class G4UniformMagField;
class DetectorMessenger;
class G4GlobalMagFieldMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -69,14 +71,13 @@ class DetectorConstruction : public G4VUserDetectorConstruction
void SetMagField(G4double);
virtual G4VPhysicalVolume* Construct();
void UpdateGeometry();
virtual void ConstructSDandField();
public:
void PrintCalorParameters();
G4Material* GetAbsorberMaterial() {return fAbsorberMaterial;};
G4Material* GetAbsorberMaterial() {return fAbsorberMaterial;};
G4double GetAbsorberThickness() {return fAbsorberThickness;};
G4double GetAbsorberSizeYZ() {return fAbsorberSizeYZ;};
@@ -114,10 +115,10 @@ class DetectorConstruction : public G4VUserDetectorConstruction
G4Box* fSolidAbsorber;
G4LogicalVolume* fLogicAbsorber;
G4VPhysicalVolume* fPhysiAbsorber;
G4UniformMagField* fMagField;
DetectorMessenger* fDetectorMessenger;
G4Cache<G4GlobalMagFieldMessenger*> fFieldMessenger;
private:
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/DetectorMessenger.hh
/// \brief Definition of the DetectorMessenger class
//
// $Id$
// $Id: DetectorMessenger.hh 77083 2013-11-21 10:35:55Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -70,9 +70,6 @@ class DetectorMessenger: public G4UImessenger
G4UIcmdWithADoubleAndUnit* fWorldXCmd;
G4UIcmdWithADoubleAndUnit* fWorldYZCmd;
G4UIcmdWithADoubleAndUnit* fMagFieldCmd;
G4UIcmdWithoutParameter* fUpdateCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/EventAction.hh
/// \brief Definition of the EventAction class
//
// $Id$
// $Id: EventAction.hh 76464 2013-11-11 10:22:56Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -37,15 +37,12 @@
#include "G4UserEventAction.hh"
#include "globals.hh"
class RunAction;
class EventMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class EventAction : public G4UserEventAction
{
public:
EventAction(RunAction*);
EventAction();
~EventAction();
public:
@@ -64,21 +61,12 @@ class EventAction : public G4UserEventAction
void SetReflectFlag (G4int flag)
{if (flag > fReflectFlag) fReflectFlag = flag;};
void SetDrawFlag(G4String val) {fDrawFlag = val;};
void SetPrintModulo(G4int val) {fPrintModulo = val;};
private:
RunAction* fRunAction;
G4double fEnergyDeposit;
G4double fTrakLenCharged, fTrakLenNeutral;
G4int fNbStepsCharged, fNbStepsNeutral;
G4int fTransmitFlag, fReflectFlag;
G4String fDrawFlag;
G4int fPrintModulo;
EventMessenger* fEventMessenger;
G4int fTransmitFlag, fReflectFlag;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,64 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm5/include/EventMessenger.hh
/// \brief Definition of the EventMessenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef EventMessenger_h
#define EventMessenger_h 1
#include "G4UImessenger.hh"
#include "globals.hh"
class EventAction;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class EventMessenger: public G4UImessenger
{
public:
EventMessenger(EventAction*);
~EventMessenger();
virtual void SetNewValue(G4UIcommand*, G4String);
private:
EventAction* fEventAction;
G4UIdirectory* fEventDir;
G4UIcmdWithAString* fDrawCmd;
G4UIcmdWithAnInteger* fPrintCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -1,185 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm5/include/ExG4HbookAnalysisManager.hh
/// \brief Definition of the ExG4HbookAnalysisManager class
//
// $Id$
//
/// \file ExG4HbookAnalysisManager.hh
/// \brief Definition of the ExG4HbookAnalysisManager class
// Author: Ivana Hrivnacova, 15/06/2011 (ivana@ipno.in2p3.fr)
#ifdef G4_USE_HBOOK
#ifndef ExG4HbookAnalysisManager_h
#define ExG4HbookAnalysisManager_h 1
#include "G4VAnalysisManager.hh"
#include "globals.hh"
#include <tools/hbook/wfile>
#include <tools/hbook/h1>
#include <tools/hbook/h2>
#include <tools/hbook/wntuple>
#include <vector>
#include <map>
#define setpawc setpawc_
#define setntuc setntuc_
//#define ntuc ntuc_
class ExG4HbookAnalysisManager;
namespace G4Hbook {
typedef tools::hbook::h1 G4AnaH1;
typedef ExG4HbookAnalysisManager G4AnalysisManager;
}
/// HBook Analysis manager
///
/// The class implements the G4VAnalysisManager manager for HBook.
/// It is provided separately from geant4/source/analysis in order
/// to avoid a need of linking Geant4 kernel libraries with cerblib.
class ExG4HbookAnalysisManager : public G4VAnalysisManager
{
public:
ExG4HbookAnalysisManager();
virtual ~ExG4HbookAnalysisManager();
// static methods
static ExG4HbookAnalysisManager* Instance();
// Methods to manipulate files
virtual G4bool OpenFile(const G4String& fileName);
virtual G4bool Write();
virtual G4bool CloseFile();
// Methods to create histogrammes, ntuples
virtual G4int CreateH1(const G4String& name, const G4String& title,
G4int nbins, G4double xmin, G4double xmax);
virtual G4int CreateH2(const G4String& name, const G4String& title,
G4int nxbins, G4double xmin, G4double xmax,
G4int nybins, G4double ymin, G4double ymax);
virtual void CreateNtuple(const G4String& name, const G4String& title);
virtual G4int CreateNtupleIColumn(const G4String& name);
virtual G4int CreateNtupleFColumn(const G4String& name);
virtual G4int CreateNtupleDColumn(const G4String& name);
virtual void FinishNtuple();
// Methods to fill histogrammes, ntuples
virtual G4bool FillH1(G4int id, G4double value, G4double weight = 1.0);
virtual G4bool FillH2(G4int id, G4double xvalue, G4double yvalue,
G4double weight = 1.0);
virtual G4bool FillNtupleIColumn(G4int id, G4int value);
virtual G4bool FillNtupleFColumn(G4int id, G4float value);
virtual G4bool FillNtupleDColumn(G4int id, G4double value);
virtual G4bool AddNtupleRow();
// Access methods
virtual tools::hbook::h1* GetH1(G4int id, G4bool warn = true) const;
virtual tools::hbook::h2* GetH2(G4int id, G4bool warn = true) const;
virtual tools::hbook::wntuple* GetNtuple() const;
//tools::hbook::h1* GetH1(const G4String& name, G4bool warn = true) const;
// HBOOK does not allow IDs the same IDs for H1 and H2,
// and also IDs starting from 0; thats why there is defined an offset
// with respect to the G4AnalysisManager generic Ids.
// The default values of these offsets can be changed by the user.
//
// Set the offset of HBOOK ID for H1
// ( default value = firstHistoID if firstHistoID > 0; otherwise = 1)
G4bool SetH1HbookIdOffset(G4int offset);
//
// Set the offset of HBOOK ID for H2
// ( default value = firstHistoID + 100 if firstHistoID > 0; otherwise = 101 )
G4bool SetH2HbookIdOffset(G4int offset);
//
// Set the HBOOK ID for the ntuple
// (default value = 1 )
G4bool SetNtupleHbookId(G4int ntupleId);
G4int GetH1HbookIdOffset() const;
G4int GetH2HbookIdOffset() const;
G4int GetNtupleHbookId() const;
private:
// static data members
//
static ExG4HbookAnalysisManager* fgInstance;
static const G4int fgkDefaultH2HbookIdOffset;
static const G4int fgkDefaultNtupleHbookId;
static const G4String fgkDefaultNtupleDirectoryName;
// methods
//
tools::hbook::wntuple::column<int>* GetNtupleIColumn(G4int id) const;
tools::hbook::wntuple::column<float>* GetNtupleFColumn(G4int id) const;
tools::hbook::wntuple::column<double>* GetNtupleDColumn(G4int id) const;
// data members
//
G4int fH1HbookIdOffset;
G4int fH2HbookIdOffset;
G4int fNtupleHbookId;
tools::hbook::wfile* fFile;
std::vector<tools::hbook::h1*> fH1Vector;
std::map<G4String, tools::hbook::h1*> fH1MapByName;
std::vector<tools::hbook::h2*> fH2Vector;
std::map<G4String, tools::hbook::h2*> fH2MapByName;
G4String fNtupleName;
G4String fNtupleTitle;
tools::hbook::wntuple* fNtuple;
std::map<G4int, tools::hbook::wntuple::column<int>* > fNtupleIColumnMap;
std::map<G4int, tools::hbook::wntuple::column<float>* > fNtupleFColumnMap;
std::map<G4int, tools::hbook::wntuple::column<double>* > fNtupleDColumnMap;
};
// inline functions
inline G4int ExG4HbookAnalysisManager::GetH1HbookIdOffset() const {
return fH1HbookIdOffset;
}
inline G4int ExG4HbookAnalysisManager::GetH2HbookIdOffset() const {
return fH2HbookIdOffset;
}
inline G4int ExG4HbookAnalysisManager::GetNtupleHbookId() const {
return fNtupleHbookId;
}
#endif
#endif
@@ -27,10 +27,10 @@
/// \brief Definition of the HistoManager class
//
//
// $Id$
// $Id: HistoManager.hh 76464 2013-11-11 10:22:56Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef HistoManager_h
#define HistoManager_h 1
@@ -39,7 +39,6 @@
#include "g4root.hh"
//#include "g4xml.hh"
////#include "g4hbook.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/PhysListEmStandard.hh
/// \brief Definition of the PhysListEmStandard class
//
// $Id$
// $Id: PhysListEmStandard.hh 66241 2012-12-13 18:34:42Z gunter $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/PhysListEmStandardGS.hh
/// \brief Definition of the PhysListEmStandardGS class
//
// $Id$
// $Id: PhysListEmStandardGS.hh 66241 2012-12-13 18:34:42Z gunter $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/PhysListEmStandardSS.hh
/// \brief Definition of the PhysListEmStandardSS class
//
// $Id$
// $Id: PhysListEmStandardSS.hh 66241 2012-12-13 18:34:42Z gunter $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/PhysListEmStandardSSM.hh
/// \brief Definition of the PhysListEmStandardSSM class
//
// $Id$
// $Id: PhysListEmStandardSSM.hh 66241 2012-12-13 18:34:42Z gunter $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,7 @@
/// \brief Definition of the PhysListEmStandardWVI class
//
//
// $Id$
// $Id: PhysListEmStandardWVI.hh 66241 2012-12-13 18:34:42Z gunter $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/PhysicsList.hh
/// \brief Definition of the PhysicsList class
//
// $Id$
// $Id: PhysicsList.hh 66241 2012-12-13 18:34:42Z gunter $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/PhysicsListMessenger.hh
/// \brief Definition of the PhysicsListMessenger class
//
// $Id$
// $Id: PhysicsListMessenger.hh 66241 2012-12-13 18:34:42Z gunter $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/PrimaryGeneratorAction.hh
/// \brief Definition of the PrimaryGeneratorAction class
//
// $Id$
// $Id: PrimaryGeneratorAction.hh 66241 2012-12-13 18:34:42Z gunter $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/PrimaryGeneratorMessenger.hh
/// \brief Definition of the PrimaryGeneratorMessenger class
//
// $Id$
// $Id: PrimaryGeneratorMessenger.hh 66241 2012-12-13 18:34:42Z gunter $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,125 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm11/include/Run.hh
/// \brief Definition of the Run class
//
// $Id: Run.hh 71375 2013-06-14 07:39:33Z maire $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Run_h
#define Run_h 1
#include "G4Run.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "globals.hh"
class DetectorConstruction;
class G4ParticleDefinition;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Run : public G4Run
{
public:
Run(DetectorConstruction*);
~Run();
public:
void SetPrimary(G4ParticleDefinition* particle, G4double energy);
void AddEnergy (G4double edep)
{fEnergyDeposit += edep; fEnergyDeposit2 += edep*edep;};
void AddTrakLenCharg (G4double length)
{fTrakLenCharged += length; fTrakLenCharged2 += length*length;};
void AddTrakLenNeutr (G4double length)
{fTrakLenNeutral += length; fTrakLenNeutral2 += length*length;};
void AddMscProjTheta (G4double theta)
{if (std::abs(theta) <= fMscThetaCentral) { fMscEntryCentral++;
fMscProjecTheta += theta; fMscProjecTheta2 += theta*theta;}
};
void CountStepsCharg (G4int nSteps)
{fNbStepsCharged += nSteps; fNbStepsCharged2 += nSteps*nSteps;};
void CountStepsNeutr (G4int nSteps)
{fNbStepsNeutral += nSteps; fNbStepsNeutral2 += nSteps*nSteps;};
void CountParticles (G4ParticleDefinition* part)
{ if (part == G4Gamma::Gamma()) fNbGamma++ ;
else if (part == G4Electron::Electron()) fNbElect++ ;
else if (part == G4Positron::Positron()) fNbPosit++ ; };
void CountTransmit (G4int flag)
{ if (flag == 1) fTransmit[0]++;
else if (flag == 2) {fTransmit[0]++; fTransmit[1]++; }};
void CountReflect (G4int flag)
{ if (flag == 1) fReflect[0]++;
else if (flag == 2) {fReflect[0]++; fReflect[1]++; }};
void AddEnergyLeak (G4double eleak, G4int index)
{fEnergyLeak[index] += eleak; fEnergyLeak2[index] += eleak*eleak;};
G4double ComputeMscHighland();
virtual void Merge(const G4Run*);
void PrintSummary();
private:
DetectorConstruction* fDetector;
G4ParticleDefinition* fParticle;
G4double fEkin;
G4double fEnergyDeposit, fEnergyDeposit2;
G4double fTrakLenCharged, fTrakLenCharged2;
G4double fTrakLenNeutral, fTrakLenNeutral2;
G4double fNbStepsCharged, fNbStepsCharged2;
G4double fNbStepsNeutral, fNbStepsNeutral2;
G4double fMscProjecTheta, fMscProjecTheta2;
G4double fMscThetaCentral;
G4int fNbGamma, fNbElect, fNbPosit;
G4int fTransmit[2], fReflect[2];
G4int fMscEntryCentral;
G4double fEnergyLeak[2], fEnergyLeak2[2];
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/RunAction.hh
/// \brief Definition of the RunAction class
//
// $Id$
// $Id: RunAction.hh 76464 2013-11-11 10:22:56Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -35,16 +35,11 @@
#define RunAction_h 1
#include "G4UserRunAction.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4Run;
class Run;
class DetectorConstruction;
class PrimaryGeneratorAction;
class HistoManager;
@@ -56,67 +51,18 @@ class RunAction : public G4UserRunAction
public:
RunAction(DetectorConstruction*, PrimaryGeneratorAction*);
RunAction(DetectorConstruction* det, PrimaryGeneratorAction* prim=0);
~RunAction();
virtual G4Run* GenerateRun();
virtual void BeginOfRunAction(const G4Run*);
virtual void EndOfRunAction(const G4Run*);
void AddEnergy (G4double edep)
{fEnergyDeposit += edep; fEnergyDeposit2 += edep*edep;};
void AddTrakLenCharg (G4double length)
{fTrakLenCharged += length; fTrakLenCharged2 += length*length;};
void AddTrakLenNeutr (G4double length)
{fTrakLenNeutral += length; fTrakLenNeutral2 += length*length;};
void AddMscProjTheta (G4double theta)
{if (std::abs(theta) <= fMscThetaCentral) { fMscEntryCentral++;
fMscProjecTheta += theta; fMscProjecTheta2 += theta*theta;}
};
void CountStepsCharg (G4int nSteps)
{fNbStepsCharged += nSteps; fNbStepsCharged2 += nSteps*nSteps;};
void CountStepsNeutr (G4int nSteps)
{fNbStepsNeutral += nSteps; fNbStepsNeutral2 += nSteps*nSteps;};
void CountParticles (G4ParticleDefinition* part)
{ if (part == G4Gamma::Gamma()) fNbGamma++ ;
else if (part == G4Electron::Electron()) fNbElect++ ;
else if (part == G4Positron::Positron()) fNbPosit++ ; };
void CountTransmit (G4int flag)
{ if (flag == 1) fTransmit[0]++;
else if (flag == 2) {fTransmit[0]++; fTransmit[1]++; }};
void CountReflect (G4int flag)
{ if (flag == 1) fReflect[0]++;
else if (flag == 2) {fReflect[0]++; fReflect[1]++; }};
G4double ComputeMscHighland();
void AddEnergyLeak (G4double eleak, G4int index)
{ fEnergyLeak[index] += eleak; fEnergyLeak2[index] += eleak*eleak;};
private:
G4double fEnergyDeposit, fEnergyDeposit2;
G4double fTrakLenCharged, fTrakLenCharged2;
G4double fTrakLenNeutral, fTrakLenNeutral2;
G4double fNbStepsCharged, fNbStepsCharged2;
G4double fNbStepsNeutral, fNbStepsNeutral2;
G4double fMscProjecTheta, fMscProjecTheta2;
G4double fMscThetaCentral;
G4int fNbGamma, fNbElect, fNbPosit;
G4int fTransmit[2], fReflect[2];
G4int fMscEntryCentral;
G4double fEnergyLeak[2], fEnergyLeak2[2];
DetectorConstruction* fDetector;
PrimaryGeneratorAction* fPrimary;
Run* fRun;
HistoManager* fHistoManager;
};
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/StackingAction.hh
/// \brief Definition of the StackingAction class
//
// $Id$
// $Id: StackingAction.hh 76464 2013-11-11 10:22:56Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -37,7 +37,6 @@
#include "G4UserStackingAction.hh"
#include "globals.hh"
class RunAction;
class EventAction;
class StackingMessenger;
@@ -46,7 +45,7 @@ class StackingMessenger;
class StackingAction : public G4UserStackingAction
{
public:
StackingAction(RunAction*,EventAction*);
StackingAction(EventAction*);
~StackingAction();
void SetKillStatus(G4int value) { fKillSecondary = value;};
@@ -54,7 +53,6 @@ class StackingAction : public G4UserStackingAction
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track*);
private:
RunAction* fRunAction;
EventAction* fEventAction;
G4int fKillSecondary;
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/StackingMessenger.hh
/// \brief Definition of the StackingMessenger class
//
// $Id$
// $Id: StackingMessenger.hh 66241 2012-12-13 18:34:42Z gunter $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/StepMax.hh
/// \brief Definition of the StepMax class
//
// $Id$
// $Id: StepMax.hh 66241 2012-12-13 18:34:42Z gunter $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/StepMaxMessenger.hh
/// \brief Definition of the StepMaxMessenger class
//
// $Id$
// $Id: StepMaxMessenger.hh 66241 2012-12-13 18:34:42Z gunter $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/SteppingAction.hh
/// \brief Definition of the SteppingAction class
//
// $Id$
// $Id: SteppingAction.hh 73026 2013-08-15 09:12:46Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -46,14 +46,13 @@ class EventAction;
class SteppingAction : public G4UserSteppingAction
{
public:
SteppingAction(DetectorConstruction*,RunAction*,EventAction*);
SteppingAction(DetectorConstruction*,EventAction*);
~SteppingAction();
virtual void UserSteppingAction(const G4Step*);
private:
DetectorConstruction* fDetector;
RunAction* fRunAction;
EventAction* fEventAction;
};
@@ -23,15 +23,12 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm5/include/SteppingVerbose.hh
/// \file radioactivedecay/rdecay01/include/SteppingVerbose.hh
/// \brief Definition of the SteppingVerbose class
//
// $Id$
//
// This class manages the verbose outputs in G4SteppingManager.
// It inherits from G4SteppingVerbose.
// It shows how to extract informations during the tracking of a particle.
//
// $Id: SteppingVerbose.hh 70891 2013-06-07 08:37:02Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -48,10 +45,9 @@ public:
SteppingVerbose();
~SteppingVerbose();
virtual void StepInfo();
virtual void TrackingStarted();
virtual void StepInfo();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/TrackingAction.hh
/// \brief Definition of the TrackingAction class
//
// $Id$
// $Id: TrackingAction.hh 76464 2013-11-11 10:22:56Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -38,7 +38,6 @@
#include "globals.hh"
class DetectorConstruction;
class RunAction;
class EventAction;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -46,7 +45,7 @@ class EventAction;
class TrackingAction : public G4UserTrackingAction {
public:
TrackingAction(DetectorConstruction*,RunAction*,EventAction*);
TrackingAction(DetectorConstruction*,EventAction*);
~TrackingAction() {};
virtual void PreUserTrackingAction(const G4Track*);
@@ -54,7 +53,6 @@ class TrackingAction : public G4UserTrackingAction {
private:
DetectorConstruction* fDetector;
RunAction* fRunAction;
EventAction* fEventAction;
G4double fXstartAbs, fXendAbs;
@@ -1,42 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm5/include/g4hbook.hh
/// \brief Definition of the g4hbook class
//
// $Id$
// Author: Ivana Hrivnacova, 15/06/2011 (ivana@ipno.in2p3.fr)
#ifndef g4hbook_h
#define g4hbook_h
#include "g4hbook_defs.hh"
using namespace G4Hbook;
#endif