Geant4  10.03
ScoreSpecies Class Reference

This is a primitive scorer class for molecular species. More...

#include <ScoreSpecies.hh>

+ Inheritance diagram for ScoreSpecies:
+ Collaboration diagram for ScoreSpecies:

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 ()
 
- Public Member Functions inherited from G4VPrimitiveScorer
 G4VPrimitiveScorer (G4String name, G4int depth=0)
 
virtual ~G4VPrimitiveScorer ()
 
G4int GetCollectionID (G4int)
 
void SetUnit (const G4String &unit)
 
const G4StringGetUnit () const
 
G4double GetUnitValue () const
 
void SetMultiFunctionalDetector (G4MultiFunctionalDetector *d)
 
G4MultiFunctionalDetectorGetMultiFunctionalDetector () const
 
G4String GetName () const
 
void SetFilter (G4VSDFilter *f)
 
G4VSDFilterGetFilter () const
 
void SetVerboseLevel (G4int vl)
 
G4int GetVerboseLevel () const
 
void SetNijk (G4int i, G4int j, G4int k)
 

Protected Member Functions

virtual G4bool ProcessHits (G4Step *, G4TouchableHistory *)
 
- Protected Member Functions inherited from G4VPrimitiveScorer
virtual G4int GetIndex (G4Step *)
 
void CheckAndSetUnit (const G4String &unit, const G4String &category)
 

Private Types

typedef G4MolecularConfigurationSpecies
 
typedef std::map< Species,
SpeciesInfo
InnerSpeciesMap
 
typedef std::map< double,
InnerSpeciesMap
SpeciesMap
 

Private Attributes

SpeciesMap fSpeciesInfoPerTime
 
std::set< G4doublefTimeToRecord
 
int fNEvent
 
double fEdep
 
G4bool fOutputToRoot
 
G4bool fOutputToXml
 
G4bool fOutputToCsv
 
G4int fHCID
 
G4THitsMap< G4double > * fEvtMap
 

Additional Inherited Members

- Protected Attributes inherited from G4VPrimitiveScorer
G4String primitiveName
 
G4MultiFunctionalDetectordetector
 
G4VSDFilterfilter
 
G4int verboseLevel
 
G4int indexDepth
 
G4String unitName
 
G4double unitValue
 
G4int fNi
 
G4int fNj
 
G4int fNk
 

Detailed Description

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.

Member Typedef Documentation

Definition at line 149 of file ScoreSpecies.hh.

Definition at line 148 of file ScoreSpecies.hh.

typedef std::map<double, InnerSpeciesMap> ScoreSpecies::SpeciesMap
private

Definition at line 150 of file ScoreSpecies.hh.

Constructor & Destructor Documentation

ScoreSpecies::ScoreSpecies ( G4String  name,
G4int  depth = 0 
)

Definition at line 62 of file ScoreSpecies.cc.

References AddTimeToRecord(), fEdep, fNEvent, and picosecond.

+ Here is the call graph for this function:

ScoreSpecies::~ScoreSpecies ( )
virtual

Definition at line 84 of file ScoreSpecies.cc.

Member Function Documentation

void ScoreSpecies::AbsorbResultsFromWorkerScorer ( G4VPrimitiveScorer workerScorer)
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.

+ Here is the call graph for this function:

void ScoreSpecies::AddTimeToRecord ( double  time)
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().

+ Here is the caller graph for this function:

void ScoreSpecies::ASCII ( )

Write results to an text file.

Definition at line 319 of file ScoreSpecies.cc.

References fSpeciesInfoPerTime, and G4endl.

void ScoreSpecies::clear ( void  )
virtual

Reimplemented from G4VPrimitiveScorer.

Definition at line 285 of file ScoreSpecies.cc.

References G4THitsMap< T >::clear(), fEdep, fEvtMap, fNEvent, and fSpeciesInfoPerTime.

Referenced by AbsorbResultsFromWorkerScorer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ScoreSpecies::ClearTimeToRecord ( )
inline

Remove all times to record, must be reset by user.

Definition at line 71 of file ScoreSpecies.hh.

References fTimeToRecord.

void ScoreSpecies::DrawAll ( void  )
virtual

Reimplemented from G4VPrimitiveScorer.

Definition at line 295 of file ScoreSpecies.cc.

int ScoreSpecies::GetNumberOfRecordedEvents ( ) const
inline

Get number of recorded events.

Definition at line 77 of file ScoreSpecies.hh.

References fNEvent.

SpeciesMap ScoreSpecies::GetSpeciesInfo ( )
inline

Definition at line 181 of file ScoreSpecies.hh.

References fSpeciesInfoPerTime.

void ScoreSpecies::Initialize ( G4HCofThisEvent HCE)
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().

+ Here is the call graph for this function:

void ScoreSpecies::OutputAndClear ( )
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().

+ Here is the call graph for this function:

void ScoreSpecies::PrintAll ( void  )
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().

+ Here is the call graph for this function:

G4bool ScoreSpecies::ProcessHits ( G4Step aStep,
G4TouchableHistory  
)
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.

+ Here is the call graph for this function:

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

double ScoreSpecies::fEdep
private
G4THitsMap<G4double>* ScoreSpecies::fEvtMap
private

Definition at line 185 of file ScoreSpecies.hh.

Referenced by clear(), Initialize(), PrintAll(), and ProcessHits().

G4int ScoreSpecies::fHCID
private

Definition at line 184 of file ScoreSpecies.hh.

Referenced by Initialize().

G4bool ScoreSpecies::fOutputToCsv
private

Definition at line 165 of file ScoreSpecies.hh.

Referenced by OutputAndClear().

G4bool ScoreSpecies::fOutputToRoot
private

Definition at line 163 of file ScoreSpecies.hh.

Referenced by OutputAndClear().

G4bool ScoreSpecies::fOutputToXml
private

Definition at line 164 of file ScoreSpecies.hh.

Referenced by OutputAndClear().

SpeciesMap ScoreSpecies::fSpeciesInfoPerTime
private
std::set<G4double> ScoreSpecies::fTimeToRecord
private

Definition at line 159 of file ScoreSpecies.hh.

Referenced by AddTimeToRecord(), ClearTimeToRecord(), and EndOfEvent().


The documentation for this class was generated from the following files: