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

#include <WLSPhotonDetSD.hh>

Inheritance diagram for WLSPhotonDetSD:
Collaboration diagram for WLSPhotonDetSD:

Public Member Functions

 WLSPhotonDetSD (G4String)
 
virtual ~WLSPhotonDetSD ()
 
virtual void Initialize (G4HCofThisEvent *)
 
virtual G4bool ProcessHits (G4Step *, G4TouchableHistory *)
 
G4bool ProcessHits_constStep (const G4Step *, G4TouchableHistory *)
 
- 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
 
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
 

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 45 of file WLSPhotonDetSD.hh.

Constructor & Destructor Documentation

WLSPhotonDetSD::WLSPhotonDetSD ( G4String  name)

Definition at line 48 of file WLSPhotonDetSD.cc.

49  : G4VSensitiveDetector(name), fPhotonDetHitCollection(0)
50 {
51  collectionName.insert("PhotonDetHitCollection");
52 }
G4VSensitiveDetector(G4String name)
G4CollectionNameVector collectionName

Here is the call graph for this function:

WLSPhotonDetSD::~WLSPhotonDetSD ( )
virtual

Definition at line 56 of file WLSPhotonDetSD.cc.

56 { }

Member Function Documentation

void WLSPhotonDetSD::Initialize ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 60 of file WLSPhotonDetSD.cc.

61 {
62  fPhotonDetHitCollection =
64  //Store collection with event and keep ID
65  static G4int HCID = -1;
66  if (HCID<0) HCID = GetCollectionID(0);
67  HCE->AddHitsCollection( HCID, fPhotonDetHitCollection );
68 }
int G4int
Definition: G4Types.hh:78
virtual G4int GetCollectionID(G4int i)
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
G4THitsCollection< WLSPhotonDetHit > WLSPhotonDetHitsCollection
G4CollectionNameVector collectionName

Here is the call graph for this function:

G4bool WLSPhotonDetSD::ProcessHits ( G4Step ,
G4TouchableHistory  
)
virtual

Implements G4VSensitiveDetector.

Definition at line 72 of file WLSPhotonDetSD.cc.

73 {
74  return false;
75 }
G4bool WLSPhotonDetSD::ProcessHits_constStep ( const G4Step aStep,
G4TouchableHistory  
)

Definition at line 79 of file WLSPhotonDetSD.cc.

83 {
84  if (aStep == NULL) return false;
85  G4Track* theTrack = aStep->GetTrack();
86 
87  // Need to know if this is an optical photon
88  if(theTrack->GetDefinition()
90 
91  // Find out information regarding the hit
92  G4StepPoint* thePostPoint = aStep->GetPostStepPoint();
93 
94  WLSUserTrackInformation* trackInformation
96 
97  G4TouchableHistory* theTouchable
98  = (G4TouchableHistory*)(thePostPoint->GetTouchable());
99 
100  G4ThreeVector photonExit = trackInformation -> GetExitPosition();
101  G4ThreeVector photonArrive = thePostPoint -> GetPosition();
102  G4double arrivalTime = theTrack -> GetGlobalTime();
103 
104  // Convert the global coordinate for arriving photons into
105  // the local coordinate of the detector
106  photonArrive = theTouchable->GetHistory()->
107  GetTopTransform().TransformPoint(photonArrive);
108 
109  // Creating the hit and add it to the collection
110  fPhotonDetHitCollection->
111  insert(new WLSPhotonDetHit(photonExit, photonArrive, arrivalTime));
112 
113  return true;
114 }
G4ParticleDefinition * GetDefinition() const
const G4VTouchable * GetTouchable() const
G4VUserTrackInformation * GetUserInformation() const
G4StepPoint * GetPostStepPoint() const
const G4NavigationHistory * GetHistory() const
static G4OpticalPhoton * OpticalPhotonDefinition()
double G4double
Definition: G4Types.hh:76
G4Track * GetTrack() const

Here is the call graph for this function:

Here is the caller graph for this function:


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