bayesian-priors C++ API Reference

class I3ConstantZenithWeight : public I3ServiceBase

Trivial zenith weight function, for Bayesian reconstruction.

This class defines a trivial weight function.

See also

I3EventLogLikelihoodCombiner

See also

I3ZenithWeight

Public Functions

inline I3ConstantZenithWeight(const I3Context &context)

construct self & declare configuration parameters

inline virtual ~I3ConstantZenithWeight()

cleanup

inline virtual void Configure()

get configuration parameters

inline double LogWeight(double coszen)

Get +log(likelihood) for a particular emission hypothesis.

SET_LOGGER ("I3ConstantZenithWeight")
class I3PolynomialZenithWeight : public I3ServiceBase

Zenith weight function, for Bayesian reconstruction.

This class defines a weight function which is polynomial of cos(zenith). The default uses the same coefficients as Ty’s P7 zenith weight function for AMANDA data (function like_ama_zenwght2(..), defined in siegmund/recoos/reco_amanda.c, line 205-235).

See also

I3EventLogLikelihoodCombiner

See also

I3ZenithWeight

Public Functions

I3PolynomialZenithWeight(const I3Context &context)

construct self & declare configuration parameters

inline virtual ~I3PolynomialZenithWeight()

cleanup

virtual void Configure()

get configuration parameters

double LogWeight(double coszen)

Get +log(likelihood) for a particular emission hypothesis.

SET_LOGGER ("I3PolynomialZenithWeight")
double EvalPolynomial(double coszen)

Public Static Attributes

static const std::string coefsOptionName_ = "Coefficients"
static const std::string mincoszenOptionName_ = "MinCosZenith"
static const std::string defw8OptionName_ = "DefaultWeight"
static const double DEFAULT_DEFWEIGHT_ = 1.0 / 9e5
static const double DEFAULT_MINCOSZEN_ = 0.1
static const std::vector<double> DEFAULT_COEFFICIENTS_

Private Members

std::vector<double> coefficients_

polynomial coefficients

double minCosZen_

minimum cos(zen) for polynomial (otherwise constant)

double defWeight_

constant weight, for cos(zen) less than minimum

class I3PowExpZenithWeight : public I3ServiceBase

Zenith weight function, for Bayesian reconstruction.

This class defines a weight function which is a three-parameter analytic function of costh=cos(zenith): w=a0*pow(costh,a1)*exp(-a2/costh); The default values for the constants a0, a1, a2 are the same as for AMANDA data (function like_ama_zenwght3(..), as defined in siegmund/recoos/reco_amanda.c, line 238-257).

See also

I3EventLogLikelihoodCombiner

See also

I3ZenithWeight

Public Functions

I3PowExpZenithWeight(const I3Context &context)

construct self & declare configuration parameters

inline virtual ~I3PowExpZenithWeight()

cleanup

virtual void Configure()

get configuration parameters

double LogWeight(double coszen)

Get +log(likelihood) for a particular emission hypothesis.

SET_LOGGER ("I3PowExpZenithWeight")

Public Static Attributes

static const std::string amplOptionName_ = "Amplitude"
static const std::string powerOptionName_ = "Power"
static const std::string expOptionName_ = "ExponentFactor"
static const std::string defw8OptionName_ = "DefaultWeight"
static const double DEFAULT_AMPLITUDE_ = 2.49655e-7
static const double DEFAULT_POWER_ = 1.67721
static const double DEFAULT_EXPFACTOR_ = 0.778393
static const double DEFAULT_DEFWEIGHT_ = exp(-200)

Private Functions

double FindMinimumCosZenith(double z, double dz, double tol, int nestlevel)

recursive function used to approximate from below the cos(zenith) value for which weight==defWeight_.

Private Members

double amplitude_

parameter a0: scale factor of weight function

double logAmplitude_
double power_

parameter a1: exponent in in power factor

double expFactor_

parameter a2: numerator in in exponent of the exponential factor

double minCosZenith_

minimum cos(zen) (for lower values, always return defWeight_)

double defWeight_

constant weight, for cos(zen) less than minimum

double logDefWeight_

log of default weight

class I3PowExpZenithWeightServiceFactory

This service provides a gulliver I3EventLogLikelihoodBase which includes a prior probability to the liklihood as a function of zenith angle to provide a “Bayesian” reconstruction.

The zenith weight function is a three-parameter analytic function of costh=cos(zenith): w=a0*pow(costh,a1)*exp(-a2/costh); The default values for the constants a0, a1, a2 are the same as for AMANDA data (function like_ama_zenwght3(..), as defined in siegmund/recoos/reco_amanda.c, line 238-257).

class I3TableZenithWeight : public I3ServiceBase

Zenith weight function, for Bayesian reconstruction.

This class defines a weight function which does a table lookup, for constant-sized bins in cos(zenith), and interpolating. The default uses the same coefficients as the “zenith_weight” function (called by “like_ama_zenwght”) for AMANDA data, as defined in siegmund/recoos/reco_amanda.c, line 133-146).

See also

I3EventLogLikelihoodCombiner

See also

I3ZenithWeight

Public Functions

I3TableZenithWeight(const I3Context &context)

construct self & declare configuration parameters

inline virtual ~I3TableZenithWeight()

cleanup

virtual void Configure()

get configuration parameters

double LogWeight(double coszen)

Get +log(likelihood) for a particular emission hypothesis.

SET_LOGGER ("I3TableZenithWeight")

Public Static Attributes

static const std::string tabvalOptionName_ = "TableValues"
static const std::string mincoszenOptionName_ = "MinCosZenith"
static const std::vector<double> defTable_
static const double defMinCosZen_ = 0.1

Private Functions

double Interpolate(double coszen)

interpolate in 1D table to get weight factor

Private Members

std::vector<double> table_

table values in cos zenith equidistant bins from minCosZenith_ to 1.0

double minCosZen_

minimum cos(zen) for polynomial (otherwise constant)

double dCosZen_

table binsize in cos(zen)

int nBins_

number of bins in table

double defWeight_

constant weight, for cos(zen) less than minimum

template<class WeightCalc>
class I3ZenithWeight : public I3EventLogLikelihoodBase, public WeightCalc
#include <I3ZenithWeight.h>

Zenith weight function, for Bayesian reconstruction.

This templated class easifies the coding of zenith-weight type Bayesian priors (priors which only depend on cos(zenith)).

Todo:

Maybe the “penalty” value should not be configurable in this class, but rather be determined by the actual weight calculator.

See also

I3EventLogLikelihoodCombiner

Public Functions

I3ZenithWeight(const I3Context &context)

construct self & declare configuration parameters

inline virtual ~I3ZenithWeight()

cleanup

virtual void Configure()

get configuration parameters

inline void SetGeometry(const I3Geometry &geo)

provide geometry: the zenith weight function does not use the geometry

inline void SetEvent(const I3Frame &f)

provide event data: the zenith weight function does not use event data.

double GetLogLikelihood(const I3EventHypothesis &t)

Get +log(likelihood) for a particular emission hypothesis.

inline unsigned int GetMultiplicity()

the zenith weight function does not use event data.

const std::string GetName() const

tell your name

SET_LOGGER ("I3ZenithWeight")

Public Static Attributes

static const std::string flipOptionName_ = "FlipTrack"
static const std::string penaltyOptionName_ = "PenaltyValue"
static const std::string slopeOptionName_ = "PenaltySlope"
static const std::string coszenrangeOptionName_ = "CosZenithRange"
static const bool DEFAULT_FLIP_ = false
static const double DEFAULT_PENALTY_ = -200
static const double DEFAULT_SLOPE_ = 0
static const double DEFAULT_MINCOSZENITH_ = -1.
static const double DEFAULT_MAXCOSZENITH_ = +1.

Private Members

bool flip_
double penalty_
double penaltySlope_
double minCosZenith_
double maxCosZenith_
double zenithCache_
double weightCache_
namespace std

STL namespace.

file I3ConstantZenithWeight.h
#include “icetray/I3ServiceBase.h”
#include “icetray/I3Context.h”

(c) 2005 * the IceCube Collaboration

$Id$

Version

$Revision$

Date

$Date$

Author

boersma

file I3PolynomialZenithWeight.cxx
#include <cmath>

implementation of the I3PolynomialZenithWeight class

(c) 2007 * the IceCube Collaboration

$Id$

Version

$Revision$

Date

$Date$

Author

boersma

Variables

static const double TyceNumbers[8] = {-124.41 * 53.21 / 9e5, 3212.9 * 53.21 / 9e5, -25377. * 53.21 / 9e5, 27699. * 53.21 / 9e5, 0.39179E+06 * 53.21 / 9e5, -0.10423E+07 * 53.21 / 9e5, 0.10268E+07 * 53.21 / 9e5, -0.36495E+06 * 53.21 / 9e5}
file I3PolynomialZenithWeight.h
#include “icetray/I3ServiceBase.h”
#include “icetray/I3Context.h”

declaration of the I3PolynomialZenithWeight class

(c) 2007 * the IceCube Collaboration

$Id$

Version

$Revision$

Date

$Date$

Author

boersma

file I3PowExpZenithWeight.cxx
#include <cmath>

implementation of the I3PowExpZenithWeight class

(c) 2007 * the IceCube Collaboration

$Id$

Version

$Revision$

Date

$Date$

Author

boersma

file I3PowExpZenithWeight.h
#include “icetray/I3ServiceBase.h”
#include “icetray/I3Context.h”

declaration of the I3PowExpZenithWeight class

(c) 2007 * the IceCube Collaboration

$Id$

Version

$Revision$

Date

$Date$

Author

boersma

file I3TableZenithWeight.cxx
#include <cmath>
#include <algorithm>

implementation of the I3TableZenithWeight class

(c) 2007 * the IceCube Collaboration

$Id$

Version

$Revision$

Date

$Date$

Author

boersma

Variables

const double deftable[11] = {1.0, 200, 5e3, 5e4, 1e5, 2e5, 4e5, 5e5, 6e5, 8e5, 9e5}
file I3TableZenithWeight.h
#include <vector>
#include “icetray/I3ServiceBase.h”
#include “icetray/I3Context.h”

declaration of the I3TableZenithWeight class

(c) 2007 * the IceCube Collaboration

$Id$

Version

$Revision$

Date

$Date$

Author

boersma

file I3ZenithWeight.cxx
#include “icetray/I3SingleServiceFactory.h”

implementation of the I3ZenithWeight class plus instantiations

(c) 2007 * the IceCube Collaboration $Id$

Version

$Revision$

Date

$Date$

Author

boersma

Typedefs

typedef I3ZenithWeight<I3PolynomialZenithWeight> I3PolynomialZenithWeightService
typedef I3SingleServiceFactory<I3PolynomialZenithWeightService, I3EventLogLikelihoodBase> I3PolynomialZenithWeightServiceFactory
typedef I3ZenithWeight<I3TableZenithWeight> I3TableZenithWeightService
typedef I3SingleServiceFactory<I3TableZenithWeightService, I3EventLogLikelihoodBase> I3TableZenithWeightServiceFactory
typedef I3ZenithWeight<I3PowExpZenithWeight> I3PowExpZenithWeightService
typedef I3SingleServiceFactory<I3PowExpZenithWeightService, I3EventLogLikelihoodBase> I3PowExpZenithWeightServiceFactory
typedef I3ZenithWeight<I3ConstantZenithWeight> I3ConstantZenithWeightService
typedef I3SingleServiceFactory<I3ConstantZenithWeightService, I3EventLogLikelihoodBase> I3ConstantZenithWeightServiceFactory

Functions

void SetEvent(const I3Frame &f)

provide event data: the zenith weight function does not use event data.

file I3ZenithWeight.h
#include “gulliver/I3EventLogLikelihoodBase.h”
#include “icetray/IcetrayFwd.h”
#include “dataclasses/physics/I3Particle.h”
#include “gulliver/I3EventHypothesis.h”
#include “icetray/I3ServiceBase.h”

declaration of the I3ZenithWeight class

(c) 2007 * the IceCube Collaboration $Id$

Version

$Revision$

Date

$Date$

Author

boersma

page todo

Class I3ZenithWeight< WeightCalc >

Maybe the “penalty” value should not be configurable in this class, but rather be determined by the actual weight calculator.

dir bayesian-priors
dir bayesian-priors
dir bayesian-priors
dir icetray
dir private
dir public