//////////////////////////////////////////////////////////////////// /// \class RAT::DropoutEvaluator /// /// \brief Looks at CAEN baseline values and evaluates the amount /// of dropout present /// /// \author Eric Marzec /// /// \details Histograms CAEN baseline values for PGT events and then /// passes that histogram to a fitter do extract values related /// to the amount of dropout present. /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_DropoutEvaluator__ #define __RAT_DropoutEvaluator__ #include #include #include #include #include #include using std::vector; using std::map; namespace RAT { class DropoutEvaluator : public Processor { public: DropoutEvaluator(); virtual ~DropoutEvaluator() {}; virtual void BeginOfRun(DS::Run&); virtual void EndOfRun(DS::Run& run); virtual Processor::Result DSEvent(DS::Run&, DS::Entry& ds); virtual Processor::Result Event(DS::Entry& ds, DS::EV& ev); virtual void SetI(const std::string& param, const int value); virtual void SetS(const std::string& param, const std::string& value); protected: void WriteHistogramsToROOTFile(map >& x, map >& y, map >& yp); void WriteHistogramsToJSONFile(map >& x, map >& y, map >& yp); vector ExtractWidthBounds(int id); void PrepFitter(const int& id, const double& min, const double& max); DropoutFitter fFitter; // Fits parameters to the observed CAEN baselines unsigned int fBaselineSamples; // Number of samples to find baseline bool fBaselineSet; // Keeps track of if baseline sample parameter has been set bool fTemperatureSet; // Keeps track of if temperature parameter has been set bool fIterationsSet; // Keeps track of if number of iterations parameter has been set std::string fDBTableName; // Table that fit results should be written to std::string fDBName; // DB that fit results should be written to bool fWriteToFile; // Should histograms be written to a file std::string fFilename; // Filename for file that histograms will be written to std::string fOutputType; // Whats the desired output format (for the histograms) map > fBaselineValues; // Histograms for storing baseline values map > fRangeValues; // Histograms for storing baseline values }; } // namespace RAT #endif