#ifndef __JRECONSTRUCTION__JSHOWERPREFITPARAMETERS__ #define __JRECONSTRUCTION__JSHOWERPREFITPARAMETERS__ #include #include /** * \author adomi */ namespace JRECONSTRUCTION { /** * Data structure for fit parameters. */ struct JShowerPrefitParameters_t : public TObject { /** * Default constructor. */ JShowerPrefitParameters_t() { this->reset(); } /** * Virtual destructor. */ virtual ~JShowerPrefitParameters_t() {} /** * Reset fit parameters. */ void reset() { factoryLimit = 40; NMaxHits = 20; sigma_ns = 3.0; numberOfOutliers = 4; TMaxLocal_ns = 20.0; ctMin = -0.7; roadWidth_m = 50.0; numberOfPrefits = 50; } /** * Equality * * \param parameters fit parameters * \return true if equals; else false */ bool equals(const JShowerPrefitParameters_t& parameters) const { return (this->factoryLimit == parameters.factoryLimit && this->NMaxHits == parameters.NMaxHits && this->sigma_ns == parameters.sigma_ns && this->numberOfOutliers == parameters.numberOfOutliers && this->TMaxLocal_ns == parameters.TMaxLocal_ns && this->ctMin == parameters.ctMin && this->roadWidth_m == parameters.roadWidth_m && this->numberOfPrefits == parameters.numberOfPrefits); } ClassDef(JShowerPrefitParameters_t, 2); int factoryLimit; ///< factory limit for combinatorics size_t NMaxHits; ///< maximal number of hits double sigma_ns; ///< time resolution [ns] int numberOfOutliers; ///< maximum number of outliers double TMaxLocal_ns; ///< time window for local coincidences [ns] double ctMin; ///< minimal cosine space angle between PMT axes double roadWidth_m; ///< road width [m] size_t numberOfPrefits; ///< number of prefits to be saved in output }; } /** * Read fit parameters from input. * * \param in input stream * \param parameters fit parameters * \return input stream */ std::istream& operator>>(std::istream& in, JRECONSTRUCTION::JShowerPrefitParameters_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::JShowerPrefitParameters_t& parameters); #endif