#ifndef __JFIT__JK40HIT__ #define __JFIT__JK40HIT__ #include "km3net-dataformat/online/JDAQModuleIdentifier.hh" #include "JFit/JK40.hh" /** * \author mdejong */ namespace JFIT {} namespace JPP { using namespace JFIT; } namespace JFIT { using KM3NETDAQ::JDAQModuleIdentifier; /** * Auxiliary class for simultaneously handling light yields and response of module. */ struct JK40Hit : public JDAQModuleIdentifier, public JK40 { using JK40::getP; /** * Default constructor. */ JK40Hit() : JDAQModuleIdentifier(), JK40(), __n (0) {} /** * Constructor. * * \param id module identifier * \param k40 k40 * \param n number of hits */ JK40Hit(const JDAQModuleIdentifier& id, const JK40& k40, const size_t n) : JDAQModuleIdentifier(id), JK40(k40), __n (n) {} /** * Get number of hits. * * \return number of hits */ inline size_t getN() const { return __n; } /** * Get probability. * * \return probability */ double getP() const { return this->getP(this->getN()); } protected: size_t __n; }; } #endif