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

#include <ExN02TrackerSD.hh>

Inheritance diagram for ExN02TrackerSD:
Collaboration diagram for ExN02TrackerSD:

Public Member Functions

 ExN02TrackerSD (G4String)
 
 ~ExN02TrackerSD ()
 
void Initialize (G4HCofThisEvent *)
 
G4bool ProcessHits (G4Step *, G4TouchableHistory *)
 
void EndOfEvent (G4HCofThisEvent *)
 
- 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
 

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 46 of file ExN02TrackerSD.hh.

Constructor & Destructor Documentation

ExN02TrackerSD::ExN02TrackerSD ( G4String  name)

Definition at line 44 of file ExN02TrackerSD.cc.

46 {
47  G4String HCname;
48  collectionName.insert(HCname="trackerCollection");
49 }
G4VSensitiveDetector(G4String name)
G4CollectionNameVector collectionName

Here is the call graph for this function:

ExN02TrackerSD::~ExN02TrackerSD ( )

Definition at line 53 of file ExN02TrackerSD.cc.

53 { }

Member Function Documentation

void ExN02TrackerSD::EndOfEvent ( G4HCofThisEvent )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 91 of file ExN02TrackerSD.cc.

92 {
93  if (verboseLevel>0) {
94  G4int NbHits = trackerCollection->entries();
95  G4cout << "\n-------->Hits Collection: in this event they are " << NbHits
96  << " hits in the tracker chambers: " << G4endl;
97  for (G4int i=0;i<NbHits;i++) (*trackerCollection)[i]->Print();
98  }
99 }
G4int entries() const
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

void ExN02TrackerSD::Initialize ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 57 of file ExN02TrackerSD.cc.

58 {
59  trackerCollection = new ExN02TrackerHitsCollection
61  static G4int HCID = -1;
62  if(HCID<0)
64  HCE->AddHitsCollection( HCID, trackerCollection );
65 }
G4int GetCollectionID(G4String colName)
Definition: G4SDManager.cc:135
int G4int
Definition: G4Types.hh:78
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
G4THitsCollection< ExN02TrackerHit > ExN02TrackerHitsCollection
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
G4CollectionNameVector collectionName

Here is the call graph for this function:

G4bool ExN02TrackerSD::ProcessHits ( G4Step aStep,
G4TouchableHistory  
)
virtual

Implements G4VSensitiveDetector.

Definition at line 69 of file ExN02TrackerSD.cc.

70 {
71  G4double edep = aStep->GetTotalEnergyDeposit();
72 
73  if(edep==0.) return false;
74 
75  ExN02TrackerHit* newHit = new ExN02TrackerHit();
76  newHit->SetTrackID (aStep->GetTrack()->GetTrackID());
78  ->GetCopyNumber());
79  newHit->SetEdep (edep);
80  newHit->SetPos (aStep->GetPostStepPoint()->GetPosition());
81  trackerCollection->insert( newHit );
82 
83  //newHit->Print();
84  //newHit->Draw();
85 
86  return true;
87 }
G4int insert(T *aHit)
G4int GetCopyNumber(G4int depth=0) const
G4StepPoint * GetPreStepPoint() const
const G4ThreeVector & GetPosition() const
G4int GetTrackID() const
G4double GetTotalEnergyDeposit() const
void SetPos(G4ThreeVector xyz)
void SetTrackID(G4int track)
G4StepPoint * GetPostStepPoint() const
void SetEdep(G4double de)
void SetChamberNb(G4int chamb)
double G4double
Definition: G4Types.hh:76
G4Track * GetTrack() const
const G4TouchableHandle & GetTouchableHandle() const

Here is the call graph for this function:


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