212 GetAverageNumberOfPhotons(charge,beta,aMaterial,Rindex);
214 if (MeanNumberOfPhotons <= 0.0) {
226 MeanNumberOfPhotons = MeanNumberOfPhotons * step_length;
230 if ( fNumPhotons <= 0 || !fStackingFlag ) {
244 if (fTrackSecondariesFirst) {
259 G4double maxCos = BetaInverse / nMax;
260 G4double maxSin2 = (1.0 - maxCos) * (1.0 + maxCos);
266 GetAverageNumberOfPhotons(charge,beta1,aMaterial,Rindex);
268 GetAverageNumberOfPhotons(charge,beta2,aMaterial,Rindex);
270 for (
G4int i = 0; i < fNumPhotons; i++) {
282 sampledEnergy = Pmin + rand * dp;
283 sampledRI = Rindex->
Value(sampledEnergy);
284 cosTheta = BetaInverse / sampledRI;
286 sin2Theta = (1.0 - cosTheta)*(1.0 + cosTheta);
290 }
while (rand*maxSin2 > sin2Theta);
305 G4double sinTheta = std::sqrt(sin2Theta);
320 photonMomentum.rotateUz(p0);
332 photonPolarization.rotateUz(p0);
340 photonPolarization.y(),
341 photonPolarization.z());
351 NumberOfPhotons = MeanNumberOfPhotons1 - rand *
352 (MeanNumberOfPhotons1-MeanNumberOfPhotons2);
354 std::max(MeanNumberOfPhotons1,MeanNumberOfPhotons2);
356 }
while (N > NumberOfPhotons);
364 G4double aSecondaryTime = t0 + deltaTime;
369 new G4Track(aCerenkovPhoton,aSecondaryTime,aSecondaryPosition);
380 G4cout <<
"\n Exiting from G4Cerenkov::DoIt -- NumberOfSecondaries = "
G4long G4Poisson(G4double mean)
G4int GetNumberOfSecondaries() const
G4double GetStepLength() const
const G4DynamicParticle * GetDynamicParticle() const
G4TrackStatus GetTrackStatus() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4ParticleDefinition * GetDefinition() const
G4double GetVelocity() const
G4double GetMaxLowEdgeEnergy()
static constexpr double twopi
G4StepPoint * GetPreStepPoint() const
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetPosition() const
void SetPolarization(G4double polX, G4double polY, G4double polZ)
G4double Value(G4double theEnergy, size_t &lastidx) const
void SetKineticEnergy(G4double aEnergy)
G4Material * GetMaterial() const
static G4OpticalPhoton * OpticalPhoton()
virtual void Initialize(const G4Track &)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
void SetNumberOfSecondaries(G4int totSecondaries)
void SetParentID(const G4int aValue)
G4StepPoint * GetPostStepPoint() const
G4VParticleChange * pParticleChange
G4ParticleChange aParticleChange
void AddSecondary(G4Track *aSecondary)
G4double GetGlobalTime() const
void ProposeTrackStatus(G4TrackStatus status)
G4double GetMinLowEdgeEnergy()
G4double GetPDGCharge() const
G4ThreeVector GetDeltaPosition() const
G4MaterialPropertyVector * GetProperty(const char *key)
const G4TouchableHandle & GetTouchableHandle() const