Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
JSIRENE::JTrack Struct Reference

Muon trajectory. More...

#include <JSireneToolkit.hh>

Inheritance diagram for JSIRENE::JTrack:
std::vector< JVertex >

Public Member Functions

 JTrack (const JVertex &vertex)
 Constructor. More...
 
double getE (const double z) const
 Get muon energy at given position. More...
 

Detailed Description

Muon trajectory.

Definition at line 326 of file JSireneToolkit.hh.

Constructor & Destructor Documentation

JSIRENE::JTrack::JTrack ( const JVertex vertex)
inline

Constructor.

Parameters
vertexmuon starting point

Definition at line 334 of file JSireneToolkit.hh.

334  :
335  std::vector<JVertex>(1, vertex)
336  {}

Member Function Documentation

double JSIRENE::JTrack::getE ( const double  z) const
inline

Get muon energy at given position.

Parameters
zposition [m]
Returns
energy [GeV]

Definition at line 345 of file JSireneToolkit.hh.

346  {
347  if (!this->empty()) {
348 
349  const_iterator pos = lower_bound(this->begin(), this->end(), z, JLANG::make_comparator(&JVertex::getZ));
350 
351  if (pos != this->end() && pos != this->begin()) {
352 
353  --pos;
354 
355  return pos->getE() - (z - pos->getZ()) * gWater.getA();
356  }
357  }
358 
359  return MASS_MUON;
360  }
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member.
Definition: JComparator.hh:185
static const double MASS_MUON
muon mass [GeV]
static const JGeaneWater gWater
Function object for energy loss of muon in sea water.
Definition: JGeane.hh:323
double getZ() const
Get position.
virtual double getA() const override
Get energy loss constant.
Definition: JGeane.hh:229

The documentation for this struct was generated from the following file: