Changeset 1340 for trunk/source/digits_hits
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- Location:
- trunk/source/digits_hits
- Files:
-
- 120 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/digits_hits/CVS/Entries
r1337 r1340 6 6 /GNUmakefile/1.6/Wed Sep 29 21:47:24 2010//Tgeant4-09-04-beta-01 7 7 /History/1.41/Wed Sep 29 21:47:24 2010//Tgeant4-09-04-beta-01 8 /CMakeLists.txt/1.1/Wed Sep 29 18:37:44 2010// -
trunk/source/digits_hits/detector/CVS/Entries
r1337 r1340 1 1 D/include//// 2 2 D/src//// 3 /GNUmakefile/1.3/Wed Sep 29 21:47:24 2010//Tgeant4-09-04-beta-01 4 /History/1.6/Wed Sep 29 21:47:24 2010//Tgeant4-09-04-beta-01 3 /CMakeLists.txt/1.1/Wed Sep 29 18:37:57 2010// 4 /sources.cmake/1.1/Wed Sep 29 18:38:06 2010// 5 /GNUmakefile/1.5/Fri Nov 5 10:01:04 2010// 6 /History/1.6/Wed Sep 29 21:47:24 2010// -
trunk/source/digits_hits/detector/GNUmakefile
r814 r1340 1 # $Id: GNUmakefile,v 1. 3 2004/06/11 14:10:29gcosmo Exp $1 # $Id: GNUmakefile,v 1.5 2010/10/27 08:10:13 gcosmo Exp $ 2 2 # -------------------------------------------------------------- 3 3 # GNUmakefile for digits+hits library. Makoto Asai, 1/11/96. -
trunk/source/digits_hits/detector/include/CVS/Entries
r1337 r1340 1 /G4CellScoreComposer.hh/1.2/Wed Sep 29 21:47:24 2010// Tgeant4-09-04-beta-012 /G4CellScoreValues.hh/1.2/Wed Sep 29 21:47:24 2010// Tgeant4-09-04-beta-013 /G4CollectionNameVector.hh/1.2/Wed Sep 29 21:47:24 2010// Tgeant4-09-04-beta-014 /G4HCtable.hh/1.3/Wed Sep 29 21:47:25 2010// Tgeant4-09-04-beta-015 /G4MultiFunctionalDetector.hh/1.3/Wed Sep 29 21:47:25 2010// Tgeant4-09-04-beta-016 /G4SDManager.hh/1.4/Wed Sep 29 21:47:25 2010// Tgeant4-09-04-beta-017 /G4SDStructure.hh/1.3/Wed Sep 29 21:47:25 2010// Tgeant4-09-04-beta-018 /G4SDmessenger.hh/1.2/Wed Sep 29 21:47:25 2010// Tgeant4-09-04-beta-019 /G4SensitiveVolumeList.hh/1.2/Wed Sep 29 21:47:25 2010// Tgeant4-09-04-beta-0110 /G4SensitiveVolumeList.icc/1.2/Wed Sep 29 21:47:25 2010// Tgeant4-09-04-beta-0111 /G4TrackLogger.hh/1.2/Wed Sep 29 21:47:25 2010// Tgeant4-09-04-beta-0112 /G4V PrimitiveScorer.hh/1.3/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-0113 /G4V ReadOutGeometry.hh/1.3/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-0114 /G4VS DFilter.hh/1.2/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-0115 /G4V SensitiveDetector.hh/1.4/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-011 /G4CellScoreComposer.hh/1.2/Wed Sep 29 21:47:24 2010// 2 /G4CellScoreValues.hh/1.2/Wed Sep 29 21:47:24 2010// 3 /G4CollectionNameVector.hh/1.2/Wed Sep 29 21:47:24 2010// 4 /G4HCtable.hh/1.3/Wed Sep 29 21:47:25 2010// 5 /G4MultiFunctionalDetector.hh/1.3/Wed Sep 29 21:47:25 2010// 6 /G4SDManager.hh/1.4/Wed Sep 29 21:47:25 2010// 7 /G4SDStructure.hh/1.3/Wed Sep 29 21:47:25 2010// 8 /G4SDmessenger.hh/1.2/Wed Sep 29 21:47:25 2010// 9 /G4SensitiveVolumeList.hh/1.2/Wed Sep 29 21:47:25 2010// 10 /G4SensitiveVolumeList.icc/1.2/Wed Sep 29 21:47:25 2010// 11 /G4TrackLogger.hh/1.2/Wed Sep 29 21:47:25 2010// 12 /G4VReadOutGeometry.hh/1.3/Wed Sep 29 21:47:25 2010// 13 /G4VSDFilter.hh/1.2/Wed Sep 29 21:47:25 2010// 14 /G4VSensitiveDetector.hh/1.4/Wed Sep 29 21:47:25 2010// 15 /G4VPrimitiveScorer.hh/1.6/Fri Nov 5 10:01:08 2010// 16 16 D -
trunk/source/digits_hits/detector/include/G4VPrimitiveScorer.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4VPrimitiveScorer.hh,v 1. 3 2007/08/28 07:51:45 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4VPrimitiveScorer.hh,v 1.6 2010/07/22 07:36:50 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 46 46 // used either as a sensitive detector or to be registered to 47 47 // G4MultiFunctionalDetector to define multiple functionalities. 48 // 49 // 48 50 49 51 class G4VPrimitiveScorer … … 78 80 // These methods are invoked by G4SDManager through G4MultiFunctionalDetector. 79 81 82 virtual void SetUnit(const G4String& unit)=0; 83 G4String GetUnit() const { return unitName;} 84 G4double GetUnitValue() const { return unitValue;} 85 86 protected: 87 void CheckAndSetUnit(const G4String& unit,const G4String& category); 88 80 89 protected: 81 90 G4String primitiveName; … … 84 93 G4int verboseLevel; 85 94 G4int indexDepth; 95 G4String unitName; 96 G4double unitValue; 86 97 87 98 public: // with description -
trunk/source/digits_hits/detector/src/CVS/Entries
r1337 r1340 1 /G4CellScoreComposer.cc/1.3/Wed Sep 29 21:47:29 2010// Tgeant4-09-04-beta-012 /G4HCtable.cc/1.4/Wed Sep 29 21:47:30 2010// Tgeant4-09-04-beta-013 /G4 MultiFunctionalDetector.cc/1.5/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-014 /G4SD Manager.cc/1.4/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-015 /G4SD Structure.cc/1.3/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-016 /G4S Dmessenger.cc/1.2/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-017 /G4 SensitiveVolumeList.cc/1.2/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-018 /G4 TrackLogger.cc/1.3/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-019 /G4V PrimitiveScorer.cc/1.2/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-0110 /G4V ReadOutGeometry.cc/1.2/Wed Sep 29 21:47:36 2010//Tgeant4-09-04-beta-0111 /G4 VSDFilter.cc/1.2/Wed Sep 29 21:47:37 2010//Tgeant4-09-04-beta-0112 /G4V SensitiveDetector.cc/1.3/Wed Sep 29 21:47:37 2010//Tgeant4-09-04-beta-011 /G4CellScoreComposer.cc/1.3/Wed Sep 29 21:47:29 2010// 2 /G4HCtable.cc/1.4/Wed Sep 29 21:47:30 2010// 3 /G4SDManager.cc/1.4/Wed Sep 29 21:47:30 2010// 4 /G4SDStructure.cc/1.3/Wed Sep 29 21:47:30 2010// 5 /G4SDmessenger.cc/1.2/Wed Sep 29 21:47:30 2010// 6 /G4SensitiveVolumeList.cc/1.2/Wed Sep 29 21:47:30 2010// 7 /G4TrackLogger.cc/1.3/Wed Sep 29 21:47:30 2010// 8 /G4VReadOutGeometry.cc/1.2/Wed Sep 29 21:47:36 2010// 9 /G4VSDFilter.cc/1.2/Wed Sep 29 21:47:37 2010// 10 /G4VSensitiveDetector.cc/1.3/Wed Sep 29 21:47:37 2010// 11 /G4MultiFunctionalDetector.cc/1.6/Fri Nov 5 10:01:08 2010// 12 /G4VPrimitiveScorer.cc/1.5/Fri Nov 5 10:01:08 2010// 13 13 D -
trunk/source/digits_hits/detector/src/G4MultiFunctionalDetector.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4MultiFunctionalDetector.cc,v 1. 5 2008/03/06 23:31:12 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4MultiFunctionalDetector.cc,v 1.6 2010/07/23 02:07:23 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4MultiFunctionalDetector 31 // 32 // 2010-07-23 T.Aso Call PS if the step length or energy deposit is not zero. 33 // 34 // 31 35 #include "G4MultiFunctionalDetector.hh" 32 36 #include "G4SDManager.hh" … … 42 46 G4bool G4MultiFunctionalDetector::ProcessHits(G4Step* aStep,G4TouchableHistory* aTH) 43 47 { 44 G4int nPrim = primitives.size(); 45 for(G4int iPrim=0;iPrim<nPrim;iPrim++) 46 { if(aStep->GetStepLength()>0.) primitives[iPrim]->HitPrimitive(aStep,aTH); } 48 if(aStep->GetStepLength()>0. || aStep->GetTotalEnergyDeposit()>0.){ 49 G4int nPrim = primitives.size(); 50 for(G4int iPrim=0;iPrim<nPrim;iPrim++) 51 { 52 primitives[iPrim]->HitPrimitive(aStep,aTH); 53 } 54 } 47 55 return true; 48 56 } -
trunk/source/digits_hits/detector/src/G4VPrimitiveScorer.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4VPrimitiveScorer.cc,v 1. 2 2006/06/29 18:06:03 gunterExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4VPrimitiveScorer.cc,v 1.5 2010/07/23 04:34:59 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4VPrimitiveScorer … … 34 34 #include "G4Step.hh" 35 35 #include "G4TouchableHistory.hh" 36 36 #include "G4UnitsTable.hh" 37 37 38 38 G4VPrimitiveScorer::G4VPrimitiveScorer(G4String name, G4int depth) 39 :primitiveName(name),detector(0),filter(0),verboseLevel(0),indexDepth(depth) 39 :primitiveName(name),detector(0),filter(0),verboseLevel(0),indexDepth(depth), 40 unitName("NoUnit"),unitValue(1.0) 40 41 {;} 41 42 … … 74 75 } 75 76 77 void G4VPrimitiveScorer::CheckAndSetUnit(const G4String& unit, 78 const G4String& category){ 79 if ( G4UnitDefinition::GetCategory(unit) == category){ 80 unitName = unit; 81 unitValue = G4UnitDefinition::GetValueOf(unit); 82 } else { 83 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 84 G4Exception(GetName(),"DetPS0000",JustWarning,msg); 85 } 86 } -
trunk/source/digits_hits/digits/CVS/Entries
r1337 r1340 3 3 /GNUmakefile/1.2/Wed Sep 29 21:47:37 2010//Tgeant4-09-04-beta-01 4 4 /History/1.2/Wed Sep 29 21:47:37 2010//Tgeant4-09-04-beta-01 5 /CMakeLists.txt/1.1/Wed Sep 29 18:38:15 2010// 6 /sources.cmake/1.1/Wed Sep 29 18:38:24 2010// -
trunk/source/digits_hits/hits/CVS/Entries
r1337 r1340 3 3 /GNUmakefile/1.2/Wed Sep 29 21:47:39 2010//Tgeant4-09-04-beta-01 4 4 /History/1.2/Wed Sep 29 21:47:39 2010//Tgeant4-09-04-beta-01 5 /CMakeLists.txt/1.1/Wed Sep 29 18:38:32 2010// 6 /sources.cmake/1.1/Wed Sep 29 18:38:41 2010// -
trunk/source/digits_hits/scorer/CVS/Entries
r1337 r1340 1 1 D/include//// 2 2 D/src//// 3 /GNUmakefile/1.1/Wed Sep 29 21:47:39 2010//Tgeant4-09-04-beta-01 4 /History/1.1/Wed Sep 29 21:47:39 2010//Tgeant4-09-04-beta-01 3 /CMakeLists.txt/1.1/Wed Sep 29 18:38:50 2010// 4 /sources.cmake/1.1/Wed Sep 29 18:38:59 2010// 5 /GNUmakefile/1.3/Fri Nov 5 09:57:24 2010// 6 /History/1.1/Wed Sep 29 21:47:39 2010// -
trunk/source/digits_hits/scorer/GNUmakefile
r814 r1340 1 # $Id: GNUmakefile,v 1. 1 2007/07/11 01:27:26 asaimExp $1 # $Id: GNUmakefile,v 1.3 2010/10/27 08:10:13 gcosmo Exp $ 2 2 # -------------------------------------------------------------- 3 3 # GNUmakefile for digits+hits library. Makoto Asai, 1/11/96. -
trunk/source/digits_hits/scorer/include/CVS/Entries
r1337 r1340 1 /G4PS CellCharge.hh/1.1/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-012 /G4PS CellCharge3D.hh/1.2/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-013 /G4PS CellFlux.hh/1.1/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-014 /G4PS CellFlux3D.hh/1.2/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-015 /G4PS CylinderSurfaceCurrent.hh/1.1/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-016 /G4 PSCylinderSurfaceCurrent3D.hh/1.2/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-017 /G4 PSCylinderSurfaceFlux.hh/1.1/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-018 /G4 PSCylinderSurfaceFlux3D.hh/1.2/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-019 /G4 PSDirectionFlag.hh/1.1/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-0110 /G4PS DoseDeposit.hh/1.1/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-0111 /G4PS DoseDeposit3D.hh/1.2/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-0112 /G4PS EnergyDeposit.hh/1.1/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0113 /G4PS EnergyDeposit3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0114 /G4PS FlatSurfaceCurrent.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0115 /G4PS FlatSurfaceCurrent3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0116 /G4PS FlatSurfaceFlux.hh/1.1/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0117 /G4PS FlatSurfaceFlux3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0118 /G4PS MinKinEAtGeneration.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0119 /G4PS MinKinEAtGeneration3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0120 /G4PS NofCollision.hh/1.1/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0121 /G4PS NofCollision3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0122 /G4PS NofSecondary.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0123 /G4PS NofSecondary3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0124 /G4PS NofStep.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0125 /G4PS NofStep3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0126 /G4PS PassageCellCurrent.hh/1.1/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0127 /G4PS PassageCellCurrent3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0128 /G4PS PassageCellFlux.hh/1.1/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0129 /G4PS PassageCellFlux3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0130 /G4PS PassageTrackLength.hh/1.1/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0131 /G4PS PassageTrackLength3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-0132 /G4PSP opulation.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0133 /G4PSP opulation3D.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0134 /G4PS SphereSurfaceCurrent.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0135 /G4PS SphereSurfaceCurrent3D.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0136 /G4PS SphereSurfaceFlux.hh/1.1/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0137 /G4PS SphereSurfaceFlux3D.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0138 /G4PS Termination.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0139 /G4PS Termination3D.hh/1.3/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0140 /G4PS TrackCounter.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0141 /G4PS TrackCounter3D.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0142 /G4PS TrackLength.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0143 /G4PST rackLength3D.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0144 /G4 SDChargedFilter.hh/1.1/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0145 /G4 SDKineticEnergyFilter.hh/1.1/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0146 /G4 SDNeutralFilter.hh/1.1/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0147 /G4 SDParticleFilter.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0148 /G4SDParticle WithEnergyFilter.hh/1.1/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-011 /G4PSDirectionFlag.hh/1.1/Wed Sep 29 21:47:40 2010// 2 /G4PSNofCollision3D.hh/1.2/Wed Sep 29 21:47:49 2010// 3 /G4PSNofSecondary3D.hh/1.2/Wed Sep 29 21:47:49 2010// 4 /G4PSPopulation3D.hh/1.2/Wed Sep 29 21:47:50 2010// 5 /G4PSTermination3D.hh/1.3/Wed Sep 29 21:47:50 2010// 6 /G4SDChargedFilter.hh/1.1/Wed Sep 29 21:47:50 2010// 7 /G4SDKineticEnergyFilter.hh/1.1/Wed Sep 29 21:47:50 2010// 8 /G4SDNeutralFilter.hh/1.1/Wed Sep 29 21:47:50 2010// 9 /G4SDParticleWithEnergyFilter.hh/1.1/Wed Sep 29 21:47:50 2010// 10 /G4PSCellCharge.hh/1.2/Fri Nov 5 09:57:28 2010// 11 /G4PSCellCharge3D.hh/1.3/Fri Nov 5 09:57:28 2010// 12 /G4PSCellFlux.hh/1.3/Fri Nov 5 09:57:28 2010// 13 /G4PSCellFlux3D.hh/1.3/Fri Nov 5 09:57:28 2010// 14 /G4PSCylinderSurfaceCurrent.hh/1.2/Fri Nov 5 09:57:28 2010// 15 /G4PSCylinderSurfaceCurrent3D.hh/1.3/Fri Nov 5 09:57:28 2010// 16 /G4PSCylinderSurfaceFlux.hh/1.3/Fri Nov 5 09:57:28 2010// 17 /G4PSCylinderSurfaceFlux3D.hh/1.3/Fri Nov 5 09:57:28 2010// 18 /G4PSDoseDeposit.hh/1.2/Fri Nov 5 09:57:28 2010// 19 /G4PSDoseDeposit3D.hh/1.3/Fri Nov 5 09:57:28 2010// 20 /G4PSEnergyDeposit.hh/1.3/Fri Nov 5 09:57:28 2010// 21 /G4PSEnergyDeposit3D.hh/1.4/Fri Nov 5 09:57:28 2010// 22 /G4PSFlatSurfaceCurrent.hh/1.3/Fri Nov 5 09:57:28 2010// 23 /G4PSFlatSurfaceCurrent3D.hh/1.3/Fri Nov 5 09:57:28 2010// 24 /G4PSFlatSurfaceFlux.hh/1.3/Fri Nov 5 09:57:28 2010// 25 /G4PSFlatSurfaceFlux3D.hh/1.3/Fri Nov 5 09:57:28 2010// 26 /G4PSMinKinEAtGeneration.hh/1.3/Fri Nov 5 09:57:28 2010// 27 /G4PSMinKinEAtGeneration3D.hh/1.3/Fri Nov 5 09:57:28 2010// 28 /G4PSNofCollision.hh/1.2/Fri Nov 5 09:57:28 2010// 29 /G4PSNofSecondary.hh/1.4/Fri Nov 5 09:57:28 2010// 30 /G4PSNofStep.hh/1.3/Fri Nov 5 09:57:28 2010// 31 /G4PSNofStep3D.hh/1.3/Fri Nov 5 09:57:28 2010// 32 /G4PSPassageCellCurrent.hh/1.3/Fri Nov 5 09:57:28 2010// 33 /G4PSPassageCellCurrent3D.hh/1.3/Fri Nov 5 09:57:28 2010// 34 /G4PSPassageCellFlux.hh/1.3/Fri Nov 5 09:57:28 2010// 35 /G4PSPassageCellFlux3D.hh/1.3/Fri Nov 5 09:57:28 2010// 36 /G4PSPassageTrackLength.hh/1.2/Fri Nov 5 09:57:28 2010// 37 /G4PSPassageTrackLength3D.hh/1.3/Fri Nov 5 09:57:28 2010// 38 /G4PSPopulation.hh/1.3/Fri Nov 5 09:57:28 2010// 39 /G4PSSphereSurfaceCurrent.hh/1.3/Fri Nov 5 09:57:28 2010// 40 /G4PSSphereSurfaceCurrent3D.hh/1.3/Fri Nov 5 09:57:28 2010// 41 /G4PSSphereSurfaceFlux.hh/1.3/Fri Nov 5 09:57:28 2010// 42 /G4PSSphereSurfaceFlux3D.hh/1.3/Fri Nov 5 09:57:28 2010// 43 /G4PSTermination.hh/1.3/Fri Nov 5 09:57:28 2010// 44 /G4PSTrackCounter.hh/1.3/Fri Nov 5 09:57:28 2010// 45 /G4PSTrackCounter3D.hh/1.3/Fri Nov 5 09:57:28 2010// 46 /G4PSTrackLength.hh/1.3/Fri Nov 5 09:57:28 2010// 47 /G4PSTrackLength3D.hh/1.3/Fri Nov 5 09:57:28 2010// 48 /G4SDParticleFilter.hh/1.3/Fri Nov 5 09:57:28 2010// 49 49 D -
trunk/source/digits_hits/scorer/include/G4PSCellCharge.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCellCharge.hh,v 1. 1 2007/07/11 01:29:28 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCellCharge.hh,v 1.2 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 40 40 // 41 41 // Created: 2007-08-20 Tsukasa ASO 42 // 2010-07-22 Introduce Unit specification. 42 43 // 43 44 /////////////////////////////////////////////////////////////////////////////// … … 48 49 public: // with description 49 50 G4PSCellCharge(G4String name, G4int depth=0); 51 G4PSCellCharge(G4String name, const G4String& unit, G4int depth=0); 50 52 virtual ~G4PSCellCharge(); 51 53 … … 60 62 virtual void PrintAll(); 61 63 64 virtual void SetUnit(const G4String& unit); 65 62 66 private: 63 67 G4int HCID; -
trunk/source/digits_hits/scorer/include/G4PSCellCharge3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCellCharge3D.hh,v 1. 2 2007/08/28 08:01:55 taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCellCharge3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 39 39 // 40 40 // Created: 2007-08-20 Tsukasa ASO 41 // 2010-07-22 Introduce Unit specification. 41 42 // 42 43 /////////////////////////////////////////////////////////////////////////////// … … 47 48 public: // with description 48 49 G4PSCellCharge3D(G4String name, 50 G4int ni=1,G4int nj=1, G4int nk=1, 51 G4int depi=2, G4int depj=1, G4int depk=0); 52 G4PSCellCharge3D(G4String name, const G4String& unit, 49 53 G4int ni=1,G4int nj=1, G4int nk=1, 50 54 G4int depi=2, G4int depj=1, G4int depk=0); -
trunk/source/digits_hits/scorer/include/G4PSCellFlux.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCellFlux.hh,v 1. 1 2007/07/11 01:29:28 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCellFlux.hh,v 1.3 2010/07/22 23:42:01 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 48 48 // 49 49 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 50 // 2010-07-22 Introduce Unit specification. 51 // 2010-07-22 Add weighted option 50 52 // 51 53 /////////////////////////////////////////////////////////////////////////////// … … 56 58 public: // with description 57 59 G4PSCellFlux(G4String name, G4int depth=0); 60 G4PSCellFlux(G4String name, const G4String& unit, G4int depth=0); 58 61 virtual ~G4PSCellFlux(); 62 63 inline void Weighted(G4bool flg=true) { weighted = flg; } 64 // Multiply track weight 59 65 60 66 protected: // with description … … 68 74 virtual void PrintAll(); 69 75 76 virtual void SetUnit(const G4String& unit); 77 78 protected: 79 virtual void DefineUnitAndCategory(); 80 70 81 private: 71 82 G4int HCID; 72 83 G4THitsMap<G4double>* EvtMap; 84 G4bool weighted; 85 73 86 }; 74 87 #endif -
trunk/source/digits_hits/scorer/include/G4PSCellFlux3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCellFlux3D.hh,v 1. 2 2007/08/28 08:01:55 taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCellFlux3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 46 46 // 47 47 // Created: 2007-08-14 Tsukasa ASO 48 // 2010-07-22 Introduce Unit specification. 48 49 // 49 50 /////////////////////////////////////////////////////////////////////////////// … … 54 55 public: // with description 55 56 G4PSCellFlux3D(G4String name, 57 G4int ni=1,G4int nj=1, G4int nk=1, 58 G4int depi=2, G4int depj=1, G4int depk=0); 59 G4PSCellFlux3D(G4String name,const G4String& unit, 56 60 G4int ni=1,G4int nj=1, G4int nk=1, 57 61 G4int depi=2, G4int depj=1, G4int depk=0); -
trunk/source/digits_hits/scorer/include/G4PSCylinderSurfaceCurrent.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCylinderSurfaceCurrent.hh,v 1. 1 2007/08/14 21:23:51taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCylinderSurfaceCurrent.hh,v 1.2 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 53 53 // 54 54 // Created: 2007-03-21 Tsukasa ASO 55 // 2010-07-22 Introduce Unit specification. 55 56 // 56 57 /////////////////////////////////////////////////////////////////////////////// … … 60 61 61 62 public: // with description 62 G4PSCylinderSurfaceCurrent(G4String name ,G4int direction, G4int depth=0); 63 G4PSCylinderSurfaceCurrent(G4String name ,G4int direction, 64 G4int depth=0); 65 G4PSCylinderSurfaceCurrent(G4String name ,G4int direction, 66 const G4String& unit, G4int depth=0); 63 67 virtual ~G4PSCylinderSurfaceCurrent(); 64 68 … … 81 85 virtual void PrintAll(); 82 86 87 virtual void SetUnit(const G4String& unit); 88 89 protected: 90 virtual void DefineUnitAndCategory(); 91 83 92 private: 84 93 G4int HCID; -
trunk/source/digits_hits/scorer/include/G4PSCylinderSurfaceCurrent3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCylinderSurfaceCurrent3D.hh,v 1. 2 2007/08/28 08:01:55 taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCylinderSurfaceCurrent3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 49 49 // 50 50 // Created: 2008-08-14 Tsukasa ASO 51 // 2010-07-22 Introduce Unit specification. 51 52 /////////////////////////////////////////////////////////////////////////////// 52 53 … … 56 57 public: // with description 57 58 G4PSCylinderSurfaceCurrent3D(G4String name, G4int direction, 59 G4int ni=1,G4int nj=1, G4int nk=1, 60 G4int depi=2, G4int depj=1, G4int depk=0); 61 G4PSCylinderSurfaceCurrent3D(G4String name, G4int direction, 62 const G4String& unit, 58 63 G4int ni=1,G4int nj=1, G4int nk=1, 59 64 G4int depi=2, G4int depj=1, G4int depk=0); -
trunk/source/digits_hits/scorer/include/G4PSCylinderSurfaceFlux.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCylinderSurfaceFlux.hh,v 1. 1 2007/08/14 21:23:51 taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCylinderSurfaceFlux.hh,v 1.3 2010/07/22 23:42:01 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 53 53 // 54 54 // Created: 2007-03-29 Tsukasa ASO 55 // 2010-07-22 Introduce Unit specification. 56 // 2010-07-22 Add weighted and divideByArea options 55 57 // 56 58 /////////////////////////////////////////////////////////////////////////////// … … 60 62 public: // with description 61 63 G4PSCylinderSurfaceFlux(G4String name,G4int direction, G4int depth=0); 64 G4PSCylinderSurfaceFlux(G4String name,G4int direction, 65 const G4String& unit, G4int depth=0); 62 66 virtual ~G4PSCylinderSurfaceFlux(); 67 68 inline void Weighted(G4bool flg=true) { weighted = flg; } 69 // Multiply track weight 70 71 inline void DivideByArea(G4bool flg=true) { divideByArea = flg; } 72 // Divided by Area. 73 63 74 64 75 protected: // with description … … 73 84 virtual void PrintAll(); 74 85 86 virtual void SetUnit(const G4String& unit); 87 88 protected: 89 virtual void DefineUnitAndCategory(); 90 75 91 private: 76 92 G4int HCID; 77 93 G4int fDirection; 78 94 G4THitsMap<G4double>* EvtMap; 79 95 G4bool weighted; 96 G4bool divideByArea; 80 97 }; 81 98 -
trunk/source/digits_hits/scorer/include/G4PSCylinderSurfaceFlux3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCylinderSurfaceFlux3D.hh,v 1. 2 2007/08/28 08:01:55 taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCylinderSurfaceFlux3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 49 49 // 50 50 // Created: 2008-08-14 Tsukasa ASO 51 // 2010-07-22 Introduce Unit specification. 51 52 /////////////////////////////////////////////////////////////////////////////// 52 53 … … 56 57 public: // with description 57 58 G4PSCylinderSurfaceFlux3D(G4String name, G4int direction, 59 G4int ni=1,G4int nj=1, G4int nk=1, 60 G4int di=2, G4int dj=1, G4int dk=0); 61 G4PSCylinderSurfaceFlux3D(G4String name, G4int direction, 62 const G4String& unit, 58 63 G4int ni=1,G4int nj=1, G4int nk=1, 59 64 G4int di=2, G4int dj=1, G4int dk=0); -
trunk/source/digits_hits/scorer/include/G4PSDoseDeposit.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSDoseDeposit.hh,v 1. 1 2007/07/11 01:29:28 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSDoseDeposit.hh,v 1.2 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 40 40 // 41 41 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 42 // 2010-07-22 Introduce Unit specification. 42 43 // 43 44 /////////////////////////////////////////////////////////////////////////////// … … 47 48 public: // with description 48 49 G4PSDoseDeposit(G4String name, G4int depth=0); 50 G4PSDoseDeposit(G4String name, const G4String& unit, G4int depth=0); 49 51 virtual ~G4PSDoseDeposit(); 50 52 … … 59 61 virtual void PrintAll(); 60 62 63 virtual void SetUnit(const G4String& unit); 64 61 65 private: 62 66 G4int HCID; -
trunk/source/digits_hits/scorer/include/G4PSDoseDeposit3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSDoseDeposit3D.hh,v 1. 2 2007/08/28 10:11:29taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSDoseDeposit3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 39 39 // 40 40 // Created: 2008-08-14 Tsukasa ASO 41 // 2010-07-22 Introduce Unit specification. 41 42 // 42 43 /////////////////////////////////////////////////////////////////////////////// … … 46 47 public: // with description 47 48 G4PSDoseDeposit3D(G4String name, 49 G4int ni=1,G4int nj=1, G4int nk=1, 50 G4int depi=2, G4int depj=1, G4int depk=0); 51 G4PSDoseDeposit3D(G4String name, const G4String& unit, 48 52 G4int ni=1,G4int nj=1, G4int nk=1, 49 53 G4int depi=2, G4int depj=1, G4int depk=0); -
trunk/source/digits_hits/scorer/include/G4PSEnergyDeposit.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSEnergyDeposit.hh,v 1. 1 2007/07/11 01:29:28 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSEnergyDeposit.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 40 40 // 41 41 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura 42 // 2010-07-22 Introduce Unit specification. 42 43 // 43 44 /////////////////////////////////////////////////////////////////////////////// … … 47 48 48 49 public: // with description 49 G4PSEnergyDeposit(G4String name, G4int depth=0); 50 G4PSEnergyDeposit(G4String name, G4int depth=0); // default unit 51 G4PSEnergyDeposit(G4String name, const G4String& unit, G4int depth=0); 50 52 virtual ~G4PSEnergyDeposit(); 51 53 … … 60 62 virtual void PrintAll(); 61 63 64 virtual void SetUnit(const G4String& unit); 65 62 66 private: 63 67 G4int HCID; -
trunk/source/digits_hits/scorer/include/G4PSEnergyDeposit3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSEnergyDeposit3D.hh,v 1. 2 2007/08/28 08:01:55 taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSEnergyDeposit3D.hh,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 38 38 // 39 39 // Created: 2007-08-14 Tsukasa ASO 40 // 2010-07-22 Introduce Unit specification. 40 41 /////////////////////////////////////////////////////////////////////////////// 41 42 … … 47 48 G4int ni=1,G4int nj=1, G4int nk=1, 48 49 G4int depi=2, G4int depj=1, G4int depk=0); 50 G4PSEnergyDeposit3D(G4String name, const G4String& unit, 51 G4int ni=1,G4int nj=1, G4int nk=1, 52 G4int depi=2, G4int depj=1, G4int depk=0); 53 49 54 virtual ~G4PSEnergyDeposit3D(); 50 55 -
trunk/source/digits_hits/scorer/include/G4PSFlatSurfaceCurrent.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSFlatSurfaceCurrent.hh,v 1. 2 2007/08/14 21:23:51taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSFlatSurfaceCurrent.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 55 55 // 17-Nov-2005 T.Aso, Bug fix for area definition. 56 56 // 31-Mar-2007 T.Aso, Add option for normalizing by the area. 57 // 2010-07-22 Introduce Unit specification. 57 58 // 58 59 /////////////////////////////////////////////////////////////////////////////// … … 63 64 public: // with description 64 65 G4PSFlatSurfaceCurrent(G4String name ,G4int direction, G4int depth=0); 66 G4PSFlatSurfaceCurrent(G4String name ,G4int direction, 67 const G4String& unit, G4int depth=0); 65 68 virtual ~G4PSFlatSurfaceCurrent(); 66 69 … … 82 85 virtual void PrintAll(); 83 86 87 virtual void SetUnit(const G4String& unit); 88 89 protected: 90 virtual void DefineUnitAndCategory(); 91 84 92 private: 85 93 G4int HCID; -
trunk/source/digits_hits/scorer/include/G4PSFlatSurfaceCurrent3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSFlatSurfaceCurrent3D.hh,v 1. 2 2007/08/28 10:11:29taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSFlatSurfaceCurrent3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 49 49 // 50 50 // Created: 2008-08-14 Tsukasa ASO 51 // 2010-07-22 Introduce Unit specification. 51 52 /////////////////////////////////////////////////////////////////////////////// 52 53 … … 56 57 public: // with description 57 58 G4PSFlatSurfaceCurrent3D(G4String name, G4int direction, 59 G4int ni=1,G4int nj=1, G4int nk=1, 60 G4int depi=2, G4int depj=1, G4int depk=0); 61 G4PSFlatSurfaceCurrent3D(G4String name, G4int direction, 62 const G4String& unit, 58 63 G4int ni=1,G4int nj=1, G4int nk=1, 59 64 G4int depi=2, G4int depj=1, G4int depk=0); -
trunk/source/digits_hits/scorer/include/G4PSFlatSurfaceFlux.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSFlatSurfaceFlux.hh,v 1. 1 2007/07/11 01:29:28 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSFlatSurfaceFlux.hh,v 1.3 2010/07/22 23:42:01 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 57 57 // Bug fix. Area definition. 58 58 // 29-Mar-2007 T.Aso, Bug fix for momentum direction at outgoing flux. 59 // 2010-07-22 Introduce Unit specification. 60 // 2010-07-22 Add weighted and divideByArea options 59 61 /////////////////////////////////////////////////////////////////////////////// 60 62 … … 63 65 public: // with description 64 66 G4PSFlatSurfaceFlux(G4String name,G4int direction, G4int depth=0); 67 G4PSFlatSurfaceFlux(G4String name,G4int direction, 68 const G4String& unit, G4int depth=0); 65 69 virtual ~G4PSFlatSurfaceFlux(); 70 71 inline void Weighted(G4bool flg=true) { weighted = flg; } 72 // Multiply track weight 73 74 inline void DivideByArea(G4bool flg=true) { divideByArea = flg; } 75 // Divided by Area. 66 76 67 77 protected: // with description … … 76 86 virtual void PrintAll(); 77 87 88 virtual void SetUnit(const G4String& unit); 89 90 protected: 91 virtual void DefineUnitAndCategory(); 92 78 93 private: 79 94 G4int HCID; 80 95 G4int fDirection; 81 96 G4THitsMap<G4double>* EvtMap; 82 97 G4bool weighted; 98 G4bool divideByArea; 83 99 }; 84 100 -
trunk/source/digits_hits/scorer/include/G4PSFlatSurfaceFlux3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSFlatSurfaceFlux3D.hh,v 1. 2 2007/08/28 10:11:29taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSFlatSurfaceFlux3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 50 50 // 51 51 // Created: 2007-08-14 Tsukasa ASO 52 // 2010-07-22 Introduce Unit specification. 52 53 // 53 54 /////////////////////////////////////////////////////////////////////////////// … … 58 59 public: // with description 59 60 G4PSFlatSurfaceFlux3D(G4String name, G4int direction, 61 G4int ni=1,G4int nj=1, G4int nk=1, 62 G4int depi=2, G4int depj=1, G4int depk=0); 63 G4PSFlatSurfaceFlux3D(G4String name, G4int direction, 64 const G4String& unit, 60 65 G4int ni=1,G4int nj=1, G4int nk=1, 61 66 G4int depi=2, G4int depj=1, G4int depk=0); -
trunk/source/digits_hits/scorer/include/G4PSMinKinEAtGeneration.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSMinKinEAtGeneration.hh,v 1. 2 2007/08/14 21:23:51taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSMinKinEAtGeneration.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 41 41 // 42 42 // Created: 2005-11-17 Tsukasa ASO, Akinori Kimura. 43 // 2010-07-22 Introduce Unit specification. 43 44 // 44 45 // … … 51 52 public: // with description 52 53 G4PSMinKinEAtGeneration(G4String name, G4int depth=0); 54 G4PSMinKinEAtGeneration(G4String name, const G4String& unit, 55 G4int depth=0); 53 56 54 57 protected: // with description … … 67 70 virtual void PrintAll(); 68 71 72 virtual void SetUnit(const G4String& unit); 73 69 74 private: 70 75 G4int HCID; -
trunk/source/digits_hits/scorer/include/G4PSMinKinEAtGeneration3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSMinKinEAtGeneration3D.hh,v 1. 2 2007/08/28 10:11:29taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSMinKinEAtGeneration3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 40 40 // 41 41 // Created: 2007-08-14 Tsukasa ASO 42 // 2010-07-22 Introduce Unit specification. 42 43 // 43 44 // … … 48 49 public: // with description 49 50 G4PSMinKinEAtGeneration3D(G4String name, 51 G4int ni=1,G4int nj=1, G4int nk=1, 52 G4int depi=2, G4int depj=1, G4int depk=0); 53 G4PSMinKinEAtGeneration3D(G4String name,const G4String& unit, 50 54 G4int ni=1,G4int nj=1, G4int nk=1, 51 55 G4int depi=2, G4int depj=1, G4int depk=0); -
trunk/source/digits_hits/scorer/include/G4PSNofCollision.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSNofCollision.hh,v 1. 1 2007/07/11 01:29:28 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSNofCollision.hh,v 1.2 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 41 41 // 42 42 // Created: 2007-2-2 Tsukasa ASO, Akinori Kimura. 43 // 2010-07-22 Introduce Unit specification. 43 44 // 44 45 /////////////////////////////////////////////////////////////////////////////// … … 69 70 virtual void PrintAll(); 70 71 72 virtual void SetUnit(const G4String& unit); 73 71 74 private: 72 75 G4int HCID; -
trunk/source/digits_hits/scorer/include/G4PSNofSecondary.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSNofSecondary.hh,v 1. 2 2007/08/14 21:23:51 taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSNofSecondary.hh,v 1.4 2010/07/22 23:42:01 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 46 46 // particleDef is not set, it accepts all secondaies. 47 47 // But onece user sets it, it accepts only the particle. 48 // 2010-07-22 Introduce Unit specification. 48 49 // 49 50 // … … 59 60 // Scoring option 60 61 void SetParticle(const G4String& particleName); 62 63 inline void Weighted(G4bool flg=true) { weighted = flg; } 64 // Multiply track weight 61 65 62 66 protected: // with description … … 75 79 virtual void PrintAll(); 76 80 81 virtual void SetUnit(const G4String& unit); 82 77 83 private: 78 84 G4int HCID; 79 85 G4THitsMap<G4double>* EvtMap; 80 86 G4ParticleDefinition* particleDef; 87 G4bool weighted; 81 88 82 89 public: -
trunk/source/digits_hits/scorer/include/G4PSNofStep.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSNofStep.hh,v 1. 2 2007/08/29 06:36:41taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSNofStep.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 40 40 // 41 41 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 42 // 2010-07-22 Introduce Unit specification. 42 43 // 43 44 /////////////////////////////////////////////////////////////////////////////// … … 65 66 virtual void PrintAll(); 66 67 68 virtual void SetUnit(const G4String& unit); 69 67 70 public: 68 71 void SetBoundaryFlag(G4bool flg=true) -
trunk/source/digits_hits/scorer/include/G4PSNofStep3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSNofStep3D.hh,v 1. 2 2007/08/28 10:11:29taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSNofStep3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 38 38 // 39 39 // Created: 2007-08-14 Tsukasa ASO 40 // 2010-07-22 Introduce Unit specification. 40 41 // 41 42 /////////////////////////////////////////////////////////////////////////////// -
trunk/source/digits_hits/scorer/include/G4PSPassageCellCurrent.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPassageCellCurrent.hh,v 1. 1 2007/08/14 21:30:45taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPassageCellCurrent.hh,v 1.3 2010/07/22 23:42:01 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 42 42 // 43 43 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 44 // 2010-07-22 Introduce Unit specification. 45 // 2010-07-22 Add weighted option 44 46 // 45 47 /////////////////////////////////////////////////////////////////////////////// … … 70 72 virtual void PrintAll(); 71 73 74 virtual void SetUnit(const G4String& unit); 75 72 76 private: 73 77 G4int HCID; -
trunk/source/digits_hits/scorer/include/G4PSPassageCellCurrent3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPassageCellCurrent3D.hh,v 1. 2 2007/08/28 10:11:29taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPassageCellCurrent3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 41 41 // 42 42 // Created: 2007-08-14 Tsukasa ASO 43 // 2010-07-22 Introduce Unit specification. 43 44 // 44 45 /////////////////////////////////////////////////////////////////////////////// -
trunk/source/digits_hits/scorer/include/G4PSPassageCellFlux.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPassageCellFlux.hh,v 1. 1 2007/07/11 01:29:28 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPassageCellFlux.hh,v 1.3 2010/07/22 23:42:01 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 46 46 // 47 47 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 48 // 2010-07-22 Introduce Unit specification. 49 // 2010-07-22 Add weighted option 48 50 // 49 51 /////////////////////////////////////////////////////////////////////////////// … … 54 56 public: // with description 55 57 G4PSPassageCellFlux(G4String name, G4int depth=0); 58 G4PSPassageCellFlux(G4String name, const G4String& unit, G4int depth=0); 59 56 60 virtual ~G4PSPassageCellFlux(); 61 62 inline void Weighted(G4bool flg=true) { weighted = flg; } 63 // Multiply track weight 57 64 58 65 protected: // with description … … 67 74 virtual void PrintAll(); 68 75 76 virtual void SetUnit(const G4String& unit); 77 78 protected: 79 virtual void DefineUnitAndCategory(); 80 69 81 private: 70 82 G4int HCID; … … 72 84 G4double fCellFlux; 73 85 G4THitsMap<G4double>* EvtMap; 86 G4bool weighted; 74 87 75 88 }; -
trunk/source/digits_hits/scorer/include/G4PSPassageCellFlux3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPassageCellFlux3D.hh,v 1. 2 2007/08/28 10:11:29taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPassageCellFlux3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 44 44 // 45 45 // Created: 2007-08-14 Tsukasa ASO 46 // 2010-07-22 Introduce Unit specification. 46 47 /////////////////////////////////////////////////////////////////////////////// 47 48 … … 51 52 public: // with description 52 53 G4PSPassageCellFlux3D(G4String name, 54 G4int ni=1,G4int nj=1, G4int nk=1, 55 G4int depi=2, G4int depj=1, G4int depk=0); 56 G4PSPassageCellFlux3D(G4String name,const G4String& unit, 53 57 G4int ni=1,G4int nj=1, G4int nk=1, 54 58 G4int depi=2, G4int depj=1, G4int depk=0); -
trunk/source/digits_hits/scorer/include/G4PSPassageTrackLength.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPassageTrackLength.hh,v 1. 1 2007/07/11 01:29:28 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPassageTrackLength.hh,v 1.2 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 42 42 // 43 43 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 44 // 2010-07-22 Introduce Unit specification. 44 45 // 45 46 /////////////////////////////////////////////////////////////////////////////// … … 50 51 public: // with description 51 52 G4PSPassageTrackLength(G4String name, G4int depth=0); 53 G4PSPassageTrackLength(G4String name, const G4String& unit, 54 G4int depth=0); 52 55 virtual ~G4PSPassageTrackLength(); 53 56 … … 66 69 virtual void PrintAll(); 67 70 71 virtual void SetUnit(const G4String& unit); 72 68 73 private: 69 74 G4int HCID; -
trunk/source/digits_hits/scorer/include/G4PSPassageTrackLength3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPassageTrackLength3D.hh,v 1. 2 2007/08/28 10:11:29taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPassageTrackLength3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 41 41 // 42 42 // Created: 2008-08-14 Tsukasa ASO 43 // 2010-07-22 Introduce Unit specification. 43 44 // 44 45 /////////////////////////////////////////////////////////////////////////////// … … 49 50 public: // with description 50 51 G4PSPassageTrackLength3D(G4String name, 52 G4int ni=1,G4int nj=1, G4int nk=1, 53 G4int depi=2, G4int depj=1, G4int depk=0); 54 G4PSPassageTrackLength3D(G4String name,const G4String& unit, 51 55 G4int ni=1,G4int nj=1, G4int nk=1, 52 56 G4int depi=2, G4int depj=1, G4int depk=0); -
trunk/source/digits_hits/scorer/include/G4PSPopulation.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPopulation.hh,v 1. 2 2007/08/14 21:23:51taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPopulation.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 43 43 // 44 44 // Created: 2007-02-02 Tsukasa ASO, Akinori Kimura. 45 // 2010-07-22 Introduce Unit specification. 45 46 // 46 47 /////////////////////////////////////////////////////////////////////////////// … … 71 72 virtual void PrintAll(); 72 73 74 virtual void SetUnit(const G4String& unit); 75 73 76 private: 74 77 G4int HCID; -
trunk/source/digits_hits/scorer/include/G4PSSphereSurfaceCurrent.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSSphereSurfaceCurrent.hh,v 1. 2 2007/08/14 21:23:51taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSSphereSurfaceCurrent.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 53 53 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 54 54 // 17-Nov-2005 Bug fix. square definition. 55 // 31-Mar-2007 T.Aso, Add option for normalizing by the area. 55 // 31-Mar-2007 T.Aso, Add option for normalizing by the area. 56 // 2010-07-22 Introduce Unit specification. 56 57 // 57 58 /////////////////////////////////////////////////////////////////////////////// … … 62 63 public: // with description 63 64 G4PSSphereSurfaceCurrent(G4String name, G4int direction, G4int depth=0); 65 G4PSSphereSurfaceCurrent(G4String name, G4int direction, 66 const G4String& unit, G4int depth=0); 64 67 virtual ~G4PSSphereSurfaceCurrent(); 65 68 … … 80 83 virtual void PrintAll(); 81 84 85 virtual void SetUnit(const G4String& unit); 86 87 protected: 88 virtual void DefineUnitAndCategory(); 89 82 90 private: 83 91 G4int HCID; -
trunk/source/digits_hits/scorer/include/G4PSSphereSurfaceCurrent3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSSphereSurfaceCurrent3D.hh,v 1. 2 2007/08/28 10:11:29taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSSphereSurfaceCurrent3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 48 48 // 49 49 // Created: 2007-08-14 Tsukasa ASO 50 // 2010-07-22 Introduce Unit specification. 50 51 // 51 52 /////////////////////////////////////////////////////////////////////////////// … … 58 59 G4int ni=1,G4int nj=1, G4int nk=1, 59 60 G4int depi=2, G4int depj=1, G4int depk=0); 61 G4PSSphereSurfaceCurrent3D(G4String name, G4int direction, 62 const G4String& unit, 63 G4int ni=1,G4int nj=1, G4int nk=1, 64 G4int depi=2, G4int depj=1, G4int depk=0); 65 60 66 61 67 virtual ~G4PSSphereSurfaceCurrent3D(); -
trunk/source/digits_hits/scorer/include/G4PSSphereSurfaceFlux.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSSphereSurfaceFlux.hh,v 1. 1 2007/07/11 01:29:28 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSSphereSurfaceFlux.hh,v 1.3 2010/07/22 23:42:01 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 53 53 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 54 54 // 17-Nov-2005 Bug fix. square definition. 55 // 29-Mar-2007 T.Aso, Bug fix for momentum direction at outgoing flux. 55 // 29-Mar-2007 T.Aso, Bug fix for momentum direction for out-going flux. 56 // 2010-07-22 Introduce Unit specification. 57 // 2010-07-22 Add weighted and divideByArea options 56 58 // 57 59 /////////////////////////////////////////////////////////////////////////////// … … 62 64 public: // with description 63 65 G4PSSphereSurfaceFlux(G4String name, G4int direction, G4int depth=0); 66 G4PSSphereSurfaceFlux(G4String name, G4int direction, 67 const G4String& unit, G4int depth=0); 64 68 virtual ~G4PSSphereSurfaceFlux(); 69 70 inline void Weighted(G4bool flg=true) { weighted = flg; } 71 // Multiply track weight 72 73 inline void DivideByArea(G4bool flg=true) { divideByArea = flg; } 74 // Divided by Area. 65 75 66 76 protected: // with description … … 75 85 virtual void PrintAll(); 76 86 87 virtual void SetUnit(const G4String& unit); 88 89 protected: 90 virtual void DefineUnitAndCategory(); 91 77 92 private: 78 93 G4int HCID; 79 94 G4int fDirection; 80 95 G4THitsMap<G4double>* EvtMap; 81 96 G4bool weighted; 97 G4bool divideByArea; 82 98 }; 83 99 -
trunk/source/digits_hits/scorer/include/G4PSSphereSurfaceFlux3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSSphereSurfaceFlux3D.hh,v 1. 2 2007/08/28 10:11:29taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSSphereSurfaceFlux3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 49 49 // 50 50 // Created: 2007-08-14 Tsukasa ASO 51 // 2010-07-22 Introduce Unit specification. 51 52 /////////////////////////////////////////////////////////////////////////////// 52 53 … … 56 57 public: // with description 57 58 G4PSSphereSurfaceFlux3D(G4String name, G4int direction, 59 G4int ni=1,G4int nj=1, G4int nk=1, 60 G4int depi=2, G4int depj=1, G4int depk=0); 61 62 G4PSSphereSurfaceFlux3D(G4String name, G4int direction, 63 const G4String& unit, 58 64 G4int ni=1,G4int nj=1, G4int nk=1, 59 65 G4int depi=2, G4int depj=1, G4int depk=0); -
trunk/source/digits_hits/scorer/include/G4PSTermination.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSTermination.hh,v 1. 2 2007/12/10 16:29:35 gunterExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSTermination.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 41 41 // 42 42 // Created: 2007-2-2 Tsukasa ASO, Akinori Kimura. 43 // 2010-07-22 Introduce Unit specification. 43 44 // 44 45 /////////////////////////////////////////////////////////////////////////////// … … 69 70 virtual void PrintAll(); 70 71 72 virtual void SetUnit(const G4String& unit); 73 71 74 private: 72 75 G4int HCID; -
trunk/source/digits_hits/scorer/include/G4PSTrackCounter.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSTrackCounter.hh,v 1. 2 2007/08/14 21:23:51taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSTrackCounter.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 42 42 // 43 43 // Created: 2007-02-02 Tsukasa ASO, Akinori Kimura. 44 // 2010-07-22 Introduce Unit specification. 44 45 // 45 46 /////////////////////////////////////////////////////////////////////////////// … … 69 70 virtual void PrintAll(); 70 71 72 virtual void SetUnit(const G4String& unit); 73 71 74 private: 72 75 G4int HCID; -
trunk/source/digits_hits/scorer/include/G4PSTrackCounter3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSTrackCounter3D.hh,v 1. 2 2007/08/28 10:11:29taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSTrackCounter3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 40 40 // 41 41 // Created: 2007-08-14 Tsukasa ASO 42 // 2010-07-22 Introduce Unit specification. 42 43 // 43 44 /////////////////////////////////////////////////////////////////////////////// -
trunk/source/digits_hits/scorer/include/G4PSTrackLength.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSTrackLength.hh,v 1. 2 2007/08/14 21:23:51taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSTrackLength.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 43 43 // Modified: 2007-02-02 Tsukasa ASO, Add MultiplyKineticEnergy() 44 44 // and DivideByVelocity(). 45 // 2010-07-22 Introduce Unit specification. 45 46 // 46 47 // … … 52 53 public: // with description 53 54 G4PSTrackLength(G4String name, G4int depth=0); 55 G4PSTrackLength(G4String name, const G4String& unit, G4int depth=0); 54 56 virtual ~G4PSTrackLength(); 55 57 … … 57 59 // Multiply track weight 58 60 59 inline void MultiplyKineticEnergy(G4bool flg=true) { multiplyKinE = flg; }61 void MultiplyKineticEnergy(G4bool flg=true); 60 62 // Multiply Kinetic Energy 61 63 62 inline void DivideByVelocity(G4bool flg=true) { divideByVelocity = flg; }64 void DivideByVelocity(G4bool flg=true); 63 65 // Divide by velocity 64 66 … … 74 76 virtual void PrintAll(); 75 77 78 virtual void SetUnit(const G4String& unit); 79 80 protected: 81 virtual void DefineUnitAndCategory(); 82 76 83 private: 77 84 G4int HCID; -
trunk/source/digits_hits/scorer/include/G4PSTrackLength3D.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSTrackLength3D.hh,v 1. 2 2007/08/28 10:11:29taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSTrackLength3D.hh,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 40 40 // 41 41 // Created: 2008-08-14 Tsukasa ASO 42 // 2010-07-22 Introduce Unit specification. 42 43 // 43 44 /////////////////////////////////////////////////////////////////////////////// … … 48 49 public: // with description 49 50 G4PSTrackLength3D(G4String name, 51 G4int ni=1,G4int nj=1, G4int nk=1, 52 G4int depi=2, G4int depj=1, G4int depk=0); 53 G4PSTrackLength3D(G4String name, const G4String& unit, 50 54 G4int ni=1,G4int nj=1, G4int nk=1, 51 55 G4int depi=2, G4int depj=1, G4int depk=0); -
trunk/source/digits_hits/scorer/include/G4SDParticleFilter.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4SDParticleFilter.hh,v 1. 2 2007/08/14 21:23:51taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4SDParticleFilter.hh,v 1.3 2010/07/23 00:59:33 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 48 48 // 49 49 // Created: 2005-11-14 Tsukasa ASO. 50 // 2010-07-22 T.Aso Filter for Ions 50 51 // 51 52 /////////////////////////////////////////////////////////////////////////////// … … 72 73 // set method for acceptable particle name. 73 74 // 75 void addIon(G4int Z, G4int A); 74 76 void show(); 75 77 76 78 private: 77 79 std::vector<G4ParticleDefinition*> thePdef; 80 std::vector<G4int> theIonZ; 81 std::vector<G4int> theIonA; 78 82 79 83 }; -
trunk/source/digits_hits/scorer/src/CVS/Entries
r1337 r1340 1 /G4PS CellCharge.cc/1.1/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-012 /G4PS CellCharge3D.cc/1.3/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-013 /G4PS CellFlux.cc/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-014 /G4PS CellFlux3D.cc/1.3/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-015 /G4 PSCylinderSurfaceCurrent.cc/1.3/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-016 /G4 PSCylinderSurfaceCurrent3D.cc/1.3/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-017 /G4 PSCylinderSurfaceFlux.cc/1.4/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-018 /G4 PSCylinderSurfaceFlux3D.cc/1.3/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-019 /G4PS DoseDeposit.cc/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-0110 /G4PS DoseDeposit3D.cc/1.3/Wed Sep 29 21:48:00 2010//Tgeant4-09-04-beta-0111 /G4PS EnergyDeposit.cc/1.1/Wed Sep 29 21:48:00 2010//Tgeant4-09-04-beta-0112 /G4PS EnergyDeposit3D.cc/1.3/Wed Sep 29 21:48:00 2010//Tgeant4-09-04-beta-0113 /G4PS FlatSurfaceCurrent.cc/1.3/Wed Sep 29 21:48:00 2010//Tgeant4-09-04-beta-0114 /G4PS FlatSurfaceCurrent3D.cc/1.3/Wed Sep 29 21:48:00 2010//Tgeant4-09-04-beta-0115 /G4PS FlatSurfaceFlux.cc/1.2/Wed Sep 29 21:48:00 2010//Tgeant4-09-04-beta-0116 /G4PS FlatSurfaceFlux3D.cc/1.3/Wed Sep 29 21:48:00 2010//Tgeant4-09-04-beta-0117 /G4PS MinKinEAtGeneration.cc/1.1/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-0118 /G4PS MinKinEAtGeneration3D.cc/1.3/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-0119 /G4PS NofCollision.cc/1.1/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-0120 /G4PS NofCollision3D.cc/1.3/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-0121 /G4PS NofSecondary.cc/1.2/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-0122 /G4PS NofSecondary3D.cc/1.3/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-0123 /G4PS NofStep.cc/1.2/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-0124 /G4PS NofStep3D.cc/1.3/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-0125 /G4PS PassageCellCurrent.cc/1.1/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-0126 /G4PS PassageCellCurrent3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0127 /G4PS PassageCellFlux.cc/1.2/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0128 /G4PS PassageCellFlux3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0129 /G4PS PassageTrackLength.cc/1.1/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0130 /G4PS PassageTrackLength3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0131 /G4PSP opulation.cc/1.1/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0132 /G4PSP opulation3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0133 /G4PS SphereSurfaceCurrent.cc/1.4/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0134 /G4PS SphereSurfaceCurrent3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0135 /G4PS SphereSurfaceFlux.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0136 /G4PS SphereSurfaceFlux3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0137 /G4PS Termination.cc/1.2/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0138 /G4PS Termination3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0139 /G4PS TrackCounter.cc/1.1/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0140 /G4PS TrackCounter3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-0141 /G4PS TrackLength.cc/1.1/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-0142 /G4PST rackLength3D.cc/1.3/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-0143 /G4 SDChargedFilter.cc/1.1/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-0144 /G4 SDKineticEnergyFilter.cc/1.1/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-0145 /G4 SDNeutralFilter.cc/1.1/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-0146 /G4 SDParticleFilter.cc/1.1/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-0147 /G4SDParticle WithEnergyFilter.cc/1.1/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-011 /G4PSNofCollision3D.cc/1.3/Wed Sep 29 21:48:12 2010// 2 /G4PSNofSecondary3D.cc/1.3/Wed Sep 29 21:48:12 2010// 3 /G4PSPopulation3D.cc/1.3/Wed Sep 29 21:48:14 2010// 4 /G4PSTermination3D.cc/1.3/Wed Sep 29 21:48:14 2010// 5 /G4SDChargedFilter.cc/1.1/Wed Sep 29 21:48:17 2010// 6 /G4SDKineticEnergyFilter.cc/1.1/Wed Sep 29 21:48:17 2010// 7 /G4SDNeutralFilter.cc/1.1/Wed Sep 29 21:48:17 2010// 8 /G4SDParticleWithEnergyFilter.cc/1.1/Wed Sep 29 21:48:17 2010// 9 /G4PSCellCharge.cc/1.2/Fri Nov 5 09:57:28 2010// 10 /G4PSCellCharge3D.cc/1.4/Fri Nov 5 09:57:28 2010// 11 /G4PSCellFlux.cc/1.4/Fri Nov 5 09:57:28 2010// 12 /G4PSCellFlux3D.cc/1.4/Fri Nov 5 09:57:28 2010// 13 /G4PSCylinderSurfaceCurrent.cc/1.5/Fri Nov 5 09:57:28 2010// 14 /G4PSCylinderSurfaceCurrent3D.cc/1.4/Fri Nov 5 09:57:28 2010// 15 /G4PSCylinderSurfaceFlux.cc/1.8/Fri Nov 5 09:57:28 2010// 16 /G4PSCylinderSurfaceFlux3D.cc/1.4/Fri Nov 5 09:57:28 2010// 17 /G4PSDoseDeposit.cc/1.5/Fri Nov 5 09:57:28 2010// 18 /G4PSDoseDeposit3D.cc/1.6/Fri Nov 5 09:57:28 2010// 19 /G4PSEnergyDeposit.cc/1.3/Fri Nov 5 09:57:28 2010// 20 /G4PSEnergyDeposit3D.cc/1.6/Fri Nov 5 09:57:28 2010// 21 /G4PSFlatSurfaceCurrent.cc/1.5/Fri Nov 5 09:57:28 2010// 22 /G4PSFlatSurfaceCurrent3D.cc/1.4/Fri Nov 5 09:57:28 2010// 23 /G4PSFlatSurfaceFlux.cc/1.6/Fri Nov 5 09:57:28 2010// 24 /G4PSFlatSurfaceFlux3D.cc/1.4/Fri Nov 5 09:57:28 2010// 25 /G4PSMinKinEAtGeneration.cc/1.2/Fri Nov 5 09:57:28 2010// 26 /G4PSMinKinEAtGeneration3D.cc/1.4/Fri Nov 5 09:57:28 2010// 27 /G4PSNofCollision.cc/1.3/Fri Nov 5 09:57:28 2010// 28 /G4PSNofSecondary.cc/1.5/Fri Nov 5 09:57:28 2010// 29 /G4PSNofStep.cc/1.4/Fri Nov 5 09:57:28 2010// 30 /G4PSNofStep3D.cc/1.4/Fri Nov 5 09:57:28 2010// 31 /G4PSPassageCellCurrent.cc/1.4/Fri Nov 5 09:57:28 2010// 32 /G4PSPassageCellCurrent3D.cc/1.4/Fri Nov 5 09:57:28 2010// 33 /G4PSPassageCellFlux.cc/1.4/Fri Nov 5 09:57:28 2010// 34 /G4PSPassageCellFlux3D.cc/1.4/Fri Nov 5 09:57:28 2010// 35 /G4PSPassageTrackLength.cc/1.2/Fri Nov 5 09:57:28 2010// 36 /G4PSPassageTrackLength3D.cc/1.4/Fri Nov 5 09:57:28 2010// 37 /G4PSPopulation.cc/1.3/Fri Nov 5 09:57:28 2010// 38 /G4PSSphereSurfaceCurrent.cc/1.6/Fri Nov 5 09:57:28 2010// 39 /G4PSSphereSurfaceCurrent3D.cc/1.4/Fri Nov 5 09:57:28 2010// 40 /G4PSSphereSurfaceFlux.cc/1.7/Fri Nov 5 09:57:28 2010// 41 /G4PSSphereSurfaceFlux3D.cc/1.4/Fri Nov 5 09:57:28 2010// 42 /G4PSTermination.cc/1.5/Fri Nov 5 09:57:28 2010// 43 /G4PSTrackCounter.cc/1.3/Fri Nov 5 09:57:28 2010// 44 /G4PSTrackCounter3D.cc/1.4/Fri Nov 5 09:57:28 2010// 45 /G4PSTrackLength.cc/1.2/Fri Nov 5 09:57:28 2010// 46 /G4PSTrackLength3D.cc/1.4/Fri Nov 5 09:57:28 2010// 47 /G4SDParticleFilter.cc/1.2/Fri Nov 5 09:57:28 2010// 48 48 D -
trunk/source/digits_hits/scorer/src/G4PSCellCharge.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PSCellCharge.cc,v 1. 1 2007/07/11 01:31:02 asaimExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4PSCellCharge.cc,v 1.2 2010/07/22 07:23:45 taso Exp $ 27 // GEANT4 tag $Name: $ 28 28 // 29 29 // G4PSCellCharge … … 38 38 // 39 39 // Created: 2006-08-20 Tsukasa ASO 40 // 2010-07-22 Introduce Unit specification. 40 41 // 41 42 /////////////////////////////////////////////////////////////////////////////// … … 43 44 G4PSCellCharge::G4PSCellCharge(G4String name, G4int depth) 44 45 :G4VPrimitiveScorer(name,depth),HCID(-1) 45 {;} 46 { 47 SetUnit("e+"); 48 } 49 50 G4PSCellCharge::G4PSCellCharge(G4String name, const G4String& unit, 51 G4int depth) 52 :G4VPrimitiveScorer(name,depth),HCID(-1) 53 { 54 SetUnit(unit); 55 } 46 56 47 57 G4PSCellCharge::~G4PSCellCharge() … … 99 109 for(; itr != EvtMap->GetMap()->end(); itr++) { 100 110 G4cout << " copy no.: " << itr->first 101 << " cell charge : " << *(itr->second) << " [e]" 111 << " cell charge : " << *(itr->second)/GetUnitValue() 112 << " [" << GetUnit() << "]" 102 113 << G4endl; 103 114 } 104 115 } 105 116 117 void G4PSCellCharge::SetUnit(const G4String& unit) 118 { 119 CheckAndSetUnit(unit,"Electric charge"); 120 } 121 122 -
trunk/source/digits_hits/scorer/src/G4PSCellCharge3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCellCharge3D.cc,v 1. 3 2007/08/29 06:36:41taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCellCharge3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSCellCharge3D … … 40 40 // 41 41 // Created: 2007-08-14 Tsukasa ASO 42 // 2010-07-22 Introduce Unit specification. 42 43 // 43 44 /////////////////////////////////////////////////////////////////////////////// … … 54 55 } 55 56 57 G4PSCellCharge3D::G4PSCellCharge3D(G4String name,const G4String& unit, 58 G4int ni, G4int nj, G4int nk, 59 G4int depi, G4int depj, G4int depk) 60 :G4PSCellCharge(name), 61 fDepthi(depi),fDepthj(depj),fDepthk(depk) 62 { 63 fNi=ni; 64 fNj=nj; 65 fNk=nk; 66 SetUnit(unit); 67 } 68 56 69 G4PSCellCharge3D::~G4PSCellCharge3D() 57 70 {;} -
trunk/source/digits_hits/scorer/src/G4PSCellFlux.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCellFlux.cc,v 1. 2 2008/12/28 20:32:00 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCellFlux.cc,v 1.4 2010/07/22 23:42:01 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSCellFlux … … 48 48 // 49 49 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 50 // 2010-07-22 Introduce Unit specification. 51 // 2010-07-22 Add weighted option 50 52 // 51 53 /////////////////////////////////////////////////////////////////////////////// 52 54 53 55 G4PSCellFlux::G4PSCellFlux(G4String name, G4int depth) 56 :G4VPrimitiveScorer(name,depth),HCID(-1),weighted(true) 57 { 58 DefineUnitAndCategory(); 59 SetUnit("percm2"); 60 } 61 62 G4PSCellFlux::G4PSCellFlux(G4String name, const G4String& unit, G4int depth) 54 63 :G4VPrimitiveScorer(name,depth),HCID(-1) 55 {;} 64 { 65 DefineUnitAndCategory(); 66 SetUnit(unit); 67 } 56 68 57 69 G4PSCellFlux::~G4PSCellFlux() … … 79 91 80 92 G4double CellFlux = stepLength / (solid->GetCubicVolume()); 81 CellFlux *= aStep->GetPreStepPoint()->GetWeight();93 if (weighted) CellFlux *= aStep->GetPreStepPoint()->GetWeight(); 82 94 G4int index = GetIndex(aStep); 83 95 EvtMap->add(index,CellFlux); … … 112 124 for(; itr != EvtMap->GetMap()->end(); itr++) { 113 125 G4cout << " copy no.: " << itr->first 114 << " cell flux : " << *(itr->second)*cm*cm << " [cm^-2]" 126 << " cell flux : " << *(itr->second)/GetUnitValue() 127 << " [" << GetUnit() << "]" 115 128 << G4endl; 116 129 } 117 130 } 118 131 132 void G4PSCellFlux::SetUnit(const G4String& unit) 133 { 134 CheckAndSetUnit(unit,"Per Unit Surface"); 135 } 136 137 void G4PSCellFlux::DefineUnitAndCategory(){ 138 // Per Unit Surface 139 new G4UnitDefinition("percentimeter2","percm2","Per Unit Surface",(1./cm2)); 140 new G4UnitDefinition("permillimeter2","permm2","Per Unit Surface",(1./mm2)); 141 new G4UnitDefinition("permeter2","perm2","Per Unit Surface",(1./m2)); 142 } -
trunk/source/digits_hits/scorer/src/G4PSCellFlux3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCellFlux3D.cc,v 1. 3 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCellFlux3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSCellFlux3D … … 44 44 // 45 45 // Created: 2007-08-14 Tsukasa ASO 46 // 2010-07-22 Introduce Unit specification. 46 47 // 47 48 /////////////////////////////////////////////////////////////////////////////// … … 58 59 } 59 60 61 G4PSCellFlux3D::G4PSCellFlux3D(G4String name,const G4String& unit, 62 G4int ni, G4int nj, G4int nk, 63 G4int depi, G4int depj, G4int depk) 64 :G4PSCellFlux(name), 65 fDepthi(depi),fDepthj(depj),fDepthk(depk) 66 { 67 fNi=ni; 68 fNj=nj; 69 fNk=nk; 70 SetUnit(unit); 71 } 72 60 73 G4PSCellFlux3D::~G4PSCellFlux3D() 61 74 {;} -
trunk/source/digits_hits/scorer/src/G4PSCylinderSurfaceCurrent.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCylinderSurfaceCurrent.cc,v 1. 3 2009/11/14 00:01:13 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCylinderSurfaceCurrent.cc,v 1.5 2010/07/23 04:35:38 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSCylinderSurfaceCurrent … … 49 49 // 50 50 // Created: 2007-03-21 Tsukasa ASO 51 // 2010-07-22 Introduce Unit specification. 51 52 // 52 53 /////////////////////////////////////////////////////////////////////////////// … … 57 58 :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction), 58 59 weighted(true),divideByArea(true) 59 {;} 60 { 61 DefineUnitAndCategory(); 62 SetUnit("percm2"); 63 } 64 65 G4PSCylinderSurfaceCurrent::G4PSCylinderSurfaceCurrent(G4String name, 66 G4int direction, 67 const G4String& unit, 68 G4int depth) 69 :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction), 70 weighted(true),divideByArea(true) 71 { 72 DefineUnitAndCategory(); 73 SetUnit(unit); 74 } 60 75 61 76 G4PSCylinderSurfaceCurrent::~G4PSCylinderSurfaceCurrent() … … 80 95 } 81 96 82 // if( solid->GetEntityType() != "G4Tubs" ){83 // G4Exception("G4PSCylinderSurfaceCurrentScorer. - Solid type is not supported.");84 // return FALSE;85 // }86 97 G4Tubs* tubsSolid = (G4Tubs*)(solid); 87 98 … … 122 133 theTouchable->GetHistory()->GetTopTransform().TransformPoint(stppos1); 123 134 if ( std::fabs(localpos1.z()) > tubsSolid->GetZHalfLength() ) return -1; 124 //if(std::fabs( localpos1.x()*localpos1.x()+localpos1.y()*localpos1.y()125 // -(tubsSolid->GetInnerRadius()*tubsSolid->GetInnerRadius()))126 // < kCarTolerance ){127 135 G4double localR2 = localpos1.x()*localpos1.x()+localpos1.y()*localpos1.y(); 128 136 G4double InsideRadius = tubsSolid->GetInnerRadius(); … … 139 147 theTouchable->GetHistory()->GetTopTransform().TransformPoint(stppos2); 140 148 if ( std::fabs(localpos2.z()) > tubsSolid->GetZHalfLength() ) return -1; 141 //if(std::fabs( localpos2.x()*localpos2.x()+localpos2.y()*localpos2.y()142 // - (tubsSolid->GetInnerRadius()*tubsSolid->GetInnerRadius()))143 // <kCarTolerance ){144 149 G4double localR2 = localpos2.x()*localpos2.x()+localpos2.y()*localpos2.y(); 145 150 G4double InsideRadius = tubsSolid->GetInnerRadius(); … … 179 184 G4cout << " copy no.: " << itr->first 180 185 << " current : " ; 181 if ( divideByArea ) G4cout << *(itr->second)*cm*cm << " [/cm2]"; 182 else G4cout << *(itr->second) << " [track]"; 186 if ( divideByArea ) { 187 G4cout << *(itr->second)/GetUnitValue() 188 << " ["<<GetUnit()<<"]"; 189 } else { 190 G4cout << *(itr->second) << " [tracks]"; 191 } 183 192 G4cout << G4endl; 184 193 } 185 194 } 186 195 196 void G4PSCylinderSurfaceCurrent::SetUnit(const G4String& unit) 197 { 198 if ( divideByArea ) { 199 CheckAndSetUnit(unit,"Per Unit Surface"); 200 } else { 201 if (unit == "" ){ 202 unitName = unit; 203 unitValue = 1.0; 204 }else{ 205 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 206 G4Exception(GetName(),"DetScorer0000",JustWarning,msg); 207 } 208 } 209 } 210 211 void G4PSCylinderSurfaceCurrent::DefineUnitAndCategory(){ 212 // Per Unit Surface 213 new G4UnitDefinition("percentimeter2","percm2","Per Unit Surface",(1./cm2)); 214 new G4UnitDefinition("permillimeter2","permm2","Per Unit Surface",(1./mm2)); 215 new G4UnitDefinition("permeter2","perm2","Per Unit Surface",(1./m2)); 216 } 217 -
trunk/source/digits_hits/scorer/src/G4PSCylinderSurfaceCurrent3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCylinderSurfaceCurrent3D.cc,v 1. 3 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCylinderSurfaceCurrent3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSCylinderSurfaceCurrent3D … … 47 47 // 48 48 // Created: 2008-08-14 Tsukasa ASO 49 // 2010-07-22 Introduce Unit specification. 49 50 /////////////////////////////////////////////////////////////////////////////// 50 51 … … 61 62 } 62 63 64 G4PSCylinderSurfaceCurrent3D::G4PSCylinderSurfaceCurrent3D(G4String name, 65 G4int direction, 66 const G4String& unit, 67 G4int ni, G4int nj, G4int nk, 68 G4int di, G4int dj, G4int dk) 69 :G4PSCylinderSurfaceCurrent(name,direction), 70 fDepthi(di),fDepthj(dj),fDepthk(dk) 71 { 72 fNi=ni; 73 fNj=nj; 74 fNk=nk; 75 SetUnit(unit); 76 } 77 63 78 G4PSCylinderSurfaceCurrent3D::~G4PSCylinderSurfaceCurrent3D() 64 79 {;} -
trunk/source/digits_hits/scorer/src/G4PSCylinderSurfaceFlux.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCylinderSurfaceFlux.cc,v 1. 4 2009/11/14 00:01:13 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCylinderSurfaceFlux.cc,v 1.8 2010/07/23 04:35:38 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // // G4PSCylinderSurfaceFlux … … 50 50 // 51 51 // Created: 2007-03-29 Tsukasa ASO 52 // 2010-07-22 Introduce Unit specification. 53 // 2010-07-22 Add weighted and divideByArea options 52 54 /////////////////////////////////////////////////////////////////////////////// 53 55 54 56 G4PSCylinderSurfaceFlux::G4PSCylinderSurfaceFlux(G4String name, 55 57 G4int direction, G4int depth) 58 :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction), 59 weighted(true),divideByArea(true) 60 { 61 DefineUnitAndCategory(); 62 SetUnit("percm2"); 63 } 64 65 G4PSCylinderSurfaceFlux::G4PSCylinderSurfaceFlux(G4String name, 66 G4int direction, 67 const G4String& unit, 68 G4int depth) 56 69 :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction) 57 {;} 70 { 71 DefineUnitAndCategory(); 72 SetUnit(unit); 73 } 58 74 59 75 G4PSCylinderSurfaceFlux::~G4PSCylinderSurfaceFlux() … … 80 96 } 81 97 82 // if( solid->GetEntityType() != "G4Tubs" ){83 // G4Exception("G4PSCylinderSurfaceFluxScorer. - Solid type is not supported.");84 // return FALSE;85 // }86 98 G4Tubs* tubsSolid = (G4Tubs*)(solid); 87 99 … … 116 128 *tubsSolid->GetInnerRadius()* tubsSolid->GetDeltaPhiAngle()/radian; 117 129 118 G4double flux = preStep->GetWeight(); 130 G4double flux = 1.0; 131 if ( weighted ) flux *=preStep->GetWeight(); 119 132 // Current (Particle Weight) 120 133 121 flux = flux/angleFactor/square; 134 flux = flux/angleFactor; 135 if ( divideByArea ) flux /= square; 122 136 //Flux with angle. 123 137 G4int index = GetIndex(aStep); … … 201 215 for(; itr != EvtMap->GetMap()->end(); itr++) { 202 216 G4cout << " copy no.: " << itr->first 203 << " flux : " << *(itr->second)*cm*cm << " [cm^-2]" 217 << " flux : " << *(itr->second)/GetUnitValue() 218 << " ["<<GetUnit()<<"]" 204 219 << G4endl; 205 220 } 206 221 } 207 222 223 void G4PSCylinderSurfaceFlux::SetUnit(const G4String& unit) 224 { 225 if ( divideByArea ) { 226 CheckAndSetUnit(unit,"Per Unit Surface"); 227 } else { 228 if (unit == "" ){ 229 unitName = unit; 230 unitValue = 1.0; 231 }else{ 232 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 233 G4Exception(GetName(),"DetScorer0000",JustWarning,msg); 234 } 235 } 236 } 237 238 void G4PSCylinderSurfaceFlux::DefineUnitAndCategory(){ 239 // Per Unit Surface 240 new G4UnitDefinition("percentimeter2","percm2","Per Unit Surface",(1./cm2)); 241 new G4UnitDefinition("permillimeter2","permm2","Per Unit Surface",(1./mm2)); 242 new G4UnitDefinition("permeter2","perm2","Per Unit Surface",(1./m2)); 243 } 244 245 -
trunk/source/digits_hits/scorer/src/G4PSCylinderSurfaceFlux3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSCylinderSurfaceFlux3D.cc,v 1. 3 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSCylinderSurfaceFlux3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSCylinderSurfaceFlux3D … … 47 47 // 48 48 // Created: 2008-08-14 Tsukasa ASO 49 // 2010-07-22 Introduce Unit specification. 49 50 /////////////////////////////////////////////////////////////////////////////// 50 51 … … 61 62 } 62 63 64 G4PSCylinderSurfaceFlux3D::G4PSCylinderSurfaceFlux3D(G4String name, 65 G4int direction, 66 const G4String& unit, 67 G4int ni, G4int nj, G4int nk, 68 G4int di, G4int dj, G4int dk) 69 :G4PSCylinderSurfaceFlux(name,direction), 70 fDepthi(di),fDepthj(dj),fDepthk(dk) 71 { 72 fNi=ni; 73 fNj=nj; 74 fNk=nk; 75 SetUnit(unit); 76 } 77 63 78 G4PSCylinderSurfaceFlux3D::~G4PSCylinderSurfaceFlux3D() 64 79 {;} -
trunk/source/digits_hits/scorer/src/G4PSDoseDeposit.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSDoseDeposit.cc,v 1. 2 2008/12/28 20:32:00asaim Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSDoseDeposit.cc,v 1.5 2010/09/16 06:44:44 asaim Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSDoseDeposit … … 41 41 // 42 42 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 43 // 2010-07-22 Introduce Unit specification. 43 44 // 44 45 /////////////////////////////////////////////////////////////////////////////// … … 46 47 G4PSDoseDeposit::G4PSDoseDeposit(G4String name, G4int depth) 47 48 :G4VPrimitiveScorer(name,depth),HCID(-1) 48 {;} 49 { 50 SetUnit("Gy"); 51 } 52 53 G4PSDoseDeposit::G4PSDoseDeposit(G4String name, const G4String& unit, 54 G4int depth) 55 :G4VPrimitiveScorer(name,depth),HCID(-1) 56 { 57 SetUnit(unit); 58 } 49 59 50 60 G4PSDoseDeposit::~G4PSDoseDeposit() … … 63 73 G4int idx = ((G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable())) 64 74 ->GetReplicaNumber(indexDepth); 75 if(idx<0) 76 { 77 G4Exception("G4PSDoseDeposit","G4PSDoseDeposit::ProcessHits",JustWarning, 78 "Incorrect replica number"); 79 G4cerr << " --- GetReplicaNumber : " << idx << G4endl; 80 } 65 81 solid = physParam->ComputeSolid(idx, physVol); 66 82 solid->ComputeDimensions(physParam,idx,physVol); … … 71 87 } 72 88 73 G4double density = aStep->GetTrack()->Get Material()->GetDensity();89 G4double density = aStep->GetTrack()->GetStep()->GetPreStepPoint()->GetMaterial()->GetDensity(); 74 90 G4double dose = edep / ( density * (solid->GetCubicVolume()) ); 75 91 dose *= aStep->GetPreStepPoint()->GetWeight(); … … 106 122 for(; itr != EvtMap->GetMap()->end(); itr++) { 107 123 G4cout << " copy no.: " << itr->first 108 << " dose deposit: " << G4BestUnit(*(itr->second),"Dose") 124 << " dose deposit: " 125 << *(itr->second)/GetUnitValue() 126 << " ["<<GetUnit() <<"]" 109 127 << G4endl; 110 128 } 111 129 } 112 130 131 void G4PSDoseDeposit::SetUnit(const G4String& unit) 132 { 133 CheckAndSetUnit(unit,"Dose"); 134 } 135 136 137 -
trunk/source/digits_hits/scorer/src/G4PSDoseDeposit3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSDoseDeposit3D.cc,v 1. 3 2007/08/29 06:36:42 taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSDoseDeposit3D.cc,v 1.6 2010/09/16 14:58:34 gcosmo Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSDoseDeposit3D … … 36 36 // 37 37 // Created: 2008-08-14 Tsukasa ASO 38 // 2010-07-22 Introduce Unit specification. 38 39 // 39 40 /////////////////////////////////////////////////////////////////////////////// … … 50 51 } 51 52 53 G4PSDoseDeposit3D::G4PSDoseDeposit3D(G4String name, 54 const G4String& unit, 55 G4int ni, G4int nj, G4int nk, 56 G4int di, G4int dj, G4int dk) 57 :G4PSDoseDeposit(name), 58 fDepthi(di),fDepthj(dj),fDepthk(dk) 59 { 60 fNi=ni; 61 fNj=nj; 62 fNk=nk; 63 SetUnit(unit); 64 } 65 52 66 G4PSDoseDeposit3D::~G4PSDoseDeposit3D() 53 67 {;} … … 60 74 G4int k = touchable->GetReplicaNumber(fDepthk); 61 75 76 if(i<0) 77 { 78 G4Exception("G4PSEnergyDeposit3D","G4PSEnergyDeposit3D::GetIndex",JustWarning, 79 "GetReplicaNumber is negative"); 80 G4cerr << "touchable->GetReplicaNumber(fDepthi) returns " << i << G4endl 81 << "for volume: " << touchable->GetVolume(fDepthi)->GetName() 82 << G4endl; 83 } 84 if(j<0) 85 { 86 G4Exception("G4PSEnergyDeposit3D","G4PSEnergyDeposit3D::GetIndex",JustWarning, 87 "GetReplicaNumber is negative"); 88 G4cerr << "touchable->GetReplicaNumber(fDepthj) returns " << j << G4endl 89 << "for volume: " << touchable->GetVolume(fDepthj)->GetName() 90 << G4endl; 91 } 92 if(k<0) 93 { 94 G4Exception("G4PSEnergyDeposit3D","G4PSEnergyDeposit3D::GetIndex",JustWarning, 95 "GetReplicaNumber is negative"); 96 G4cerr << "touchable->GetReplicaNumber(fDepthk) returns " << k << G4endl 97 << "for volume: " << touchable->GetVolume(fDepthk)->GetName() 98 << G4endl; 99 } 100 62 101 return i*fNj*fNk+j*fNk+k; 63 102 } -
trunk/source/digits_hits/scorer/src/G4PSEnergyDeposit.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSEnergyDeposit.cc,v 1. 1 2007/07/11 01:31:02 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSEnergyDeposit.cc,v 1.3 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSEnergyDeposit … … 36 36 // 37 37 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 38 // 2010-07-22 Introduce Unit specification. 38 39 // 39 40 /////////////////////////////////////////////////////////////////////////////// 40 41 41 42 G4PSEnergyDeposit::G4PSEnergyDeposit(G4String name, G4int depth) 43 :G4VPrimitiveScorer(name,depth),HCID(-1) 44 { 45 SetUnit("MeV"); 46 } 47 48 G4PSEnergyDeposit::G4PSEnergyDeposit(G4String name, const G4String& unit, 49 G4int depth) 42 50 :G4VPrimitiveScorer(name,depth),HCID(-1) 43 {;} 51 { 52 SetUnit(unit); 53 } 44 54 45 55 G4PSEnergyDeposit::~G4PSEnergyDeposit() … … 83 93 for(; itr != EvtMap->GetMap()->end(); itr++) { 84 94 G4cout << " copy no.: " << itr->first 85 << " energy deposit: " << G4BestUnit(*(itr->second),"Energy") 95 << " energy deposit: " 96 << *(itr->second)/GetUnitValue() 97 << " [" << GetUnit()<<"]" 86 98 << G4endl; 87 99 } 88 100 } 101 102 void G4PSEnergyDeposit::SetUnit(const G4String& unit) 103 { 104 CheckAndSetUnit(unit,"Energy"); 105 } -
trunk/source/digits_hits/scorer/src/G4PSEnergyDeposit3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSEnergyDeposit3D.cc,v 1. 3 2007/08/29 06:36:42 taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSEnergyDeposit3D.cc,v 1.6 2010/09/16 14:58:34 gcosmo Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSEnergyDeposit3D … … 49 49 } 50 50 51 G4PSEnergyDeposit3D::G4PSEnergyDeposit3D(G4String name, const G4String& unit, 52 G4int ni, G4int nj, G4int nk, 53 G4int depi, G4int depj, G4int depk) 54 :G4PSEnergyDeposit(name), 55 fDepthi(depi),fDepthj(depj),fDepthk(depk) 56 { 57 fNi=ni; 58 fNj=nj; 59 fNk=nk; 60 SetUnit(unit); 61 } 62 51 63 G4PSEnergyDeposit3D::~G4PSEnergyDeposit3D() 52 64 {;} … … 59 71 G4int k = touchable->GetReplicaNumber(fDepthk); 60 72 73 if(i<0) 74 { 75 G4Exception("G4PSEnergyDeposit3D","G4PSEnergyDeposit3D::GetIndex",JustWarning, 76 "GetReplicaNumber is negative"); 77 G4cerr << "touchable->GetReplicaNumber(fDepthi) returns " << i << G4endl 78 << "for volume: " << touchable->GetVolume(fDepthi)->GetName() 79 << G4endl; 80 } 81 if(j<0) 82 { 83 G4Exception("G4PSEnergyDeposit3D","G4PSEnergyDeposit3D::GetIndex",JustWarning, 84 "GetReplicaNumber is negative"); 85 G4cerr << "touchable->GetReplicaNumber(fDepthj) returns " << j << G4endl 86 << "for volume: " << touchable->GetVolume(fDepthj)->GetName() 87 << G4endl; 88 } 89 if(k<0) 90 { 91 G4Exception("G4PSEnergyDeposit3D","G4PSEnergyDeposit3D::GetIndex",JustWarning, 92 "GetReplicaNumber is negative"); 93 G4cerr << "touchable->GetReplicaNumber(fDepthk) returns " << k << G4endl 94 << "for volume: " << touchable->GetVolume(fDepthk)->GetName() 95 << G4endl; 96 97 } 98 61 99 return i*fNj*fNk+j*fNk+k; 62 100 } -
trunk/source/digits_hits/scorer/src/G4PSFlatSurfaceCurrent.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSFlatSurfaceCurrent.cc,v 1. 3 2008/12/29 00:17:14 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSFlatSurfaceCurrent.cc,v 1.5 2010/07/23 04:35:38 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSFlatSurfaceCurrent … … 51 51 // 17-Nov-2005 T.Aso, Bug fix for area definition. 52 52 // 31-Mar-2007 T.Aso, Add option for normalizing by the area. 53 // 2010-07-22 Introduce Unit specification. 53 54 // 54 55 /////////////////////////////////////////////////////////////////////////////// … … 59 60 :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction), 60 61 weighted(true),divideByArea(true) 61 {;} 62 { 63 DefineUnitAndCategory(); 64 SetUnit("percm2"); 65 } 66 67 G4PSFlatSurfaceCurrent::G4PSFlatSurfaceCurrent(G4String name, 68 G4int direction, 69 const G4String& unit, 70 G4int depth) 71 :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction), 72 weighted(true),divideByArea(true) 73 { 74 DefineUnitAndCategory(); 75 SetUnit(unit); 76 } 62 77 63 78 G4PSFlatSurfaceCurrent::~G4PSFlatSurfaceCurrent() … … 82 97 } 83 98 84 // if( solid->GetEntityType() != "G4Box" ){85 // G4Exception("G4PSFlatSurfaceCurrentScorer. - Solid type is not supported.");86 // return FALSE;87 // }88 99 G4Box* boxSolid = (G4Box*)(solid); 89 100 … … 160 171 for(; itr != EvtMap->GetMap()->end(); itr++) { 161 172 G4cout << " copy no.: " << itr->first << " current : " ; 162 if ( divideByArea ) G4cout << *(itr->second)*cm*cm << " [/cm2] "; 163 else G4cout << *(itr->second) << " [track]"; 173 if ( divideByArea ) { 174 G4cout << *(itr->second)/GetUnitValue() 175 << " ["<<GetUnit()<<"]"; 176 }else { 177 G4cout << *(itr->second)/GetUnitValue() << " [tracks]"; 178 } 164 179 G4cout << G4endl; 165 180 } 166 181 } 167 182 183 void G4PSFlatSurfaceCurrent::SetUnit(const G4String& unit) 184 { 185 if ( divideByArea ) { 186 CheckAndSetUnit(unit,"Per Unit Surface"); 187 } else { 188 if (unit == "" ){ 189 unitName = unit; 190 unitValue = 1.0; 191 }else{ 192 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 193 G4Exception(GetName(),"DetScorer0000",JustWarning,msg); 194 } 195 } 196 } 197 198 void G4PSFlatSurfaceCurrent::DefineUnitAndCategory(){ 199 // Per Unit Surface 200 new G4UnitDefinition("percentimeter2","percm2","Per Unit Surface",(1./cm2)); 201 new G4UnitDefinition("permillimeter2","permm2","Per Unit Surface",(1./mm2)); 202 new G4UnitDefinition("permeter2","perm2","Per Unit Surface",(1./m2)); 203 } 204 -
trunk/source/digits_hits/scorer/src/G4PSFlatSurfaceCurrent3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSFlatSurfaceCurrent3D.cc,v 1. 3 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSFlatSurfaceCurrent3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSFlatSurfaceCurrent3D … … 47 47 // 48 48 // Created: 2008-08-14 Tsukasa ASO 49 // 2010-07-22 Introduce Unit specification. 49 50 /////////////////////////////////////////////////////////////////////////////// 50 51 … … 62 63 } 63 64 65 G4PSFlatSurfaceCurrent3D::G4PSFlatSurfaceCurrent3D(G4String name, G4int direction, 66 const G4String& unit, 67 G4int ni, G4int nj, G4int nk, 68 G4int di, G4int dj, G4int dk) 69 70 :G4PSFlatSurfaceCurrent(name,direction), 71 fDepthi(di),fDepthj(dj),fDepthk(dk) 72 { 73 fNi=ni; 74 fNj=nj; 75 fNk=nk; 76 SetUnit(unit); 77 } 78 64 79 G4PSFlatSurfaceCurrent3D::~G4PSFlatSurfaceCurrent3D() 65 80 {;} -
trunk/source/digits_hits/scorer/src/G4PSFlatSurfaceFlux.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSFlatSurfaceFlux.cc,v 1. 2 2008/12/29 00:17:14 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSFlatSurfaceFlux.cc,v 1.6 2010/07/23 04:35:38 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSFlatSurfaceFlux … … 53 53 // 18-Nov-2005 T.Aso, To use always positive value for anglefactor. 54 54 // 29-Mar-2007 T.Aso, Bug fix for momentum direction at outgoing flux. 55 // 2010-07-22 Introduce Unit specification. 56 // 2010-07-22 Add weighted and divideByAre options 55 57 /////////////////////////////////////////////////////////////////////////////// 56 58 57 59 G4PSFlatSurfaceFlux::G4PSFlatSurfaceFlux(G4String name, 58 60 G4int direction, G4int depth) 61 :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction), 62 weighted(true),divideByArea(true) 63 { 64 DefineUnitAndCategory(); 65 SetUnit("percm2"); 66 } 67 68 G4PSFlatSurfaceFlux::G4PSFlatSurfaceFlux(G4String name, 69 G4int direction, 70 const G4String& unit, 71 G4int depth) 59 72 :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction) 60 {;} 73 { 74 DefineUnitAndCategory(); 75 SetUnit(unit); 76 } 61 77 62 78 G4PSFlatSurfaceFlux::~G4PSFlatSurfaceFlux() … … 81 97 } 82 98 83 // if( solid->GetEntityType() != "G4Box" ){84 // G4Exception("G4PSFlatSurfaceFluxScorer. - Solid type is not supported.");85 // return FALSE;86 // }87 99 G4Box* boxSolid = (G4Box*)(solid); 88 100 … … 107 119 G4double angleFactor = localdir.z(); 108 120 if ( angleFactor < 0 ) angleFactor *= -1.; 109 G4double flux = preStep->GetWeight(); // Current (Particle Weight) 121 G4double flux = 1.0; 122 if ( weighted ) flux *=preStep->GetWeight(); // Current (Particle Weight) 110 123 // 111 124 G4double square = 4.*boxSolid->GetXHalfLength()*boxSolid->GetYHalfLength(); 112 125 // 113 flux = flux/angleFactor/square; // Flux with angle. 126 flux = flux/angleFactor; // Flux with angle. 127 if ( divideByArea ) flux /= square; 114 128 // 115 129 G4int index = GetIndex(aStep); … … 180 194 for(; itr != EvtMap->GetMap()->end(); itr++) { 181 195 G4cout << " copy no.: " << itr->first 182 << " flux : " << *(itr->second)*cm*cm << " [cm^-2]" 196 << " flux : " << *(itr->second)/GetUnitValue() 197 << " [" << GetUnit() <<"]" 183 198 << G4endl; 184 199 } 185 200 } 186 201 202 void G4PSFlatSurfaceFlux::SetUnit(const G4String& unit) 203 { 204 if ( divideByArea ) { 205 CheckAndSetUnit(unit,"Per Unit Surface"); 206 } else { 207 if (unit == "" ){ 208 unitName = unit; 209 unitValue = 1.0; 210 }else{ 211 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 212 G4Exception(GetName(),"DetScorer0000",JustWarning,msg); 213 } 214 } 215 } 216 217 void G4PSFlatSurfaceFlux::DefineUnitAndCategory(){ 218 // Per Unit Surface 219 new G4UnitDefinition("percentimeter2","percm2","Per Unit Surface",(1./cm2)); 220 new G4UnitDefinition("permillimeter2","permm2","Per Unit Surface",(1./mm2)); 221 new G4UnitDefinition("permeter2","perm2","Per Unit Surface",(1./m2)); 222 } 223 224 -
trunk/source/digits_hits/scorer/src/G4PSFlatSurfaceFlux3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSFlatSurfaceFlux3D.cc,v 1. 3 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSFlatSurfaceFlux3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSFlatSurfaceFlux3D … … 48 48 // 49 49 // Created: 2007-08-14 Tsukasa ASO 50 // 2010-07-22 Introduce Unit specification. 50 51 // 51 52 /////////////////////////////////////////////////////////////////////////////// … … 62 63 } 63 64 65 G4PSFlatSurfaceFlux3D::G4PSFlatSurfaceFlux3D(G4String name, G4int direction, 66 const G4String& unit, 67 G4int ni, G4int nj, G4int nk, 68 G4int di, G4int dj, G4int dk) 69 :G4PSFlatSurfaceFlux(name,direction), 70 fDepthi(di),fDepthj(dj),fDepthk(dk) 71 { 72 fNi=ni; 73 fNj=nj; 74 fNk=nk; 75 SetUnit(unit); 76 } 77 64 78 G4PSFlatSurfaceFlux3D::~G4PSFlatSurfaceFlux3D() 65 79 {;} -
trunk/source/digits_hits/scorer/src/G4PSMinKinEAtGeneration.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSMinKinEAtGeneration.cc,v 1. 1 2007/07/11 01:31:02 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSMinKinEAtGeneration.cc,v 1.2 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSMinKinEAtGeneration … … 37 37 // 38 38 // Created: 2005-11-17 Tsukasa ASO, Akinori Kimura. 39 // 2010-07-22 Introduce Unit specification. 39 40 // 40 41 41 42 G4PSMinKinEAtGeneration::G4PSMinKinEAtGeneration(G4String name, G4int depth) 42 43 :G4VPrimitiveScorer(name,depth),HCID(-1) 43 {;} 44 { 45 SetUnit("MeV"); 46 } 47 48 G4PSMinKinEAtGeneration::G4PSMinKinEAtGeneration(G4String name, 49 const G4String& unit, 50 G4int depth) 51 :G4VPrimitiveScorer(name,depth),HCID(-1) 52 { 53 SetUnit(unit); 54 } 44 55 45 56 G4PSMinKinEAtGeneration::~G4PSMinKinEAtGeneration() … … 110 121 for(; itr != EvtMap->GetMap()->end(); itr++) { 111 122 G4cout << " copy no.: " << itr->first 112 << " num of step: " << G4BestUnit(*(itr->second),"Energy") 123 << " num of step: " << *(itr->second)/GetUnitValue() 124 << " ["<<GetUnit()<<"]" 113 125 << G4endl; 114 126 } 115 127 } 116 128 129 void G4PSMinKinEAtGeneration::SetUnit(const G4String& unit) 130 { 131 CheckAndSetUnit(unit,"Energy"); 132 } 133 134 -
trunk/source/digits_hits/scorer/src/G4PSMinKinEAtGeneration3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSMinKinEAtGeneration3D.cc,v 1. 3 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSMinKinEAtGeneration3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSMinKinEAtGeneration3D … … 37 37 // 38 38 // Created: 2007-08-14 Tsukasa ASO 39 // 2010-07-22 Introduce Unit specification. 39 40 // 40 41 // … … 52 53 } 53 54 55 G4PSMinKinEAtGeneration3D::G4PSMinKinEAtGeneration3D(G4String name, 56 const G4String& unit, 57 G4int ni, G4int nj, G4int nk, 58 G4int depi, G4int depj, G4int depk) 59 :G4PSMinKinEAtGeneration(name), 60 fDepthi(depi),fDepthj(depj),fDepthk(depk) 61 { 62 fNi=ni; 63 fNj=nj; 64 fNk=nk; 65 SetUnit(unit); 66 } 67 54 68 G4PSMinKinEAtGeneration3D::~G4PSMinKinEAtGeneration3D() 55 69 {;} -
trunk/source/digits_hits/scorer/src/G4PSNofCollision.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSNofCollision.cc,v 1. 1 2007/07/11 01:31:02 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSNofCollision.cc,v 1.3 2010/07/23 04:35:38 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSNofCollision … … 37 37 // 38 38 // Created: 2007-02-02 Tsukasa ASO, Akinori Kimura. 39 // 2010-07-22 Introduce Unit specification. 39 40 // 40 41 /////////////////////////////////////////////////////////////////////////////// … … 42 43 G4PSNofCollision::G4PSNofCollision(G4String name, G4int depth) 43 44 :G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false) 44 {;} 45 { 46 SetUnit(""); 47 } 45 48 46 49 G4PSNofCollision::~G4PSNofCollision() … … 83 86 for(; itr != EvtMap->GetMap()->end(); itr++) { 84 87 G4cout << " copy no.: " << itr->first 85 << " collisions: " << *(itr->second) 88 << " collisions: " << *(itr->second)/GetUnitValue() 89 << " [collision] " 86 90 << G4endl; 87 91 } 88 92 } 89 93 94 95 void G4PSNofCollision::SetUnit(const G4String& unit) 96 { 97 if (unit == "" ){ 98 unitName = unit; 99 unitValue = 1.0; 100 }else{ 101 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 102 G4Exception(GetName(),"DetScorer0000",JustWarning,msg); 103 } 104 } 105 106 -
trunk/source/digits_hits/scorer/src/G4PSNofSecondary.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSNofSecondary.cc,v 1. 2 2007/08/14 21:23:51taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSNofSecondary.cc,v 1.5 2010/07/23 04:35:38 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSNofSecondary … … 39 39 40 40 G4PSNofSecondary::G4PSNofSecondary(G4String name, G4int depth) 41 :G4VPrimitiveScorer(name,depth),HCID(-1),particleDef(0) 41 :G4VPrimitiveScorer(name,depth),HCID(-1),particleDef(0), 42 weighted(true) 42 43 {;} 43 44 … … 57 58 //- This is a newly produced secondary particle. 58 59 G4int index = GetIndex(aStep); 59 G4double weight = aStep->GetPreStepPoint()->GetWeight(); 60 G4double weight = 1.0; 61 if ( weighted ) weight *= aStep->GetPreStepPoint()->GetWeight(); 60 62 EvtMap->add(index,weight); 61 63 return TRUE; … … 99 101 for(; itr != EvtMap->GetMap()->end(); itr++) { 100 102 G4cout << " copy no.: " << itr->first 101 << " num of step: " << *(itr->second) 103 << " num of step: " << *(itr->second)/GetUnitValue() 102 104 << G4endl; 103 105 } 104 106 } 105 107 108 void G4PSNofSecondary::SetUnit(const G4String& unit) 109 { 110 if (unit == "" ){ 111 unitName = unit; 112 unitValue = 1.0; 113 }else{ 114 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 115 G4Exception(GetName(),"DetScorer0000",JustWarning,msg); 116 } 117 } 118 -
trunk/source/digits_hits/scorer/src/G4PSNofStep.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSNofStep.cc,v 1. 2 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSNofStep.cc,v 1.4 2010/07/23 04:35:38 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSNofStep 31 31 #include "G4PSNofStep.hh" 32 #include "G4UnitsTable.hh" 32 33 33 34 // (Description) … … 36 37 // 37 38 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 39 // 2010-07-22 Introduce Unit specification. 38 40 // 39 41 40 42 G4PSNofStep::G4PSNofStep(G4String name, G4int depth) 41 43 :G4VPrimitiveScorer(name,depth),HCID(-1),boundaryFlag(false) 42 {;} 44 { 45 SetUnit(""); 46 } 43 47 44 48 G4PSNofStep::~G4PSNofStep() … … 82 86 G4cout << " copy no.: " << itr->first 83 87 << " num of step: " << *(itr->second) 88 << " [steps] " 84 89 << G4endl; 85 90 } 86 91 } 87 92 93 void G4PSNofStep::SetUnit(const G4String& unit) 94 { 95 if (unit == "" ){ 96 unitName = unit; 97 unitValue = 1.0; 98 }else{ 99 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 100 G4Exception(GetName(),"DetScorer0000",JustWarning,msg); 101 } 102 103 } 104 105 -
trunk/source/digits_hits/scorer/src/G4PSNofStep3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSNofStep3D.cc,v 1. 3 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSNofStep3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSNofStep3D -
trunk/source/digits_hits/scorer/src/G4PSPassageCellCurrent.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPassageCellCurrent.cc,v 1. 1 2007/08/14 21:30:46taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPassageCellCurrent.cc,v 1.4 2010/07/23 04:35:38 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSPassageCellCurrent … … 41 41 // 42 42 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 43 // 2010-07-22 Introduce Unit specification. 44 // 2010-07-22 Add weighted option 43 45 // 44 46 /////////////////////////////////////////////////////////////////////////////// … … 47 49 :G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fCurrent(0), 48 50 weighted(true) 49 {;} 51 { 52 SetUnit(""); 53 } 50 54 51 55 G4PSPassageCellCurrent::~G4PSPassageCellCurrent() … … 118 122 G4cout << " copy no.: " << itr->first 119 123 << " cell current : " << *(itr->second) 124 << " [tracks] " 120 125 << G4endl; 121 126 } 122 127 } 123 128 129 void G4PSPassageCellCurrent::SetUnit(const G4String& unit) 130 { 131 if (unit == "" ){ 132 unitName = unit; 133 unitValue = 1.0; 134 }else{ 135 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 136 G4Exception(GetName(),"DetScorer0000",JustWarning,msg); 137 } 138 } 139 140 -
trunk/source/digits_hits/scorer/src/G4PSPassageCellCurrent3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPassageCellCurrent3D.cc,v 1. 3 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPassageCellCurrent3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSPassageCellCurrent3D … … 38 38 // 39 39 // Created: 2007-08-14 Tsukasa ASO 40 // 2010-07-22 Introduce Unit specification. 40 41 // 41 42 /////////////////////////////////////////////////////////////////////////////// -
trunk/source/digits_hits/scorer/src/G4PSPassageCellFlux.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPassageCellFlux.cc,v 1. 2 2008/12/28 20:32:00 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPassageCellFlux.cc,v 1.4 2010/07/22 23:42:01 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSPassageCellFlux … … 47 47 // 48 48 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 49 // 2010-07-22 Introduce Unit specification. 50 // 2010-07-22 Add weighted option 49 51 // 50 52 /////////////////////////////////////////////////////////////////////////////// 51 53 52 54 G4PSPassageCellFlux::G4PSPassageCellFlux(G4String name, G4int depth) 55 :G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fCellFlux(0), 56 weighted(true) 57 { 58 DefineUnitAndCategory(); 59 SetUnit("percm2"); 60 } 61 62 G4PSPassageCellFlux::G4PSPassageCellFlux(G4String name, const G4String& unit, 63 G4int depth) 53 64 :G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fCellFlux(0) 54 {;} 65 { 66 DefineUnitAndCategory(); 67 SetUnit(unit); 68 } 55 69 56 70 G4PSPassageCellFlux::~G4PSPassageCellFlux() … … 92 106 G4int trkid = aStep->GetTrack()->GetTrackID(); 93 107 G4double trklength = aStep->GetStepLength(); 94 trklength *= aStep->GetPreStepPoint()->GetWeight();108 if ( weighted ) trklength *= aStep->GetPreStepPoint()->GetWeight(); 95 109 96 110 if ( IsEnter &&IsExit ){ // Passed at one step … … 143 157 for(; itr != EvtMap->GetMap()->end(); itr++) { 144 158 G4cout << " copy no.: " << itr->first 145 << " cell flux : " << *(itr->second)*cm*cm << " [cm^-2]" 159 << " cell flux : " << *(itr->second)/GetUnitValue() 160 << " [" << GetUnit() 146 161 << G4endl; 147 162 } 148 163 } 149 164 165 void G4PSPassageCellFlux::SetUnit(const G4String& unit) 166 { 167 CheckAndSetUnit(unit,"Per Unit Surface"); 168 } 169 170 void G4PSPassageCellFlux::DefineUnitAndCategory(){ 171 // Per Unit Surface 172 new G4UnitDefinition("percentimeter2","percm2","Per Unit Surface",(1./cm2)); 173 new G4UnitDefinition("permillimeter2","permm2","Per Unit Surface",(1./mm2)); 174 new G4UnitDefinition("permeter2","perm2","Per Unit Surface",(1./m2)); 175 } 176 177 -
trunk/source/digits_hits/scorer/src/G4PSPassageCellFlux3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPassageCellFlux3D.cc,v 1. 3 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPassageCellFlux3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSPassageCellFlux3D … … 55 55 } 56 56 57 G4PSPassageCellFlux3D::G4PSPassageCellFlux3D(G4String name,const G4String& unit, 58 G4int ni, G4int nj, G4int nk, 59 G4int di, G4int dj, G4int dk) 60 :G4PSPassageCellFlux(name), 61 fDepthi(di),fDepthj(dj),fDepthk(dk) 62 { 63 fNi=ni; 64 fNj=nj; 65 fNk=nk; 66 SetUnit(unit); 67 } 68 57 69 G4PSPassageCellFlux3D::~G4PSPassageCellFlux3D() 58 70 {;} -
trunk/source/digits_hits/scorer/src/G4PSPassageTrackLength.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPassageTrackLength.cc,v 1. 1 2007/07/11 01:31:03 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPassageTrackLength.cc,v 1.2 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSPassageTrackLength … … 41 41 // 42 42 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 43 // 2010-07-22 Introduce Unit specification. 43 44 // 44 45 /////////////////////////////////////////////////////////////////////////////// … … 47 48 :G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fTrackLength(0.), 48 49 weighted(false) 49 {;} 50 { 51 SetUnit("mm"); 52 } 53 54 G4PSPassageTrackLength::G4PSPassageTrackLength(G4String name, 55 const G4String& unit, 56 G4int depth) 57 :G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fTrackLength(0.), 58 weighted(false) 59 { 60 SetUnit(unit); 61 } 62 50 63 51 64 G4PSPassageTrackLength::~G4PSPassageTrackLength() … … 120 133 for(; itr != EvtMap->GetMap()->end(); itr++) { 121 134 G4cout << " copy no.: " << itr->first 122 << " track length : " << G4BestUnit(*(itr->second),"Length") 135 << " track length : " 136 << *(itr->second)/GetUnitValue() 137 << " [" << GetUnit()<< "]" 123 138 << G4endl; 124 139 } 125 140 } 126 141 142 void G4PSPassageTrackLength::SetUnit(const G4String& unit) 143 { 144 CheckAndSetUnit(unit,"Length"); 145 } -
trunk/source/digits_hits/scorer/src/G4PSPassageTrackLength3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPassageTrackLength3D.cc,v 1. 3 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPassageTrackLength3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSPassageTrackLength3D … … 38 38 // 39 39 // Created: 2008-08-14 Tsukasa ASO 40 // 2010-07-22 Introduce Unit specification. 40 41 // 41 42 /////////////////////////////////////////////////////////////////////////////// … … 52 53 } 53 54 55 G4PSPassageTrackLength3D::G4PSPassageTrackLength3D(G4String name,const G4String& unit, 56 G4int ni, G4int nj, G4int nk, 57 G4int depi, G4int depj, G4int depk) 58 :G4PSPassageTrackLength(name), 59 fDepthi(depi),fDepthj(depj),fDepthk(depk) 60 { 61 fNi=ni; 62 fNj=nj; 63 fNk=nk; 64 SetUnit(unit); 65 } 66 54 67 G4PSPassageTrackLength3D::~G4PSPassageTrackLength3D() 55 68 {;} -
trunk/source/digits_hits/scorer/src/G4PSPopulation.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPopulation.cc,v 1. 1 2007/07/11 01:31:03 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPopulation.cc,v 1.3 2010/07/23 04:35:38 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSPopulation … … 37 37 // 38 38 // Created: 2007-02-02 Tsukasa ASO, Akinori Kimura. 39 // 2010-07-22 Introduce Unit specification. 39 40 // 40 41 /////////////////////////////////////////////////////////////////////////////// … … 42 43 G4PSPopulation::G4PSPopulation(G4String name, G4int depth) 43 44 :G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false) 44 {;} 45 { 46 SetUnit(""); 47 } 45 48 46 49 G4PSPopulation::~G4PSPopulation() … … 89 92 for(; itr != EvtMap->GetMap()->end(); itr++) { 90 93 G4cout << " copy no.: " << itr->first 91 << " population: " << *(itr->second) 94 << " population: " << *(itr->second)/GetUnitValue() 95 << " [tracks]" 92 96 << G4endl; 93 97 } 94 98 } 95 99 100 void G4PSPopulation::SetUnit(const G4String& unit) 101 { 102 if (unit == "" ){ 103 unitName = unit; 104 unitValue = 1.0; 105 }else{ 106 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 107 G4Exception(GetName(),"DetScorer0000",JustWarning,msg); 108 } 109 110 } -
trunk/source/digits_hits/scorer/src/G4PSSphereSurfaceCurrent.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSSphereSurfaceCurrent.cc,v 1. 4 2009/11/14 00:01:13 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSSphereSurfaceCurrent.cc,v 1.6 2010/07/23 04:35:38 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSSphereSurfaceCurrent … … 49 49 // 50 50 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 51 // 2010-07-22 Introduce Unit specification. 51 52 // 52 53 /////////////////////////////////////////////////////////////////////////////// … … 56 57 :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction), 57 58 weighted(true),divideByArea(true) 58 {;} 59 { 60 DefineUnitAndCategory(); 61 SetUnit("percm2"); 62 } 63 64 G4PSSphereSurfaceCurrent::G4PSSphereSurfaceCurrent(G4String name, 65 G4int direction, 66 const G4String& unit, 67 G4int depth) 68 :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction), 69 weighted(true),divideByArea(true) 70 { 71 DefineUnitAndCategory(); 72 SetUnit(unit); 73 } 59 74 60 75 G4PSSphereSurfaceCurrent::~G4PSSphereSurfaceCurrent() … … 79 94 } 80 95 81 // if( solid->GetEntityType() != "G4Sphere" ){82 // G4Exception("G4PSSphereSurfaceCurrentScorer. - Solid type is not supported.");83 // return FALSE;84 // }85 96 G4Sphere* sphereSolid = (G4Sphere*)(solid); 86 97 … … 177 188 for(; itr != EvtMap->GetMap()->end(); itr++) { 178 189 G4cout << " copy no.: " << itr->first << " current : " ; 179 if ( divideByArea ) G4cout << *(itr->second)*cm*cm << " [/cm2]" ; 180 else G4cout << *(itr->second)*cm*cm << " [track]" ; 190 if ( divideByArea ) { 191 G4cout << *(itr->second)/GetUnitValue() 192 << " [" <<GetUnit()<<"]"; 193 }else { 194 G4cout << *(itr->second) << " [tracks]" ; 195 } 181 196 G4cout << G4endl; 182 197 } 183 198 } 184 199 200 201 void G4PSSphereSurfaceCurrent::SetUnit(const G4String& unit) 202 { 203 if ( divideByArea ) { 204 CheckAndSetUnit(unit,"Per Unit Surface"); 205 } else { 206 if (unit == "" ){ 207 unitName = unit; 208 unitValue = 1.0; 209 }else{ 210 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 211 G4Exception(GetName(),"DetScorer0000",JustWarning,msg); 212 } 213 } 214 } 215 216 void G4PSSphereSurfaceCurrent::DefineUnitAndCategory(){ 217 // Per Unit Surface 218 new G4UnitDefinition("percentimeter2","percm2","Per Unit Surface",(1./cm2)); 219 new G4UnitDefinition("permillimeter2","permm2","Per Unit Surface",(1./mm2)); 220 new G4UnitDefinition("permeter2","perm2","Per Unit Surface",(1./m2)); 221 } -
trunk/source/digits_hits/scorer/src/G4PSSphereSurfaceCurrent3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSSphereSurfaceCurrent3D.cc,v 1. 3 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSSphereSurfaceCurrent3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSSphereSurfaceCurrent3D … … 46 46 // 47 47 // Created: 2007-08-14 Tsukasa ASO 48 // 2010-07-22 Introduce Unit specification. 48 49 // 49 50 /////////////////////////////////////////////////////////////////////////////// … … 60 61 } 61 62 63 G4PSSphereSurfaceCurrent3D::G4PSSphereSurfaceCurrent3D(G4String name, 64 G4int direction, 65 const G4String& unit, 66 G4int ni, G4int nj, G4int nk, 67 G4int depi, G4int depj, G4int depk) 68 :G4PSSphereSurfaceCurrent(name,direction), 69 fDepthi(depi),fDepthj(depj),fDepthk(depk) 70 { 71 fNi=ni; 72 fNj=nj; 73 fNk=nk; 74 SetUnit(unit); 75 } 76 62 77 G4PSSphereSurfaceCurrent3D::~G4PSSphereSurfaceCurrent3D() 63 78 {;} -
trunk/source/digits_hits/scorer/src/G4PSSphereSurfaceFlux.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSSphereSurfaceFlux.cc,v 1. 3 2009/11/14 00:01:13 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSSphereSurfaceFlux.cc,v 1.7 2010/07/23 04:35:38 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSSphereSurfaceFlux … … 50 50 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 51 51 // 29-Mar-2007 T.Aso, Bug fix for momentum direction at outgoing flux. 52 // 2010-07-22 Introduce Unit specification. 53 // 2010-07-22 Add weighted and divideByAre options 52 54 // 53 55 /////////////////////////////////////////////////////////////////////////////// … … 55 57 G4PSSphereSurfaceFlux::G4PSSphereSurfaceFlux(G4String name, 56 58 G4int direction, G4int depth) 59 :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction), 60 weighted(true),divideByArea(true) 61 { 62 DefineUnitAndCategory(); 63 SetUnit("percm2"); 64 } 65 66 G4PSSphereSurfaceFlux::G4PSSphereSurfaceFlux(G4String name, 67 G4int direction, 68 const G4String& unit, 69 G4int depth) 57 70 :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction) 58 {;} 71 { 72 DefineUnitAndCategory(); 73 SetUnit(unit); 74 } 59 75 60 76 G4PSSphereSurfaceFlux::~G4PSSphereSurfaceFlux() … … 79 95 } 80 96 81 // if( solid->GetEntityType() != "G4Sphere" ){82 // G4Exception("G4PSSphereSurfaceFluxScorer. - Solid type is not supported.");83 // return FALSE;84 // }85 97 G4Sphere* sphereSolid = (G4Sphere*)(solid); 86 98 … … 122 134 G4double square = radi*radi*dph*( -std::cos(enth) + std::cos(stth) ); 123 135 124 G4double current = thisStep->GetWeight(); // Flux (Particle Weight) 125 current = current/square; // Flux with angle. 136 G4double current = 1.0; 137 if ( weighted ) thisStep->GetWeight(); // Flux (Particle Weight) 138 if ( divideByArea ) current = current/square; // Flux with angle. 126 139 127 140 current /= anglefactor; … … 205 218 for(; itr != EvtMap->GetMap()->end(); itr++) { 206 219 G4cout << " copy no.: " << itr->first 207 << " current : " << *(itr->second) 220 << " current : " << *(itr->second)/GetUnitValue() 221 << " ["<<GetUnit()<<"]" 208 222 << G4endl; 209 223 } 210 224 } 211 225 226 void G4PSSphereSurfaceFlux::SetUnit(const G4String& unit) 227 { 228 if ( divideByArea ) { 229 CheckAndSetUnit(unit,"Per Unit Surface"); 230 } else { 231 if (unit == "" ){ 232 unitName = unit; 233 unitValue = 1.0; 234 }else{ 235 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 236 G4Exception(GetName(),"DetScorer0000",JustWarning,msg); 237 } 238 } 239 } 240 241 void G4PSSphereSurfaceFlux::DefineUnitAndCategory(){ 242 // Per Unit Surface 243 new G4UnitDefinition("percentimeter2","percm2","Per Unit Surface",(1./cm2)); 244 new G4UnitDefinition("permillimeter2","permm2","Per Unit Surface",(1./mm2)); 245 new G4UnitDefinition("permeter2","perm2","Per Unit Surface",(1./m2)); 246 } 247 -
trunk/source/digits_hits/scorer/src/G4PSSphereSurfaceFlux3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSSphereSurfaceFlux3D.cc,v 1. 3 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSSphereSurfaceFlux3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSSphereSurfaceFlux3D … … 46 46 // 47 47 // Created: 2007-08-14 Tsukasa ASO 48 // 2010-07-22 Introduce Unit specification. 48 49 /////////////////////////////////////////////////////////////////////////////// 49 50 … … 57 58 fNj=nj; 58 59 fNk=nk; 60 } 61 62 G4PSSphereSurfaceFlux3D::G4PSSphereSurfaceFlux3D(G4String name, G4int direction, 63 const G4String& unit, 64 G4int ni, G4int nj, G4int nk, 65 G4int depi, G4int depj, G4int depk) 66 :G4PSSphereSurfaceFlux(name,direction), 67 fDepthi(depi),fDepthj(depj),fDepthk(depk) 68 { 69 fNi=ni; 70 fNj=nj; 71 fNk=nk; 72 SetUnit(unit); 59 73 } 60 74 -
trunk/source/digits_hits/scorer/src/G4PSTermination.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSTermination.cc,v 1. 2 2007/12/10 16:29:42 gunterExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSTermination.cc,v 1.5 2010/07/23 04:35:38 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSTermination … … 37 37 // 38 38 // Created: 2007-02-02 Tsukasa ASO, Akinori Kimura. 39 // 2010-07-22 Introduce Unit specification. 39 40 // 40 41 /////////////////////////////////////////////////////////////////////////////// … … 42 43 G4PSTermination::G4PSTermination(G4String name, G4int depth) 43 44 :G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false) 44 {;} 45 { 46 SetUnit(""); 47 } 45 48 46 49 G4PSTermination::~G4PSTermination() … … 88 91 } 89 92 93 void G4PSTermination::SetUnit(const G4String& unit) 94 { 95 if (unit == "" ){ 96 unitName = unit; 97 unitValue = 1.0; 98 }else{ 99 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 100 G4Exception(GetName(),"DetScorer0000",JustWarning,msg); 101 } 102 103 } 104 -
trunk/source/digits_hits/scorer/src/G4PSTrackCounter.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSTrackCounter.cc,v 1. 1 2007/07/11 01:31:03 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSTrackCounter.cc,v 1.3 2010/07/23 04:35:38 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSTrackCounter 31 31 #include "G4PSTrackCounter.hh" 32 32 #include "G4UnitsTable.hh" 33 33 34 34 /////////////////////////////////////////////////////////////////////////////// … … 37 37 // 38 38 // Created: 2007-02-02 Tsukasa ASO, Akinori Kimura. 39 // 2010-07-22 Introduce Unit specification. 39 40 // 40 41 /////////////////////////////////////////////////////////////////////////////// … … 42 43 G4PSTrackCounter::G4PSTrackCounter(G4String name, G4int direction, G4int depth) 43 44 :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),weighted(false) 44 {;} 45 { 46 SetUnit(""); 47 } 45 48 46 49 G4PSTrackCounter::~G4PSTrackCounter() … … 108 111 G4cout << " copy no.: " << itr->first 109 112 << " track count: " << *(itr->second) 113 << " [tracks] " 110 114 << G4endl; 111 115 } 112 116 } 117 118 void G4PSTrackCounter::SetUnit(const G4String& unit) 119 { 120 if (unit == "" ){ 121 unitName = unit; 122 unitValue = 1.0; 123 }else{ 124 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 125 G4Exception(GetName(),"DetScorer0000",JustWarning,msg); 126 } 127 128 } 129 -
trunk/source/digits_hits/scorer/src/G4PSTrackCounter3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSTrackCounter3D.cc,v 1. 3 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSTrackCounter3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSTrackCounter3D -
trunk/source/digits_hits/scorer/src/G4PSTrackLength.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSTrackLength.cc,v 1. 1 2007/07/11 01:31:03 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSTrackLength.cc,v 1.2 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSTrackLength … … 37 37 // 38 38 // Created: 2007-02-02 Tsukasa ASO, Akinori Kimura. 39 // 2010-07-22 Introduce Unit specification. 39 40 // 40 41 /////////////////////////////////////////////////////////////////////////////// … … 43 44 :G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false),multiplyKinE(false), 44 45 divideByVelocity(false) 45 {;} 46 { 47 DefineUnitAndCategory(); 48 SetUnit("mm"); 49 } 50 51 G4PSTrackLength::G4PSTrackLength(G4String name, const G4String& unit, 52 G4int depth) 53 :G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false),multiplyKinE(false), 54 divideByVelocity(false) 55 { 56 DefineUnitAndCategory(); 57 SetUnit(unit); 58 } 46 59 47 60 G4PSTrackLength::~G4PSTrackLength() 48 61 {;} 62 63 void G4PSTrackLength::MultiplyKineticEnergy(G4bool flg) 64 { 65 multiplyKinE = flg; 66 // Default unit is set according to flags. 67 SetUnit(""); 68 } 69 70 void G4PSTrackLength::DivideByVelocity(G4bool flg) 71 { 72 divideByVelocity = flg; 73 // Default unit is set according to flags. 74 SetUnit(""); 75 } 49 76 50 77 G4bool G4PSTrackLength::ProcessHits(G4Step* aStep,G4TouchableHistory*) … … 84 111 std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin(); 85 112 for(; itr != EvtMap->GetMap()->end(); itr++) { 86 G4cout << " copy no.: " << itr->first << " track length: " ; 87 if ( multiplyKinE && !divideByVelocity ){ 88 G4cout << *(itr->second)/(mm*MeV) <<" mm*MeV"; 89 } else if ( !multiplyKinE && divideByVelocity ){ 90 G4cout << *(itr->second)*second <<" /second"; 91 } else if ( multiplyKinE && divideByVelocity) { 92 G4cout << *(itr->second)/MeV*second <<" MeV/second"; 93 } else { 94 G4cout << G4BestUnit(*(itr->second),"Length"); 95 } 113 G4cout << " copy no.: " << itr->first << " value "; 114 G4cout << *(itr->second)/GetUnitValue() 115 << " ["<< GetUnit() << "]"; 96 116 G4cout << G4endl; 97 117 } 98 118 } 99 119 120 void G4PSTrackLength::SetUnit(const G4String& unit) 121 { 122 if ( multiplyKinE ){ 123 if ( divideByVelocity ){ 124 if ( unit == "" ) { 125 CheckAndSetUnit("MeV_second","EnergyFlux"); 126 } else { 127 CheckAndSetUnit(unit,"EnergyFlux"); 128 } 129 }else { 130 if ( unit == "" ) { 131 CheckAndSetUnit("MeV_mm","EnergyFlow"); 132 } else { 133 CheckAndSetUnit(unit,"EnergyFlow"); 134 } 135 } 136 }else { 137 if ( divideByVelocity ){ 138 if ( unit == "" ) { 139 CheckAndSetUnit("second","Time"); 140 } else { 141 CheckAndSetUnit(unit,"Time"); 142 } 143 }else { 144 if ( unit == "") { 145 CheckAndSetUnit("mm","Length"); 146 } else { 147 CheckAndSetUnit(unit,"Length"); 148 } 149 } 150 } 151 } 152 153 void G4PSTrackLength::DefineUnitAndCategory(){ 154 // EnergyFlux 155 new G4UnitDefinition("eV_second","eV_s","EnergyFlux",(eV*second)); 156 new G4UnitDefinition("keV_second","keV_s","EnergyFlux",(keV*second)); 157 new G4UnitDefinition("MeV_second","MeV_s","EnergyFlux",(MeV*second)); 158 new G4UnitDefinition("eV_millisecond","eV_ms","EnergyFlux",(eV*ms)); 159 new G4UnitDefinition("keV_millisecond","keV_ms","EnergyFlux",(keV*ms)); 160 new G4UnitDefinition("MeV_millisecond","MeV_ms","EnergyFlux",(MeV*ms)); 161 //EnergyFlow 162 new G4UnitDefinition("eV_millimeter","eV_mm","EnergyFlow",(eV*mm)); 163 new G4UnitDefinition("keV_millimeter","keV_mm","EnergyFlow",(keV*mm)); 164 new G4UnitDefinition("MeV_millimeter","MeV_mm","EnergyFlow",(MeV*mm)); 165 new G4UnitDefinition("eV_centimeter","eV_cm","EnergyFlow",(eV*cm)); 166 new G4UnitDefinition("keV_centimeter","keV_cm","EnergyFlow",(keV*cm)); 167 new G4UnitDefinition("MeV_centimeter","MeV_cm","EnergyFlow",(MeV*cm)); 168 new G4UnitDefinition("eV_meter","eV_m","EnergyFlow",(eV*m)); 169 new G4UnitDefinition("keV_meter","keV_m","EnergyFlow",(keV*m)); 170 new G4UnitDefinition("MeV_meter","MeV_m","EnergyFlow",(MeV*m)); 171 } 172 173 174 -
trunk/source/digits_hits/scorer/src/G4PSTrackLength3D.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSTrackLength3D.cc,v 1. 3 2007/08/29 06:36:42taso Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSTrackLength3D.cc,v 1.4 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSTrackLength3D … … 37 37 // 38 38 // Created: 2008-08-14 Tsukasa ASO 39 // 2010-07-22 Introduce Unit specification. 39 40 // 40 41 /////////////////////////////////////////////////////////////////////////////// … … 51 52 } 52 53 54 G4PSTrackLength3D::G4PSTrackLength3D(G4String name,const G4String& unit, 55 G4int ni, G4int nj, G4int nk, 56 G4int depi, G4int depj, G4int depk) 57 :G4PSTrackLength(name), 58 fDepthi(depi),fDepthj(depj),fDepthk(depk) 59 { 60 fNi=ni; 61 fNj=nj; 62 fNk=nk; 63 SetUnit(unit); 64 } 65 53 66 G4PSTrackLength3D::~G4PSTrackLength3D() 54 67 {;} -
trunk/source/digits_hits/scorer/src/G4SDParticleFilter.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4SDParticleFilter.cc,v 1. 1 2007/07/11 01:31:03 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4SDParticleFilter.cc,v 1.2 2010/07/23 00:59:58 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4VSensitiveDetector … … 49 49 { 50 50 thePdef.clear(); 51 theIonZ.clear(); 52 theIonA.clear(); 51 53 } 52 54 … … 66 68 } 67 69 thePdef.push_back(pd); 70 theIonZ.clear(); 71 theIonA.clear(); 68 72 } 69 73 … … 84 88 } 85 89 thePdef.push_back(pd); 90 theIonZ.clear(); 91 theIonA.clear(); 86 92 } 87 93 } … … 89 95 G4SDParticleFilter::G4SDParticleFilter(G4String name, 90 96 const std::vector<G4ParticleDefinition*>& particleDef) 91 :G4VSDFilter(name), thePdef(particleDef)97 :G4VSDFilter(name), thePdef(particleDef) 92 98 { 93 99 for ( size_t i = 0; i < particleDef.size(); i++){ … … 95 101 "NULL pointer is found in the given particleDef vector."); 96 102 } 103 theIonZ.clear(); 104 theIonA.clear(); 97 105 } 98 106 … … 100 108 { 101 109 thePdef.clear(); 102 } 110 theIonZ.clear(); 111 theIonA.clear(); 112 } 103 113 104 114 G4bool G4SDParticleFilter::Accept(const G4Step* aStep) const 105 115 { 116 106 117 for ( size_t i = 0; i < thePdef.size(); i++){ 107 118 if ( thePdef[i] == aStep->GetTrack()->GetDefinition() ) return TRUE; 108 119 } 120 121 // Ions by Z,A 122 for ( size_t i = 0; i < theIonZ.size(); i++){ 123 if ( theIonZ[i] == aStep->GetTrack()->GetDefinition()->GetAtomicNumber() 124 && theIonA[i] == aStep->GetTrack()->GetDefinition()->GetAtomicMass() ){ 125 return TRUE; 126 } 127 } 128 109 129 return FALSE; 110 130 } … … 128 148 } 129 149 150 void G4SDParticleFilter::addIon(G4int Z, G4int A){ 151 for ( size_t i = 0; i < theIonZ.size(); i++){ 152 if ( theIonZ[i] == Z && theIonA[i] == A ){ 153 G4cout << "G4SDParticleFilter:: Ion has been already registered."<<G4endl; 154 return; 155 } 156 } 157 theIonZ.push_back(Z); 158 theIonA.push_back(A); 159 } 160 130 161 void G4SDParticleFilter::show(){ 131 162 G4cout << "----G4SDParticleFileter particle list------"<<G4endl; 132 163 for ( size_t i = 0; i < thePdef.size(); i++){ 133 164 G4cout << thePdef[i]->GetParticleName() << G4endl; 165 } 166 for ( size_t i = 0; i < theIonZ.size(); i++){ 167 G4cout << " Ion PrtclDef (" << theIonZ[i]<<","<<theIonA[i]<<")" 168 << G4endl; 134 169 } 135 170 G4cout << "-------------------------------------------"<<G4endl; -
trunk/source/digits_hits/utils/CVS/Entries
r1337 r1340 1 1 D/include//// 2 2 D/src//// 3 /GNUmakefile/1.9/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-01 4 /History/1.15/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-01 3 /CMakeLists.txt/1.1/Wed Sep 29 18:39:08 2010// 4 /sources.cmake/1.2/Tue Oct 19 09:54:03 2010// 5 /GNUmakefile/1.11/Fri Nov 5 09:55:30 2010// 6 /History/1.15/Wed Sep 29 21:48:17 2010// -
trunk/source/digits_hits/utils/GNUmakefile
r814 r1340 1 # $Id: GNUmakefile,v 1. 9 2007/11/14 20:41:17 asaimExp $1 # $Id: GNUmakefile,v 1.11 2010/10/27 08:10:13 gcosmo Exp $ 2 2 # -------------------------------------------------------------- 3 3 # GNUmakefile for digits+hits library. Makoto Asai, 1/11/96. -
trunk/source/digits_hits/utils/include/CVS/Entries
r1337 r1340 1 /G4DefaultLinearColorMap.hh/1.1/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-01 2 /G4ScoreLogColorMap.hh/1.1/Wed Sep 29 21:48:24 2010//Tgeant4-09-04-beta-01 3 /G4ScoreQuantityMessenger.hh/1.4/Wed Sep 29 21:48:24 2010//Tgeant4-09-04-beta-01 4 /G4ScoringBox.hh/1.19/Wed Sep 29 21:48:24 2010//Tgeant4-09-04-beta-01 5 /G4ScoringBoxParameterisation.hh/1.3/Wed Sep 29 21:48:24 2010//Tgeant4-09-04-beta-01 6 /G4ScoringCylinder.hh/1.2/Wed Sep 29 21:48:24 2010//Tgeant4-09-04-beta-01 7 /G4ScoringManager.hh/1.23/Wed Sep 29 21:48:24 2010//Tgeant4-09-04-beta-01 8 /G4ScoringMessenger.hh/1.22/Wed Sep 29 21:48:24 2010//Tgeant4-09-04-beta-01 9 /G4VScoreColorMap.hh/1.5/Wed Sep 29 21:48:24 2010//Tgeant4-09-04-beta-01 10 /G4VScoreWriter.hh/1.2/Wed Sep 29 21:48:27 2010//Tgeant4-09-04-beta-01 11 /G4VScoringMesh.hh/1.30/Wed Sep 29 21:48:27 2010//Tgeant4-09-04-beta-01 1 /G4DefaultLinearColorMap.hh/1.1/Thu Nov 4 15:58:45 2010// 2 /G4ScoringManager.hh/1.23/Thu Nov 4 15:58:45 2010// 3 /G4ScoringMessenger.hh/1.22/Thu Nov 4 15:58:45 2010// 4 /G4VScoreWriter.hh/1.2/Thu Nov 4 15:58:45 2010// 5 /G4ScoreLogColorMap.hh/1.3/Fri Nov 5 09:56:24 2010// 6 /G4ScoreQuantityMessenger.hh/1.5/Fri Nov 5 09:56:24 2010// 7 /G4ScoringBox.hh/1.21/Fri Nov 5 09:56:24 2010// 8 /G4ScoringCylinder.hh/1.6/Fri Nov 5 09:56:24 2010// 9 /G4VScoreColorMap.hh/1.7/Fri Nov 5 09:56:24 2010// 10 /G4VScoringMesh.hh/1.40/Fri Nov 5 09:56:24 2010// 12 11 D -
trunk/source/digits_hits/utils/include/G4DefaultLinearColorMap.hh
r1337 r1340 26 26 // 27 27 // $Id: G4DefaultLinearColorMap.hh,v 1.1 2007/11/04 04:06:08 asaim Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01$28 // GEANT4 tag $Name: $ 29 29 // 30 30 -
trunk/source/digits_hits/utils/include/G4ScoreLogColorMap.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ScoreLogColorMap.hh,v 1. 1 2008/03/25 02:18:39akimura Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ScoreLogColorMap.hh,v 1.3 2010/07/23 06:25:30 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 -
trunk/source/digits_hits/utils/include/G4ScoreQuantityMessenger.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ScoreQuantityMessenger.hh,v 1. 4 2007/11/06 17:17:14 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ScoreQuantityMessenger.hh,v 1.5 2010/07/22 22:14:40 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // (HISTORY) 31 31 // 03-Sep-2007 T.Aso Command definitions are introduced. 32 32 // 01-Nov-2007 M.Asai Class is splited into two. 33 // 20-Jul-2010 T.Aso Specify unit for scorer 33 34 34 35 … … 45 46 class G4UIdirectory; 46 47 class G4UIcmdWithAString; 48 class G4UIcmdWithoutParameter; 47 49 class G4UIcommand; 48 50 … … 73 75 void FParticleCommand(G4VScoringMesh* mesh,G4TokenVec& token); 74 76 void FParticleWithEnergyCommand(G4VScoringMesh* mesh,G4TokenVec& token); 77 78 G4bool CheckMeshPS(G4VScoringMesh* mesh, G4String& psname); 75 79 76 80 private: … … 84 88 G4UIdirectory* quantityDir; 85 89 G4UIcmdWithAString* qTouchCmd; 90 G4UIcmdWithoutParameter* qGetUnitCmd; 91 G4UIcmdWithAString* qSetUnitCmd; 86 92 // 87 G4UIc mdWithAString* qCellChgCmd;88 G4UIc mdWithAString* qCellFluxCmd;89 G4UIc mdWithAString* qPassCellFluxCmd;90 G4UIc mdWithAString* qeDepCmd;91 G4UIc mdWithAString* qdoseDepCmd;92 G4UIc mdWithAString* qnOfStepCmd;93 G4UIc mdWithAString* qnOfSecondaryCmd;93 G4UIcommand* qCellChgCmd; 94 G4UIcommand* qCellFluxCmd; 95 G4UIcommand* qPassCellFluxCmd; 96 G4UIcommand* qeDepCmd; 97 G4UIcommand* qdoseDepCmd; 98 G4UIcommand* qnOfStepCmd; 99 G4UIcommand* qnOfSecondaryCmd; 94 100 // 95 101 G4UIcommand* qTrackLengthCmd; … … 106 112 G4UIcommand* qTrackCountCmd; 107 113 G4UIcommand* qTerminationCmd; 114 G4UIcommand* qMinKinEAtGeneCmd; 108 115 109 116 // -
trunk/source/digits_hits/utils/include/G4ScoringBox.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ScoringBox.hh,v 1. 19 2010/06/14 13:28:17 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ScoringBox.hh,v 1.21 2010/07/22 02:04:39 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 53 53 void Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg=111); 54 54 void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, 55 55 G4int idxProj, G4int idxColumn); 56 56 57 57 // set a direction to segment this mesh -
trunk/source/digits_hits/utils/include/G4ScoringCylinder.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ScoringCylinder.hh,v 1. 2 2008/03/23 14:32:12akimura Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ScoringCylinder.hh,v 1.6 2010/07/25 11:05:03 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 51 51 virtual void Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg=111); 52 52 virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, 53 53 G4int idxProj, G4int idxColumn); 54 54 55 56 void SetRMinMax(G4double rMinMax[2]) { 57 for(int i = 0; i < 2; i++) fSize[i] = rMinMax[i]; 58 } 59 void SetRMin(G4double rMin) {fSize[0] = rMin;} 60 void SetRMax(G4double rMax) {fSize[1] = rMax;} 61 void SetZSize(G4double zSize) {fSize[2] = zSize;} 62 63 void SetSegmentDirection(G4int dir) {fSegmentDirection = dir;} // supports the r-direction only at present. 55 void SetRMax(G4double rMax) {fSize[0] = rMax;} 56 void SetZSize(G4double zSize) {fSize[1] = zSize;} // half height 64 57 65 58 void RegisterPrimitives(std::vector<G4VPrimitiveScorer *> & vps); 66 59 67 // get 3D index ( r,z,phi) from sequential index60 // get 3D index (z,phi,r) from sequential index 68 61 void GetRZPhi(G4int index, G4int q[3]) const; 69 62 70 63 private: 71 G4int fSegmentDirection; // =1: r, =2: phi, =3: z 64 //enum IDX {IR, IZ, IPHI}; 65 enum IDX {IZ, IPHI, IR}; 66 72 67 G4LogicalVolume * fMeshElementLogical; 73 68 -
trunk/source/digits_hits/utils/include/G4ScoringManager.hh
r1337 r1340 26 26 // 27 27 // $Id: G4ScoringManager.hh,v 1.23 2007/11/14 20:41:17 asaim Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01$28 // GEANT4 tag $Name: $ 29 29 // 30 30 -
trunk/source/digits_hits/utils/include/G4ScoringMessenger.hh
r1337 r1340 26 26 // 27 27 // $Id: G4ScoringMessenger.hh,v 1.22 2008/02/29 12:23:14 akimura Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01$28 // GEANT4 tag $Name: $ 29 29 // 30 30 // (HISTORY) -
trunk/source/digits_hits/utils/include/G4VScoreColorMap.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4VScoreColorMap.hh,v 1. 5 2008/08/29 02:50:05akimura Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4VScoreColorMap.hh,v 1.7 2010/07/23 06:25:30 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 70 70 // draw a color chart 71 71 virtual void DrawColorChart(G4int nPoint = 5); 72 72 73 virtual void DrawColorChartBar(G4int nPoint); 74 73 75 virtual void DrawColorChartText(G4int nPoint); 76 77 78 void SetPSUnit(G4String & unit) {fPSUnit = unit;} 79 void SetPSName(G4String & psName) {fPSName = psName;} 74 80 75 81 protected: … … 79 85 G4double fMaxVal; 80 86 G4VVisManager * fVisManager; 87 G4String fPSUnit; 88 G4String fPSName; 81 89 }; 82 90 -
trunk/source/digits_hits/utils/include/G4VScoreWriter.hh
r1337 r1340 26 26 // 27 27 // $Id: G4VScoreWriter.hh,v 1.2 2007/11/06 09:41:34 akimura Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01$28 // GEANT4 tag $Name: $ 29 29 // 30 30 -
trunk/source/digits_hits/utils/include/G4VScoringMesh.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4VScoringMesh.hh,v 1. 30 2010/06/14 13:28:17 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4VScoringMesh.hh,v 1.40 2010/07/27 01:44:54 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 87 87 virtual void Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg=111) = 0; 88 88 // draw a column of a quantity on a current viewer 89 virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, 90 89 virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, 90 G4int idxProj, G4int idxColumn) = 0; 91 91 // reset registered primitive scorers 92 92 void ResetScore(); … … 115 115 // get number of segments of this mesh 116 116 void GetNumberOfSegments(G4int nSegment[3]); 117 // set positions to segment this mesh118 inline void SetSegmentPositions(std::vector<G4double> & sp) {fSegmentPositions = sp;}119 117 120 118 // register a primitive scorer to the MFD & set it to the current primitive scorer … … 131 129 else return false; 132 130 } 131 // get unit of primitive scorer by the name 132 G4String GetPSUnit(G4String & psname); 133 // get unit of current primitive scorer 134 G4String GetCurrentPSUnit(); 135 // set unit of current primitive scorer 136 void SetCurrentPSUnit(const G4String& unit); 137 // get unit value of primitive scorer by the name 138 G4double GetPSUnitValue(G4String & psname); 139 // set PS name to be drawn 140 void SetDrawPSName(G4String & psname) {fDrawPSName = psname;} 141 142 // get axis names of the hierarchical division in the divided order 143 void GetDivisionAxisNames(G4String divisionAxisNames[3]); 144 133 145 // set current primitive scorer to NULL 134 146 void SetNullToCurrentPrimitiveScorer() {fCurrentPS = NULL;} … … 157 169 G4RotationMatrix * fRotationMatrix; 158 170 G4int fNSegment[3]; 159 std::vector<G4double> fSegmentPositions;160 171 161 172 std::map<G4String, G4THitsMap<G4double>* > fMap; … … 167 178 G4bool nMeshIsSet; 168 179 180 G4String fDrawUnit; 181 G4double fDrawUnitValue; 182 G4String fDrawPSName; 183 184 G4String fDivisionAxisNames[3]; 169 185 }; 170 186 … … 192 208 void G4VScoringMesh::DrawMesh(G4String psName,G4VScoreColorMap* colorMap,G4int axflg) 193 209 { 210 fDrawPSName = psName; 194 211 std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr = fMap.find(psName); 195 if(fMapItr!=fMap.end()) 196 { Draw(fMapItr->second->GetMap(),colorMap,axflg); } 197 else 198 { G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl; } 212 if(fMapItr!=fMap.end()) { 213 fDrawUnit = GetPSUnit(psName); 214 fDrawUnitValue = GetPSUnitValue(psName); 215 Draw(fMapItr->second->GetMap(), colorMap,axflg); 216 } else { 217 G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl; 218 } 199 219 } 200 220 201 221 void G4VScoringMesh::DrawMesh(G4String psName,G4int idxPlane,G4int iColumn,G4VScoreColorMap* colorMap) 202 222 { 223 fDrawPSName = psName; 203 224 std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr = fMap.find(psName); 204 if(fMapItr!=fMap.end()) 205 { DrawColumn(fMapItr->second->GetMap(),colorMap,idxPlane,iColumn); } 206 else 207 { G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl; } 225 if(fMapItr!=fMap.end()) { 226 fDrawUnit = GetPSUnit(psName); 227 fDrawUnitValue = GetPSUnitValue(psName); 228 DrawColumn(fMapItr->second->GetMap(),colorMap,idxPlane,iColumn); 229 } else { 230 G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl; 231 } 208 232 } 209 233 -
trunk/source/digits_hits/utils/src/CVS/Entries
r1337 r1340 1 /G4DefaultLinearColorMap.cc/1.3/Wed Sep 29 21:48:27 2010//Tgeant4-09-04-beta-01 2 /G4ScoreLogColorMap.cc/1.3/Wed Sep 29 21:48:27 2010//Tgeant4-09-04-beta-01 3 /G4ScoreQuantityMessenger.cc/1.8/Wed Sep 29 21:48:27 2010//Tgeant4-09-04-beta-01 4 /G4ScoreQuantityMessengerQCmd.cc/1.6/Wed Sep 29 21:48:27 2010//Tgeant4-09-04-beta-01 5 /G4ScoringBox.cc/1.54/Wed Sep 29 21:48:28 2010//Tgeant4-09-04-beta-01 6 /G4ScoringBoxParameterisation.cc/1.4/Wed Sep 29 21:48:28 2010//Tgeant4-09-04-beta-01 7 /G4ScoringCylinder.cc/1.6/Wed Sep 29 21:48:28 2010//Tgeant4-09-04-beta-01 8 /G4ScoringManager.cc/1.31/Wed Sep 29 21:48:28 2010//Tgeant4-09-04-beta-01 9 /G4ScoringMessenger.cc/1.39/Wed Sep 29 21:48:28 2010//Tgeant4-09-04-beta-01 10 /G4VScoreColorMap.cc/1.4/Wed Sep 29 21:48:28 2010//Tgeant4-09-04-beta-01 11 /G4VScoreWriter.cc/1.5/Wed Sep 29 21:48:29 2010//Tgeant4-09-04-beta-01 12 /G4VScoringMesh.cc/1.37/Wed Sep 29 21:48:29 2010//Tgeant4-09-04-beta-01 1 /G4DefaultLinearColorMap.cc/1.3/Thu Nov 4 15:58:45 2010// 2 /G4ScoreLogColorMap.cc/1.10/Fri Nov 5 09:56:24 2010// 3 /G4ScoreQuantityMessenger.cc/1.10/Fri Nov 5 09:56:24 2010// 4 /G4ScoreQuantityMessengerQCmd.cc/1.8/Fri Nov 5 09:56:24 2010// 5 /G4ScoringBox.cc/1.61/Fri Nov 5 09:56:25 2010// 6 /G4ScoringCylinder.cc/1.16/Fri Nov 5 09:56:25 2010// 7 /G4ScoringManager.cc/1.33/Fri Nov 5 09:56:25 2010// 8 /G4ScoringMessenger.cc/1.42/Fri Nov 5 09:56:25 2010// 9 /G4VScoreColorMap.cc/1.8/Fri Nov 5 09:56:25 2010// 10 /G4VScoreWriter.cc/1.10/Fri Nov 5 09:56:25 2010// 11 /G4VScoringMesh.cc/1.42/Fri Nov 5 09:56:25 2010// 13 12 D -
trunk/source/digits_hits/utils/src/G4DefaultLinearColorMap.cc
r1337 r1340 26 26 // 27 27 // $Id: G4DefaultLinearColorMap.cc,v 1.3 2008/08/29 02:50:05 akimura Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01$28 // GEANT4 tag $Name: $ 29 29 // 30 30 -
trunk/source/digits_hits/utils/src/G4ScoreLogColorMap.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ScoreLogColorMap.cc,v 1. 3 2009/05/04 15:57:33 akimuraExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ScoreLogColorMap.cc,v 1.10 2010/11/03 19:31:36 asaim Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 50 50 {;} 51 51 52 #include "G4UIcommand.hh" 52 53 void G4ScoreLogColorMap::GetMapColor(G4double val, G4double color[4]) 53 54 { 54 55 G4bool lmin = true, lmax = true, lval = true; 55 if(fMinVal <= 0.) lmin = false; 56 if(fMaxVal <= 0.) lmax = false; 57 if(val <= 0.) lval = false; 56 if(fMinVal < 0.) { 57 lmin = false; 58 G4String message = " The min. value (fMinVal) is negative. : "; 59 message += G4UIcommand::ConvertToString(fMinVal); 60 G4Exception("G4ScoreLogColorMap::GetMapColor()", 61 "DigiHitsUtilsScoreLogColorMap000", JustWarning, 62 message); 63 } 64 if(fMaxVal < 0.) { 65 lmax = false; 66 G4String message = " The max. value (fMaxVal) is negative. : "; 67 message += G4UIcommand::ConvertToString(fMaxVal); 68 G4Exception("G4ScoreLogColorMap::GetMapColor()", 69 "DigiHitsUtilsScoreLogColorMap001", JustWarning, 70 message); 71 } 72 if(!lmin || !lmax) { 73 color[0] = 0.; 74 color[1] = 0.; 75 color[2] = 0.; 76 color[3] = 0.; 77 return; 78 } 79 80 if(val < 0.) { 81 lval = false; 82 G4String message = " 'val' (first argument) is negative : "; 83 message += G4UIcommand::ConvertToString(fMaxVal); 84 G4Exception("G4ScoreLogColorMap::GetMapColor()", 85 "DigiHitsUtilsScoreLogColorMap002", JustWarning, 86 message); 87 } 88 if(!lval) { 89 color[0] = 0.; 90 color[1] = 0.; 91 color[2] = 0.; 92 color[3] = -1.; 93 return; 94 } 95 58 96 G4double logmin = 0., logmax = 0., logval = 0.; 59 97 if(lmin) logmin = std::log10(fMinVal); … … 101 139 void G4ScoreLogColorMap::DrawColorChartBar(G4int _nPoint) { 102 140 141 G4cout << "++++++ " << fMinVal << " - " << fMaxVal << G4endl; 103 142 G4bool lmin = true, lmax = true; 104 143 if(fMinVal <= 0.) lmin = false; … … 118 157 G4double val = std::pow(10., (ra*max+rb*min)/(ra+rb)); 119 158 this->GetMapColor(val, c); 159 if(c[0] == 0 && c[1] == 0 && c[2] == 0 && c[3] == 0) return; 160 if(c[0] == 0 && c[1] == 0 && c[2] == 0 && c[3] == -1.) continue; 120 161 G4Colour col(c[0], c[1], c[2]); 121 162 G4VisAttributes att(col); … … 132 173 G4double min = 0.; 133 174 if(lmin) min = std::log10(fMinVal); 134 if(min > 0.) min = std::floor(min);135 else min = std::ceil(min);175 //if(min > 0.) min = std::floor(min); 176 //else min = std::ceil(min); 136 177 137 178 G4double max = 0.; 138 179 if(lmax) max = std::log10(fMaxVal); 139 if(max > 0.) max = std::floor(max);140 else max = std::ceil(max);180 //if(max > 0.) max = std::ceil(max); 181 //else max = std::floor(max); 141 182 142 183 G4double c[4]; … … 145 186 G4double a = n/(_nPoint-1.), b = 1.-a; 146 187 G4double v = (a*max + b*min)/(a+b); 188 189 this->GetMapColor(std::pow(10., v), c); 190 if(c[0] == 0 && c[1] == 0 && c[2] == 0 && c[3] == 0) return; 191 if(c[0] == 0 && c[1] == 0 && c[2] == 0 && c[3] == -1.) continue; 192 147 193 // background color 148 194 for(int l = 0; l < 21; l++) { … … 165 211 G4double size = 12.; 166 212 text.SetScreenSize(size); 167 this->GetMapColor(std::pow(10., v), c);213 //this->GetMapColor(std::pow(10., v), c); 168 214 G4Colour color(c[0], c[1], c[2]); 169 215 G4VisAttributes att(color); … … 172 218 fVisManager->Draw2D(text); 173 219 } 220 221 222 // draw ps name 223 // background 224 G4int lpsname = 20;// fPSName.size(); 225 if(lpsname > 0) { 226 for(int l = 0; l < 22; l++) { 227 G4Polyline line; 228 line.push_back(G4Point3D(-0.9, -0.965+0.002*l, 0.)); 229 line.push_back(G4Point3D(-0.9+0.025*lpsname, -0.965+0.002*l, 0.)); 230 G4VisAttributes attblack(black); 231 //G4VisAttributes attblack(G4Colour(.0, .5, .0)); 232 line.SetVisAttributes(&attblack); 233 fVisManager->Draw2D(line); 234 } 235 // ps name 236 G4Text txtpsname(fPSName, G4Point3D(-0.9, -0.96, 0.)); 237 G4double size = 12.; 238 txtpsname.SetScreenSize(size); 239 G4Colour color(1., 1., 1.); 240 G4VisAttributes att(color); 241 txtpsname.SetVisAttributes(&att); 242 fVisManager->Draw2D(txtpsname); 243 } 244 245 246 247 // draw unit 248 // background 249 G4int len = fPSUnit.size(); 250 if(len > 0) { 251 for(int l = 0; l < 21; l++) { 252 G4Polyline line; 253 line.push_back(G4Point3D(-0.7, -0.9+0.002*l, 0.)); 254 line.push_back(G4Point3D(-0.7+0.3, -0.9+0.002*l, 0.)); 255 G4VisAttributes attblack(black); 256 //G4VisAttributes attblack(G4Colour(.5, .0, .0)); 257 line.SetVisAttributes(&attblack); 258 fVisManager->Draw2D(line); 259 } 260 // unit 261 G4String psunit = "[" + fPSUnit + "]"; 262 G4Text txtunit(psunit, G4Point3D(-0.69, -0.9, 0.)); 263 G4double size = 12.; 264 txtunit.SetScreenSize(size); 265 G4Colour color(1., 1., 1.); 266 G4VisAttributes att(color); 267 txtunit.SetVisAttributes(&att); 268 fVisManager->Draw2D(txtunit); 269 } 270 174 271 } -
trunk/source/digits_hits/utils/src/G4ScoreQuantityMessenger.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ScoreQuantityMessenger.cc,v 1. 8 2007/11/07 04:12:07 akimuraExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ScoreQuantityMessenger.cc,v 1.10 2010/11/03 08:28:42 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 // --------------------------------------------------------------------- 31 // Modifications 32 // 08-Oct-2010 T.Aso remove unit of G4PSPassageCellCurrent. 30 33 // --------------------------------------------------------------------- 31 34 … … 55 58 #include "G4PSTrackCounter3D.hh" 56 59 #include "G4PSTermination3D.hh" 60 #include "G4PSMinKinEAtGeneration3D.hh" 57 61 58 62 #include "G4SDChargedFilter.hh" … … 160 164 delete quantityDir; 161 165 delete qTouchCmd; 166 delete qGetUnitCmd; 167 delete qSetUnitCmd; 168 162 169 // 163 170 delete qCellChgCmd; … … 182 189 delete qTrackCountCmd; 183 190 delete qTerminationCmd; 191 delete qMinKinEAtGeneCmd; 184 192 // 185 193 delete filterDir; … … 209 217 if(command==qTouchCmd) { 210 218 mesh->SetCurrentPrimitiveScorer(newVal); 219 } else if(command == qGetUnitCmd ){ 220 G4cout << "Unit: "<< mesh->GetCurrentPSUnit() <<G4endl; 221 } else if(command == qSetUnitCmd ){ 222 mesh->SetCurrentPSUnit(newVal); 211 223 } else if(command== qCellChgCmd) { 212 if(!mesh->FindPrimitiveScorer(newVal)) { 213 mesh->SetPrimitiveScorer(new G4PSCellCharge3D(newVal)); 214 } else { 215 G4cout << "WARNING[" << qTouchCmd->GetCommandPath() 216 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 217 mesh->SetNullToCurrentPrimitiveScorer(); 218 } 224 if ( CheckMeshPS(mesh,token[0]) ){ 225 G4PSCellCharge3D* ps = new G4PSCellCharge3D(token[0]); 226 ps->SetUnit(token[1]); 227 mesh->SetPrimitiveScorer(ps); 228 } 219 229 } else if(command== qCellFluxCmd) { 220 if(!mesh->FindPrimitiveScorer(newVal)) { 221 mesh->SetPrimitiveScorer(new G4PSCellFlux3D(newVal)); 222 } else { 223 G4cout << "WARNING[" << qCellFluxCmd->GetCommandPath() 224 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 225 mesh->SetNullToCurrentPrimitiveScorer(); 226 } 230 if ( CheckMeshPS(mesh,token[0]) ){ 231 G4PSCellFlux3D* ps = new G4PSCellFlux3D(token[0]); 232 ps->SetUnit(token[1]); 233 mesh->SetPrimitiveScorer(ps); 234 } 227 235 } else if(command== qPassCellFluxCmd) { 228 if(!mesh->FindPrimitiveScorer(newVal)) { 229 mesh->SetPrimitiveScorer(new G4PSPassageCellFlux3D(newVal)); 230 } else { 231 G4cout << "WARNING[" << qPassCellFluxCmd->GetCommandPath() 232 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 233 mesh->SetNullToCurrentPrimitiveScorer(); 234 } 236 if ( CheckMeshPS(mesh,token[0]) ){ 237 G4PSPassageCellFlux3D* ps = new G4PSPassageCellFlux3D(token[0]); 238 ps->SetUnit(token[1]); 239 mesh->SetPrimitiveScorer(ps); 240 } 235 241 } else if(command==qeDepCmd) { 236 if(!mesh->FindPrimitiveScorer(newVal)) { 237 mesh->SetPrimitiveScorer(new G4PSEnergyDeposit3D(newVal)); 238 } else { 239 G4cout << "WARNING[" << qeDepCmd->GetCommandPath() 240 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 241 mesh->SetNullToCurrentPrimitiveScorer(); 242 } 242 if ( CheckMeshPS(mesh,token[0]) ){ 243 G4PSEnergyDeposit3D* ps =new G4PSEnergyDeposit3D(token[0]); 244 ps->SetUnit(token[1]); 245 mesh->SetPrimitiveScorer(ps); 246 } 243 247 } else if(command== qdoseDepCmd) { 244 if(!mesh->FindPrimitiveScorer(newVal)) { 245 mesh->SetPrimitiveScorer(new G4PSDoseDeposit3D(newVal)); 246 } else { 247 G4cout << "WARNING[" << qdoseDepCmd->GetCommandPath() 248 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 249 mesh->SetNullToCurrentPrimitiveScorer(); 250 } 248 if ( CheckMeshPS(mesh,token[0]) ){ 249 G4PSDoseDeposit3D* ps = new G4PSDoseDeposit3D(token[0]); 250 ps->SetUnit(token[1]); 251 mesh->SetPrimitiveScorer(ps); 252 } 251 253 } else if(command== qnOfStepCmd) { 252 if(!mesh->FindPrimitiveScorer(newVal)) { 253 mesh->SetPrimitiveScorer(new G4PSNofStep3D(newVal)); 254 } else { 255 G4cout << "WARNING[" << qnOfStepCmd->GetCommandPath() 256 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 257 mesh->SetNullToCurrentPrimitiveScorer(); 258 } 254 if ( CheckMeshPS(mesh,token[0]) ){ 255 G4PSNofStep3D* ps = new G4PSNofStep3D(token[0]); 256 mesh->SetPrimitiveScorer(ps); 257 } 259 258 } else if(command== qnOfSecondaryCmd) { 260 if(!mesh->FindPrimitiveScorer(newVal)) { 261 mesh->SetPrimitiveScorer(new G4PSNofSecondary3D(newVal)); 262 } else { 263 G4cout << "WARNING[" << qnOfSecondaryCmd->GetCommandPath() 264 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 265 mesh->SetNullToCurrentPrimitiveScorer(); 266 } 259 if ( CheckMeshPS(mesh,token[0]) ){ 260 G4PSNofSecondary3D* ps =new G4PSNofSecondary3D(token[0]); 261 mesh->SetPrimitiveScorer(ps); 262 } 267 263 } else if(command== qTrackLengthCmd) { 268 if(!mesh->FindPrimitiveScorer(newVal)){264 if ( CheckMeshPS(mesh,token[0]) ){ 269 265 G4PSTrackLength3D* ps = new G4PSTrackLength3D(token[0]); 270 266 ps->Weighted(StoB(token[1])); 271 267 ps->MultiplyKineticEnergy(StoB(token[2])); 272 268 ps->DivideByVelocity(StoB(token[3])); 273 mesh->SetPrimitiveScorer(ps); 274 } else { 275 G4cout << "WARNING[" << qTrackLengthCmd->GetCommandPath() 276 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 277 mesh->SetNullToCurrentPrimitiveScorer(); 278 } 269 ps->SetUnit(token[4]); 270 mesh->SetPrimitiveScorer(ps); 271 } 279 272 } else if(command== qPassCellCurrCmd){ 280 if(!mesh->FindPrimitiveScorer(newVal)) {273 if( CheckMeshPS(mesh,token[0]) ) { 281 274 G4PSPassageCellCurrent* ps = new G4PSPassageCellCurrent3D(token[0]); 282 275 ps->Weighted(StoB(token[1])); 283 mesh->SetPrimitiveScorer(ps); 284 } else { 285 G4cout << "WARNING[" << qPassCellCurrCmd->GetCommandPath() 286 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 287 mesh->SetNullToCurrentPrimitiveScorer(); 288 } 276 //ps->SetUnit(token[2]); 277 mesh->SetPrimitiveScorer(ps); 278 } 289 279 } else if(command== qPassTrackLengthCmd){ 290 if(!mesh->FindPrimitiveScorer(newVal)) {280 if( CheckMeshPS(mesh,token[0]) ) { 291 281 G4PSPassageTrackLength* ps = new G4PSPassageTrackLength3D(token[0]); 292 282 ps->Weighted(StoB(token[1])); 293 283 mesh->SetPrimitiveScorer(ps); 294 } else { 295 G4cout << "WARNING[" << qPassTrackLengthCmd->GetCommandPath() 296 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 297 mesh->SetNullToCurrentPrimitiveScorer(); 298 } 284 } 299 285 } else if(command== qFlatSurfCurrCmd){ 300 if(!mesh->FindPrimitiveScorer(newVal)) {286 if( CheckMeshPS(mesh,token[0])) { 301 287 G4PSFlatSurfaceCurrent3D* ps = 302 288 new G4PSFlatSurfaceCurrent3D(token[0],StoI(token[1])); 303 289 ps->Weighted(StoB(token[2])); 304 290 ps->DivideByArea(StoB(token[3])); 305 mesh->SetPrimitiveScorer(ps); 306 } else { 307 G4cout << "WARNING[" << qFlatSurfCurrCmd->GetCommandPath() 308 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 309 mesh->SetNullToCurrentPrimitiveScorer(); 310 } 291 ps->SetUnit(token[4]); 292 mesh->SetPrimitiveScorer(ps); 293 } 311 294 } else if(command== qFlatSurfFluxCmd){ 312 if(!mesh->FindPrimitiveScorer(newVal)) { 313 mesh->SetPrimitiveScorer( 314 new G4PSFlatSurfaceFlux3D(token[0],StoI(token[1]))); 315 } else { 316 G4cout << "WARNING[" << qFlatSurfFluxCmd->GetCommandPath() 317 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 318 mesh->SetNullToCurrentPrimitiveScorer(); 319 } 320 // } else if(command== qSphereSurfCurrCmd){ 321 // if(!mesh->FindPrimitiveScorer(newVal)) { 295 if( CheckMeshPS(mesh, token[0] )) { 296 G4PSFlatSurfaceFlux3D* ps = new G4PSFlatSurfaceFlux3D(token[0],StoI(token[1])); 297 ps->SetUnit(token[2]); 298 mesh->SetPrimitiveScorer(ps); 299 } 300 // } else if(command== qSphereSurfCurrCmd){ 301 // if( CheckMeshPS(mesh, token[0] )) { 322 302 // G4PSSphereSurfaceCurrent3D* ps = 323 303 // new G4PSSphereSurfaceCurrent3D(token[0],StoI(token[1])); 324 304 // ps->Weighted(StoB(token[2])); 325 305 // ps->DivideByArea(StoB(token[3])); 306 // ps->SetUnit(token[4]); 326 307 // mesh->SetPrimitiveScorer(ps); 327 // } else { 328 // G4cout << "WARNING[" << qSphereSurfCurrCmd->GetCommandPath() 329 // << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 330 // mesh->SetNullToCurrentPrimitiveScorer(); 331 // } 332 // } else if(command== qSphereSurfFluxCmd){ 333 // if(!mesh->FindPrimitiveScorer(newVal)) { 334 // mesh->SetPrimitiveScorer( 335 // new G4PSSphereSurfaceFlux3D(token[0], StoI(token[1]))); 336 // } else { 337 // G4cout << "WARNING[" << qSphereSurfFluxCmd->GetCommandPath() 338 // << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 339 // mesh->SetNullToCurrentPrimitiveScorer(); 340 // } 341 // } else if(command== qCylSurfCurrCmd){ 342 // if(!mesh->FindPrimitiveScorer(newVal)) { 308 // } 309 // } else if(command== qSphereSurfFluxCmd){ 310 // if( CheckMeshPS(mesh,token[0])) { 311 // G4PSSphereSurfaceFlux3D* ps = new G4PSSphereSurfaceFlux3D(token[0], StoI(token[1])); 312 // ps->SetUnit(token[2]); 313 // mesh->SetPrimitiveScorer(ps); 314 // } 315 // } else if(command== qCylSurfCurrCmd){ 316 // if( CheckMeshPS(mesh, token[0] ) ) { 343 317 // G4PSCylinderSurfaceCurrent3D* ps = 344 318 // new G4PSCylinderSurfaceCurrent3D(token[0],StoI(token[1])); 345 319 // ps->Weighted(StoB(token[2])); 346 320 // ps->DivideByArea(StoB(token[3])); 321 // ps->SetUnit(token[4]); 347 322 // mesh->SetPrimitiveScorer(ps); 348 // } else { 349 // G4cout << "WARNING[" << qCylSurfCurrCmd->GetCommandPath() 350 // << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 351 // mesh->SetNullToCurrentPrimitiveScorer(); 352 // } 353 // } else if(command== qCylSurfFluxCmd){ 354 // if(!mesh->FindPrimitiveScorer(newVal)) { 355 // mesh->SetPrimitiveScorer( 356 // new G4PSCylinderSurfaceFlux3D(token[0], StoI(token[1]))); 357 // } else { 358 // G4cout << "WARNING[" << qCylSurfFluxCmd->GetCommandPath() 359 // << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 360 // mesh->SetNullToCurrentPrimitiveScorer(); 361 // } 323 // } 324 // } else if(command== qCylSurfFluxCmd){ 325 // if( CheckMeshPS(mesh, token[0] ) { 326 // G4PSCylinerSurfaceFlux3D* ps =new G4PSCylinderSurfaceFlux3D(token[0], StoI(token[1])); 327 // ps->SetUnit(token[2]); 328 // mesh->SetPrimitiveScorer(ps); 329 // } 362 330 } else if(command== qNofCollisionCmd){ 363 if(!mesh->FindPrimitiveScorer(newVal)) {331 if( CheckMeshPS(mesh,token[0])) { 364 332 G4PSNofCollision3D* ps =new G4PSNofCollision3D(token[0]); 365 333 ps->Weighted(StoB(token[1])); 366 334 mesh->SetPrimitiveScorer(ps); 367 } else { 368 G4cout << "WARNING[" << qNofCollisionCmd->GetCommandPath() 369 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 370 mesh->SetNullToCurrentPrimitiveScorer(); 371 } 335 } 372 336 } else if(command== qPopulationCmd){ 373 if(!mesh->FindPrimitiveScorer(newVal)) {337 if( CheckMeshPS(mesh,token[0]) ) { 374 338 G4PSPopulation3D* ps =new G4PSPopulation3D(token[0]); 375 339 ps->Weighted(StoB(token[1])); 376 340 mesh->SetPrimitiveScorer(ps); 377 } else { 378 G4cout << "WARNING[" << qPopulationCmd->GetCommandPath() 379 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 380 mesh->SetNullToCurrentPrimitiveScorer(); 381 } 341 } 382 342 } else if(command== qTrackCountCmd){ 383 if(!mesh->FindPrimitiveScorer(newVal)) {343 if( CheckMeshPS(mesh,token[0])) { 384 344 G4PSTrackCounter3D* ps =new G4PSTrackCounter3D(token[0],StoI(token[1])); 385 345 mesh->SetPrimitiveScorer(ps); 386 } else { 387 G4cout << "WARNING[" << qTrackCountCmd->GetCommandPath() 388 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 389 mesh->SetNullToCurrentPrimitiveScorer(); 390 } 346 } 391 347 } else if(command== qTerminationCmd){ 392 if(!mesh->FindPrimitiveScorer(newVal)) {348 if( CheckMeshPS(mesh,token[0])) { 393 349 G4PSTermination3D* ps =new G4PSTermination3D(token[0]); 394 350 ps->Weighted(StoB(token[1])); 395 351 mesh->SetPrimitiveScorer(ps); 396 } else { 397 G4cout << "WARNING[" << qTerminationCmd->GetCommandPath() 398 << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl; 399 mesh->SetNullToCurrentPrimitiveScorer(); 400 } 352 } 353 354 } else if(command== qMinKinEAtGeneCmd){ 355 if( CheckMeshPS(mesh,token[0]) ){ 356 G4PSMinKinEAtGeneration3D* ps =new G4PSMinKinEAtGeneration3D(token[0]); 357 ps->SetUnit(token[1]); 358 mesh->SetPrimitiveScorer(ps); 359 } 401 360 402 361 // … … 488 447 mesh->SetFilter(filter); 489 448 } 490 449 450 G4bool G4ScoreQuantityMessenger::CheckMeshPS(G4VScoringMesh* mesh, G4String& psname){ 451 if(!mesh->FindPrimitiveScorer(psname)) { 452 return true; 453 } else { 454 G4cout << "WARNING[" << qTouchCmd->GetCommandPath() 455 << "] : Quantity name, \"" << psname << "\", is already existing." << G4endl; 456 mesh->SetNullToCurrentPrimitiveScorer(); 457 return false; 458 } 459 } -
trunk/source/digits_hits/utils/src/G4ScoreQuantityMessengerQCmd.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ScoreQuantityMessengerQCmd.cc,v 1.6 2007/11/07 04:12:07 akimura Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 // 27 // $Id: G4ScoreQuantityMessengerQCmd.cc,v 1.8 2010/11/03 08:29:02 taso Exp $ 28 // GEANT4 tag $Name: $ 29 // 30 // --------------------------------------------------------------------- 31 // Modifications 32 // 08-Oct-2010 T.Aso remove unit of G4PSPassageCellCurrent. 30 33 // --------------------------------------------------------------------- 31 34 … … 86 89 qTouchCmd->SetParameterName("qname",false); 87 90 // 88 qeDepCmd = new G4UIcmdWithAString("/score/quantity/energyDeposit",this); 91 qGetUnitCmd = new G4UIcmdWithoutParameter("/score/quantity/get/unit",this); 92 qGetUnitCmd->SetGuidance("Print output unit of the current quantity."); 93 // 94 qSetUnitCmd = new G4UIcmdWithAString("/score/quantity/set/unit",this); 95 qSetUnitCmd->SetGuidance("Set output unit of the current quantity."); 96 qSetUnitCmd->SetParameterName("unit",false); 97 98 // Primitive Scorers 99 qeDepCmd = new G4UIcommand("/score/quantity/energyDeposit",this); 89 100 qeDepCmd->SetGuidance("Energy deposit scorer."); 90 qeDepCmd->SetParameterName("qname",false); 91 // 92 qCellChgCmd = new G4UIcmdWithAString("/score/quantity/cellCharge",this); 101 qeDepCmd-> 102 SetGuidance("[usage] /score/quantiy/energyDeposit qname unit"); 103 qeDepCmd->SetGuidance(" qname :(String) scorer name"); 104 qeDepCmd->SetGuidance(" unit :(String) unit"); 105 param = new G4UIparameter("qname",'s',false); 106 qeDepCmd->SetParameter(param); 107 param = new G4UIparameter("unit",'s',true); 108 param->SetDefaultValue("MeV"); 109 qeDepCmd->SetParameter(param); 110 // 111 qCellChgCmd = new G4UIcommand("/score/quantity/cellCharge",this); 93 112 qCellChgCmd->SetGuidance("Cell charge scorer."); 94 qCellChgCmd->SetParameterName("qname",false); 95 // 96 qCellFluxCmd = new G4UIcmdWithAString("/score/quantity/cellFlux",this); 113 qCellChgCmd-> 114 SetGuidance("[usage] /score/quantiy/cellCharge qname unit"); 115 qCellChgCmd->SetGuidance(" qname :(String) scorer name"); 116 qCellChgCmd->SetGuidance(" unit :(String) unit"); 117 param = new G4UIparameter("qname",'s',false); 118 qCellChgCmd->SetParameter(param); 119 param = new G4UIparameter("unit",'s',true); 120 param->SetDefaultValue("e+"); 121 qCellChgCmd->SetParameter(param); 122 // 123 qCellFluxCmd = new G4UIcommand("/score/quantity/cellFlux",this); 97 124 qCellFluxCmd->SetGuidance("Cell flux scorer."); 98 qCellFluxCmd->SetParameterName("qname",false); 99 // 100 qPassCellFluxCmd = new G4UIcmdWithAString("/score/quantity/passageCellFlux",this); 125 qCellFluxCmd-> 126 SetGuidance("[usage] /score/quantiy/cellFlux qname unit"); 127 qCellFluxCmd->SetGuidance(" qname :(String) scorer name"); 128 qCellFluxCmd->SetGuidance(" unit :(String) unit"); 129 param = new G4UIparameter("qname",'s',false); 130 qCellFluxCmd->SetParameter(param); 131 param = new G4UIparameter("unit",'s',true); 132 param->SetDefaultValue("percm2"); 133 qCellFluxCmd->SetParameter(param); 134 // 135 qPassCellFluxCmd = new G4UIcommand("/score/quantity/passageCellFlux",this); 101 136 qPassCellFluxCmd->SetGuidance("Passage cell flux scorer"); 102 qPassCellFluxCmd->SetParameterName("qname",false); 103 // 104 qdoseDepCmd = new G4UIcmdWithAString("/score/quantity/doseDeposit",this); 137 qPassCellFluxCmd-> 138 SetGuidance("[usage] /score/quantiy/passageCellFlux qname unit"); 139 qPassCellFluxCmd->SetGuidance(" qname :(String) scorer name"); 140 qPassCellFluxCmd->SetGuidance(" unit :(String) unit"); 141 param = new G4UIparameter("qname",'s',false); 142 qPassCellFluxCmd->SetParameter(param); 143 param = new G4UIparameter("unit",'s',true); 144 param->SetDefaultValue("percm2"); 145 qPassCellFluxCmd->SetParameter(param); 146 // 147 qdoseDepCmd = new G4UIcommand("/score/quantity/doseDeposit",this); 105 148 qdoseDepCmd->SetGuidance("Dose deposit scorer."); 106 qdoseDepCmd->SetParameterName("qname",false); 107 // 108 qnOfStepCmd = new G4UIcmdWithAString("/score/quantity/nOfStep",this); 149 qdoseDepCmd-> 150 SetGuidance("[usage] /score/quantiy/doseDeposit qname unit"); 151 qdoseDepCmd->SetGuidance(" qname :(String) scorer name"); 152 qdoseDepCmd->SetGuidance(" unit :(String) unit"); 153 param = new G4UIparameter("qname",'s',false); 154 qdoseDepCmd->SetParameter(param); 155 param = new G4UIparameter("unit",'s',true); 156 param->SetDefaultValue("Gy"); 157 qdoseDepCmd->SetParameter(param); 158 // 159 qnOfStepCmd = new G4UIcommand("/score/quantity/nOfStep",this); 109 160 qnOfStepCmd->SetGuidance("Number of step scorer."); 110 qnOfStepCmd->SetParameterName("qname",false); 111 // 112 qnOfSecondaryCmd = new G4UIcmdWithAString("/score/quantity/nOfSecondary",this); 161 qnOfStepCmd-> 162 SetGuidance("[usage] /score/quantiy/nOfStep qname"); 163 qnOfStepCmd->SetGuidance(" qname :(String) scorer name"); 164 param = new G4UIparameter("qname",'s',false); 165 qnOfStepCmd->SetParameter(param); 166 // 167 qnOfSecondaryCmd = new G4UIcommand("/score/quantity/nOfSecondary",this); 113 168 qnOfSecondaryCmd->SetGuidance("Number of secondary scorer."); 114 qnOfSecondaryCmd->SetParameterName("qname",false); 169 qnOfSecondaryCmd-> 170 SetGuidance("[usage] /score/quantiy/nOfSecondary qname"); 171 qnOfSecondaryCmd->SetGuidance(" qname :(String) scorer name"); 172 param = new G4UIparameter("qname",'s',false); 173 qnOfSecondaryCmd->SetParameter(param); 115 174 // 116 175 qTrackLengthCmd = new G4UIcommand("/score/quantity/trackLength",this); 117 176 qTrackLengthCmd->SetGuidance("Track length scorer."); 118 177 qTrackLengthCmd-> 119 SetGuidance("[usage] /score/quantiy/trackLength qname wflag kflag vflag");178 SetGuidance("[usage] /score/quantiy/trackLength qname wflag kflag vflag unit"); 120 179 qTrackLengthCmd->SetGuidance(" qname :(String) scorer name"); 121 180 qTrackLengthCmd->SetGuidance(" wflag :(Bool) weighted"); 122 181 qTrackLengthCmd->SetGuidance(" kflag :(Bool) multiply kinetic energy"); 123 182 qTrackLengthCmd->SetGuidance(" vflag :(Bool) divide by velocity"); 183 qTrackLengthCmd->SetGuidance(" unit :(String) unit"); 124 184 param = new G4UIparameter("qname",'s',false); 125 185 qTrackLengthCmd->SetParameter(param); … … 132 192 param = new G4UIparameter("vflag",'b',true); 133 193 param->SetDefaultValue("false"); 194 qTrackLengthCmd->SetParameter(param); 195 param = new G4UIparameter("unit",'s',true); 196 param->SetDefaultValue("mm"); 134 197 qTrackLengthCmd->SetParameter(param); 135 198 // … … 137 200 qPassCellCurrCmd->SetGuidance("Passage cell current scorer."); 138 201 qPassCellCurrCmd-> 139 SetGuidance("[usage] /score/quantiy/passageCellCurrent qname wflag"); 202 SetGuidance("[usage] /score/quantiy/passageCellCurrent qname wflag"); 203 //SetGuidance("[usage] /score/quantiy/passageCellCurrent qname wflag unit"); 140 204 qPassCellCurrCmd->SetGuidance(" qname :(String) scorer name"); 141 205 qPassCellCurrCmd->SetGuidance(" wflag :(Bool) weighted"); 206 //qPassCellCurrCmd->SetGuidance(" unit :(Bool) unit"); 142 207 param = new G4UIparameter("qname",'s',false); 143 208 qPassCellCurrCmd->SetParameter(param); … … 145 210 param->SetDefaultValue("true"); 146 211 qPassCellCurrCmd->SetParameter(param); 212 //param = new G4UIparameter("unit",'s',true); 213 //param->SetDefaultValue("parcm2"); 214 //qPassCellCurrCmd->SetParameter(param); 147 215 // 148 216 qPassTrackLengthCmd = new G4UIcommand("/score/quantity/passageTrackLength",this); 149 217 qPassTrackLengthCmd->SetGuidance("Passage track length scorer."); 150 218 qPassTrackLengthCmd-> 151 SetGuidance("[usage] /score/quantiy/passageTrackLength qname wflag");219 SetGuidance("[usage] /score/quantiy/passageTrackLength qname wflag unit"); 152 220 qPassTrackLengthCmd->SetGuidance(" qname :(String) scorer name"); 153 221 qPassTrackLengthCmd->SetGuidance(" wflag :(Bool) weighted"); 222 qPassTrackLengthCmd->SetGuidance(" unit :(Bool) unit"); 154 223 param = new G4UIparameter("qname",'s',false); 155 224 qPassTrackLengthCmd->SetParameter(param); 156 225 param = new G4UIparameter("wflag",'b',true); 157 226 param->SetDefaultValue("true"); 227 qPassTrackLengthCmd->SetParameter(param); 228 param = new G4UIparameter("unit",'s',true); 229 param->SetDefaultValue("mm"); 158 230 qPassTrackLengthCmd->SetParameter(param); 159 231 // … … 161 233 qFlatSurfCurrCmd->SetGuidance("Flat surface current Scorer."); 162 234 qFlatSurfCurrCmd-> 163 SetGuidance("[usage] /score/quantiy/flatSurfaceCurrent qname dflag wflag aflag");235 SetGuidance("[usage] /score/quantiy/flatSurfaceCurrent qname dflag wflag aflag unit"); 164 236 qFlatSurfCurrCmd->SetGuidance(" qname :(String) scorer name"); 165 237 qFlatSurfCurrCmd->SetGuidance(" dflag :(Int) direction flag"); … … 169 241 qFlatSurfCurrCmd->SetGuidance(" wflag :(Bool) weighted"); 170 242 qFlatSurfCurrCmd->SetGuidance(" aflag :(Bool) divide by area"); 243 qFlatSurfCurrCmd->SetGuidance(" unit :(Bool) unit"); 171 244 param = new G4UIparameter("qname",'s',false); 172 245 qFlatSurfCurrCmd->SetParameter(param); … … 180 253 param->SetDefaultValue("true"); 181 254 qFlatSurfCurrCmd->SetParameter(param); 255 param = new G4UIparameter("unit",'s',true); 256 param->SetDefaultValue("percm2"); 257 qFlatSurfCurrCmd->SetParameter(param); 182 258 // 183 259 qFlatSurfFluxCmd = new G4UIcommand("/score/quantity/flatSurfaceFlux",this); 184 260 qFlatSurfFluxCmd->SetGuidance("Flat surface flux scorer."); 185 261 qFlatSurfFluxCmd-> 186 SetGuidance("[usage] /score/quantiy/flatSurfaceFlux qname dflag");262 SetGuidance("[usage] /score/quantiy/flatSurfaceFlux qname dflag unit"); 187 263 qFlatSurfFluxCmd->SetGuidance(" qname :(String) scorer name"); 188 264 qFlatSurfFluxCmd->SetGuidance(" dflag :(Int) direction flag"); … … 190 266 qFlatSurfFluxCmd->SetGuidance(" : 1 = In only"); 191 267 qFlatSurfFluxCmd->SetGuidance(" : 2 = Out only"); 268 qFlatSurfFluxCmd->SetGuidance(" unit :(String) unit"); 192 269 param = new G4UIparameter("qname",'s',false); 193 270 qFlatSurfFluxCmd->SetParameter(param); … … 195 272 param->SetDefaultValue("0"); 196 273 qFlatSurfFluxCmd->SetParameter(param); 274 param = new G4UIparameter("unit",'s',true); 275 param->SetDefaultValue("percm2"); 276 qFlatSurfFluxCmd->SetParameter(param); 197 277 // 198 278 // qSphereSurfCurrCmd = new G4UIcommand("/score/quantity/sphereSurfaceCurrent",this); 199 279 // qSphereSurfCurrCmd->SetGuidance("Sphere surface current Scorer."); 200 280 // qSphereSurfCurrCmd-> 201 // SetGuidance("[usage] /score/quantiy/sphereSurfaceCurrent qname dflag wflag aflag ");281 // SetGuidance("[usage] /score/quantiy/sphereSurfaceCurrent qname dflag wflag aflag unit"); 202 282 // qSphereSurfCurrCmd->SetGuidance(" qname :(String) scorer name"); 203 283 // qSphereSurfCurrCmd->SetGuidance(" dflag :(Int) direction flag"); … … 207 287 // qSphereSurfCurrCmd->SetGuidance(" wflag :(Bool) Weighted"); 208 288 // qSphereSurfCurrCmd->SetGuidance(" aflag :(Bool) DivideByArea"); 289 // qSphereSurfCurrCmd->SetGuidance(" unit :(String) unit"); 209 290 // param = new G4UIparameter("qname",'s',false); 210 291 // qSphereSurfCurrCmd->SetParameter(param); … … 218 299 // param->SetDefaultValue("true"); 219 300 // qSphereSurfCurrCmd->SetParameter(param); 301 // param = new G4UIparameter("unit",'s',true); 302 // param->SetDefaultValue("percm2"); 303 // qSphereSurfCurrCmd->SetParameter(param); 220 304 221 305 // … … 223 307 // qSphereSurfFluxCmd->SetGuidance("Sphere surface Flux Scorer."); 224 308 // qSphereSurfFluxCmd-> 225 // SetGuidance("[usage] /score/quantiy/sphereSurfaceFlux qname dflag");309 // SetGuidance("[usage] /score/quantiy/sphereSurfaceFlux qname dflag unit"); 226 310 // qSphereSurfFluxCmd->SetGuidance(" qname :(String) scorer name"); 227 311 // qSphereSurfFluxCmd->SetGuidance(" dflag :(Int) direction flag"); … … 229 313 // qSphereSurfFluxCmd->SetGuidance(" : 1 = In only"); 230 314 // qSphereSurfFluxCmd->SetGuidance(" : 2 = Out only"); 315 // qSphereSurfFluxCmd->SetGuidance(" unit :(String) unit"); 231 316 // param = new G4UIparameter("qname",'s',false); 232 317 // qSphereSurfFluxCmd->SetParameter(param); … … 234 319 // param->SetDefaultValue("0"); 235 320 // qSphereSurfFluxCmd->SetParameter(param); 321 // param = new G4UIparameter("unit",'s',true); 322 // param->SetDefaultValue("percm2"); 323 // qSphereSurfFluxCmd->SetParameter(param); 236 324 237 325 // … … 239 327 // qCylSurfCurrCmd->SetGuidance("Cylinder surface current Scorer."); 240 328 // qCylSurfCurrCmd-> 241 // SetGuidance("[usage] /score/quantiy/cylinderSurfaceCurrent qname dflag wflag aflag");329 // SetGuidance("[usage] /score/quantiy/cylinderSurfaceCurrent qname dflag wflag aflag unit"); 242 330 // qCylSurfCurrCmd->SetGuidance(" qname :(String) scorer name"); 243 331 // qCylSurfCurrCmd->SetGuidance(" dflag :(Int) direction flag"); … … 247 335 // qCylSurfCurrCmd->SetGuidance(" wflag :(Bool) Weighted"); 248 336 // qCylSurfCurrCmd->SetGuidance(" aflag :(Bool) DivideByArea"); 337 // qCylSurfCurrCmd->SetGuidance(" unit :(String) unit"); 249 338 // param = new G4UIparameter("qname",'s',false); 250 339 // qCylSurfCurrCmd->SetParameter(param); … … 258 347 // param->SetDefaultValue("true"); 259 348 // qCylSurfCurrCmd->SetParameter(param); 349 // param = new G4UIparameter("unit",'s',true); 350 // param->SetDefaultValue("percm2"); 351 // qCylSurfCurrCmd->SetParameter(param); 260 352 // 261 353 // qCylSurfFluxCmd = new G4UIcommand("/score/quantity/cylinderSurfaceFlux",this); 262 354 // qCylSurfFluxCmd->SetGuidance("Cylinder surface Flux Scorer."); 263 355 // qCylSurfFluxCmd-> 264 // SetGuidance("[usage] /score/quantiy/cylinderSurfaceFlux qname dflag");356 // SetGuidance("[usage] /score/quantiy/cylinderSurfaceFlux qname dflag unit"); 265 357 // qCylSurfFluxCmd->SetGuidance(" qname :(String) scorer name"); 266 358 // qCylSurfFluxCmd->SetGuidance(" dflag :(Int) direction flag"); … … 268 360 // qCylSurfFluxCmd->SetGuidance(" : 1 = In only"); 269 361 // qCylSurfFluxCmd->SetGuidance(" : 2 = Out only"); 362 // qCylSurfFluxCmd->SetGuidance(" unit :(String) unit"); 270 363 // param = new G4UIparameter("qname",'s',false); 271 364 // qCylSurfFluxCmd->SetParameter(param); … … 273 366 // param->SetDefaultValue("0"); 274 367 // qCylSurfFluxCmd->SetParameter(param); 368 // param = new G4UIparameter("unit",'s',true); 369 // param->SetDefaultValue("percm2"); 370 // qCylSurfFluxCmd->SetParameter(param); 371 // 275 372 // 276 373 qNofCollisionCmd = new G4UIcommand("/score/quantity/nOfCollision",this); 277 374 qNofCollisionCmd->SetGuidance("Number of collision scorer."); 278 375 qNofCollisionCmd-> 279 376 SetGuidance("[usage] /score/quantiy/nOfCollision qname wflag"); 280 377 qNofCollisionCmd->SetGuidance(" qname :(String) scorer name"); 281 qNofCollisionCmd->SetGuidance(" wflag :(Bool) weighted");282 378 param = new G4UIparameter("qname",'s',false); 283 379 qNofCollisionCmd->SetParameter(param); … … 289 385 qPopulationCmd->SetGuidance("Population scorer."); 290 386 qPopulationCmd-> 291 387 SetGuidance("[usage] /score/quantiy/population qname wflag"); 292 388 qPopulationCmd->SetGuidance(" qname :(String) scorer name"); 293 389 qPopulationCmd->SetGuidance(" wflag :(Bool) weighted"); … … 302 398 qTrackCountCmd->SetGuidance("Number of track scorer."); 303 399 qTrackCountCmd-> 304 400 SetGuidance("[usage] /score/quantiy/nOfTrack qname dflag wflag"); 305 401 qTrackCountCmd->SetGuidance(" qname :(String) scorer name"); 306 402 qTrackCountCmd->SetGuidance(" dflag :(Int) direction"); … … 330 426 param->SetDefaultValue("false"); 331 427 qTerminationCmd->SetParameter(param); 428 429 // 430 qMinKinEAtGeneCmd = new G4UIcommand("/score/quantity/minKinEAtGeneration",this); 431 qMinKinEAtGeneCmd->SetGuidance("Min Kinetic Energy at Generation"); 432 qMinKinEAtGeneCmd-> 433 SetGuidance("[usage] /score/quantiy/minKinEAtGeneration qname"); 434 qMinKinEAtGeneCmd->SetGuidance(" qname :(String) scorer name"); 435 param = new G4UIparameter("qname",'s',false); 436 qMinKinEAtGeneCmd->SetParameter(param); 332 437 } 333 438 -
trunk/source/digits_hits/utils/src/G4ScoringBox.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ScoringBox.cc,v 1. 54 2008/08/29 02:50:05akimura Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ScoringBox.cc,v 1.61 2010/07/27 01:44:54 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 37 37 #include "G4PVReplica.hh" 38 38 #include "G4PVDivision.hh" 39 #include "G4PVParameterised.hh"40 39 #include "G4VisAttributes.hh" 41 #include "G4ScoringBoxParameterisation.hh"42 40 #include "G4VVisManager.hh" 43 41 #include "G4VScoreColorMap.hh" … … 57 55 { 58 56 fShape = boxMesh; 57 fDivisionAxisNames[0] = "X"; 58 fDivisionAxisNames[1] = "Y"; 59 fDivisionAxisNames[2] = "Z"; 59 60 } 60 61 … … 186 187 fSize[2]/fNSegment[2]); 187 188 fMeshElementLogical = new G4LogicalVolume(elementSolid, 0, elementName); 188 if(fNSegment[2] > 1) 189 if(fSegmentPositions.size() > 0) { 190 if(verboseLevel > 9) G4cout << "G4ScoringBox::Construct() : Parameterise to z direction" << G4endl; 191 G4double motherDims[3] ={fSize[0]/fNSegment[0], 192 fSize[1]/fNSegment[1], 193 fSize[2]/fNSegment[2]}; 194 G4int nelement = fNSegment[2]; 195 fSegmentPositions.push_back(fSize[2]*2.); 196 //G4ScoringBoxParameterisation * param = 197 G4VPVParameterisation * param = 198 new G4ScoringBoxParameterisation(kZAxis, motherDims, fSegmentPositions); 199 new G4PVParameterised(elementName, 200 fMeshElementLogical, 201 layerLogical[1], 202 kZAxis, 203 nelement, 204 param); 205 206 if(verboseLevel > 9) { 207 G4cout << motherDims[0] << ", " << motherDims[1] << ", " << motherDims[2] << G4endl; 208 for(int i = 0; i < (int)fSegmentPositions.size(); i++) 209 G4cout << fSegmentPositions[i] << ", "; 210 G4cout << G4endl; 211 } 212 213 } else { 214 if(verboseLevel > 9) G4cout << "G4ScoringBox::Construct() : Replicate to z direction" << G4endl; 215 216 if(G4ScoringManager::GetReplicaLevel()>2) 217 { 218 new G4PVReplica(elementName, fMeshElementLogical, layerLogical[1], kZAxis, 189 if(fNSegment[2] > 1) { 190 if(verboseLevel > 9) G4cout << "G4ScoringBox::Construct() : Replicate to z direction" << G4endl; 191 192 if(G4ScoringManager::GetReplicaLevel()>2) 193 { 194 new G4PVReplica(elementName, fMeshElementLogical, layerLogical[1], kZAxis, 219 195 fNSegment[2], 2.*fSize[2]/fNSegment[2]); 220 } 221 else 222 { 223 new G4PVDivision(elementName, fMeshElementLogical, layerLogical[1], kZAxis, 224 fNSegment[2], 0.); 225 } 226 } 227 else if(fNSegment[2] == 1) { 196 } 197 else 198 { 199 new G4PVDivision(elementName, fMeshElementLogical, layerLogical[1], kZAxis, 200 fNSegment[2], 0.); 201 } 202 } else if(fNSegment[2] == 1) { 228 203 if(verboseLevel > 9) G4cout << "G4ScoringBox::Construct() : Placement" << G4endl; 229 204 new G4PVPlacement(0, G4ThreeVector(0.,0.,0.), fMeshElementLogical, elementName, layerLogical[1], false, 0); … … 292 267 for(int x = 0; x < fNSegment[0]; x++) xzcell.push_back(ez); 293 268 269 // search max. & min. values in each slice 294 270 G4double xymin = DBL_MAX, yzmin = DBL_MAX, xzmin = DBL_MAX; 295 271 G4double xymax = 0., yzmax = 0., xzmax = 0.; … … 299 275 GetXYZ(itr->first, q); 300 276 301 xycell[q[0]][q[1]] += *(itr->second) ;277 xycell[q[0]][q[1]] += *(itr->second)/fDrawUnitValue; 302 278 if(xymin > xycell[q[0]][q[1]]) xymin = xycell[q[0]][q[1]]; 303 279 if(xymax < xycell[q[0]][q[1]]) xymax = xycell[q[0]][q[1]]; 304 280 305 yzcell[q[1]][q[2]] += *(itr->second) ;281 yzcell[q[1]][q[2]] += *(itr->second)/fDrawUnitValue; 306 282 if(yzmin > yzcell[q[1]][q[2]]) yzmin = yzcell[q[1]][q[2]]; 307 283 if(yzmax < yzcell[q[1]][q[2]]) yzmax = yzcell[q[1]][q[2]]; 308 284 309 xzcell[q[0]][q[2]] += *(itr->second) ;285 xzcell[q[0]][q[2]] += *(itr->second)/fDrawUnitValue; 310 286 if(xzmin > xzcell[q[0]][q[2]]) xzmin = xzcell[q[0]][q[2]]; 311 287 if(xzmax < xzcell[q[0]][q[2]]) xzmax = xzcell[q[0]][q[2]]; … … 404 380 } 405 381 } 382 colorMap->SetPSUnit(fDrawUnit); 383 colorMap->SetPSName(fDrawPSName); 406 384 colorMap->DrawColorChart(); 407 385 } … … 429 407 } 430 408 431 void G4ScoringBox::DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, 432 409 void G4ScoringBox::DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, 410 G4int idxProj, G4int idxColumn) 433 411 { 434 412 if(idxColumn<0 || idxColumn>=fNSegment[idxProj]) … … 460 438 for(int x = 0; x < fNSegment[0]; x++) xzcell.push_back(ez); 461 439 440 // search max. & min. values in each slice 462 441 G4double xymax = 0., yzmax = 0., xzmax = 0.; 463 442 G4int q[3]; … … 467 446 468 447 if(idxProj == 0 && q[2] == idxColumn) { // xy plane 469 xycell[q[0]][q[1]] += *(itr->second) ;448 xycell[q[0]][q[1]] += *(itr->second)/fDrawUnitValue; 470 449 if(xymax < xycell[q[0]][q[1]]) xymax = xycell[q[0]][q[1]]; 471 450 } 472 451 if(idxProj == 1 && q[0] == idxColumn) { // yz plane 473 yzcell[q[1]][q[2]] += *(itr->second) ;452 yzcell[q[1]][q[2]] += *(itr->second)/fDrawUnitValue; 474 453 if(yzmax < yzcell[q[1]][q[2]]) yzmax = yzcell[q[1]][q[2]]; 475 454 } 476 455 if(idxProj == 2 && q[1] == idxColumn) { // zx plane 477 xzcell[q[0]][q[2]] += *(itr->second) ;456 xzcell[q[0]][q[2]] += *(itr->second)/fDrawUnitValue; 478 457 if(xzmax < xzcell[q[0]][q[2]]) xzmax = xzcell[q[0]][q[2]]; 479 458 } … … 552 531 } 553 532 533 colorMap->SetPSUnit(fDrawUnit); 534 colorMap->SetPSName(fDrawPSName); 554 535 colorMap->DrawColorChart(); 555 536 } -
trunk/source/digits_hits/utils/src/G4ScoringCylinder.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ScoringCylinder.cc,v 1. 6 2008/08/29 02:50:05akimura Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ScoringCylinder.cc,v 1.16 2010/08/30 08:15:20 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 38 38 #include "G4PVReplica.hh" 39 39 #include "G4PVDivision.hh" 40 #include "G4PVParameterised.hh"41 40 #include "G4VisAttributes.hh" 42 //#include "G4ScoringCylinderParameterisation.hh"43 41 #include "G4VVisManager.hh" 44 42 #include "G4VScoreColorMap.hh" … … 55 53 56 54 G4ScoringCylinder::G4ScoringCylinder(G4String wName) 57 :G4VScoringMesh(wName), fSegmentDirection(-1), 58 fMeshElementLogical(0) 55 :G4VScoringMesh(wName), fMeshElementLogical(0) 59 56 { 60 57 fShape = cylinderMesh; 58 59 fDivisionAxisNames[0] = "Z"; 60 fDivisionAxisNames[1] = "PHI"; 61 fDivisionAxisNames[2] = "R"; 61 62 } 62 63 63 64 G4ScoringCylinder::~G4ScoringCylinder() 64 { 65 } 65 {;} 66 66 67 67 void G4ScoringCylinder::Construct(G4VPhysicalVolume* fWorldPhys) … … 91 91 // Scoring Mesh 92 92 if(verboseLevel > 9) G4cout << fWorldName << G4endl; 93 G4String tubsName = fWorldName ;94 95 if(verboseLevel > 9) G4cout << fSize[0] << ", " << fSize[1] << G4endl;93 G4String tubsName = fWorldName+"_mesh"; 94 95 if(verboseLevel > 9) G4cout << "R max., Dz =: " << fSize[0] << ", " << fSize[1] << G4endl; 96 96 G4VSolid * tubsSolid = new G4Tubs(tubsName+"0", // name 97 97 0., // R min 98 98 fSize[0], // R max 99 fSize[1], // dZ99 fSize[1], // Dz 100 100 0., // starting phi 101 101 twopi*rad); // segment phi 102 102 G4LogicalVolume * tubsLogical = new G4LogicalVolume(tubsSolid, 0, tubsName); 103 103 new G4PVPlacement(fRotationMatrix, fCenterPosition, 104 104 tubsLogical, tubsName+"0", worldLogical, false, 0); 105 105 106 if(verboseLevel > 9) G4cout << " # of segments : r, phi, z =: " 107 << fNSegment[IR] << ", " << fNSegment[IPHI] << ", " << fNSegment[IZ] << G4endl; 106 108 107 109 G4String layerName[2] = {tubsName + "1", tubsName + "2"}; … … 109 111 G4LogicalVolume * layerLogical[2]; 110 112 111 //-- fisrt nested layer (replicated along rdirection)113 //-- fisrt nested layer (replicated along z direction) 112 114 if(verboseLevel > 9) G4cout << "layer 1 :" << G4endl; 113 layerSolid[0] = new G4Tubs(layerName[0], 114 0., 115 fSize[0]/fNSegment[0], 116 fSize[1], 117 0., twopi*rad); 115 layerSolid[0] = new G4Tubs(layerName[0], // name 116 0., // inner radius 117 fSize[0], // outer radius 118 fSize[1]/fNSegment[IZ], // half len. in z 119 0., // starting phi angle 120 twopi*rad); // delta angle of the segment 118 121 layerLogical[0] = new G4LogicalVolume(layerSolid[0], 0, layerName[0]); 119 if(fNSegment[0] > 1) { 120 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Replicate along r direction" << G4endl; 121 G4double r = fSize[0]/fNSegment[0]; 122 //if(G4ScoringManager::GetReplicaLevel()>0) { 123 if(false) { // always use G4PVDivision 122 if(fNSegment[IZ] > 1) { 123 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Replicate along z direction" << G4endl; 124 if(G4ScoringManager::GetReplicaLevel()>0) { 124 125 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Replica" << G4endl; 125 new G4PVReplica(layerName[0], layerLogical[0], tubsLogical, kRho, 126 fNSegment[0], r, 0.); 126 new G4PVReplica(layerName[0], layerLogical[0], tubsLogical, kZAxis, fNSegment[IZ], 2.*fSize[1]/fNSegment[IZ]); 127 127 } else { 128 128 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Division" << G4endl; 129 new G4PVDivision(layerName[0], layerLogical[0], tubsLogical, kRho, 130 fNSegment[0], 0.); 131 } 132 } else if(fNSegment[0] == 1) { 129 new G4PVDivision(layerName[0], layerLogical[0], tubsLogical, kZAxis, fNSegment[IZ], 0.); 130 } 131 } else if(fNSegment[IZ] == 1) { 133 132 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Placement" << G4endl; 134 133 new G4PVPlacement(0, G4ThreeVector(0.,0.,0.), layerLogical[0], layerName[0], tubsLogical, false, 0); 135 134 } else { 136 135 G4cerr << "G4ScoringCylinder::SetupGeometry() : invalid parameter (" 137 << fNSegment[ 0] << ") "136 << fNSegment[IZ] << ") " 138 137 << "in placement of the first nested layer." << G4endl; 139 138 } 140 139 141 if(verboseLevel > 9) { 142 G4cout << fSize[0] << ", " 143 << fSize[1] 144 << G4endl; 145 G4cout << layerName[0] << ": kRho, " 146 << fNSegment[0] << ", " 147 << fSize[0]/fNSegment[0] << G4endl; 148 } 149 150 // second nested layer (replicated along z direction) 140 // second nested layer (replicated along phi direction) 151 141 if(verboseLevel > 9) G4cout << "layer 2 :" << G4endl; 152 142 layerSolid[1] = new G4Tubs(layerName[1], 153 143 0., 154 fSize[0],///fNSegment[0], 155 fSize[1]/fNSegment[1], 156 0., twopi*rad); 144 fSize[0], 145 fSize[1]/fNSegment[IZ], 146 0., 147 twopi*rad/fNSegment[IPHI]); 157 148 layerLogical[1] = new G4LogicalVolume(layerSolid[1], 0, layerName[1]); 158 if(fNSegment[1] > 1) { 159 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Replicate along z direction" << G4endl; 160 G4double width = fSize[1]/fNSegment[1]*2.; 161 //if(G4ScoringManager::GetReplicaLevel()>1) { 162 if(false) { // always use G4PVDivision 149 if(fNSegment[IPHI] > 1) { 150 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Replicate along phi direction" << G4endl; 151 if(G4ScoringManager::GetReplicaLevel()>1) { 163 152 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Replica" << G4endl; 164 new G4PVReplica(layerName[1], layerLogical[1], layerLogical[0], k ZAxis,165 fNSegment[ 1], width);153 new G4PVReplica(layerName[1], layerLogical[1], layerLogical[0], kPhi, 154 fNSegment[IPHI], twopi*rad/fNSegment[IPHI]); 166 155 } else { 167 156 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Division" << G4endl; 168 new G4PVDivision(layerName[1], layerLogical[1], layerLogical[0], kZAxis, 169 fNSegment[1], 0.); 170 } 171 } else if(fNSegment[1] == 1) { 157 new G4PVDivision(layerName[1], layerLogical[1], layerLogical[0], kPhi, fNSegment[IPHI], 0.); 158 } 159 } else if(fNSegment[IPHI] == 1) { 172 160 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Placement" << G4endl; 173 161 new G4PVPlacement(0, G4ThreeVector(0.,0.,0.), layerLogical[1], layerName[1], layerLogical[0], false, 0); 174 162 } else 175 163 G4cerr << "ERROR : G4ScoringCylinder::SetupGeometry() : invalid parameter (" 176 << fNSegment[ 1] << ") "164 << fNSegment[IPHI] << ") " 177 165 << "in placement of the second nested layer." << G4endl; 178 179 if(verboseLevel > 9) {180 G4cout << fSize[0]/fNSegment[0] << ", "181 << fSize[1]/fNSegment[1] << G4endl;182 G4cout << layerName[1] << ": kZAxis, "183 << fNSegment[1] << ", "184 << fSize[1]/fNSegment[1] << G4endl;185 }186 187 166 188 167 // mesh elements … … 191 170 G4VSolid * elementSolid = new G4Tubs(elementName, 192 171 0., 193 fSize[0],//fNSegment[0], 194 fSize[1]/fNSegment[1], 195 0., twopi*rad/fNSegment[2]); 172 fSize[0]/fNSegment[IR], 173 fSize[1]/fNSegment[IZ], 174 0., 175 twopi*rad/fNSegment[IPHI]); 196 176 fMeshElementLogical = new G4LogicalVolume(elementSolid, 0, elementName); 197 if(fNSegment[2] > 1) { 198 199 /* 200 if(fSegmentPositions.size() > 0) { 201 G4double motherDims[3] ={fSize[0]/fsegParam[2][0], 202 fSize[1]/fsegParam[2][1], 203 fSize[2]/fsegParam[2][2]}; 204 G4int nelement = fSegmentPositions.size() + 1; 205 //G4ScoringCylinderParameterisation * param = 206 G4VPVParameterisation * param = 207 new G4ScoringCylinderParameterisation(axis[2], motherDims, fSegmentPositions); 208 new G4PVParameterised(elementName, 209 fMeshElementLogical, 210 layerLogical[1], 211 axis[2], 212 nelement, 213 param); 214 } else { 215 */ 216 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Replicate along phi direction" << G4endl; 217 218 G4double angle = twopi*rad/fNSegment[2]; 219 //if(G4ScoringManager::GetReplicaLevel()>2) { 220 if(false) { // always use G4PVDivision 177 if(fNSegment[IR] > 1) { 178 179 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Replicate along r direction" << G4endl; 180 181 if(G4ScoringManager::GetReplicaLevel()>2) { 221 182 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Replica" << G4endl; 222 new G4PVReplica(elementName, fMeshElementLogical, layerLogical[1], k Phi,223 fNSegment[ 2], angle, 0.);183 new G4PVReplica(elementName, fMeshElementLogical, layerLogical[1], kRho, 184 fNSegment[IR], fSize[0]/fNSegment[IR]); 224 185 } else { 225 186 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Division" << G4endl; 226 new G4PVDivision(elementName, fMeshElementLogical, layerLogical[1], kPhi, 227 fNSegment[2], 0.); 228 } 229 //} 230 } else if(fNSegment[2] == 1) { 187 new G4PVDivision(elementName, fMeshElementLogical, layerLogical[1], kRho, fNSegment[IR], 0.); 188 } 189 } else if(fNSegment[IR] == 1) { 231 190 if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Placement" << G4endl; 232 191 new G4PVPlacement(0, G4ThreeVector(0.,0.,0.), fMeshElementLogical, elementName, layerLogical[1], false, 0); 233 192 } else { 234 193 G4cerr << "G4ScoringCylinder::SetupGeometry() : " 235 << "invalid parameter (" << fNSegment[ 2] << ") "194 << "invalid parameter (" << fNSegment[IR] << ") " 236 195 << "in mesh element placement." << G4endl; 237 }238 239 if(verboseLevel > 9) {240 G4cout << fSize[0]/fNSegment[0] << ", "241 << fSize[1]/fNSegment[1] << G4endl;242 G4cout << elementName << ": kPhi, "243 << fNSegment[2] << G4endl;244 196 } 245 197 … … 249 201 250 202 // vis. attributes 251 G4VisAttributes * visatt = new G4VisAttributes(G4Colour(.5,.5,.5 ,0.1));203 G4VisAttributes * visatt = new G4VisAttributes(G4Colour(.5,.5,.5)); 252 204 visatt->SetVisibility(true); 253 //layerLogical[0]->SetVisAttributes(visatt);254 //layerLogical[1]->SetVisAttributes(visatt);205 layerLogical[0]->SetVisAttributes(visatt); 206 layerLogical[1]->SetVisAttributes(visatt); 255 207 visatt = new G4VisAttributes(G4Colour(.5,.5,.5,0.01)); 256 208 //visatt->SetForceSolid(true); … … 272 224 void G4ScoringCylinder::Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg) { 273 225 274 275 226 G4VVisManager * pVisManager = G4VVisManager::GetConcreteInstance(); 276 227 if(pVisManager) { 277 228 278 229 // cell vectors 279 std::vector<std::vector<std::vector<double> > > cell; // cell[R][Z][PHI]280 230 std::vector<double> ephi; 281 for(int phi = 0; phi < fNSegment[2]; phi++) ephi.push_back(0.); 282 std::vector<std::vector<double> > ezphi; 283 for(int z = 0; z < fNSegment[1]; z++) ezphi.push_back(ephi); 284 for(int r = 0; r < fNSegment[0]; r++) cell.push_back(ezphi); 285 286 std::vector<std::vector<double> > rzcell; // rzcell[R][Z] 287 std::vector<double> ez; 288 for(int z = 0; z < fNSegment[1]; z++) ez.push_back(0.); 289 for(int r = 0; r < fNSegment[0]; r++) rzcell.push_back(ez); 290 231 for(int phi = 0; phi < fNSegment[IPHI]; phi++) ephi.push_back(0.); 232 //- 291 233 std::vector<std::vector<double> > zphicell; // zphicell[Z][PHI] 292 for(int z = 0; z < fNSegment[ 1]; z++) zphicell.push_back(ephi);293 234 for(int z = 0; z < fNSegment[IZ]; z++) zphicell.push_back(ephi); 235 //- 294 236 std::vector<std::vector<double> > rphicell; // rphicell[R][PHI] 295 for(int r = 0; r < fNSegment[ 0]; r++) rphicell.push_back(ephi);237 for(int r = 0; r < fNSegment[IR]; r++) rphicell.push_back(ephi); 296 238 297 239 // search max. values 298 G4double rzmin = DBL_MAX,zphimin = DBL_MAX, rphimin = DBL_MAX;299 G4double rzmax = 0.,zphimax = 0., rphimax = 0.;240 G4double zphimin = DBL_MAX, rphimin = DBL_MAX; 241 G4double zphimax = 0., rphimax = 0.; 300 242 G4int q[3]; 301 243 std::map<G4int, G4double*>::iterator itr = map->begin(); 302 244 for(; itr != map->end(); itr++) { 245 if(itr->first < 0) { 246 G4cout << itr->first << G4endl; 247 continue; 248 } 303 249 GetRZPhi(itr->first, q); 304 250 305 rzcell[q[0]][q[1]] += *(itr->second); 306 if(rzmin > rzcell[q[0]][q[1]]) rzmin = rzcell[q[0]][q[1]]; 307 if(rzmax < rzcell[q[0]][q[1]]) rzmax = rzcell[q[0]][q[1]]; 308 309 zphicell[q[1]][q[2]] += *(itr->second); 310 if(zphimin > zphicell[q[1]][q[2]]) zphimin = zphicell[q[1]][q[2]]; 311 if(zphimax < zphicell[q[1]][q[2]]) zphimax = zphicell[q[1]][q[2]]; 312 313 rphicell[q[0]][q[2]] += *(itr->second); 314 if(rphimin > rphicell[q[0]][q[2]]) rphimin = rphicell[q[0]][q[2]]; 315 if(rphimax < rphicell[q[0]][q[2]]) rphimax = rphicell[q[0]][q[2]]; 251 // projections 252 zphicell[q[IZ]][q[IPHI]] += *(itr->second)/fDrawUnitValue; 253 if(zphimin > zphicell[q[IZ]][q[IPHI]]) zphimin = zphicell[q[IZ]][q[IPHI]]; 254 if(zphimax < zphicell[q[IZ]][q[IPHI]]) zphimax = zphicell[q[IZ]][q[IPHI]]; 255 //- 256 rphicell[q[IR]][q[IPHI]] += *(itr->second)/fDrawUnitValue; 257 if(rphimin > rphicell[q[IR]][q[IPHI]]) rphimin = rphicell[q[IR]][q[IPHI]]; 258 if(rphimax < rphicell[q[IR]][q[IPHI]]) rphimax = rphicell[q[IR]][q[IPHI]]; 316 259 } 317 260 … … 330 273 if(colorMap->IfFloatMinMax()) { colorMap->SetMinMax(zphimin, zphimax); } 331 274 332 G4double zhalf = fSize[1]/fNSegment[1]; 333 for(int phi = 0; phi < fNSegment[2]; phi++) { 334 for(int z = 0; z < fNSegment[1]; z++) { 335 336 G4double angle = twopi/fNSegment[2]*phi; 337 G4double dphi = twopi/fNSegment[2]; 338 G4Tubs cylinder("z-phi", fSize[0]*0.99, fSize[0], zhalf, 339 angle, dphi*0.99999); 340 /* 341 G4cout << ">>>> " 342 << fSize[1]/fNSegment[1]/2. << " : " 343 << angle << " - " << angle + dphi 344 << G4endl; 345 */ 346 347 G4ThreeVector zpos(0., 0., -fSize[1] + fSize[1]/fNSegment[1]*(1 + 2.*z)); 275 G4double zhalf = fSize[1]/fNSegment[IZ]; 276 for(int phi = 0; phi < fNSegment[IPHI]; phi++) { 277 for(int z = 0; z < fNSegment[IZ]; z++) { 278 //- 279 G4double angle = twopi/fNSegment[IPHI]*phi; 280 G4double dphi = twopi/fNSegment[IPHI]; 281 G4Tubs cylinder("z-phi", // name 282 fSize[0]*0.99, fSize[0], // inner radius, outer radius 283 zhalf, // half length in z 284 angle, dphi*0.99999); // starting phi angle, delta angle 285 //- 286 G4ThreeVector zpos(0., 0., -fSize[1] + fSize[1]/fNSegment[IZ]*(1 + 2.*z)); 348 287 G4Transform3D trans; 349 288 if(fRotationMatrix) { … … 356 295 colorMap->GetMapColor(zphicell[z][phi], c); 357 296 att.SetColour(c[0], c[1], c[2]);//, c[3]); 358 /* 359 G4cout << " " << c[0] << ", " 360 << c[1] << ", " << c[2] << G4endl; 361 */ 297 //- 362 298 pVisManager->Draw(cylinder, att, trans); 363 299 } … … 369 305 if(colorMap->IfFloatMinMax()) { colorMap->SetMinMax(rphimin, rphimax); } 370 306 371 G4double rsize = fSize[0]/fNSegment[ 0];372 for(int phi = 0; phi < fNSegment[ 2]; phi++) {373 for(int r = 0; r < fNSegment[ 0]; r++) {307 G4double rsize = fSize[0]/fNSegment[IR]; 308 for(int phi = 0; phi < fNSegment[IPHI]; phi++) { 309 for(int r = 0; r < fNSegment[IR]; r++) { 374 310 375 311 G4double rs[2] = {rsize*r, rsize*(r+1)}; 376 G4double angle = twopi/fNSegment[ 2]*phi;377 G4double dphi = twopi/fNSegment[ 2];312 G4double angle = twopi/fNSegment[IPHI]*phi; 313 G4double dphi = twopi/fNSegment[IPHI]; 378 314 G4Tubs cylinder("z-phi", rs[0], rs[1], 0.001, 379 315 angle, dphi*0.99999); … … 409 345 } 410 346 } 347 348 colorMap->SetPSUnit(fDrawUnit); 349 colorMap->SetPSName(fDrawPSName); 411 350 colorMap->DrawColorChart(); 351 412 352 } 413 353 } … … 416 356 G4int idxProj, G4int idxColumn) 417 357 { 418 419 if(idxColumn<0 || idxColumn>=fNSegment[idxProj]) 358 G4int projAxis = 0; 359 switch(idxProj) { 360 case 0: 361 projAxis = IR; 362 break; 363 case 1: 364 projAxis = IZ; 365 break; 366 case 2: 367 projAxis = IPHI; 368 break; 369 } 370 371 if(idxColumn<0 || idxColumn>=fNSegment[projAxis]) 420 372 { 421 G4cerr << " ERROR : Column number " << idxColumn << " is out of scoring mesh [0," << fNSegment[idxProj]-1 <<373 G4cerr << "Warning : Column number " << idxColumn << " is out of scoring mesh [0," << fNSegment[projAxis]-1 << 422 374 "]. Method ignored." << G4endl; 423 375 return; … … 425 377 G4VVisManager * pVisManager = G4VVisManager::GetConcreteInstance(); 426 378 if(pVisManager) { 427 379 428 380 // cell vectors 429 381 std::vector<std::vector<std::vector<double> > > cell; // cell[R][Z][PHI] 430 382 std::vector<double> ephi; 431 for(int phi = 0; phi < fNSegment[ 2]; phi++) ephi.push_back(0.);383 for(int phi = 0; phi < fNSegment[IPHI]; phi++) ephi.push_back(0.); 432 384 std::vector<std::vector<double> > ezphi; 433 for(int z = 0; z < fNSegment[ 1]; z++) ezphi.push_back(ephi);434 for(int r = 0; r < fNSegment[ 0]; r++) cell.push_back(ezphi);385 for(int z = 0; z < fNSegment[IZ]; z++) ezphi.push_back(ephi); 386 for(int r = 0; r < fNSegment[IR]; r++) cell.push_back(ezphi); 435 387 436 388 std::vector<std::vector<double> > rzcell; // rzcell[R][Z] 437 389 std::vector<double> ez; 438 for(int z = 0; z < fNSegment[ 1]; z++) ez.push_back(0.);439 for(int r = 0; r < fNSegment[ 0]; r++) rzcell.push_back(ez);390 for(int z = 0; z < fNSegment[IZ]; z++) ez.push_back(0.); 391 for(int r = 0; r < fNSegment[IR]; r++) rzcell.push_back(ez); 440 392 441 393 std::vector<std::vector<double> > zphicell; // zphicell[Z][PHI] 442 for(int z = 0; z < fNSegment[ 1]; z++) zphicell.push_back(ephi);394 for(int z = 0; z < fNSegment[IZ]; z++) zphicell.push_back(ephi); 443 395 444 396 std::vector<std::vector<double> > rphicell; // rphicell[R][PHI] 445 for(int r = 0; r < fNSegment[ 0]; r++) rphicell.push_back(ephi);397 for(int r = 0; r < fNSegment[IR]; r++) rphicell.push_back(ephi); 446 398 447 399 // search max. values … … 450 402 std::map<G4int, G4double*>::iterator itr = map->begin(); 451 403 for(; itr != map->end(); itr++) { 404 if(itr->first < 0) { 405 G4cout << itr->first << G4endl; 406 continue; 407 } 452 408 GetRZPhi(itr->first, q); 453 409 454 if( idxProj == 0 && q[0] == idxColumn) { // zphi plane455 zphicell[q[ 1]][q[2]] += *(itr->second);456 if(zphimax < zphicell[q[ 1]][q[2]]) zphimax = zphicell[q[1]][q[2]];457 } 458 if( idxProj == 1 && q[1] == idxColumn) { // rphi plane459 rphicell[q[ 0]][q[2]] += *(itr->second);460 if(rphimax < rphicell[q[ 0]][q[2]]) rphimax = rphicell[q[0]][q[2]];461 } 462 if( idxProj == 2 && q[2] == idxColumn) { // rz plane463 rzcell[q[ 0]][q[1]] += *(itr->second);464 if(rzmax < rzcell[q[ 0]][q[1]]) rzmax = rzcell[q[0]][q[1]];410 if(projAxis == IR && q[IR] == idxColumn) { // zphi plane 411 zphicell[q[IZ]][q[IPHI]] += *(itr->second)/fDrawUnitValue; 412 if(zphimax < zphicell[q[IZ]][q[IPHI]]) zphimax = zphicell[q[IZ]][q[IPHI]]; 413 } 414 if(projAxis == IZ && q[IZ] == idxColumn) { // rphi plane 415 rphicell[q[IR]][q[IPHI]] += *(itr->second)/fDrawUnitValue; 416 if(rphimax < rphicell[q[IR]][q[IPHI]]) rphimax = rphicell[q[IR]][q[IPHI]]; 417 } 418 if(projAxis == IPHI && q[IPHI] == idxColumn) { // rz plane 419 rzcell[q[IR]][q[IZ]] += *(itr->second)/fDrawUnitValue; 420 if(rzmax < rzcell[q[IR]][q[IZ]]) rzmax = rzcell[q[IR]][q[IZ]]; 465 421 } 466 422 } … … 472 428 473 429 G4Scale3D scale; 474 // r-phi plane475 if( idxProj == 0) {430 // z-phi plane 431 if(projAxis == IR) { 476 432 if(colorMap->IfFloatMinMax()) { colorMap->SetMinMax(0.,zphimax); } 477 433 478 G4double zhalf = fSize[1]/fNSegment[ 1];479 G4double rsize[2] = {fSize[0]/fNSegment[ 0]*idxColumn,480 fSize[0]/fNSegment[0]*(idxColumn+1)};481 for(int phi = 0; phi < fNSegment[ 2]; phi++) {482 for(int z = 0; z < fNSegment[ 1]; z++) {483 484 G4double angle = twopi/fNSegment[ 2]*phi*radian;485 G4double dphi = twopi/fNSegment[ 2]*radian;434 G4double zhalf = fSize[1]/fNSegment[IZ]; 435 G4double rsize[2] = {fSize[0]/fNSegment[IR]*idxColumn, 436 fSize[0]/fNSegment[IR]*(idxColumn+1)}; 437 for(int phi = 0; phi < fNSegment[IPHI]; phi++) { 438 for(int z = 0; z < fNSegment[IZ]; z++) { 439 440 G4double angle = twopi/fNSegment[IPHI]*phi*radian; 441 G4double dphi = twopi/fNSegment[IPHI]*radian; 486 442 G4Tubs cylinder("z-phi", rsize[0], rsize[1], zhalf, 487 443 angle, dphi*0.99999); 488 444 489 G4ThreeVector zpos(0., 0., -fSize[1] + fSize[1]/fNSegment[ 1]*(1 + 2.*z));445 G4ThreeVector zpos(0., 0., -fSize[1] + fSize[1]/fNSegment[IZ]*(1 + 2.*z)); 490 446 G4Transform3D trans; 491 447 if(fRotationMatrix) { … … 503 459 504 460 // r-phi plane 505 } else if( idxProj == 1) {461 } else if(projAxis == IZ) { 506 462 if(colorMap->IfFloatMinMax()) { colorMap->SetMinMax(0.,rphimax); } 507 463 508 G4double rsize = fSize[0]/fNSegment[ 0];509 for(int phi = 0; phi < fNSegment[ 2]; phi++) {510 for(int r = 0; r < fNSegment[ 0]; r++) {464 G4double rsize = fSize[0]/fNSegment[IR]; 465 for(int phi = 0; phi < fNSegment[IPHI]; phi++) { 466 for(int r = 0; r < fNSegment[IR]; r++) { 511 467 512 468 G4double rs[2] = {rsize*r, rsize*(r+1)}; 513 G4double angle = twopi/fNSegment[ 2]*phi*radian;514 G4double dz = fSize[1]/fNSegment[ 1];515 G4double dphi = twopi/fNSegment[ 2]*radian;469 G4double angle = twopi/fNSegment[IPHI]*phi*radian; 470 G4double dz = fSize[1]/fNSegment[IZ]; 471 G4double dphi = twopi/fNSegment[IPHI]*radian; 516 472 G4Tubs cylinder("r-phi", rs[0], rs[1], dz, 517 473 angle, dphi*0.99999); 518 474 G4ThreeVector zpos(0., 0., 519 -fSize[1]+fSize[1]/fNSegment[ 1]*(idxColumn*2+1));475 -fSize[1]+fSize[1]/fNSegment[IZ]*(idxColumn*2+1)); 520 476 G4Transform3D trans; 521 477 if(fRotationMatrix) { … … 533 489 534 490 // r-z plane 535 } else if( idxProj == 2) {491 } else if(projAxis == IPHI) { 536 492 if(colorMap->IfFloatMinMax()) { colorMap->SetMinMax(0.,rzmax); } 537 493 538 G4double rsize = fSize[0]/fNSegment[ 0];539 G4double zhalf = fSize[1]/fNSegment[ 1];540 G4double angle = twopi/fNSegment[ 2]*idxColumn*radian;541 G4double dphi = twopi/fNSegment[ 2]*radian;542 for(int z = 0; z < fNSegment[ 1]; z++) {543 for(int r = 0; r < fNSegment[ 0]; r++) {494 G4double rsize = fSize[0]/fNSegment[IR]; 495 G4double zhalf = fSize[1]/fNSegment[IZ]; 496 G4double angle = twopi/fNSegment[IPHI]*idxColumn*radian; 497 G4double dphi = twopi/fNSegment[IPHI]*radian; 498 for(int z = 0; z < fNSegment[IZ]; z++) { 499 for(int r = 0; r < fNSegment[IR]; r++) { 544 500 545 501 G4double rs[2] = {rsize*r, rsize*(r+1)}; … … 548 504 549 505 G4ThreeVector zpos(0., 0., 550 -fSize[1]+fSize[1]/fNSegment[ 1]*(2.*z+1));506 -fSize[1]+fSize[1]/fNSegment[IZ]*(2.*z+1)); 551 507 G4Transform3D trans; 552 508 if(fRotationMatrix) { … … 565 521 } 566 522 523 colorMap->SetPSUnit(fDrawUnit); 524 colorMap->SetPSName(fDrawPSName); 567 525 colorMap->DrawColorChart(); 568 526 … … 570 528 571 529 void G4ScoringCylinder::GetRZPhi(G4int index, G4int q[3]) const { 572 573 q[0] = index/(fNSegment[2]*fNSegment[1]); 574 q[1] = (index - q[0]*fNSegment[2]*fNSegment[1])/fNSegment[2]; 575 q[2] = index - q[1]*fNSegment[2] - q[0]*fNSegment[2]*fNSegment[1]; 576 577 } 530 // index = k + j * k-size + i * jk-plane-size 531 532 // nested : z -> phi -> r 533 G4int i = IZ; 534 G4int j = IPHI; 535 G4int k = IR; 536 G4int jk = fNSegment[j]*fNSegment[k]; 537 q[i] = index/jk; 538 q[j] = (index - q[i]*jk)/fNSegment[k]; 539 q[k] = index - q[j]*fNSegment[k] - q[i]*jk; 540 } -
trunk/source/digits_hits/utils/src/G4ScoringManager.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ScoringManager.cc,v 1.3 1 2008/03/25 02:18:38 akimuraExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ScoringManager.cc,v 1.33 2010/09/24 05:51:27 asaim Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 40 40 G4ScoringManager* G4ScoringManager::fSManager = 0; 41 41 42 G4int G4ScoringManager::replicaLevel = 2;42 G4int G4ScoringManager::replicaLevel = 3; 43 43 44 44 G4ScoringManager* G4ScoringManager::GetScoringManager() -
trunk/source/digits_hits/utils/src/G4ScoringMessenger.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ScoringMessenger.cc,v 1. 39 2008/11/26 21:27:35 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ScoringMessenger.cc,v 1.42 2010/07/26 03:52:33 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // --------------------------------------------------------------------- … … 185 185 drawCmd->SetGuidance("Draw projection(s) of scored quantities."); 186 186 drawCmd->SetGuidance("Parameter <proj> specified which projection(s) to be drawn."); 187 drawCmd->SetGuidance(" 100 : xy-plane, 010 : yz-place, 001 : zx-plane -- default 111"); 187 drawCmd->SetGuidance(" 100 : xy-plane, 010 : yz-plane, 001 : zx-plane -- default 111"); 188 drawCmd->SetGuidance(" 100 : N/A, 010 : z_phi-plane, 001 : r_phi-plane -- default 111"); 188 189 param = new G4UIparameter("meshName",'s',false); 189 190 drawCmd->SetParameter(param); … … 200 201 drawColumnCmd = new G4UIcommand("/score/drawColumn",this); 201 202 drawColumnCmd->SetGuidance("Draw a cell column."); 202 drawColumnCmd->SetGuidance(" plane = 0 : xy, 1: yz, 2: zx"); 203 drawColumnCmd->SetGuidance(" plane = 0 : x-y, 1: y-z, 2: z-x for box mesh"); 204 drawColumnCmd->SetGuidance(" 0 : z-phi, 1: r-phi, 2: r-z for cylinder mesh"); 203 205 param = new G4UIparameter("meshName",'s',false); 204 206 drawColumnCmd->SetParameter(param); … … 235 237 colorMapMinMaxCmd->SetParameter(param); 236 238 239 /* 237 240 chartCmd = new G4UIcommand("/score/drawChart",this); 238 241 chartCmd->SetGuidance("Draw color chart on the screen."); … … 252 255 param->SetDefaultValue("linear"); 253 256 chartCmd->SetParameter(param); 254 257 */ 258 255 259 // Dump a scored quantity 256 260 dumpQtyToFileCmd = new G4UIcommand("/score/dumpQuantityToFile", this); … … 541 545 G4int Nk = StoI(token[2]); 542 546 G4int nSegment[3]; 543 nSegment[0] = Ni; 544 nSegment[1] = Nj; 545 nSegment[2] = Nk; 547 548 if(dynamic_cast<G4ScoringBox*>(mesh)) { 549 G4cout << ".... G4ScoringMessenger::MeshBinCommand - G4ScoringBox" << G4endl; 550 nSegment[0] = Ni; 551 nSegment[1] = Nj; 552 nSegment[2] = Nk; 553 } else if(dynamic_cast<G4ScoringCylinder*>(mesh)) { 554 G4cout << ".... G4ScoringMessenger::MeshBinCommand - G4ScoringCylinder" << G4endl; 555 nSegment[0] = Nj; 556 nSegment[1] = Nk; 557 nSegment[2] = Ni; 558 } else { 559 G4Exception("G4ScoringMessenger::MeshBinCommand()", "001", FatalException, "invalid mesh type"); 560 } 546 561 // 547 562 mesh->SetNumberOfSegments(nSegment); -
trunk/source/digits_hits/utils/src/G4VScoreColorMap.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4VScoreColorMap.cc,v 1. 4 2009/05/04 15:57:33 akimura Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4VScoreColorMap.cc,v 1.8 2010/07/26 03:52:33 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 80 80 } 81 81 void G4VScoreColorMap::DrawColorChartText(G4int _nPoint) { 82 82 83 G4double min = this->GetMin(); 83 84 G4double max = this->GetMax(); … … 115 116 fVisManager->Draw2D(text); 116 117 } 118 119 // draw ps name 120 // background 121 G4int lpsname = 20;//fPSName.size(); 122 if(lpsname > 0) { 123 for(int l = 0; l < 22; l++) { 124 G4Polyline line; 125 line.push_back(G4Point3D(-0.9, -0.965+0.002*l, 0.)); 126 line.push_back(G4Point3D(-0.9+0.025*lpsname, -0.965+0.002*l, 0.)); 127 G4VisAttributes attblack(black); 128 //G4VisAttributes attblack(G4Colour(.5, .5, 1.)); 129 line.SetVisAttributes(&attblack); 130 fVisManager->Draw2D(line); 131 } 132 // ps name 133 G4Text txtpsname(fPSName, G4Point3D(-0.9, -0.96, 0.)); 134 G4double size = 12.; 135 txtpsname.SetScreenSize(size); 136 G4Colour color(1., 1., 1.); 137 G4VisAttributes att(color); 138 txtpsname.SetVisAttributes(&att); 139 fVisManager->Draw2D(txtpsname); 140 } 141 142 // draw unit 143 // background 144 G4int len = fPSUnit.size(); 145 if(len > 0) { 146 for(int l = 0; l < 21; l++) { 147 G4Polyline line; 148 line.push_back(G4Point3D(-0.7, -0.9+0.002*l, 0.)); 149 line.push_back(G4Point3D(-0.7+0.3, -0.9+0.002*l, 0.)); 150 G4VisAttributes attblack(black); 151 //G4VisAttributes attblack(G4Colour(.5, .5, .5)); 152 line.SetVisAttributes(&attblack); 153 fVisManager->Draw2D(line); 154 } 155 // unit 156 G4String psunit = "[" + fPSUnit + "]"; 157 G4Text txtunit(psunit, G4Point3D(-0.69, -0.9, 0.)); 158 G4double size = 12.; 159 txtunit.SetScreenSize(size); 160 G4Colour color(1., 1., 1.); 161 G4VisAttributes att(color); 162 txtunit.SetVisAttributes(&att); 163 fVisManager->Draw2D(txtunit); 164 } 165 117 166 } -
trunk/source/digits_hits/utils/src/G4VScoreWriter.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4VScoreWriter.cc,v 1. 5 2008/03/04 23:19:09 tasoExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4VScoreWriter.cc,v 1.10 2010/07/27 01:44:54 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 87 87 return; 88 88 } 89 90 89 91 std::map<G4int, G4double*> * score = msMapItr->second->GetMap(); 90 ofile << "# primitive scorer name: " << msMapItr->first << G4endl; 92 ofile << "# primitive scorer name: " << msMapItr->first << std::endl; 93 94 95 G4double unitValue = fScoringMesh->GetPSUnitValue(psName); 96 G4String unit = fScoringMesh->GetPSUnit(psName); 97 G4String divisionAxisNames[3]; 98 fScoringMesh->GetDivisionAxisNames(divisionAxisNames); 99 // index order 100 ofile << "# i" << divisionAxisNames[0] 101 << ", i" << divisionAxisNames[1] 102 << ", i" << divisionAxisNames[2]; 103 // unit of scored value 104 ofile << ", value "; 105 if(unit.size() > 0) ofile << "[" << unit << "]"; 106 ofile << G4endl; 91 107 92 108 // "sequence" option: write header info … … 111 127 ofile << 0.; 112 128 } else { 113 ofile << *(value->second) ;129 ofile << *(value->second)/unitValue; 114 130 } 115 131 … … 160 176 std::map<G4int, G4double*> * score; 161 177 for(; msMapItr != fSMap.end(); msMapItr++) { 178 179 G4String psname = msMapItr->first; 180 162 181 score = msMapItr->second->GetMap(); 163 ofile << "# primitive scorer name: " << msMapItr->first << G4endl; 182 ofile << "# primitive scorer name: " << msMapItr->first << std::endl; 183 184 G4double unitValue = fScoringMesh->GetPSUnitValue(psname); 185 G4String unit = fScoringMesh->GetPSUnit(psname); 186 G4String divisionAxisNames[3]; 187 fScoringMesh->GetDivisionAxisNames(divisionAxisNames); 188 // index order 189 ofile << "# i" << divisionAxisNames[0] 190 << ", i" << divisionAxisNames[1] 191 << ", i" << divisionAxisNames[2]; 192 // unit of scored value 193 ofile << ", value "; 194 if(unit.size() > 0) ofile << "[" << unit << "]"; 195 ofile << G4endl; 196 164 197 165 198 // "sequence" option: write header info … … 184 217 ofile << 0.; 185 218 } else { 186 ofile << *(value->second) ;219 ofile << *(value->second)/unitValue; 187 220 } 188 221 -
trunk/source/digits_hits/utils/src/G4VScoringMesh.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4VScoringMesh.cc,v 1. 37 2009/10/12 04:11:25akimura Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4VScoringMesh.cc,v 1.42 2010/07/27 01:44:54 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 39 39 : fWorldName(wName),fConstructed(false),fActive(true), 40 40 fRotationMatrix(NULL), fMFD(new G4MultiFunctionalDetector(wName)), 41 verboseLevel(0),sizeIsSet(false),nMeshIsSet(false) 41 verboseLevel(0),sizeIsSet(false),nMeshIsSet(false), 42 fDrawUnit(""), fDrawUnitValue(1.) 42 43 { 43 44 G4SDManager::GetSDMpointer()->AddNewDetector(fMFD); … … 45 46 fSize[0] = fSize[1] = fSize[2] = 0.; 46 47 fNSegment[0] = fNSegment[1] = fNSegment[2] = 1; 48 fDivisionAxisNames[0] = fDivisionAxisNames[1] = fDivisionAxisNames[2] = ""; 47 49 } 48 50 … … 150 152 if(itr == fMap.end()) return false; 151 153 return true; 154 } 155 156 G4String G4VScoringMesh::GetPSUnit(G4String & psname) { 157 std::map<G4String, G4THitsMap<G4double>* >::iterator itr = fMap.find(psname);; 158 if(itr == fMap.end()) { 159 return G4String(""); 160 } else { 161 return GetPrimitiveScorer(psname)->GetUnit(); 162 } 163 } 164 165 G4String G4VScoringMesh::GetCurrentPSUnit(){ 166 G4String unit = ""; 167 if(fCurrentPS == NULL) { 168 G4String msg = "ERROR : G4VScoringMesh::GetCurrentPSUnit() : "; 169 msg += " Current primitive scorer is null."; 170 G4cerr << msg << G4endl; 171 }else{ 172 unit = fCurrentPS->GetUnit(); 173 } 174 return unit; 175 } 176 177 void G4VScoringMesh::SetCurrentPSUnit(const G4String& unit){ 178 if(fCurrentPS == NULL) { 179 G4String msg = "ERROR : G4VScoringMesh::GetCurrentPSUnit() : "; 180 msg += " Current primitive scorer is null."; 181 G4cerr << msg << G4endl; 182 }else{ 183 fCurrentPS->SetUnit(unit); 184 } 185 } 186 187 G4double G4VScoringMesh::GetPSUnitValue(G4String & psname) { 188 std::map<G4String, G4THitsMap<G4double>* >::iterator itr = fMap.find(psname);; 189 if(itr == fMap.end()) { 190 return 1.; 191 } else { 192 return GetPrimitiveScorer(psname)->GetUnitValue(); 193 } 194 } 195 196 void G4VScoringMesh::GetDivisionAxisNames(G4String divisionAxisNames[3]) { 197 for(int i = 0; i < 3; i++) divisionAxisNames[i] = fDivisionAxisNames[i]; 152 198 } 153 199 -
trunk/source/digits_hits/utils/test/test1/src/Tst1PhysicsList.cc
r1316 r1340 25 25 // 26 26 // 27 // $Id: Tst1PhysicsList.cc,v 1. 1 2007/07/13 05:55:34 asaimExp $27 // $Id: Tst1PhysicsList.cc,v 1.2 2010/07/21 02:51:58 akimura Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 120 120 #include "G4PhotoElectricEffect.hh" 121 121 122 #include "G4MultipleScattering.hh" 123 122 #include "G4eMultipleScattering.hh" 124 123 #include "G4eIonisation.hh" 125 124 #include "G4eBremsstrahlung.hh" 126 125 #include "G4eplusAnnihilation.hh" 127 126 127 #include "G4MuMultipleScattering.hh" 128 128 #include "G4MuIonisation.hh" 129 129 #include "G4MuBremsstrahlung.hh" 130 130 #include "G4MuPairProduction.hh" 131 131 132 #include "G4hMultipleScattering.hh" 132 133 #include "G4hIonisation.hh" 133 134 … … 149 150 } else if (particleName == "e-") { 150 151 //electron 151 G4 MultipleScattering* theeminusMultipleScattering = new G4MultipleScattering();152 G4eMultipleScattering* theeminusMultipleScattering = new G4eMultipleScattering(); 152 153 theeminusMultipleScattering->SetLateralDisplasmentFlag(displacementFlg); 153 154 G4VProcess* theeminusIonisation = new G4eIonisation(); … … 171 172 } else if (particleName == "e+") { 172 173 //positron 173 G4 MultipleScattering* theeplusMultipleScattering = new G4MultipleScattering();174 G4eMultipleScattering* theeplusMultipleScattering = new G4eMultipleScattering(); 174 175 theeplusMultipleScattering->SetLateralDisplasmentFlag(displacementFlg); 175 176 G4VProcess* theeplusIonisation = new G4eIonisation(); … … 200 201 particleName == "mu-" ) { 201 202 //muon 202 G4Mu ltipleScattering* aMultipleScattering = new G4MultipleScattering();203 G4MuMultipleScattering* aMultipleScattering = new G4MuMultipleScattering(); 203 204 aMultipleScattering->SetLateralDisplasmentFlag(displacementFlg); 204 205 G4VProcess* aBremsstrahlung = new G4MuBremsstrahlung(); … … 229 230 (particle->GetParticleName() != "chargedgeantino")) { 230 231 // all others charged particles except geantino 231 G4 MultipleScattering* aMultipleScattering = new G4MultipleScattering();232 G4hMultipleScattering* aMultipleScattering = new G4hMultipleScattering(); 232 233 aMultipleScattering->SetLateralDisplasmentFlag(displacementFlg); 233 234 G4VProcess* anIonisation = new G4hIonisation(); -
trunk/source/digits_hits/utils/test/test1/test8.mac
r1316 r1340 7 7 # 8 8 /score/mesh/cylinderSize 1. 1. m 9 /score/mesh/translate/xyz 0. 0. 0. cm 10 # 9 11 /score/mesh/nBin 30 30 30 10 12 # … … 29 31 /score/drawProjection cylinderMesh_1 nOfStepPSgamma ! 10 30 32 /score/drawProjection cylinderMesh_1 nOfStepPSgamma logColorMap 101 33 /score/drawProjection cylinderMesh_1 eDepPS logColorMap 101 31 34 # -
trunk/source/digits_hits/utils/test/test1/vis.mac
r1316 r1340 12 12 # 13 13 /vis/drawVolume worlds 14 /vis/viewer/set/lightsThetaPhi 120 135 14 15 /vis/viewer/set/viewpointThetaPhi 105 165 deg 15 16 # Set specific colur for identification
Note: See TracChangeset
for help on using the changeset viewer.