11 #include <beast/dosi/simulation/SensitiveDetector.h>
12 #include <beast/dosi/dataobjects/DosiSimHit.h>
14 #include <framework/datastore/StoreArray.h>
15 #include <framework/datastore/RelationArray.h>
29 Simulation::SensitiveDetectorBase(
"DosiSensitiveDetector", Const::invalidDetector)
56 mcParticles.registerInDataStore();
57 simHits.registerInDataStore();
58 relMCSimHit.registerInDataStore();
74 const G4StepPoint& preStep = *
step->GetPreStepPoint();
75 const G4StepPoint& postStep = *
step->GetPostStepPoint();
77 G4Track& track = *
step->GetTrack();
107 if (track.GetNextVolume() != track.GetVolume() || track.GetTrackStatus() >= fStopAndKill) {
108 int pdgCode = track.GetDefinition()->GetPDGEncoding();
110 const G4VPhysicalVolume& v = * track.GetVolume();
111 G4ThreeVector posCell = v.GetTranslation();
202 TVector3 momentum(mom.getX() / CLHEP::GeV, mom.getY() / CLHEP::GeV, mom.getZ() / CLHEP::GeV);
203 simHits.
appendNew(cellId, trackID, pid, tof / CLHEP::ns, edep / CLHEP::GeV, momentum, posAve);
205 B2DEBUG(150,
"HitNumber: " << simhitNumber);
206 relMCSimHit.
add(trackID, simhitNumber, 1.0);
207 return (simhitNumber);