#include <G4PSEnergyDeposit.hh>
Inheritance diagram for G4PSEnergyDeposit:
Public Member Functions | |
G4PSEnergyDeposit (G4String name, G4int depth=0) | |
G4PSEnergyDeposit (G4String name, const G4String &unit, G4int depth=0) | |
virtual | ~G4PSEnergyDeposit () |
virtual void | Initialize (G4HCofThisEvent *) |
virtual void | EndOfEvent (G4HCofThisEvent *) |
virtual void | clear () |
virtual void | DrawAll () |
virtual void | PrintAll () |
virtual void | SetUnit (const G4String &unit) |
Protected Member Functions | |
virtual G4bool | ProcessHits (G4Step *, G4TouchableHistory *) |
Definition at line 45 of file G4PSEnergyDeposit.hh.
Definition at line 41 of file G4PSEnergyDeposit.cc.
References SetUnit().
00042 :G4VPrimitiveScorer(name,depth),HCID(-1) 00043 { 00044 SetUnit("MeV"); 00045 }
Definition at line 47 of file G4PSEnergyDeposit.cc.
References SetUnit().
00049 :G4VPrimitiveScorer(name,depth),HCID(-1) 00050 { 00051 SetUnit(unit); 00052 }
G4PSEnergyDeposit::~G4PSEnergyDeposit | ( | ) | [virtual] |
void G4PSEnergyDeposit::clear | ( | ) | [virtual] |
void G4PSEnergyDeposit::DrawAll | ( | ) | [virtual] |
void G4PSEnergyDeposit::EndOfEvent | ( | G4HCofThisEvent * | ) | [virtual] |
void G4PSEnergyDeposit::Initialize | ( | G4HCofThisEvent * | ) | [virtual] |
Reimplemented from G4VPrimitiveScorer.
Definition at line 67 of file G4PSEnergyDeposit.cc.
References G4HCofThisEvent::AddHitsCollection(), G4VPrimitiveScorer::GetCollectionID(), G4VPrimitiveScorer::GetMultiFunctionalDetector(), G4VPrimitiveScorer::GetName(), and G4VSensitiveDetector::GetName().
00068 { 00069 EvtMap = new G4THitsMap<G4double>(GetMultiFunctionalDetector()->GetName(), 00070 GetName()); 00071 if(HCID < 0) {HCID = GetCollectionID(0);} 00072 HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap); 00073 }
void G4PSEnergyDeposit::PrintAll | ( | ) | [virtual] |
Reimplemented from G4VPrimitiveScorer.
Definition at line 86 of file G4PSEnergyDeposit.cc.
References G4VPrimitiveScorer::detector, G4cout, G4endl, G4VPrimitiveScorer::GetName(), G4VSensitiveDetector::GetName(), G4VPrimitiveScorer::GetUnit(), and G4VPrimitiveScorer::GetUnitValue().
00087 { 00088 G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl; 00089 G4cout << " PrimitiveScorer " << GetName() << G4endl; 00090 G4cout << " Number of entries " << EvtMap->entries() << G4endl; 00091 std::map<G4int,G4double*>::iterator itr = EvtMap->GetMap()->begin(); 00092 for(; itr != EvtMap->GetMap()->end(); itr++) { 00093 G4cout << " copy no.: " << itr->first 00094 << " energy deposit: " 00095 << *(itr->second)/GetUnitValue() 00096 << " [" << GetUnit()<<"]" 00097 << G4endl; 00098 } 00099 }
G4bool G4PSEnergyDeposit::ProcessHits | ( | G4Step * | , | |
G4TouchableHistory * | ||||
) | [protected, virtual] |
Implements G4VPrimitiveScorer.
Definition at line 57 of file G4PSEnergyDeposit.cc.
References FALSE, G4VPrimitiveScorer::GetIndex(), G4Step::GetPreStepPoint(), G4Step::GetTotalEnergyDeposit(), G4StepPoint::GetWeight(), and TRUE.
00058 { 00059 G4double edep = aStep->GetTotalEnergyDeposit(); 00060 if ( edep == 0. ) return FALSE; 00061 edep *= aStep->GetPreStepPoint()->GetWeight(); // (Particle Weight) 00062 G4int index = GetIndex(aStep); 00063 EvtMap->add(index,edep); 00064 return TRUE; 00065 }
void G4PSEnergyDeposit::SetUnit | ( | const G4String & | unit | ) | [virtual] |
Reimplemented from G4VPrimitiveScorer.
Definition at line 101 of file G4PSEnergyDeposit.cc.
References G4VPrimitiveScorer::CheckAndSetUnit().
Referenced by G4PSEnergyDeposit(), G4PSEnergyDeposit3D::G4PSEnergyDeposit3D(), and G4ScoreQuantityMessenger::SetNewValue().
00102 { 00103 CheckAndSetUnit(unit,"Energy"); 00104 }