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

Constructor & Destructor Documentation

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

Constructor.

Parameters
vertexmuon starting point

Definition at line 311 of file JSireneToolkit.hh.

311  :
312  std::vector<JVertex>(1, vertex)
313  {}

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

323  {
324  if (!this->empty()) {
325 
326  const_iterator pos = lower_bound(this->begin(), this->end(), z, JLANG::make_comparator(&JVertex::getZ));
327 
328  if (pos != this->end() && pos != this->begin()) {
329 
330  --pos;
331 
332  return pos->getE() - (z - pos->getZ()) * gWater.getA();
333  }
334  }
335 
336  return MASS_MUON;
337  }
static const JGeane gWater(2.67e-1 *JTOOLS::DENSITY_SEA_WATER, 3.4e-4 *JTOOLS::DENSITY_SEA_WATER)
Function object for Energy loss of muon in sea water.
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:143
static const double MASS_MUON
muon mass [GeV]
Definition: JConstants.hh:59
double getZ() const
Get position.
double getA() const
Get energy loss constant.
Definition: JGeane.hh:57

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