Import Geant4 10.1.0 source tree
This commit is contained in:
+21
-25
@@ -23,42 +23,38 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: EventActionMessenger.hh 68740 2013-04-05 09:56:39Z gcosmo $
|
||||
// $Id: ActionInitialization.hh 76346 2013-11-08 15:48:19Z maire $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
/// \file ActionInitialization.hh
|
||||
/// \brief Definition of the ActionInitialization class
|
||||
|
||||
#ifndef EventActionMessenger_h
|
||||
#define EventActionMessenger_h 1
|
||||
#ifndef ActionInitialization_h
|
||||
#define ActionInitialization_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
|
||||
class EventAction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithABool;
|
||||
class DetectorConstruction;
|
||||
class G4VSteppingVerbose;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
/// Action initialization class.
|
||||
///
|
||||
|
||||
class EventActionMessenger: public G4UImessenger
|
||||
class ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
EventActionMessenger(EventAction*);
|
||||
~EventActionMessenger();
|
||||
ActionInitialization(DetectorConstruction*);
|
||||
virtual ~ActionInitialization();
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
virtual G4VSteppingVerbose* InitializeSteppingVerbose() const;
|
||||
|
||||
private:
|
||||
EventAction* eventAction;
|
||||
|
||||
G4UIdirectory* eventDir;
|
||||
G4UIcmdWithAString* DrawCmd;
|
||||
G4UIcmdWithAnInteger* PrintCmd;
|
||||
G4UIcmdWithABool* WriteCmd;
|
||||
DetectorConstruction* fDetector;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: DetectorConstruction.hh 68740 2013-04-05 09:56:39Z gcosmo $
|
||||
// $Id: DetectorConstruction.hh 83418 2014-08-21 15:30:47Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -33,12 +33,12 @@
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4Cache.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4LogicalVolume;
|
||||
class G4Material;
|
||||
class G4UniformMagField;
|
||||
class DetectorMessenger;
|
||||
class G4GlobalMagFieldMessenger;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -51,11 +51,10 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
G4VPhysicalVolume* Construct();
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
void PrintCalorParameters();
|
||||
void SetMagField(G4double);
|
||||
void UpdateGeometry();
|
||||
|
||||
public:
|
||||
|
||||
@@ -75,13 +74,6 @@ public:
|
||||
G4int GetNbFibers() {return nbOfFibers;};
|
||||
G4int GetNbLayers() {return nbOfLayers;};
|
||||
G4int GetNbModules() {return nbOfModules;};
|
||||
|
||||
G4int GetN1Pixels() {return n1pxl;};
|
||||
G4int GetN2Pixels() {return n2pxl;};
|
||||
G4double GetD1Pixel() {return d1pxl;};
|
||||
G4double GetD2Pixel() {return d2pxl;};
|
||||
G4int GetN1Shift() {return n1shift;};
|
||||
G4int GetSizeVectorPixels() {return sizeVectorPxl;};
|
||||
|
||||
private:
|
||||
|
||||
@@ -122,16 +114,8 @@ private:
|
||||
G4VPhysicalVolume* pvol_world;
|
||||
|
||||
G4Material* defaultMat;
|
||||
|
||||
//pixels readout
|
||||
//
|
||||
G4int n1pxl, n2pxl;
|
||||
G4double d1pxl, d2pxl;
|
||||
G4int n1shift;
|
||||
G4int sizeVectorPxl;
|
||||
|
||||
G4UniformMagField* magField;
|
||||
DetectorMessenger* detectorMessenger;
|
||||
G4Cache<G4GlobalMagFieldMessenger*> fFieldMessenger;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: EventAction.hh 68740 2013-04-05 09:56:39Z gcosmo $
|
||||
// $Id: EventAction.hh 83418 2014-08-21 15:30:47Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -36,56 +36,38 @@
|
||||
#include "globals.hh"
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
class RunAction;
|
||||
class PrimaryGeneratorAction;
|
||||
class EventActionMessenger;
|
||||
class HistoManager;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class EventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
EventAction(DetectorConstruction*, RunAction*, PrimaryGeneratorAction*,
|
||||
HistoManager*);
|
||||
EventAction(DetectorConstruction*, PrimaryGeneratorAction*);
|
||||
~EventAction();
|
||||
|
||||
void BeginOfEventAction(const G4Event*);
|
||||
void EndOfEventAction(const G4Event*);
|
||||
|
||||
void SetDrawFlag (G4String val) {drawFlag = val;};
|
||||
void SetPrintModulo(G4int val) {printModulo = val;};
|
||||
|
||||
void SumVisibleEnergy(G4int pixel, G4double de)
|
||||
{visibleEnergy[pixel] += de;};
|
||||
void SumDeStep(G4int, G4int, G4int, G4double);
|
||||
|
||||
void WriteFibers(const G4Event*);
|
||||
|
||||
void SumTotalEnergy (G4int pixel, G4double de)
|
||||
{totalEnergy[pixel] += de;};
|
||||
|
||||
void SumNbRadLength (G4double dn) {nbRadLen += dn;};
|
||||
|
||||
void SetWriteFile(G4bool);
|
||||
void WritePixels(const G4Event*);
|
||||
|
||||
|
||||
private:
|
||||
DetectorConstruction* detector;
|
||||
RunAction* runAct;
|
||||
PrimaryGeneratorAction* primary;
|
||||
|
||||
std::vector<G4double> visibleEnergy;
|
||||
std::vector<G4double> totalEnergy;
|
||||
G4double nbRadLen;
|
||||
|
||||
G4bool trigger;
|
||||
G4double Eseuil;
|
||||
|
||||
G4bool writeFile;
|
||||
|
||||
G4String drawFlag;
|
||||
G4int printModulo;
|
||||
EventActionMessenger* eventMessenger;
|
||||
HistoManager* histoManager;
|
||||
|
||||
G4int nbOfModules, nbOfLayers, kLayerMax;
|
||||
std::vector<G4double> EtotLayer;
|
||||
std::vector<G4double> EvisLayer;
|
||||
|
||||
G4double EtotCalor;
|
||||
G4double EvisCalor;
|
||||
|
||||
std::map<G4int, G4double> EvisFiber;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: HistoManager.hh 73008 2013-08-15 08:43:13Z gcosmo $
|
||||
/// \file electromagnetic/TestEm1/include/HistoManager.hh
|
||||
/// \brief Definition of the HistoManager class
|
||||
//
|
||||
// $Id: HistoManager.hh 82762 2014-07-08 14:21:21Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -33,80 +36,21 @@
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
namespace AIDA {
|
||||
class IAnalysisFactory;
|
||||
class ITree;
|
||||
class IHistogram1D;
|
||||
class ITuple;
|
||||
}
|
||||
|
||||
class HistoMessenger;
|
||||
|
||||
const G4int MaxHisto = 6; const G4int MaxNtupl = 2;
|
||||
#include "g4root.hh"
|
||||
////#include "g4xml.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class HistoManager
|
||||
{
|
||||
public:
|
||||
|
||||
HistoManager();
|
||||
~HistoManager();
|
||||
|
||||
void SetFileName (const G4String& name) { fileName[0] = name;};
|
||||
void SetFileType (const G4String& name) { fileType = name;};
|
||||
void SetFileOption (const G4String& name) { fileOption = name;};
|
||||
void book();
|
||||
void save();
|
||||
void SetHisto (G4int,G4int,G4double,G4double,const G4String& unit="none");
|
||||
void FillHisto(G4int id, G4double bin, G4double weight = 1.0);
|
||||
void Normalize(G4int id, G4double fac);
|
||||
void RemoveHisto(G4int);
|
||||
void PrintHisto (G4int);
|
||||
|
||||
void SetNtuple (G4int);
|
||||
void FillNtuple(G4int id, G4int column, G4double value);
|
||||
void AddRowNtuple(G4int id);
|
||||
|
||||
G4bool HistoExist (G4int id) {return exist[id];}
|
||||
G4double GetHistoUnit(G4int id) {return Unit[id];}
|
||||
G4double GetBinWidth (G4int id) {return Width[id];}
|
||||
G4String GetFileName () {return fileName[0];}
|
||||
|
||||
private:
|
||||
|
||||
G4String fileName[2];
|
||||
G4String fileType;
|
||||
G4String fileOption;
|
||||
#ifdef G4ANALYSIS_USE
|
||||
G4bool factoryOn;
|
||||
AIDA::IAnalysisFactory* af;
|
||||
AIDA::ITree* tree;
|
||||
#endif
|
||||
|
||||
AIDA::IHistogram1D* histo[MaxHisto];
|
||||
G4bool exist[MaxHisto];
|
||||
G4String Label[MaxHisto];
|
||||
G4String Title[MaxHisto];
|
||||
G4int Nbins[MaxHisto];
|
||||
G4double Vmin [MaxHisto];
|
||||
G4double Vmax [MaxHisto];
|
||||
G4double Unit [MaxHisto];
|
||||
G4double Width[MaxHisto];
|
||||
G4bool ascii[MaxHisto];
|
||||
|
||||
AIDA::ITuple* ntupl[MaxNtupl];
|
||||
G4bool existNt[MaxNtupl];
|
||||
G4String LabelNt[MaxNtupl];
|
||||
G4String TitleNt[MaxNtupl];
|
||||
G4String ColumnNt[MaxNtupl];
|
||||
HistoManager();
|
||||
~HistoManager();
|
||||
|
||||
HistoMessenger* histoMessenger;
|
||||
|
||||
private:
|
||||
void saveAscii();
|
||||
void Book();
|
||||
|
||||
G4String fFileName;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -1,73 +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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: HistoMessenger.hh 68740 2013-04-05 09:56:39Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef HistoMessenger_h
|
||||
#define HistoMessenger_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class HistoManager;
|
||||
class G4UIdirectory;
|
||||
class G4UIcommand;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class HistoMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
|
||||
HistoMessenger(HistoManager* );
|
||||
~HistoMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand* ,G4String );
|
||||
|
||||
private:
|
||||
|
||||
HistoManager* histoManager;
|
||||
|
||||
G4UIdirectory* histoDir;
|
||||
G4UIcmdWithAString* factoryCmd;
|
||||
G4UIcmdWithAString* typeCmd;
|
||||
G4UIcmdWithAString* optionCmd;
|
||||
G4UIcommand* histoCmd;
|
||||
G4UIcmdWithAnInteger* prhistoCmd;
|
||||
G4UIcmdWithAnInteger* rmhistoCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* ntuplCmd;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysListEmStandard.hh 68740 2013-04-05 09:56:39Z gcosmo $
|
||||
// $Id: PhysListEmStandard.hh 83010 2014-07-24 14:53:07Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -40,7 +40,7 @@ class PhysListEmStandard : public G4VPhysicsConstructor
|
||||
{
|
||||
public:
|
||||
PhysListEmStandard(const G4String& name = "standard");
|
||||
~PhysListEmStandard();
|
||||
~PhysListEmStandard();
|
||||
|
||||
public:
|
||||
// This method is dummy for physics
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysicsList.hh 68740 2013-04-05 09:56:39Z gcosmo $
|
||||
// $Id: PhysicsList.hh 83010 2014-07-24 14:53:07Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -50,17 +50,7 @@ class PhysicsList: public G4VModularPhysicsList
|
||||
|
||||
void AddPhysicsList(const G4String& name);
|
||||
|
||||
void SetCuts();
|
||||
void SetCutForGamma(G4double);
|
||||
void SetCutForElectron(G4double);
|
||||
void SetCutForPositron(G4double);
|
||||
|
||||
private:
|
||||
G4double cutForGamma;
|
||||
G4double cutForElectron;
|
||||
G4double cutForPositron;
|
||||
G4double currentDefaultCut;
|
||||
|
||||
private:
|
||||
G4VPhysicsConstructor* emPhysicsList;
|
||||
G4String emName;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysicsListMessenger.hh 68740 2013-04-05 09:56:39Z gcosmo $
|
||||
// $Id: PhysicsListMessenger.hh 83418 2014-08-21 15:30:47Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -36,7 +36,6 @@
|
||||
|
||||
class PhysicsList;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithAString;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -53,12 +52,9 @@ class PhysicsListMessenger: public G4UImessenger
|
||||
private:
|
||||
|
||||
PhysicsList* pPhysicsList;
|
||||
|
||||
|
||||
G4UIdirectory* amsDir;
|
||||
G4UIdirectory* physDir;
|
||||
G4UIcmdWithADoubleAndUnit* gammaCutCmd;
|
||||
G4UIcmdWithADoubleAndUnit* electCutCmd;
|
||||
G4UIcmdWithADoubleAndUnit* protoCutCmd;
|
||||
G4UIcmdWithADoubleAndUnit* allCutCmd;
|
||||
G4UIcmdWithAString* pListCmd;
|
||||
|
||||
};
|
||||
|
||||
+34
-18
@@ -23,39 +23,55 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: DetectorMessenger.hh 68740 2013-04-05 09:56:39Z gcosmo $
|
||||
/// \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 DetectorMessenger_h
|
||||
#define DetectorMessenger_h 1
|
||||
#ifndef Run_h
|
||||
#define Run_h 1
|
||||
|
||||
#include "G4Run.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
#include <map>
|
||||
|
||||
class DetectorConstruction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithoutParameter;
|
||||
class G4ParticleDefinition;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class DetectorMessenger: public G4UImessenger
|
||||
class Run : public G4Run
|
||||
{
|
||||
public:
|
||||
DetectorMessenger(DetectorConstruction* );
|
||||
~DetectorMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
Run(DetectorConstruction*);
|
||||
~Run();
|
||||
|
||||
public:
|
||||
void SetPrimary(G4ParticleDefinition* particle, G4double energy);
|
||||
|
||||
void SumEvents_1(G4int,G4double,G4double);
|
||||
void SumEvents_2(G4double,G4double,G4double);
|
||||
void DetailedLeakage(G4int,G4double);
|
||||
|
||||
virtual void Merge(const G4Run*);
|
||||
void EndOfRun();
|
||||
|
||||
private:
|
||||
DetectorConstruction* Detector;
|
||||
|
||||
G4UIdirectory* amsDir;
|
||||
G4UIdirectory* detDir;
|
||||
G4UIcmdWithADoubleAndUnit* MagFieldCmd;
|
||||
G4UIcmdWithoutParameter* UpdateCmd;
|
||||
DetectorConstruction* fDetector;
|
||||
G4ParticleDefinition* fParticle;
|
||||
G4double fEkin;
|
||||
|
||||
G4int nbOfModules, nbOfLayers, kLayerMax;
|
||||
std::vector<G4double> EtotLayer, Etot2Layer;
|
||||
std::vector<G4double> EvisLayer, Evis2Layer;
|
||||
|
||||
G4double EtotCalor, Etot2Calor;
|
||||
G4double EvisCalor, Evis2Calor;
|
||||
G4double Eleak, Eleak2;
|
||||
G4double EdLeak[3];
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -23,7 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RunAction.hh 68740 2013-04-05 09:56:39Z gcosmo $
|
||||
/// \file electromagnetic/TestEm5/include/RunAction.hh
|
||||
/// \brief Definition of the RunAction class
|
||||
//
|
||||
// $Id: RunAction.hh 83418 2014-08-21 15:30:47Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -31,62 +34,36 @@
|
||||
#ifndef RunAction_h
|
||||
#define RunAction_h 1
|
||||
|
||||
#include "DetectorConstruction.hh"
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include <vector>
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class Run;
|
||||
class DetectorConstruction;
|
||||
class PrimaryGeneratorAction;
|
||||
class HistoManager;
|
||||
|
||||
class G4Run;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class RunAction : public G4UserRunAction
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
RunAction(DetectorConstruction*, PrimaryGeneratorAction*, HistoManager*);
|
||||
~RunAction();
|
||||
RunAction(DetectorConstruction* det, PrimaryGeneratorAction* prim=0);
|
||||
~RunAction();
|
||||
|
||||
virtual G4Run* GenerateRun();
|
||||
virtual void BeginOfRunAction(const G4Run*);
|
||||
virtual void EndOfRunAction(const G4Run*);
|
||||
|
||||
void BeginOfRunAction(const G4Run*);
|
||||
void EndOfRunAction(const G4Run*);
|
||||
|
||||
void fillPerEvent_1(G4int,G4double,G4double);
|
||||
void fillPerEvent_2(G4int,G4double,G4double);
|
||||
void fillPerEvent_3(G4double,G4double,G4double);
|
||||
void fillDetailedLeakage(G4int,G4double);
|
||||
void fillNbRadLen(G4double);
|
||||
|
||||
void SetWriteFile(G4bool val) {writeFile = val;};
|
||||
void CreateFilePixels();
|
||||
|
||||
private:
|
||||
|
||||
DetectorConstruction* detector;
|
||||
PrimaryGeneratorAction* primary;
|
||||
HistoManager* histoManager;
|
||||
|
||||
std::vector<G4double> visibleEnergy, visibleEnergy2;
|
||||
std::vector<G4double> totalEnergy, totalEnergy2;
|
||||
|
||||
std::vector<G4double> layerEvis, layerEvis2;
|
||||
std::vector<G4double> layerEtot, layerEtot2;
|
||||
|
||||
G4int nbEvents;
|
||||
G4double calorEvis, calorEvis2;
|
||||
G4double calorEtot, calorEtot2;
|
||||
G4double Eleak, Eleak2;
|
||||
G4double EdLeak[3];
|
||||
G4double nbRadLen, nbRadLen2;
|
||||
|
||||
G4bool writeFile;
|
||||
|
||||
private:
|
||||
DetectorConstruction* fDetector;
|
||||
PrimaryGeneratorAction* fPrimary;
|
||||
Run* fRun;
|
||||
HistoManager* fHistoManager;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: SteppingAction.hh 73008 2013-08-15 08:43:13Z gcosmo $
|
||||
// $Id: SteppingAction.hh 83010 2014-07-24 14:53:07Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -35,10 +35,7 @@
|
||||
#include "globals.hh"
|
||||
|
||||
class DetectorConstruction;
|
||||
class RunAction;
|
||||
class PrimaryGeneratorAction;
|
||||
class EventAction;
|
||||
class HistoManager;
|
||||
|
||||
class G4LogicalVolume;
|
||||
|
||||
@@ -47,8 +44,7 @@ class G4LogicalVolume;
|
||||
class SteppingAction : public G4UserSteppingAction
|
||||
{
|
||||
public:
|
||||
SteppingAction(DetectorConstruction*,
|
||||
EventAction*);
|
||||
SteppingAction(DetectorConstruction*, EventAction*);
|
||||
~SteppingAction();
|
||||
|
||||
void UserSteppingAction(const G4Step*);
|
||||
@@ -57,17 +53,13 @@ class SteppingAction : public G4UserSteppingAction
|
||||
|
||||
private:
|
||||
DetectorConstruction* detector;
|
||||
EventAction* eventAct;
|
||||
EventAction* eventAct;
|
||||
|
||||
G4bool first;
|
||||
G4LogicalVolume* lvol_world;
|
||||
G4LogicalVolume* lvol_module;
|
||||
G4LogicalVolume* lvol_layer;
|
||||
G4LogicalVolume* lvol_fiber;
|
||||
|
||||
G4double calorThickness, calorSizeYZ, moduleThickness;
|
||||
G4double d1Pixel, d2Pixel;
|
||||
G4int n1pxl, n2pxl, n1shift;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: SteppingVerbose.hh 68740 2013-04-05 09:56:39Z gcosmo $
|
||||
/// \file radioactivedecay/rdecay01/include/SteppingVerbose.hh
|
||||
/// \brief Definition of the SteppingVerbose class
|
||||
//
|
||||
// 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 83010 2014-07-24 14:53:07Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -39,15 +39,15 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class SteppingVerbose : public G4SteppingVerbose
|
||||
{
|
||||
class SteppingVerbose : public G4SteppingVerbose {
|
||||
|
||||
public:
|
||||
|
||||
SteppingVerbose();
|
||||
~SteppingVerbose();
|
||||
|
||||
void StepInfo();
|
||||
void TrackingStarted();
|
||||
SteppingVerbose();
|
||||
~SteppingVerbose();
|
||||
|
||||
virtual void TrackingStarted();
|
||||
virtual void StepInfo();
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: TrackingAction.hh 73008 2013-08-15 08:43:13Z gcosmo $
|
||||
// $Id: TrackingAction.hh 83418 2014-08-21 15:30:47Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -35,14 +35,13 @@
|
||||
#include "globals.hh"
|
||||
|
||||
class DetectorConstruction;
|
||||
class RunAction;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class TrackingAction : public G4UserTrackingAction {
|
||||
|
||||
public:
|
||||
TrackingAction(DetectorConstruction*,RunAction*);
|
||||
TrackingAction(DetectorConstruction*);
|
||||
|
||||
~TrackingAction() {};
|
||||
|
||||
@@ -51,7 +50,6 @@ class TrackingAction : public G4UserTrackingAction {
|
||||
|
||||
private:
|
||||
DetectorConstruction* detector;
|
||||
RunAction* runAct;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user