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