filter-tools C++ API Reference

class CreateFilterMask : public I3Module
#include <CreateFilterMask.h>

This module creates an I3FilterResultMap based on the I3Bools in the frame.

It assumes that every I3Bool in the frame is a filter and the prescale passed

Author

Kevin Meagher

Public Functions

CreateFilterMask(const I3Context &context)
void Configure()
void Physics(I3FramePtr frame)
void Finish()

Private Members

std::string output_name_

Name to give the I3FilterResultMap object in the frame.

class DistributePnFObjects : public I3PacketModule

Public Functions

DistributePnFObjects(const I3Context &context)
void Configure()
void FramePacket(std::vector<I3FramePtr> &frames)

Private Functions

SET_LOGGER ("DistributePnFObjects")

Private Members

std::vector<std::string> substream_names
class FilterCheckModule : public I3Module

This module verifies the result of the pole filter.

If you re-run the reconstructions and filters in the north, this module will check the results of the filters still in I3Bools against the I3FilterResultMap that the pole filter generated. It prints the result to standard out.

Author

Kevin Meagher

Public Functions

FilterCheckModule(const I3Context &context)
void Configure()
void Physics(I3FramePtr frame)
void Finish()

Private Types

typedef std::map<std::string, std::pair<int, int>> FilterStatisticsMap

Private Members

FilterStatisticsMap filter_matches_

map of filter names to number of times the filter matches and the number of comparisons made

std::string filter_result_name_

Name of I3FilterResultMap object in frame.

class FilterMask2Bools : public I3Module
#include <FilterMask2Bools.h>

This module takes an existing I3FilterResultMap and writes out each filter result individually to the frame as an I3Bool given by conditionPassed AND (IgnorePrescale OR prescalePassed), where IgnorePrescale is a parameter of FilterMask2Bools. Original intent was to pass bools to the flat-ntuple module.

Author

jdumm

Public Functions

FilterMask2Bools(const I3Context &ctx)

Constructor.

Parameters:

ctx – The context with which this module is built.

virtual ~FilterMask2Bools()

Destructor.

void Configure()
void Physics(I3FramePtr frame)

Private Functions

SET_LOGGER ("FilterMask2Bools")

Private Members

std::string filter_result_name_
bool ignore_prescale_
class FilterMaskFilter : public I3IcePick
#include <FilterMaskFilter.h>

Public Functions

explicit FilterMaskFilter(const I3Context &context)
void Configure()
bool SelectFrame(I3Frame &frame)

Private Members

std::vector<std::string> filter_name_list_

Pass Frames where at least one of these filters is true.

std::string filter_result_name_

Name of I3FilterResultMap object in frame.

class FilterMaskMaker : public I3ConditionalModule

A module to create a FilterResultMap (aka FilterMask) based on I3Bools in the frame with configurable prescales.

Generate a FilterMask (stored at OutputMask parameter name) based on an input list of Filter names (expected as I3Bools in frame) and prescales (as input FilterConfigs list, expected as a I3MapStringInt):

filter_pairs = I3MapStringInt([('MuonFilter_11',1),
                               ('CascadeFilter_11',1),
                               ....
                               ]

Can a use provided random service, or will generate one on it’s own.

Public Functions

FilterMaskMaker(const I3Context &context)
void Configure()
void Physics(I3FramePtr frame)

Private Members

std::string maskname_
I3MapStringInt filtconfigs_
I3RandomServicePtr randserv_
class KeepFromSubstream : public I3PacketModule

Public Functions

KeepFromSubstream(const I3Context &context)
void Configure()
void FramePacket(std::vector<I3FramePtr> &frames)

Private Members

std::string stream_name_
std::vector<std::string> keep_keys_
bool keep_stream_
class OrPframeFilterMasks : public I3PacketModule

Public Functions

OrPframeFilterMasks(const I3Context &context)
void Configure()
void FramePacket(std::vector<I3FramePtr> &frames)

Private Members

std::string output_name_
std::string input_name_
class ParticleCheck : public I3Module
#include <ParticleCheck.h>

Public Functions

ParticleCheck(const I3Context &context)

Constructor.

This Module goes through the frame checking the list of particles against a list of the same particles with a prefix

void Configure()
void Physics(I3FramePtr frame)
void Finish()

Public Static Functions

static bool Compare(const double &l, const double &r)

compare two doubles that might be nan return true if they agree

static bool Compare(const I3Direction &lhs, const I3Direction &rhs)

compare two I3Directions return true if they match

static bool Compare(const I3Position &lhs, const I3Position &rhs)

compare two I3Positions return true if they match

static bool Compare(const I3Particle &lhs, const I3Particle &rhs)

compare two I3Particles return true if they match

Private Members

std::map<std::string, std::pair<int, int>> particle_matches_

map of particle name to pair where first is number of matchs second is total comparisons

std::string prefix_

prefex to prepend to particles to get pole version

namespace std

STL namespace.

file CreateFilterMask.cxx
#include <icetray/I3Frame.h>
#include <dataclasses/physics/I3FilterResult.h>
#include <icetray/I3Bool.h>

Functions

I3_MODULE(CreateFilterMask)
file CreateFilterMask.h
#include <icetray/I3Module.h>
file DistributePnFObjects.cxx
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include <icetray/I3Frame.h>
#include <icetray/I3FrameObject.h>
#include <icetray/I3Module.h>
#include <icetray/I3PacketModule.h>
#include <dataclasses/physics/I3EventHeader.h>

Functions

I3_MODULE(DistributePnFObjects)
file FilterCheckModule.cxx
#include <icetray/I3Frame.h>
#include <dataclasses/physics/I3FilterResult.h>
#include <icetray/I3Bool.h>
#include <dataclasses/physics/I3Particle.h>
#include <dataclasses/physics/I3DOMLaunch.h>
#include <boost/foreach.hpp>

Functions

I3_MODULE(FilterCheckModule)
file FilterCheckModule.h
#include <icetray/I3Module.h>
file FilterMask2Bools.cxx
#include <icetray/I3Bool.h>
#include <dataclasses/physics/I3FilterResult.h>
#include <boost/foreach.hpp>

Functions

I3_MODULE(FilterMask2Bools)
file FilterMask2Bools.h
#include <string>
#include <icetray/I3Frame.h>
#include <icetray/I3Module.h>
#include <icetray/I3Logging.h>
file FilterMaskFilter.cxx
#include <boost/foreach.hpp>
#include <icetray/I3Context.h>
#include <icetray/I3Frame.h>
#include <icetray/I3IcePickInstaller.h>
#include <interfaces/I3IcePickModule.h>
#include <interfaces/I3IceForkModule.h>
#include <dataclasses/physics/I3FilterResult.h>
file FilterMaskFilter.h
#include <string>
#include <vector>
#include <icetray/I3IcePick.h>
file FilterMaskMaker.cxx
#include <icetray/I3Bool.h>
#include <icetray/I3ConditionalModule.h>
#include <dataclasses/physics/I3FilterResult.h>
#include <phys-services/I3GSLRandomService.h>

Functions

I3_MODULE(FilterMaskMaker)
file KeepFromSubstream.cxx
#include <icetray/I3Frame.h>
#include <icetray/I3FrameObject.h>
#include <icetray/I3PacketModule.h>
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include “dataclasses/physics/I3EventHeader.h”

Functions

I3_MODULE(KeepFromSubstream)
file OrPframeFilterMasks.cxx
#include <icetray/I3Frame.h>
#include <dataclasses/physics/I3FilterResult.h>
#include <icetray/I3PacketModule.h>
#include <boost/foreach.hpp>

Functions

I3_MODULE(OrPframeFilterMasks)
file ParticleCheck.cxx
#include <cmath>
#include <icetray/I3Frame.h>
#include <dataclasses/physics/I3Particle.h>

Functions

I3_MODULE(ParticleCheck)
file ParticleCheck.h
#include <icetray/I3Module.h>
dir filter-tools
dir filter-tools
dir filter-tools
dir icetray
dir private
dir public