#ifndef __JTRIGGER__JGETRISETIME__ #define __JTRIGGER__JGETRISETIME__ #include /** * \file * * Rise time evaluation. * \author mdejong */ namespace JTRIGGER {} namespace JPP { using namespace JTRIGGER; } namespace JTRIGGER { /** * Auxiliary class for rise time evaluation. * * The current values of the parameters are obtained with JCalibrateMuon.cc and JFrodo.cc. */ struct JGetRiseTime : public std::vector { /** * Default constructor. */ JGetRiseTime() { // Produced by JFrodo.cc; to be included on JGetRiseTime.hh. this->push_back( 8.01); this->push_back( 7.52); this->push_back( 7.05); this->push_back( 6.59); this->push_back( 6.15); this->push_back( 5.74); this->push_back( 5.33); this->push_back( 4.95); this->push_back( 4.58); this->push_back( 4.22); this->push_back( 3.89); this->push_back( 3.56); this->push_back( 3.25); this->push_back( 2.95); this->push_back( 2.66); this->push_back( 2.39); this->push_back( 2.12); this->push_back( 1.87); this->push_back( 1.63); this->push_back( 1.40); this->push_back( 1.19); this->push_back( 0.98); this->push_back( 0.78); this->push_back( 0.60); this->push_back( 0.41); this->push_back( 0.24); this->push_back( 0.07); this->push_back( -0.10); this->push_back( -0.27); this->push_back( -0.43); this->push_back( -0.59); this->push_back( -0.75); this->push_back( -0.91); this->push_back( -1.08); this->push_back( -1.24); this->push_back( -1.41); this->push_back( -1.56); this->push_back( -1.71); this->push_back( -1.85); this->push_back( -1.98); this->push_back( -2.11); this->push_back( -2.23); this->push_back( -2.35); this->push_back( -2.47); this->push_back( -2.58); this->push_back( -2.69); this->push_back( -2.79); this->push_back( -2.89); this->push_back( -2.99); this->push_back( -3.09); this->push_back( -3.19); this->push_back( -3.28); this->push_back( -3.37); this->push_back( -3.46); this->push_back( -3.55); this->push_back( -3.64); this->push_back( -3.72); this->push_back( -3.80); this->push_back( -3.88); this->push_back( -3.96); this->push_back( -4.04); this->push_back( -4.12); this->push_back( -4.20); this->push_back( -4.27); this->push_back( -4.35); this->push_back( -4.42); this->push_back( -4.49); this->push_back( -4.56); this->push_back( -4.63); this->push_back( -4.70); this->push_back( -4.77); this->push_back( -4.84); this->push_back( -4.90); this->push_back( -4.97); this->push_back( -5.03); this->push_back( -5.10); this->push_back( -5.16); this->push_back( -5.22); this->push_back( -5.28); this->push_back( -5.34); this->push_back( -5.40); this->push_back( -5.46); this->push_back( -5.52); this->push_back( -5.58); this->push_back( -5.63); this->push_back( -5.69); this->push_back( -5.74); this->push_back( -5.80); this->push_back( -5.85); this->push_back( -5.91); this->push_back( -5.96); this->push_back( -6.01); this->push_back( -6.06); this->push_back( -6.11); this->push_back( -6.16); this->push_back( -6.21); this->push_back( -6.26); this->push_back( -6.31); this->push_back( -6.36); this->push_back( -6.41); this->push_back( -6.45); this->push_back( -6.50); this->push_back( -6.55); this->push_back( -6.59); this->push_back( -6.64); this->push_back( -6.68); this->push_back( -6.72); this->push_back( -6.77); this->push_back( -6.81); this->push_back( -6.85); this->push_back( -6.89); this->push_back( -6.93); this->push_back( -6.98); this->push_back( -7.02); this->push_back( -7.06); this->push_back( -7.09); this->push_back( -7.13); this->push_back( -7.17); this->push_back( -7.21); this->push_back( -7.25); this->push_back( -7.28); this->push_back( -7.32); this->push_back( -7.36); this->push_back( -7.39); this->push_back( -7.43); this->push_back( -7.46); this->push_back( -7.50); this->push_back( -7.53); this->push_back( -7.57); this->push_back( -7.60); this->push_back( -7.63); this->push_back( -7.66); this->push_back( -7.70); this->push_back( -7.73); this->push_back( -7.76); this->push_back( -7.79); this->push_back( -7.82); this->push_back( -7.85); this->push_back( -7.88); this->push_back( -7.91); this->push_back( -7.94); this->push_back( -7.97); this->push_back( -7.99); this->push_back( -8.02); this->push_back( -8.05); this->push_back( -8.07); this->push_back( -8.10); this->push_back( -8.13); this->push_back( -8.15); this->push_back( -8.18); this->push_back( -8.20); this->push_back( -8.23); this->push_back( -8.25); this->push_back( -8.28); this->push_back( -8.30); this->push_back( -8.32); this->push_back( -8.34); this->push_back( -8.37); this->push_back( -8.39); this->push_back( -8.41); this->push_back( -8.43); this->push_back( -8.45); this->push_back( -8.47); this->push_back( -8.49); this->push_back( -8.51); this->push_back( -8.53); this->push_back( -8.55); this->push_back( -8.57); this->push_back( -8.59); this->push_back( -8.61); this->push_back( -8.62); this->push_back( -8.64); this->push_back( -8.66); this->push_back( -8.67); this->push_back( -8.69); this->push_back( -8.70); this->push_back( -8.72); this->push_back( -8.74); this->push_back( -8.75); this->push_back( -8.76); this->push_back( -8.78); this->push_back( -8.79); this->push_back( -8.81); this->push_back( -8.82); this->push_back( -8.83); this->push_back( -8.84); this->push_back( -8.86); this->push_back( -8.87); this->push_back( -8.88); this->push_back( -8.89); this->push_back( -8.90); this->push_back( -8.92); this->push_back( -8.93); this->push_back( -8.94); this->push_back( -8.95); this->push_back( -8.96); this->push_back( -8.97); this->push_back( -8.98); this->push_back( -9.00); this->push_back( -9.01); this->push_back( -9.02); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); this->push_back( -9.04); } /** * Get time of analogue signal to rise to discriminator threshold (so-called time slewing). * * \param tot time over threshold [ns] * \return rise time [ns] */ double operator()(const double tot) const { int i = (int) tot; if (i < 0) return *(this->begin()); else if (i >= (int) this->size()) return *(this->rbegin()); else return (*this)[i]; } }; /** * Function object for rise time evaluation. */ static const JGetRiseTime getRiseTime; } #endif