31#include "G4HCofThisEvent.hh"
33#include "G4ThreeVector.hh"
34#include "G4SDManager.hh"
44 collectionName.insert(hitsCollectionName);
64 = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
74 G4double edep = aStep->GetTotalEnergyDeposit();
76 if (edep==0.)
return false;
80 newHit->
SetTrackID (aStep->GetTrack()->GetTrackID());
81 newHit->
SetChamberNb(aStep->GetPreStepPoint()->GetTouchableHandle()
84 newHit->
SetPos (aStep->GetPostStepPoint()->GetPosition());
97 if ( verboseLevel>1 ) {
99 G4cout <<
"\n-------->Hits Collection: in this event they are " << nofHits
100 <<
" hits in the tracker chambers: " << G4endl;
G4THitsCollection< B2TrackerHit > B2TrackerHitsCollection
Definition of the B2TrackerSD class.
void SetPos(G4ThreeVector xyz)
void SetChamberNb(G4int chamb)
void SetEdep(G4double de)
void SetTrackID(G4int track)
virtual void Initialize(G4HCofThisEvent *hitCollection)
B2TrackerSD(const G4String &name, const G4String &hitsCollectionName)
virtual G4bool ProcessHits(G4Step *step, G4TouchableHistory *history)
B2TrackerHitsCollection * fHitsCollection
virtual void EndOfEvent(G4HCofThisEvent *hitCollection)