00001 #ifndef TAURECTOOLS_COMBINEDP4FROMRECOTAUS_H
00002 #define TAURECTOOLS_COMBINEDP4FROMRECOTAUS_H
00003
00004
00005
00007
00008
00009 #include "TH1F.h"
00010 #include "TFile.h"
00011 #include "TF1.h"
00012 #include "TGraph.h"
00013
00014
00015 #include "tauRecTools/TauRecToolBase.h"
00016
00017
00018 #include "xAODTau/TauJet.h"
00019
00020 class CombinedP4FromRecoTaus
00021 : public TauRecToolBase
00022 {
00023 public:
00024 ASG_TOOL_CLASS2( CombinedP4FromRecoTaus, TauRecToolBase, ITauToolBase )
00025
00026
00027 CombinedP4FromRecoTaus(const std::string& name="CombinedP4FromRecoTaus");
00028
00029
00030 StatusCode initialize();
00031
00032
00033 double GetCorrelationCoefficient(int etaIndex, const xAOD::TauJetParameters::DecayMode decayMode);
00034
00035
00036
00037
00038 double GetWeightedEt(double et_tauRec,
00039 double et_cb2PT,
00040 int etaIndex,
00041 const xAOD::TauJetParameters::DecayMode& mode);
00042
00043 double GetResolution_taurec( double et, int etaIndex, xAOD::TauJetParameters::DecayMode mode);
00044 double GetResolution_CellBased2PanTau( double et, int etaIndex, xAOD::TauJetParameters::DecayMode mode);
00045 double GetMean_TauRec( double et, int etaIndex, xAOD::TauJetParameters::DecayMode mode);
00046 double GetMean_CellBased2PanTau( double et, int etaIndex, xAOD::TauJetParameters::DecayMode mode);
00047 double GetCombinedResolution( double et_tauRec, double et_cb2PT, int etaIndex, xAOD::TauJetParameters::DecayMode mode);
00048
00049 double GetTauRecEt( double et, int etaIndex, xAOD::TauJetParameters::DecayMode mode);
00050 double GetCellbased2PantauEt( double et_cb2PT, int etaIndex, xAOD::TauJetParameters::DecayMode mode);
00051
00052
00053 double getCombinedEt(double et_tauRec,
00054 double et_substructure,
00055 float eta,
00056 const xAOD::TauJetParameters::DecayMode& mode);
00057
00058
00059
00060 TLorentzVector getCombinedP4(const xAOD::TauJet* tau);
00061
00062 TLorentzVector getCalibratedTauRecP4(const xAOD::TauJet* tau);
00063 TLorentzVector getCalibratedConstituentP4(const xAOD::TauJet* tau);
00064 TLorentzVector getWeightedP4(const xAOD::TauJet* tau);
00065
00066
00067 int GetIndex_Eta(float eta);
00068 float GetNsigma_Compatibility(float et_TauRec);
00069
00070 double GetCaloResolution(const xAOD::TauJet* tau);
00071 bool GetUseCaloPtFlag(const xAOD::TauJet* tau);
00072 StatusCode execute(xAOD::TauJet& xTau);
00073
00074 private:
00075
00076
00077
00078
00079 std::vector< std::vector<TGraph*> > m_resTGraph_tauRec;
00080 std::vector< std::vector<TGraph*> > m_resTGraph_CellBased2PanTau;
00081 std::vector< std::vector<TGraph*> > m_meanTGraph_CellBased2PanTau;
00082 std::vector< std::vector<TGraph*> > m_meanTGraph_tauRec;
00083
00084 std::vector<TH1F*> m_correlationHists;
00085
00086 std::vector<TString> m_modeNames = {"1p0n","1p1n","1pXn","3p0n","3pXn"};
00087 std::vector<TString> m_etaBinNames = {"0", "1", "2", "3", "4"};
00088
00089 std::string m_calibFilePath;
00090
00091 bool m_addCalibrationResultVariables;
00092 bool m_addUseCaloPtFlag;
00093 bool m_tauRecEt_takenAs_combinedEt;
00094 double m_weight, m_combined_res, m_sigma_tauRec, m_sigma_constituent, m_corrcoeff;
00095
00096 std::string m_sWeightFileName;
00097 TF1 m_Nsigma_compatibility;
00098 };
00099
00100
00101 #endif // TAURECTOOLS_COMBINEDP4FROMRECOTAUS_H