Import Geant4 10.3.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2016-06-30 14:12:05 +02:00
parent a654a7ab1f
commit 4ec577e5c4
2021 changed files with 100995 additions and 78277 deletions
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ModelColourMap.hh 66373 2012-12-18 09:41:34Z gcosmo $
// $Id: G4ModelColourMap.hh 95593 2016-02-16 10:48:50Z gcosmo $
//
// Generic variable->G4Colour map, where "variable" is the template
// parameter.
@@ -52,6 +52,7 @@ public: // With description
G4Colour& operator[](const T& quantity);
// Access functions
const std::map<T, G4Colour>& GetBasicMap() const;
bool GetColour(const T&, G4Colour&) const;
void Print(std::ostream& ostr) const;
@@ -100,6 +101,10 @@ G4ModelColourMap<T>::Set(const T& quantity, const G4Colour& colour)
fMap[quantity] = colour;
}
template <typename T>
const std::map<T, G4Colour>& G4ModelColourMap<T>::GetBasicMap() const
{ return fMap; }
template <typename T>
bool
G4ModelColourMap<T>::GetColour(const T& quantity, G4Colour& colour) const
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4ModelingParameters.hh 81056 2014-05-20 09:02:16Z gcosmo $
// $Id: G4ModelingParameters.hh 95224 2016-02-01 09:14:18Z gcosmo $
//
//
// John Allison 31st December 1997.
@@ -102,11 +102,17 @@ public: // With description
VisAttributesSignifier signifier,
const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>& path);
const G4VisAttributes& GetVisAttributes() const
{return fVisAtts;}
{return fVisAtts;}
VisAttributesSignifier GetVisAttributesSignifier() const
{return fSignifier;}
{return fSignifier;}
const PVNameCopyNoPath& GetPVNameCopyNoPath() const
{return fPVNameCopyNoPath;}
{return fPVNameCopyNoPath;}
void SetVisAttributes(const G4VisAttributes& visAtts)
{fVisAtts = visAtts;}
void SetVisAttributesSignifier(VisAttributesSignifier signifier)
{fSignifier = signifier;}
void SetPVNameCopyNoPath(const PVNameCopyNoPath& PVNameCopyNoPath)
{fPVNameCopyNoPath = PVNameCopyNoPath;}
G4bool operator!=(const VisAttributesModifier&) const;
G4bool operator==(const VisAttributesModifier& rhs) const
{return !operator!=(rhs);}
@@ -0,0 +1,73 @@
//
// ********************************************************************
// * 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: G4TrajectoryDrawByTouchedVolume.hh 66264 2012-12-14 10:17:44Z allison $
//
// Class Description:
// Trajectory model which colours a trajectory according to
// the touched volume
// Class Description - End:
// Jane Tinslay March 2006
#ifndef G4TRAJECTORYDRAWBYTOUCHEDVOLUME
#define G4TRAJECTORYDRAWBYTOUCHEDVOLUME
#include "G4VTrajectoryModel.hh"
#include "G4Colour.hh"
#include "G4ModelColourMap.hh"
#include "G4String.hh"
#include <map>
class G4TrajectoryDrawByTouchedVolume : public G4VTrajectoryModel {
public: // With description
G4TrajectoryDrawByTouchedVolume(const G4String& name = "Unspecified", G4VisTrajContext* context=0);
virtual ~G4TrajectoryDrawByTouchedVolume();
// 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
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// $Id: G4TrajectoryFilterFactories.hh 68043 2013-03-13 14:27:49Z gcosmo $
/// $Id: G4TrajectoryFilterFactories.hh 95593 2016-02-16 10:48:50Z gcosmo $
//
//
// Trajectory filter model factories creating filters
@@ -97,9 +97,25 @@ public: // With description
G4TrajectoryOriginVolumeFilterFactory();
virtual ~G4TrajectoryOriginVolumeFilterFactory();
ModelAndMessengers Create(const G4String& placement, const G4String& name);
};
// Touched volume filter
class G4TrajectoryTouchedVolumeFilterFactory : public G4VModelFactory< G4VFilter<G4VTrajectory> > {
public: // With description
typedef std::vector<G4UImessenger*> Messengers;
typedef std::pair< G4VFilter<G4VTrajectory> *, Messengers > ModelAndMessengers;
G4TrajectoryTouchedVolumeFilterFactory();
virtual ~G4TrajectoryTouchedVolumeFilterFactory();
ModelAndMessengers Create(const G4String& placement, const G4String& name);
};
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4TrajectoryModelFactories.hh 66373 2012-12-18 09:41:34Z gcosmo $
// $Id: G4TrajectoryModelFactories.hh 95593 2016-02-16 10:48:50Z gcosmo $
//
// Jane Tinslay, John Allison, Joseph Perl October 2005
//
@@ -98,9 +98,21 @@ public: // With description
G4TrajectoryDrawByOriginVolumeFactory();
virtual ~G4TrajectoryDrawByOriginVolumeFactory();
ModelAndMessengers Create(const G4String& placement, const G4String& name);
};
class G4TrajectoryDrawByTouchedVolumeFactory : public G4VModelFactory<G4VTrajectoryModel> {
public: // With description
G4TrajectoryDrawByTouchedVolumeFactory();
virtual ~G4TrajectoryDrawByTouchedVolumeFactory();
ModelAndMessengers Create(const G4String& placement, const G4String& name);
};
#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: G4TrajectoryTouchedVolumeFilter.hh 66264 2012-12-14 10:17:44Z allison $
//
// Filter trajectories according to touched volume name. Only registered
// volumes will pass the filter.
//
// John Allison, Feb 2016
//
#ifndef G4TRAJECTORYTOUCHEDVOLUMEFILTER_HH
#define G4TRAJECTORYTOUCHEDVOLUMEFILTER_HH
#include "G4SmartFilter.hh"
#include "G4VTrajectory.hh"
#include <vector>
class G4TrajectoryTouchedVolumeFilter : public G4SmartFilter<G4VTrajectory> {
public: // With description
// Construct with filter name
G4TrajectoryTouchedVolumeFilter(const G4String& name = "Unspecified");
virtual ~G4TrajectoryTouchedVolumeFilter();
// 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