2 #include "G4RunManager.hh"
3 #include "G4Material.hh"
5 #include "G4VTouchable.hh"
6 #include "G4TouchableHistory.hh"
7 #include "G4SDManager.hh"
11 using namespace TelescopeSimulatorLX;
15 collectionName.insert(
"MercedesHits");
26 static int HCID1 = -1;
31 HCID1 = GetCollectionID(0);
38 G4TouchableHistory* theTouchable
39 = (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable());
41 G4String thisVolume = theTouchable->GetVolume()->GetName();
42 G4String particleName = aStep->GetTrack()->GetDefinition()->GetParticleName();
44 G4VPhysicalVolume* fPhysVolume = theTouchable->GetVolume();
45 G4String VolumeName = fPhysVolume->GetName();
46 G4int copyNo = fPhysVolume->GetCopyNo();
48 if (particleName ==
"opticalphoton")
53 G4double globalTOF = aStep->GetTrack()->GetGlobalTime();
54 G4double kineticEnergy = aStep->GetTrack()->GetKineticEnergy();
55 G4double wavelength = h_Planck*c_light/kineticEnergy;
56 G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
57 G4ThreeVector worldPos = preStepPoint->GetPosition();
58 G4ThreeVector localPos =
59 theTouchable->GetHistory()->GetTopTransform().TransformPoint(worldPos);
60 G4ThreeVector HitPosition = localPos;
61 G4ThreeVector HitDirection = aStep->GetPreStepPoint()->GetMomentumDirection();
62 G4ThreeVector SDposition = fPhysVolume->GetObjectTranslation();
84 static G4int HCID = -1;
86 HCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
G4bool ProcessHits(G4Step *, G4TouchableHistory *)
G4THitsCollection< FDsimG4OpticalHit > FDsimG4OpticalHitsCollection
void EndOfEvent(G4HCofThisEvent *)
FDsimG4MercedesSD(G4String)
void SetTime(G4double Ti)
void SetEnergy(G4double En)
void Initialize(G4HCofThisEvent *)
void SetDirection(G4ThreeVector xyz)
void SetPixelPosition(G4ThreeVector xyz)
void SetWavelength(G4double Wv)
void SetWorldPosition(G4ThreeVector xyz)
FDsimG4OpticalHitsCollection * MercedesHitsCollection
void SetPosition(G4ThreeVector xyz)