36 #include "G4HCofThisEvent.hh" 84 if(edep==0.)
return false;
87 newHit->
SetTrackID (aStep->GetTrack()->GetTrackID());
88 newHit->
SetChamberNb(aStep->GetPreStepPoint()->GetTouchable()
89 ->GetReplicaNumber());
91 newHit->
SetPos (aStep->GetPostStepPoint()->GetPosition());
106 std::vector<ExP01TrackerHit*> hitsVector;
109 G4cout <<
"\n-------->Storing hits in the ROOT file: in this event there are " << NbHits
110 <<
" hits in the tracker chambers: " <<
G4endl;
115 for (
G4int i=0;i<NbHits;i++)
static RootIO * GetInstance()
G4String SensitiveDetectorName
G4int GetCollectionID(G4String colName)
virtual void Initialize(G4HCofThisEvent *)
void Write(std::vector< ExP01TrackerHit *> *)
Hit implementation for the persistency example.
Definition of the ExP01TrackerSD class.
G4GLOB_DLL std::ostream G4cout
void insert(G4String str)
ExP01TrackerHitsCollection * fTrackerCollection
virtual void EndOfEvent(G4HCofThisEvent *)
void SetEdep(G4double de)
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
G4THitsCollection< ExP01TrackerHit > ExP01TrackerHitsCollection
void SetPos(G4ThreeVector xyz)
void SetChamberNb(G4int chamb)
static G4SDManager * GetSDMpointer()
Definition of the RootIO class.
G4CollectionNameVector collectionName
virtual G4bool ProcessHits(G4Step *, G4TouchableHistory *)
void SetTrackID(G4int track)