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();
211 proposedSecondaries.push_back(secTrack);
215 for(
auto sec : proposedSecondaries)
221 G4cout <<
"\n Exiting from G4OpWLS::DoIt -- NumberOfSecondaries = "
243 for(
G4int i = 0; i < numOfMaterials; ++i)
250 (*materialTable)[i]->GetMaterialPropertiesTable();
258 G4double currentIN = (*wlsVector)[0];
275 currentPM = wlsVector->
Energy(j);
276 currentIN = (*wlsVector)[j];
278 prevCII + 0.5 * (currentPM - prevPM) * (prevIN + currentIN);
283 prevCII = currentCII;
307 attLength = attVector->
Value(thePhotonEnergy, idx_wls);
321 if(name.compare(
"delta") == 0)
325 else if(name.compare(
"exponential") == 0)
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
void SetPolarization(const G4ThreeVector &)
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
void SetKineticEnergy(G4double aEnergy)
G4MaterialPropertyVector * GetProperty(const char *key, G4bool warning=false)
G4bool ConstPropertyExists(const G4String &key) const
G4double GetConstProperty(const G4String &key) const
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
static size_t GetNumberOfMaterials()
static G4MaterialTable * GetMaterialTable()
virtual void BuildPhysicsTable(const G4ParticleDefinition &aParticleType) override
virtual void Initialise()
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
G4int GetWLSVerboseLevel() const
static G4OpticalPhoton * OpticalPhoton()
void AddSecondary(G4Track *aSecondary)
virtual void Initialize(const G4Track &)
void InsertValues(G4double energy, G4double value)
G4double GetEnergy(G4double aValue)
void insertAt(std::size_t, G4PhysicsVector *)
G4double Energy(std::size_t index) const
G4double Value(G4double theEnergy, 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)
void SetVerboseLevel(G4int value)
G4ParticleChange aParticleChange
void SetProcessSubType(G4int)
const G4String & GetProcessName() const
virtual G4double GenerateTime(const G4double time_constant)=0