Jpp  16.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
km3-opa_efrac.hh
Go to the documentation of this file.
1 #ifndef __KM3_OPA_EFRAC__
2 #define __KM3_OPA_EFRAC__
3 
4 #include "JAAnet/JPDB.hh"
5 
6 
7 /**
8  * \author mdejong
9  */
10 
11 extern "C"
12 {
13  float opa_efrac_(int& ipart, float& ekin);
14  float opa_weight_high_e_(float& ekin);
15 }
16 
17 namespace JSIRENE {}
18 namespace JPP { using namespace JSIRENE; }
19 
20 namespace JSIRENE {
21 
22  using JAANET::JPDB;
23 
24  /**
25  * Get equivalent EM-energy for given pion energy.
26  *
27  * \param type particle type [PDG]
28  * \param E particle energy [GeV]
29  * \return EM-equivalent energy [GeV]
30  */
31  inline double pythia(const int type, const double E)
32  {
33  int ipart = JPDB::getInstance().getPDG(type).geant;
34  float ekin = (float) E;
35 
36  return opa_efrac_(ipart, ekin) * E;
37  }
38 }
39 
40 #endif
then usage E
Definition: JMuonPostfit.sh:35
const JParticle & getPDG(const int pdg) const
Get particle corresponding to given PDG code.
Definition: JPDB.hh:255
static const JPythia pythia
Function object for relative light yield as a function of GEANT particle code.
Definition: JPythia.hh:96
Collection of particles.
Definition: JPDB.hh:104
static const JPDB & getInstance()
Get particle data book.
Definition: JPDB.hh:120
float opa_efrac_(int &ipart, float &ekin)
float opa_weight_high_e_(float &ekin)
int geant
GEANT code of particle.
Definition: JPDB.hh:86