31#include "G4HCofThisEvent.hh"
33#include "G4ThreeVector.hh"
34#include "G4SDManager.hh"
46 collectionName.insert(hitsCollectionName);
61 = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
71 G4double edep = aStep->GetTotalEnergyDeposit();
73 if (edep==0.)
return false;
77 newHit->SetTrackID (aStep->GetTrack()->GetTrackID());
78 newHit->SetChamberNb(aStep->GetPreStepPoint()->GetTouchableHandle()
80 newHit->SetEdep(edep);
81 newHit->SetPos (aStep->GetPostStepPoint()->GetPosition());
94 if ( verboseLevel>1 ) {
97 <<
"-------->Hits Collection: in this event they are " << nofHits
98 <<
" hits in the tracker chambers: " << G4endl;
Definition of the B2::TrackerSD class.
TrackerHitsCollection * fHitsCollection
G4bool ProcessHits(G4Step *step, G4TouchableHistory *history) override
void Initialize(G4HCofThisEvent *hitCollection) override
TrackerSD(const G4String &name, const G4String &hitsCollectionName)
void EndOfEvent(G4HCofThisEvent *hitCollection) override
G4THitsCollection< TrackerHit > TrackerHitsCollection