Geant4  10.02.p03
RE01TrackerSD Class Reference

#include <RE01TrackerSD.hh>

Inheritance diagram for RE01TrackerSD:
Collaboration diagram for RE01TrackerSD:

Public Member Functions

 RE01TrackerSD (G4String name)
 
virtual ~RE01TrackerSD ()
 
virtual void Initialize (G4HCofThisEvent *HCE)
 
virtual void EndOfEvent (G4HCofThisEvent *HCE)
 
- 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 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)
 
- Protected Member Functions inherited from G4VSensitiveDetector
virtual G4int GetCollectionID (G4int i)
 

Private Attributes

RE01TrackerHitsCollectionfTrackerCollection
 

Additional Inherited Members

- Protected Attributes inherited from G4VSensitiveDetector
G4CollectionNameVector collectionName
 
G4String SensitiveDetectorName
 
G4String thePathName
 
G4String fullPathName
 
G4int verboseLevel
 
G4bool active
 
G4VReadOutGeometryROgeometry
 
G4VSDFilterfilter
 

Detailed Description

Definition at line 41 of file RE01TrackerSD.hh.

Constructor & Destructor Documentation

◆ RE01TrackerSD()

RE01TrackerSD::RE01TrackerSD ( G4String  name)

Definition at line 42 of file RE01TrackerSD.cc.

44 {
45  G4String HCname;
46  collectionName.insert(HCname="trackerCollection");
47 }
G4VSensitiveDetector(G4String name)
G4CollectionNameVector collectionName
RE01TrackerHitsCollection * fTrackerCollection
Here is the call graph for this function:

◆ ~RE01TrackerSD()

RE01TrackerSD::~RE01TrackerSD ( )
virtual

Definition at line 50 of file RE01TrackerSD.cc.

50 {;}

Member Function Documentation

◆ EndOfEvent()

void RE01TrackerSD::EndOfEvent ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 84 of file RE01TrackerSD.cc.

85 {;}

◆ Initialize()

void RE01TrackerSD::Initialize ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 53 of file RE01TrackerSD.cc.

54 {
55  static int HCID = -1;
58  if(HCID<0)
59  { HCID = GetCollectionID(0); }
61 }
G4THitsCollection< RE01TrackerHit > RE01TrackerHitsCollection
virtual G4int GetCollectionID(G4int i)
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
G4CollectionNameVector collectionName
RE01TrackerHitsCollection * fTrackerCollection
Here is the call graph for this function:

◆ ProcessHits()

G4bool RE01TrackerSD::ProcessHits ( G4Step *  aStep,
G4TouchableHistory ROhist 
)
protectedvirtual

Implements G4VSensitiveDetector.

Definition at line 64 of file RE01TrackerSD.cc.

65 {
66  G4double edep = aStep->GetTotalEnergyDeposit();
67  if(edep==0.) return false;
68 
69  RE01TrackerHit* newHit = new RE01TrackerHit();
70  newHit->SetEdep( edep );
71  newHit->SetPos( aStep->GetPreStepPoint()->GetPosition() );
72  RE01TrackInformation* trackInfo =
73  (RE01TrackInformation*)(aStep->GetTrack()->GetUserInformation());
74  if(trackInfo->GetTrackingStatus()>0)
75  { newHit->SetTrackID( aStep->GetTrack()->GetTrackID() ); }
76  else
77  { newHit->SetTrackID( -1 ); }
78  fTrackerCollection->insert( newHit );
79 
80  return true;
81 }
void SetPos(G4ThreeVector xyz)
void SetTrackID(G4int i)
Double_t edep
void SetEdep(G4double de)
double G4double
Definition: G4Types.hh:76
RE01TrackerHitsCollection * fTrackerCollection
Here is the call graph for this function:

Member Data Documentation

◆ fTrackerCollection

RE01TrackerHitsCollection* RE01TrackerSD::fTrackerCollection
private

Definition at line 54 of file RE01TrackerSD.hh.


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