Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
@@ -91,6 +91,7 @@ class G4ScoringMessenger: public G4UImessenger
G4UIcmdWithAString* meshCylinderCreateCmd;
// G4UIcmdWithAString* meshSphereCreateCmd;
G4UIcommand* meshRWLogVolCreateCmd;
G4UIcommand* probeCreateCmd;
//
// Mesh commands
G4UIdirectory* meshDir;
@@ -117,6 +118,11 @@ class G4ScoringMessenger: public G4UImessenger
G4UIcmdWithADoubleAndUnit* mRotYCmd;
G4UIcmdWithADoubleAndUnit* mRotZCmd;
//
// Probe commands
G4UIdirectory* probeDir;
G4UIcmdWithAString* probeMatCmd;
G4UIcmdWith3VectorAndUnit* probeLocateCmd;
//
// Draw Command
G4UIcommand * drawCmd;
G4UIcommand * drawColumnCmd;
@@ -0,0 +1,86 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
#ifndef G4ScoringProbe_h
#define G4ScoringProbe_h 1
#include "globals.hh"
#include "G4VScoringMesh.hh"
class G4VPhysicalVolume;
class G4Material;
#include <vector>
class G4ScoringProbe : public G4VScoringMesh
{
public:
G4ScoringProbe(G4String lvName,G4double half_size,G4bool checkOverlap=false);
~G4ScoringProbe();
protected:
// construct scoring volume
virtual void SetupGeometry(G4VPhysicalVolume* );
protected:
G4String logVolName;
std::vector<G4ThreeVector> posVec;
G4double probeSize;
G4bool chkOverlap;
G4String layeredMaterialName;
G4Material* layeredMaterial;
G4String regName;
public:
void LocateProbe(G4ThreeVector pos)
{
posVec.push_back(pos);
G4int nbin[] = {static_cast<G4int>(posVec.size()),1,1};
SetNumberOfSegments(nbin);
}
G4int GetNumberOfProbes() const
{ return posVec.size(); }
void SetProbeSize(G4double val)
{ probeSize = val; }
G4double GetProbeSize() const
{ return probeSize; }
G4bool SetMaterial(G4String val);
public:
virtual void List() const;
public:
//++++++++++ visualization method not yet implemented
virtual void Draw(RunScore * /*map*/, G4VScoreColorMap* /*colorMap*/, G4int /*axflg=111*/)
{;}
virtual void DrawColumn(RunScore * /*map*/, G4VScoreColorMap* /*colorMap*/,
G4int /*idxProj*/, G4int /*idxColumn*/)
{;}
};
#endif
@@ -0,0 +1,57 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
#ifndef G4VPrimitivePlotter_H
#define G4VPrimitivePlotter_H 1
#include "G4VPrimitiveScorer.hh"
#include <map>
class G4VPrimitivePlotter : public G4VPrimitiveScorer
{
public: // with description
G4VPrimitivePlotter(G4String name, G4int depth=0)
:G4VPrimitiveScorer(name,depth)
{;}
virtual ~G4VPrimitivePlotter()
{;}
public:
void Plot(G4int copyNo,G4int histID)
{ hitIDMap[copyNo] = histID; }
protected:
std::map<G4int,G4int> hitIDMap;
public:
G4int GetNumberOfHist() const
{ return hitIDMap.size(); }
};
#endif
@@ -53,7 +53,7 @@ class G4ParallelWorldProcess;
class G4VScoringMesh
{
public:
enum class MeshShape { box, cylinder, sphere, realWorldLogVol, undefined = -1};
enum class MeshShape { box, cylinder, sphere, realWorldLogVol, probe, undefined = -1};
using EventScore = G4THitsMap< G4double >;
using RunScore = G4THitsMap< G4StatDouble >;
using MeshScoreMap = std::map< G4String, RunScore* >;
@@ -174,7 +174,7 @@ public: // with description
inline G4bool ReadyForQuantity() const
{ return (sizeIsSet && nMeshIsSet); }
protected:
//protected:
// get registered primitive socrer by the name
G4VPrimitiveScorer * GetPrimitiveScorer(const G4String & name);
@@ -235,6 +235,15 @@ public:
{ copyNumberLevel = val; }
inline G4int GetCopyNumberLevel() const
{ return copyNumberLevel; }
protected:
// This flag may be set to true for Probe scoring mesh.
// There is no public set method for this boolean flag, but it should be set to true
// through SetMaterial() method of Probe scoring mesh.
G4bool layeredMassFlg;
public:
G4bool LayeredMassFlg()
{ return layeredMassFlg; }
};
#endif