#ifndef __JRECONSTRUCTION__JSHOWERDIRECTIONPREFITPARAMETERS__ #define __JRECONSTRUCTION__JSHOWERDIRECTIONPREFITPARAMETERS__ #include #include #include "JFit/JMEstimator.hh" /** * \author adomi, gmaggi */ namespace JRECONSTRUCTION { /** * Data structure for fit parameters. */ struct JShowerDirectionPrefitParameters_t: public TObject { /** * Default constructor. */ JShowerDirectionPrefitParameters_t() { this->reset(); } /** * Virtual destructor. */ virtual ~JShowerDirectionPrefitParameters_t(){} /** * Reset fit parameters. */ void reset() { numberOfPrefits = 0; numberOfOutfits = 4; TMax_ns = 30; TMin_ns = -30; roadWidth_m = 80; DMin_m = 80; E_GeV = 13; MaxAngle_deg_lowE = 40; scanAngle_deg_lowE = 10; MaxAngle_deg_highE = 20; scanAngle_deg_highE = 5; R_Hz = 10.0e3; mestimator = JFIT::EM_NULL; VMax_npe = 20.0; NMax = 1000; } /** * Equality * * \param parameters fit parameters * \return true if equals; else false */ bool equals(const JShowerDirectionPrefitParameters_t& parameters) const { return (this->TMax_ns == parameters.TMax_ns && this->TMin_ns == parameters.TMin_ns && this->numberOfPrefits == parameters.numberOfPrefits && this->numberOfOutfits == parameters.numberOfOutfits && this->roadWidth_m == parameters.roadWidth_m && this->DMin_m == parameters.DMin_m && this->E_GeV == parameters.E_GeV && this->R_Hz == parameters.R_Hz && this->mestimator == parameters.mestimator && this->MaxAngle_deg_lowE == parameters.MaxAngle_deg_lowE && this->scanAngle_deg_lowE == parameters.scanAngle_deg_lowE && this->MaxAngle_deg_highE == parameters.MaxAngle_deg_highE && this->scanAngle_deg_highE == parameters.scanAngle_deg_highE && this->VMax_npe == parameters.VMax_npe && this->NMax == parameters.NMax); } ClassDef(JShowerDirectionPrefitParameters_t, 1); size_t numberOfPrefits; ///< number of prefits size_t numberOfOutfits; ///< number of fits to be saved in output double TMax_ns; ///< maximum time for local coincidences [ns] double TMin_ns; ///< minimum time for local coincidences [ns] double roadWidth_m; ///< road width [m] double ctMin; ///< minimal cosine space angle between PMT axes double DMin_m; ///< radius of the hit selection for high energy events (used to speedup the code) double E_GeV; ///< energy [GeV] double R_Hz; ///< default rate [Hz] int mestimator; ///< M-estimator double VMax_npe; ///< maximum number of of photo-electrons int NMax; ///< maximum number of iterations double MaxAngle_deg_lowE; ///< maximum scanning angle in [deg] for low energy events double scanAngle_deg_lowE; ///< scanning angle step in [deg] for low energy events double MaxAngle_deg_highE; ///< maximum scanning angle in [deg] for high energy events double scanAngle_deg_highE; ///< scanning angle step in [deg] for high energy events }; } /** * Read fit parameters from input. * * \param in input stream * \param parameters fit parameters * \return input stream */ std::istream& operator>>(std::istream& in, JRECONSTRUCTION::JShowerDirectionPrefitParameters_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::JShowerDirectionPrefitParameters_t& parameters); #endif