Jpp 21.0.0
the software that should make you happy
Loading...
Searching...
No Matches
JAANET Namespace Reference

Extensions to Evt data format. More...

Classes

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

Typedefs

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

Enumerations

enum  JHitType_t {
  HIT_TYPE_MUON_DIRECT = +5 , HIT_TYPE_MUON_SCATTERED = -5 , HIT_TYPE_DELTARAYS_DIRECT = +4 , HIT_TYPE_DELTARAYS_SCATTERED = -4 ,
  HIT_TYPE_BREMSSTRAHLUNG_DIRECT = +3 , HIT_TYPE_BREMSSTRAHLUNG_SCATTERED = -3 , HIT_TYPE_SHOWER_DIRECT = +99 , HIT_TYPE_SHOWER_SCATTERED = -99 ,
  HIT_TYPE_NOISE = -1 , HIT_TYPE_UNKNOWN = 0
}
 Enumeration of hit types based on km3 codes. More...
 
enum class  JGENIEInteractionType_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  JGENIEScatteringType_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 class  JGENIEPDGCodes_t {
  HADRONIC_SYSTEM = 2000000001 , HADRONIC_BLOB = 2000000002 , BINDINO = 2000000101 , COULOBTRON = 2000000102 ,
  CLUSTER_NN = 2000000200 , CLUSTER_NP = 2000000201 , CLUSTER_PP = 2000000202 , COMPOSITE_NUCLEON_CLUSTER = 2000000300 ,
  DARK_MATTER = 2000010000 , ANTI_DARK_MATTER = -2000010000 , DARK_MATTER_MEDIATOR = 2000010001 , NEUTRAL_HEAVY_LEPTON = 2000020000 ,
  DARK_NEUTRINO = 2000030000 , ANTI_DARK_NEUTRINO = -2000030000 , DARK_NEUTRINO_MEDIATOR = 2000030001
}
 PDG codes for GENIE special particles. 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...
 
enum  JQuarkType_t {
  QUARK_TYPE_DOWN = 1 , QUARK_TYPE_UP = 2 , QUARK_TYPE_STRANGE = 3 , QUARK_TYPE_CHARM = 4 ,
  QUARK_TYPE_BOTTOM = 5 , QUARK_TYPE_TOP = 6 , QUARK_TYPE_ANTIDOWN = -1 , QUARK_TYPE_ANTIUP = -2 ,
  QUARK_TYPE_ANTISTRANGE = -3 , QUARK_TYPE_ANTICHARM = -4 , QUARK_TYPE_ANTIBOTTOM = -5 , QUARK_TYPE_ANTITOP = -6
}
 Enumeration of quark types based on PDG codes. More...
 

Functions

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

Variables

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

Detailed Description

Extensions to Evt data format.

Author
bjung
bjjung
mlincetto
mdejong, bjjung
mdejong
bjung, mdejong

Typedef Documentation

◆ JEvtWeightFactorMap

◆ JFluxMap

Type alias for flux maps.

Definition at line 966 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 30 of file JHeadToolkit.hh.

◆ JHondaFluxInterpolator2D

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

Alias template definition for 2-dimensional Honda flux interpolator.

Definition at line 947 of file JHondaFluxInterpolator.hh.

Enumeration Type Documentation

◆ JHitType_t

Enumeration of hit types based on km3 codes.

Enumerator
HIT_TYPE_MUON_DIRECT 

Direct light from muon.

HIT_TYPE_MUON_SCATTERED 

Scattered light from muon.

HIT_TYPE_DELTARAYS_DIRECT 

Direct light from delta-rays.

HIT_TYPE_DELTARAYS_SCATTERED 

Scattered light from delta-rays.

HIT_TYPE_BREMSSTRAHLUNG_DIRECT 

Direct light from Bremsstrahlung.

HIT_TYPE_BREMSSTRAHLUNG_SCATTERED 

Scattered light from Bremsstrahlung.

HIT_TYPE_SHOWER_DIRECT 

Direct light from primary shower.

HIT_TYPE_SHOWER_SCATTERED 

Scattered light from primary shower.

HIT_TYPE_NOISE 

Random noise.

HIT_TYPE_UNKNOWN 

Unknown source.

Definition at line 87 of file JAAnetToolkit.hh.

87 {
88 HIT_TYPE_MUON_DIRECT = +5, //!< Direct light from muon
89 HIT_TYPE_MUON_SCATTERED = -5, //!< Scattered light from muon
90 HIT_TYPE_DELTARAYS_DIRECT = +4, //!< Direct light from delta-rays
91 HIT_TYPE_DELTARAYS_SCATTERED = -4, //!< Scattered light from delta-rays
92 HIT_TYPE_BREMSSTRAHLUNG_DIRECT = +3, //!< Direct light from Bremsstrahlung
93 HIT_TYPE_BREMSSTRAHLUNG_SCATTERED = -3, //!< Scattered light from Bremsstrahlung
94 HIT_TYPE_SHOWER_DIRECT = +99, //!< Direct light from primary shower
95 HIT_TYPE_SHOWER_SCATTERED = -99, //!< Scattered light from primary shower
96 HIT_TYPE_NOISE = -1, //!< Random noise
97 HIT_TYPE_UNKNOWN = 0 //!< Unknown source
98 };
@ 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.

◆ JGENIEInteractionType_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 31 of file JGENIETypes.hh.

31 {
32 INTERACTION_TYPES_START = -1, //!< Start of interaction types
33 UNDEFINED, //!< Unknown interaction type
34 ELECTROMAGNETIC, //!< Electromagnetic interaction
35 WEAK_CHARGED_CURRENT, //!< Weak charged current interaction
36 WEAK_NEUTRAL_CURRENT, //!< Weak neutral current interaction
37 WEAK_MIX, //!< CC + NC + interference
38 DARK_MATTER, //!< Dark matter interaction
39 NUCLEON_DECAY, //!< Nucleon decay
40 NEUTRON_OSCILLATION, //!< Neutron oscillation
41 NEUTRAL_HEAVY_LEPTON, //!< Heavy neutral lepton
42 DARK_NEUTRAL_CURRENT, //!< Dark neutral current
43 INTERACTION_TYPES_END //!< End of interaction types
44 };
@ 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.

◆ JGENIEScatteringType_t

enum class JAANET::JGENIEScatteringType_t
strong

Enumeration of GENIE scattering types.

Enumerator
UNKNOWN 

Unknown scattering type.

NEUTRINO_SCATTERING_TYPES_START 

Start of standard scattering types.

UNDEFINED 

Undefined scattering type.

QUASI_ELASTIC 

Quasi-elastic scattering.

SINGLE_KAON 

Single kaon scattering.

DEEP_INELASTIC 

Deep Inelastic Scattering.

RESONANT 

Resonant scattering.

COHERENT_PRODUCTION 

Coherent production.

DIFFRACTIVE 

Diffractive scattering.

ELECTRON_NEUTRINO_ELASTIC 

Electron-neutrino elastic scattering.

INVERSE_MUON_DECAY 

Inverse muon decay.

ANOMALY_MEDIATED_NEUTRINO_GAMMA 

Anomaly mediated neutrino-gamma scattering.

MESON_EXCHANGE_CURRENT 

Meson exchange current.

COHERENT_ELASTIC 

Coherent elastic scattering.

INVERSE_BETA_DECAY 

Inverse beta-decay.

GLASHOW_RESONANCE 

Glashow-resonance.

INVERSE_MUON_DECAY_ANNIHILATION 

Inverse muon decay annihilation.

NEUTRINO_SCATTERING_TYPES_END 

End of standard scattering types.

DARK_MATTER_SCATTERING_TYPES_START 

Start of dark matter scattering types.

DARK_MATTER_ELASTIC 

Dark matter elastic scattering.

DARK_MATTER_DEEP_INELASTIC 

Dark matter deep inelastic scattering.

DARK_MATTER_ELECTRON 

Dark matter electron scattering.

DARK_MATTER_SCATTERING_TYPES_END 

End of dark matter scattering types.

Definition at line 50 of file JGENIETypes.hh.

50 {
51 UNKNOWN = -100, //!< Unknown scattering type
52 NEUTRINO_SCATTERING_TYPES_START = -1, //!< Start of standard scattering types
53 UNDEFINED = 0, //!< Undefined scattering type
54 QUASI_ELASTIC, //!< Quasi-elastic scattering
55 SINGLE_KAON, //!< Single kaon scattering
56 DEEP_INELASTIC, //!< Deep Inelastic Scattering
57 RESONANT, //!< Resonant scattering
58 COHERENT_PRODUCTION, //!< Coherent production
59 DIFFRACTIVE, //!< Diffractive scattering
60 ELECTRON_NEUTRINO_ELASTIC, //!< Electron-neutrino elastic scattering
61 INVERSE_MUON_DECAY, //!< Inverse muon decay
62 ANOMALY_MEDIATED_NEUTRINO_GAMMA, //!< Anomaly mediated neutrino-gamma scattering
63 MESON_EXCHANGE_CURRENT, //!< Meson exchange current
64 COHERENT_ELASTIC, //!< Coherent elastic scattering
65 INVERSE_BETA_DECAY, //!< Inverse beta-decay
66 GLASHOW_RESONANCE, //!< Glashow-resonance
67 INVERSE_MUON_DECAY_ANNIHILATION, //!< Inverse muon decay annihilation
68 NEUTRINO_SCATTERING_TYPES_END, //!< End of standard scattering types
69 DARK_MATTER_SCATTERING_TYPES_START = 100, //!< Start of dark matter scattering types
70 DARK_MATTER_ELASTIC, //!< Dark matter elastic scattering
71 DARK_MATTER_DEEP_INELASTIC, //!< Dark matter deep inelastic scattering
72 DARK_MATTER_ELECTRON, //!< Dark matter electron scattering
73 DARK_MATTER_SCATTERING_TYPES_END //!< End of dark matter scattering types
74 };
@ 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.

◆ JGENIEPDGCodes_t

enum class JAANET::JGENIEPDGCodes_t
strong

PDG codes for GENIE special particles.

Enumerator
HADRONIC_SYSTEM 

DIS hadronic system before hadronization.

HADRONIC_BLOB 

Unmodelled fraction of the hadronic system.

BINDINO 

Binding energy subtracted from f/s nucleons.

COULOBTRON 

Coulomb energy subtracted from f/s leptons.

CLUSTER_NN 

A nn cluster within a nucleus.

CLUSTER_NP 

A np cluster within a nucleus.

CLUSTER_PP 

A pp cluster within a nucleus.

COMPOSITE_NUCLEON_CLUSTER 

Nucleon cluster before phase decay.

DARK_MATTER 

Dark matter particle for GENIE Boosted Dark Matter mode.

ANTI_DARK_MATTER 

Dark matter particle for GENIE Boosted Dark Matter mode.

DARK_MATTER_MEDIATOR 

Mediator particle for GENIE Boosted Dark Matter mode.

NEUTRAL_HEAVY_LEPTON 

Neutral Heavy Lepton PDG code.

DARK_NEUTRINO 

Dark matter particle for GENIE Dark Neutrino mode.

ANTI_DARK_NEUTRINO 

Dark matter particle for GENIE Dark Neutrino mode.

DARK_NEUTRINO_MEDIATOR 

Mediator particle for GENIE Dark Neutrino mode.

Definition at line 80 of file JGENIETypes.hh.

80 {
81 HADRONIC_SYSTEM = 2000000001, //!< DIS hadronic system before hadronization
82 HADRONIC_BLOB = 2000000002, //!< Unmodelled fraction of the hadronic system
83 BINDINO = 2000000101, //!< Binding energy subtracted from f/s nucleons
84 COULOBTRON = 2000000102, //!< Coulomb energy subtracted from f/s leptons
85 CLUSTER_NN = 2000000200, //!< A nn cluster within a nucleus
86 CLUSTER_NP = 2000000201, //!< A np cluster within a nucleus
87 CLUSTER_PP = 2000000202, //!< A pp cluster within a nucleus
88 COMPOSITE_NUCLEON_CLUSTER = 2000000300, //!< Nucleon cluster before phase decay
89 DARK_MATTER = 2000010000, //!< Dark matter particle for GENIE Boosted Dark Matter mode
90 ANTI_DARK_MATTER = -2000010000, //!< Dark matter particle for GENIE Boosted Dark Matter mode
91 DARK_MATTER_MEDIATOR = 2000010001, //!< Mediator particle for GENIE Boosted Dark Matter mode
92 NEUTRAL_HEAVY_LEPTON = 2000020000, //!< Neutral Heavy Lepton PDG code
93 DARK_NEUTRINO = 2000030000, //!< Dark matter particle for GENIE Dark Neutrino mode
94 ANTI_DARK_NEUTRINO = -2000030000, //!< Dark matter particle for GENIE Dark Neutrino mode
95 DARK_NEUTRINO_MEDIATOR = 2000030001 //!< Mediator particle for GENIE Dark Neutrino mode
96 };
@ DARK_MATTER_MEDIATOR
Mediator particle for GENIE Boosted Dark Matter mode.
@ CLUSTER_NP
A np cluster within a nucleus.
@ CLUSTER_PP
A pp cluster within a nucleus.
@ DARK_NEUTRINO_MEDIATOR
Mediator particle for GENIE Dark Neutrino mode.
@ BINDINO
Binding energy subtracted from f/s nucleons.
@ COULOBTRON
Coulomb energy subtracted from f/s leptons.
@ ANTI_DARK_NEUTRINO
Dark matter particle for GENIE Dark Neutrino mode.
@ CLUSTER_NN
A nn cluster within a nucleus.
@ DARK_NEUTRINO
Dark matter particle for GENIE Dark Neutrino mode.
@ COMPOSITE_NUCLEON_CLUSTER
Nucleon cluster before phase decay.
@ ANTI_DARK_MATTER
Dark matter particle for GENIE Boosted Dark Matter mode.
@ HADRONIC_BLOB
Unmodelled fraction of the hadronic system.
@ HADRONIC_SYSTEM
DIS hadronic system before hadronization.

◆ JGeant4Type_t

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

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

Definition at line 18 of file JParticleTypes.hh.

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

◆ JTrackType_t

Enumeration of track types based on PDG codes.

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

Definition at line 96 of file JParticleTypes.hh.

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

◆ JQuarkType_t

Enumeration of quark types based on PDG codes.

Enumerator
QUARK_TYPE_DOWN 
QUARK_TYPE_UP 
QUARK_TYPE_STRANGE 
QUARK_TYPE_CHARM 
QUARK_TYPE_BOTTOM 
QUARK_TYPE_TOP 
QUARK_TYPE_ANTIDOWN 
QUARK_TYPE_ANTIUP 
QUARK_TYPE_ANTISTRANGE 
QUARK_TYPE_ANTICHARM 
QUARK_TYPE_ANTIBOTTOM 
QUARK_TYPE_ANTITOP 

Definition at line 173 of file JParticleTypes.hh.

173 { QUARK_TYPE_DOWN = 1,
174 QUARK_TYPE_UP = 2,
178 QUARK_TYPE_TOP = 6,
179
185 QUARK_TYPE_ANTITOP = -6 };
@ QUARK_TYPE_ANTICHARM
@ QUARK_TYPE_ANTIBOTTOM
@ QUARK_TYPE_ANTISTRANGE
@ QUARK_TYPE_ANTIDOWN

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

108 {
109 return hit.t;
110 }
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 119 of file JAAnetToolkit.hh.

120 {
121 return hit.a;
122 }
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 131 of file JAAnetToolkit.hh.

132 {
133 return hit.type == HIT_TYPE_NOISE;
134 }
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 144 of file JAAnetToolkit.hh.

145 {
146 JTimeRange time_range(JTimeRange::DEFAULT_RANGE());
147
148 for (std::vector<Hit>::const_iterator hit = event.mc_hits.begin(); hit != event.mc_hits.end(); ++hit) {
149 if (!is_noise(*hit)) {
150 time_range.include(getTime(*hit));
151 }
152 }
153
154 return time_range;
155 }
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 167 of file JAAnetToolkit.hh.

168 {
169 JTimeRange time_range = getTimeRange(event);
170
171 if (!time_range.is_valid()) {
172 time_range = T_ns;
173 }
174
175 if (time_range.getLength() < T_ns.getLength()) {
176 time_range.setLength(T_ns.getLength());
177 }
178
179 return time_range;
180 }
bool is_valid() const
Check validity of range.
Definition JRange.hh:311
void setLength(argument_type length)
Set length (difference between upper and lower limit).
Definition JRange.hh:300
T getLength() const
Get length (difference between upper and lower limit).
Definition JRange.hh:289

◆ getPosition() [1/3]

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

Get position.

Parameters
posposition
Returns
position

Definition at line 189 of file JAAnetToolkit.hh.

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

◆ getPosition() [2/3]

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

Get position.

Parameters
posposition
Returns
position

Definition at line 201 of file JAAnetToolkit.hh.

202 {
203 return Vec(pos.getX(), pos.getY(), pos.getZ());
204 }
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 213 of file JAAnetToolkit.hh.

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

◆ getDirection() [1/3]

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

Get direction.

Parameters
dirdirection
Returns
direction

Definition at line 225 of file JAAnetToolkit.hh.

226 {
227 return JDirection3D(dir.x, dir.y, dir.z);
228 }
Data structure for direction in three dimensions.

◆ getDirection() [2/3]

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

Get direction.

Parameters
dirdirection
Returns
direction

Definition at line 237 of file JAAnetToolkit.hh.

238 {
239 return Vec(dir.getDX(), dir.getDY(), dir.getDZ());
240 }
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 249 of file JAAnetToolkit.hh.

250 {
251 return getDirection(track.dir);
252 }
JDirection3D getDirection(const Vec &dir)
Get direction.
Vec dir
track direction
Definition Trk.hh:18

◆ getVertex() [1/2]

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

Get vertex.

Parameters
tracktrack
Returns
vertex

Definition at line 261 of file JAAnetToolkit.hh.

262 {
263 return JVertex3D(getPosition(track), track.t);
264 }
double t
track time [ns] (when the particle is at pos )
Definition Trk.hh:19

◆ getAxis()

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

Get axis.

Parameters
tracktrack
Returns
axis

Definition at line 273 of file JAAnetToolkit.hh.

274 {
275 return JAxis3D(getPosition(track), getDirection(track));
276 }
Axis object.
Definition JAxis3D.hh:41

◆ getTrack()

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

Get track.

Parameters
tracktrack
Returns
track

Definition at line 285 of file JAAnetToolkit.hh.

286 {
287 return JTrack3E(JTrack3D(getAxis(track), track.t), track.E);
288 }
3D track with energy.
Definition JTrack3E.hh:34
JAxis3D getAxis(const Trk &track)
Get axis.
double E
Energy [GeV] (either MC truth or reconstructed)
Definition Trk.hh:20

◆ getShower()

JShower3E JAANET::getShower ( const Trk & shower)
inline

Get shower.

Parameters
showershower
Returns
shower

Definition at line 297 of file JAAnetToolkit.hh.

298 {
299 return JShower3E(JShower3D(getVertex(shower), getDirection(shower)), shower.E);
300 }
3D shower with energy.
Definition JShower3E.hh:31
JVertex3D getVertex(const Trk &track)
Get vertex.

◆ getTransformation()

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

Get transformation.

Parameters
tracktrack
Returns
transformation

Definition at line 309 of file JAAnetToolkit.hh.

310 {
311 return JTransformation3D(getPosition(track), getDirection(track));
312 }

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

324 {
325 if (index < track.fitinf.size())
326 return track.fitinf[index];
327 else
328 return value;
329 }
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 338 of file JAAnetToolkit.hh.

338 { return (track.type == TRACK_TYPE_PHOTON ||
339 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 348 of file JAAnetToolkit.hh.

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

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

357 { return (abs(track.type) == TRACK_TYPE_NUE ||
358 abs(track.type) == TRACK_TYPE_NUMU ||
359 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 368 of file JAAnetToolkit.hh.

368{ 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 377 of file JAAnetToolkit.hh.

377{ 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 386 of file JAAnetToolkit.hh.

386{ 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 395 of file JAAnetToolkit.hh.

395{ 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 404 of file JAAnetToolkit.hh.

404{ 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 413 of file JAAnetToolkit.hh.

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

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

422 { return (is_electron(track) ||
423 is_muon (track) ||
424 is_tau (track)); }
bool is_electron(const Trk &track)
Test whether given track is a (anti-)electron.

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

433 { return (is_neutrino (track) ||
434 is_charged_lepton(track)); }
bool is_charged_lepton(const Trk &track)
Test whether given track is a charged lepton.

◆ is_nucleus()

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

Test whether given track is a nucleus.

Parameters
tracktrack
Returns
true if hadron; else fails

Definition at line 443 of file JAAnetToolkit.hh.

444 {
445 const int abstype = abs(track.type);
446
447 if (abstype / int(1e8) == 10) { // Check if abstype follows 10-digit scheme (10LZZZAAAI) for composite nuclei
448
449 const int Z = (abstype / 10000) % 1000;
450 const int A = (abstype / 10) % 1000;
451
452 return A >= 1 && A >= Z;
453
454 } else { // Check if track corresponds to a hydrogen nucleus
455
456 return track.type == TRACK_TYPE_PROTON;
457 }
458 }

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

467 { return (abs(track.type) != TRACK_TYPE_PHOTON &&
468 abs(track.type) / int(1e8) != 10 && // not a composite nucleus
469 !is_muonbundle(track) &&
470 !is_lepton (track)); }
bool is_muonbundle(const Trk &track)
Test whether given track is a (anti-)muon.

◆ is_baryon()

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

Test whether given track is a baryon.

Parameters
tracktrack
Returns
true if hadron; else fails

Definition at line 479 of file JAAnetToolkit.hh.

480 {
481 auto is_quark = [](const int pdg) { // Auxiliary function to check if given pdg corresponds to a quark
482 return (abs(pdg) >= QUARK_TYPE_UP && abs(pdg) <= QUARK_TYPE_TOP);
483 };
484
485 const int abstype = abs(track.type);
486
487 if (!is_hadron(track)) { return false; }
488
489 // Check whether abstype follows the 7-digit scheme (n nr nL nq1 nq2 nq3 nJ) for a baryon
490
491 const int n = abstype / int(1e6);
492
493 return ((n == 0 || n == 9) && // n equals 9 for pentaquarks, otherwise 0
494 abstype % 10 > 0 && // nJ = 2J + 1 > 0, where J is the total spin
495 is_quark((abstype / 10) % 10) && // nq1 corresponds to a quark
496 is_quark((abstype / 100) % 10) && // nq2 corresponds to a quark
497 is_quark((abstype / 1000) % 10)); // nq3 corresponds to a quark
498 }
const int n
Definition JPolint.hh:791

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

507{ return (is_hadron(track) && !is_baryon(track)); }
bool is_baryon(const Trk &track)
Test whether given track is a baryon.
bool is_hadron(const Trk &track)
Test whether given track is a hadron.

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

517{ 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 526 of file JAAnetToolkit.hh.

527 {
528 if (Evt::ROOT_IO_VERSION >= 14) {
529
530 const int absstat = abs(track.status); // Depending upon the generator version, tracks outside of the can may have a negative status flag
531
532 return (absstat == TRK_ST_PRIMARYNEUTRINO ||
533 absstat == TRK_ST_PRIMARYCOSMIC ||
534 absstat == TRK_ST_MUONBUNDLE ||
535 absstat == TRK_ST_ININUCLEI);
536
537 } else if (Evt::ROOT_IO_VERSION >= 11) {
538
539 return (track.mother_id == TRK_MOTHER_UNDEFINED ||
540 track.mother_id == TRK_MOTHER_NONE);
541
542 } else {
543
544 return is_neutrino(track) && track.id == 0;
545 }
546 }
bool is_neutrino(const Trk &track)
Test whether given track is a neutrino.
static int ROOT_IO_VERSION
Streamer version as obtained from ROOT file.
Definition Evt.hh:274
int status
MC or reconstruction 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
id of the parent MC particle or of the reconstructed track at the previous stage
Definition Trk.hh:29
static const int TRK_MOTHER_UNDEFINED
mother id was not defined for this track
Definition trkmembers.hh:14
static const int TRK_ST_MUONBUNDLE
initial state muon bundle (mupage)
Definition trkmembers.hh:20
static const int TRK_ST_PRIMARYCOSMIC
initial state cosmic ray ('track_primary' tag in evt files from corant).
Definition trkmembers.hh:19
static const int TRK_ST_PRIMARYNEUTRINO
initial state neutrino ('neutrino' tag in evt files from gseagen and genhen).
Definition trkmembers.hh:18
static const int TRK_ST_ININUCLEI
Initial state nuclei (gseagen)
Definition trkmembers.hh:21
static const int TRK_MOTHER_NONE
mother id of a particle if it has no parent
Definition trkmembers.hh:15

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

556 {
557 if (Evt::ROOT_IO_VERSION >= 15) {
558 return abs(track.status) == TRK_ST_FINALSTATE; // Depending upon the generator version, tracks outside of the can may have a negative status flag
559 } else {
560 return !is_initialstate(track);
561 }
562 }
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:17

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

572 {
573 if (Evt::ROOT_IO_VERSION >= 14) {
574
575 for (std::vector<Trk>::const_iterator i = evt.mc_trks.cbegin(); i != evt.mc_trks.cend(); ++i) {
576 if (abs(i->status) == TRK_ST_PRIMARYNEUTRINO) { return true; } // Depending upon the generator version, tracks outside of the can may have a negative status flag
577 }
578
579 return false;
580
581 } else {
582
583 return !evt.mc_trks.empty() && is_neutrino(evt.mc_trks[0]);
584 }
585 }
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 594 of file JAAnetToolkit.hh.

595 {
596 if (Evt::ROOT_IO_VERSION >= 14) {
597
598 for (std::vector<Trk>::const_iterator i = evt.mc_trks.cbegin(); i != evt.mc_trks.cend(); ++i) {
599 if (abs(i->status) == TRK_ST_PRIMARYNEUTRINO) { return *i; } // Depending upon the generator version, tracks outside of the can may have a negative status flag
600 }
601
602 } else if (!evt.mc_trks.empty() && is_neutrino(evt.mc_trks[0])) {
603
604 return evt.mc_trks[0];
605 }
606
607 THROW(JIndexOutOfRange, "JAANET::get_neutrino(): Event " << evt.id << " has no neutrino.");
608 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
int id
offline event identifier
Definition Evt.hh:22

◆ has_muonbundle()

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

Test whether given event has an incoming muonbundle.

Parameters
evtevent
Returns
true if muonbundle; else false

Definition at line 617 of file JAAnetToolkit.hh.

618 {
619 std::vector<Trk>::const_iterator i = find_if(evt.mc_trks.cbegin(), evt.mc_trks.cend(), is_muonbundle);
620
621 return i != evt.mc_trks.cend();
622 }

◆ get_muonbundle()

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

Get incoming muonbundle.

Parameters
evtevent
Returns
muonbundle

Definition at line 631 of file JAAnetToolkit.hh.

632 {
633 std::vector<Trk>::const_iterator i = find_if(evt.mc_trks.cbegin(), evt.mc_trks.cend(), is_muonbundle);
634
635 if (i != evt.mc_trks.cend()) { return *i; }
636
637 THROW(JIndexOutOfRange, "JAANET::get_muonbundle(): Event " << evt.id << " has no muonbundle.");
638 }

◆ has_target_nucleus()

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

Test whether given event contains target nucleus.

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

Definition at line 647 of file JAAnetToolkit.hh.

648 {
649 if (Evt::ROOT_IO_VERSION >= 14) {
650
651 for (std::vector<Trk>::const_iterator i = evt.mc_trks.cbegin(); i != evt.mc_trks.cend(); ++i) {
652 if (abs(i->status) == TRK_ST_ININUCLEI) { return true; } // Depending upon the generator version, tracks outside of the can may have a negative status flag
653 }
654
655 return false;
656
657 } else {
658
659 return false;
660 }
661 }

◆ get_target_nucleus()

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

Get target nucleus.

Parameters
evtevent
Returns
target nucleus

Definition at line 670 of file JAAnetToolkit.hh.

671 {
672 if (Evt::ROOT_IO_VERSION >= 14) {
673
674 for (std::vector<Trk>::const_iterator i = evt.mc_trks.cbegin(); i != evt.mc_trks.cend(); ++i) {
675 if (abs(i->status) == TRK_ST_ININUCLEI) { return *i; } // Depending upon the generator version, tracks outside of the can may have a negative status flag
676 }
677 }
678
679 THROW(JIndexOutOfRange, "JAANET::get_target_nucleus(): Target nucleus not stored for event " << evt.id << ".");
680 }

◆ has_target_nucleon()

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

Test whether given event contains target nucleon.

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

Definition at line 689 of file JAAnetToolkit.hh.

690 {
691 if (Evt::ROOT_IO_VERSION >= 14) {
692
693 for (std::vector<Trk>::const_iterator i = evt.mc_trks.cbegin(); i != evt.mc_trks.cend(); ++i) {
694
695 const int absstat = abs(i->status); // Depending upon the generator version, tracks outside of the can may have a negative status flag
696
697 if ((absstat == TRK_ST_NUCTGT) || // Check for target nucleon or for proton target nucleus
698 (absstat == TRK_ST_ININUCLEI && i->type == TRACK_TYPE_PROTON)) { return true; }
699 }
700
701 return false;
702
703 } else {
704
705 return false;
706 }
707 }
static const int TRK_ST_NUCTGT
Nucleon target (gseagen)
Definition trkmembers.hh:24

◆ get_target_nucleon()

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

Get target nucleon.

Parameters
evtevent
Returns
target nucleon

Definition at line 716 of file JAAnetToolkit.hh.

717 {
718 if (Evt::ROOT_IO_VERSION >= 14) {
719
720 for (std::vector<Trk>::const_iterator i = evt.mc_trks.cbegin(); i != evt.mc_trks.cend(); ++i) {
721
722 const int absstat = abs(i->status); // Depending upon the generator version, tracks outside of the can may have a negative status flag
723
724 if ((absstat == TRK_ST_NUCTGT) || // Check for target nucleon or for proton target nucleus
725 (absstat == TRK_ST_ININUCLEI && i->type == TRACK_TYPE_PROTON)) { return *i; }
726 }
727 }
728
729 THROW(JIndexOutOfRange, "JAANET::get_target_nucleon(): Target nucleon not stored for event " << evt.id << ".");
730 }

◆ has_primary()

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

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

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

Definition at line 739 of file JAAnetToolkit.hh.

740 {
741 for (std::vector<Trk>::const_iterator i = evt.mc_trks.cbegin(); i != evt.mc_trks.cend(); ++i) {
742 if (is_initialstate(*i) && abs(i->status) != TRK_ST_ININUCLEI) { // Depending upon the generator version, tracks outside of the can may have a negative status flag
743 return true;
744 }
745 }
746
747 return false;
748 }
bool is_initialstate(const Trk &track)
Test whether given track corresponds to an initial state particle.

◆ get_primary()

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

Auxiliary function to retrieve the primary track of an event.

Parameters
evtevent
Returns
primary track

Definition at line 757 of file JAAnetToolkit.hh.

758 {
759 for (std::vector<Trk>::const_iterator i = evt.mc_trks.cbegin(); i != evt.mc_trks.cend(); ++i) {
760 if (is_initialstate(*i) && abs(i->status) != TRK_ST_ININUCLEI) { // Depending upon the generator version, tracks outside of the can may have a negative status flag
761 return *i;
762 }
763 }
764
765 THROW(JIndexOutOfRange, "JAANET::get_primary(): Cannot retrieve primary track for event " << evt.id << ".");
766 }

◆ has_leading_lepton()

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

Auxiliary function to check if an event contains the leading lepton of a neutrino interaction.

Parameters
eventevent
Returns
true if event has the leading lepton; else false

Definition at line 775 of file JAAnetToolkit.hh.

776 {
777 if (has_neutrino(event)) {
778
779 const Trk& neutrino = get_neutrino(event);
780
781 for (std::vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
782 if (is_lepton(*i) && i->mother_id == neutrino.id) {
783 return true;
784 }
785 }
786 }
787
788 return false;
789 }
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
bool is_lepton(const Trk &track)
Test whether given track is a lepton.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
Definition Trk.hh:15

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

799 {
800 if (has_neutrino(event)) {
801
802 const Trk& neutrino = get_neutrino(event);
803
804 for (std::vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
805 if (is_lepton(*i) && i->mother_id == neutrino.id) {
806 return *i;
807 }
808 }
809
810 THROW(JIndexOutOfRange, "JAANET::get_leading_lepton(): Event " << event.id << " does not have a leading lepton.");
811
812 } else {
813
814 THROW(JIndexOutOfRange, "JAANET::get_leading_lepton(): Event " << event.id << " has no neutrino.");
815 }
816 }

◆ getVertex() [2/2]

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

Get event vertex.

Parameters
eventevent
Returns
event vertex

Definition at line 825 of file JAAnetToolkit.hh.

826 {
827 if (has_neutrino(event)) {
828
829 const Trk& neutrino = get_neutrino(event);
830
831 return getVertex(neutrino);
832
833 } else if (!event.mc_trks.empty()) {
834
835 std::vector<Trk>::const_iterator i = find_if(event.mc_trks.begin(), event.mc_trks.end(), is_initialstate);
836
837 if (i != event.mc_trks.end()) {
838 return getVertex(*i);
839 } else {
840 THROW(JIndexOutOfRange, "JAANET::getVertex(): No initial state track found for event " << event.id);
841 }
842
843 } else if (!event.trks.empty()) { // For reconstructed DAQ events
844
846
847 return getVertex(track);
848
849 } else {
850
851 THROW(JEmptyCollection, "JAANET::getVertex(): Track lists of event " << event.id << " are empty.");
852 }
853 }
std::vector< Trk > trks
list of reconstructed tracks (can be several because of prefits,showers, etc).
Definition Evt.hh:39
const Trk & get_best_reconstructed_track(const Evt &evt, JTrackSelector_t selector, JQualitySorter_t comparator)
Get best reconstructed track.

◆ count_electrons()

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

Count the number of electrons in a given event.

Parameters
evtevent
Returns
number of electrons

Definition at line 862 of file JAAnetToolkit.hh.

863 {
864 return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_electron);
865 }

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

875 {
876 return count_electrons(evt) != 0;
877 }
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 886 of file JAAnetToolkit.hh.

887 {
888 if (count_electrons(evt) > 0)
889 return *std::find_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_electron);
890 else
891 THROW(JIndexOutOfRange, "JAANET::get_electron(): Event " << evt.id << " has no electron.");
892 }
Exception for accessing an index in a collection that is outside of its range.
Definition JException.hh:92

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

905 {
907 }

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

917 {
918 return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_muon);
919 }

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

929 {
930 return count_muons(evt) != 0;
931 }
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 940 of file JAAnetToolkit.hh.

941 {
942 if (count_muons(evt) > 0)
943 return *std::find_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_muon);
944 else
945 THROW(JIndexOutOfRange, "JAANET::get_muon(): Event " << evt.id << " has no muon.");
946 }

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

959 {
960 return hit.type == GEANT4_TYPE_MUON || hit.type == GEANT4_TYPE_ANTIMUON;
961 }

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

971 {
972 return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_tau);
973 }

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

983 {
984 return count_taus(evt) > 0;
985 }
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 994 of file JAAnetToolkit.hh.

995 {
996 if (has_tau(evt))
997 return *std::find_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_tau);
998 else
999 THROW(JIndexOutOfRange, "JAANET::get_tau(): Event " << evt.id << " has no tau.");
1000 }
bool has_tau(const Evt &evt)
Test whether given event has a tau.

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

1010 {
1011 for (std::vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
1012
1013 if (is_tau(*i)) {
1014
1015 const Trk& tau = *i;
1016
1017 for (std::vector<Trk>::const_iterator j = event.mc_trks.cbegin(); j != event.mc_trks.cend(); ++j) {
1018 if (is_muon(*j) && j->mother_id == tau.id) {
1019 return true;
1020 }
1021 }
1022 }
1023 }
1024
1025 return false;
1026 }
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.

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

1036 {
1037 for (std::vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
1038
1039 if (is_tau(*i)) {
1040
1041 const Trk& tau = *i;
1042
1043 for (std::vector<Trk>::const_iterator j = event.mc_trks.cbegin(); j != event.mc_trks.cend(); ++j) {
1044 if ((is_electron(*j) || is_muon(*j)) && j->mother_id == tau.id) {
1045 return true;
1046 }
1047 }
1048 }
1049 }
1050
1051 return false;
1052 }

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

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

◆ count_taudecay_prongs() [1/2]

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

Count the number of tau-lepton decay prongs for the given tau lepton.

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

Parameters
eventevent
tauIDtrack ID of tau lepton
Returns
number of tau-lepton decay prongs

Definition at line 1075 of file JAAnetToolkit.hh.

1077 {
1078 std::vector<Trk>::const_iterator i = std::find_if(event.mc_trks.begin(), event.mc_trks.end(),
1079 make_predicate(&Trk::id, tauID));
1080
1081 if (i != event.mc_trks.end()) {
1082
1083 if (is_tau(*i)) {
1084
1085 int n = 0;
1086
1087 const Trk& tau = *i;
1088
1089 for (std::vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
1090 if (i->mother_id == tau.id && JPDB::getInstance().getPDG(i->type).charge != 0) {
1091 ++n;
1092 }
1093 }
1094
1095 return n;
1096
1097 } else {
1098
1099 THROW(JValueOutOfRange, "JAANET::count_taudecay_prongs(): Track " << tauID << " of event " << event.id << " does not correspond to a tau lepton.");
1100 }
1101
1102 } else {
1103
1104 THROW(JIndexOutOfRange, "JAANET::count_taudecay_prongs(): No track with ID " << tauID << " in event " << event.id << ".");
1105 }
1106 }

◆ count_taudecay_prongs() [2/2]

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

Count the number of tau-lepton decay prongs for the first tau among the event tracklist.

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

1117 {
1118 if (has_tau(event)) {
1119
1120 int n = 0;
1121
1122 const Trk& tau = get_tau(event);
1123
1124 for (std::vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
1125 if (i->mother_id == tau.id && JPDB::getInstance().getPDG(i->type).charge != 0) {
1126 ++n;
1127 }
1128 }
1129
1130 return n;
1131
1132 } else {
1133
1134 THROW(JIndexOutOfRange, "JAANET::count_taudecay_prongs(): Event " << event.id << " does not contain a tau lepton.");
1135 }
1136 }
const Trk & get_tau(const Evt &evt)
Get first tau from the event tracklist.

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

1149 {
1150 return hit.type == GEANT4_TYPE_TAU || hit.type == GEANT4_TYPE_ANTITAU;
1151 }

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

1161 {
1162 return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), is_hadron);
1163 }

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

1176 {
1177 return (!from_electron(hit) && !from_muon(hit) && !from_tau(hit));
1178 }
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 1189 of file JAAnetToolkit.hh.

1190 {
1191 for (std::vector<Trk>::iterator p = evt.mc_trks.begin(); p != evt.mc_trks.end(); p++) {
1192 p->t += tOff;
1193 }
1194 }

◆ getKineticEnergy()

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

Get track kinetic energy.

Parameters
trktrack
Returns
kinetic energy [GeV]

Definition at line 1203 of file JAAnetToolkit.hh.

1204 {
1205 const double energy = trk.E;
1206 const double mass = JPDB::getInstance().getPDG(trk.type).mass;
1207
1208 return getKineticEnergy(energy, mass);
1209 }

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

1220 {
1221 const Trk& neutrino = get_neutrino(evt);
1222
1223 if (has_target_nucleon(evt)) {
1224
1225 const Trk& target = get_target_nucleon(evt);
1226
1227 return neutrino.E + target.E;
1228
1229 } else {
1230
1231 // Default to calculation based on baryon number conservation and stationary target
1232 // if target nucleon information is unavailable
1233
1234 double E0 = neutrino.E;
1235
1236 for (std::vector<Trk>::const_iterator track = evt.mc_trks.cbegin(); track != evt.mc_trks.end(); ++track) {
1237
1238 if (is_finalstate(*track)) {
1239
1240 if (track->type == TRACK_TYPE_NEUTRON ||
1241 track->type == TRACK_TYPE_SIGMA_MINUS ||
1242 track->type == TRACK_TYPE_NEUTRAL_SIGMA) {
1243
1244 E0 += MASS_NEUTRON;
1245
1246 } else if (track->type == TRACK_TYPE_PROTON ||
1247 track->type == TRACK_TYPE_LAMBDA ||
1248 track->type == TRACK_TYPE_SIGMA_PLUS) {
1249
1250 E0 += MASS_PROTON;
1251
1252 } else if (track->type == TRACK_TYPE_ANTINEUTRON) {
1253
1254 E0 -= MASS_NEUTRON;
1255
1256 } else if (track->type == TRACK_TYPE_ANTIPROTON ||
1257 track->type == TRACK_TYPE_ANTILAMBDA) {
1258
1259 E0 -= MASS_PROTON;
1260 }
1261 }
1262 }
1263
1264 return E0;
1265 }
1266 }
bool has_target_nucleon(const Evt &evt)
Test whether given event contains target nucleon.
const Trk & get_target_nucleon(const Evt &evt)
Get target nucleon.
Target.
Definition JHead.hh:300

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

1277 {
1278 double E1 = 0.0;
1279
1280 const Trk& neutrino = get_neutrino(evt);
1281
1282 for (std::vector<Trk>::const_iterator track = evt.mc_trks.cbegin(); track != evt.mc_trks.cend(); ++track) {
1283
1284 if (is_finalstate(*track)) {
1285
1286 if (is_muon(*track)) {
1287
1288 const Trk& mother= (track->mother_id > TRK_MOTHER_UNDEFINED ? evt.mc_trks[track->mother_id] : neutrino);
1289
1290 if (is_muon(mother))
1291 E1 += mother.E;
1292 else
1293 E1 += gWater(track->E, -(track->pos - mother.pos).len());
1294
1295 } else {
1296
1297 E1 += track->E;
1298 }
1299 }
1300 }
1301
1302 return E1;
1303 }
bool is_finalstate(const Trk &track)
Test whether given track corresponds to a final state particle.

◆ get_target_nucleon_mass() [1/2]

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

Get target nucleon mass.

Parameters
evtevent
Returns
target nucleon mass [GeV]

Definition at line 1312 of file JAAnetToolkit.hh.

1313 {
1314 if (has_target_nucleon(evt)) {
1315
1316 const Trk& target = get_target_nucleon(evt);
1317
1318 return get_target_nucleon_mass(target.type);
1319
1320 } else if (has_neutrino(evt)) { // Compute target nucleon mass from initial state energy and neutrino energy if nucleon track unavailable
1321
1322 const Trk& neutrino = get_neutrino(evt);
1323
1324 const double E0 = getE0(evt);
1325
1326 return E0 - neutrino.E;
1327
1328 } else {
1329
1330 THROW(JIndexOutOfRange,
1331 "JAANET::get_target_nucleon_mass(): Unable to compute target nucleon mass for event " << evt.id << " without target nucleon or neutrino.");
1332 }
1333 }
double get_target_nucleon_mass(const Evt &evt)
Get target nucleon mass.

◆ getP0()

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

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

Fermi motion is accounted for if the target nucleon information is available.

Parameters
evtevent
Returns
initial state momentum vector [GeV]

Definition at line 1343 of file JAAnetToolkit.hh.

1344 {
1345 const Trk& neutrino = get_neutrino(evt);
1346
1347 Vec P0 = neutrino.E * neutrino.dir;
1348
1349 if (has_target_nucleon(evt)) { // Account for Fermi motion
1350
1351 const Trk& target = get_target_nucleon(evt);
1352
1353 const double mN = get_target_nucleon_mass(target.type);
1354
1355 P0 += getKineticEnergy(target.E, mN) * target.dir;
1356 }
1357
1358 return P0;
1359 }

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

1370 {
1371 Vec P1(0,0,0);
1372
1373 const Trk& neutrino = get_neutrino(evt);
1374
1375 for (std::vector<Trk>::const_iterator track = evt.mc_trks.cbegin(); track != evt.mc_trks.cend(); ++track) {
1376
1377 if (is_finalstate(*track)) {
1378
1379 Vec dir = track->dir;
1380 double kineticEnergy = 0.0;
1381
1382 if (is_muon(*track)) {
1383
1384 const Trk& mother = (track->mother_id > TRK_MOTHER_UNDEFINED ? evt.mc_trks[track->mother_id] : neutrino);
1385
1386 double energy = 0.0;
1387
1388 if (is_muon(mother)) {
1389 dir = mother.dir;
1390 energy = mother.E;
1391 } else {
1392 energy = gWater(track->E, -(track->pos - mother.pos).len());
1393 }
1394
1395 kineticEnergy = getKineticEnergy(energy, MASS_MUON);
1396
1397 } else {
1398
1399 kineticEnergy = getKineticEnergy(*track);
1400 }
1401
1402 P1 += kineticEnergy * dir;
1403 }
1404 }
1405
1406 return P1;
1407 }

◆ getQ2()

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

Get negative squared momentum transfer (Q^2 = -q^2 >= 0) of a neutrino interaction.

Parameters
eventevent
Returns
negative squared momentum transfer [GeV^2]

Definition at line 1416 of file JAAnetToolkit.hh.

1417 {
1418 const Trk& neutrino = get_neutrino(event);
1419 const Trk& LL = get_leading_lepton(event);
1420
1421 const double dE = (neutrino.E - LL.E);
1422 const Vec dp = (neutrino.E * neutrino.dir - getKineticEnergy(LL) * LL.dir);
1423
1424 return -dE*dE + dp.dot(dp);
1425 }
const Trk & get_leading_lepton(const Evt &event)
Auxiliary function to retrieve the leading lepton of a neutrino interaction.
double dot(const Vec &v) const
Get dot product.
Definition Vec.hh:36

◆ getS0()

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

Get initial state squared invariant mass of a neutrino interaction.

Parameters
eventevent
Returns
squared invariant mass [GeV^2]

Definition at line 1434 of file JAAnetToolkit.hh.

1435 {
1436 const double E0 = getE0(event);
1437 const Vec p0 = getP0(event);
1438
1439 return E0*E0 - p0.dot(p0);
1440 }
Vec getP0(const Evt &evt)
Get momentum vector of the initial state of a neutrino interaction.
double getE0(const Evt &evt)
Get initial state energy of a neutrino interaction.

◆ getS1()

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

Get final state squared invariant mass of a neutrino interaction.

Parameters
eventevent
Returns
squared invariant mass [GeV^2]

Definition at line 1449 of file JAAnetToolkit.hh.

1450 {
1451 const double E1 = getE1(event);
1452 const Vec p1 = getP1(event);
1453
1454 return E1*E1 - p1.dot(p1);
1455 }
TPaveText * p1
double getE1(const Evt &evt)
Get final state energy of a neutrino interaction.
Vec getP1(const Evt &evt)
Get momentum vector of the final state of a neutrino interaction.

◆ getInteractionID()

int JAANET::getInteractionID ( const Evt & event,
const bool useScatteringType = true,
const bool useDecayType = true )
inline

Retrieve interaction identifier.

The interaction identifier is defined as a 7 digit number. The first two digits indicate PDG code of the primary particle in the interaction. For neutrino-interactions, the 3rd digit differentiates the interaction type (CC: 2, NC: 3), whilst the 4th and 5th digits differentiate the scattering type (QE: 01, DIS: 03, RES: 04, COH: 05, DIFF: 06, MEC: 10). For tau-neutrino interactions, the last two digits are used to differentiate between tau-decay modes:

  • 21, for muonic tau-decays
  • 11, for electronic tau-decays
  • the number of prongs, for hadronic tau-decays.
Parameters
eventevent
useScatteringTypetoggle distinction between different scattering types
useDecayTypetoggle distinction between different tau-decays
Returns
interaction identifier

Definition at line 1475 of file JAAnetToolkit.hh.

1478 {
1479 const Trk& primary = get_primary(event);
1480
1481 int interactionType = 0;
1482 int scatteringType = 0;
1483 int decayType = 0;
1484
1485 if (is_neutrino(primary)) {
1486
1487 interactionType = event.w2list[W2LIST_GSEAGEN_CC];
1488
1489 if (useScatteringType) {
1490 scatteringType = event.w2list[W2LIST_GSEAGEN_ICHAN];
1491 }
1492
1493 if (abs(primary.type) == TRACK_TYPE_NUTAU && useDecayType) {
1494
1495 if (has_muonic_taudecay(event)) {
1496 decayType = 21;
1497 } else if (has_leptonic_taudecay(event)) {
1498 decayType = 11;
1499 } else {
1500 decayType = count_taudecay_prongs(event);
1501 }
1502 }
1503 }
1504
1505 const std::string IDstring = MAKE_STRING(FILL(2,'0') << primary.type <<
1506 FILL(1,'0') << interactionType <<
1507 FILL(2,'0') << scatteringType <<
1508 FILL(2,'0') << decayType);
1509
1510 return std::stoi(IDstring);
1511 }
#define MAKE_STRING(A)
Make string.
Definition JPrint.hh:48
const Trk & get_primary(const Evt &evt)
Auxiliary function to retrieve the primary track of an event.
int count_taudecay_prongs(const Evt &event, const int tauID)
Count the number of tau-lepton decay prongs for the given tau lepton.
Auxiliary data structure for sequence of same character.
Definition JManip.hh:330
Primary particle.
Definition JHead.hh:1174
static const int W2LIST_GSEAGEN_CC
Charged current interaction flag.
static const int W2LIST_GSEAGEN_ICHAN
Interaction channel.

◆ 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) || is_km3buu(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:1630
bool is_corsika(const JHead &header)
Check for generator.
bool is_gseagen(const JHead &header)
Check for generator.
bool is_mupage(const JHead &header)
Check for generator.
bool is_km3buu(const JHead &header)
Check for generator.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Helper class for event categories.
Container for a set of event categories.
Class for muon bundle categories.
Class for neutrino interaction categories.

◆ make_weightFactor() [1/2]

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

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

Parameters
functionfunction object
Returns
event-weight factor interface

Definition at line 288 of file JEvtWeightFactorFunction.hh.

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

◆ make_weightFactor() [2/2]

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

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

Parameters
functionfunction pointer
Returns
event-weight factor interface

Definition at line 300 of file JEvtWeightFactorFunction.hh.

◆ make_fluxFunction() [1/2]

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

Auxiliary method for creating an interface to a flux function.

Parameters
fluxflux function object
Returns
flux function interface

Definition at line 312 of file JEvtWeightFactorFunction.hh.

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

◆ make_fluxFunction() [2/2]

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

Auxiliary method for creating an interface to a flux function.

Parameters
fluxflux function pointer
Returns
flux function interface

Definition at line 323 of file JEvtWeightFactorFunction.hh.

323 {
325 }

◆ make_diffuseFluxFunction() [1/2]

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

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

Parameters
fluxdiffuse flux function object
Returns
diffuse flux function interface

Definition at line 335 of file JEvtWeightFactorFunction.hh.

◆ make_diffuseFluxFunction() [2/2]

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

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

Parameters
fluxdiffuse flux function pointer
Returns
diffuse flux function interface

Definition at line 346 of file JEvtWeightFactorFunction.hh.

◆ getVolume() [1/4]

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

Get volume of given event according given weighter.

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

Definition at line 99 of file JEvtWeightToolkit.hh.

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

◆ getVolume() [2/4]

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

Get volume of given event according given weighter.

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

Definition at line 114 of file JEvtWeightToolkit.hh.

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

◆ getVolume() [3/4]

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

Get volume of given event according given weighter.

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

Definition at line 129 of file JEvtWeightToolkit.hh.

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

◆ getVolume() [4/4]

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

Get volume of given event according given weighter.

The return value should be normalised to

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

Definition at line 155 of file JEvtWeightToolkit.hh.

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

◆ getInteractionType() [1/2]

JGENIEInteractionType_t JAANET::getInteractionType ( const int intType)
inline

Auxiliary function to convert interaction types.

Parameters
intTypeGENIE interaction type
Returns
GENIE interaction type

Definition at line 105 of file JGENIETypes.hh.

106 {
107 if (intType > (int) JGENIEInteractionType_t::INTERACTION_TYPES_START &&
108 intType < (int) JGENIEInteractionType_t::INTERACTION_TYPES_END) {
109 return static_cast<JGENIEInteractionType_t>(intType);
110 } else {
111 return JGENIEInteractionType_t::UNDEFINED;
112 }
113 }
JGENIEInteractionType_t
Enumeration of GENIE interaction types.

◆ getScatteringType()

JGENIEScatteringType_t JAANET::getScatteringType ( const int scatType)
inline

Auxiliary function to convert scattering types.

Parameters
scatTypeGENIE scattering type
Returns
GENIE scattering type

Definition at line 122 of file JGENIETypes.hh.

123 {
124 if ((scatType > (int) JGENIEScatteringType_t::NEUTRINO_SCATTERING_TYPES_START &&
125 scatType < (int) JGENIEScatteringType_t::NEUTRINO_SCATTERING_TYPES_END) ||
126 (scatType > (int) JGENIEScatteringType_t::DARK_MATTER_SCATTERING_TYPES_START &&
127 scatType > (int) JGENIEScatteringType_t::DARK_MATTER_SCATTERING_TYPES_END) ||
128 (scatType == (int) JGENIEScatteringType_t::UNKNOWN)) {
129 return static_cast<JGENIEScatteringType_t>(scatType);
130 } else {
131 return JGENIEScatteringType_t::UNDEFINED;
132 }
133 }
JGENIEScatteringType_t
Enumeration of GENIE scattering types.

◆ get_target_nucleon_mass() [2/2]

double JAANET::get_target_nucleon_mass ( const int type)
inline

Get target nucleon mass.

Parameters
typetarget nucleon PDG code
Returns
target nucleon mass [GeV]

Definition at line 142 of file JGENIETypes.hh.

143 {
144 switch (type) {
145
147 return MASS_PROTON;
148
150 return MASS_NEUTRON;
151
152 case (int) JGENIEPDGCodes_t::CLUSTER_PP:
153 return MASS_PROTON * 2;
154
155 case (int) JGENIEPDGCodes_t::CLUSTER_NN:
156 return MASS_NEUTRON * 2;
157
158 case (int) JGENIEPDGCodes_t::CLUSTER_NP:
159 return MASS_NEUTRON + MASS_PROTON;
160
161 default:
162 THROW(JValueOutOfRange, "get_target_nucleon_mass(): Unknown PDG code " << type);
163 }
164 }
Exception for accessing a value in a collection that is outside of its range.

◆ copy() [1/2]

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

Copy header from from to to.

Parameters
fromheader
toheader

Definition at line 157 of file JHead.cc.

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

◆ copy() [2/2]

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

Copy header from from to to.

Parameters
fromheader
toheader

Definition at line 196 of file JHead.cc.

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

◆ getTag() [1/2]

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

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

Parameters
tagtag
Returns
tag

Definition at line 94 of file JHead.hh.

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

◆ getTag() [2/2]

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

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

Parameters
tagtag
countercounter
Returns
tag

Definition at line 122 of file JHead.hh.

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

◆ operator==()

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

Equal operator.

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

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

Definition at line 1819 of file JHead.hh.

1821 {
1822 return JHead(first).match(JHead(second));
1823 }
Monte Carlo run header.
Definition JHead.hh:1236
bool match(const JHead &header) const
Test match of headers.
Definition JHead.hh:1492

◆ 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 1835 of file JHead.hh.

1837 {
1838 return JHead(first).less(JHead(second));
1839 }
bool less(const JHead &header) const
Comparison of headers.
Definition JHead.hh:1504

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

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

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

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

◆ is_mupage()

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

Check for generator.

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

Definition at line 87 of file JHeadToolkit.hh.

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

◆ is_corsika()

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

Check for generator.

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

Definition at line 105 of file JHeadToolkit.hh.

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

◆ is_km3buu()

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

Check for generator.

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

Definition at line 123 of file JHeadToolkit.hh.

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

◆ is_km3()

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

Check for detector simulation.

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

Definition at line 141 of file JHeadToolkit.hh.

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

◆ is_km3sim()

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

Check for detector simulation.

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

Definition at line 159 of file JHeadToolkit.hh.

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

◆ is_sirene()

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

Check for detector simulation.

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

Definition at line 177 of file JHeadToolkit.hh.

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

◆ is_pure_noise()

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

Check for generator.

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

Definition at line 195 of file JHeadToolkit.hh.

196 {
197 return header.K40.livetime_s > 0.0;
198 }
JAANET::K40 K40
Definition JHead.hh:1626
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 207 of file JHeadToolkit.hh.

208 {
209 return header.DAQ.livetime_s > 0.0;
210 }
JAANET::DAQ DAQ
Definition JHead.hh:1625
double livetime_s
Live time [s].
Definition JHead.hh:1053

◆ is_MC()

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

Check for Monte-Carlo simulations.

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

Definition at line 219 of file JHeadToolkit.hh.

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

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

294 {
295 if (header.is_valid(&JHead::fixedcan))
296 return Vec(0.0, 0.0, 0.0);
297 else if (header.is_valid(&JHead::can))
298 return Vec(0.0, 0.0, -header.can.zmin);
299 else if (header.is_valid(&JHead::coord_origin))
300 return header.coord_origin;
301 else
302 return Vec(0.0, 0.0, 0.0);
303 }
JAANET::coord_origin coord_origin
Definition JHead.hh:1619
JAANET::can can
Definition JHead.hh:1616
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 327 of file JHeadToolkit.hh.

328 {
329 if (header.is_valid(&JHead::fixedcan))
330 return Vec(header.fixedcan.xcenter, header.fixedcan.ycenter, 0.0);
331 else if (header.is_valid(&JHead::can))
332 return Vec(0.0, 0.0, header.can.zmin);
333 else if (header.is_valid(&JHead::coord_origin))
334 return Vec(0.0, 0.0, 0.0);
335 else
336 return Vec(0.0, 0.0, 0.0);
337 }
JAANET::fixedcan fixedcan
Definition JHead.hh:1617
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 349 of file JHeadToolkit.hh.

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

◆ has_mupage_weights()

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

Check for generator.

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

Definition at line 385 of file JHeadToolkit.hh.

386 {
387 for (const auto& i : header.simul) {
388
389 if (i.program == APPLICATION_MUPAGE) {
390
391 std::string buffer = i.version;
392
393 if (!buffer.empty()) {
394
395 if (buffer[0] == 'v' ||
396 buffer[0] == 'V') {
397 buffer.erase(0,1);
398 }
399
400 const JEEP::JVersion version(buffer);
401
402 return version >= MUPAGE_MINIMAL_VERSION;
403 }
404 }
405 }
406
407 return false;
408 }
Auxiliary data structure for general purpose version number.

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

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

JGENIEInteractionType_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) || is_km3buu(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 JGENIEInteractionType_t::WEAK_NEUTRAL_CURRENT;
88 } else if (buffer == string(CHARGED_CURRENT)) {
89 return JGENIEInteractionType_t::WEAK_CHARGED_CURRENT;
90 }
91 }
92 }
93 }
94
95 return JGENIEInteractionType_t::UNDEFINED;
96 }

◆ getTargetInfo()

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

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

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

Definition at line 106 of file JNeutrinoInteractionCategory.hh.

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

◆ getQuarks()

const JPDBSelection & JAANET::getQuarks ( )
inline

Retrieve quark entries from particle data book.

Returns
quark entries

Definition at line 317 of file JPDB.hh.

318 {
319 const std::vector<int> pdgs = { QUARK_TYPE_UP,
331
332 static const JPDBSelection quarks(pdgs);
333
334 return quarks;
335 }

◆ getChargedLeptons()

const JPDBSelection & JAANET::getChargedLeptons ( )
inline

Retrieve charged lepton entries from particle data book.

Returns
charged lepton entries

Definition at line 343 of file JPDB.hh.

344 {
351
352 static const JPDBSelection charged_leptons(pdgs);
353
354 return charged_leptons;
355 }

◆ 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 104 of file JAAnet/JEvD.cc.

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

◆ getW() [2/3]

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

Get associated value.

Parameters
trktrack
iindex
Returns
value

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

118 {
119 return trk.fitinf.at(i);
120 }

◆ 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 131 of file JAAnet/JEvD.cc.

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

◆ setW()

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

Set associated value.

Parameters
trktrack
iindex
valuevalue

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

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

Variable Documentation

◆ AASHOWER_RECONSTRUCTION_TYPE

const int JAANET::AASHOWER_RECONSTRUCTION_TYPE = 101
static

AAnet shower fit reconstruction type.

Definition at line 81 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.

◆ PRIMARY_QUARK_PDG_KEY

const char* const JAANET::PRIMARY_QUARK_PDG_KEY = "primary_quark_pdg"
static

ID string for primary quark user info.

Definition at line 43 of file JEvtWeightFactorRadiativeCorrections.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 268 of file JHeadToolkit.hh.

◆ MUPAGE_MINIMAL_VERSION

const JEEP::JVersion JAANET::MUPAGE_MINIMAL_VERSION(6, 0, 2) ( 6 ,
0 ,
2  )
static

MUPAGE minimal version using weights.

◆ HONDA_ENERGY_KEYWORD

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

Definition at line 53 of file JHondaFluxInterpolator.hh.

◆ HONDA_COSINE_ZENITH_ANGLE_KEYWORD

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

Definition at line 54 of file JHondaFluxInterpolator.hh.

◆ HONDA_AZIMUTH_ANGLE_KEYWORD

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

Definition at line 55 of file JHondaFluxInterpolator.hh.

◆ HONDA_MUON_NEUTRINO_FLUX_KEYWORD

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

Definition at line 57 of file JHondaFluxInterpolator.hh.

◆ HONDA_MUON_ANTINEUTRINO_FLUX_KEYWORD

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

Definition at line 58 of file JHondaFluxInterpolator.hh.

◆ HONDA_ELECTRON_NEUTRINO_FLUX_KEYWORD

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

Definition at line 59 of file JHondaFluxInterpolator.hh.

◆ HONDA_ELECTRON_ANTINEUTRINO_FLUX_KEYWORD

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

Definition at line 60 of file JHondaFluxInterpolator.hh.

◆ HONDA_BINSPECS_SEPARATOR

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

Definition at line 62 of file JHondaFluxInterpolator.hh.

◆ HONDA_BINSPECS_BEGIN

const char JAANET::HONDA_BINSPECS_BEGIN = '['
static

Definition at line 63 of file JHondaFluxInterpolator.hh.

◆ HONDA_BINSPECS_END

const char JAANET::HONDA_BINSPECS_END = ']'
static

Definition at line 64 of file JHondaFluxInterpolator.hh.

◆ DEFAULT_BUNDLE_ENERGY_RANGE

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

Default bundle energy range [GeV].

Definition at line 44 of file JMuonBundleCategory.hh.

◆ DEFAULT_BUNDLE_COSINE_ZENITH_ANGLE_RANGE

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

Default bundle cosine zenith angle range [-].

Definition at line 45 of file JMuonBundleCategory.hh.

◆ DEFAULT_BUNDLE_MULTIPLICITY_RANGE

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

Default bundle multiplicity range [-].

Definition at line 46 of file JMuonBundleCategory.hh.

◆ DEFAULT_BUNDLE_RADIAL_EXTENT

const double JAANET::DEFAULT_BUNDLE_RADIAL_EXTENT = 1e5
static

Default bundle radial extent [m].

Definition at line 47 of file JMuonBundleCategory.hh.

◆ NEUTRAL_CURRENT

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

Neutral current header string identifier.

Definition at line 43 of file JNeutrinoInteractionCategory.hh.

◆ CHARGED_CURRENT

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

Charged current header string identifier.

Definition at line 44 of file JNeutrinoInteractionCategory.hh.

◆ DEFAULT_NEUTRINO_ENERGY_RANGE

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

Default neutrino energy range [GeV].

Definition at line 47 of file JNeutrinoInteractionCategory.hh.

◆ DEFAULT_NEUTRINO_COSINE_ZENITH_ANGLE_RANGE

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

Default neutrino cosine zenith angle range [-].

Definition at line 48 of file JNeutrinoInteractionCategory.hh.