122 if(primaryEnergy < WLSIntegral->GetMinValue())
127 G4int NumPhotons = 1;
142 std::vector<G4Track*> proposedSecondaries;
149 for(
G4int i = 0; i < NumPhotons; ++i)
155 if(sampledEnergy > primaryEnergy)
158 ed <<
"Sampled photon energy " << sampledEnergy <<
" is greater than "
159 <<
"the primary photon energy " << primaryEnergy <<
G4endl;
164 G4cout <<
"G4OpWLS: Created photon with energy: " << sampledEnergy
170 G4double sint = std::sqrt((1. - cost) * (1. + cost));
176 G4ThreeVector photonPolarization(cost * cosp, cost * sinp, -sint);
180 sinp = std::sin(phi);
181 cosp = std::cos(phi);
182 photonPolarization = (cosp * photonPolarization + sinp * perp).unit();
187 sec_dp->SetPolarization(photonPolarization);
188 sec_dp->SetKineticEnergy(sampledEnergy);
198 proposedSecondaries.push_back(secTrack);
202 for(
auto sec : proposedSecondaries)
208 G4cout <<
"\n Exiting from G4OpWLS::DoIt -- NumberOfSecondaries = "
230 for(std::size_t i = 0; i < numOfMaterials; ++i)
237 (*materialTable)[i]->GetMaterialPropertiesTable();
245 G4double currentIN = (*wlsVector)[0];
251 physVector->InsertValues(currentPM, currentCII);
262 currentPM = wlsVector->
Energy(j);
263 currentIN = (*wlsVector)[j];
265 prevCII + 0.5 * (currentPM - prevPM) * (prevIN + currentIN);
267 physVector->InsertValues(currentPM, currentCII);
270 prevCII = currentCII;
294 attLength = attVector->
Value(thePhotonEnergy, idx_wls);
312 else if(name ==
"exponential")
320 "generator does not exist");
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4PhysicsFreeVector G4MaterialPropertyVector
std::vector< G4Material * > G4MaterialTable
G4ThreeVector G4ParticleMomentum
G4long G4Poisson(G4double mean)
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
Hep3Vector cross(const Hep3Vector &) const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4bool ConstPropertyExists(const G4String &key) const
G4double GetConstProperty(const G4String &key) const
G4MaterialPropertyVector * GetProperty(const char *key) const
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
static std::size_t GetNumberOfMaterials()
std::size_t GetIndex() const
static G4MaterialTable * GetMaterialTable()
virtual void BuildPhysicsTable(const G4ParticleDefinition &aParticleType) override
virtual void Initialise()
void SetVerboseLevel(G4int)
virtual G4double GetMeanFreePath(const G4Track &aTrack, G4double, G4ForceCondition *) override
G4PhysicsTable * theIntegralTable
virtual G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep) override
G4VWLSTimeGeneratorProfile * WLSTimeGeneratorProfile
G4OpWLS(const G4String &processName="OpWLS", G4ProcessType type=fOptical)
virtual void UseTimeProfile(const G4String name)
virtual void PreparePhysicsTable(const G4ParticleDefinition &) override
static G4OpticalParameters * Instance()
G4String GetWLSTimeProfile() const
void SetWLSTimeProfile(const G4String &)
void SetWLSVerboseLevel(G4int)
G4int GetWLSVerboseLevel() const
static G4OpticalPhoton * OpticalPhoton()
G4double GetEnergy(const G4double value) const
G4double GetMaxEnergy() const
G4double GetMaxValue() const
G4double Energy(const std::size_t index) const
G4double Value(const G4double energy, std::size_t &lastidx) const
std::size_t GetVectorLength() const
G4double GetGlobalTime() const
const G4ThreeVector & GetPosition() const
G4StepPoint * GetPostStepPoint() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4Material * GetMaterial() const
const G4DynamicParticle * GetDynamicParticle() const
const G4TouchableHandle & GetTouchableHandle() const
void SetParentID(const G4int aValue)
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
G4VDiscreteProcess(const G4String &aName, G4ProcessType aType=fNotDefined)
G4ParticleChange aParticleChange
void SetProcessSubType(G4int)
const G4String & GetProcessName() const