Geant4
10.03
|
This is a primitive scorer class for molecular species. More...
#include <ScoreSpecies.hh>
Classes | |
struct | SpeciesInfo |
Public Member Functions | |
ScoreSpecies (G4String name, G4int depth=0) | |
virtual | ~ScoreSpecies () |
void | AddTimeToRecord (double time) |
Add a time at which the number of species should be recorded. More... | |
void | ClearTimeToRecord () |
Remove all times to record, must be reset by user. More... | |
int | GetNumberOfRecordedEvents () const |
Get number of recorded events. More... | |
void | ASCII () |
Write results to an text file. More... | |
void | WriteWithAnalysisManager (G4VAnalysisManager *) |
Write results to whatever chosen file format. More... | |
virtual void | Initialize (G4HCofThisEvent *) |
virtual void | EndOfEvent (G4HCofThisEvent *) |
virtual void | clear () |
virtual void | DrawAll () |
virtual void | PrintAll () |
virtual void | AbsorbResultsFromWorkerScorer (G4VPrimitiveScorer *) |
Method used in multithreading mode in order to merge the results. More... | |
virtual void | OutputAndClear () |
SpeciesMap | GetSpeciesInfo () |
![]() | |
G4VPrimitiveScorer (G4String name, G4int depth=0) | |
virtual | ~G4VPrimitiveScorer () |
G4int | GetCollectionID (G4int) |
void | SetUnit (const G4String &unit) |
const G4String & | GetUnit () const |
G4double | GetUnitValue () const |
void | SetMultiFunctionalDetector (G4MultiFunctionalDetector *d) |
G4MultiFunctionalDetector * | GetMultiFunctionalDetector () const |
G4String | GetName () const |
void | SetFilter (G4VSDFilter *f) |
G4VSDFilter * | GetFilter () const |
void | SetVerboseLevel (G4int vl) |
G4int | GetVerboseLevel () const |
void | SetNijk (G4int i, G4int j, G4int k) |
Protected Member Functions | |
virtual G4bool | ProcessHits (G4Step *, G4TouchableHistory *) |
![]() | |
virtual G4int | GetIndex (G4Step *) |
void | CheckAndSetUnit (const G4String &unit, const G4String &category) |
Private Types | |
typedef G4MolecularConfiguration * | Species |
typedef std::map< Species, SpeciesInfo > | InnerSpeciesMap |
typedef std::map< double, InnerSpeciesMap > | SpeciesMap |
Private Attributes | |
SpeciesMap | fSpeciesInfoPerTime |
std::set< G4double > | fTimeToRecord |
int | fNEvent |
double | fEdep |
G4bool | fOutputToRoot |
G4bool | fOutputToXml |
G4bool | fOutputToCsv |
G4int | fHCID |
G4THitsMap< G4double > * | fEvtMap |
Additional Inherited Members | |
![]() | |
G4String | primitiveName |
G4MultiFunctionalDetector * | detector |
G4VSDFilter * | filter |
G4int | verboseLevel |
G4int | indexDepth |
G4String | unitName |
G4double | unitValue |
G4int | fNi |
G4int | fNj |
G4int | fNk |
This is a primitive scorer class for molecular species.
The number of species is recorded for all times (predetermined or user chosen). It also scores the energy deposition in order to compute the radiochemical yields.
Definition at line 56 of file ScoreSpecies.hh.
|
private |
Definition at line 149 of file ScoreSpecies.hh.
|
private |
Definition at line 148 of file ScoreSpecies.hh.
|
private |
Definition at line 150 of file ScoreSpecies.hh.
Definition at line 62 of file ScoreSpecies.cc.
References AddTimeToRecord(), fEdep, fNEvent, and picosecond.
|
virtual |
Definition at line 84 of file ScoreSpecies.cc.
|
virtual |
Method used in multithreading mode in order to merge the results.
Definition at line 198 of file ScoreSpecies.cc.
References clear(), fEdep, ScoreSpecies::SpeciesInfo::fG, SpeciesInfoSOA::fG, ScoreSpecies::SpeciesInfo::fG2, fNEvent, ScoreSpecies::SpeciesInfo::fNumber, fSpeciesInfoPerTime, and right.
|
inline |
Add a time at which the number of species should be recorded.
Default times are set up to 1 microsecond.
Definition at line 65 of file ScoreSpecies.hh.
References fTimeToRecord.
Referenced by ScoreSpecies().
void ScoreSpecies::ASCII | ( | ) |
Write results to an text file.
Definition at line 319 of file ScoreSpecies.cc.
References fSpeciesInfoPerTime, and G4endl.
|
virtual |
Reimplemented from G4VPrimitiveScorer.
Definition at line 285 of file ScoreSpecies.cc.
References G4THitsMap< T >::clear(), fEdep, fEvtMap, fNEvent, and fSpeciesInfoPerTime.
Referenced by AbsorbResultsFromWorkerScorer().
|
inline |
Remove all times to record, must be reset by user.
Definition at line 71 of file ScoreSpecies.hh.
References fTimeToRecord.
|
virtual |
Reimplemented from G4VPrimitiveScorer.
Definition at line 295 of file ScoreSpecies.cc.
|
virtual |
Reimplemented from G4VPrimitiveScorer.
Definition at line 120 of file ScoreSpecies.cc.
References eV, FatalException, fEdep, ScoreSpecies::SpeciesInfo::fG, SpeciesInfoSOA::fG, ScoreSpecies::SpeciesInfo::fG2, fNEvent, ScoreSpecies::SpeciesInfo::fNumber, fSpeciesInfoPerTime, fTimeToRecord, G4BestUnit, G4cerr, G4cout, G4endl, G4Exception(), G4EventManager::GetConstCurrentEvent(), G4Event::GetEventID(), G4EventManager::GetEventManager(), G4MoleculeCounter::GetNMoleculesAtTime(), G4MoleculeCounter::GetRecordedMolecules(), G4MoleculeCounter::Instance(), and G4MoleculeCounter::ResetCounter().
|
inline |
|
inline |
Definition at line 181 of file ScoreSpecies.hh.
References fSpeciesInfoPerTime.
|
virtual |
Reimplemented from G4VPrimitiveScorer.
Definition at line 105 of file ScoreSpecies.cc.
References G4HCofThisEvent::AddHitsCollection(), fEvtMap, fHCID, G4VPrimitiveScorer::GetCollectionID(), G4VPrimitiveScorer::GetMultiFunctionalDetector(), G4VPrimitiveScorer::GetName(), and G4VSensitiveDetector::GetName().
|
virtual |
Definition at line 344 of file ScoreSpecies.cc.
References fNEvent, fOutputToCsv, fOutputToRoot, fOutputToXml, fSpeciesInfoPerTime, G4XmlAnalysisManager::Instance(), G4CsvAnalysisManager::Instance(), G4RootAnalysisManager::Instance(), G4Threading::IsWorkerThread(), and WriteWithAnalysisManager().
|
virtual |
Reimplemented from G4VPrimitiveScorer.
Definition at line 300 of file ScoreSpecies.cc.
References G4VPrimitiveScorer::detector, G4THitsMap< T >::entries(), fEvtMap, fNEvent, G4cout, G4endl, G4THitsMap< T >::GetMap(), G4VPrimitiveScorer::GetName(), G4VSensitiveDetector::GetName(), G4VPrimitiveScorer::GetUnit(), and G4VPrimitiveScorer::GetUnitValue().
|
protectedvirtual |
Implements G4VPrimitiveScorer.
Definition at line 89 of file ScoreSpecies.cc.
References G4THitsMap< T >::add(), FALSE, fEdep, fEvtMap, G4VPrimitiveScorer::GetIndex(), G4Step::GetPreStepPoint(), G4Step::GetTotalEnergyDeposit(), G4StepPoint::GetWeight(), and TRUE.
void ScoreSpecies::WriteWithAnalysisManager | ( | G4VAnalysisManager * | analysisManager | ) |
Write results to whatever chosen file format.
Definition at line 379 of file ScoreSpecies.cc.
References G4VAnalysisManager::AddNtupleRow(), G4VAnalysisManager::CloseFile(), G4VAnalysisManager::CreateNtuple(), G4VAnalysisManager::CreateNtupleDColumn(), G4VAnalysisManager::CreateNtupleIColumn(), G4VAnalysisManager::CreateNtupleSColumn(), G4VAnalysisManager::FillNtupleDColumn(), G4VAnalysisManager::FillNtupleIColumn(), G4VAnalysisManager::FillNtupleSColumn(), G4VAnalysisManager::FinishNtuple(), G4String::first(), fNEvent, fSpeciesInfoPerTime, G4MolecularConfiguration::GetName(), G4InuclParticleNames::name(), G4VAnalysisManager::OpenFile(), and G4VAnalysisManager::Write().
Referenced by OutputAndClear().
|
private |
Definition at line 162 of file ScoreSpecies.hh.
Referenced by AbsorbResultsFromWorkerScorer(), clear(), EndOfEvent(), ProcessHits(), and ScoreSpecies().
|
private |
Definition at line 185 of file ScoreSpecies.hh.
Referenced by clear(), Initialize(), PrintAll(), and ProcessHits().
|
private |
Definition at line 184 of file ScoreSpecies.hh.
Referenced by Initialize().
|
private |
Definition at line 161 of file ScoreSpecies.hh.
Referenced by AbsorbResultsFromWorkerScorer(), clear(), EndOfEvent(), GetNumberOfRecordedEvents(), OutputAndClear(), PrintAll(), ScoreSpecies(), and WriteWithAnalysisManager().
|
private |
Definition at line 165 of file ScoreSpecies.hh.
Referenced by OutputAndClear().
|
private |
Definition at line 163 of file ScoreSpecies.hh.
Referenced by OutputAndClear().
|
private |
Definition at line 164 of file ScoreSpecies.hh.
Referenced by OutputAndClear().
|
private |
Definition at line 151 of file ScoreSpecies.hh.
Referenced by AbsorbResultsFromWorkerScorer(), ASCII(), clear(), EndOfEvent(), GetSpeciesInfo(), OutputAndClear(), and WriteWithAnalysisManager().
|
private |
Definition at line 159 of file ScoreSpecies.hh.
Referenced by AddTimeToRecord(), ClearTimeToRecord(), and EndOfEvent().