#ifndef __JRECONSTRUCTION__JSHOWERENERGYPREFITPARAMETERS__ #define __JRECONSTRUCTION__JSHOWERENERGYPREFITPARAMETERS__ #include #include #include "JFit/JMEstimator.hh" #include "JFit/JEnergy.hh" /** * \author adomi */ namespace JRECONSTRUCTION { /** * Data structure for fit parameters. */ struct JShowerEnergyPrefitParameters_t: public TObject { /** * Default constructor. */ JShowerEnergyPrefitParameters_t() { this->reset(); } /** * Virtual destructor. */ virtual ~JShowerEnergyPrefitParameters_t(){} /** * Reset fit parameters. */ void reset() { TMax_ns = 500; TMin_ns = -500; roadWidth_m = 80; Emin_GeV = 1; Emax_GeV = 100; resolution = 0.01; R_Hz = 10.0e3; mestimator = JFIT::EM_NULL; numberOfPrefits = 0; numberOfOutfits = 1; VMax_npe = 20; NMax = 1000; } /** * Equality * * \param parameters fit parameters * \return true if equals; else false */ bool equals(const JShowerEnergyPrefitParameters_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->Emin_GeV == parameters.Emin_GeV && this->Emax_GeV == parameters.Emax_GeV && this->resolution == parameters.resolution && this->R_Hz == parameters.R_Hz && this->mestimator == parameters.mestimator && this->VMax_npe == parameters.VMax_npe && this->NMax == parameters.NMax); } ClassDef(JShowerEnergyPrefitParameters_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 Emin_GeV; ///< minimum energy [GeV] double Emax_GeV; ///< maximum energy [GeV] double resolution; ///< energy resolution [log10(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 }; } /** * Read fit parameters from input. * * \param in input stream * \param parameters fit parameters * \return input stream */ std::istream& operator>>(std::istream& in, JRECONSTRUCTION::JShowerEnergyPrefitParameters_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::JShowerEnergyPrefitParameters_t& parameters); #endif