// // // // Author: Jia-Shian Wang // Jeff Tseng // // Revision History: // 10 Aug 2018: J Tseng - skeleton // 14 Aug 2018: J Wang - details of fitter // // A fast Z fitter which could provide a seed for partial fill reconstruction // // Details can be foudn at DocDB doc-5212 // #ifndef __RAT_Method_WeightedAverage__ #define __RAT_Method_WeightedAverage__ #include #include #include #include #include "TH1.h" namespace RAT { namespace Methods { class FastZ : public SelectorMethod { public: FastZ() : SelectorMethod(), top_pmt("top_pmt", "", 50, 0, 500), bot_pmt("bot_pmt", "", 50, 0, 500) {} // returns "fastZ" virtual std::string GetName() const { return FastZ::Name(); } // returns "fastZ" static std::string Name() { return std::string("fastZ"); } // nothing to initialize void Initialise(const std::string&) {} // reads constants from the database void BeginOfRun(DS::Run& run); void EndOfRun(DS::Run&) {} // runs the algorithm virtual DS::FitResult GetBestFit(); private: // Here we list the weights we read from ratdb // cosine factor for top path double fTop_cos; // cosine factor for bottom path double fBottom_cos; // scint fraction in top path double fTop_Scint; // water fraction in bottom path double fTop_Water; //light speed in water double fCw; //light speed in scint double fCs; //time window for mode selection double fWindow; //top pmt selection range on z axis double fTop_Range; //bottom pmt selection range on z axis double fBottom_Range; TH1D top_pmt; TH1D bot_pmt; }; } //::Method } //::RAT #endif