Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ArrowModel.hh 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
// $Id: G4ArrowModel.hh 100807 2016-11-02 15:00:41Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 15th July 2012
|
||||
@@ -52,7 +52,8 @@ public: // With description
|
||||
G4ArrowModel(G4double x1, G4double y1, G4double z1,
|
||||
G4double x2, G4double y2, G4double z2,
|
||||
G4double width, const G4Colour& colour,
|
||||
const G4String& description = "");
|
||||
const G4String& description = "",
|
||||
G4int lineSegmentsPerCircle = 6);
|
||||
virtual ~G4ArrowModel ();
|
||||
|
||||
virtual void DescribeYourselfTo (G4VGraphicsScene&);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ModelingParameters.hh 95224 2016-02-01 09:14:18Z gcosmo $
|
||||
// $Id: G4ModelingParameters.hh 99418 2016-09-21 09:18:42Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 31st December 1997.
|
||||
@@ -87,20 +87,21 @@ public: // With description
|
||||
G4String fName;
|
||||
G4int fCopyNo;
|
||||
};
|
||||
|
||||
typedef std::vector<PVNameCopyNo> PVNameCopyNoPath;
|
||||
typedef PVNameCopyNoPath::const_iterator PVNameCopyNoPathConstIterator;
|
||||
|
||||
class VisAttributesModifier {
|
||||
public:
|
||||
VisAttributesModifier
|
||||
(const G4VisAttributes& visAtts,
|
||||
VisAttributesSignifier signifier,
|
||||
const PVNameCopyNoPath& path):
|
||||
fVisAtts(visAtts), fSignifier(signifier), fPVNameCopyNoPath(path) {}
|
||||
(const G4VisAttributes& visAtts,
|
||||
VisAttributesSignifier signifier,
|
||||
const PVNameCopyNoPath& path):
|
||||
fVisAtts(visAtts), fSignifier(signifier), fPVNameCopyNoPath(path) {}
|
||||
VisAttributesModifier
|
||||
(const G4VisAttributes& visAtts,
|
||||
VisAttributesSignifier signifier,
|
||||
const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>& path);
|
||||
(const G4VisAttributes& visAtts,
|
||||
VisAttributesSignifier signifier,
|
||||
const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>& path);
|
||||
const G4VisAttributes& GetVisAttributes() const
|
||||
{return fVisAtts;}
|
||||
VisAttributesSignifier GetVisAttributesSignifier() const
|
||||
@@ -115,13 +116,13 @@ public: // With description
|
||||
{fPVNameCopyNoPath = PVNameCopyNoPath;}
|
||||
G4bool operator!=(const VisAttributesModifier&) const;
|
||||
G4bool operator==(const VisAttributesModifier& rhs) const
|
||||
{return !operator!=(rhs);}
|
||||
{return !operator!=(rhs);}
|
||||
private:
|
||||
G4VisAttributes fVisAtts;
|
||||
VisAttributesSignifier fSignifier;
|
||||
PVNameCopyNoPath fPVNameCopyNoPath;
|
||||
};
|
||||
|
||||
|
||||
G4ModelingParameters ();
|
||||
|
||||
G4ModelingParameters (const G4VisAttributes* pDefaultVisAttributes,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ModelingParameters.icc 77479 2013-11-25 10:01:22Z gcosmo $
|
||||
// $Id: G4ModelingParameters.icc 99418 2016-09-21 09:18:42Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 31st December 1997.
|
||||
@@ -142,4 +142,3 @@ inline void G4ModelingParameters::SetVisAttributesModifiers
|
||||
(const std::vector<G4ModelingParameters::VisAttributesModifier>& vams) {
|
||||
fVisAttributesModifiers = vams;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PSHitsModel.hh 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
// $Id: G4PSHitsModel.hh 99152 2016-09-07 08:04:30Z gcosmo $
|
||||
//
|
||||
//
|
||||
// Created: Mar. 31, 2009 Akinori Kimura
|
||||
@@ -36,8 +36,7 @@
|
||||
#define G4SCORINGHITSMODEL_HH
|
||||
|
||||
#include "G4VModel.hh"
|
||||
|
||||
template <typename T> class G4THitsMap;
|
||||
#include "G4StatDouble.hh"
|
||||
|
||||
class G4PSHitsModel: public G4VModel {
|
||||
|
||||
@@ -50,13 +49,9 @@ public: // With description
|
||||
virtual void DescribeYourselfTo (G4VGraphicsScene&);
|
||||
// The main task of a model is to describe itself to the graphics scene.
|
||||
|
||||
const G4THitsMap<G4double>* GetCurrentHits() const
|
||||
{return fpCurrentHits;}
|
||||
|
||||
private:
|
||||
|
||||
G4String fRequestedMapName;
|
||||
const G4THitsMap<G4double>* fpCurrentHits;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhysicalVolumeMassScene.hh 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
// $Id: G4PhysicalVolumeMassScene.hh 99076 2016-09-01 12:40:47Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 12th September 2004
|
||||
@@ -53,18 +53,8 @@
|
||||
#ifndef G4PHYSICALVOLUMEMASSSCENE_HH
|
||||
#define G4PHYSICALVOLUMEMASSSCENE_HH
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4PseudoScene.hh"
|
||||
|
||||
#include "G4Box.hh"
|
||||
#include "G4Cons.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4Trd.hh"
|
||||
#include "G4Trap.hh"
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4Para.hh"
|
||||
#include "G4Torus.hh"
|
||||
#include "G4Polycone.hh"
|
||||
#include "G4Polyhedra.hh"
|
||||
#include <deque>
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
@@ -72,7 +62,8 @@ class G4LogicalVolume;
|
||||
class G4PhysicalVolumeModel;
|
||||
class G4Material;
|
||||
|
||||
class G4PhysicalVolumeMassScene: public G4VGraphicsScene {
|
||||
class G4PhysicalVolumeMassScene: public G4PseudoScene
|
||||
{
|
||||
|
||||
public:
|
||||
G4PhysicalVolumeMassScene (G4PhysicalVolumeModel*);
|
||||
@@ -89,44 +80,8 @@ public: // With description
|
||||
void Reset ();
|
||||
// Reset for subsequent re-use.
|
||||
|
||||
public:
|
||||
|
||||
// Force execution of AccrueMass for all solids...
|
||||
void PreAddSolid (const G4Transform3D&, const G4VisAttributes&) {}
|
||||
void PostAddSolid () {}
|
||||
void AddSolid (const G4Box& solid) {AccrueMass (solid);}
|
||||
void AddSolid (const G4Cons & solid) {AccrueMass (solid);}
|
||||
void AddSolid (const G4Tubs& solid) {AccrueMass (solid);}
|
||||
void AddSolid (const G4Trd& solid) {AccrueMass (solid);}
|
||||
void AddSolid (const G4Trap& solid) {AccrueMass (solid);}
|
||||
void AddSolid (const G4Sphere& solid) {AccrueMass (solid);}
|
||||
void AddSolid (const G4Para& solid) {AccrueMass (solid);}
|
||||
void AddSolid (const G4Torus& solid) {AccrueMass (solid);}
|
||||
void AddSolid (const G4Polycone& solid) {AccrueMass (solid);}
|
||||
void AddSolid (const G4Polyhedra& solid) {AccrueMass (solid);}
|
||||
void AddSolid (const G4VSolid& solid) {AccrueMass (solid);}
|
||||
void AddCompound (const G4VTrajectory&) {}
|
||||
void AddCompound (const G4VHit&) {}
|
||||
void AddCompound (const G4VDigi&) {}
|
||||
void AddCompound (const G4THitsMap<G4double>&) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Functions not used but required by the abstract interface.
|
||||
|
||||
virtual void BeginPrimitives (const G4Transform3D&) {}
|
||||
virtual void EndPrimitives () {}
|
||||
virtual void BeginPrimitives2D (const G4Transform3D&) {}
|
||||
virtual void EndPrimitives2D () {}
|
||||
virtual void AddPrimitive (const G4Polyline&) {}
|
||||
virtual void AddPrimitive (const G4Scale&) {}
|
||||
virtual void AddPrimitive (const G4Text&) {}
|
||||
virtual void AddPrimitive (const G4Circle&) {}
|
||||
virtual void AddPrimitive (const G4Square&) {}
|
||||
virtual void AddPrimitive (const G4Polymarker&) {}
|
||||
virtual void AddPrimitive (const G4Polyhedron&) {}
|
||||
|
||||
private:
|
||||
void AccrueMass (const G4VSolid&);
|
||||
void ProcessVolume (const G4VSolid&);
|
||||
G4PhysicalVolumeModel* fpPVModel;
|
||||
G4double fVolume;
|
||||
G4double fMass;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhysicalVolumeModel.hh 88763 2015-03-09 12:26:23Z gcosmo $
|
||||
// $Id: G4PhysicalVolumeModel.hh 99668 2016-09-30 08:02:13Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 31st December 1997.
|
||||
@@ -281,6 +281,9 @@ private:
|
||||
};
|
||||
|
||||
std::ostream& operator<<
|
||||
(std::ostream& os, const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID);
|
||||
(std::ostream& os, const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID&);
|
||||
|
||||
std::ostream& operator<<
|
||||
(std::ostream& os, const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>&);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,12 +36,14 @@
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Cons.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4Trd.hh"
|
||||
#include "G4Trap.hh"
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4Orb.hh"
|
||||
#include "G4Para.hh"
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4Torus.hh"
|
||||
#include "G4Trap.hh"
|
||||
#include "G4Trd.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4Ellipsoid.hh"
|
||||
#include "G4Polycone.hh"
|
||||
#include "G4Polyhedra.hh"
|
||||
|
||||
@@ -55,21 +57,27 @@ public:
|
||||
const G4VisAttributes&)
|
||||
{fpCurrentObjectTransformation = &objectTransformation;}
|
||||
void PostAddSolid () {}
|
||||
// From geometry/solids/CSG
|
||||
void AddSolid (const G4Box& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Cons & solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Tubs& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Trd& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Trap& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Sphere& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Cons& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Orb& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Para& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Sphere& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Torus& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Trap& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Trd& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Tubs& solid) {ProcessVolume (solid);}
|
||||
// From geometry/solids/specific
|
||||
void AddSolid (const G4Ellipsoid& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Polycone& solid) {ProcessVolume (solid);}
|
||||
void AddSolid (const G4Polyhedra& solid) {ProcessVolume (solid);}
|
||||
// For solids not above.
|
||||
void AddSolid (const G4VSolid& solid) {ProcessVolume (solid);}
|
||||
void AddCompound (const G4VTrajectory&) {}
|
||||
void AddCompound (const G4VHit&) {}
|
||||
void AddCompound (const G4VDigi&) {}
|
||||
void AddCompound (const G4THitsMap<G4double>&) {}
|
||||
void AddCompound (const G4THitsMap<G4StatDouble>&) {}
|
||||
void BeginPrimitives (const G4Transform3D&) {}
|
||||
void EndPrimitives () {}
|
||||
void BeginPrimitives2D (const G4Transform3D&) {}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4TrajectoryDrawByEncounteredVolume.hh 66264 2012-12-14 10:17:44Z allison $
|
||||
//
|
||||
// Class Description:
|
||||
// Trajectory model which colours a trajectory according to
|
||||
// the encountered volume
|
||||
// Class Description - End:
|
||||
// John Allison February 2016, based on
|
||||
// G4TrajectoryDrawByVolume.hh Jane Tinslay March 2006
|
||||
|
||||
#ifndef G4TRAJECTORYDRAWBYENCOUNTEREDVOLUME
|
||||
#define G4TRAJECTORYDRAWBYENCOUNTEREDVOLUME
|
||||
|
||||
#include "G4VTrajectoryModel.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4ModelColourMap.hh"
|
||||
#include "G4String.hh"
|
||||
#include <map>
|
||||
|
||||
class G4TrajectoryDrawByEncounteredVolume : public G4VTrajectoryModel {
|
||||
|
||||
public: // With description
|
||||
|
||||
G4TrajectoryDrawByEncounteredVolume(const G4String& name = "Unspecified", G4VisTrajContext* context=0);
|
||||
|
||||
virtual ~G4TrajectoryDrawByEncounteredVolume();
|
||||
|
||||
// Draw method
|
||||
virtual void Draw(const G4VTrajectory& trajectory,
|
||||
const G4bool& visible = true) const;
|
||||
|
||||
virtual void Print(std::ostream& ostr) const;
|
||||
// Print configuration
|
||||
|
||||
void SetDefault(const G4String&);
|
||||
void SetDefault(const G4Colour&);
|
||||
|
||||
void Set(const G4String& pvname, const G4String& colour);
|
||||
void Set(const G4String& pvname, const G4Colour& colour);
|
||||
// Configuration functions
|
||||
|
||||
private:
|
||||
|
||||
// Data members
|
||||
G4ModelColourMap<G4String> fMap;
|
||||
G4Colour fDefault;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4TrajectoryEncounteredVolumeFilter.hh 66264 2012-12-14 10:17:44Z allison $
|
||||
//
|
||||
// Filter trajectories according to encountered volume name. Only registered
|
||||
// volumes will pass the filter.
|
||||
//
|
||||
// John Allison, Feb 2016
|
||||
//
|
||||
#ifndef G4TRAJECTORYENCOUNTEREDVOLUMEFILTER_HH
|
||||
#define G4TRAJECTORYENCOUNTEREDVOLUMEFILTER_HH
|
||||
|
||||
#include "G4SmartFilter.hh"
|
||||
#include "G4VTrajectory.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4TrajectoryEncounteredVolumeFilter : public G4SmartFilter<G4VTrajectory> {
|
||||
|
||||
public: // With description
|
||||
|
||||
// Construct with filter name
|
||||
G4TrajectoryEncounteredVolumeFilter(const G4String& name = "Unspecified");
|
||||
|
||||
virtual ~G4TrajectoryEncounteredVolumeFilter();
|
||||
|
||||
// Evaluate this trajectory
|
||||
virtual bool Evaluate(const G4VTrajectory&) const;
|
||||
|
||||
// Print configuration
|
||||
virtual void Print(std::ostream& ostr) const;
|
||||
|
||||
// Clear filter
|
||||
virtual void Clear();
|
||||
|
||||
// Configuration function
|
||||
void Add(const G4String& volume);
|
||||
|
||||
private:
|
||||
|
||||
// Data member
|
||||
std::vector<G4String> fVolumes;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// $Id: G4TrajectoryFilterFactories.hh 95593 2016-02-16 10:48:50Z gcosmo $
|
||||
/// $Id: G4TrajectoryFilterFactories.hh 98766 2016-08-09 14:17:17Z gcosmo $
|
||||
//
|
||||
//
|
||||
// Trajectory filter model factories creating filters
|
||||
@@ -102,17 +102,17 @@ public: // With description
|
||||
|
||||
};
|
||||
|
||||
// Touched volume filter
|
||||
class G4TrajectoryTouchedVolumeFilterFactory : public G4VModelFactory< G4VFilter<G4VTrajectory> > {
|
||||
// Encountered volume filter
|
||||
class G4TrajectoryEncounteredVolumeFilterFactory : public G4VModelFactory< G4VFilter<G4VTrajectory> > {
|
||||
|
||||
public: // With description
|
||||
|
||||
typedef std::vector<G4UImessenger*> Messengers;
|
||||
typedef std::pair< G4VFilter<G4VTrajectory> *, Messengers > ModelAndMessengers;
|
||||
|
||||
G4TrajectoryTouchedVolumeFilterFactory();
|
||||
G4TrajectoryEncounteredVolumeFilterFactory();
|
||||
|
||||
virtual ~G4TrajectoryTouchedVolumeFilterFactory();
|
||||
virtual ~G4TrajectoryEncounteredVolumeFilterFactory();
|
||||
|
||||
ModelAndMessengers Create(const G4String& placement, const G4String& name);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4TrajectoryModelFactories.hh 95593 2016-02-16 10:48:50Z gcosmo $
|
||||
// $Id: G4TrajectoryModelFactories.hh 98766 2016-08-09 14:17:17Z gcosmo $
|
||||
//
|
||||
// Jane Tinslay, John Allison, Joseph Perl October 2005
|
||||
//
|
||||
@@ -103,13 +103,13 @@ public: // With description
|
||||
|
||||
};
|
||||
|
||||
class G4TrajectoryDrawByTouchedVolumeFactory : public G4VModelFactory<G4VTrajectoryModel> {
|
||||
class G4TrajectoryDrawByEncounteredVolumeFactory : public G4VModelFactory<G4VTrajectoryModel> {
|
||||
|
||||
public: // With description
|
||||
|
||||
G4TrajectoryDrawByTouchedVolumeFactory();
|
||||
G4TrajectoryDrawByEncounteredVolumeFactory();
|
||||
|
||||
virtual ~G4TrajectoryDrawByTouchedVolumeFactory();
|
||||
virtual ~G4TrajectoryDrawByEncounteredVolumeFactory();
|
||||
|
||||
ModelAndMessengers Create(const G4String& placement, const G4String& name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user