32#include "G4HCofThisEvent.hh"
34#include "G4ThreeVector.hh"
35#include "G4SDManager.hh"
43 collectionName.insert(HCname=
"trackerCollection");
55 (SensitiveDetectorName,collectionName[0]);
56 static G4int HCID = -1;
59 HCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
67 G4double edep = aStep->GetTotalEnergyDeposit();
69 if(edep==0.) {
return false; }
72 newHit->
SetTrackID (aStep->GetTrack()->GetTrackID());
73 newHit->
SetChamberNb(aStep->GetPreStepPoint()->GetTouchableHandle()
76 newHit->
SetPos (aStep->GetPostStepPoint()->GetPosition());
89 G4cout <<
"\n-------->Hits Collection: in this event there are " << NbHits
90 <<
" hits in the tracker chambers: " << G4endl;
91 for (G4int i=0;i<NbHits;i++)
93 (*fTrackerCollection)[i]->Print();
G4THitsCollection< ExTGTrackerHit > ExTGTrackerHitsCollection
Definition of the ExTGTrackerSD class.
void SetChamberNb(G4int chamb)
void SetTrackID(G4int track)
void SetEdep(G4double de)
void SetPos(G4ThreeVector xyz)
ExTGTrackerHitsCollection * fTrackerCollection
G4bool ProcessHits(G4Step *, G4TouchableHistory *)
void Initialize(G4HCofThisEvent *)
void EndOfEvent(G4HCofThisEvent *)