92 std::vector<G4Track*> proposedSecondaries;
113 G4int NumPhotons = 1;
138 G4int NumberOfPhotons = NumPhotons;
140 for(
G4int i = 0; i < NumPhotons; ++i)
144 for(
G4int j = 1; j <= 100; ++j)
148 sampledEnergy = WLSIntegral->
GetEnergy(CIIvalue);
149 if(sampledEnergy <= primaryEnergy)
153 if(sampledEnergy > primaryEnergy)
157 G4cout <<
" *** G4OpWLS: One less WLS photon will be returned ***"
161 if(NumberOfPhotons == 0)
166 <<
" *** G4OpWLS: No WLS photon can be sampled for this primary ***"
177 G4cout <<
"G4OpWLS: Created photon with energy: " << sampledEnergy
183 G4double sint = std::sqrt((1. - cost) * (1. + cost));
189 G4ThreeVector photonPolarization(cost * cosp, cost * sinp, -sint);
193 sinp = std::sin(phi);
194 cosp = std::cos(phi);
195 photonPolarization = (cosp * photonPolarization + sinp * perp).unit();
200 sec_dp->SetPolarization(photonPolarization);
201 sec_dp->SetKineticEnergy(sampledEnergy);
211 proposedSecondaries.push_back(secTrack);
215 for(
auto sec : proposedSecondaries)
221 G4cout <<
"\n Exiting from G4OpWLS::DoIt -- NumberOfSecondaries = "
243 for(std::size_t i = 0; i < numOfMaterials; ++i)
250 (*materialTable)[i]->GetMaterialPropertiesTable();
258 G4double currentIN = (*wlsVector)[0];
264 physVector->InsertValues(currentPM, currentCII);
275 currentPM = wlsVector->
Energy(j);
276 currentIN = (*wlsVector)[j];
278 prevCII + 0.5 * (currentPM - prevPM) * (prevIN + currentIN);
280 physVector->InsertValues(currentPM, currentCII);
283 prevCII = currentCII;
307 attLength = attVector->
Value(thePhotonEnergy, idx_wls);
325 else if(name ==
"exponential")
333 "generator does not exist");
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::vector< G4Material * > G4MaterialTable
G4long G4Poisson(G4double mean)
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()
void AddSecondary(G4Track *aSecondary)
void Initialize(const G4Track &) override
void insertAt(std::size_t, G4PhysicsVector *)
G4double GetEnergy(const G4double value) 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 &)
void ProposeTrackStatus(G4TrackStatus status)
G4int GetNumberOfSecondaries() const
void SetNumberOfSecondaries(G4int totSecondaries)
G4ParticleChange aParticleChange
void SetProcessSubType(G4int)
const G4String & GetProcessName() const
virtual G4double GenerateTime(const G4double time_constant)=0