SiPMResponseSimulator C++ API Reference

struct I3RandomServiceBoostAdapter

Helper code for generating discrete distributions with non-uniform probabilities, using an I3RandomService as the underlying random engine.

A simple wrapper for I3RandomService which provides the interface expected by Boost Random (and the standard C++11 library [rand.req.urng]).

Public Types

typedef unsigned int result_type

Public Functions

inline result_type min() const
inline result_type max() const
inline result_type operator()()
inline I3RandomServiceBoostAdapter(I3RandomService *s)

Public Members

I3RandomService *service
struct pulseComponent

Public Members

I3MCPulse::PulseSource source
double amp
double tau
class SiPMResponseSimulator : public I3ConditionalModule

Public Functions

SiPMResponseSimulator(const I3Context &context)
~SiPMResponseSimulator()
void Configure()
void DAQ(I3FramePtr frame)
std::pair<std::vector<I3MCPulse>, ParticlePulseIndexMap> processHits(const std::vector<I3MCPE> &inputHits, const ParticlePulseIndexMap &pePedigree)
std::vector<I3Waveform> processWaveforms(const std::vector<I3MCPulse> &inputPulse, int t_min, int t_max)
inline boost::shared_ptr<I3RandomService> getRandomService() const
inline void setRandomService(boost::shared_ptr<I3RandomService> randomService)

Private Functions

double normalHitWeight(unsigned int w)

Computes the amount of charge, relative to the charge produced by an ideal, single photoelectron, produced by a hit whose weight is an integer number of initial photoelectrons.

void createAfterPulse(I3MCPulse &hit)

Alters the properties of the given hit to describe an afterpulse.

double SiPMJitter()
double fisherTippett(double_t location, double_t scale, double_t logLowerBound, double_t logUpperBound)

Generate a Fisher-Tippet distributed (alias Gumbel distributed) random variate.

Parameters:
  • location – The location parameter of the distribution from which to sample (mean = location + scale * euler_mascheroni)

  • scale – The scale parameter of the distribution from which to sample (variance = (pi * scale)**2 / 6)

  • logLowerBound – Indirectly determines the lower cutoff of the distribution

  • logUpperBound – Indirectly determines the upper cutoff of the distribution

double SiPMPulseShape(int32_t t, int32_t t_hit, double_t g)
double SiPMIceActPulseShape(int32_t t, int32_t t_hit, double_t g)
double DEBUGSiPMIceActPulseShape(int32_t t, int32_t t_hit, double_t g)
SET_LOGGER ("SiPMResponseSimulator")

Private Members

std::string inputHitsName_

The name of the I3MCPESeriesMap to process.

std::string outputHitsName_

The name of the I3MCPESeriesMap to be produced.

std::string waveformName_

The name of the I3WaveformMap to be produced.

bool useIceAct_

Whether to use IceAct.

std::string iceActPulseShapeFile_

Specify Pulse Shape file location to be used for the waveform simulation.

std::map<int, double> iceActPulseShape_

Pulse Shape used for the waveform simulation.

bool useSiPMJitter_

Whether the times of hits should be randomly perturbed.

double numberOfCells_

Number of Sipm GAPD cells.

double nsbNoiseRate_

NSB noise rate in Hz.

double thermalNoiseRate_

Thermal noise rate in Hz.

double afterPulseProbability_

The probability that a pulse produces an accompanying afterpulse(short/long component)

double crosstalkProbability_

The probability that a pulse produces an accompanying crosstalk pulse.

int noisewindow_

noise window size

double sipmGainJitter_

The gain jitter of the SiPM.

double sipmAmp_

The pulse amplitude of the SiPM.

double sipmBaseline_

The SiPM baseline voltage in mV.

double sipmWhiteNoise_
std::string randomServiceName_

The ID of the random service to use.

boost::shared_ptr<I3RandomService> randomService_

The random service fetched from the tray.

boost::shared_ptr<I3SumGenerator> genericChargeDistribution_

A generic distribution of charges produced by single photon hits.

std::map<ScintKey, boost::shared_ptr<I3SumGenerator>> chargeDistributions_

The charge distributions to be used for each DOM for single photon hits.

boost::shared_ptr<const I3Calibration> lastCalibration_

The most recently seen calibration data.

Friends

friend class SiPMResponseSimulatorTestSetup
namespace std

STL namespace.

file discreteDistribution.h
#include <boost/version.hpp>
#include <boost/random/discrete_distribution.hpp>

Typedefs

typedef I3RandomServiceBoostAdapter random_adapter
typedef boost::random::discrete_distribution<unsigned int, double> discrete_distribution
file SiPMResponseSimulator.cxx
#include <cmath>
#include <cassert>
#include <numeric>
#include <limits>
#include <algorithm>
#include <stack>
#include <fstream>
#include <boost/assign.hpp>
#include <boost/make_shared.hpp>
#include <boost/math/constants/constants.hpp>
#include <icetray/I3Units.h>
#include <simclasses/I3MCPE.h>
#include <simclasses/I3MCPulse.h>
#include <dataclasses/I3Map.h>
#include <dataclasses/status/I3DetectorStatus.h>
#include <dataclasses/calibration/I3Calibration.h>
#include <dataclasses/physics/I3Waveform.h>
#include <dataclasses/physics/I3IceActWaveformMap.h>
#include “discreteDistribution.h

Functions

std::map<int, double> readIceActPulse_t(std::string filename)
file SiPMResponseSimulator.h
#include “icetray/I3ConditionalModule.h”
#include “dataclasses/ScintKey.h”
#include “dataclasses/IceActKey.h”
#include “phys-services/I3RandomService.h”
#include “sim-services/I3SumGenerator.h”
#include <simclasses/I3MCPE.h>
#include <simclasses/I3MCPulse.h>
#include <dataclasses/physics/I3ParticleID.h>
#include <dataclasses/physics/I3Waveform.h>
#include <dataclasses/physics/I3IceActWaveformMap.h>
#include <simclasses/I3ParticleIDMap.hpp>
dir icetray
dir private
dir public
dir SiPMResponseSimulator
dir SiPMResponseSimulator
dir SiPMResponseSimulator