#include <ocsReduPolarizTransformer.hh>
Public Member Functions | |
ReduPolarizTransformer (int TypeScattering2, ReduOptSignal *oReduOptSignalTmp) | |
The constructor. | |
void | TransformPolarization (double psi, double theta, double phi) |
Transforms the ReduOptSignal on the sphere. | |
void | TransformPolarization (double psi, double theta) |
Transforms the ReduOptSignal on the sphere. | |
void | TransformPolarization (void) |
used in the previous call to a TransformPolarization method | |
void | UndoLastPolarizTransformation (void) |
Undoes the previous transformation. | |
string | WriteTypeScattering (void) |
Returns the type of scattering. | |
void | InitImportSampPolarizTransformation (double BiasingParam2, RanNumGen *oRanImportSampPolarizTransform2) |
void | SetBiasingParam (double BiasingParam2) |
void | GetImportSampPolarizTransformation (int ChannelArrayIndex, double *LikelihoodRatio) |
Private Attributes | |
typeScattering | TypeScattering |
TypeScattering is an enumeration variable of type typeScattering. | |
ReduOptSignal * | oReduOptSignal |
The ReduOptSignal object that is to be transformed. | |
double | psiLast |
double | thetaLast |
double | phiLast |
RanNumGen * | oRanImportSampPolarizTransform |
object for the importance sampling | |
double | BiasingParam |
The biasing parameter for importance sampling. | |
int | FlagImportSamplingInitialized |
Polarization transformer (or controller) that rotates a ReduOptSignal object on the Poincare sphere. Includes methods to use importance sampling to compute outage probabilities in WDM systems due to the combined effects of PMD, PDL, and PDG.
ReduPolarizTransformer::ReduPolarizTransformer | ( | int | TypeScattering2, | |
ReduOptSignal * | oReduOptSignalTmp | |||
) |
The constructor.
The constructor initializes the following:
int | TypeScattering2: Initializes ReduPolarizTransformer::TypeScattering | |
ReduOptSignal | *oReduOptSignalTmp: Initializes ReduPolarizTransformer::oReduOptSignal |
FlagImportSamplingInitialized = 0, which will be set to 1 when user calls:
ReduPolarizTransformer::InitImportSampPolarizTransformation
References LogFile, and LogFileSeparator().
void ReduPolarizTransformer::GetImportSampPolarizTransformation | ( | int | ChannelArrayIndex, | |
double * | LikelihoodRatio | |||
) |
Performs a biased rotation of the ReduOptSignal object which should be called just before entering the PDL element.
The biasing method is described in Lima OFC 2002, TuI7.
ATTENTION: The likelihood ratio should be initialized to 1 each time we start propagating through the system, i.e. at the start of each Monte Carlo experiment/sample with importance sampling. The likelihood ratio should be passed to the Histogram class together with the sample. If this is not done, the statistical results will be completelly wrong.
References BiasingParam, FlagImportSamplingInitialized, RanNumGen::GetRanCosineBiased(), RanNumGen::GetRanNum(), ReduOptSignal::GetStokesSignal(), oRanImportSampPolarizTransform, oReduOptSignal, phiLast, pi, psiLast, sgn(), thetaLast, TransRzRyV3to_Xhat(), and TypeScattering.
void ReduPolarizTransformer::InitImportSampPolarizTransformation | ( | double | BiasingParam2, | |
RanNumGen * | oRanImportSampPolarizTransform2 | |||
) |
Initializes the Polarization Transformer so it can be used for importance sampling.
Sets FlagImportSamplingInitialized = 1 and initializes the following:
References BiasingParam, FlagImportSamplingInitialized, and oRanImportSampPolarizTransform.
void ReduPolarizTransformer::SetBiasingParam | ( | double | BiasingParam2 | ) | [inline] |
References BiasingParam.
void ReduPolarizTransformer::TransformPolarization | ( | void | ) |
used in the previous call to a TransformPolarization method
Transforms the ReduOptSignal on the sphere using the angles
References phiLast, psiLast, and thetaLast.
Referenced by TransformPolarization().
void ReduPolarizTransformer::TransformPolarization | ( | double | psi, | |
double | theta | |||
) |
Transforms the ReduOptSignal on the sphere.
Calls
void ReduPolarizTransformer::TransformPolarization( double psi ,double theta ,double phi);
with phi = 0.
References TransformPolarization().
void ReduPolarizTransformer::TransformPolarization | ( | double | psi, | |
double | theta, | |||
double | phi | |||
) |
Transforms the ReduOptSignal on the sphere.
The particular transformation is specified by ReduPolarizTransformer::TypeScattering and the angles psi,theta,phi that are passed to this method.
References ReduOptSignal::GetNumChannels(), oReduOptSignal, phiLast, psiLast, RotatesAboutX(), RotatesAboutY(), RotatesAboutZ(), RX_RY_RX, RX_RZ_RY, RY_RZ_RY, ReduOptSignal::StokesNoise, ReduOptSignal::StokesSignal, thetaLast, and TypeScattering.
Referenced by PolarizTransformer::TransformPolarization().
void ReduPolarizTransformer::UndoLastPolarizTransformation | ( | void | ) |
Undoes the previous transformation.
References ReduOptSignal::GetNumChannels(), oReduOptSignal, phiLast, psiLast, RotatesAboutX(), RotatesAboutY(), RotatesAboutZ(), RX_RY_RX, RX_RZ_RY, RY_RZ_RY, ReduOptSignal::StokesNoise, ReduOptSignal::StokesSignal, thetaLast, and TypeScattering.
Referenced by PolarizTransformer::UndoLastPolarizTransformation().
string ReduPolarizTransformer::WriteTypeScattering | ( | void | ) |
Returns the type of scattering.
References RX_RY_RX, RX_RZ_RY, RY_RZ_RY, and TypeScattering.
double ReduPolarizTransformer::BiasingParam [private] |
The biasing parameter for importance sampling.
Referenced by GetImportSampPolarizTransformation(), InitImportSampPolarizTransformation(), and SetBiasingParam().
int ReduPolarizTransformer::FlagImportSamplingInitialized [private] |
Referenced by GetImportSampPolarizTransformation(), and InitImportSampPolarizTransformation().
object for the importance sampling
A Random number generator RanNumGen
Referenced by GetImportSampPolarizTransformation(), and InitImportSampPolarizTransformation().
The ReduOptSignal object that is to be transformed.
Referenced by GetImportSampPolarizTransformation(), TransformPolarization(), and UndoLastPolarizTransformation().
double ReduPolarizTransformer::phiLast [private] |
Referenced by GetImportSampPolarizTransformation(), TransformPolarization(), and UndoLastPolarizTransformation().
double ReduPolarizTransformer::psiLast [private] |
The Euler angles for the previous call to the transformation method for the current object
Referenced by GetImportSampPolarizTransformation(), TransformPolarization(), and UndoLastPolarizTransformation().
double ReduPolarizTransformer::thetaLast [private] |
Referenced by GetImportSampPolarizTransformation(), TransformPolarization(), and UndoLastPolarizTransformation().
TypeScattering is an enumeration variable of type typeScattering.
The types of scattering are
Referenced by GetImportSampPolarizTransformation(), TransformPolarization(), UndoLastPolarizTransformation(), and WriteTypeScattering().