Import Geant4 9.6.0 source tree
This commit is contained in:
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DefaultLinearColorMap.hh,v 1.1 2007-11-04 04:06:08 asaim Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#ifndef G4DefaultLinearColorMap_h
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoreLogColorMap.hh,v 1.3 2010-07-23 06:25:30 akimura Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#ifndef G4ScoreLogColorMap_h
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoreQuantityMessenger.hh,v 1.5 2010-07-22 22:14:40 taso Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// (HISTORY)
|
||||
// 03-Sep-2007 T.Aso Command definitions are introduced.
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringBox.hh,v 1.21 2010-07-22 02:04:39 akimura Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#ifndef G4ScoringBox_h
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringCylinder.hh,v 1.6 2010-07-25 11:05:03 akimura Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#ifndef G4ScoringCylinder_h
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringManager.hh,v 1.23 2007-11-14 20:41:17 asaim Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#ifndef G4ScoringManager_h
|
||||
@@ -83,14 +82,19 @@ class G4ScoringManager
|
||||
|
||||
public:
|
||||
void Accumulate(G4VHitsCollection* map);
|
||||
G4VScoringMesh* FindMesh(G4String);
|
||||
G4VScoringMesh* FindMesh(const G4String&);
|
||||
void List() const;
|
||||
void Dump() const;
|
||||
void DrawMesh(G4String meshName,G4String psName,G4String colorMapName,G4int axflg=111);
|
||||
void DrawMesh(G4String meshName,G4String psName,G4int idxPlane,G4int iColumn,G4String colorMapName);
|
||||
void DumpQuantityToFile(G4String meshName, G4String psName,G4String fileName, G4String option = "");
|
||||
void DumpAllQuantitiesToFile(G4String meshName, G4String fileName, G4String option = "");
|
||||
G4VScoreColorMap* GetScoreColorMap(G4String mapName);
|
||||
void DrawMesh(const G4String& meshName, const G4String& psName,
|
||||
const G4String& colorMapName, G4int axflg=111);
|
||||
void DrawMesh(const G4String& meshName, const G4String& psName,
|
||||
G4int idxPlane, G4int iColumn, const G4String& colorMapName);
|
||||
void DumpQuantityToFile(const G4String& meshName, const G4String& psName,
|
||||
const G4String& fileName, const G4String& option = "");
|
||||
void DumpAllQuantitiesToFile(const G4String& meshName,
|
||||
const G4String& fileName,
|
||||
const G4String& option = "");
|
||||
G4VScoreColorMap* GetScoreColorMap(const G4String& mapName);
|
||||
void ListScoreColorMaps();
|
||||
|
||||
private:
|
||||
@@ -108,8 +112,8 @@ class G4ScoringManager
|
||||
ColorMapDict * fColorMapDict;
|
||||
|
||||
public:
|
||||
inline void SetCurrentMesh(G4VScoringMesh* cm)
|
||||
{ fCurrentMesh = cm; }
|
||||
inline void SetCurrentMesh(G4VScoringMesh* scm)
|
||||
{ fCurrentMesh = scm; }
|
||||
inline G4VScoringMesh* GetCurrentMesh() const
|
||||
{ return fCurrentMesh; }
|
||||
inline void CloseCurrentMesh()
|
||||
@@ -126,11 +130,11 @@ class G4ScoringManager
|
||||
{ return verboseLevel; }
|
||||
inline size_t GetNumberOfMesh() const
|
||||
{ return fMeshVec.size(); }
|
||||
inline void RegisterScoringMesh(G4VScoringMesh * sm)
|
||||
inline void RegisterScoringMesh(G4VScoringMesh * scm)
|
||||
{
|
||||
sm->SetVerboseLevel(verboseLevel);
|
||||
fMeshVec.push_back(sm);
|
||||
SetCurrentMesh(sm);
|
||||
scm->SetVerboseLevel(verboseLevel);
|
||||
fMeshVec.push_back(scm);
|
||||
SetCurrentMesh(scm);
|
||||
}
|
||||
inline G4VScoringMesh* GetMesh(G4int i) const
|
||||
{ return fMeshVec[i]; }
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringMessenger.hh,v 1.22 2008-02-29 12:23:14 akimura Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// (HISTORY)
|
||||
// 03-Sep-2007 T.Aso Command definitions are introduced.
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VScoreColorMap.hh,v 1.7 2010-07-23 06:25:30 akimura Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#ifndef G4VScoreColorMap_h
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VScoreWriter.hh,v 1.2 2007-11-06 09:41:34 akimura Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#ifndef G4VScoreWriter_h
|
||||
@@ -47,9 +46,12 @@ public:
|
||||
|
||||
public:
|
||||
// store a quantity into a file
|
||||
virtual void DumpQuantityToFile(G4String & psName, G4String & fileName, G4String & option);
|
||||
virtual void DumpQuantityToFile(const G4String& psName,
|
||||
const G4String& fileName,
|
||||
const G4String& option);
|
||||
// store all quantities into a file
|
||||
virtual void DumpAllQuantitiesToFile(G4String & fileName, G4String & option);
|
||||
virtual void DumpAllQuantitiesToFile(const G4String& fileName,
|
||||
const G4String& option);
|
||||
|
||||
// set a socring mesh to retrieve its quantities
|
||||
void SetScoringMesh(G4VScoringMesh * sm);
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VScoringMesh.hh,v 1.41 2010-11-09 00:29:55 asaim Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#ifndef G4VScoringMesh_h
|
||||
@@ -53,7 +52,7 @@ typedef std::map<G4String,G4THitsMap<G4double>* > MeshScoreMap;
|
||||
class G4VScoringMesh
|
||||
{
|
||||
public:
|
||||
G4VScoringMesh(G4String wName);
|
||||
G4VScoringMesh(const G4String& wName);
|
||||
virtual ~G4VScoringMesh();
|
||||
|
||||
public: // with description
|
||||
@@ -80,9 +79,9 @@ class G4VScoringMesh
|
||||
// dump information of primitive socrers registered in this mesh
|
||||
void Dump();
|
||||
// draw a projected quantity on a current viewer
|
||||
void DrawMesh(G4String psName,G4VScoreColorMap* colorMap,G4int axflg=111);
|
||||
void DrawMesh(const G4String& psName,G4VScoreColorMap* colorMap,G4int axflg=111);
|
||||
// draw a column of a quantity on a current viewer
|
||||
void DrawMesh(G4String psName,G4int idxPlane,G4int iColumn,G4VScoreColorMap* colorMap);
|
||||
void DrawMesh(const 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
|
||||
@@ -120,24 +119,24 @@ class G4VScoringMesh
|
||||
// register a filter to a current primtive scorer
|
||||
void SetFilter(G4VSDFilter * filter);
|
||||
// set a primitive scorer to the current one by the name
|
||||
void SetCurrentPrimitiveScorer(G4String & name);
|
||||
void SetCurrentPrimitiveScorer(const G4String & name);
|
||||
// find registered primitive scorer by the name
|
||||
G4bool FindPrimitiveScorer(G4String & psname);
|
||||
G4bool FindPrimitiveScorer(const G4String & psname);
|
||||
// get whether current primitive scorer is set or not
|
||||
G4bool IsCurrentPrimitiveScorerNull() {
|
||||
if(fCurrentPS == NULL) return true;
|
||||
else return false;
|
||||
}
|
||||
// get unit of primitive scorer by the name
|
||||
G4String GetPSUnit(G4String & psname);
|
||||
G4String GetPSUnit(const 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);
|
||||
G4double GetPSUnitValue(const G4String & psname);
|
||||
// set PS name to be drawn
|
||||
void SetDrawPSName(G4String & psname) {fDrawPSName = psname;}
|
||||
void SetDrawPSName(const G4String & psname) {fDrawPSName = psname;}
|
||||
|
||||
// get axis names of the hierarchical division in the divided order
|
||||
void GetDivisionAxisNames(G4String divisionAxisNames[3]);
|
||||
@@ -155,7 +154,7 @@ class G4VScoringMesh
|
||||
|
||||
protected:
|
||||
// get registered primitive socrer by the name
|
||||
G4VPrimitiveScorer * GetPrimitiveScorer(G4String & name);
|
||||
G4VPrimitiveScorer * GetPrimitiveScorer(const G4String & name);
|
||||
|
||||
protected:
|
||||
G4String fWorldName;
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DefaultLinearColorMap.cc,v 1.3 2008-08-29 02:50:05 akimura Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "G4DefaultLinearColorMap.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoreLogColorMap.cc,v 1.11 2010-11-14 14:18:36 akimura Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "G4ScoreLogColorMap.hh"
|
||||
|
||||
@@ -24,14 +24,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoreQuantityMessenger.cc,v 1.10 2010-11-03 08:28:42 taso Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
// Modifications
|
||||
// 08-Oct-2010 T.Aso remove unit of G4PSPassageCellCurrent.
|
||||
// 24-Mar-2011 T.Aso Add StepChecker for debugging.
|
||||
// 24-Mar-2011 T.Aso Size and segmentation for replicated cylinder.
|
||||
// 01-Jun-2012 T.Aso Support weighted/dividedByArea options
|
||||
// in flatCurrent and flatFulx commands.
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
#include "G4ScoreQuantityMessenger.hh"
|
||||
@@ -334,13 +335,23 @@ void G4ScoreQuantityMessenger::SetNewValue(G4UIcommand * command,G4String newVal
|
||||
new G4PSFlatSurfaceCurrent3D(token[0],StoI(token[1]));
|
||||
ps->Weighted(StoB(token[2]));
|
||||
ps->DivideByArea(StoB(token[3]));
|
||||
ps->SetUnit(token[4]);
|
||||
if ( StoB(token[3]) ){
|
||||
ps->SetUnit(token[4]);
|
||||
}else{
|
||||
ps->SetUnit("");
|
||||
}
|
||||
mesh->SetPrimitiveScorer(ps);
|
||||
}
|
||||
} else if(command== qFlatSurfFluxCmd){
|
||||
if( CheckMeshPS(mesh, token[0] )) {
|
||||
G4PSFlatSurfaceFlux3D* ps = new G4PSFlatSurfaceFlux3D(token[0],StoI(token[1]));
|
||||
ps->SetUnit(token[2]);
|
||||
ps->Weighted(StoB(token[2]));
|
||||
ps->DivideByArea(StoB(token[3]));
|
||||
if ( StoB(token[3]) ){
|
||||
ps->SetUnit(token[4]);
|
||||
}else{
|
||||
ps->SetUnit("");
|
||||
}
|
||||
mesh->SetPrimitiveScorer(ps);
|
||||
}
|
||||
// } else if(command== qSphereSurfCurrCmd){
|
||||
@@ -349,13 +360,23 @@ void G4ScoreQuantityMessenger::SetNewValue(G4UIcommand * command,G4String newVal
|
||||
// new G4PSSphereSurfaceCurrent3D(token[0],StoI(token[1]));
|
||||
// ps->Weighted(StoB(token[2]));
|
||||
// ps->DivideByArea(StoB(token[3]));
|
||||
// ps->SetUnit(token[4]);
|
||||
// if ( StoB(token[3]) ){
|
||||
// ps->SetUnit(token[4]);
|
||||
// }else{
|
||||
// ps->SetUnit("");
|
||||
// }
|
||||
// mesh->SetPrimitiveScorer(ps);
|
||||
// }
|
||||
// } else if(command== qSphereSurfFluxCmd){
|
||||
// if( CheckMeshPS(mesh,token[0])) {
|
||||
// G4PSSphereSurfaceFlux3D* ps = new G4PSSphereSurfaceFlux3D(token[0], StoI(token[1]));
|
||||
// ps->SetUnit(token[2]);
|
||||
// ps->Weighted(StoB(token[2]));
|
||||
// ps->DivideByArea(StoB(token[3]));
|
||||
// if ( StoB(token[3]) ){
|
||||
// ps->SetUnit(token[4]);
|
||||
// }else{
|
||||
// ps->SetUnit("");
|
||||
// }
|
||||
// mesh->SetPrimitiveScorer(ps);
|
||||
// }
|
||||
// } else if(command== qCylSurfCurrCmd){
|
||||
@@ -364,13 +385,24 @@ void G4ScoreQuantityMessenger::SetNewValue(G4UIcommand * command,G4String newVal
|
||||
// new G4PSCylinderSurfaceCurrent3D(token[0],StoI(token[1]));
|
||||
// ps->Weighted(StoB(token[2]));
|
||||
// ps->DivideByArea(StoB(token[3]));
|
||||
// if ( StoB(token[3]) ){
|
||||
// ps->SetUnit(token[4]);
|
||||
// }else{
|
||||
// ps->SetUnit("");
|
||||
// }
|
||||
// ps->SetUnit(token[4]);
|
||||
// mesh->SetPrimitiveScorer(ps);
|
||||
// }
|
||||
// } else if(command== qCylSurfFluxCmd){
|
||||
// if( CheckMeshPS(mesh, token[0] ) {
|
||||
// G4PSCylinerSurfaceFlux3D* ps =new G4PSCylinderSurfaceFlux3D(token[0], StoI(token[1]));
|
||||
// ps->SetUnit(token[2]);
|
||||
// ps->Weighted(StoB(token[2]));
|
||||
// ps->DivideByArea(StoB(token[3]));
|
||||
// if ( StoB(token[3]) ){
|
||||
// ps->SetUnit(token[4]);
|
||||
// }else{
|
||||
// ps->SetUnit("");
|
||||
// }
|
||||
// mesh->SetPrimitiveScorer(ps);
|
||||
// }
|
||||
} else if(command== qNofCollisionCmd){
|
||||
|
||||
@@ -24,12 +24,13 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoreQuantityMessengerQCmd.cc,v 1.8 2010-11-03 08:29:02 taso Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
// Modifications
|
||||
// 08-Oct-2010 T.Aso remove unit of G4PSPassageCellCurrent.
|
||||
// 01-Jun-2012 T.Aso Support weighted/dividedByArea options
|
||||
// in flatCurrent and flatFulx commands.
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
#include "G4ScoreQuantityMessenger.hh"
|
||||
@@ -265,12 +266,20 @@ void G4ScoreQuantityMessenger::QuantityCommands()
|
||||
qFlatSurfFluxCmd->SetGuidance(" : 0 = Both In and Out");
|
||||
qFlatSurfFluxCmd->SetGuidance(" : 1 = In only");
|
||||
qFlatSurfFluxCmd->SetGuidance(" : 2 = Out only");
|
||||
qFlatSurfFluxCmd->SetGuidance(" wflag :(Bool) weighted");
|
||||
qFlatSurfFluxCmd->SetGuidance(" aflag :(Bool) divide by area");
|
||||
qFlatSurfFluxCmd->SetGuidance(" unit :(String) unit");
|
||||
param = new G4UIparameter("qname",'s',false);
|
||||
qFlatSurfFluxCmd->SetParameter(param);
|
||||
param = new G4UIparameter("dflag",'i',true);
|
||||
param->SetDefaultValue("0");
|
||||
qFlatSurfFluxCmd->SetParameter(param);
|
||||
param = new G4UIparameter("wflag",'b',true);
|
||||
param->SetDefaultValue("true");
|
||||
qFlatSurfFluxCmd->SetParameter(param);
|
||||
param = new G4UIparameter("aflag",'b',true);
|
||||
param->SetDefaultValue("true");
|
||||
qFlatSurfFluxCmd->SetParameter(param);
|
||||
param = new G4UIparameter("unit",'s',true);
|
||||
param->SetDefaultValue("percm2");
|
||||
qFlatSurfFluxCmd->SetParameter(param);
|
||||
@@ -312,12 +321,20 @@ void G4ScoreQuantityMessenger::QuantityCommands()
|
||||
// qSphereSurfFluxCmd->SetGuidance(" : 0 = Both In and Out");
|
||||
// qSphereSurfFluxCmd->SetGuidance(" : 1 = In only");
|
||||
// qSphereSurfFluxCmd->SetGuidance(" : 2 = Out only");
|
||||
// qSphereSurfFluxCmd->SetGuidance(" wflag :(Bool) weighted");
|
||||
// qSphereSurfFluxCmd->SetGuidance(" aflag :(Bool) divide by area");
|
||||
// qSphereSurfFluxCmd->SetGuidance(" unit :(String) unit");
|
||||
// param = new G4UIparameter("qname",'s',false);
|
||||
// qSphereSurfFluxCmd->SetParameter(param);
|
||||
// param = new G4UIparameter("dflag",'i',true);
|
||||
// param->SetDefaultValue("0");
|
||||
// qSphereSurfFluxCmd->SetParameter(param);
|
||||
// param = new G4UIparameter("wflag",'b',true);
|
||||
// param->SetDefaultValue("true");
|
||||
// qSphereSurfFluxCmd->SetParameter(param);
|
||||
// param = new G4UIparameter("aflag",'b',true);
|
||||
// param->SetDefaultValue("true");
|
||||
// qSphereSurfFluxCmd->SetParameter(param);
|
||||
// param = new G4UIparameter("unit",'s',true);
|
||||
// param->SetDefaultValue("percm2");
|
||||
// qSphereSurfFluxCmd->SetParameter(param);
|
||||
@@ -349,7 +366,7 @@ void G4ScoreQuantityMessenger::QuantityCommands()
|
||||
// param = new G4UIparameter("unit",'s',true);
|
||||
// param->SetDefaultValue("percm2");
|
||||
// qCylSurfCurrCmd->SetParameter(param);
|
||||
//
|
||||
//
|
||||
// qCylSurfFluxCmd = new G4UIcommand("/score/quantity/cylinderSurfaceFlux",this);
|
||||
// qCylSurfFluxCmd->SetGuidance("Cylinder surface Flux Scorer.");
|
||||
// qCylSurfFluxCmd->
|
||||
@@ -359,12 +376,20 @@ void G4ScoreQuantityMessenger::QuantityCommands()
|
||||
// qCylSurfFluxCmd->SetGuidance(" : 0 = Both In and Out");
|
||||
// qCylSurfFluxCmd->SetGuidance(" : 1 = In only");
|
||||
// qCylSurfFluxCmd->SetGuidance(" : 2 = Out only");
|
||||
// qCylSurfFluxCmd->SetGuidance(" wflag :(Bool) weighted");
|
||||
// qCylSurfFluxCmd->SetGuidance(" aflag :(Bool) divide by area");
|
||||
// qCylSurfFluxCmd->SetGuidance(" unit :(String) unit");
|
||||
// param = new G4UIparameter("qname",'s',false);
|
||||
// qCylSurfFluxCmd->SetParameter(param);
|
||||
// param = new G4UIparameter("dflag",'i',true);
|
||||
// param->SetDefaultValue("0");
|
||||
// qCylSurfFluxCmd->SetParameter(param);
|
||||
// param = new G4UIparameter("wflag",'b',true);
|
||||
// param->SetDefaultValue("true");
|
||||
// qCylSurfFluxCmd->SetParameter(param);
|
||||
// param = new G4UIparameter("aflag",'b',true);
|
||||
// param->SetDefaultValue("true");
|
||||
// qCylSurfFluxCmd->SetParameter(param);
|
||||
// param = new G4UIparameter("unit",'s',true);
|
||||
// param->SetDefaultValue("percm2");
|
||||
// qCylSurfFluxCmd->SetParameter(param);
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringBox.cc,v 1.61 2010-07-27 01:44:54 akimura Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "G4ScoringBox.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
@@ -24,13 +24,14 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringCylinder.cc,v 1.16 2010-08-30 08:15:20 akimura Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "G4ScoringCylinder.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringManager.cc,v 1.33 2010-09-24 05:51:27 asaim Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "G4ScoringManager.hh"
|
||||
@@ -92,7 +91,7 @@ void G4ScoringManager::Accumulate(G4VHitsCollection* map)
|
||||
sm->Accumulate(static_cast<G4THitsMap<double>*>(map));
|
||||
}
|
||||
|
||||
G4VScoringMesh* G4ScoringManager::FindMesh(G4String wName)
|
||||
G4VScoringMesh* G4ScoringManager::FindMesh(const G4String& wName)
|
||||
{
|
||||
G4VScoringMesh* sm = 0;
|
||||
for(MeshVecItr itr = fMeshVec.begin(); itr != fMeshVec.end(); itr++) {
|
||||
@@ -123,7 +122,9 @@ void G4ScoringManager::Dump() const
|
||||
}
|
||||
}
|
||||
|
||||
void G4ScoringManager::DrawMesh(G4String meshName,G4String psName,G4String colorMapName,G4int axflg)
|
||||
void G4ScoringManager::DrawMesh(const G4String& meshName,
|
||||
const G4String& psName,
|
||||
const G4String& colorMapName, G4int axflg)
|
||||
{
|
||||
G4VScoringMesh* mesh = FindMesh(meshName);
|
||||
if(mesh)
|
||||
@@ -141,7 +142,10 @@ void G4ScoringManager::DrawMesh(G4String meshName,G4String psName,G4String color
|
||||
}
|
||||
}
|
||||
|
||||
void G4ScoringManager::DrawMesh(G4String meshName,G4String psName,G4int idxPlane,G4int iColumn,G4String colorMapName)
|
||||
void G4ScoringManager::DrawMesh(const G4String& meshName,
|
||||
const G4String& psName,
|
||||
G4int idxPlane, G4int iColumn,
|
||||
const G4String& colorMapName)
|
||||
{
|
||||
G4VScoringMesh* mesh = FindMesh(meshName);
|
||||
if(mesh)
|
||||
@@ -159,7 +163,10 @@ void G4ScoringManager::DrawMesh(G4String meshName,G4String psName,G4int idxPlane
|
||||
}
|
||||
}
|
||||
|
||||
void G4ScoringManager::DumpQuantityToFile(G4String meshName,G4String psName,G4String fileName, G4String option)
|
||||
void G4ScoringManager::DumpQuantityToFile(const G4String& meshName,
|
||||
const G4String& psName,
|
||||
const G4String& fileName,
|
||||
const G4String& option)
|
||||
{
|
||||
G4VScoringMesh* mesh = FindMesh(meshName);
|
||||
if(mesh) {
|
||||
@@ -171,7 +178,9 @@ void G4ScoringManager::DumpQuantityToFile(G4String meshName,G4String psName,G4St
|
||||
}
|
||||
}
|
||||
|
||||
void G4ScoringManager::DumpAllQuantitiesToFile(G4String meshName,G4String fileName, G4String option)
|
||||
void G4ScoringManager::DumpAllQuantitiesToFile(const G4String& meshName,
|
||||
const G4String& fileName,
|
||||
const G4String& option)
|
||||
{
|
||||
G4VScoringMesh* mesh = FindMesh(meshName);
|
||||
if(mesh) {
|
||||
@@ -196,7 +205,7 @@ void G4ScoringManager::RegisterScoreColorMap(G4VScoreColorMap* colorMap)
|
||||
}
|
||||
}
|
||||
|
||||
G4VScoreColorMap* G4ScoringManager::GetScoreColorMap(G4String mapName)
|
||||
G4VScoreColorMap* G4ScoringManager::GetScoreColorMap(const G4String& mapName)
|
||||
{
|
||||
ColorMapDictItr mItr = fColorMapDict->find(mapName);
|
||||
if(mItr == fColorMapDict->end()) { return 0; }
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ScoringMessenger.cc,v 1.42 2010-07-26 03:52:33 akimura Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VScoreColorMap.cc,v 1.8 2010-07-26 03:52:33 akimura Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "G4VScoreColorMap.hh"
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VScoreWriter.cc,v 1.10 2010-07-27 01:44:54 akimura Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "G4VScoreWriter.hh"
|
||||
@@ -51,7 +50,9 @@ void G4VScoreWriter::SetScoringMesh(G4VScoringMesh * sm) {
|
||||
fScoringMesh->GetNumberOfSegments(fNMeshSegments);
|
||||
}
|
||||
|
||||
void G4VScoreWriter::DumpQuantityToFile(G4String & psName, G4String & fileName, G4String & option) {
|
||||
void G4VScoreWriter::DumpQuantityToFile(const G4String& psName,
|
||||
const G4String& fileName,
|
||||
const G4String& option) {
|
||||
|
||||
// change the option string into lowercase to the case-insensitive.
|
||||
G4String opt = option;
|
||||
@@ -146,7 +147,8 @@ void G4VScoreWriter::DumpQuantityToFile(G4String & psName, G4String & fileName,
|
||||
|
||||
}
|
||||
|
||||
void G4VScoreWriter::DumpAllQuantitiesToFile(G4String & fileName, G4String & option) {
|
||||
void G4VScoreWriter::DumpAllQuantitiesToFile(const G4String& fileName,
|
||||
const G4String& option) {
|
||||
|
||||
// change the option string into lowercase to the case-insensitive.
|
||||
G4String opt = option;
|
||||
|
||||
@@ -24,18 +24,26 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VScoringMesh.cc,v 1.43 2010-11-09 00:29:55 asaim Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
// Modifications
|
||||
// 17-Apr-2012 T.Aso SetSize() and SetNumberOfSegments() is not allowed
|
||||
// to call twice in same geometrical mesh. Add warning
|
||||
// message to notify.
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
#include "G4VScoringMesh.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4MultiFunctionalDetector.hh"
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4VSDFilter.hh"
|
||||
#include "G4SDManager.hh"
|
||||
|
||||
G4VScoringMesh::G4VScoringMesh(G4String wName)
|
||||
G4VScoringMesh::G4VScoringMesh(const G4String& wName)
|
||||
: fWorldName(wName),fCurrentPS(0),fConstructed(false),fActive(true),
|
||||
fRotationMatrix(0), fMFD(new G4MultiFunctionalDetector(wName)),
|
||||
verboseLevel(0),sizeIsSet(false),nMeshIsSet(false),
|
||||
@@ -62,8 +70,15 @@ void G4VScoringMesh::ResetScore() {
|
||||
}
|
||||
}
|
||||
void G4VScoringMesh::SetSize(G4double size[3]) {
|
||||
for(int i = 0; i < 3; i++) fSize[i] = size[i];
|
||||
sizeIsSet = true;
|
||||
if ( !sizeIsSet ){
|
||||
for(int i = 0; i < 3; i++) fSize[i] = size[i];
|
||||
sizeIsSet = true;
|
||||
}else{
|
||||
G4String message = " The size of scoring mesh can not be changed.";
|
||||
G4Exception("G4VScoringMesh::SetSize()",
|
||||
"DigiHitsUtilsScoreVScoringMesh000", JustWarning,
|
||||
message);
|
||||
}
|
||||
}
|
||||
G4ThreeVector G4VScoringMesh::GetSize() const {
|
||||
if(sizeIsSet)
|
||||
@@ -75,8 +90,15 @@ void G4VScoringMesh::SetCenterPosition(G4double centerPosition[3]) {
|
||||
fCenterPosition = G4ThreeVector(centerPosition[0], centerPosition[1], centerPosition[2]);
|
||||
}
|
||||
void G4VScoringMesh::SetNumberOfSegments(G4int nSegment[3]) {
|
||||
for(int i = 0; i < 3; i++) fNSegment[i] = nSegment[i];
|
||||
nMeshIsSet = true;
|
||||
if ( !nMeshIsSet ){
|
||||
for(int i = 0; i < 3; i++) fNSegment[i] = nSegment[i];
|
||||
nMeshIsSet = true;
|
||||
} else {
|
||||
G4String message = " The size of scoring segments can not be changed.";
|
||||
G4Exception("G4VScoringMesh::SetNumberOfSegments()",
|
||||
"DigiHitsUtilsScoreVScoringMesh000", JustWarning,
|
||||
message);
|
||||
}
|
||||
}
|
||||
void G4VScoringMesh::GetNumberOfSegments(G4int nSegment[3]) {
|
||||
for(int i = 0; i < 3; i++) nSegment[i] = fNSegment[i];
|
||||
@@ -139,7 +161,7 @@ void G4VScoringMesh::SetFilter(G4VSDFilter * filter) {
|
||||
fCurrentPS->SetFilter(filter);
|
||||
}
|
||||
|
||||
void G4VScoringMesh::SetCurrentPrimitiveScorer(G4String & name) {
|
||||
void G4VScoringMesh::SetCurrentPrimitiveScorer(const G4String & name) {
|
||||
fCurrentPS = GetPrimitiveScorer(name);
|
||||
if(fCurrentPS == 0) {
|
||||
G4cerr << "ERROR : G4VScoringMesh::SetCurrentPrimitiveScorer() : The primitive scorer <"
|
||||
@@ -147,13 +169,13 @@ void G4VScoringMesh::SetCurrentPrimitiveScorer(G4String & name) {
|
||||
}
|
||||
}
|
||||
|
||||
G4bool G4VScoringMesh::FindPrimitiveScorer(G4String & psname) {
|
||||
G4bool G4VScoringMesh::FindPrimitiveScorer(const G4String & psname) {
|
||||
std::map<G4String, G4THitsMap<G4double>* >::iterator itr = fMap.find(psname);;
|
||||
if(itr == fMap.end()) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
G4String G4VScoringMesh::GetPSUnit(G4String & psname) {
|
||||
G4String G4VScoringMesh::GetPSUnit(const G4String & psname) {
|
||||
std::map<G4String, G4THitsMap<G4double>* >::iterator itr = fMap.find(psname);;
|
||||
if(itr == fMap.end()) {
|
||||
return G4String("");
|
||||
@@ -184,7 +206,7 @@ void G4VScoringMesh::SetCurrentPSUnit(const G4String& unit){
|
||||
}
|
||||
}
|
||||
|
||||
G4double G4VScoringMesh::GetPSUnitValue(G4String & psname) {
|
||||
G4double G4VScoringMesh::GetPSUnitValue(const G4String & psname) {
|
||||
std::map<G4String, G4THitsMap<G4double>* >::iterator itr = fMap.find(psname);;
|
||||
if(itr == fMap.end()) {
|
||||
return 1.;
|
||||
@@ -197,7 +219,7 @@ void G4VScoringMesh::GetDivisionAxisNames(G4String divisionAxisNames[3]) {
|
||||
for(int i = 0; i < 3; i++) divisionAxisNames[i] = fDivisionAxisNames[i];
|
||||
}
|
||||
|
||||
G4VPrimitiveScorer * G4VScoringMesh::GetPrimitiveScorer(G4String & name) {
|
||||
G4VPrimitiveScorer * G4VScoringMesh::GetPrimitiveScorer(const G4String & name) {
|
||||
if(fMFD == 0) return 0;
|
||||
|
||||
G4int nps = fMFD->GetNumberOfPrimitives();
|
||||
@@ -263,7 +285,7 @@ void G4VScoringMesh::Dump() {
|
||||
}
|
||||
|
||||
|
||||
void G4VScoringMesh::DrawMesh(G4String psName,G4VScoreColorMap* colorMap,G4int axflg)
|
||||
void G4VScoringMesh::DrawMesh(const G4String& psName,G4VScoreColorMap* colorMap,G4int axflg)
|
||||
{
|
||||
fDrawPSName = psName;
|
||||
std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr = fMap.find(psName);
|
||||
@@ -276,7 +298,7 @@ void G4VScoringMesh::DrawMesh(G4String psName,G4VScoreColorMap* colorMap,G4int a
|
||||
}
|
||||
}
|
||||
|
||||
void G4VScoringMesh::DrawMesh(G4String psName,G4int idxPlane,G4int iColumn,G4VScoreColorMap* colorMap)
|
||||
void G4VScoringMesh::DrawMesh(const G4String& psName,G4int idxPlane,G4int iColumn,G4VScoreColorMap* colorMap)
|
||||
{
|
||||
fDrawPSName = psName;
|
||||
std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr = fMap.find(psName);
|
||||
|
||||
Reference in New Issue
Block a user