neutrino-generator C++ API Reference

class Candidate

Public Functions

inline Candidate()

Public Members

ParticlePtr nu
double bias_weight
double survival_weight
class CrosssectionTableReader

Public Functions

CrosssectionTableReader()
virtual ~CrosssectionTableReader()
SET_LOGGER ("I3NuG")
inline double GetMinEnergy()
inline double GetMaxEnergy()
void ReadCrosssectionTableFillArray(const std::string &filename)

Read a crosssection table file and fill TableArray

double EvaluateCrosssection(double x, double y)

function to evaluate by interpolating 2D table at x between Xmin and Xmax, and y between Ymin and Ymax

inline double EvaluateCrosssection(double x)

function to evaluate by interpolating 1D table

Private Members

double TableArray[SizeEnergyBin][SizeDimensionBin]
int Imax

x-axis information

double Xmin
double Xmax
int Jmax

y-axis information

double Ymin
double Ymax

Private Static Attributes

static const int SizeEnergyBin = 1000
static const int SizeDimensionBin = 2
class DecayStateTableReader

Public Functions

DecayStateTableReader()
virtual ~DecayStateTableReader()
SET_LOGGER ("I3NuG")
void ReadDecayStateTableFillArray(const std::string &filename)
void SampleDecayState(double x, double final[])

Private Members

int Nsample
int Ndecay
double TableArray[SizeSample][SizeDecayState]

Private Static Attributes

static const int SizeSample = 16384
static const int SizeDecayState = 8
class FinalStateTableReader

Public Functions

FinalStateTableReader()
virtual ~FinalStateTableReader()
SET_LOGGER ("I3NuG")
void ReadFinalStateTableFillArray(const std::string &filename)

Read a final state table file and fill TableArray

void SampleFinalState(const double log_energy, double x, double y, double final[])

function to evaluate by interpolating 3D table at x between Xmin and Xmax, and y between Ymin and Ymax

Private Types

typedef boost::multi_array<double, 3> TableType

Private Members

int Imax
int Nfinal
int Ndim
double Emin
double Emax
TableType TableArray

Private Static Attributes

static const int MaxEnergyBins = 1 << 10
static const int MaxFinalStates = 1 << 30
static const int MaxDimensions = 1 << 2
class FlatZenithEmulator
#include <ZenithSampler.h>

FlatZenithEmulator

This function emulates flat zenith sampling in cos(zen) space. It divides zenith range (-1 to 1) in several sections, and applies same idea with SimpleSlopeSampler with different slopes in each section. The resulting sampling distribution is very close to sampling flat in zenith, but still possible to weight back to flat in cos(zenith), which is what we observe with diffuse flux.

Public Functions

inline FlatZenithEmulator()
void Initialize(double mincos, double maxcos)
std::vector<double> Sampling(double r)

Private Functions

SET_LOGGER ("ZenithSampler")

Private Members

double mincos_
double maxcos_
unsigned int nfuncs_
std::vector<double> xths_
std::vector<double> yvals_
std::map<double, Polynominal1DFunc> funcmap_
class I3NeutrinoGenerator : public I3ConditionalModule, public I3NeutrinoGeneratorBase

Public Functions

I3NeutrinoGenerator(const I3Context &ctx)

constructor for I3Module

inline virtual ~I3NeutrinoGenerator()
void Configure()
void DAQ(I3FramePtr frame)
void Finish()

Private Functions

I3NeutrinoGenerator()

private constructors

I3NeutrinoGenerator &operator=(const I3NeutrinoGenerator&)
SET_LOGGER ("I3NuG")
class I3NeutrinoGeneratorBase

Subclassed by I3NeutrinoGenerator, I3NeutrinoPropagator

Public Functions

I3NeutrinoGeneratorBase(nugen::PropagationMode propmode, int intpos_sample_opt = nugen::Defaults::intpos_sample_opt, int interact_weight_opt = nugen::Defaults::interact_weight_opt, int crosssection_cdep_opt = nugen::Defaults::crosssectionxcolumndepth_opt, int impactparam_opt = nugen::Defaults::impactparam_opt)
inline virtual ~I3NeutrinoGeneratorBase()
void PropagateAll(boost::shared_ptr<nugen::Particle> p, I3FramePtr frame)

Propagation functions

I3Map<I3ParticleID, double> PropagateInEarth(boost::shared_ptr<nugen::Particle> p, I3FramePtr frame, bool save_result = true)
I3Map<I3ParticleID, double> PropagateInEarthWrapper(I3ParticlePtr p, I3FramePtr frame)

This function is used for pybinding test.

void SetRandomNumberGenerator(I3RandomServicePtr random)
inline void SetPropagationMode(nugen::PropagationMode m)
inline nugen::PropagationMode GetPropagationMode() const
inline void SetInteractionPositionSamplingOption(int v)
inline int GetInteractionPositionSmaplingOption()
inline void SetInteractionWeightOption(int v)
inline int GetInteractionWeightOption()
inline void SetCrosssectionxColumndepthOption(int v)
inline int GetCrosssectionxColumndepthOption()
inline void SetImpactParamOption(int v)
inline int GetImpactParamOption()
inline void SetSkipFinalInteraction(bool b)
inline bool SkipFinalInteraction() const
virtual void PrintSetting()

Protected Functions

std::pair<bool, I3NuGVEventPtr> PropagateNu(boost::shared_ptr<nugen::Particle> injected_nu, I3FramePtr frame, bool skip_final_interaction = false)

Core function to propagate neutrino This function generates I3NuGVEvent, and process MakeNeutrinoPropagation.

Returns:

I3NuGVEventPtr

void FillMC(I3NuGVEventPtr, I3FramePtr)

fill MCTree and MCWeightDict

Returns:

void

void CheckInIceParticle(I3MCTreePtr)

Check function

Parameters:

I3MCTreePtr

Returns:

void

SET_LOGGER ("I3NuG")

Protected Attributes

long number_of_events_

number of generated events in a run since icetray does not know how many events are going to be generated and since this number is useful to calculate the Oneweight, we input it as a parameter.

long eventCounter_

Number of events so far injected in a run this is the EventID stored in I3EventHeader

bool doPrintMemoryInfo_

Decide if any memory info printed

unsigned int event_year_
unsigned int event_daqtime_
unsigned int runid_
I3RandomServicePtr random_
nugen::SteeringPtr steer_
earthmodel::EarthModelServicePtr earth_
I3NuGInjectorPtr injector_
I3NuGInteractionInfoPtr interaction_
std::string steering_name_
std::string injector_name_
std::string interaction_name_
std::string pointSourceDirectionName_
std::string primary_nu_name_
double interaction_cc_factor_
double interaction_nc_factor_
double interaction_gr_factor_
nugen::PropagationMode prop_mode_
int intpos_sample_opt_
int interact_weight_opt_
int crosssectionxcolumndepth_opt_
int impactparam_opt_
bool skip_final_interaction_

Private Functions

inline I3NeutrinoGeneratorBase()

private constructors

I3NeutrinoGeneratorBase &operator=(const I3NeutrinoGeneratorBase&)
class I3NeutrinoPropagator : public I3PropagatorService, public I3NeutrinoGeneratorBase

Public Functions

I3NeutrinoPropagator(I3RandomServicePtr random, nugen::SteeringPtr steer, I3NuGInteractionInfoPtr interaction)
I3NeutrinoPropagator(I3RandomServicePtr random, nugen::SteeringPtr steer, I3NuGInteractionInfoPtr interaction, nugen::PropagationMode propmode, int intpos_sample_opt = nugen::Defaults::intpos_sample_opt, int interact_weight_opt = nugen::Defaults::interact_weight_opt, int crosssectionxcdep_opt = nugen::Defaults::crosssectionxcolumndepth_opt, int impactparam_opt = nugen::Defaults::impactparam_opt)
void SetRandomNumberGenerator(I3RandomServicePtr r)
std::vector<I3Particle> Propagate(I3Particle &incident_nu, DiagnosticMapPtr d, I3FramePtr frame)
SET_LOGGER ("I3NuG")
class I3NuGDiffuseSource : public I3ConditionalModule

Public Functions

I3NuGDiffuseSource(const I3Context &ctx)

Constructor & destructor

inline virtual ~I3NuGDiffuseSource()
virtual void Configure()
virtual void DAQ(I3FramePtr frame)
inline virtual void Finish()

Private Functions

bool SetDirection(boost::shared_ptr<nugen::Particle> nu)
I3NuGDiffuseSource()
I3NuGDiffuseSource(const I3NuGDiffuseSource&)
I3NuGDiffuseSource &operator=(const I3NuGDiffuseSource&)
SET_LOGGER ("I3NuG")

Private Members

I3RandomServicePtr random_
int number_of_events_
int eventCounter_
std::string steer_name_
std::string outNuName_
double gammaIndex_
double energyMinLog_
double energyMaxLog_
double zenithMin_
double zenithMax_
double coszenMin_
double coszenMax_
double azimuthMin_
double azimuthMax_
double zenith_weight_param_
std::string zenith_sampling_str_
nugen::AngleSamplingMode zenith_sampling_
std::string flavor_
std::vector<std::string> nutypes_
std::vector<double> ratio_vec_
std::map<I3Particle::ParticleType, double> type_map_
boost::shared_ptr<nugen::Steering> steer_ptr_
earthmodel::EarthModelServicePtr earth_ptr_
ZenithSampler::FlatZenithEmulator flat_zen_emulator_
boost::shared_ptr<nugen::Particle> injected_ptr_
class I3NuGEvent : public I3NuGVEvent
#include <I3NuGEvent.h>

Public Functions

I3NuGEvent(boost::shared_ptr<nugen::Steering> steer_p, I3NuGInteractionInfoPtr inter_p, I3RandomServicePtr random, nugen::PropagationMode propmode)

Constructor

Parameters:
  • streeringInfo

  • interactionInfo

  • const – random

virtual ~I3NuGEvent()

Virtual Deconstructor

inline virtual void WhoAmI()
virtual bool MakeNeutrinoPropagation(nugen::ParticlePtr initial, I3FramePtr frame, bool skipFinalInteraction = false)
virtual void PrintEvent()
virtual int GetTotalNumberOfInEarthDaughters()
virtual void CheckFilledMCWeights()
bool IsStartInExpectedDetectionVolume(const nugen::Particle &p)

Check function if this is CREATED in Detection volume Defined by semi-sphears of radiusm active length before and after

Check function if this is CREATED=GetPosition() in Detection volume Defined by semi-sphears of radius active length before and after

Mar 8 2011 K.Hoshina: This function is only used in I3NuGEvent.cxx, which is flozen and no longer be supported. Since I3NuGEvent.cxx is flozen, this function is also flozen.

Private Functions

bool PropagateNeutrino(nugen::ParticlePtr)
void SetFinalInteractionPosition(nugen::ParticlePtr particle_ptr)
void MakeFinalInteraction(nugen::ParticlePtr neu_part)
bool MakeTauDecay(nugen::ParticlePtr tau_ptr)
nugen::ParticlePtr ChooseNeutrinoToInteractFromBuffer()
double CalculateMaximumTotalInteractionProbability(nugen::ParticlePtr particle_ptr)
void CheckAndPushBack_Daughters(nugen::ParticlePtr part)
SET_LOGGER ("I3NuG")

Private Members

I3RandomServicePtr random_

Interface pointer to crosssection file information For common random number access throughout module

I3NuGInteractionInfoPtr interaction_ptr_
earthmodel::EarthModelServicePtr earthservice_ptr_
class I3NuGInjector : public I3ServiceBase
#include <I3NuGInjector.h>

Public Functions

I3NuGInjector(const I3Context &c)

Constructor

Parameters:
  • streeringInfo

  • const – random

I3NuGInjector(I3RandomServicePtr random, boost::shared_ptr<nugen::Steering> steer, const std::string &name = "I3NuGInjector")
virtual ~I3NuGInjector()

Virtual Deconstructor

virtual void Configure()

Virtual Deconstructor

bool InjectInitialNeutrino(I3FramePtr frame, I3MapStringDoublePtr wmap)

Generate initial injection neutrino. It may fail to generate a neutrino if a chosen neutrino doesn’t path through the Earth (with Ice).

Returns:

bool flag

inline boost::shared_ptr<nugen::Particle> GetIncidentNeutrino()

Get injected neutrino

inline void SetInitialNuFlavor(const std::string &s)
inline void SetPowerLawIndex(double g)
inline void SetFluxEnergyMinLog(double e)
inline void SetFluxEnergyMaxLog(double e)
inline void SetFluxZenithMin(double z)
inline void SetFluxZenithMax(double z)
inline void SetFluxAzimuthMin(double a)
inline void SetFluxAzimuthMax(double a)
inline void SetSimulatePointSource(bool b)
inline void SetPointSourceDirName(const std::string &b)
inline void SetPointSourceZenith(double z)
inline void SetPointSourceAzimuth(double z)
inline const std::string GetInitialNuFlavor() const
inline const double GetPowerLawIndex() const
inline const double GetFluxEnergyMinLog() const
inline const double GetFluxEnergyMaxLog() const
inline const double GetFluxZenithMin() const
inline const double GetFluxZenithMax() const
inline const double GetFluxAzimuthMin() const
inline const double GetFluxAzimuthMax() const
inline const bool GetSimulatePointSource() const

Getters for local Point source simulation:

inline const double GetPointSourceZenith() const
inline const double GetPointSourceAzimuth() const
inline const double GetPointSourceZenithSigma() const
inline const double GetPointSourceAzimuthSigma() const

Private Functions

bool DecideFlavor(boost::shared_ptr<nugen::Particle> p)

Decide functions for injected neutrino using steering information and fill it

bool DecideEnergy(boost::shared_ptr<nugen::Particle> p)
bool DecideDirection(boost::shared_ptr<nugen::Particle> p)
bool DecidePositions(boost::shared_ptr<nugen::Particle> p)

This function decides intersection position to the detection volume calculate its entrance and exit position to/from the Earth need to be called after DecideDirection()

void GetStartPosDCCandidate(boost::shared_ptr<nugen::Particle> neu_ptr, I3Position &intersectPosDC, I3Direction &nuDir)
SET_LOGGER ("I3NuG")

Private Members

std::string nu_flavor_
double gamma_
double energy_min_log_
double energy_max_log_
double zenith_min_
double zenith_max_
double coszenMin_
double coszenMax_
double azimuth_min_
double azimuth_max_
bool simulate_pointsource_
std::string pointsource_name_
double point_zenith_
double point_zenith_sigma_
double point_azimuth_
double point_azimuth_sigma_
double zenith_weight_param_
std::string zenith_sampling_string_
nugen::AngleSamplingMode zenith_sampling_
ZenithSampler::FlatZenithEmulator flat_zen_emulator_
I3RandomServicePtr random_

Interface pointer to steering information For common random number access throughout module

std::string steeringName_
boost::shared_ptr<nugen::Steering> steer_
boost::shared_ptr<nugen::Particle> injected_neutrino_ptr_
class I3NuGInteractionInfo : public I3ServiceBase

Subclassed by I3NuGInteractionInfoDifferential

Public Types

enum NuGMaterialConstitute

enums

Values:

enumerator PROTON
enumerator NEUTRON
enumerator ELECTRON
enum NuGPropagatingMedium

Values:

enumerator ICE
enumerator ROCK
enumerator UNDEF

Public Functions

I3NuGInteractionInfo(const I3Context &c)

constructor & destructor

I3NuGInteractionInfo(I3RandomServicePtr random, boost::shared_ptr<nugen::Steering> steer, const std::string &xsec_name)
virtual ~I3NuGInteractionInfo()
virtual void Configure()

configure

void Initialize()

initialize

void PrintSetting()

print setting parameters.

double GetTotalCrosssection(boost::shared_ptr<nugen::Particle> eve_ptr)

get total crosssection

Dec 14 2010 K.Hoshina added scale parameters and weights for selecting a FINAL interaction. Leave them as default (=1) for propagation. If you want to scale cross sections, use I3NuGStaticParams::gCC_SCALE_FACTOR etc. See comments in source code. Jun 16 2011 added public method and made old functions private

double GetTotalCrosssection(boost::shared_ptr<nugen::Particle> eve_ptr, const I3Position &posCE)
double GetXsecCGS(std::string inttype, double energy)
inline void SetMinEnergy(double d)

Supported energy range. Set energy minimum and maximum that gives physical results.

inline void SetMaxEnergy(double d)
inline double GetMinEnergy()
inline double GetMaxEnergy()
nugen::InteractionType MakeInteraction(boost::shared_ptr<nugen::Particle> particle_ptr, bool isfinal, double ccfactor = 1, double ncfactor = 1, double grfactor = 1)

MakeInteraction choose one interaction among all candidate interactions and fill daughter particles

Dec 14 2010 K.Hoshina added scale parameters for selecting a FINAL interactions. set 0 to deactivate an interaction. See comments in source code. argument n is not used anymore in the program then removed

bool MakeDecay(boost::shared_ptr<nugen::Particle> particle_ptr)

MakeDecay treats tau decay and fill daughter particles argument n is not used anymore in the program then removed

void ViewInteractionInfo()

print function for Interaction info

const double CalculateTotalColumnDepth(const I3Position &start, const I3Position &exit, boost::shared_ptr<nugen::Particle> p_ptr = boost::shared_ptr<nugen::Particle>(), double ccfactor = 1, double ncfactor = 1, double grfactor = 1)

calculate total columndepth from start to exit If maxstepsize is greater than 0, the step size is limited to less equal the maxstepsize. Default maxstepsize = -1 (no limit). If boost::shared_ptr<nugen::Particle> is not NULL, it also calculates sum of (crosssection * column_depth_dl) ccfactor, ncfactor and grfactor are scaling factors of cc/nc/gr interactions. default is 1.

const double ConvertColumnDepthToMeter(double columndep)

convert columndepth [g/m2] to length [m]

!!! CAUTION !!! To use the function, you MUST call CalculateTotalColumnDepth in advance. It returns pre-calculated result. The resolution of returned length depends on how you called CalculateTotalColumnDepth. If you need to limit the resolution within 10m, for example, you must specify maxstepsize = 10[m] .

const double ConvertMeterToColumnDepth(double length_meter)

convert length [m] to columndepth [g/m2]

!!! CAUTION !!! To use the function, you MUST call CalculateTotalColumnDepth in advance. It returns pre-calculated result. The resolution of returned columndepth depends on how you called CalculateTotalColumnDepth. If you need to limit the resolution within 10m, for example, you must specify maxstepsize = 10[m] .

const double GetCrosssectionColumndepthAt(double columndepth)

get (total crosssection * columndepth) at given columndepth[g/m2]

!!! CAUTION !!! To use the function, you MUST call CalculateTotalColumnDepth in advance. It returns pre-calculated result. The resolution of returned length depends on how you called CalculateTotalColumnDepth. If you need 10m resolution, for example, you must specify maxstepsize = 10[m] .

inline std::map<double, double> GetLengthVsColumndepthMap() const

get function for columndepth vs length maps. columndepth is in [g/m2]

inline std::map<double, double> GetColumndepthVsLengthMap() const
inline void SetRandomService(I3RandomServicePtr r)

setters

inline void SetMaterialRock(double pr, double nr, double er)
inline void SetMaterialH2O(double ph, double nh, double eh)

Protected Functions

virtual void ReadInteractionFiles()
virtual void ReadDecayStateFiles()
inline void SetTauDecayPtr(nugen::TauDecayPtr ptr)
inline nugen::TauDecayPtr GetTauDecayPtr()
double GetDensityRatioForIsoscalarCrossSection(NuGPropagatingMedium material, NuGMaterialConstitute mask)
Returns:

density of specified medium & material

double GetTauBeta(double energy)
Returns:

energy loss coeficient of tau

bool IsFlavorActive(const unsigned int, const I3Particle::ParticleType)

check function whether the flavor is active

bool IsMaterialActive(const unsigned int, const I3NuGInteractionInfo::NuGMaterialConstitute)

check function whether the material is active

inline I3NuGInteractionInfo()
SET_LOGGER ("I3NuG")

Protected Attributes

std::map<std::string, std::string> xsecs_

read files

I3RandomServicePtr random_

pointer to services and steering

std::string steeringName_
boost::shared_ptr<nugen::Steering> steer_
earthmodel::EarthModelServicePtr earth_
std::string tablesDir_

Location of the cross section tables.

std::vector<boost::shared_ptr<nugen::InteractionBase>> interactionVect_

interactionVect_ stores active interactions

std::map<std::string, boost::shared_ptr<nugen::InteractionBase>> interactionMap_
boost::shared_ptr<nugen::TauDecay> tau_decay_ptr_

Pointer to Decay Final State table

PrevStateCrossSection prev_state_crosssec_
std::map<double, nugen::InteractionBasePtr> crosssection_map_
PrevStateColumnDepth prev_state_columndep_
std::map<double, double> length_vs_columndepth_map_
std::map<double, double> columndepth_vs_length_map_
std::map<double, double> crosssec_columndepth_map_
std::string xsec_model_

name of cross section model

double energyMin_

supported energy range

double energyMax_
unsigned int flavorMaskCCNu_

masks and parameters

unsigned int materialMaskCCNu_
unsigned int flavorMaskCCNuBar_
unsigned int materialMaskCCNuBar_
unsigned int flavorMaskNCNu_
unsigned int materialMaskNCNu_
unsigned int flavorMaskNCNuBar_
unsigned int materialMaskNCNuBar_
unsigned int flavorMaskGRNuBar_
unsigned int materialMaskGRNuBar_
double protonrock_
double protonh2o_
double neutronrock_
double neutronh2o_
double electronrock_
double electronh2o_
double global_cc_scales_
double global_nc_scales_
double global_gr_scales_

Private Functions

double GetTotalCrosssection(boost::shared_ptr<nugen::Particle> eve_ptr, double ccfactor, double ncfactor, double grfactor, double *ccweight = 0, double *ncweight = 0, double *grweight = 0)
double GetTotalCrosssection(boost::shared_ptr<nugen::Particle> eve_ptr, const I3Position &posCE, double ccfactor, double ncfactor, double grfactor, double *ccweight = 0, double *ncweight = 0, double *grweight = 0)
class I3NuGInteractionInfoDifferential : public I3NuGInteractionInfo

Public Functions

I3NuGInteractionInfoDifferential(const I3Context &c)

constructor & destructor

I3NuGInteractionInfoDifferential(I3RandomServicePtr random, boost::shared_ptr<nugen::Steering> steer, const std::string &xsec_name)
virtual ~I3NuGInteractionInfoDifferential()

Protected Functions

virtual void ReadInteractionFiles()
inline I3NuGInteractionInfoDifferential()
SET_LOGGER ("I3NuG")
class I3NuGPointSource : public I3ConditionalModule
#include <I3NuGPointSource.h>

Public Functions

I3NuGPointSource(const I3Context &ctx)

Constructor & destructor

inline virtual ~I3NuGPointSource()
virtual void Configure()
virtual void DAQ(I3FramePtr frame)
inline virtual void Finish()

Private Functions

bool SetDirection(boost::shared_ptr<nugen::Particle> nu)
I3NuGPointSource()
I3NuGPointSource(const I3NuGPointSource&)
I3NuGPointSource &operator=(const I3NuGPointSource&)
SET_LOGGER ("I3NuG")

Private Members

I3RandomServicePtr random_
int number_of_events_
int eventCounter_
std::string steer_name_
std::string outNuName_
double gammaIndex_
double energyMinLog_
double energyMaxLog_
std::string sourceName_
double zenith_
double azimuth_
double zenithSigma_
double azimuthSigma_
std::string flavor_
std::vector<std::string> nutypes_
std::vector<double> ratio_vec_
std::map<I3Particle::ParticleType, double> type_map_
boost::shared_ptr<nugen::Steering> steer_ptr_
earthmodel::EarthModelServicePtr earth_ptr_
boost::shared_ptr<nugen::Particle> injected_ptr_
class I3NuGSourceSelector : public I3ConditionalModule, public nugen::Pickup

Public Functions

I3NuGSourceSelector(const I3Context &ctx)

Constructor & destructor

inline virtual ~I3NuGSourceSelector()
virtual void Configure()
virtual void DAQ(I3FramePtr frame)
inline virtual void Finish()
void Initialize()

Private Functions

I3NuGSourceSelector()
I3NuGSourceSelector(const I3NuGSourceSelector&)
I3NuGSourceSelector &operator=(const I3NuGSourceSelector&)
virtual double SelectionWeighter(boost::shared_ptr<nugen::Particle> p)
SET_LOGGER ("I3NuG")

Private Members

I3RandomServicePtr random_
boost::shared_ptr<nugen::Steering> steer_ptr_
int number_of_events_
int eventCounter_
std::string steer_name_
double energy_bias_power_
std::vector<double> particle_biases_
std::map<I3Particle::ParticleType, double> particle_bias_map_
bool keep_dark_
bool useZeVForm_
class I3NuGVEvent
#include <I3NuGVEvent.h>

Subclassed by I3NuGEvent, I3NuGWeightedEvent

Public Functions

inline I3NuGVEvent(nugen::PropagationMode propmode, int intpos_sample_opt = nugen::Defaults::intpos_sample_opt, int interact_weight_opt = nugen::Defaults::interact_weight_opt, int crosssection_cdep_opt = nugen::Defaults::crosssectionxcolumndepth_opt, int impactparam_opt = nugen::Defaults::impactparam_opt)
inline virtual ~I3NuGVEvent()
virtual bool MakeNeutrinoPropagation(nugen::ParticlePtr initial, I3FramePtr frame, bool skipFinalInteraction = false) = 0
inline virtual void WhoAmI()
inline virtual void SetEventCount(int i)
inline virtual const nugen::ParticlePtrList &GetInEarthPropagatingParticleList() const

Get ParticleVect of particle created during propagation

inline virtual nugen::ParticlePtrList &GetInEarthPropagatingParticleList()
inline const nugen::ParticlePtrList &GetFinalInteractionNuCandidates() const
inline nugen::ParticlePtrList &GetFinalInteractionNuCandidates()
inline virtual const nugen::ParticlePtr GetInIceParticle() const

Get final charged leptons which will propagate in final volume

inline virtual nugen::ParticlePtr GetInIceParticle()
inline const nugen::ParticlePtrList &GetPossibleParentFinalParticleList() const
inline nugen::ParticlePtrList &GetPossibleParentFinalParticleList()
inline virtual const I3MapStringDoublePtr GetMCWeightDictPtr() const
inline virtual I3MapStringDoublePtr GetMCWeightDictPtr()
inline void SetInIceParticle(nugen::ParticlePtr ptr)
inline void SetMCWeightDictPtr(I3MapStringDoublePtr ptr)
virtual void FillMCWeights(I3FramePtr frame)
virtual void PrintEvent() = 0
virtual int GetTotalNumberOfInEarthDaughters() = 0
virtual void CheckFilledMCWeights() = 0

Protected Attributes

nugen::PropagationMode propagationMode_

Propagation Mode

nugen::LEGACY : use legacy Event. nugen::NOPROPWEIGHT : no propagation weight with WeightedEvent. Some neutrino may be absorbed by the Earth. nugen::NCGRWWEIGHTED : CC interaction is forbidden and always NC or GR interacion is chosen if interactions occurred during propagation. Propagation weight is applied. No neutrino is absorbed by the Earth. !! CAUTION !! for Tau gen, use NoWeihgt option to activate tau regeneration.

int intpos_sample_opt_

parameter used to be stored in StaticParams option for sampling method for interaction position 0 : sample flat in length [m] 1 : sample flat in columnd depth [g/m2] see Particle::SetFinalInteractionPosition

int interact_weight_opt_

parameter used to be stored in StaticParams option for interaction weight calculation 0 : use (total_crosssection * 1.0e-31) * (total_column_depth / PMASS) * Psurv; (legacy) 1 : use (1 - Psurv)*norm*Psurv where Psurv = surviving probability from entrance of detection volume to interaction position 1-Psurv = interaction probability within detection volume norm = normalization factor of Psurv function norm * Psurv compensates linear sampling of interaction vertex in meter. see I3NuGWeightedEvent::SetFinalInteractionPosition

int crosssectionxcolumndepth_opt_

parameter used to be stored in StaticParams option for calculationg crosssection * columndepth 0 : get total columndepth and multiply crosseection at the specified point (legacy) 1 : calculate columndepth * crosssection at each step and accumulate them over total steps see WeightedEvent::SetFinalInteractionPosition and WeightedEvent::CalculateMaximumTotalInteractionProbability

int impactparam_opt_

parameter used to be stored in StaticParams option to choose whether re-calculate impact param for each daughters or not 0 : always use primary’s impact parameters (legacy) 1 : re-calculate for each daughters see Calculator::SetFinalInteractionPosition and

int eventCounter_
I3MapStringDoublePtr weightdict_ptr_
nugen::ParticlePtrList finalInteractionNuCandidates_
boost::shared_ptr<nugen::Particle> inice_ptr_

In NuGen “InIceParticle” represents a final neutrino, but not a charged particle

boost::shared_ptr<nugen::Steering> steer_ptr_
nugen::ParticlePtrList propagating_list_
nugen::ParticlePtrList buffer_list_

Private Functions

inline I3NuGVEvent()
class I3NuGWeightedEvent : public I3NuGVEvent, public nugen::Pickup

Public Functions

I3NuGWeightedEvent(boost::shared_ptr<nugen::Steering> steer_p, I3NuGInteractionInfoPtr inter_p, I3RandomServicePtr random, nugen::PropagationMode propmode, int intpos_sample_opt, int interact_weight_opt, int crosssection_cdep_opt, int impactparam_opt)

Constructor

Parameters:
  • streeringInfo

  • interactionInfo

  • const – random

virtual ~I3NuGWeightedEvent()

Virtual Deconstructor

inline virtual void WhoAmI()
virtual bool MakeNeutrinoPropagation(nugen::ParticlePtr initial, I3FramePtr frame, bool skipFinalInteraction = false)

Propagate a neutrino from EarthEntrance point to the end of a visible particle. This is the main function and all private functions are invoked inside this function.

virtual void PrintEvent()
virtual int GetTotalNumberOfInEarthDaughters()
virtual void CheckFilledMCWeights()
virtual double SelectionWeighter(boost::shared_ptr<nugen::Particle> p)
inline void SetInteractionCCFactor(double f)

artifical enhancement factor of each interaction at final interaction. total interaction weight compensate the effect so that final weight should be correct.

inline void SetInteractionNCFactor(double f)
inline void SetInteractionGRFactor(double f)
inline double GetInteractionCCFactor()
inline double GetInteractionNCFactor()
inline double GetInteractionGRFactor()

Protected Functions

bool PropagateNeutrino(nugen::ParticlePtr)

Propagate a neutrino from a particle position to the front surface of the detection volume.

void SetFinalInteractionPosition(nugen::ParticlePtr particle_ptr)
void MakeFinalInteraction(nugen::ParticlePtr neu_part)
bool MakeTauDecay(nugen::ParticlePtr tau_ptr)
nugen::ParticlePtr ChooseNeutrinoToInteractFromBuffer()
double CalculateMaximumTotalInteractionProbability(nugen::ParticlePtr particle_ptr)
void CheckAndPushBack_Daughters(nugen::ParticlePtr part)
SET_LOGGER ("I3NuG")

Protected Attributes

I3RandomServicePtr random_

Interface pointer to crosssection file information For common random number access throughout module

I3NuGInteractionInfoPtr interaction_ptr_
earthmodel::EarthModelServicePtr earthservice_ptr_
double interaction_cc_factor_

artificial weight factor for interactions

double interaction_nc_factor_
double interaction_gr_factor_
class InteractionBase
#include <InteractionBase.h>

Subclassed by nugen::InteractionCC, nugen::InteractionGR, nugen::InteractionNC, nugen::TauDecay

Public Functions

InteractionBase(I3RandomServicePtr random, boost::shared_ptr<Steering> steer)
virtual ~InteractionBase()
virtual void FillDaughterParticles(boost::shared_ptr<Particle> particle_ptr, double energy = 0) = 0

pure virtual function

virtual InteractionType GetInteractionType() = 0
virtual void InitializeCrosssectionTable(const std::string &sigmafile)
virtual void InitializeFinalStateTable(const std::string &finalfile)
virtual double GetMinEnergy()
virtual double GetMaxEnergy()
virtual double GetXsecCGS(const double energy)

returns cross section of this interaction in [cm^2]

inline std::string &GetCrosssectionFileName()
inline std::string &GetFinalStateFileName()
inline unsigned int GetActiveFlavorMask()
inline unsigned int GetActiveMaterialMask()
inline void SetActiveFlavorMask(unsigned int mask)
inline void SetActiveMaterialMask(unsigned int mask)
I3Direction GetLeptonDirection(const I3Direction &direction, const double lepton_energy, const double cos_theta)
Returns:

outgoinc lepton direction

virtual std::vector<double> SelectXY(double log_e, I3Particle::ParticleType ptype)
Returns:

vector<double> = (Bjorken X, Bjorken Y)

void SetSecondaryParticles(boost::shared_ptr<Particle> nuin_ptr, I3Particle::ParticleType out_ptype, bool skipCalcCosTheta = false)

wrapper function to set secondaries.

Parameters:
  • particle[in] pointer

  • outgoing[in] lepton type

  • flag[in] to skip outgoing angle calculation

void SetSecondaryLepton(boost::shared_ptr<Particle> nuin_ptr, I3Particle::ParticleType out_ptype, bool skipCalcCosTheta = false)

old function to set secondary particles this function ignores lepton mass, and direction of secondary hadron is same as parent neutrino.

Parameters:
  • particle[in] pointer

  • outgoing[in] lepton type

  • flag[in] to skip outgoing angle calculation

double CalcOutgoingCosThetaSimple(double ene, double x, double y)

old function to calculate lepton cos(angle) this function ignores lepton mass

Parameters:
  • neutrino[in] total energy

  • Bjorken[in] x

  • Bjorken[in] y

void SetSecondaries(boost::shared_ptr<Particle> nuin_ptr, I3Particle::ParticleType out_ptype, bool skipCalcCosTheta = false)

new function to set secondary particles this function takes into account of lepton mass and calculate outgoing hadron angle.

Parameters:
  • particle[in] pointer

  • outgoing[in] lepton type

  • flag[in] to skip outgoing angle calculation

void CalcKineticEnergyAndSpeed(double total_ene, double rest_mass, double &kinetic_ene, double &speed)

utility function to calculate kinetic energy and particle speed

Parameters:
  • total[in] energy of the particle

  • rest[in] mass of the particle

  • kinetic[out] energy of the particle

  • speed[out] of the particle

bool GetGoodXY(double ene, double target_mass, double lepton_mass, I3Particle::ParticleType out_ptype, double &x, double &y, int ntrials = 0)

utility function to get Bjorken X,Y value

Parameters:
  • parent[in] neutrino total energy

  • mass[in] of hit target

  • mass[in] of daughter lepton

  • type[in] of daughter lepton

  • Bjorken[out] x

  • Bjorken[out] y

  • counter[in] to save how many retry was happened (for debug)

bool CalcOutgoingTheta(double ene, I3Particle::ParticleType out_ptype, double &x, double &y, double &lep_theta, double &had_theta)

new function to calculate lepton angle this function takes into account of lepton mass

Parameters:
  • parent[in] neutrino total energy

  • type[in] of daughter lepton

  • Bjorken[out] x

  • Bjorken[out] y

  • daughter[out] lepton scatter angle

  • daughter[out] hadron scatter angle

SET_LOGGER ("I3NuG")

Protected Functions

inline InteractionBase()

Protected Attributes

I3RandomServicePtr random_
boost::shared_ptr<Steering> steer_
boost::shared_ptr<CrosssectionTableReader> cross_file_ptr_
boost::shared_ptr<FinalStateTableReader> final_file_ptr_
std::string sigmaname_
std::string finalname_
unsigned int flavormask_
unsigned int materialmask_
class InteractionBuf

Public Members

boost::shared_ptr<InteractionBase> interaction_
double xsec_
double xsec_scaled_
double xsec_per_gram_
double xsec_per_gram_scaled_
double sum_xsec_
double sum_xsec_scaled_
double sum_xsec_per_gram_
double sum_xsec_per_gram_scaled_
double scale_weight_
class InteractionCC : public nugen::InteractionBase
#include <InteractionCC.h>

Subclassed by nugen::InteractionCCDifferential

Public Functions

InteractionCC(I3RandomServicePtr random, boost::shared_ptr<Steering> steer)
virtual ~InteractionCC()
virtual void FillDaughterParticles(boost::shared_ptr<Particle> particle_ptr, double energy = -1)

pure virtual function

inline virtual InteractionType GetInteractionType()

Protected Functions

inline InteractionCC()
SET_LOGGER ("I3NuG")
class InteractionCCDifferential : public nugen::InteractionCC

Public Functions

InteractionCCDifferential(I3RandomServicePtr random, boost::shared_ptr<Steering> steer)
virtual ~InteractionCCDifferential()
void InitializeI3CrossSectionTables(const std::string &differential, const std::string &total)
virtual double GetMinEnergy()
virtual double GetMaxEnergy()
virtual std::vector<double> SelectXY(double log_e, I3Particle::ParticleType ptype)

returns vector<double> = (Bjorken X, Bjorken Y) private/neutrino-generator/legacy/I3NuGInteractionInfo.cxx

virtual double GetXsecCGS(const double energy)

returns cross section of this interaction in [cm^2]

Private Functions

inline virtual void InitializeCrosssectionTable(const std::string&)
inline virtual void InitializeFinalStateTable(const std::string&)
inline InteractionCCDifferential()
SET_LOGGER ("I3NuG")

Private Members

I3CrossSection xsec_
class InteractionGeo
#include <InteractionGeo.h>

Public Functions

inline InteractionGeo()
inline virtual ~InteractionGeo()
inline void FillInteractionGeo(I3MapStringDoublePtr wmap) const
inline void RestoreInteractionGeo(I3MapStringDoubleConstPtr wmap)

copy interaction geo info from MCWeightDict

inline bool IsInside(const I3Position &p) const

Check whether a position is within detection volume. Do not forget to call InteractionInfo::CalculateInteractionGeometry() before this function is called!

inline double GetMaxLength()

get maximum detection cylinder length

inline const double GetImpactParam() const
inline const double GetModDetLenBefore() const
inline const double GetModDetLenAfter() const
inline const double GetLeptonRangeMeter() const
inline const double GetLeptonRangeMWE() const
inline const I3Position &GetImpactPosDC() const
inline const I3Position &GetEnterDetVolDC() const
inline const I3Position &GetExitDetVolDC() const
inline void SetEnterDetVolDC(const I3Position &v)
inline void SetExitDetVolDC(const I3Position &v)
inline void SetImpactParam(double s)
inline void SetLeptonRangeMeter(double l)
inline void SetLeptonRangeMWE(double l)

Private Functions

SET_LOGGER ("I3NuG")

Private Members

double impactParam_

impact parameter of the particle

double mod_detlen_before_

distance from the closest approach to the front surface of the detection volume after muon range extension

double mod_detlen_after_

distance from the closest approach to the end surface of the detection volume, in case of the end position is clipped with Earth’s surface

double range_m_

maximum range of the particle (if mu or tau) in [m]

double range_mwe_

maximum range of the particle (if mu or tau) in [meter water equiv.]

I3Position closestDetVolDC_

closest position of a track to IceCube center in Detector Coordinate (impact position)

I3Position enterDetVolDC_

enter of detection volume in Detector Coordinate if the perticle position is within detection volume, it is identical to particle position

I3Position exitDetVolDC_

exit of detection volume in Detector Coordinate

Friends

friend class Particle
class InteractionGR : public nugen::InteractionBase
#include <InteractionGR.h>

Subclassed by nugen::InteractionGRDifferential

Public Types

enum GRDecayChannel

Values:

enumerator ELECTRON_GR
enumerator MUON_GR
enumerator TAU_GR
enumerator HADRON_GR
enumerator NOTSET_GR

Public Functions

InteractionGR(I3RandomServicePtr random, boost::shared_ptr<Steering> steer)
virtual ~InteractionGR()
inline virtual double GetMinEnergy()

set dummy energy range that are larger than CC and NC interaction

inline virtual double GetMaxEnergy()
virtual double GetXsecCGS(const double energy)

Get Crosssection (override function)

virtual void FillDaughterParticles(boost::shared_ptr<Particle> particle_ptr, double energy = -1)

pure virtual function

inline virtual InteractionType GetInteractionType()
void DebugPrint(std::string fname, int n = 1000)

Function to output neutrino energy and sampled bjorken y parameter for debug

Protected Functions

GRDecayChannel ChooseChannel()
virtual void FillResonanceStates(double fstate[], double parentnu_energy = 0)
inline InteractionGR()
SET_LOGGER ("I3NuG")
class InteractionGRDifferential : public nugen::InteractionGR

Public Functions

InteractionGRDifferential(I3RandomServicePtr random, boost::shared_ptr<Steering> steer)
virtual ~InteractionGRDifferential()
void InitializeI3CrossSectionTables(const std::string &differential, const std::string &total)
virtual std::vector<double> SelectXY(double log_e, I3Particle::ParticleType ptype)

returns vector<double> = (Bjorken X, Bjorken Y) private/neutrino-generator/legacy/I3NuGInteractionInfo.cxx

virtual double GetXsecCGS(const double energy)

Get Crosssection (override function)

Private Functions

virtual void FillResonanceStates(double fstate[], double parentnu_energy)
inline virtual void InitializeCrosssectionTable(const std::string&)
inline virtual void InitializeFinalStateTable(const std::string&)
inline InteractionGRDifferential()
SET_LOGGER ("I3NuG")

Private Members

I3CrossSection xsec_
class InteractionInfo
#include <InteractionInfo.h>

Public Functions

inline InteractionInfo()
inline virtual ~InteractionInfo()
inline void SetWeights(const InteractionInfo &intInfo)

copy weights from other intereactionInfo

inline void FillWeights(I3MapStringDoublePtr wmap) const

copy weights to MCWeightDict

inline void FillInteractionInfo(I3MapStringDoublePtr wmap) const

copy interaction info to MCWeightDict

inline double GetWeightValue(I3MapStringDoubleConstPtr wmap, std::string key)

util function to get weight value from MCWeightDict

inline void RestoreWeights(I3MapStringDoubleConstPtr wmap)

copy weight info from MCWeightDict

inline void RestoreInteractionInfo(I3MapStringDoubleConstPtr wmap)

copy interaction info from MCWeightDict

inline const double GetTotalPrimaryWeight() const

calculate total weight

inline const double GetTotalWeight() const
inline const I3Position &GetVertex() const
inline const double GetVertexTime() const
inline const InteractionType GetInteractionType() const
inline const double GetInteractionColumnDepthCGS() const
inline const double GetLengthInVolume() const
inline const double GetInteractionXsecCGS() const
inline const double GetTotalXsecCGS() const
inline const double GetBjorkenX() const
inline const double GetBjorkenY() const
inline const double GetTotalColumnDepthCGS() const
inline const double GetEnergyLost() const
inline const double GetTypeWeight() const
inline const double GetPrimarySelectionWeight() const
inline const double GetPositionWeight() const
inline const double GetDirectionWeight() const
inline const double GetEnergyWeight() const
inline const double GetPropagationWeight() const
inline const double GetInteractionPositionWeight() const
inline const double GetInteractionWeight() const
inline const double GetInteractionTypeWeight() const
inline const double GetNInIceNus() const
inline void SetVertex(const I3Position &x)
inline void SetVertexTime(double t)
inline void SetInteractionType(InteractionType t)
inline void SetInteractionColumnDepthCGS(double c)
inline void SetLengthInVolume(double l)
inline void SetInteractionXsecCGS(double c)
inline void SetBjorkenX(double c)
inline void SetBjorkenY(double c)
inline void SetTotalXsecCGS(double c)
inline void SetTotalColumnDepthCGS(double c)
inline void SetEnergyLost(double ene)
inline void SetTypeWeight(double w)
inline void SetPrimarySelectionWeight(double w)
inline void SetPositionWeight(double w)
inline void SetDirectionWeight(double w)
inline void SetEnergyWeight(double w)
inline void SetPropagationWeight(double w)
inline void SetInteractionPositionWeight(double w)
inline void SetInteractionWeight(double w)
inline void SetInteractionTypeWeight(double w)
inline void SetNInIceNus(double w)
inline std::string PrintInteractionInfo()

Private Functions

SET_LOGGER ("I3NuG")

Private Members

I3Position vertex_

interaction position (vertex)

double vertexTime_

interaction time

double columnDepthCGS_

Column depth in [mwe] from front edge of detection volume to interaction vertex.

double lengthInVolume_

length from front edge of detection volume to interaction veretex

double crosssectionCGS_

crosssection for this interaction type at vertex Xsec in log_10(sigma[mb])

InteractionType intType_

interaction type, 0 for decay

double total_crosssectionCGS_

total crosssection to calculate interaction probability

double bjorken_x_

selected final state, Bjorken x-value

double bjorken_y_

selected final state, Bjorken y-value

double total_column_depthCGS_

total column depth (w.m.e) within detection volume

double energyloss_

energy loss

double typeweight_

particle type weight. ratio of this particle’s type to all injected neutrino. If the the typeweight is 0.2 and the particle is NuMuBar, that means 25% of injected neutrinos is NuMuBar.

double selectionweight_

particle selection weight

double posweight_

generation position weight. Default value should be 1.

double angweight_

directional (zenith and azimuth) weight. Default value should be 1.

double eneweight_

energy weight. See SourceUtils::CalcEnergyFactor()

double propweight_

for weighted propagation (e.g. forbid CC etc.)

double intposweight_

interaction position weight

double intweight_

interaction weight

double inttypeweight_

weight for interaction type, when you limit interaction type (e.g. allows CC interaction only)

double ninicenus_

number of neutrinos reached to detector. Only one of them interacts.

Friends

friend class Particle
class InteractionManagerBase : public I3ServiceBase, public boost::enable_shared_from_this<InteractionManagerBase>

Subclassed by nugen::NuGInteractionManager

Public Functions

InteractionManagerBase(const I3Context &c)
InteractionManagerBase(I3RandomServicePtr rand, boost::shared_ptr<nugen::Steering> steer, const std::string &name)
inline virtual ~InteractionManagerBase()
virtual void Initialize() = 0

Generate all interaction drivers and initialize them.

boost::shared_ptr<InteractionManagerBase> GetSharedPtr()

obtain shared pointer to this object

virtual const InteractionTypeDoubleMap &GetDefaultInteractionFactors() = 0

This function must return non-weighted interaction factors. example NuGen : NuGen has 4 interaction types (CC, NC, GR, DECAY). Default interaction factor should be [CC] = 1.0 [NC] = 1.0 [GR] = 1.0 [DECAY] = 1.0 see the end of NuGInteractionManager::Initialize(). since the function returns reference, the map must be a data member!

DoubleDoublePair GetTotalXsec(const I3Position &pos_CE, I3Particle::ParticleType ptype, double energy, const InteractionTypeDoubleMap &globfactors)

get total cross section Note that the returned values are not weighted with interaction factors.

Parameters:
  • pos_CE[in] position where you want to calculate xsec, in EarthCentered coordinate

  • ptype[in] particle type

  • energy[in] neutrino energy

  • materialweights[in] map of weight ratio of materials

  • globalfactos[in] map of global scale factor of each interaction

Returns:

: pair<totalXsec, totalXsec_per_gram>

std::pair<double, boost::shared_ptr<InteractionBase>> SelectAnInteraction(const I3Position &pos_CE, I3Particle::ParticleType ptype, double energy, const InteractionTypeDoubleMap &intfactors, const InteractionTypeDoubleMap &globalfactors, bool isweighted)

select an interaction for given neutrino and position.

This function takes into account of interaction factors if isweighted parameter is true. The returned interaction must be weighted with the returned weight value to get correct frequency of the interaction. Global factors are used to scale cross section, and this effect is NOT compensated with the returned weight.

Parameters:
  • pos_CE[in] position of the vertex, in EarthCentered coordinate

  • ptype[in] particle type

  • energy[in] neutrino energy

  • materialweights[in] map of weight ratio of materials

  • intfactors[in] map of scale factor of each interaction

  • globalfactos[in] map of global scale factor of each interaction

  • isweighted[in] select a driver with weight or not

Returns:

: pair<double weight, interaction driver>

SET_LOGGER ("I3NuG")

Protected Types

typedef std::map<double, InteractionBuf> InteractionBufMap

Protected Functions

inline bool UpdateXsec(earthmodel::EarthModelService::MediumType medtype, I3Particle::ParticleType ptype, double ene, const InteractionTypeDoubleMap &intfactors, const InteractionTypeDoubleMap &globalfactors)

Check if we need to update Xsec calculation

virtual void CalcTotalXsec(const I3Position &pos_CE, I3Particle::ParticleType ptype, double energy, const InteractionTypeDoubleMap &intfactors, const InteractionTypeDoubleMap &globalfactors) = 0

calculate total cross section

In this function, protected maps and buffers listed below must be updated. intbufmap_ intbufmap_scaled_ cur_ptype_; cur_energy_; cur_int_factors_; cur_global_factors_; cur_medium_type_; See example in NuGInteractionManager::CalcTotalXsec.

Parameters:
  • pos_CE[in] position where you want to calculate xsec, in EarthCentered coordinate

  • ptype[in] particle type

  • energy[in] neutrino energy

  • intfactors[in] map of scale factor of each interaction

  • globalfactos[in] map of global scale factor of each interaction

Protected Attributes

I3RandomServicePtr random_
boost::shared_ptr<Steering> steer_
I3Particle::ParticleType cur_ptype_

buffers

double cur_energy_
InteractionTypeDoubleMap cur_int_factors_
InteractionTypeDoubleMap cur_global_factors_
earthmodel::EarthModelService::MediumType cur_medium_type_
InteractionBufMap intbufmap_

Map of double and InteractionBasePtr. The key double must be accumulated cross section. See example in NuGInteractionManager::CalcTotalXsec.

InteractionBufMap intbufmap_scaled_
class InteractionNC : public nugen::InteractionBase
#include <InteractionNC.h>

Subclassed by nugen::InteractionNCDifferential

Public Functions

InteractionNC(I3RandomServicePtr random, boost::shared_ptr<Steering> steer)
virtual ~InteractionNC()
virtual void FillDaughterParticles(boost::shared_ptr<Particle> ptr, double energy = -1)

pure virtual function

inline virtual InteractionType GetInteractionType()

Protected Functions

inline InteractionNC()
SET_LOGGER ("I3NuG")
class InteractionNCDifferential : public nugen::InteractionNC

Public Functions

InteractionNCDifferential(I3RandomServicePtr random, boost::shared_ptr<Steering> steer)
virtual ~InteractionNCDifferential()
void InitializeI3CrossSectionTables(const std::string &differential, const std::string &total)
virtual double GetMinEnergy()
virtual double GetMaxEnergy()
virtual std::vector<double> SelectXY(double log_e, I3Particle::ParticleType ptype)

returns vector<double> = (Bjorken X, Bjorken Y) private/neutrino-generator/legacy/I3NuGInteractionInfo.cxx

virtual double GetXsecCGS(const double energy)

returns cross section of this interaction in [cm^2]

Private Functions

inline virtual void InitializeCrosssectionTable(const std::string&)
inline virtual void InitializeFinalStateTable(const std::string&)
inline InteractionNCDifferential()
SET_LOGGER ("I3NuG")

Private Members

I3CrossSection xsec_
class MemoryInfo
#include <MemoryInfo.h>

Public Functions

void snapshot()
void print(std::ostream& = std::cout)

Public Static Functions

static MemoryInfo *instance()

Private Functions

MemoryInfo()
MemoryInfo(const MemoryInfo&)
const MemoryInfo &operator=(const MemoryInfo&)
void printLine(std::ostream&, const char*, int, int, const char* = 0)

Private Members

size_t mCounter

Private Static Attributes

static MemoryInfo *mMemoryInfo = 0
class NuGenTestModule : public I3Module
#include <NuGenTestModule.h>

Public Functions

NuGenTestModule(const I3Context &context)
void Configure()
void DAQ(I3FramePtr frame)
void Finish()

Private Members

std::string flavorString_
unsigned nInIceParticles_
class NuGInteractionManager : public nugen::InteractionManagerBase

Public Functions

NuGInteractionManager(const I3Context &c)
NuGInteractionManager(I3RandomServicePtr rand, boost::shared_ptr<nugen::Steering> steer, const std::string &model = "csms", const std::string &path = "", const std::string &name = "NuGInteractionManager")
inline virtual ~NuGInteractionManager()
void Configure()

configure

virtual void Initialize()

Generate all interaction drivers and initialize them.

inline virtual const InteractionTypeDoubleMap &GetDefaultInteractionFactors()

returns default interaction factor

virtual void CalcTotalXsec(const I3Position &pos_CE, I3Particle::ParticleType ptype, double energy, const InteractionTypeDoubleMap &intfactors, const InteractionTypeDoubleMap &globalfactors)

calculate total cross section

Parameters:
  • ptype[in] particle type

  • energy[in] neutrino energy

  • intfactors[in] map of scale factor of each interaction

  • globalfactos[in] map of global scale factor of each interaction

inline void SetCrossSectionModel(const std::string &s)

setters for cross section files

Private Types

typedef std::map<int, InteractionBasePtr> MatDrivers

Interaction Driver Buffers DriverMap: {ParticleType, [

typedef std::map<InteractionType, MatDrivers> IntTypeDrivers
typedef std::map<I3Particle::ParticleType, IntTypeDrivers> DriversMap

Private Functions

SET_LOGGER ("I3NuG")

Private Members

DriversMap drivers_
boost::shared_ptr<TauDecay> tau_decay_
InteractionTypeDoubleMap default_intfactors_
std::string xsec_model_string_

File names of Neutrino - proton or neutron interaction total cross section and final interaction(Bjorken x&y) tables with tag

std::string steeringName_
std::string path_
std::map<std::string, std::string> xsecs_
class Particle : public I3Particle
#include <Particle.h>

Public Functions

Particle(I3Particle::ParticleShape, I3Particle::ParticleType, boost::shared_ptr<Steering> steer)
Particle(const I3Particle &p, boost::shared_ptr<Steering> steer)
inline virtual ~Particle()
I3Particle GetI3Particle() const
inline void SetPos(const I3Position &p)
inline void SetPos(double p1, double p2, double p3, I3Position::RefFrame frame)
inline void SetPos(double x, double y, double z)
inline void SetDir(const I3Direction &d)
inline void SetDir(double zen, double azi)
inline void SetDir(double x, double y, double z)
inline void SetThetaPhi(double theta, double phi)
inline void SetEnergy(double energy)
void SetLocationType(I3Particle::LocationType l)
inline const bool IsElectron() const

check particle types

inline const bool IsMuon() const
inline const bool IsTau() const
inline const bool IsNuE() const
inline const bool IsNuMu() const
inline const bool IsNuTau() const
inline const bool IsEFlavor() const
inline const bool IsMuFlavor() const
inline const bool IsTauFlavor() const
void CopyExtraInfoFrom(const Particle &p)

this function copies extra info to this particle.

inline void SetPropagationWeight(double w)
inline void SetImpactParam(double x)
inline void SetDetectionVolume(I3Surfaces::SamplingSurfacePtr &s)

set default detection surface. This surface is typically a cylinder placed surround IceCube, with a fixed coordinate which does not rotate along with incoming tracks. The surface is originally given by Steering class, but you may change it by particle.

inline boost::shared_ptr<Steering> GetSteer()
inline double GetPropagationWeight()
inline InteractionInfo &GetInteractionInfoRef()
Returns:

a non-const reference to InteractionInfo

inline const InteractionInfo &GetInteractionInfoRef() const
InteractionGeo &GetInteractionGeoRef()
Returns:

a non-const reference to InteractionGeo

inline const InteractionGeo GetInteractionGeo() const
const DoubleStepMap &GetStepMapRef()
Returns:

reference to a const stepmap

const I3Position GetEndPosition()

Returns end position which is defined if(non-zero Length) Position + Direction*Length else if Length==0 EndPosition = Position.

Returns:

end of propagation position

inline const std::vector<boost::shared_ptr<Particle>> &GetDaughters()
Returns:

vector of daughter particles

void AddDaughter(boost::shared_ptr<Particle> p)

add daughter particle it also set parent id copy location type.

const double GetTotalDaughterEnergies()
Returns:

the energy sum of next level daughters should be equal to this particles energy

inline const int GetTotalNDaughters()
Returns:

total number of daughter particles

const double GetMuonRange() const

calculate muon range [water mater equiv.].

const double GetMuonRangeInMeterTo(const I3Position &endposDC) const

calculate muon range [water mater equiv.] and convert it in [meter] with given track geometry. endposDC will be the end point of the range.

const double GetMuonRangeInMeterFrom(const I3Position &posDC) const

calculate muon range [water mater equiv.] and convert it in [meter] with given track geometry. posDC will be the start position of the range.

inline const bool IsGeoCalculated()

is interaction geom calculated?

inline const int GetMyID() const

This returns NuGen INTERNAL ID. It is NOT the particle’s MajorID or MinorID.

inline const I3ParticleID GetParentID() const

This returns parent’s ID.

std::string PrintID()

debug prints

void PrintDaughters(const std::string &indent)
void CheckDaughters()

check daughter particles

void CheckParticle()

Print out all about this particle

bool InteractedOrDecayed()
Returns:

bool if this has interacted or decay

Private Functions

inline void ClearFlags()
Particle()

private constructors

Particle(const Particle &p)
Particle &operator=(const Particle &p)
void CalculateInteractionGeometryLegacy()

calculate interaction geometry for this particle need to be re-calculate when any of position,direction and energy has been changed.

void CalculateInteractionGeometry()
void Stepping()

perform stepping calculation for final interaction need to be re-calculate when any of position,direction and energy has been changed.

Parameters:

map[in] of interaction type and its weight factor

void SteppingSimple()
void SteppingBruteforce()
void GetMaterial(const I3Position &posDC, earthmodel::EarthModelServiceConstPtr earth, earthmodel::EarthModelService::MediumType &med, double &density)

returns medium type and density for given position

void MuRangeOptConverter(double murangeopt, earthmodel::EarthModelCalculator::LeptonRangeOption &opt, double &scale) const

convert NuG MuRangeOpt to inputs of EarthModelCalculator

inline void SetParentID(I3ParticleID p)
SET_LOGGER ("I3NuG")

Private Members

boost::shared_ptr<Steering> steer_
InteractionInfo intInfo_
InteractionGeo intGeo_
std::vector<boost::shared_ptr<Particle>> composite_list_
DoubleStepMap stepmap_
I3Surfaces::SamplingSurfacePtr detectionVolume_
bool isGeoCalculated_

boolean flag for if geom is calculated

bool isStepCalculated_
I3ParticleID parent_id_

id for parent particle

int my_particle_id_

these ids are used for debug, do not use for analysis.

Private Static Attributes

static int global_particle_id_ = 0
class Pickup
#include <Pickup.h>

Subclassed by I3NuGSourceSelector, I3NuGWeightedEvent

Public Functions

inline Pickup()
inline virtual ~Pickup()
virtual double SelectionWeighter(boost::shared_ptr<Particle> p) = 0
std::pair<bool, std::pair<boost::shared_ptr<Particle>, double>> PickupANeutrino(I3RandomServicePtr rnd, std::vector<boost::shared_ptr<Particle>> &particles, I3FramePtr frame, bool useHE = false)

Interface function

Private Functions

std::pair<bool, std::pair<boost::shared_ptr<Particle>, double>> PickupANeutrinoHE(I3RandomServicePtr rnd, std::vector<boost::shared_ptr<Particle>> &particles)

PickupANeutrinoHE is a function to select a neutrino from several candidates that takes into account of each neutrino’s interaction probability. This function is always correct even if Psurv_notselected (see below) is not nearly equal 1.0. Mostly copied from Jakob’s private module (SimpleSourceSelector).

A probability that makes force-interaction for one neutrino among several neutrinos is

P = Pint_selected * Psurv_notselected

where Pint_selected is the total interaction probability of the selected neutrino, and Psurv_notselected is the product of survival probabilities of all other neutrinos.

In other words, selectiong a neutrino(which will be interacted) is same as selecting all other neutrinos that do not interact. Thus, a neutrino is selected in ratio of Psurv_notselected(for the selected neutrino) / sum(Psurv_notselected)

This function also allow to weight selection with a class member function SelectionWeighter(). The function could be, for example, selecting more high-energy neutrinos than low energy neutrinos. The weight factor is calculated and returned with the selected particle, as pair<bool, pair<ParticlePtr, weight> >. if the pickup failed, the first bool will be false and returned values are dummy. Check the bool value before using the result.

std::pair<bool, std::pair<boost::shared_ptr<Particle>, double>> PickupANeutrinoLE(I3RandomServicePtr rnd, std::vector<boost::shared_ptr<Particle>> &particles)

PickupANeutrinoLE is a function to select a neutrino from several candidates randomly with a user-defind weight-selection. This function is correct as long as Psurv_notselected is regarded as nearly equal 1.0. This function also allow to weight selection with a class member function SelectionWeighter(). The function could be, for example, selecting more high-energy neutrinos than low energy neutrinos. The weight factor is calculated and returned with the selected particle, as pair<bool, pair<ParticlePtr, weight> >. if the pickup failed, the first bool will be false and returned values are dummy. Check the bool value before using the result.

class Polynominal1DFunc
#include <ZenithSampler.h>

class for polynominal 1D function y = ax + b

Public Functions

SET_LOGGER ("ZenithSampler")
inline Polynominal1DFunc(double a = 0, double b = 0, int funcid = -1)
inline double Evaluate(double x)
inline double Integral(double x)
double Sample_x_pol1(double rand)

sample x for constant function (y = b_) because rand is sampled in integral of the function need to find answer x for rand = b_ * x

double Sample_x_pol2(double rand)

sample x for pol1 function (y = a_*x + b_) because rand is sampled in integral of the function need to find answer x for rand = 0.5*a_*x**2 + b_*x

inline double Sample_x(double rand)
inline void SetXmin(double xmin)
inline void SetXmax(double xmax)
inline double GetTotalIntegral()
inline double GetMinIntegral()
inline int GetFuncID()
inline void DebugPrint()

Public Members

double a_
double b_
double xmin_
double xmax_
double intgmin_
double intgmax_
double totalintg_
int funcid_
class PrevStateColumnDepth

following parameters are temporary buffers to keep calculation of total column depth. columndepth_map_ stores length from the start point as key, accumulated columndepth as value. crosssec_columndepth_map_ stores accumulated columndepth as key, (crosssection * columndepth) as value.

Public Functions

PrevStateColumnDepth(const I3Position &entCE = I3Position(1e20, 1e20, 1e20), const I3Position &extCE = I3Position(1e20, 1e20, 1e20), boost::shared_ptr<nugen::Particle> p = boost::shared_ptr<nugen::Particle>(), double ccf = -1, double ncf = -1, double grf = -1)
inline bool UsePrev(PrevStateColumnDepth &cur)

Public Members

I3Position enterCE_
I3Position exitCE_
boost::shared_ptr<nugen::Particle> particleptr_
double energy_
double ccfactor_
double ncfactor_
double grfactor_
class PrevStateCrossSection

following parameters are temporary buffers to keep calculation of total cross section. crosssection_map_ stores accumulated cross section as key, pointer to an interaction as value

Public Functions

inline PrevStateCrossSection(NuGPropagatingMedium med = UNDEF, I3Particle::ParticleType ptype = I3Particle::unknown, double ene = -1, double ccf = -1, double ncf = -1, double grf = -1, double ccw = -1, double ncw = -1, double grw = -1, bool use_prev = false)
inline bool UsePrev(const PrevStateCrossSection &cur)

Public Members

NuGPropagatingMedium medium_
I3Particle::ParticleType ptype_
double energy_
double ccfactor_
double ncfactor_
double grfactor_
double ccweight_
double ncweight_
double grweight_
bool use_prev_interaction_vect_
class Steering : public I3ServiceBase
#include <Steering.h>

Public Functions

Steering(const I3Context &c)

default constructor is for I3Service only

Steering(earthmodel::EarthModelServicePtr earth)

constructors for pybindings

Steering(earthmodel::EarthModelServicePtr earth, SimMode simMode, VTXGenMode vtxGenMode, InjectionMode injectionType)
virtual ~Steering()

destructor

void Configure()

configure

inline void ViewSteering() const

Checker if all the steering values are correctly filled.

Todo:

fill it…

inline const int GetNGen() const

number of total event generated

inline const double GetMaxDetVolumeLen() const

a distance which separates a full neutrino track trajectory into “near detector area” and “in Earth propagation area”.

This radius must be larger than most longest possible track range in your simulation. For example, if you simulate Tau up to 10^9 GeV, the maximum range of the tau + mu(in meter, in ice medium) will be 155574[m]. MaxDetVolumLen must be larger than the value.

inline const SimMode GetSimMode() const

Simulation area mode FULL - from EarthSurface to detector INEARTH - InEarth simulation only (ends at near_det_radius) NEARDET - Simulation starts from a distance near_det_radius_[m] DETECTOR - final interaction only.

inline const VTXGenMode GetVTXGenMode() const

VTX Generator switch NUGEN - use nugen (anis) final interaction tables. GENIE - use Genie to generate vertex and secondary particles HYBRID - use Genie for lowE neutrino, NuGen for highE neutrino.

inline const double VTXGenEThreshold() const

energy threshold to switch NuGen and Genie active only when HYBRID is chosen for VTXGenMode

inline const BenchMode BenchmarkMode() const

Benchmark Mode Flag.

Sep.16 2013 this flag is still under construction.

OFF - Not benchmark, physics run mode (default) DETEDGE - Interaction vtx is always on edge of MuonGun::Surface. Energy of secondary particle is always same as primary particle. If flavor is NuMu and NuTau, secondary cascades are not generated. INDET - vtx is inside of the Surface area Energy of secondary particle is always same as primary particle. If flavor is NuMu and NuTau, secondary cascades are not generated. INDETPHYS - vtx is inside of the Surface area Secondary particles are generated with same process as physics run.

inline const std::string &GetEarthModelName() const

Name of EarthModelService.

inline const std::string &GetMCTreeName() const

Name of MCTree

inline const std::string &GetWeightDictName() const

Name of weight dict

inline const double GetWorldRadius() const

get world radius

inline const std::string &GetInjectionModeString() const

InjectionMode.

CIRCLE : injects neutrino in circle area, same as legacy nugen Define circle radius with SetCylinderParams(). SURFACE : injects neutrino only if the neutrino path through the defined surface around IceCube. You may set sampling surface with SetDetectionSurface(),or define cylinder param via SetCylinderParams(). DYNAMIC : Same as SURFACE , but the surface size changes as energy increases. NOT IMPREMENTED YET.

inline const InjectionMode GetInjectionMode() const
inline I3Surfaces::SamplingSurfacePtr GetDetectionSurface() const
inline std::vector<double> GetCylinderParams() const
const double GetInjectionRadius() const

parameters for DetectionVolume for CIRCLE injection. If you think icecube can detect photons from a cascade or track 1200m before or behind of IceCube-center, set them 1200m. Note that longest half-path in IceCube is ~ 750m in diagonal.

const double GetActiveHeightBefore() const
const double GetActiveHeightAfter() const
const double GetCylinderRadius() const

parameters for DetectionVolume for SURFACE or DYNAMIC option. By default NuGen doesn’t know anything about surface, but only when you set cylinderParams_ it knows the parameter.

const double GetCylinderHeight() const
const I3Position GetCylinderOrigin() const
inline const bool DoMuonRangeExtension() const

options for muon range calculation also used for column depth calculation

inline const double GetMuonRangeOpt() const
inline const int GetNSteps() const
inline const double GetStepSize() const
inline const double GetPsurvApproxLimit() const

Surviving probability is usually calculated with a formula Psurv = exp(-n*sigma) where n = number of targets, sigma = cross section. However, if n*sigma is small enough, it can be apploximated as Psurv = 1 - n*sigma. This function gives which n*sigma we start to use the approx. form. Mainly used by Step::CalcPsurv function.

inline const double GetMaxDetVolLen() const

returns maximum length of detection volume. Any muon generated farther than the distance should not reach to detector.

inline const bool UseSimpleScatterForm() const
Returns:

if we use simple form to calculate scattering angle

inline const bool IgnoreOutgoingAngleForNC() const
inline const std::vector<double> &GetGlobalXsecScalesVec() const
Returns:

global scale parameter for cross sections

inline const InteractionTypeDoubleMap &GetGlobalXsecScales() const
earthmodel::EarthModelServicePtr GetEarthModelService() const
Returns:

pointer to EarthModelService

void AddInteractionManager(VTXGenMode mode, boost::shared_ptr<InteractionManagerBase> manager)

add interaction manager

boost::shared_ptr<InteractionManagerBase> GetInteractionManager(const Particle &p)

get proper interaction manager

void AddParticle(std::string pname, boost::shared_ptr<Particle> p)

put special particle

boost::shared_ptr<Particle> GetParticle(std::string pname)

get special particle

void CheckParameters()

check if parameters are reasonable

void PrintSetting()

print out parameters. you must set log_level to info to see it.

inline void SetGlobalXsecScalesVec(std::vector<double> v)
inline void SetNGen(int n)
inline void SetSimMode(SimMode m)
inline void SetVTXGenMode(VTXGenMode m)
inline void SetDoMuonRangeExtension(bool doit)
inline void SetWorldRadius(double r)
inline void SetInjectionMode(InjectionMode m)
inline void SetUseSimpleScatterForm(bool t)
inline void SetMuonRangeOpt(double t)
inline void SetNSteps(int n)
inline void SetStepSize(double t)
inline void SetDetectionSurface(I3Surfaces::SamplingSurfacePtr s)

set Detection Surface

inline void SetCylinderParams(std::vector<double> s)

set DetectionVolume params. This function overwrites any setting you have done for Detection Volume. For Surface or Dynamic injection, sampling Surface object will be replaced. See note for cylinderParams_ to get more info.

Private Functions

SET_LOGGER ("I3NuG")

Private Members

int numberOfEvents_

number of events generated

double max_detection_volume_len_

radius that separates in_earth propagation area and near detector area ( = maximum detection volume length)

std::string simModeString_
SimMode simMode_
std::string vtxGenModeString_
VTXGenMode vtxGenMode_
double vtxEThreshold_
std::string benchmarkModeString_
BenchMode benchmarkMode_
std::string earthname_
std::string mctreename_
std::string weightname_
double worldRadius_

size of radius for this simulation your detection volume must be within this radius from the center of the Earth. If you dont’ set it, nugen automatically sets IceAirBoundary in earthmodel-service as worldRadius.

std::string injectionModeString_
InjectionMode injectionMode_
I3Surfaces::SamplingSurfacePtr detectionSurface_
std::vector<double> cylinderParams_

cylinder params size of vector is 5. for CIRCLE injection mode: param[0] : Injection Radius param[1] : Active height before param[2] : Active height after for others: param[0] : Cylinder Radius param[1] : Cylinder Height param[2-4] : Cylinder origin (x, y, z)

bool doMuRangeExtension_
double muRangeOpt_

muRangeOpt_ is the option to calculate muon range Don’t touch default setting unless you know well about the parameter.

0 : use GetMuonRange() [m.w.e] for extension (legacy)

others : use GetMuonRangeInMeter() [m] CAUTION &#8212; fmod(muRangeOpt_, 10) gives a scaling parameter of the result of GetMuRangeInMeter()[m]. Therefore, option 10, 20, etc gives range meter 0[m] ! If you want to use Dima’s original parameter with scaling factor 1, set 11 (11 is default value)

0 < opt < 10 : use GetMuonRangeInMeter() [m] with Dima’s MuRange parameter. (somehow they are inconsistent with Dima’s internal report)

10 < opt < 20 : use GetMuonRangeInMeter() [m] with Dima’s original MuRange parameter in internal report.

20 < opt < 30 : use GetMuonRangeInMeter() [m] with Gary’s fitting parameter used in NuSim

see Particle.cxx to check how the parameter is used.

int nsteps_

these parameters are used to calculate column depth etc. initial number of steps for propagation in Earth

double stepsize_

maximum arroud step size during propagation

std::vector<double> global_xsec_scales_vec_

Global cross section scale scale for cross section

InteractionTypeDoubleMap global_xsec_scales_
double psurvApproxLimit_

threshold used to calculation surviving probability

bool useSimpleScatterForm_

flag if we use simple calculation for outgoing lepton angle Affects NuGen only

bool ignoreOutgoingAngleForNC_

flag if we ignore outgoing angle for NC interaction Affects NuGen only

earthmodel::EarthModelServicePtr earth_ptr_

pointer to the EarthModelService

std::map<VTXGenMode, boost::shared_ptr<InteractionManagerBase>> managers_

Map to InteractionManagerBase.

std::map<std::string, boost::shared_ptr<Particle>> particles_

Map to special particles.

class Step
#include <Step.h>

Public Functions

inline Step()
inline virtual ~Step()
inline const double CalcPsurv(double totxsec_per_gram, double cdep) const

static function to calculate psurv calculate surviving probability within the step

Parameters:
  • totxsec_per_gram[in] = total cross section per gram [cm^2/g]

  • cdep[in] = column depth in [g/cm^2]

  • lowEapproxLimit[in] (default 1e-3, which gives reasonablly good agreement with precise equation)

Returns:

pprob = surviving probability

inline I3Position GetPos(double cdep) const

returns a position within the step as a function of column depth the step must be small enough so that we may assume the material is uniform

Parameters:

cdep[in] column depth

Returns:

I3Position position

inline double GetPsurv(double cdep) const

returns surviving probability at column depth = cdep Psurv = exp(- total_xsec_per_gram_ * cdep)

Parameters:

cdep[in] column depth

Returns:

double total surviving probability

inline double GetdPdX(double cdep) const

returns - (d/dx) (Psurv(x)) that is used to compensate interaction position which is sampled from flat distribution in column depth along the track path. Psurv = exp(-total_xsec_per_gram_*cdep)

  • d(Psurv)/d(cdep) = total_xsec_per_gram_ * Psurv(cdep) Note that the return value is not normalized.

Parameters:

cdep[in] column depth

Returns:

double -dPsurv(cdep)/d(cdep)

inline void Print() const
SET_LOGGER ("NuG")

Public Members

int istep_

Step ID

double total_xsec_

Total cross section in this segment.

double total_xsec_per_gram_

total Xsec per gram in this segment. n: number of targets of a specific atom per g [1/g] sigma: cross section of the atom cm2 [cm2]

example for GENIE : In the case of compound target (e.g. H2O): total_xsec_per_gram_ = n1*sigma1 + n2*sigma2 where n1 : number of hydrogen atoms in 1g medium n2 : number of oxigen atoms in 1g medium sigma1 : cross section of a hidrogen sigma2 : cross section of an oxigen

example for NUGEN: In the case of SiO2 total_xsec_per_gram_ = n1*sigma1 + n2*sigma2 + n3*sigma3 where n1 : number of protons in 1g SiO2 n2 : number of neutrons in 1g SiO2 n3 : number of electrons in 1g SiO2 sigma1 : cross section of a proton sigma2 : cross section of a neutron sigma3 : cross section of an electron

double column_depth_in_

column depth at the beginning of the step measured from the entrance to the detection area [g/cm2]

double column_depth_out_

column depth at the end of the step measured from the entrance to the detection area [g/cm2]

I3Position start_pos_

position of the beginning of the step

I3Position end_pos_

position of the end of the step

double start_len_

distance from the entrance to the detection area to the beginning of the step [m]

double end_len_

distance from the entrance to the detection area to the end of the step [m]

double psurv_in_

Survival probability from the entrance of detection area to the beginning of the step.

double psurv_out_

Survival probability from the entrance of detection area to the end of the step.

double lowEApproxLimit_

limit value to use simple calculation for Psurv. Default value 1e-3 is obtained from a ratio plot r = 10^(-x)/(1-exp(-10^(-x))

class TauDecay : public nugen::InteractionBase
#include <TauDecay.h>

Public Functions

TauDecay(I3RandomServicePtr random, boost::shared_ptr<Steering> steer)
virtual ~TauDecay()
virtual void InitializeFinalStateTable(const std::string &finalfile)

read decay table (override function)

inline virtual double GetXsecCGS(const double energy)

TauDecay doesn’t have cross section file. return -1 (override function)

virtual void FillDaughterParticles(boost::shared_ptr<Particle> tau, double decay_energy)

pure virtual function

inline virtual InteractionType GetInteractionType()
inline std::string &GetTauDecayFileName()

Private Functions

SET_LOGGER ("I3NuG")

Private Members

boost::shared_ptr<DecayStateTableReader> tau_final_ptr
std::string decayname_
namespace earthmodel
namespace nugen

utility class for intarction classes using differential cross sections

pickup a neutrino… I tried to make it a non-class function, but couldn’t find a good solution. To use PickupANeutrino function, inherit the class and implement SelectionWeighter function.

I3NeutrinoGenerator header file This class fills dataclasses with the event information obtained from the neutrino-generator simulation based on ANIS.

Utils header file utility functions.

Calculator IMPLEMENTATION FILE.

EnumTypeDef IMPLEMENTATION FILE.

Constants IMPLEMENTATION FILE.

Calculator header file utility functions.

FinalStateTableReader assumes a table of final states, of the structure Array[energy][entriesperenergy][2], where Array[E][S][2] is assumed to be x and y for now for given energy E and selected given sample state S.

DecayStateTableReader assumes a table of final states, of the structure Array[sample_number][6], where Array[S][2] is assumed to be.

CrosssectionTableReader read and fill tables of the structure Array[energy]. See for example, crosssection distributions for CC/NC interactions CTEQ5-Crosssection-Anis-I3Anis.gif.

a container class of a step step object is used for making interaction within detection area. A detection volume is divided with several “steps”. Each step must have (apploximately) uniform profile in terms of material components and density. Note that the “step” instants always hold “unweighted” results. Weighting interaction should be managed by InteractionManagerBase.

SourceUtils header file.

Interaction header file.

Map of interactions (per neutrino type)

NC interaction class that uses differential cross section.

Crosssection implimentation file for I3NeutrinoGeneratorNC here you find all the final state classes for processes in the Standard Model. The default data is supplied through tables.

base class of interaction manager This class inherits boost:::enable_shared_from_this in order to obtain shared pointer to point the object itself. For details, search “enable_shared_from_this.html”

Crosssection implimentation file for I3NeutrinoGeneratorGR here you find all the final state classes for processes in the Standard Model. The default data is supplied through tables.

Crosssection implimentation file for I3NeutrinoGeneratorCC here you find all the final state classes for processes in the Standard Model. The default data is supplied through tables.

Interaction header file for I3NeutrinoGenerator.

copyright (C) 2005 the IceCube Collaboration

Rcs

copyright (C) 2005 the IceCube Collaboration

Version

Rcs
Date

Rcs
Author

Kotoyo Hoshina hoshina@icecube.wisc.edu

Rcs

copyright (C) 2005 the IceCube Collaboration

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

Rcs

copyright (C) 2004 the icecube collaboration

Version

Rcs
Date

Rcs
Author

Kotoyo Hoshinahoshina@icecube.wisc.edu

Rcs

MemoryInfo.h,v 1.0.0.1 2005/04/13 17:55:03 aya Exp

Simple memory information class take a snapshot of memory information and print it out

Version

Rcs

1.0.0.1

Date

Rcs

2005/04/13 17:55:03

Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

copyright (C) 2005 the IceCube collaboration

Rcs

Copyright (C) 2006 The IceCube collaboration

Class:

CrosssectionTableReader
Version

Rcs
Date

Rcs
Author

Kotoyo Hoshina hoshina@icecube.wisc.edu

Rcs
Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

Copyright (C) 2006 The IceCube collaboration

Class:

DecayStateTableReader
    selected given sample state S.
Rcs
Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

Copyright (C) 2006 The IceCube collaboration

Class:

FinalStateTableReader
    See for example, sample states distributions for CC/NC interactions 
    resources/fig/CTEQ5-FinalStates_x_y-Anis-I3Anis.gif
    resources/fig/CTEQ5-FinalStates_Theta_E-Anis-I3Anis.gif
Rcs
Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

Copyright (C) 2006 The IceCube collaboration

copyright (C) 2005 the IceCube collaboration

Rcs
Version

Rcs
Date

Rcs
Author

Kotoyo Hoshinhoshina@icecube.wisc.edu

Rcs

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

Typedefs

typedef std::pair<double, InteractionBasePtr> DoubleInteractionPair
typedef std::map<double, InteractionBasePtr> DoubleInteractionMap
typedef I3Vector<ParticlePtr> ParticlePtrList
typedef std::map<double, Step> DoubleStepMap
typedef std::pair<double, double> DoubleDoublePair
typedef std::map<int, double> IntDoubleMap
typedef std::map<double, double> DoubleDoubleMap
typedef std::map<InteractionType, double> InteractionTypeDoubleMap

Enums

enum SimMode

simulation mode flag FULL - all simulation (same as old nugen) INEARTH - simulate InEarth propagation only DETECTOR - simulate final interaction only, formally called FINALONLY

Values:

enumerator FULL
enumerator INEARTH
enumerator DETECTOR
enum VTXGenMode

vertex generator mode flag NUGEN - use NUGEN cross section and interaction classes GENIE - use GENIE cross section and interaction modules HYBRID - use NUGEN and GENIE, swith them with energy thresthold

Values:

enumerator NUGEN
enumerator GENIE
enumerator HYBRID
enum BenchMode

Values:

enumerator OFF
enumerator DETEDGE
enumerator INDET
enumerator ALLBENCH
enum InjectionMode

define injection shape. SURFACE - inject primary neutrinos only if the neutrino has interactions with the MuonGun::Surface object the object around IceCube does not rotate. Used to called as CYLINDER option. CIRCLE - inject primary neutrinos with the circle area. same as old nugen. DYNAMIC - not implemented yet, the SURFACE option with energy dependent scale parameter(not yet implemented)

Values:

enumerator SURFACE
enumerator CIRCLE
enumerator DYNAMIC
enum InteractionType

type flag of interactions CC &#8212; NuGen charged current NC &#8212; NuGen neutral current GR &#8212; NuGen grashow GN &#8212; Genie

Values:

enumerator CC
enumerator NC
enumerator GR
enumerator GN
enumerator DECAY
enumerator NOINTERACTION
enumerator UNDEFINED
enum PropagationMode

define propagation mode.

LEGACY - this option is obsolate, used only for emulating icesim version < 2.6. Some neutrinos may be lost to absorption in CC interactions. NOPROPWEIGHT - allowing absorption in CC interactions. For NuTau simulation, this option must be NoPropWeight. NCGRWEIGHTED - prohibiting CC interactions. All neutrinos (unless NuE->Grashow W->hadron interaction happens) will survive propagation, but will have a propagation weight that must be multiplied into the interaction weight to obtain correct rates. AUTODETECT - use NCGRWEIGHTED for NuE and NuMu, NOPROPWEIGHT for NuTau

Values:

enumerator LEGACY
enumerator NOPROPWEIGHT
enumerator NCGRWEIGHTED
enumerator AUTODETECT
enum AngleSamplingMode

flag for angle sampling COS &#8212; sample zenith in Cos(theta) ANG &#8212; sample zenith in theta (don’t use it for physics analysis) ANGEMU &#8212; emulating ANG mode with allowing weight back to COS mode

Values:

enumerator COS
enumerator ANG
enumerator ANGEMU

Functions

I3_POINTER_TYPEDEFS(InteractionGeo)
I3_POINTER_TYPEDEFS(InteractionInfo)
I3_FORWARD_DECLARATION(Steering)
I3_FORWARD_DECLARATION(Particle)
I3_FORWARD_DECLARATION(CrosssectionTableReader)
I3_FORWARD_DECLARATION(FinalStateTableReader)
I3_POINTER_TYPEDEFS(InteractionBase)
I3_FORWARD_DECLARATION(InteractionBase)
I3_POINTER_TYPEDEFS(InteractionCC)
I3_POINTER_TYPEDEFS(InteractionCCDifferential)
I3_POINTER_TYPEDEFS(InteractionGR)
I3_POINTER_TYPEDEFS(InteractionGRDifferential)
I3_POINTER_TYPEDEFS(InteractionManagerBase)
I3_POINTER_TYPEDEFS(InteractionNC)
I3_POINTER_TYPEDEFS(InteractionNCDifferential)
I3_FORWARD_DECLARATION(InteractionManagerBase)
I3_FORWARD_DECLARATION(TauDecay)
I3_POINTER_TYPEDEFS(NuGInteractionManager)
I3_FORWARD_DECLARATION(DecayStateTableReader)
I3_POINTER_TYPEDEFS(TauDecay)
I3_POINTER_TYPEDEFS(Particle)
I3_POINTER_TYPEDEFS(CrosssectionTableReader)
I3_POINTER_TYPEDEFS(FinalStateTableReader)
std::string guess_table_path(const std::string &tablepath)
std::string GetSimModeString(SimMode t)
std::string GetVTXGenModeString(VTXGenMode t)
std::string GetBenchModeString(BenchMode t)
std::string GetInjectionModeString(InjectionMode t)
std::string GetInteractionTypeString(InteractionType t)
std::string GetPropagationModeString(PropagationMode t)
std::string GetAngleSamplingModeString(AngleSamplingMode t)
SimMode ToSimMode(const std::string &ss)
VTXGenMode ToVTXGenMode(const std::string &ss)
BenchMode ToBenchMode(const std::string &ss)
InjectionMode ToInjectionMode(const std::string &ss)
InteractionType ToInteractionType(const std::string &ss)
PropagationMode ToPropagationMode(const std::string &ss)
AngleSamplingMode ToAngleSamplingMode(const std::string &ss)
std::string ToUpperCase(std::string s)
void RemoveDarkNeutrinos(I3MCTreePtr mctree)
I3_FORWARD_DECLARATION(InteractionInfo)
I3_POINTER_TYPEDEFS(Steering)

Variables

static const double ETHRES = 0.2 * I3Units::GeV
static const double COSTHRES = 1e-5
namespace Calculator

Functions

double CalcPowerLawEnergyFactor(double primaryE, double gamma, double eminLog, double emaxLog)
double CalcSolidAngleFactor(double minzen, double maxzen, double minazi, double maxazi)
double DistanceToNextBoundary(earthmodel::EarthModelServiceConstPtr earth, const I3Position &posCE, const I3Direction &dirCE)

This is a wrapper function of EarthModelService::DistanceToNextBoundaryCrossing The original function returns distance zero when the position is exactly on the boundary, while this wrapper function returns the next boundary. Position and Direction must be in EarthCenter coordinate.

I3Position Rotate(const I3Position &pos, double angle, const I3Direction &axis)

Rotate is copied from TVector3::Rotate as we stopped to use RVector3 this is equivalent to pos.Rotate(angle, axis) in old TVector3 form.

I3Position RotateUz(const I3Position &pos, const I3Direction &dir)

RotateUz is copied from TVector3::RotateUz as we stopped to use RVector3 this is equivalent to pos.RotateUz(dir) in old TVector3 form.

double Angle(const I3Position &p, const I3Position &q)

Angle is copied from TVector3::Angle as we stopped to use RVector3 this is equivalent to pos.Angle(dir) in old TVector3 form.

double Angle(const I3Position &p, const I3Direction &q)
double Angle(const I3Direction &p, const I3Direction &q)
SET_LOGGER ("I3NuG")
namespace Constants

Functions

double GetMass(I3Particle::ParticleType p)
double EVm2toCM2(double length_in_eVm2)

Variables

const double PMASS = 1.6726217e-24
const double NMASS = 1.6749273e-24
const double EMASS = 9.1093829e-28
const double M_e = 5.1099891E-4
const double M_MU = 1.05658E-1
const double M_TAU = 1.777
const double M_N = 9.39E-1
const double M_pion = 1.3957018E-1
const int PDG_P = 2212
const int PDG_N = 2112
const int PDG_E = 11
const double C_LIGHT = 2.99792458e8
const double TAU_CTE = 4.9021097E-5
const double GeV2_MBARN = 0.3893796623
const double HBAR = 1.054571726e-34
const double EV = 1.602176565e-19
const double G_F = 1.16639E-5
const double GF2 = 1.3604656E-10
const double M_W = 80.423
const double MW2 = 6467.858929
const double G_tot = 2.118
const double GW = 2.633575E-2
const double GW2 = 6.935717E-4
const double RWe = 0.1072
const double RWmu = 0.1057
const double RWtau = 0.1074
const double RWhadr = 0.6793
namespace Defaults

Variables

const int nEvts = -1
const std::string simModeString = "Full"
const SimMode simMode = FULL
const std::string vtxGenModeString = "NuGen"
const VTXGenMode vtxGenMode = NUGEN
const double vtxGenEThreshold = 190 * I3Units::GeV
const std::string benchmarkModeString = "Off"
const BenchMode benchmarkMode = OFF
const std::string mcTreeName = "I3MCTree"
const std::string mcWeightDictName = "I3MCWeightDict"
const std::string primaryNuName = "NuGPrimary"
const std::string steerName = "NuGSteer"
const std::string earthModelName = "EarthModelService"
const std::string injectionModeString = "Surface"
const InjectionMode injectionMode = SURFACE
const std::string angleSamplingModeString = "COS"
const AngleSamplingMode angleSamplingMode = COS
const std::string propagationModeString = "AutoDetect"
const PropagationMode propagationMode = AUTODETECT
const double injectionRadius = 1200 * I3Units::m
const double activeHeightBefore = 1200.0 * I3Units::m
const double activeHeightAfter = 1200.0 * I3Units::m
const double cylinderHeight = 1900.0 * I3Units::m
const double cylinderRadius = 950.0 * I3Units::m
const I3Surfaces::SamplingSurfacePtr detectionSurface = I3Surfaces::SamplingSurfacePtr(new I3Surfaces::Cylinder(cylinderHeight, cylinderRadius))
const double energyMin = 10 * I3Units::GeV
const double energyMax = 1e12 * I3Units::GeV
const bool doMuRangeExtension = true
const double muRangeOpt = 11
const double densityTolerance = 0.05
const double psurvApproxLimit = 1e-5
const bool useSimpleScatterForm = false
const bool ignoreOutgoingAngleForNC = true
const double maxDetVolLen = 300. * I3Units::kilometer
const int nsteps = 10000
const double stepSize = 10 * I3Units::m
const int intpos_sample_opt = 1
const int interact_weight_opt = 1
const int crosssectionxcolumndepth_opt = 0
const double crosssectionxcolumndepth_stepsize = 10.0 * I3Units::m
const int impactparam_opt = 0
namespace DifferentialUtils

Functions

void InitializeI3CrossSectionTables(const std::string &differential, const std::string &total, I3CrossSection &xsec)
std::vector<double> SelectXY(double log_e, I3Particle::ParticleType ptype, I3CrossSection &xsec, I3RandomServicePtr random)
double GetXsecCGS(const double energy, I3CrossSection &xsec)
namespace SourceUtils

Functions

boost::shared_ptr<Particle> GeneratePrimaryNeutrino(const std::map<I3Particle::ParticleType, double> &pmap, I3RandomServicePtr rand, boost::shared_ptr<Steering> steer)
bool SetPowerLowEnergy(boost::shared_ptr<Particle> nu, double gamma, double eminLog, double emaxLog, I3RandomServicePtr random)
bool SetNuPositions(boost::shared_ptr<Particle> nu_ptr, earthmodel::EarthModelServicePtr earth, I3RandomServicePtr random, boost::shared_ptr<Steering> steer)
I3Position SelectRandomPos(boost::shared_ptr<Particle> nu_ptr, I3RandomServicePtr random, boost::shared_ptr<Steering> steer)
void FillPrimaryInfo(boost::shared_ptr<Particle> nu, I3MapStringDoublePtr map)
void FillDiffusePrimaryGenInfo(boost::shared_ptr<Particle> nu, boost::shared_ptr<Steering> steer, double gannmaIndex, double energyMinLog, double energyMaxLog, double zenithMin, double zenithMax, double azimuthMin, double azimuthMax, I3MapStringDoublePtr wmap)
void FillPointPrimaryGenInfo(boost::shared_ptr<Particle> nu, boost::shared_ptr<Steering> steer, double gammaIndex, double energyMinLog, double energyMaxLog, double zenith, double zenithSigma, double azimuth, double azimuthSigma, I3MapStringDoublePtr wmap)
void FillInjectionGeomInfo(boost::shared_ptr<Steering> steer, boost::shared_ptr<Particle> nu, I3MapStringDoublePtr wmap)
namespace TableUtils

Functions

SET_LOGGER ("I3NuG")
void ReadTableList(const std::string &tablepath, const std::string &modelname, std::map<std::string, std::string> &xsecs)
namespace Utils

Functions

I3Particle::ParticleType GetParticleType(const std::string &s)

convert particle type name to particle type

inline bool IsElectron(I3Particle::ParticleType t)
inline bool IsMuon(I3Particle::ParticleType t)
inline bool IsTau(I3Particle::ParticleType t)
inline bool IsNuE(I3Particle::ParticleType t)
inline bool IsNuMu(I3Particle::ParticleType t)
inline bool IsNuTau(I3Particle::ParticleType t)
inline bool IsNu(I3Particle::ParticleType t)
inline bool IsEFlavor(I3Particle::ParticleType t)
inline bool IsMuFlavor(I3Particle::ParticleType t)
inline bool IsTauFlavor(I3Particle::ParticleType t)
void PutParticle(I3FramePtr frame, boost::shared_ptr<Particle> nu, const std::string &pname, I3MapStringDoublePtr wmap)

put a particle to Frame, with its weight info

boost::shared_ptr<Particle> GetParticle(I3FramePtr frame, const std::string &pname, boost::shared_ptr<Steering> steer, I3MapStringDoublePtr wmap)

get a particle to Frame, with its weight info

void PutMCTree(I3FramePtr frame, boost::shared_ptr<Particle> nu, const std::string &treename)

convert Particle to MCTree and put the MCTree to the frame.

void PutMCTree(I3FramePtr frame, I3Vector<boost::shared_ptr<Particle>> list, const std::string &treename)

convert ParticleList to MCTree and put the MCTree to the frame.

void PutCleanedMCTree(I3FramePtr frame, boost::shared_ptr<Particle> nu, const std::string &treename, bool keepdark = false)

This function puts a copied MCTree but deleted all unwanted neutrinos. Note that original tree is deleted and replaced to new tree.

void StoreOneWeight(I3MapStringDoublePtr wmap, InteractionInfo intinfo)

Calculate OneWeight and save it to MCWeightDict.

I3MapStringDoublePtr PutWeightDict(I3FramePtr frame, const std::string &weightname)

Put MCWeightDict to frame. If an old MCWeightDict exists, all information in the old weight dict is copied to new one and you may add additional info using returned pointer to MCWeightDict.

template<class X, class Y>
const Y &GetMapValue(const std::map<X, Y> &m, X x)

get value from const map. if a given map doesn’t have an key x, it calls log_error.

template<class X, class Y>
void GetMapValue(const std::map<X, Y> &m, X x, Y &y)

get value from const map. if a given map doesn’t have an key x, it doesn’t change anything.

namespace std

STL namespace.

namespace TreeUtils

TreeUtils header file Utilities for converting Particle lists to I3MCTrees.

copyright (C) 2005 the IceCube collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Alex Olivas olivas@icecube.umd.edu

Functions

void ListToTree(I3MCTreePtr tree, nugen::ParticlePtrList list)
void AddParticleToTree(I3MCTree&, boost::shared_ptr<nugen::Particle>, std::string indent = "")
bool CheckForDuplicates(I3MCTree&)
bool CheckForInIces(I3MCTree&)
namespace ZenithSampler

Calculator IMPLEMENTATION FILE.

emulating flat sampling in zenith

copyright (C) 2005 the IceCube collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Kotoyo Hoshina hoshina@icecube.wisc.edu

Functions

std::vector<double> SimpleSlopeSampler(double alpha, double min, double max, double random)

SimpleSlopeSampler

change distribution from uniform (left) to weighted (right)

2/L + + + + | | | | (2-al)/L | | | /| | | | / | | | | / | 1/L |—-&#8212;| | / | | | | / | | | | / | | | al/L |/ | | | | | –&#8212;+—-&#8212;+-&#8212; &#8212;+—-&#8212;+-&#8212;> x min max min max |_______| |_______| L L

al … alpha (0.1 < al < 1.9) min … max … if alpha is 1.0, the zenith distribution remains unchanged (= uniform). equation:

original distribution is y = 1/L (constant).

To modify this flat function to 1dim function, set origin at mincosth then

diff_y = ((2-al)/L - al/L); diff_x = L; y = ((2-al)/L - al/L) / L * x + al/L = (2 - 2*al) / L^2 * x + al / L integral:

integral of y from min to max is (by definition) normalized. yinteg = [(1-al)/L^2 * x^2 + al/L * x] min to max = 1.0

with a random number r (0 < r < 1) get x from following equation

(1-al) /L^2 * x^2 + al/L * x = r multiply L (1-al) /L * x^2 + al * x - r*L = 0

x = (-al +- sqrt(al^2 + 4*(1-al)/L*r*L)) / (2*(1-al)/L) = L / (2-2al) * (-al +- sqrt(al^2 + 4*(1-al)*r) weight at x :

the nominal weight is flat (y = 1/L). then weight will be weight = (1/L) / y = 1 / (y*L)

Returns:

vector<double> result result[0] is x_value, result[1] is weight

I3_POINTER_TYPEDEFS(FlatZenithEmulator)
file Calculator.cxx
file Calculator.h
#include “phys-services/I3RandomService.h”
#include “dataclasses/I3Position.h”
#include “dataclasses/I3Direction.h”
#include “earthmodel-service/EarthModelService.h”
file Constants.cxx
file Constants.h
#include “icetray/I3Units.h”
#include “dataclasses/physics/I3Particle.h”
file CrosssectionTableReader.cxx
#include <fstream>
#include <icetray/open.h>
file CrosssectionTableReader.h
#include <icetray/I3Logging.h>
#include <cmath>
file DecayStateTableReader.cxx
#include <fstream>
#include <icetray/open.h>
file DecayStateTableReader.h
#include <icetray/I3Logging.h>
file Defaults.h
#include “icetray/I3Units.h”
#include “phys-services/surfaces/Cylinder.h”
#include <string>
file DifferentialUtils.cxx
#include <vector>
file DifferentialUtils.h
#include “phys-services/I3CrossSection.h”
#include “dataclasses/physics/I3Particle.h”
#include <vector>
file EnumTypeDefs.cxx
#include <icetray/I3Logging.h>
file EnumTypeDefs.h
#include <map>
#include <string>
#include “dataclasses/I3Vector.h”
#include “dataclasses/I3Map.h”
#include “dataclasses/physics/I3Particle.h”
#include <algorithm>
file FinalStateTableReader.cxx
#include <fstream>
#include <icetray/open.h>
file FinalStateTableReader.h
#include <icetray/I3Logging.h>
#include <boost/multi_array.hpp>
file I3NeutrinoGenerator.cxx
#include “icetray/I3Tray.h”
#include “icetray/I3TrayHeaders.h”
#include “dataclasses/physics/I3Particle.h”
#include “dataclasses/physics/I3MCTree.h”
#include “dataclasses/physics/I3MCTreeUtils.h”
#include “dataclasses/I3Map.h”
#include <boost/foreach.hpp>

Functions

I3_MODULE(I3NeutrinoGenerator)
file I3NeutrinoGenerator.h
#include “icetray/I3ConditionalModule.h”

Typedefs

typedef boost::shared_ptr<I3NeutrinoGenerator> I3NeutrinoGeneratorPtr
file I3NeutrinoGeneratorBase.cxx
#include “icetray/I3Tray.h”
#include “icetray/I3TrayHeaders.h”
#include “dataclasses/physics/I3Particle.h”
#include “dataclasses/physics/I3MCTree.h”
#include “dataclasses/physics/I3MCTreeUtils.h”
#include “dataclasses/I3Map.h”
#include <boost/foreach.hpp>
file I3NeutrinoGeneratorBase.h
#include “phys-services/I3RandomService.h”
#include “dataclasses/physics/I3MCTree.h”
#include “earthmodel-service/EarthModelService.h”
file I3NeutrinoPropagator.cxx
#include <boost/foreach.hpp>
file I3NeutrinoPropagator.h
#include “sim-services/I3PropagatorService.h”
file I3NuGDiffuseSource.cxx

* *

Rcs
Version

Rcs
Date

Rcs

Copyright (C) 2005 the IceCube Collaboration http://www.icecube.wisc.edu Aya Ishihara aya.ishihara@icecube.wisc.edu modified by Kotoyo Hoshina hoshina@icecube.wisc.edu

Functions

I3_MODULE(I3NuGDiffuseSource)
file I3NuGDiffuseSource.h
#include “icetray/I3ConditionalModule.h”
#include “earthmodel-service/EarthModelService.h”
#include “phys-services/I3RandomService.h”
#include “dataclasses/physics/I3Particle.h”
#include <vector>

Set Diffuse primary source.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Kotoyo Hoshina hoshina@icecube.wisc.edu modified from Aya’s original

Functions

I3_POINTER_TYPEDEFS(I3NuGDiffuseSource)
file I3NuGEvent.cxx
#include “dataclasses/I3Constants.h”
#include “phys-services/I3RandomService.h”
#include “dataclasses/physics/I3Particle.h”
#include “dataclasses/I3Map.h”

I3NuGEvent class implementation file, the main class for neutrino-generator program.

Copyright (C) 2005 The IceCube collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

Variables

static const int NSTEPS = 10000
file I3NuGEvent.h
#include “dataclasses/I3Map.h”
#include “icetray/I3Frame.h”
#include “phys-services/I3RandomService.h”
#include “earthmodel-service/EarthModelService.h”

I3NuGEvent header file The header file for I3NuGEvent for the I3NeutrinoGenerator Neutrino Event generator Module final charged leptons which will be passed to MMC for further propagation or to PSI for photon creation.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

Typedefs

typedef boost::shared_ptr<I3NuGEvent> I3NuGEventPtr
file I3NuGInjector.cxx
#include “earthmodel-service/EarthModelCalculator.h”
#include “dataclasses/I3Constants.h”
#include “icetray/I3SingleServiceFactory.h”
#include <iostream>

I3NuEInjector class implementation file, the injector class for neutrino-generator program.

Copyright (C) 2005 The IceCube collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu modified by K.Hoshina hoshina@icecube.wisc.edu K.Hoshina changed the class to a service

Typedefs

typedef I3SingleServiceFactory<I3NuGInjector> I3NuGInjectorFactory

Functions

I3_SERVICE_FACTORY(I3NuGInjectorFactory)
file I3NuGInjector.h
#include “dataclasses/I3Position.h”
#include “dataclasses/I3Direction.h”
#include “dataclasses/I3Map.h”
#include “phys-services/I3RandomService.h”
#include “icetray/I3ServiceBase.h”
#include “icetray/I3Frame.h”

I3NuGInjector header file The header file for I3NuGInjector for the I3NeutrinoGenerator Neutrino Event generator Module.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu K.Hoshina changed the class to a service

Typedefs

typedef boost::shared_ptr<I3NuGInjector> I3NuGInjectorPtr
file I3NuGInteractionInfo.cxx
#include “phys-services/I3RandomService.h”
#include “icetray/I3SingleServiceFactory.h”
#include “dataclasses/I3Constants.h”
#include <boost/foreach.hpp>

I3NuGInteractionInfo implementaion file This class accesss to the classes containing all active interaction channels.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

Typedefs

typedef I3SingleServiceFactory<I3NuGInteractionInfo> I3NuGInteractionInfoFactory

Functions

I3_SERVICE_FACTORY(I3NuGInteractionInfoFactory)
file I3NuGInteractionInfo.h
#include “dataclasses/physics/I3Particle.h”
#include “earthmodel-service/EarthModelService.h”
#include “phys-services/I3RandomService.h”
#include “icetray/I3ServiceBase.h”
#include <vector>
#include <map>

I3NuGInteractionInfo header file Total Crosssection header file for I3NeutrinoGenerator interface to interaction and decay classes sigmatotal is the sum of all crossections.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

Typedefs

typedef boost::shared_ptr<I3NuGInteractionInfo> I3NuGInteractionInfoPtr
file I3NuGInteractionInfoDifferential.cxx
#include “phys-services/I3RandomService.h”
#include “icetray/I3SingleServiceFactory.h”
#include “dataclasses/I3Constants.h”
#include <boost/foreach.hpp>

I3NuGInteractionInfoDifferential implementaion file This class accesss to the classes containing all active interaction channels.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

Typedefs

typedef I3SingleServiceFactory<I3NuGInteractionInfoDifferential> I3NuGInteractionInfoDifferentialFactory

Functions

I3_SERVICE_FACTORY(I3NuGInteractionInfoDifferentialFactory)
file I3NuGInteractionInfoDifferential.h
#include “dataclasses/physics/I3Particle.h”
#include “earthmodel-service/EarthModelService.h”
#include “phys-services/I3RandomService.h”
#include “icetray/I3ServiceBase.h”
#include <vector>
#include <map>

I3NuGInteractionInfoDifferential header file Total Crosssection header file for I3NeutrinoGenerator interface to interaction and decay classes sigmatotal is the sum of all crossections.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

Typedefs

typedef boost::shared_ptr<I3NuGInteractionInfoDifferential> I3NuGInteractionInfoDifferentialPtr
file I3NuGPointSource.cxx

  • * *

    Rcs
    Version

    Rcs
    Date

    Rcs

Copyright (C) 2005 the IceCube Collaboration http://www.icecube.wisc.edu Aya Ishihara aya.ishihara@icecube.wisc.edu modified by Kotoyo Hoshina hoshina@icecube.wisc.edu

Functions

I3_MODULE(I3NuGPointSource)
file I3NuGPointSource.h
#include “icetray/I3ConditionalModule.h”
#include “earthmodel-service/EarthModelService.h”
#include “phys-services/I3RandomService.h”
#include <vector>

Set Point primary source.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Kotoyo Hoshina hoshina@icecube.wisc.edu modified from Aya’s original

Functions

I3_POINTER_TYPEDEFS(I3NuGPointSource)
file I3NuGSourceSelector.cxx

* *

Rcs
Version

Rcs
Date

Rcs

Copyright (C) 2005 the IceCube Collaboration http://www.icecube.wisc.edu Aya Ishihara aya.ishihara@icecube.wisc.edu modified by Kotoyo Hoshina hoshina@icecube.wisc.edu

Functions

I3_MODULE(I3NuGSourceSelector)
file I3NuGSourceSelector.h
#include “icetray/I3ConditionalModule.h”
#include “earthmodel-service/EarthModelService.h”
#include “phys-services/I3RandomService.h”
#include <vector>
#include <map>

Set Diffuse primary source.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Kotoyo Hoshina hoshina@icecube.wisc.edu

Functions

I3_POINTER_TYPEDEFS(I3NuGSourceSelector)
file I3NuGVEvent.cxx
#include <string>
#include <iostream>
file I3NuGVEvent.h
#include “dataclasses/I3Map.h”
#include “icetray/I3Frame.h”

interface pure virtual class for event classes all event classes must inherit it.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Kotoyo Hoshina

Typedefs

typedef boost::shared_ptr<I3NuGVEvent> I3NuGVEventPtr
file I3NuGWeightedEvent.cxx
#include “dataclasses/I3Constants.h”
#include “phys-services/I3RandomService.h”
#include “dataclasses/physics/I3Particle.h”
#include “dataclasses/I3Map.h”
#include <boost/foreach.hpp>

I3NuGWeightedEvent class implementation file, the main class for neutrino-generator program.

Copyright (C) 2005 The IceCube collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Kotoyo Hoshina hoshina@icecube.wisc.edu

Variables

const double EXPTERM_THRESHOLD = 1e-5
file I3NuGWeightedEvent.h
#include “dataclasses/I3Map.h”
#include “icetray/I3Frame.h”
#include “phys-services/I3RandomService.h”
#include “earthmodel-service/EarthModelService.h”

I3NuGWeightedEvent header file This class is modified version of I3NuGEvent which improves :

Copyright (C) 2005 The IceCube Collaboration

Rcs

  • reduce duplicated code

  • precise calculation for muon range

  • precise calculation for interaction weight

  • allow propagation weight for numu simulation

  • follow coding convention

Version

Rcs
Date

Rcs
Author

Kotoyo Hoshina hoshina@icecube.wisc.edu

Typedefs

typedef boost::shared_ptr<I3NuGWeightedEvent> I3NuGWeightedEventPtr
file InteractionBase.cxx
#include “icetray/I3Units.h”
#include “dataclasses/I3Constants.h”
file InteractionBase.h
#include “dataclasses/I3Direction.h”
#include “dataclasses/physics/I3Particle.h”
#include “phys-services/I3RandomService.h”
#include <map>
file InteractionCC.cxx
#include “dataclasses/I3Constants.h”
file InteractionCC.h

InteractionCC header file Standard Model cross-sections derived from sigma.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

file InteractionCCDifferential.cxx
#include “dataclasses/I3Constants.h”
file InteractionCCDifferential.h
#include “phys-services/I3CrossSection.h”

InteractionCCDifferential header file Standard Model cross-sections derived from sigma.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

file InteractionGeo.h
#include “dataclasses/I3Position.h”
#include “dataclasses/I3Map.h”
#include <string>
file InteractionGR.cxx
#include “dataclasses/I3Constants.h”
file InteractionGR.h

InteractionGR header file Grashow Resonance Crosssection implimentation for I3NeutrinoGenerator.

InteractionGR header file Standard Model cross-sections derived from sigma.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

file InteractionGRDifferential.cxx
#include “dataclasses/I3Constants.h”
file InteractionGRDifferential.h
#include “phys-services/I3CrossSection.h”
file InteractionInfo.h
#include “dataclasses/I3Position.h”
#include “dataclasses/I3Map.h”
#include <string>

Stores interaction geom info, used by Particle class.

Stores interaction info, used by Particle Class.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Kotoyo Hoshina hoshina@icecube.wisc.edu

file InteractionManagerBase.cxx
file InteractionManagerBase.h
#include “dataclasses/physics/I3Particle.h”
#include “phys-services/I3RandomService.h”
#include “icetray/I3ServiceBase.h”
#include “boost/enable_shared_from_this.hpp”
file InteractionNC.cxx
#include “dataclasses/I3Constants.h”
file InteractionNC.h

InteractionNC header file Standard Model cross-sections derived from sigma.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

file InteractionNCDifferential.cxx
#include “dataclasses/I3Constants.h”
file InteractionNCDifferential.h
#include “phys-services/I3CrossSection.h”

InteractionNCDifferential header file Standard Model cross-sections derived from sigma.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

file main.cxx
#include <I3TestMain.ixx>
file MemoryInfo.cxx
#include <iostream>
file MemoryInfo.h
#include <iostream>
file NuGenTestModule.cxx
#include “NuGenTestModule.h
#include <I3Test.h>
#include <icetray/I3Frame.h>
#include <dataclasses/physics/I3Particle.h>
#include <dataclasses/physics/I3MCTree.h>
#include <dataclasses/physics/I3MCTreeUtils.h>

Functions

I3_MODULE(NuGenTestModule)
file NuGenTestModule.h
#include <icetray/I3Module.h>
file NuGInteractionManager.cxx
#include “icetray/I3SingleServiceFactory.h”

Typedefs

typedef I3SingleServiceFactory<nugen::NuGInteractionManager> I3NuGInteractionManager

Functions

I3_SERVICE_FACTORY(I3NuGInteractionManager)
file NuGInteractionManager.h
file Particle.cxx
#include “phys-services/surfaces/Cylinder.h”
#include <sstream>
#include <inttypes.h>

Defines

__STDC_FORMAT_MACROS

Particle implementation file.

copyright (C) 2004 the icecube collaboration $Id$

Version

$Revision$

Date

$Date$

Author

Aya Ishihara aya.ishihara@icecube.wisc.edu

file Particle.h
#include “dataclasses/physics/I3Particle.h”
#include “dataclasses/I3Direction.h”
#include “dataclasses/I3Position.h”
#include “earthmodel-service/EarthModelCalculator.h”
#include “earthmodel-service/EarthModelService.h”
#include “phys-services/surfaces/SamplingSurface.h”

Particle header particle class contains following information ‘in-addition to the I3Particle object’,.

Copyright (C) 2005 The IceCube Collaboration $Id$

  • InteractionInfo

  • InteractionGeo

  • Step

  • detectionVolume (MuonGun::Surface class)

  • Secondary particles

Version

$Revision$

Date

$Date$

Author

Aya Ishihara aya.ishihara@icecube.wisc.edu modified by Kotoyo Hoshina hoshina@icecube.wisc.edu

Note: all position information is stored in that of center of detector system Direction is also stored respect to the center of detector system.

&#8212; Comments on functions to access info and take into account the coordinate system.

Interacted() function returns true if non-zero daughter

GetDaughterEnergySum() function returns the sum of all daughter energies if no daughters, returns zero, if non-zero, this essentially needs to equal to the parent energy.

GetEndPosition() returns constant of I3Particle which is (Start-)Position + (Direction*Length) if interacted/decayed if not interacted returns the (Start-)Position

file Pickup.cxx
file Pickup.h
#include “phys-services/I3RandomService.h”
file SourceUtils.cxx
#include “earthmodel-service/EarthModelCalculator.h”
#include “dataclasses/I3Constants.h”
#include <string>
#include <iostream>

provides utility functions to set primary neutrino

Copyright (C) 2005 The IceCube collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Kotoyo Hoshina

file SourceUtils.h
#include “icetray/I3Frame.h”
#include “dataclasses/physics/I3MCTree.h”
#include “dataclasses/I3Map.h”
#include “dataclasses/I3Position.h”
#include “phys-services/I3RandomService.h”
#include “earthmodel-service/EarthModelService.h”
#include <string>
#include <map>
file Steering.cxx
#include “phys-services/surfaces/Cylinder.h”
#include “phys-services/surfaces/AxialCylinder.h”
#include “icetray/I3Units.h”
#include <iostream>
#include <algorithm>
#include <cfloat>
#include <boost/algorithm/string.hpp>
#include <boost/make_shared.hpp>

Rcs

Version

Rcs
Date

Rcs

Copyright (C) 2005 the IceCube Collaboration http://www.icecube.wisc.edu Aya Ishihara aya.ishihara@icecube.wisc.edu modified by Kotoyo Hoshina hoshina@icecube.wisc.edu

Typedefs

typedef I3SingleServiceFactory<nugen::Steering> I3NuGSteeringFactory

Functions

I3_SERVICE_FACTORY(I3NuGSteeringFactory)
file Steering.h
#include “icetray/I3ServiceBase.h”
#include “icetray/I3SingleServiceFactory.h”
#include “dataclasses/I3Map.h”
#include “earthmodel-service/EarthModelService.h”
#include “phys-services/surfaces/SamplingSurface.h”

steering information to run nugen Now Steering class keeps only run-base info thus it is singleton. There is no setter function because only an interface friend class should be able to change all parameter. Modified from Aya Ishihara’s original version in 2013.

Copyright (C) 2005 The IceCube Collaboration

Rcs

Version

Rcs
Date

Rcs
Author

Kotoyo Hoshina hoshina@icecube.wisc.edu

file Step.h
#include <vector>
#include <map>
#include <string>

copyright (C) 2011

Rcs

This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

Version

$Revision$

Date

Rcs
Author

Kotoyo Hoshina

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/

file TableUtils.cxx
#include <boost/filesystem.hpp>
file TableUtils.h
#include <icetray/I3Logging.h>
#include <string>
#include <map>
#include <fstream>
file TauDecay.cxx
#include “dataclasses/I3Constants.h”
file TauDecay.h
#include “phys-services/I3RandomService.h”
file TreeTests.cxx
#include <I3Test.h>
#include <icetray/I3Tray.h>
#include <icetray/I3Units.h>
#include <earthmodel-service/EarthModelService.h>
#include <boost/python/import.hpp>

Functions

TEST_GROUP(NuGenTreeTests)
void test_flavor(std::string flavorString)
TEST(find_numu)
TEST(find_e)
TEST(find_tau)
file TreeUtils.cxx
#include <dataclasses/physics/I3MCTreeUtils.h>
#include <boost/foreach.hpp>
#include <inttypes.h>
#include <algorithm>

Functions

bool CheckParticleDiff(const I3Particle &p1, const I3Particle &p2)
bool TimeOrder(const ParticlePtr &rLeft, const ParticlePtr &rRight)
file TreeUtils.h
#include “dataclasses/physics/I3MCTree.h”
#include <string>
file Utils.cxx
#include <dataclasses/physics/I3MCTree.h>
#include <icetray/I3Frame.h>
#include <algorithm>
file Utils.h
#include “phys-services/I3RandomService.h”
#include “dataclasses/physics/I3Particle.h”
#include <sim-services/I3PropagatorService.h>
#include <string>
#include <map>
file ZenithSampler.cxx
#include <algorithm>
#include <iostream>
#include <cmath>
file ZenithSampler.h
#include <vector>
#include <map>
#include <iostream>
#include <icetray/I3Logging.h>
#include <icetray/I3PointerTypedefs.h>
page todo

Member nugen::Steering::ViewSteering  () const

fill it…

dir icetray
dir interactions
dir legacy
dir legacy
dir neutrino-generator
dir neutrino-generator
dir neutrino-generator
dir private
dir public
dir sources
dir sources
dir table-interface
dir tree-tests
dir utils
dir utils