#ifndef __JTRIGGER__JTRIGGER3DSHOWER__ #define __JTRIGGER__JTRIGGER3DSHOWER__ #include "JPhysics/JConstants.hh" #include "JTrigger/JMatch3G.hh" #include "JTrigger/JTrigger3DShower_t.hh" #include "JTrigger/JTrigger3D.hh" /** * \author mdejong */ namespace JTRIGGER {} namespace JPP { using namespace JTRIGGER; } namespace JTRIGGER { /** * Shower trigger. */ class JTrigger3DShower : public JTrigger3D { public: /** * Constructor. * * \param input trigger parameters */ JTrigger3DShower(const JTrigger3DShower_t::JParameters& input) : JTrigger3D(getParameters(input)) {} /** * Convert trigger parameters. * * \param input trigger parameters * \return trigger parameters */ static JTrigger3D::JParameters getParameters(const JTrigger3DShower_t::JParameters& input) { using namespace JTOOLS; const double TMaxEvent_ns = input.DMax_m * getIndexOfRefraction() * getInverseSpeedOfLight(); return JTrigger3D::JParameters(input.enabled, input.numberOfHits, input.numberOfModules, TMaxEvent_ns + input.TMaxExtra_ns, JMatch3G(input.DMax_m, input.TMaxExtra_ns), input.factoryLimit); } }; } #endif