78 BuildThePhysicsTable();
118 if (!aMaterialPropertiesTable)
122 aMaterialPropertiesTable->
GetProperty(
"WLSCOMPONENT");
127 G4int NumPhotons = 1;
131 G4double MeanNumberOfPhotons = aMaterialPropertiesTable->
132 GetConstProperty(
"WLSMEANNUMBERPHOTONS");
136 if (NumPhotons <= 0) {
158 WLSTime = aMaterialPropertiesTable->
159 GetConstProperty(
"WLSTIMECONSTANT");
167 for (
G4int i = 0; i < NumPhotons; i++) {
176 G4cout <<
"sampledEnergy = " << sampledEnergy <<
G4endl;
183 G4double sint = std::sqrt((1.-cost)*(1.+cost));
208 sinp = std::sin(phi);
209 cosp = std::cos(phi);
211 photonPolarization = cosp * photonPolarization + sinp * perp;
213 photonPolarization = photonPolarization.
unit();
221 (photonPolarization.
x(),
222 photonPolarization.
y(),
223 photonPolarization.
z());
237 new G4Track(aWLSPhoton,aSecondaryTime,aSecondaryPosition);
248 G4cout <<
"\n Exiting from G4OpWLS::DoIt -- NumberOfSecondaries = "
259void G4OpWLS::BuildThePhysicsTable()
273 for (
G4int i=0 ; i < numOfMaterials; i++)
281 G4Material* aMaterial = (*theMaterialTable)[i];
286 if (aMaterialPropertiesTable) {
289 aMaterialPropertiesTable->
GetProperty(
"WLSCOMPONENT");
296 G4double currentIN = (*theWLSVector)[0];
298 if (currentIN >= 0.0) {
306 aPhysicsOrderedFreeVector->
307 InsertValues(currentPM , currentCII);
322 currentPM = theWLSVector->
Energy(j);
323 currentIN = (*theWLSVector)[j];
325 currentCII = 0.5 * (prevIN + currentIN);
327 currentCII = prevCII +
328 (currentPM - prevPM) * currentCII;
330 aPhysicsOrderedFreeVector->
331 InsertValues(currentPM, currentCII);
334 prevCII = currentCII;
367 if ( aMaterialPropertyTable ) {
368 AttenuationLengthVector = aMaterialPropertyTable->
369 GetProperty(
"WLSABSLENGTH");
370 if ( AttenuationLengthVector ){
371 AttenuationLength = AttenuationLengthVector->
372 Value(thePhotonEnergy);
382 return AttenuationLength;
393 else if (name ==
"exponential")
403 "generator does not exist");
std::vector< G4Material * > G4MaterialTable
G4long G4Poisson(G4double mean)
G4DLLIMPORT std::ostream G4cout
Hep3Vector cross(const Hep3Vector &) const
void SetPolarization(G4double polX, G4double polY, G4double polZ)
G4double GetTotalEnergy() const
void SetKineticEnergy(G4double aEnergy)
G4MaterialPropertyVector * GetProperty(const char *key)
G4bool ConstPropertyExists(const char *key)
static const G4MaterialTable * GetMaterialTable()
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
static size_t GetNumberOfMaterials()
G4double GetMeanFreePath(const G4Track &aTrack, G4double, G4ForceCondition *)
G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep)
G4PhysicsTable * theIntegralTable
G4VWLSTimeGeneratorProfile * WLSTimeGeneratorProfile
G4OpWLS(const G4String &processName="OpWLS", G4ProcessType type=fOptical)
void UseTimeProfile(const G4String name)
static G4OpticalPhoton * OpticalPhoton()
void AddSecondary(G4Track *aSecondary)
virtual void Initialize(const G4Track &)
G4double GetEnergy(G4double aValue)
void insertAt(size_t, G4PhysicsVector *)
size_t GetVectorLength() const
G4double Energy(size_t index) 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
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)