#ifndef __JRECONSTRUCTION__JSHOWERPREFITPARAMETERS__ #define __JRECONSTRUCTION__JSHOWERPREFITPARAMETERS__ #include #include /** * \author adomi, vcarretero */ 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; sigma_ns = 3.0; numberOfOutliers = 4; TMaxLocal_ns = 20.0; TMaxExtra_ns = 60.0; ctMin = 0.0; DMax_m = 50.0; numberOfPrefits = 100; numberOfGrids = 2; numberOfL1 = 10; pos_grid_m = 10; pos_step_m = 10; time_grid_ns = 60; time_step_ns = 60; } /** * Equality * * \param parameters fit parameters * \return true if equals; else false */ bool equals(const JShowerPrefitParameters_t& parameters) const { return (this->factoryLimit == parameters.factoryLimit && this->sigma_ns == parameters.sigma_ns && this->numberOfOutliers == parameters.numberOfOutliers && this->TMaxExtra_ns == parameters.TMaxExtra_ns && this->TMaxLocal_ns == parameters.TMaxLocal_ns && this->ctMin == parameters.ctMin && this->DMax_m == parameters.DMax_m && this->numberOfPrefits == parameters.numberOfPrefits && this->numberOfGrids == parameters.numberOfGrids && this->pos_grid_m == parameters.pos_grid_m && this->pos_step_m == parameters.pos_step_m && this->time_grid_ns == parameters.time_grid_ns && this->time_step_ns == parameters.time_step_ns && this->numberOfL1 == parameters.numberOfL1); } ClassDef(JShowerPrefitParameters_t, 3); size_t numberOfPrefits; ///< number of prefits int factoryLimit; ///< factory limit for combinatorics double sigma_ns; ///< time resolution [ns] int numberOfOutliers; ///< maximum number of outliers double TMaxLocal_ns; ///< time window for local coincidences [ns] double TMaxExtra_ns; ///< time window for extra coincidences [ns] double ctMin; ///< minimal cosine space angle between PMT axes double DMax_m; ///< maximal distance to optical module [m] size_t numberOfL1; ///< minimal number of L1 int pos_grid_m; ///< edge [m] of the position grid int pos_step_m; ///< step in [m] of position grid int time_grid_ns; ///< edge [ns] of the time grid int time_step_ns; ///< step in [ns] of time grid size_t numberOfGrids; ///< number of prefits to be used to build a grid around }; } /** * 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