#ifndef __JRECONSTRUCTION__JMUONGANDALFPARAMETERS__ #define __JRECONSTRUCTION__JMUONGANDALFPARAMETERS__ #include #include #include /** * \author gmaggi */ namespace JRECONSTRUCTION {} namespace JPP { using namespace JRECONSTRUCTION; } namespace JRECONSTRUCTION { /** * Data structure for fit parameters. */ struct JMuonGandalfParameters_t: public TObject { /** * Default constructor. */ JMuonGandalfParameters_t() { this->reset(); } /** * Virtual destructor. */ virtual ~JMuonGandalfParameters_t() {} /** * Reset fit parameters. */ void reset() { roadWidth_m = std::numeric_limits::max(); R_Hz = 6.0e3; numberOfPrefits = 0; TTS_ns = 2; E_GeV = 1.0e3; TMin_ns = -50.0; TMax_ns = +450.0; ZMin_m = 0.0; ZMax_m = 0.0; VMax_npe = 10.0; NMax = 1000; reprocess = false; } /** * Equality * * \param parameters fit parameters * \return true if equals; else false */ bool equals(const JMuonGandalfParameters_t& parameters) const { return (this->roadWidth_m == parameters.roadWidth_m && this->R_Hz == parameters.R_Hz && this->numberOfPrefits == parameters.numberOfPrefits && this->TTS_ns == parameters.TTS_ns && this->E_GeV == parameters.E_GeV && this->TMin_ns == parameters.TMin_ns && this->TMax_ns == parameters.TMax_ns && this->ZMin_m == parameters.ZMin_m && this->ZMax_m == parameters.ZMax_m && this->VMax_npe == parameters.VMax_npe && this->NMax == parameters.NMax && this->reprocess == parameters.reprocess); } ClassDef(JMuonGandalfParameters_t, 2); double roadWidth_m; ///< road width [m] double R_Hz; ///< default rate [Hz] size_t numberOfPrefits; ///< number of prefits double TTS_ns; ///< transition-time spread [ns] double E_GeV; ///< energy [GeV] double TMin_ns; ///< minimal time w.r.t. Cherenkov hypothesis [ns] double TMax_ns; ///< maximal time w.r.t. Cherenkov hypothesis [ns] double ZMin_m; ///< minimal z-positon [m] double ZMax_m; ///< maximal z-positon [m] double VMax_npe; ///< maximum number of of photo-electrons int NMax; ///< maximum number of iterations 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::JMuonGandalfParameters_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::JMuonGandalfParameters_t& parameters); #endif