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

update ti head

Location:
trunk/source/digits_hits/scorer
Files:
82 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.