Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JAANET Namespace Reference

Extensions to Evt data format. More...

Classes

struct  calibration
 Calibration. More...
 
struct  can
 The cylinder used for photon tracking. More...
 
struct  coord_origin
 Coordinate origin. More...
 
struct  cut
 General purpose class of phase space generation. More...
 
struct  cut_in
 Phase space of incoming particle. More...
 
struct  cut_nu
 Phase space of incident neutrino. More...
 
struct  cut_primary
 Phase space of primary particle. More...
 
struct  cut_seamuon
 Phase space of atmospheric muon generation. More...
 
struct  DAQ
 Livetime of DAQ data. More...
 
struct  depth
 Depth. More...
 
struct  detector
 Detector file. More...
 
struct  drawing
 Drawing. More...
 
struct  end_event
 End of event record. More...
 
struct  fixedcan
 The fixed cylinder used for photon tracking. More...
 
struct  flux
 Neutrino flux. More...
 
struct  generator
 Description of Monte Carlo event generation applications. More...
 
struct  genhencut
 Phase space for incident neutrino. More...
 
struct  genvol
 Neutrino vertex volume. More...
 
struct  JAtmosphericNeutrinoFlux
 Implementation of atmospheric neutrino flux using official KM3NeT atmospheric flux function. More...
 
struct  JConstantFlux
 Function object for constant fluxes. More...
 
struct  JDiffuseFlux
 Low-level interface for diffuse fluxes. More...
 
struct  JDiffuseFluxHelper
 Helper class for diffuse flux factor. More...
 
struct  JEventSelector
 Event selector. More...
 
struct  JEvtCategory
 Low-level interface for event categories. More...
 
struct  JEvtCategoryHelper
 Helper class for event categories. More...
 
class  JEvtCategoryMap
 Auxiliary class for reading a map of event categories. More...
 
class  JEvtCategoryMap< JEvtWeightFactorProduct >
 Template specialisation for a map between event categories and event-weight factor products. More...
 
class  JEvtCategoryMap< JFluxHelper >
 Template specialisation for a map between event categories and flux factors. More...
 
struct  JEvtCategorySet
 Container for a set of event categories. More...
 
struct  JEvtEvaluator
 Auxiliary class to determine value of Evt objects. More...
 
struct  JEvtWeight
 Abstract base class for event weighing. More...
 
struct  JEvtWeightCorsika
 Implementation of event weighting for Corsika data. More...
 
struct  JEvtWeightDAQ
 Implementation of event weighing for DAQ data. More...
 
struct  JEvtWeighter
 Look-up table for event weighters. More...
 
struct  JEvtWeightFactor
 Abstract base class for specifiable event-weight factors. More...
 
struct  JEvtWeightFactorConstant
 Class for constant event-weight factors. More...
 
struct  JEvtWeightFactorFunction
 Implementation of event-weight factor interface. More...
 
struct  JEvtWeightFactorFunction< Flux_Atmospheric, JDiffuseFlux >
 Specialisation of event-weight factor interface for atmospheric neutrino flux. More...
 
struct  JEvtWeightFactorFunction< JDiffuseFluxFunction_t, JDiffuseFlux >
 Implementation of event-weight factor interface for diffuse flux objects. More...
 
struct  JEvtWeightFactorFunction< pDiffuseFlux, JDiffuseFlux >
 Implementation of C-style diffuse flux event-weight factor. More...
 
struct  JEvtWeightFactorFunction< pEvtWeightFactor, JEvtWeightFactor_t >
 Implementation of C-style event-weight factor. More...
 
class  JEvtWeightFactorGSeaGen
 Implementation of reweighting factor for simulated neutrino interactions according to a specifiable ROOT TFormula. More...
 
struct  JEvtWeightFactorHelper
 Helper class for event-weight factor. More...
 
struct  JEvtWeightFactorMeffRatio
 Implementation of reweighting factor for effective mass ratios. More...
 
struct  JEvtWeightFactorMupage
 Implementation of reweighting factor for mupage events according to a specifiable ROOT TFormula. More...
 
struct  JEvtWeightFactorProduct
 Class for product of event-weight factors. More...
 
class  JEvtWeightFactorTFormula
 Base class implementation for reweighting factor for simulated events according to a specifiable ROOT TFormula. More...
 
struct  JEvtWeightGenhen
 Implementation of event weighting for Genhen data. More...
 
struct  JEvtWeightGSeaGen
 Implementation of event weighting for GSeaGen data. More...
 
struct  JEvtWeightHelper
 Helper class for event weighing. More...
 
struct  JEvtWeightInterface
 Low-level interface for event weighing. More...
 
struct  JEvtWeightKM3BUU
 Implementation of event weighting for KM3BUU data. More...
 
struct  JEvtWeightMiscellaneous
 Implementation of event weighing for miscellaneous data
such as a merged offline file containing neutrinos and atmospheric muons. More...
 
struct  JEvtWeightMupage
 Implementation of event weighing for MUPAGE data. More...
 
struct  JEvtWeightNormalisation
 Auxiliary data structure for storing pairs of header UUIDs and event-weight normalisations. More...
 
struct  JFlux
 Low-level interface for retrieving the flux corresponding to a given event. More...
 
struct  JFluxHelper
 Helper class for flux function. More...
 
class  JHead
 Monte Carlo run header. More...
 
struct  JHeadHelper
 Auxiliary map of application to check method. More...
 
struct  JHeadWriter
 Implementation for Head output of JHead objects with ROOT dictionary. More...
 
struct  JHondaAngularBinSpecs
 Auxiliary data structure for reading angular binning specifications of Honda flux table. More...
 
struct  JHondaBinRange
 Auxiliary data structure for reading Honda bin ranges. More...
 
class  JHondaFluxInterpolator
 Template definition for Honda flux table interpolator. More...
 
class  JHondaFluxInterpolator< JConstantFunction1D< double, JArray< 4, double > >, JCoszFunctionalMap_t, JEnergyFunctionalMap_t >
 Template specialisation for interpolator of azimuth-averaged Honda flux table. More...
 
struct  JLorentzBoost
 Auxiliary class for performing Lorentz boosts. More...
 
struct  JMultiHead
 Auxiliary data structure to store multiple headers
and bookkeep event-weight normalisations. More...
 
struct  JMuonBundleCategory
 Class for muon bundle categories. More...
 
struct  JNeutrinoInteractionCategory
 Class for neutrino interaction categories. More...
 
struct  JOscFlux
 Implementation of oscillated neutrino flux. More...
 
struct  JParticle
 Auxiliary class to handle particle name, codes and mass. More...
 
struct  JPDB
 Collection of particles. More...
 
struct  JPowerLawFlux
 Example function object for computing power-law flux. More...
 
struct  JRange_t
 Type definition of range. More...
 
struct  JVolume
 Auxiliary class for histogramming of effective volume. More...
 
struct  K40
 Livetime of noise data. More...
 
struct  livetime
 Normalisation of MUPAGE events. More...
 
struct  muon_desc_file
 Muon descriptor file. More...
 
struct  norma
 Normlisation of CORSIKA events. More...
 
struct  physics
 Physics information. More...
 
struct  primary
 Primary particle. More...
 
struct  seabottom
 The bottom of the sea. More...
 
struct  simul
 Generator for simulation. More...
 
struct  spectrum
 Neutrino energy spectrum. More...
 
struct  start_run
 Start of run record. More...
 
struct  String
 General purpose string class. More...
 
struct  target
 Target. More...
 
struct  tgen
 Time duration of event generation. More...
 
struct  time_interval
 UTC time interval for event generation. More...
 
struct  XSecFile
 Neutrino cross section file. More...
 

Typedefs

using JEvtWeightFactorMap = JEvtCategoryMap<JEvtWeightFactorProduct>
 
using JFluxMap = JEvtCategoryMap<JFluxHelper>
 Type alias for flux maps.
 
using JFluxAtmospheric = JEvtWeightFactorFunction<Flux_Atmospheric, JDiffuseFlux>
 Type alias for atmospheric flux function interface.
 
typedef double(* pEvtWeightFactor) (const Evt &)
 Type definition of event-weight factor pointer.
 
using pFlux = pEvtWeightFactor
 Type definition of flux function pointer.
 
typedef double(* pDiffuseFlux) (int, double, double)
 Type definition of pointer to diffuse flux function.
 
typedef bool(* is_head) (const JHead &)
 Type definition of test function of header.
 
template<template< class, class, class > class JCoszFunctionalMap_t = JPolint1FunctionalMap, template< class, class, class > class JEnergyFunctionalMap_t = JPolint1FunctionalMap>
using JHondaFluxInterpolator2D
 Alias template definition for 2-dimensional Honda flux interpolator.
 

Enumerations

enum  JHitType_t {
  HIT_TYPE_MUON_DIRECT = +5 , HIT_TYPE_MUON_SCATTERED = -5 , HIT_TYPE_DELTARAYS_DIRECT = +4 , HIT_TYPE_DELTARAYS_SCATTERED = -4 ,
  HIT_TYPE_BREMSSTRAHLUNG_DIRECT = +3 , HIT_TYPE_BREMSSTRAHLUNG_SCATTERED = -3 , HIT_TYPE_SHOWER_DIRECT = +99 , HIT_TYPE_SHOWER_SCATTERED = -99 ,
  HIT_TYPE_NOISE = -1 , HIT_TYPE_UNKNOWN = 0
}
 Enumeration of hit types based on km3 codes. More...
 
enum class  JInteractionTypeGENIE_t {
  INTERACTION_TYPES_START = -1 , UNDEFINED , ELECTROMAGNETIC , WEAK_CHARGED_CURRENT ,
  WEAK_NEUTRAL_CURRENT , WEAK_MIX , DARK_MATTER , NUCLEON_DECAY ,
  NEUTRON_OSCILLATION , NEUTRAL_HEAVY_LEPTON , DARK_NEUTRAL_CURRENT , INTERACTION_TYPES_END
}
 Enumeration of GENIE interaction types. More...
 
enum class  JScatteringTypeGENIE_t {
  UNKNOWN = -100 , NEUTRINO_SCATTERING_TYPES_START = -1 , UNDEFINED = 0 , QUASI_ELASTIC ,
  SINGLE_KAON , DEEP_INELASTIC , RESONANT , COHERENT_PRODUCTION ,
  DIFFRACTIVE , ELECTRON_NEUTRINO_ELASTIC , INVERSE_MUON_DECAY , ANOMALY_MEDIATED_NEUTRINO_GAMMA ,
  MESON_EXCHANGE_CURRENT , COHERENT_ELASTIC , INVERSE_BETA_DECAY , GLASHOW_RESONANCE ,
  INVERSE_MUON_DECAY_ANNIHILATION , NEUTRINO_SCATTERING_TYPES_END , DARK_MATTER_SCATTERING_TYPES_START = 100 , DARK_MATTER_ELASTIC ,
  DARK_MATTER_DEEP_INELASTIC , DARK_MATTER_ELECTRON , DARK_MATTER_SCATTERING_TYPES_END
}
 Enumeration of GENIE scattering types. More...
 
enum  JGeant4Type_t {
  GEANT4_TYPE_PHOTON = 1 , GEANT4_TYPE_ANTIELECTRON = 2 , GEANT4_TYPE_ELECTRON = 3 , GEANT4_TYPE_NEUTRINO = 4 ,
  GEANT4_TYPE_ANTIMUON = 5 , GEANT4_TYPE_MUON = 6 , GEANT4_TYPE_NEUTRAL_PION = 7 , GEANT4_TYPE_PION_PLUS = 8 ,
  GEANT4_TYPE_PION_MINUS = 9 , GEANT4_TYPE_KAON_LONG = 10 , GEANT4_TYPE_KAON_PLUS = 11 , GEANT4_TYPE_KAON_MINUS = 12 ,
  GEANT4_TYPE_NEUTRON = 13 , GEANT4_TYPE_PROTON = 14 , GEANT4_TYPE_ANTIPROTON = 15 , GEANT4_TYPE_KAON_SHORT = 16 ,
  GEANT4_TYPE_ETA = 17 , GEANT4_TYPE_LAMBDA = 18 , GEANT4_TYPE_SIGMA_PLUS = 19 , GEANT4_TYPE_NEUTRAL_SIGMA = 20 ,
  GEANT4_TYPE_SIGMA_MINUS = 21 , GEANT4_TYPE_NEUTRAL_XI = 22 , GEANT4_TYPE_XI_MINUS = 23 , GEANT4_TYPE_OMEGA_MINUS = 24 ,
  GEANT4_TYPE_ANTINEUTRON = 25 , GEANT4_TYPE_ANTILAMBDA = 26 , GEANT4_TYPE_ANTISIGMA_MINUS = 27 , GEANT4_TYPE_NEUTRAL_ANTISIGMA = 28 ,
  GEANT4_TYPE_ANTISIGMA_PLUS = 29 , GEANT4_TYPE_NEUTRAL_ANTIXI = 30 , GEANT4_TYPE_ANTIXI_PLUS = 31 , GEANT4_TYPE_ANTIOMEGA_PLUS = 32 ,
  GEANT4_TYPE_D_PLUS = 35 , GEANT4_TYPE_D_MINUS = 36 , GEANT4_TYPE_D_ZERO = 37 , GEANT4_TYPE_ANTID_ZERO = 38 ,
  GEANT4_TYPE_D_PLUS_S = 39 , GEANT4_TYPE_D_MINUS_S = 40 , GEANT4_TYPE_LAMBDA_PLUS_C = 41 , GEANT4_TYPE_DEUTERON = 45 ,
  GEANT4_TYPE_TRITON = 46 , GEANT4_TYPE_ALPHA = 47 , GEANT4_TYPE_GEANTINO = 48 , GEANT4_TYPE_HE3 = 49 ,
  GEANT4_TYPE_ANTITAU = 33 , GEANT4_TYPE_TAU = 34 , GEANT4_TYPE_XI_PLUS_C = 0 , GEANT4_TYPE_XI_MINUS_C = 0 ,
  GEANT4_TYPE_XI_ZERO_C = 0 , GEANT4_TYPE_ANTIXI_ZERO_C = 0 , GEANT4_TYPE_OMEGA_PLUS_B = 0 , GEANT4_TYPE_ANTIOMEGA_ZERO_C = 0 ,
  GEANT4_TYPE_OMEGA_MINUS_B = 0 , GEANT4_TYPE_OMEGA_ZERO_C = 0 , GEANT4_TYPE_B_PLUS = 0 , GEANT4_TYPE_B_MINUS = 0 ,
  GEANT4_TYPE_XI_MINUS_B = 0 , GEANT4_TYPE_XI_PLUS_B = 0 , GEANT4_TYPE_B_ZERO = 0 , GEANT4_TYPE_ANTIB_ZERO = 0 ,
  GEANT4_TYPE_B_ZERO_S = 0 , GEANT4_TYPE_ANTIB_ZERO_S = 0 , GEANT4_TYPE_XI_ZERO_B = 0 , GEANT4_TYPE_ANTIXI_ZERO_B = 0 ,
  GEANT4_TYPE_LAMBDA_B = 0 , GEANT4_TYPE_ANTILAMBDA_B = 0 , GEANT4_TYPE_B_PLUS_C = 0 , GEANT4_TYPE_B_MINUS_C = 0
}
 Enumeration of hit types based on Geant4 codes, for compatbility with KM3Sim. More...
 
enum  JTrackType_t {
  TRACK_TYPE_ELECTRON = 11 , TRACK_TYPE_NUE = 12 , TRACK_TYPE_MUON = 13 , TRACK_TYPE_NUMU = 14 ,
  TRACK_TYPE_TAU = 15 , TRACK_TYPE_NUTAU = 16 , TRACK_TYPE_PHOTON = 22 , TRACK_TYPE_NEUTRAL_PION = 111 ,
  TRACK_TYPE_CHARGED_PION_PLUS = 211 , TRACK_TYPE_PION_PLUS = 211 , TRACK_TYPE_K_LONG = 130 , TRACK_TYPE_K_SHORT = 310 ,
  TRACK_TYPE_K_PLUS = 321 , TRACK_TYPE_D_PLUS = 411 , TRACK_TYPE_D_ZERO = 421 , TRACK_TYPE_D_PLUS_S = 431 ,
  TRACK_TYPE_B_ZERO = 511 , TRACK_TYPE_B_PLUS = 521 , TRACK_TYPE_B_ZERO_S = 531 , TRACK_TYPE_B_PLUS_C = 541 ,
  TRACK_TYPE_PROTON = 2212 , TRACK_TYPE_NEUTRON = 2112 , TRACK_TYPE_LAMBDA = 3122 , TRACK_TYPE_SIGMA_PLUS = 3222 ,
  TRACK_TYPE_NEUTRAL_SIGMA = 3212 , TRACK_TYPE_SIGMA_MINUS = 3112 , TRACK_TYPE_NEUTRAL_XI = 3322 , TRACK_TYPE_XI_MINUS = 3312 ,
  TRACK_TYPE_OMEGA_MINUS = 3334 , TRACK_TYPE_LAMBDA_PLUS_C = 4122 , TRACK_TYPE_XI_ZERO_C = 4132 , TRACK_TYPE_XI_PLUS_C = 4232 ,
  TRACK_TYPE_OMEGA_ZERO_C = 4332 , TRACK_TYPE_LAMBDA_B = 5122 , TRACK_TYPE_XI_MINUS_B = 5132 , TRACK_TYPE_XI_ZERO_B = 5232 ,
  TRACK_TYPE_OMEGA_MINUS_B = 5332 , TRACK_TYPE_ANTIELECTRON = -11 , TRACK_TYPE_ANTINUE = -12 , TRACK_TYPE_ANTIMUON = -13 ,
  TRACK_TYPE_ANTINUMU = -14 , TRACK_TYPE_ANTITAU = -15 , TRACK_TYPE_ANTINUTAU = -16 , TRACK_TYPE_NEUTRAL_ANTIPION = -111 ,
  TRACK_TYPE_CHARGED_PION_MINUS = -211 , TRACK_TYPE_PION_MINUS = -211 , TRACK_TYPE_ANTIK_LONG = -130 , TRACK_TYPE_ANTIK_SHORT = -310 ,
  TRACK_TYPE_K_MINUS = -321 , TRACK_TYPE_D_MINUS = -411 , TRACK_TYPE_D_MINUS_S = -431 , TRACK_TYPE_ANTID_ZERO = -421 ,
  TRACK_TYPE_ANTIB_ZERO = -511 , TRACK_TYPE_B_MINUS = -521 , TRACK_TYPE_ANTIB_ZERO_S = -531 , TRACK_TYPE_B_MINUS_C = -541 ,
  TRACK_TYPE_ANTIPROTON = -2212 , TRACK_TYPE_ANTINEUTRON = -2112 , TRACK_TYPE_ANTILAMBDA = -3122 , TRACK_TYPE_ANTISIGMA_PLUS = -3222 ,
  TRACK_TYPE_NEUTRAL_ANTISIGMA = -3212 , TRACK_TYPE_ANTISIGMA_MINUS = -3112 , TRACK_TYPE_NEUTRAL_ANTIXI = -3322 , TRACK_TYPE_ANTIXI_MINUS = -3312 ,
  TRACK_TYPE_ANTIOMEGA_MINUS = -3334 , TRACK_TYPE_ANTIXI_ZERO_C = -4132 , TRACK_TYPE_XI_MINUS_C = -4232 , TRACK_TYPE_ANTIOMEGA_ZERO_C = -4332 ,
  TRACK_TYPE_ANTILAMBDA_B = -5122 , TRACK_TYPE_XI_PLUS_B = -5132 , TRACK_TYPE_ANTIXI_ZERO_B = -5232 , TRACK_TYPE_OMEGA_PLUS_B = -5332
}
 Enumeration of track types based on PDG codes. More...
 

Functions

double getTime (const Hit &hit)
 Get true time of hit.
 
double getNPE (const Hit &hit)
 Get true charge of hit.
 
bool is_noise (const Hit &hit)
 Verify hit origin.
 
JTimeRange getTimeRange (const Evt &event)
 Get time range (i.e. time between earliest and latest hit) of Monte Carlo event.
 
JTimeRange getTimeRange (const Evt &event, const JTimeRange &T_ns)
 Get time range (i.e. time between earliest and latest hit) of Monte Carlo event.
 
JPosition3D getPosition (const Vec &pos)
 Get position.
 
Vec getPosition (const JPosition3D &pos)
 Get position.
 
JPosition3D getPosition (const Trk &track)
 Get position.
 
JDirection3D getDirection (const Vec &dir)
 Get direction.
 
Vec getDirection (const JDirection3D &dir)
 Get direction.
 
JDirection3D getDirection (const Trk &track)
 Get direction.
 
JAxis3D getAxis (const Trk &track)
 Get axis.
 
JTrack3E getTrack (const Trk &track)
 Get track.
 
JTransformation3D getTransformation (const Trk &track)
 Get transformation.
 
double getW (const Trk &track, const size_t index, const double value)
 Get track information.
 
bool is_photon (const Trk &track)
 Test whether given track is a photon or neutral pion.
 
bool is_muonbundle (const Trk &track)
 Test whether given track is a (anti-)muon.
 
bool is_neutrino (const Trk &track)
 Test whether given track is a neutrino.
 
bool is_electron (const Trk &track)
 Test whether given track is a (anti-)electron.
 
bool is_muon (const Trk &track)
 Test whether given track is a (anti-)muon.
 
bool is_tau (const Trk &track)
 Test whether given track is a (anti-)tau.
 
bool is_pion (const Trk &track)
 Test whether given track is a charged pion.
 
bool is_proton (const Trk &track)
 Test whether given track is a (anti-)proton.
 
bool is_neutron (const Trk &track)
 Test whether given track is a (anti-)neutron.
 
bool is_lepton (const Trk &track)
 Test whether given track is a lepton.
 
bool is_charged_lepton (const Trk &track)
 Test whether given track is a charged lepton.
 
bool is_hadron (const Trk &track)
 Test whether given track is a hadron.
 
bool is_meson (const Trk &track)
 Test whether given track is a meson (is hadron and third digit of PDG code is zero)
 
bool is_baryon (const Trk &track)
 Test whether given track is a baryon (is hadron and third digit of PDG code is not zero)
 
bool is_nucleus (const Trk &track)
 Test whether given track is a nucleus (PDG code corresponds to a baryon or has 10 digits, starting with '10')
 
bool has_particleID (const Trk &track, const int type)
 Test whether given track corresponds to given particle type.
 
bool is_initialstate (const Trk &track)
 Test whether given track corresponds to an initial state particle.
 
bool is_finalstate (const Trk &track)
 Test whether given track corresponds to a final state particle.
 
bool has_neutrino (const Evt &evt)
 Test whether given event has an incoming neutrino.
 
const Trkget_neutrino (const Evt &evt)
 Get incoming neutrino.
 
bool has_target_nucleus (const Evt &evt)
 Test whether given event has well-defined target nucleus.
 
const Trkget_target_nucleus (const Evt &evt)
 Get target nucleus.
 
bool has_primary (const Evt &evt)
 Auxiliary function to check if an event contains a primary track.
 
const Trkget_primary (const Evt &evt)
 Auxiliary function to retrieve the primary track of an event.
 
const Trkget_leading_lepton (const Evt &event)
 Auxiliary function to retrieve the leading lepton of a neutrino interaction.
 
JVertex3D getVertex (const Trk &track)
 Get vertex.
 
JVertex3D getVertex (const Evt &event)
 Get event vertex.
 
int count_electrons (const Evt &evt)
 Count the number of electrons in a given event.
 
bool has_electron (const Evt &evt)
 Test whether given event has an electron.
 
const Trkget_electron (const Evt &evt)
 Get first electron from the event tracklist.
 
bool from_electron (const Hit &hit)
 Test whether given hit was produced by an electron.
 
int count_muons (const Evt &evt)
 Count the number of muons in a given event.
 
bool has_muon (const Evt &evt)
 Test whether given event has a muon.
 
const Trkget_muon (const Evt &evt)
 Get first muon from the event tracklist.
 
bool from_muon (const Hit &hit)
 Test whether given hit was produced by a muon.
 
int count_taus (const Evt &evt)
 Count the number of taus in a given event.
 
bool has_tau (const Evt &evt)
 Test whether given event has a tau.
 
const Trkget_tau (const Evt &evt)
 Get first tau from the event tracklist.
 
bool has_muonic_taudecay (const Evt &event)
 Test whether given event contains a tau-lepton decay into a muon.
 
bool has_leptonic_taudecay (const Evt &event)
 Test whether given event contains a leptonic tau-decay.
 
bool has_hadronic_taudecay (const Evt &event)
 Test whether given event contains a hadronic tau-decay.
 
int count_taudecay_prongs (const Evt &event)
 Count the number of tau-lepton decay prongs in a given event.
 
bool from_tau (const Hit &hit)
 Test whether given hit was produced by a tau.
 
int count_hadrons (const Evt &evt)
 Count the number of hadrons in a given event (not including neutral pions)
 
bool from_hadron (const Hit &hit)
 Test whether given hit was produced by a hadronic shower.
 
void add_time_offset (Evt &evt, const double tOff)
 Add time offset to mc event; according to current definition, the absolute time of the event is defined by the track "t" attribute; this could change in the future if the global attribute mc_t is assigned to this purpose.
 
double getKineticEnergy (const Trk &trk)
 Get track kinetic energy.
 
double getE0 (const Evt &evt)
 Get initial state energy of a neutrino interaction.
 
double getE1 (const Evt &evt)
 Get final state energy of a neutrino interaction.
 
Vec getP0 (const Evt &evt)
 Get momentum vector of the initial state of a neutrino interaction.
 
Vec getP1 (const Evt &evt)
 Get momentum vector of the final state of a neutrino interaction.
 
double getInvariantMass (const Evt &event)
 Get final state invariant mass.
 
JEvtCategorySet getCategories (const JHead &header)
 Auxiliary method to retrieve the unique event categories corresponding to a MC header.
 
template<class JFunction_t , class JEvtWeightFactor_t = JEvtWeightFactor>
JEvtWeightFactorFunction< JFunction_t, JEvtWeightFactor_t > make_weightFactor (const JFunction_t &function)
 Auxiliary method for creating an interface to an event-weight factor.
 
template<class JEvtWeightFactor_t = JEvtWeightFactor>
JEvtWeightFactorFunction< pEvtWeightFactor, JEvtWeightFactor_t > make_weightFactor (pEvtWeightFactor function)
 Auxiliary method for creating an interface to an event-weight factor.
 
template<class JFunction_t >
JEvtWeightFactorFunction< JFunction_t, JFluxmake_fluxFunction (const JFunction_t &flux)
 Auxiliary method for creating an interface to a flux function.
 
JEvtWeightFactorFunction< pFlux, JFluxmake_fluxFunction (pFlux flux)
 Auxiliary method for creating an interface to a flux function.
 
template<class JFunction_t >
JEvtWeightFactorFunction< JFunction_t, JDiffuseFluxmake_diffuseFluxFunction (const JFunction_t &flux)
 Auxiliary method for creating an interface to a diffuse flux function.
 
JEvtWeightFactorFunction< pDiffuseFlux, JDiffuseFluxmake_diffuseFluxFunction (pDiffuseFlux flux)
 Auxiliary method for creating an interface to a diffuse flux function.
 
double getVolume (const JType< JEvtWeightGSeaGen > &type, const Evt &evt)
 Get volume of given event according given weighter.
 
double getVolume (const JType< JEvtWeightKM3BUU > &type, const Evt &evt)
 Get volume of given event according given weighter.
 
double getVolume (const JType< JEvtWeightGenhen > &type, const Evt &evt)
 Get volume of given event according given weighter.
 
double getVolume (const JEvtWeight &weighter, const Evt &evt)
 Get volume of given event according given weighter.
 
JInteractionTypeGENIE_t getInteractionType (const int intType)
 Auxiliary function to convert interaction types.
 
JScatteringTypeGENIE_t getScatteringType (const int scatType)
 Auxiliary function to convert scattering types.
 
void copy (const Head &from, JHead &to)
 Copy header from from to to.
 
void copy (const JHead &from, Head &to)
 Copy header from from to to.
 
std::string getTag (const std::string &tag)
 Get tag without aanet extension "_<counter>" for identical tags.
 
std::string getTag (const std::string &tag, const int counter)
 Get tag with aanet extension "_<counter>" for identical tags.
 
bool operator== (const Head &first, const Head &second)
 Equal operator.
 
bool operator< (const Head &first, const Head &second)
 Less than operator.
 
bool is_genhen (const JHead &header)
 Check for generator.
 
bool is_gseagen (const JHead &header)
 Check for generator.
 
bool is_mupage (const JHead &header)
 Check for generator.
 
bool is_corsika (const JHead &header)
 Check for generator.
 
bool is_km3buu (const JHead &header)
 Check for generator.
 
bool is_km3 (const JHead &header)
 Check for detector simulation.
 
bool is_km3sim (const JHead &header)
 Check for detector simulation.
 
bool is_sirene (const JHead &header)
 Check for detector simulation.
 
bool is_pure_noise (const JHead &header)
 Check for generator.
 
bool is_daq (const JHead &header)
 Check for real data.
 
bool is_MC (const JHead &header)
 Check for Monte-Carlo simulations.
 
Vec getOffset (const JHead &header)
 Get offset.
 
Vec getOrigin (const JHead &header)
 Get origin.
 
JCylinder3D getCylinder (const JHead &header)
 Get cylinder corresponding to the positions of generated tracks (i.e.
 
JLorentzBoost getBoostToCOM (const Evt &event)
 Get Lorentz boost to the Center of Mass (COM) frame for a given neutrino interaction.
 
void boostToCOM (Evt &event)
 Boost event to the Center of Mass (COM) frame.
 
bool is_muon_bundle_primary (const int type)
 Auxiliary function to check if given PDG code corresponds to a valid muon bundle primary type.
 
bool is_neutrino_primary (const int type)
 Auxiliary function to check if given PDG code corresponds to a neutrino.
 
JInteractionTypeGENIE_t getInteractionType (const JHead &header)
 Auxiliary function to retrieve the GENIE interaction type corresponding to a given header.
 
std::pair< JParameter< int >, JParameter< int > > getTargetInfo (const JHead &header)
 Auxiliary function to retrieve the target atomic number and mass number.
 
bool select (const Trk &trk, const Evt &evt)
 Event selection.
 
bool hasW (const Trk &trk, const int i)
 Check availability of value.
 
double getW (const Trk &trk, const int i)
 Get associated value.
 
double getW (const Trk &trk, const int i, const double value)
 Get associated value.
 
void setW (Trk &trk, const int i, const double value)
 Set associated value.
 

Variables

static const int AASHOWER_RECONSTRUCTION_TYPE = 101
 AAnet shower fit reconstruction type.
 
static const JEvtEvaluator getEvtValue
 Function object for evaluation of DAQ objects.
 
JEvtWeighter getEventWeighter
 Function object for mapping header to event weighter.
 
static const char AANET_TAG_SEPARATOR = '_'
 Separator for tag extension of multiple tags in Head ("_<counter>").
 
static JHeadHelper get_is_head
 Function object to get check method for given application.
 
static const char *const HONDA_ENERGY_KEYWORD = "Enu(GeV)"
 
static const char *const HONDA_COSINE_ZENITH_ANGLE_KEYWORD = "cosZ"
 
static const char *const HONDA_AZIMUTH_ANGLE_KEYWORD = "phi_Az"
 
static const char *const HONDA_MUON_NEUTRINO_FLUX_KEYWORD = "NuMu"
 
static const char *const HONDA_MUON_ANTINEUTRINO_FLUX_KEYWORD = "NuMubar"
 
static const char *const HONDA_ELECTRON_NEUTRINO_FLUX_KEYWORD = "NuE"
 
static const char *const HONDA_ELECTRON_ANTINEUTRINO_FLUX_KEYWORD = "NuEbar"
 
static const char *const HONDA_BINSPECS_SEPARATOR = "--"
 
static const char HONDA_BINSPECS_BEGIN = '['
 
static const char HONDA_BINSPECS_END = ']'
 
static const JRange< double > DEFAULT_BUNDLE_ENERGY_RANGE = JRange<double>(0, 1e11)
 Default bundle energy range [GeV].
 
static const JRange< double > DEFAULT_BUNDLE_COSINE_ZENITH_ANGLE_RANGE = JRange<double>(-1.0, 1.0)
 Default bundle cosine zenith angle range [-].
 
static const JRange< int > DEFAULT_BUNDLE_MULTIPLICITY_RANGE = JRange<int> (0, 1000)
 Default bundle multiplicity range [-].
 
static const double DEFAULT_BUNDLE_RADIAL_EXTENT = 1e5
 Default bundle radial extent [m].
 
static const char *const NEUTRAL_CURRENT = "NC"
 Neutral current header string identifier.
 
static const char *const CHARGED_CURRENT = "CC"
 Charged current header string identifier.
 
static const JRange< double > DEFAULT_NEUTRINO_ENERGY_RANGE = JRange<double>(0, 1e11)
 Default neutrino energy range [GeV].
 
static const JRange< double > DEFAULT_NEUTRINO_COSINE_ZENITH_ANGLE_RANGE = JRange<double>(-1.0, 1.0)
 Default neutrino cosine zenith angle range [-].
 

Detailed Description

Extensions to Evt data format.

Author
bjung
bjjung
mlincetto
mdejong, bjjung
mdejong
bjung, mdejong

Typedef Documentation

◆ JEvtWeightFactorMap

◆ JFluxMap

Type alias for flux maps.

Definition at line 973 of file JEvtCategoryMap.hh.

◆ JFluxAtmospheric

Type alias for atmospheric flux function interface.

Definition at line 189 of file JEvtWeightFactorFunction.hh.

◆ pEvtWeightFactor

typedef double(* JAANET::pEvtWeightFactor) (const Evt &)

Type definition of event-weight factor pointer.

Definition at line 193 of file JEvtWeightFactorFunction.hh.

◆ pFlux

Type definition of flux function pointer.

Definition at line 197 of file JEvtWeightFactorFunction.hh.

◆ pDiffuseFlux

typedef double(* JAANET::pDiffuseFlux) (int, double, double)

Type definition of pointer to diffuse flux function.

Definition at line 238 of file JEvtWeightFactorFunction.hh.

◆ is_head

typedef bool(* JAANET::is_head) (const JHead &)

Type definition of test function of header.

Definition at line 28 of file JHeadToolkit.hh.

◆ JHondaFluxInterpolator2D

template<template< class, class, class > class JCoszFunctionalMap_t = JPolint1FunctionalMap, template< class, class, class > class JEnergyFunctionalMap_t = JPolint1FunctionalMap>
using JAANET::JHondaFluxInterpolator2D
Initial value:
JHondaFluxInterpolator<JConstantFunction1D<double, JArray<4, double> >,
JCoszFunctionalMap_t,
JEnergyFunctionalMap_t>

Alias template definition for 2-dimensional Honda flux interpolator.

Definition at line 947 of file JHondaFluxInterpolator.hh.

Enumeration Type Documentation

◆ JHitType_t

Enumeration of hit types based on km3 codes.

Enumerator
HIT_TYPE_MUON_DIRECT 

Direct light from muon.

HIT_TYPE_MUON_SCATTERED 

Scattered light from muon.

HIT_TYPE_DELTARAYS_DIRECT 

Direct light from delta-rays.

HIT_TYPE_DELTARAYS_SCATTERED 

Scattered light from delta-rays.

HIT_TYPE_BREMSSTRAHLUNG_DIRECT 

Direct light from Bremsstrahlung.

HIT_TYPE_BREMSSTRAHLUNG_SCATTERED 

Scattered light from Bremsstrahlung.

HIT_TYPE_SHOWER_DIRECT 

Direct light from primary shower.

HIT_TYPE_SHOWER_SCATTERED 

Scattered light from primary shower.

HIT_TYPE_NOISE 

Random noise.

HIT_TYPE_UNKNOWN 

Unknown source.

Definition at line 76 of file JAAnetToolkit.hh.

76 {
77 HIT_TYPE_MUON_DIRECT = +5, //!< Direct light from muon
78 HIT_TYPE_MUON_SCATTERED = -5, //!< Scattered light from muon
79 HIT_TYPE_DELTARAYS_DIRECT = +4, //!< Direct light from delta-rays
80 HIT_TYPE_DELTARAYS_SCATTERED = -4, //!< Scattered light from delta-rays
81 HIT_TYPE_BREMSSTRAHLUNG_DIRECT = +3, //!< Direct light from Bremsstrahlung
82 HIT_TYPE_BREMSSTRAHLUNG_SCATTERED = -3, //!< Scattered light from Bremsstrahlung
83 HIT_TYPE_SHOWER_DIRECT = +99, //!< Direct light from primary shower
84 HIT_TYPE_SHOWER_SCATTERED = -99, //!< Scattered light from primary shower
85 HIT_TYPE_NOISE = -1, //!< Random noise
86 HIT_TYPE_UNKNOWN = 0 //!< Unknown source
87 };
@ HIT_TYPE_UNKNOWN
Unknown source.
@ HIT_TYPE_NOISE
Random noise.
@ HIT_TYPE_DELTARAYS_DIRECT
Direct light from delta-rays.
@ HIT_TYPE_MUON_DIRECT
Direct light from muon.
@ HIT_TYPE_DELTARAYS_SCATTERED
Scattered light from delta-rays.
@ HIT_TYPE_MUON_SCATTERED
Scattered light from muon.
@ HIT_TYPE_SHOWER_DIRECT
Direct light from primary shower.
@ HIT_TYPE_BREMSSTRAHLUNG_SCATTERED
Scattered light from Bremsstrahlung.
@ HIT_TYPE_SHOWER_SCATTERED
Scattered light from primary shower.
@ HIT_TYPE_BREMSSTRAHLUNG_DIRECT
Direct light from Bremsstrahlung.

◆ JInteractionTypeGENIE_t

Enumeration of GENIE interaction types.

Enumerator
INTERACTION_TYPES_START 

Start of interaction types.

UNDEFINED 

Unknown interaction type.

ELECTROMAGNETIC 

Electromagnetic interaction.

WEAK_CHARGED_CURRENT 

Weak charged current interaction.

WEAK_NEUTRAL_CURRENT 

Weak neutral current interaction.

WEAK_MIX 

CC + NC + interference.

DARK_MATTER 

Dark matter interaction.

NUCLEON_DECAY 

Nucleon decay.

NEUTRON_OSCILLATION 

Neutron oscillation.

NEUTRAL_HEAVY_LEPTON 

Heavy neutral lepton.

DARK_NEUTRAL_CURRENT 

Dark neutral current.

INTERACTION_TYPES_END 

End of interaction types.

Definition at line 20 of file JGENIETypes.hh.

20 {
21 INTERACTION_TYPES_START = -1, //!< Start of interaction types
22 UNDEFINED, //!< Unknown interaction type
23 ELECTROMAGNETIC, //!< Electromagnetic interaction
24 WEAK_CHARGED_CURRENT, //!< Weak charged current interaction
25 WEAK_NEUTRAL_CURRENT, //!< Weak neutral current interaction
26 WEAK_MIX, //!< CC + NC + interference
27 DARK_MATTER, //!< Dark matter interaction
28 NUCLEON_DECAY, //!< Nucleon decay
29 NEUTRON_OSCILLATION, //!< Neutron oscillation
30 NEUTRAL_HEAVY_LEPTON, //!< Heavy neutral lepton
31 DARK_NEUTRAL_CURRENT, //!< Dark neutral current
32 INTERACTION_TYPES_END //!< End of interaction types
33 };
@ ELECTROMAGNETIC
Electromagnetic interaction.
@ DARK_NEUTRAL_CURRENT
Dark neutral current.
@ DARK_MATTER
Dark matter interaction.
@ INTERACTION_TYPES_END
End of interaction types.
@ NEUTRAL_HEAVY_LEPTON
Heavy neutral lepton.
@ NEUTRON_OSCILLATION
Neutron oscillation.
@ WEAK_MIX
CC + NC + interference.
@ WEAK_NEUTRAL_CURRENT
Weak neutral current interaction.
@ WEAK_CHARGED_CURRENT
Weak charged current interaction.
@ INTERACTION_TYPES_START
Start of interaction types.

◆ JScatteringTypeGENIE_t

enum class JAANET::JScatteringTypeGENIE_t
strong

Enumeration of GENIE scattering types.

Enumerator
UNKNOWN 

Unknown scattering type.

NEUTRINO_SCATTERING_TYPES_START 

Start of standard scattering types.

UNDEFINED 

Undefined scattering type.

QUASI_ELASTIC 

Quasi-elastic scattering.

SINGLE_KAON 

Single kaon scattering.

DEEP_INELASTIC 

Deep Inelastic Scattering.

RESONANT 

Resonant scattering.

COHERENT_PRODUCTION 

Coherent production.

DIFFRACTIVE 

Diffractive scattering.

ELECTRON_NEUTRINO_ELASTIC 

Electron-neutrino elastic scattering.

INVERSE_MUON_DECAY 

Inverse muon decay.

ANOMALY_MEDIATED_NEUTRINO_GAMMA 

Anomaly mediated neutrino-gamma scattering.

MESON_EXCHANGE_CURRENT 

Meson exchange current.

COHERENT_ELASTIC 

Coherent elastic scattering.

INVERSE_BETA_DECAY 

Inverse beta-decay.

GLASHOW_RESONANCE 

Glashow-resonance.

INVERSE_MUON_DECAY_ANNIHILATION 

Inverse muon decay annihilation.

NEUTRINO_SCATTERING_TYPES_END 

End of standard scattering types.

DARK_MATTER_SCATTERING_TYPES_START 

Start of dark matter scattering types.

DARK_MATTER_ELASTIC 

Dark matter elastic scattering.

DARK_MATTER_DEEP_INELASTIC 

Dark matter deep inelastic scattering.

DARK_MATTER_ELECTRON 

Dark matter electron scattering.

DARK_MATTER_SCATTERING_TYPES_END 

End of dark matter scattering types.

Definition at line 39 of file JGENIETypes.hh.

39 {
40 UNKNOWN = -100, //!< Unknown scattering type
41 NEUTRINO_SCATTERING_TYPES_START = -1, //!< Start of standard scattering types
42 UNDEFINED = 0, //!< Undefined scattering type
43 QUASI_ELASTIC, //!< Quasi-elastic scattering
44 SINGLE_KAON, //!< Single kaon scattering
45 DEEP_INELASTIC, //!< Deep Inelastic Scattering
46 RESONANT, //!< Resonant scattering
47 COHERENT_PRODUCTION, //!< Coherent production
48 DIFFRACTIVE, //!< Diffractive scattering
49 ELECTRON_NEUTRINO_ELASTIC, //!< Electron-neutrino elastic scattering
50 INVERSE_MUON_DECAY, //!< Inverse muon decay
51 ANOMALY_MEDIATED_NEUTRINO_GAMMA, //!< Anomaly mediated neutrino-gamma scattering
52 MESON_EXCHANGE_CURRENT, //!< Meson exchange current
53 COHERENT_ELASTIC, //!< Coherent elastic scattering
54 INVERSE_BETA_DECAY, //!< Inverse beta-decay
55 GLASHOW_RESONANCE, //!< Glashow-resonance
56 INVERSE_MUON_DECAY_ANNIHILATION, //!< Inverse muon decay annihilation
57 NEUTRINO_SCATTERING_TYPES_END, //!< End of standard scattering types
58 DARK_MATTER_SCATTERING_TYPES_START = 100, //!< Start of dark matter scattering types
59 DARK_MATTER_ELASTIC, //!< Dark matter elastic scattering
60 DARK_MATTER_DEEP_INELASTIC, //!< Dark matter deep inelastic scattering
61 DARK_MATTER_ELECTRON, //!< Dark matter electron scattering
62 DARK_MATTER_SCATTERING_TYPES_END //!< End of dark matter scattering types
63 };
@ DARK_MATTER_SCATTERING_TYPES_END
End of dark matter scattering types.
@ SINGLE_KAON
Single kaon scattering.
@ DARK_MATTER_ELASTIC
Dark matter elastic scattering.
@ INVERSE_BETA_DECAY
Inverse beta-decay.
@ ELECTRON_NEUTRINO_ELASTIC
Electron-neutrino elastic scattering.
@ DIFFRACTIVE
Diffractive scattering.
@ QUASI_ELASTIC
Quasi-elastic scattering.
@ GLASHOW_RESONANCE
Glashow-resonance.
@ NEUTRINO_SCATTERING_TYPES_END
End of standard scattering types.
@ INVERSE_MUON_DECAY_ANNIHILATION
Inverse muon decay annihilation.
@ RESONANT
Resonant scattering.
@ UNKNOWN
Unknown scattering type.
@ DARK_MATTER_DEEP_INELASTIC
Dark matter deep inelastic scattering.
@ MESON_EXCHANGE_CURRENT
Meson exchange current.
@ DARK_MATTER_ELECTRON
Dark matter electron scattering.
@ DEEP_INELASTIC
Deep Inelastic Scattering.
@ ANOMALY_MEDIATED_NEUTRINO_GAMMA
Anomaly mediated neutrino-gamma scattering.
@ COHERENT_PRODUCTION
Coherent production.
@ INVERSE_MUON_DECAY
Inverse muon decay.
@ DARK_MATTER_SCATTERING_TYPES_START
Start of dark matter scattering types.
@ NEUTRINO_SCATTERING_TYPES_START
Start of standard scattering types.
@ COHERENT_ELASTIC
Coherent elastic scattering.

◆ JGeant4Type_t

Enumeration of hit types based on Geant4 codes, for compatbility with KM3Sim.

Enumerator
GEANT4_TYPE_PHOTON 
GEANT4_TYPE_ANTIELECTRON 
GEANT4_TYPE_ELECTRON 
GEANT4_TYPE_NEUTRINO 
GEANT4_TYPE_ANTIMUON 
GEANT4_TYPE_MUON 
GEANT4_TYPE_NEUTRAL_PION 
GEANT4_TYPE_PION_PLUS 
GEANT4_TYPE_PION_MINUS 
GEANT4_TYPE_KAON_LONG 
GEANT4_TYPE_KAON_PLUS 
GEANT4_TYPE_KAON_MINUS 
GEANT4_TYPE_NEUTRON 
GEANT4_TYPE_PROTON 
GEANT4_TYPE_ANTIPROTON 
GEANT4_TYPE_KAON_SHORT 
GEANT4_TYPE_ETA 
GEANT4_TYPE_LAMBDA 
GEANT4_TYPE_SIGMA_PLUS 
GEANT4_TYPE_NEUTRAL_SIGMA 
GEANT4_TYPE_SIGMA_MINUS 
GEANT4_TYPE_NEUTRAL_XI 
GEANT4_TYPE_XI_MINUS 
GEANT4_TYPE_OMEGA_MINUS 
GEANT4_TYPE_ANTINEUTRON 
GEANT4_TYPE_ANTILAMBDA 
GEANT4_TYPE_ANTISIGMA_MINUS 
GEANT4_TYPE_NEUTRAL_ANTISIGMA 
GEANT4_TYPE_ANTISIGMA_PLUS 
GEANT4_TYPE_NEUTRAL_ANTIXI 
GEANT4_TYPE_ANTIXI_PLUS 
GEANT4_TYPE_ANTIOMEGA_PLUS 
GEANT4_TYPE_D_PLUS 
GEANT4_TYPE_D_MINUS 
GEANT4_TYPE_D_ZERO 
GEANT4_TYPE_ANTID_ZERO 
GEANT4_TYPE_D_PLUS_S 
GEANT4_TYPE_D_MINUS_S 
GEANT4_TYPE_LAMBDA_PLUS_C 
GEANT4_TYPE_DEUTERON 
GEANT4_TYPE_TRITON 
GEANT4_TYPE_ALPHA 
GEANT4_TYPE_GEANTINO 
GEANT4_TYPE_HE3 
GEANT4_TYPE_ANTITAU 
GEANT4_TYPE_TAU 
GEANT4_TYPE_XI_PLUS_C 
GEANT4_TYPE_XI_MINUS_C 
GEANT4_TYPE_XI_ZERO_C 
GEANT4_TYPE_ANTIXI_ZERO_C 
GEANT4_TYPE_OMEGA_PLUS_B 
GEANT4_TYPE_ANTIOMEGA_ZERO_C 
GEANT4_TYPE_OMEGA_MINUS_B 
GEANT4_TYPE_OMEGA_ZERO_C 
GEANT4_TYPE_B_PLUS 
GEANT4_TYPE_B_MINUS 
GEANT4_TYPE_XI_MINUS_B 
GEANT4_TYPE_XI_PLUS_B 
GEANT4_TYPE_B_ZERO 
GEANT4_TYPE_ANTIB_ZERO 
GEANT4_TYPE_B_ZERO_S 
GEANT4_TYPE_ANTIB_ZERO_S 
GEANT4_TYPE_XI_ZERO_B 
GEANT4_TYPE_ANTIXI_ZERO_B 
GEANT4_TYPE_LAMBDA_B 
GEANT4_TYPE_ANTILAMBDA_B 
GEANT4_TYPE_B_PLUS_C 
GEANT4_TYPE_B_MINUS_C 

Definition at line 18 of file JParticleTypes.hh.

34 GEANT4_TYPE_ETA = 17,
61 GEANT4_TYPE_HE3 = 49,
62 //
63 // %KM3NeT specific codes
64 //
66 GEANT4_TYPE_TAU = 34,
67 //
68 // %Particles with PDG code but not GEANT
69 //
@ GEANT4_TYPE_ANTILAMBDA
@ GEANT4_TYPE_B_MINUS_C
@ GEANT4_TYPE_ANTIXI_PLUS
@ GEANT4_TYPE_OMEGA_PLUS_B
@ GEANT4_TYPE_ANTIB_ZERO_S
@ GEANT4_TYPE_OMEGA_MINUS
@ GEANT4_TYPE_NEUTRAL_PION
@ GEANT4_TYPE_ANTIMUON
@ GEANT4_TYPE_XI_PLUS_B
@ GEANT4_TYPE_KAON_SHORT
@ GEANT4_TYPE_XI_MINUS_B
@ GEANT4_TYPE_PION_PLUS
@ GEANT4_TYPE_D_MINUS_S
@ GEANT4_TYPE_ALPHA
@ GEANT4_TYPE_PHOTON
@ GEANT4_TYPE_NEUTRAL_ANTISIGMA
@ GEANT4_TYPE_XI_ZERO_B
@ GEANT4_TYPE_D_ZERO
@ GEANT4_TYPE_B_PLUS
@ GEANT4_TYPE_D_PLUS_S
@ GEANT4_TYPE_NEUTRAL_XI
@ GEANT4_TYPE_D_PLUS
@ GEANT4_TYPE_B_MINUS
@ GEANT4_TYPE_PROTON
@ GEANT4_TYPE_B_ZERO
@ GEANT4_TYPE_ANTISIGMA_PLUS
@ GEANT4_TYPE_LAMBDA_B
@ GEANT4_TYPE_KAON_MINUS
@ GEANT4_TYPE_ANTIXI_ZERO_B
@ GEANT4_TYPE_ANTIXI_ZERO_C
@ GEANT4_TYPE_OMEGA_ZERO_C
@ GEANT4_TYPE_B_PLUS_C
@ GEANT4_TYPE_ANTIB_ZERO
@ GEANT4_TYPE_D_MINUS
@ GEANT4_TYPE_XI_MINUS_C
@ GEANT4_TYPE_GEANTINO
@ GEANT4_TYPE_KAON_LONG
@ GEANT4_TYPE_NEUTRINO
@ GEANT4_TYPE_NEUTRON
@ GEANT4_TYPE_ANTITAU
@ GEANT4_TYPE_ANTID_ZERO
@ GEANT4_TYPE_ANTILAMBDA_B
@ GEANT4_TYPE_ANTINEUTRON
@ GEANT4_TYPE_ANTISIGMA_MINUS
@ GEANT4_TYPE_DEUTERON
@ GEANT4_TYPE_SIGMA_MINUS
@ GEANT4_TYPE_ANTIELECTRON
@ GEANT4_TYPE_XI_MINUS
@ GEANT4_TYPE_NEUTRAL_ANTIXI
@ GEANT4_TYPE_KAON_PLUS
@ GEANT4_TYPE_PION_MINUS
@ GEANT4_TYPE_ANTIOMEGA_ZERO_C
@ GEANT4_TYPE_ELECTRON
@ GEANT4_TYPE_SIGMA_PLUS
@ GEANT4_TYPE_ANTIPROTON
@ GEANT4_TYPE_XI_ZERO_C
@ GEANT4_TYPE_TRITON
@ GEANT4_TYPE_B_ZERO_S
@ GEANT4_TYPE_OMEGA_MINUS_B
@ GEANT4_TYPE_XI_PLUS_C
@ GEANT4_TYPE_LAMBDA
@ GEANT4_TYPE_NEUTRAL_SIGMA
@ GEANT4_TYPE_LAMBDA_PLUS_C
@ GEANT4_TYPE_ANTIOMEGA_PLUS

◆ JTrackType_t

Enumeration of track types based on PDG codes.

Enumerator
TRACK_TYPE_ELECTRON 
TRACK_TYPE_NUE 
TRACK_TYPE_MUON 
TRACK_TYPE_NUMU 
TRACK_TYPE_TAU 
TRACK_TYPE_NUTAU 
TRACK_TYPE_PHOTON 
TRACK_TYPE_NEUTRAL_PION 
TRACK_TYPE_CHARGED_PION_PLUS 
TRACK_TYPE_PION_PLUS 
TRACK_TYPE_K_LONG 
TRACK_TYPE_K_SHORT 
TRACK_TYPE_K_PLUS 
TRACK_TYPE_D_PLUS 
TRACK_TYPE_D_ZERO 
TRACK_TYPE_D_PLUS_S 
TRACK_TYPE_B_ZERO 
TRACK_TYPE_B_PLUS 
TRACK_TYPE_B_ZERO_S 
TRACK_TYPE_B_PLUS_C 
TRACK_TYPE_PROTON 
TRACK_TYPE_NEUTRON 
TRACK_TYPE_LAMBDA 
TRACK_TYPE_SIGMA_PLUS 
TRACK_TYPE_NEUTRAL_SIGMA 
TRACK_TYPE_SIGMA_MINUS 
TRACK_TYPE_NEUTRAL_XI 
TRACK_TYPE_XI_MINUS 
TRACK_TYPE_OMEGA_MINUS 
TRACK_TYPE_LAMBDA_PLUS_C 
TRACK_TYPE_XI_ZERO_C 
TRACK_TYPE_XI_PLUS_C 
TRACK_TYPE_OMEGA_ZERO_C 
TRACK_TYPE_LAMBDA_B 
TRACK_TYPE_XI_MINUS_B 
TRACK_TYPE_XI_ZERO_B 
TRACK_TYPE_OMEGA_MINUS_B 
TRACK_TYPE_ANTIELECTRON 
TRACK_TYPE_ANTINUE 
TRACK_TYPE_ANTIMUON 
TRACK_TYPE_ANTINUMU 
TRACK_TYPE_ANTITAU 
TRACK_TYPE_ANTINUTAU 
TRACK_TYPE_NEUTRAL_ANTIPION 
TRACK_TYPE_CHARGED_PION_MINUS 
TRACK_TYPE_PION_MINUS 
TRACK_TYPE_ANTIK_LONG 
TRACK_TYPE_ANTIK_SHORT 
TRACK_TYPE_K_MINUS 
TRACK_TYPE_D_MINUS 
TRACK_TYPE_D_MINUS_S 
TRACK_TYPE_ANTID_ZERO 
TRACK_TYPE_ANTIB_ZERO 
TRACK_TYPE_B_MINUS 
TRACK_TYPE_ANTIB_ZERO_S 
TRACK_TYPE_B_MINUS_C 
TRACK_TYPE_ANTIPROTON 
TRACK_TYPE_ANTINEUTRON 
TRACK_TYPE_ANTILAMBDA 
TRACK_TYPE_ANTISIGMA_PLUS 
TRACK_TYPE_NEUTRAL_ANTISIGMA 
TRACK_TYPE_ANTISIGMA_MINUS 
TRACK_TYPE_NEUTRAL_ANTIXI 
TRACK_TYPE_ANTIXI_MINUS 
TRACK_TYPE_ANTIOMEGA_MINUS 
TRACK_TYPE_ANTIXI_ZERO_C 
TRACK_TYPE_XI_MINUS_C 
TRACK_TYPE_ANTIOMEGA_ZERO_C 
TRACK_TYPE_ANTILAMBDA_B 
TRACK_TYPE_XI_PLUS_B 
TRACK_TYPE_ANTIXI_ZERO_B 
TRACK_TYPE_OMEGA_PLUS_B 

Definition at line 96 of file JParticleTypes.hh.

97 TRACK_TYPE_NUE = 12,
98 TRACK_TYPE_MUON = 13,
99 TRACK_TYPE_NUMU = 14,
100 TRACK_TYPE_TAU = 15,
101 TRACK_TYPE_NUTAU = 16,
106 TRACK_TYPE_K_LONG = 130,
107 TRACK_TYPE_K_SHORT = 310,
108 TRACK_TYPE_K_PLUS = 321,
109 TRACK_TYPE_D_PLUS = 411,
110 TRACK_TYPE_D_ZERO = 421,
112 TRACK_TYPE_B_ZERO = 511,
113 TRACK_TYPE_B_PLUS = 521,
116 TRACK_TYPE_PROTON = 2212,
117 TRACK_TYPE_NEUTRON = 2112,
118 TRACK_TYPE_LAMBDA = 3122,
123 TRACK_TYPE_XI_MINUS = 3312,
129 TRACK_TYPE_LAMBDA_B = 5122,
133
135 TRACK_TYPE_ANTINUE = -12,
138 TRACK_TYPE_ANTITAU = -15,
145 TRACK_TYPE_K_MINUS = -321,
146 TRACK_TYPE_D_MINUS = -411,
150 TRACK_TYPE_B_MINUS = -521,
153 TRACK_TYPE_ANTIPROTON = -2212,
155 TRACK_TYPE_ANTILAMBDA = -3122,
163 TRACK_TYPE_XI_MINUS_C = -4232,
166 TRACK_TYPE_XI_PLUS_B = -5132,
168 TRACK_TYPE_OMEGA_PLUS_B = -5332 };
@ TRACK_TYPE_OMEGA_PLUS_B
@ TRACK_TYPE_OMEGA_ZERO_C
@ TRACK_TYPE_XI_MINUS_B
@ TRACK_TYPE_ANTID_ZERO
@ TRACK_TYPE_CHARGED_PION_MINUS
@ TRACK_TYPE_D_PLUS_S
@ TRACK_TYPE_LAMBDA_B
@ TRACK_TYPE_B_ZERO_S
@ TRACK_TYPE_PION_MINUS
@ TRACK_TYPE_ANTIXI_ZERO_B
@ TRACK_TYPE_ANTIK_LONG
@ TRACK_TYPE_B_PLUS_C
@ TRACK_TYPE_ANTINEUTRON
@ TRACK_TYPE_XI_MINUS_C
@ TRACK_TYPE_XI_PLUS_B
@ TRACK_TYPE_ANTIOMEGA_MINUS
@ TRACK_TYPE_SIGMA_PLUS
@ TRACK_TYPE_CHARGED_PION_PLUS
@ TRACK_TYPE_ANTINUMU
@ TRACK_TYPE_XI_ZERO_C
@ TRACK_TYPE_NEUTRAL_ANTISIGMA
@ TRACK_TYPE_ANTIXI_MINUS
@ TRACK_TYPE_ANTILAMBDA_B
@ TRACK_TYPE_ANTIK_SHORT
@ TRACK_TYPE_ANTIOMEGA_ZERO_C
@ TRACK_TYPE_NEUTRAL_ANTIPION
@ TRACK_TYPE_ANTIPROTON
@ TRACK_TYPE_ANTILAMBDA
@ TRACK_TYPE_NEUTRAL_PION
@ TRACK_TYPE_LAMBDA_PLUS_C
@ TRACK_TYPE_D_MINUS_S
@ TRACK_TYPE_ANTINUTAU
@ TRACK_TYPE_PION_PLUS
@ TRACK_TYPE_NEUTRAL_XI
@ TRACK_TYPE_ELECTRON
@ TRACK_TYPE_NEUTRAL_SIGMA
@ TRACK_TYPE_XI_PLUS_C
@ TRACK_TYPE_OMEGA_MINUS_B
@ TRACK_TYPE_ANTIB_ZERO_S
@ TRACK_TYPE_OMEGA_MINUS
@ TRACK_TYPE_ANTIMUON
@ TRACK_TYPE_XI_MINUS
@ TRACK_TYPE_ANTIELECTRON
@ TRACK_TYPE_ANTISIGMA_MINUS
@ TRACK_TYPE_NEUTRAL_ANTIXI
@ TRACK_TYPE_ANTISIGMA_PLUS
@ TRACK_TYPE_SIGMA_MINUS
@ TRACK_TYPE_ANTIB_ZERO
@ TRACK_TYPE_B_MINUS_C
@ TRACK_TYPE_ANTIXI_ZERO_C
@ TRACK_TYPE_XI_ZERO_B

Function Documentation

◆ getTime()

double JAANET::getTime ( const Hit & hit)
inline

Get true time of hit.

Parameters
hithit
Returns
true time of hit

Definition at line 96 of file JAAnetToolkit.hh.

97 {
98 return hit.t;
99 }
double t
hit time (from tdc+calibration or MC truth)
Definition Hit.hh:23

◆ getNPE()

double JAANET::getNPE ( const Hit & hit)
inline

Get true charge of hit.

Parameters
hithit
Returns
true charge of hit

Definition at line 108 of file JAAnetToolkit.hh.

109 {
110 return hit.a;
111 }
double a
hit amplitude (in p.e.)
Definition Hit.hh:24

◆ is_noise()

bool JAANET::is_noise ( const Hit & hit)
inline

Verify hit origin.

Parameters
hithit
Returns
true if noise; else false

Definition at line 120 of file JAAnetToolkit.hh.

121 {
122 return hit.type == HIT_TYPE_NOISE;
123 }
int type
particle type or parametrisation used for hit (mc only)
Definition Hit.hh:28

◆ getTimeRange() [1/2]

JTimeRange JAANET::getTimeRange ( const Evt & event)
inline

Get time range (i.e. time between earliest and latest hit) of Monte Carlo event.


Note that the global event time in not taken into account.

Parameters
eventevent
Returns
time range

Definition at line 133 of file JAAnetToolkit.hh.

134 {
135 JTimeRange time_range(JTimeRange::DEFAULT_RANGE());
136
137 for (std::vector<Hit>::const_iterator hit = event.mc_hits.begin(); hit != event.mc_hits.end(); ++hit) {
138 if (!is_noise(*hit)) {
139 time_range.include(getTime(*hit));
140 }
141 }
142
143 return time_range;
144 }
bool is_noise(const Hit &hit)
Verify hit origin.
std::vector< Hit > mc_hits
MC: list of MC truth hits.
Definition Evt.hh:48

◆ getTimeRange() [2/2]

JTimeRange JAANET::getTimeRange ( const Evt & event,
const JTimeRange & T_ns )
inline

Get time range (i.e. time between earliest and latest hit) of Monte Carlo event.


The resulting time range is larger than or equal to the given time window.
Note that the global event time in not taken into account.

Parameters
eventevent
T_nstime window [ns]
Returns
time range

Definition at line 156 of file JAAnetToolkit.hh.

157 {
158 JTimeRange time_range = getTimeRange(event);
159
160 if (!time_range.is_valid()) {
161 time_range = T_ns;
162 }
163
164 if (time_range.getLength() < T_ns.getLength()) {
165 time_range.setLength(T_ns.getLength());
166 }
167
168 return time_range;
169 }
bool is_valid() const
Check validity of range.
Definition JRange.hh:311
void setLength(argument_type length)
Set length (difference between upper and lower limit).
Definition JRange.hh:300
T getLength() const
Get length (difference between upper and lower limit).
Definition JRange.hh:289

◆ getPosition() [1/3]

JPosition3D JAANET::getPosition ( const Vec & pos)
inline

Get position.

Parameters
posposition
Returns
position

Definition at line 178 of file JAAnetToolkit.hh.

179 {
180 return JPosition3D(pos.x, pos.y, pos.z);
181 }
Data structure for position in three dimensions.
double z
Definition Vec.hh:14
double x
Definition Vec.hh:14
double y
Definition Vec.hh:14

◆ getPosition() [2/3]

Vec JAANET::getPosition ( const JPosition3D & pos)
inline

Get position.

Parameters
posposition
Returns
position

Definition at line 190 of file JAAnetToolkit.hh.

191 {
192 return Vec(pos.getX(), pos.getY(), pos.getZ());
193 }
double getY() const
Get y position.
Definition JVector3D.hh:104
double getZ() const
Get z position.
Definition JVector3D.hh:115
double getX() const
Get x position.
Definition JVector3D.hh:94
The Vec class is a straightforward 3-d vector, which also works in pyroot.
Definition Vec.hh:13

◆ getPosition() [3/3]

JPosition3D JAANET::getPosition ( const Trk & track)
inline

Get position.

Parameters
tracktrack
Returns
position

Definition at line 202 of file JAAnetToolkit.hh.

203 {
204 return getPosition(track.pos);
205 }
JPosition3D getPosition(const Vec &pos)
Get position.
Vec pos
postion [m] of the track at time t
Definition Trk.hh:17

◆ getDirection() [1/3]

JDirection3D JAANET::getDirection ( const Vec & dir)
inline

Get direction.

Parameters
dirdirection
Returns
direction

Definition at line 214 of file JAAnetToolkit.hh.

215 {
216 return JDirection3D(dir.x, dir.y, dir.z);
217 }
Data structure for direction in three dimensions.

◆ getDirection() [2/3]

Vec JAANET::getDirection ( const JDirection3D & dir)
inline

Get direction.

Parameters
dirdirection
Returns
direction

Definition at line 226 of file JAAnetToolkit.hh.

227 {
228 return Vec(dir.getDX(), dir.getDY(), dir.getDZ());
229 }
double getDY() const
Get y direction.
Definition JVersor3D.hh:106
double getDX() const
Get x direction.
Definition JVersor3D.hh:95
double getDZ() const
Get z direction.
Definition JVersor3D.hh:117

◆ getDirection() [3/3]

JDirection3D JAANET::getDirection ( const Trk & track)
inline

Get direction.

Parameters
tracktrack
Returns
direction

Definition at line 238 of file JAAnetToolkit.hh.

239 {
240 return getDirection(track.dir);
241 }
JDirection3D getDirection(const Vec &dir)
Get direction.
Vec dir
track direction
Definition Trk.hh:18

◆ getAxis()

JAxis3D JAANET::getAxis ( const Trk & track)
inline

Get axis.

Parameters
tracktrack
Returns
axis

Definition at line 250 of file JAAnetToolkit.hh.

251 {
252 return JAxis3D(getPosition(track), getDirection(track));
253 }
Axis object.
Definition JAxis3D.hh:41

◆ getTrack()

JTrack3E JAANET::getTrack ( const Trk & track)
inline

Get track.

Parameters
tracktrack
Returns
track

Definition at line 262 of file JAAnetToolkit.hh.

263 {
264 return JTrack3E(JTrack3D(getAxis(track), track.t), track.E);
265 }
3D track with energy.
Definition JTrack3E.hh:32
JAxis3D getAxis(const Trk &track)
Get axis.
double E
Energy [GeV] (either MC truth or reconstructed)
Definition Trk.hh:20
double t
track time [ns] (when the particle is at pos )
Definition Trk.hh:19

◆ getTransformation()

JTransformation3D JAANET::getTransformation ( const Trk & track)
inline

Get transformation.

Parameters
tracktrack
Returns
transformation

Definition at line 274 of file JAAnetToolkit.hh.

275 {
276 return JTransformation3D(getPosition(track), getDirection(track));
277 }

◆ getW() [1/3]

double JAANET::getW ( const Trk & track,
const size_t index,
const double value )
inline

Get track information.

Parameters
tracktrack
indexindex
valuedefault value
Returns
actual value

Definition at line 288 of file JAAnetToolkit.hh.

289 {
290 if (index < track.fitinf.size())
291 return track.fitinf[index];
292 else
293 return value;
294 }
std::vector< double > fitinf
place to store additional fit info, see km3net-dataformat/definitions/fitparameters....
Definition Trk.hh:32

◆ is_photon()

bool JAANET::is_photon ( const Trk & track)
inline

Test whether given track is a photon or neutral pion.

Parameters
tracktrack
Returns
true if photon or neutral pion; else false

Definition at line 303 of file JAAnetToolkit.hh.

303 { return ( track.type == TRACK_TYPE_PHOTON ||
304 abs(track.type) == TRACK_TYPE_NEUTRAL_PION); }
int type
MC: particle type in PDG encoding.
Definition Trk.hh:24

◆ is_muonbundle()

bool JAANET::is_muonbundle ( const Trk & track)
inline

Test whether given track is a (anti-)muon.

Parameters
tracktrack
Returns
true if (anti-)muon; else false

Definition at line 312 of file JAAnetToolkit.hh.

312{ return (abs(track.type) == PDG_MUONBUNDLE); }
static const int PDG_MUONBUNDLE
muon bundle reached the can level (mupage)
Definition trkmembers.hh:38

◆ is_neutrino()

bool JAANET::is_neutrino ( const Trk & track)
inline

Test whether given track is a neutrino.

Parameters
tracktrack
Returns
true if neutrino; else false

Definition at line 320 of file JAAnetToolkit.hh.

320 { return (abs(track.type) == TRACK_TYPE_NUE ||
321 abs(track.type) == TRACK_TYPE_NUMU ||
322 abs(track.type) == TRACK_TYPE_NUTAU); }

◆ is_electron()

bool JAANET::is_electron ( const Trk & track)
inline

Test whether given track is a (anti-)electron.

Parameters
tracktrack
Returns
true if (anti-)electron; else false

Definition at line 330 of file JAAnetToolkit.hh.

330{ return (abs(track.type) == TRACK_TYPE_ELECTRON); }

◆ is_muon()

bool JAANET::is_muon ( const Trk & track)
inline

Test whether given track is a (anti-)muon.

Parameters
tracktrack
Returns
true if (anti-)muon; else false

Definition at line 338 of file JAAnetToolkit.hh.

338{ return (abs(track.type) == TRACK_TYPE_MUON); }

◆ is_tau()

bool JAANET::is_tau ( const Trk & track)
inline

Test whether given track is a (anti-)tau.

Parameters
tracktrack
Returns
true if (anti-)tau; else false

Definition at line 346 of file JAAnetToolkit.hh.

346{ return (abs(track.type) == TRACK_TYPE_TAU); }

◆ is_pion()

bool JAANET::is_pion ( const Trk & track)
inline

Test whether given track is a charged pion.

Parameters
tracktrack
Returns
true if charged pion; else false

Definition at line 354 of file JAAnetToolkit.hh.

354{ return (abs(track.type) == TRACK_TYPE_CHARGED_PION_PLUS); }

◆ is_proton()

bool JAANET::is_proton ( const Trk & track)
inline

Test whether given track is a (anti-)proton.

Parameters
tracktrack
Returns
true if (anti-)proton; else false

Definition at line 362 of file JAAnetToolkit.hh.

362{ return (abs(track.type) == TRACK_TYPE_PROTON); }

◆ is_neutron()

bool JAANET::is_neutron ( const Trk & track)
inline

Test whether given track is a (anti-)neutron.

Parameters
tracktrack
Returns
true if (anti-)neutron; else false

Definition at line 370 of file JAAnetToolkit.hh.

370{ return (abs(track.type) == TRACK_TYPE_NEUTRON); }

◆ is_lepton()

bool JAANET::is_lepton ( const Trk & track)
inline

Test whether given track is a lepton.

Parameters
tracktrack
Returns
true if lepton; else fails

Definition at line 378 of file JAAnetToolkit.hh.

378 { return (is_neutrino(track) ||
379 is_electron(track) ||
380 is_muon (track) ||
381 is_tau (track)); }
bool is_electron(const Trk &track)
Test whether given track is a (anti-)electron.
bool is_neutrino(const Trk &track)
Test whether given track is a neutrino.

◆ is_charged_lepton()

bool JAANET::is_charged_lepton ( const Trk & track)
inline

Test whether given track is a charged lepton.

Parameters
tracktrack
Returns
true if lepton; else fails

Definition at line 389 of file JAAnetToolkit.hh.

389 { return (is_electron(track) ||
390 is_muon (track) ||
391 is_tau (track)); }

◆ is_hadron()

bool JAANET::is_hadron ( const Trk & track)
inline

Test whether given track is a hadron.

Parameters
tracktrack
Returns
true if hadron; else fails

Definition at line 399 of file JAAnetToolkit.hh.

399 { return (abs(track.type) != TRACK_TYPE_PHOTON &&
400 !is_lepton(track)); }
bool is_lepton(const Trk &track)
Test whether given track is a lepton.

◆ is_meson()

bool JAANET::is_meson ( const Trk & track)
inline

Test whether given track is a meson (is hadron and third digit of PDG code is zero)

Parameters
tracktrack
Returns
true if hadron; else fails

Definition at line 408 of file JAAnetToolkit.hh.

408 { return (is_hadron(track) &&
409 ((int)(track.type / 1000)) % 10 == 0); }
bool is_hadron(const Trk &track)
Test whether given track is a hadron.

◆ is_baryon()

bool JAANET::is_baryon ( const Trk & track)
inline

Test whether given track is a baryon (is hadron and third digit of PDG code is not zero)

Parameters
tracktrack
Returns
true if hadron; else fails

Definition at line 417 of file JAAnetToolkit.hh.

417 { return (is_hadron(track) &&
418 ((int)(track.type / 1000)) % 10 != 0); }

◆ is_nucleus()

bool JAANET::is_nucleus ( const Trk & track)
inline

Test whether given track is a nucleus (PDG code corresponds to a baryon or has 10 digits, starting with '10')

Parameters
tracktrack
Returns
true if hadron; else fails

Definition at line 426 of file JAAnetToolkit.hh.

427 {
428 using namespace std;
429
430 const string typestr = to_string(abs(track.type));
431
432 return (is_baryon(track) || (typestr.size() == 10 && typestr.substr(0,2) == "10"));
433 }
bool is_baryon(const Trk &track)
Test whether given track is a baryon (is hadron and third digit of PDG code is not zero)

◆ has_particleID()

bool JAANET::has_particleID ( const Trk & track,
const int type )
inline

Test whether given track corresponds to given particle type.

Parameters
tracktrack
typeparticle type
Returns
true if matches the corresponding particle; else false

Definition at line 442 of file JAAnetToolkit.hh.

442{ return (track.type == type); }

◆ is_initialstate()

bool JAANET::is_initialstate ( const Trk & track)
inline

Test whether given track corresponds to an initial state particle.

Parameters
tracktrack
Returns
true if track corresponds to an initial state particle; else false

Definition at line 450 of file JAAnetToolkit.hh.

451 {
452 if (Evt::ROOT_IO_VERSION >= 14) {
453
454 return (track.status == TRK_ST_PRIMARYNEUTRINO ||
455 track.status == TRK_ST_PRIMARYCOSMIC ||
456 track.status == TRK_ST_MUONBUNDLE ||
457 track.status == TRK_ST_ININUCLEI);
458
459 } else if (Evt::ROOT_IO_VERSION >= 11) {
460
461 return (track.mother_id == TRK_MOTHER_UNDEFINED ||
462 track.mother_id == TRK_MOTHER_NONE);
463
464 } else {
465
466 return is_neutrino(track) && track.id == 0;
467 }
468 }
static int ROOT_IO_VERSION
Streamer version as obtained from ROOT file.
Definition Evt.hh:274
int status
MC status code, see km3net-dataformat/definitions/trkmembers.csv for values.
Definition Trk.hh:28
int id
track identifier
Definition Trk.hh:16
int mother_id
MC id of the parent particle.
Definition Trk.hh:29
static const int TRK_MOTHER_UNDEFINED
KM3NeT Data Definitions v3.6.0 https://git.km3net.de/common/km3net-dataformat.
Definition trkmembers.hh:12
static const int TRK_ST_MUONBUNDLE
initial state muon bundle (mupage)
Definition trkmembers.hh:18
static const int TRK_ST_PRIMARYCOSMIC
initial state cosmic ray ('track_primary' tag in evt files from corant).
Definition trkmembers.hh:17
static const int TRK_ST_PRIMARYNEUTRINO
initial state neutrino ('neutrino' tag in evt files from gseagen and genhen).
Definition trkmembers.hh:16
static const int TRK_ST_ININUCLEI
Initial state nuclei (gseagen)
Definition trkmembers.hh:19
static const int TRK_MOTHER_NONE
mother id of a particle if it has no parent
Definition trkmembers.hh:13

◆ is_finalstate()

bool JAANET::is_finalstate ( const Trk & track)
inline

Test whether given track corresponds to a final state particle.

Parameters
tracktrack
Returns
true if track corresponds to a final state particle; else false

Definition at line 476 of file JAAnetToolkit.hh.

477 {
478 if (Evt::ROOT_IO_VERSION >= 15) {
479 return track.status == TRK_ST_FINALSTATE;
480 } else {
481 return !is_initialstate(track);
482 }
483 }
static const int TRK_ST_FINALSTATE
for MC: the particle must be processed by detector simulation ('track_in' tag in evt files)....
Definition trkmembers.hh:15

◆ has_neutrino()

bool JAANET::has_neutrino ( const Evt & evt)
inline

Test whether given event has an incoming neutrino.

Parameters
evtevent
Returns
true if neutrino; else false

Definition at line 491 of file JAAnetToolkit.hh.

492 {
493 using namespace std;
494
495 if (Evt::ROOT_IO_VERSION >= 14) {
496
497 vector<Trk>::const_iterator i = find_if(evt.mc_trks.cbegin(), evt.mc_trks.cend(),
498 make_predicate(&Trk::status, TRK_ST_PRIMARYNEUTRINO));
499 return i != evt.mc_trks.cend();
500
501 } else {
502
503 return !evt.mc_trks.empty() && is_neutrino(evt.mc_trks[0]);
504 }
505 }
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
Definition Evt.hh:49

◆ get_neutrino()

const Trk & JAANET::get_neutrino ( const Evt & evt)
inline

Get incoming neutrino.

Parameters
evtevent
Returns
neutrino

Definition at line 513 of file JAAnetToolkit.hh.

514 {
515 using namespace std;
516
517 if (Evt::ROOT_IO_VERSION >= 14) {
518
519 vector<Trk>::const_iterator i = find_if(evt.mc_trks.cbegin(), evt.mc_trks.cend(),
520 make_predicate(&Trk::status, TRK_ST_PRIMARYNEUTRINO));
521
522 if (i != evt.mc_trks.cend()) { return *i; }
523
524 } else if (!evt.mc_trks.empty() && is_neutrino(evt.mc_trks[0])) {
525
526 return evt.mc_trks[0];
527 }
528
529 THROW(JIndexOutOfRange, "JAANET::get_neutrino(): Event " << evt.id << " has no neutrino.");
530 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
int id
offline event identifier
Definition Evt.hh:22

◆ has_target_nucleus()

bool JAANET::has_target_nucleus ( const Evt & evt)
inline

Test whether given event has well-defined target nucleus.

Parameters
evtevent
Returns
true if target nucleus is defined; else false

Definition at line 538 of file JAAnetToolkit.hh.

539 {
540 using namespace std;
541
542 if (Evt::ROOT_IO_VERSION >= 14) {
543
544 vector<Trk>::const_iterator i = find_if(evt.mc_trks.cbegin(), evt.mc_trks.cend(),
545 make_predicate(&Trk::status, TRK_ST_ININUCLEI));
546
547 return i != evt.mc_trks.cend();
548
549 } else {
550
551 return false;
552 }
553 }

◆ get_target_nucleus()

const Trk & JAANET::get_target_nucleus ( const Evt & evt)
inline

Get target nucleus.

Parameters
evtevent
Returns
target nucleus

Definition at line 561 of file JAAnetToolkit.hh.

562 {
563 using namespace std;
564 using namespace JPP;
565
566 vector<Trk>::const_iterator i = find_if(evt.mc_trks.cbegin(), evt.mc_trks.cend(),
567 make_predicate(&Trk::status, TRK_ST_ININUCLEI));
568
569 if (i != evt.mc_trks.cend()) {
570 return *i;
571 } else {
572 THROW(JIndexOutOfRange, "JAANET::get_target_nucleus(): Cannot retrieve target nucleus for event " << evt.id << ".");
573 }
574 }
Exception for accessing an index in a collection that is outside of its range.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).

◆ has_primary()

bool JAANET::has_primary ( const Evt & evt)
inline

Auxiliary function to check if an event contains a primary track.

Parameters
evtevent
Returns
true if event has primary track; else false

Definition at line 583 of file JAAnetToolkit.hh.

584 {
585 using namespace std;
586 using namespace JPP;
587
588 for (vector<Trk>::const_iterator i = evt.mc_trks.cbegin(); i != evt.mc_trks.cend(); ++i) {
589 if (is_initialstate(*i) && i->status != TRK_ST_ININUCLEI) {
590 return true;
591 }
592 }
593
594 return false;
595 }
bool is_initialstate(const Trk &track)
Test whether given track corresponds to an initial state particle.

◆ get_primary()

const Trk & JAANET::get_primary ( const Evt & evt)
inline

Auxiliary function to retrieve the primary track of an event.

Parameters
evtevent
Returns
primary track

Definition at line 604 of file JAAnetToolkit.hh.

605 {
606 using namespace std;
607 using namespace JPP;
608
609 for (vector<Trk>::const_iterator i = evt.mc_trks.cbegin(); i != evt.mc_trks.cend(); ++i) {
610 if (is_initialstate(*i) && i->status != TRK_ST_ININUCLEI) {
611 return *i;
612 }
613 }
614
615 THROW(JIndexOutOfRange, "JAANET::get_primary(): Cannot retrieve primary track for event " << evt.id << ".");
616 }

◆ get_leading_lepton()

const Trk & JAANET::get_leading_lepton ( const Evt & event)
inline

Auxiliary function to retrieve the leading lepton of a neutrino interaction.

Parameters
eventevent
Returns
leading lepton

Definition at line 625 of file JAAnetToolkit.hh.

626 {
627 using namespace std;
628 using namespace JPP;
629
630 const Trk& primary = get_primary(event);
631
632 if (is_neutrino(primary)) {
633
634 for (vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
635 if (is_lepton(*i) && i->mother_id == primary.id) {
636 return *i;
637 }
638 }
639
640 THROW(JValueOutOfRange, "get_leading_lepton(): Could not find leading lepton for given event");
641
642 } else {
643 THROW(JValueOutOfRange, "get_leading_lepton(): Given event does not correspond to a neutrino interaction.");
644 }
645 }
Exception for accessing a value in a collection that is outside of its range.
const Trk & get_primary(const Evt &evt)
Auxiliary function to retrieve the primary track of an event.
Primary particle.
Definition JHead.hh:1174
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
Definition Trk.hh:15

◆ getVertex() [1/2]

JVertex3D JAANET::getVertex ( const Trk & track)
inline

Get vertex.

Parameters
tracktrack
Returns
vertex

Definition at line 654 of file JAAnetToolkit.hh.

655 {
656 return JVertex3D(getPosition(track), track.t);
657 }

◆ getVertex() [2/2]

JVertex3D JAANET::getVertex ( const Evt & event)
inline

Get event vertex.

Parameters
eventevent
Returns
event vertex

Definition at line 665 of file JAAnetToolkit.hh.

666 {
667 using namespace std;
668 using namespace JPP;
669
670 if (has_neutrino(event)) {
671
672 const Trk& neutrino = get_neutrino(event);
673
674 return getVertex(neutrino);
675
676 } else if (!event.mc_trks.empty()) {
677
678 vector<Trk>::const_iterator i = find_if(event.mc_trks.begin(), event.mc_trks.end(), is_initialstate);
679
680 if (i != event.mc_trks.end()) {
681 return getVertex(*i);
682 } else {
683 THROW(JValueOutOfRange, "getVertex(): No initial state track found.");
684 }
685
686 } else if (!event.trks.empty()) { // For reconstructed DAQ events
687
689
690 return getVertex(track);
691
692 } else {
693
694 THROW(JValueOutOfRange, "getVertex(): Could not find a valid event vertex.");
695 }
696 }
JVertex3D getVertex(const Trk &track)
Get vertex.
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
std::vector< Trk > trks
list of reconstructed tracks (can be several because of prefits,showers, etc).
Definition Evt.hh:39
const Trk & get_best_reconstructed_track(const Evt &evt, JTrackSelector_t selector, JQualitySorter_t comparator)
Get best reconstructed track.

◆ count_electrons()

int JAANET::count_electrons ( const Evt & evt)
inline

Count the number of electrons in a given event.

Parameters
evtevent
Returns
number of electrons

Definition at line 704 of file JAAnetToolkit.hh.

705 {
706 return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_electron);
707 }

◆ has_electron()

bool JAANET::has_electron ( const Evt & evt)
inline

Test whether given event has an electron.

Parameters
evtevent
Returns
true if event has electron; else false

Definition at line 715 of file JAAnetToolkit.hh.

716 {
717 return count_electrons(evt) != 0;
718 }
int count_electrons(const Evt &evt)
Count the number of electrons in a given event.

◆ get_electron()

const Trk & JAANET::get_electron ( const Evt & evt)
inline

Get first electron from the event tracklist.

Parameters
evtevent
Returns
electron

Definition at line 726 of file JAAnetToolkit.hh.

727 {
728 if (count_electrons(evt) > 0)
729 return *std::find_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_electron);
730 else
731 THROW(JIndexOutOfRange, "This event has no electron.");
732 }

◆ from_electron()

bool JAANET::from_electron ( const Hit & hit)
inline

Test whether given hit was produced by an electron.

Warning: This method will only work with the output of KM3Sim. For JSirene or KM3, you should check if track.id == hit.origin instead.

Parameters
hithit
Returns
true if hit was produced by an electron; else false

Definition at line 743 of file JAAnetToolkit.hh.

744 {
746 }

◆ count_muons()

int JAANET::count_muons ( const Evt & evt)
inline

Count the number of muons in a given event.

Parameters
evtevent
Returns
number of muons

Definition at line 754 of file JAAnetToolkit.hh.

755 {
756 return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_muon);
757 }

◆ has_muon()

bool JAANET::has_muon ( const Evt & evt)
inline

Test whether given event has a muon.

Parameters
evtevent
Returns
true if event has muon; else false

Definition at line 765 of file JAAnetToolkit.hh.

766 {
767 return count_muons(evt) != 0;
768 }
int count_muons(const Evt &evt)
Count the number of muons in a given event.

◆ get_muon()

const Trk & JAANET::get_muon ( const Evt & evt)
inline

Get first muon from the event tracklist.

Parameters
evtevent
Returns
muon

Definition at line 776 of file JAAnetToolkit.hh.

777 {
778 if (count_muons(evt) > 0)
779 return *std::find_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_muon);
780 else
781 THROW(JIndexOutOfRange, "This event has no muon.");
782 }

◆ from_muon()

bool JAANET::from_muon ( const Hit & hit)
inline

Test whether given hit was produced by a muon.

Warning: This method will only work with the output of KM3Sim. For JSirene or KM3, you should check if track.id == hit.origin instead.

Parameters
hithit
Returns
true if hit was produced by a muon; else false

Definition at line 793 of file JAAnetToolkit.hh.

794 {
795 return hit.type == GEANT4_TYPE_MUON || hit.type == GEANT4_TYPE_ANTIMUON;
796 }

◆ count_taus()

int JAANET::count_taus ( const Evt & evt)
inline

Count the number of taus in a given event.

Parameters
evtevent
Returns
number of taus

Definition at line 804 of file JAAnetToolkit.hh.

805 {
806 return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_tau);
807 }

◆ has_tau()

bool JAANET::has_tau ( const Evt & evt)
inline

Test whether given event has a tau.

Parameters
evtevent
Returns
true if event has tau; else false

Definition at line 815 of file JAAnetToolkit.hh.

816 {
817 return count_taus(evt) != 0;
818 }
int count_taus(const Evt &evt)
Count the number of taus in a given event.

◆ get_tau()

const Trk & JAANET::get_tau ( const Evt & evt)
inline

Get first tau from the event tracklist.

Parameters
evtevent
Returns
tau

Definition at line 826 of file JAAnetToolkit.hh.

827 {
828 if (count_taus(evt) > 0)
829 return *std::find_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_tau);
830 else
831 THROW(JIndexOutOfRange, "This event has no tau.");
832 }

◆ has_muonic_taudecay()

bool JAANET::has_muonic_taudecay ( const Evt & event)
inline

Test whether given event contains a tau-lepton decay into a muon.

Parameters
eventevent
Returns
true if event contains a muonic tau-lepton decay; else false

Definition at line 841 of file JAAnetToolkit.hh.

842 {
843 using namespace std;
844
845 if (has_tau(event)) {
846
847 const Trk& tau = get_tau(event);
848
849 for (vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
850 if (is_muon(*i) && i->mother_id == tau.id) {
851 return true;
852 }
853 }
854 }
855
856 return false;
857 }
const Trk & get_tau(const Evt &evt)
Get first tau from the event tracklist.
bool has_tau(const Evt &evt)
Test whether given event has a tau.
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.

◆ has_leptonic_taudecay()

bool JAANET::has_leptonic_taudecay ( const Evt & event)
inline

Test whether given event contains a leptonic tau-decay.

Parameters
eventevent
Returns
true if event contains a leptonic tau-decay; else false

Definition at line 865 of file JAAnetToolkit.hh.

866 {
867 using namespace std;
868
869 if (has_tau(event)) {
870
871 const Trk& tau = get_tau(event);
872
873 for (vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
874 if ((is_electron(*i) || is_muon(*i)) && i->mother_id == tau.id) {
875 return true;
876 }
877 }
878 }
879
880 return false;
881 }

◆ has_hadronic_taudecay()

bool JAANET::has_hadronic_taudecay ( const Evt & event)
inline

Test whether given event contains a hadronic tau-decay.

Parameters
eventevent
Returns
true if event contains a hadronic tau-decay; else false

Definition at line 889 of file JAAnetToolkit.hh.

890 {
891 return has_tau(event) && !has_leptonic_taudecay(event);
892 }
bool has_leptonic_taudecay(const Evt &event)
Test whether given event contains a leptonic tau-decay.

◆ count_taudecay_prongs()

int JAANET::count_taudecay_prongs ( const Evt & event)
inline

Count the number of tau-lepton decay prongs in a given event.


The number of prongs is defined as the number of charged tau-lepton decay products.

Parameters
eventevent
Returns
number of tau-lepton decay prongs

Definition at line 901 of file JAAnetToolkit.hh.

902 {
903 using namespace std;
904
905 int n = 0;
906
907 if (has_tau(event)) {
908
909 const Trk& tau = get_tau(event);
910
911 for (vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
912 if (i->mother_id == tau.id && JPDB::getInstance().getPDG(i->type).charge != 0) {
913 ++n;
914 }
915 }
916 }
917
918 return n;
919 }
const int n
Definition JPolint.hh:791

◆ from_tau()

bool JAANET::from_tau ( const Hit & hit)
inline

Test whether given hit was produced by a tau.

Warning: This method will only work with the output of KM3Sim. For JSirene or KM3, you should check if track.id == hit.origin instead.

Parameters
hithit
Returns
true if hit was produced by a tau; else false

Definition at line 930 of file JAAnetToolkit.hh.

931 {
932 return hit.type == GEANT4_TYPE_TAU || hit.type == GEANT4_TYPE_ANTITAU;
933 }

◆ count_hadrons()

int JAANET::count_hadrons ( const Evt & evt)
inline

Count the number of hadrons in a given event (not including neutral pions)

Parameters
evtevent
Returns
number of hadrons

Definition at line 941 of file JAAnetToolkit.hh.

942 {
943 return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_hadron);
944 }

◆ from_hadron()

bool JAANET::from_hadron ( const Hit & hit)
inline

Test whether given hit was produced by a hadronic shower.

Warning: This method will only work with the output of KM3Sim. For JSirene or KM3, you should check if track.id == hit.origin instead.

Parameters
hithit
Returns
true if hit was produced by a hadron; else false

Definition at line 955 of file JAAnetToolkit.hh.

956 {
957 return (!from_electron(hit) && !from_muon(hit) && !from_tau(hit));
958 }
bool from_tau(const Hit &hit)
Test whether given hit was produced by a tau.
bool from_muon(const Hit &hit)
Test whether given hit was produced by a muon.
bool from_electron(const Hit &hit)
Test whether given hit was produced by an electron.

◆ add_time_offset()

void JAANET::add_time_offset ( Evt & evt,
const double tOff )
inline

Add time offset to mc event; according to current definition, the absolute time of the event is defined by the track "t" attribute; this could change in the future if the global attribute mc_t is assigned to this purpose.

Parameters
evtevent
tOfftime offset [ns]

Definition at line 969 of file JAAnetToolkit.hh.

970 {
971 for (std::vector<Trk>::iterator p = evt.mc_trks.begin(); p != evt.mc_trks.end(); p++) {
972 p->t += tOff;
973 }
974 }

◆ getKineticEnergy()

double JAANET::getKineticEnergy ( const Trk & trk)
inline

Get track kinetic energy.

Parameters
trktrack
Returns
kinetic energy [GeV]

Definition at line 983 of file JAAnetToolkit.hh.

984 {
985 const double energy = trk.E;
986 const double mass = JPDB::getInstance().getPDG(trk.type).mass;
987
988 return getKineticEnergy(energy, mass);
989 }

◆ getE0()

double JAANET::getE0 ( const Evt & evt)
inline

Get initial state energy of a neutrino interaction.


This method includes baryon number conservation.

Parameters
evtevent
Returns
energy [GeV]

Definition at line 999 of file JAAnetToolkit.hh.

1000 {
1001 using namespace std;
1002
1003 const Trk& neutrino = get_neutrino(evt);
1004
1005 double E0 = neutrino.E;
1006
1007 for (vector<Trk>::const_iterator track = evt.mc_trks.cbegin(); track != evt.mc_trks.end(); ++track) {
1008
1009 if (!is_finalstate(*track)) { continue; }
1010
1011 if (track->type == TRACK_TYPE_NEUTRON ||
1012 track->type == TRACK_TYPE_SIGMA_MINUS ||
1013 track->type == TRACK_TYPE_NEUTRAL_SIGMA) {
1014
1015 E0 += MASS_NEUTRON;
1016
1017 } else if (track->type == TRACK_TYPE_PROTON ||
1018 track->type == TRACK_TYPE_LAMBDA ||
1019 track->type == TRACK_TYPE_SIGMA_PLUS) {
1020
1021 E0 += MASS_PROTON;
1022
1023 } else if (track->type == TRACK_TYPE_ANTINEUTRON) {
1024
1025 E0 -= MASS_NEUTRON;
1026
1027 } else if (track->type == TRACK_TYPE_ANTIPROTON ||
1028 track->type == TRACK_TYPE_ANTILAMBDA) {
1029
1030 E0 -= MASS_PROTON;
1031 }
1032 }
1033
1034 return E0;
1035 }
bool is_finalstate(const Trk &track)
Test whether given track corresponds to a final state particle.

◆ getE1()

double JAANET::getE1 ( const Evt & evt)
inline

Get final state energy of a neutrino interaction.


This method includes muon energy loss.

Parameters
evtevent
Returns
energy [GeV]

Definition at line 1045 of file JAAnetToolkit.hh.

1046 {
1047 using namespace std;
1048 using namespace JPP;
1049
1050 double E1 = 0.0;
1051
1052 const Trk& neutrino = get_neutrino(evt);
1053
1054 for (vector<Trk>::const_iterator track = evt.mc_trks.cbegin(); track != evt.mc_trks.cend(); ++track) {
1055
1056 if (!is_finalstate(*track)) { continue; }
1057
1058 if (is_muon(*track)) {
1059
1060 const Trk& mother = ( track->mother_id > TRK_MOTHER_UNDEFINED ?
1061 evt.mc_trks[track->mother_id] : neutrino );
1062
1063 const double distance = (track->pos - mother.pos).len();
1064
1065 E1 += gWater(track->E, -distance);
1066
1067 } else {
1068
1069 E1 += track->E;
1070 }
1071 }
1072
1073 return E1;
1074 }
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.

◆ getP0()

Vec JAANET::getP0 ( const Evt & evt)
inline

Get momentum vector of the initial state of a neutrino interaction.


This method assumes neutrino DIS on a stationary nucleus

Parameters
evtevent
Returns
energy [GeV]

Definition at line 1084 of file JAAnetToolkit.hh.

1085 {
1086 const Trk& neutrino = get_neutrino(evt);
1087
1088 return neutrino.E * neutrino.dir;
1089 }

◆ getP1()

Vec JAANET::getP1 ( const Evt & evt)
inline

Get momentum vector of the final state of a neutrino interaction.


This method includes muon energy losses.

Parameters
evtevent
Returns
final state momentum vector [GeV]

Definition at line 1099 of file JAAnetToolkit.hh.

1100 {
1101 using namespace std;
1102 using namespace JPP;
1103
1104 Vec P1(0,0,0);
1105
1106 const Trk& neutrino = get_neutrino(evt);
1107
1108 for (vector<Trk>::const_iterator track = evt.mc_trks.cbegin(); track != evt.mc_trks.cend(); ++track) {
1109
1110 if (!is_finalstate(*track)) { continue; }
1111
1112 double kineticEnergy = 0.0;
1113
1114 if (is_muon(*track)) {
1115
1116 const Trk& mother = ( track->mother_id > TRK_MOTHER_UNDEFINED ?
1117 evt.mc_trks[track->mother_id] : neutrino );
1118
1119 const double distance = (track->pos - mother.pos).len();
1120 const double energy = gWater(track->E, -distance);
1121
1122 kineticEnergy = getKineticEnergy(energy, MASS_MUON);
1123
1124 } else {
1125
1126 kineticEnergy = getKineticEnergy(*track);
1127 }
1128
1129 P1 += kineticEnergy * track->dir;
1130 }
1131
1132 return P1;
1133 }

◆ getInvariantMass()

double JAANET::getInvariantMass ( const Evt & event)
inline

Get final state invariant mass.

Parameters
eventevent
Returns
invariant mass [GeV]

Definition at line 1142 of file JAAnetToolkit.hh.

1143 {
1144 using namespace std;
1145 using namespace JPP;
1146
1147 double Minv = 0.0;
1148
1149 for (vector<Trk>::const_iterator track = event.mc_trks.cbegin(); track != event.mc_trks.cend(); ++track) {
1150
1151 if (!is_finalstate(*track)) { continue; }
1152
1153 const double mass = JPDB::getInstance().getPDG(track->type).mass;
1154
1155 Minv += mass;
1156 }
1157
1158 return Minv;
1159 }

◆ getCategories()

JEvtCategorySet JAANET::getCategories ( const JHead & header)
inline

Auxiliary method to retrieve the unique event categories corresponding to a MC header.

Parameters
headerMC header
Returns
vector of unique event categories

Definition at line 110 of file JEvtCategoryToolkit.hh.

111 {
112 using namespace std;
113 using namespace JPP;
114
115 JEvtCategorySet categories;
116
117 if (is_gseagen(header)) {
118
119 const JNeutrinoInteractionCategory cat(header);
120 const JEvtCategoryHelper helper(cat);
121
122 categories.insert(helper);
123
124 for (vector<JAANET::flux>::const_iterator i = header.flux.cbegin(); i != header.flux.cend(); ++i) {
125
126 const JNeutrinoInteractionCategory cat2(header, i->type);
127 const JEvtCategoryHelper helper2(cat2);
128
129 categories.insert(helper2);
130 }
131
132 } else if (is_mupage(header) || is_corsika(header)) {
133
134 const JMuonBundleCategory cat(header);
135 const JEvtCategoryHelper helper(cat);
136
137 categories.insert(helper);
138 }
139
140 return categories;
141 }
std::vector< JAANET::flux > flux
Definition JHead.hh:1612
bool is_corsika(const JHead &header)
Check for generator.
bool is_gseagen(const JHead &header)
Check for generator.
bool is_mupage(const JHead &header)
Check for generator.
Helper class for event categories.
Container for a set of event categories.
Class for muon bundle categories.
Class for neutrino interaction categories.

◆ make_weightFactor() [1/2]

template<class JFunction_t , class JEvtWeightFactor_t = JEvtWeightFactor>
JEvtWeightFactorFunction< JFunction_t, JEvtWeightFactor_t > JAANET::make_weightFactor ( const JFunction_t & function)
inline

Auxiliary method for creating an interface to an event-weight factor.

Parameters
functionfunction object
Returns
event-weight factor interface

Definition at line 288 of file JEvtWeightFactorFunction.hh.

288 {
290 }
Implementation of event-weight factor interface.

◆ make_weightFactor() [2/2]

template<class JEvtWeightFactor_t = JEvtWeightFactor>
JEvtWeightFactorFunction< pEvtWeightFactor, JEvtWeightFactor_t > JAANET::make_weightFactor ( pEvtWeightFactor function)
inline

Auxiliary method for creating an interface to an event-weight factor.

Parameters
functionfunction pointer
Returns
event-weight factor interface

Definition at line 300 of file JEvtWeightFactorFunction.hh.

◆ make_fluxFunction() [1/2]

template<class JFunction_t >
JEvtWeightFactorFunction< JFunction_t, JFlux > JAANET::make_fluxFunction ( const JFunction_t & flux)
inline

Auxiliary method for creating an interface to a flux function.

Parameters
fluxflux function object
Returns
flux function interface

Definition at line 312 of file JEvtWeightFactorFunction.hh.

312 {
314 }
Neutrino flux.
Definition JHead.hh:906

◆ make_fluxFunction() [2/2]

JEvtWeightFactorFunction< pFlux, JFlux > JAANET::make_fluxFunction ( pFlux flux)
inline

Auxiliary method for creating an interface to a flux function.

Parameters
fluxflux function pointer
Returns
flux function interface

Definition at line 323 of file JEvtWeightFactorFunction.hh.

323 {
325 }

◆ make_diffuseFluxFunction() [1/2]

template<class JFunction_t >
JEvtWeightFactorFunction< JFunction_t, JDiffuseFlux > JAANET::make_diffuseFluxFunction ( const JFunction_t & flux)
inline

Auxiliary method for creating an interface to a diffuse flux function.

Parameters
fluxdiffuse flux function object
Returns
diffuse flux function interface

Definition at line 335 of file JEvtWeightFactorFunction.hh.

◆ make_diffuseFluxFunction() [2/2]

JEvtWeightFactorFunction< pDiffuseFlux, JDiffuseFlux > JAANET::make_diffuseFluxFunction ( pDiffuseFlux flux)
inline

Auxiliary method for creating an interface to a diffuse flux function.

Parameters
fluxdiffuse flux function pointer
Returns
diffuse flux function interface

Definition at line 346 of file JEvtWeightFactorFunction.hh.

◆ getVolume() [1/4]

double JAANET::getVolume ( const JType< JEvtWeightGSeaGen > & type,
const Evt & evt )
inline

Get volume of given event according given weighter.

Parameters
typetype
evtevent
Returns
volume [m^3 Gev sr]

Definition at line 99 of file JEvtWeightToolkit.hh.

100 {
104 }
std::vector< double > w
MC: Weights w[0]=w1, w[1]=w2, w[2]=w3 (see e.g. Tag list or km3net-dataformat/definitions)
Definition Evt.hh:42
std::vector< double > w2list
MC: factors that make up w[1]=w2 (see e.g. Tag list or km3net-dataformat/definitions)
Definition Evt.hh:43
static const int W2LIST_GSEAGEN_WATER_INT_LEN
Interaction length in pure water in m.
static const int W2LIST_GSEAGEN_P_EARTH
Transmission probability in the Earth (XSEC_MEAN and COLUMN_DEPTH used to compute PEarth)
static const int WEIGHTLIST_DIFFERENTIAL_EVENT_RATE
Event rate per unit of flux (c.f. taglist document) [GeV m2 sr].
Definition weightlist.hh:14

◆ getVolume() [2/4]

double JAANET::getVolume ( const JType< JEvtWeightKM3BUU > & type,
const Evt & evt )
inline

Get volume of given event according given weighter.

Parameters
typetype
evtevent
Returns
volume [m^3 Gev sr]

Definition at line 114 of file JEvtWeightToolkit.hh.

115 {
119 }
static const int W2LIST_KM3BUU_WATER_INT_LEN
Interaction length in pure water in m.
static const int W2LIST_KM3BUU_P_EARTH
Transmission probability in the Earth.

◆ getVolume() [3/4]

double JAANET::getVolume ( const JType< JEvtWeightGenhen > & type,
const Evt & evt )
inline

Get volume of given event according given weighter.

Parameters
typetype
evtevent
Returns
volume [m^3 Gev sr]

Definition at line 129 of file JEvtWeightToolkit.hh.

130 {
131 using namespace JPHYSICS;
132
133 const double l_int = 1.0e-6 * NUCLEON_MOLAR_MASS / (evt.w2list[W2LIST_GENHEN_SIG] * DENSITY_SEA_WATER * AVOGADRO);
134 const double year = 60*60*24*365; // [s]
135
137 l_int /
138 year /
140 }
Auxiliary methods for light properties of deep-sea water.
static const int W2LIST_GENHEN_SIG
Cross section of the neutrion interaction.
static const int W2LIST_GENHEN_P_EARTH
Transmission probability in the Earth.

◆ getVolume() [4/4]

double JAANET::getVolume ( const JEvtWeight & weighter,
const Evt & evt )
inline

Get volume of given event according given weighter.

The return value should be normalised to

  • number of generated events;
  • solid angle covered by the generation; and
  • bin width of the histogram.
Parameters
weighterweighter
evtevent
Returns
volume [m^3 GeV sr]

Definition at line 155 of file JEvtWeightToolkit.hh.

156 {
157 if (dynamic_cast<const JEvtWeightGSeaGen*>(&weighter) != NULL) { return getVolume(JType<JEvtWeightGSeaGen>(), evt); }
158 if (dynamic_cast<const JEvtWeightGenhen*> (&weighter) != NULL) { return getVolume(JType<JEvtWeightGenhen> (), evt); }
159 if (dynamic_cast<const JEvtWeightKM3BUU*> (&weighter) != NULL) { return getVolume(JType<JEvtWeightKM3BUU> (), evt); }
160
161 THROW(JCastException, "No valid weighter.");
162 }
double getVolume(const JType< JEvtWeightGSeaGen > &type, const Evt &evt)
Get volume of given event according given weighter.
Implementation of event weighting for GSeaGen data.
Auxiliary class for a type holder.
Definition JType.hh:19

◆ getInteractionType() [1/2]

JInteractionTypeGENIE_t JAANET::getInteractionType ( const int intType)
inline

Auxiliary function to convert interaction types.

Parameters
intTypeGENIE interaction type
Returns
GENIE interaction type

Definition at line 72 of file JGENIETypes.hh.

73 {
74 if (intType > (int) JInteractionTypeGENIE_t::INTERACTION_TYPES_START &&
75 intType < (int) JInteractionTypeGENIE_t::INTERACTION_TYPES_END) {
76 return static_cast<JInteractionTypeGENIE_t>(intType);
77 } else {
78 return JInteractionTypeGENIE_t::UNDEFINED;
79 }
80 }
JInteractionTypeGENIE_t
Enumeration of GENIE interaction types.

◆ getScatteringType()

JScatteringTypeGENIE_t JAANET::getScatteringType ( const int scatType)
inline

Auxiliary function to convert scattering types.

Parameters
scatTypeGENIE scattering type
Returns
GENIE scattering type

Definition at line 89 of file JGENIETypes.hh.

90 {
91 if ((scatType > (int) JScatteringTypeGENIE_t::NEUTRINO_SCATTERING_TYPES_START &&
92 scatType < (int) JScatteringTypeGENIE_t::NEUTRINO_SCATTERING_TYPES_END) ||
93 (scatType > (int) JScatteringTypeGENIE_t::DARK_MATTER_SCATTERING_TYPES_START &&
94 scatType > (int) JScatteringTypeGENIE_t::DARK_MATTER_SCATTERING_TYPES_END) ||
95 (scatType == (int) JScatteringTypeGENIE_t::UNKNOWN)) {
96 return static_cast<JScatteringTypeGENIE_t>(scatType);
97 } else {
98 return JScatteringTypeGENIE_t::UNDEFINED;
99 }
100 }
JScatteringTypeGENIE_t
Enumeration of GENIE scattering types.

◆ copy() [1/2]

void JAANET::copy ( const Head & from,
JHead & to )

Copy header from from to to.

Parameters
fromheader
toheader

Definition at line 163 of file JHead.cc.

164 {
165 using namespace std;
166 using namespace JPP;
167
168 JRootReader reader(null, JHead::getEquationParameters(), JAAnetDictionary::getInstance());
169
170 JRootReadableClass cls(to);
171
172 for (Head::const_iterator i = from.begin(); i != from.end(); ++i) {
173
174 const JRootReadableClass& abc = cls.find(getTag(i->first).c_str());
175
176 const string buffer = trim(i->second);
177
178 if (abc.is_valid() && buffer != "") {
179
180 JRedirectString redirect(reader, buffer);
181
182 reader.getObject(abc);
183
184 if (i->first == getTag(i->first)) {
185 to.insert(*i); // keep track of parsed tags
186 }
187
188 } else {
189
190 to.insert(*i); // store data of unknown tags
191 }
192 }
193 }
JNET::JTag getTag(JLANG::JType< KM3NETDAQ::JDAQTimeslice >)
Definition JDAQTags.hh:94
This class can be used to temporarily redirect an input stream to an input string.
const char * c_str() const
C-string.
Definition JTag.hh:201
Implementation for ASCII input of objects with ROOT dictionary.
bool is_valid() const
Check validity of this addressable class.
JRootAddressableClass find(const char *const name) const
Find addressable base class or data member with given name within current class.
ROOT class for reading into object.

◆ copy() [2/2]

void JAANET::copy ( const JHead & from,
Head & to )

Copy header from from to to.

Parameters
fromheader
toheader

Definition at line 202 of file JHead.cc.

203 {
204 using namespace std;
205 using namespace JPP;
206
207 to = Head();
208
209 JHeadWriter writer(to, JHead::getEquationParameters(), JAAnetDictionary::getInstance());
210
211 JRootWritableClass cls(from);
212
213 unique_ptr<TIterator> i(cls.getClass()->GetListOfDataMembers()->MakeIterator());
214
215 for (const TDataMember* p; (p = (const TDataMember*) i->Next()) != NULL; ) {
216 if (!JRoot::is_static(*p)) {
217 if (from.find(p->GetName()) != from.end() ||
218 cls.get(*p) == JRootClass(&JHead::start_run) ||
219 cls.get(*p) == JRootClass(&JHead::end_event)) {
220 writer.put(p->GetName(), cls.get(*p), true);
221 }
222 }
223 }
224
225 // copy pending data
226
227 for (JHead::const_iterator i = from.begin(); i != from.end(); ++i) {
228 if (to.find(i->first) == to.end()) {
229 to.insert(*i);
230 }
231 }
232 }
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Definition Head.hh:65
Implementation for Head output of JHead objects with ROOT dictionary.
Auxiliary class to manage access to base classes and data members of ROOT class.
Definition JRootClass.hh:44
JRootClass get(const TDataMember &object) const
Get ROOT class of given data member.
ROOT class for writing from object.

◆ getTag() [1/2]

std::string JAANET::getTag ( const std::string & tag)
inline

Get tag without aanet extension "_<counter>" for identical tags.

Parameters
tagtag
Returns
tag

Definition at line 94 of file JHead.hh.

95 {
96 using namespace std;
97
98 const string::size_type pos = tag.find(AANET_TAG_SEPARATOR);
99
100 if (pos != string::npos) {
101
102 for (string::size_type i = pos + 1; i != tag.size(); ++i) {
103 if (!isdigit(tag[i])) {
104 return tag;
105 }
106 }
107
108 return tag.substr(0, pos);
109 }
110
111 return tag;
112 }

◆ getTag() [2/2]

std::string JAANET::getTag ( const std::string & tag,
const int counter )
inline

Get tag with aanet extension "_<counter>" for identical tags.

Parameters
tagtag
countercounter
Returns
tag

Definition at line 122 of file JHead.hh.

123 {
124 std::ostringstream os;
125
126 os << tag << AANET_TAG_SEPARATOR << counter;
127
128 return os.str();
129 }
static const char AANET_TAG_SEPARATOR
Separator for tag extension of multiple tags in Head ("_<counter>").
Definition JHead.hh:65

◆ operator==()

bool JAANET::operator== ( const Head & first,
const Head & second )
inline

Equal operator.

Note that this operator uses the JHead::match method.

Parameters
firstfirst header
secondsecond header
Returns
true if two headers are equal; else false

Definition at line 1801 of file JHead.hh.

1803 {
1804 return JHead(first).match(JHead(second));
1805 }
Monte Carlo run header.
Definition JHead.hh:1236
bool match(const JHead &header) const
Test match of headers.
Definition JHead.hh:1474

◆ operator<()

bool JAANET::operator< ( const Head & first,
const Head & second )
inline

Less than operator.

Note that this operator uses the JHead::less method.

Parameters
firstfirst header
secondsecond header
Returns
true if first header is less than second header; else false

Definition at line 1817 of file JHead.hh.

1819 {
1820 return JHead(first).less(JHead(second));
1821 }
bool less(const JHead &header) const
Comparison of headers.
Definition JHead.hh:1486

◆ is_genhen()

bool JAANET::is_genhen ( const JHead & header)
inline

Check for generator.

Parameters
headerheader
Returns
true if this header is produced by genhen; else false

Definition at line 37 of file JHeadToolkit.hh.

38 {
39 for (const auto& i : header.simul) {
40 if (i.program == APPLICATION_GENHEN) {
41 return true;
42 }
43 }
44
45 for (const auto& i : header.physics) { // legacy
46 if (i.buffer.find(APPLICATION_GENHEN) != std::string::npos) {
47 return true;
48 }
49 }
50
51 return false;
52 }
static const char *const APPLICATION_GENHEN
KM3NeT Data Definitions v3.6.0 https://git.km3net.de/common/km3net-dataformat.
std::vector< JAANET::simul > simul
Definition JHead.hh:1591
std::vector< JAANET::physics > physics
Definition JHead.hh:1590

◆ is_gseagen()

bool JAANET::is_gseagen ( const JHead & header)
inline

Check for generator.

Parameters
headerheader
Returns
true if this header is produced by gSeaGen; else false

Definition at line 61 of file JHeadToolkit.hh.

62 {
63 for (const auto& i : header.simul) {
64 if (i.program == APPLICATION_GSEAGEN) {
65 return true;
66 }
67 }
68
69 for (const auto& i : header.physics) { // legacy
70 if (i.buffer.find(APPLICATION_GSEAGEN) != std::string::npos) {
71 return true;
72 }
73 }
74
75 return false;
76 }
static const char *const APPLICATION_GSEAGEN
event generator

◆ is_mupage()

bool JAANET::is_mupage ( const JHead & header)
inline

Check for generator.

Parameters
headerheader
Returns
true if this header is produced by MUPAGE; else false

Definition at line 85 of file JHeadToolkit.hh.

86 {
87 for (const auto& i : header.simul) {
88 if (i.program == APPLICATION_MUPAGE) {
89 return true;
90 }
91 }
92
93 return false;
94 }
static const char *const APPLICATION_MUPAGE
event generator

◆ is_corsika()

bool JAANET::is_corsika ( const JHead & header)
inline

Check for generator.

Parameters
headerheader
Returns
true if this header is produced by Corsika; else false

Definition at line 103 of file JHeadToolkit.hh.

104 {
105 for (const auto& i : header.simul) {
106 if (i.program == APPLICATION_CORSIKA) {
107 return true;
108 }
109 }
110
111 return false;
112 }
static const char *const APPLICATION_CORSIKA
event generator

◆ is_km3buu()

bool JAANET::is_km3buu ( const JHead & header)
inline

Check for generator.

Parameters
headerheader
Returns
true if this header is produced by km3buu; else false

Definition at line 121 of file JHeadToolkit.hh.

122 {
123 for (const auto& i : header.simul) {
124 if (i.program == APPLICATION_KM3BUU) {
125 return true;
126 }
127 }
128
129 return false;
130 }
static const char *const APPLICATION_KM3BUU
event generator

◆ is_km3()

bool JAANET::is_km3 ( const JHead & header)
inline

Check for detector simulation.

Parameters
headerheader
Returns
true if this header is processed with km3; else false

Definition at line 139 of file JHeadToolkit.hh.

140 {
141 for (const auto& i : header.simul) {
142 if (i.program == APPLICATION_KM3) {
143 return true;
144 }
145 }
146
147 return false;
148 }
static const char *const APPLICATION_KM3
detector simulation

◆ is_km3sim()

bool JAANET::is_km3sim ( const JHead & header)
inline

Check for detector simulation.

Parameters
headerheader
Returns
true if this header is processed with KM3Sim; else false

Definition at line 157 of file JHeadToolkit.hh.

158 {
159 for (const auto& i : header.simul) {
160 if (i.program == APPLICATION_KM3SIM) {
161 return true;
162 }
163 }
164
165 return false;
166 }
static const char *const APPLICATION_KM3SIM
detector simulation

◆ is_sirene()

bool JAANET::is_sirene ( const JHead & header)
inline

Check for detector simulation.

Parameters
headerheader
Returns
true if this header is processed with JSirene; else false

Definition at line 175 of file JHeadToolkit.hh.

176 {
177 for (const auto& i : header.simul) {
178 if (i.program == APPLICATION_JSIRENE) {
179 return true;
180 }
181 }
182
183 return false;
184 }
static const char *const APPLICATION_JSIRENE
detector simulation

◆ is_pure_noise()

bool JAANET::is_pure_noise ( const JHead & header)
inline

Check for generator.

Parameters
headerheader
Returns
true if this header is produced by pure noise; else false

Definition at line 193 of file JHeadToolkit.hh.

194 {
195 return header.K40.livetime_s > 0.0;
196 }
JAANET::K40 K40
Definition JHead.hh:1608
double livetime_s
Live time [s].
Definition JHead.hh:1107

◆ is_daq()

bool JAANET::is_daq ( const JHead & header)
inline

Check for real data.

Parameters
headerheader
Returns
true if this header corresponds to real data; else false

Definition at line 205 of file JHeadToolkit.hh.

206 {
207 return header.DAQ.livetime_s > 0.0;
208 }
JAANET::DAQ DAQ
Definition JHead.hh:1607
double livetime_s
Live time [s].
Definition JHead.hh:1053

◆ is_MC()

bool JAANET::is_MC ( const JHead & header)
inline

Check for Monte-Carlo simulations.

Parameters
headerheader
Returns
true if this header corresponds to a Monte-Carlo simulation; else false

Definition at line 217 of file JHeadToolkit.hh.

218 {
219 return (is_gseagen(header) ||
220 is_mupage (header) ||
221 is_corsika(header) ||
222 is_km3buu (header) ||
223 is_genhen (header));
224 }

◆ getOffset()

Vec JAANET::getOffset ( const JHead & header)
inline

Get offset.

For consistency with the position of the detector, a pending offset should be added to the positions of generated tracks (i.e. Evt::mc_trks).

The main logic can be summarised as follows.

  1. if JHead::fixedcan is defined, the values correspond to an offset that has already been applied, (0,0,0) is returned;
  2. else if JHead::can is defined, the values correspond to a z-range that has already been applied, (0,0,-zmin) is returned;
  3. else if JHead::coord_origin is defined, the values correspond to an offset that has not yet been applied, (x,y,z) is returned;
  4. else (0,0,0) is returned;
Parameters
headerheader
Returns
position

Definition at line 291 of file JHeadToolkit.hh.

292 {
293 if (header.is_valid(&JHead::fixedcan))
294 return Vec(0.0, 0.0, 0.0);
295 else if (header.is_valid(&JHead::can))
296 return Vec(0.0, 0.0, -header.can.zmin);
297 else if (header.is_valid(&JHead::coord_origin))
298 return header.coord_origin;
299 else
300 return Vec(0.0, 0.0, 0.0);
301 }
JAANET::coord_origin coord_origin
Definition JHead.hh:1601
JAANET::can can
Definition JHead.hh:1598
bool is_valid(T JHead::*pd) const
Check validity of given data member in JHead.
Definition JHead.hh:1319
double zmin
Bottom [m].
Definition JHead.hh:598

◆ getOrigin()

Vec JAANET::getOrigin ( const JHead & header)
inline

Get origin.

The origin corresponds to the offset that has already been applied to the positions of generated tracks (i.e. Evt::mc_trks).

The main logic can be summarised as follows.

  1. if JHead::fixedcan is defined, the values correspond to the offset that has already been applied, (x,y,0) is returned;
  2. else if JHead::can is defined, the values correspond to a z-range that has already been applied, (0,0,zmin) is returned;
  3. else if JHead::coord_origin is defined, the values correspond to the offset that has not yet been applied, (0,0,0) is returned;
  4. else (0,0,0) is returned;
Parameters
headerheader
Returns
position

Definition at line 325 of file JHeadToolkit.hh.

326 {
327 if (header.is_valid(&JHead::fixedcan))
328 return Vec(header.fixedcan.xcenter, header.fixedcan.ycenter, 0.0);
329 else if (header.is_valid(&JHead::can))
330 return Vec(0.0, 0.0, header.can.zmin);
331 else if (header.is_valid(&JHead::coord_origin))
332 return Vec(0.0, 0.0, 0.0);
333 else
334 return Vec(0.0, 0.0, 0.0);
335 }
JAANET::fixedcan fixedcan
Definition JHead.hh:1599
double ycenter
y-center [m]
Definition JHead.hh:637
double xcenter
x-center [m]
Definition JHead.hh:636

◆ getCylinder()

JCylinder3D JAANET::getCylinder ( const JHead & header)
inline

Get cylinder corresponding to the positions of generated tracks (i.e.

Evt::mc_trks).

For consistency with the position of the detector, the pending offset (see method JAANET::getOffset) should be added to the position of cylinder.

Parameters
headerheader
Returns
cylinder

Definition at line 347 of file JHeadToolkit.hh.

348 {
349 using namespace JPP;
350
351 if (header.is_valid(&JHead::fixedcan)) {
352
354 header.fixedcan.ycenter),
355 header.fixedcan.radius),
356 header.fixedcan.zmin,
357 header.fixedcan.zmax);
358
359 } else if (header.is_valid(&JHead::can)) {
360
361 return JCylinder3D(JCircle2D(JVector2D(), header.can.r),
362 header.can.zmin,
363 header.can.zmax);
364 } else {
365
366 return JCylinder3D();
367 }
368 }
Data structure for circle in two dimensions.
Definition JCircle2D.hh:35
Data structure for vector in two dimensions.
Definition JVector2D.hh:34
double zmax
Top [m].
Definition JHead.hh:599
double r
Radius [m].
Definition JHead.hh:600
double zmax
Top [m].
Definition JHead.hh:639
double radius
Radius [m].
Definition JHead.hh:640
double zmin
Bottom [m].
Definition JHead.hh:638

◆ getBoostToCOM()

JLorentzBoost JAANET::getBoostToCOM ( const Evt & event)

Get Lorentz boost to the Center of Mass (COM) frame for a given neutrino interaction.

Parameters
eventevent

Definition at line 248 of file JLorentzBoost.hh.

249 {
250 using namespace JPP;
251
252 if (has_neutrino(event)) {
253
254 const Trk& nu = get_neutrino(event);
255
256 const Vec beta = -nu.E / getE0(event) * nu.dir;
257
258 return Boost(beta.x, beta.y, beta.z);
259
260 } else {
261 THROW(JValueOutOfRange, "getBoostToCOM(): Given event does not correspond to a neutrino interaction.");
262 }
263 }
double getE0(const Evt &evt)
Get initial state energy of a neutrino interaction.

◆ boostToCOM()

void JAANET::boostToCOM ( Evt & event)

Boost event to the Center of Mass (COM) frame.

Parameters
eventevent

Definition at line 271 of file JLorentzBoost.hh.

272 {
273 const JLorentzBoost boost = getBoostToCOM(event);
274 boost(event);
275 }
JLorentzBoost getBoostToCOM(const Evt &event)
Get Lorentz boost to the Center of Mass (COM) frame for a given neutrino interaction.
Auxiliary class for performing Lorentz boosts.

◆ is_muon_bundle_primary()

bool JAANET::is_muon_bundle_primary ( const int type)
inline

Auxiliary function to check if given PDG code corresponds to a valid muon bundle primary type.

Parameters
typePDG type
Returns
true if given PDG type corresponds to a valid muon bundle primary type; else false

Definition at line 56 of file JMuonBundleCategory.hh.

57 {
58 using namespace std;
59
60 const int absType = abs(type);
61 const string typeStr = to_string(absType);
62
63 return ( (absType == PDG_MUONBUNDLE || // MUPAGE
64 absType == TRACK_TYPE_MUON) ||
65 (typeStr.size() == 10 && typeStr.substr(0,2) == "10") || // CORSIKA nuclei
66 (absType != TRACK_TYPE_PHOTON && // CORSIKA single baryon primaries (e.g. proton or neutron)
67 absType != TRACK_TYPE_ELECTRON &&
68 absType != TRACK_TYPE_MUON &&
69 absType != TRACK_TYPE_TAU &&
70 absType != TRACK_TYPE_NUE &&
71 absType != TRACK_TYPE_NUMU &&
72 absType != TRACK_TYPE_NUTAU &&
73 ((int)(absType / 1000)) % 10 != 0) );
74 }

◆ is_neutrino_primary()

bool JAANET::is_neutrino_primary ( const int type)
inline

Auxiliary function to check if given PDG code corresponds to a neutrino.

Parameters
typePDG type
Returns
true if given PDG type corresponds to a neutrino; else false

Definition at line 57 of file JNeutrinoInteractionCategory.hh.

58 {
59 const int absType = abs(type);
60
61 return (absType == TRACK_TYPE_NUE ||
62 absType == TRACK_TYPE_NUMU ||
63 absType == TRACK_TYPE_NUTAU);
64 }

◆ getInteractionType() [2/2]

JInteractionTypeGENIE_t JAANET::getInteractionType ( const JHead & header)
inline

Auxiliary function to retrieve the GENIE interaction type corresponding to a given header.

Parameters
headerMC header
Returns
GENIE interaction type

Definition at line 73 of file JNeutrinoInteractionCategory.hh.

74 {
75 using namespace std;
76 using namespace JPP;
77
78 if (is_gseagen(header)) {
79
80 for (vector<JAANET::physics>::const_iterator i = header.physics.cbegin(); i != header.physics.cend(); ++i) {
81
82 istringstream iss(i->buffer);
83
84 for (string buffer; iss >> buffer ;) {
85
86 if (buffer == string(NEUTRAL_CURRENT)) {
87 return JInteractionTypeGENIE_t::WEAK_NEUTRAL_CURRENT;
88 } else if (buffer == string(CHARGED_CURRENT)) {
89 return JInteractionTypeGENIE_t::WEAK_CHARGED_CURRENT;
90 }
91 }
92 }
93 }
94
95 return JInteractionTypeGENIE_t::UNDEFINED;
96 }

◆ getTargetInfo()

std::pair< JParameter< int >, JParameter< int > > JAANET::getTargetInfo ( const JHead & header)
inline

Auxiliary function to retrieve the target atomic number and mass number.

Parameters
headerMC header
Returns
pair of atomic number (Z) and mass number (A)

Definition at line 106 of file JNeutrinoInteractionCategory.hh.

107 {
108 using namespace std;
109 using namespace JPP;
110
113
114 if (!header.target.buffer.empty()) {
115
116 istringstream iss(header.target.buffer);
117
118 if (! (iss.peek() == (int) 'A' &&
119 iss.ignore() && iss >> A &&
120 iss.peek() == (int) 'Z' &&
121 iss.ignore() && iss >> Z &&
122 Z > 0 && A >= Z) ) {
123 THROW(JValueOutOfRange, "getTargetInfo(): Invalid target header-field: " << header.target.buffer << endl);
124 }
125 }
126
127 return make_pair(Z,A);
128 }
JAANET::target target
Definition JHead.hh:1589
Parameter class.
Definition JParameter.hh:36
std::string buffer
General purpose name.
Definition JHead.hh:217

◆ select()

bool JAANET::select ( const Trk & trk,
const Evt & evt )

Event selection.

Parameters
trktrack
evtevent
Returns
true if selected; else false

Definition at line 16 of file JAAnet/event_selector.cc.

17 {
18 using namespace std;
19 using namespace JPP;
20 /*
21 if (has_muon(evt)) {
22
23 Trk muon;
24
25 for (const auto& t1 : evt.mc_trks) {
26 if (is_muon(t1)) {
27 if (t1.E > muon.E) {
28 muon = t1;
29 }
30 }
31 }
32
33 return (is_muon(muon) && getAngle(getDirection(trk), getDirection(muon)) > 5.0);
34 }
35 */
36 return true;
37 }

◆ hasW()

bool JAANET::hasW ( const Trk & trk,
const int i )
inline

Check availability of value.

Parameters
trktrack
iindex
Returns
true if available; else false

Definition at line 102 of file JAAnet/JEvD.cc.

103 {
104 return (i >= 0 && i < (int) trk.fitinf.size());
105 }

◆ getW() [2/3]

double JAANET::getW ( const Trk & trk,
const int i )
inline

Get associated value.

Parameters
trktrack
iindex
Returns
value

Definition at line 115 of file JAAnet/JEvD.cc.

116 {
117 return trk.fitinf.at(i);
118 }

◆ getW() [3/3]

double JAANET::getW ( const Trk & trk,
const int i,
const double value )
inline

Get associated value.

Parameters
trktrack
iindex
valuedefault value
Returns
value

Definition at line 129 of file JAAnet/JEvD.cc.

130 {
131 if (hasW(trk,i))
132 return trk.fitinf.at(i);
133 else
134 return value;
135 }
bool hasW(const Trk &trk, const int i)
Check availability of value.

◆ setW()

void JAANET::setW ( Trk & trk,
const int i,
const double value )

Set associated value.

Parameters
trktrack
iindex
valuevalue

Definition at line 145 of file JAAnet/JEvD.cc.

146 {
147 if (i >= (int) trk.fitinf.size()) {
148 trk.fitinf.resize(i + 1, 0.0);
149 }
150
151 trk.fitinf[i] = value;
152 }

Variable Documentation

◆ AASHOWER_RECONSTRUCTION_TYPE

const int JAANET::AASHOWER_RECONSTRUCTION_TYPE = 101
static

AAnet shower fit reconstruction type.

Definition at line 70 of file JAAnetToolkit.hh.

◆ getEvtValue

const JEvtEvaluator JAANET::getEvtValue
static

Function object for evaluation of DAQ objects.

Definition at line 54 of file JEvtEvaluator.hh.

◆ getEventWeighter

JEvtWeighter JAANET::getEventWeighter

Function object for mapping header to event weighter.

Definition at line 12 of file JEvtWeightToolkit.cc.

◆ AANET_TAG_SEPARATOR

const char JAANET::AANET_TAG_SEPARATOR = '_'
static

Separator for tag extension of multiple tags in Head ("_<counter>").

Definition at line 65 of file JHead.hh.

◆ get_is_head

JHeadHelper JAANET::get_is_head
static

Function object to get check method for given application.

Definition at line 266 of file JHeadToolkit.hh.

◆ HONDA_ENERGY_KEYWORD

const char* const JAANET::HONDA_ENERGY_KEYWORD = "Enu(GeV)"
static

Definition at line 53 of file JHondaFluxInterpolator.hh.

◆ HONDA_COSINE_ZENITH_ANGLE_KEYWORD

const char* const JAANET::HONDA_COSINE_ZENITH_ANGLE_KEYWORD = "cosZ"
static

Definition at line 54 of file JHondaFluxInterpolator.hh.

◆ HONDA_AZIMUTH_ANGLE_KEYWORD

const char* const JAANET::HONDA_AZIMUTH_ANGLE_KEYWORD = "phi_Az"
static

Definition at line 55 of file JHondaFluxInterpolator.hh.

◆ HONDA_MUON_NEUTRINO_FLUX_KEYWORD

const char* const JAANET::HONDA_MUON_NEUTRINO_FLUX_KEYWORD = "NuMu"
static

Definition at line 57 of file JHondaFluxInterpolator.hh.

◆ HONDA_MUON_ANTINEUTRINO_FLUX_KEYWORD

const char* const JAANET::HONDA_MUON_ANTINEUTRINO_FLUX_KEYWORD = "NuMubar"
static

Definition at line 58 of file JHondaFluxInterpolator.hh.

◆ HONDA_ELECTRON_NEUTRINO_FLUX_KEYWORD

const char* const JAANET::HONDA_ELECTRON_NEUTRINO_FLUX_KEYWORD = "NuE"
static

Definition at line 59 of file JHondaFluxInterpolator.hh.

◆ HONDA_ELECTRON_ANTINEUTRINO_FLUX_KEYWORD

const char* const JAANET::HONDA_ELECTRON_ANTINEUTRINO_FLUX_KEYWORD = "NuEbar"
static

Definition at line 60 of file JHondaFluxInterpolator.hh.

◆ HONDA_BINSPECS_SEPARATOR

const char* const JAANET::HONDA_BINSPECS_SEPARATOR = "--"
static

Definition at line 62 of file JHondaFluxInterpolator.hh.

◆ HONDA_BINSPECS_BEGIN

const char JAANET::HONDA_BINSPECS_BEGIN = '['
static

Definition at line 63 of file JHondaFluxInterpolator.hh.

◆ HONDA_BINSPECS_END

const char JAANET::HONDA_BINSPECS_END = ']'
static

Definition at line 64 of file JHondaFluxInterpolator.hh.

◆ DEFAULT_BUNDLE_ENERGY_RANGE

const JRange<double> JAANET::DEFAULT_BUNDLE_ENERGY_RANGE = JRange<double>(0, 1e11)
static

Default bundle energy range [GeV].

Definition at line 44 of file JMuonBundleCategory.hh.

◆ DEFAULT_BUNDLE_COSINE_ZENITH_ANGLE_RANGE

const JRange<double> JAANET::DEFAULT_BUNDLE_COSINE_ZENITH_ANGLE_RANGE = JRange<double>(-1.0, 1.0)
static

Default bundle cosine zenith angle range [-].

Definition at line 45 of file JMuonBundleCategory.hh.

◆ DEFAULT_BUNDLE_MULTIPLICITY_RANGE

const JRange<int> JAANET::DEFAULT_BUNDLE_MULTIPLICITY_RANGE = JRange<int> (0, 1000)
static

Default bundle multiplicity range [-].

Definition at line 46 of file JMuonBundleCategory.hh.

◆ DEFAULT_BUNDLE_RADIAL_EXTENT

const double JAANET::DEFAULT_BUNDLE_RADIAL_EXTENT = 1e5
static

Default bundle radial extent [m].

Definition at line 47 of file JMuonBundleCategory.hh.

◆ NEUTRAL_CURRENT

const char* const JAANET::NEUTRAL_CURRENT = "NC"
static

Neutral current header string identifier.

Definition at line 43 of file JNeutrinoInteractionCategory.hh.

◆ CHARGED_CURRENT

const char* const JAANET::CHARGED_CURRENT = "CC"
static

Charged current header string identifier.

Definition at line 44 of file JNeutrinoInteractionCategory.hh.

◆ DEFAULT_NEUTRINO_ENERGY_RANGE

const JRange<double> JAANET::DEFAULT_NEUTRINO_ENERGY_RANGE = JRange<double>(0, 1e11)
static

Default neutrino energy range [GeV].

Definition at line 47 of file JNeutrinoInteractionCategory.hh.

◆ DEFAULT_NEUTRINO_COSINE_ZENITH_ANGLE_RANGE

const JRange<double> JAANET::DEFAULT_NEUTRINO_COSINE_ZENITH_ANGLE_RANGE = JRange<double>(-1.0, 1.0)
static

Default neutrino cosine zenith angle range [-].

Definition at line 48 of file JNeutrinoInteractionCategory.hh.