Import Geant4 9.4.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoreLogColorMap.hh,v 1.1 2008/03/25 02:18:39 akimura Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4ScoreLogColorMap.hh,v 1.3 2010/07/23 06:25:30 akimura Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
|
||||
#ifndef G4ScoreLogColorMap_h
|
||||
|
||||
@@ -24,12 +24,13 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoreQuantityMessenger.hh,v 1.4 2007/11/06 17:17:14 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4ScoreQuantityMessenger.hh,v 1.5 2010/07/22 22:14:40 taso Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// (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
|
||||
|
||||
|
||||
#ifndef G4ScoreQuantityMessenger_h
|
||||
@@ -44,6 +45,7 @@ class G4ScoringManager;
|
||||
class G4VScoringMesh;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithoutParameter;
|
||||
class G4UIcommand;
|
||||
|
||||
typedef std::vector<G4String> G4TokenVec;
|
||||
@@ -72,6 +74,8 @@ class G4ScoreQuantityMessenger: public G4UImessenger
|
||||
|
||||
void FParticleCommand(G4VScoringMesh* mesh,G4TokenVec& token);
|
||||
void FParticleWithEnergyCommand(G4VScoringMesh* mesh,G4TokenVec& token);
|
||||
|
||||
G4bool CheckMeshPS(G4VScoringMesh* mesh, G4String& psname);
|
||||
|
||||
private:
|
||||
void QuantityCommands();
|
||||
@@ -83,14 +87,16 @@ class G4ScoreQuantityMessenger: public G4UImessenger
|
||||
// Quantity commands
|
||||
G4UIdirectory* quantityDir;
|
||||
G4UIcmdWithAString* qTouchCmd;
|
||||
G4UIcmdWithoutParameter* qGetUnitCmd;
|
||||
G4UIcmdWithAString* qSetUnitCmd;
|
||||
//
|
||||
G4UIcmdWithAString* qCellChgCmd;
|
||||
G4UIcmdWithAString* qCellFluxCmd;
|
||||
G4UIcmdWithAString* qPassCellFluxCmd;
|
||||
G4UIcmdWithAString* qeDepCmd;
|
||||
G4UIcmdWithAString* qdoseDepCmd;
|
||||
G4UIcmdWithAString* qnOfStepCmd;
|
||||
G4UIcmdWithAString* qnOfSecondaryCmd;
|
||||
G4UIcommand* qCellChgCmd;
|
||||
G4UIcommand* qCellFluxCmd;
|
||||
G4UIcommand* qPassCellFluxCmd;
|
||||
G4UIcommand* qeDepCmd;
|
||||
G4UIcommand* qdoseDepCmd;
|
||||
G4UIcommand* qnOfStepCmd;
|
||||
G4UIcommand* qnOfSecondaryCmd;
|
||||
//
|
||||
G4UIcommand* qTrackLengthCmd;
|
||||
G4UIcommand* qPassCellCurrCmd;
|
||||
@@ -105,6 +111,7 @@ class G4ScoreQuantityMessenger: public G4UImessenger
|
||||
G4UIcommand* qPopulationCmd;
|
||||
G4UIcommand* qTrackCountCmd;
|
||||
G4UIcommand* qTerminationCmd;
|
||||
G4UIcommand* qMinKinEAtGeneCmd;
|
||||
|
||||
//
|
||||
// Filter commands
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringBox.hh,v 1.18 2007/11/06 09:41:34 akimura Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4ScoringBox.hh,v 1.21 2010/07/22 02:04:39 akimura Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
|
||||
#ifndef G4ScoringBox_h
|
||||
@@ -48,11 +48,11 @@ public:
|
||||
~G4ScoringBox();
|
||||
|
||||
public:
|
||||
virtual void Construct(G4VPhysicalVolume* fWorldPhys);
|
||||
virtual void List() const;
|
||||
virtual void Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg=111);
|
||||
virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap,
|
||||
G4int idxProj, G4int idxColumn);
|
||||
void Construct(G4VPhysicalVolume* fWorldPhys);
|
||||
void List() const;
|
||||
void Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg=111);
|
||||
void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap,
|
||||
G4int idxProj, G4int idxColumn);
|
||||
|
||||
// set a direction to segment this mesh
|
||||
void SetSegmentDirection(G4int dir) {fSegmentDirection = dir;}
|
||||
|
||||
@@ -1,88 +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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
#ifndef G4ScoringBoxParametrisation_H
|
||||
#define G4ScoringBoxParametrisation_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "geomdefs.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4Box;
|
||||
|
||||
// Dummy declarations to get rid of warnings ...
|
||||
class G4Tubs;
|
||||
class G4Trd;
|
||||
class G4Trap;
|
||||
class G4Cons;
|
||||
class G4Orb;
|
||||
class G4Sphere;
|
||||
class G4Torus;
|
||||
class G4Para;
|
||||
class G4Hype;
|
||||
class G4Polycone;
|
||||
class G4Polyhedra;
|
||||
|
||||
|
||||
|
||||
class G4ScoringBoxParameterisation : public G4VPVParameterisation {
|
||||
public:
|
||||
|
||||
G4ScoringBoxParameterisation(EAxis segaxis,
|
||||
G4double motherDimension[3],
|
||||
std::vector<G4double> & segpos);
|
||||
virtual ~G4ScoringBoxParameterisation();
|
||||
|
||||
void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume *physVol) const;
|
||||
void ComputeDimensions(G4Box & meshElement,
|
||||
const G4int copyNo,
|
||||
const G4VPhysicalVolume * physVol) const;
|
||||
|
||||
private: // Dummy declarations to get rid of warnings ...
|
||||
|
||||
void ComputeDimensions (G4Trd&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Trap&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Cons&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Orb&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Sphere&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Torus&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Para&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Hype&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Tubs&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Polycone&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Polyhedra&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
|
||||
private:
|
||||
EAxis fSegmentAxis;
|
||||
G4double fMotherDimensions[3];
|
||||
std::vector<G4double> fSegmentPositions;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringCylinder.hh,v 1.2 2008/03/23 14:32:12 akimura Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4ScoringCylinder.hh,v 1.6 2010/07/25 11:05:03 akimura Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
|
||||
#ifndef G4ScoringCylinder_h
|
||||
@@ -50,25 +50,20 @@ class G4ScoringCylinder : public G4VScoringMesh
|
||||
virtual void List() const;
|
||||
virtual void Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg=111);
|
||||
virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap,
|
||||
G4int idxProj, G4int idxColumn);
|
||||
G4int idxProj, G4int idxColumn);
|
||||
|
||||
|
||||
void SetRMinMax(G4double rMinMax[2]) {
|
||||
for(int i = 0; i < 2; i++) fSize[i] = rMinMax[i];
|
||||
}
|
||||
void SetRMin(G4double rMin) {fSize[0] = rMin;}
|
||||
void SetRMax(G4double rMax) {fSize[1] = rMax;}
|
||||
void SetZSize(G4double zSize) {fSize[2] = zSize;}
|
||||
|
||||
void SetSegmentDirection(G4int dir) {fSegmentDirection = dir;} // supports the r-direction only at present.
|
||||
void SetRMax(G4double rMax) {fSize[0] = rMax;}
|
||||
void SetZSize(G4double zSize) {fSize[1] = zSize;} // half height
|
||||
|
||||
void RegisterPrimitives(std::vector<G4VPrimitiveScorer *> & vps);
|
||||
|
||||
// get 3D index (r,z,phi) from sequential index
|
||||
// get 3D index (z,phi,r) from sequential index
|
||||
void GetRZPhi(G4int index, G4int q[3]) const;
|
||||
|
||||
private:
|
||||
G4int fSegmentDirection; // =1: r, =2: phi, =3: z
|
||||
//enum IDX {IR, IZ, IPHI};
|
||||
enum IDX {IZ, IPHI, IR};
|
||||
|
||||
G4LogicalVolume * fMeshElementLogical;
|
||||
|
||||
void SetupGeometry(G4VPhysicalVolume * fWorldPhys);
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VScoreColorMap.hh,v 1.5 2008/08/29 02:50:05 akimura Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VScoreColorMap.hh,v 1.7 2010/07/23 06:25:30 akimura Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
|
||||
#ifndef G4VScoreColorMap_h
|
||||
@@ -69,15 +69,23 @@ class G4VScoreColorMap
|
||||
|
||||
// draw a color chart
|
||||
virtual void DrawColorChart(G4int nPoint = 5);
|
||||
|
||||
virtual void DrawColorChartBar(G4int nPoint);
|
||||
|
||||
virtual void DrawColorChartText(G4int nPoint);
|
||||
|
||||
|
||||
void SetPSUnit(G4String & unit) {fPSUnit = unit;}
|
||||
void SetPSName(G4String & psName) {fPSName = psName;}
|
||||
|
||||
protected:
|
||||
G4String fName;
|
||||
G4bool ifFloat;
|
||||
G4double fMinVal;
|
||||
G4double fMaxVal;
|
||||
G4VVisManager * fVisManager;
|
||||
G4String fPSUnit;
|
||||
G4String fPSName;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VScoringMesh.hh,v 1.29 2009/10/12 04:11:25 akimura Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4VScoringMesh.hh,v 1.41 2010/11/09 00:29:55 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
|
||||
#ifndef G4VScoringMesh_h
|
||||
@@ -54,7 +54,7 @@ class G4VScoringMesh
|
||||
{
|
||||
public:
|
||||
G4VScoringMesh(G4String wName);
|
||||
~G4VScoringMesh();
|
||||
virtual ~G4VScoringMesh();
|
||||
|
||||
public: // with description
|
||||
// a pure virtual function to construct this mesh geometry
|
||||
@@ -80,14 +80,14 @@ class G4VScoringMesh
|
||||
// dump information of primitive socrers registered in this mesh
|
||||
void Dump();
|
||||
// draw a projected quantity on a current viewer
|
||||
inline void DrawMesh(G4String psName,G4VScoreColorMap* colorMap,G4int axflg=111);
|
||||
void DrawMesh(G4String psName,G4VScoreColorMap* colorMap,G4int axflg=111);
|
||||
// draw a column of a quantity on a current viewer
|
||||
inline void DrawMesh(G4String psName,G4int idxPlane,G4int iColumn,G4VScoreColorMap* colorMap);
|
||||
void DrawMesh(G4String psName,G4int idxPlane,G4int iColumn,G4VScoreColorMap* colorMap);
|
||||
// draw a projected quantity on a current viewer
|
||||
virtual void Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg=111) = 0;
|
||||
// draw a column of a quantity on a current viewer
|
||||
virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap,
|
||||
G4int idxProj, G4int idxColumn) = 0;
|
||||
virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap,
|
||||
G4int idxProj, G4int idxColumn) = 0;
|
||||
// reset registered primitive scorers
|
||||
void ResetScore();
|
||||
|
||||
@@ -114,8 +114,6 @@ class G4VScoringMesh
|
||||
void SetNumberOfSegments(G4int nSegment[3]);
|
||||
// get number of segments of this mesh
|
||||
void GetNumberOfSegments(G4int nSegment[3]);
|
||||
// set positions to segment this mesh
|
||||
inline void SetSegmentPositions(std::vector<G4double> & sp) {fSegmentPositions = sp;}
|
||||
|
||||
// register a primitive scorer to the MFD & set it to the current primitive scorer
|
||||
void SetPrimitiveScorer(G4VPrimitiveScorer * ps);
|
||||
@@ -130,6 +128,20 @@ class G4VScoringMesh
|
||||
if(fCurrentPS == NULL) return true;
|
||||
else return false;
|
||||
}
|
||||
// get unit of primitive scorer by the name
|
||||
G4String GetPSUnit(G4String & psname);
|
||||
// get unit of current primitive scorer
|
||||
G4String GetCurrentPSUnit();
|
||||
// set unit of current primitive scorer
|
||||
void SetCurrentPSUnit(const G4String& unit);
|
||||
// get unit value of primitive scorer by the name
|
||||
G4double GetPSUnitValue(G4String & psname);
|
||||
// set PS name to be drawn
|
||||
void SetDrawPSName(G4String & psname) {fDrawPSName = psname;}
|
||||
|
||||
// get axis names of the hierarchical division in the divided order
|
||||
void GetDivisionAxisNames(G4String divisionAxisNames[3]);
|
||||
|
||||
// set current primitive scorer to NULL
|
||||
void SetNullToCurrentPrimitiveScorer() {fCurrentPS = NULL;}
|
||||
// set verbose level
|
||||
@@ -156,7 +168,6 @@ protected:
|
||||
G4ThreeVector fCenterPosition;
|
||||
G4RotationMatrix * fRotationMatrix;
|
||||
G4int fNSegment[3];
|
||||
std::vector<G4double> fSegmentPositions;
|
||||
|
||||
std::map<G4String, G4THitsMap<G4double>* > fMap;
|
||||
G4MultiFunctionalDetector * fMFD;
|
||||
@@ -166,6 +177,11 @@ protected:
|
||||
G4bool sizeIsSet;
|
||||
G4bool nMeshIsSet;
|
||||
|
||||
G4String fDrawUnit;
|
||||
G4double fDrawUnitValue;
|
||||
G4String fDrawPSName;
|
||||
|
||||
G4String fDivisionAxisNames[3];
|
||||
};
|
||||
|
||||
void G4VScoringMesh::Accumulate(G4THitsMap<G4double> * map)
|
||||
@@ -189,23 +205,5 @@ void G4VScoringMesh::Accumulate(G4THitsMap<G4double> * map)
|
||||
}
|
||||
}
|
||||
|
||||
void G4VScoringMesh::DrawMesh(G4String psName,G4VScoreColorMap* colorMap,G4int axflg)
|
||||
{
|
||||
std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr = fMap.find(psName);
|
||||
if(fMapItr!=fMap.end())
|
||||
{ Draw(fMapItr->second->GetMap(),colorMap,axflg); }
|
||||
else
|
||||
{ G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl; }
|
||||
}
|
||||
|
||||
void G4VScoringMesh::DrawMesh(G4String psName,G4int idxPlane,G4int iColumn,G4VScoreColorMap* colorMap)
|
||||
{
|
||||
std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr = fMap.find(psName);
|
||||
if(fMapItr!=fMap.end())
|
||||
{ DrawColumn(fMapItr->second->GetMap(),colorMap,idxPlane,iColumn); }
|
||||
else
|
||||
{ G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl; }
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user