/////////////////////////////////////////////////////////////////////// // // Fitter Method for NearAV events, using the angular distribution of hit PMTs // // Author: Krish Majumdar -- contact person // // REVISION HISTORY: // 2012-08-21 : K Majumdar - New file // 2013-01-22 : K Majumdar - removing underscores, tab/space consistency // 2013-01-29 : K Majumdar - added brief and detail, changed to CamelCase // 2014-03-29 : P G Jones - Updated lifetime, added BeginOfRun method // 2014-10-15 : K Majumdar - major changes to update for RAT 5.0 + changed // from pol1 radius vs. ratio fit to pol2 // // Calculate the event direction by summing over the position vectors // of hit PMTs, retrieve the ratio of hit PMTs with some angle between // PMT and event over total hit PMTs (i.e. classifier result), match the // ratio value against previously coordinated values to find the event // radius. See document SNO+-doc-1710 for more details on the theta and // phi errors quantified below. // /////////////////////////////////////////////////////////////////////// #ifndef __RAT_Method_NearAVAngular_ #define __RAT_Method_NearAVAngular_ #include #include #include #include using namespace ROOT; namespace RAT { namespace DS { class Entry; class EV; } namespace Methods { class NearAVAngular : public Method { public: // Returns the method's name virtual std::string GetName() const {return NearAVAngular::Name();} // Returns the method's name static std::string Name() {return std::string("nearAVAngular");} // Initialise the method // // param is an optional index in the db to use void Initialise(const std::string& param); // Load the table from the database void BeginOfRun(DS::Run& run); void EndOfRun(DS::Run& run); // Calculate and return the best fit virtual DS::FitResult GetBestFit(); // Reposition the hit-times such that the first 3 hits occurring within 1 ns are situated in the 250ns bin // // histo is a histogram of raw hit-times // Returns the centre of the first bin that has a population of more than 3 double RepositionHistogram(TH1D* histo); private: std::string fIndex; // Optional index override for the db table std::vector fNhitsWindow; // Vector of Nhits window low bounds int fWindowWidth; // Nhits window width std::vector fFitCoeffs0; // Vector of coefficients for the 0th radius power term in the function that relates radius and ratio value (one for each Nhits window) std::vector fFitCoeffs1; // Vector of coefficients for the 1st radius power term in the function that relates radius and ratio value (one for each Nhits window) std::vector fFitCoeffs2; // Vector of coefficients for the 2nd radius power term in the function that relates radius and ratio value (one for each Nhits window) std::vector fRatioCuts; // Vector of ratio cut values which define the NearAV region (one for each Nhits window) std::vector fRatioBins; // Vector of ratio bin low bounds double fBinWidth; // Ratio bin width std::vector fNegativeErrors; // Vector of errors in the negative radial direction - towards detector centre (one for each Nhits window / ratio bin combination) std::vector fPositiveErrors; // Vector of errors in the positive radial direction - towards detector edge (one for each Nhits window / ratio bin combination) double fThetaError; // Error in the Reconstructed Theta angle = Sigma of the "theta(true) - theta(reco)" distribution double fPhiError; // Error in the Reconstructed Phi angle = Sigma of the "phi(true) - phi(reco)" distribution double fAVRadius; // AV radius, taken from geometry file }; } // End of namespace Methods } // End of namespace RAT #endif