gulliver-bootstrap C++ API Reference¶
-
class BootstrapParams : public I3FrameObject¶
- #include <BootstrapParams.h>
Public Types
-
enum ResultStatus¶
Values:
-
enumerator OK¶
The estimate was computed as expected.
-
enumerator Underflow¶
The requested containment level was inside all successful fits. The resulting estimate will be an overestimate.
-
enumerator Overflow¶
The requested containment level was outside all successful fits. The resulting estimate will be an underestimate.
-
enumerator NoValidFits¶
No fits were successful so no estimate could be produced.
-
enumerator OK¶
Public Functions
-
BootstrapParams()¶
-
BootstrapParams(ResultStatus status, uint32_t successfulFits, uint32_t totalFits)¶
-
~BootstrapParams()¶
Public Members
-
ResultStatus status¶
Friends
- friend class icecube::serialization::access
-
enum ResultStatus¶
-
class BootstrapParamsConverter : public I3ConverterImplementation<BootstrapParams>¶
- #include <BootstrapParamsConverter.h>
Private Functions
-
I3TableRowDescriptionPtr CreateDescription(const BootstrapParams &p)¶
-
size_t FillRows(const BootstrapParams &p, I3TableRowPtr rows)¶
-
I3TableRowDescriptionPtr CreateDescription(const BootstrapParams &p)¶
-
class BootstrappingLikelihoodService : public I3EventLogLikelihoodBase, public I3ServiceBase¶
- #include <BootstrappingLikelihoodService.h>
A likelihood service which supports bootstrapping.
This likelihood service wraps another likelihood service which is used for all actual likelihood calculations. Its contribution is to create resampled collections of pulses, which are then passed to the underlying likelihood. In order to do this it should be used together with a BootstrappingSeedService which will cause the fitter to sequentially fit all of the resampled realizations.
Public Types
-
enum BootstrapOption¶
Values:
-
enumerator POISSON¶
Resample pulses by drawing a number of copies of each pulse according to a poisson distribution with mean equal to that pulse’s charge.
-
enumerator MULTINOMIAL¶
Resample pulses by drawing copies of each pulse proportionally to the ratio of that pulse’s charge to the total charge of the event, until the total resampled charge is approximately the original total charge.
-
enumerator POISSON¶
Public Functions
-
virtual void Configure()¶
-
virtual void SetGeometry(const I3Geometry &geo)¶
-
inline virtual double GetLogLikelihood(const I3EventHypothesis &ehypo)¶
-
inline virtual double GetLogLikelihoodWithGradient(const I3EventHypothesis &ehypo, I3EventHypothesis &gradient, double weight = 1)¶
-
inline virtual bool HasGradient()¶
-
inline virtual unsigned int GetMultiplicity()¶
-
inline virtual I3FrameObjectPtr GetDiagnostics(const I3EventHypothesis &fitresult)¶
-
inline unsigned int GetNIterations() const¶
-
boost::shared_ptr<I3Map<OMKey, std::vector<I3RecoPulse>>> resampleEvent(unsigned int index)¶
Private Members
-
BootstrapOption bootstrapType¶
The type of resampling to perform.
-
unsigned int iterations¶
The number of resamplings to perform.
-
boost::shared_ptr<I3RandomService> randomService¶
The random service used for resampling.
-
boost::shared_ptr<I3EventLogLikelihoodBase> wrappedLikelihood¶
The actual likelihood.
-
boost::shared_ptr<I3Frame> sandbox¶
Dummy frame used to present the resampled pulses to the wrapped likelihood.
-
boost::shared_ptr<const I3Map<OMKey, std::vector<I3RecoPulse>>> originalPulses¶
The current base set of pulses.
-
std::map<unsigned int, boost::shared_ptr<I3Map<OMKey, std::vector<I3RecoPulse>>>> resampleCache¶
The collection of resampled pulse realizations. Calculating these once and storing them makes the calculation robust against a fitter which requests seeds out of order or multiple times.
-
std::vector<std::pair<unsigned int, OMKey>> omIndex¶
Index structure for sampling pulses multinomially.
-
discrete_distribution multinomialDist¶
Probability distribution for multinomial pulse sampling.
-
double qtot¶
The total charge of the current event.
-
enum BootstrapOption¶
-
class BootStrappingSeedService : public I3ServiceBase, public I3SeedServiceBase¶
A seed service which supports bootstrapping.
This seed service can either wrap another existing seed service, or can generate trivial ‘LineFit’ (least-squares) seeds based on the resampled pulses. If another seed service is wrapped, the total number of seeds this service will provide is the product of the number of seeds provided by the wrapped service with the number of resamplings to be performed.
Public Functions
-
inline void Configure()¶
-
inline virtual I3EventHypothesis GetSeed(unsigned int iseed) const¶
-
inline virtual I3EventHypothesis GetDummy() const¶
-
inline virtual I3EventHypothesis GetCopy(const I3EventHypothesis &eh) const¶
-
inline virtual void Tweak(I3EventHypothesis &eh) const¶
-
inline virtual void FillInTheBlanks(I3EventHypothesis &eh) const¶
Private Members
-
std::string seedName¶
The name of the wrapped seed service, or empty if no base seed should be used.
-
std::string likelihoodName¶
The name of the corresponding BootstrappingLikelihoodService.
-
boost::shared_ptr<I3SeedServiceBase> wrappedSeed¶
The wrapped seed service, if any.
-
boost::shared_ptr<BootstrappingLikelihoodService> likelihood¶
The associated likelihood.
-
unsigned int nSeeds¶
The number of actual seeds, no counting resamplings.
-
boost::shared_ptr<const I3Geometry> geometry¶
The current geometry.
-
inline void Configure()¶
-
class BootstrapSeedTweak : public I3ConditionalModule¶
Computes the average of the various bootstrapped fits, the angular difference between each fit and the average, and the angular difference from the average within which a given fraction of the bootstrapped reconstructions fall. This latter value is intended as an estimate of the angular uncertainty for the reconstruction of the event. FInally, the averaged bootstrapped reconstruction is appended to the collection of bootstrapped reconstructions.
-
class workaround_discrete_distribution
- #include <discreteDistribution.h>
A really dumb implementation of a discrete distribution with given probabilities which takes time linear in the number of entries, rather than constant like the boost implementation.
Public Functions
-
inline unsigned int operator()(random_adapter rand)
Private Members
-
tableType table
The mapping of cumulative probabilities to result values.
-
inline unsigned int operator()(random_adapter rand)
-
namespace [anonymous]
-
namespace [anonymous]¶
-
namespace std
STL namespace.
- file BootstrapParams.cxx
- #include <gulliver-bootstrap/BootstrapParams.h>
Functions
-
I3_SERIALIZABLE(BootstrapParams)¶
-
I3_SERIALIZABLE(BootstrapParams)¶
- file BootstrapParams.h
- #include <icetray/I3FrameObject.h>#include <icetray/serialization.h>
- file BootstrapParamsConverter.cxx
- file BootstrapParamsConverter.h
- #include <tableio/I3Converter.h>#include <gulliver-bootstrap/BootstrapParams.h>
- file BootstrappingLikelihoodService.cxx
-
#include <icetray/I3SingleServiceFactory.h>
Typedefs
-
typedef I3SingleServiceFactory<BootstrappingLikelihoodService, I3EventLogLikelihoodBase> BootstrappingLikelihoodServiceFactory¶
Functions
-
I3_SERVICE_FACTORY(BootstrappingLikelihoodServiceFactory)¶
-
typedef I3SingleServiceFactory<BootstrappingLikelihoodService, I3EventLogLikelihoodBase> BootstrappingLikelihoodServiceFactory¶
- file BootstrappingLikelihoodService.h
- #include <icetray/I3ServiceBase.h>#include <gulliver/I3EventLogLikelihoodBase.h>#include <dataclasses/physics/I3RecoPulse.h>#include <phys-services/I3RandomService.h>#include “discreteDistribution.h”
- file BootstrappingSeedService.cxx
- #include <icetray/I3ServiceBase.h>#include <icetray/I3SingleServiceFactory.h>#include <dataclasses/geometry/I3Geometry.h>#include <gulliver/I3SeedServiceBase.h>#include <boost/make_shared.hpp>
Typedefs
-
typedef I3SingleServiceFactory<BootStrappingSeedService, I3SeedServiceBase> BootStrappingSeedServiceFactory¶
Functions
-
I3_SERVICE_FACTORY(BootStrappingSeedServiceFactory)¶
-
typedef I3SingleServiceFactory<BootStrappingSeedService, I3SeedServiceBase> BootStrappingSeedServiceFactory¶
- file BootstrapSeedTweak.cxx
- #include <icetray/I3ConditionalModule.h>#include <algorithm>#include <limits>#include <boost/make_shared.hpp>#include <boost/math/constants/constants.hpp>#include <dataclasses/physics/I3Particle.h>#include <dataclasses/I3Double.h>#include <gulliver-bootstrap/BootstrapParams.h>
Functions
-
I3_MODULE(BootstrapSeedTweak)¶
-
I3_MODULE(BootstrapSeedTweak)¶
- file discreteDistribution.h
- #include <numeric>#include <algorithm>#include <boost/version.hpp>
Defines
-
USE_BOOST_DISCRETE_RANDOM
Typedefs
-
typedef I3RandomService *random_adapter
-
typedef workaround_discrete_distribution discrete_distribution
-
USE_BOOST_DISCRETE_RANDOM
- dir gulliver-bootstrap
- dir gulliver-bootstrap
- dir gulliver-bootstrap
- dir icetray
- dir private
- dir public