98 fTrackSecondariesFirst(false),
214 if (MeanNumberOfPhotons <= 0.0) {
226 MeanNumberOfPhotons = MeanNumberOfPhotons * step_length;
259 G4double maxCos = BetaInverse / nMax;
260 G4double maxSin2 = (1.0 - maxCos) * (1.0 + maxCos);
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);
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 = "
405 for (
G4int i=0 ; i < numOfMaterials; i++) {
412 G4Material* aMaterial = (*theMaterialTable)[i];
417 if (aMaterialPropertiesTable) {
422 if (theRefractionIndexVector) {
427 G4double currentRI = (*theRefractionIndexVector)[0];
429 if (currentRI > 1.0) {
437 aPhysicsOrderedFreeVector->
InsertValues(currentPM , currentCAI);
451 currentRI = (*theRefractionIndexVector)[ii];
452 currentPM = theRefractionIndexVector->
Energy(ii);
454 currentCAI = 0.5*(1.0/(prevRI*prevRI) +
455 1.0/(currentRI*currentRI));
457 currentCAI = prevCAI + (currentPM - prevPM) * currentCAI;
459 aPhysicsOrderedFreeVector->
460 InsertValues(currentPM, currentCAI);
463 prevCAI = currentCAI;
526 if (aMaterialPropertiesTable)
537 if ( BetaMin >= 1. )
return StepLimit;
539 G4double GammaMin = 1./std::sqrt(1.-BetaMin*BetaMin);
541 if (gamma < GammaMin )
return StepLimit;
543 G4double kinEmin = mass*(GammaMin-1.);
555 if (Step > 0. && Step < StepLimit) StepLimit = Step;
570 if (MeanNumberOfPhotons > 0.0) Step =
fMaxPhotons / MeanNumberOfPhotons;
572 if (Step > 0. && Step < StepLimit) StepLimit = Step;
582 G4double deltaGamma = gamma - 1./std::sqrt(1.-beta*beta*
586 Step = mass * deltaGamma / dedx;
588 if (Step > 0. && Step < StepLimit) StepLimit = Step;
610 if(beta <= 0.0)
return 0.0;
642 if (nMax < BetaInverse) {
649 else if (nMin > BetaInverse) {
668 ge = CAImax - CAImin;
678 (dp - ge * BetaInverse*BetaInverse);
688 for (
G4int i = 0 ; i < PhysicsTableSize ; i++ ) {
G4double Energy(size_t index) const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep) override
void SetPolarization(G4double polX, G4double polY, G4double polZ)
G4int GetNumberOfSecondaries() const
static size_t GetNumberOfMaterials()
G4bool IsFilledVectorExist() const
static G4MaterialTable * GetMaterialTable()
void SetKineticEnergy(G4double aEnergy)
void InsertValues(G4double energy, G4double value)
G4StepPoint * GetPreStepPoint() const
G4double GetEnergy(G4double aValue)
void SetMaxBetaChangePerStep(const G4double d)
const G4String & GetParticleName() const
G4double GetPDGCharge() const
void SetMaxNumPhotonsPerStep(const G4int NumPhotons)
Hep3Vector & rotateUz(const Hep3Vector &)
void insertAt(size_t, G4PhysicsVector *)
G4double Value(G4double theEnergy, size_t &lastidx) const
G4double condition(const G4ErrorSymMatrix &m)
G4double GetPDGMass() const
void BuildThePhysicsTable()
const G4TouchableHandle & GetTouchableHandle() const
void AddSecondary(G4Track *aSecondary)
G4double GetVelocity() const
G4double GetValue(G4double theEnergy, G4bool &isOutRange) const
G4double GetMaxLowEdgeEnergy()
G4ParticleChange aParticleChange
void SetTrackSecondariesFirst(const G4bool state)
void DumpValues(G4double unitE=1.0, G4double unitV=1.0) const
G4double GetMinLowEdgeEnergy()
G4ParticleDefinition * GetDefinition() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
G4VParticleChange * pParticleChange
static constexpr double perCent
const XML_Char int const XML_Char * value
virtual void Initialize(const G4Track &)
G4PhysicsTable * thePhysicsTable
G4double GetStepLength() const
const G4ThreeVector & GetPosition() const
static constexpr double twopi
static G4OpticalPhoton * OpticalPhoton()
void SetTouchableHandle(const G4TouchableHandle &apValue)
const G4String & GetProcessName() const
static constexpr double eV
G4double GetGlobalTime() const
G4StepPoint * GetPostStepPoint() const
G4Material * GetMaterial() const
G4bool fTrackSecondariesFirst
G4double GetRange(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
G4double PostStepGetPhysicalInteractionLength(const G4Track &aTrack, G4double, G4ForceCondition *) override
G4double G4ParticleHPJENDLHEData::G4double result
std::vector< G4Material * > G4MaterialTable
G4Cerenkov(const G4String &processName="Cerenkov", G4ProcessType type=fElectromagnetic)
static constexpr double eplus
void SetParentID(const G4int aValue)
void BuildPhysicsTable(const G4ParticleDefinition &aParticleType) override
void DumpPhysicsTable() const
G4double GetMeanFreePath(const G4Track &aTrack, G4double, G4ForceCondition *)
void SetProcessSubType(G4int)
G4double GetKineticEnergy() const
static constexpr double cm
G4GLOB_DLL std::ostream G4cout
static G4LossTableManager * Instance()
G4MaterialPropertyVector * GetProperty(const char *key, G4bool warning=false)
G4long G4Poisson(G4double mean)
G4ThreeVector GetDeltaPosition() const
G4bool IsShortLived() const
G4double GetTotalMomentum() const
G4double GetTotalEnergy() const
G4double GetAverageNumberOfPhotons(const G4double charge, const G4double beta, const G4Material *aMaterial, G4MaterialPropertyVector *Rindex) const
G4TrackStatus GetTrackStatus() const
void ProposeTrackStatus(G4TrackStatus status)
const G4DynamicParticle * GetDynamicParticle() const
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
size_t GetVectorLength() const
G4double GetDEDX(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
G4bool IsApplicable(const G4ParticleDefinition &aParticleType) override
void SetNumberOfSecondaries(G4int totSecondaries)