Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DMXPmtSD Class Reference

#include <DMXPmtSD.hh>

Inheritance diagram for DMXPmtSD:
Collaboration diagram for DMXPmtSD:

Public Member Functions

 DMXPmtSD (G4String)
 
 ~DMXPmtSD ()
 
void Initialize (G4HCofThisEvent *)
 
G4bool ProcessHits (G4Step *, G4TouchableHistory *)
 
void EndOfEvent (G4HCofThisEvent *)
 
void clear ()
 
void DrawAll ()
 
void PrintAll ()
 
- Public Member Functions inherited from G4VSensitiveDetector
 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
 
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
 

Additional Inherited Members

- Protected Member Functions inherited from G4VSensitiveDetector
virtual G4int GetCollectionID (G4int i)
 
- Protected Attributes inherited from G4VSensitiveDetector
G4CollectionNameVector collectionName
 
G4String SensitiveDetectorName
 
G4String thePathName
 
G4String fullPathName
 
G4int verboseLevel
 
G4bool active
 
G4VReadOutGeometryROgeometry
 
G4VSDFilterfilter
 

Detailed Description

Definition at line 55 of file DMXPmtSD.hh.

Constructor & Destructor Documentation

DMXPmtSD::DMXPmtSD ( G4String  name)

Definition at line 55 of file DMXPmtSD.cc.

56  :G4VSensitiveDetector(name) {
57 
58  G4String HCname="pmtCollection";
59  collectionName.insert(HCname);
60 }
G4VSensitiveDetector(G4String name)
G4CollectionNameVector collectionName

Here is the call graph for this function:

DMXPmtSD::~DMXPmtSD ( )

Definition at line 63 of file DMXPmtSD.cc.

63 {;}

Member Function Documentation

void DMXPmtSD::clear ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 117 of file DMXPmtSD.cc.

117 {;}
void DMXPmtSD::DrawAll ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 120 of file DMXPmtSD.cc.

120 {;}
void DMXPmtSD::EndOfEvent ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 96 of file DMXPmtSD.cc.

96  {
97 
98  G4String HCname = collectionName[0];
99 
100  static G4int HCID = -1;
101  if(HCID<0)
103  HCE->AddHitsCollection(HCID,pmtCollection);
104 
105  G4int nHits = pmtCollection->entries();
106  if (verboseLevel>=1) {
107  G4cout << " PMT collection: " << nHits << " hits" << G4endl;
108  if (verboseLevel>=2)
109  pmtCollection->PrintAllHits();
110  }
111 
112 
113 }
G4int GetCollectionID(G4String colName)
Definition: G4SDManager.cc:135
virtual void PrintAllHits()
G4int entries() const
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
#define G4endl
Definition: G4ios.hh:61
G4CollectionNameVector collectionName

Here is the call graph for this function:

void DMXPmtSD::Initialize ( G4HCofThisEvent )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 67 of file DMXPmtSD.cc.

67  {
68 
69  pmtCollection = new DMXPmtHitsCollection
71 
72  HitID = -1;
73 
74 
75 }
G4THitsCollection< DMXPmtHit > DMXPmtHitsCollection
Definition: DMXPmtHit.hh:85
G4CollectionNameVector collectionName
void DMXPmtSD::PrintAll ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 123 of file DMXPmtSD.cc.

123 {;}
G4bool DMXPmtSD::ProcessHits ( G4Step aStep,
G4TouchableHistory  
)
virtual

Implements G4VSensitiveDetector.

Definition at line 81 of file DMXPmtSD.cc.

81  {
82 
83  // make known hit position
84  DMXPmtHit* aPmtHit = new DMXPmtHit();
85  aPmtHit->SetPos(aStep->GetPostStepPoint()->GetPosition());
86  aPmtHit->SetTime(aStep->GetPostStepPoint()->GetGlobalTime());
87  HitID = pmtCollection->insert(aPmtHit);
88 
89  return true;
90 
91 }
void SetPos(G4ThreeVector xyz)
Definition: DMXPmtHit.hh:74
G4int insert(T *aHit)
const G4ThreeVector & GetPosition() const
void SetTime(G4double t)
Definition: DMXPmtHit.hh:77
G4StepPoint * GetPostStepPoint() const
G4double GetGlobalTime() const

Here is the call graph for this function:


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