Import Geant4 11.3.0 source tree
This commit is contained in:
@@ -23,9 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4DefaultLinearColorMap
|
||||
//
|
||||
//
|
||||
|
||||
// Author: Makoto Asai
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4DefaultLinearColorMap_h
|
||||
#define G4DefaultLinearColorMap_h 1
|
||||
|
||||
@@ -35,10 +36,10 @@
|
||||
class G4DefaultLinearColorMap : public G4VScoreColorMap
|
||||
{
|
||||
public:
|
||||
|
||||
using G4VScoreColorMap::G4VScoreColorMap;
|
||||
~G4DefaultLinearColorMap() override = default;
|
||||
|
||||
public:
|
||||
void GetMapColor(G4double val, G4double color[4]) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4ScoreLogColorMap
|
||||
//
|
||||
//
|
||||
|
||||
// Author: Makoto Asai
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ScoreLogColorMap_h
|
||||
#define G4ScoreLogColorMap_h 1
|
||||
|
||||
@@ -35,10 +36,10 @@
|
||||
class G4ScoreLogColorMap : public G4VScoreColorMap
|
||||
{
|
||||
public:
|
||||
|
||||
using G4VScoreColorMap::G4VScoreColorMap;
|
||||
~G4ScoreLogColorMap() override = default;
|
||||
|
||||
public:
|
||||
void GetMapColor(G4double val, G4double color[4]) override;
|
||||
|
||||
// draw a color chart
|
||||
|
||||
@@ -23,21 +23,22 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4ScoreQuantityMessenger
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// (HISTORY)
|
||||
// 03-Sep-2007 T.Aso Command definitions are introduced.
|
||||
// 01-Nov-2007 M.Asai Class is splited into two.
|
||||
// 20-Jul-2010 T.Aso Specify unit for scorer
|
||||
// 24-Mar-2011 T.Aso Add StepChecker for debugging.
|
||||
|
||||
// This is a concrete class of G4UImessenger which handles the
|
||||
// commands for G4ScoringManager.
|
||||
//
|
||||
// Author: Tsukasa Aso (KEK), September 2007
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ScoreQuantityMessenger_h
|
||||
#define G4ScoreQuantityMessenger_h 1
|
||||
|
||||
#include "G4String.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
#include <vector>
|
||||
#include "G4String.hh"
|
||||
|
||||
class G4ScoringManager;
|
||||
class G4VScoringMesh;
|
||||
@@ -48,15 +49,10 @@ class G4UIcommand;
|
||||
|
||||
using G4TokenVec = std::vector<G4String>;
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is a concrete class of G4UImessenger which handles the commands for
|
||||
// G4ScoringManager.
|
||||
//
|
||||
|
||||
class G4ScoreQuantityMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
|
||||
G4ScoreQuantityMessenger(G4ScoringManager* SManager);
|
||||
|
||||
~G4ScoreQuantityMessenger() override;
|
||||
@@ -66,19 +62,22 @@ class G4ScoreQuantityMessenger : public G4UImessenger
|
||||
G4String GetCurrentValue(G4UIcommand*) override;
|
||||
|
||||
protected:
|
||||
void FillTokenVec(G4String newValues, G4TokenVec& token);
|
||||
|
||||
void FillTokenVec(const G4String& newValues, G4TokenVec& token);
|
||||
|
||||
void FParticleCommand(G4VScoringMesh* mesh, G4TokenVec& token);
|
||||
void FParticleWithEnergyCommand(G4VScoringMesh* mesh, G4TokenVec& token);
|
||||
|
||||
G4bool CheckMeshPS(G4VScoringMesh* mesh, G4String& psname,
|
||||
G4bool CheckMeshPS(G4VScoringMesh* mesh, const G4String& psname,
|
||||
G4UIcommand* command);
|
||||
|
||||
private:
|
||||
|
||||
void QuantityCommands();
|
||||
void FilterCommands();
|
||||
|
||||
private:
|
||||
|
||||
G4ScoringManager* fSMan;
|
||||
//
|
||||
// Quantity commands
|
||||
|
||||
@@ -23,42 +23,46 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4ScoringBox
|
||||
//
|
||||
//
|
||||
|
||||
// Author: Makoto Asai
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ScoringBox_h
|
||||
#define G4ScoringBox_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VScoringMesh.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4LogicalVolume;
|
||||
class G4VPrimitiveScorer;
|
||||
class G4VScoreColorMap;
|
||||
|
||||
#include <vector>
|
||||
|
||||
class G4ScoringBox : public G4VScoringMesh
|
||||
{
|
||||
public:
|
||||
G4ScoringBox(G4String wName);
|
||||
|
||||
G4ScoringBox(const G4String& wName);
|
||||
~G4ScoringBox() override = default;
|
||||
|
||||
public:
|
||||
void List() const override;
|
||||
void Draw(RunScore* map, G4VScoreColorMap* colorMap, G4int axflg = 111) override;
|
||||
void DrawColumn(RunScore* map, G4VScoreColorMap* colorMap, G4int idxProj,
|
||||
G4int idxColumn) override;
|
||||
|
||||
// set a direction to segment this mesh
|
||||
void SetSegmentDirection(G4int dir) { fSegmentDirection = dir; }
|
||||
inline void SetSegmentDirection(G4int dir) { fSegmentDirection = dir; }
|
||||
|
||||
protected:
|
||||
|
||||
// construct this mesh
|
||||
void SetupGeometry(G4VPhysicalVolume* fWorldPhys) override;
|
||||
|
||||
private:
|
||||
|
||||
// get replicated position from 3D index (x,y,z)
|
||||
G4ThreeVector GetReplicaPosition(G4int x, G4int y, G4int z);
|
||||
// get 3D index (x,y,z) from sequential index
|
||||
@@ -67,6 +71,7 @@ class G4ScoringBox : public G4VScoringMesh
|
||||
G4int GetIndex(G4int x, G4int y, G4int z) const;
|
||||
|
||||
private:
|
||||
|
||||
G4int fSegmentDirection; // =1: x, =2: y, =3: z
|
||||
};
|
||||
|
||||
|
||||
@@ -23,33 +23,34 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4ScoringCylinder
|
||||
//
|
||||
//
|
||||
|
||||
// Author: Makoto Asai
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ScoringCylinder_h
|
||||
#define G4ScoringCylinder_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VScoringMesh.hh"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4LogicalVolume;
|
||||
class G4VPrimitiveScorer;
|
||||
|
||||
#include <vector>
|
||||
|
||||
class G4ScoringCylinder : public G4VScoringMesh
|
||||
{
|
||||
public:
|
||||
G4ScoringCylinder(G4String wName);
|
||||
|
||||
G4ScoringCylinder(const G4String& wName);
|
||||
~G4ScoringCylinder() override = default;
|
||||
|
||||
|
||||
public:
|
||||
void List() const override;
|
||||
void Draw(RunScore* map, G4VScoreColorMap* colorMap,
|
||||
G4int axflg = 111) override;
|
||||
G4int axflg = 111) override;
|
||||
void DrawColumn(RunScore* map, G4VScoreColorMap* colorMap,
|
||||
G4int idxProj, G4int idxColumn) override;
|
||||
G4int idxProj, G4int idxColumn) override;
|
||||
|
||||
void SetRMin(G4double rMin) { fSize[0] = rMin; }
|
||||
void SetRMax(G4double rMax) { fSize[1] = rMax; }
|
||||
@@ -61,9 +62,11 @@ class G4ScoringCylinder : public G4VScoringMesh
|
||||
void GetRZPhi(G4int index, G4int q[3]) const;
|
||||
|
||||
protected:
|
||||
|
||||
void SetupGeometry(G4VPhysicalVolume* fWorldPhys) override;
|
||||
|
||||
private:
|
||||
|
||||
// Xin Dong 09302011 for Scorers
|
||||
enum IDX
|
||||
{
|
||||
|
||||
@@ -23,30 +23,32 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4ScoringManager
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
|
||||
// This is a singleton class which manages the interactive scoring.
|
||||
// The user cannot access to the constructor. The pointer of the
|
||||
// only existing object can be got via G4ScoringManager::GetScoringManager()
|
||||
// static method. The first invocation of this static method makes
|
||||
// the singleton object.
|
||||
//
|
||||
// Author: Makoto Asai
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ScoringManager_h
|
||||
#define G4ScoringManager_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VScoringMesh.hh"
|
||||
#include "G4VScoreWriter.hh"
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
class G4ScoringMessenger;
|
||||
class G4ScoreQuantityMessenger;
|
||||
class G4VHitsCollection;
|
||||
class G4VScoreColorMap;
|
||||
#include "G4VScoreWriter.hh"
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is a singleton class which manages the interactive scoring.
|
||||
// The user cannot access to the constructor. The pointer of the
|
||||
// only existing object can be got via G4ScoringManager::GetScoringManager()
|
||||
// static method. The first invokation of this static method makes
|
||||
// the singleton object.
|
||||
//
|
||||
|
||||
using MeshVec = std::vector<G4VScoringMesh *>;
|
||||
using MeshVecItr = MeshVec::iterator;
|
||||
@@ -60,15 +62,18 @@ using MeshMapConstItr = MeshMap::const_iterator;
|
||||
|
||||
class G4ScoringManager
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
static G4ScoringManager* GetScoringManager();
|
||||
// Returns the pointer to the singleton object.
|
||||
|
||||
static G4ScoringManager* GetScoringManagerIfExist();
|
||||
|
||||
G4ScoringManager(const G4ScoringManager&) = delete;
|
||||
G4ScoringManager& operator=(const G4ScoringManager&) = delete;
|
||||
|
||||
~G4ScoringManager();
|
||||
|
||||
public:
|
||||
static void SetReplicaLevel(G4int);
|
||||
static G4int GetReplicaLevel();
|
||||
|
||||
@@ -109,7 +114,7 @@ class G4ScoringManager
|
||||
writer->SetVerboseLevel(vl);
|
||||
}
|
||||
inline G4int GetVerboseLevel() const { return verboseLevel; }
|
||||
inline size_t GetNumberOfMesh() const { return fMeshVec.size(); }
|
||||
inline std::size_t GetNumberOfMesh() const { return fMeshVec.size(); }
|
||||
inline void RegisterScoringMesh(G4VScoringMesh* scm)
|
||||
{
|
||||
scm->SetVerboseLevel(verboseLevel);
|
||||
@@ -117,12 +122,11 @@ class G4ScoringManager
|
||||
SetCurrentMesh(scm);
|
||||
}
|
||||
inline G4VScoringMesh* GetMesh(G4int i) const { return fMeshVec[i]; }
|
||||
inline G4String GetWorldName(G4int i) const
|
||||
inline const G4String& GetWorldName(G4int i) const
|
||||
{
|
||||
return fMeshVec[i]->GetWorldName();
|
||||
}
|
||||
|
||||
public: // with description
|
||||
inline void SetScoreWriter(G4VScoreWriter* sw)
|
||||
{
|
||||
delete writer;
|
||||
@@ -132,7 +136,6 @@ class G4ScoringManager
|
||||
}
|
||||
// Replace score writers.
|
||||
|
||||
public:
|
||||
inline void SetFactor(G4double val = 1.0)
|
||||
{
|
||||
if(writer != nullptr)
|
||||
@@ -149,16 +152,14 @@ class G4ScoringManager
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
G4ScoringManager();
|
||||
|
||||
private:
|
||||
// Disable copy constructor and assignement operator
|
||||
G4ScoringManager(const G4ScoringManager&);
|
||||
G4ScoringManager& operator=(const G4ScoringManager&);
|
||||
|
||||
private:
|
||||
static G4ThreadLocal G4ScoringManager* fSManager;
|
||||
static G4ThreadLocal G4int replicaLevel;
|
||||
|
||||
G4int verboseLevel;
|
||||
G4ScoringMessenger* fMessenger;
|
||||
G4ScoreQuantityMessenger* fQuantityMessenger;
|
||||
|
||||
@@ -23,21 +23,22 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4ScoringMessenger
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// (HISTORY)
|
||||
// 03-Sep-2007 T.Aso Command definitions are introduced.
|
||||
// 01-Nov-2007 M.Asai Class is splitted into two.
|
||||
// 18-Feb-2008 T.Aso Command for cylindrical scorer.
|
||||
// 18-Feb-2008 T.Aso Command for color chart display.
|
||||
|
||||
// This is a concrete class of G4UImessenger which handles the
|
||||
// commands for G4ScoringManager.
|
||||
//
|
||||
// Author: Tsukasa Aso (KEK), September 2007
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ScoringMessenger_h
|
||||
#define G4ScoringMessenger_h 1
|
||||
|
||||
#include "G4String.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
#include <vector>
|
||||
#include "G4String.hh"
|
||||
|
||||
class G4ScoringManager;
|
||||
class G4VScoringMesh;
|
||||
@@ -52,15 +53,10 @@ class G4UIcommand;
|
||||
|
||||
using G4TokenVec = std::vector<G4String>;
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is a concrete class of G4UImessenger which handles the commands for
|
||||
// G4ScoringManager.
|
||||
//
|
||||
|
||||
class G4ScoringMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
|
||||
G4ScoringMessenger(G4ScoringManager* SManager);
|
||||
|
||||
~G4ScoringMessenger() override;
|
||||
@@ -70,11 +66,13 @@ class G4ScoringMessenger : public G4UImessenger
|
||||
G4String GetCurrentValue(G4UIcommand* command) override;
|
||||
|
||||
protected:
|
||||
void FillTokenVec(G4String newValues, G4TokenVec& token);
|
||||
|
||||
void FillTokenVec(const G4String& newValues, G4TokenVec& token);
|
||||
void MeshBinCommand(G4VScoringMesh* mesh, G4TokenVec& token);
|
||||
void Fill1D(G4UIcommand* cmd, G4String newValues);
|
||||
void Fill1D(G4UIcommand* cmd, const G4String& newValues);
|
||||
|
||||
private:
|
||||
|
||||
G4ScoringManager* fSMan;
|
||||
G4UIdirectory* scoreDir;
|
||||
G4UIcmdWithoutParameter* listCmd;
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4ScoringProbe
|
||||
//
|
||||
|
||||
// Author: Makoto Asai
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ScoringProbe_h
|
||||
#define G4ScoringProbe_h 1
|
||||
|
||||
@@ -39,11 +41,11 @@ class G4Material;
|
||||
class G4ScoringProbe : public G4VScoringMesh
|
||||
{
|
||||
public:
|
||||
G4ScoringProbe(G4String lvName, G4double half_size,
|
||||
|
||||
G4ScoringProbe(const G4String& lvName, G4double half_size,
|
||||
G4bool checkOverlap = false);
|
||||
~G4ScoringProbe() override = default;
|
||||
|
||||
public:
|
||||
void LocateProbe(G4ThreeVector pos)
|
||||
{
|
||||
posVec.push_back(pos);
|
||||
@@ -59,17 +61,17 @@ class G4ScoringProbe : public G4VScoringMesh
|
||||
|
||||
//++++++++++ visualization method not yet implemented
|
||||
void Draw(RunScore* /*map*/, G4VScoreColorMap* /*colorMap*/,
|
||||
G4int /*axflg=111*/) override
|
||||
{}
|
||||
G4int /*axflg=111*/) override {}
|
||||
void DrawColumn(RunScore* /*map*/, G4VScoreColorMap* /*colorMap*/,
|
||||
G4int /*idxProj*/, G4int /*idxColumn*/) override
|
||||
{}
|
||||
G4int /*idxProj*/, G4int /*idxColumn*/) override {}
|
||||
|
||||
protected:
|
||||
|
||||
// construct scoring volume
|
||||
void SetupGeometry(G4VPhysicalVolume*) override;
|
||||
|
||||
protected:
|
||||
|
||||
G4String logVolName;
|
||||
std::vector<G4ThreeVector> posVec;
|
||||
G4double probeSize;
|
||||
|
||||
@@ -23,37 +23,41 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4ScoringRealWorld
|
||||
//
|
||||
// Author: Makoto Asai
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ScoringRealWorld_h
|
||||
#define G4ScoringRealWorld_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VScoringMesh.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4LogicalVolume;
|
||||
|
||||
class G4ScoringRealWorld : public G4VScoringMesh
|
||||
{
|
||||
public:
|
||||
G4ScoringRealWorld(G4String lvName);
|
||||
|
||||
G4ScoringRealWorld(const G4String& lvName);
|
||||
~G4ScoringRealWorld() override = default;
|
||||
|
||||
public:
|
||||
void List() const override;
|
||||
|
||||
//++++++++++ visualization method not yet implemented
|
||||
void Draw(RunScore* /*map*/, G4VScoreColorMap* /*colorMap*/,
|
||||
G4int /*axflg=111*/) override
|
||||
{}
|
||||
|
||||
G4int /*axflg=111*/) override {}
|
||||
void DrawColumn(RunScore* /*map*/, G4VScoreColorMap* /*colorMap*/,
|
||||
G4int /*idxProj*/, G4int /*idxColumn*/) override
|
||||
{}
|
||||
G4int /*idxProj*/, G4int /*idxColumn*/) override {}
|
||||
|
||||
protected:
|
||||
|
||||
// construct this mesh
|
||||
void SetupGeometry(G4VPhysicalVolume*) override;
|
||||
|
||||
protected:
|
||||
|
||||
G4String logVolName;
|
||||
};
|
||||
|
||||
|
||||
@@ -23,9 +23,22 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4TScoreNtupleWriter
|
||||
//
|
||||
// Author: Ivana Hrivnacova, 30/10/2018 (ivana@ipno.in2p3.fr)
|
||||
|
||||
// Class description:
|
||||
//
|
||||
// This class implements storing hits collections of G4THitsMap<G4double>
|
||||
// type vith Geant4 analysis tools.
|
||||
// In order to avoid introducing dependency on the analysis category,
|
||||
// the analysis manager type is defined via template.
|
||||
//
|
||||
// An n-tuple with three columns is created for each primitive scorer:
|
||||
// G4int column - eventNumber
|
||||
// G4int column - copyNumber
|
||||
// G4double column - scored value
|
||||
//
|
||||
// Author: Ivana Hrivnacova, 30/10/2018
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4TScoreNtupleWriter_h
|
||||
#define G4TScoreNtupleWriter_h 1
|
||||
|
||||
@@ -42,22 +55,11 @@ template <typename T>
|
||||
class G4TScoreNtupleWriterMessenger;
|
||||
class G4HCofThisEvent;
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This class implements storing hits collections of G4THitsMap<G4double>
|
||||
// type vith Geant4 analysis tools.
|
||||
// In order to avoid introducing dependency on the analysis category,
|
||||
// the analysis manager type is defined via template.
|
||||
//
|
||||
// An ntuple with three columns is created for each primitive scorer:
|
||||
// int column - eventNumber
|
||||
// int column - copyNumber
|
||||
// double column - scored value
|
||||
|
||||
template <typename T>
|
||||
class G4TScoreNtupleWriter : public G4VScoreNtupleWriter
|
||||
{
|
||||
public:
|
||||
|
||||
G4TScoreNtupleWriter();
|
||||
virtual ~G4TScoreNtupleWriter();
|
||||
|
||||
@@ -74,14 +76,16 @@ class G4TScoreNtupleWriter : public G4VScoreNtupleWriter
|
||||
void SetNtupleMerging(G4bool value);
|
||||
|
||||
// get methods
|
||||
G4String GetFileName() const { return fFileName; }
|
||||
const G4String& GetFileName() const { return fFileName; }
|
||||
G4int GetVerboseLevel() const { return fVerboseLevel; }
|
||||
|
||||
protected:
|
||||
|
||||
// methods
|
||||
virtual G4VScoreNtupleWriter* CreateInstance() const;
|
||||
|
||||
private:
|
||||
|
||||
// methods
|
||||
void CreateAnalysisManager();
|
||||
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4TScoreNtupleWriter inline methods
|
||||
//
|
||||
// Author: Ivana Hrivnacova, 30/10/2018 (ivana@ipno.in2p3.fr)
|
||||
// ---------------------------------------------------------------------
|
||||
// Author: Ivana Hrivnacova, 30/10/2018
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4TScoreNtupleWriterMessenger.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
@@ -23,9 +23,17 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4TScoreNtupleWriterMessenger
|
||||
//
|
||||
// Author: Ivana Hrivnacova, 30/10/2018 (ivana@ipno.in2p3.fr)
|
||||
|
||||
// Class description:
|
||||
//
|
||||
// This is a concrete class of G4UImessenger which handles the commands for
|
||||
// G4TScoreNtupleWriter. This class has the following commands:
|
||||
// /score/writerFileName filename
|
||||
// /score/writerVerbose value
|
||||
//
|
||||
// Author: Ivana Hrivnacova, 30/10/2018
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4TScoreNtupleWriterMessenger_h
|
||||
#define G4TScoreNtupleWriterMessenger_h 1
|
||||
|
||||
@@ -39,14 +47,6 @@ class G4UIcmdWithoutParameter;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is a concrete class of G4UImessenger which handles the commands for
|
||||
// G4TScoreNtupleWriter. This class has the following commands:
|
||||
// /score/writerFileName filename
|
||||
// /score/writerVerbose value
|
||||
//
|
||||
|
||||
template <typename T>
|
||||
class G4TScoreNtupleWriterMessenger : public G4UImessenger
|
||||
{
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4TScoreNtupleWriterMessenger inline methods
|
||||
//
|
||||
// Author: Ivana Hrivnacova, 30/10/2018 (ivana@ipno.in2p3.fr)
|
||||
// Author: Ivana Hrivnacova, 30/10/2018
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4TScoreNtupleWriterMessenger.hh"
|
||||
#include "G4TScoreNtupleWriter.hh"
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4VScoreColorMap
|
||||
//
|
||||
//
|
||||
|
||||
// Author: Makoto Asai
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VScoreColorMap_h
|
||||
#define G4VScoreColorMap_h 1
|
||||
|
||||
@@ -36,14 +37,13 @@ class G4VVisManager;
|
||||
class G4VScoreColorMap
|
||||
{
|
||||
public:
|
||||
G4VScoreColorMap(G4String mName);
|
||||
|
||||
G4VScoreColorMap(const G4String& mName);
|
||||
virtual ~G4VScoreColorMap() = default;
|
||||
|
||||
public:
|
||||
virtual void GetMapColor(G4double val, G4double color[4]) = 0;
|
||||
|
||||
public:
|
||||
inline G4String GetName() const { return fName; }
|
||||
inline const G4String& GetName() const { return fName; }
|
||||
inline void SetFloatingMinMax(G4bool vl = true) { ifFloat = vl; }
|
||||
inline G4bool IfFloatMinMax() const { return ifFloat; }
|
||||
inline void SetMinMax(G4double minVal, G4double maxVal)
|
||||
@@ -72,10 +72,11 @@ class G4VScoreColorMap
|
||||
|
||||
virtual void DrawColorChartText(G4int nPoint);
|
||||
|
||||
void SetPSUnit(G4String& unit) { fPSUnit = unit; }
|
||||
void SetPSName(G4String& psName) { fPSName = psName; }
|
||||
void SetPSUnit(const G4String& unit) { fPSUnit = unit; }
|
||||
void SetPSName(const G4String& psName) { fPSName = psName; }
|
||||
|
||||
protected:
|
||||
|
||||
G4String fName;
|
||||
G4bool ifFloat = true;
|
||||
G4double fMinVal = 0.0;
|
||||
|
||||
@@ -23,9 +23,15 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4VScoreNtupleWriter
|
||||
//
|
||||
// Author: Ivana Hrivnacova, 11/09/2018 (ivana@ipno.in2p3.fr)
|
||||
|
||||
// Class description:
|
||||
//
|
||||
// This class implements the interface for storing hits collections of
|
||||
// G4THitsMap<G4double> type vith Geant4 analysis tools.
|
||||
//
|
||||
// Author: Ivana Hrivnacova, 11/09/2018
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VScoreNtupleWriter_h
|
||||
#define G4VScoreNtupleWriter_h 1
|
||||
|
||||
@@ -34,14 +40,10 @@
|
||||
|
||||
class G4HCofThisEvent;
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This class implements the interface for storing hits collections of
|
||||
// G4THitsMap<G4double> type vith Geant4 analysis tools.
|
||||
|
||||
class G4VScoreNtupleWriter
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~G4VScoreNtupleWriter();
|
||||
|
||||
// static methods
|
||||
@@ -54,6 +56,7 @@ class G4VScoreNtupleWriter
|
||||
virtual void Write() = 0;
|
||||
|
||||
protected:
|
||||
|
||||
G4VScoreNtupleWriter();
|
||||
virtual G4VScoreNtupleWriter* CreateInstance() const = 0;
|
||||
|
||||
|
||||
@@ -23,27 +23,28 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4VScoreWriter
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
|
||||
// This class represents storing the scored quantity into a file.
|
||||
//
|
||||
// Author: Makoto Asai
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VScoreWriter_h
|
||||
#define G4VScoreWriter_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
class G4VScoringMesh;
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This class represents storing the scored quantity into a file.
|
||||
//
|
||||
class G4VScoringMesh;
|
||||
|
||||
class G4VScoreWriter
|
||||
{
|
||||
public:
|
||||
|
||||
G4VScoreWriter() = default;
|
||||
virtual ~G4VScoreWriter() = default;
|
||||
|
||||
public:
|
||||
// store a quantity into a file
|
||||
virtual void DumpQuantityToFile(const G4String& psName,
|
||||
const G4String& fileName,
|
||||
@@ -60,10 +61,12 @@ class G4VScoreWriter
|
||||
inline G4double GetFactor() const { return fact; }
|
||||
|
||||
protected:
|
||||
|
||||
// get an index from (x,y,z)
|
||||
G4int GetIndex(G4int x, G4int y, G4int z) const;
|
||||
|
||||
protected:
|
||||
|
||||
G4int fNMeshSegments[3] = {0, 0, 0}; // number of segments of the mesh
|
||||
G4VScoringMesh* fScoringMesh = nullptr;
|
||||
G4int verboseLevel = 0;
|
||||
|
||||
@@ -23,9 +23,16 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4VScoringMesh
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
|
||||
// This class represents a multi-functional detector to be used by
|
||||
// command-based scorer for parallel world scorer, this class creates a
|
||||
// parallel world mesh geometry
|
||||
//
|
||||
// Author: Makoto Asai
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VScoringMesh_h
|
||||
#define G4VScoringMesh_h 1
|
||||
|
||||
@@ -34,6 +41,8 @@
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4StatDouble.hh"
|
||||
|
||||
#include <map>
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4LogicalVolume;
|
||||
class G4MultiFunctionalDetector;
|
||||
@@ -42,15 +51,6 @@ class G4VSDFilter;
|
||||
class G4VScoreColorMap;
|
||||
class G4ParallelWorldProcess;
|
||||
|
||||
#include <map>
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This class represents a multi-functional detector to be used by
|
||||
// command-based scorer For parallel world scorer, this class creates a
|
||||
// parallel world mesh geometry
|
||||
//
|
||||
|
||||
class G4VScoringMesh
|
||||
{
|
||||
public:
|
||||
@@ -68,10 +68,10 @@ class G4VScoringMesh
|
||||
using MeshScoreMap = std::map<G4String, RunScore*>;
|
||||
|
||||
public:
|
||||
|
||||
G4VScoringMesh(const G4String& wName);
|
||||
virtual ~G4VScoringMesh() = default;
|
||||
|
||||
public: // with description
|
||||
virtual void Construct(G4VPhysicalVolume* fWorldPhys);
|
||||
virtual void WorkerConstruct(G4VPhysicalVolume* fWorldPhys);
|
||||
|
||||
@@ -132,7 +132,7 @@ class G4VScoringMesh
|
||||
// set a rotation angle around the z axis
|
||||
void RotateZ(G4double delta);
|
||||
// get a rotation matrix
|
||||
G4RotationMatrix GetRotationMatrix() const
|
||||
inline G4RotationMatrix GetRotationMatrix() const
|
||||
{
|
||||
if(fRotationMatrix != nullptr)
|
||||
return *fRotationMatrix;
|
||||
@@ -154,7 +154,7 @@ class G4VScoringMesh
|
||||
// find registered primitive scorer by the name
|
||||
G4bool FindPrimitiveScorer(const G4String& psname);
|
||||
// get whether current primitive scorer is set or not
|
||||
G4bool IsCurrentPrimitiveScorerNull()
|
||||
inline G4bool IsCurrentPrimitiveScorerNull()
|
||||
{
|
||||
return fCurrentPS == nullptr;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ class G4VScoringMesh
|
||||
// get unit value of primitive scorer by the name
|
||||
G4double GetPSUnitValue(const G4String& psname);
|
||||
// set PS name to be drawn
|
||||
void SetDrawPSName(const G4String& psname) { fDrawPSName = psname; }
|
||||
inline void SetDrawPSName(const G4String& psname) { fDrawPSName = psname; }
|
||||
|
||||
// get axis names of the hierarchical division in the divided order
|
||||
void GetDivisionAxisNames(G4String divisionAxisNames[3]);
|
||||
@@ -213,13 +213,15 @@ class G4VScoringMesh
|
||||
inline void SetCopyNumberLevel(G4int val) { copyNumberLevel = val; }
|
||||
inline G4int GetCopyNumberLevel() const { return copyNumberLevel; }
|
||||
|
||||
G4bool LayeredMassFlg() { return layeredMassFlg; }
|
||||
inline G4bool LayeredMassFlg() { return layeredMassFlg; }
|
||||
|
||||
protected:
|
||||
|
||||
// a pure virtual function to construct this mesh geometry
|
||||
virtual void SetupGeometry(G4VPhysicalVolume* fWorldPhys) = 0;
|
||||
|
||||
protected:
|
||||
|
||||
G4String fWorldName;
|
||||
G4VPrimitiveScorer* fCurrentPS;
|
||||
G4bool fConstructed;
|
||||
|
||||
Reference in New Issue
Block a user