#ifndef __JTRIGGER__JTRIGGERMXSHOWER_T__ #define __JTRIGGER__JTRIGGERMXSHOWER_T__ #include "JROOT/JRoot.hh" /** * \author mdejong */ namespace JTRIGGER {} namespace JPP { using namespace JTRIGGER; } namespace JTRIGGER { /** * Shower trigger parameters. */ struct JTriggerMXShower_t { /** * Trigger parameters. */ class JParameters { public: /** * Default constructor. */ JParameters() { reset(); } /** * Constructor. * * \param enabled enabled status of trigger * \param numberOfHits minimal number of hits to trigger event * \param numberOfModules minimal number of modules to trigger event * \param DMax_m maximal distance between PMTs [m] * \param TMaxExtra_ns maximal extra time [ns] * \param factoryLimit maximal number of hits to apply trigger logic (above this limit, always trigger) */ JParameters(const bool enabled, const int numberOfHits, const int numberOfModules, const double DMax_m, const double TMaxExtra_ns, const int factoryLimit) { this->enabled = enabled; this->numberOfHits = numberOfHits; this->numberOfModules = numberOfModules; this->DMax_m = DMax_m; this->TMaxExtra_ns = TMaxExtra_ns; this->factoryLimit = factoryLimit; } /** * Virtual destructor. */ virtual ~JParameters() {} /** * Reset trigger parameters. */ void reset() { enabled = false; numberOfHits = 8; numberOfModules = 8; DMax_m = 43.0; TMaxExtra_ns = 20.0; factoryLimit = 100; } /** * Equality * * \param parameters trigger parameters * \return true if equals; else false */ bool equals(const JParameters& parameters) const { return (enabled == parameters.enabled && numberOfHits == parameters.numberOfHits && numberOfModules == parameters.numberOfModules && DMax_m == parameters.DMax_m && TMaxExtra_ns == parameters.TMaxExtra_ns && factoryLimit == parameters.factoryLimit); } ClassDef(JParameters,3); bool enabled; ///< enabled status of trigger int numberOfHits; ///< minimal number of hits to trigger event int numberOfModules; ///< minimal number of modules to trigger event double DMax_m; ///< maximal distance between PMTs [m] double TMaxExtra_ns; ///< maximal extra time [ns] int factoryLimit; ///< maximal number of hits to apply trigger logic (above this limit, always trigger) }; }; } #endif