00001 00002 // CalibrationDataEigenVariations.h, (c) ATLAS Detector software 00004 00005 #ifndef ANALYSISCALIBRATIONDATAINTERFACEEVVARIATIONS_H 00006 #define ANALYSISCALIBRATIONDATAINTERFACEEVVARIATIONS_H 00007 00008 #include <string> 00009 #include <vector> 00010 #include <map> 00011 #include <set> 00012 #include <utility> 00013 #include "TMatrixD.h" 00014 #include "TMatrixDSym.h" 00015 00016 class TH1; 00017 00018 namespace Analysis 00019 { 00020 class CalibrationDataHistogramContainer; 00021 00022 class CalibrationDataEigenVariations { 00023 public: 00024 typedef std::set<size_t> IndexSet; 00025 typedef std::set<IndexSet> IndexSuperSet; 00026 00027 CalibrationDataEigenVariations(const CalibrationDataHistogramContainer* cnt); 00028 ~CalibrationDataEigenVariations(); 00029 00031 void excludeNamedUncertainty(const std::string& name); 00034 void initialize(double min_variance = 1.0E-20); 00035 00037 void removeVariations(const IndexSet &set); 00039 void removeVariations(const IndexSuperSet &set); 00040 00042 void mergeVariationsFrom(const size_t& index); 00044 void mergeVariations(const IndexSet &set); 00046 void mergeVariations(const IndexSuperSet &set); 00047 00049 unsigned int getNumberOfNamedVariations() const; 00051 std::vector<std::string> listNamedVariations() const; 00055 unsigned int getNamedVariationIndex(const std::string& name) const; 00056 00058 unsigned int getNumberOfEigenVariations() const; 00059 00062 bool getEigenvectorVariation(unsigned int variation, TH1*& up, TH1*& down) const; 00063 00067 bool getNamedVariation(const std::string& name, TH1*& up, TH1*& down) const; 00072 bool getNamedVariation(unsigned int nameIndex, TH1*& up, TH1*& down) const; 00074 bool isExtrapolationVariation(unsigned int nameIndex) const; 00075 00078 TMatrixDSym getEigenCovarianceMatrix() const; 00081 TMatrixDSym getEigenCovarianceMatrixFromVariations() const; 00083 TMatrixD getJacobianReductionMatrix() const; 00084 00085 private: 00087 const CalibrationDataHistogramContainer* m_cnt; 00088 00090 bool m_initialized; 00091 00093 std::map<std::string, unsigned int> m_namedIndices; 00094 std::vector<std::pair<TH1*, TH1*> > m_named; 00096 int m_namedExtrapolation; 00097 00099 std::vector<std::pair<TH1*, TH1*> > m_eigen; 00100 00101 // /** @ data members needed for eigenvector method **/ 00102 // /** the map stores the int which is needed to access the other vector<> objects **/ 00103 // mutable std::map<std::string, unsigned int> m_eigenvectorMethod_index; 00104 // std::vector<TMatrixT<double> > m_eigenvectorMethod_matrix; 00105 // std::vector<std::vector<TObject*> > m_eigenvectorMethod_uncUpProvider; 00106 // std::vector<std::vector<TObject*> > m_eigenvectorMethod_uncDownProvider; 00107 // std::vector<std::vector<TObject*> > m_eigenvectorMethod_uncProvider; 00108 }; 00109 00110 } 00111 00112 #endif // ANALYSISCALIBRATIONDATAINTERFACEEVVARIATIONS_H