38 G4Exception(
"GenericMuonSensitiveDetector::ProcessHits",
"GenericMuonHitCollectionMissing", FatalException,
39 "Hit collection not initialized; did SetupEvent run?");
42 G4cout <<
"Hit in a sensitive layer!!!!! " << G4endl;
43 G4Track* currentTrack = aStep->GetTrack();
44 const G4AffineTransform trans = currentTrack->GetTouchable()->GetHistory()->GetTopTransform();
45 G4StepPoint* postStep=aStep->GetPostStepPoint();
46 G4StepPoint* preStep=aStep->GetPreStepPoint();
47 const G4Step* post_Step=aStep->GetTrack()->GetStep();
55 int pdgCode=currentTrack->GetDefinition()->GetPDGEncoding();
57 float globalTime=postStep->GetGlobalTime();
58 float globalpreTime=preStep->GetGlobalTime();
59 float eKin=postStep->GetKineticEnergy();
62 float depositEnergy=post_Step->GetTotalEnergyDeposit();
63 float StepLength=post_Step->GetStepLength();
68 m_GenericMuonHitCollection->Emplace( 0 ,globalTime,globalpreTime,position,local_position,preposition,local_preposition,pdgCode,eKin,direction,depositEnergy,StepLength,