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

update ti head

File:
1 edited

Legend:

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