Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

Location:
trunk/source/digits_hits
Files:
120 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/digits_hits/CVS/Entries

    r1337 r1340  
    66/GNUmakefile/1.6/Wed Sep 29 21:47:24 2010//Tgeant4-09-04-beta-01
    77/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  
    11D/include////
    22D/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:29 gcosmo Exp $
     1# $Id: GNUmakefile,v 1.5 2010/10/27 08:10:13 gcosmo Exp $
    22# --------------------------------------------------------------
    33# 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-01
    2 /G4CellScoreValues.hh/1.2/Wed Sep 29 21:47:24 2010//Tgeant4-09-04-beta-01
    3 /G4CollectionNameVector.hh/1.2/Wed Sep 29 21:47:24 2010//Tgeant4-09-04-beta-01
    4 /G4HCtable.hh/1.3/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-01
    5 /G4MultiFunctionalDetector.hh/1.3/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-01
    6 /G4SDManager.hh/1.4/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-01
    7 /G4SDStructure.hh/1.3/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-01
    8 /G4SDmessenger.hh/1.2/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-01
    9 /G4SensitiveVolumeList.hh/1.2/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-01
    10 /G4SensitiveVolumeList.icc/1.2/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-01
    11 /G4TrackLogger.hh/1.2/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-01
    12 /G4VPrimitiveScorer.hh/1.3/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-01
    13 /G4VReadOutGeometry.hh/1.3/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-01
    14 /G4VSDFilter.hh/1.2/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-01
    15 /G4VSensitiveDetector.hh/1.4/Wed Sep 29 21:47:25 2010//Tgeant4-09-04-beta-01
     1/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//
    1616D
  • trunk/source/digits_hits/detector/include/G4VPrimitiveScorer.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4VPrimitiveScorer.hh,v 1.3 2007/08/28 07:51:45 asaim Exp $
    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: $
    2929//
    3030
     
    4646// used either as a sensitive detector or to be registered to
    4747// G4MultiFunctionalDetector to define multiple functionalities.
     48//
     49//
    4850
    4951class G4VPrimitiveScorer
     
    7880      // These methods are invoked by G4SDManager through G4MultiFunctionalDetector.
    7981
     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
    8089  protected:
    8190      G4String primitiveName;
     
    8493      G4int verboseLevel;
    8594      G4int indexDepth;
     95      G4String unitName;
     96      G4double unitValue;
    8697
    8798  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-01
    2 /G4HCtable.cc/1.4/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-01
    3 /G4MultiFunctionalDetector.cc/1.5/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-01
    4 /G4SDManager.cc/1.4/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-01
    5 /G4SDStructure.cc/1.3/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-01
    6 /G4SDmessenger.cc/1.2/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-01
    7 /G4SensitiveVolumeList.cc/1.2/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-01
    8 /G4TrackLogger.cc/1.3/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-01
    9 /G4VPrimitiveScorer.cc/1.2/Wed Sep 29 21:47:30 2010//Tgeant4-09-04-beta-01
    10 /G4VReadOutGeometry.cc/1.2/Wed Sep 29 21:47:36 2010//Tgeant4-09-04-beta-01
    11 /G4VSDFilter.cc/1.2/Wed Sep 29 21:47:37 2010//Tgeant4-09-04-beta-01
    12 /G4VSensitiveDetector.cc/1.3/Wed Sep 29 21:47:37 2010//Tgeant4-09-04-beta-01
     1/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//
    1313D
  • trunk/source/digits_hits/detector/src/G4MultiFunctionalDetector.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4MultiFunctionalDetector.cc,v 1.5 2008/03/06 23:31:12 asaim Exp $
    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: $
    2929//
    3030// G4MultiFunctionalDetector
     31//
     32// 2010-07-23 T.Aso Call PS if the step length or energy deposit is not zero.
     33//       
     34//
    3135#include "G4MultiFunctionalDetector.hh"
    3236#include "G4SDManager.hh"
     
    4246G4bool G4MultiFunctionalDetector::ProcessHits(G4Step* aStep,G4TouchableHistory* aTH)
    4347{
    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    }
    4755   return true;
    4856}
  • trunk/source/digits_hits/detector/src/G4VPrimitiveScorer.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4VPrimitiveScorer.cc,v 1.2 2006/06/29 18:06:03 gunter Exp $
    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: $
    2929//
    3030// G4VPrimitiveScorer
     
    3434#include "G4Step.hh"
    3535#include "G4TouchableHistory.hh"
    36 
     36#include "G4UnitsTable.hh"
    3737
    3838G4VPrimitiveScorer::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)
    4041{;}
    4142
     
    7475}
    7576
     77void 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  
    33/GNUmakefile/1.2/Wed Sep 29 21:47:37 2010//Tgeant4-09-04-beta-01
    44/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  
    33/GNUmakefile/1.2/Wed Sep 29 21:47:39 2010//Tgeant4-09-04-beta-01
    44/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  
    11D/include////
    22D/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 asaim Exp $
     1# $Id: GNUmakefile,v 1.3 2010/10/27 08:10:13 gcosmo Exp $
    22# --------------------------------------------------------------
    33# GNUmakefile for digits+hits library.  Makoto Asai, 1/11/96.
  • trunk/source/digits_hits/scorer/include/CVS/Entries

    r1337 r1340  
    1 /G4PSCellCharge.hh/1.1/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-01
    2 /G4PSCellCharge3D.hh/1.2/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-01
    3 /G4PSCellFlux.hh/1.1/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-01
    4 /G4PSCellFlux3D.hh/1.2/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-01
    5 /G4PSCylinderSurfaceCurrent.hh/1.1/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-01
    6 /G4PSCylinderSurfaceCurrent3D.hh/1.2/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-01
    7 /G4PSCylinderSurfaceFlux.hh/1.1/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-01
    8 /G4PSCylinderSurfaceFlux3D.hh/1.2/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-01
    9 /G4PSDirectionFlag.hh/1.1/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-01
    10 /G4PSDoseDeposit.hh/1.1/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-01
    11 /G4PSDoseDeposit3D.hh/1.2/Wed Sep 29 21:47:40 2010//Tgeant4-09-04-beta-01
    12 /G4PSEnergyDeposit.hh/1.1/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    13 /G4PSEnergyDeposit3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    14 /G4PSFlatSurfaceCurrent.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    15 /G4PSFlatSurfaceCurrent3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    16 /G4PSFlatSurfaceFlux.hh/1.1/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    17 /G4PSFlatSurfaceFlux3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    18 /G4PSMinKinEAtGeneration.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    19 /G4PSMinKinEAtGeneration3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    20 /G4PSNofCollision.hh/1.1/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    21 /G4PSNofCollision3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    22 /G4PSNofSecondary.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    23 /G4PSNofSecondary3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    24 /G4PSNofStep.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    25 /G4PSNofStep3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    26 /G4PSPassageCellCurrent.hh/1.1/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    27 /G4PSPassageCellCurrent3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    28 /G4PSPassageCellFlux.hh/1.1/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    29 /G4PSPassageCellFlux3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    30 /G4PSPassageTrackLength.hh/1.1/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    31 /G4PSPassageTrackLength3D.hh/1.2/Wed Sep 29 21:47:49 2010//Tgeant4-09-04-beta-01
    32 /G4PSPopulation.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    33 /G4PSPopulation3D.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    34 /G4PSSphereSurfaceCurrent.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    35 /G4PSSphereSurfaceCurrent3D.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    36 /G4PSSphereSurfaceFlux.hh/1.1/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    37 /G4PSSphereSurfaceFlux3D.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    38 /G4PSTermination.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    39 /G4PSTermination3D.hh/1.3/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    40 /G4PSTrackCounter.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    41 /G4PSTrackCounter3D.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    42 /G4PSTrackLength.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    43 /G4PSTrackLength3D.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    44 /G4SDChargedFilter.hh/1.1/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    45 /G4SDKineticEnergyFilter.hh/1.1/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    46 /G4SDNeutralFilter.hh/1.1/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    47 /G4SDParticleFilter.hh/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    48 /G4SDParticleWithEnergyFilter.hh/1.1/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
     1/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//
    4949D
  • trunk/source/digits_hits/scorer/include/G4PSCellCharge.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSCellCharge.hh,v 1.1 2007/07/11 01:29:28 asaim Exp $
    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: $
    2929//
    3030
     
    4040//
    4141// Created: 2007-08-20  Tsukasa ASO
     42// 2010-07-22   Introduce Unit specification.
    4243//
    4344///////////////////////////////////////////////////////////////////////////////
     
    4849   public: // with description
    4950      G4PSCellCharge(G4String name, G4int depth=0);
     51      G4PSCellCharge(G4String name, const G4String& unit, G4int depth=0);
    5052      virtual ~G4PSCellCharge();
    5153
     
    6062      virtual void PrintAll();
    6163
     64      virtual void SetUnit(const G4String& unit);
     65
    6266  private:
    6367      G4int HCID;
  • trunk/source/digits_hits/scorer/include/G4PSCellCharge3D.hh

    r1337 r1340  
    2525//
    2626//
    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: $
    2929//
    3030
     
    3939//
    4040// Created: 2007-08-20  Tsukasa ASO
     41// 2010-07-22   Introduce Unit specification.
    4142//
    4243///////////////////////////////////////////////////////////////////////////////
     
    4748   public: // with description
    4849      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,
    4953                     G4int ni=1,G4int nj=1, G4int nk=1,
    5054                     G4int depi=2, G4int depj=1, G4int depk=0);
  • trunk/source/digits_hits/scorer/include/G4PSCellFlux.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSCellFlux.hh,v 1.1 2007/07/11 01:29:28 asaim Exp $
    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: $
    2929//
    3030
     
    4848//
    4949// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
     50// 2010-07-22   Introduce Unit specification.
     51// 2010-07-22   Add weighted option
    5052//
    5153///////////////////////////////////////////////////////////////////////////////
     
    5658   public: // with description
    5759      G4PSCellFlux(G4String name, G4int depth=0);
     60      G4PSCellFlux(G4String name, const G4String& unit, G4int depth=0);
    5861      virtual ~G4PSCellFlux();
     62
     63      inline void Weighted(G4bool flg=true) { weighted = flg; }
     64      // Multiply track weight
    5965
    6066  protected: // with description
     
    6874      virtual void PrintAll();
    6975
     76      virtual void SetUnit(const G4String& unit);   
     77
     78  protected:
     79      virtual void DefineUnitAndCategory();
     80
    7081  private:
    7182      G4int HCID;
    7283      G4THitsMap<G4double>* EvtMap;
     84      G4bool  weighted;
     85
    7386};
    7487#endif
  • trunk/source/digits_hits/scorer/include/G4PSCellFlux3D.hh

    r1337 r1340  
    2525//
    2626//
    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: $
    2929//
    3030
     
    4646//
    4747// Created: 2007-08-14  Tsukasa ASO
     48// 2010-07-22   Introduce Unit specification.
    4849//
    4950///////////////////////////////////////////////////////////////////////////////
     
    5455   public: // with description
    5556      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,
    5660                     G4int ni=1,G4int nj=1, G4int nk=1,
    5761                     G4int depi=2, G4int depj=1, G4int depk=0);
  • trunk/source/digits_hits/scorer/include/G4PSCylinderSurfaceCurrent.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSCylinderSurfaceCurrent.hh,v 1.1 2007/08/14 21:23:51 taso 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: $
    2929//
    3030
     
    5353//
    5454// Created: 2007-03-21  Tsukasa ASO
     55// 2010-07-22   Introduce Unit specification.
    5556//
    5657///////////////////////////////////////////////////////////////////////////////
     
    6061 
    6162  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);
    6367      virtual ~G4PSCylinderSurfaceCurrent();
    6468
     
    8185      virtual void PrintAll();
    8286
     87      virtual void SetUnit(const G4String& unit);
     88
     89  protected:
     90      virtual void DefineUnitAndCategory();
     91
    8392  private:
    8493      G4int  HCID;
  • trunk/source/digits_hits/scorer/include/G4PSCylinderSurfaceCurrent3D.hh

    r1337 r1340  
    2525//
    2626//
    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: $
    2929//
    3030
     
    4949//
    5050// Created: 2008-08-14  Tsukasa ASO
     51// 2010-07-22   Introduce Unit specification.
    5152///////////////////////////////////////////////////////////////////////////////
    5253
     
    5657   public: // with description
    5758      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,
    5863                                   G4int ni=1,G4int nj=1, G4int nk=1,
    5964                                   G4int depi=2, G4int depj=1, G4int depk=0);
  • trunk/source/digits_hits/scorer/include/G4PSCylinderSurfaceFlux.hh

    r1337 r1340  
    2525//
    2626//
    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: $
    2929//
    3030
     
    5353//
    5454// Created: 2007-03-29  Tsukasa ASO
     55// 2010-07-22   Introduce Unit specification.
     56// 2010-07-22   Add weighted and divideByArea options
    5557//
    5658///////////////////////////////////////////////////////////////////////////////
     
    6062  public: // with description
    6163      G4PSCylinderSurfaceFlux(G4String name,G4int direction, G4int depth=0);
     64      G4PSCylinderSurfaceFlux(G4String name,G4int direction,
     65                              const G4String& unit, G4int depth=0);
    6266      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
    6374
    6475  protected: // with description
     
    7384      virtual void PrintAll();
    7485
     86      virtual void SetUnit(const G4String& unit);
     87
     88  protected:
     89      virtual void DefineUnitAndCategory();
     90
    7591  private:
    7692      G4int  HCID;
    7793      G4int  fDirection;
    7894      G4THitsMap<G4double>* EvtMap;
    79 
     95      G4bool weighted;
     96      G4bool divideByArea;
    8097};
    8198
  • trunk/source/digits_hits/scorer/include/G4PSCylinderSurfaceFlux3D.hh

    r1337 r1340  
    2525//
    2626//
    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: $
    2929//
    3030
     
    4949//
    5050// Created: 2008-08-14  Tsukasa ASO
     51// 2010-07-22   Introduce Unit specification.
    5152///////////////////////////////////////////////////////////////////////////////
    5253
     
    5657   public: // with description
    5758      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,
    5863                               G4int ni=1,G4int nj=1, G4int nk=1,
    5964                               G4int di=2, G4int dj=1, G4int dk=0);
  • trunk/source/digits_hits/scorer/include/G4PSDoseDeposit.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSDoseDeposit.hh,v 1.1 2007/07/11 01:29:28 asaim Exp $
    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: $
    2929//
    3030
     
    4040//
    4141// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
     42// 2010-07-22   Introduce Unit specification.
    4243//
    4344///////////////////////////////////////////////////////////////////////////////
     
    4748 public: // with description
    4849      G4PSDoseDeposit(G4String name, G4int depth=0);
     50      G4PSDoseDeposit(G4String name, const G4String& unit, G4int depth=0);
    4951      virtual ~G4PSDoseDeposit();
    5052
     
    5961      virtual void PrintAll();
    6062
     63      virtual void SetUnit(const G4String& unit);
     64
    6165  private:
    6266      G4int HCID;
  • trunk/source/digits_hits/scorer/include/G4PSDoseDeposit3D.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSDoseDeposit3D.hh,v 1.2 2007/08/28 10:11:29 taso 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: $
    2929//
    3030
     
    3939//
    4040// Created: 2008-08-14  Tsukasa ASO
     41// 2010-07-22   Introduce Unit specification.
    4142//
    4243///////////////////////////////////////////////////////////////////////////////
     
    4647 public: // with description
    4748      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,
    4852                        G4int ni=1,G4int nj=1, G4int nk=1,
    4953                        G4int depi=2, G4int depj=1, G4int depk=0);
  • trunk/source/digits_hits/scorer/include/G4PSEnergyDeposit.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSEnergyDeposit.hh,v 1.1 2007/07/11 01:29:28 asaim Exp $
    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: $
    2929//
    3030
     
    4040//
    4141// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura
     42// 2010-07-22   Introduce Unit specification.
    4243//
    4344///////////////////////////////////////////////////////////////////////////////
     
    4748 
    4849 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);
    5052      virtual ~G4PSEnergyDeposit();
    5153
     
    6062      virtual void PrintAll();
    6163
     64      virtual void SetUnit(const G4String& unit);
     65
    6266  private:
    6367      G4int HCID;
  • trunk/source/digits_hits/scorer/include/G4PSEnergyDeposit3D.hh

    r1337 r1340  
    2525//
    2626//
    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: $
    2929//
    3030
     
    3838//
    3939// Created: 2007-08-14  Tsukasa ASO
     40// 2010-07-22   Introduce Unit specification.
    4041///////////////////////////////////////////////////////////////////////////////
    4142
     
    4748                        G4int ni=1,G4int nj=1, G4int nk=1,
    4849                        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
    4954    virtual ~G4PSEnergyDeposit3D();
    5055
  • trunk/source/digits_hits/scorer/include/G4PSFlatSurfaceCurrent.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSFlatSurfaceCurrent.hh,v 1.2 2007/08/14 21:23:51 taso 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: $
    2929//
    3030
     
    5555// 17-Nov-2005 T.Aso, Bug fix for area definition.
    5656// 31-Mar-2007 T.Aso, Add option for normalizing by the area.
     57// 2010-07-22   Introduce Unit specification.
    5758//
    5859///////////////////////////////////////////////////////////////////////////////
     
    6364  public: // with description
    6465      G4PSFlatSurfaceCurrent(G4String name ,G4int direction, G4int depth=0);
     66      G4PSFlatSurfaceCurrent(G4String name ,G4int direction,
     67                             const G4String& unit, G4int depth=0);
    6568      virtual ~G4PSFlatSurfaceCurrent();
    6669
     
    8285      virtual void PrintAll();
    8386
     87      virtual void SetUnit(const G4String& unit);   
     88
     89  protected:
     90      virtual void DefineUnitAndCategory();
     91
    8492  private:
    8593      G4int  HCID;
  • trunk/source/digits_hits/scorer/include/G4PSFlatSurfaceCurrent3D.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSFlatSurfaceCurrent3D.hh,v 1.2 2007/08/28 10:11:29 taso 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: $
    2929//
    3030
     
    4949//
    5050// Created: 2008-08-14  Tsukasa ASO
     51// 2010-07-22   Introduce Unit specification.
    5152///////////////////////////////////////////////////////////////////////////////
    5253
     
    5657   public: // with description
    5758      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,
    5863                               G4int ni=1,G4int nj=1, G4int nk=1,
    5964                               G4int depi=2, G4int depj=1, G4int depk=0);
  • trunk/source/digits_hits/scorer/include/G4PSFlatSurfaceFlux.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSFlatSurfaceFlux.hh,v 1.1 2007/07/11 01:29:28 asaim Exp $
    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: $
    2929//
    3030
     
    5757//                      Bug fix. Area definition.
    5858// 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
    5961///////////////////////////////////////////////////////////////////////////////
    6062
     
    6365  public: // with description
    6466      G4PSFlatSurfaceFlux(G4String name,G4int direction, G4int depth=0);
     67      G4PSFlatSurfaceFlux(G4String name,G4int direction,
     68                          const G4String& unit, G4int depth=0);
    6569      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.
    6676
    6777  protected: // with description
     
    7686      virtual void PrintAll();
    7787
     88      virtual void SetUnit(const G4String& unit);
     89
     90  protected:
     91      virtual void DefineUnitAndCategory();
     92
    7893  private:
    7994      G4int  HCID;
    8095      G4int  fDirection;
    8196      G4THitsMap<G4double>* EvtMap;
    82 
     97      G4bool weighted;
     98      G4bool divideByArea;
    8399};
    84100
  • trunk/source/digits_hits/scorer/include/G4PSFlatSurfaceFlux3D.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSFlatSurfaceFlux3D.hh,v 1.2 2007/08/28 10:11:29 taso 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: $
    2929//
    3030
     
    5050//
    5151// Created: 2007-08-14  Tsukasa ASO
     52// 2010-07-22   Introduce Unit specification.
    5253//
    5354///////////////////////////////////////////////////////////////////////////////
     
    5859   public: // with description
    5960      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,
    6065                            G4int ni=1,G4int nj=1, G4int nk=1,
    6166                            G4int depi=2, G4int depj=1, G4int depk=0);
  • trunk/source/digits_hits/scorer/include/G4PSMinKinEAtGeneration.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSMinKinEAtGeneration.hh,v 1.2 2007/08/14 21:23:51 taso 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: $
    2929//
    3030
     
    4141//
    4242// Created: 2005-11-17  Tsukasa ASO, Akinori Kimura.
     43// 2010-07-22   Introduce Unit specification.
    4344//
    4445//
     
    5152 public: // with description
    5253      G4PSMinKinEAtGeneration(G4String name, G4int depth=0);
     54      G4PSMinKinEAtGeneration(G4String name, const G4String& unit,
     55                              G4int depth=0);
    5356
    5457  protected: // with description
     
    6770      virtual void PrintAll();
    6871
     72      virtual void SetUnit(const G4String& unit);
     73
    6974  private:
    7075      G4int HCID;
  • trunk/source/digits_hits/scorer/include/G4PSMinKinEAtGeneration3D.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSMinKinEAtGeneration3D.hh,v 1.2 2007/08/28 10:11:29 taso 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: $
    2929//
    3030
     
    4040//
    4141// Created: 2007-08-14  Tsukasa ASO
     42// 2010-07-22   Introduce Unit specification.
    4243//
    4344//
     
    4849   public: // with description
    4950      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,
    5054                     G4int ni=1,G4int nj=1, G4int nk=1,
    5155                     G4int depi=2, G4int depj=1, G4int depk=0);
  • trunk/source/digits_hits/scorer/include/G4PSNofCollision.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSNofCollision.hh,v 1.1 2007/07/11 01:29:28 asaim Exp $
    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: $
    2929//
    3030
     
    4141//
    4242// Created: 2007-2-2  Tsukasa ASO, Akinori Kimura.
     43// 2010-07-22   Introduce Unit specification.
    4344//
    4445///////////////////////////////////////////////////////////////////////////////
     
    6970      virtual void PrintAll();
    7071
     72      virtual void SetUnit(const G4String& unit);
     73
    7174  private:
    7275      G4int HCID;
  • trunk/source/digits_hits/scorer/include/G4PSNofSecondary.hh

    r1337 r1340  
    2525//
    2626//
    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: $
    2929//
    3030
     
    4646//                       particleDef is not set, it accepts all secondaies.
    4747//                       But onece user sets it, it accepts only the particle.
     48//          2010-07-22   Introduce Unit specification.
    4849//
    4950//
     
    5960    // Scoring option
    6061      void SetParticle(const G4String& particleName);
     62
     63    inline void Weighted(G4bool flg=true) { weighted = flg; }
     64    // Multiply track weight
    6165
    6266  protected: // with description
     
    7579      virtual void PrintAll();
    7680
     81      virtual void SetUnit(const G4String& unit);
     82
    7783  private:
    7884      G4int HCID;
    7985      G4THitsMap<G4double>* EvtMap;
    8086      G4ParticleDefinition* particleDef;
     87      G4bool weighted;
    8188
    8289  public:
  • trunk/source/digits_hits/scorer/include/G4PSNofStep.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSNofStep.hh,v 1.2 2007/08/29 06:36:41 taso 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: $
    2929//
    3030
     
    4040//
    4141// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
     42// 2010-07-22   Introduce Unit specification.
    4243//
    4344///////////////////////////////////////////////////////////////////////////////
     
    6566      virtual void PrintAll();
    6667
     68      virtual void SetUnit(const G4String& unit);
     69
    6770  public:
    6871      void  SetBoundaryFlag(G4bool flg=true)
  • trunk/source/digits_hits/scorer/include/G4PSNofStep3D.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSNofStep3D.hh,v 1.2 2007/08/28 10:11:29 taso 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: $
    2929//
    3030
     
    3838//
    3939// Created: 2007-08-14  Tsukasa ASO
     40// 2010-07-22   Introduce Unit specification.
    4041//
    4142///////////////////////////////////////////////////////////////////////////////
  • trunk/source/digits_hits/scorer/include/G4PSPassageCellCurrent.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSPassageCellCurrent.hh,v 1.1 2007/08/14 21:30:45 taso 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: $
    2929//
    3030
     
    4242//
    4343// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
     44// 2010-07-22   Introduce Unit specification.
     45// 2010-07-22   Add weighted option
    4446//
    4547///////////////////////////////////////////////////////////////////////////////
     
    7072      virtual void PrintAll();
    7173
     74      virtual void SetUnit(const G4String& unit);
     75
    7276  private:
    7377      G4int HCID;
  • trunk/source/digits_hits/scorer/include/G4PSPassageCellCurrent3D.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSPassageCellCurrent3D.hh,v 1.2 2007/08/28 10:11:29 taso 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: $
    2929//
    3030
     
    4141//
    4242// Created: 2007-08-14  Tsukasa ASO
     43// 2010-07-22   Introduce Unit specification.
    4344//
    4445///////////////////////////////////////////////////////////////////////////////
  • trunk/source/digits_hits/scorer/include/G4PSPassageCellFlux.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSPassageCellFlux.hh,v 1.1 2007/07/11 01:29:28 asaim Exp $
    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: $
    2929//
    3030
     
    4646//
    4747// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
     48// 2010-07-22   Introduce Unit specification.
     49// 2010-07-22   Add weighted option
    4850//
    4951///////////////////////////////////////////////////////////////////////////////
     
    5456  public: // with description
    5557      G4PSPassageCellFlux(G4String name, G4int depth=0);
     58      G4PSPassageCellFlux(G4String name, const G4String& unit, G4int depth=0);
     59
    5660      virtual ~G4PSPassageCellFlux();
     61
     62      inline void Weighted(G4bool flg=true) { weighted = flg; }
     63      // Multiply track weight
    5764
    5865  protected: // with description
     
    6774      virtual void PrintAll();
    6875
     76      virtual void SetUnit(const G4String& unit);
     77
     78  protected:
     79      virtual void DefineUnitAndCategory();
     80
    6981  private:
    7082      G4int HCID;
     
    7284      G4double fCellFlux;
    7385      G4THitsMap<G4double>* EvtMap;
     86      G4bool  weighted;
    7487
    7588};
  • trunk/source/digits_hits/scorer/include/G4PSPassageCellFlux3D.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSPassageCellFlux3D.hh,v 1.2 2007/08/28 10:11:29 taso 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: $
    2929//
    3030
     
    4444//
    4545// Created: 2007-08-14  Tsukasa ASO
     46// 2010-07-22   Introduce Unit specification.
    4647///////////////////////////////////////////////////////////////////////////////
    4748
     
    5152   public: // with description
    5253      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,
    5357                            G4int ni=1,G4int nj=1, G4int nk=1,
    5458                            G4int depi=2, G4int depj=1, G4int depk=0);
  • trunk/source/digits_hits/scorer/include/G4PSPassageTrackLength.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSPassageTrackLength.hh,v 1.1 2007/07/11 01:29:28 asaim Exp $
    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: $
    2929//
    3030
     
    4242//
    4343// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
     44// 2010-07-22   Introduce Unit specification.
    4445//
    4546///////////////////////////////////////////////////////////////////////////////
     
    5051  public: // with description
    5152      G4PSPassageTrackLength(G4String name, G4int depth=0);
     53      G4PSPassageTrackLength(G4String name, const G4String& unit,
     54                             G4int depth=0);
    5255      virtual ~G4PSPassageTrackLength();
    5356
     
    6669      virtual void PrintAll();
    6770
     71      virtual void SetUnit(const G4String& unit);
     72
    6873  private:
    6974      G4int HCID;
  • trunk/source/digits_hits/scorer/include/G4PSPassageTrackLength3D.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSPassageTrackLength3D.hh,v 1.2 2007/08/28 10:11:29 taso 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: $
    2929//
    3030
     
    4141//
    4242// Created: 2008-08-14  Tsukasa ASO
     43// 2010-07-22   Introduce Unit specification.
    4344//
    4445///////////////////////////////////////////////////////////////////////////////
     
    4950  public: // with description
    5051      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,
    5155                     G4int ni=1,G4int nj=1, G4int nk=1,
    5256                     G4int depi=2, G4int depj=1, G4int depk=0);
  • trunk/source/digits_hits/scorer/include/G4PSPopulation.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSPopulation.hh,v 1.2 2007/08/14 21:23:51 taso 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: $
    2929//
    3030
     
    4343//
    4444// Created: 2007-02-02  Tsukasa ASO, Akinori Kimura.
     45// 2010-07-22   Introduce Unit specification.
    4546//
    4647///////////////////////////////////////////////////////////////////////////////
     
    7172      virtual void PrintAll();
    7273
     74      virtual void SetUnit(const G4String& unit);
     75
    7376  private:
    7477      G4int HCID;
  • trunk/source/digits_hits/scorer/include/G4PSSphereSurfaceCurrent.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSSphereSurfaceCurrent.hh,v 1.2 2007/08/14 21:23:51 taso 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: $
    2929//
    3030
     
    5353// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
    5454//   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.
    5657//
    5758///////////////////////////////////////////////////////////////////////////////
     
    6263  public: // with description
    6364      G4PSSphereSurfaceCurrent(G4String name, G4int direction, G4int depth=0);
     65      G4PSSphereSurfaceCurrent(G4String name, G4int direction,
     66                               const G4String& unit, G4int depth=0);
    6467      virtual ~G4PSSphereSurfaceCurrent();
    6568
     
    8083      virtual void PrintAll();
    8184
     85      virtual void SetUnit(const G4String& unit);
     86
     87  protected:
     88      virtual void DefineUnitAndCategory();
     89
    8290  private:
    8391      G4int  HCID;
  • trunk/source/digits_hits/scorer/include/G4PSSphereSurfaceCurrent3D.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSSphereSurfaceCurrent3D.hh,v 1.2 2007/08/28 10:11:29 taso 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: $
    2929//
    3030
     
    4848//
    4949// Created: 2007-08-14  Tsukasa ASO
     50// 2010-07-22   Introduce Unit specification.
    5051//
    5152///////////////////////////////////////////////////////////////////////////////
     
    5859                                 G4int ni=1,G4int nj=1, G4int nk=1,
    5960                                 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
    6066                               
    6167      virtual ~G4PSSphereSurfaceCurrent3D();
  • trunk/source/digits_hits/scorer/include/G4PSSphereSurfaceFlux.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSSphereSurfaceFlux.hh,v 1.1 2007/07/11 01:29:28 asaim Exp $
    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: $
    2929//
    3030
     
    5353// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
    5454//   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
    5658//
    5759///////////////////////////////////////////////////////////////////////////////
     
    6264  public: // with description
    6365      G4PSSphereSurfaceFlux(G4String name, G4int direction, G4int depth=0);
     66      G4PSSphereSurfaceFlux(G4String name, G4int direction,
     67                            const G4String& unit, G4int depth=0);
    6468      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.
    6575
    6676  protected: // with description
     
    7585      virtual void PrintAll();
    7686
     87      virtual void SetUnit(const G4String& unit);
     88
     89  protected:
     90      virtual void DefineUnitAndCategory();
     91
    7792  private:
    7893      G4int  HCID;
    7994      G4int  fDirection;
    8095      G4THitsMap<G4double>* EvtMap;
    81 
     96      G4bool weighted;
     97      G4bool divideByArea;
    8298};
    8399
  • trunk/source/digits_hits/scorer/include/G4PSSphereSurfaceFlux3D.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSSphereSurfaceFlux3D.hh,v 1.2 2007/08/28 10:11:29 taso 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: $
    2929//
    3030
     
    4949//
    5050// Created: 2007-08-14  Tsukasa ASO
     51// 2010-07-22   Introduce Unit specification.
    5152///////////////////////////////////////////////////////////////////////////////
    5253
     
    5657  public: // with description
    5758      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,
    5864                              G4int ni=1,G4int nj=1, G4int nk=1,
    5965                              G4int depi=2, G4int depj=1, G4int depk=0);
  • trunk/source/digits_hits/scorer/include/G4PSTermination.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSTermination.hh,v 1.2 2007/12/10 16:29:35 gunter Exp $
    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: $
    2929//
    3030
     
    4141//
    4242// Created: 2007-2-2  Tsukasa ASO, Akinori Kimura.
     43// 2010-07-22   Introduce Unit specification.
    4344//
    4445///////////////////////////////////////////////////////////////////////////////
     
    6970      virtual void PrintAll();
    7071
     72      virtual void SetUnit(const G4String& unit);   
     73
    7174  private:
    7275      G4int HCID;
  • trunk/source/digits_hits/scorer/include/G4PSTrackCounter.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSTrackCounter.hh,v 1.2 2007/08/14 21:23:51 taso 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: $
    2929//
    3030
     
    4242//
    4343// Created: 2007-02-02  Tsukasa ASO, Akinori Kimura.
     44// 2010-07-22   Introduce Unit specification.
    4445//
    4546///////////////////////////////////////////////////////////////////////////////
     
    6970      virtual void PrintAll();
    7071
     72      virtual void SetUnit(const G4String& unit);
     73
    7174  private:
    7275      G4int HCID;
  • trunk/source/digits_hits/scorer/include/G4PSTrackCounter3D.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSTrackCounter3D.hh,v 1.2 2007/08/28 10:11:29 taso 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: $
    2929//
    3030
     
    4040//
    4141// Created: 2007-08-14  Tsukasa ASO
     42// 2010-07-22   Introduce Unit specification.
    4243//
    4344///////////////////////////////////////////////////////////////////////////////
  • trunk/source/digits_hits/scorer/include/G4PSTrackLength.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSTrackLength.hh,v 1.2 2007/08/14 21:23:51 taso 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: $
    2929//
    3030
     
    4343// Modified: 2007-02-02 Tsukasa ASO, Add MultiplyKineticEnergy()
    4444//                                  and DivideByVelocity().
     45//           2010-07-22   Introduce Unit specification.
    4546//
    4647//
     
    5253 public: // with description
    5354      G4PSTrackLength(G4String name, G4int depth=0);
     55      G4PSTrackLength(G4String name, const G4String& unit, G4int depth=0);
    5456      virtual ~G4PSTrackLength();
    5557
     
    5759      // Multiply track weight
    5860
    59       inline void MultiplyKineticEnergy(G4bool flg=true) { multiplyKinE = flg; }
     61      void MultiplyKineticEnergy(G4bool flg=true);
    6062      // Multiply Kinetic Energy
    6163
    62       inline void DivideByVelocity(G4bool flg=true) { divideByVelocity = flg; }
     64      void DivideByVelocity(G4bool flg=true);
    6365      // Divide by velocity
    6466
     
    7476      virtual void PrintAll();
    7577
     78      virtual void SetUnit(const G4String& unit);
     79
     80  protected:
     81      virtual void DefineUnitAndCategory();
     82
    7683  private:
    7784      G4int HCID;
  • trunk/source/digits_hits/scorer/include/G4PSTrackLength3D.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSTrackLength3D.hh,v 1.2 2007/08/28 10:11:29 taso 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: $
    2929//
    3030
     
    4040//
    4141// Created: 2008-08-14  Tsukasa ASO
     42// 2010-07-22   Introduce Unit specification.
    4243//
    4344///////////////////////////////////////////////////////////////////////////////
     
    4849 public: // with description
    4950      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,
    5054                     G4int ni=1,G4int nj=1, G4int nk=1,
    5155                     G4int depi=2, G4int depj=1, G4int depk=0);
  • trunk/source/digits_hits/scorer/include/G4SDParticleFilter.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4SDParticleFilter.hh,v 1.2 2007/08/14 21:23:51 taso 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: $
    2929//
    3030
     
    4848//
    4949// Created: 2005-11-14  Tsukasa ASO.
     50// 2010-07-22 T.Aso Filter for Ions
    5051//
    5152///////////////////////////////////////////////////////////////////////////////
     
    7273      // set method for acceptable particle name.
    7374      //
     75      void addIon(G4int Z, G4int A);
    7476      void show();
    7577
    7678  private:
    7779      std::vector<G4ParticleDefinition*> thePdef;
     80      std::vector<G4int> theIonZ;
     81      std::vector<G4int> theIonA;
    7882
    7983};
  • trunk/source/digits_hits/scorer/src/CVS/Entries

    r1337 r1340  
    1 /G4PSCellCharge.cc/1.1/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    2 /G4PSCellCharge3D.cc/1.3/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    3 /G4PSCellFlux.cc/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    4 /G4PSCellFlux3D.cc/1.3/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    5 /G4PSCylinderSurfaceCurrent.cc/1.3/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    6 /G4PSCylinderSurfaceCurrent3D.cc/1.3/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    7 /G4PSCylinderSurfaceFlux.cc/1.4/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    8 /G4PSCylinderSurfaceFlux3D.cc/1.3/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    9 /G4PSDoseDeposit.cc/1.2/Wed Sep 29 21:47:50 2010//Tgeant4-09-04-beta-01
    10 /G4PSDoseDeposit3D.cc/1.3/Wed Sep 29 21:48:00 2010//Tgeant4-09-04-beta-01
    11 /G4PSEnergyDeposit.cc/1.1/Wed Sep 29 21:48:00 2010//Tgeant4-09-04-beta-01
    12 /G4PSEnergyDeposit3D.cc/1.3/Wed Sep 29 21:48:00 2010//Tgeant4-09-04-beta-01
    13 /G4PSFlatSurfaceCurrent.cc/1.3/Wed Sep 29 21:48:00 2010//Tgeant4-09-04-beta-01
    14 /G4PSFlatSurfaceCurrent3D.cc/1.3/Wed Sep 29 21:48:00 2010//Tgeant4-09-04-beta-01
    15 /G4PSFlatSurfaceFlux.cc/1.2/Wed Sep 29 21:48:00 2010//Tgeant4-09-04-beta-01
    16 /G4PSFlatSurfaceFlux3D.cc/1.3/Wed Sep 29 21:48:00 2010//Tgeant4-09-04-beta-01
    17 /G4PSMinKinEAtGeneration.cc/1.1/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-01
    18 /G4PSMinKinEAtGeneration3D.cc/1.3/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-01
    19 /G4PSNofCollision.cc/1.1/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-01
    20 /G4PSNofCollision3D.cc/1.3/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-01
    21 /G4PSNofSecondary.cc/1.2/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-01
    22 /G4PSNofSecondary3D.cc/1.3/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-01
    23 /G4PSNofStep.cc/1.2/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-01
    24 /G4PSNofStep3D.cc/1.3/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-01
    25 /G4PSPassageCellCurrent.cc/1.1/Wed Sep 29 21:48:12 2010//Tgeant4-09-04-beta-01
    26 /G4PSPassageCellCurrent3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    27 /G4PSPassageCellFlux.cc/1.2/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    28 /G4PSPassageCellFlux3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    29 /G4PSPassageTrackLength.cc/1.1/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    30 /G4PSPassageTrackLength3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    31 /G4PSPopulation.cc/1.1/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    32 /G4PSPopulation3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    33 /G4PSSphereSurfaceCurrent.cc/1.4/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    34 /G4PSSphereSurfaceCurrent3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    35 /G4PSSphereSurfaceFlux.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    36 /G4PSSphereSurfaceFlux3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    37 /G4PSTermination.cc/1.2/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    38 /G4PSTermination3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    39 /G4PSTrackCounter.cc/1.1/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    40 /G4PSTrackCounter3D.cc/1.3/Wed Sep 29 21:48:14 2010//Tgeant4-09-04-beta-01
    41 /G4PSTrackLength.cc/1.1/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-01
    42 /G4PSTrackLength3D.cc/1.3/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-01
    43 /G4SDChargedFilter.cc/1.1/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-01
    44 /G4SDKineticEnergyFilter.cc/1.1/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-01
    45 /G4SDNeutralFilter.cc/1.1/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-01
    46 /G4SDParticleFilter.cc/1.1/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-01
    47 /G4SDParticleWithEnergyFilter.cc/1.1/Wed Sep 29 21:48:17 2010//Tgeant4-09-04-beta-01
     1/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//
    4848D
  • trunk/source/digits_hits/scorer/src/G4PSCellCharge.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PSCellCharge.cc,v 1.1 2007/07/11 01:31:02 asaim Exp $
    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: $
    2828//
    2929// G4PSCellCharge
     
    3838//
    3939// Created: 2006-08-20  Tsukasa ASO
     40// 2010-07-22   Introduce Unit specification.
    4041//
    4142///////////////////////////////////////////////////////////////////////////////
     
    4344G4PSCellCharge::G4PSCellCharge(G4String name, G4int depth)
    4445    :G4VPrimitiveScorer(name,depth),HCID(-1)
    45 {;}
     46{
     47    SetUnit("e+");
     48}
     49
     50G4PSCellCharge::G4PSCellCharge(G4String name, const G4String& unit,
     51                               G4int depth)
     52    :G4VPrimitiveScorer(name,depth),HCID(-1)
     53{
     54    SetUnit(unit);
     55}
    4656
    4757G4PSCellCharge::~G4PSCellCharge()
     
    99109  for(; itr != EvtMap->GetMap()->end(); itr++) {
    100110    G4cout << "  copy no.: " << itr->first
    101            << "  cell charge : " << *(itr->second) << " [e]"
     111           << "  cell charge : " << *(itr->second)/GetUnitValue()
     112           << " [" << GetUnit() << "]"
    102113           << G4endl;
    103114  }
    104115}
    105116
     117void G4PSCellCharge::SetUnit(const G4String& unit)
     118{
     119    CheckAndSetUnit(unit,"Electric charge");
     120}
     121
     122
  • trunk/source/digits_hits/scorer/src/G4PSCellCharge3D.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSCellCharge3D.cc,v 1.3 2007/08/29 06:36:41 taso 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: $
    2929//
    3030// G4PSCellCharge3D
     
    4040//
    4141// Created: 2007-08-14  Tsukasa ASO
     42// 2010-07-22   Introduce Unit specification.
    4243//
    4344///////////////////////////////////////////////////////////////////////////////
     
    5455}
    5556
     57G4PSCellCharge3D::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
    5669G4PSCellCharge3D::~G4PSCellCharge3D()
    5770{;}
  • trunk/source/digits_hits/scorer/src/G4PSCellFlux.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSCellFlux.cc,v 1.2 2008/12/28 20:32:00 asaim Exp $
    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: $
    2929//
    3030// G4PSCellFlux
     
    4848//
    4949// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
     50// 2010-07-22   Introduce Unit specification.
     51// 2010-07-22   Add weighted option
    5052//
    5153///////////////////////////////////////////////////////////////////////////////
    5254
    5355G4PSCellFlux::G4PSCellFlux(G4String name, G4int depth)
     56    :G4VPrimitiveScorer(name,depth),HCID(-1),weighted(true)
     57{
     58    DefineUnitAndCategory();
     59    SetUnit("percm2");
     60}
     61
     62G4PSCellFlux::G4PSCellFlux(G4String name, const G4String& unit, G4int depth)
    5463    :G4VPrimitiveScorer(name,depth),HCID(-1)
    55 {;}
     64{
     65    DefineUnitAndCategory();
     66    SetUnit(unit);
     67}
    5668
    5769G4PSCellFlux::~G4PSCellFlux()
     
    7991
    8092  G4double CellFlux = stepLength / (solid->GetCubicVolume());
    81   CellFlux *= aStep->GetPreStepPoint()->GetWeight();
     93  if (weighted) CellFlux *= aStep->GetPreStepPoint()->GetWeight();
    8294  G4int index = GetIndex(aStep);
    8395  EvtMap->add(index,CellFlux);
     
    112124  for(; itr != EvtMap->GetMap()->end(); itr++) {
    113125    G4cout << "  copy no.: " << itr->first
    114            << "  cell flux : " << *(itr->second)*cm*cm << " [cm^-2]"
     126           << "  cell flux : " << *(itr->second)/GetUnitValue()
     127           << " [" << GetUnit() << "]"
    115128           << G4endl;
    116129  }
    117130}
    118131
     132void G4PSCellFlux::SetUnit(const G4String& unit)
     133{
     134    CheckAndSetUnit(unit,"Per Unit Surface");
     135}
     136
     137void 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  
    2525//
    2626//
    27 // $Id: G4PSCellFlux3D.cc,v 1.3 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSCellFlux3D
     
    4444//
    4545// Created: 2007-08-14  Tsukasa ASO
     46// 2010-07-22   Introduce Unit specification.
    4647//
    4748///////////////////////////////////////////////////////////////////////////////
     
    5859}
    5960
     61G4PSCellFlux3D::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
    6073G4PSCellFlux3D::~G4PSCellFlux3D()
    6174{;}
  • trunk/source/digits_hits/scorer/src/G4PSCylinderSurfaceCurrent.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSCylinderSurfaceCurrent.cc,v 1.3 2009/11/14 00:01:13 asaim Exp $
    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: $
    2929//
    3030// G4PSCylinderSurfaceCurrent
     
    4949//
    5050// Created: 2007-03-21  Tsukasa ASO
     51// 2010-07-22   Introduce Unit specification.
    5152//
    5253///////////////////////////////////////////////////////////////////////////////
     
    5758  :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
    5859   weighted(true),divideByArea(true)
    59 {;}
     60{
     61    DefineUnitAndCategory();
     62    SetUnit("percm2");
     63}
     64
     65G4PSCylinderSurfaceCurrent::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}
    6075
    6176G4PSCylinderSurfaceCurrent::~G4PSCylinderSurfaceCurrent()
     
    8095  }
    8196
    82 //  if( solid->GetEntityType() != "G4Tubs" ){
    83 //    G4Exception("G4PSCylinderSurfaceCurrentScorer. - Solid type is not supported.");
    84 //    return FALSE;
    85 //  }
    8697  G4Tubs* tubsSolid = (G4Tubs*)(solid);
    8798
     
    122133      theTouchable->GetHistory()->GetTopTransform().TransformPoint(stppos1);
    123134    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 ){
    127135    G4double localR2 = localpos1.x()*localpos1.x()+localpos1.y()*localpos1.y();
    128136    G4double InsideRadius = tubsSolid->GetInnerRadius();
     
    139147      theTouchable->GetHistory()->GetTopTransform().TransformPoint(stppos2);
    140148    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 ){
    144149    G4double localR2 = localpos2.x()*localpos2.x()+localpos2.y()*localpos2.y();
    145150    G4double InsideRadius = tubsSolid->GetInnerRadius();
     
    179184    G4cout << "  copy no.: " << itr->first
    180185           << "  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    }
    183192    G4cout << G4endl;
    184193  }
    185194}
    186195
     196void 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
     211void 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  
    2525//
    2626//
    27 // $Id: G4PSCylinderSurfaceCurrent3D.cc,v 1.3 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSCylinderSurfaceCurrent3D
     
    4747//
    4848// Created: 2008-08-14  Tsukasa ASO
     49// 2010-07-22   Introduce Unit specification.
    4950///////////////////////////////////////////////////////////////////////////////
    5051
     
    6162}
    6263
     64G4PSCylinderSurfaceCurrent3D::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
    6378G4PSCylinderSurfaceCurrent3D::~G4PSCylinderSurfaceCurrent3D()
    6479{;}
  • trunk/source/digits_hits/scorer/src/G4PSCylinderSurfaceFlux.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSCylinderSurfaceFlux.cc,v 1.4 2009/11/14 00:01:13 asaim Exp $
    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: $
    2929//
    3030// // G4PSCylinderSurfaceFlux
     
    5050//
    5151// Created: 2007-03-29  Tsukasa ASO
     52// 2010-07-22   Introduce Unit specification.
     53// 2010-07-22   Add weighted and divideByArea options
    5254///////////////////////////////////////////////////////////////////////////////
    5355
    5456G4PSCylinderSurfaceFlux::G4PSCylinderSurfaceFlux(G4String name,
    5557                                                 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
     65G4PSCylinderSurfaceFlux::G4PSCylinderSurfaceFlux(G4String name,
     66                                                 G4int direction,
     67                                                 const G4String& unit,
     68                                                 G4int depth)
    5669  :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction)
    57 {;}
     70{
     71    DefineUnitAndCategory();
     72    SetUnit(unit);
     73}
    5874
    5975G4PSCylinderSurfaceFlux::~G4PSCylinderSurfaceFlux()
     
    8096  }
    8197
    82 //  if( solid->GetEntityType() != "G4Tubs" ){
    83 //    G4Exception("G4PSCylinderSurfaceFluxScorer. - Solid type is not supported.");
    84 //    return FALSE;
    85 //  }
    8698  G4Tubs* tubsSolid = (G4Tubs*)(solid);
    8799 
     
    116128        *tubsSolid->GetInnerRadius()* tubsSolid->GetDeltaPhiAngle()/radian;
    117129   
    118       G4double flux = preStep->GetWeight(); 
     130      G4double flux = 1.0;
     131      if ( weighted ) flux *=preStep->GetWeight(); 
    119132      // Current (Particle Weight)
    120133
    121       flux = flux/angleFactor/square;   
     134      flux = flux/angleFactor;   
     135      if ( divideByArea ) flux /= square;
    122136      //Flux with angle.
    123137      G4int index = GetIndex(aStep);
     
    201215  for(; itr != EvtMap->GetMap()->end(); itr++) {
    202216    G4cout << "  copy no.: " << itr->first
    203            << "  flux  : " << *(itr->second)*cm*cm << " [cm^-2]"
     217           << "  flux  : " << *(itr->second)/GetUnitValue()
     218           << " ["<<GetUnit()<<"]"
    204219           << G4endl;
    205220  }
    206221}
    207222
     223void 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
     238void 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  
    2525//
    2626//
    27 // $Id: G4PSCylinderSurfaceFlux3D.cc,v 1.3 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSCylinderSurfaceFlux3D
     
    4747//
    4848// Created: 2008-08-14  Tsukasa ASO
     49// 2010-07-22   Introduce Unit specification.
    4950///////////////////////////////////////////////////////////////////////////////
    5051
     
    6162}
    6263
     64G4PSCylinderSurfaceFlux3D::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
    6378G4PSCylinderSurfaceFlux3D::~G4PSCylinderSurfaceFlux3D()
    6479{;}
  • trunk/source/digits_hits/scorer/src/G4PSDoseDeposit.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSDoseDeposit.cc,v 1.2 2008/12/28 20:32:00 asaim 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: $
    2929//
    3030// G4PSDoseDeposit
     
    4141//
    4242// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
     43// 2010-07-22   Introduce Unit specification.
    4344//
    4445///////////////////////////////////////////////////////////////////////////////
     
    4647G4PSDoseDeposit::G4PSDoseDeposit(G4String name, G4int depth)
    4748  :G4VPrimitiveScorer(name,depth),HCID(-1)
    48 {;}
     49{
     50    SetUnit("Gy");
     51}
     52
     53G4PSDoseDeposit::G4PSDoseDeposit(G4String name, const G4String& unit,
     54                                 G4int depth)
     55  :G4VPrimitiveScorer(name,depth),HCID(-1)
     56{
     57    SetUnit(unit);
     58}
    4959
    5060G4PSDoseDeposit::~G4PSDoseDeposit()
     
    6373    G4int idx = ((G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable()))
    6474                ->GetReplicaNumber(indexDepth);
     75    if(idx<0)
     76    {
     77      G4Exception("G4PSDoseDeposit","G4PSDoseDeposit::ProcessHits",JustWarning,
     78                  "Incorrect replica number");
     79      G4cerr << " --- GetReplicaNumber : " << idx << G4endl;
     80    }
    6581    solid = physParam->ComputeSolid(idx, physVol);
    6682    solid->ComputeDimensions(physParam,idx,physVol);
     
    7187  }
    7288
    73   G4double density = aStep->GetTrack()->GetMaterial()->GetDensity();
     89  G4double density = aStep->GetTrack()->GetStep()->GetPreStepPoint()->GetMaterial()->GetDensity();
    7490  G4double dose    = edep / ( density * (solid->GetCubicVolume()) );
    7591  dose *= aStep->GetPreStepPoint()->GetWeight();
     
    106122  for(; itr != EvtMap->GetMap()->end(); itr++) {
    107123    G4cout << "  copy no.: " << itr->first
    108            << "  dose deposit: " << G4BestUnit(*(itr->second),"Dose")
     124           << "  dose deposit: "
     125           << *(itr->second)/GetUnitValue()
     126           << " ["<<GetUnit() <<"]"
    109127           << G4endl;
    110128  }
    111129}
    112130
     131void G4PSDoseDeposit::SetUnit(const G4String& unit)
     132{
     133        CheckAndSetUnit(unit,"Dose");
     134}
     135
     136
     137
  • trunk/source/digits_hits/scorer/src/G4PSDoseDeposit3D.cc

    r1337 r1340  
    2525//
    2626//
    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: $
    2929//
    3030// G4PSDoseDeposit3D
     
    3636//
    3737// Created: 2008-08-14  Tsukasa ASO
     38// 2010-07-22   Introduce Unit specification.
    3839//
    3940///////////////////////////////////////////////////////////////////////////////
     
    5051}
    5152
     53G4PSDoseDeposit3D::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
    5266G4PSDoseDeposit3D::~G4PSDoseDeposit3D()
    5367{;}
     
    6074  G4int k = touchable->GetReplicaNumber(fDepthk);
    6175 
     76if(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}
     84if(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}
     92if(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
    62101  return i*fNj*fNk+j*fNk+k;
    63102}
  • trunk/source/digits_hits/scorer/src/G4PSEnergyDeposit.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSEnergyDeposit.cc,v 1.1 2007/07/11 01:31:02 asaim Exp $
    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: $
    2929//
    3030// G4PSEnergyDeposit
     
    3636//
    3737// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
     38// 2010-07-22   Introduce Unit specification.
    3839//
    3940///////////////////////////////////////////////////////////////////////////////
    4041
    4142G4PSEnergyDeposit::G4PSEnergyDeposit(G4String name, G4int depth)
     43  :G4VPrimitiveScorer(name,depth),HCID(-1)
     44{
     45  SetUnit("MeV");
     46}
     47
     48G4PSEnergyDeposit::G4PSEnergyDeposit(G4String name, const G4String& unit,
     49                                     G4int depth)
    4250  :G4VPrimitiveScorer(name,depth),HCID(-1)
    43 {;}
     51{
     52  SetUnit(unit);
     53}
    4454
    4555G4PSEnergyDeposit::~G4PSEnergyDeposit()
     
    8393  for(; itr != EvtMap->GetMap()->end(); itr++) {
    8494    G4cout << "  copy no.: " << itr->first
    85            << "  energy deposit: " << G4BestUnit(*(itr->second),"Energy")
     95           << "  energy deposit: "
     96           << *(itr->second)/GetUnitValue()
     97           << " [" << GetUnit()<<"]"
    8698           << G4endl;
    8799  }
    88100}
     101
     102void G4PSEnergyDeposit::SetUnit(const G4String& unit)
     103{
     104        CheckAndSetUnit(unit,"Energy");
     105}
  • trunk/source/digits_hits/scorer/src/G4PSEnergyDeposit3D.cc

    r1337 r1340  
    2525//
    2626//
    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: $
    2929//
    3030// G4PSEnergyDeposit3D
     
    4949}
    5050
     51G4PSEnergyDeposit3D::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
    5163G4PSEnergyDeposit3D::~G4PSEnergyDeposit3D()
    5264{;}
     
    5971  G4int k = touchable->GetReplicaNumber(fDepthk);
    6072 
     73if(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}
     81if(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}
     89if(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
    6199  return i*fNj*fNk+j*fNk+k;
    62100}
  • trunk/source/digits_hits/scorer/src/G4PSFlatSurfaceCurrent.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSFlatSurfaceCurrent.cc,v 1.3 2008/12/29 00:17:14 asaim Exp $
    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: $
    2929//
    3030// G4PSFlatSurfaceCurrent
     
    5151// 17-Nov-2005 T.Aso, Bug fix for area definition.
    5252// 31-Mar-2007 T.Aso, Add option for normalizing by the area.
     53// 2010-07-22   Introduce Unit specification.
    5354//
    5455///////////////////////////////////////////////////////////////////////////////
     
    5960    :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
    6061     weighted(true),divideByArea(true)
    61 {;}
     62{
     63    DefineUnitAndCategory();
     64    SetUnit("percm2");
     65}
     66
     67G4PSFlatSurfaceCurrent::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}
    6277
    6378G4PSFlatSurfaceCurrent::~G4PSFlatSurfaceCurrent()
     
    8297  }
    8398
    84 //  if( solid->GetEntityType() != "G4Box" ){
    85 //    G4Exception("G4PSFlatSurfaceCurrentScorer. - Solid type is not supported.");
    86 //    return FALSE;
    87 //  }
    8899  G4Box* boxSolid = (G4Box*)(solid);
    89100
     
    160171  for(; itr != EvtMap->GetMap()->end(); itr++) {
    161172      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      }
    164179      G4cout << G4endl;
    165180  }
    166181}
    167182
     183void 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
     198void 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  
    2525//
    2626//
    27 // $Id: G4PSFlatSurfaceCurrent3D.cc,v 1.3 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSFlatSurfaceCurrent3D
     
    4747//
    4848// Created: 2008-08-14  Tsukasa ASO
     49// 2010-07-22   Introduce Unit specification.
    4950///////////////////////////////////////////////////////////////////////////////
    5051
     
    6263}
    6364
     65G4PSFlatSurfaceCurrent3D::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
    6479G4PSFlatSurfaceCurrent3D::~G4PSFlatSurfaceCurrent3D()
    6580{;}
  • trunk/source/digits_hits/scorer/src/G4PSFlatSurfaceFlux.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSFlatSurfaceFlux.cc,v 1.2 2008/12/29 00:17:14 asaim Exp $
    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: $
    2929//
    3030// G4PSFlatSurfaceFlux
     
    5353// 18-Nov-2005  T.Aso,  To use always positive value for anglefactor.
    5454// 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
    5557///////////////////////////////////////////////////////////////////////////////
    5658
    5759G4PSFlatSurfaceFlux::G4PSFlatSurfaceFlux(G4String name,
    5860                                         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
     68G4PSFlatSurfaceFlux::G4PSFlatSurfaceFlux(G4String name,
     69                                         G4int direction,
     70                                         const G4String& unit,
     71                                         G4int depth)
    5972  :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction)
    60 {;}
     73{
     74    DefineUnitAndCategory();
     75    SetUnit(unit);
     76}
    6177
    6278G4PSFlatSurfaceFlux::~G4PSFlatSurfaceFlux()
     
    8197  }
    8298
    83 //  if( solid->GetEntityType() != "G4Box" ){
    84 //    G4Exception("G4PSFlatSurfaceFluxScorer. - Solid type is not supported.");
    85 //    return FALSE;
    86 //  }
    8799  G4Box* boxSolid = (G4Box*)(solid);
    88100
     
    107119      G4double angleFactor = localdir.z();
    108120      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)
    110123      //
    111124      G4double square = 4.*boxSolid->GetXHalfLength()*boxSolid->GetYHalfLength();
    112125      //
    113       flux = flux/angleFactor/square;  // Flux with angle.
     126      flux = flux/angleFactor;  // Flux with angle.
     127      if ( divideByArea ) flux /= square;
    114128      //
    115129      G4int index = GetIndex(aStep);
     
    180194  for(; itr != EvtMap->GetMap()->end(); itr++) {
    181195    G4cout << "  copy no.: " << itr->first
    182            << "  flux  : " << *(itr->second)*cm*cm << " [cm^-2]"
     196           << "  flux  : " << *(itr->second)/GetUnitValue()
     197           << " [" << GetUnit() <<"]"
    183198           << G4endl;
    184199  }
    185200}
    186201
     202void 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
     217void 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  
    2525//
    2626//
    27 // $Id: G4PSFlatSurfaceFlux3D.cc,v 1.3 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSFlatSurfaceFlux3D
     
    4848//
    4949// Created: 2007-08-14  Tsukasa ASO
     50// 2010-07-22   Introduce Unit specification.
    5051//
    5152///////////////////////////////////////////////////////////////////////////////
     
    6263}
    6364
     65G4PSFlatSurfaceFlux3D::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
    6478G4PSFlatSurfaceFlux3D::~G4PSFlatSurfaceFlux3D()
    6579{;}
  • trunk/source/digits_hits/scorer/src/G4PSMinKinEAtGeneration.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSMinKinEAtGeneration.cc,v 1.1 2007/07/11 01:31:02 asaim Exp $
    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: $
    2929//
    3030// G4PSMinKinEAtGeneration
     
    3737//
    3838// Created: 2005-11-17  Tsukasa ASO, Akinori Kimura.
     39// 2010-07-22   Introduce Unit specification.
    3940//
    4041
    4142G4PSMinKinEAtGeneration::G4PSMinKinEAtGeneration(G4String name, G4int depth)
    4243  :G4VPrimitiveScorer(name,depth),HCID(-1)
    43 {;}
     44{
     45    SetUnit("MeV");
     46}
     47
     48G4PSMinKinEAtGeneration::G4PSMinKinEAtGeneration(G4String name,
     49                                                 const G4String& unit,
     50                                                 G4int depth)
     51  :G4VPrimitiveScorer(name,depth),HCID(-1)
     52{
     53    SetUnit(unit);
     54}
    4455
    4556G4PSMinKinEAtGeneration::~G4PSMinKinEAtGeneration()
     
    110121  for(; itr != EvtMap->GetMap()->end(); itr++) {
    111122    G4cout << "  copy no.: " << itr->first
    112            << "  num of step: " << G4BestUnit(*(itr->second),"Energy")
     123           << "  num of step: " << *(itr->second)/GetUnitValue()
     124           << " ["<<GetUnit()<<"]"
    113125           << G4endl;
    114126  }
    115127}
    116128
     129void G4PSMinKinEAtGeneration::SetUnit(const G4String& unit)
     130{
     131    CheckAndSetUnit(unit,"Energy");
     132}
     133
     134
  • trunk/source/digits_hits/scorer/src/G4PSMinKinEAtGeneration3D.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSMinKinEAtGeneration3D.cc,v 1.3 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSMinKinEAtGeneration3D
     
    3737//
    3838// Created: 2007-08-14  Tsukasa ASO
     39// 2010-07-22   Introduce Unit specification.
    3940//
    4041//
     
    5253}
    5354
     55G4PSMinKinEAtGeneration3D::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
    5468G4PSMinKinEAtGeneration3D::~G4PSMinKinEAtGeneration3D()
    5569{;}
  • trunk/source/digits_hits/scorer/src/G4PSNofCollision.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSNofCollision.cc,v 1.1 2007/07/11 01:31:02 asaim Exp $
    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: $
    2929//
    3030// G4PSNofCollision
     
    3737//
    3838// Created: 2007-02-02  Tsukasa ASO, Akinori Kimura.
     39// 2010-07-22   Introduce Unit specification.
    3940//
    4041///////////////////////////////////////////////////////////////////////////////
     
    4243G4PSNofCollision::G4PSNofCollision(G4String name, G4int depth)
    4344  :G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false)
    44 {;}
     45{
     46    SetUnit("");
     47}
    4548
    4649G4PSNofCollision::~G4PSNofCollision()
     
    8386  for(; itr != EvtMap->GetMap()->end(); itr++) {
    8487    G4cout << "  copy no.: " << itr->first
    85            << "  collisions: " << *(itr->second)
     88           << "  collisions: " << *(itr->second)/GetUnitValue()
     89           << " [collision] "
    8690           << G4endl;
    8791  }
    8892}
    8993
     94
     95void 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  
    2525//
    2626//
    27 // $Id: G4PSNofSecondary.cc,v 1.2 2007/08/14 21:23:51 taso 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: $
    2929//
    3030// G4PSNofSecondary
     
    3939
    4040G4PSNofSecondary::G4PSNofSecondary(G4String name, G4int depth)
    41     :G4VPrimitiveScorer(name,depth),HCID(-1),particleDef(0)
     41    :G4VPrimitiveScorer(name,depth),HCID(-1),particleDef(0),
     42     weighted(true)
    4243{;}
    4344
     
    5758  //- This is a newly produced secondary particle.
    5859  G4int  index = GetIndex(aStep);
    59   G4double weight = aStep->GetPreStepPoint()->GetWeight();
     60  G4double weight = 1.0;
     61  if ( weighted ) weight *= aStep->GetPreStepPoint()->GetWeight();
    6062  EvtMap->add(index,weight); 
    6163  return TRUE;
     
    99101  for(; itr != EvtMap->GetMap()->end(); itr++) {
    100102    G4cout << "  copy no.: " << itr->first
    101            << "  num of step: " << *(itr->second)
     103           << "  num of step: " << *(itr->second)/GetUnitValue()
    102104           << G4endl;
    103105  }
    104106}
    105107
     108void 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  
    2525//
    2626//
    27 // $Id: G4PSNofStep.cc,v 1.2 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSNofStep
    3131#include "G4PSNofStep.hh"
     32#include "G4UnitsTable.hh"
    3233
    3334// (Description)
     
    3637//
    3738// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
     39// 2010-07-22   Introduce Unit specification.
    3840//
    3941
    4042G4PSNofStep::G4PSNofStep(G4String name, G4int depth)
    4143    :G4VPrimitiveScorer(name,depth),HCID(-1),boundaryFlag(false)
    42 {;}
     44{
     45    SetUnit("");
     46}
    4347
    4448G4PSNofStep::~G4PSNofStep()
     
    8286    G4cout << "  copy no.: " << itr->first
    8387           << "  num of step: " << *(itr->second)
     88           << " [steps] "
    8489           << G4endl;
    8590  }
    8691}
    8792
     93void 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  
    2525//
    2626//
    27 // $Id: G4PSNofStep3D.cc,v 1.3 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSNofStep3D
  • trunk/source/digits_hits/scorer/src/G4PSPassageCellCurrent.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSPassageCellCurrent.cc,v 1.1 2007/08/14 21:30:46 taso 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: $
    2929//
    3030// G4PSPassageCellCurrent
     
    4141//
    4242// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
     43// 2010-07-22   Introduce Unit specification.
     44// 2010-07-22   Add weighted option
    4345//
    4446///////////////////////////////////////////////////////////////////////////////
     
    4749    :G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fCurrent(0),
    4850     weighted(true)
    49 {;}
     51{
     52    SetUnit("");
     53}
    5054
    5155G4PSPassageCellCurrent::~G4PSPassageCellCurrent()
     
    118122    G4cout << "  copy no.: " << itr->first
    119123           << "  cell current : " << *(itr->second)
     124           << " [tracks] "
    120125           << G4endl;
    121126  }
    122127}
    123128
     129void 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  
    2525//
    2626//
    27 // $Id: G4PSPassageCellCurrent3D.cc,v 1.3 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSPassageCellCurrent3D
     
    3838//
    3939// Created: 2007-08-14  Tsukasa ASO
     40// 2010-07-22   Introduce Unit specification.
    4041//
    4142///////////////////////////////////////////////////////////////////////////////
  • trunk/source/digits_hits/scorer/src/G4PSPassageCellFlux.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSPassageCellFlux.cc,v 1.2 2008/12/28 20:32:00 asaim Exp $
    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: $
    2929//
    3030// G4PSPassageCellFlux
     
    4747//
    4848// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
     49// 2010-07-22   Introduce Unit specification.
     50// 2010-07-22   Add weighted option
    4951//
    5052///////////////////////////////////////////////////////////////////////////////
    5153
    5254G4PSPassageCellFlux::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
     62G4PSPassageCellFlux::G4PSPassageCellFlux(G4String name, const G4String& unit,
     63                                         G4int depth)
    5364  :G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fCellFlux(0)
    54 {;}
     65{
     66    DefineUnitAndCategory();
     67    SetUnit(unit);
     68}
    5569
    5670G4PSPassageCellFlux::~G4PSPassageCellFlux()
     
    92106  G4int  trkid  = aStep->GetTrack()->GetTrackID();
    93107  G4double trklength  = aStep->GetStepLength();
    94   trklength *= aStep->GetPreStepPoint()->GetWeight();
     108  if ( weighted ) trklength *= aStep->GetPreStepPoint()->GetWeight();
    95109
    96110  if ( IsEnter &&IsExit ){         // Passed at one step
     
    143157  for(; itr != EvtMap->GetMap()->end(); itr++) {
    144158    G4cout << "  copy no.: " << itr->first
    145            << "  cell flux : " << *(itr->second)*cm*cm << " [cm^-2]"
     159           << "  cell flux : " << *(itr->second)/GetUnitValue()
     160           << " [" << GetUnit()
    146161           << G4endl;
    147162  }
    148163}
    149164
     165void G4PSPassageCellFlux::SetUnit(const G4String& unit)
     166{
     167    CheckAndSetUnit(unit,"Per Unit Surface");
     168}
     169
     170void 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  
    2525//
    2626//
    27 // $Id: G4PSPassageCellFlux3D.cc,v 1.3 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSPassageCellFlux3D
     
    5555}
    5656
     57G4PSPassageCellFlux3D::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
    5769G4PSPassageCellFlux3D::~G4PSPassageCellFlux3D()
    5870{;}
  • trunk/source/digits_hits/scorer/src/G4PSPassageTrackLength.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSPassageTrackLength.cc,v 1.1 2007/07/11 01:31:03 asaim Exp $
    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: $
    2929//
    3030// G4PSPassageTrackLength
     
    4141//
    4242// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
     43// 2010-07-22   Introduce Unit specification.
    4344//
    4445///////////////////////////////////////////////////////////////////////////////
     
    4748  :G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fTrackLength(0.),
    4849   weighted(false)
    49 {;}
     50{
     51    SetUnit("mm");
     52}
     53
     54G4PSPassageTrackLength::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
    5063
    5164G4PSPassageTrackLength::~G4PSPassageTrackLength()
     
    120133  for(; itr != EvtMap->GetMap()->end(); itr++) {
    121134    G4cout << "  copy no.: " << itr->first
    122            << "  track length : " << G4BestUnit(*(itr->second),"Length")
     135           << "  track length : "
     136           << *(itr->second)/GetUnitValue()
     137           << " [" << GetUnit()<< "]"
    123138           << G4endl;
    124139  }
    125140}
    126141
     142void G4PSPassageTrackLength::SetUnit(const G4String& unit)
     143{
     144    CheckAndSetUnit(unit,"Length");
     145}
  • trunk/source/digits_hits/scorer/src/G4PSPassageTrackLength3D.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSPassageTrackLength3D.cc,v 1.3 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSPassageTrackLength3D
     
    3838//
    3939// Created: 2008-08-14  Tsukasa ASO
     40// 2010-07-22   Introduce Unit specification.
    4041//
    4142///////////////////////////////////////////////////////////////////////////////
     
    5253}
    5354
     55G4PSPassageTrackLength3D::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
    5467G4PSPassageTrackLength3D::~G4PSPassageTrackLength3D()
    5568{;}
  • trunk/source/digits_hits/scorer/src/G4PSPopulation.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSPopulation.cc,v 1.1 2007/07/11 01:31:03 asaim Exp $
    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: $
    2929//
    3030// G4PSPopulation
     
    3737//
    3838// Created: 2007-02-02  Tsukasa ASO, Akinori Kimura.
     39// 2010-07-22   Introduce Unit specification.
    3940//
    4041///////////////////////////////////////////////////////////////////////////////
     
    4243G4PSPopulation::G4PSPopulation(G4String name, G4int depth)
    4344  :G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false)
    44 {;}
     45{
     46    SetUnit("");
     47}
    4548
    4649G4PSPopulation::~G4PSPopulation()
     
    8992  for(; itr != EvtMap->GetMap()->end(); itr++) {
    9093    G4cout << "  copy no.: " << itr->first
    91            << "  population: " << *(itr->second)
     94           << "  population: " << *(itr->second)/GetUnitValue()
     95           << " [tracks]"
    9296           << G4endl;
    9397  }
    9498}
    9599
     100void 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  
    2525//
    2626//
    27 // $Id: G4PSSphereSurfaceCurrent.cc,v 1.4 2009/11/14 00:01:13 asaim Exp $
    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: $
    2929//
    3030// G4PSSphereSurfaceCurrent
     
    4949//
    5050// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
     51// 2010-07-22   Introduce Unit specification.
    5152//
    5253///////////////////////////////////////////////////////////////////////////////
     
    5657    :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),
    5758     weighted(true),divideByArea(true)
    58 {;}
     59{
     60    DefineUnitAndCategory();
     61    SetUnit("percm2");
     62}
     63
     64G4PSSphereSurfaceCurrent::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}
    5974
    6075G4PSSphereSurfaceCurrent::~G4PSSphereSurfaceCurrent()
     
    7994  }
    8095
    81 //  if( solid->GetEntityType() != "G4Sphere" ){
    82 //    G4Exception("G4PSSphereSurfaceCurrentScorer. - Solid type is not supported.");
    83 //    return FALSE;
    84 //  }
    8596  G4Sphere* sphereSolid = (G4Sphere*)(solid);
    8697
     
    177188  for(; itr != EvtMap->GetMap()->end(); itr++) {
    178189    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    }
    181196    G4cout  << G4endl;
    182197  }
    183198}
    184199
     200
     201void 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
     216void 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  
    2525//
    2626//
    27 // $Id: G4PSSphereSurfaceCurrent3D.cc,v 1.3 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSSphereSurfaceCurrent3D
     
    4646//
    4747// Created: 2007-08-14  Tsukasa ASO
     48// 2010-07-22   Introduce Unit specification.
    4849//
    4950///////////////////////////////////////////////////////////////////////////////
     
    6061}
    6162
     63G4PSSphereSurfaceCurrent3D::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
    6277G4PSSphereSurfaceCurrent3D::~G4PSSphereSurfaceCurrent3D()
    6378{;}
  • trunk/source/digits_hits/scorer/src/G4PSSphereSurfaceFlux.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSSphereSurfaceFlux.cc,v 1.3 2009/11/14 00:01:13 asaim Exp $
    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: $
    2929//
    3030// G4PSSphereSurfaceFlux
     
    5050// Created: 2005-11-14  Tsukasa ASO, Akinori Kimura.
    5151// 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
    5254//
    5355///////////////////////////////////////////////////////////////////////////////
     
    5557G4PSSphereSurfaceFlux::G4PSSphereSurfaceFlux(G4String name,
    5658                                         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
     66G4PSSphereSurfaceFlux::G4PSSphereSurfaceFlux(G4String name,
     67                                             G4int direction,
     68                                             const G4String& unit,
     69                                             G4int depth)
    5770  :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction)
    58 {;}
     71{
     72    DefineUnitAndCategory();
     73    SetUnit(unit);
     74}
    5975
    6076G4PSSphereSurfaceFlux::~G4PSSphereSurfaceFlux()
     
    7995  }
    8096
    81 //  if( solid->GetEntityType() != "G4Sphere" ){
    82 //    G4Exception("G4PSSphereSurfaceFluxScorer. - Solid type is not supported.");
    83 //    return FALSE;
    84 //  }
    8597  G4Sphere* sphereSolid = (G4Sphere*)(solid);
    8698
     
    122134      G4double square = radi*radi*dph*( -std::cos(enth) + std::cos(stth) );
    123135
    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.
    126139
    127140      current /= anglefactor;
     
    205218  for(; itr != EvtMap->GetMap()->end(); itr++) {
    206219    G4cout << "  copy no.: " << itr->first
    207            << "  current  : " << *(itr->second)
     220           << "  current  : " << *(itr->second)/GetUnitValue()
     221           << " ["<<GetUnit()<<"]"
    208222           << G4endl;
    209223  }
    210224}
    211225
     226void 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
     241void 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  
    2525//
    2626//
    27 // $Id: G4PSSphereSurfaceFlux3D.cc,v 1.3 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSSphereSurfaceFlux3D
     
    4646//
    4747// Created: 2007-08-14  Tsukasa ASO
     48// 2010-07-22   Introduce Unit specification.
    4849///////////////////////////////////////////////////////////////////////////////
    4950
     
    5758  fNj=nj;
    5859  fNk=nk;
     60}
     61
     62G4PSSphereSurfaceFlux3D::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);
    5973}
    6074
  • trunk/source/digits_hits/scorer/src/G4PSTermination.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSTermination.cc,v 1.2 2007/12/10 16:29:42 gunter Exp $
    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: $
    2929//
    3030// G4PSTermination
     
    3737//
    3838// Created: 2007-02-02  Tsukasa ASO, Akinori Kimura.
     39// 2010-07-22   Introduce Unit specification.
    3940//
    4041///////////////////////////////////////////////////////////////////////////////
     
    4243G4PSTermination::G4PSTermination(G4String name, G4int depth)
    4344  :G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false)
    44 {;}
     45{
     46    SetUnit("");
     47}
    4548
    4649G4PSTermination::~G4PSTermination()
     
    8891}
    8992
     93void 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  
    2525//
    2626//
    27 // $Id: G4PSTrackCounter.cc,v 1.1 2007/07/11 01:31:03 asaim Exp $
    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: $
    2929//
    3030// G4PSTrackCounter
    3131#include "G4PSTrackCounter.hh"
    32 
     32#include "G4UnitsTable.hh"
    3333
    3434///////////////////////////////////////////////////////////////////////////////
     
    3737//
    3838// Created: 2007-02-02  Tsukasa ASO, Akinori Kimura.
     39// 2010-07-22   Introduce Unit specification.
    3940//
    4041///////////////////////////////////////////////////////////////////////////////
     
    4243G4PSTrackCounter::G4PSTrackCounter(G4String name, G4int direction, G4int depth)
    4344  :G4VPrimitiveScorer(name,depth),HCID(-1),fDirection(direction),weighted(false)
    44 {;}
     45{
     46 SetUnit("");
     47}
    4548
    4649G4PSTrackCounter::~G4PSTrackCounter()
     
    108111    G4cout << "  copy no.: " << itr->first
    109112           << "  track count: " << *(itr->second)
     113           << " [tracks] "
    110114           << G4endl;
    111115  }
    112116}
     117
     118void 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  
    2525//
    2626//
    27 // $Id: G4PSTrackCounter3D.cc,v 1.3 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSTrackCounter3D
  • trunk/source/digits_hits/scorer/src/G4PSTrackLength.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PSTrackLength.cc,v 1.1 2007/07/11 01:31:03 asaim Exp $
    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: $
    2929//
    3030// G4PSTrackLength
     
    3737//
    3838// Created: 2007-02-02  Tsukasa ASO, Akinori Kimura.
     39//          2010-07-22   Introduce Unit specification.
    3940//
    4041///////////////////////////////////////////////////////////////////////////////
     
    4344    :G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false),multiplyKinE(false),
    4445     divideByVelocity(false)
    45 {;}
     46{
     47    DefineUnitAndCategory();
     48    SetUnit("mm");
     49}
     50
     51G4PSTrackLength::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}
    4659
    4760G4PSTrackLength::~G4PSTrackLength()
    4861{;}
     62
     63void G4PSTrackLength::MultiplyKineticEnergy(G4bool flg)
     64{
     65    multiplyKinE = flg;
     66    // Default unit is set according to flags.
     67    SetUnit("");
     68}
     69
     70void G4PSTrackLength::DivideByVelocity(G4bool flg)
     71{
     72    divideByVelocity = flg;
     73    // Default unit is set according to flags.
     74    SetUnit("");
     75}
    4976
    5077G4bool G4PSTrackLength::ProcessHits(G4Step* aStep,G4TouchableHistory*)
     
    84111  std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin();
    85112  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() << "]";
    96116      G4cout << G4endl;
    97117  }
    98118}
    99119
     120void 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
     153void 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  
    2525//
    2626//
    27 // $Id: G4PSTrackLength3D.cc,v 1.3 2007/08/29 06:36:42 taso 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: $
    2929//
    3030// G4PSTrackLength3D
     
    3737//
    3838// Created: 2008-08-14  Tsukasa ASO
     39// 2010-07-22   Introduce Unit specification.
    3940//
    4041///////////////////////////////////////////////////////////////////////////////
     
    5152}
    5253
     54G4PSTrackLength3D::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
    5366G4PSTrackLength3D::~G4PSTrackLength3D()
    5467{;}
  • trunk/source/digits_hits/scorer/src/G4SDParticleFilter.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4SDParticleFilter.cc,v 1.1 2007/07/11 01:31:03 asaim Exp $
    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: $
    2929//
    3030// G4VSensitiveDetector
     
    4949{
    5050  thePdef.clear();
     51  theIonZ.clear();
     52  theIonA.clear();
    5153}
    5254
     
    6668  }
    6769  thePdef.push_back(pd);
     70  theIonZ.clear();
     71  theIonA.clear();
    6872}
    6973
     
    8488   }
    8589   thePdef.push_back(pd);
     90   theIonZ.clear();
     91   theIonA.clear();
    8692  }
    8793}
     
    8995G4SDParticleFilter::G4SDParticleFilter(G4String name,
    9096                       const std::vector<G4ParticleDefinition*>& particleDef)
    91   :G4VSDFilter(name), thePdef(particleDef)
     97    :G4VSDFilter(name), thePdef(particleDef)
    9298{
    9399  for ( size_t i = 0; i < particleDef.size(); i++){
     
    95101       "NULL pointer is found in the given particleDef vector.");
    96102  }
     103  theIonZ.clear();
     104  theIonA.clear();
    97105}
    98106
     
    100108{
    101109  thePdef.clear();
    102 }
     110  theIonZ.clear();
     111  theIonA.clear();
     112      }
    103113
    104114G4bool G4SDParticleFilter::Accept(const G4Step* aStep) const
    105115{
     116 
    106117  for ( size_t i = 0; i < thePdef.size(); i++){
    107118    if ( thePdef[i] == aStep->GetTrack()->GetDefinition() ) return TRUE;
    108119  }
     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
    109129  return FALSE;
    110130}
     
    128148}
    129149
     150void 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
    130161void G4SDParticleFilter::show(){
    131162  G4cout << "----G4SDParticleFileter particle list------"<<G4endl;
    132163  for ( size_t i = 0; i < thePdef.size(); i++){
    133164    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;
    134169  }
    135170  G4cout << "-------------------------------------------"<<G4endl;
  • trunk/source/digits_hits/utils/CVS/Entries

    r1337 r1340  
    11D/include////
    22D/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 asaim Exp $
     1# $Id: GNUmakefile,v 1.11 2010/10/27 08:10:13 gcosmo Exp $
    22# --------------------------------------------------------------
    33# 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//
    1211D
  • trunk/source/digits_hits/utils/include/G4DefaultLinearColorMap.hh

    r1337 r1340  
    2626//
    2727// $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: $
    2929//
    3030
  • trunk/source/digits_hits/utils/include/G4ScoreLogColorMap.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4ScoreLogColorMap.hh,v 1.1 2008/03/25 02:18:39 akimura 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: $
    2929//
    3030
  • trunk/source/digits_hits/utils/include/G4ScoreQuantityMessenger.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4ScoreQuantityMessenger.hh,v 1.4 2007/11/06 17:17:14 asaim Exp $
    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: $
    2929//
    3030// (HISTORY)
    3131//  03-Sep-2007  T.Aso Command definitions are introduced.
    3232//  01-Nov-2007  M.Asai Class is splited into two.
     33//  20-Jul-2010  T.Aso  Specify unit for scorer
    3334
    3435
     
    4546class G4UIdirectory;
    4647class G4UIcmdWithAString;
     48class G4UIcmdWithoutParameter;
    4749class G4UIcommand;
    4850
     
    7375    void FParticleCommand(G4VScoringMesh* mesh,G4TokenVec& token);
    7476    void FParticleWithEnergyCommand(G4VScoringMesh* mesh,G4TokenVec& token);
     77
     78    G4bool CheckMeshPS(G4VScoringMesh* mesh, G4String& psname);
    7579 
    7680  private:
     
    8488    G4UIdirectory*             quantityDir;
    8589    G4UIcmdWithAString*        qTouchCmd;
     90    G4UIcmdWithoutParameter*   qGetUnitCmd;
     91    G4UIcmdWithAString*        qSetUnitCmd;
    8692    //
    87     G4UIcmdWithAString*   qCellChgCmd;
    88     G4UIcmdWithAString*   qCellFluxCmd;
    89     G4UIcmdWithAString*   qPassCellFluxCmd;
    90     G4UIcmdWithAString*   qeDepCmd;
    91     G4UIcmdWithAString*   qdoseDepCmd;
    92     G4UIcmdWithAString*   qnOfStepCmd;
    93     G4UIcmdWithAString*   qnOfSecondaryCmd;
     93    G4UIcommand*   qCellChgCmd;
     94    G4UIcommand*   qCellFluxCmd;
     95    G4UIcommand*   qPassCellFluxCmd;
     96    G4UIcommand*   qeDepCmd;
     97    G4UIcommand*   qdoseDepCmd;
     98    G4UIcommand*   qnOfStepCmd;
     99    G4UIcommand*   qnOfSecondaryCmd;
    94100    //
    95101    G4UIcommand*          qTrackLengthCmd;
     
    106112    G4UIcommand*          qTrackCountCmd;
    107113    G4UIcommand*          qTerminationCmd;
     114    G4UIcommand*          qMinKinEAtGeneCmd;
    108115
    109116    //
  • trunk/source/digits_hits/utils/include/G4ScoringBox.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4ScoringBox.hh,v 1.19 2010/06/14 13:28:17 gcosmo Exp $
    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: $
    2929//
    3030
     
    5353  void Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg=111);
    5454  void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap,
    55                           G4int idxProj, G4int idxColumn);
     55                  G4int idxProj, G4int idxColumn);
    5656
    5757  // set a direction to segment this mesh
  • trunk/source/digits_hits/utils/include/G4ScoringCylinder.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4ScoringCylinder.hh,v 1.2 2008/03/23 14:32:12 akimura 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: $
    2929//
    3030
     
    5151      virtual void Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg=111);
    5252      virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap,
    53                               G4int idxProj, G4int idxColumn);
     53                          G4int idxProj, G4int idxColumn);
    5454
    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
    6457
    6558  void RegisterPrimitives(std::vector<G4VPrimitiveScorer *> & vps);
    6659
    67   // get 3D index (r,z,phi) from sequential index
     60  // get 3D index (z,phi,r) from sequential index
    6861  void GetRZPhi(G4int index, G4int q[3]) const;
    6962
    7063private:
    71   G4int fSegmentDirection; // =1: r, =2: phi, =3: z
     64  //enum IDX {IR, IZ, IPHI};
     65  enum IDX {IZ, IPHI, IR};
     66
    7267  G4LogicalVolume * fMeshElementLogical;
    7368 
  • trunk/source/digits_hits/utils/include/G4ScoringManager.hh

    r1337 r1340  
    2626//
    2727// $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: $
    2929//
    3030
  • trunk/source/digits_hits/utils/include/G4ScoringMessenger.hh

    r1337 r1340  
    2626//
    2727// $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: $
    2929//
    3030// (HISTORY)
  • trunk/source/digits_hits/utils/include/G4VScoreColorMap.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4VScoreColorMap.hh,v 1.5 2008/08/29 02:50:05 akimura 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: $
    2929//
    3030
     
    7070  // draw a color chart
    7171  virtual void DrawColorChart(G4int nPoint = 5);
     72
    7273  virtual void DrawColorChartBar(G4int nPoint);
     74
    7375  virtual void DrawColorChartText(G4int nPoint);
     76
     77
     78  void SetPSUnit(G4String & unit) {fPSUnit = unit;}
     79  void SetPSName(G4String & psName) {fPSName = psName;}
    7480
    7581  protected:
     
    7985      G4double fMaxVal;
    8086  G4VVisManager * fVisManager;
     87  G4String fPSUnit;
     88  G4String fPSName;
    8189};
    8290
  • trunk/source/digits_hits/utils/include/G4VScoreWriter.hh

    r1337 r1340  
    2626//
    2727// $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: $
    2929//
    3030
  • trunk/source/digits_hits/utils/include/G4VScoringMesh.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4VScoringMesh.hh,v 1.30 2010/06/14 13:28:17 gcosmo Exp $
    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: $
    2929//
    3030
     
    8787  virtual void Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg=111) = 0;
    8888  // draw a column of a quantity on a current viewer
    89   virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, 
    90                           G4int idxProj, G4int idxColumn) = 0;
     89  virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap,
     90                          G4int idxProj, G4int idxColumn) = 0;
    9191  // reset registered primitive scorers
    9292  void ResetScore();
     
    115115  // get number of segments of this mesh
    116116  void GetNumberOfSegments(G4int nSegment[3]);
    117   // set positions to segment this mesh
    118   inline void SetSegmentPositions(std::vector<G4double> & sp) {fSegmentPositions = sp;}
    119117
    120118  // register a primitive scorer to the MFD & set it to the current primitive scorer
     
    131129    else return false;
    132130  }
     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
    133145  // set current  primitive scorer to NULL
    134146  void SetNullToCurrentPrimitiveScorer() {fCurrentPS = NULL;}
     
    157169  G4RotationMatrix * fRotationMatrix;
    158170  G4int fNSegment[3];
    159   std::vector<G4double> fSegmentPositions;
    160171
    161172  std::map<G4String, G4THitsMap<G4double>* > fMap;
     
    167178  G4bool nMeshIsSet;
    168179
     180  G4String fDrawUnit;
     181  G4double fDrawUnitValue;
     182  G4String fDrawPSName;
     183
     184  G4String fDivisionAxisNames[3];
    169185};
    170186
     
    192208void G4VScoringMesh::DrawMesh(G4String psName,G4VScoreColorMap* colorMap,G4int axflg)
    193209{
     210  fDrawPSName = psName;
    194211  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  }
    199219}
    200220
    201221void G4VScoringMesh::DrawMesh(G4String psName,G4int idxPlane,G4int iColumn,G4VScoreColorMap* colorMap)
    202222{
     223  fDrawPSName = psName;
    203224  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  }
    208232}
    209233
  • 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//
    1312D
  • trunk/source/digits_hits/utils/src/G4DefaultLinearColorMap.cc

    r1337 r1340  
    2626//
    2727// $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: $
    2929//
    3030
  • trunk/source/digits_hits/utils/src/G4ScoreLogColorMap.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4ScoreLogColorMap.cc,v 1.3 2009/05/04 15:57:33 akimura Exp $
    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: $
    2929//
    3030
     
    5050{;}
    5151
     52#include "G4UIcommand.hh"
    5253void G4ScoreLogColorMap::GetMapColor(G4double val, G4double color[4])
    5354{
    5455  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
    5896  G4double logmin = 0., logmax = 0., logval = 0.;
    5997  if(lmin) logmin = std::log10(fMinVal);
     
    101139void G4ScoreLogColorMap::DrawColorChartBar(G4int _nPoint) {
    102140
     141  G4cout << "++++++ " << fMinVal << " - " << fMaxVal << G4endl;
    103142  G4bool lmin = true, lmax = true;
    104143  if(fMinVal <= 0.) lmin = false;
     
    118157    G4double val = std::pow(10., (ra*max+rb*min)/(ra+rb));
    119158    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;
    120161    G4Colour col(c[0], c[1], c[2]);
    121162    G4VisAttributes att(col);
     
    132173  G4double min = 0.;
    133174  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);
    136177
    137178  G4double max = 0.;
    138179  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);
    141182
    142183  G4double c[4];
     
    145186    G4double a = n/(_nPoint-1.), b = 1.-a;
    146187    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
    147193    // background color
    148194    for(int l = 0; l < 21; l++) {
     
    165211    G4double size = 12.;
    166212    text.SetScreenSize(size);
    167     this->GetMapColor(std::pow(10., v), c);
     213    //this->GetMapColor(std::pow(10., v), c);
    168214    G4Colour color(c[0], c[1], c[2]);
    169215    G4VisAttributes att(color);
     
    172218    fVisManager->Draw2D(text);
    173219  }
     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
    174271}
  • trunk/source/digits_hits/utils/src/G4ScoreQuantityMessenger.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4ScoreQuantityMessenger.cc,v 1.8 2007/11/07 04:12:07 akimura Exp $
    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: $
    2929//
     30// ---------------------------------------------------------------------
     31// Modifications
     32// 08-Oct-2010 T.Aso remove unit of G4PSPassageCellCurrent.
    3033// ---------------------------------------------------------------------
    3134
     
    5558#include "G4PSTrackCounter3D.hh"
    5659#include "G4PSTermination3D.hh"
     60#include "G4PSMinKinEAtGeneration3D.hh"
    5761
    5862#include "G4SDChargedFilter.hh"
     
    160164    delete         quantityDir;
    161165    delete         qTouchCmd;
     166    delete         qGetUnitCmd;
     167    delete         qSetUnitCmd;
     168
    162169    //
    163170    delete    qCellChgCmd;
     
    182189    delete          qTrackCountCmd;
    183190    delete          qTerminationCmd;
     191    delete          qMinKinEAtGeneCmd;
    184192    //
    185193    delete   filterDir;
     
    209217      if(command==qTouchCmd) {
    210218              mesh->SetCurrentPrimitiveScorer(newVal);
     219      } else if(command == qGetUnitCmd ){
     220          G4cout << "Unit:  "<< mesh->GetCurrentPSUnit() <<G4endl;
     221      } else if(command == qSetUnitCmd ){
     222          mesh->SetCurrentPSUnit(newVal);
    211223      } 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          }
    219229      } 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          }
    227235      } 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          }
    235241      } 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          }
    243247      } 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          }
    251253      } 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          }
    259258      } 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          }
    267263      } else if(command== qTrackLengthCmd) {
    268             if(!mesh->FindPrimitiveScorer(newVal)) {
     264          if ( CheckMeshPS(mesh,token[0]) ){
    269265              G4PSTrackLength3D* ps = new G4PSTrackLength3D(token[0]);
    270266              ps->Weighted(StoB(token[1]));
    271267              ps->MultiplyKineticEnergy(StoB(token[2]));
    272268              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          }
    279272      } else if(command== qPassCellCurrCmd){
    280             if(!mesh->FindPrimitiveScorer(newVal)) {
     273          if( CheckMeshPS(mesh,token[0]) ) {
    281274              G4PSPassageCellCurrent* ps = new G4PSPassageCellCurrent3D(token[0]);
    282275              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          }
    289279      } else if(command== qPassTrackLengthCmd){
    290             if(!mesh->FindPrimitiveScorer(newVal)) {
     280          if( CheckMeshPS(mesh,token[0]) ) {
    291281              G4PSPassageTrackLength* ps = new G4PSPassageTrackLength3D(token[0]);
    292282              ps->Weighted(StoB(token[1]));
    293283              mesh->SetPrimitiveScorer(ps);
    294             } else {
    295               G4cout << "WARNING[" << qPassTrackLengthCmd->GetCommandPath()
    296                      << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl;
    297               mesh->SetNullToCurrentPrimitiveScorer();
    298             }
     284          }
    299285      } else if(command== qFlatSurfCurrCmd){
    300             if(!mesh->FindPrimitiveScorer(newVal)) {
     286          if( CheckMeshPS(mesh,token[0])) {
    301287              G4PSFlatSurfaceCurrent3D* ps =
    302288                new G4PSFlatSurfaceCurrent3D(token[0],StoI(token[1]));
    303289              ps->Weighted(StoB(token[2]));
    304290              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          }
    311294      } 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] )) {
    322302//            G4PSSphereSurfaceCurrent3D* ps =
    323303//              new G4PSSphereSurfaceCurrent3D(token[0],StoI(token[1]));
    324304//            ps->Weighted(StoB(token[2]));
    325305//            ps->DivideByArea(StoB(token[3]));
     306//            ps->SetUnit(token[4]);
    326307//            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] ) ) {
    343317//            G4PSCylinderSurfaceCurrent3D* ps =
    344318//              new G4PSCylinderSurfaceCurrent3D(token[0],StoI(token[1]));
    345319//            ps->Weighted(StoB(token[2]));
    346320//            ps->DivideByArea(StoB(token[3]));
     321//            ps->SetUnit(token[4]);
    347322//            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//        }
    362330      } else if(command== qNofCollisionCmd){
    363             if(!mesh->FindPrimitiveScorer(newVal)) {
     331          if( CheckMeshPS(mesh,token[0])) {
    364332              G4PSNofCollision3D* ps =new G4PSNofCollision3D(token[0]);
    365333              ps->Weighted(StoB(token[1]));
    366334              mesh->SetPrimitiveScorer(ps);
    367             } else {
    368               G4cout << "WARNING[" << qNofCollisionCmd->GetCommandPath()
    369                      << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl;
    370               mesh->SetNullToCurrentPrimitiveScorer();
    371             }
     335          }
    372336      } else if(command== qPopulationCmd){
    373             if(!mesh->FindPrimitiveScorer(newVal)) {
     337          if( CheckMeshPS(mesh,token[0]) ) {
    374338              G4PSPopulation3D* ps =new G4PSPopulation3D(token[0]);
    375339              ps->Weighted(StoB(token[1]));
    376340              mesh->SetPrimitiveScorer(ps);
    377             } else {
    378               G4cout << "WARNING[" << qPopulationCmd->GetCommandPath()
    379                      << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl;
    380               mesh->SetNullToCurrentPrimitiveScorer();
    381             }
     341          }
    382342      } else if(command== qTrackCountCmd){
    383             if(!mesh->FindPrimitiveScorer(newVal)) {
     343          if( CheckMeshPS(mesh,token[0])) {
    384344              G4PSTrackCounter3D* ps =new G4PSTrackCounter3D(token[0],StoI(token[1]));
    385345              mesh->SetPrimitiveScorer(ps);
    386             } else {
    387               G4cout << "WARNING[" << qTrackCountCmd->GetCommandPath()
    388                      << "] : Quantity name, \"" << newVal << "\", is already existing." << G4endl;
    389               mesh->SetNullToCurrentPrimitiveScorer();
    390             }
     346          }
    391347      } else if(command== qTerminationCmd){
    392             if(!mesh->FindPrimitiveScorer(newVal)) {
     348          if( CheckMeshPS(mesh,token[0])) {
    393349              G4PSTermination3D* ps =new G4PSTermination3D(token[0]);
    394350              ps->Weighted(StoB(token[1]));
    395351              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          }
    401360
    402361            //
     
    488447    mesh->SetFilter(filter);
    489448}
    490  
     449
     450G4bool 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  
    2525//
    2626//
    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.
    3033// ---------------------------------------------------------------------
    3134
     
    8689  qTouchCmd->SetParameterName("qname",false);
    8790  //
    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);
    89100  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);
    93112  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);
    97124  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);
    101136  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);
    105148  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);
    109160  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);
    113168  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);
    115174  //
    116175  qTrackLengthCmd = new G4UIcommand("/score/quantity/trackLength",this);
    117176  qTrackLengthCmd->SetGuidance("Track length scorer.");
    118177  qTrackLengthCmd->
    119       SetGuidance("[usage] /score/quantiy/trackLength qname wflag kflag vflag ");
     178  SetGuidance("[usage] /score/quantiy/trackLength qname wflag kflag vflag unit");
    120179  qTrackLengthCmd->SetGuidance("  qname  :(String) scorer name");
    121180  qTrackLengthCmd->SetGuidance("  wflag  :(Bool) weighted");
    122181  qTrackLengthCmd->SetGuidance("  kflag  :(Bool) multiply kinetic energy");
    123182  qTrackLengthCmd->SetGuidance("  vflag  :(Bool) divide by velocity");
     183  qTrackLengthCmd->SetGuidance("  unit   :(String) unit");
    124184  param = new G4UIparameter("qname",'s',false);
    125185  qTrackLengthCmd->SetParameter(param);
     
    132192  param = new G4UIparameter("vflag",'b',true);
    133193  param->SetDefaultValue("false");
     194  qTrackLengthCmd->SetParameter(param);
     195  param = new G4UIparameter("unit",'s',true);
     196  param->SetDefaultValue("mm");
    134197  qTrackLengthCmd->SetParameter(param);
    135198  //
     
    137200  qPassCellCurrCmd->SetGuidance("Passage cell current scorer.");
    138201  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");
    140204  qPassCellCurrCmd->SetGuidance("  qname  :(String) scorer name");
    141205  qPassCellCurrCmd->SetGuidance("  wflag  :(Bool) weighted");
     206  //qPassCellCurrCmd->SetGuidance("  unit  :(Bool) unit");
    142207  param = new G4UIparameter("qname",'s',false);
    143208  qPassCellCurrCmd->SetParameter(param);
     
    145210  param->SetDefaultValue("true");
    146211  qPassCellCurrCmd->SetParameter(param);
     212  //param = new G4UIparameter("unit",'s',true);
     213  //param->SetDefaultValue("parcm2");
     214  //qPassCellCurrCmd->SetParameter(param);
    147215  //
    148216  qPassTrackLengthCmd = new G4UIcommand("/score/quantity/passageTrackLength",this);
    149217  qPassTrackLengthCmd->SetGuidance("Passage track length scorer.");
    150218  qPassTrackLengthCmd->
    151       SetGuidance("[usage] /score/quantiy/passageTrackLength qname wflag");
     219  SetGuidance("[usage] /score/quantiy/passageTrackLength qname wflag unit");
    152220  qPassTrackLengthCmd->SetGuidance("  qname  :(String) scorer name");
    153221  qPassTrackLengthCmd->SetGuidance("  wflag  :(Bool) weighted");
     222  qPassTrackLengthCmd->SetGuidance("  unit   :(Bool) unit");
    154223  param = new G4UIparameter("qname",'s',false);
    155224  qPassTrackLengthCmd->SetParameter(param);
    156225  param = new G4UIparameter("wflag",'b',true);
    157226  param->SetDefaultValue("true");
     227  qPassTrackLengthCmd->SetParameter(param);
     228  param = new G4UIparameter("unit",'s',true);
     229  param->SetDefaultValue("mm");
    158230  qPassTrackLengthCmd->SetParameter(param);
    159231  //
     
    161233  qFlatSurfCurrCmd->SetGuidance("Flat surface current Scorer.");
    162234  qFlatSurfCurrCmd->
    163       SetGuidance("[usage] /score/quantiy/flatSurfaceCurrent qname dflag wflag aflag");
     235  SetGuidance("[usage] /score/quantiy/flatSurfaceCurrent qname dflag wflag aflag unit");
    164236  qFlatSurfCurrCmd->SetGuidance("  qname  :(String) scorer name");
    165237  qFlatSurfCurrCmd->SetGuidance("  dflag  :(Int) direction flag");
     
    169241  qFlatSurfCurrCmd->SetGuidance("  wflag  :(Bool) weighted");
    170242  qFlatSurfCurrCmd->SetGuidance("  aflag  :(Bool) divide by area");
     243  qFlatSurfCurrCmd->SetGuidance("  unit   :(Bool) unit");
    171244  param = new G4UIparameter("qname",'s',false);
    172245  qFlatSurfCurrCmd->SetParameter(param);
     
    180253  param->SetDefaultValue("true");
    181254  qFlatSurfCurrCmd->SetParameter(param);
     255  param = new G4UIparameter("unit",'s',true);
     256  param->SetDefaultValue("percm2");
     257  qFlatSurfCurrCmd->SetParameter(param);
    182258  //
    183259  qFlatSurfFluxCmd = new G4UIcommand("/score/quantity/flatSurfaceFlux",this);
    184260  qFlatSurfFluxCmd->SetGuidance("Flat surface flux scorer.");
    185261  qFlatSurfFluxCmd->
    186       SetGuidance("[usage] /score/quantiy/flatSurfaceFlux qname dflag");
     262  SetGuidance("[usage] /score/quantiy/flatSurfaceFlux qname dflag unit");
    187263  qFlatSurfFluxCmd->SetGuidance("  qname  :(String) scorer name");
    188264  qFlatSurfFluxCmd->SetGuidance("  dflag  :(Int) direction flag");
     
    190266  qFlatSurfFluxCmd->SetGuidance("         : 1 = In only");
    191267  qFlatSurfFluxCmd->SetGuidance("         : 2 = Out only");
     268  qFlatSurfFluxCmd->SetGuidance("  unit   :(String) unit");
    192269  param = new G4UIparameter("qname",'s',false);
    193270  qFlatSurfFluxCmd->SetParameter(param);
     
    195272  param->SetDefaultValue("0");
    196273  qFlatSurfFluxCmd->SetParameter(param);
     274  param = new G4UIparameter("unit",'s',true);
     275  param->SetDefaultValue("percm2");
     276  qFlatSurfFluxCmd->SetParameter(param);
    197277  //
    198278//  qSphereSurfCurrCmd = new G4UIcommand("/score/quantity/sphereSurfaceCurrent",this);
    199279//  qSphereSurfCurrCmd->SetGuidance("Sphere surface current Scorer.");
    200280//  qSphereSurfCurrCmd->
    201 //      SetGuidance("[usage] /score/quantiy/sphereSurfaceCurrent qname dflag wflag aflag");
     281//      SetGuidance("[usage] /score/quantiy/sphereSurfaceCurrent qname dflag wflag aflag unit");
    202282//  qSphereSurfCurrCmd->SetGuidance("  qname  :(String) scorer name");
    203283//  qSphereSurfCurrCmd->SetGuidance("  dflag  :(Int) direction flag");
     
    207287//  qSphereSurfCurrCmd->SetGuidance("  wflag  :(Bool) Weighted");
    208288//  qSphereSurfCurrCmd->SetGuidance("  aflag  :(Bool) DivideByArea");
     289//  qSphereSurfCurrCmd->SetGuidance("  unit   :(String) unit");
    209290//  param = new G4UIparameter("qname",'s',false);
    210291//  qSphereSurfCurrCmd->SetParameter(param);
     
    218299//  param->SetDefaultValue("true");
    219300//  qSphereSurfCurrCmd->SetParameter(param);
     301//  param = new G4UIparameter("unit",'s',true);
     302//  param->SetDefaultValue("percm2");
     303//  qSphereSurfCurrCmd->SetParameter(param);
    220304
    221305  //
     
    223307//  qSphereSurfFluxCmd->SetGuidance("Sphere surface Flux Scorer.");
    224308//  qSphereSurfFluxCmd->
    225 //      SetGuidance("[usage] /score/quantiy/sphereSurfaceFlux qname dflag");
     309//  SetGuidance("[usage] /score/quantiy/sphereSurfaceFlux qname dflag unit");
    226310//  qSphereSurfFluxCmd->SetGuidance("  qname  :(String) scorer name");
    227311//  qSphereSurfFluxCmd->SetGuidance("  dflag  :(Int) direction flag");
     
    229313//  qSphereSurfFluxCmd->SetGuidance("         : 1 = In only");
    230314//  qSphereSurfFluxCmd->SetGuidance("         : 2 = Out only");
     315//  qSphereSurfFluxCmd->SetGuidance("  unit   :(String) unit");
    231316//  param = new G4UIparameter("qname",'s',false);
    232317//  qSphereSurfFluxCmd->SetParameter(param);
     
    234319//  param->SetDefaultValue("0");
    235320//  qSphereSurfFluxCmd->SetParameter(param);
     321//  param = new G4UIparameter("unit",'s',true);
     322//  param->SetDefaultValue("percm2");
     323//  qSphereSurfFluxCmd->SetParameter(param);
    236324
    237325  //
     
    239327//  qCylSurfCurrCmd->SetGuidance("Cylinder surface current Scorer.");
    240328//  qCylSurfCurrCmd->
    241 //      SetGuidance("[usage] /score/quantiy/cylinderSurfaceCurrent qname dflag wflag aflag");
     329//  SetGuidance("[usage] /score/quantiy/cylinderSurfaceCurrent qname dflag wflag aflag unit");
    242330//  qCylSurfCurrCmd->SetGuidance("  qname  :(String) scorer name");
    243331//  qCylSurfCurrCmd->SetGuidance("  dflag  :(Int) direction flag");
     
    247335//  qCylSurfCurrCmd->SetGuidance("  wflag  :(Bool) Weighted");
    248336//  qCylSurfCurrCmd->SetGuidance("  aflag  :(Bool) DivideByArea");
     337//  qCylSurfCurrCmd->SetGuidance("  unit   :(String) unit");
    249338//  param = new G4UIparameter("qname",'s',false);
    250339//  qCylSurfCurrCmd->SetParameter(param);
     
    258347//  param->SetDefaultValue("true");
    259348//  qCylSurfCurrCmd->SetParameter(param);
     349//  param = new G4UIparameter("unit",'s',true);
     350//  param->SetDefaultValue("percm2");
     351//  qCylSurfCurrCmd->SetParameter(param);
    260352  //
    261353//  qCylSurfFluxCmd = new G4UIcommand("/score/quantity/cylinderSurfaceFlux",this);
    262354//  qCylSurfFluxCmd->SetGuidance("Cylinder surface Flux Scorer.");
    263355//  qCylSurfFluxCmd->
    264 //      SetGuidance("[usage] /score/quantiy/cylinderSurfaceFlux qname dflag");
     356//  SetGuidance("[usage] /score/quantiy/cylinderSurfaceFlux qname dflag unit");
    265357//  qCylSurfFluxCmd->SetGuidance("  qname  :(String) scorer name");
    266358//  qCylSurfFluxCmd->SetGuidance("  dflag  :(Int) direction flag");
     
    268360//  qCylSurfFluxCmd->SetGuidance("         : 1 = In only");
    269361//  qCylSurfFluxCmd->SetGuidance("         : 2 = Out only");
     362//  qCylSurfFluxCmd->SetGuidance("  unit   :(String) unit");
    270363//  param = new G4UIparameter("qname",'s',false);
    271364//  qCylSurfFluxCmd->SetParameter(param);
     
    273366//  param->SetDefaultValue("0");
    274367//  qCylSurfFluxCmd->SetParameter(param);
     368//  param = new G4UIparameter("unit",'s',true);
     369//  param->SetDefaultValue("percm2");
     370//  qCylSurfFluxCmd->SetParameter(param);
     371//
    275372  //
    276373  qNofCollisionCmd = new G4UIcommand("/score/quantity/nOfCollision",this);
    277374  qNofCollisionCmd->SetGuidance("Number of collision scorer.");
    278375  qNofCollisionCmd->
    279       SetGuidance("[usage] /score/quantiy/nOfCollision qname wflag");
     376  SetGuidance("[usage] /score/quantiy/nOfCollision qname wflag");
    280377  qNofCollisionCmd->SetGuidance("  qname  :(String) scorer name");
    281   qNofCollisionCmd->SetGuidance("  wflag  :(Bool) weighted");
    282378  param = new G4UIparameter("qname",'s',false);
    283379  qNofCollisionCmd->SetParameter(param);
     
    289385  qPopulationCmd->SetGuidance("Population scorer.");
    290386  qPopulationCmd->
    291       SetGuidance("[usage] /score/quantiy/population qname wflag");
     387   SetGuidance("[usage] /score/quantiy/population qname wflag");
    292388  qPopulationCmd->SetGuidance("  qname  :(String) scorer name");
    293389  qPopulationCmd->SetGuidance("  wflag  :(Bool) weighted");
     
    302398  qTrackCountCmd->SetGuidance("Number of track scorer.");
    303399  qTrackCountCmd->
    304       SetGuidance("[usage] /score/quantiy/nOfTrack qname dflag wflag");
     400  SetGuidance("[usage] /score/quantiy/nOfTrack qname dflag wflag");
    305401  qTrackCountCmd->SetGuidance("  qname  :(String) scorer name");
    306402  qTrackCountCmd->SetGuidance("  dflag  :(Int) direction");
     
    330426  param->SetDefaultValue("false");
    331427  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);
    332437}
    333438
  • trunk/source/digits_hits/utils/src/G4ScoringBox.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4ScoringBox.cc,v 1.54 2008/08/29 02:50:05 akimura 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: $
    2929//
    3030
     
    3737#include "G4PVReplica.hh"
    3838#include "G4PVDivision.hh"
    39 #include "G4PVParameterised.hh"
    4039#include "G4VisAttributes.hh"
    41 #include "G4ScoringBoxParameterisation.hh"
    4240#include "G4VVisManager.hh"
    4341#include "G4VScoreColorMap.hh"
     
    5755{
    5856  fShape = boxMesh;
     57  fDivisionAxisNames[0] = "X";
     58  fDivisionAxisNames[1] = "Y";
     59  fDivisionAxisNames[2] = "Z";
    5960}
    6061
     
    186187                                      fSize[2]/fNSegment[2]);
    187188  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,
    219195                      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) {
    228203    if(verboseLevel > 9) G4cout << "G4ScoringBox::Construct() : Placement" << G4endl;
    229204    new G4PVPlacement(0, G4ThreeVector(0.,0.,0.), fMeshElementLogical, elementName, layerLogical[1], false, 0);
     
    292267    for(int x = 0; x < fNSegment[0]; x++) xzcell.push_back(ez);
    293268
     269    // search max. & min. values in each slice
    294270    G4double xymin = DBL_MAX, yzmin = DBL_MAX, xzmin = DBL_MAX;
    295271    G4double xymax = 0., yzmax = 0., xzmax = 0.;
     
    299275      GetXYZ(itr->first, q);
    300276
    301       xycell[q[0]][q[1]] += *(itr->second);
     277      xycell[q[0]][q[1]] += *(itr->second)/fDrawUnitValue;
    302278      if(xymin > xycell[q[0]][q[1]]) xymin = xycell[q[0]][q[1]];
    303279      if(xymax < xycell[q[0]][q[1]]) xymax = xycell[q[0]][q[1]];
    304280
    305       yzcell[q[1]][q[2]] += *(itr->second);
     281      yzcell[q[1]][q[2]] += *(itr->second)/fDrawUnitValue;
    306282      if(yzmin > yzcell[q[1]][q[2]]) yzmin = yzcell[q[1]][q[2]];
    307283      if(yzmax < yzcell[q[1]][q[2]]) yzmax = yzcell[q[1]][q[2]];
    308284
    309       xzcell[q[0]][q[2]] += *(itr->second);
     285      xzcell[q[0]][q[2]] += *(itr->second)/fDrawUnitValue;
    310286      if(xzmin > xzcell[q[0]][q[2]]) xzmin = xzcell[q[0]][q[2]];
    311287      if(xzmax < xzcell[q[0]][q[2]]) xzmax = xzcell[q[0]][q[2]];
     
    404380    }
    405381  }
     382  colorMap->SetPSUnit(fDrawUnit);
     383  colorMap->SetPSName(fDrawPSName);
    406384  colorMap->DrawColorChart();
    407385}
     
    429407}
    430408
    431 void G4ScoringBox::DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, 
    432                           G4int idxProj, G4int idxColumn)
     409void G4ScoringBox::DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap,
     410                              G4int idxProj, G4int idxColumn)
    433411{
    434412  if(idxColumn<0 || idxColumn>=fNSegment[idxProj])
     
    460438    for(int x = 0; x < fNSegment[0]; x++) xzcell.push_back(ez);
    461439
     440    // search max. & min. values in each slice
    462441    G4double xymax = 0., yzmax = 0., xzmax = 0.;
    463442    G4int q[3];
     
    467446
    468447      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;
    470449        if(xymax < xycell[q[0]][q[1]]) xymax = xycell[q[0]][q[1]];
    471450      }
    472451      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;
    474453        if(yzmax < yzcell[q[1]][q[2]]) yzmax = yzcell[q[1]][q[2]];
    475454      }
    476455      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;
    478457        if(xzmax < xzcell[q[0]][q[2]]) xzmax = xzcell[q[0]][q[2]];
    479458      }
     
    552531  }
    553532
     533  colorMap->SetPSUnit(fDrawUnit);
     534  colorMap->SetPSName(fDrawPSName);
    554535  colorMap->DrawColorChart();
    555536}
  • trunk/source/digits_hits/utils/src/G4ScoringCylinder.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4ScoringCylinder.cc,v 1.6 2008/08/29 02:50:05 akimura 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: $
    2929//
    3030
     
    3838#include "G4PVReplica.hh"
    3939#include "G4PVDivision.hh"
    40 #include "G4PVParameterised.hh"
    4140#include "G4VisAttributes.hh"
    42 //#include "G4ScoringCylinderParameterisation.hh"
    4341#include "G4VVisManager.hh"
    4442#include "G4VScoreColorMap.hh"
     
    5553
    5654G4ScoringCylinder::G4ScoringCylinder(G4String wName)
    57   :G4VScoringMesh(wName), fSegmentDirection(-1),
    58    fMeshElementLogical(0)
     55  :G4VScoringMesh(wName), fMeshElementLogical(0)
    5956{
    6057  fShape = cylinderMesh;
     58
     59  fDivisionAxisNames[0] = "Z";
     60  fDivisionAxisNames[1] = "PHI";
     61  fDivisionAxisNames[2] = "R";
    6162}
    6263
    6364G4ScoringCylinder::~G4ScoringCylinder()
    64 {
    65 }
     65{;}
    6666
    6767void G4ScoringCylinder::Construct(G4VPhysicalVolume* fWorldPhys)
     
    9191  // Scoring Mesh
    9292  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;
    9696  G4VSolid * tubsSolid = new G4Tubs(tubsName+"0", // name
    9797                                    0.,           // R min
    9898                                    fSize[0],     // R max
    99                                     fSize[1],     // dZ
     99                                    fSize[1],     // Dz
    100100                                    0.,           // starting phi
    101                                     twopi*rad);   // segment phi
     101                                    twopi*rad);   // segment phi
    102102  G4LogicalVolume *  tubsLogical = new G4LogicalVolume(tubsSolid, 0, tubsName);
    103103  new G4PVPlacement(fRotationMatrix, fCenterPosition,
    104104                    tubsLogical, tubsName+"0", worldLogical, false, 0);
    105105
     106  if(verboseLevel > 9) G4cout << " # of segments : r, phi, z =: "
     107         << fNSegment[IR] << ", " << fNSegment[IPHI] << ", " << fNSegment[IZ] << G4endl;
    106108
    107109  G4String layerName[2] = {tubsName + "1",  tubsName + "2"};
     
    109111  G4LogicalVolume * layerLogical[2];
    110112
    111   //-- fisrt nested layer (replicated along r direction)
     113  //-- fisrt nested layer (replicated along z direction)
    112114  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
    118121  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) {
    124125      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]);
    127127    } else {
    128128      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) {
    133132    if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Placement" << G4endl;
    134133    new G4PVPlacement(0, G4ThreeVector(0.,0.,0.), layerLogical[0], layerName[0], tubsLogical, false, 0);
    135134  } else {
    136135    G4cerr << "G4ScoringCylinder::SetupGeometry() : invalid parameter ("
    137            << fNSegment[0] << ") "
     136           << fNSegment[IZ] << ") "
    138137           << "in placement of the first nested layer." << G4endl;
    139138  }
    140139
    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)
    151141  if(verboseLevel > 9) G4cout << "layer 2 :" << G4endl;
    152142  layerSolid[1] = new G4Tubs(layerName[1],
    153143                             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]);
    157148  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) {
    163152      if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Replica" << G4endl;
    164       new G4PVReplica(layerName[1], layerLogical[1], layerLogical[0], kZAxis,
    165                       fNSegment[1], width);
     153      new G4PVReplica(layerName[1], layerLogical[1], layerLogical[0], kPhi,
     154                      fNSegment[IPHI], twopi*rad/fNSegment[IPHI]);
    166155    } else {
    167156      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) {
    172160    if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Placement" << G4endl;
    173161    new G4PVPlacement(0, G4ThreeVector(0.,0.,0.), layerLogical[1], layerName[1], layerLogical[0], false, 0);
    174162  } else
    175163    G4cerr << "ERROR : G4ScoringCylinder::SetupGeometry() : invalid parameter ("
    176            << fNSegment[1] << ") "
     164           << fNSegment[IPHI] << ") "
    177165           << "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 
    187166
    188167  // mesh elements
     
    191170  G4VSolid * elementSolid = new G4Tubs(elementName,
    192171                                       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]);
    196176  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) {
    221182      if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Replica" << G4endl;
    222       new G4PVReplica(elementName, fMeshElementLogical, layerLogical[1], kPhi,
    223                         fNSegment[2], angle, 0.);
     183      new G4PVReplica(elementName, fMeshElementLogical, layerLogical[1], kRho,
     184                        fNSegment[IR], fSize[0]/fNSegment[IR]);
    224185    } else {
    225186      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) {
    231190    if(verboseLevel > 9) G4cout << "G4ScoringCylinder::Construct() : Placement" << G4endl;
    232191    new G4PVPlacement(0, G4ThreeVector(0.,0.,0.), fMeshElementLogical, elementName, layerLogical[1], false, 0);
    233192  } else {
    234193    G4cerr << "G4ScoringCylinder::SetupGeometry() : "
    235            << "invalid parameter (" << fNSegment[2] << ") "
     194           << "invalid parameter (" << fNSegment[IR] << ") "
    236195           << "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;
    244196  }
    245197
     
    249201
    250202  // vis. attributes
    251   G4VisAttributes * visatt = new G4VisAttributes(G4Colour(.5,.5,.5,0.1));
     203  G4VisAttributes * visatt = new G4VisAttributes(G4Colour(.5,.5,.5));
    252204  visatt->SetVisibility(true);
    253   //layerLogical[0]->SetVisAttributes(visatt);
    254   //layerLogical[1]->SetVisAttributes(visatt);
     205  layerLogical[0]->SetVisAttributes(visatt);
     206  layerLogical[1]->SetVisAttributes(visatt);
    255207  visatt = new G4VisAttributes(G4Colour(.5,.5,.5,0.01));
    256208  //visatt->SetForceSolid(true);
     
    272224void G4ScoringCylinder::Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg) {
    273225
    274 
    275226  G4VVisManager * pVisManager = G4VVisManager::GetConcreteInstance();
    276227  if(pVisManager) {
    277228   
    278229    // cell vectors
    279     std::vector<std::vector<std::vector<double> > > cell; // cell[R][Z][PHI]
    280230    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    //-
    291233    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    //-
    294236    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);
    296238
    297239    // 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.;
    300242    G4int q[3];
    301243    std::map<G4int, G4double*>::iterator itr = map->begin();
    302244    for(; itr != map->end(); itr++) {
     245      if(itr->first < 0) {
     246        G4cout << itr->first << G4endl;
     247        continue;
     248      }
    303249      GetRZPhi(itr->first, q);
    304250
    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]];
    316259    } 
    317260   
     
    330273      if(colorMap->IfFloatMinMax()) { colorMap->SetMinMax(zphimin, zphimax); }
    331274
    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));
    348287          G4Transform3D trans;
    349288          if(fRotationMatrix) {
     
    356295          colorMap->GetMapColor(zphicell[z][phi], c);
    357296          att.SetColour(c[0], c[1], c[2]);//, c[3]);
    358           /*
    359           G4cout << "   " << c[0] << ", "
    360                  << c[1] << ", " << c[2] << G4endl;
    361           */
     297          //-
    362298          pVisManager->Draw(cylinder, att, trans);
    363299        }
     
    369305      if(colorMap->IfFloatMinMax()) { colorMap->SetMinMax(rphimin, rphimax); }
    370306
    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++) {
    374310
    375311          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];
    378314          G4Tubs cylinder("z-phi", rs[0], rs[1], 0.001,
    379315                          angle, dphi*0.99999);
     
    409345      }
    410346    }
     347
     348    colorMap->SetPSUnit(fDrawUnit);
     349    colorMap->SetPSName(fDrawPSName);
    411350    colorMap->DrawColorChart();
     351
    412352  }
    413353}
     
    416356                                   G4int idxProj, G4int idxColumn)
    417357{
    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])
    420372  {
    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 <<
    422374    "]. Method ignored." << G4endl;
    423375    return;
     
    425377  G4VVisManager * pVisManager = G4VVisManager::GetConcreteInstance();
    426378  if(pVisManager) {
    427    
     379
    428380    // cell vectors
    429381    std::vector<std::vector<std::vector<double> > > cell; // cell[R][Z][PHI]
    430382    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.);
    432384    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);
    435387
    436388    std::vector<std::vector<double> > rzcell; // rzcell[R][Z]
    437389    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);
    440392
    441393    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);
    443395
    444396    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);
    446398
    447399    // search max. values
     
    450402    std::map<G4int, G4double*>::iterator itr = map->begin();
    451403    for(; itr != map->end(); itr++) {
     404      if(itr->first < 0) {
     405        G4cout << itr->first << G4endl;
     406        continue;
     407      }
    452408      GetRZPhi(itr->first, q);
    453409
    454       if(idxProj == 0 && q[0] == idxColumn) { // zphi plane
    455         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 plane
    459         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 plane
    463         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]];
    465421      }
    466422    } 
     
    472428
    473429    G4Scale3D scale;
    474     // r-phi plane
    475     if(idxProj == 0) {
     430    // z-phi plane
     431    if(projAxis == IR) {
    476432      if(colorMap->IfFloatMinMax()) { colorMap->SetMinMax(0.,zphimax); }
    477433
    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;
    486442          G4Tubs cylinder("z-phi", rsize[0], rsize[1], zhalf,
    487443                          angle, dphi*0.99999);
    488444
    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));
    490446          G4Transform3D trans;
    491447          if(fRotationMatrix) {
     
    503459
    504460      // r-phi plane
    505     } else if(idxProj == 1) {
     461    } else if(projAxis == IZ) {
    506462      if(colorMap->IfFloatMinMax()) { colorMap->SetMinMax(0.,rphimax); }
    507463
    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++) {
    511467
    512468          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;
    516472          G4Tubs cylinder("r-phi", rs[0], rs[1], dz,
    517473                          angle, dphi*0.99999);
    518474          G4ThreeVector zpos(0., 0.,
    519                              -fSize[1]+fSize[1]/fNSegment[1]*(idxColumn*2+1));
     475                             -fSize[1]+fSize[1]/fNSegment[IZ]*(idxColumn*2+1));
    520476          G4Transform3D trans;
    521477          if(fRotationMatrix) {
     
    533489
    534490      // r-z plane
    535     } else if(idxProj == 2) {
     491    } else if(projAxis == IPHI) {
    536492      if(colorMap->IfFloatMinMax()) { colorMap->SetMinMax(0.,rzmax); }
    537493
    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++) {
    544500
    545501          G4double rs[2] = {rsize*r, rsize*(r+1)};
     
    548504
    549505          G4ThreeVector zpos(0., 0.,
    550                              -fSize[1]+fSize[1]/fNSegment[1]*(2.*z+1));
     506                             -fSize[1]+fSize[1]/fNSegment[IZ]*(2.*z+1));
    551507          G4Transform3D trans;
    552508          if(fRotationMatrix) {
     
    565521  }
    566522
     523  colorMap->SetPSUnit(fDrawUnit);
     524  colorMap->SetPSName(fDrawPSName);
    567525  colorMap->DrawColorChart();
    568526
     
    570528
    571529void 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  
    2525//
    2626//
    27 // $Id: G4ScoringManager.cc,v 1.31 2008/03/25 02:18:38 akimura Exp $
    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: $
    2929//
    3030
     
    4040G4ScoringManager* G4ScoringManager::fSManager = 0;
    4141
    42 G4int G4ScoringManager::replicaLevel = 2;
     42G4int G4ScoringManager::replicaLevel = 3;
    4343
    4444G4ScoringManager* G4ScoringManager::GetScoringManager()
  • trunk/source/digits_hits/utils/src/G4ScoringMessenger.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4ScoringMessenger.cc,v 1.39 2008/11/26 21:27:35 asaim Exp $
    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: $
    2929//
    3030// ---------------------------------------------------------------------
     
    185185  drawCmd->SetGuidance("Draw projection(s) of scored quantities.");
    186186  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");
    188189  param = new G4UIparameter("meshName",'s',false);
    189190  drawCmd->SetParameter(param);
     
    200201  drawColumnCmd = new G4UIcommand("/score/drawColumn",this);
    201202  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");
    203205  param = new G4UIparameter("meshName",'s',false);
    204206  drawColumnCmd->SetParameter(param);
     
    235237  colorMapMinMaxCmd->SetParameter(param);
    236238
     239  /*
    237240  chartCmd = new G4UIcommand("/score/drawChart",this);
    238241  chartCmd->SetGuidance("Draw color chart on the screen.");
     
    252255  param->SetDefaultValue("linear");
    253256  chartCmd->SetParameter(param);
    254  
     257  */
     258
    255259  // Dump a scored quantity
    256260  dumpQtyToFileCmd = new G4UIcommand("/score/dumpQuantityToFile", this);
     
    541545    G4int Nk = StoI(token[2]);
    542546    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    }
    546561    //
    547562    mesh->SetNumberOfSegments(nSegment);
  • trunk/source/digits_hits/utils/src/G4VScoreColorMap.cc

    r1337 r1340  
    2525//
    2626//
    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: $
    2929//
    3030
     
    8080}
    8181void G4VScoreColorMap::DrawColorChartText(G4int _nPoint) {
     82
    8283  G4double min = this->GetMin();
    8384  G4double max = this->GetMax();
     
    115116    fVisManager->Draw2D(text);
    116117  }
     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
    117166}
  • trunk/source/digits_hits/utils/src/G4VScoreWriter.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4VScoreWriter.cc,v 1.5 2008/03/04 23:19:09 taso Exp $
    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: $
    2929//
    3030
     
    8787    return;
    8888  }
     89
     90
    8991  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;
    91107
    92108  // "sequence" option: write header info
     
    111127          ofile << 0.;
    112128        } else {
    113           ofile << *(value->second);
     129          ofile << *(value->second)/unitValue;
    114130        }
    115131
     
    160176  std::map<G4int, G4double*> * score;
    161177  for(; msMapItr != fSMap.end(); msMapItr++) {
     178
     179    G4String psname = msMapItr->first;
     180
    162181    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
    164197
    165198    // "sequence" option: write header info
     
    184217            ofile << 0.;
    185218          } else {
    186             ofile << *(value->second);
     219            ofile << *(value->second)/unitValue;
    187220          }
    188221
  • trunk/source/digits_hits/utils/src/G4VScoringMesh.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4VScoringMesh.cc,v 1.37 2009/10/12 04:11:25 akimura 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: $
    2929//
    3030
     
    3939  : fWorldName(wName),fConstructed(false),fActive(true),
    4040    fRotationMatrix(NULL), fMFD(new G4MultiFunctionalDetector(wName)),
    41     verboseLevel(0),sizeIsSet(false),nMeshIsSet(false)
     41    verboseLevel(0),sizeIsSet(false),nMeshIsSet(false),
     42    fDrawUnit(""), fDrawUnitValue(1.)
    4243{
    4344  G4SDManager::GetSDMpointer()->AddNewDetector(fMFD);
     
    4546  fSize[0] = fSize[1] = fSize[2] = 0.;
    4647  fNSegment[0] = fNSegment[1] = fNSegment[2] = 1;
     48  fDivisionAxisNames[0] = fDivisionAxisNames[1] = fDivisionAxisNames[2] = "";
    4749}
    4850
     
    150152  if(itr == fMap.end()) return false;
    151153  return true;
     154}
     155
     156G4String 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
     165G4String 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
     177void  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
     187G4double 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
     196void G4VScoringMesh::GetDivisionAxisNames(G4String divisionAxisNames[3]) {
     197  for(int i = 0; i < 3; i++) divisionAxisNames[i] = fDivisionAxisNames[i];
    152198}
    153199
  • trunk/source/digits_hits/utils/test/test1/src/Tst1PhysicsList.cc

    r1316 r1340  
    2525//
    2626//
    27 // $Id: Tst1PhysicsList.cc,v 1.1 2007/07/13 05:55:34 asaim Exp $
     27// $Id: Tst1PhysicsList.cc,v 1.2 2010/07/21 02:51:58 akimura Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    120120#include "G4PhotoElectricEffect.hh"
    121121
    122 #include "G4MultipleScattering.hh"
    123 
     122#include "G4eMultipleScattering.hh"
    124123#include "G4eIonisation.hh"
    125124#include "G4eBremsstrahlung.hh"
    126125#include "G4eplusAnnihilation.hh"
    127126
     127#include "G4MuMultipleScattering.hh"
    128128#include "G4MuIonisation.hh"
    129129#include "G4MuBremsstrahlung.hh"
    130130#include "G4MuPairProduction.hh"
    131131
     132#include "G4hMultipleScattering.hh"
    132133#include "G4hIonisation.hh"
    133134
     
    149150    } else if (particleName == "e-") {
    150151    //electron
    151       G4MultipleScattering* theeminusMultipleScattering = new G4MultipleScattering();
     152      G4eMultipleScattering* theeminusMultipleScattering = new G4eMultipleScattering();
    152153      theeminusMultipleScattering->SetLateralDisplasmentFlag(displacementFlg);
    153154      G4VProcess* theeminusIonisation         = new G4eIonisation();
     
    171172    } else if (particleName == "e+") {
    172173    //positron
    173       G4MultipleScattering* theeplusMultipleScattering = new G4MultipleScattering();
     174      G4eMultipleScattering* theeplusMultipleScattering = new G4eMultipleScattering();
    174175      theeplusMultipleScattering->SetLateralDisplasmentFlag(displacementFlg);
    175176      G4VProcess* theeplusIonisation         = new G4eIonisation();
     
    200201               particleName == "mu-"    ) {
    201202    //muon 
    202       G4MultipleScattering* aMultipleScattering = new G4MultipleScattering();
     203      G4MuMultipleScattering* aMultipleScattering = new G4MuMultipleScattering();
    203204      aMultipleScattering->SetLateralDisplasmentFlag(displacementFlg);
    204205      G4VProcess* aBremsstrahlung     = new G4MuBremsstrahlung();
     
    229230               (particle->GetParticleName() != "chargedgeantino")) {
    230231     // all others charged particles except geantino     
    231      G4MultipleScattering* aMultipleScattering = new G4MultipleScattering();
     232     G4hMultipleScattering* aMultipleScattering = new G4hMultipleScattering();
    232233     aMultipleScattering->SetLateralDisplasmentFlag(displacementFlg);
    233234     G4VProcess* anIonisation        = new G4hIonisation();
  • trunk/source/digits_hits/utils/test/test1/test8.mac

    r1316 r1340  
    77#
    88/score/mesh/cylinderSize 1. 1. m
     9/score/mesh/translate/xyz 0. 0. 0. cm
     10#
    911/score/mesh/nBin 30 30 30
    1012#
     
    2931/score/drawProjection cylinderMesh_1 nOfStepPSgamma ! 10
    3032/score/drawProjection cylinderMesh_1 nOfStepPSgamma logColorMap 101
     33/score/drawProjection cylinderMesh_1 eDepPS logColorMap 101
    3134#
  • trunk/source/digits_hits/utils/test/test1/vis.mac

    r1316 r1340  
    1212#
    1313/vis/drawVolume worlds
     14/vis/viewer/set/lightsThetaPhi 120 135                 
    1415/vis/viewer/set/viewpointThetaPhi 105 165 deg
    1516# Set specific colur for identification
Note: See TracChangeset for help on using the changeset viewer.