Jpp  15.0.5
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 330 of file JSireneToolkit.hh.

Constructor & Destructor Documentation

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

Constructor.

Parameters
vertexmuon starting point

Definition at line 338 of file JSireneToolkit.hh.

338  :
339  std::vector<JVertex>(1, vertex)
340  {}

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 349 of file JSireneToolkit.hh.

350  {
351  if (!this->empty()) {
352 
353  const_iterator pos = lower_bound(this->begin(), this->end(), z, JLANG::make_comparator(&JVertex::getZ));
354 
355  if (pos != this->end() && pos != this->begin()) {
356 
357  --pos;
358 
359  return pos->getE() - (z - pos->getZ()) * gWater.getA();
360  }
361  }
362 
363  return MASS_MUON;
364  }
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: