polyplopia C++ API Reference

class CoincidentI3ReaderService : public I3GeneratorService

Utilities for merging MCTrees MCInfo and MCHitSeriesMaps in separate events to produce coincident in-ice events.

copyright (C) 2006 The IceCube Collaboration

Date

$Date:$

Author

Juan Carlos Diaz Velez

Public Functions

CoincidentI3ReaderService(const I3Context &ctx)
CoincidentI3ReaderService(const CoincidentI3ReaderService&)
CoincidentI3ReaderService(const std::string &filename)
~CoincidentI3ReaderService()
virtual I3MCTreePtr GetNextEvent() override
virtual I3FramePtr GetNextFrame() override
virtual double GetRate() override
void Configure() override
bool Open(std::string path)

Private Functions

int Init()

Private Members

dataio::I3FrameSequence reader_
std::string path_
I3::dataio::shared_filehandle file_ref_
double rate_
bool configured_
boost::shared_ptr<I3FileStager> stager_
class MPHitFilter : public I3Module
#include <MPHitFilter.h>

An I3IcePick which selects events which have have MCPEs >= threshold.

copyright (C) 2005 The IceCube Collaboration

Date

$Date:$

Author

Juan Carlos Diaz Velez

Public Functions

MPHitFilter(const I3Context &context)

A filtering module which selects events which have MCPEs >= threshold.

void Configure()
void DAQ(I3FramePtr frame)
void Finish()

Private Functions

SET_LOGGER ("MPHitFilter")

Private Members

std::string hitSeriesMapName_
std::string icetopHitSeriesMapName_
std::vector<std::string> hitSeriesMapNames_
unsigned int threshold_
unsigned int eventCount_
unsigned int keptEvents_
unsigned int rejectedEvents_
unsigned int removedBranches_
bool pruneTree_
bool removeBackgroundOnly_
bool filter_
std::string mcTreeName_
std::string polyplopiaInfoMap_
class PoissonMerger : public I3ConditionalModule
#include <PoissonMerger.h>

This modules implements the exponential distribution sampling exclusively. PoissonMerger assigns a random time to each event based on an exponential distribution with a mean time tau given as a configuration parameter. If two or more events fall within the time window delta_t, they are combined into a single event. Events are given an additional weight callde ‘PolyplopiaWeight’ which determines the likely hood of a combined event given a change in energy spectrum.

copyright (C) 2006 The IceCube Collaboration

Todo:

correctly evaluate weight correction for weighted energy spectrum

Date

: mar feb 16 14:26:39 CST 2010

Author

Juan Carlos Diaz Velez

Public Functions

PoissonMerger(const I3Context &ctx)

Constructor

inline virtual ~PoissonMerger()

Destructor

void Configure()

Configures parameters

void Finish()
void DAQ(I3FramePtr frame)

Caches frames and merges MCTrees and MCInfoTrees

SET_LOGGER ("PoissonMerger")

Private Functions

PoissonMerger()

Constructor

PoissonMerger(const PoissonMerger&)
PoissonMerger &operator=(const PoissonMerger&)

Assignment operator

Private Members

I3GeneratorServicePtr backgroundService_

Names of frame objects to merge

std::string mcTreeName_
std::string itMcTreeName_
std::string separateTree_
std::string primaryType_
I3Map<unsigned int, unsigned int> coincidenceHistogram_
double timeWindow_
double corsikaRate_
double tau_
char buffer[200]
unsigned int counter_
bool corsika_primary_
std::deque<I3FramePtr> frameBuffer_
std::string randomServiceName_
I3RandomServicePtr randomService_
class PoissonPEMerger : public I3Module
#include <PoissonPEMerger.h>

Public Functions

PoissonPEMerger(const I3Context &ctx)

Constructor

inline virtual ~PoissonPEMerger()

Destructor

void Configure()

Configures parameters

void Finish()
void DAQ(I3FramePtr frame)

Caches frames and merges MCTrees and MCInfoTrees

Private Types

enum MergeType

Values:

enumerator Photon
enumerator PhotoElectron

Private Functions

SET_LOGGER ("PoissonPEMerger")

Private Members

boost::shared_ptr<I3GeneratorService> backgroundService_

Source of background events to merge.

boost::shared_ptr<I3RandomService> randomService_

Source of random numbers.

std::string mcTreeName_
double timeWindow_

Time within which coincidences are to be injected.

double backgroundRate_

Rate at which background events occur.

bool base_is_background_

Whether the event stream into which events are being merged is already air showers, since this affects the merging rate needed.

std::string mcpesName_
std::string photonsName_
std::string mmcTrackName_
MergeType mergeType_
unsigned int counter_

Count of events processed.

I3Map<unsigned int, unsigned int> coincidenceHistogram_

Record of merges made.

namespace [anonymous]
namespace PolyplopiaUtils

Utilities for merging MCTrees MCInfo and MCHitSeriesMaps in separate events to produce coincident in-ice events.

copyright (C) 2006 The IceCube Collaboration

Date

$Date:$

Author

Juan Carlos Diaz Velez

Functions

double GetEarliestInIceTime(const I3MCTree &t)
I3MCTree::optional_value GetEarliestInIce(const I3MCTree &t)
I3MCTree::optional_value GetLatestInIce(const I3MCTree &t)
double GetLatestInIceTime(const I3MCTree &t)
double GetFirstHitTime(const I3MCPESeriesMap &hitmap)
void MergeMMCInfo(I3MMCTrackList &dest, const I3MMCTrackList &src, double timeOffset)

MergeMMCInfo - Adds the contents of the second MMCInfoList to the first

Parameters:
  • dest – - list we will add MMCInfo to

  • src – - list we will copy MMCInfo from

void MergeMCTrees(I3MCTree &dest, const I3MCTree &src, double timeOffset)

MergePrimaries - Add I3MCTree src at root level of tree dest

Parameters:
  • dest – - tree to merge into

  • src – - tree to merge

  • timeOffset – &#8212; value to offset particle times in src

void CopyWeights(I3MapStringDouble &dest, const I3MapStringDouble src)
void OffsetTime(I3MCTree &ctree, double offsetTime)

Add time offset to MCTree

Parameters:
  • ctree – - tree to modify

  • offsetTime – - time offset

I3Frame MergeFrames(I3Frame frame1, I3Frame frame2, I3Map<std::string, std::string> names, float delta_t)
void MergeFrames(I3FramePtr frame1, const I3FramePtr frame2, const I3Map<std::string, std::string> names, float delta_t)
template<typename PhotonType, typename ContainerType = I3Map<ModuleKey, I3Vector<PhotonType>>>
void MergePhotons(ContainerType &dest, const ContainerType &src, double timeOffset)

Merge all photons from one container into another, with a time offset

Template Parameters:
  • PhotonType – a photon type which has GetTime and SetTime functions

  • ContainerType – a container of lists of PhotonType indexed by a key type

Parameters:
  • dest – the container into which the additional photons are to be added

  • src – the container from which the additional photons are copied

  • timeOffset – the time offset to apply to each added photon

template<typename PhotonType, typename ContainerType = I3Map<ModuleKey, I3Vector<PhotonType>>>
double GetFirstPhotonTime(const ContainerType &photonMap)
bool IsChargedLepton(I3Particle::ParticleType particle)
bool IsNeutrino(I3Particle::ParticleType particle)
namespace std

STL namespace.

file CoincidentI3ReaderService.cxx
#include <dataclasses/physics/I3MCTreeUtils.h>
#include <dataclasses/physics/I3Particle.h>
#include <simclasses/I3CorsikaInfo.h>
#include <icetray/I3Units.h>
#include <icetray/I3SingleServiceFactory.h>

Typedefs

using CoincidentI3ReaderServiceFactory = I3SingleServiceFactory<CoincidentI3ReaderService, I3GeneratorService>

Functions

I3_SERVICE_FACTORY(CoincidentI3ReaderServiceFactory)
file CoincidentI3ReaderService.h
#include <icetray/I3TrayHeaders.h>
#include <icetray/I3Logging.h>
#include <sim-services/I3GeneratorService.h>
#include <dataclasses/physics/I3MCTree.h>
#include <dataio/I3FrameSequence.h>
#include <dataio/I3FileStager.h>
#include <icetray/I3Frame.h>
#include <icetray/open.h>

Functions

I3_POINTER_TYPEDEFS(CoincidentI3ReaderService)
file MPHitFilter.cxx
#include “polyplopia/MPHitFilter.h
#include <simclasses/I3MCPE.h>
#include “dataclasses/geometry/I3Geometry.h”
#include “dataclasses/physics/I3MCTreeUtils.h”
#include “dataclasses/geometry/I3OMGeo.h”

Typedefs

typedef I3Map<I3ParticleID, unsigned> I3MapPIDUInt

Functions

I3_MODULE(MPHitFilter)
I3_POINTER_TYPEDEFS(I3MapPIDUInt)
I3_SERIALIZABLE(I3MapPIDUInt)
file MPHitFilter.h
#include <icetray/I3TrayHeaders.h>
#include <icetray/I3Module.h>
#include <phys-services/I3SummaryService.h>
file PoissonMerger.cxx
#include <icetray/I3Tray.h>
#include <icetray/Utility.h>
#include “dataclasses/I3String.h”
#include “dataclasses/physics/I3Particle.h”
#include “dataclasses/I3Time.h”
#include <phys-services/I3SummaryService.h>
#include <algorithm>

Functions

I3_MODULE(PoissonMerger)
file PoissonMerger.h
#include <fstream>
#include <string>
#include <set>
#include <icetray/I3ConditionalModule.h>
#include <icetray/I3TrayHeaders.h>
#include <icetray/I3Logging.h>
#include “phys-services/I3RandomService.h”
#include <icetray/I3Units.h>
#include <simclasses/I3MCPE.h>
#include “dataclasses/physics/I3MCTree.h”
#include “dataclasses/physics/I3MCTreeUtils.h”
#include “sim-services/I3GeneratorService.h”
#include <cmath>
#include <assert.h>
file PoissonPEMerger.cxx
#include <icetray/Utility.h>
#include <icetray/I3Int.h>
#include <icetray/I3Units.h>
#include <dataclasses/physics/I3Particle.h>
#include <dataclasses/physics/I3MCTree.h>
#include <simclasses/I3Photon.h>
#include <simclasses/I3CompressedPhoton.h>
#include <simclasses/I3ParticleIDMap.hpp>
#include <sim-services/I3CombineMCPE.h>

Functions

I3_MODULE(PoissonPEMerger)
file PoissonPEMerger.h
#include <string>
#include <icetray/I3Module.h>
#include <icetray/I3Logging.h>
#include <phys-services/I3RandomService.h>
#include <sim-services/I3GeneratorService.h>
file PolyplopiaUtils.cxx
#include <algorithm>
#include <iterator>
#include <dataclasses/physics/I3MCTreePhysicsLibrary.hh>
#include “dataclasses/physics/I3ParticleID.h”
#include “dataclasses/physics/I3MCTreeUtils.h”
#include <sim-services/I3CombineMCPE.h>
#include <phys-services/I3Calculator.h>
#include <boost/function.hpp>
file PolyplopiaUtils.h
#include “icetray/I3TrayHeaders.h”
#include “icetray/I3Logging.h”
#include “icetray/I3Frame.h”
#include “icetray/open.h”
#include “dataclasses/physics/I3MCTree.h”
#include “dataclasses/physics/I3MCTreeUtils.h”
#include “dataclasses/I3Double.h”
#include “dataclasses/I3String.h”
#include “simclasses/I3MMCTrack.h”
#include “simclasses/I3MCPE.h”
#include <fstream>
#include <cassert>
#include <cmath>
page todo

Class PoissonMerger

correctly evaluate weight correction for weighted energy spectrum

dir icetray
dir polyplopia
dir polyplopia
dir polyplopia
dir private
dir public