19 #include "Geant4/G4SDManager.hh" 25 : G4VSensitiveDetector(DetectorUniqueName)
28 G4SDManager::GetSDMpointer()->AddNewDetector(
this);
49 aStep->GetTrack()->GetVertexPosition().x(),
50 aStep->GetTrack()->GetVertexPosition().y(),
51 aStep->GetTrack()->GetVertexPosition().z()
55 ThePhoton.
Time = aStep->GetTrack()->GetGlobalTime();
58 ThePhoton.
Energy = aStep->GetTrack()->GetVertexKineticEnergy();
61 G4StepPoint *preStepPoint = aStep->GetPreStepPoint();
66 G4ThreeVector worldPosition = preStepPoint->GetPosition();
67 G4ThreeVector localPosition = preStepPoint->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(worldPosition);
68 ThePhoton.
FinalLocalPosition = TVector3(localPosition.x()/CLHEP::cm, localPosition.y()/CLHEP::cm, localPosition.z()/CLHEP::cm);
75 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
void AddPhoton(size_t opchannel, sim::OnePhoton &&photon)
contains objects relating to OpDet hits
static OpDetLookup * Instance()
int GetOpDet(G4VPhysicalVolume *)
static OpDetPhotonTable * Instance(bool LitePhotons=false)
OpDetLookup * fTheOpDetLookup
OpDetPhotonTable * fThePhotonTable
OpDetSensitiveDetector(G4String name)
TVector3 FinalLocalPosition
virtual void Initialize(G4HCofThisEvent *)
virtual G4bool ProcessHits(G4Step *, G4TouchableHistory *)