43 G4ThreeVector
pos = aStep->GetTrack()->GetPosition();
44 G4ThreeVector
momentum = aStep->GetPreStepPoint()->GetMomentum();
49 if (aStep->GetTrack()->GetDefinition() != G4OpticalPhoton::OpticalPhotonDefinition()){
58 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
66 G4StepPoint *endPoint = aStep->GetPostStepPoint();
67 if (endPoint->GetStepStatus() != fGeomBoundary)
77 G4MaterialPropertiesTable *MPT = aStep->GetPreStepPoint()->GetMaterial()->GetMaterialPropertiesTable();
80 G4MaterialPropertyVector *RindexMPV = MPT->GetProperty(kRINDEX);
86 double photonEnergy = aStep->GetTrack()->GetDynamicParticle()->GetTotalMomentum();
87 Rindex = RindexMPV->Value(photonEnergy,
index);
90 G4ThreeVector momDir = aStep->GetPreStepPoint()->GetMomentumDirection();
91 G4double angleFromY =
atan(sqrt(1 -
pow(momDir.y(), 2.0)) / momDir.y());
95 if (angleFromY > asin(1.0 / Rindex)){
96 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
105 G4bool isTIR =
false;
106 G4ProcessVector *postStepDoItVector = G4OpticalPhoton::OpticalPhotonDefinition()->GetProcessManager()->GetPostStepProcessVector(typeDoIt);
107 G4int n_proc = postStepDoItVector->entries();
108 for (G4int
i = 0;
i < n_proc; ++
i){
109 G4OpBoundaryProcess *opProc =
dynamic_cast<G4OpBoundaryProcess *
>((*postStepDoItVector)[
i]);
110 if (opProc && opProc->GetStatus() == TotalInternalReflection){
117 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
126 G4MaterialPropertyVector *AbsMPV = MPT->GetProperty(kABSLENGTH);
127 G4double Absorption = AbsMPV->Value(aStep->GetTrack()->GetDynamicParticle()->GetTotalMomentum(),
index);
130 G4double absChance = 1 -
exp(-pathLength / Absorption);
133 if (CLHEP::RandFlat::shoot(0.0, 1.0) < absChance){
134 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
144 id = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetCopyNo();
152 m_hitMap.insert(std::pair<uint32_t,ZDC_SimFiberHit*>(
hash,hit));
154 it->second->Add(1, photonEnergy);
160 aStep->GetTrack()->SetTrackStatus(fStopAndKill);