Go to the documentation of this file. 1 #ifndef __JPHYSICS__JPDFTYPES__
2 #define __JPHYSICS__JPDFTYPES__
62 std::ostringstream os;
80 static const char* digits =
"0123456789";
86 string::size_type pos = buffer.find_first_of(digits);
88 if (pos != string::npos) {
90 string::size_type len = buffer.substr(pos).find_first_not_of(digits);
92 istringstream(buffer.substr(pos, len)) >> type;
107 return (file_name.find(
WILD_CARD) != std::string::npos);
126 string buffer = file_name;
128 string::size_type pos = buffer.find(
WILD_CARD);
130 if (pos == string::npos) {
131 throw JException(
string(
"Method getFilename(): Missing wild card character \'") +
WILD_CARD +
"\'.");
134 return buffer.replace(pos, 1,
getLabel(pdf));
std::string getFilename(const std::string &file_name, const JPDFType_t pdf)
Get PDF file name.
direct light from delta-rays
direct and scattered light from EM shower
bool is_deltarays(const int pdf)
Test if given PDF type corresponds to Cherenkov light from delta-rays.
direct + scattered light from HADRONIC shower
direct light from EM shower
Auxiliary classes and methods for calculation of PDF and muon energy loss.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
int getPDFType(const std::string &file_name)
Get PDF type.
direct and scattered light from EM showers
scattered light from EM shower
bool hasWildCard(const std::string &file_name)
Check wild card.
bool is_bremsstrahlung(const int pdf)
Test if given PDF type corresponds to Cherenkov light from Bremsstrahlung.
std::string getFilename(const std::string &file_name)
Get file name part, i.e.
std::string getLabel(const JPDFType_t pdf)
Get PDF label.
scattered light from EM showers
scattered light from muon
direct and scattered light from muon
direct and scattered light from delta-rays
bool is_scattered(const int pdf)
Test if given PDF type corresponds to scattered light.
static const char WILD_CARD
wild card character for file name substitution
bool is_muon(const int pdf)
Test if given PDF type corresponds to Cherenkov light from muon.
direct light from EM showers
scattered light from delta-rays
scattered light from muon