Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VSensitiveDetector Class Referenceabstract

#include <G4VSensitiveDetector.hh>

+ Inheritance diagram for G4VSensitiveDetector:

Public Member Functions

 G4VSensitiveDetector (G4String name)
 
 G4VSensitiveDetector (const G4VSensitiveDetector &right)
 
virtual ~G4VSensitiveDetector ()
 
const G4VSensitiveDetectoroperator= (const G4VSensitiveDetector &right)
 
G4int operator== (const G4VSensitiveDetector &right) const
 
G4int operator!= (const G4VSensitiveDetector &right) const
 
virtual void Initialize (G4HCofThisEvent *)
 
virtual void EndOfEvent (G4HCofThisEvent *)
 
virtual void clear ()
 
virtual void DrawAll ()
 
virtual void PrintAll ()
 
G4bool Hit (G4Step *aStep)
 
void SetROgeometry (G4VReadOutGeometry *value)
 
void SetFilter (G4VSDFilter *value)
 
G4int GetNumberOfCollections () const
 
G4String GetCollectionName (G4int id) const
 
void SetVerboseLevel (G4int vl)
 
void Activate (G4bool activeFlag)
 
G4bool isActive () const
 
G4String GetName () const
 
G4String GetPathName () const
 
G4String GetFullPathName () const
 
G4VReadOutGeometryGetROgeometry () const
 
G4VSDFilterGetFilter () const
 

Protected Member Functions

virtual G4bool ProcessHits (G4Step *aStep, G4TouchableHistory *ROhist)=0
 
virtual G4int GetCollectionID (G4int i)
 

Protected Attributes

G4CollectionNameVector collectionName
 
G4String SensitiveDetectorName
 
G4String thePathName
 
G4String fullPathName
 
G4int verboseLevel
 
G4bool active
 
G4VReadOutGeometryROgeometry
 
G4VSDFilterfilter
 

Detailed Description

Definition at line 50 of file G4VSensitiveDetector.hh.

Constructor & Destructor Documentation

◆ G4VSensitiveDetector() [1/2]

G4VSensitiveDetector::G4VSensitiveDetector ( G4String  name)

Definition at line 33 of file G4VSensitiveDetector.cc.

35{
36 size_t sLast = name.last('/');
37 if(sLast==std::string::npos)
38 { // detector name only
40 thePathName = "/";
41 }
42 else
43 { // name conatin the directory path
46 thePathName = name;
47 thePathName.remove(sLast+1,name.length()-sLast);
48 if(thePathName(0)!='/') thePathName.prepend("/");
49 }
51}
G4String & remove(str_size)
G4String & prepend(const char *)
G4int last(char) const
G4VReadOutGeometry * ROgeometry

◆ G4VSensitiveDetector() [2/2]

G4VSensitiveDetector::G4VSensitiveDetector ( const G4VSensitiveDetector right)

Definition at line 53 of file G4VSensitiveDetector.cc.

54{
59 active = right.active;
60 ROgeometry = right.ROgeometry;
61 filter = right.filter;
62}

◆ ~G4VSensitiveDetector()

G4VSensitiveDetector::~G4VSensitiveDetector ( )
virtual

Definition at line 64 of file G4VSensitiveDetector.cc.

65{
66}

Member Function Documentation

◆ Activate()

void G4VSensitiveDetector::Activate ( G4bool  activeFlag)
inline

Definition at line 142 of file G4VSensitiveDetector.hh.

143 { active = activeFlag; }

Referenced by G4SDStructure::Activate().

◆ clear()

void G4VSensitiveDetector::clear ( )
virtual

Reimplemented in G4MultiFunctionalDetector.

Definition at line 106 of file G4VSensitiveDetector.cc.

107{
108}

◆ DrawAll()

void G4VSensitiveDetector::DrawAll ( )
virtual

Reimplemented in G4MultiFunctionalDetector.

Definition at line 110 of file G4VSensitiveDetector.cc.

111{
112}

◆ EndOfEvent()

void G4VSensitiveDetector::EndOfEvent ( G4HCofThisEvent )
virtual

Reimplemented in G4MultiFunctionalDetector.

Definition at line 102 of file G4VSensitiveDetector.cc.

103{
104}

◆ GetCollectionID()

G4int G4VSensitiveDetector::GetCollectionID ( G4int  i)
protectedvirtual

Definition at line 90 of file G4VSensitiveDetector.cc.

91{
93}
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
G4int GetCollectionID(G4String colName)
Definition: G4SDManager.cc:133
G4CollectionNameVector collectionName

◆ GetCollectionName()

G4String G4VSensitiveDetector::GetCollectionName ( G4int  id) const
inline

Definition at line 138 of file G4VSensitiveDetector.hh.

139 { return collectionName[id]; }

Referenced by G4SDManager::AddNewDetector(), and G4HCtable::GetCollectionID().

◆ GetFilter()

G4VSDFilter * G4VSensitiveDetector::GetFilter ( ) const
inline

Definition at line 154 of file G4VSensitiveDetector.hh.

155 { return filter; }

◆ GetFullPathName()

G4String G4VSensitiveDetector::GetFullPathName ( ) const
inline

Definition at line 150 of file G4VSensitiveDetector.hh.

151 { return fullPathName; }

◆ GetName()

G4String G4VSensitiveDetector::GetName ( ) const
inline

Definition at line 146 of file G4VSensitiveDetector.hh.

147 { return SensitiveDetectorName; }

Referenced by G4SDManager::AddNewDetector(), G4SDStructure::AddNewDetector(), G4VPrimitiveScorer::GetCollectionID(), G4HCtable::GetCollectionID(), G4SDStructure::GetSD(), G4PSCellCharge::Initialize(), G4PSCellFlux::Initialize(), G4PSCylinderSurfaceCurrent::Initialize(), G4PSFlatSurfaceCurrent::Initialize(), G4PSMinKinEAtGeneration::Initialize(), G4PSNofCollision::Initialize(), G4PSNofSecondary::Initialize(), G4PSNofStep::Initialize(), G4PSPassageCellCurrent::Initialize(), G4PSPassageCellFlux::Initialize(), G4PSPassageTrackLength::Initialize(), G4PSPopulation::Initialize(), G4PSSphereSurfaceCurrent::Initialize(), G4PSSphereSurfaceFlux::Initialize(), G4PSTermination::Initialize(), G4PSTrackCounter::Initialize(), G4PSTrackLength::Initialize(), G4SDStructure::ListTree(), G4PSCellCharge::PrintAll(), G4PSCellFlux::PrintAll(), G4PSCylinderSurfaceCurrent::PrintAll(), G4PSCylinderSurfaceFlux::PrintAll(), G4PSDoseDeposit::PrintAll(), G4PSEnergyDeposit::PrintAll(), G4PSFlatSurfaceCurrent::PrintAll(), G4PSFlatSurfaceFlux::PrintAll(), G4PSNofCollision::PrintAll(), G4PSNofStep::PrintAll(), G4PSPassageCellCurrent::PrintAll(), G4PSPassageCellFlux::PrintAll(), G4PSPassageTrackLength::PrintAll(), G4PSPopulation::PrintAll(), G4PSSphereSurfaceCurrent::PrintAll(), G4PSSphereSurfaceFlux::PrintAll(), G4PSTermination::PrintAll(), G4PSTrackCounter::PrintAll(), G4PSTrackLength::PrintAll(), G3DetTable::PrintAll(), and G4ASCIITreeSceneHandler::RequestPrimitives().

◆ GetNumberOfCollections()

G4int G4VSensitiveDetector::GetNumberOfCollections ( ) const
inline

Definition at line 136 of file G4VSensitiveDetector.hh.

137 { return collectionName.size(); }

Referenced by G4SDManager::AddNewDetector(), and G4HCtable::GetCollectionID().

◆ GetPathName()

G4String G4VSensitiveDetector::GetPathName ( ) const
inline

Definition at line 148 of file G4VSensitiveDetector.hh.

149 { return thePathName; }

Referenced by G4SDManager::AddNewDetector().

◆ GetROgeometry()

G4VReadOutGeometry * G4VSensitiveDetector::GetROgeometry ( ) const
inline

◆ Hit()

G4bool G4VSensitiveDetector::Hit ( G4Step aStep)
inline

Definition at line 114 of file G4VSensitiveDetector.hh.

115 {
116 G4TouchableHistory* ROhis = 0;
117 if(!isActive()) return false;
118 if(filter)
119 { if(!(filter->Accept(aStep))) return false; }
120 if(ROgeometry)
121 { if(!(ROgeometry->CheckROVolume(aStep,ROhis))) return false; }
122 return ProcessHits(aStep,ROhis);
123 }
virtual G4bool CheckROVolume(G4Step *, G4TouchableHistory *&)
virtual G4bool Accept(const G4Step *) const =0
virtual G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist)=0

Referenced by G4ParallelWorldProcess::AtRestDoIt(), G4ParallelWorldScoringProcess::AtRestDoIt(), G4ParallelWorldProcess::PostStepDoIt(), G4ParallelWorldScoringProcess::PostStepDoIt(), G4ScoreSplittingProcess::PostStepDoIt(), and G4SteppingManager::Stepping().

◆ Initialize()

void G4VSensitiveDetector::Initialize ( G4HCofThisEvent )
virtual

Reimplemented in G4MultiFunctionalDetector.

Definition at line 98 of file G4VSensitiveDetector.cc.

99{
100}

◆ isActive()

G4bool G4VSensitiveDetector::isActive ( ) const
inline

Definition at line 144 of file G4VSensitiveDetector.hh.

145 { return active; }

Referenced by G4VGFlashSensitiveDetector::Hit(), Hit(), and G4SDStructure::ListTree().

◆ operator!=()

G4int G4VSensitiveDetector::operator!= ( const G4VSensitiveDetector right) const

Definition at line 85 of file G4VSensitiveDetector.cc.

86{
87 return (this!=&right);
88}

◆ operator=()

const G4VSensitiveDetector & G4VSensitiveDetector::operator= ( const G4VSensitiveDetector right)

Definition at line 68 of file G4VSensitiveDetector.cc.

69{
74 active = right.active;
75 ROgeometry = right.ROgeometry;
76 filter = right.filter;
77 return *this;
78}

◆ operator==()

G4int G4VSensitiveDetector::operator== ( const G4VSensitiveDetector right) const

Definition at line 80 of file G4VSensitiveDetector.cc.

81{
82 return (this==&right);
83}

◆ PrintAll()

void G4VSensitiveDetector::PrintAll ( )
virtual

Reimplemented in G4MultiFunctionalDetector.

Definition at line 114 of file G4VSensitiveDetector.cc.

115{
116}

◆ ProcessHits()

virtual G4bool G4VSensitiveDetector::ProcessHits ( G4Step aStep,
G4TouchableHistory ROhist 
)
protectedpure virtual

Implemented in G4MultiFunctionalDetector.

Referenced by Hit().

◆ SetFilter()

void G4VSensitiveDetector::SetFilter ( G4VSDFilter value)
inline

Definition at line 131 of file G4VSensitiveDetector.hh.

132 { filter = value; }

◆ SetROgeometry()

void G4VSensitiveDetector::SetROgeometry ( G4VReadOutGeometry value)
inline

Definition at line 128 of file G4VSensitiveDetector.hh.

129 { ROgeometry = value; }

◆ SetVerboseLevel()

void G4VSensitiveDetector::SetVerboseLevel ( G4int  vl)
inline

Definition at line 140 of file G4VSensitiveDetector.hh.

141 { verboseLevel = vl; }

Member Data Documentation

◆ active

G4bool G4VSensitiveDetector::active
protected

Definition at line 109 of file G4VSensitiveDetector.hh.

Referenced by Activate(), G4VSensitiveDetector(), isActive(), and operator=().

◆ collectionName

◆ filter

G4VSDFilter* G4VSensitiveDetector::filter
protected

Definition at line 111 of file G4VSensitiveDetector.hh.

Referenced by G4VSensitiveDetector(), GetFilter(), Hit(), operator=(), and SetFilter().

◆ fullPathName

G4String G4VSensitiveDetector::fullPathName
protected

Definition at line 107 of file G4VSensitiveDetector.hh.

Referenced by G4VSensitiveDetector(), GetFullPathName(), and operator=().

◆ ROgeometry

G4VReadOutGeometry* G4VSensitiveDetector::ROgeometry
protected

◆ SensitiveDetectorName

◆ thePathName

G4String G4VSensitiveDetector::thePathName
protected

Definition at line 106 of file G4VSensitiveDetector.hh.

Referenced by G4VSensitiveDetector(), GetPathName(), and operator=().

◆ verboseLevel

G4int G4VSensitiveDetector::verboseLevel
protected

Definition at line 108 of file G4VSensitiveDetector.hh.

Referenced by G4VSensitiveDetector(), operator=(), and SetVerboseLevel().


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