Go to the documentation of this file.00001 #ifndef PhysicsTools_Utilities_interface_Lumi3DReWeighting_h
00002 #define PhysicsTools_Utilities_interface_Lumi3DReWeighting_h
00003
00004
00018 #include "TH1.h"
00019 #include "TFile.h"
00020 #include <cmath>
00021 #include <string>
00022 #include <boost/shared_ptr.hpp>
00023 #include <vector>
00024
00025
00026
00027 namespace edm {
00028 class EventBase;
00029 class Lumi3DReWeighting {
00030 public:
00031 Lumi3DReWeighting( std::string generatedFile,
00032 std::string dataFile,
00033 std::string GenHistName,
00034 std::string DataHistName,
00035 std::string WeightOutputFile);
00036
00037 Lumi3DReWeighting( std::vector< float > MC_distr, std::vector< float > Lumi_distr,
00038 std::string WeightOutputFile);
00039
00040 Lumi3DReWeighting ( ) { } ;
00041
00042 double weight3D( const edm::EventBase &e );
00043
00044 double weight3D( int, int, int );
00045
00046 void weight3D_set( std::string generatedFile, std::string dataFile, std::string GenHistName, std::string DataHistName, std::string WeightOutputFile);
00047
00048 void weight3D_init( float Scale );
00049
00050 void weight3D_init( std::string WeightFileName );
00051
00052 void weight3D_init( std::string MCFileName, std::string DataFileName );
00053
00054
00055 protected:
00056
00057 std::string generatedFileName_;
00058 std::string dataFileName_;
00059 std::string GenHistName_;
00060 std::string DataHistName_;
00061 std::string weightFileName_;
00062 boost::shared_ptr<TFile> generatedFile_;
00063 boost::shared_ptr<TFile> dataFile_;
00064 boost::shared_ptr<TH1> weights_;
00065
00066
00067
00068 boost::shared_ptr<TH1> MC_distr_;
00069 boost::shared_ptr<TH1> Data_distr_;
00070
00071
00072 double Weight3D_[50][50][50];
00073
00074 };
00075 }
00076
00077
00078
00079 #endif