Import Geant4 10.4.0 source tree
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm18/include/EventAction.hh
|
||||
/// \brief Definition of the EventAction class
|
||||
//
|
||||
// $Id: EventAction.hh 82401 2014-06-18 14:43:54Z gcosmo $
|
||||
// $Id: EventAction.hh 105927 2017-08-29 13:25:29Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -36,8 +36,10 @@
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "globals.hh"
|
||||
#include <map>
|
||||
|
||||
class RunAction;
|
||||
class G4VProcess;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -51,14 +53,15 @@ class EventAction : public G4UserEventAction
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
|
||||
void AddEnergyDeposit(G4double edep) {fEnergyDeposit += edep;};
|
||||
void AddSecondary(G4double ekin) {fEnergySecondary += ekin;};
|
||||
|
||||
void SumEnergyDeposited(G4int trackID, G4double edep);
|
||||
void SumEnergyTransfered(const G4VProcess*, G4double);
|
||||
|
||||
private:
|
||||
RunAction* fRunAction;
|
||||
|
||||
G4double fEnergyDeposit;
|
||||
G4double fEnergySecondary;
|
||||
G4double fEdepPrimary, fEdepSecondary;
|
||||
std::map<G4String,G4double> fEnergyTransfered;
|
||||
std::map<G4String,G4int> fProcessSubType;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm18/include/RunAction.hh
|
||||
/// \brief Definition of the RunAction class
|
||||
//
|
||||
// $Id: RunAction.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
// $Id: RunAction.hh 105927 2017-08-29 13:25:29Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -35,8 +35,9 @@
|
||||
#define RunAction_h 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
|
||||
#include "G4VProcess.hh"
|
||||
#include "globals.hh"
|
||||
#include <map>
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -60,43 +61,64 @@ class RunAction : public G4UserRunAction
|
||||
virtual void BeginOfRunAction(const G4Run*);
|
||||
virtual void EndOfRunAction(const G4Run*);
|
||||
|
||||
void AddEnergyDeposit (G4double edep)
|
||||
{fEnergyDeposit += edep;};
|
||||
void CountProcesses(G4String procName);
|
||||
|
||||
void TrackLength (G4double step);
|
||||
|
||||
void EnergyDeposited (G4double edepPrim, G4double edepSecond);
|
||||
|
||||
void EnergyTransferedByProcess (G4String procName, G4double energy);
|
||||
|
||||
void EnergyTransfered (G4double energy);
|
||||
|
||||
void TotalEnergyLost (G4double energy);
|
||||
|
||||
void EnergyBalance (G4double energy);
|
||||
|
||||
void TotalEnergyDeposit (G4double energy);
|
||||
|
||||
void EnergySpectrumOfSecondaries (G4String particleName, G4double ekin);
|
||||
|
||||
void AddTrackLength (G4double step)
|
||||
{fTrackLength += step; fNbSteps++;};
|
||||
|
||||
void AddChargedSecondary (G4double ekin)
|
||||
{fEnergyCharged += ekin; fNbCharged++;
|
||||
if (ekin<fEmin[0]) fEmin[0] = ekin;
|
||||
if (ekin>fEmax[0]) fEmax[0] = ekin;
|
||||
};
|
||||
|
||||
void AddNeutralSecondary (G4double ekin)
|
||||
{fEnergyNeutral += ekin; fNbNeutral++;
|
||||
if (ekin<fEmin[1]) fEmin[1] = ekin;
|
||||
if (ekin>fEmax[1]) fEmax[1] = ekin;
|
||||
};
|
||||
|
||||
public:
|
||||
G4double GetEnergyFromRestrictedRange
|
||||
(G4double,G4ParticleDefinition*,G4Material*,G4double);
|
||||
|
||||
G4double GetEnergyFromCSDARange
|
||||
(G4double,G4ParticleDefinition*,G4Material*,G4double);
|
||||
|
||||
(G4double,G4ParticleDefinition*,G4Material*,G4double);
|
||||
|
||||
private:
|
||||
struct MinMaxData {
|
||||
MinMaxData()
|
||||
: fCount(0), fVsum(0.), fVmin(0.), fVmax(0.) {}
|
||||
MinMaxData(G4int count, G4double vsum, G4double vmin, G4double vmax)
|
||||
: fCount(count), fVsum(vsum), fVmin(vmin), fVmax(vmax) {}
|
||||
G4int fCount;
|
||||
G4double fVsum;
|
||||
G4double fVmin;
|
||||
G4double fVmax;
|
||||
};
|
||||
|
||||
private:
|
||||
G4double fEnergyDeposit;
|
||||
G4double fTrackLength;
|
||||
G4double fEnergyCharged, fEnergyNeutral;
|
||||
G4double fEmin[2], fEmax[2];
|
||||
|
||||
G4long fNbSteps;
|
||||
G4int fNbCharged, fNbNeutral;
|
||||
|
||||
DetectorConstruction* fDetector;
|
||||
PrimaryGeneratorAction* fPrimary;
|
||||
HistoManager* fHistoManager;
|
||||
|
||||
std::map<G4String,G4int> fProcCounter;
|
||||
|
||||
G4long fNbSteps;
|
||||
G4double fTrackLength, fStepMin, fStepMax;
|
||||
|
||||
G4double fEdepPrimary, fEdepPrimMin, fEdepPrimMax;
|
||||
std::map<G4String,MinMaxData> fEtransfByProcess;
|
||||
G4double fEnergyTransfered, fEtransfMin, fEtransfMax;
|
||||
G4double fEnergyLost, fElostMin, fElostMax;
|
||||
G4double fEnergyBalance, fEbalMin, fEbalMax;
|
||||
|
||||
G4double fEdepSecondary, fEdepSecMin, fEdepSecMax;
|
||||
G4double fEdepTotal, fEdepTotMin, fEdepTotMax;
|
||||
|
||||
std::map<G4String,MinMaxData> fEkinOfSecondaries;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm18/include/StackingAction.hh
|
||||
/// \brief Definition of the StackingAction class
|
||||
//
|
||||
// $Id: StackingAction.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
// $Id: StackingAction.hh 105927 2017-08-29 13:25:29Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -37,22 +37,23 @@
|
||||
#include "G4UserStackingAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RunAction;
|
||||
class EventAction;
|
||||
class StackingMessenger;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class StackingAction : public G4UserStackingAction
|
||||
{
|
||||
public:
|
||||
StackingAction(RunAction*, EventAction*);
|
||||
StackingAction();
|
||||
~StackingAction();
|
||||
|
||||
|
||||
void SetTrackSecondaries(G4bool value) { fTrackSecondaries = value;};
|
||||
|
||||
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track*);
|
||||
|
||||
|
||||
private:
|
||||
RunAction* fRunaction;
|
||||
EventAction* fEventaction;
|
||||
G4bool fTrackSecondaries;
|
||||
StackingMessenger* fStackMessenger;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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/StackingMessenger.hh
|
||||
/// \brief Definition of the StackingMessenger class
|
||||
//
|
||||
// $Id: StackingMessenger.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef StackingMessenger_h
|
||||
#define StackingMessenger_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class StackingAction;
|
||||
class G4UIcmdWithABool;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class StackingMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
StackingMessenger(StackingAction*);
|
||||
~StackingMessenger();
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
StackingAction* fStackAction;
|
||||
G4UIcmdWithABool* fTrackCmd;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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/TestEm12/include/TrackingAction.hh
|
||||
/// \brief Definition of the TrackingAction class
|
||||
//
|
||||
// $Id: TrackingAction.hh 78723 2014-01-20 10:32:17Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef TrackingAction_h
|
||||
#define TrackingAction_h 1
|
||||
|
||||
#include "G4UserTrackingAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RunAction;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class TrackingAction : public G4UserTrackingAction {
|
||||
|
||||
public:
|
||||
TrackingAction(RunAction*);
|
||||
~TrackingAction() {};
|
||||
|
||||
virtual void PreUserTrackingAction(const G4Track*);
|
||||
virtual void PostUserTrackingAction(const G4Track*);
|
||||
|
||||
private:
|
||||
RunAction* fRunAction;
|
||||
|
||||
G4double fEkin1;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user