00001 #ifndef JETUNCERTAINTIES_CORRELATIONMATRIX_H
00002 #define JETUNCERTAINTIES_CORRELATIONMATRIX_H
00003
00004 #include "AsgTools/AsgMessaging.h"
00005 #include "JetUncertainties/JetUncertaintiesTool.h"
00006
00007 #include "xAODJet/Jet.h"
00008 #include "xAODJet/JetContainer.h"
00009 #include "xAODJet/JetAuxContainer.h"
00010 #include "xAODEventInfo/EventInfo.h"
00011 #include "xAODEventInfo/EventInfoContainer.h"
00012 #include "xAODEventInfo/EventInfoAuxContainer.h"
00013
00014 #include "TString.h"
00015
00016 class TH2D;
00017
00018 namespace jet
00019 {
00020
00021 class CorrelationMatrix : public asg::AsgMessaging
00022 {
00023 public:
00024
00025 CorrelationMatrix( const TString name,
00026 const int numBins,
00027 const double minVal,
00028 const double maxVal,
00029 const double fixedVal1,
00030 const double fixedVal2 );
00031 virtual ~CorrelationMatrix();
00032
00033
00034 virtual StatusCode initializeForPt(const JetUncertaintiesTool& uncTool);
00035 virtual StatusCode initializeForEta(const JetUncertaintiesTool& uncTool);
00036
00037
00038 virtual TString getName() const { return m_name; }
00039 virtual TH2D* getMatrix() const { return m_corrMat; }
00040
00041
00042 private:
00043 CorrelationMatrix(const std::string& name = "");
00044
00045
00046 bool m_isInit;
00047 const TString m_name;
00048
00049 const int m_numBins;
00050 const double m_minVal;
00051 const double m_maxVal;
00052 const double m_fixedVal1;
00053 const double m_fixedVal2;
00054
00055 TH2D* m_corrMat;
00056
00057
00058 xAOD::JetContainer* m_jets;
00059 xAOD::EventInfoContainer* m_eInfos;
00060
00061 xAOD::Jet* m_jet1;
00062 xAOD::Jet* m_jet2;
00063 xAOD::EventInfo* m_eInfo;
00064
00065
00066 StatusCode checkInitialization(const JetUncertaintiesTool& uncTool) const;
00067 StatusCode createStore();
00068 StatusCode clearStore();
00069 StatusCode setDefaultProperties(const JetUncertaintiesTool& uncTool);
00070 TH2D* buildMatrix(const std::vector<double>& bins) const;
00071 double getCorrelation(const JetUncertaintiesTool& uncTool) const;
00072 double getCovariance(const JetUncertaintiesTool& uncTool, const xAOD::Jet* jet1, const xAOD::Jet* jet2) const;
00073 };
00074
00075 }
00076
00077 #endif