Import Geant4 9.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:15:05 +02:00
parent b79225fb37
commit 74cad5e589
3877 changed files with 234205 additions and 167127 deletions
+50
View File
@@ -0,0 +1,50 @@
# $Id: GNUmakefile,v 1.2 2009/10/12 10:24:23 akimura Exp $
name := G4GMocren
ifndef G4INSTALL
G4INSTALL = ../../..
endif
GLOBLIBS = libG4vis_management.lib libG4modeling.lib
GLOBLIBS += libG4run.lib libG4event.lib
GLOBLIBS += libG4tracking.lib libG4processes.lib libG4digits_hits.lib
GLOBLIBS += libG4track.lib libG4particles.lib libG4geometry.lib
GLOBLIBS += libG4materials.lib libG4graphics_reps.lib
GLOBLIBS += libG4intercoms.lib libG4global.lib
include $(G4INSTALL)/config/architecture.gmk
include $(G4INSTALL)/config/G4VIS_BUILD.gmk
include $(G4INSTALL)/config/interactivity.gmk
CPPFLAGS += -I$(G4BASE)/visualization/management/include
CPPFLAGS += -I$(G4BASE)/visualization/modeling/include
CPPFLAGS += -I$(G4BASE)/global/management/include
CPPFLAGS += -I$(G4BASE)/global/HEPGeometry/include
CPPFLAGS += -I$(G4BASE)/graphics_reps/include
CPPFLAGS += -I$(G4BASE)/intercoms/include
CPPFLAGS += -I$(G4BASE)/geometry/management/include
CPPFLAGS += -I$(G4BASE)/geometry/solids/CSG/include
CPPFLAGS += -I$(G4BASE)/geometry/solids/specific/include
CPPFLAGS += -I$(G4BASE)/geometry/navigation/include/
CPPFLAGS += -I$(G4BASE)/particles/management/include
CPPFLAGS += -I$(G4BASE)/event/include
CPPFLAGS += -I$(G4BASE)/tracking/include
CPPFLAGS += -I$(G4BASE)/materials/include
CPPFLAGS += -I$(G4BASE)/digits_hits/hits/include
CPPFLAGS += -I$(G4BASE)/digits_hits/digits/include
CPPFLAGS += -I$(G4BASE)/digits_hits/utils/include
#CPPFLAGS += -I$(G4BASE)/visualization/FukuiRenderer/include
#CPPFLAGS += -DG4GMocrenFileDEBUG
#PPFLAGS += -DGMOCRENIO_LITTLE_ENDIAN
ifdef G4VIS_BUILD_XXXSG_DRIVER
CPPFLAGS += -DG4VIS_BUILD_XXXSG_DRIVER
endif
include $(G4INSTALL)/config/common.gmk
+66
View File
@@ -0,0 +1,66 @@
$Id: History,v 1.7 2009/11/05 11:37:12 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Category History file
---------------------
This file should be used by G4 developers and category coordinators
to briefly summarize all major modifications introduced in the code
and keep track of all category-tags.
It DOES NOT substitute the CVS log-message one should put at every
committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
History file for visualization/gMocren sub-category
---------------------------------------------------
5 November 2009 Gabriele Cosmo (gMocren-V09-02-03)
Fix in G4GMocrenFileSceneHandler.cc for resolving compilation error on
Windows
5 November 2009 Akinori Kimura
GMocrenFileSceneHandler::AddCompound(G4THisMap<>) was modified
to deal with /vis/scene/add/psHits <scorer_name>.
GMocrenIO.cc was modified to remove an unnecessary output by std::cout.
2 November 2009 Akinori Kimura (gMocren-V09-02-02)
I mistook to make a tag, gMocren-V09-02-01.
So I made a tag again.
2 November 2009 Akinori Kimura (gMocren-V09-02-01)
Deleted the following two AddEndOfEventModel(*) in
G4GMocrenFileSceneHandler::GFBeginModeling().
These models are entrusted to user commands /vis/scene/add/psHits or hits
scene->AddEndOfEventModel(new G4PSHitsModel());
scene->AddEndOfEventModel(new G4HitsModel());
1 November 2009 Akinori Kimura
A few warning as following were fixed.
src/G4GMocrenFileSceneHandler.cc:1812: warning: dereferencing pointer '<anonymous>' does break strict-aliasing rules
22 October 2009 Akinori Kimura (gMocren-V09-02-00)
G4PSHitsModel.{hh,cc} were moved to the modeling directory.
Made a tag of the gMocren file driver.
18 October 2009 Akinori Kimura
Fixed bugs which are to create an extra file and to be not able to
deal with multiple runs.
12 October 2009 Akinori Kimura
Large modification to support G4PhantomParameterisation,
G4VNestedParameterisation, primitive scorer and interactive primitive
scorer
1 April 2009 Akinori Kimura
The prototype gMocren-file driver is added.
Tagged vis-V09-02-06.
+13
View File
@@ -0,0 +1,13 @@
//-- gMocren-file driver --//
Oct. 12, 2009 : Akinori Kimura
Beta release.
It supports a geometry constructed with G4PhantomParameterisation or
G4VNestedParameterisation and a hits collection based on G4VHits,
primitive scorer or the interactive scorer.
Apr. 1, 2009 : Akinori Kimura
First version of the gMocren-file driver.
This is a prototype, not a release version.
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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: G4GMocrenFile.hh,v 1.2 2009/10/12 10:04:35 akimura Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// Created: Mar. 31, 2009 Akinori Kimura
//
// GMocren-file driver factory.
//
#ifndef G4GMocrenFile_HH
#define G4GMocrenFile_HH
#include "G4VGraphicsSystem.hh"
//----- prototype
class G4VSceneHandler;
class G4GMocrenMessenger;
//----------------------------//
//----- class G4GMocrenFile -----//
//----------------------------//
class G4GMocrenFile: public G4VGraphicsSystem {
public:
G4GMocrenFile ();
virtual ~G4GMocrenFile ();
G4VSceneHandler * CreateSceneHandler (const G4String& name = "");
G4VViewer * CreateViewer (G4VSceneHandler&,
const G4String& name = "");
private:
G4VViewer * kViewer;
G4VSceneHandler * kSceneHandler;
G4GMocrenMessenger * kMessenger;
};
#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. *
// ********************************************************************
//
//
// $Id: G4GMocrenFileCTtoDensityMap.hh,v 1.1 2009/10/12 10:04:35 akimura Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// Created: Oct. 12, 2009 Akinori Kimura
//
// mapping data of CT values [H.U.] to densities [g/cm3]
//
#ifndef G4GMocrenFile_CTtoDensity_MAP_HH
#define G4GMocrenFile_CTtoDensity_MAP_HH
#include "globals.hh"
class G4GMocrenFileCTtoDensityMap {
public:
G4GMocrenFileCTtoDensityMap();
~G4GMocrenFileCTtoDensityMap();
// get min. CT value
G4int GetMinCT() const {return kCTMinMax[0];}
// get max. CT value
G4int GetMaxCT() const {return kCTMinMax[1];}
// get density corresponding to CT value
G4double GetDensity(G4int & _ct) const;
protected:
G4int kCTMinMax[2];
G4double * kDensity;
G4int kSize;
};
#endif
@@ -0,0 +1,211 @@
//
// ********************************************************************
// * 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: G4GMocrenFileSceneHandler.hh,v 1.5 2009/11/01 14:37:10 akimura Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// Created: Mar. 31, 2009 Akinori Kimura
//
// Scene handler to export geometry and trajectories to a gMocren file.
//
#ifndef G4GMocrenFile_SCENE_HANDLER_HH
#define G4GMocrenFile_SCENE_HANDLER_HH
#include "globals.hh"
#include "G4VSceneHandler.hh"
#include <fstream>
#include "G4THitsMap.hh"
class G4VisAttributes ;
class G4GMocrenFile;
class G4GMocrenMessenger;
class G4GMocrenIO;
class G4VSolid;
class G4Polyhedron;
class G4Colour;
//-----
class G4GMocrenFileSceneHandler: public G4VSceneHandler {
friend class G4GMocrenFileViewer;
public:
//----- constructor and destructor
G4GMocrenFileSceneHandler (G4GMocrenFile& system,
G4GMocrenMessenger & messenger,
const G4String& name = "");
virtual ~G4GMocrenFileSceneHandler ();
//----- overriding base class methods
void AddPrimitive (const G4Polyline& line);
void AddPrimitive (const G4Polyhedron& p);
void AddPrimitive (const G4NURBS& nurb);
void AddPrimitive (const G4Text&);
void AddPrimitive (const G4Circle&);
void AddPrimitive (const G4Square&);
//----- explicitly invoke base class methods to avoid warnings about
//----- hiding of base class methods.
void AddPrimitive (const G4Polymarker& polymarker)
{ G4VSceneHandler::AddPrimitive (polymarker); }
void AddPrimitive (const G4Scale& scale)
{ G4VSceneHandler::AddPrimitive (scale); }
virtual void BeginModeling () { G4VSceneHandler::BeginModeling ();}
virtual void EndModeling () { G4VSceneHandler::EndModeling ();}
virtual void BeginPrimitives (const G4Transform3D& objectTransformation);
virtual void EndPrimitives ();
void AddSolid ( const G4Box& box );
void AddSolid ( const G4Cons& cons );
void AddSolid ( const G4Tubs& tubs );
void AddSolid ( const G4Trd& trd );
void AddSolid ( const G4Trap& trap );
void AddSolid ( const G4Sphere& sphere );
void AddSolid ( const G4Para& para );
void AddSolid ( const G4Torus& torus );
void AddSolid ( const G4Polycone& polycone ) {
G4VSceneHandler::AddSolid (polycone);
}
void AddSolid ( const G4Polyhedra& polyhedra) {
G4VSceneHandler::AddSolid (polyhedra);
}
void AddSolid ( const G4VSolid& solid );
void AddCompound ( const G4VTrajectory& traj);
void AddCompound ( const G4VHit& hit);
void AddCompound ( const G4THitsMap<G4double> & hits);
void ClearTransientStore(); // Used for triggering detector re-drawing.
//----- public methods inherent to this class
void GFBeginModeling () ;
void GFEndModeling () ;
G4bool GFIsInModeling () { return kFlagInModeling ; }
G4bool IsSavingGdd ( void ) { return kFlagSaving_g4_gdd ; }
void BeginSavingGdd( void );
void EndSavingGdd ( void ) ;
void SetGddFileName() ;
G4GMocrenFile& GetSystem () { return kSystem ; }
const char* GetGddFileName () { return kGddFileName ; }
private:
//----- initialize all parameters
void InitializeParameters();
//----- Utilities etc.
G4bool IsVisible();
//
void AddDetector(const G4VSolid & solid);
void ExtractDetector();
void GetNestedVolumeIndex(G4int, G4int[3]);
private:
G4GMocrenFile& kSystem; // Graphics system for this scene.
G4GMocrenMessenger & kMessenger;
G4GMocrenIO * kgMocrenIO;
std::map<G4int, float> kModality;
G4int kModalitySize[3];
//std::map<G4ThreeVector, float> kModalityDensities; // key: position, val: density
G4bool kbSetModalityVoxelSize;
G4bool kbModelingTrajectory;
static G4int kSceneIdCount;
//std::vector<float *> fTrajectories;
//std::vector<unsigned char *> fTrajectoryColors;
G4Transform3D kVolumeTrans3D;
class Detector {
public:
G4String name;
G4Polyhedron * polyhedron;
G4Transform3D transform3D;
unsigned char color[3];
Detector();
~Detector();
void clear();
};
std::vector<Detector> kDetectors;
G4ThreeVector kVolumeSize;
G4ThreeVector kVoxelDimension;
std::vector<G4String> kNestedVolumeNames;
G4int kNestedVolumeDimension[3];
G4int kNestedVolumeDirAxis[3];
class Index3D {
public:
G4int x, y, z;
Index3D();
Index3D(const Index3D & _index3D);
Index3D(G4int _x, G4int _y, G4int _z);
~Index3D(){;}
G4bool operator < (const Index3D & _right) const;
G4bool operator == (const Index3D & _right) const;
};
std::map<Index3D, float> kNestedModality;
std::map<Index3D, G4double> * fTempNestedHits;
std::map<G4String, std::map<Index3D, G4double> > kNestedHitsList;
//std::map<G4String, G4String> kNestedHitsUnit;
std::ofstream kGddDest; // defined here
G4bool kFlagInModeling;
// true: GF_BEGIN_MODELING has sent to gMocrenFile, and
// GF_END_MODELING has not sent yet.
// false: otherwise
//
// kFlagInModeling is set to "true"
// in GFBeginModeling(), and to "false"
// in GFEndModeling().
G4bool kFlagSaving_g4_gdd ;
G4int kFlagParameterization; // 0: G4VNestedParameterisation based geometry
// 1: G4PhantomParameterisation
// 2: interactive scorer
G4bool kFLagProcessedInteractiveScorer;
char kGddDestDir[256];
char kGddFileName[256];
G4int kMaxFileNum;
};
#endif
@@ -0,0 +1,71 @@
//
// ********************************************************************
// * 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: G4GMocrenFileViewer.hh,v 1.2 2009/10/12 10:04:35 akimura Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// Created: Mar. 31, 2009 Akinori Kimura : release for the gMocrenFile driver
//
// GMocrenFile viewer - opens window, hard copy, etc.
//
#ifndef G4GMocrenFile_VIEWER_HH
#define G4GMocrenFile_VIEWER_HH
#include "G4VViewer.hh"
#include "globals.hh"
class G4GMocrenFileSceneHandler;
class G4GMocrenMessenger;
class G4GMocrenFileViewer: public G4VViewer {
public:
//----- constructor and destructor
G4GMocrenFileViewer (G4GMocrenFileSceneHandler& scene,
G4GMocrenMessenger & messenger,
const G4String& name = "");
virtual ~G4GMocrenFileViewer ();
//----- overriding base class methods
void SetView(); // Do nothing. SendViewParameters will do its job.
void ClearView();
void DrawView();
void ShowView();
//---- methods inherent to this class
const char* GetG4GddViewer() { return kG4GddViewer;}
const char* GetG4GddViewerInvocation() { return kG4GddViewerInvocation;}
private:
G4GMocrenFileSceneHandler& kSceneHandler; // Reference to Graphics Scene for this view.
G4GMocrenMessenger & kMessenger;
char kG4GddViewer[32] ;
char kG4GddViewerInvocation[64] ;
};
#endif
@@ -0,0 +1,465 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// File I/O manager class for writing or reading calcuated dose
// distribution and some event information
//
//
// Mar. 31, 2009 : release for the gMocrenFile driver
//
// Akinori Kimura
//
// gMocren home page:
// http://geant4.kek.jp/gMocren/
//
#ifndef GMOCRENIO_HH
#define GMOCRENIO_HH
#include <vector>
#include <string>
#include <fstream>
#include <map>
//
//----- GMocrenDataPrimitive class -----//
// data primitive class for volume data
//
template <typename T> class GMocrenDataPrimitive {
protected:
int kSize[3];
double kScale;
T kMinmax[2];
float kCenter[3];
std::vector<T *> kImage;
std::string kDataName;
//std::vector<std::vector<T>> image;
public:
GMocrenDataPrimitive();
//GMocrenDataPrimitive(GMocrenDataPrimitive<T> & _prim);
~GMocrenDataPrimitive();
GMocrenDataPrimitive<T> & operator = (const GMocrenDataPrimitive<T> & _right);
GMocrenDataPrimitive<T> & operator + (const GMocrenDataPrimitive<T> & _right);
GMocrenDataPrimitive<T> & operator += (const GMocrenDataPrimitive<T> & _right);
void clear();
void setSize(int _size[3]);
void getSize(int _size[3]);
void setScale(double & _scale);
double getScale();
void setMinMax(T _minmax[2]);
void getMinMax(T _minmax[2]);
void setImage(std::vector<T *> & _image);
void addImage(T * _image);
std::vector<T *> & getImage();
T * getImage(int _z); // get image of each layer
void setCenterPosition(float _center[3]);
void getCenterPosition(float _center[3]);
void setName(std::string & _name);
std::string getName();
};
//
//----- GMocrenTrack class -----//
//
class GMocrenTrack {
public:
struct Step {
float startPoint[3];
float endPoint[3];
};
protected:
std::vector<struct Step> kTrack;
unsigned char kColor[3];
public:
GMocrenTrack();
~GMocrenTrack(){;}
int getNumberOfSteps() {return (int)kTrack.size();}
void addStep(float _startx, float _starty, float _startz,
float _endx, float _endy, float _endz);
void getStep(float & _startx, float & _starty, float & _startz,
float & _endx, float & _endy, float & _endz,
int _num);
void setTrack(std::vector<struct Step> & _aTrack) {kTrack = _aTrack;}
void setColor(unsigned char _color[3]) {
for(int i = 0; i < 3; i++) kColor[i] = _color[i];
}
void getColor(unsigned char _color[3]) {
for(int i = 0; i < 3; i++) _color[i] = kColor[i];
}
void translate(std::vector<float> & _tranlate);
};
//
//----- GMocrenDetector class -----//
//
class GMocrenDetector {
public:
struct Edge {
float startPoint[3];
float endPoint[3];
};
protected:
std::vector<struct Edge> kDetector;
unsigned char kColor[3];
std::string kName;
public:
GMocrenDetector();
~GMocrenDetector(){;}
int getNumberOfEdges() {return (int)kDetector.size();}
void addEdge(float _startx, float _starty, float _startz,
float _endx, float _endy, float _endz);
void getEdge(float & _startx, float & _starty, float & _startz,
float & _endx, float & _endy, float & _endz,
int _num);
void setDetector(std::vector<struct Edge> & _aDetector) {kDetector = _aDetector;}
void setColor(unsigned char _color[3]) {
for(int i = 0; i < 3; i++) kColor[i] = _color[i];
}
void getColor(unsigned char _color[3]) {
for(int i = 0; i < 3; i++) _color[i] = kColor[i];
}
void setName(std::string & _name) { kName = _name;}
std::string getName() {return kName;}
void translate(std::vector<float> & _tranlate);
};
//
//----- G4GMocrenIO class -----//
//
class G4GMocrenIO {
public:
// file id
static std::string kId;
// file version
static std::string kVersion;
// data file name
static std::string kFileName;
// file data endian: little or not
static char kLittleEndianInput;
static char kLittleEndianOutput;
static std::string kComment;
// number of events
static int kNumberOfEvents;
// pointer to the modality image data
static unsigned int kPointerToModalityData;
// pointer to the dose distribution image data
static std::vector<unsigned int> kPointerToDoseDistData;
// pointer to the ROI image data
static unsigned int kPointerToROIData;
// pointer to the track data
static unsigned int kPointerToTrackData;
// pointer to the detector data
static unsigned int kPointerToDetectorData;
// voxel spacing (universal size)
static float kVoxelSpacing[3];
//----- modality image -----//
static class GMocrenDataPrimitive<short> kModality;
// density map to modality (CT) values
static std::vector<float> kModalityImageDensityMap;
static std::string kModalityUnit;
//----- dose distribution -----//
static std::vector<class GMocrenDataPrimitive<double> > kDose;
//std::vector<short *> kShortDose;
static std::string kDoseUnit;
//----- RoI -----//
static std::vector<class GMocrenDataPrimitive<short> > kRoi;
//----- track information -----//
static std::vector<float *> kSteps; // begin (x,y,z), end (x,y,z)
static std::vector<unsigned char *> kStepColors; // r, g, b
static std::vector<class GMocrenTrack> kTracks;
bool kTracksWillBeStored;
//----- detector information -----//
static std::vector<class GMocrenDetector> kDetectors;
//----- verbose information -----//
static int kVerbose; // verbose level : 0 - 5 (none - overtalk)
public:
// constructor
G4GMocrenIO();
// destructor
~G4GMocrenIO();
// initialize
void initialize();
// set the gMocren data file name
void setFileName(std::string & _filename) {kFileName = _filename;}
void setFileName(char * _filename) {kFileName = _filename;}
// get the gMocren data file name
std::string & getFileName() {return kFileName;}
// store all data in the gMocren data file
bool storeData(char * _filename); // interface for version 4
bool storeData();
bool storeData2(char * _filename); // version 2
bool storeData2();
bool storeData3(char * _filename); // version 3
bool storeData3();
bool storeData4(char * _filename); // version 4
bool storeData4();
// retrieve all data from the gMocren data file
bool retrieveData(char * _filename); // interface
bool retrieveData();
bool retrieveData2(char * _filename); //version 2
bool retrieveData2();
bool retrieveData3(char * _filename); // version 3
bool retrieveData3();
bool retrieveData4(char * _filename); // version 4
bool retrieveData4();
// get & set the file id
std::string & getID() {return kId;}
void setID();
void setID(std::string & _id) {kId = _id;}
// get & set the file version
std::string & getVersion();
void setVersion(std::string & _version);
// set endians of input/output data
void setLittleEndianInput(bool _little);
void setLittleEndianOutput(bool _little);
// get & set comment
std::string & getComment() {return kComment;}
void setComment(std::string & _comment) {kComment = _comment;}
// voxel spacing
void setVoxelSpacing(float _spacing[3]);
void getVoxelSpacing(float _spacing[3]);
// get & set number of events
int & getNumberOfEvents();
void setNumberOfEvents(int & _numberOfEvents);
void addOneEvent();
// set pointer the modality image data
void setPointerToModalityData(unsigned int & _pointer);
unsigned int getPointerToModalityData();
// set pointer the dose distribution image data
void addPointerToDoseDistData(unsigned int & _pointer);
unsigned int getPointerToDoseDistData(int _elem = 0);
// set pointer the ROI image data
void setPointerToROIData(unsigned int & _pointer);
unsigned int getPointerToROIData();
// set pointer the track data
void setPointerToTrackData(unsigned int & _pointer);
unsigned int getPointerToTrackData();
private:
// calculate pointers
void calcPointers4();
void calcPointers3();
void calcPointers2();
//----- Modality image -----//
public:
// get & set the modality image size
void getModalityImageSize(int _size[3]);
void setModalityImageSize(int _size[3]);
// get & set the modality image spacing size
void getModalityImageVoxelSpacing(float _size[3]); // un-usable
void setModalityImageVoxelSpacing(float _size[3]); // un-usable
// get & set the modality image size
void setModalityImageScale(double & _scale);
double getModalityImageScale();
// set the modality image in CT
void setModalityImage(short * _image);
short * getModalityImage(int _z);
// set/get the modality image density map
void setModalityImageDensityMap(std::vector<float> & _map);
std::vector<float> & getModalityImageDensityMap();
// set the modality image min./max.
void setModalityImageMinMax(short _minmax[2]);
// get min. & max. of the modality image
void getModalityImageMinMax(short _minmax[2]);
short getModalityImageMax();
short getModalityImageMin();
// set center of the modality image position
void setModalityCenterPosition(float _center[3]);
void getModalityCenterPosition(float _center[3]);
// get & set the modality image unit
std::string getModalityImageUnit();
void setModalityImageUnit(std::string & _unit);
short convertDensityToHU(float & _dens);
//----- Dose distribution -----//
// instanciate a dose distribution data object
void newDoseDist();
// get number of dose distribion data
int getNumDoseDist();
// get & set the dose distribution unit
std::string getDoseDistUnit(int _num = 0);
void setDoseDistUnit(std::string & _unit, int _num = 0);
// get & set the dose distribution image size
void getDoseDistSize(int _size[3], int _num = 0);
void setDoseDistSize(int _size[3], int _num = 0);
// get min. & max. of the dose distribution image
void setDoseDistMinMax(short _minmax[2], int _num = 0);
void getDoseDistMinMax(short _minmax[2], int _num = 0);
// get min. & max. of the dose distribution
void setDoseDistMinMax(double _minmax[2], int _num = 0);
void getDoseDistMinMax(double _minmax[2], int _num = 0);
// get & set scale value of the dose distribution for the image
void setDoseDistScale(double & _scale, int _num = 0);
double getDoseDistScale(int _num = 0);
// set the dose distribution image
void setShortDoseDist(short * _image, int _num = 0);
void getShortDoseDist(short * _data, int _z, int _num = 0);
void getShortDoseDistMinMax(short _minmax[2], int _num = 0);
// set the dose distribution
void setDoseDist(double * _image, int _num = 0);
double * getDoseDist(int _z, int _num = 0);
// add another dose ditribution map to this map
bool addDoseDist(std::vector<double *> & _image, int _num = 0);
// get & get center position of calculated dose region
void getDoseDistCenterPosition(float _center[3], int _num = 0);
void setDoseDistCenterPosition(float _center[3], int _num = 0);
// get & get name of calculated dose distribution
std::string getDoseDistName(int _num = 0);
void setDoseDistName(std::string _name, int _num = 0);
// copy dose distributions
void copyDoseDist(std::vector<class GMocrenDataPrimitive<double> > & _dose);
// merge two dose distributions
bool mergeDoseDist(std::vector<class GMocrenDataPrimitive<double> > & _dose);
// clear all dose distributions
void clearDoseDistAll();
protected:
// check whether dose variable is empty or not
bool isDoseEmpty();
// calcuated scale value to convert dose distribution into image
void calcDoseDistScale();
public:
//----- RoI -----//
// instanciate an RoI data object
void newROI();
// get number of RoI data
int getNumROI();
// get & set the ROI image scale
double getROIScale(int _num = 0);
void setROIScale(double & _scale, int _num = 0);
// get & set the ROI image
short * getROI(int _z, int _num = 0);
void setROI(short * _image, int _num = 0);
// get & set the ROI image size
void getROISize(int _size[3], int _num = 0);
void setROISize(int _size[3], int _num = 0);
// get & set position of the ROI region center
void getROICenterPosition(float _center[3], int _num = 0);
void setROICenterPosition(float _center[3], int _num = 0);
// get & set the ROI image min. and max.
void getROIMinMax(short _minmax[2], int _num = 0);
void setROIMinMax(short _minmax[2], int _num = 0);
void clearROIAll();
protected:
// check whether RoI variable is empty or not
bool isROIEmpty();
public:
//----- Track -----//
// get number of tracks
int getNumTracks();
int getNumTracks4();
// get & set tracks
std::vector<float *> & getTracks();
void getTrack(int _num, std::vector<float *> & _steps,
std::vector<unsigned char * > & _color);
void addTrack(float * _tracks);
void setTracks(std::vector<float *> & _tracks);
std::vector<unsigned char *> & getTrackColors();
void addTrackColor(unsigned char * _colors);
void setTrackColors(std::vector<unsigned char *> & _trackColors);
void copyTracks(std::vector<float *> & _tracks, std::vector<unsigned char *> & _colors);
void mergeTracks(std::vector<float *> & _tracks, std::vector<unsigned char *> & _colors);
void addTrack(std::vector<float *> & _steps, unsigned char _color[3]);
void notStoredTracks() {kTracksWillBeStored = false;};
void translateTracks(std::vector<float> & _translateo);
void clearTracks() {kTracks.clear();}
//----- Detectors -----//
// get number of detectors
int getNumberOfDetectors();
// add one detector which consists of edges (float[6])
void addDetector(std::string & _name, std::vector<float *> & _det, unsigned char _color[3]);
void getDetector(int _num, std::vector<float *> & _edges,
std::vector<unsigned char *> & _color,
std::string & _detectorName);
void translateDetector(std::vector<float> & _translate);
void clearDetector() {kDetectors.clear();}
protected:
// endian conversion
template <typename Type> void convertEndian(char *, Type &);
// byte order inversion
template <typename T> void invertByteOrder(char * _val, T & _rval);
public:
//----- verbose information -----//
void setVerboseLevel(int _level);
};
#endif
@@ -0,0 +1,110 @@
//
// ********************************************************************
// * 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: G4GMocrenMessenger.hh,v 1.2 2009/10/12 10:04:35 akimura Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// Created: Mar. 31, 2009 Akinori Kimura
//
// UI command definition for gMocren-file driver.
//
#ifndef G4GMOCRENMESSENGER_HH
#define G4GMOCRENMESSENGER_HH 1
#include "G4UImessenger.hh"
#include <vector>
class G4UIdirectory;
class G4UIcmdWithABool;
class G4UIcmdWithAString;
class G4UIcommand;
class G4UIcmdWithoutParameter;
class G4GMocrenMessenger : public G4UImessenger {
public:
G4GMocrenMessenger();
virtual ~G4GMocrenMessenger();
virtual G4String GetCurrentValue(G4UIcommand * command);
virtual void SetNewValue(G4UIcommand * command, G4String newValue);
virtual G4String getEventNumberSuffix();
virtual G4bool appendGeometry();
virtual G4bool addPointAttributes();
virtual G4bool useSolids();
virtual G4bool writeInvisibles();
virtual G4String getVolumeName();
virtual std::vector<G4String> getHitNames();
virtual G4String getScoringMeshName();
virtual std::vector<G4String> getHitScorerNames();
virtual void list();
virtual void getNoVoxels(G4int & nx, G4int & ny, G4int & nz) const;
virtual G4bool getDrawVolumeGrid() {return kDrawVolumeGrid;}
private:
G4UIdirectory* kgMocrenDirectory;
G4String suffix;
G4UIcmdWithAString* setEventNumberSuffixCommand;
G4bool geometry;
G4UIcmdWithABool* appendGeometryCommand;
G4bool pointAttributes;
G4UIcmdWithABool* addPointAttributesCommand;
G4bool solids;
G4UIcmdWithABool* useSolidsCommand;
G4bool invisibles;
G4UIcmdWithABool* writeInvisiblesCommand;
G4String kgMocrenVolumeName;
G4UIcmdWithAString* kSetgMocrenVolumeNameCommand;
std::vector<G4String> kgMocrenHitNames;
G4UIcmdWithAString* kAddgMocrenHitNameCommand;
G4UIcmdWithoutParameter * kResetgMocrenHitNameCommand;
G4String kgMocrenScoringMeshName;
G4UIcmdWithAString * kSetgMocrenScoringMeshNameCommand;
std::vector<G4String> kgMocrenHitScorerNames;
G4UIcmdWithAString * kAddgMocrenHitScorerNameCommand;
G4UIcmdWithoutParameter * kResetgMocrenHitScorerNameCommand;
G4int kgMocrenNoVoxels[3];
G4UIcommand * kSetgMocrenNoVoxelsCommand;
G4UIcmdWithoutParameter * kListgMocrenCommand;
G4bool kDrawVolumeGrid;
G4UIcmdWithABool* kDrawVolumeGridCommand;
};
#endif
@@ -0,0 +1,96 @@
//
// ********************************************************************
// * 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: G4GMocrenTouchable.hh,v 1.2 2009/10/12 10:04:35 akimura Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// Created: Mar. 31, 2009 Akinori Kimura
//
// G4GMocrenTouchable class
// is used to get densities of each box cell of patient geometry
// defined by using the nest parameterisation.
//
#ifndef G4GMOCRENTOUCHABLE_HH
#define G4GMOCRENTOUCHABLE_HH
#include "G4VTouchable.hh"
class G4GMocrenTouchable : public G4VTouchable {
public: // with description
G4GMocrenTouchable() {;}
G4GMocrenTouchable(G4int & _depth0, G4int & _depth1);
virtual ~G4GMocrenTouchable() {;}
// Constructor and destructor.
virtual const G4ThreeVector& GetTranslation(G4int depth=0) const;
virtual const G4RotationMatrix* GetRotation(G4int depth=0) const;
// Accessors for translation and rotation.
virtual G4int GetReplicaNumber(G4int depth=0) const;
// Methods for touchables with history.
void SetReplicaNumber(G4int _depth0, G4int _depth1);
private:
G4int repno[2];
};
inline
G4GMocrenTouchable::G4GMocrenTouchable(G4int & _depth0, G4int & _depth1) {
repno[0] = _depth0;
repno[1] = _depth1;
}
const G4ThreeVector& G4GMocrenTouchable::GetTranslation(G4int depth) const {
// to avoid a warning in the compile process
G4int dummydepth;
dummydepth = depth;
G4ThreeVector * vec = 0;
return *vec;
}
const G4RotationMatrix* G4GMocrenTouchable::GetRotation(G4int depth) const {
// to avoid a warning in the compile process
G4int dummydepth;
dummydepth = depth;
G4RotationMatrix * rot = 0;
return rot;
}
inline
G4int G4GMocrenTouchable::GetReplicaNumber(G4int depth) const {
if(depth > 1) {
G4Exception("G4GMocrenTouchable::GetReplicaNumber(G4int)", "NotApplicable",
FatalException, "depth number is less than 2.");
}
return repno[depth];
}
#endif
@@ -0,0 +1,75 @@
//
// ********************************************************************
// * 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: G4GMocrenFile.cc,v 1.2 2009/10/12 10:04:35 akimura Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// GMocrenFile factory.
//
// Created: Mar. 31, 2009 Akinori Kimura
//
//
#include "G4GMocrenFile.hh"
#include "G4VSceneHandler.hh"
#include "G4GMocrenFileSceneHandler.hh"
#include "G4GMocrenFileViewer.hh"
#include "G4GMocrenMessenger.hh"
//----- G4GMocrenFile, constructor
G4GMocrenFile::G4GMocrenFile ()
: G4VGraphicsSystem ("gMocrenFile", "gMocrenFile",
"A gMocren file driver (ver.4)",
G4VGraphicsSystem::threeD),
//GMOCRENFILE_FEATURES, G4VGraphicsSystem::threeD),
kViewer(NULL), kSceneHandler(NULL), kMessenger(new G4GMocrenMessenger()) {
;
}
//----- G4GMocrenFile, destructor
G4GMocrenFile::~G4GMocrenFile () {
;
}
//----- G4GMocrenFile::CreateSceneHandler (const G4String& name)
G4VSceneHandler* G4GMocrenFile::CreateSceneHandler (const G4String& name)
{
kSceneHandler = new G4GMocrenFileSceneHandler (*this, *kMessenger, name);
return kSceneHandler;
}
//----- G4GMocrenFile::CreateViewer ()
G4VViewer* G4GMocrenFile::CreateViewer (G4VSceneHandler& scene,
const G4String& name)
{
kViewer = new G4GMocrenFileViewer((G4GMocrenFileSceneHandler&) scene,
*kMessenger, name);
return kViewer;
}
@@ -0,0 +1,671 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#include "G4GMocrenFileCTtoDensityMap.hh"
G4double GMocrenFileCTDensMap[] =
{0. , 0.000964744, 0.00192949 , 0.00289423 , 0.00385897 ,
0.00482372 , 0.00578846 , 0.0067532 , 0.00771795 , 0.00868269 ,
0.00964744 , 0.0106122 , 0.0115769 , 0.0125417 , 0.0135064 ,
0.0144712 , 0.0154359 , 0.0164006 , 0.0173654 , 0.0183301 ,
0.0192949 , 0.0202596 , 0.0212244 , 0.0221891 , 0.0231538 ,
0.0241186 , 0.0250833 , 0.0260481 , 0.0270128 , 0.0279776 ,
0.0289423 , 0.0299071 , 0.0308718 , 0.0318365 , 0.0328013 ,
0.033766 , 0.0347308 , 0.0356955 , 0.0366603 , 0.037625 ,
0.0385897 , 0.0395545 , 0.0405192 , 0.041484 , 0.0424487 ,
0.0434135 , 0.0443782 , 0.0453429 , 0.0463077 , 0.0472724 ,
0.0482372 , 0.0492019 , 0.0501667 , 0.0511314 , 0.0520962 ,
0.0530609 , 0.0540256 , 0.0549904 , 0.0559551 , 0.0569199 ,
0.0578846 , 0.0588494 , 0.0598141 , 0.0607788 , 0.0617436 ,
0.0627083 , 0.0636731 , 0.0646378 , 0.0656026 , 0.0665673 ,
0.067532 , 0.0684968 , 0.0694615 , 0.0704263 , 0.071391 ,
0.0723558 , 0.0733205 , 0.0742853 , 0.07525 , 0.0762147 ,
0.0771795 , 0.0781442 , 0.079109 , 0.0800737 , 0.0810385 ,
0.0820032 , 0.0829679 , 0.0839327 , 0.0848974 , 0.0858622 ,
0.0868269 , 0.0877917 , 0.0887564 , 0.0897212 , 0.0906859 ,
0.0916506 , 0.0926154 , 0.0935801 , 0.0945449 , 0.0955096 ,
0.0964744 , 0.0974391 , 0.0984038 , 0.0993686 , 0.100333 ,
0.101298 , 0.102263 , 0.103228 , 0.104192 , 0.105157 ,
0.106122 , 0.107087 , 0.108051 , 0.109016 , 0.109981 ,
0.110946 , 0.11191 , 0.112875 , 0.11384 , 0.114804 ,
0.115769 , 0.116734 , 0.117699 , 0.118663 , 0.119628 ,
0.120593 , 0.121558 , 0.122522 , 0.123487 , 0.124452 ,
0.125417 , 0.126381 , 0.127346 , 0.128311 , 0.129276 ,
0.13024 , 0.131205 , 0.13217 , 0.133135 , 0.134099 ,
0.135064 , 0.136029 , 0.136994 , 0.137958 , 0.138923 ,
0.139888 , 0.140853 , 0.141817 , 0.142782 , 0.143747 ,
0.144712 , 0.145676 , 0.146641 , 0.147606 , 0.148571 ,
0.149535 , 0.1505 , 0.151465 , 0.152429 , 0.153394 ,
0.154359 , 0.155324 , 0.156288 , 0.157253 , 0.158218 ,
0.159183 , 0.160147 , 0.161112 , 0.162077 , 0.163042 ,
0.164006 , 0.164971 , 0.165936 , 0.166901 , 0.167865 ,
0.16883 , 0.169795 , 0.17076 , 0.171724 , 0.172689 ,
0.173654 , 0.174619 , 0.175583 , 0.176548 , 0.177513 ,
0.178478 , 0.179442 , 0.180407 , 0.181372 , 0.182337 ,
0.183301 , 0.184266 , 0.185231 , 0.186196 , 0.18716,
0.188125 , 0.18909 , 0.190054 , 0.191019 , 0.191984 ,
0.192949 , 0.193913 , 0.194878 , 0.195843 , 0.196808 ,
0.197772 , 0.198737 , 0.199702 , 0.200667 , 0.201631 ,
0.202596 , 0.203561 , 0.204526 , 0.20549 , 0.206455 ,
0.20742 , 0.208385 , 0.209349 , 0.210314 , 0.211279 ,
0.212244 , 0.213208 , 0.214173 , 0.215138 , 0.216103 ,
0.217067 , 0.218032 , 0.218997 , 0.219962 , 0.220926 ,
0.221891 , 0.222856 , 0.223821 , 0.224785 , 0.22575,
0.226715 , 0.227679 , 0.228644 , 0.229609 , 0.230574 ,
0.231538 , 0.232503 , 0.233468 , 0.234433 , 0.235397 ,
0.236362 , 0.237327 , 0.238292 , 0.239256 , 0.240221 ,
0.241186 , 0.242151 , 0.243115 , 0.24408 , 0.245045 ,
0.24601 , 0.246974 , 0.247939 , 0.248904 , 0.249869 ,
0.250833 , 0.251798 , 0.252763 , 0.253728 , 0.254692 ,
0.255657 , 0.256622 , 0.257587 , 0.258551 , 0.259516 ,
0.260481 , 0.261446 , 0.26241 , 0.263375 , 0.26434,
0.265305 , 0.266269 , 0.267234 , 0.268199 , 0.269163 ,
0.270128 , 0.271093 , 0.272058 , 0.273022 , 0.273987 ,
0.274952 , 0.275917 , 0.276881 , 0.277846 , 0.278811 ,
0.279776 , 0.28074 , 0.281705 , 0.28267 , 0.283635 ,
0.284599 , 0.285564 , 0.286529 , 0.287494 , 0.288458 ,
0.289423 , 0.290388 , 0.291353 , 0.292317 , 0.293282 ,
0.294247 , 0.295212 , 0.296176 , 0.297141 , 0.298106 ,
0.299071 , 0.300035 , 0.301 , 0.301965 , 0.302929 ,
0.303894 , 0.304859 , 0.305824 , 0.306788 , 0.307753 ,
0.308718 , 0.309683 , 0.310647 , 0.311612 , 0.312577 ,
0.313542 , 0.314506 , 0.315471 , 0.316436 , 0.317401 ,
0.318365 , 0.31933 , 0.320295 , 0.32126 , 0.322224 ,
0.323189 , 0.324154 , 0.325119 , 0.326083 , 0.327048 ,
0.328013 , 0.328978 , 0.329942 , 0.330907 , 0.331872 ,
0.332837 , 0.333801 , 0.334766 , 0.335731 , 0.336695 ,
0.33766 , 0.338625 , 0.33959 , 0.340554 , 0.341519 ,
0.342484 , 0.343449 , 0.344413 , 0.345378 , 0.346343 ,
0.347308 , 0.348272 , 0.349237 , 0.350202 , 0.351167 ,
0.352131 , 0.353096 , 0.354061 , 0.355026 , 0.35599,
0.356955 , 0.35792 , 0.358885 , 0.359849 , 0.360814 ,
0.361779 , 0.362744 , 0.363708 , 0.364673 , 0.365638 ,
0.366603 , 0.367567 , 0.368532 , 0.369497 , 0.370462 ,
0.371426 , 0.372391 , 0.373356 , 0.374321 , 0.375285 ,
0.37625 , 0.377215 , 0.378179 , 0.379144 , 0.380109 ,
0.381074 , 0.382038 , 0.383003 , 0.383968 , 0.384933 ,
0.385897 , 0.386862 , 0.387827 , 0.388792 , 0.389756 ,
0.390721 , 0.391686 , 0.392651 , 0.393615 , 0.39458,
0.395545 , 0.39651 , 0.397474 , 0.398439 , 0.399404 ,
0.400369 , 0.401333 , 0.402298 , 0.403263 , 0.404228 ,
0.405192 , 0.406157 , 0.407122 , 0.408087 , 0.409051 ,
0.410016 , 0.410981 , 0.411945 , 0.41291 , 0.413875 ,
0.41484 , 0.415805 , 0.416769 , 0.417734 , 0.418699 ,
0.419663 , 0.420628 , 0.421593 , 0.422558 , 0.423522 ,
0.424487 , 0.425452 , 0.426417 , 0.427381 , 0.428346 ,
0.429311 , 0.430276 , 0.43124 , 0.432205 , 0.43317,
0.434135 , 0.435099 , 0.436064 , 0.437029 , 0.437994 ,
0.438958 , 0.439923 , 0.440888 , 0.441853 , 0.442817 ,
0.443782 , 0.444747 , 0.445712 , 0.446676 , 0.447641 ,
0.448606 , 0.449571 , 0.450535 , 0.4515 , 0.452465 ,
0.453429 , 0.454394 , 0.455359 , 0.456324 , 0.457288 ,
0.458253 , 0.459218 , 0.460183 , 0.461147 , 0.462112 ,
0.463077 , 0.464042 , 0.465006 , 0.465971 , 0.466936 ,
0.467901 , 0.468865 , 0.46983 , 0.470795 , 0.47176,
0.472724 , 0.473689 , 0.474654 , 0.475619 , 0.476583 ,
0.477548 , 0.478513 , 0.479478 , 0.480442 , 0.481407 ,
0.482372 , 0.483337 , 0.484301 , 0.485266 , 0.486231 ,
0.487196 , 0.48816 , 0.489125 , 0.49009 , 0.491054 ,
0.492019 , 0.492984 , 0.493949 , 0.494913 , 0.495878 ,
0.496843 , 0.497808 , 0.498772 , 0.499737 , 0.500702 ,
0.501667 , 0.502631 , 0.503596 , 0.504561 , 0.505526 ,
0.50649 , 0.507455 , 0.50842 , 0.509385 , 0.510349 ,
0.511314 , 0.512279 , 0.513244 , 0.514208 , 0.515173 ,
0.516138 , 0.517103 , 0.518067 , 0.519032 , 0.519997 ,
0.520962 , 0.521926 , 0.522891 , 0.523856 , 0.524821 ,
0.525785 , 0.52675 , 0.527715 , 0.528679 , 0.529644 ,
0.530609 , 0.531574 , 0.532538 , 0.533503 , 0.534468 ,
0.535433 , 0.536397 , 0.537362 , 0.538327 , 0.539292 ,
0.540256 , 0.541221 , 0.542186 , 0.543151 , 0.544115 ,
0.54508 , 0.546045 , 0.54701 , 0.547974 , 0.548939 ,
0.549904 , 0.550869 , 0.551833 , 0.552798 , 0.553763 ,
0.554728 , 0.555692 , 0.556657 , 0.557622 , 0.558587 ,
0.559551 , 0.560516 , 0.561481 , 0.562446 , 0.56341,
0.564375 , 0.56534 , 0.566305 , 0.567269 , 0.568234 ,
0.569199 , 0.570163 , 0.571128 , 0.572093 , 0.573058 ,
0.574022 , 0.574987 , 0.575952 , 0.576917 , 0.577881 ,
0.578846 , 0.579811 , 0.580776 , 0.58174 , 0.582705 ,
0.58367 , 0.584635 , 0.585599 , 0.586564 , 0.587529 ,
0.588494 , 0.589458 , 0.590423 , 0.591388 , 0.592353 ,
0.593317 , 0.594282 , 0.595247 , 0.596212 , 0.597176 ,
0.598141 , 0.599106 , 0.600071 , 0.601035 , 0.602 ,
0.603288 , 0.604576 , 0.605864 , 0.607152 , 0.60844,
0.609728 , 0.611016 , 0.612304 , 0.613592 , 0.61488,
0.616168 , 0.617456 , 0.618744 , 0.620032 , 0.62132,
0.622608 , 0.623896 , 0.625184 , 0.626472 , 0.62776,
0.629048 , 0.630336 , 0.631624 , 0.632912 , 0.6342 ,
0.635488 , 0.636776 , 0.638064 , 0.639352 , 0.64064,
0.641928 , 0.643216 , 0.644504 , 0.645792 , 0.64708,
0.648368 , 0.649656 , 0.650944 , 0.652232 , 0.65352,
0.654808 , 0.656096 , 0.657384 , 0.658672 , 0.65996,
0.661248 , 0.662536 , 0.663824 , 0.665112 , 0.6664 ,
0.667688 , 0.668976 , 0.670264 , 0.671552 , 0.67284,
0.674128 , 0.675416 , 0.676704 , 0.677992 , 0.67928,
0.680568 , 0.681856 , 0.683144 , 0.684432 , 0.68572,
0.687008 , 0.688296 , 0.689584 , 0.690872 , 0.69216,
0.693448 , 0.694736 , 0.696024 , 0.697312 , 0.6986 ,
0.699888 , 0.701176 , 0.702464 , 0.703752 , 0.70504,
0.706328 , 0.707616 , 0.708904 , 0.710192 , 0.71148,
0.712768 , 0.714056 , 0.715344 , 0.716632 , 0.71792,
0.719208 , 0.720496 , 0.721784 , 0.723072 , 0.72436,
0.725648 , 0.726936 , 0.728224 , 0.729512 , 0.7308 ,
0.732088 , 0.733376 , 0.734664 , 0.735952 , 0.73724,
0.738528 , 0.739816 , 0.741104 , 0.742392 , 0.74368,
0.744968 , 0.746256 , 0.747544 , 0.748832 , 0.75012,
0.751408 , 0.752696 , 0.753984 , 0.755272 , 0.75656,
0.757848 , 0.759136 , 0.760424 , 0.761712 , 0.763 ,
0.764288 , 0.765576 , 0.766864 , 0.768152 , 0.76944,
0.770728 , 0.772016 , 0.773304 , 0.774592 , 0.77588,
0.777168 , 0.778456 , 0.779744 , 0.781032 , 0.78232,
0.783608 , 0.784896 , 0.786184 , 0.787472 , 0.78876,
0.790048 , 0.791336 , 0.792624 , 0.793912 , 0.7952 ,
0.796488 , 0.797776 , 0.799064 , 0.800352 , 0.80164,
0.802928 , 0.804216 , 0.805504 , 0.806792 , 0.80808,
0.809368 , 0.810656 , 0.811944 , 0.813232 , 0.81452,
0.815808 , 0.817096 , 0.818384 , 0.819672 , 0.82096,
0.822248 , 0.823536 , 0.824824 , 0.826112 , 0.8274 ,
0.828688 , 0.829976 , 0.831264 , 0.832552 , 0.83384,
0.835128 , 0.836416 , 0.837704 , 0.838992 , 0.84028,
0.841568 , 0.842856 , 0.844144 , 0.845432 , 0.84672,
0.848008 , 0.849296 , 0.850584 , 0.851872 , 0.85316,
0.854448 , 0.855736 , 0.857024 , 0.858312 , 0.8596 ,
0.860888 , 0.862176 , 0.863464 , 0.864752 , 0.86604,
0.867328 , 0.868616 , 0.869904 , 0.871192 , 0.87248,
0.873768 , 0.875056 , 0.876344 , 0.877632 , 0.87892,
0.880208 , 0.881496 , 0.882784 , 0.884072 , 0.88536,
0.886648 , 0.887936 , 0.889224 , 0.890512 , 0.8918 ,
0.893088 , 0.894376 , 0.895664 , 0.896952 , 0.89824,
0.899528 , 0.900816 , 0.902104 , 0.903392 , 0.90468,
0.905968 , 0.907256 , 0.908544 , 0.909832 , 0.91112,
0.912408 , 0.913696 , 0.914984 , 0.916272 , 0.91756,
0.918848 , 0.920136 , 0.921424 , 0.922712 , 0.924 ,
0.924584 , 0.925168 , 0.925752 , 0.926336 , 0.92692,
0.927504 , 0.928088 , 0.928672 , 0.929256 , 0.92984,
0.930424 , 0.931008 , 0.931592 , 0.932176 , 0.93276,
0.933344 , 0.933928 , 0.934512 , 0.935096 , 0.93568,
0.936264 , 0.936848 , 0.937432 , 0.938016 , 0.9386 ,
0.939184 , 0.939768 , 0.940352 , 0.940936 , 0.94152,
0.942104 , 0.942688 , 0.943272 , 0.943856 , 0.94444,
0.945024 , 0.945608 , 0.946192 , 0.946776 , 0.94736,
0.947944 , 0.948528 , 0.949112 , 0.949696 , 0.95028,
0.950864 , 0.951448 , 0.952032 , 0.952616 , 0.9532 ,
0.953784 , 0.954368 , 0.954952 , 0.955536 , 0.95612,
0.956704 , 0.957288 , 0.957872 , 0.958456 , 0.95904,
0.959624 , 0.960208 , 0.960792 , 0.961376 , 0.96196,
0.962544 , 0.963128 , 0.963712 , 0.964296 , 0.96488,
0.965464 , 0.966048 , 0.966632 , 0.967216 , 0.9678 ,
0.968384 , 0.968968 , 0.969552 , 0.970136 , 0.97072,
0.971304 , 0.971888 , 0.972472 , 0.973056 , 0.97364,
0.974224 , 0.974808 , 0.975392 , 0.975976 , 0.97656,
0.977144 , 0.977728 , 0.978312 , 0.978896 , 0.97948,
0.980064 , 0.980648 , 0.981232 , 0.981816 , 0.9824 ,
0.982984 , 0.983568 , 0.984152 , 0.984736 , 0.98532,
0.985904 , 0.986488 , 0.987072 , 0.987656 , 0.98824,
0.988824 , 0.989408 , 0.989992 , 0.990576 , 0.99116,
0.991744 , 0.992328 , 0.992912 , 0.993496 , 0.99408,
0.994664 , 0.995248 , 0.995832 , 0.996416 , 0.997 ,
0.997584 , 0.998168 , 0.998752 , 0.999336 , 0.99992,
1.0005 , 1.00109 , 1.00167 , 1.00226 , 1.00284,
1.00342 , 1.00401 , 1.00459 , 1.00518 , 1.00576,
1.00634 , 1.00693 , 1.00751 , 1.0081 , 1.00868,
1.00926 , 1.00985 , 1.01043 , 1.01102 , 1.0116 ,
1.01218 , 1.01277 , 1.01335 , 1.01394 , 1.01452,
1.0151 , 1.01569 , 1.01627 , 1.01686 , 1.01744,
1.01802 , 1.01861 , 1.01919 , 1.01978 , 1.02036,
1.02094 , 1.02153 , 1.02211 , 1.0227 , 1.02328,
1.02386 , 1.02445 , 1.02503 , 1.02562 , 1.0262 ,
1.02678 , 1.02737 , 1.02795 , 1.02854 , 1.02912,
1.0297 , 1.03029 , 1.03087 , 1.03146 , 1.03204,
1.03262 , 1.03321 , 1.03379 , 1.03438 , 1.03496,
1.03554 , 1.03613 , 1.03671 , 1.0373 , 1.03788,
1.03846 , 1.03905 , 1.03963 , 1.04022 , 1.0408 ,
1.04138 , 1.04197 , 1.04255 , 1.04314 , 1.04372,
1.0443 , 1.04489 , 1.04547 , 1.04606 , 1.04664,
1.04722 , 1.04781 , 1.04839 , 1.04898 , 1.04956,
1.05014 , 1.05073 , 1.05131 , 1.0519 , 1.05248,
1.05306 , 1.05365 , 1.05423 , 1.05482 , 1.0554 ,
1.05598 , 1.05657 , 1.05715 , 1.05774 , 1.05832,
1.0589 , 1.05949 , 1.06007 , 1.06066 , 1.06124,
1.06182 , 1.06241 , 1.06299 , 1.06358 , 1.06416,
1.06474 , 1.06533 , 1.06591 , 1.0665 , 1.06708,
1.06766 , 1.06825 , 1.06883 , 1.06942 , 1.07 ,
1.07038 , 1.07075 , 1.07113 , 1.0715 , 1.07188,
1.07225 , 1.07263 , 1.073 , 1.07337 , 1.07375,
1.07413 , 1.0745 , 1.07487 , 1.07525 , 1.07563,
1.076 , 1.07638 , 1.07675 , 1.07713 , 1.0775 ,
1.07788 , 1.07825 , 1.07863 , 1.079 , 1.07938,
1.07975 , 1.08013 , 1.0805 , 1.08088 , 1.08125,
1.08162 , 1.082 , 1.08238 , 1.08275 , 1.08312,
1.0835 , 1.08388 , 1.08425 , 1.08463 , 1.085 ,
1.08537 , 1.08575 , 1.08613 , 1.0865 , 1.08687,
1.08725 , 1.08763 , 1.088 , 1.08837 , 1.08875,
1.08913 , 1.0895 , 1.08987 , 1.09025 , 1.09063,
1.091 , 1.09137 , 1.09175 , 1.09213 , 1.0925 ,
1.09288 , 1.09325 , 1.09363 , 1.094 , 1.09438,
1.09475 , 1.09513 , 1.0955 , 1.09588 , 1.09625,
1.09663 , 1.097 , 1.09737 , 1.09775 , 1.09812,
1.0985 , 1.09887 , 1.09925 , 1.09962 , 1.1 ,
1.10038 , 1.10075 , 1.10113 , 1.1015 , 1.10187,
1.10225 , 1.10263 , 1.103 , 1.10337 , 1.10375,
1.10413 , 1.1045 , 1.10488 , 1.10525 , 1.10563,
1.106 , 1.10638 , 1.10675 , 1.10713 , 1.1075 ,
1.10788 , 1.10825 , 1.10863 , 1.109 , 1.10938,
1.10975 , 1.11012 , 1.1105 , 1.11088 , 1.11125,
1.11162 , 1.112 , 1.11238 , 1.11275 , 1.11312,
1.1135 , 1.11388 , 1.11425 , 1.11462 , 1.115 ,
1.11538 , 1.11575 , 1.11612 , 1.1165 , 1.11688,
1.11725 , 1.11762 , 1.118 , 1.11838 , 1.11875,
1.11913 , 1.1195 , 1.11988 , 1.12025 , 1.12063,
1.121 , 1.12137 , 1.12175 , 1.12213 , 1.1225 ,
1.12287 , 1.12325 , 1.12363 , 1.124 , 1.12437,
1.12475 , 1.12512 , 1.1255 , 1.12587 , 1.12625,
1.12662 , 1.127 , 1.12738 , 1.12775 , 1.12812,
1.1285 , 1.12888 , 1.12925 , 1.12962 , 1.13 ,
1.13038 , 1.13075 , 1.13112 , 1.1315 , 1.13188,
1.13225 , 1.13262 , 1.133 , 1.13338 , 1.13375,
1.13412 , 1.1345 , 1.13487 , 1.13525 , 1.13563,
1.136 , 1.13637 , 1.13675 , 1.13713 , 1.1375 ,
1.13787 , 1.13825 , 1.13862 , 1.139 , 1.13937,
1.13975 , 1.14012 , 1.1405 , 1.14087 , 1.14125,
1.14162 , 1.142 , 1.14237 , 1.14275 , 1.14313,
1.1435 , 1.14388 , 1.14425 , 1.14463 , 1.145 ,
1.14542 , 1.14584 , 1.14625 , 1.14667 , 1.14709,
1.14751 , 1.14793 , 1.14835 , 1.14876 , 1.14918,
1.1496 , 1.15002 , 1.15044 , 1.15086 , 1.15127,
1.15169 , 1.15211 , 1.15253 , 1.15295 , 1.15336,
1.15378 , 1.1542 , 1.15462 , 1.15504 , 1.15546,
1.15587 , 1.15629 , 1.15671 , 1.15713 , 1.15755,
1.15797 , 1.15838 , 1.1588 , 1.15922 , 1.15964,
1.16006 , 1.16047 , 1.16089 , 1.16131 , 1.16173,
1.16215 , 1.16257 , 1.16298 , 1.1634 , 1.16382,
1.16424 , 1.16466 , 1.16508 , 1.16549 , 1.16591,
1.16633 , 1.16675 , 1.16717 , 1.16758 , 1.168 ,
1.16842 , 1.16884 , 1.16926 , 1.16968 , 1.17009,
1.17051 , 1.17093 , 1.17135 , 1.17177 , 1.17219,
1.1726 , 1.17302 , 1.17344 , 1.17386 , 1.17428,
1.17469 , 1.17511 , 1.17553 , 1.17595 , 1.17637,
1.17679 , 1.1772 , 1.17762 , 1.17804 , 1.17846,
1.17888 , 1.1793 , 1.17971 , 1.18013 , 1.18055,
1.18097 , 1.18139 , 1.1818 , 1.18222 , 1.18264,
1.18306 , 1.18348 , 1.1839 , 1.18431 , 1.18473,
1.18515 , 1.18557 , 1.18599 , 1.18641 , 1.18682,
1.18724 , 1.18766 , 1.18808 , 1.1885 , 1.18891,
1.18933 , 1.18975 , 1.19017 , 1.19059 , 1.19101,
1.19142 , 1.19184 , 1.19226 , 1.19268 , 1.1931 ,
1.19352 , 1.19393 , 1.19435 , 1.19477 , 1.19519,
1.19561 , 1.19602 , 1.19644 , 1.19686 , 1.19728,
1.1977 , 1.19812 , 1.19853 , 1.19895 , 1.19937,
1.19979 , 1.20021 , 1.20063 , 1.20104 , 1.20146,
1.20188 , 1.2023 , 1.20272 , 1.20313 , 1.20355,
1.20397 , 1.20439 , 1.20481 , 1.20523 , 1.20564,
1.20606 , 1.20648 , 1.2069 , 1.20732 , 1.20774,
1.20815 , 1.20857 , 1.20899 , 1.20941 , 1.20983,
1.21024 , 1.21066 , 1.21108 , 1.2115 , 1.21192,
1.21234 , 1.21275 , 1.21317 , 1.21359 , 1.21401,
1.21443 , 1.21485 , 1.21526 , 1.21568 , 1.2161 ,
1.21652 , 1.21694 , 1.21735 , 1.21777 , 1.21819,
1.21861 , 1.21903 , 1.21945 , 1.21986 , 1.22028,
1.2207 , 1.22112 , 1.22154 , 1.22196 , 1.22237,
1.22279 , 1.22321 , 1.22363 , 1.22405 , 1.22446,
1.22488 , 1.2253 , 1.22572 , 1.22614 , 1.22656,
1.22697 , 1.22739 , 1.22781 , 1.22823 , 1.22865,
1.22907 , 1.22948 , 1.2299 , 1.23032 , 1.23074,
1.23116 , 1.23157 , 1.23199 , 1.23241 , 1.23283,
1.23325 , 1.23367 , 1.23408 , 1.2345 , 1.23492,
1.23534 , 1.23576 , 1.23618 , 1.23659 , 1.23701,
1.23743 , 1.23785 , 1.23827 , 1.23868 , 1.2391 ,
1.23952 , 1.23994 , 1.24036 , 1.24078 , 1.24119,
1.24161 , 1.24203 , 1.24245 , 1.24287 , 1.24329,
1.2437 , 1.24412 , 1.24454 , 1.24496 , 1.24538,
1.24579 , 1.24621 , 1.24663 , 1.24705 , 1.24747,
1.24789 , 1.2483 , 1.24872 , 1.24914 , 1.24956,
1.24998 , 1.2504 , 1.25081 , 1.25123 , 1.25165,
1.25207 , 1.25249 , 1.2529 , 1.25332 , 1.25374,
1.25416 , 1.25458 , 1.255 , 1.25541 , 1.25583,
1.25625 , 1.25667 , 1.25709 , 1.25751 , 1.25792,
1.25834 , 1.25876 , 1.25918 , 1.2596 , 1.26001,
1.26043 , 1.26085 , 1.26127 , 1.26169 , 1.26211,
1.26252 , 1.26294 , 1.26336 , 1.26378 , 1.2642 ,
1.26462 , 1.26503 , 1.26545 , 1.26587 , 1.26629,
1.26671 , 1.26712 , 1.26754 , 1.26796 , 1.26838,
1.2688 , 1.26922 , 1.26963 , 1.27005 , 1.27047,
1.27089 , 1.27131 , 1.27173 , 1.27214 , 1.27256,
1.27298 , 1.2734 , 1.27382 , 1.27423 , 1.27465,
1.27507 , 1.27549 , 1.27591 , 1.27633 , 1.27674,
1.27716 , 1.27758 , 1.278 , 1.27842 , 1.27884,
1.27925 , 1.27967 , 1.28009 , 1.28051 , 1.28093,
1.28134 , 1.28176 , 1.28218 , 1.2826 , 1.28302,
1.28344 , 1.28385 , 1.28427 , 1.28469 , 1.28511,
1.28553 , 1.28595 , 1.28636 , 1.28678 , 1.2872 ,
1.28762 , 1.28804 , 1.28845 , 1.28887 , 1.28929,
1.28971 , 1.29013 , 1.29055 , 1.29096 , 1.29138,
1.2918 , 1.29222 , 1.29264 , 1.29306 , 1.29347,
1.29389 , 1.29431 , 1.29473 , 1.29515 , 1.29556,
1.29598 , 1.2964 , 1.29682 , 1.29724 , 1.29766,
1.29807 , 1.29849 , 1.29891 , 1.29933 , 1.29975,
1.30017 , 1.30058 , 1.301 , 1.30142 , 1.30184,
1.30226 , 1.30267 , 1.30309 , 1.30351 , 1.30393,
1.30435 , 1.30477 , 1.30518 , 1.3056 , 1.30602,
1.30644 , 1.30686 , 1.30728 , 1.30769 , 1.30811,
1.30853 , 1.30895 , 1.30937 , 1.30978 , 1.3102 ,
1.31062 , 1.31104 , 1.31146 , 1.31188 , 1.31229,
1.31271 , 1.31313 , 1.31355 , 1.31397 , 1.31439,
1.3148 , 1.31522 , 1.31564 , 1.31606 , 1.31648,
1.31689 , 1.31731 , 1.31773 , 1.31815 , 1.31857,
1.31899 , 1.3194 , 1.31982 , 1.32024 , 1.32066,
1.32108 , 1.3215 , 1.32191 , 1.32233 , 1.32275,
1.32317 , 1.32359 , 1.324 , 1.32442 , 1.32484,
1.32526 , 1.32568 , 1.3261 , 1.32651 , 1.32693,
1.32735 , 1.32777 , 1.32819 , 1.32861 , 1.32902,
1.32944 , 1.32986 , 1.33028 , 1.3307 , 1.33111,
1.33153 , 1.33195 , 1.33237 , 1.33279 , 1.33321,
1.33362 , 1.33404 , 1.33446 , 1.33488 , 1.3353 ,
1.33572 , 1.33613 , 1.33655 , 1.33697 , 1.33739,
1.33781 , 1.33822 , 1.33864 , 1.33906 , 1.33948,
1.3399 , 1.34032 , 1.34073 , 1.34115 , 1.34157,
1.34199 , 1.34241 , 1.34283 , 1.34324 , 1.34366,
1.34408 , 1.3445 , 1.34492 , 1.34533 , 1.34575,
1.34617 , 1.34659 , 1.34701 , 1.34743 , 1.34784,
1.34826 , 1.34868 , 1.3491 , 1.34952 , 1.34994,
1.35035 , 1.35077 , 1.35119 , 1.35161 , 1.35203,
1.35244 , 1.35286 , 1.35328 , 1.3537 , 1.35412,
1.35454 , 1.35495 , 1.35537 , 1.35579 , 1.35621,
1.35663 , 1.35705 , 1.35746 , 1.35788 , 1.3583 ,
1.35872 , 1.35914 , 1.35955 , 1.35997 , 1.36039,
1.36081 , 1.36123 , 1.36165 , 1.36206 , 1.36248,
1.3629 , 1.36332 , 1.36374 , 1.36416 , 1.36457,
1.36499 , 1.36541 , 1.36583 , 1.36625 , 1.36666,
1.36708 , 1.3675 , 1.36792 , 1.36834 , 1.36876,
1.36917 , 1.36959 , 1.37001 , 1.37043 , 1.37085,
1.37127 , 1.37168 , 1.3721 , 1.37252 , 1.37294,
1.37336 , 1.37377 , 1.37419 , 1.37461 , 1.37503,
1.37545 , 1.37587 , 1.37628 , 1.3767 , 1.37712,
1.37754 , 1.37796 , 1.37838 , 1.37879 , 1.37921,
1.37963 , 1.38005 , 1.38047 , 1.38088 , 1.3813 ,
1.38172 , 1.38214 , 1.38256 , 1.38298 , 1.38339,
1.38381 , 1.38423 , 1.38465 , 1.38507 , 1.38549,
1.3859 , 1.38632 , 1.38674 , 1.38716 , 1.38758,
1.38799 , 1.38841 , 1.38883 , 1.38925 , 1.38967,
1.39009 , 1.3905 , 1.39092 , 1.39134 , 1.39176,
1.39218 , 1.3926 , 1.39301 , 1.39343 , 1.39385,
1.39427 , 1.39469 , 1.3951 , 1.39552 , 1.39594,
1.39636 , 1.39678 , 1.3972 , 1.39761 , 1.39803,
1.39845 , 1.39887 , 1.39929 , 1.39971 , 1.40012,
1.40054 , 1.40096 , 1.40138 , 1.4018 , 1.40221,
1.40263 , 1.40305 , 1.40347 , 1.40389 , 1.40431,
1.40472 , 1.40514 , 1.40556 , 1.40598 , 1.4064 ,
1.40682 , 1.40723 , 1.40765 , 1.40807 , 1.40849,
1.40891 , 1.40932 , 1.40974 , 1.41016 , 1.41058,
1.411 , 1.41142 , 1.41183 , 1.41225 , 1.41267,
1.41309 , 1.41351 , 1.41393 , 1.41434 , 1.41476,
1.41518 , 1.4156 , 1.41602 , 1.41643 , 1.41685,
1.41727 , 1.41769 , 1.41811 , 1.41853 , 1.41894,
1.41936 , 1.41978 , 1.4202 , 1.42062 , 1.42104,
1.42145 , 1.42187 , 1.42229 , 1.42271 , 1.42313,
1.42354 , 1.42396 , 1.42438 , 1.4248 , 1.42522,
1.42564 , 1.42605 , 1.42647 , 1.42689 , 1.42731,
1.42773 , 1.42815 , 1.42856 , 1.42898 , 1.4294 ,
1.42982 , 1.43024 , 1.43065 , 1.43107 , 1.43149,
1.43191 , 1.43233 , 1.43275 , 1.43316 , 1.43358,
1.434 , 1.43442 , 1.43484 , 1.43526 , 1.43567,
1.43609 , 1.43651 , 1.43693 , 1.43735 , 1.43776,
1.43818 , 1.4386 , 1.43902 , 1.43944 , 1.43986,
1.44027 , 1.44069 , 1.44111 , 1.44153 , 1.44195,
1.44237 , 1.44278 , 1.4432 , 1.44362 , 1.44404,
1.44446 , 1.44487 , 1.44529 , 1.44571 , 1.44613,
1.44655 , 1.44697 , 1.44738 , 1.4478 , 1.44822,
1.44864 , 1.44906 , 1.44948 , 1.44989 , 1.45031,
1.45073 , 1.45115 , 1.45157 , 1.45198 , 1.4524 ,
1.45282 , 1.45324 , 1.45366 , 1.45408 , 1.45449,
1.45491 , 1.45533 , 1.45575 , 1.45617 , 1.45659,
1.457 , 1.45742 , 1.45784 , 1.45826 , 1.45868,
1.45909 , 1.45951 , 1.45993 , 1.46035 , 1.46077,
1.46119 , 1.4616 , 1.46202 , 1.46244 , 1.46286,
1.46328 , 1.4637 , 1.46411 , 1.46453 , 1.46495,
1.46537 , 1.46579 , 1.4662 , 1.46662 , 1.46704,
1.46746 , 1.46788 , 1.4683 , 1.46871 , 1.46913,
1.46955 , 1.46997 , 1.47039 , 1.47081 , 1.47122,
1.47164 , 1.47206 , 1.47248 , 1.4729 , 1.47331,
1.47373 , 1.47415 , 1.47457 , 1.47499 , 1.47541,
1.47582 , 1.47624 , 1.47666 , 1.47708 , 1.4775 ,
1.47792 , 1.47833 , 1.47875 , 1.47917 , 1.47959,
1.48001 , 1.48042 , 1.48084 , 1.48126 , 1.48168,
1.4821 , 1.48252 , 1.48293 , 1.48335 , 1.48377,
1.48419 , 1.48461 , 1.48503 , 1.48544 , 1.48586,
1.48628 , 1.4867 , 1.48712 , 1.48753 , 1.48795,
1.48837 , 1.48879 , 1.48921 , 1.48963 , 1.49004,
1.49046 , 1.49088 , 1.4913 , 1.49172 , 1.49214,
1.49255 , 1.49297 , 1.49339 , 1.49381 , 1.49423,
1.49464 , 1.49506 , 1.49548 , 1.4959 , 1.49632,
1.49674 , 1.49715 , 1.49757 , 1.49799 , 1.49841,
1.49883 , 1.49925 , 1.49966 , 1.50008 , 1.5005 ,
1.50092 , 1.50134 , 1.50175 , 1.50217 , 1.50259,
1.50301 , 1.50343 , 1.50385 , 1.50426 , 1.50468,
1.5051 , 1.50552 , 1.50594 , 1.50636 , 1.50677,
1.50719 , 1.50761 , 1.50803 , 1.50845 , 1.50886,
1.50928 , 1.5097 , 1.51012 , 1.51054 , 1.51096,
1.51137 , 1.51179 , 1.51221 , 1.51263 , 1.51305,
1.51347 , 1.51388 , 1.5143 , 1.51472 , 1.51514,
1.51556 , 1.51597 , 1.51639 , 1.51681 , 1.51723,
1.51765 , 1.51807 , 1.51848 , 1.5189 , 1.51932,
1.51974 , 1.52016 , 1.52058 , 1.52099 , 1.52141,
1.52183 , 1.52225 , 1.52267 , 1.52308 , 1.5235 ,
1.52392 , 1.52434 , 1.52476 , 1.52518 , 1.52559,
1.52601 , 1.52643 , 1.52685 , 1.52727 , 1.52769,
1.5281 , 1.52852 , 1.52894 , 1.52936 , 1.52978,
1.53019 , 1.53061 , 1.53103 , 1.53145 , 1.53187,
1.53229 , 1.5327 , 1.53312 , 1.53354 , 1.53396,
1.53438 , 1.5348 , 1.53521 , 1.53563 , 1.53605,
1.53647 , 1.53689 , 1.5373 , 1.53772 , 1.53814,
1.53856 , 1.53898 , 1.5394 , 1.53981 , 1.54023,
1.54065 , 1.54107 , 1.54149 , 1.54191 , 1.54232,
1.54274 , 1.54316 , 1.54358 , 1.544 , 1.54441,
1.54483 , 1.54525 , 1.54567 , 1.54609 , 1.54651,
1.54692 , 1.54734 , 1.54776 , 1.54818 , 1.5486 ,
1.54902 , 1.54943 , 1.54985 , 1.55027 , 1.55069,
1.55111 , 1.55152 , 1.55194 , 1.55236 , 1.55278,
1.5532 , 1.55362 , 1.55403 , 1.55445 , 1.55487,
1.55529 , 1.55571 , 1.55613 , 1.55654 , 1.55696,
1.55738 , 1.5578 , 1.55822 , 1.55863 , 1.55905,
1.55947 , 1.55989 , 1.56031 , 1.56073 , 1.56114,
1.56156 , 1.56198 , 1.5624 , 1.56282 , 1.56324,
1.56365 , 1.56407 , 1.56449 , 1.56491 , 1.56533,
1.56574 , 1.56616 , 1.56658 , 1.567 , 1.56742,
1.56784 , 1.56825 , 1.56867 , 1.56909 , 1.56951,
1.56993 , 1.57035 , 1.57076 , 1.57118 , 1.5716 ,
1.57202 , 1.57244 , 1.57285 , 1.57327 , 1.57369,
1.57411 , 1.57453 , 1.57495 , 1.57536 , 1.57578,
1.5762 , 1.57662 , 1.57704 , 1.57746 , 1.57787,
1.57829 , 1.57871 , 1.57913 , 1.57955 , 1.57996,
1.58038 , 1.5808 , 1.58122 , 1.58164 , 1.58206,
1.58247 , 1.58289 , 1.58331 , 1.58373 , 1.58415,
1.58457 , 1.58498 , 1.5854 , 1.58582 , 1.58624,
1.58666 , 1.58707 , 1.58749 , 1.58791 , 1.58833,
1.58875 , 1.58917 , 1.58958 , 1.59 , 1.59042,
1.59084 , 1.59126 , 1.59168 , 1.59209 , 1.59251,
1.59293 , 1.59335 , 1.59377 , 1.59418 , 1.5946 ,
1.59502 , 1.59544 , 1.59586 , 1.59628 , 1.59669,
1.59711 , 1.59753 , 1.59795 , 1.59837 , 1.59879,
1.5992 , 1.59962 , 1.60004 , 1.60046 , 1.60088,
1.60129 , 1.60171 , 1.60213 , 1.60255 , 1.60297,
1.60339 , 1.6038 , 1.60422 , 1.60464 , 1.60506,
1.60548 , 1.6059 , 1.60631 , 1.60673 , 1.60715,
1.60757 , 1.60799 , 1.6084 , 1.60882 , 1.60924,
1.60966 , 1.61008 , 1.6105 , 1.61091 , 1.61133,
1.61175 , 1.61217 , 1.61259 , 1.61301 , 1.61342,
1.61384 , 1.61426 , 1.61468 , 1.6151 , 1.61551,
1.61593 , 1.61635 , 1.61677 , 1.61719 , 1.61761,
1.61802 , 1.61844 , 1.61886 , 1.61928 , 1.6197 ,
1.62012 , 1.62053 , 1.62095 , 1.62137 , 1.62179,
1.62221 , 1.62262 , 1.62304 , 1.62346 , 1.62388,
1.6243 , 1.62472 , 1.62513 , 1.62555 , 1.62597,
1.62639 , 1.62681 , 1.62723 , 1.62764 , 1.62806,
1.62848 , 1.6289 , 1.62932 , 1.62973 , 1.63015,
1.63057 , 1.63099 , 1.63141 , 1.63183 , 1.63224,
1.63266 , 1.63308 , 1.6335 , 1.63392 , 1.63434,
1.63475 , 1.63517 , 1.63559 , 1.63601 , 1.63643,
1.63684 , 1.63726 , 1.63768 , 1.6381 , 1.63852,
1.63894 , 1.63935 , 1.63977 , 1.64019 , 1.64061,
1.64103 , 1.64145 , 1.64186 , 1.64228 , 1.6427 ,
1.64312 , 1.64354 , 1.64395 , 1.64437 , 1.64479,
1.64521 , 1.64563 , 1.64605 , 1.64646 , 1.64688,
1.6473 , 1.64772 , 1.64814 , 1.64856 , 1.64897,
1.64939 , 1.64981 , 1.65023 , 1.65065 , 1.65106,
1.65148 , 1.6519 , 1.65232 , 1.65274 , 1.65316,
1.65357 , 1.65399 , 1.65441 , 1.65483 , 1.65525,
1.65567 , 1.65608 , 1.6565 , 1.65692 , 1.65734,
1.65776 , 1.65817 , 1.65859 , 1.65901 , 1.65943,
1.65985 , 1.66027 , 1.66068 , 1.6611 , 1.66152,
1.66194 , 1.66236 , 1.66278 , 1.66319 , 1.66361,
1.66403 , 1.66445 , 1.66487 , 1.66528 , 1.6657 ,
1.66612 , 1.66654 , 1.66696 , 1.66738 , 1.66779,
1.66821 , 1.66863 , 1.66905 , 1.66947 , 1.66989,
1.6703 , 1.67072 , 1.67114 , 1.67156 , 1.67198,
1.67239 , 1.67281 , 1.67323 , 1.67365 , 1.67407,
1.67449 , 1.6749 , 1.67532 , 1.67574 , 1.67616,
1.67658 , 1.677 , 1.67741 , 1.67783 , 1.67825,
1.67867 , 1.67909 , 1.6795 , 1.67992 , 1.68034,
1.68076 , 1.68118 , 1.6816 , 1.68201 , 1.68243,
1.68285 , 1.68327 , 1.68369 , 1.68411 , 1.68452,
1.68494 , 1.68536 , 1.68578 , 1.6862 , 1.68661,
1.68703 , 1.68745 , 1.68787 , 1.68829 , 1.68871,
1.68912 , 1.68954 , 1.68996 , 1.69038 , 1.6908 ,
1.69122 , 1.69163 , 1.69205 , 1.69247 , 1.69289,
1.69331 , 1.69372 , 1.69414 , 1.69456 , 1.69498,
1.6954 , 1.69582 , 1.69623 , 1.69665 , 1.69707,
1.69749 , 1.69791 , 1.69833 , 1.69874 , 1.69916,
1.69958 , 1.7 , 1.70042 , 1.70083 , 1.70125,
1.70167 , 1.70209 , 1.70251 , 1.70293 , 1.70334,
1.70376 , 1.70418 , 1.7046 , 1.70502 , 1.70544,
1.70585 , 1.70627 , 1.70669 , 1.70711 , 1.70753,
1.70794 , 1.70836 , 1.70878 , 1.7092 , 1.70962,
1.71004 , 1.71045 , 1.71087 , 1.71129 , 1.71171,
1.71213 , 1.71255 , 1.71296 , 1.71338 , 1.7138 ,
1.71422 , 1.71464 , 1.71505 , 1.71547 , 1.71589,
1.71631 , 1.71673 , 1.71715 , 1.71756 , 1.71798,
1.7184 , 1.71882 , 1.71924 , 1.71966 , 1.72007,
1.72049 , 1.72091 , 1.72133 , 1.72175 , 1.72216,
1.72258 , 1.723 , 1.72342 , 1.72384 , 1.72426,
1.72467 , 1.72509 , 1.72551 , 1.72593 , 1.72635,
1.72677 , 1.72718 , 1.7276 , 1.72802 , 1.72844,
1.72886 , 1.72927 , 1.72969 , 1.73011 , 1.73053,
1.73095 , 1.73137 , 1.73178 , 1.7322 , 1.73262,
1.73304 , 1.73346 , 1.73388 , 1.73429 , 1.73471,
1.73513 , 1.73555 , 1.73597 , 1.73638 , 1.7368 ,
1.73722 , 1.73764 , 1.73806 , 1.73848 , 1.73889,
1.73931 , 1.73973 , 1.74015 , 1.74057 , 1.74099,
1.7414 , 1.74182 , 1.74224 , 1.74266 , 1.74308,
1.74349 , 1.74391 , 1.74433 , 1.74475 , 1.74517,
1.74559 , 1.746 , 1.74642 , 1.74684 , 1.74726,
1.74768 , 1.7481 , 1.74851 , 1.74893 , 1.74935,
1.74977 , 1.75019 , 1.7506 , 1.75102 , 1.75144,
1.75186 , 1.75228 , 1.7527 , 1.75311 , 1.75353,
1.75395 , 1.75437 , 1.75479 , 1.75521 , 1.75562,
1.75604 , 1.75646 , 1.75688 , 1.7573 , 1.75771,
1.75813 , 1.75855 , 1.75897 , 1.75939 , 1.75981,
1.76022 , 1.76064 , 1.76106 , 1.76148 , 1.7619 ,
1.76232 , 1.76273 , 1.76315 , 1.76357 , 1.76399,
1.76441 , 1.76482 , 1.76524 , 1.76566 , 1.76608,
1.7665 , 1.76692 , 1.76733 , 1.76775 , 1.76817,
1.76859 , 1.76901 , 1.76943 , 1.76984 , 1.77026,
1.77068 , 1.7711 , 1.77152 , 1.77193 , 1.77235,
1.77277 , 1.77319 , 1.77361 , 1.77403 , 1.77444,
1.77486 , 1.77528 , 1.7757 , 1.77612 , 1.77654,
1.77695 , 1.77737 , 1.77779 , 1.77821 , 1.77863,
1.77904 , 1.77946 , 1.77988 , 1.7803 , 1.78072,
1.78114 , 1.78155 , 1.78197 , 1.78239 , 1.78281,
1.78323 , 1.78365 , 1.78406 , 1.78448 , 1.7849 ,
1.78532 , 1.78574 , 1.78615 , 1.78657 , 1.78699,
1.78741 , 1.78783 , 1.78825 , 1.78866 , 1.78908,
1.7895 , 1.78992 , 1.79034 , 1.79076 , 1.79117,
1.79159 , 1.79201 , 1.79243 , 1.79285 , 1.79326,
1.79368 , 1.7941 , 1.79452 , 1.79494 , 1.79536,
1.79577 , 1.79619 , 1.79661 , 1.79703 , 1.79745,
1.79787 , 1.79828 , 1.7987 , 1.79912 , 1.79954,
1.79996 , 1.80037 , 1.80079 , 1.80121 , 1.80163,
1.80205 , 1.80247 , 1.80288 , 1.8033 , 1.80372,
1.80414 , 1.80456 , 1.80498 , 1.80539 , 1.80581,
1.80623 , 1.80665 , 1.80707 , 1.80748 , 1.8079 ,
1.80832 , 1.80874 , 1.80916 , 1.80958 , 1.80999,
1.81041 , 1.81083 , 1.81125 , 1.81167 , 1.81209,
1.8125 , 1.81292 , 1.81334 , 1.81376 , 1.81418,
1.81459 , 1.81501 , 1.81543 , 1.81585 , 1.81627,
1.81669 , 1.8171 , 1.81752 , 1.81794 , 1.81836,
1.81878 , 1.8192 , 1.81961 , 1.82003 , 1.82045,
1.82087 , 1.82129 , 1.8217 , 1.82212 , 1.82254,
1.82296 , 1.82338 , 1.8238 , 1.82421 , 1.82463,
1.82505 , 1.82547 , 1.82589 , 1.82631 , 1.82672,
1.82714 , 1.82756 , 1.82798 , 1.8284 , 1.82881,
1.82923 , 1.82965 , 1.83007 , 1.83049 , 1.83091,
1.83132 , 1.83174 , 1.83216 , 1.83258 , 1.833 ,
1.83342 , 1.83383 , 1.83425 , 1.83467 , 1.83509,
1.83551 , 1.83592 , 1.83634 , 1.83676 , 1.83718,
1.8376 , 1.83802 , 1.83843 , 1.83885 , 1.83927,
1.83969 , 1.84011 , 1.84053 , 1.84094 , 1.84136,
1.84178 , 1.8422 , 1.84262 , 1.84303 , 1.84345,
1.84387 , 1.84429 , 1.84471 , 1.84513 , 1.84554,
1.84596 , 1.84638 , 1.8468 , 1.84722 , 1.84764,
1.84805 , 1.84847 , 1.84889 , 1.84931 , 1.84973,
1.85014 , 1.85056 , 1.85098 , 1.8514 , 1.85182,
1.85224 , 1.85265 , 1.85307 , 1.85349 , 1.85391,
1.85433 , 1.85475 , 1.85516 , 1.85558 , 1.856 ,
1.85652 , 1.85704 , 1.85756 , 1.85808 , 1.8586 ,
1.85912 , 1.85964 , 1.86016 , 1.86068 , 1.8612 ,
1.86172 , 1.86224 , 1.86276 , 1.86328 , 1.8638 ,
1.86433 , 1.86485 , 1.86537 , 1.86589 , 1.86641,
1.86693 , 1.86745 , 1.86797 , 1.86849 , 1.86901,
1.86953 , 1.87005 , 1.87057 , 1.87109 , 1.87161,
1.87213 , 1.87265 , 1.87317 , 1.87369 , 1.87421,
1.87473 , 1.87525 , 1.87577 , 1.87629 , 1.87681,
1.87733 , 1.87785 , 1.87837 , 1.87889 , 1.87941,
1.87994 , 1.88046 , 1.88098};
G4GMocrenFileCTtoDensityMap::G4GMocrenFileCTtoDensityMap()
: kDensity(NULL) {
kCTMinMax[0] = -1024;
kCTMinMax[1] = 2048;
kSize = kCTMinMax[1] - kCTMinMax[0] + 1;
kDensity = new G4double[kSize];
for(int i = 0; i < kSize; i++) {
kDensity[i] = GMocrenFileCTDensMap[i];
}
}
G4GMocrenFileCTtoDensityMap::~G4GMocrenFileCTtoDensityMap() {
if(kDensity != NULL) delete [] kDensity;
}
G4double G4GMocrenFileCTtoDensityMap::GetDensity(G4int & _ct) const {
G4double dens = 0.;
if(_ct < kCTMinMax[0])
dens = kDensity[0];
else if(_ct > kCTMinMax[1])
dens = kDensity[kSize-1];
else
dens = kDensity[_ct - kCTMinMax[0]];
return dens;
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,168 @@
//
// ********************************************************************
// * 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: G4GMocrenFileViewer.cc,v 1.2 2009/10/12 10:04:35 akimura Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// Created: Mar. 31, 2009 Akinori Kimura
//
#define __G_ANSI_C__
#define G4GMocrenFile_STRUCTURE_PRIORITY 1.
#include "G4ios.hh"
#include <cstdio>
#include <cstring>
#include <cassert>
#include "G4Scene.hh"
#include "G4Vector3D.hh"
#include "G4VisExtent.hh"
#include "G4LogicalVolume.hh"
#include "G4VSolid.hh"
#include "G4GMocrenFile.hh"
#include "G4GMocrenFileSceneHandler.hh"
#include "G4GMocrenFileViewer.hh"
#include "G4GMocrenMessenger.hh"
//----- constants
//-- for a debugging
const bool GFDEBUG = false;
//----- G4GMocrenFileViewer, constructor
G4GMocrenFileViewer::G4GMocrenFileViewer (G4GMocrenFileSceneHandler& sceneHandler,
G4GMocrenMessenger & messenger,
const G4String& name)
: G4VViewer (sceneHandler, sceneHandler.IncrementViewCount (), name),
kSceneHandler (sceneHandler),
kMessenger(messenger)
{
// Set a g4.gdd-file viewer
std::strcpy( kG4GddViewer, "gMocren" );
if( getenv( "G4GMocrenFile_VIEWER" ) != NULL ) {
std::strcpy( kG4GddViewer, getenv( "G4GMocrenFile_VIEWER" ) ) ;
}
// string for viewer invocation
if ( !std::strcmp( kG4GddViewer, "NONE" ) ) {
std::strcpy( kG4GddViewerInvocation, "" );
} else {
std::strcpy( kG4GddViewerInvocation, kG4GddViewer );
std::strcat( kG4GddViewerInvocation, " ");
std::strcat( kG4GddViewerInvocation, kSceneHandler.GetGddFileName() );
}
}
//----- G4GMocrenFileViewer, destructor
G4GMocrenFileViewer::~G4GMocrenFileViewer ()
{}
//----- G4GMocrenFileViewer::SetView ()
void G4GMocrenFileViewer::SetView ()
{
if(GFDEBUG)
G4cerr << "***** G4GMocrenFileViewer::SetView(): No effects" << G4endl;
// Do nothing, since DAWN is running as a different process.
// SendViewParameters () will do this job instead.
}
//----- G4GMocrenFileViewer::ClearView()
void
G4GMocrenFileViewer::ClearView( void )
{
if(GFDEBUG)
G4cerr << "***** G4GMocrenFileViewer::ClearView (): No effects " << G4endl;
if(kSceneHandler.kGddDest) {
kSceneHandler.kGddDest.close();
// Re-open with same filename...
kSceneHandler.kGddDest.open(kSceneHandler.kGddFileName);
kSceneHandler.kFlagInModeling = false;
kSceneHandler.GFBeginModeling();
}
}
//----- G4GMocrenFileViewer::DrawView ()
void G4GMocrenFileViewer::DrawView ()
{
if(GFDEBUG)
G4cerr << "***** G4GMocrenFileViewer::DrawView () " << G4endl;
//-----
kSceneHandler.GFBeginModeling() ;
//----- Always visit G4 kernel
NeedKernelVisit ();
//----- Draw
G4VViewer::ProcessView () ;
} // G4GMocrenFileViewer::DrawView ()
//----- G4GMocrenFileViewer::ShowView()
void G4GMocrenFileViewer::ShowView( void )
{
if(GFDEBUG)
G4cerr << "***** G4GMocrenFileViewer::ShowView () " << G4endl;
if( kSceneHandler.GFIsInModeling() )
{
//----- End of modeling
// !EndModeling, !DrawAll, !CloseDevice,
// close g4.gdd
kSceneHandler.GFEndModeling();
//----- Output DAWN GUI file
//SendViewParameters();
//----- string for viewer invocation
if ( !strcmp( kG4GddViewer, "NONE" ) ) {
std::strcpy( kG4GddViewerInvocation, "" );
} else {
std::strcpy( kG4GddViewerInvocation, kG4GddViewer );
std::strcat( kG4GddViewerInvocation, " ");
std::strcat( kG4GddViewerInvocation, kSceneHandler.GetGddFileName() );
}
}
} // G4GMocrenFileViewer::ShowView()
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,303 @@
//
// ********************************************************************
// * 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: G4GMocrenMessenger.cc,v 1.2 2009/10/12 10:04:35 akimura Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// Created: Mar. 31, 2009 Akinori Kimura
//
#include "G4GMocrenMessenger.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithABool.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithoutParameter.hh"
#include "G4UIcommand.hh"
#include "G4Tokenizer.hh"
G4GMocrenMessenger::G4GMocrenMessenger()
: suffix (""), geometry(true), solids(true), invisibles(true),
kgMocrenVolumeName("gMocrenVolume"),
kgMocrenScoringMeshName("gMocrenScoringMesh"),
kDrawVolumeGrid(false) {
kgMocrenDirectory = new G4UIdirectory("/vis/gMocren/");
kgMocrenDirectory->SetGuidance("gMocren commands.");
setEventNumberSuffixCommand = new G4UIcmdWithAString("/vis/gMocren/setEventNumberSuffix", this);
setEventNumberSuffixCommand->SetGuidance("Write separate event files, appended with given suffix.");
setEventNumberSuffixCommand->SetGuidance("Define the suffix with a pattern such as '-0000'.");
setEventNumberSuffixCommand->SetParameterName("suffix",false);
setEventNumberSuffixCommand->SetDefaultValue("");
setEventNumberSuffixCommand->AvailableForStates(G4State_Idle);
appendGeometryCommand = new G4UIcmdWithABool("/vis/gMocren/appendGeometry", this);
appendGeometryCommand->SetGuidance("Appends copy of geometry to every event.");
appendGeometryCommand->SetParameterName("flag",false);
appendGeometryCommand->SetDefaultValue(true);
appendGeometryCommand->AvailableForStates(G4State_Idle);
addPointAttributesCommand = new G4UIcmdWithABool("/vis/gMocren/addPointAttributes", this);
addPointAttributesCommand->SetGuidance("Adds point attributes to the points of trajectories.");
addPointAttributesCommand->SetParameterName("flag",false);
addPointAttributesCommand->SetDefaultValue(false);
addPointAttributesCommand->AvailableForStates(G4State_Idle);
useSolidsCommand = new G4UIcmdWithABool("/vis/gMocren/useSolids", this);
useSolidsCommand->SetGuidance("Use GMocren Solids, rather than Geant4 Primitives.");
useSolidsCommand->SetParameterName("flag",false);
useSolidsCommand->SetDefaultValue(true);
useSolidsCommand->AvailableForStates(G4State_Idle);
/* Not Enabled Yet
writeInvisiblesCommand = new G4UIcmdWithABool("/vis/gMocren/writeInvisibles", this);
writeInvisiblesCommand->SetGuidance("Write invisible objects.");
writeInvisiblesCommand->SetParameterName("flag",false);
writeInvisiblesCommand->SetDefaultValue(true);
writeInvisiblesCommand->AvailableForStates(G4State_Idle);
*/
kSetgMocrenVolumeNameCommand = new G4UIcmdWithAString("/vis/gMocren/setVolumeName", this);
kSetgMocrenVolumeNameCommand->SetGuidance("detector name for a volume data in gMocren data.");
kSetgMocrenVolumeNameCommand->SetParameterName("kgMocrenVolumeName",false);
kSetgMocrenVolumeNameCommand->SetDefaultValue("gMocrenVolume");
kSetgMocrenVolumeNameCommand->AvailableForStates(G4State_Idle);
kAddgMocrenHitNameCommand = new G4UIcmdWithAString("/vis/gMocren/addHitName", this);
kAddgMocrenHitNameCommand->SetGuidance("hit name for a dose distribution in gMocren data.");
kAddgMocrenHitNameCommand->SetParameterName("kgMocrenHitName",false);
kAddgMocrenHitNameCommand->AvailableForStates(G4State_Idle);
kResetgMocrenHitNameCommand = new G4UIcmdWithoutParameter("/vis/gMocren/resetHitNames", this);
kResetgMocrenHitNameCommand->SetGuidance("reset all hit names.");
kResetgMocrenHitNameCommand->AvailableForStates(G4State_Idle);
kSetgMocrenScoringMeshNameCommand = new G4UIcmdWithAString("/vis/gMocren/setScoringMeshName", this);
kSetgMocrenScoringMeshNameCommand->SetGuidance("scoring mesh name for a dose distribution in gMocren data.");
kSetgMocrenScoringMeshNameCommand->SetParameterName("kgMocrenScoringMeshName",false);
kSetgMocrenScoringMeshNameCommand->SetDefaultValue("gMocrenScoringMesh");
kSetgMocrenScoringMeshNameCommand->AvailableForStates(G4State_Idle);
kAddgMocrenHitScorerNameCommand = new G4UIcmdWithAString("/vis/gMocren/addHitScorerName", this);
kAddgMocrenHitScorerNameCommand->SetGuidance("hit scorer name for a dose distribution in gMocren data.");
kAddgMocrenHitScorerNameCommand->SetParameterName("kgMocrenHitScorerNames",false);
kAddgMocrenHitScorerNameCommand->AvailableForStates(G4State_Idle);
kResetgMocrenHitScorerNameCommand = new G4UIcmdWithoutParameter("/vis/gMocren/resetHitScorerName", this);
kResetgMocrenHitScorerNameCommand->SetGuidance("reset all hit scorer names.");
kResetgMocrenHitScorerNameCommand->AvailableForStates(G4State_Idle);
kSetgMocrenNoVoxelsCommand = new G4UIcommand("/vis/gMocren/setNumberOfVoxels", this);
kSetgMocrenNoVoxelsCommand->SetGuidance("set number of voxels.");
kSetgMocrenNoVoxelsCommand->AvailableForStates(G4State_Idle);
G4UIparameter * param = new G4UIparameter("nX", 'i', false);
param->SetDefaultValue("1");
param->SetParameterRange("nX>0");
kSetgMocrenNoVoxelsCommand->SetParameter(param);
param = new G4UIparameter("nY", 'i', false);
param->SetDefaultValue("1");
param->SetParameterRange("nY>0");
kSetgMocrenNoVoxelsCommand->SetParameter(param);
param = new G4UIparameter("nZ", 'i', false);
param->SetDefaultValue("1");
param->SetParameterRange("nZ>0");
kSetgMocrenNoVoxelsCommand->SetParameter(param);
kListgMocrenCommand = new G4UIcmdWithoutParameter("/vis/gMocren/list", this);
kListgMocrenCommand->SetGuidance("list gMocren command parameters.");
kListgMocrenCommand->AvailableForStates(G4State_Idle);
kDrawVolumeGridCommand = new G4UIcmdWithABool("/vis/gMocren/drawVolumeGrid", this);
kDrawVolumeGridCommand->SetGuidance("Add grid of the volume.");
kDrawVolumeGridCommand->SetParameterName("kDrawVolumeGrid",false);
kDrawVolumeGridCommand->SetDefaultValue(false);
kDrawVolumeGridCommand->AvailableForStates(G4State_Idle);
}
G4GMocrenMessenger::~G4GMocrenMessenger() {
delete setEventNumberSuffixCommand;
delete appendGeometryCommand;
delete addPointAttributesCommand;
delete useSolidsCommand;
// delete writeInvisiblesCommand;
delete kSetgMocrenVolumeNameCommand;
delete kAddgMocrenHitNameCommand;
delete kResetgMocrenHitNameCommand;
//
delete kSetgMocrenScoringMeshNameCommand;
delete kAddgMocrenHitScorerNameCommand;
delete kResetgMocrenHitScorerNameCommand;
//
delete kSetgMocrenNoVoxelsCommand;
//
delete kgMocrenDirectory;
//
delete kDrawVolumeGridCommand;
}
G4String G4GMocrenMessenger::GetCurrentValue(G4UIcommand * command) {
if (command==setEventNumberSuffixCommand) {
return suffix;
} else if (command==appendGeometryCommand) {
return appendGeometryCommand->ConvertToString(geometry);
} else if (command==addPointAttributesCommand) {
return addPointAttributesCommand->ConvertToString(pointAttributes);
} else if (command==useSolidsCommand) {
return useSolidsCommand->ConvertToString(solids);
// } else if (command==writeInvisiblesCommand) {
// return writeInvisiblesCommand->ConvertToString(invisibles);
} else if (command == kSetgMocrenVolumeNameCommand) {
return kgMocrenVolumeName;
} else if (command == kAddgMocrenHitNameCommand) {
G4String strval;
std::vector<G4String>::iterator itr = kgMocrenHitNames.begin();
for(; itr != kgMocrenHitNames.end(); itr++) {
strval += *itr;
strval += " ";
}
return strval;
} else if (command == kSetgMocrenScoringMeshNameCommand) {
return kgMocrenScoringMeshName;
} else if (command == kAddgMocrenHitScorerNameCommand) {
G4String strval;
std::vector<G4String>::iterator itr = kgMocrenHitScorerNames.begin();
for(; itr != kgMocrenHitNames.end(); itr++) {
strval += *itr;
strval += " ";
}
return strval;
} else if (command==kDrawVolumeGridCommand) {
return kDrawVolumeGridCommand->ConvertToString(kDrawVolumeGrid);
} else {
return "";
}
}
void G4GMocrenMessenger::SetNewValue(G4UIcommand * command, G4String newValue) {
if (command==setEventNumberSuffixCommand) {
suffix = newValue;
} else if (command==appendGeometryCommand) {
geometry = appendGeometryCommand->GetNewBoolValue(newValue);
} else if (command==addPointAttributesCommand) {
pointAttributes = addPointAttributesCommand->GetNewBoolValue(newValue);
} else if (command==useSolidsCommand) {
solids = useSolidsCommand->GetNewBoolValue(newValue);
// } else if (command==writeInvisiblesCommand) {
// invisibles = writeInvisiblesCommand->GetNewBoolValue(newValue);
} else if (command == kSetgMocrenVolumeNameCommand) {
kgMocrenVolumeName = newValue;
} else if (command == kAddgMocrenHitNameCommand) {
kgMocrenHitNames.push_back(newValue);
} else if (command == kResetgMocrenHitNameCommand) {
kgMocrenHitNames.clear();
} else if (command == kSetgMocrenScoringMeshNameCommand) {
kgMocrenScoringMeshName = newValue;
} else if (command == kAddgMocrenHitScorerNameCommand) {
kgMocrenHitScorerNames.push_back(newValue);
} else if (command == kResetgMocrenHitScorerNameCommand) {
kgMocrenHitScorerNames.clear();
} else if (command == kListgMocrenCommand) {
list();
} else if (command == kSetgMocrenNoVoxelsCommand) {
G4Tokenizer next(newValue);
for(int i = 0; i < 3; i++) {
kgMocrenNoVoxels[i] = StoI(next());
}
} else if (command==kDrawVolumeGridCommand) {
kDrawVolumeGrid = kDrawVolumeGridCommand->GetNewBoolValue(newValue);
}
}
G4String G4GMocrenMessenger::getEventNumberSuffix() {
return suffix;
}
G4bool G4GMocrenMessenger::appendGeometry() {
return geometry;
}
G4bool G4GMocrenMessenger::addPointAttributes() {
return pointAttributes;
}
G4bool G4GMocrenMessenger::useSolids() {
return solids;
}
G4bool G4GMocrenMessenger::writeInvisibles() {
return invisibles;
}
G4String G4GMocrenMessenger::getVolumeName() {
return kgMocrenVolumeName;
}
std::vector<G4String> G4GMocrenMessenger::getHitNames() {
return kgMocrenHitNames;
}
G4String G4GMocrenMessenger::getScoringMeshName() {
return kgMocrenScoringMeshName;
}
std::vector<G4String> G4GMocrenMessenger::getHitScorerNames() {
return kgMocrenHitScorerNames;
}
void G4GMocrenMessenger::list() {
G4cout << " Current valuess of gMocren command parameters:" << G4endl;
//
G4cout << " volume name: " << kgMocrenVolumeName << G4endl;
//
G4cout << " hit names: ";
if(kgMocrenHitNames.size() > 0) {
std::vector<G4String>::iterator itr = kgMocrenHitNames.begin();
for(; itr != kgMocrenHitNames.end(); itr++)
G4cout << *itr << " " << G4endl;
} else {
G4cout << G4endl;
}
//
G4cout << " scoring mesh name: " << kgMocrenScoringMeshName << G4endl;
//
G4cout << " scorer names: ";
if(kgMocrenHitScorerNames.size() > 0) {
std::vector<G4String>::iterator itr = kgMocrenHitScorerNames.begin();
for(; itr != kgMocrenHitScorerNames.end(); itr++)
G4cout << *itr << " " << G4endl;
} else {
G4cout << G4endl;
}
G4cout << G4endl;
}
void G4GMocrenMessenger::getNoVoxels(G4int & nx, G4int & ny, G4int & nz) const {
nx = kgMocrenNoVoxels[0];
ny = kgMocrenNoVoxels[1];
nz = kgMocrenNoVoxels[2];
}