211 if (MeanNumberOfPhotons <= 0.0) {
224 MeanNumberOfPhotons = MeanNumberOfPhotons * step_length;
228 if (NumPhotons <= 0) {
256 G4double maxCos = BetaInverse / nMax;
257 G4double maxSin2 = (1.0 - maxCos) * (1.0 + maxCos);
267 for (
G4int i = 0; i < NumPhotons; i++) {
279 sampledEnergy = Pmin + rand * dp;
280 sampledRI = Rindex->
Value(sampledEnergy);
281 cosTheta = BetaInverse / sampledRI;
283 sin2Theta = (1.0 - cosTheta)*(1.0 + cosTheta);
286 }
while (rand*maxSin2 > sin2Theta);
301 G4double sinTheta = std::sqrt(sin2Theta);
316 photonMomentum.rotateUz(p0);
328 photonPolarization.rotateUz(p0);
336 (photonPolarization.x(),
337 photonPolarization.y(),
338 photonPolarization.z());
349 NumberOfPhotons = MeanNumberOfPhotons1 - delta *
350 (MeanNumberOfPhotons1-MeanNumberOfPhotons2)/
353 std::max(MeanNumberOfPhotons1,MeanNumberOfPhotons2);
354 }
while (N > NumberOfPhotons);
360 G4double aSecondaryTime = t0 + deltaTime;
366 new G4Track(aCerenkovPhoton,aSecondaryTime,aSecondaryPosition);
377 G4cout <<
"\n Exiting from G4Cerenkov::DoIt -- NumberOfSecondaries = "
402 for (
G4int i=0 ; i < numOfMaterials; i++)
409 G4Material* aMaterial = (*theMaterialTable)[i];
414 if (aMaterialPropertiesTable) {
420 if (theRefractionIndexVector) {
425 G4double currentRI = (*theRefractionIndexVector)[0];
427 if (currentRI > 1.0) {
432 G4double currentPM = theRefractionIndexVector->
436 aPhysicsOrderedFreeVector->
437 InsertValues(currentPM , currentCAI);
452 currentRI = (*theRefractionIndexVector)[ii];
453 currentPM = theRefractionIndexVector->
Energy(ii);
455 currentCAI = 0.5*(1.0/(prevRI*prevRI) +
456 1.0/(currentRI*currentRI));
458 currentCAI = prevCAI +
459 (currentPM - prevPM) * currentCAI;
461 aPhysicsOrderedFreeVector->
462 InsertValues(currentPM, currentCAI);
465 prevCAI = currentCAI;
527 if (aMaterialPropertiesTable)
528 Rindex = aMaterialPropertiesTable->
GetProperty(
"RINDEX");
538 if ( BetaMin >= 1. )
return StepLimit;
540 G4double GammaMin = 1./std::sqrt(1.-BetaMin*BetaMin);
542 if (gamma < GammaMin )
return StepLimit;
544 G4double kinEmin = mass*(GammaMin-1.);
547 GetRange(particleType,
551 GetRange(particleType,
556 if (Step < 1.*um )
return StepLimit;
558 if (Step > 0. && Step < StepLimit) StepLimit = Step;
568 GetDefinition()->GetPDGCharge();
574 if (MeanNumberOfPhotons > 0.0) Step =
fMaxPhotons /
577 if (Step > 0. && Step < StepLimit) StepLimit = Step;
584 GetDEDX(particleType,
589 1./std::sqrt(1.-beta*beta*
593 Step = mass * deltaGamma / dedx;
595 if (Step > 0. && Step < StepLimit) StepLimit = Step;
617 if(beta <= 0.0)
return 0.0;
649 if (nMax < BetaInverse) {
656 else if (nMin > BetaInverse) {
674 G4double CAImin = CerenkovAngleIntegrals->
675 GetValue(Pmin, isOutRange);
676 ge = CAImax - CAImin;
686 (dp - ge * BetaInverse*BetaInverse);
G4double condition(const G4ErrorSymMatrix &m)
static void SetMaxBetaChangePerStep(const G4double d)
G4long G4Poisson(G4double mean)
G4int GetNumberOfSecondaries() const
static G4LossTableManager * Instance()
G4MaterialPropertyVector * GetProperty(const char *key)
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
G4double GetTotalEnergy() const
G4double GetStepLength() const
const G4DynamicParticle * GetDynamicParticle() const
static void SetTrackSecondariesFirst(const G4bool state)
G4double GetAverageNumberOfPhotons(const G4double charge, const G4double beta, const G4Material *aMaterial, G4MaterialPropertyVector *Rindex) const
G4double PostStepGetPhysicalInteractionLength(const G4Track &aTrack, G4double, G4ForceCondition *)
G4TrackStatus GetTrackStatus() const
static G4MaterialTable * GetMaterialTable()
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
std::vector< G4Material * > G4MaterialTable
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4ParticleDefinition * GetDefinition() const
G4double GetVelocity() const
G4PhysicsTable * thePhysicsTable
size_t GetVectorLength() const
const G4String & GetParticleName() const
G4double GetMaxLowEdgeEnergy()
G4double GetTotalMomentum() const
G4StepPoint * GetPreStepPoint() const
G4double GetMeanFreePath(const G4Track &aTrack, G4double, G4ForceCondition *)
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetPosition() const
static G4double fMaxBetaChange
void SetProcessSubType(G4int)
static const double perCent
static void SetMaxNumPhotonsPerStep(const G4int NumPhotons)
void SetPolarization(G4double polX, G4double polY, G4double polZ)
G4double Energy(size_t index) const
G4double Value(G4double theEnergy, size_t &lastidx) const
static size_t GetNumberOfMaterials()
const G4String & GetProcessName() const
void SetKineticEnergy(G4double aEnergy)
G4double GetEnergy(G4double aValue)
G4Material * GetMaterial() const
G4bool IsShortLived() const
G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep)
static G4OpticalPhoton * OpticalPhoton()
virtual void Initialize(const G4Track &)
G4double GetPDGMass() const
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)
void insertAt(size_t, G4PhysicsVector *)
G4Cerenkov(const G4String &processName="Cerenkov", G4ProcessType type=fElectromagnetic)
G4double GetGlobalTime() const
void ProposeTrackStatus(G4TrackStatus status)
void BuildPhysicsTable(const G4ParticleDefinition &aParticleType)
static const double eplus
G4double GetMinLowEdgeEnergy()
G4double GetPDGCharge() const
G4ThreeVector G4ParticleMomentum
G4ThreeVector GetDeltaPosition() const
G4bool IsFilledVectorExist() const
const G4TouchableHandle & GetTouchableHandle() const
void BuildThePhysicsTable()
static G4bool fTrackSecondariesFirst
G4bool IsApplicable(const G4ParticleDefinition &aParticleType)