Geant4-11
Public Member Functions | Protected Member Functions | Protected Attributes
demo.ScoreSD Class Referenceabstract
Inheritance diagram for demo.ScoreSD:
G4VSensitiveDetector

Public Member Functions

def __init__ (self)
 
void Activate (G4bool activeFlag)
 
virtual void clear ()
 
virtual G4VSensitiveDetectorClone () const
 
virtual void DrawAll ()
 
virtual void EndOfEvent (G4HCofThisEvent *)
 
G4String GetCollectionName (G4int id) const
 
G4VSDFilterGetFilter () const
 
G4String GetFullPathName () const
 
G4String GetName () const
 
G4int GetNumberOfCollections () const
 
G4String GetPathName () const
 
G4VReadOutGeometryGetROgeometry () const
 
G4bool Hit (G4Step *aStep)
 
virtual void Initialize (G4HCofThisEvent *)
 
G4bool isActive () const
 
G4bool operator!= (const G4VSensitiveDetector &right) const
 
G4bool operator== (const G4VSensitiveDetector &right) const
 
virtual void PrintAll ()
 
def ProcessHits (self, step, rohist)
 
void SetFilter (G4VSDFilter *value)
 
void SetROgeometry (G4VReadOutGeometry *value)
 
void SetVerboseLevel (G4int vl)
 

Protected Member Functions

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

Protected Attributes

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

Detailed Description

Definition at line 119 of file demo.py.

Constructor & Destructor Documentation

◆ __init__()

def demo.ScoreSD.__init__ (   self)

Definition at line 122 of file demo.py.

122 def __init__(self):
123 G4VSensitiveDetector.__init__(self, "ScoreVoxel")
124

Member Function Documentation

◆ Activate()

void G4VSensitiveDetector::Activate ( G4bool  activeFlag)
inlineinherited

Definition at line 148 of file G4VSensitiveDetector.hh.

148{ active = activeFlag; }

References G4VSensitiveDetector::active.

Referenced by G4SDStructure::Activate(), and export_G4VSensitiveDetector().

◆ clear()

void G4VSensitiveDetector::clear ( )
virtualinherited

Reimplemented in G4MultiFunctionalDetector, and G4MultiSensitiveDetector.

Definition at line 117 of file G4VSensitiveDetector.cc.

117{}

Referenced by export_G4VSensitiveDetector().

◆ Clone()

G4VSensitiveDetector * G4VSensitiveDetector::Clone ( ) const
virtualinherited

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}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40

References FatalException, and G4Exception().

Referenced by G4VUserDetectorConstruction::CloneSD().

◆ DrawAll()

void G4VSensitiveDetector::DrawAll ( )
virtualinherited

Reimplemented in G4MultiFunctionalDetector, and G4MultiSensitiveDetector.

Definition at line 119 of file G4VSensitiveDetector.cc.

119{}

Referenced by export_G4VSensitiveDetector().

◆ EndOfEvent()

void G4VSensitiveDetector::EndOfEvent ( G4HCofThisEvent )
virtualinherited

Reimplemented in G4MultiFunctionalDetector, and G4MultiSensitiveDetector.

Definition at line 115 of file G4VSensitiveDetector.cc.

115{}

Referenced by export_G4VSensitiveDetector().

◆ GetCollectionID()

G4int G4VSensitiveDetector::GetCollectionID ( G4int  i)
protectedvirtualinherited

◆ GetCollectionName()

G4String G4VSensitiveDetector::GetCollectionName ( G4int  id) const
inlineinherited

◆ GetFilter()

G4VSDFilter * G4VSensitiveDetector::GetFilter ( ) const
inlineinherited

Definition at line 154 of file G4VSensitiveDetector.hh.

154{ return filter; }

References G4VSensitiveDetector::filter.

◆ GetFullPathName()

G4String G4VSensitiveDetector::GetFullPathName ( ) const
inlineinherited

◆ GetName()

G4String G4VSensitiveDetector::GetName ( ) const
inlineinherited

Definition at line 150 of file G4VSensitiveDetector.hh.

150{ return SensitiveDetectorName; }

References G4VSensitiveDetector::SensitiveDetectorName.

Referenced by G4SDManager::AddNewDetector(), G4SDStructure::AddNewDetector(), G4MultiSensitiveDetector::Clone(), G4VUserDetectorConstruction::CloneSD(), export_G4VSensitiveDetector(), G4GDMLWriteStructure::ExportSD(), G4MultiSensitiveDetector::G4MultiSensitiveDetector(), G4MultiSensitiveDetector::GetCollectionID(), G4VPrimitiveScorer::GetCollectionID(), G4HCtable::GetCollectionID(), 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(), 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(), G4PSVolumeFlux::PrintAll(), G3DetTable::PrintAll(), G4MultiSensitiveDetector::ProcessHits(), G4ASCIITreeSceneHandler::RequestPrimitives(), G4VUserDetectorConstruction::SetSensitiveDetector(), G4VUserParallelWorld::SetSensitiveDetector(), and G4MultiSensitiveDetector::~G4MultiSensitiveDetector().

◆ GetNumberOfCollections()

G4int G4VSensitiveDetector::GetNumberOfCollections ( ) const
inlineinherited

Definition at line 139 of file G4VSensitiveDetector.hh.

140 {
141 return G4int(collectionName.size());
142 }
int G4int
Definition: G4Types.hh:85

References G4VSensitiveDetector::collectionName.

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

◆ GetPathName()

G4String G4VSensitiveDetector::GetPathName ( ) const
inlineinherited

◆ GetROgeometry()

G4VReadOutGeometry * G4VSensitiveDetector::GetROgeometry ( ) const
inlineinherited

◆ Hit()

G4bool G4VSensitiveDetector::Hit ( G4Step aStep)
inlineinherited

◆ Initialize()

void G4VSensitiveDetector::Initialize ( G4HCofThisEvent )
virtualinherited

Reimplemented in G4MultiFunctionalDetector, and G4MultiSensitiveDetector.

Definition at line 113 of file G4VSensitiveDetector.cc.

113{}

Referenced by export_G4VSensitiveDetector().

◆ isActive()

G4bool G4VSensitiveDetector::isActive ( ) const
inlineinherited

◆ operator!=()

G4bool G4VSensitiveDetector::operator!= ( const G4VSensitiveDetector right) const
inherited

Definition at line 99 of file G4VSensitiveDetector.cc.

100{
101 return (this != &right);
102}

◆ operator==()

G4bool G4VSensitiveDetector::operator== ( const G4VSensitiveDetector right) const
inherited

Definition at line 94 of file G4VSensitiveDetector.cc.

95{
96 return (this == &right);
97}

◆ PrintAll()

void G4VSensitiveDetector::PrintAll ( )
virtualinherited

Reimplemented in G4MultiFunctionalDetector, and G4MultiSensitiveDetector.

Definition at line 121 of file G4VSensitiveDetector.cc.

121{}

Referenced by export_G4VSensitiveDetector().

◆ ProcessHits() [1/2]

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

◆ ProcessHits() [2/2]

def demo.ScoreSD.ProcessHits (   self,
  step,
  rohist 
)

Definition at line 125 of file demo.py.

125 def ProcessHits(self, step, rohist):
126 preStepPoint= step.GetPreStepPoint()
127 if(preStepPoint.GetCharge() == 0):
128 return
129
130 track= step.GetTrack()
131 touchable= track.GetTouchable()
132 voxel_id= touchable.GetReplicaNumber()
133 dedx= step.GetTotalEnergyDeposit()
134 xz= posXZ(voxel_id)
135 hist_dose2d.Fill(xz[1], xz[0], dedx/MeV)
136 if( abs(xz[0]) <= 100 ):
137 hist_dosez.Fill(xz[1], dedx/MeV)
138
139# ------------------------------------------------------------------
def posXZ(copyN)
Definition: demo.py:140

References demo.posXZ().

◆ SetFilter()

void G4VSensitiveDetector::SetFilter ( G4VSDFilter value)
inlineinherited

Definition at line 135 of file G4VSensitiveDetector.hh.

135{ filter = value; }

References G4VSensitiveDetector::filter.

◆ SetROgeometry()

void G4VSensitiveDetector::SetROgeometry ( G4VReadOutGeometry value)
inlineinherited

Definition at line 133 of file G4VSensitiveDetector.hh.

133{ ROgeometry = value; }

References G4VSensitiveDetector::ROgeometry.

Referenced by export_G4VSensitiveDetector().

◆ SetVerboseLevel()

void G4VSensitiveDetector::SetVerboseLevel ( G4int  vl)
inlineinherited

Field Documentation

◆ active

G4bool G4VSensitiveDetector::active
protectedinherited

◆ collectionName

G4CollectionNameVector G4VSensitiveDetector::collectionName
protectedinherited

◆ filter

G4VSDFilter* G4VSensitiveDetector::filter
protectedinherited

◆ fullPathName

G4String G4VSensitiveDetector::fullPathName
protectedinherited

◆ ROgeometry

G4VReadOutGeometry* G4VSensitiveDetector::ROgeometry
protectedinherited

◆ SensitiveDetectorName

G4String G4VSensitiveDetector::SensitiveDetectorName
protectedinherited

◆ thePathName

G4String G4VSensitiveDetector::thePathName
protectedinherited

◆ verboseLevel

G4int G4VSensitiveDetector::verboseLevel
protectedinherited

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