00001
00002 #ifndef TAUANALYSISTOOLS_TAUSMEARINGRUN1TOOL_H
00003 #define TAUANALYSISTOOLS_TAUSMEARINGRUN1TOOL_H
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "AsgTools/AsgTool.h"
00017
00018
00019 #include "TauAnalysisTools/CommonSmearingTool.h"
00020
00021
00022 #include "TH1D.h"
00023 #include "TFile.h"
00024
00025 namespace TauAnalysisTools
00026 {
00027
00028 class TauSmearingRun1Tool
00029 : public CommonSmearingTool
00030 {
00031 ASG_TOOL_CLASS( TauSmearingRun1Tool,
00032 TauAnalysisTools::ITauSmearingTool )
00033
00034 public:
00036 TauSmearingRun1Tool( const std::string& sName );
00037
00038 ~TauSmearingRun1Tool( );
00039
00041 virtual StatusCode initialize();
00042
00044 virtual CP::CorrectionCode applyCorrection( xAOD::TauJet& xTau );
00045
00047 virtual CP::SystematicSet affectingSystematics() const;
00048
00050 virtual CP::SystematicSet recommendedSystematics() const;
00051
00052 virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& systConfig );
00053
00054 enum TESComponent
00055 {
00056
00057 FINAL = 1,
00058 SHOWERMODEL = 2,
00060 UE = 3,
00061 DM = 4,
00062 CLOSURE = 5,
00063 PU = 6,
00064 OTHERS = 7,
00065
00066 SINGLEPARTICLE = 8,
00067
00068 EOP_RSP = 9,
00069 EOP_SYST = 10,
00070 CTB_SYST = 11,
00071 CTB_RSP = 12,
00072 EM = 13,
00073 LCW = 14,
00074 Bias = 15,
00075
00076 EOP = 16,
00077 CTB = 17,
00078 INSITUSTAT = 18,
00079 INSITUSYST = 19,
00080 SYSREST = 20,
00081 TOTAL = 21,
00082 REMAININGSYS = 22,
00083 MODELING = 23,
00084 INSITU = 24,
00085 INSITUINTERPOL = 25,
00086 INSITUSTATINTERPOL = 26,
00087 INSITUSYSTINTERPOL = 27,
00088 SINGLEPARTICLEINTERPOL = 28
00089 };
00090
00091 private:
00092 const double m_GeV;
00093 const unsigned int m_iEtaBins;
00094
00095 const double m_dInSituStat1P;
00096 const double m_dInSituStat3P;
00097 const double m_dInSituSyst1P;
00098 const double m_dInSituSyst3P;
00099
00100 double interpolateLin(const double& pt);
00101 StatusCode loadInputHistograms();
00102 void getHist(TFile* fFile, std::string sName, std::string sMapName = "");
00103 double getTESShift(double pt, int ntracks);
00104 double getTESUncertainty(double pt,
00105 double eta,
00106 int ntracks,
00107 int iComponent);
00108
00109 double getTotal(const double& pt, const unsigned int& itrack, const unsigned int& iE);
00110 double getModeling(const double& pt, const unsigned int& itrack, const unsigned int& iE);
00111 double getClosure(const double& pt, const unsigned int& itrack, const unsigned int& iE);
00112 double getInSitu(const unsigned int& itrack);
00113 double getInSitu(const double& pt, const unsigned int& itrack);
00114 double getSingleParticleResponse(const double& pt, const unsigned int& itrack, const unsigned int& iE);
00115 double getSingleParticleResponseInterpolated(const double& pt, const unsigned int& itrack,const unsigned int& iE);
00116 double getInSituStat(const int& ntracks);
00117 double getInSituSys(const int& ntracks);
00118 double getSystRest(const double& pt, const int& ntracks, const int& itrack, const unsigned int& iE);
00119
00120 std::string convertConfigToString(int iTESComponent, int iTrack, int iEta);
00121
00122
00123
00124 std::map<int, std::string> m_mComponents;
00125 std::map<std::string, TH1D*> m_hHisto;
00126
00127 std::vector<double> m_vEtaBins;
00128 std::vector<std::string> m_vPF_EtaBins;
00129
00130 };
00131
00132 }
00133
00134 #endif // TAUANALYSISTOOLS_TAUSMEARINGRUN1TOOL_H