#ifndef __JRECONSTRUCTION__JMUONENERGYPARAMETERS__ #define __JRECONSTRUCTION__JMUONENERGYPARAMETERS__ #include #include #include #include "JFit/JMEstimator.hh" /** * \author mdejong */ namespace JRECONSTRUCTION {} namespace JPP { using namespace JRECONSTRUCTION; } namespace JRECONSTRUCTION { /** * Data structure for fit parameters. */ struct JMuonEnergyParameters_t: public TObject { /** * Default constructor. */ JMuonEnergyParameters_t() { this->reset(); } /** * Virtual destructor. */ virtual ~JMuonEnergyParameters_t() {} /** * Reset fit parameters. */ void reset() { roadWidth_m = std::numeric_limits::max(); R_Hz = 6.0e3; numberOfPrefits = 0; EMin_log = 1.0; EMax_log = 8.0; TMin_ns = -50.0; TMax_ns = +450.0; ZMin_m = std::numeric_limits::lowest(); resolution = 0.01; mestimator = JFIT::EM_NORMAL; reprocess = false; } /** * Equality * * \param parameters fit parameters * \return true if equals; else false */ bool equals(const JMuonEnergyParameters_t& parameters) const { return (this->roadWidth_m == parameters.roadWidth_m && this->R_Hz == parameters.R_Hz && this->numberOfPrefits == parameters.numberOfPrefits && this->EMin_log == parameters.EMin_log && this->EMax_log == parameters.EMax_log && this->TMin_ns == parameters.TMin_ns && this->TMax_ns == parameters.TMax_ns && this->ZMin_m == parameters.ZMin_m && this->resolution == parameters.resolution && this->mestimator == parameters.mestimator && this->reprocess == parameters.reprocess); } ClassDef(JMuonEnergyParameters_t, 1); double roadWidth_m; ///< road width [m] double R_Hz; ///< default rate [Hz] size_t numberOfPrefits; ///< number of prefits double EMin_log; ///< minimal energy [log10(GeV)] double EMax_log; ///< maximal energy [log10(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-position [m] double resolution; ///< energy resolution [log10(GeV)] int mestimator; ///< M-estimator 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::JMuonEnergyParameters_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::JMuonEnergyParameters_t& parameters); #endif