#ifndef __JTRIGGER__JTRIGGER3DMUON_T__ #define __JTRIGGER__JTRIGGER3DMUON_T__ #include "JROOT/JRoot.hh" /** * \author mdejong */ namespace JTRIGGER {} namespace JPP { using namespace JTRIGGER; } namespace JTRIGGER { /** * Muon trigger parameters. */ struct JTrigger3DMuon_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 roadWidth_m maximal road width [m] * \param gridAngle_deg grid angle [deg] * \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 roadWidth_m, const double gridAngle_deg, const double TMaxExtra_ns, const int factoryLimit) { this->enabled = enabled; this->numberOfHits = numberOfHits; this->numberOfModules = numberOfModules; this->DMax_m = DMax_m; this->roadWidth_m = roadWidth_m; this->gridAngle_deg = gridAngle_deg; this->TMaxExtra_ns = TMaxExtra_ns; this->factoryLimit = factoryLimit; } /** * Virtual destructor. */ virtual ~JParameters() {} /** * Reset trigger parameters. */ void reset() { enabled = false; numberOfHits = 5; numberOfModules = 5; DMax_m = 1000.0; roadWidth_m = 120.0; gridAngle_deg = 10.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 && roadWidth_m == parameters.roadWidth_m && gridAngle_deg == parameters.gridAngle_deg && 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 roadWidth_m; ///< maximal road width [m] double gridAngle_deg; ///< grid angle [deg] double TMaxExtra_ns; ///< maximal extra time [ns] int factoryLimit; ///< maximal number of hits to apply trigger logic (above this limit, always trigger) }; }; } #endif