1#ifndef __JSIRENE__JVISIBLEENERGYTOOLKIT__
2#define __JSIRENE__JVISIBLEENERGYTOOLKIT__
52 const double R_Earth = R_EARTH_KM * 1e3;
80 if (is_finalstate(track)) {
82 const bool isMuon = is_muon(track);
90 const double Lmuon = gWater.getX(track.
E, MASS_MUON / getSinThetaC());
91 const double Leff = (min(Lmuon, max(intersection.second, 0.0)) -
92 min(Lmuon, max(intersection.first, 0.0)));
97 const double Emidpoint = gWater.getE(track.
E, Lmuon/2.0);
99 const double dEb = gWater.getEb(track.
E, Leff);
100 const double dEc = Leff / geanc();
101 const double dEd = Leff * JDeltaRays::getEnergyLossFromMuon(Emidpoint);
103 Evis = dEb + dEc + dEd;
106 can.is_inside(getPosition(track))) {
108 Evis =
pythia(track.
type, getKineticEnergy(track));
140 std::vector<Trk>::const_iterator __end,
147 for (vector<Trk>::const_iterator track = __begin; track != __end; ++track) {
165 std::vector<Trk>::const_iterator __end,
170 Vec Evis(0.0, 0.0, 0.0);
172 for (vector<Trk>::const_iterator track = __begin; track != __end; ++track) {
225 const Trk& leading_lepton = get_leading_lepton(event);
227 if (is_finalstate(leading_lepton)) {
230 for (vector<Trk>::const_iterator track = event.
mc_trks.cbegin(); track != event.
mc_trks.cend(); ++track) {
231 if (is_finalstate(*track) && track->
mother_id == leading_lepton.
id) {
254 Vec Evis(0.0, 0.0, 0.0);
256 const Trk& leading_lepton = get_leading_lepton(event);
258 if (is_finalstate(leading_lepton)) {
261 for (vector<Trk>::const_iterator track = event.
mc_trks.cbegin(); track != event.
mc_trks.cend(); ++track) {
262 if (is_finalstate(*track) && track->
mother_id == leading_lepton.
id) {
Definition of particle types.
Data structure for circle in two dimensions.
Data structure for vector in two dimensions.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
const JCylinder3D getMaximumContainmentVolume()
Forward function declarations.
double getVisibleEnergyLeadingLepton(const Trk &, const JCylinder3D &)
Vec getVisibleEnergyVectorLeadingLepton(const Evt &event, const JCylinder3D &can=getMaximumContainmentVolume())
Get visible energy vector of the leading lepton of a neutrino interaction.
double getVisibleEnergy(const Trk &, const JCylinder3D &)
Get the visible energy of a track.
static const JPythia pythia
Function object for relative light yield as a function of GEANT particle code.
Vec getVisibleEnergyVector(const Trk &track, const JCylinder3D &can=getMaximumContainmentVolume())
Get the visible energy vector of a track.
This file contains converted Fortran code from km3.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
static const JPDB & getInstance()
Get particle data book.
The cylinder used for photon tracking.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
int type
MC: particle type in PDG encoding.
double E
Energy [GeV] (either MC truth or reconstructed)
int mother_id
id of the parent MC particle or of the reconstructed track at the previous stage
The Vec class is a straightforward 3-d vector, which also works in pyroot.