#ifndef __JRECONSTRUCTION__JSHOWERPOSITIONFITPARAMETERS__ #define __JRECONSTRUCTION__JSHOWERPOSITIONFITPARAMETERS__ #include #include /** * \author adomi */ namespace JRECONSTRUCTION { struct JShowerPositionFitParameters_t: public TObject { /** * Default constructor. */ JShowerPositionFitParameters_t() { this->reset(); } /** * Virtual destructor. */ virtual ~JShowerPositionFitParameters_t() {} /** * Reset fit parameters. */ void reset() { numberOfPrefits = 0; // process all inputs from PointSimplex, which should give a max of 100 TMax_ns = 100.0; TMin_ns = -100.0; DMax_m = 80.0; R_Hz = 10000; Emin_GeV = 1; Emax_GeV = 200; En = 10; TTS_ns = 2; VMax_npe = 20.0; NMax = 1000; } /** * Equality * * \param parameters fit parameters * \return true if equals; else false */ bool equals(const JShowerPositionFitParameters_t& parameters) const { return (this->numberOfPrefits == parameters.numberOfPrefits && this->TMax_ns == parameters.TMax_ns && this->TMin_ns == parameters.TMin_ns && this->DMax_m == parameters.DMax_m && this->R_Hz == parameters.R_Hz && this->TTS_ns == parameters.TTS_ns && this->Emin_GeV == parameters.Emin_GeV && this->Emax_GeV == parameters.Emax_GeV && this->En == parameters.En && this->VMax_npe == parameters.VMax_npe && this->NMax == parameters.NMax); } ClassDef(JShowerPositionFitParameters_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 DMax_m; ///< maximal distance to optical module [m] double Emin_GeV; ///< minimum energy to scan double Emax_GeV; ///< maximum energy to scan int En; ///< number of points to scan in energy range double R_Hz; ///< default rate [Hz] double TTS_ns; ///< transition-time spread [ns] double VMax_npe; ///< maximum number of of photo-electrons int NMax; ///< maximum number of iterations }; } /** * Read fit parameters from input. * * \param in input stream * \param parameters fit parameters * \return input stream */ std::istream& operator>>(std::istream& in, JRECONSTRUCTION::JShowerPositionFitParameters_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::JShowerPositionFitParameters_t& parameters); #endif