/afs/hep.man.ac.uk/u/markowen/ATLAS/SFrameProof/2011EPS/topUtils/topUtils/CalibrationDataInterfaceBase.h

00001 
00002 // CalibrationDataInterfaceTool.h, (c) ATLAS Detector software
00004 
00005 // 
00006 // for some details on weighting event using the SF, see
00007 // https://twiki.cern.ch/twiki/bin/view/AtlasProtected/TopCommonObjects#B_tagging
00008 // http://indico.cern.ch/getFile.py/access?contribId=4&resId=0&materialId=slides&confId=106205
00009 // http://cdsweb.cern.ch/record/1269912
00010 // 
00011 
00012 #ifndef ANALYSISCALIBRATIONDATAINTERFACEBASE_H
00013 #define ANALYSISCALIBRATIONDATAINTERFACEBASE_H
00014 
00015 #include "Rtypes.h"
00016 #include "TMatrixDSym.h"
00017 #include <vector>
00018 #include <string>
00019 #include <map>
00020 #include <utility>
00021 #include <algorithm>
00022 
00023 class TF1;
00024 
00025 namespace Analysis 
00026 {
00027 
00028   const double CalibZERO = 1.e-6;
00029   const double dummyValue = -1.;
00030   typedef std::pair<double,double> CalibResult;
00031   // The following result is returned upon error
00032   const CalibResult dummyResult(dummyValue,dummyValue);
00033   //  const CalibResult dummyResult(std::make_pair(dummyValue,dummyValue));
00034 
00043   class CalibrationDataInterfaceBase {
00044     public:
00045       CalibrationDataInterfaceBase();
00046 
00048       virtual ~CalibrationDataInterfaceBase() = 0;
00049       
00056       const std::string& EffCalibrationName(const std::string& flavour) const;
00057       void setEffCalibrationNames(const std::map<std::string, std::string>& names);
00058       
00059       const std::string& SFCalibrationName(const std::string& flavour) const;
00060       void setSFCalibrationNames(const std::map<std::string, std::string>& names);
00061       
00063       enum variableType { kEta, kAbsEta, kPt };
00064 
00066       const std::vector<int>& functionArguments(const std::string& object) const;
00067 
00071       bool existFunctionArguments(const std::string& object) const;
00072 
00073     private:
00074 
00076       mutable std::map<std::string, std::vector<int> > m_functionArguments;
00077 
00080       mutable std::map<std::string, std::string> m_calibrationEffNames;
00081       mutable std::map<std::string, std::string> m_calibrationSFNames;
00082       
00084       double parametricVariance(TF1* fct, const TMatrixDSym* cov, const Double_t* x) const;
00085 
00086     protected:
00087 
00089       std::string getBasename (const std::string& OP, const std::string& flavour,
00090                                const std::string& extra = "", bool SF = true) const;
00091 
00093       CalibResult getResults (const Double_t* x, const Double_t* xsyst,
00094                               TF1* fct, TF1* fctsys,
00095                               const TMatrixDSym* cov) const;
00096 
00098       bool computeFunctionArguments(const std::string& object, const char* ctitle) const;
00099 
00101       std::string m_taggerName;
00102 
00104       std::vector<std::string> m_operatingPoints;
00105 
00106     }; 
00107 } // end of namespace
00108 
00109 #endif 

Generated on Thu Jun 30 11:40:04 2011 for manTreeSFrame by  doxygen 1.4.7