Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VSensitiveDetector Class Referenceabstract

#include <G4VSensitiveDetector.hh>

Inherited by B2TrackerSD, B2TrackerSD, B2TrackerSD, B4cCalorimeterSD, B5DriftChamberSD, B5EmCalorimeterSD, B5HadCalorimeterSD, B5HodoscopeSD, CCaloSD, CheckVolumeSD, CheckVolumeSD, CML2DummySD, CML2SDWithParticle, CML2SDWithVoxels, demo.ScoreSD, DMXPmtSD, DMXScintSD, eRositaTrackerSD, ExExChSensitiveDetector, ExGflashSensitiveDetector, ExN02TrackerSD, ExN04CalorimeterSD, ExN04CalorimeterSD, ExN04DummySD, ExN04DummySD, ExN04MuonSD, ExN04MuonSD, ExN04TrackerSD, ExN04TrackerSD, ExP01TrackerSD, ExTGTrackerSD, F01CalorimeterSD, F02CalorimeterSD, F03CalorimeterSD, FCALEMModuleSD, FCALHadModuleSD, FCALTestbeamSetupSD, G04SensitiveDetector, G4HumanDummyLeftBreastSD, G4HumanDummyRightBreastSD, G4HumanPhantomSD, G4MultiFunctionalDetector, G4MultiSensitiveDetector, GammaRayTelAnticoincidenceSD, GammaRayTelCalorimeterSD, GammaRayTelDummySD, GammaRayTelTrackerSD, GB05SD, GB06SD, H02MuonSD, HadrontherapyDetectorSD, HadrontherapyDummySD, IORTDetectorSD, IORTDummySD, LXePMTSD, LXeScintSD, Par01CalorimeterSD, PhantomSD, pyG4VSensitiveDetector::CB_G4VSensitiveDetector, RE01CalorimeterSD, RE01TrackerSD, RE05CalorimeterSD, RE05DummySD, RE05MuonSD, RE05TrackerSD, RMC01SD, SensitiveDetector, SensitiveDetector, TargetSD, TargetSD, TargetSD, TargetSD, TrackerSD, UltraPMTSD, VoxelSD, VoxelSD, WLSPhotonDetSD, XAluminumElectrodeSensitivity, XrayFluoHPGeSD, and XrayFluoSD.

Collaboration diagram for G4VSensitiveDetector:

Public Member Functions

 G4VSensitiveDetector (G4String name)
 
 G4VSensitiveDetector (const G4VSensitiveDetector &right)
 
virtual ~G4VSensitiveDetector ()
 
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
 
virtual G4VSensitiveDetectorClone () 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::G4VSensitiveDetector ( G4String  name)

Definition at line 33 of file G4VSensitiveDetector.cc.

34 :verboseLevel(0),active(true),
35  ROgeometry(nullptr),filter(nullptr)
36 {
37  size_t sLast = name.last('/');
38  if(sLast==std::string::npos)
39  { // detector name only
41  thePathName = "/";
42  }
43  else
44  { // name conatin the directory path
46  SensitiveDetectorName.remove(0,sLast+1);
47  thePathName = name;
48  thePathName.remove(sLast+1,name.length()-sLast);
49  if(thePathName(0)!='/') thePathName.prepend("/");
50  }
52 }
const XML_Char * name
Definition: expat.h:151
G4String & remove(str_size)
G4String & prepend(const char *)
G4VReadOutGeometry * ROgeometry
G4int last(char) const

Here is the call graph for this function:

G4VSensitiveDetector::G4VSensitiveDetector ( const G4VSensitiveDetector right)
G4VSensitiveDetector::~G4VSensitiveDetector ( )
virtual

Definition at line 65 of file G4VSensitiveDetector.cc.

66 {
67 }

Member Function Documentation

void G4VSensitiveDetector::Activate ( G4bool  activeFlag)
inline

Definition at line 142 of file G4VSensitiveDetector.hh.

143  { active = activeFlag; }

Here is the caller graph for this function:

G4VSensitiveDetector * G4VSensitiveDetector::Clone ( ) const
virtual

Reimplemented in G4MultiSensitiveDetector.

Definition at line 69 of file G4VSensitiveDetector.cc.

70 {
72  msg << "Derived class does not implement cloning,\n"
73  << "but Clone method called.\n"
74  << "Cannot continue;";
75  G4Exception("G4VSensitiveDetector::Clone","Det0010",FatalException,msg);
76  return nullptr;
77 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Here is the call graph for this function:

Here is the caller graph for this function:

G4int G4VSensitiveDetector::GetCollectionID ( G4int  i)
protectedvirtual

Reimplemented in G4MultiSensitiveDetector.

Definition at line 102 of file G4VSensitiveDetector.cc.

103 {
105 }
G4int GetCollectionID(G4String colName)
Definition: G4SDManager.cc:135
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
G4CollectionNameVector collectionName

Here is the call graph for this function:

Here is the caller graph for this function:

G4String G4VSensitiveDetector::GetCollectionName ( G4int  id) const
inline

Definition at line 138 of file G4VSensitiveDetector.hh.

139  { return collectionName[id]; }
G4CollectionNameVector collectionName

Here is the caller graph for this function:

G4VSDFilter* G4VSensitiveDetector::GetFilter ( ) const
inline

Definition at line 154 of file G4VSensitiveDetector.hh.

155  { return filter; }
G4String G4VSensitiveDetector::GetFullPathName ( ) const
inline

Definition at line 150 of file G4VSensitiveDetector.hh.

151  { return fullPathName; }

Here is the caller graph for this function:

G4String G4VSensitiveDetector::GetName ( void  ) const
inline

Definition at line 146 of file G4VSensitiveDetector.hh.

147  { return SensitiveDetectorName; }
G4int G4VSensitiveDetector::GetNumberOfCollections ( ) const
inline

Definition at line 136 of file G4VSensitiveDetector.hh.

137  { return collectionName.size(); }
G4CollectionNameVector collectionName

Here is the caller graph for this function:

G4String G4VSensitiveDetector::GetPathName ( ) const
inline

Definition at line 148 of file G4VSensitiveDetector.hh.

149  { return thePathName; }

Here is the caller graph for this function:

G4VReadOutGeometry* G4VSensitiveDetector::GetROgeometry ( ) const
inline

Definition at line 152 of file G4VSensitiveDetector.hh.

153  { return ROgeometry; }
G4VReadOutGeometry * ROgeometry

Here is the caller graph for this function:

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  }
G4VReadOutGeometry * ROgeometry
virtual G4bool CheckROVolume(G4Step *, G4TouchableHistory *&)
virtual G4bool Accept(const G4Step *) const =0
virtual G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist)=0

Here is the call graph for this function:

Here is the caller graph for this function:

G4bool G4VSensitiveDetector::isActive ( ) const
inline

Definition at line 144 of file G4VSensitiveDetector.hh.

145  { return active; }

Here is the caller graph for this function:

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

Definition at line 97 of file G4VSensitiveDetector.cc.

98 {
99  return (this!=&right);
100 }
G4VSensitiveDetector & G4VSensitiveDetector::operator= ( const G4VSensitiveDetector right)

Definition at line 79 of file G4VSensitiveDetector.cc.

80 {
81  if (this == &right ) return *this;
83  thePathName = right.thePathName;
84  fullPathName = right.fullPathName;
85  verboseLevel = right.verboseLevel;
86  active = right.active;
87  ROgeometry = right.ROgeometry;
88  filter = right.filter;
89  return *this;
90 }
G4VReadOutGeometry * ROgeometry

Here is the caller graph for this function:

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

Definition at line 92 of file G4VSensitiveDetector.cc.

93 {
94  return (this==&right);
95 }
virtual G4bool G4VSensitiveDetector::ProcessHits ( G4Step aStep,
G4TouchableHistory ROhist 
)
protectedpure virtual
void G4VSensitiveDetector::SetFilter ( G4VSDFilter value)
inline

Definition at line 131 of file G4VSensitiveDetector.hh.

132  { filter = value; }
const XML_Char int const XML_Char * value
Definition: expat.h:331

Here is the caller graph for this function:

void G4VSensitiveDetector::SetROgeometry ( G4VReadOutGeometry value)
inline

Definition at line 128 of file G4VSensitiveDetector.hh.

129  { ROgeometry = value; }
const XML_Char int const XML_Char * value
Definition: expat.h:331
G4VReadOutGeometry * ROgeometry

Here is the caller graph for this function:

void G4VSensitiveDetector::SetVerboseLevel ( G4int  vl)
inline

Definition at line 140 of file G4VSensitiveDetector.hh.

141  { verboseLevel = vl; }

Here is the caller graph for this function:

Member Data Documentation

G4bool G4VSensitiveDetector::active
protected

Definition at line 109 of file G4VSensitiveDetector.hh.

G4CollectionNameVector G4VSensitiveDetector::collectionName
protected

Definition at line 99 of file G4VSensitiveDetector.hh.

G4VSDFilter* G4VSensitiveDetector::filter
protected

Definition at line 111 of file G4VSensitiveDetector.hh.

G4String G4VSensitiveDetector::fullPathName
protected

Definition at line 107 of file G4VSensitiveDetector.hh.

G4VReadOutGeometry* G4VSensitiveDetector::ROgeometry
protected

Definition at line 110 of file G4VSensitiveDetector.hh.

G4String G4VSensitiveDetector::SensitiveDetectorName
protected

Definition at line 105 of file G4VSensitiveDetector.hh.

G4String G4VSensitiveDetector::thePathName
protected

Definition at line 106 of file G4VSensitiveDetector.hh.

G4int G4VSensitiveDetector::verboseLevel
protected

Definition at line 108 of file G4VSensitiveDetector.hh.


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