// Class: RAT::Methods::HitTimeProbabilityFactor // // Brief: Calculate probaility of observed PMT hit time given oberved charge // // Author: W. Heintzelman // // REVISION HISTORY: // 06/10/2016 : W Heintzelman - New class // // Detail: For a given number of PEs, loop over the PEs in the order of their // arrival, calculating for each one the probability that it caused // the PMT discriminator to fire (i.e., that with the charge it // produced the accumulated charge exceeded the PMT threshold) given // the observed charge, times the probability of the observed hit time // given that the discriminator fired upon its arrival. Accumulate // the sum of the probabilty products, which is then the probability // of the observed hit time given the oberved charge and assuming that // fNPE photoelectrons were generated. // See discussion in SNO+-doc-2871. // ///////////////////////////////////////////////////////////////////////////// #ifndef __RAT_Method_HitTimeProbabilityFactor #define __RAT_Method_HitTimeProbabilityFactor #include namespace RAT { namespace Methods { class HitTimeProbabilityFactor{ public: HitTimeProbabilityFactor( int maxPE ) ; void SetChargeParameters ( double threshold, double highHalfPt, double charge); void SetTimeParameters ( double pdfPtVal, double cdfPtVal); double GetTimeProbabilityFactor( int _nPE ); private: double GetPEFireProb( int firePE); double PQSum(int PECount, int q); double PSumF(int precQ); PMTChgpdf* fPMTChgPdfPtr; int fMaxPE; int fFirePE, fNPE; int fThrIdx, fQIdx; std::vector fFactorial; std::vector fQpdf; double fPdfPtVal, fCdfPtVal; }; } // namespace Methods } // namespace RAT #endif