9 #include "G4OpticalPhoton.hh"
21 :G4VSensitiveDetector(name)
23 collectionName.insert(
"PMTHitCollection");
51 if (aStep->GetTrack()->GetDefinition() != G4OpticalPhoton::OpticalPhotonDefinition())
54 G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
55 G4StepPoint* postStepPoint = aStep->GetPostStepPoint();
57 if (postStepPoint->GetStepStatus() != fGeomBoundary)
return false;
58 if (preStepPoint->GetStepStatus() != fGeomBoundary)
return false;
60 G4double currentPhotonEnergy = aStep->GetTrack()->GetTotalEnergy();
78 G4TrajectoryContainer* trajectoryContainer =
79 G4RunManager::GetRunManager()->GetCurrentEvent()->GetTrajectoryContainer();
81 if(trajectoryContainer==0) {
82 G4cout <<
" Could not find the TrajectoryContainer" << G4endl;
87 G4int n_entries = trajectoryContainer->entries();
88 while( i < n_entries) {
90 G4cout <<
" Current charge of possible parent track = " <<trj->
GetCharge() <<
"--- Parent ID = "
QweakSimPMTOnly_PMTHitsCollection * PMTOnly_PMTHitsCollection
Stores the information about the various tracks.
virtual G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *)
QweakSimTrajectory * GetParentTrajectory(G4int parentID)
void StorePhotonEnergy(G4double eng)
G4THitsCollection< QweakSimPMTOnly_PMTHit > QweakSimPMTOnly_PMTHitsCollection
G4int PMTOnlyPMT_CollectionID
void EndOfEvent(G4HCofThisEvent *HCE)
QweakSimUserInformation * myUserInfo
G4double GetCharge() const
void StoreHitID(G4int hitID)
QweakSimPMTOnly_PMTSD(G4String name, QweakSimUserInformation *userInfo)
void Initialize(G4HCofThisEvent *HCE)
G4bool ProcessHits_constStep(const G4Step *, G4TouchableHistory *)