36{
38 G4Exception("GenericMuonSensitiveDetector::ProcessHits", "GenericMuonHitCollectionMissing", FatalException,
39 "Hit collection not initialized; did SetupEvent run?");
40 return false;
41 }
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();
48
51
54
55 int pdgCode=currentTrack->GetDefinition()->GetPDGEncoding();
56
57 float globalTime=postStep->GetGlobalTime();
58 float globalpreTime=preStep->GetGlobalTime();
59 float eKin=postStep->GetKineticEnergy();
60
62 float depositEnergy=post_Step->GetTotalEnergyDeposit();
64
65 TrackHelper trHelp(aStep->GetTrack());
66
67
68 m_GenericMuonHitCollection->Emplace( 0 ,globalTime,globalpreTime,position,local_position,preposition,local_preposition,pdgCode,eKin,direction,depositEnergy,StepLength,
70
71 return true;
72}
Amg::Vector3D Hep3VectorToEigen(const CLHEP::Hep3Vector &CLHEPvector)
Converts a CLHEP-based CLHEP::Hep3Vector into an Eigen-based Amg::Vector3D.
Eigen::Matrix< double, 3, 1 > Vector3D