Jpp  master_rocky-37-gf0c5bc59d
the software that should make you happy
Classes | Typedefs | Enumerations | Functions | Variables
JAANET Namespace Reference

Extensions to Evt data format. More...

Classes

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  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  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< JDiffuseFluxFunction_t, JDiffuseFlux >
 Implementation of event-weight factor interface for diffuse flux objects. More...
 
struct  JEvtWeightFactorFunction< Flux_Atmospheric, JDiffuseFlux >
 Specialisation of event-weight factor interface for atmospheric neutrino flux. More...
 
struct  JEvtWeightFactorFunction< pEvtWeightFactor, JEvtWeightFactor_t >
 Implementation of C-style event-weight factor. More...
 
struct  JEvtWeightFactorFunction< pDiffuseFlux, JDiffuseFlux >
 Implementation of C-style diffuse flux 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  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  JEvtWeighter
 Look-up table for event weighters. More...
 
struct  JFlux
 Low-level interface for retrieving the flux corresponding to a given event. More...
 
struct  JFluxHelper
 Helper class for flux function. More...
 
struct  JRange_t
 Type definition of range. More...
 
struct  start_run
 Start of run record. More...
 
struct  String
 General purpose string class. More...
 
struct  detector
 Detector file. More...
 
struct  muon_desc_file
 Muon descriptor file. More...
 
struct  target
 Target. More...
 
struct  XSecFile
 Neutrino cross section file. More...
 
struct  drawing
 Drawing. More...
 
struct  calibration
 Calibration. More...
 
struct  cut
 General purpose class of phase space generation. More...
 
struct  cut_primary
 Phase space of primary particle. More...
 
struct  cut_seamuon
 Phase space of atmospheric muon generation. More...
 
struct  cut_in
 Phase space of incoming particle. More...
 
struct  cut_nu
 Phase space of incident neutrino. More...
 
struct  generator
 Description of Monte Carlo event generation applications. More...
 
struct  physics
 Physics information. More...
 
struct  simul
 Generator for simulation. More...
 
struct  spectrum
 Neutrino energy spectrum. More...
 
struct  can
 The cylinder used for photon tracking. More...
 
struct  fixedcan
 The fixed cylinder used for photon tracking. More...
 
struct  genvol
 Neutrino vertex volume. More...
 
struct  coord_origin
 Coordinate origin. More...
 
struct  genhencut
 Phase space for incident neutrino. More...
 
struct  norma
 Normlisation of CORSIKA events. More...
 
struct  livetime
 Normalisation of MUPAGE events. More...
 
struct  flux
 Neutrino flux. More...
 
struct  seabottom
 The bottom of the sea. More...
 
struct  depth
 Depth. More...
 
struct  DAQ
 Livetime of DAQ data. More...
 
struct  K40
 Livetime of noise data. More...
 
struct  tgen
 Time duration of event generation. More...
 
struct  time_interval
 UTC time interval for event generation. More...
 
struct  primary
 Primary particle. More...
 
struct  end_event
 End of event record. 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  JHondaBinRange
 Auxiliary data structure for reading Honda bin ranges. More...
 
struct  JHondaAngularBinSpecs
 Auxiliary data structure for reading angular binning specifications of Honda flux table. 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  JVolume
 Auxiliary class for histogramming of effective volume. More...
 
struct  JEventSelector
 Event selector. More...
 

Typedefs

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

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

Variables

static const int AASHOWER_RECONSTRUCTION_TYPE = 101
 AAnet shower fit reconstruction type. More...
 
static const JEvtEvaluator getEvtValue
 Function object for evaluation of DAQ objects. More...
 
JEvtWeighter getEventWeighter
 Function object for mapping header to event weighter. More...
 
static const char AANET_TAG_SEPARATOR = '_'
 Separator for tag extension of multiple tags in Head ("_<counter>"). More...
 
static JHeadHelper get_is_head
 Function object to get check method for given application. More...
 
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]. More...
 
static const JRange< double > DEFAULT_BUNDLE_COSINE_ZENITH_ANGLE_RANGE = JRange<double>(0.0, 1.0)
 Default bundle cosine zenith angle range [-]. More...
 
static const JRange< int > DEFAULT_BUNDLE_MULTIPLICITY_RANGE = JRange<int> (0, 1000)
 Default bundle multiplicity range [-]. More...
 
static const double DEFAULT_BUNDLE_RADIAL_EXTENT = 1e5
 Default bundle radial extent [m]. More...
 
static const char *const NEUTRAL_CURRENT = "NC"
 Neutral current header string identifier. More...
 
static const char *const CHARGED_CURRENT = "CC"
 Charged current header string identifier. More...
 
static const JRange< double > DEFAULT_NEUTRINO_ENERGY_RANGE = JRange<double>(0, 1e11)
 Default neutrino energy range [GeV]. More...
 
static const JRange< double > DEFAULT_NEUTRINO_COSINE_ZENITH_ANGLE_RANGE = JRange<double>(-1.0, 1.0)
 Default neutrino cosine zenith angle range [-]. More...
 

Detailed Description

Extensions to Evt data format.

Author
bjung
bjjung
mlincetto
mdejong, bjjung
mdejong
bjung, mdejong

Typedef Documentation

◆ JEvtWeightFactorMap

Definition at line 493 of file JEvtCategoryMap.hh.

◆ JFluxMap

Type alias for flux maps.

Definition at line 807 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 = typedef JHondaFluxInterpolator<JConstantFunction1D<double, JArray<4, double> >, JCoszFunctionalMap_t, JEnergyFunctionalMap_t>

Alias template definition for 2-dimensional Honda flux interpolator.

Definition at line 911 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

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.

18  { GEANT4_TYPE_PHOTON = 1,
23  GEANT4_TYPE_MUON = 6,
31  GEANT4_TYPE_PROTON = 14,
34  GEANT4_TYPE_ETA = 17,
35  GEANT4_TYPE_LAMBDA = 18,
50  GEANT4_TYPE_D_PLUS = 35,
52  GEANT4_TYPE_D_ZERO = 37,
58  GEANT4_TYPE_TRITON = 46,
59  GEANT4_TYPE_ALPHA = 47,
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_ETA
@ 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_MUON
@ 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_HE3
@ 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_TAU
@ 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.

96  { TRACK_TYPE_ELECTRON = 11,
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,
102  TRACK_TYPE_PHOTON = 22,
105  TRACK_TYPE_PION_PLUS = 211,
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,
111  TRACK_TYPE_D_PLUS_S = 431,
112  TRACK_TYPE_B_ZERO = 511,
113  TRACK_TYPE_B_PLUS = 521,
114  TRACK_TYPE_B_ZERO_S = 531,
115  TRACK_TYPE_B_PLUS_C = 541,
116  TRACK_TYPE_PROTON = 2212,
117  TRACK_TYPE_NEUTRON = 2112,
118  TRACK_TYPE_LAMBDA = 3122,
119  TRACK_TYPE_SIGMA_PLUS = 3222,
121  TRACK_TYPE_SIGMA_MINUS = 3112,
122  TRACK_TYPE_NEUTRAL_XI = 3322,
123  TRACK_TYPE_XI_MINUS = 3312,
124  TRACK_TYPE_OMEGA_MINUS = 3334,
126  TRACK_TYPE_XI_ZERO_C = 4132,
127  TRACK_TYPE_XI_PLUS_C = 4232,
129  TRACK_TYPE_LAMBDA_B = 5122,
130  TRACK_TYPE_XI_MINUS_B = 5132,
131  TRACK_TYPE_XI_ZERO_B = 5232,
133 
135  TRACK_TYPE_ANTINUE = -12,
136  TRACK_TYPE_ANTIMUON = -13,
137  TRACK_TYPE_ANTINUMU = -14,
138  TRACK_TYPE_ANTITAU = -15,
139  TRACK_TYPE_ANTINUTAU = -16,
142  TRACK_TYPE_PION_MINUS = -211,
143  TRACK_TYPE_ANTIK_LONG = -130,
144  TRACK_TYPE_ANTIK_SHORT = -310,
145  TRACK_TYPE_K_MINUS = -321,
146  TRACK_TYPE_D_MINUS = -411,
147  TRACK_TYPE_D_MINUS_S = -431,
148  TRACK_TYPE_ANTID_ZERO = -421,
149  TRACK_TYPE_ANTIB_ZERO = -511,
150  TRACK_TYPE_B_MINUS = -521,
152  TRACK_TYPE_B_MINUS_C = -541,
153  TRACK_TYPE_ANTIPROTON = -2212,
154  TRACK_TYPE_ANTINEUTRON = -2112,
155  TRACK_TYPE_ANTILAMBDA = -3122,
160  TRACK_TYPE_ANTIXI_MINUS = -3312,
162  TRACK_TYPE_ANTIXI_ZERO_C = -4132,
163  TRACK_TYPE_XI_MINUS_C = -4232,
165  TRACK_TYPE_ANTILAMBDA_B = -5122,
166  TRACK_TYPE_XI_PLUS_B = -5132,
167  TRACK_TYPE_ANTIXI_ZERO_B = -5232,
168  TRACK_TYPE_OMEGA_PLUS_B = -5332 };
@ TRACK_TYPE_OMEGA_PLUS_B
@ TRACK_TYPE_OMEGA_ZERO_C
@ TRACK_TYPE_K_SHORT
@ TRACK_TYPE_D_ZERO
@ TRACK_TYPE_XI_MINUS_B
@ TRACK_TYPE_PROTON
@ TRACK_TYPE_ANTID_ZERO
@ TRACK_TYPE_CHARGED_PION_MINUS
@ TRACK_TYPE_D_PLUS_S
@ TRACK_TYPE_LAMBDA_B
@ TRACK_TYPE_NUTAU
@ 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_B_ZERO
@ TRACK_TYPE_XI_PLUS_B
@ TRACK_TYPE_ANTIOMEGA_MINUS
@ TRACK_TYPE_SIGMA_PLUS
@ TRACK_TYPE_CHARGED_PION_PLUS
@ TRACK_TYPE_ANTINUMU
@ TRACK_TYPE_B_PLUS
@ TRACK_TYPE_XI_ZERO_C
@ TRACK_TYPE_NEUTRAL_ANTISIGMA
@ TRACK_TYPE_ANTIXI_MINUS
@ TRACK_TYPE_LAMBDA
@ 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_ANTINUE
@ TRACK_TYPE_ANTINUTAU
@ TRACK_TYPE_PION_PLUS
@ TRACK_TYPE_NEUTRAL_XI
@ TRACK_TYPE_D_MINUS
@ TRACK_TYPE_NUE
@ TRACK_TYPE_ELECTRON
@ TRACK_TYPE_K_PLUS
@ TRACK_TYPE_NEUTRAL_SIGMA
@ TRACK_TYPE_XI_PLUS_C
@ TRACK_TYPE_D_PLUS
@ TRACK_TYPE_PHOTON
@ TRACK_TYPE_OMEGA_MINUS_B
@ TRACK_TYPE_ANTIB_ZERO_S
@ TRACK_TYPE_OMEGA_MINUS
@ TRACK_TYPE_ANTIMUON
@ TRACK_TYPE_MUON
@ TRACK_TYPE_B_MINUS
@ TRACK_TYPE_K_MINUS
@ TRACK_TYPE_XI_MINUS
@ TRACK_TYPE_ANTIELECTRON
@ TRACK_TYPE_K_LONG
@ TRACK_TYPE_ANTISIGMA_MINUS
@ TRACK_TYPE_NEUTRAL_ANTIXI
@ TRACK_TYPE_ANTITAU
@ TRACK_TYPE_NEUTRON
@ TRACK_TYPE_ANTISIGMA_PLUS
@ TRACK_TYPE_NUMU
@ 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  }
double getTime(const Hit &hit)
Get true time of hit.
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
JTimeRange getTimeRange(const Evt &event, const JTimeRange &T_ns)
Get time range (i.e. time between earliest and latest hit) of Monte Carlo event.

◆ 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.
Definition: JPosition3D.hh:38
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 Trk &track)
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.
Definition: JDirection3D.hh:35

◆ 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 Trk &track)
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.
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.

◆ 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)
std::string to_string(const T &value)
Convert value to string.
Definition: JSTDTypes.hh:14

◆ 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.4.0-8-ge14cb17 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  }
bool is_initialstate(const Trk &track)
Test whether given track corresponds to an initial state particle.
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(),
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  }
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member.
Definition: JPredicate.hh:128
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(),
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.
Definition: JException.hh:712
Exception for accessing an index in a collection that is outside of its range.
Definition: JException.hh:108
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(),
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(),
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  }
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).

◆ get_primary()

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

Get primary.

Parameters
evtevent
Returns
primary track

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 *i;
591  }
592  }
593 
594  THROW(JIndexOutOfRange, "JAANET::get_primary(): Cannot retrieve primary track for event " << evt.id << ".");
595  }

◆ 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 604 of file JAAnetToolkit.hh.

605  {
606  using namespace std;
607  using namespace JPP;
608 
609  const Trk& primary = get_primary(event);
610 
611  if (is_neutrino(primary)) {
612 
613  for (vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
614  if (is_lepton(*i) && i->mother_id == primary.id) {
615  return *i;
616  }
617  }
618 
619  THROW(JValueOutOfRange, "get_leading_lepton(): Could not find leading lepton for given event");
620 
621  } else {
622  THROW(JValueOutOfRange, "get_leading_lepton(): Given event does not correspond to a neutrino interaction.");
623  }
624  }
Exception for accessing a value in a collection that is outside of its range.
Definition: JException.hh:180
const Trk & get_primary(const Evt &evt)
Get primary.
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 633 of file JAAnetToolkit.hh.

634  {
635  return JVertex3D(getPosition(track), track.t);
636  }

◆ getVertex() [2/2]

JVertex3D JAANET::getVertex ( const Evt event)
inline

Get event vertex.

Parameters
eventevent
Returns
event vertex

Definition at line 644 of file JAAnetToolkit.hh.

645  {
646  using namespace std;
647  using namespace JPP;
648 
649  if (has_neutrino(event)) {
650 
651  const Trk& neutrino = get_neutrino(event);
652 
653  return getVertex(neutrino);
654 
655  } else if (!event.mc_trks.empty()) {
656 
657  vector<Trk>::const_iterator i = find_if(event.mc_trks.begin(), event.mc_trks.end(), is_initialstate);
658 
659  if (i != event.mc_trks.end()) {
660  return getVertex(*i);
661  } else {
662  THROW(JValueOutOfRange, "getVertex(): No initial state track found.");
663  }
664 
665  } else if (!event.trks.empty()) { // For reconstructed DAQ events
666 
667  const Trk& track = get_best_reconstructed_track<JPP_RECONSTRUCTION_TYPE>(event);
668 
669  return getVertex(track);
670 
671  } else {
672 
673  THROW(JValueOutOfRange, "getVertex(): Could not find a valid event vertex.");
674  }
675  }
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
JVertex3D getVertex(const Evt &event)
Get event vertex.
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
std::vector< Trk > trks
list of reconstructed tracks (can be several because of prefits,showers, etc).
Definition: Evt.hh:39

◆ 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 683 of file JAAnetToolkit.hh.

684  {
685  return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_electron);
686  }

◆ 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 694 of file JAAnetToolkit.hh.

695  {
696  return count_electrons(evt) != 0;
697  }
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 705 of file JAAnetToolkit.hh.

706  {
707  if (count_electrons(evt) > 0)
708  return *std::find_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_electron);
709  else
710  THROW(JIndexOutOfRange, "This event has no electron.");
711  }

◆ 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 722 of file JAAnetToolkit.hh.

723  {
724  return hit.type == GEANT4_TYPE_ELECTRON || hit.type == GEANT4_TYPE_ANTIELECTRON;
725  }

◆ 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 733 of file JAAnetToolkit.hh.

734  {
735  return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_muon);
736  }

◆ 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 744 of file JAAnetToolkit.hh.

745  {
746  return count_muons(evt) != 0;
747  }
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 755 of file JAAnetToolkit.hh.

756  {
757  if (count_muons(evt) > 0)
758  return *std::find_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_muon);
759  else
760  THROW(JIndexOutOfRange, "This event has no muon.");
761  }

◆ 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 772 of file JAAnetToolkit.hh.

773  {
774  return hit.type == GEANT4_TYPE_MUON || hit.type == GEANT4_TYPE_ANTIMUON;
775  }

◆ 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 783 of file JAAnetToolkit.hh.

784  {
785  return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_tau);
786  }

◆ 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 794 of file JAAnetToolkit.hh.

795  {
796  return count_taus(evt) != 0;
797  }
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 805 of file JAAnetToolkit.hh.

806  {
807  if (count_taus(evt) > 0)
808  return *std::find_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_tau);
809  else
810  THROW(JIndexOutOfRange, "This event has no tau.");
811  }

◆ 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 820 of file JAAnetToolkit.hh.

821  {
822  using namespace std;
823 
824  if (has_tau(event)) {
825 
826  const Trk& tau = get_tau(event);
827 
828  for (vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
829  if (is_muon(*i) && i->mother_id == tau.id) {
830  return true;
831  }
832  }
833  }
834 
835  return false;
836  }
bool has_tau(const Evt &evt)
Test whether given event has a tau.
const Trk & get_tau(const Evt &evt)
Get first tau from the event tracklist.

◆ 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 844 of file JAAnetToolkit.hh.

845  {
846  using namespace std;
847 
848  if (has_tau(event)) {
849 
850  const Trk& tau = get_tau(event);
851 
852  for (vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
853  if ((is_electron(*i) || is_muon(*i)) && i->mother_id == tau.id) {
854  return true;
855  }
856  }
857  }
858 
859  return false;
860  }

◆ 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 868 of file JAAnetToolkit.hh.

869  {
870  return has_tau(event) && !has_leptonic_taudecay(event);
871  }
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 880 of file JAAnetToolkit.hh.

881  {
882  using namespace std;
883 
884  int n = 0;
885 
886  if (has_tau(event)) {
887 
888  const Trk& tau = get_tau(event);
889 
890  for (vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
891  if (i->mother_id == tau.id && JPDB::getInstance().getPDG(i->type).charge != 0) {
892  ++n;
893  }
894  }
895  }
896 
897  return n;
898  }
T & getInstance(const T &object)
Get static instance from temporary object.
Definition: JObject.hh:75
const int n
Definition: JPolint.hh:786

◆ 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 909 of file JAAnetToolkit.hh.

910  {
911  return hit.type == GEANT4_TYPE_TAU || hit.type == GEANT4_TYPE_ANTITAU;
912  }

◆ 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 920 of file JAAnetToolkit.hh.

921  {
922  return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_hadron);
923  }

◆ 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 934 of file JAAnetToolkit.hh.

935  {
936  return (!from_electron(hit) && !from_muon(hit) && !from_tau(hit));
937  }
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 948 of file JAAnetToolkit.hh.

949  {
950  for (std::vector<Trk>::iterator p = evt.mc_trks.begin(); p != evt.mc_trks.end(); p++) {
951  p->t += tOff;
952  }
953  }

◆ getKineticEnergy()

double JAANET::getKineticEnergy ( const Trk trk)
inline

Get track kinetic energy.

Parameters
trktrack
Returns
kinetic energy [GeV]

Definition at line 962 of file JAAnetToolkit.hh.

963  {
964  const double energy = trk.E;
965  const double mass = JPDB::getInstance().getPDG(trk.type).mass;
966 
967  return getKineticEnergy(energy, mass);
968  }
double getKineticEnergy(const Trk &trk)
Get track kinetic energy.

◆ 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 978 of file JAAnetToolkit.hh.

979  {
980  using namespace std;
981 
982  const Trk& neutrino = get_neutrino(evt);
983 
984  double E0 = neutrino.E;
985 
986  for (vector<Trk>::const_iterator track = evt.mc_trks.cbegin(); track != evt.mc_trks.end(); ++track) {
987 
988  if (!is_finalstate(*track)) { continue; }
989 
990  if (track->type == TRACK_TYPE_NEUTRON ||
991  track->type == TRACK_TYPE_SIGMA_MINUS ||
992  track->type == TRACK_TYPE_NEUTRAL_SIGMA) {
993 
994  E0 += MASS_NEUTRON;
995 
996  } else if (track->type == TRACK_TYPE_PROTON ||
997  track->type == TRACK_TYPE_LAMBDA ||
998  track->type == TRACK_TYPE_SIGMA_PLUS) {
999 
1000  E0 += MASS_PROTON;
1001 
1002  } else if (track->type == TRACK_TYPE_ANTINEUTRON) {
1003 
1004  E0 -= MASS_NEUTRON;
1005 
1006  } else if (track->type == TRACK_TYPE_ANTIPROTON ||
1007  track->type == TRACK_TYPE_ANTILAMBDA) {
1008 
1009  E0 -= MASS_PROTON;
1010  }
1011  }
1012 
1013  return E0;
1014  }
bool is_finalstate(const Trk &track)
Test whether given track corresponds to a final state particle.
static const double MASS_NEUTRON
neutron mass [GeV]
static const double MASS_PROTON
proton mass [GeV]

◆ 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 1024 of file JAAnetToolkit.hh.

1025  {
1026  using namespace std;
1027  using namespace JPP;
1028 
1029  double E1 = 0.0;
1030 
1031  const Trk& neutrino = get_neutrino(evt);
1032 
1033  for (vector<Trk>::const_iterator track = evt.mc_trks.cbegin(); track != evt.mc_trks.cend(); ++track) {
1034 
1035  if (!is_finalstate(*track)) { continue; }
1036 
1037  if (is_muon(*track)) {
1038 
1039  const Trk& mother = ( track->mother_id > TRK_MOTHER_UNDEFINED ?
1040  evt.mc_trks[track->mother_id] : neutrino );
1041 
1042  const double distance = (track->pos - mother.pos).len();
1043 
1044  E1 += gWater(track->E, -distance);
1045 
1046  } else {
1047 
1048  E1 += track->E;
1049  }
1050  }
1051 
1052  return E1;
1053  }
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
static const JGeaneWater gWater
Function object for energy loss of muon in sea water.
Definition: JGeane.hh:381

◆ 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 1063 of file JAAnetToolkit.hh.

1064  {
1065  const Trk& neutrino = get_neutrino(evt);
1066 
1067  return neutrino.E * neutrino.dir;
1068  }

◆ 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 1078 of file JAAnetToolkit.hh.

1079  {
1080  using namespace std;
1081  using namespace JPP;
1082 
1083  Vec P1(0,0,0);
1084 
1085  const Trk& neutrino = get_neutrino(evt);
1086 
1087  for (vector<Trk>::const_iterator track = evt.mc_trks.cbegin(); track != evt.mc_trks.cend(); ++track) {
1088 
1089  if (!is_finalstate(*track)) { continue; }
1090 
1091  double kineticEnergy = 0.0;
1092 
1093  if (is_muon(*track)) {
1094 
1095  const Trk& mother = ( track->mother_id > TRK_MOTHER_UNDEFINED ?
1096  evt.mc_trks[track->mother_id] : neutrino );
1097 
1098  const double distance = (track->pos - mother.pos).len();
1099  const double energy = gWater(track->E, -distance);
1100 
1101  kineticEnergy = getKineticEnergy(energy, MASS_MUON);
1102 
1103  } else {
1104 
1105  kineticEnergy = getKineticEnergy(*track);
1106  }
1107 
1108  P1 += kineticEnergy * track->dir;
1109  }
1110 
1111  return P1;
1112  }
static const double MASS_MUON
muon mass [GeV]

◆ getInvariantMass()

double JAANET::getInvariantMass ( const Evt event)
inline

Get final state invariant mass.

Parameters
eventevent
Returns
invariant mass [GeV]

Definition at line 1121 of file JAAnetToolkit.hh.

1122  {
1123  using namespace std;
1124  using namespace JPP;
1125 
1126  double Minv = 0.0;
1127 
1128  for (vector<Trk>::const_iterator track = event.mc_trks.cbegin(); track != event.mc_trks.cend(); ++track) {
1129 
1130  if (!is_finalstate(*track)) { continue; }
1131 
1132  const double mass = JPDB::getInstance().getPDG(track->type).mass;
1133 
1134  Minv += mass;
1135  }
1136 
1137  return Minv;
1138  }

◆ 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.
Definition: JHeadToolkit.hh:61
bool is_mupage(const JHead &header)
Check for generator.
Definition: JHeadToolkit.hh:85
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.

346  {
348  }
Implementation of C-style diffuse flux event-weight factor.

◆ 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 double DENSITY_SEA_WATER
Fixed environment values.
static const double AVOGADRO
Avogadro's number.
static const double NUCLEON_MOLAR_MASS
nucleon molar mass [g/mol]
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  }
Exception for cast operation.
Definition: JException.hh:252
double getVolume(const JEvtWeight &weighter, const Evt &evt)
Get volume of given event according given weighter.
Implementation of event weighting for GSeaGen data.
Implementation of event weighting for Genhen data.
Implementation of event weighting for KM3BUU 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 {
79  }
80  }
JInteractionTypeGENIE_t
Enumeration of GENIE interaction types.
Definition: JGENIETypes.hh:20

◆ 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 {
99  }
100  }
JScatteringTypeGENIE_t
Enumeration of GENIE scattering types.
Definition: JGENIETypes.hh:39

◆ copy() [1/2]

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

Copy header from from to to.

Parameters
fromheader
toheader

Definition at line 162 of file JHead.cc.

163  {
164  using namespace std;
165  using namespace JPP;
166 
167  JRootReader reader(null, JHead::getEquationParameters(), JAAnetDictionary::getInstance());
168 
169  JRootReadableClass cls(to);
170 
171  for (Head::const_iterator i = from.begin(); i != from.end(); ++i) {
172 
173  const JRootReadableClass& abc = cls.find(getTag(i->first).c_str());
174 
175  const string buffer = trim(i->second);
176 
177  if (abc.is_valid() && buffer != "") {
178 
179  JRedirectString redirect(reader, buffer);
180 
181  reader.getObject(abc);
182 
183  if (i->first == getTag(i->first)) {
184  to.insert(*i); // keep track of parsed tags
185  }
186 
187  } else {
188 
189  to.insert(*i); // store data of unknown tags
190  }
191  }
192  }
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.
std::string trim(const std::string &buffer)
Trim string.
Definition: JLangToolkit.hh:79
bool is_valid() const
Check validity of this addressable class.
Definition: JRootClass.hh:471
JRootAddressableClass find(const char *const name) const
Find addressable base class or data member with given name within current class.
Definition: JRootClass.hh:483
ROOT class for reading object.
Definition: JRootClass.hh:544

◆ copy() [2/2]

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

Copy header from from to to.

Parameters
fromheader
toheader

Definition at line 201 of file JHead.cc.

202  {
203  using namespace std;
204  using namespace JPP;
205 
206  to = Head();
207 
208  JHeadWriter writer(to, JHead::getEquationParameters(), JAAnetDictionary::getInstance());
209 
210  JRootWritableClass cls(from);
211 
212  unique_ptr<TIterator> i(cls.getClass()->GetListOfDataMembers()->MakeIterator());
213 
214  for (const TDataMember* p; (p = (const TDataMember*) i->Next()) != NULL; ) {
215  if (!JRootClass::is_static(*p)) {
216  if (from.find(p->GetName()) != from.end() ||
217  cls.get(*p) == JRootClass(&JHead::start_run) ||
218  cls.get(*p) == JRootClass(&JHead::end_event)) {
219  writer.put(p->GetName(), cls.get(*p), true);
220  }
221  }
222  }
223 
224  // copy pending data
225 
226  for (JHead::const_iterator i = from.begin(); i != from.end(); ++i) {
227  if (to.find(i->first) == to.end()) {
228  to.insert(*i);
229  }
230  }
231  }
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.
Definition: JHeadWriter.hh:30
Auxiliary class to manage access to base classes and data members of ROOT class.
Definition: JRootClass.hh:43
JRootClass get(const TDataMember &data_member) const
Get ROOT class of given data member.
Definition: JRootClass.hh:293
ROOT class for writing object.
Definition: JRootClass.hh:604

◆ 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  }
static const char AANET_TAG_SEPARATOR
Separator for tag extension of multiple tags in Head ("_<counter>").
Definition: JHead.hh:65

◆ 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  }

◆ 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.4.0-8-ge14cb17 https://git.km3net.de/common/km3net-dataformat.
Definition: applications.hh:12
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
Definition: applications.hh:13

◆ 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
Definition: applications.hh:14

◆ 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
Definition: applications.hh:15

◆ 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
Definition: applications.hh:16

◆ 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
Definition: applications.hh:17

◆ 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
Definition: applications.hh:18

◆ 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
Definition: applications.hh:19

◆ 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

◆ 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 275 of file JHeadToolkit.hh.

276  {
277  if (header.is_valid(&JHead::fixedcan))
278  return Vec(0.0, 0.0, 0.0);
279  else if (header.is_valid(&JHead::can))
280  return Vec(0.0, 0.0, -header.can.zmin);
281  else if (header.is_valid(&JHead::coord_origin))
282  return header.coord_origin;
283  else
284  return Vec(0.0, 0.0, 0.0);
285  }
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 309 of file JHeadToolkit.hh.

310  {
311  if (header.is_valid(&JHead::fixedcan))
312  return Vec(header.fixedcan.xcenter, header.fixedcan.ycenter, 0.0);
313  else if (header.is_valid(&JHead::can))
314  return Vec(0.0, 0.0, header.can.zmin);
315  else if (header.is_valid(&JHead::coord_origin))
316  return Vec(0.0, 0.0, 0.0);
317  else
318  return Vec(0.0, 0.0, 0.0);
319  }
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 331 of file JHeadToolkit.hh.

332  {
333  using namespace JPP;
334 
335  if (header.is_valid(&JHead::fixedcan)) {
336 
338  header.fixedcan.ycenter),
339  header.fixedcan.radius),
340  header.fixedcan.zmin,
341  header.fixedcan.zmax);
342 
343  } else if (header.is_valid(&JHead::can)) {
344 
345  return JCylinder3D(JCircle2D(JVector2D(), header.can.r),
346  header.can.zmin,
347  header.can.zmax);
348  } else {
349 
350  return JCylinder3D();
351  }
352  }
Data structure for circle in two dimensions.
Definition: JCircle2D.hh:35
Data structure for vector in two dimensions.
Definition: JVector2D.hh:34
Cylinder object.
Definition: JCylinder3D.hh:41
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 
96  }
static const char *const CHARGED_CURRENT
Charged current header string identifier.
static const char *const NEUTRAL_CURRENT
Neutral current header string identifier.

◆ 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 
111  JParameter<int> Z;
112  JParameter<int> A;
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
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.
Definition: JAAnet/JEvD.cc:102

◆ 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 250 of file JHeadToolkit.hh.

◆ HONDA_ENERGY_KEYWORD

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

Definition at line 49 of file JHondaFluxInterpolator.hh.

◆ HONDA_COSINE_ZENITH_ANGLE_KEYWORD

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

Definition at line 50 of file JHondaFluxInterpolator.hh.

◆ HONDA_AZIMUTH_ANGLE_KEYWORD

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

Definition at line 51 of file JHondaFluxInterpolator.hh.

◆ HONDA_MUON_NEUTRINO_FLUX_KEYWORD

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

Definition at line 53 of file JHondaFluxInterpolator.hh.

◆ HONDA_MUON_ANTINEUTRINO_FLUX_KEYWORD

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

Definition at line 54 of file JHondaFluxInterpolator.hh.

◆ HONDA_ELECTRON_NEUTRINO_FLUX_KEYWORD

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

Definition at line 55 of file JHondaFluxInterpolator.hh.

◆ HONDA_ELECTRON_ANTINEUTRINO_FLUX_KEYWORD

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

Definition at line 56 of file JHondaFluxInterpolator.hh.

◆ HONDA_BINSPECS_SEPARATOR

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

Definition at line 58 of file JHondaFluxInterpolator.hh.

◆ HONDA_BINSPECS_BEGIN

const char JAANET::HONDA_BINSPECS_BEGIN = '['
static

Definition at line 59 of file JHondaFluxInterpolator.hh.

◆ HONDA_BINSPECS_END

const char JAANET::HONDA_BINSPECS_END = ']'
static

Definition at line 60 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>(0.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.