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

00001 
00002 // CalibrationDataInterfaceROOT.h, (c) ATLAS Detector software
00004 
00005 #ifndef ANALYSISCALIBRATIONDATAINTERFACEROOT_H
00006 #define ANALYSISCALIBRATIONDATAINTERFACEROOT_H
00007 
00008 #include "topUtils/CalibrationDataInterfaceBase.h"
00009 #include "TObject.h"
00010 #include "Rtypes.h"
00011 #include <vector>
00012 #include <string>
00013 #include <map>
00014 #include <utility>
00015 
00016 class TObject;
00017 class TFile;
00018 
00019 namespace Analysis 
00020 {
00021 
00057   // Package all jet variables into a single structure
00058 
00059   struct CalibrationDataVariables {
00060     std::string jetAuthor;
00061     double jetPt;
00062     double jetEta;
00063   };
00064 
00065   enum Uncertainty { None, Total, Statistical, Systematic };
00066 
00067   class CalibrationDataInterfaceROOT: public CalibrationDataInterfaceBase
00068     {
00069     public:
00070       CalibrationDataInterfaceROOT(const std::string& taggerName, std::string configname = "BTagCalibration.env");
00071 
00073       virtual ~CalibrationDataInterfaceROOT();
00074       
00087       CalibResult getEfficiency (const CalibrationDataVariables& variables, const std::string& label,
00088                                  const std::string& OP, Uncertainty unc = None) const;
00089       
00091       CalibResult getMCEfficiency (const CalibrationDataVariables& variables, const std::string& label,
00092                                    const std::string& OP, Uncertainty unc = None) const;
00093       
00095       CalibResult getScaleFactor (const CalibrationDataVariables& variables, const std::string& label,
00096                                   const std::string& OP, Uncertainty unc = None) const;
00097 
00099       CalibResult getInefficiencyScaleFactor(const CalibrationDataVariables& variables, const std::string& label,
00100                                              const std::string& OP, Uncertainty unc = None) const;
00101 
00103       CalibResult getInefficiency (const CalibrationDataVariables& variables, const std::string& label,
00104                                    const std::string& OP, Uncertainty unc = None) const;
00105 
00107       CalibResult getMCInefficiency (const CalibrationDataVariables& variables, const std::string& label,
00108                                      const std::string& OP, Uncertainty unc = None) const;
00109       
00110     private:
00111 
00113       void retrieveFunctionArguments(const CalibrationDataVariables& variables,
00114                                      const std::string& object, Double_t* x) const;
00115 
00117       TFile* m_fileEff;
00118       TFile* m_fileSF;
00119 
00122       std::map<std::string, std::string> m_aliases;
00123 
00126       mutable std::map<std::string, TObject*> m_objects;
00127 
00129       TObject* retrieveTObject(const std::string& name, bool eff) const;
00130 
00132       std::string getAlias(const std::string& author) const;
00133 
00135       std::string fullName(const std::string& author, const std::string& name) const;
00136 
00137     }; 
00138 } // end of namespace
00139 
00140 #endif 

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