#ifndef __Analysis_H #define __Analysis_H #include #include #include #include #include class FDSelection; class SDSelection; class SimSelection; class AugerUpTime; class RecEvent; class DetectorGeometry; class TBits; class TRandom; class Analysis { public: Analysis(const DetectorGeometry* const* geom, const RecEvent* const* event, const std::string& configFile = "analysis.config", bool withNMinusOne = true, const std::string& analysisName = "", int verbosity = 1); ~Analysis(); const std::string& GetName() const { return fAnalysisName; } // selection related stuff bool HasFDSelection(); bool HasSDSelection(); bool HasSimSelection(); const FDSelection& GetFDSelection(); const SDSelection& GetSDSelection(); const SimSelection& GetSimSelection(); const RecEvent* const* GetRecEvent() { return fEvent; } bool IsGoodEye(unsigned int iEye, double weight = 1); bool IsGoodSD(double weight = 1); bool IsGoodSim(double weight = 1); int GetFDCutWhichKilledEvent() const; int GetSDCutWhichKilledEvent() const; int GetSimCutWhichKilledEvent() const; typedef std::map Configuration; const Configuration& GetUserConfiguration() { return fUserConfiguration; } // write n-1 histograms to output root file void WriteNMinusOne(); // write cut statistics as histograms to output root file void WriteCutStatistics() const; // print cut statistics as text to stdout void PrintCutStatistics(bool latex = false) const; void InitSDCuts(); void InitSimCuts(); void InitFDCuts(); const DetectorGeometry* const* GetDetectorGeometry() const { return fDetectorGeometry; } // upTime related stuff AugerUpTime* GetAugerUpTime(); const TBits* GetCurrentArrayStatus(); double GetFDUpFraction(int GPSTime, int iTel); // brass hybrid probability related stuff T2TriggerProb& GetT2TriggerProb(); // FD specific int GetXmaxPixel(unsigned int iEye); // (iTel-1)*440+(iPix-1) AND iPix=(col-1)*22 + (row-1) // SD specific static std::string ADSTAnalysisVersion() { return std::string("checkout from SVN"); } static unsigned int ADSTAnalysisRevision(); void Dump(std::ostream& output); private: void InitUpTime(); Analysis(); static void StripComments(std::string& line); static std::string MakeAbsolutePath(const std::string& file, const std::string& path); FDSelection* fFDSelection; SDSelection* fSDSelection; SimSelection* fSimSelection; AugerUpTime* fAugerUpTime; std::vector fFDCutFileNames; std::vector fSDCutFileNames; std::vector fSimCutFileNames; std::string fFDLifeFileName; std::string fSDLifeFileName; std::string fAnalysisName; const DetectorGeometry* const* fDetectorGeometry; const RecEvent* const* fEvent; T2TriggerProb fT2TriggerProb; bool fWithNMinusOne; Configuration fUserConfiguration; int fVerbosity; }; #endif