16 #include "G4HCofThisEvent.hh" 18 #include "G4ThreeVector.hh" 19 #include "G4SDManager.hh" 21 #include "G4UnitsTable.hh" 23 #include "G4VPhysicalVolume.hh" 24 #include "G4TouchableHistory.hh" 25 #include "G4VTouchable.hh" 27 #include "G4PhysicalConstants.hh" 28 #include "G4SystemOfUnits.hh" 34 collectionName.insert(HCname=
"gasCollection");
48 (SensitiveDetectorName,collectionName[0]);
49 static G4int HCID = -1;
51 HCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
62 G4double edep = -aStep->GetDeltaEnergy()/MeV;
64 if(edep==0.)
return false;
68 newHit->
SetTrackID(aStep->GetTrack()->GetTrackID());
69 newHit->
SetParentID(aStep->GetTrack()->GetParentID());
74 newHit->
SetParticleMass(aStep->GetTrack()->GetDefinition()->GetPDGMass());
75 newHit->
SetParticleID(aStep->GetTrack()->GetDefinition()->GetPDGEncoding());
76 newHit->
SetPrePos(aStep->GetPreStepPoint()->GetPosition()/mm);
77 newHit->
SetPostPos(aStep->GetPostStepPoint()->GetPosition()/mm);
78 newHit->
SetPreToF(aStep->GetPreStepPoint()->GetGlobalTime()/ns);
79 newHit->
SetPostToF(aStep->GetPostStepPoint()->GetGlobalTime()/ns);
81 newHit->
SetStepEnergy(aStep->GetTrack()->GetKineticEnergy()/MeV);
83 newHit->
SetDetName(aStep->GetTrack()->GetVolume()->GetName());
84 newHit->
SetDetID(aStep->GetTrack()->GetVolume()->GetCopyNo());
103 if (verboseLevel>0) {
104 G4cout <<
"Hits Collection: in this event they are " << NbHits
105 <<
" (GEANT-like) hits in the gas volume: " << G4endl;
void SetParentID(G4int track)
ActarSimGasSD(G4String)
Constructor.
void SetStepLength(G4double len)
void SetPostToF(G4double Time)
ActarSimGasGeantHitsCollection * hitsCollection
Geant step-like hits collect.
void SetEdep(G4double de)
G4THitsCollection< ActarSimGasGeantHit > ActarSimGasGeantHitsCollection
void SetTrackID(G4int track)
~ActarSimGasSD()
Destructor.
void SetParticleCharge(G4double pc)
void SetDetName(G4String Name)
void SetPrePos(G4ThreeVector xyz)
void SetStepEnergy(G4double sten)
void SetPostPos(G4ThreeVector xyz)
void SetParticleMass(G4double pm)
void EndOfEvent(G4HCofThisEvent *)
void SetParticleID(G4int pi)
void SetPreToF(G4double Time)
void Initialize(G4HCofThisEvent *)
G4bool ProcessHits(G4Step *, G4TouchableHistory *)