cscd-llh C++ API Reference

class I3CscdLlhAbsParser

Subclassed by I3CscdLlhGeneralParser, I3CscdLlhHitNoHitParser, I3CscdLlhHnhDirParser, I3CscdLlhPndlHnhParser, I3CscdLlhUPandelParser

Public Functions

inline I3CscdLlhAbsParser(I3Configuration &conf)
inline virtual ~I3CscdLlhAbsParser()
virtual void AddParameters() = 0

Add parameters.

template<class ParamType>
inline void AddParameter(const std::string &name, const std::string &description, const ParamType &defaultValue)

Just like the I3Module ‘AddParameter’ method this is used in an identical way.

DLR Stolen from J. Pretz’s IcePick code

Parameters:
  • name – is the name that the new parameter should have

  • description – is a string description of the parameter

  • defaultValue – is the default value of your parameter

template<class ParamType>
inline void GetParameter(const std::string &name, ParamType &value)

Just like the I3Module ‘GetParameter’ method it is used in an identical way.

DLR Stolen from J. Pretz’s IcePick code

Parameters:
  • name – the name of the parameter you want to retrieve

  • value – a reference to the thing you’re setting

inline void SetFitter(I3CscdLlhFitter *fitter)

Set the fitter.

Parameters:

fitter – The fitter.

virtual bool Configure() = 0

Get parameters from the steering file. Parse parameter std::strings if necessary. Tell the fitter what to do with the parameters.

Returns:

true iff successful.

Protected Functions

inline I3Configuration &GetConfiguration() const

Protected Attributes

I3Configuration &configuration_

The I3Module implementation that handles steering file parameters (among other things.)

I3CscdLlhFitter *fitter_
class I3CscdLlhAbsPdf
#include <I3CscdLlhAbsPdf.h>

I3CscdLlhAbsPdf is an abstract base class for PDF’s.

Subclassed by I3CscdLlhHitNoHit, I3CscdLlhHnhDir, I3CscdLlhPndlHnh, I3CscdLlhUPandel

Public Functions

inline I3CscdLlhAbsPdf()
inline virtual ~I3CscdLlhAbsPdf()
inline virtual void Configure()

This method handles any additional configuration that needs to be done, e.g. setting the photonics driver file.

virtual void Evaluate(const I3CscdLlhHitPtr &hit, const double *param, double &value) const = 0

Calculate the PDF.

Parameters:
  • hit – The OM hit data.

  • param – Pointer to an array containing the minimization parameters.

  • value – The result.

virtual void CalculateGradient(const I3CscdLlhHitPtr &hit, const double *param, double *gradient) const = 0

Calculate the gradient of the PDF with respect to the vertex parameters.

Parameters:
  • hit – The OM hit data.

  • param – Pointer to an array containing the cascade vertex time, position, direction, and energy. param[i] is (t, x, y, z, theta, phi, energy) for i = (0, 1, 2, 3, 4, 5, 6).

  • gradient – is the result, that is, gradient[i] is the derivative of the PDF with respect to param[i].

virtual int GetNumParams() const = 0

Get the number of minimization parameters (fixed and free.)

Returns:

the number of paramters.

virtual int GetParamIndex(const std::string name) const = 0

Get the index of a minimization parameter.

Parameters:

name – The name of the parameter.

Returns:

the index of the parameter in the parameter array, if name is not valid, return -1.

virtual std::string GetParamName(const int index) const = 0

Get the name of a minimization parameter.

Parameters:

index – The parameter index.

Returns:

the name of the parameter, if index is not valid, return an empty string.

virtual bool SetConstant(int id, double value) = 0

Set a constant value.

Parameters:
  • id – A predefined identifier for the constant.

  • value – The value to be assigned to the constant.

Returns:

true if successful.

virtual bool SetConstant(int id, int value) = 0
virtual bool SetConstant(int id, bool value) = 0
virtual bool SetConstant(int id, std::string value) = 0
inline void SetMinimizeInLogE(bool minimizeInLogE)
inline bool GetUsesNoHits()

Protected Attributes

bool minimizeInLogE_
bool useNoHits_
class I3CscdLlhBrent : public I3CscdLlhMinimizer
#include <I3CscdLlhBrent.h>

The I3CscdLlhBrent class uses the Brent algorithm to minimize a negative log-likelihood. It can only be used for a function of one variable.

Public Functions

I3CscdLlhBrent()
I3CscdLlhBrent(int maxParams)
Parameters:

maxParams – The maximum number of minimization parameters.

virtual ~I3CscdLlhBrent()
virtual bool Minimize(std::list<I3CscdLlhHitPtr> *hits, I3CscdLlhAbsPdfPtr pdf)

Perform the actual minimization.

Parameters:
  • hits – The data: a list of OM hits.

  • pdf – The PDF.

Returns:

true if successful.

Protected Functions

virtual void Init(int maxParams)

Initialize. Called by the constructors.

Parameters:

maxParams – The maximum number of minimization parameters.

Returns:

true if successful.

Private Functions

void CopyFitParams(const DP xmin)

Copy the results of the fit to the I3CscdLlhResult.

Parameters:

xmin – The location of the minimum.

DP Func(const DP x)

The fcn is the function to be minimized: the negative log likelihood.

Parameters:

x – An array of parameters.

Returns:

the function value.

void Mnbrak(DP &ax, DP &bx, DP &cx, DP &fa, DP &fb, DP &fc)

Find a bracketing triplet around the minimum. This code is adapted from Numerical Recipes.

Parameters:
  • ax – A seed bracket and a final side bracket.

  • bx – A seed bracket and a final middle bracket.

  • cx – A final side bracket.

  • fa – The function value at the final ax.

  • fb – The function value at the final bx.

  • fc – The function value at the final cx.

DP Brent(const DP ax, const DP bx, const DP cx, DP &xmin)

Brent minimization. This code is adapted from Numerical Recipes.

Parameters:
  • ax – Side bracket.

  • bx – Middle bracket.

  • cx – Side bracket.

  • xmin – The location of the minimum.

Returns:

The minimum function value.

inline void Shft3(DP &a, DP &b, DP &c, const DP d)
SET_LOGGER ("I3CscdLlhBrent")

Private Members

int idxFreeParam_
double *fitParams_
class I3CscdLlhFitter
#include <I3CscdLlhFitter.h>

The I3CscdLlhFitter class performs log likelihood reconstruction of cascades. To use: Create I3CscdLlhFitter object, set parameters, add hits with addHit(), call fit(), then get results with getCascade(). Call reset() to use the fitter more than once.

Public Functions

I3CscdLlhFitter()
inline virtual ~I3CscdLlhFitter()
void Clear()

Remove hits and clear values of all member variables.

bool SetMinimizer(int code)

Set the Minimizer.

Parameters:

code – A defined constant that specifies the minimizer.

Returns:

true if successful.

bool SetPdf(int code)

Set the PDF.

Parameters:

code – A defined constant that specifies the PDF to be used by the minimizer.

Returns:

true if successful.

bool Configure(I3CscdLlhAbsParserPtr parser)

Configure steering file parameters.

Parameters:

parser – An class that gets parameters from a steering file.

Returns:

true iff successful.

void SetMaxCalls(int maxCalls)

Set the maximum number of function calls after which the calculation will be stopped even if it has not yet converged.

Parameters:

maxCalls – The maximum number of function calls.

void SetTolerance(double tolerance)

Set the required tolerance on the function value at the minumum.

Parameters:

tolerance – The tolerance.

inline bool SetPdfConstant(int id, bool value)

Set a constant value used by the PDF.

Parameters:
  • id – A predefined identifier for the constant.

  • value – The value to be assigned to the constant.

Returns:

true if successful.

inline bool SetPdfConstant(int id, int value)
inline bool SetPdfConstant(int id, double value)
inline bool SetPdfConstant(int id, std::string value)
bool InitParam(std::string paramName, double stepSize, double lowerLimit, double upperLimit, bool fix)

Initialize a parameter.

Parameters:
  • paramName – The parameter name.

  • stepSize – Starting step size or uncertainty.

  • lowerLimit – Lower physical limit on the parameter.

  • upperLimit – Upper physical limit on the parameter.

  • fix – Fix the parameter if true, leave it free if false..

Returns:

true if successful.

bool SetSeed(std::string paramName, double seed)

Set the initial value for a parameter.

Parameters:
  • paramName – The parameter name.

  • seed – The seed value.

Returns:

true if successful.

bool AddHit(I3CscdLlhHitPtr &hit)

Add an OM hit that contributes to the reconstruction. Invalid hits will not be added.

Parameters:

hit

Returns:

true if hit is valid.

inline void SetHitOmCount(int count)

Set the number of hit OM’s.

Parameters:

count – The number of hit OM’s.

inline void SetUnhitOmCount(int count)

Set the number of unhit OM’s .

Parameters:

count – The number of OM’s that were not hit.

bool Fit()

Perform the actual fitting algorithm.

Returns:

true if algorithm succeeded.

I3ParticlePtr GetCascade()

Get the results of the fit.

Returns:

The cascade.

I3CscdLlhFitParamsPtr GetFitParams()

Get the Fit Parameters of the fit.

Returns:

the fit params

void InitializeResult(const I3Particle &priorRecoResult)

Initialize the result with the results of a prior reconstruction, as determined by a prior reconstruction of some sort. This module must pass through the results of any prior reconstruction.

Parameters:

priorRecoResult – the result of a previous reconstruction, that is used as a seed for the current fit.

void MinimizeInLogE()

Under certain circumstances, it is best to minimize the energy on a logarithmic scale, rather than in a linear one. This is done if the function is in a slowly varying region about the seed, for example.

Public Static Attributes

static const int MINIMIZER_NULL = 0
static const int MINIMIZER_BRENT = 1
static const int MINIMIZER_POWELL = 3
static const int MINIMIZER_SIMPLEX = 4
static const int MINIMIZER_NAG = 5
static const int MINIMIZER_GRAPHICAL
static const int PDF_NULL = 0
static const int PDF_UPANDEL = 1
static const int PDF_UPANDEL_MPE = 2
static const int PDF_HIT_NO_HIT = 3
static const int PDF_HIT_NO_HIT_MPE = 4
static const int PDF_PNDL_HNH = 5
static const int PDF_HNH_DIR = 6
static const int PDF_PHOTOREC
static const int PDF_FULL_E_RECO_PHOTONICS

Private Functions

SET_LOGGER ("I3CscdLlhFitter")

Private Members

std::list<I3CscdLlhHitPtr> hits_
I3CscdLlhMinimizerPtr minimizer_
I3CscdLlhAbsPdfPtr pdf_
I3ParticlePtr resultingCascade_
I3CscdLlhFitParamsPtr fitParams_
bool minimizeInLogE_
class I3CscdLlhGeneralParser : public I3CscdLlhAbsParser

I3CscdLlhGeneralParser extracts parameters from cscd-llh steering files.

Public Functions

inline I3CscdLlhGeneralParser(I3Configuration &config)
inline virtual ~I3CscdLlhGeneralParser()
virtual void AddParameters()

Add parameters.

virtual bool Configure()

Get parameters from the steering file. Parse parameter strings if necessary. Tell the fitter what to do with the parameters.

Returns:

true iff successful.

inline bool UseParamT()
inline bool UseParamX()
inline bool UseParamY()
inline bool UseParamZ()
inline bool UseParamZenith()
inline bool UseParamAzimuth()
inline bool UseParamEnergy()

Private Functions

bool ParseParamStrings()

Parse the steering file strings that specify the step size (SS), lower limit (LL), upper limit (UL), and “fix” for the PDF parameters. Fix is “true” or “false”, to fix the parameter or to let it be free. The string format is “SS, LL, UL, fix”. Setting LL = UL = 0 sets no limits on the parameter. Setting limits is not recommended, unless they are absolutely necessary.

Returns:

true if able to parse the parameter strings.

bool ParseParamString(std::string paramName, std::string steeringFile)

Parse a single steering file string that specifies the step size, lower limit, upper limit, and “fix” for the minimization parameters.

Parameters:
  • paramName – The parameter name.

  • steeringFile – The steering file string.

Returns:

true if able to parse the parameter string.

SET_LOGGER ("I3CscdLlhGeneralParser")

Private Members

int optMaxCalls_
double optTolerance_
std::string optParamT_
std::string optParamX_
std::string optParamY_
std::string optParamZ_
std::string optParamZenith_
std::string optParamAzimuth_
std::string optParamEnergy_
bool useParamT_
bool useParamX_
bool useParamY_
bool useParamZ_
bool useParamZenith_
bool useParamAzimuth_
bool useParamEnergy_
bool optMinimizeInLogE_
struct I3CscdLlhHit
#include <I3CscdLlhHit.h>

The I3CscdLlhHit struct holds OM hit data.

Public Functions

inline I3CscdLlhHit()
inline I3CscdLlhHit(double time, double posX, double posY, double posZ, double hitWeight, int omCount, int hitNum, OMKey hitDom)
inline I3CscdLlhHit(double time, double posX, double posY, double posZ, double hitWeight, int omCount, int hitNum, OMKey hitDom, double thresh, double amp)
inline I3CscdLlhHit(double time, double posX, double posY, double posZ, double hitWeight, int omCount, int hitNum)

Public Members

double t

The hit time and position.

double x
double y
double z
double weight

Multiply the log-likelihood for the hit by the weight.

int omHitCount

omHitCount is the number of hits that the OM got in the event, in other words, this hit is one of a set hits for some OM.

int hitNumber

hitNumber is a zero-based number for an OM’s hits, i.e., hitNumber values are 0, 1, …, omHitCount-1.

double triggerThresh

Trigger threshold

double amplitude
OMKey omKey

OM identifier (string, OM). Usually just used for debugging.

class I3CscdLlhHitNoHit : public I3CscdLlhAbsPdf

I3CscdLlhHitNoHit calculates the probability that an OM, a given distance from the cascade vertex, will be hit by a photoelectron.

The hit/no-hit probability is discussed in

J. Ahrens, et al. [AMANDA Collaboration], “Muon Track Reconstruction and Data Selection Techniques in AMANDA,” Nucl. Instrum. Meth. A 524, 169 (2004) [arXiv:astro-ph/0407044],

and

M. Kowalski, “Search for Neutrino-Induced Cascades with the AMANDA-II Detector,” Dissertation, Humboldt-Universitt zu Berlin, 2004.

The expected number of photoelectrons that hit an OM a distance \(d\) from the cascade vertex, for distances greater than the effective scattering length, can be shown to be

\[ \mu \approx \frac{I_0 \, E}{d} \, e^{-d/\lambda_{\mathrm{attn}}} \ , \]
where \(E\) is the cascade energy, \(\lambda_{\mathrm{attn}}\) is the attenuation length, and \(I_0\) is a normalization constant that can be obtained from Monte Carlo studies. Note that \(\mu \propto 1/d \), not \(1/d^2\), as one might naively expect. The \(1/d\) dependence can be derived from a random-walk argument, see

P. Askebjer, et al. [AMANDA Collaboration], “Optical Properties of Deep Ice at the South Pole: Absorption,” Applied Optics 36 No.~18, 4168 (1997) [arXiv:physics/9701025].

The divergence at \(d = 0\) is handled by using a distance cut-off, \(d_{\mathrm{cut-off}}\):

\[ \mu \approx \frac{I_0 \, E}{d_{\mathrm{cut-off}} + d} \, e^{-d/\lambda_{\mathrm{attn}}} \ . \]

The probability of getting no hits from the cascade is

\[ P^{\mathrm{casc}}_{\mathrm{nohit}} = e^{-\mu} \ , \]
and the probability of getting one or more hits from the cascade is
\[ P^{\mathrm{casc}}_{\mathrm{hit}} = 1 - e^{-\mu} \ . \]

Suppose the probability of registering a noise hit is given by \(P_{\mathrm{noise}}\), and the probability that an OM will not respond, regardless of the light intensity, is given by \(P_{\mathrm{dead}}\). Then the probability of getting no hits (from the cascade or noise) is

\[ P_{\mathrm{nohit}} = P_{\mathrm{dead}} \, P^{\mathrm{casc}}_{\mathrm{hit}} + (1 - P_{\mathrm{noise}}) \, P^{\mathrm{casc}}_{\mathrm{nohit}} \ , \]
and the probability of getting one or more hits (from the cascade or noise) is
\[ P_{\mathrm{hit}} = (1 - P_{\mathrm{dead}}) \, P^{\mathrm{casc}}_{\mathrm{hit}} + P_{\mathrm{noise}} \, P^{\mathrm{casc}}_{\mathrm{nohit}} \ . \]
Note that other definitions of \(P_{\mathrm{noise}}\) and \(P_{\mathrm{dead}}\) are possible.

The hit/no-hit probability, that is, the probability of getting the observed hit pattern, is

\[ \mathcal{L} = \Pi_{\mathrm{all hit OM's}} \, P_{\mathrm{hit} (E, d)} \ \Pi_{\mathrm{all unhit OM's}} \, P_{\mathrm{no-hit} (E, d)} \ . \]

Subclassed by I3CscdLlhHitNoHitMpe

Public Functions

I3CscdLlhHitNoHit()
inline virtual ~I3CscdLlhHitNoHit()
virtual void Evaluate(const I3CscdLlhHitPtr &hit, const double *param, double &value) const

Calculate the Hit/No-hit PDF.

Parameters:
  • hit – The OM hit data.

  • param – Pointer to an array containing the cascade vertex position and energy. param[i] is (x, y, z, energy) for i = (0, 1, 2, 3).

  • value – The result.

virtual void CalculateGradient(const I3CscdLlhHitPtr &hit, const double *param, double *gradient) const

Calculate the gradient of the PDF with respect to the vertex parameters.

Parameters:
  • hit – The OM hit data.

  • param – Pointer to an array containing the cascade vertex position and energy. param[i] is (x, y, z, energy) for i = (0, 1, 2, 3).

  • gradient – is the result, that is, gradient[i] is the derivative of the PDF with respect to param[i].

inline virtual int GetNumParams() const

Get the number of minimization parameters (fixed and free.)

Returns:

the number of paramters.

virtual int GetParamIndex(const std::string name) const

Get the index of a minimization parameter.

Parameters:

name – The name of the parameter.

Returns:

the index of the parameter in the parameter array.

virtual std::string GetParamName(const int index) const

Get the name of a minimization parameter.

Parameters:

index – The parameter index.

Returns:

the name of the parameter.

virtual bool SetConstant(int id, double value)

Set a constant value.

Parameters:
  • id – A predefined identifier for the constant.

  • value – The value to be assigned to the constant.

Returns:

true if successful.

virtual bool SetConstant(int id, int value)
virtual bool SetConstant(int id, bool value)
virtual bool SetConstant(int id, std::string value)

Public Static Attributes

static const int CONST_NULL = 0
static const int CONST_NORM = 1
static const int CONST_LAMBDA_ATTN = 2
static const int CONST_NOISE = 3
static const int CONST_DIST_CUTOFF = 4
static const int CONST_DEAD = 5
static const int CONST_SMALL_PROB = 6
static const double DEFAULT_NORM = 1.4
static const double DEFAULT_LAMBDA_ATTN = 29.0
static const double DEFAULT_NOISE = 5.0e-3
static const double DEFAULT_DIST_CUTOFF = 0.5
static const double DEFAULT_DEAD = 0.05
static const double DEFAULT_SMALL_PROB = 1.0e-40

Protected Functions

double CalculateMu(double dist, double energy) const

Calculate the expected number of photoelectrons.

Parameters:
  • dist – The distance from the cascade vertex to the OM.

  • energy – The cascade energy.

Returns:

The result.

inline double ProbNoHitFromCasc(double mu) const

Calculate the probability of not getting a hit from the cascade.

Parameters:

mu – The expected number of photoelectrons.

Returns:

The result.

inline double ProbHitFromCasc(double mu) const

Calculate the probability of getting a hit from the cascade.

Parameters:

mu – The expected number of photoelectrons.

Returns:

The result.

double ProbNoHit(double mu) const

Calculate the probability of not getting a hit from the cascade or noise.

Parameters:

mu – The expected number of photoelectrons.

Returns:

The result.

double ProbHit(double mu) const

Calculate the probability of getting a hit from the cascade or noise.

Parameters:

mu – The expected number of photoelectrons.

Returns:

The result.

SET_LOGGER ("I3CscdLlhHitNoHit")

Protected Attributes

double norm_
double lambdaAttn_
double noise_
double distCutoff_
double dead_
double smallProb_

Protected Static Attributes

static const int MINIMIZATION_PARAMS = 4
static const int PARAM_INDEX_X = 0
static const int PARAM_INDEX_Y = 1
static const int PARAM_INDEX_Z = 2
static const int PARAM_INDEX_ENERGY = 3
class I3CscdLlhHitNoHitMpe : public I3CscdLlhHitNoHit

I3CscdLlhHitNoHitMpe calculates the probability that an OM, a given distance \(d\) from the cascade vertex, will be hit by \(n\) photoelectrons.

The MPE hit/no-hit probability is a generalization of the SPE hit/no-hit probability discussed in

J. Ahrens, et al. [AMANDA Collaboration], “Muon Track Reconstruction and Data Selection Techniques in AMANDA,” Nucl. Instrum. Meth. A 524, 169 (2004) [arXiv:astro-ph/0407044],

and

M. Kowalski, “Search for Neutrino-Induced Cascades with the AMANDA-II Detector,” Dissertation, Humboldt-Universitt zu Berlin, 2004.

The expected number of photoelectrons that hit an OM a distance \(d\) from the cascade vertex, for distances greater than the effective scattering length, can be shown to be

\[ \mu \approx \frac{I_0 \, E}{d} \, e^{-d/\lambda_{\mathrm{attn}}} \ , \]
where \(E\) is the cascade energy, \(\lambda_{\mathrm{attn}}\) is the attenuation length, and \(I_0\) is a normalization constant that can be obtained from Monte Carlo studies. Note that \(\mu \propto 1/d \), not \(1/d^2\), as one might naively expect. The \(1/d\) dependence can be derived from a random-walk argument, see

P. Askebjer, et al. [AMANDA Collaboration], “Optical Properties of Deep Ice at the South Pole: Absorption,” Applied Optics 36 No.~18, 4168 (1997) [arXiv:physics/9701025].

The divergence at \(d = 0\) is handled by using a distance cut-off, \(d_{\mathrm{cut-off}}\):

\[ \mu \approx \frac{I_0 \, E}{d_{\mathrm{cut-off}} + d} \, e^{-d/\lambda_{\mathrm{attn}}} \ . \]

The probability of getting \(n\) hits from the cascade is given by a Poisson distribution:

\[ P^{\mathrm{casc}}(n) = \frac{\mu^n \, e^{-\mu}}{n!} \ . \]

The probability of registering \(n\) noise hits also follows a Poisson distribution, but we will assume that noise hit probabilities are small, so we can write

\[ P_{\mathrm{noise}} \equiv \sum_{i=1}^\infty \, P_{\mathrm{noise}}(i) \approx P_{\mathrm{noise}}(1) \ . \]

The probability of getting \(n\) hits (from the cascade or noise) is

\[\begin{split} P(n) = \left\{ \begin{array}{ll} P^{\mathrm{casc}}(0) \, (1 - P_{\mathrm{noise}}) & \mathrm{for} \ n = 0 ;\\ P^{\mathrm{casc}}(n) \, (1 - P_{\mathrm{noise}}) \, + \, P^{\mathrm{casc}}(n-1) \, P_{\mathrm{noise}} & \mathrm{for} \ n > 0 .\end{array} \right. \end{split}\]

The hit/no-hit probability, that is, the probability of getting the observed hit pattern, is

\[ \mathcal{L} = \Pi_{\mathrm{all OM's}} \, P(n; E, d) \ . \]

Public Functions

I3CscdLlhHitNoHitMpe()
inline virtual ~I3CscdLlhHitNoHitMpe()
virtual void Evaluate(const I3CscdLlhHitPtr &hit, const double *param, double &value) const

Calculate the MPE Hit/No-hit PDF.

Parameters:
  • hit – The OM hit data.

  • param – Pointer to an array containing the cascade vertex position and energy. param[i] is (x, y, z, energy) for i = (1, 2, 3, 4).

  • value – The result.

virtual void CalculateGradient(const I3CscdLlhHitPtr &hit, const double *param, double *gradient) const

Calculate the gradient of the PDF with respect to the vertex parameters.

Parameters:
  • hit – The OM hit data.

  • param – Pointer to an array containing the cascade vertex position and energy. param[i] is (x, y, z, energy) for i = (1, 2, 3, 4).

  • gradient – is the result, that is, gradient[i] is the derivative of the PDF with respect to param[i].

Protected Functions

inline double ProbHitsFromCascade(int n, double mu) const

Calculate the probability of getting some number of hits from the cascade.

Parameters:
  • n – The observed number of photoelectrons.

  • mu – The expected number of photoelectrons.

Returns:

The result.

double ProbHits(int n, double mu) const

Calculate the probability of getting some number of hits from the cascade and noise.

Parameters:
  • n – The observed number of photoelectrons.

  • mu – The expected number of photoelectrons.

Returns:

The result.

SET_LOGGER ("I3CscdLlhHitNoHitMpe")
class I3CscdLlhHitNoHitParser : public I3CscdLlhAbsParser

I3CscdLlhHitNoHitParser extracts parameters from cscd-llh steering files.

Public Functions

inline I3CscdLlhHitNoHitParser(I3Configuration &config)
inline virtual ~I3CscdLlhHitNoHitParser()
virtual void AddParameters()

Add parameters.

virtual bool Configure()

Get parameters from the steering file. Parse parameter strings if necessary. Tell the fitter what to do with the parameters.

Returns:

true iff successful.

Private Functions

SET_LOGGER ("I3CscdLlhHitNoHitParser")

Private Members

double optHitNoHitNorm_
double optHitNoHitLambdaAttn_
double optHitNoHitNoise_
double optHitNoHitDistCutoff_
double optHitNoHitDead_
double optHitNoHitSmallProb_
class I3CscdLlhHnhDir : public I3CscdLlhAbsPdf
#include <I3CscdLlhHnhDir.h>

Public Functions

I3CscdLlhHnhDir()
inline virtual ~I3CscdLlhHnhDir()

Public Static Attributes

static const int MINIMIZATION_PARAMS = 6
static const int PARAM_INDEX_ENERGY = 4
static const int PARAM_INDEX_AZIMUTH = 5
static const int PARAM_INDEX_ZENITH = 6
static const int PARAM_INDEX_X = 1
static const int PARAM_INDEX_Y = 2
static const int PARAM_INDEX_Z = 3
static const double DEFAULT_LEGENDRE_COEFF_0 = 4.364
static const double DEFAULT_LEGENDRE_COEFF_1 = 2.566
static const double DEFAULT_LEGENDRE_COEFF_2 = 2
static const double DEFAULT_NORM = 40.0 / 1000.0
static const double DEFAULT_LAMBDA_ATTN = 29.0
static const double DEFAULT_NOISE = 5.0e-3
static const double DEFAULT_DIST_CUTOFF = 0.5
static const double DEFAULT_DEAD = 0.05
static const double DEFAULT_SMALL_PROB = 1.0e-40
static const int CONST_L_POLY_0 = 0
static const int CONST_L_POLY_1 = 1
static const int CONST_L_POLY_2 = 2
static const int CONST_HNH_NORM = 3
static const int CONST_HNH_LAMBDA_ATTN = 4
static const int CONST_HNH_NOISE = 5
static const int CONST_HNH_DIST_CUTOFF = 6
static const int CONST_HNH_DEAD = 7
static const int CONST_HNH_SMALL_PROB = 8

Private Functions

virtual void Evaluate(const I3CscdLlhHitPtr &hit, const double *param, double &value) const

Calculate the PDF.

Parameters:
  • hit – The OM hit data.

  • param – Pointer to an array containing the minimization parameters.

  • value – The result.

double CalculateMu(const double dist, const double energy) const
virtual int GetParamIndex(const std::string name) const

Get the index of a minimization parameter.

Parameters:

name – The name of the parameter.

Returns:

the index of the parameter in the parameter array, if name is not valid, return -1.

virtual std::string GetParamName(const int index) const

Get the name of a minimization parameter.

Parameters:

index – The parameter index.

Returns:

the name of the parameter, if index is not valid, return an empty string.

double CalculateLegendrePoly(const double angle) const
double CalculateAngle(const double hitX, const double hitY, const double hitZ, const double vertexX, const double vertexY, const double vertexZ, const double hypothesisAzimuth, const double hypothesisZenith) const
virtual void CalculateGradient(const I3CscdLlhHitPtr &hit, const double *param, double *gradient) const

Calculate the gradient of the PDF with respect to the vertex parameters.

Parameters:
  • hit – The OM hit data.

  • param – Pointer to an array containing the cascade vertex position and energy. param[i] is (x, y, z, energy) for i = (0, 1, 2, 3).

  • gradient – is the result, that is, gradient[i] is the derivative of the PDF with respect to param[i].

inline virtual int GetNumParams() const

Get the number of minimization parameters (fixed and free.)

Returns:

the number of paramters.

virtual bool SetConstant(int id, double value)

Set a constant value.

Parameters:
  • id – A predefined identifier for the constant.

  • value – The value to be assigned to the constant.

Returns:

true if successful.

virtual bool SetConstant(int id, int value)
virtual bool SetConstant(int id, bool value)
virtual bool SetConstant(int id, std::string value)
inline double ProbNoHitFromCasc(const double mu) const

Calculate the probability of not getting a hit from the cascade.

Parameters:

mu – The expected number of photoelectrons.

Returns:

The result.

inline double ProbHitFromCasc(const double mu) const

Calculate the probability of getting a hit from the cascade.

Parameters:

mu – The expected number of photoelectrons.

Returns:

The result.

double ProbNoHit(const double mu) const

Calculate the probability of not getting a hit from the cascade or noise.

Parameters:

mu – The expected number of photoelectrons.

Returns:

The result.

double ProbHit(const double mu) const

Calculate the probability of getting a hit from the cascade or noise.

Parameters:

mu – The expected number of photoelectrons.

Returns:

The result.

SET_LOGGER ("I3CscdLlhHnhDir")

Private Members

double a0_
double a1_
double a2_
double norm_
double lambdaAttn_
double noise_
double distCutoff_
double dead_
double smallProb_
class I3CscdLlhHnhDirParser : public I3CscdLlhAbsParser

Public Functions

inline I3CscdLlhHnhDirParser(I3Configuration &config)
inline virtual ~I3CscdLlhHnhDirParser()
virtual void AddParameters()

Add parameters.

virtual bool Configure()

Get parameters from the steering file. Parse parameter std::strings if necessary. Tell the fitter what to do with the parameters.

Returns:

true iff successful.

Private Functions

SET_LOGGER ("I3CscdLlhHnhDirParser")

Private Members

double optLegendrePolyCoeff0_
double optLegendrePolyCoeff1_
double optLegendrePolyCoeff2_
double optHitNoHitNorm_
double optHitNoHitLambdaAttn_
double optHitNoHitNoise_
double optHitNoHitDistCutoff_
double optHitNoHitDead_
double optHitNoHitSmallProb_
class I3CscdLlhMinimizer

The I3CscdLlhMinimizer class is a base class for classes that implement function minization algorithms.

Subclassed by I3CscdLlhBrent, I3CscdLlhPowell, I3CscdLlhSimplex

Public Functions

I3CscdLlhMinimizer()
I3CscdLlhMinimizer(int maxParams)
Parameters:

maxParams – The maximum number of minimization parameters.

virtual ~I3CscdLlhMinimizer()
inline virtual int GetMaxParams()

Get the maximum number minimization parameters.

Returns:

the maximum number of free parameters.

inline virtual int GetNumParams()

Get the number of (fixed + free) minimization parameters.

Returns:

the number of parameters.

inline virtual int GetNumFreeParams()

Get the number of free minimization parameters.

Returns:

the number of free parameters.

inline void SetMaxCalls(int maxCalls)

Set the maximum number of function calls after which the calculation will be stopped even if it has not yet converged.

Parameters:

maxCalls – The maximum number of function calls.

inline void SetTolerance(double tolerance)

Set the required tolerance on the function value at the minumum.

Parameters:

tolerance – The tolerance.

virtual bool InitParam(int idx, double stepSize, double lowerLimit, double upperLimit, bool fix)

Initialize a parameter.

Parameters:
  • idx – The parameter index.

  • stepSize – Starting step size or uncertainty.

  • lowerLimit – Lower physical limit on the parameter.

  • upperLimit – Upper physical limit on the parameter.

  • fix – Fix the parameter if true, leave it free if false.

Returns:

true if successful.

virtual bool SetSeed(int idx, std::string name, double seed)

Set a seed value for a parameter.

Parameters:
  • idx – Parameter index.

  • name – Parameter name.

  • seed – Starting value.

Returns:

true if successful.

virtual bool Minimize(std::list<I3CscdLlhHitPtr> *hits, I3CscdLlhAbsPdfPtr pdf)

Perform the actual minimization.

Parameters:
  • hits – The data: a list of OM hits.

  • pdf – The PDF.

Returns:

true if successful.

inline virtual int GetFunctionCalls()
Returns:

the number of function calls.

inline virtual int GetStatus()
Returns:

the status. 0: Minimization succeeded. 1: Exceeded max function calls.

inline virtual I3CscdLlhResultPtr GetResult()

Get the result of the minimization..

Returns:

the result

Public Static Attributes

static const int MAX_MINIMIZATION_PARAMS = 15
static const int DEFAULT_MAX_CALLS = 50000
static const double DEFAULT_TOLERANCE = 0.01
static const int STATUS_NULL = -1
static const int STATUS_SUCCESS = 0
static const int STATUS_MAX_FUNCTION_CALLS = 1

Protected Functions

virtual void Init(int maxParams)

Initialize. Called by the constructors.

Parameters:

maxParams – The maximum number of minimization parameters.

Returns:

true if successful.

SET_LOGGER ("I3CscdLlhMinimizer")

Protected Attributes

I3CscdLlhResultPtr result_
int maxParams_
int numParams_
int numFreeParams_
int maxCalls_
double tolerance_
double *stepSize_
double *lowerLimit_
double *upperLimit_
bool *fixParam_
double *seed_
int functionCalls_
int status_

Protected Static Attributes

static std::list<I3CscdLlhHitPtr> *hits_ = 0
static I3CscdLlhAbsPdfPtr pdf_
class I3CscdLlhModule : public I3ConditionalModule
#include <I3CscdLlhModule.h>

IceTray module for executing a LLH reconstruction.

Public Functions

I3CscdLlhModule(const I3Context &ctx)
Parameters:

ctx – The context with which this module is built.

~I3CscdLlhModule()
void Configure()

Load the configuration parameters.

void Physics(I3FramePtr frame)

The actual reconstruction is performed in the Physics method.

Private Functions

bool SetBrent()

Tell the fitter to use a Brent minimizer.

Returns:

true if successful.

bool SetPowell()

Tell the fitter to use a Powell minimizer.

Returns:

true if successful.

bool SetSimplex()

Tell the fitter to use a Simplex minimizer.

Returns:

true if successful.

bool SetUPandel(bool mpe)

Tell the fitter to use a UPandel PDF.

Parameters:

mpe – Set to true for a multi-photoelectron PDF.

Returns:

true if successful.

bool SetHitNoHit(bool mpe)

Tell the fitter to use a Hit/No-hit PDF.

Parameters:

mpe – Set to true for a multi-photoelectron PDF.

Returns:

true if successful.

bool SetPndlHnh()

Tell the fitter to use a PndlHnh PDF (combined UPandelMpe and HitNoHitMpe).

Returns:

true if successful.

bool SetHnhDir()

Tell the fitter to use a direction-reconstructing version of the HitNoHit PDF.

Returns:

true if successful

bool SetUPandelPhx()
bool SetSeed(I3FramePtr frame)

Get the first guess vertex from the ResultDict and pass it to the fitter.

Returns:

true if able to set the seed.

bool AddRecoPulses(I3FramePtr frame)

@ return

bool AddRecoHits(I3FramePtr frame)

Get RecoHitSeries hits from the OMSelectionDict, using I3Analog2Hits, and add them to the fitter.

Returns:

true if the hits were successfully added.

bool AddNoHits(I3FramePtr frame)

Get a list of unhit OM’s, and add them to the fitter as hits with a zero hit count.

Returns:

true if the non-hits were successfully added.

double CalculateWeight(double amplitude)

Calculate the weight according to the AmpWeightPower.

Returns:

the weight.

void Finish()

Finish the analysis.

bool SkipThisOM(const OMKey &omKey)

Convenience method to check if the current OM being considered is part of the vector of excluded OMs.

Parameters:

omKey – the OMKey to be considered.

Returns:

true if the OM is in the user-defined vector of excluded OMKeys

SET_LOGGER ("I3CscdLlhModule")

Private Members

std::string optInputType_
std::string optRecoSeries_
bool optFirstLE_
bool optSeedWithOrigin_
std::string optSeedKey_
int optMinHits_
double optAmpWeightPower_
std::string optResultName_
double optEnergySeed_
std::string optMinimizer_
std::string optPdf_
I3CscdLlhGeneralParserPtr parserGeneral_
I3CscdLlhHitNoHitParserPtr parserHitNoHit_
I3CscdLlhPndlHnhParserPtr parserPndlHnh_
I3CscdLlhUPandelParserPtr parserUPandel_
I3CscdLlhHnhDirParserPtr parserHnhDir_
I3CscdLlhFitter fitter_
std::vector<OMKey> excludedOMs_
int countEvents_
int countRecords_
int countAllOk_
bool addNoHits_
class I3CscdLlhPndlHnh : public I3CscdLlhAbsPdf
#include <I3CscdLlhPndlHnh.h>

I3CscdLlhPndlHnh calculates a combined likelihood consisting of a single photoelectron (SPE) UPandel (patched Pandel) PDF and a multi-photoelectron (MPE) Hit/No-hit PDF.

The I3CscdLlhPndlHnh calculates a combined likelihood as

\[ \mathcal{L} = \mathcal{L}_{\mathrm{UPandel}} \, \cdot \, \left(\mathcal{L_{\mathrm{hit/no-hit}}}\right)^w \ , \]
where \(w\) is a weight factor. The UPandel PDF is single photoelectron (SPE); the Hit/No-hit is multi-photoelectron (MPE).

Public Functions

I3CscdLlhPndlHnh()
inline virtual ~I3CscdLlhPndlHnh()
virtual void Evaluate(const I3CscdLlhHitPtr &hit, const double *param, double &value) const

Calculate the PndlHnh PDF.

Parameters:
  • hit – The OM hit data.

  • param – Pointer to an array containing the cascade vertex time, position, and energy. param[i] is (t, x, y, z, energy) for i = (0, 1, 2, 3, 4).

  • value – The result.

virtual void CalculateGradient(const I3CscdLlhHitPtr &hit, const double *param, double *gradient) const

Calculate the gradient of the PDF with respect to the vertex parameters.

Parameters:
  • hit – The OM hit data.

  • param – Pointer to an array containing the cascade vertex time, position, and energy. param[i] is (t, x, y, z, energy) for i = (0, 1, 2, 3, 4).

  • gradient – is the result, that is, gradient[i] is the derivative of the PDF with respect to param[i].

inline virtual int GetNumParams() const

Get the number of minimization parameters (fixed and free.)

Returns:

the number of paramters.

virtual int GetParamIndex(const std::string name) const

Get the index of a minimization parameter.

Parameters:

name – The name of the parameter.

Returns:

the index of the parameter in the parameter array.

virtual std::string GetParamName(const int index) const

Get the name of a minimization parameter.

Parameters:

index – The parameter index.

Returns:

the name of the parameter.

virtual bool SetConstant(int id, double value)

Set a constant value.

Parameters:
  • id – A predefined identifier for the constant.

  • value – The value to be assigned to the constant.

Returns:

true if successful.

virtual bool SetConstant(int id, int value)
virtual bool SetConstant(int id, bool value)
virtual bool SetConstant(int id, std::string value)

Public Static Attributes

static const int CONST_NULL = 0
static const int CONST_WEIGHT = 1
static const int CONST_PNDL_C_ICE = 2
static const int CONST_PNDL_SMALL_PROB = 3
static const int CONST_PNDL_TAU = 4
static const int CONST_PNDL_LAMBDA = 5
static const int CONST_PNDL_LAMBDA_A = 6
static const int CONST_PNDL_SIGMA = 7
static const int CONST_PNDL_MAX_DIST = 8
static const int CONST_HNH_NORM = 9
static const int CONST_HNH_LAMBDA_ATTN = 10
static const int CONST_HNH_NOISE = 11
static const int CONST_HNH_DIST_CUTOFF = 12
static const int CONST_HNH_DEAD = 13
static const int CONST_HNH_SMALL_PROB = 14
static const double DEFAULT_WEIGHT = 1.0

Protected Functions

SET_LOGGER ("I3CscdLlhPndlHnh")

Protected Attributes

I3CscdLlhUPandel pdfPndl_
I3CscdLlhHitNoHitMpe pdfHnh_
double weight_

Protected Static Attributes

static const int MINIMIZATION_PARAMS = 5
static const int PARAM_INDEX_T = 0
static const int PARAM_INDEX_X = 1
static const int PARAM_INDEX_Y = 2
static const int PARAM_INDEX_Z = 3
static const int PARAM_INDEX_ENERGY = 4
class I3CscdLlhPndlHnhParser : public I3CscdLlhAbsParser

I3CscdLlhPndlHnhParser extracts parameters from cscd-llh steering files.

Public Functions

inline I3CscdLlhPndlHnhParser(I3Configuration &config)
inline virtual ~I3CscdLlhPndlHnhParser()
virtual void AddParameters()

Add parameters.

virtual bool Configure()

Get parameters from the steering file. Parse parameter strings if necessary. Tell the fitter what to do with the parameters.

Returns:

true iff successful.

Private Functions

SET_LOGGER ("I3CscdLlhPndlHnhParser")

Private Members

double optPndlHnhWeight_
double optPandelSmallProb_
double optPandelTau_
double optPandelLambda_
double optPandelLambdaA_
double optPandelSigma_
double optPandelLightSpeed_
double optPandelMaxDist_
double optHitNoHitNorm_
double optHitNoHitLambdaAttn_
double optHitNoHitNoise_
double optHitNoHitDistCutoff_
double optHitNoHitDead_
double optHitNoHitSmallProb_
class I3CscdLlhPowell : public I3CscdLlhMinimizer
#include <I3CscdLlhPowell.h>

The I3CscdLlhPowell class uses the Powell algorithm to minimize a negative log-likelihood.

Public Functions

I3CscdLlhPowell()
I3CscdLlhPowell(int maxParams)
Parameters:

maxParams – The maximum number of minimization parameters.

virtual ~I3CscdLlhPowell()
virtual bool Minimize(std::list<I3CscdLlhHitPtr> *hits, I3CscdLlhAbsPdfPtr pdf)

Perform the actual minimization.

Parameters:
  • hits – The data: a list of OM hits.

  • pdf – The PDF.

Returns:

true if successful.

Protected Functions

virtual void Init(int maxParams)

Initialize. Called by the constructors.

Parameters:

maxParams – The maximum number of minimization parameters.

Returns:

true if successful.

Private Functions

void CopyFitParams(const Vec_DP p)

Copy the results of the fit to the I3CscdLlhResult.

Parameters:

p – A vector containing the results of the powell fit.

DP Func(Vec_I_DP &p)

The fcn is the function to be minimized: the negative log likelihood.

Parameters:

p – An array of parameters.

Returns:

the function value.

void Powell(Vec_IO_DP &p, Mat_IO_DP &xi, DP &fret)

Powell minimization. This code is adapted from Numerical Recipes.

Parameters:
  • p – A vector containing a point in the parameter space.

  • xi – A matrix, each column of which contains a direction vector in the parameter space.

  • fret – The function value evaluated at the point p.

void Linmin(Vec_IO_DP &p, Vec_IO_DP &xi, DP &fret)

Find the minumum value along a line in the parameter space. This code is adapted from Numerical Recipes.

Parameters:
  • p – A vector containing a point in the parameter space.

  • xi – A matrix, each column of which contains a direction vector in the parameter space.

  • fret – The function value evaluated at the point p.

void Mnbrak(DP &ax, DP &bx, DP &cx, DP &fa, DP &fb, DP &fc)

Find a bracketing triplet around the minimum. This code is adapted from Numerical Recipes.

Parameters:
  • ax – A seed bracket and a final side bracket.

  • bx – A seed bracket and a final middle bracket.

  • cx – A final side bracket.

  • fa – The function value at the final ax.

  • fb – The function value at the final bx.

  • fc – The function value at the final cx.

DP Brent(const DP ax, const DP bx, const DP cx, DP &xmin)

Brent minimization. This code is adapted from Numerical Recipes.

Parameters:
  • ax – Side bracket.

  • bx – Middle bracket.

  • cx – Side bracket.

  • xmin – The location of the minimum.

Returns:

The minimum function value.

DP F1dim(const DP x)

A function of one value, which is the minimization function along a line in the parameter space. This code is adapted from Numerical Recipes.

Parameters:

x – The abscissa.

Returns:

The minimum value.

inline void Shft3(DP &a, DP &b, DP &c, const DP d)
SET_LOGGER ("I3CscdLlhPowell")

Private Members

int nCom_
Vec_DP *pComP_
Vec_DP *xiComP_
struct I3CscdLlhResult
#include <I3CscdLlhResult.h>

The I3CscdLlhResult struct holds the result of the Llh minimization.

Public Functions

inline I3CscdLlhResult()
inline void Clear()

Public Members

int status
double t
double x
double y
double z
double theta
double phi
double energy
double errT
double errX
double errY
double errZ
double errTheta
double errPhi
double errEnergy
double negLlh
class I3CscdLlhSimplex : public I3CscdLlhMinimizer
#include <I3CscdLlhSimplex.h>

The I3CscdLlhSimplex class uses the Simplex algorithm to minimize a negative log-likelihood.

Public Functions

I3CscdLlhSimplex()
I3CscdLlhSimplex(int maxParams)
Parameters:

maxParams – The maximum number of minimization parameters.

virtual ~I3CscdLlhSimplex()
virtual bool Minimize(std::list<I3CscdLlhHitPtr> *hits, I3CscdLlhAbsPdfPtr pdf)

Perform the actual minimization.

Parameters:
  • hits – The data: a list of OM hits.

  • pdf – The PDF.

Returns:

true if successful.

Protected Functions

virtual void Init(int maxParams)

Initialize. Called by the constructors.

Parameters:

maxParams – The maximum number of minimization parameters.

Returns:

true if successful.

Private Functions

void CopyFitParams(const Mat_DP p)

Copy the results of the fit to the I3CscdLlhResult.

Parameters:

p – A matrix containing the results of the simplex fit. The first row contains the best vertex.

DP Func(Vec_I_DP &x)

The fcn is the function to be minimized: the negative log likelihood.

Parameters:

x – An array of parameters.

Returns:

the function value.

void Amoeba(Mat_IO_DP &p, Vec_IO_DP &y)

Simplex minimization. This code is adapted from Numerical Recipes.

Parameters:
  • p – A matrix containing the simplex. Each row has a simplex vertex. The number of colummns is equal to the dimension of the parameter space.

  • y – A vector containing the function values at each of the simplex vertices.

inline void Get_psum(Mat_I_DP &p, Vec_O_DP &psum)

Find the sum of simplex vertices. This code is adapted from Numerical Recipes.

Parameters:
  • p – A matrix containing the simplex.

  • psum – The resulting sum.

DP Amotry(Mat_IO_DP &p, Vec_O_DP &y, Vec_IO_DP &psum, const int ihi, const DP fac)

Evaluate the function with a trial simplex vertex. This code is adapted from Numerical Recipes.

Parameters:
  • p – A matrix containing the simplex.

  • y – The result (the function value.)

  • psum – The sum of simplex vertices.

  • ihi – The index (row) of the worst vertex that will be replaced if the trial vertex is better.

  • fac – A factor used for finding the position of the trial vertex.

SET_LOGGER ("I3CscdLlhSimplex")
class I3CscdLlhUPandel : public I3CscdLlhAbsPdf
#include <I3CscdLlhUPandel.h>

I3CscdLlhUPandel Calculates the UPandel function.

The Patched Pandel, or UPandel, function is briefly discussed in

J. Ahrens, et al. [AMANDA Collaboration], “Muon Track Reconstruction and Data Selection Techniques in AMANDA,” Nucl. Instrum. Meth. A 524, 169 (2004) [arXiv:astro-ph/0407044].

Some useful information can also be found in

“Photon arrival time distribution convoluted to a gaussian time measurement uncertainty”, G. Japaridze and M. Ribordy, AMANDA-IR/20031201, 2003,

but this article is mostly concerned with the Convoluted Pandel function.

The UPandel takes a different form in three domains:

\[\begin{split} P_U(d, t) = \left\{ \begin{array}{ll} P_1 & \mathrm{for} \ t < 0 ;\\ P_2 & \mathrm{for} \ 0 \leq t < t_1 ;\\ P_3 & \mathrm{for} \ t_1 \leq t .\end{array} \right. \end{split}\]

In the above formula, t is the time residual, that is, the time it takes light to travel from the cascade vertex to the OM, minus the time that a direct hit would take. A direct hit is a hit that is induced by a photon that travels directly from the cascade vertex to the OM, without scattering. \( t_1\) is the patch time. The functions \( P_1, P_2, P_3 \) are a Gaussian:

\[ P_1 = A \, \frac{1}{\sqrt{2 \, \pi} \, \sigma} \, \exp(-t^2 / 2 \sigma^2) \ , \]
a third-order polynomial:

\[ P_2 = c_0 + c_1 t + c_2 t^2 + c_3 t^3 \ , \]
and an unpatched Pandel function:

\[ P_3 = \frac{1}{\Gamma(\xi) \, \rho^\xi \, t^{\xi - 1} \, e^{- \rho t}} \ , \]
where \( \xi \equiv \frac{d}{\lambda}\) and \(\rho \equiv \frac{1}{\tau} + \frac{c}{\lambda_a}\). \(\ \ d\) is the distance from the cascade vertex to the OM. The constants \( \tau \) and \( \lambda\) are empirically determined parameters with units of time and distance, respectively; \( \lambda_a\) is the photon absorption length. \(\ \ \sigma\) is the jitter time of the phototubes.

The parameters \(A\), \(c_0\), \(c_1\), \(c_2\), and \(c_3\) are determined by requiring that the UPandel function is continuous and differentiable at \(t=0\) and \(t=t_1\), the slope is zero at \(t=0\), and the integral over time from \( t = - \infty\) to \( t = \infty\) equals 1. Also, the patch time \(t_1\) is set to \(\sqrt{2 \, \pi} \sigma\).

A small number \(p_0\) is added to \(P_U\) to model uncorrelated noise hits. This also helps prevent \(P_U\) from becoming negative due to rounding errors.

Subclassed by I3CscdLlhUPandelMpe

Public Functions

I3CscdLlhUPandel()
inline virtual ~I3CscdLlhUPandel()
virtual void Evaluate(const I3CscdLlhHitPtr &hit, const double *param, double &value) const

Calculate the UPandel PDF.

Parameters:
  • hit – The OM hit data.

  • param – Pointer to an array containing the cascade vertex time and position. param[i] is (t, x, y, z) for i = (0, 1, 2, 3).

  • value – The result.

virtual void CalculateGradient(const I3CscdLlhHitPtr &hit, const double *param, double *gradient) const

Calculate the gradient of the PDF with respect to the vertex parameters.

Parameters:
  • hit – The OM hit data.

  • param – Pointer to an array containing the cascade vertex time and position. param[i] is (t, x, y, z) for i = (0, 1, 2, 3).

  • gradient – is the result, that is, gradient[i] is the derivative of the PDF with respect to param[i].

inline virtual int GetNumParams() const

Get the number of minimization parameters (fixed and free.)

Returns:

the number of paramters.

virtual int GetParamIndex(const std::string name) const

Get the index of a minimization parameter.

Parameters:

name – The name of the parameter.

Returns:

the index of the parameter in the parameter array.

virtual std::string GetParamName(const int index) const

Get the name of a minimization parameter.

Parameters:

index – The parameter index.

Returns:

the name of the parameter.

virtual bool SetConstant(int id, double value)

Set a constant value.

Parameters:
  • id – A predefined identifier for the constant.

  • value – The value to be assigned to the constant.

Returns:

true if successful.

virtual bool SetConstant(int id, int value)
virtual bool SetConstant(int id, bool value)
virtual bool SetConstant(int id, std::string value)

Public Static Attributes

static const int CONST_NULL = 0
static const int CONST_C_ICE = 1
static const int CONST_SMALL_PROB = 2
static const int CONST_TAU = 3
static const int CONST_LAMBDA = 4
static const int CONST_LAMBDA_A = 5
static const int CONST_SIGMA = 6
static const int CONST_MAX_DIST = 7
static const double DEFAULT_C_ICE = 2.99792458e-1 / 1.31
static const double DEFAULT_SMALL_PROB = 1.0e-10
static const double DEFAULT_TAU = 450.0
static const double DEFAULT_LAMBDA = 47.0
static const double DEFAULT_LAMBDA_A = 98.0
static const double DEFAULT_SIGMA = 15.0
static const double DEFAULT_MAX_DIST = 500.0

Protected Functions

double EvaluateGaussian(double dist, double tResidual) const

Evaluate the Gaussian.

Parameters:
  • dist – Distance from the vertex.

  • tResidual – The time residual.

Returns:

the probability.

double EvaluateSpline(double dist, double tResidual) const

Evaluate the spline.

Parameters:
  • dist – Distance from the vertex.

  • tResidual – The time residual.

Returns:

the probability.

double EvaluatePandel(double dist, double tResidual) const

Evaluate the (unpatched) Pandel function.

Parameters:
  • dist – Distance from the vertex.

  • tResidual – The time residual.

Returns:

the probability.

double DifferentiatePandel(double dist, double tResidual) const

Differentiate the PDF with respect to tResidual.

Parameters:
  • dist – Distance from the vertex.

  • tResidual – The time residual.

Returns:

the derivative of the PDF with respect to time.

double IntegratePandel(double dist, double tResidual) const

Integrate the Pandel function from 0.0 to tResidual.

double CalculateC0(double dist) const

The spline coefficients.

double CalculateC2(double dist) const
double CalculateC3(double dist) const
SET_LOGGER ("I3CscdLlhUPandel")

Protected Attributes

double cIce_
double smallProb_
double tau_
double lambda_
double lambdaA_
double sigma_
double maxDist_
double rho_
double patchTime_

Protected Static Attributes

static const int MINIMIZATION_PARAMS = 4
static const int PARAM_INDEX_T = 0
static const int PARAM_INDEX_X = 1
static const int PARAM_INDEX_Y = 2
static const int PARAM_INDEX_Z = 3

Private Functions

inline void SetRho()
inline void SetPatchTime()
class I3CscdLlhUPandelMpe : public I3CscdLlhUPandel

I3CscdLlhUPandelMpe calculates the multi-photoelectron likelihood based on the patched Pandel (UPandel) function.

The MPE time-likelihood approach is briefly discussed in

J. Ahrens, et al. [AMANDA Collaboration], “Muon Track Reconstruction and Data Selection Techniques in AMANDA,” Nucl. Instrum. Meth. A 524, 169 (2004) [arXiv:astro-ph/0407044].

The MPE UPandel PDF gives the probability that, for an OM with \(n\) hits, the time residuals will all be greater than \(t\):

\[ P_{\mathrm{MPE}}(d, t) = n \, \left[\, P_U(d, t) + p_0 \, \right] \, \left[\, \left(\, \int_t^\infty \, dt^\prime \, P_U(d, t^\prime) \, \right) + p_0 \, \right]^{(n-1)} \ , \]

where \( P_U \) is the unpatched Pandel function.

A small number \(p_0\) is used to model uncorrelated noise hits. This also helps prevent \(P_{\mathrm{MPE}}\) from becoming negative due to rounding errors. To keep things simple, the same \(p_0\) is used for all \(n\) factors.

Public Functions

I3CscdLlhUPandelMpe()
inline virtual ~I3CscdLlhUPandelMpe()
virtual void Evaluate(const I3CscdLlhHitPtr &hit, const double *param, double &value) const

Calculate the MPE UPandel PDF.

Parameters:
  • hit – The OM hit data.

  • param – Pointer to an array containing the cascade vertex time and position. param[i] is (t, x, y, z) for i = (0, 1, 2, 3).

  • value – The result.

virtual void CalculateGradient(const I3CscdLlhHitPtr &hit, const double *param, double *gradient) const

Calculate the gradient of the PDF with respect to the vertex parameters.

Parameters:
  • hit – The OM hit data.

  • param – Pointer to an array containing the cascade vertex time and position. param[i] is (t, x, y, z) for i = (0, 1, 2, 3).

  • gradient – is the result, that is, gradient[i] is the derivative of the PDF with respect to param[i].

Protected Functions

double IntegrateUPandel(double dist, double tResidual) const

Integrate the UPandel function from tResidual to infinity.

double IntegrateGaussian(double dist, double tResidual) const

Integrate the Gaussian from negative infinity to tResidual.

double IntegrateSpline(double dist, double tResidual) const

Integrate the spline from zero to tResidual.

SET_LOGGER ("I3CscdLlhUPandelMpe")
class I3CscdLlhUPandelParser : public I3CscdLlhAbsParser

I3CscdLlhUPandelParser extracts parameters from cscd-llh steering files.

Public Functions

inline I3CscdLlhUPandelParser(I3Configuration &config)
inline virtual ~I3CscdLlhUPandelParser()
virtual void AddParameters()

Add parameters.

virtual bool Configure()

Get parameters from the steering file. Parse parameter strings if necessary. Tell the fitter what to do with the parameters.

Returns:

true iff successful.

Protected Functions

SET_LOGGER ("I3CscdLlhUPandelParser")

Protected Attributes

double optPandelSmallProb_
double optPandelTau_
double optPandelLambda_
double optPandelLambdaA_
double optPandelSigma_
double optPandelLightSpeed_
double optPandelMaxDist_
template<class T>
class NRMat
#include <NRUtil.h>

A home-grown Matrix class for use with the Numerical Recipes algorithms.

Public Functions

NRMat()

Default constructor.

NRMat(int n, int m)

Create a Matrix full of zeros.

Parameters:
  • n – &#8212;The number of rows of the new matrix.

  • m – &#8212;The number of columns of the matrix.

NRMat(const T &a, int n, int m)

Create a Matrix each element of which is initialized with some value.

Parameters:
  • &a – &#8212;A value of type T.

  • n – &#8212;The number of rows.

  • m – &#8212;The number of columns.

NRMat(const T *a, int n, int m)

Create a Matrix by copying the contents of one array.

Parameters:
  • *a – &#8212;An array of type T’s, of length m*n.

  • n – &#8212;The number of rows.

  • m – &#8212;The number of columns.

NRMat(const NRMat &rhs)

Copy constructor.

NRMat &operator=(const NRMat &rhs)

Assignment operator.

NRMat &operator=(const T &a)

Overloaded ‘=’ operator that assigns a value of a to every element.

inline T *operator[](const int i)

Element access operator.

inline const T *operator[](const int i) const

Const version of the element access operator.

inline int nrows() const

The number of rows.

Returns:

&#8212;The number of rows for this matrix.

inline int ncols() const

The number of columns.

Returns:

&#8212;The number of columns for this matrix.

~NRMat()

The destructor.

Private Members

int nn
int mm
T **v
template<class T>
class NRMat3d
#include <NRUtil.h>

A 3D matrix for use with the Numerical Recipes algorithms.

Public Functions

NRMat3d()

Default constructor.

NRMat3d(int n, int m, int k)

Create a 3D Matrix.

Parameters:
  • n – &#8212;The number of rows.

  • m – &#8212;The number of columns.

  • k – &#8212;The size of the third dimension.

inline T **operator[](const int i)

Element access operator.

inline const T *const *operator[](const int i) const

Const version of the access operator.

inline int dim1() const

The size of dimension 1.

Returns:

&#8212;The number of elements in dimension 1.

inline int dim2() const

The size of dimension 2.

Returns:

&#8212;The number of elements in dimension 2.

inline int dim3() const

The size of dimension 2.

Returns:

&#8212;The number of elements in dimension 2.

~NRMat3d()

Destructor.

Private Members

int nn
int mm
int kk
T ***v
template<class T>
class NRVec
#include <NRUtil.h>

Public Functions

NRVec()

Default constructor.

explicit NRVec(int n)

Create a vector of dimension n, located at the origin.

Parameters:

n – &#8212;The dimension of this vector.

NRVec(const T &a, int n)
NRVec(const T *a, int n)
NRVec(const NRVec &rhs)
NRVec &operator=(const NRVec &rhs)
NRVec &operator=(const T &a)

Overloaded ‘=’ operator that assigns a value to each element of the array.

Parameters:

&a – &#8212;A value to assign to each element.

inline T &operator[](const int i)

Coordinate access operator.

inline const T &operator[](const int i) const

Const version of the coordinate access operator.

inline int size() const

The dimension of the vector.

~NRVec()

Destructor.

Private Members

int nn
T *v
namespace std

STL namespace.

file I3CscdLlhAbsParser.h
#include <icetray/I3Logging.h>
#include <icetray/I3Context.h>
#include <icetray/I3Configuration.h>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhAbsParser> I3CscdLlhAbsParserPtr
file I3CscdLlhAbsPdf.h

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs

1.1

Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhAbsPdf> I3CscdLlhAbsPdfPtr
file I3CscdLlhBrent.cxx
#include <iostream>
#include <climits>
#include <limits>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

file I3CscdLlhBrent.h

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhBrent> I3CscdLlhBrentPtr
file I3CscdLlhFitter.cxx
#include <icetray/I3Configuration.h>
#include <time.h>
#include <iostream>
#include <string>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs

1.1

Date

$Date$

Author

mggreene

Author

Doug Rutledge

file I3CscdLlhFitter.h
#include “recclasses/I3CscdLlhFitParams.h”
#include “icetray/OMKey.h”
#include “icetray/I3Logging.h”
#include “dataclasses/physics/I3Particle.h”
#include <list>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs

1.1

Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhFitter> I3CscdLlhFitterPtr
file I3CscdLlhGeneralParser.cxx
#include “dataclasses/I3Constants.h”

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

file I3CscdLlhGeneralParser.h

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhGeneralParser> I3CscdLlhGeneralParserPtr
file I3CscdLlhHit.h
#include <math.h>
#include “icetray/OMKey.h”

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs

1.1

Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhHit> I3CscdLlhHitPtr
file I3CscdLlhHitNoHit.cxx
#include <iostream>
#include <math.h>
#include <climits>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

file I3CscdLlhHitNoHit.h
#include “icetray/I3Logging.h”

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhHitNoHit> I3CscdLlhHitNoHitPtr
file I3CscdLlhHitNoHitMpe.cxx
#include <iostream>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

file I3CscdLlhHitNoHitMpe.h
#include “icetray/I3Logging.h”
#include <math.h>
#include <gsl/gsl_randist.h>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhHitNoHitMpe> I3CscdLlhHitNoHitMpePtr
file I3CscdLlhHitNoHitParser.cxx
#include “dataclasses/I3Constants.h”

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

file I3CscdLlhHitNoHitParser.h

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhHitNoHitParser> I3CscdLlhHitNoHitParserPtr
file I3CscdLlhHnhDir.cxx
#include “dataclasses/I3Constants.h”

copyright (c) 2006 the IceCube collaboration $Id$

Version

Author

Doug Rutledge

Date

1Feb2006

file I3CscdLlhHnhDir.h
#include <cmath>

copyright (C) 2006 the IceCube collaboration $Id$

Version

Author

Doug Rutledge

Date

1Feb2006

Typedefs

typedef boost::shared_ptr<I3CscdLlhHnhDir> I3CscdLlhHnhDirPtr
file I3CscdLlhHnhDirParser.cxx

copyright (c) 2006 the IceCube collaboration $Id$

Version

Author

Doug Rutledge

Date

08Feb2006

file I3CscdLlhHnhDirParser.h

copyright (c) 2006 the IceCube collaboration $Id$

Version

Author

Doug Rutledge

Date

08Feb2006

Typedefs

typedef boost::shared_ptr<I3CscdLlhHnhDirParser> I3CscdLlhHnhDirParserPtr
file I3CscdLlhMinimizer.cxx
#include <iostream>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs

1.1

Date

$Date$

Author

mggreene

file I3CscdLlhMinimizer.h
#include “icetray/I3Logging.h”
#include <list>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs

1.1

Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhMinimizer> I3CscdLlhMinimizerPtr
file I3CscdLlhModule.cxx
#include <icetray/I3Configuration.h>
#include “recclasses/I3CscdLlhFitParams.h”
#include “dataclasses/geometry/I3Geometry.h”
#include “dataclasses/physics/I3RecoHit.h”
#include “dataclasses/physics/I3RecoPulse.h”
#include “dataclasses/physics/I3Particle.h”
#include “dataclasses/status/I3DOMStatus.h”
#include “dataclasses/status/I3DetectorStatus.h”
#include “icetray/I3TrayHeaders.h”
#include <iostream>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs

1.2

Date

$Date$

Author

mggreene

Author

Doug Rutledge (maintenance and DC V2 Conversion)

Functions

I3_MODULE(I3CscdLlhModule)
file I3CscdLlhModule.h
#include “icetray/I3ConditionalModule.h”
#include “icetray/OMKey.h”

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs

1.1

Date

$Date$

Author

mggreene

Author

Doug Rutledge (maintenance and DC V2 Conversion)

file I3CscdLlhPndlHnh.cxx
#include <iostream>
#include <math.h>
#include <climits>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

file I3CscdLlhPndlHnh.h
#include “icetray/I3Logging.h”

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhPndlHnh> I3CscdLlhPndlHnhPtr
file I3CscdLlhPndlHnhParser.cxx
#include “dataclasses/I3Constants.h”

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

file I3CscdLlhPndlHnhParser.h

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhPndlHnhParser> I3CscdLlhPndlHnhParserPtr
file I3CscdLlhPowell.cxx
#include <iostream>
#include <climits>
#include <limits>
#include <algorithm>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

file I3CscdLlhPowell.h

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhPowell> I3CscdLlhPowellPtr
file I3CscdLlhResult.h
#include <math.h>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs

1.1

Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhResult> I3CscdLlhResultPtr
file I3CscdLlhSimplex.cxx
#include <boost/format.hpp>
#include <iostream>
#include <climits>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

file I3CscdLlhSimplex.h

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhSimplex> I3CscdLlhSimplexPtr
file I3CscdLlhUPandel.cxx
#include <iostream>
#include <math.h>
#include <climits>
#include <gsl/gsl_sf_gamma.h>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs

1.1

Date

$Date$

Author

mggreene

file I3CscdLlhUPandel.h
#include “icetray/I3Logging.h”

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs

1.3

Date

$Date$

Author

mggreene

Author

Doug Rutledge

Typedefs

typedef boost::shared_ptr<I3CscdLlhUPandel> I3CscdLlhUPandelPtr
file I3CscdLlhUPandelMpe.cxx
#include <iostream>
#include <math.h>
#include <gsl/gsl_sf_erf.h>

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

file I3CscdLlhUPandelMpe.h
#include “icetray/I3Logging.h”

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhUPandelMpe> I3CscdLlhUPandelMpePtr
file I3CscdLlhUPandelParser.cxx
#include <icetray/I3Configuration.h>
#include “dataclasses/I3Constants.h”

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

file I3CscdLlhUPandelParser.h

copyright (C) 2005 the icecube collaboration $Id$

Version

Rcs
Date

$Date$

Author

mggreene

Typedefs

typedef boost::shared_ptr<I3CscdLlhUPandelParser> I3CscdLlhUPandelParserPtr
file NRDataTypes.h
#include <complex>
#include <fstream>

Typedefs

typedef double DP
typedef const NRVec<bool> Vec_I_BOOL
typedef NRVec<bool> Vec_BOOL
typedef NRVec<bool> Vec_O_BOOL
typedef NRVec<bool> Vec_IO_BOOL
typedef const NRVec<char> Vec_I_CHR
typedef NRVec<char> Vec_CHR
typedef NRVec<char> Vec_O_CHR
typedef NRVec<char> Vec_IO_CHR
typedef const NRVec<unsigned char> Vec_I_UCHR
typedef NRVec<unsigned char> Vec_UCHR
typedef NRVec<unsigned char> Vec_O_UCHR
typedef NRVec<unsigned char> Vec_IO_UCHR
typedef const NRVec<int> Vec_I_INT
typedef NRVec<int> Vec_INT
typedef NRVec<int> Vec_O_INT
typedef NRVec<int> Vec_IO_INT
typedef const NRVec<unsigned int> Vec_I_UINT
typedef NRVec<unsigned int> Vec_UINT
typedef NRVec<unsigned int> Vec_O_UINT
typedef NRVec<unsigned int> Vec_IO_UINT
typedef const NRVec<long> Vec_I_LNG
typedef NRVec<long> Vec_LNG
typedef NRVec<long> Vec_O_LNG
typedef NRVec<long> Vec_IO_LNG
typedef const NRVec<unsigned long> Vec_I_ULNG
typedef NRVec<unsigned long> Vec_ULNG
typedef NRVec<unsigned long> Vec_O_ULNG
typedef NRVec<unsigned long> Vec_IO_ULNG
typedef const NRVec<float> Vec_I_SP
typedef NRVec<float> Vec_SP
typedef NRVec<float> Vec_O_SP
typedef NRVec<float> Vec_IO_SP
typedef const NRVec<DP> Vec_I_DP
typedef NRVec<DP> Vec_DP
typedef NRVec<DP> Vec_O_DP
typedef NRVec<DP> Vec_IO_DP
typedef const NRVec<std::complex<float>> Vec_I_CPLX_SP
typedef NRVec<std::complex<float>> Vec_CPLX_SP
typedef NRVec<std::complex<float>> Vec_O_CPLX_SP
typedef NRVec<std::complex<float>> Vec_IO_CPLX_SP
typedef const NRVec<std::complex<DP>> Vec_I_CPLX_DP
typedef NRVec<std::complex<DP>> Vec_CPLX_DP
typedef NRVec<std::complex<DP>> Vec_O_CPLX_DP
typedef NRVec<std::complex<DP>> Vec_IO_CPLX_DP
typedef const NRMat<bool> Mat_I_BOOL
typedef NRMat<bool> Mat_BOOL
typedef NRMat<bool> Mat_O_BOOL
typedef NRMat<bool> Mat_IO_BOOL
typedef const NRMat<char> Mat_I_CHR
typedef NRMat<char> Mat_CHR
typedef NRMat<char> Mat_O_CHR
typedef NRMat<char> Mat_IO_CHR
typedef const NRMat<unsigned char> Mat_I_UCHR
typedef NRMat<unsigned char> Mat_UCHR
typedef NRMat<unsigned char> Mat_O_UCHR
typedef NRMat<unsigned char> Mat_IO_UCHR
typedef const NRMat<int> Mat_I_INT
typedef NRMat<int> Mat_INT
typedef NRMat<int> Mat_O_INT
typedef NRMat<int> Mat_IO_INT
typedef const NRMat<unsigned int> Mat_I_UINT
typedef NRMat<unsigned int> Mat_UINT
typedef NRMat<unsigned int> Mat_O_UINT
typedef NRMat<unsigned int> Mat_IO_UINT
typedef const NRMat<long> Mat_I_LNG
typedef NRMat<long> Mat_LNG
typedef NRMat<long> Mat_O_LNG
typedef NRMat<long> Mat_IO_LNG
typedef const NRMat<unsigned long> Mat_I_ULNG
typedef NRMat<unsigned long> Mat_ULNG
typedef NRMat<unsigned long> Mat_O_ULNG
typedef NRMat<unsigned long> Mat_IO_ULNG
typedef const NRMat<float> Mat_I_SP
typedef NRMat<float> Mat_SP
typedef NRMat<float> Mat_O_SP
typedef NRMat<float> Mat_IO_SP
typedef const NRMat<DP> Mat_I_DP
typedef NRMat<DP> Mat_DP
typedef NRMat<DP> Mat_O_DP
typedef NRMat<DP> Mat_IO_DP
typedef const NRMat<std::complex<float>> Mat_I_CPLX_SP
typedef NRMat<std::complex<float>> Mat_CPLX_SP
typedef NRMat<std::complex<float>> Mat_O_CPLX_SP
typedef NRMat<std::complex<float>> Mat_IO_CPLX_SP
typedef const NRMat<std::complex<DP>> Mat_I_CPLX_DP
typedef NRMat<std::complex<DP>> Mat_CPLX_DP
typedef NRMat<std::complex<DP>> Mat_O_CPLX_DP
typedef NRMat<std::complex<DP>> Mat_IO_CPLX_DP
typedef const NRMat3d<DP> Mat3D_I_DP
typedef NRMat3d<DP> Mat3D_DP
typedef NRMat3d<DP> Mat3D_O_DP
typedef NRMat3d<DP> Mat3D_IO_DP
typedef NRVec<unsigned long*> Vec_ULNG_p
typedef NRVec<NRMat<DP>*> Vec_Mat_DP_p
typedef NRVec<std::fstream*> Vec_FSTREAM_p
file NRUtil.h
#include <string>
#include <cmath>
#include <complex>
#include <iostream>

Functions

template<class T>
inline const T SQR(const T a)

Calculate the square of two classes that have a defined * operator.

Parameters:

a – &#8212;An object of type const T.

Returns:

&#8212;An object of type T that is a*a.

template<class T>
inline const T SIGN(const T &a, const T &b)

Compare the sign of two objects, and return the first such that it has the same sign as the second.

Parameters:
  • &a – &#8212;A class of type T.

  • &b – &#8212;A class of type T.

Returns:

&#8212;An object of type T that is either a or -a, depending on the sign of b.

dir cscd-llh
dir cscd-llh
dir cscd-llh
dir icetray
dir minimizer
dir minimizer
dir parser
dir parser
dir pdf
dir pdf
dir private
dir public