DeepCore_Filter C++ API Reference

template<class HitType>
class DeepCoreFunctions

Helper module containing the methods used in the DeepCoreVeto and DeepCoreTimeVeto.

Public Functions

SET_LOGGER ("I3DeepCoreFunctions")

Public Static Functions

static void GetAverageTime(const I3Geometry &geometry, boost::shared_ptr<const I3Map<OMKey, std::vector<HitType>>> HitMap, I3Particle *cog, double &StdDev, bool useFirstOnly, std::string Name)

Calculate the average time of the hit series. This is a regular average with no time corrections. A standard deviation is also calculated and stored in StdDev.

\[ \frac{\sum_{i=0}^{N_{evts}}{t_i}}{N_{evts}} \]

Parameters:
  • geometry – The geometry holding the OMKey and DOM positions.

  • HitMap – Either an I3RecoPulseSeriesMapConstPtr or I3DOMLaunchSeriesMapConstPtr containing the hits to be processed.

  • cog – A pointer to an I3Particle. This will be used to hold the average time from this calculation.

  • StdDev – A double used to hold the result of the standard deviation calculation.

static void AddHit_AverageTime(const HitType &hit, double &previousAvgStep, double &previousVarStep, int &nHits)

Add the current hit to the average and variance.

Parameters:
  • hit – The current hit to be added to the average and variance calculations.

  • previousAvgStep – The average from the previous step. It will be used to store the updated average.

  • previousVarStep – The variance from the previous step. It will be used to store the updated variance.

  • nHits – The number of hits processed so far.

static void GetCoG(const I3Geometry &geometry, boost::shared_ptr<const I3Map<OMKey, std::vector<HitType>>> HitMap, I3Particle *cog, bool useFirstOnly, bool useChargeWeightCoG)

Calculate the center of gravity of the hits. If the useFirstOnly option is set to true, only the first hit on each DOM will be used in the calculation. Otherwise, all hits will be included. The result is stored in cog.

Parameters:
  • geometry – The geometry holding the OMKey and DOM positions.

  • HitMap – Either an I3RecoPulseSeriesMapConstPtr or I3DOMLaunchSeriesMapConstPtr containing the hits to be processed.

  • cog – A pointer to an I3Particle. This will be used to hold the center of gravity from this calculation.

  • useFirstOnly – A boolean specifying whether to limit the CoG calculation to first hits only.

  • useChargeWeightCoG – A boolean specifying whether to weight the hits used in the CoG calculation by their charge

static void GetCoGTime(const I3Geometry &geometry, boost::shared_ptr<const I3Map<OMKey, std::vector<HitType>>> HitMap, I3Particle *cog, bool useFirstOnly)

Calculate the average time-of-flight corrected time of the hit series. This uses time corrections based on the position of the hit relative to the center of gravity.

\[ \frac{\sum_{i=0}^{N_{evts}}{t_i - \frac{\vec{r_hit} - \vec{r_cog}}{c_ice} }}{N_{evts}} \]

Parameters:
  • geometry – The geometry holding the OMKey and DOM positions.

  • HitMap – Either an I3RecoPulseSeriesMapConstPtr or I3DOMLaunchSeriesMapConstPtr containing the hits to be processed.

  • cog – A pointer to an I3Particle. This will be used to hold the time from this calculation.

  • useFirstOnly – A boolean specifying whether to limit the CoG calculation to first hits only.

static void AddHit_CoGTime(const HitType &hit, const double distance, double &average, int &nHits)

Add the current hit to the CoG time calculation.

Parameters:
  • hit – The current hit to be added to the CoG time calculation.

  • distance – The distance from the CoG to the DOM.

  • average – The current average. Will be used to store the updated average from this function.

  • nHits – The number of hits processed so far.

static void ReduceHits(const I3Geometry &geometry, boost::shared_ptr<const I3Map<OMKey, std::vector<HitType>>> HitMap, I3Particle *cog, double StdDev, I3Map<OMKey, std::vector<HitType>> &newHitMap, bool useFirstOnly)

Remove all hits outside of one standard deviation from the average (uncorrected) time. The result will be stored in newHitMap.

Parameters:
  • geometry – The geometry holding the OMKey and DOM positions.

  • HitMap – Either an I3RecoPulseSeriesMapConstPtr or I3DOMLaunchSeriesMapConstPtr containing the hits to be processed.

  • cog – A pointer to an I3Particle holding the CoG position and time.

  • StdDev – A double holding the result of the standard deviation calculation.

  • newHitMap – The map where the hits within one standard deviation from the average time will be stored.

  • useFirstOnly – A boolean specifying whether to limit the calculation to first hits only

static void CountHitsInWindow(const I3Geometry &geometry, boost::shared_ptr<const I3Map<OMKey, std::vector<HitType>>> HitMap, I3Particle *cog, int &nVetoWindowHits, double &nVetoWindowCharge, bool useFirstOnly)

Count the number of hits in the velocity window. Hits are “causal” if their separation from the center of gravity is nearly lightlike with the hit being before the CoG in time.

Parameters:
  • geometry – The geometry holding the OMKey and DOM positions.

  • HitMap – Either an I3RecoPulseSeriesMapConstPtr or I3DOMLaunchSeriesMapConstPtr containing the hits to be processed.

  • cog – A pointer to an I3Particle. This will be used to hold the time from this calculation

  • nVetoWindowHits – The number of hits that are causal with the CoG.

  • nVetoWindowHits – The charge in PE of hits that are causal with the CoG.

  • useFirstOnly – A boolean specifying whether to limit the CoG calculation to first hits only.

static bool InWindow(double particle_speed)

Determine if event is in the veto window. if 0.25 nm/n <= particle_speed <= 0.40 nm/n.

Parameters:

particle_speed – The speed at which a particle moved if a hit was caused by an event at the Cog.

static double GetCharge(const I3RecoPulse &pulse)

Helper function to get the charge of an I3RecoPulse.

Parameters:

pulse – An I3RecoPulse with charge information.

static double GetCharge(const I3DOMLaunch &launch)

Helper function to get the charge of an I3DOMLaunch.

Parameters:

launch – An I3DOMLaunch with charge information.

static double GetTime(const I3RecoPulse &pulse)

Helper function to get the time of an I3RecoPulse.

Parameters:

pulse – An I3RecoPulse with timing information.

static double GetTime(const I3DOMLaunch &launch)

Helper function to get the start time of an I3DOMLaunch

Parameters:

launch – An I3DOMLaunch with timing information

template<class Response>
class I3DeepCoreTimeVeto : public I3ConditionalModule

IceTray module to perform an Icecube DeepCore Time Veto.

Public Functions

I3DeepCoreTimeVeto(const I3Context &ctx)

Constructor: builds an instance of the module, with the context provided by IceTray.

~I3DeepCoreTimeVeto()

Destructor: deletes the module

void Configure()

Configure: Grabs options from the python processing script.

Parameters:
  • InputDeepCoreHitSeries – The name of the hit series containing DeepCore hits.

  • InputIceCubeHitSeries – The name of the hit series containing IceCube hits.

  • DecisionName – The name to be given to the final decision in the frame.

  • ParticleName – The name to be given to the I3Particles holding the centers of gravity and associated times. The DeepCore CoG will use this name with “_dc” appended. The IceCube CoG will append “_ic”. If blank, the particles will not be written to the frame.

  • FirstHitOnly – Use only the first hit on each DOM instead of all hits. Set this to true for the old behavior of the DeepCoreTimeVeto.

  • TimeThreshold – The amount of time that the IceCube CoG may be earlier than the DeepCore CoG to still return a true result.

void Physics(I3FramePtr frame)

Physics: Process the event and decide the veto status.

Determine if the frame contains an event that triggered deep core. If it did, calculate the center of gravity position and average corrected time for the DeepCore and IceCube hits. If the average corrected time of IceCube hits is earlier than the DeepCore corrected time by the amount of time specified in TimeThreshold, reject the event (ie, return false). Finally, output the appropriate information and push the frame.

Parameters:

frame – The frame to be processed

void endProcessing(I3FramePtr frame, bool veto)

endProcessing: Push the veto decision to the frame and the frame to the outbox.

Create the I3BoolPtr from veto, put the result in the frame, and push the frame to the outbox.

Parameters:
  • frame – The frame that is being processed.

  • veto – The veto decision, which will be pushed to the frame.

Private Functions

SET_LOGGER ("I3DeepCoreTimeVeto")

Private Members

bool optChargeWeightCoG_
bool optFirstHitOnly_
std::string optFiducialHitSeries_
std::string optVetoHitSeries_
std::string optDecisionName_
std::string optParticleName_
double optTimeThreshold_
template<class Response>
class I3DeepCoreVeto : public I3ConditionalModule
#include <I3DeepCoreVeto.h>

IceTray module to perform an Icecube DeepCore Veto.

Public Functions

I3DeepCoreVeto(const I3Context &ctx)

Constructor: builds an instance of the module, with the context provided by IceTray.

I3DeepCoreVeto Constructor

~I3DeepCoreVeto()

Destructor: deletes the module.

I3DeepCoreVeto<Response> Destructor

void Configure()

Configure: Grabs options from the python processing script.

I3DeepCoreVeto<Response> Configure

Parameters:
  • InputFiducialHitSeries – The name of the hit series containing DeepCore hits.

  • InputVetoHitSeries – The name of the hit series containing IceCube hits.

  • DecisionName – The name to be given to the final decision in the frame.

  • ParticleName – The name to be given to an I3Particle holding the center of gravity and associated time. If blank, the particle will not be written to the frame.

  • FirstHitOnly – Use only the first hit on each DOM instead of all hits. Set this to true for the old behavior of the DeepCoreVeto.

  • ChargWeightCoG – Weight the hits used int he CoG calculation by the charge. Feature extracted charge is subject to change based on Feature Extractor and settings used, so beware.

void Physics(I3FramePtr frame)

Physics: Process the event if the input series are in the physics frame.

Determine if the frame contains an event that triggered DeepCore. If it did, calculate the center of gravity position and average corrected time for the DeepCore hits. Then, using functions from I3DeepCoreFunctions, decide if the event should be vetoed or not. Veto is ‘true’ if event should be kept, false otherwise. Finally, output the appropriate information and push the frame.

Parameters:

frame – The frame that will be processed.

void DAQ(I3FramePtr frame)

DAQ: Process the event if the input series are in the DAQ frame.

void ProcessFrame(I3FramePtr frame)

Process: Process the event and decide the veto status.

void endProcessing(I3FramePtr frame, bool veto)

endProcessing: Push the veto decision to the frame and the frame to the outbox.

Create the I3BoolPtr from veto, put the result in the frame, and push the frame to the outbox.

Parameters:
  • frame – The frame that is being processed.

  • veto – The veto decision, which will be pushed to the frame.

Private Functions

SET_LOGGER ("I3DeepCoreVeto")

Private Members

bool optChargeWeightCoG_
bool optFirstHitOnly_
std::string optTreeName_
std::string optFiducialHitSeries_
std::string optVetoChargeName_
std::string optVetoHitSeries_
std::string optVetoHitsName_
int optMinHitsToVeto_
std::string optDecisionName_
std::string optParticleName_
namespace std

STL namespace.

file I3DeepCoreFunctions.cxx
file I3DeepCoreFunctions.h
#include “icetray/I3Frame.h”
#include “icetray/I3Bool.h”
#include “dataclasses/I3Constants.h”
#include “dataclasses/I3Double.h”
#include “dataclasses/geometry/I3Geometry.h”
#include “dataclasses/physics/I3Particle.h”
#include “dataclasses/physics/I3RecoPulse.h”
#include “dataclasses/physics/I3RecoHit.h”
#include “dataclasses/physics/I3DOMLaunch.h”
file I3DeepCoreTimeVeto.cxx
file I3DeepCoreTimeVeto.h
#include “icetray/I3ConditionalModule.h”
file I3DeepCoreVeto.cxx
#include “icetray/I3Int.h”

Functions

I3_MODULE(I3DeepCoreVeto<I3DOMLaunch>)
I3_MODULE(I3DeepCoreVeto<I3RecoPulse>)
file I3DeepCoreVeto.h
#include <vector>
#include “icetray/I3ConditionalModule.h”
dir DeepCore_Filter
dir DeepCore_Filter
dir DeepCore_Filter
dir icetray
dir private
dir public