#ifndef __JRECONSTRUCTION__JSHOWERFITPARAMETERS__ #define __JRECONSTRUCTION__JSHOWERFITPARAMETERS__ #include #include #include "JFit/JMEstimator.hh" /** * \author adomi, gmaggi */ namespace JRECONSTRUCTION { /** * Data structure for fit parameters. */ struct JShowerFitParameters_t: public TObject { /** * Default constructor. */ JShowerFitParameters_t() { this->reset(); } /** * Virtual destructor. */ virtual ~JShowerFitParameters_t(){} /** * Reset fit parameters. */ void reset() { numberOfPrefits = 4; TMax_ns = 30; TMin_ns = -30; DStep_m = 0; DMax_m = 60; R_Hz = 10.0e3; mestimator = JFIT::EM_NULL; Vmax_npe = 20; } /** * Equality * * \param parameters fit parameters * \return true if equals; else false */ bool equals(const JShowerFitParameters_t& parameters) const { return (this->TMax_ns == parameters.TMax_ns && this->TMin_ns == parameters.TMin_ns && this->numberOfPrefits == parameters.numberOfPrefits && this->DStep_m == parameters.DStep_m && this->DMax_m == parameters.DMax_m && this->R_Hz == parameters.R_Hz && this->mestimator == parameters.mestimator && this->Vmax_npe == parameters.Vmax_npe ); } ClassDef(JShowerFitParameters_t, 2); size_t numberOfPrefits; ///< number of prefits double TMax_ns; ///< maximum time for local coincidences [ns] double TMin_ns; ///< minimum time for local coincidences [ns] double DStep_m; ///< step increase for the distance to optical module [m] double R_Hz; ///< default rate [Hz] int mestimator; ///< M-estimator double Vmax_npe; ///< maximum number of of photo-electrons double DMax_m; ///< maximal distance to optical module [m] }; } /** * Read fit parameters from input. * * \param in input stream * \param parameters fit parameters * \return input stream */ std::istream& operator>>(std::istream& in, JRECONSTRUCTION::JShowerFitParameters_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::JShowerFitParameters_t& parameters); #endif