#ifndef __JRECONSTRUCTION__JMUONSTARTPARAMETERS__ #define __JRECONSTRUCTION__JMUONSTARTPARAMETERS__ #include #include #include /** * \author mdejong */ namespace JRECONSTRUCTION {} namespace JPP { using namespace JRECONSTRUCTION; } namespace JRECONSTRUCTION { /** * Data structure for fit parameters. */ struct JMuonStartParameters_t: public TObject { /** * Default constructor. */ JMuonStartParameters_t() { this->reset(); } /** * Virtual destructor. */ virtual ~JMuonStartParameters_t() {} /** * Reset fit parameters. */ void reset() { roadWidth_m = std::numeric_limits::max(); R_Hz = 6.0e3; numberOfPrefits = 0; TMin_ns = -25.0; TMax_ns = +75.0; Pmin1 = 0.0; Pmin2 = 0.0; Nmax2 = 2; reprocess = false; } /** * Equality * * \param parameters fit parameters * \return true if equals; else false */ bool equals(const JMuonStartParameters_t& parameters) const { return (this->roadWidth_m == parameters.roadWidth_m && this->R_Hz == parameters.R_Hz && this->numberOfPrefits == parameters.numberOfPrefits && this->TMin_ns == parameters.TMin_ns && this->TMax_ns == parameters.TMax_ns && this->Pmin1 == parameters.Pmin1 && this->Pmin2 == parameters.Pmin2 && this->Nmax2 == parameters.Nmax2 && this->reprocess == parameters.reprocess); } ClassDef(JMuonStartParameters_t, 2); double roadWidth_m; ///< road width [m] double R_Hz; ///< default rate [Hz] size_t numberOfPrefits; ///< number of prefits double TMin_ns; ///< minimal time w.r.t. Cherenkov hypothesis [ns] double TMax_ns; ///< maximal time w.r.t. Cherenkov hypothesis [ns] double Pmin1; ///< minimal probability single observation double Pmin2; ///< minimal probability for twofold observations int Nmax2; ///< maximal number for twofold observations bool reprocess; ///< reprocess }; } /** * Read fit parameters from input. * * \param in input stream * \param parameters fit parameters * \return input stream */ std::istream& operator>>(std::istream& in, JRECONSTRUCTION::JMuonStartParameters_t& parameters); /** * Write fit parameters to output. * * \param out output stream * \param parameters fit parameters * \return output stream */ std::ostream& operator<<(std::ostream& out, const JRECONSTRUCTION::JMuonStartParameters_t& parameters); #endif