/////////////////////////////////////////////////////////////////////////////// // // Tracks and reflects the photons as necessary through the // concentrator geometry. // // Author: Phil G Jones // // REVISION HISTORY: // 05/11/2010 : P G Jones - New file // 2014-08-50 : P G Jones - Update doxygen. // 05/04/2016 : R P F Stainforth - Add functionality for scaling the reflectivity // probabilities in constructor. // /////////////////////////////////////////////////////////////////////////////// #ifndef __RAT_ConcentratorOpticalModel_hh__ #define __RAT_ConcentratorOpticalModel_hh__ #include #include #include class G4Region; class G4LogicalVolume; namespace RAT { class ConcentratorOpticalModel : public G4VFastSimulationModel, public OpticalModelBase { public: // The constructor invoked with the model name and applicable region // // name: name of this model // region: region this model is applied in // params: parameters that control this models settings, index to RATDB // volume: volume this model applies to ConcentratorOpticalModel( const G4String name, G4Region* const region, const std::string params, G4LogicalVolume* const volume ); // Destructor ~ConcentratorOpticalModel(); // Returns true if this model applies to the particle type // // type: type of particle this model applies to // Returns true if the type is an optical photon G4bool IsApplicable( const G4ParticleDefinition& type ); // Returns true if this model should be invoked // // fastTrack: track to consider // Returns true if the fastTrack triggers this model G4bool ModelTrigger( const G4FastTrack & fastTrack ); // The method that does the actual tracking // // fastTrack: track to track // fastStep: result of tracking virtual void DoIt( const G4FastTrack& fastTrack, G4FastStep& fastStep ); protected: // Enum of existing concentrator volumes, each one also acts as an index to fConcVolNames, so must ensure they match enum EConcVolumes{ eEnvelope, ePetal, ePlastic, eOut }; // Track the photon through the concentrator geometry // // fastTrack: photon track information // position: position in local coordinates // direction: direction in local coordinates // polarisation: polarisation in local coordinates // time: time in global MC units // weight: weight of the track >0 to be alive void TrackPhoton( const G4FastTrack& fastTrack, G4ThreeVector& position, G4ThreeVector& direction, G4ThreeVector& polarisation, G4double& time, G4double& weight ); // Reflect a photon at a boundary either normal, diffuse or absorbed // // position: position in local coordinates // energy: energy of the photon // direction: direction in local coordinates // polarisation: polarisation in local coordinates // weight: weight of the track >0 to be alive // Returns true if photon reflects bool Reflect( const G4ThreeVector& position, const G4double energy, G4ThreeVector& direction, G4ThreeVector& polarisation, G4double& weight ); // Return the reflection probability for the angle and wavelength. // // Note DB table used is in 1nm blocks from 305nm to 800nm (inclusive) with // each block having 91 elements for 0-90 degrees // // position: position in local coordinates // theta: photon angle to the boundary, in radians // energy: energy of the photon // polarisation: polarisation in local coordinates // specularR: specular reflection probability // diffuseR: diffuse reflection probability virtual void GetReflectionProb( const G4ThreeVector& position, const G4double theta, const G4double energy, const EPolarisation polarisation, G4double& specularR, G4double& diffuseR ); std::vector fConcVolNames; // The names of the Concentrator volumes, indexed by EConcVolumes std::vector fReflectionSPol; // Reflection probability table for S polarised photons std::vector fReflectionPPol; // Reflection probability table for P polarised photons G4MaterialPropertyVector* fGVelocityWater; // Water group velocity G4VSolid* fConcEnvelopeVolume; // Concentrator envelope volume G4VSolid* fPetalVolume; // Petal volume G4VSolid* fPlasticVolume; // Plastic volume G4double fDiffuseReflectionProb; // Probability of diffuse reflection }; } //::RAT #endif