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